diff --git a/public/js/index.js b/public/js/index.js index d034b4e..6163d29 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1202,7 +1202,7 @@ ui.toolbar.export.snippet.click(function() { } $('').val(project.id).text(project.path_with_namespace).appendTo("#snippetExportModalProjects"); }); - $("#snippetExportModalProjects").prop('disabled',false); + $("#snippetExportModalProjects").prop('disabled', false); } $("#snippetExportModalLoading").hide(); }) @@ -1212,7 +1212,6 @@ ui.toolbar.export.snippet.click(function() { .complete(function () { ui.spinner.hide(); }); - return false; }); //import from dropbox ui.toolbar.import.dropbox.click(function () { @@ -1291,7 +1290,7 @@ ui.toolbar.import.snippet.click(function () { } $('').val(project.id).text(project.path_with_namespace).appendTo("#snippetImportModalProjects"); }); - $("#snippetImportModalProjects").prop('disabled',false); + $("#snippetImportModalProjects").prop('disabled', false); } $("#snippetImportModalLoading").hide(); }) @@ -1301,7 +1300,6 @@ ui.toolbar.import.snippet.click(function () { .complete(function () { ui.spinner.hide(); }); - return false; }); //import from clipboard ui.toolbar.import.clipboard.click(function () { @@ -1340,7 +1338,7 @@ ui.modal.snippetImportProjects.change(function() { $('').val(snippet.id).text(snippet.title).appendTo($("#snippetImportModalSnippets")); }); $("#snippetImportModalLoading").hide(); - $("#snippetImportModalSnippets").prop('disabled',false); + $("#snippetImportModalSnippets").prop('disabled', false); }) .error(function(err) { @@ -1508,7 +1506,7 @@ $("#snippetImportModalClear").click(function () { $("#snippetImportModalContent").val(''); $("#snippetImportModalProjects").val('init'); $("#snippetImportModalSnippets").val('init'); - $("#snippetImportModalSnippets").prop('disabled',true); + $("#snippetImportModalSnippets").prop('disabled', true); }); $("#snippetImportModalConfirm").click(function () { var snippeturl = $("#snippetImportModalContent").val(); @@ -1563,7 +1561,7 @@ $("#snippetExportModalConfirm").click(function() { code: editor.getValue(), visibility_level: $("#snippetExportModalVisibility").val() }; - + if (!data.title || !data.file_name || !data.code || !data.visibility_level || !$("#snippetExportModalProjects").val()) return; $("#snippetExportModalLoading").show(); var fullURL = baseURL + '/api/v3/projects/' + $("#snippetExportModalProjects").val() + '/snippets?access_token=' + accesstoken; $.post(fullURL diff --git a/public/views/body.ejs b/public/views/body.ejs index 5e183dc..62493e4 100644 --- a/public/views/body.ejs +++ b/public/views/body.ejs @@ -181,7 +181,7 @@ diff --git a/public/views/header.ejs b/public/views/header.ejs index 8610b86..75199cc 100644 --- a/public/views/header.ejs +++ b/public/views/header.ejs @@ -43,7 +43,7 @@ <% } %> <% if(typeof gitlab !== 'undefined' && gitlab) { %> - Snippet + Snippet <% } %> @@ -55,7 +55,7 @@ Gist <% if(typeof gitlab !== 'undefined' && gitlab) { %> - Snippet + Snippet <% } %> Clipboard @@ -136,7 +136,7 @@ <% } %> <% if(typeof gitlab !== 'undefined' && gitlab) { %> - Snippet + Snippet <% } %> @@ -148,7 +148,7 @@ Gist <% if(typeof gitlab !== 'undefined' && gitlab) { %> - Snippet + Snippet <% } %> Clipboard