Filter out projects that don't have snippets enabled.

This commit is contained in:
Jason Croft 2016-05-12 14:26:55 -04:00
parent 31d978e450
commit ba0a8f584a

View file

@ -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);