summaryrefslogtreecommitdiff
path: root/public/js/index.js
diff options
context:
space:
mode:
authorJason Croft2016-05-12 14:26:55 -0400
committerJason Croft2016-05-12 14:26:55 -0400
commitba0a8f584a0655552e3ed95cd5ef006eeb408eef (patch)
tree850e8d3685317b68c5a11cc6df04c1f435237319 /public/js/index.js
parent31d978e4507765da104d0aafebd2e757d8103df1 (diff)
Filter out projects that don't have snippets enabled.
Diffstat (limited to 'public/js/index.js')
-rw-r--r--public/js/index.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/public/js/index.js b/public/js/index.js
index bdb9d478..fbaf95fb 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1163,6 +1163,9 @@ ui.toolbar.export.snippet.click(function() {
return (a.path_with_namespace < b.path_with_namespace) ? -1 : ((a.path_with_namespace > b.path_with_namespace) ? 1 : 0);
});
data.projects.forEach(function(project) {
+ if (!project.snippets_enabled) {
+ return;
+ }
$('<option>').val(project.id).text(project.path_with_namespace).appendTo("#snippetExportModalProjects");
});
$("#snippetExportModalProjects").prop('disabled',false);