Commit 904c7242 authored by Phil Hughes's avatar Phil Hughes

Fixed conflicts

parent 716a2595
......@@ -34,10 +34,7 @@ gl.issueBoards.ModalFooter = Vue.extend({
// Post the data to the backend
gl.boardService.bulkUpdate(issueIds, {
add_label_ids: [list.label.id],
<<<<<<< HEAD
milestone_id: this.state.currentBoard.milestone_id,
=======
>>>>>>> upstream/master
}).catch(() => {
new Flash('Failed to update issues, please try again.', 'alert');
......
......@@ -24,7 +24,6 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
const issue = this.issue;
const lists = issue.getLists();
const labelIds = lists.map(list => list.label.id);
<<<<<<< HEAD
const data = {
remove_label_ids: labelIds,
};
......@@ -35,13 +34,6 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({
// Post the remove data
gl.boardService.bulkUpdate([issue.globalId], data).catch(() => {
=======
// Post the remove data
gl.boardService.bulkUpdate([issue.globalId], {
remove_label_ids: labelIds,
}).catch(() => {
>>>>>>> upstream/master
new Flash('Failed to remove issue from board, please try again.', 'alert');
lists.forEach((list) => {
......
......@@ -23,14 +23,11 @@ gl.issueBoards.BoardsStore = {
this.state.lists = [];
this.filter.path = gl.utils.getUrlParamsArray().join('&');
},
<<<<<<< HEAD
createNewListDropdownData() {
this.state.currentBoard = {};
this.state.currentPage = '';
this.state.reload = false;
},
=======
>>>>>>> upstream/master
addList (listObj) {
const list = new List(listObj);
this.state.lists.push(list);
......@@ -63,7 +60,6 @@ gl.issueBoards.BoardsStore = {
title: 'Welcome to your Issue Board!',
position: 0
});
<<<<<<< HEAD
this.state.lists = _.sortBy(this.state.lists, 'position');
},
......@@ -134,73 +130,5 @@ gl.issueBoards.BoardsStore = {
} else {
history.pushState(null, null, `?${this.filter.path}`);
}
=======
this.state.lists = _.sortBy(this.state.lists, 'position');
},
removeBlankState () {
this.removeList('blank');
Cookies.set('issue_board_welcome_hidden', 'true', {
expires: 365 * 10,
path: ''
});
},
welcomeIsHidden () {
return Cookies.get('issue_board_welcome_hidden') === 'true';
},
removeList (id, type = 'blank') {
const list = this.findList('id', id, type);
if (!list) return;
this.state.lists = this.state.lists.filter(list => list.id !== id);
},
moveList (listFrom, orderLists) {
orderLists.forEach((id, i) => {
const list = this.findList('id', parseInt(id, 10));
list.position = i;
});
listFrom.update();
},
moveIssueToList (listFrom, listTo, issue, newIndex) {
const issueTo = listTo.findIssue(issue.id);
const issueLists = issue.getLists();
const listLabels = issueLists.map(listIssue => listIssue.label);
if (!issueTo) {
// Add to new lists issues if it doesn't already exist
listTo.addIssue(issue, listFrom, newIndex);
} else {
listTo.updateIssueLabel(issue, listFrom);
issueTo.removeLabel(listFrom.label);
}
if (listTo.type === 'closed') {
issueLists.forEach((list) => {
list.removeIssue(issue);
});
issue.removeLabels(listLabels);
} else {
listFrom.removeIssue(issue);
}
},
moveIssueInList (list, issue, oldIndex, newIndex, idArray) {
const beforeId = parseInt(idArray[newIndex - 1], 10) || null;
const afterId = parseInt(idArray[newIndex + 1], 10) || null;
list.moveIssue(issue, oldIndex, newIndex, beforeId, afterId);
},
findList (key, val, type = 'label') {
return this.state.lists.filter((list) => {
const byType = type ? list['type'] === type : true;
return list[key] === val && byType;
})[0];
},
updateFiltersUrl () {
history.pushState(null, null, `?${this.filter.path}`);
>>>>>>> upstream/master
}
};
......@@ -4,8 +4,6 @@ describe('text_utility', () => {
describe('gl.text.getTextWidth', () => {
it('returns zero width when no text is passed', () => {
expect(gl.text.getTextWidth('')).toBe(0);
<<<<<<< HEAD
=======
});
it('returns zero width when no text is passed and font is passed', () => {
......@@ -20,14 +18,9 @@ describe('text_utility', () => {
const largeFont = gl.text.getTextWidth('foo', '100px sans-serif');
const regular = gl.text.getTextWidth('foo', '10px sans-serif');
expect(largeFont > regular).toBe(true);
>>>>>>> upstream/master
});
});
<<<<<<< HEAD
it('returns zero width when no text is passed and font is passed', () => {
expect(gl.text.getTextWidth('', '100px sans-serif')).toBe(0);
=======
describe('gl.text.pluralize', () => {
it('returns pluralized', () => {
expect(gl.text.pluralize('test', 2)).toBe('tests');
......@@ -39,14 +32,9 @@ describe('text_utility', () => {
it('does not return pluralized', () => {
expect(gl.text.pluralize('test', 1)).toBe('test');
>>>>>>> upstream/master
});
});
<<<<<<< HEAD
it('returns width when text is passed', () => {
expect(gl.text.getTextWidth('foo') > 0).toBe(true);
=======
describe('gl.text.highCountTrim', () => {
it('returns 99+ for count >= 100', () => {
expect(gl.text.highCountTrim(105)).toBe('99+');
......@@ -55,41 +43,9 @@ describe('text_utility', () => {
it('returns exact number for count < 100', () => {
expect(gl.text.highCountTrim(45)).toBe(45);
>>>>>>> upstream/master
});
});
<<<<<<< HEAD
it('returns bigger width when font is larger', () => {
const largeFont = gl.text.getTextWidth('foo', '100px sans-serif');
const regular = gl.text.getTextWidth('foo', '10px sans-serif');
expect(largeFont > regular).toBe(true);
});
});
describe('gl.text.pluralize', () => {
it('returns pluralized', () => {
expect(gl.text.pluralize('test', 2)).toBe('tests');
});
it('returns pluralized when count is 0', () => {
expect(gl.text.pluralize('test', 0)).toBe('tests');
});
it('does not return pluralized', () => {
expect(gl.text.pluralize('test', 1)).toBe('test');
});
});
describe('gl.text.highCountTrim', () => {
it('returns 99+ for count >= 100', () => {
expect(gl.text.highCountTrim(105)).toBe('99+');
expect(gl.text.highCountTrim(100)).toBe('99+');
});
it('returns exact number for count < 100', () => {
expect(gl.text.highCountTrim(45)).toBe(45);
=======
describe('gl.text.insertText', () => {
let textArea;
......@@ -147,7 +103,6 @@ describe('text_utility', () => {
expect(textArea.value).toEqual(`${initialValue}* `);
});
>>>>>>> upstream/master
});
});
});
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