diff options
author | Jason Croft | 2016-05-12 14:26:55 -0400 |
---|---|---|
committer | Jason Croft | 2016-05-12 14:26:55 -0400 |
commit | ba0a8f584a0655552e3ed95cd5ef006eeb408eef (patch) | |
tree | 850e8d3685317b68c5a11cc6df04c1f435237319 /public | |
parent | 31d978e4507765da104d0aafebd2e757d8103df1 (diff) |
Filter out projects that don't have snippets enabled.
Diffstat (limited to 'public')
-rw-r--r-- | public/js/index.js | 3 |
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); |