Commit 603a6be9 authored by Lukas Eipert's avatar Lukas Eipert

resolve conflict in app/assets/javascripts/boards/stores/boards_store.js

parent 1195c217
......@@ -123,7 +123,7 @@ gl.issueBoards.BoardsStore = {
if (!issueTo) {
// Check if target list assignee is already present in this issue
if ((listTo.type === 'assignee' && listFrom.type === 'assignee') &&
issue.findAssignee(listTo.assignee)) {
issue.findAssignee(listTo.assignee)) {
const targetIssue = listTo.findIssue(issue.id);
targetIssue.removeAssignee(listFrom.assignee);
} else {
......@@ -144,7 +144,7 @@ gl.issueBoards.BoardsStore = {
issue.removeAssignee(listFrom.assignee);
listFrom.removeIssue(issue);
} else if ((listTo.type !== 'label' && listFrom.type === 'assignee') ||
(listTo.type !== 'assignee' && listFrom.type === 'label')) {
(listTo.type !== 'assignee' && listFrom.type === 'label')) {
listFrom.removeIssue(issue);
}
},
......@@ -162,19 +162,9 @@ gl.issueBoards.BoardsStore = {
});
return filteredList[0];
},
<<<<<<< HEAD
updateFiltersUrl (replaceState = false) {
if (replaceState) {
window.history.replaceState(null, null, `?${this.filter.path}`);
} else {
window.history.pushState(null, null, `?${this.filter.path}`);
}
},
=======
updateFiltersUrl () {
window.history.pushState(null, null, `?${this.filter.path}`);
}
>>>>>>> upstream/master
};
boardsStoreEE.initEESpecific(gl.issueBoards.BoardsStore);
......@@ -28,15 +28,27 @@ class BoardsStoreEE {
this.initBoardFilters();
}
};
this.store.updateFiltersUrl = (replaceState = false) => {
if (replaceState) {
window.history.replaceState(null, null, `?${this.store.filter.path}`);
} else {
window.history.pushState(null, null, `?${this.store.filter.path}`);
}
};
}
initBoardFilters() {
const updateFilterPath = (key, value) => {
if (!value) return;
const querystring = `${key}=${value}`;
this.store.filter.path = [querystring].concat(
this.store.filter.path.split('&').filter(param => param.match(new RegExp(`^${key}=(.*)$`, 'g')) === null),
).join('&');
this.store.filter.path = [querystring]
.concat(
this.store.filter.path
.split('&')
.filter(param => param.match(new RegExp(`^${key}=(.*)$`, 'g')) === null),
)
.join('&');
};
let milestoneTitle = this.store.boardConfig.milestoneTitle;
......@@ -64,7 +76,7 @@ class BoardsStoreEE {
}
const filterPath = this.store.filter.path.split('&');
this.store.boardConfig.labels.forEach((label) => {
this.store.boardConfig.labels.forEach(label => {
const labelTitle = encodeURIComponent(label.title);
const param = `label_name[]=${labelTitle}`;
const labelIndex = filterPath.indexOf(param);
......@@ -85,7 +97,12 @@ class BoardsStoreEE {
}
addPromotion() {
if (!this.$boardApp.hasAttribute('data-show-promotion') || this.promotionIsHidden() || this.store.disabled) return;
if (
!this.$boardApp.hasAttribute('data-show-promotion') ||
this.promotionIsHidden() ||
this.store.disabled
)
return;
this.store.addList({
id: 'promotion',
......
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