Add some reminder for snippet before modal ajax

This commit is contained in:
Cheng-Han, Wu 2016-05-15 12:22:51 +08:00
parent bdc3a29157
commit 1f4e1f09b6
1 changed files with 3 additions and 1 deletions

View File

@ -1181,6 +1181,7 @@ ui.toolbar.export.googleDrive.click(function (e) {
ui.toolbar.export.gist.attr("href", noteurl + "/gist"); ui.toolbar.export.gist.attr("href", noteurl + "/gist");
//export to snippet //export to snippet
ui.toolbar.export.snippet.click(function() { ui.toolbar.export.snippet.click(function() {
ui.spinner.show();
$.get(serverurl + '/gitlab') $.get(serverurl + '/gitlab')
.success(function (data) { .success(function (data) {
$("#snippetExportModalAccessToken").val(data.accesstoken); $("#snippetExportModalAccessToken").val(data.accesstoken);
@ -1209,7 +1210,7 @@ ui.toolbar.export.snippet.click(function() {
showMessageModal('<i class="fa fa-gitlab"></i> Import from Snippet', 'Unable to fetch gitlab parameters :(', '', '', false); showMessageModal('<i class="fa fa-gitlab"></i> Import from Snippet', 'Unable to fetch gitlab parameters :(', '', '', false);
}) })
.complete(function () { .complete(function () {
//na ui.spinner.hide();
}); });
return false; return false;
}); });
@ -1267,6 +1268,7 @@ ui.toolbar.import.gist.click(function () {
}); });
//import from snippet //import from snippet
ui.toolbar.import.snippet.click(function () { ui.toolbar.import.snippet.click(function () {
ui.spinner.show();
$.get(serverurl + '/gitlab') $.get(serverurl + '/gitlab')
.success(function (data) { .success(function (data) {
$("#snippetImportModalAccessToken").val(data.accesstoken); $("#snippetImportModalAccessToken").val(data.accesstoken);