Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
904c7242
Commit
904c7242
authored
Apr 18, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed conflicts
parent
716a2595
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
128 deletions
+0
-128
app/assets/javascripts/boards/components/modal/footer.js
app/assets/javascripts/boards/components/modal/footer.js
+0
-3
app/assets/javascripts/boards/components/sidebar/remove_issue.js
...ets/javascripts/boards/components/sidebar/remove_issue.js
+0
-8
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+0
-72
spec/javascripts/lib/utils/text_utility_spec.js
spec/javascripts/lib/utils/text_utility_spec.js
+0
-45
No files found.
app/assets/javascripts/boards/components/modal/footer.js
View file @
904c7242
...
...
@@ -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
'
);
...
...
app/assets/javascripts/boards/components/sidebar/remove_issue.js
View file @
904c7242
...
...
@@ -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
)
=>
{
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
904c7242
...
...
@@ -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
}
};
spec/javascripts/lib/utils/text_utility_spec.js
View file @
904c7242
...
...
@@ -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
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment