Commit c24d849f authored by Phil Hughes's avatar Phil Hughes

Fixed milestone select not loading because of glDropdown stuff...

Fixed eslint
parent 0082cb20
...@@ -64,9 +64,8 @@ $(() => { ...@@ -64,9 +64,8 @@ $(() => {
created () { created () {
if (this.milestoneTitle) { if (this.milestoneTitle) {
const milestoneTitleParam = `milestone_title=${this.milestoneTitle}`; const milestoneTitleParam = `milestone_title=${this.milestoneTitle}`;
let splitPath = Store.filter.path.split('&').filter((param) => { let splitPath = Store.filter.path.split('&')
return param.match(/^milestone_title=(.*)$/g) === null; .filter(param => param.match(/^milestone_title=(.*)$/g) === null);
});
splitPath = [milestoneTitleParam].concat(splitPath); splitPath = [milestoneTitleParam].concat(splitPath);
Store.filter.path = splitPath.join('&'); Store.filter.path = splitPath.join('&');
......
...@@ -42,12 +42,6 @@ require('./board_new_form'); ...@@ -42,12 +42,6 @@ require('./board_new_form');
this.loadBoards(false); this.loadBoards(false);
} }
}, },
board: {
handler() {
this.updateMilestoneFilterDropdown();
},
deep: true,
},
}, },
computed: { computed: {
currentPage() { currentPage() {
...@@ -94,33 +88,9 @@ require('./board_new_form'); ...@@ -94,33 +88,9 @@ require('./board_new_form');
}); });
} }
}, },
updateMilestoneFilterDropdown() {
const $milestoneDropdownToggle = $('.js-milestone-select');
const glDropdown = $milestoneDropdownToggle.data('glDropdown');
const $milestoneDropdown = $('.dropdown-menu-milestone');
const hideElements = this.board.milestone === undefined || this.board.milestone_id === null;
$('#milestone_title').val(this.board.milestone ? this.board.milestone.title : '');
if (glDropdown.fullData) {
glDropdown.parseData(glDropdown.fullData);
}
$milestoneDropdown.find('.dropdown-input, .dropdown-footer-list')
.toggle(hideElements);
$milestoneDropdown.find('.js-milestone-footer-content').toggle(!hideElements);
$milestoneDropdown.find('.dropdown-content li').show()
.filter((i, el) => $(el).find('.is-active').length === 0)
.toggle(hideElements);
$('.js-milestone-select .dropdown-toggle-text')
.text(hideElements ? 'Milestone' : this.board.milestone.title)
.toggleClass('is-default', hideElements);
},
}, },
created() { created() {
this.state.currentBoard = this.currentBoard; this.state.currentBoard = this.currentBoard;
this.updateMilestoneFilterDropdown();
}, },
}); });
})(); })();
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