Commit e140675e authored by Phil Hughes's avatar Phil Hughes Committed by Fatih Acet

Fixed issue link href

parent 6c828906
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
gl.issueBoards.IssuesModal = Vue.extend({ gl.issueBoards.IssuesModal = Vue.extend({
props: [ props: [
'blankStateImage', 'newIssuePath', 'bulkUpdatePath', 'blankStateImage', 'newIssuePath', 'bulkUpdatePath', 'issueLinkBase',
], ],
data() { data() {
return ModalStore.store; return ModalStore.store;
...@@ -81,7 +81,9 @@ ...@@ -81,7 +81,9 @@
v-if="showAddIssuesModal"> v-if="showAddIssuesModal">
<div class="add-issues-container"> <div class="add-issues-container">
<modal-header></modal-header> <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 <empty-state
v-if="(!loading && issues.length === 0) || (activeTab === 'selected' && selectedIssues.length === 0)" v-if="(!loading && issues.length === 0) || (activeTab === 'selected' && selectedIssues.length === 0)"
:image="blankStateImage" :image="blankStateImage"
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.ModalList = Vue.extend({ gl.issueBoards.ModalList = Vue.extend({
props: [
'issueLinkBase',
],
data() { data() {
return ModalStore.store; return ModalStore.store;
}, },
...@@ -34,7 +37,11 @@ ...@@ -34,7 +37,11 @@
}, },
}, },
methods: { methods: {
toggleIssue: ModalStore.toggleIssue.bind(ModalStore), toggleIssue(e, issue) {
if (e.target.tagName !== 'A') {
ModalStore.toggleIssue(issue);
}
},
listHeight() { listHeight() {
return this.$refs.list.getBoundingClientRect().height; return this.$refs.list.getBoundingClientRect().height;
}, },
...@@ -100,10 +107,10 @@ ...@@ -100,10 +107,10 @@
<div <div
class="card" class="card"
:class="{ 'is-active': issue.selected }" :class="{ 'is-active': issue.selected }"
@click="toggleIssue(issue)"> @click="toggleIssue($event, issue)">
<issue-card-inner <issue-card-inner
:issue="issue" :issue="issue"
:issue-link-base="'/'"> :issue-link-base="issueLinkBase">
</issue-card-inner> </issue-card-inner>
<span <span
v-if="issue.selected" v-if="issue.selected"
......
...@@ -28,4 +28,5 @@ ...@@ -28,4 +28,5 @@
= render "projects/boards/components/sidebar" = render "projects/boards/components/sidebar"
%board-add-issues-modal{ "blank-state-image" => render('shared/empty_states/icons/issues.svg'), %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), "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" }
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