Removed previous filter code
This commit is contained in:
parent
d701b39db9
commit
236d6595ed
3 changed files with 3 additions and 28 deletions
|
@ -353,31 +353,17 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('html').hasClass('issue-boards-page') && !$dropdown.hasClass('js-issue-board-sidebar') &&
|
if ($dropdown.closest('.add-issues-modal').length) {
|
||||||
!$dropdown.closest('.add-issues-modal').length) {
|
|
||||||
boardsModel = gl.issueBoards.BoardsStore.state.filters;
|
|
||||||
} else if ($dropdown.closest('.add-issues-modal').length) {
|
|
||||||
boardsModel = gl.issueBoards.ModalStore.store.filter;
|
boardsModel = gl.issueBoards.ModalStore.store.filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boardsModel) {
|
if (boardsModel) {
|
||||||
if (label.isAny) {
|
if (label.isAny) {
|
||||||
boardsModel['label_name'] = [];
|
boardsModel['label_name'] = [];
|
||||||
}
|
} else if ($el.hasClass('is-active')) {
|
||||||
else if ($el.hasClass('is-active')) {
|
|
||||||
boardsModel['label_name'].push(label.title);
|
boardsModel['label_name'].push(label.title);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
var filters = boardsModel['label_name'];
|
|
||||||
filters = filters.filter(function (filteredLabel) {
|
|
||||||
return filteredLabel !== label.title;
|
|
||||||
});
|
|
||||||
boardsModel['label_name'] = filters;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$dropdown.closest('.add-issues-modal').length) {
|
|
||||||
gl.issueBoards.BoardsStore.updateFiltersUrl();
|
|
||||||
}
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,18 +124,12 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('html').hasClass('issue-boards-page') && !$dropdown.hasClass('js-issue-board-sidebar') &&
|
if ($dropdown.closest('.add-issues-modal').length) {
|
||||||
!$dropdown.closest('.add-issues-modal').length) {
|
|
||||||
boardsStore = gl.issueBoards.BoardsStore.state.filters;
|
|
||||||
} else if ($dropdown.closest('.add-issues-modal').length) {
|
|
||||||
boardsStore = gl.issueBoards.ModalStore.store.filter;
|
boardsStore = gl.issueBoards.ModalStore.store.filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boardsStore) {
|
if (boardsStore) {
|
||||||
boardsStore[$dropdown.data('field-name')] = selected.name;
|
boardsStore[$dropdown.data('field-name')] = selected.name;
|
||||||
if (!$dropdown.closest('.add-issues-modal').length) {
|
|
||||||
gl.issueBoards.BoardsStore.updateFiltersUrl();
|
|
||||||
}
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
} else if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) {
|
} else if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) {
|
||||||
if (selected.name != null) {
|
if (selected.name != null) {
|
||||||
|
|
|
@ -217,11 +217,6 @@
|
||||||
}
|
}
|
||||||
if ($el.closest('.add-issues-modal').length) {
|
if ($el.closest('.add-issues-modal').length) {
|
||||||
gl.issueBoards.ModalStore.store.filter[$dropdown.data('field-name')] = user.id;
|
gl.issueBoards.ModalStore.store.filter[$dropdown.data('field-name')] = user.id;
|
||||||
} else if ($('html').hasClass('issue-boards-page') && !$dropdown.hasClass('js-issue-board-sidebar')) {
|
|
||||||
selectedId = user.id;
|
|
||||||
gl.issueBoards.BoardsStore.state.filters[$dropdown.data('field-name')] = user.id;
|
|
||||||
gl.issueBoards.BoardsStore.updateFiltersUrl();
|
|
||||||
e.preventDefault();
|
|
||||||
} else if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) {
|
} else if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) {
|
||||||
selectedId = user.id;
|
selectedId = user.id;
|
||||||
return Issuable.filterResults($dropdown.closest('form'));
|
return Issuable.filterResults($dropdown.closest('form'));
|
||||||
|
|
Loading…
Reference in a new issue