mirror of https://github.com/status-im/codimd.git
Filter out projects that don't have snippets enabled.
This commit is contained in:
parent
31d978e450
commit
ba0a8f584a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue