Prettify JS

This commit is contained in:
Heinrich Lee Yu 2018-11-01 08:32:01 +08:00
parent 911d835650
commit c216b25dfe
2 changed files with 15 additions and 9 deletions

View file

@ -48,14 +48,19 @@ export default {
selectable: true, selectable: true,
data: (term, callback) => { data: (term, callback) => {
this.loading = true; this.loading = true;
return Api.groupProjects(this.groupId, term, { return Api.groupProjects(
with_issues_enabled: true, this.groupId,
with_shared: false, term,
include_subgroups: true {
}, projects => { with_issues_enabled: true,
this.loading = false; with_shared: false,
callback(projects); include_subgroups: true,
}); },
projects => {
this.loading = false;
callback(projects);
},
);
}, },
renderRow(project) { renderRow(project) {
return ` return `

View file

@ -14,7 +14,8 @@ export default function projectSelect() {
this.orderBy = $(select).data('orderBy') || 'id'; this.orderBy = $(select).data('orderBy') || 'id';
this.withIssuesEnabled = $(select).data('withIssuesEnabled'); this.withIssuesEnabled = $(select).data('withIssuesEnabled');
this.withMergeRequestsEnabled = $(select).data('withMergeRequestsEnabled'); this.withMergeRequestsEnabled = $(select).data('withMergeRequestsEnabled');
this.withShared = $(select).data('withShared') === undefined ? true : $(select).data('withShared'); this.withShared =
$(select).data('withShared') === undefined ? true : $(select).data('withShared');
this.includeProjectsInSubgroups = $(select).data('includeProjectsInSubgroups') || false; this.includeProjectsInSubgroups = $(select).data('includeProjectsInSubgroups') || false;
this.allowClear = $(select).data('allowClear') || false; this.allowClear = $(select).data('allowClear') || false;