Commit d7d50fbb authored by Phil Hughes's avatar Phil Hughes Committed by Douglas Barbosa Alexandre

Added content to milestone dropdown

Changes toggle text on milestone change
parent 6bfb7b3a
......@@ -96,13 +96,18 @@ require('./board_new_form');
},
updateMilestoneFilterDropdown() {
const $milestoneDropdown = $('.dropdown-menu-milestone');
const hideElements = this.board.milestone_id === undefined;
const hideElements = this.board.milestone_id === null;
console.log(hideElements, this.board.milestone_id);
$milestoneDropdown.find('.dropdown-input').toggle(hideElements);
$milestoneDropdown.find('.dropdown-footer').toggle(hideElements);
$milestoneDropdown.find('.dropdown-input, .dropdown-footer-list')
.toggle(hideElements);
$milestoneDropdown.find('.js-milestone-footer-content').toggle(!hideElements);
$milestoneDropdown.find('.dropdown-content li')
.filter((i, el) => $(el).find('.is-active').length === 0)
.toggle(hideElements);
$('.js-milestone-select .dropdown-toggle-text')
.text(hideElements ? 'Milestone' : this.board.milestone.title);
},
},
created() {
......
......@@ -121,7 +121,7 @@
vue: $dropdown.hasClass('js-issue-board-sidebar'),
hideRow: function(milestone) {
if ($('html').hasClass('issue-boards-page') && !$dropdown.hasClass('js-issue-board-sidebar') &&
!$dropdown.closest('.add-issues-modal').length && gl.issueBoards.BoardsStore.state.currentBoard.milestone.title) {
!$dropdown.closest('.add-issues-modal').length && gl.issueBoards.BoardsStore.state.currentBoard.milestone_id) {
return milestone !== gl.issueBoards.BoardsStore.state.currentBoard.milestone.title;
}
......@@ -129,7 +129,7 @@
},
isSelectable: function() {
if ($('html').hasClass('issue-boards-page') && !$dropdown.hasClass('js-issue-board-sidebar') &&
!$dropdown.closest('.add-issues-modal').length && gl.issueBoards.BoardsStore.state.currentBoard.milestone.title) {
!$dropdown.closest('.add-issues-modal').length && gl.issueBoards.BoardsStore.state.currentBoard.milestone_id) {
return false;
}
......
......@@ -576,3 +576,9 @@
min-width: 100%;
}
}
.board-milestone-footer-content {
padding-left: 12px;
padding-right: 12px;
color: $gl-gray-dark;
}
......@@ -26,3 +26,7 @@
Manage milestones
- else
View milestones
- if board
%p.board-milestone-footer-content.js-milestone-footer-content{ style: "display: none;" }
This board's milestone has been set in its configuration.
Edit this value under the board menu.
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