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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
97fbb3d1
Commit
97fbb3d1
authored
Jan 25, 2017
by
Phil Hughes
Committed by
Fatih Acet
Feb 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added selectable list before adding issues
Adds issues to list on frontend - need to push to backend
parent
e786ba98
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
8 deletions
+100
-8
app/assets/javascripts/boards/boards_bundle.js.es6
app/assets/javascripts/boards/boards_bundle.js.es6
+6
-0
app/assets/javascripts/boards/components/modal/footer.js.es6
app/assets/javascripts/boards/components/modal/footer.js.es6
+24
-7
app/assets/javascripts/boards/components/modal/lists_dropdown.js.es6
...javascripts/boards/components/modal/lists_dropdown.js.es6
+61
-0
app/assets/javascripts/boards/stores/boards_store.js.es6
app/assets/javascripts/boards/stores/boards_store.js.es6
+2
-1
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+7
-0
No files found.
app/assets/javascripts/boards/boards_bundle.js.es6
View file @
97fbb3d1
...
...
@@ -71,6 +71,12 @@ $(() => {
Store.addBlankState();
this.loading = false;
if (this.state.lists.length > 0) {
Store.modal.selectedList = this.state.lists[0];
}
Store.modal.showAddIssuesModal = true;
});
}
});
...
...
app/assets/javascripts/boards/components/modal/footer.js.es6
View file @
97fbb3d1
//= require ./lists_dropdown
/* global Vue */
(() => {
const Store = gl.issueBoards.BoardsStore;
...
...
@@ -31,18 +32,34 @@
addIssues() {
const issueIds = this.store.issues.filter(issue => issue.selected).map(issue => issue.id);
issueIds.forEach((id) => {
const issue = this.store.issues.filter(issue => issue.id == id)[0];
this.store.selectedList.addIssue(issue);
this.store.selectedList.issuesSize += 1;
});
this.disabled = true;
this.hideModal();
},
},
components: {
'lists-dropdown': gl.issueBoards.ModalFooterListsDropdown,
},
template: `
<footer class="form-actions add-issues-footer">
<button
class="btn btn-success pull-left"
type="button"
:disabled="submitDisabled"
@click="addIssues">
{{ submitText }}
</button>
<div class="pull-left">
<button
class="btn btn-success"
type="button"
:disabled="submitDisabled"
@click="addIssues">
{{ submitText }}
</button>
<span class="add-issues-footer-to-list">
to list
</span>
<lists-dropdown></lists-dropdown>
</div>
<button
class="btn btn-default pull-right"
type="button"
...
...
app/assets/javascripts/boards/components/modal/lists_dropdown.js.es6
0 → 100644
View file @
97fbb3d1
/* global Vue */
(() => {
const Store = gl.issueBoards.BoardsStore;
window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.ModalFooterListsDropdown = Vue.extend({
data() {
return {
modal: Store.modal,
state: Store.state,
}
},
computed: {
selected() {
return this.modal.selectedList;
},
},
methods: {
selectList(list) {
this.modal.selectedList = list;
},
},
template: `
<div class="dropdown inline">
<button
class="dropdown-menu-toggle"
type="button"
data-toggle="dropdown"
aria-expanded="false">
{{ selected.title }}
<span
class="dropdown-label-box pull-right"
:style="{ backgroundColor: selected.label.color }">
</span>
<i class="fa fa-chevron-down"></i>
</button>
<div class="dropdown-menu dropdown-menu-selectable">
<ul>
<li
v-for="list in state.lists"
v-if="list.type == 'label'">
<a
href="#"
role="button"
:class="{ 'is-active': list.id == selected.id }"
@click="selectList(list)">
<span
class="dropdown-label-box"
:style="{ backgroundColor: list.label.color }">
</span>
{{ list.title }}
</a>
</li>
</ul>
</div>
</div>
`,
});
})();
app/assets/javascripts/boards/stores/boards_store.js.es6
View file @
97fbb3d1
...
...
@@ -14,8 +14,9 @@
},
modal: {
issues: [],
showAddIssuesModal:
tru
e,
showAddIssuesModal:
fals
e,
activeTab: 'all',
selectedList: {}
},
moving: {
issue: {},
...
...
app/assets/stylesheets/pages/boards.scss
View file @
97fbb3d1
...
...
@@ -427,6 +427,13 @@
padding-right
:
15px
;
}
.add-issues-footer-to-list
{
display
:
inline-block
;
padding-left
:
6px
;
padding-right
:
6px
;
line-height
:
34px
;
}
.add-issues-list-columns
{
width
:
100%
;
padding-top
:
3px
;
...
...
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