summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-01-30 16:26:42 +0000
committerFatih Acet <acetfatih@gmail.com>2017-02-03 17:02:44 +0300
commite140675eef49e65e8b80909cf22c05284514cdef (patch)
tree6dc7e2a1529b925174c7cb68dcaf3c2be3169542
parent6c828906a24e374c68884c8884135ec1472721b8 (diff)
downloadgitlab-ce-e140675eef49e65e8b80909cf22c05284514cdef.tar.gz
Fixed issue link href
-rw-r--r--app/assets/javascripts/boards/components/modal/index.js.es66
-rw-r--r--app/assets/javascripts/boards/components/modal/list.js.es613
-rw-r--r--app/views/projects/boards/_show.html.haml3
3 files changed, 16 insertions, 6 deletions
diff --git a/app/assets/javascripts/boards/components/modal/index.js.es6 b/app/assets/javascripts/boards/components/modal/index.js.es6
index ababe3af0e3..f7f50455acc 100644
--- a/app/assets/javascripts/boards/components/modal/index.js.es6
+++ b/app/assets/javascripts/boards/components/modal/index.js.es6
@@ -9,7 +9,7 @@
gl.issueBoards.IssuesModal = Vue.extend({
props: [
- 'blankStateImage', 'newIssuePath', 'bulkUpdatePath',
+ 'blankStateImage', 'newIssuePath', 'bulkUpdatePath', 'issueLinkBase',
],
data() {
return ModalStore.store;
@@ -81,7 +81,9 @@
v-if="showAddIssuesModal">
<div class="add-issues-container">
<modal-header></modal-header>
- <modal-list v-if="!loading && showList"></modal-list>
+ <modal-list
+ :issue-link-base="issueLinkBase"
+ v-if="!loading && showList"></modal-list>
<empty-state
v-if="(!loading && issues.length === 0) || (activeTab === 'selected' && selectedIssues.length === 0)"
:image="blankStateImage"
diff --git a/app/assets/javascripts/boards/components/modal/list.js.es6 b/app/assets/javascripts/boards/components/modal/list.js.es6
index 605c1101666..0df09d42059 100644
--- a/app/assets/javascripts/boards/components/modal/list.js.es6
+++ b/app/assets/javascripts/boards/components/modal/list.js.es6
@@ -6,6 +6,9 @@
const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.ModalList = Vue.extend({
+ props: [
+ 'issueLinkBase',
+ ],
data() {
return ModalStore.store;
},
@@ -34,7 +37,11 @@
},
},
methods: {
- toggleIssue: ModalStore.toggleIssue.bind(ModalStore),
+ toggleIssue(e, issue) {
+ if (e.target.tagName !== 'A') {
+ ModalStore.toggleIssue(issue);
+ }
+ },
listHeight() {
return this.$refs.list.getBoundingClientRect().height;
},
@@ -100,10 +107,10 @@
<div
class="card"
:class="{ 'is-active': issue.selected }"
- @click="toggleIssue(issue)">
+ @click="toggleIssue($event, issue)">
<issue-card-inner
:issue="issue"
- :issue-link-base="'/'">
+ :issue-link-base="issueLinkBase">
</issue-card-inner>
<span
v-if="issue.selected"
diff --git a/app/views/projects/boards/_show.html.haml b/app/views/projects/boards/_show.html.haml
index 068e69bada6..a0f9dfc5b5b 100644
--- a/app/views/projects/boards/_show.html.haml
+++ b/app/views/projects/boards/_show.html.haml
@@ -28,4 +28,5 @@
= render "projects/boards/components/sidebar"
%board-add-issues-modal{ "blank-state-image" => render('shared/empty_states/icons/issues.svg'),
"new-issue-path" => new_namespace_project_issue_path(@project.namespace, @project),
- "bulk-update-path" => bulk_update_namespace_project_issues_path(@project.namespace, @project) }
+ "bulk-update-path" => bulk_update_namespace_project_issues_path(@project.namespace, @project),
+ ":issue-link-base" => "issueLinkBase" }