Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
b4113dba
Commit
b4113dba
authored
Jan 31, 2017
by
Phil Hughes
Committed by
Fatih Acet
Feb 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uses mixins for repeated functions
parent
cf5396d4
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
10 deletions
+26
-10
app/assets/javascripts/boards/boards_bundle.js.es6
app/assets/javascripts/boards/boards_bundle.js.es6
+2
-1
app/assets/javascripts/boards/components/modal/empty_state.js.es6
...ts/javascripts/boards/components/modal/empty_state.js.es6
+2
-1
app/assets/javascripts/boards/components/modal/footer.js.es6
app/assets/javascripts/boards/components/modal/footer.js.es6
+3
-5
app/assets/javascripts/boards/components/modal/header.js.es6
app/assets/javascripts/boards/components/modal/header.js.es6
+2
-1
app/assets/javascripts/boards/components/modal/tabs.js.es6
app/assets/javascripts/boards/components/modal/tabs.js.es6
+3
-2
app/assets/javascripts/boards/mixins/modal_mixins.js.es6
app/assets/javascripts/boards/mixins/modal_mixins.js.es6
+14
-0
No files found.
app/assets/javascripts/boards/boards_bundle.js.es6
View file @
b4113dba
...
...
@@ -91,6 +91,7 @@ $(() => {
});
gl.IssueBoardsModalAddBtn = new Vue({
mixins: [gl.issueBoards.ModalMixins],
el: '#js-add-issues-btn',
data: {
modal: ModalStore.store,
...
...
@@ -106,7 +107,7 @@ $(() => {
class="btn btn-create pull-right prepend-left-10 has-tooltip"
type="button"
:disabled="disabled"
@click="
modal.showAddIssuesModal = true
">
@click="
toggleModal(true)
">
Add issues
</button>
`,
...
...
app/assets/javascripts/boards/components/modal/empty_state.js.es6
View file @
b4113dba
...
...
@@ -3,6 +3,7 @@
const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.ModalEmptyState = Vue.extend({
mixins: [gl.issueBoards.ModalMixins],
data() {
return ModalStore.store;
},
...
...
@@ -56,7 +57,7 @@
<button
type="button"
class="btn btn-default"
@click="
activeTab = 'all'
"
@click="
changeTab('all')
"
v-if="activeTab === 'selected'">
All issues
</button>
...
...
app/assets/javascripts/boards/components/modal/footer.js.es6
View file @
b4113dba
...
...
@@ -4,6 +4,7 @@
const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.ModalFooter = Vue.extend({
mixins: [gl.issueBoards.ModalMixins],
data() {
return ModalStore.store;
},
...
...
@@ -18,9 +19,6 @@
},
},
methods: {
hideModal() {
this.showAddIssuesModal = false;
},
addIssues() {
const list = this.selectedList;
const selectedIssues = ModalStore.getSelectedIssues();
...
...
@@ -37,7 +35,7 @@
list.issuesSize += 1;
});
this.
hideModal(
);
this.
toggleModal(false
);
},
},
components: {
...
...
@@ -62,7 +60,7 @@
<button
class="btn btn-default pull-right"
type="button"
@click="
hideModal
">
@click="
toggleModal(false)
">
Cancel
</button>
</footer>
...
...
app/assets/javascripts/boards/components/modal/header.js.es6
View file @
b4113dba
...
...
@@ -4,6 +4,7 @@
const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.IssuesModalHeader = Vue.extend({
mixins: [gl.issueBoards.ModalMixins],
data() {
return ModalStore.store;
},
...
...
@@ -36,7 +37,7 @@
class="close"
data-dismiss="modal"
aria-label="Close"
@click="
showAddIssuesModal = false
">
@click="
toggleModal(false)
">
<span aria-hidden="true">×</span>
</button>
</h2>
...
...
app/assets/javascripts/boards/components/modal/tabs.js.es6
View file @
b4113dba
...
...
@@ -3,6 +3,7 @@
const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.ModalTabs = Vue.extend({
mixins: [gl.issueBoards.ModalMixins],
data() {
return ModalStore.store;
},
...
...
@@ -21,7 +22,7 @@
<a
href="#"
role="button"
@click.prevent="
activeTab = 'all'
">
@click.prevent="
changeTab('all')
">
<span>All issues</span>
<span class="badge">
{{ issuesCount }}
...
...
@@ -32,7 +33,7 @@
<a
href="#"
role="button"
@click.prevent="
activeTab = 'selected'
">
@click.prevent="
changeTab('selected')
">
<span>Selected issues</span>
<span class="badge">
{{ selectedCount }}
...
...
app/assets/javascripts/boards/mixins/modal_mixins.js.es6
0 → 100644
View file @
b4113dba
(() => {
const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.ModalMixins = {
methods: {
toggleModal(toggle) {
ModalStore.store.showAddIssuesModal = toggle;
},
changeTab(tab) {
ModalStore.store.activeTab = tab;
},
},
};
})();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment