Updated to pass the board ID with the boards root to save conflicts with EE
This commit is contained in:
parent
53f50edf4d
commit
dc49ee6247
|
@ -28,12 +28,13 @@ $(() => {
|
|||
state: Store.state,
|
||||
loading: true,
|
||||
endpoint: $boardApp.dataset.endpoint,
|
||||
boardId: $boardApp.dataset.boardId,
|
||||
disabled: $boardApp.dataset.disabled === 'true',
|
||||
issueLinkBase: $boardApp.dataset.issueLinkBase
|
||||
},
|
||||
init: Store.create.bind(Store),
|
||||
created () {
|
||||
gl.boardService = new BoardService(this.endpoint);
|
||||
gl.boardService = new BoardService(this.endpoint, this.boardId);
|
||||
},
|
||||
ready () {
|
||||
Store.disabled = this.disabled;
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
class BoardService {
|
||||
constructor (root) {
|
||||
constructor (root, boardId) {
|
||||
Vue.http.options.root = root;
|
||||
|
||||
this.lists = Vue.resource(`${root}/lists{/id}`, {}, {
|
||||
this.lists = Vue.resource(`${root}/${boardId}/lists{/id}`, {}, {
|
||||
generate: {
|
||||
method: 'POST',
|
||||
url: `${root}/lists/generate.json`
|
||||
url: `${root}/${boardId}/lists/generate.json`
|
||||
}
|
||||
});
|
||||
this.issue = Vue.resource(`${root}/issues{/id}`, {});
|
||||
this.issues = Vue.resource(`${root}/lists{/id}/issues`, {});
|
||||
this.issue = Vue.resource(`${root}/${boardId}/issues{/id}`, {});
|
||||
this.issues = Vue.resource(`${root}/${boardId}/lists{/id}/issues`, {});
|
||||
|
||||
Vue.http.interceptors.push((request, next) => {
|
||||
request.headers['X-CSRF-Token'] = $.rails.csrfToken();
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
= render 'shared/issuable/filter', type: :boards
|
||||
|
||||
.boards-list#board-app{ "v-cloak" => true,
|
||||
"data-endpoint" => "#{namespace_project_board_path(@project.namespace, @project, @boards.first)}",
|
||||
"data-endpoint" => "#{namespace_project_boards_path(@project.namespace, @project)}",
|
||||
"data-board-id" => "#{@boards.first.id}",
|
||||
"data-disabled" => "#{!can?(current_user, :admin_list, @project)}",
|
||||
"data-issue-link-base" => "#{namespace_project_issues_path(@project.namespace, @project)}" }
|
||||
.boards-app-loading.text-center{ "v-if" => "loading" }
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
= render 'shared/issuable/filter', type: :boards
|
||||
|
||||
.boards-list#board-app{ "v-cloak" => true,
|
||||
"data-endpoint" => "#{namespace_project_board_path(@project.namespace, @project, @board)}",
|
||||
"data-endpoint" => "#{namespace_project_boards_path(@project.namespace, @project)}",
|
||||
"data-board-id" => "#{@board.id}",
|
||||
"data-disabled" => "#{!can?(current_user, :admin_list, @project)}",
|
||||
"data-issue-link-base" => "#{namespace_project_issues_path(@project.namespace, @project)}" }
|
||||
.boards-app-loading.text-center{ "v-if" => "loading" }
|
||||
|
|
Loading…
Reference in New Issue