Commit 514a5b25 authored by Simon Knox's avatar Simon Knox

add label to Projects dropdown, fix update url

parent 4a3e1fb7
......@@ -81,6 +81,7 @@ export default {
},
mounted() {
this.$refs.input.focus();
if (this.groupId) {
$(this.$refs.projectsDropdown).glDropdown({
filterable: true,
filterRemote: true,
......@@ -88,11 +89,11 @@ export default {
fields: ['name_with_namespace'],
},
data(term, callback) {
console.log(term);
return Api.groupProjects(this.groupId, term, callback);
},
text: project => project.name,
});
}
},
template: `
<div class="card board-new-issue-form">
......@@ -113,18 +114,22 @@ export default {
ref="input"
autocomplete="off"
:id="list.id + '-title'" />
<div class="dropdown prepend-top-10">
<template v-if="groupId">
<label class="label-light prepend-top-10"
:for="list.id + '-project'">
Project
</label>
<div class="dropdown">
<button
@click="loadProjects"
class="dropdown-menu-toggle"
class="dropdown-menu-toggle wide"
type="button"
data-toggle="dropdown"
aria-expanded="false">
{{ selectedProject.name || 'Select a project' }}
<i class="fa fa-chevron-down"></i>
</button>
<div class="dropdown-menu dropdown-menu-selectable">
<div class="dropdown-menu dropdown-menu-selectable wide">
<ul>
<li v-for="project in projects">
<a
......@@ -138,6 +143,7 @@ export default {
</ul>
</div>
</div>
</template>
<div class="clearfix prepend-top-10">
<button class="btn btn-success pull-left"
type="submit"
......
......@@ -59,7 +59,6 @@ gl.issueBoards.BoardSidebar = Vue.extend({
this.list = this.detail.list;
this.$nextTick(() => {
new UsersSelect();
this.endpoint = this.$refs.assigneeDropdown.dataset.issueUpdate;
});
},
......
......@@ -90,7 +90,7 @@ class ListIssue {
data.issue.label_ids = [''];
}
return Vue.http.patch(this.updateUrl, data);
return Vue.http.patch(url, data);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment