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
10811a2f
Commit
10811a2f
authored
Mar 09, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stops milestone being editable by backspace
parent
f6147d3e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+1
-1
app/assets/javascripts/boards/filtered_search_boards.js
app/assets/javascripts/boards/filtered_search_boards.js
+8
-1
app/assets/javascripts/filtered_search/filtered_search_manager.js
...ts/javascripts/filtered_search/filtered_search_manager.js
+2
-0
No files found.
app/assets/javascripts/boards/boards_bundle.js
View file @
10811a2f
...
...
@@ -76,7 +76,7 @@ $(() => {
gl
.
boardService
=
new
BoardService
(
this
.
endpoint
,
this
.
bulkUpdatePath
,
this
.
boardId
);
gl
.
boardsFilterManager
=
new
FilteredSearchBoards
(
Store
.
filter
,
true
);
gl
.
boardsFilterManager
=
new
FilteredSearchBoards
(
Store
.
filter
,
true
,
[(
this
.
milestoneTitle
?
'
milestone
'
:
null
)]
);
},
mounted
()
{
Store
.
disabled
=
this
.
disabled
;
...
...
app/assets/javascripts/boards/filtered_search_boards.js
View file @
10811a2f
export
default
class
FilteredSearchBoards
extends
gl
.
FilteredSearchManager
{
constructor
(
store
,
updateUrl
=
false
)
{
constructor
(
store
,
updateUrl
=
false
,
cantEdit
=
[]
)
{
super
(
'
boards
'
);
this
.
store
=
store
;
this
.
updateUrl
=
updateUrl
;
this
.
isHandledAsync
=
true
;
this
.
cantEdit
=
cantEdit
;
}
updateObject
(
path
)
{
...
...
@@ -28,4 +29,10 @@ export default class FilteredSearchBoards extends gl.FilteredSearchManager {
// Get the placeholder back if search is empty
this
.
filteredSearchInput
.
dispatchEvent
(
new
Event
(
'
input
'
));
}
canEdit
(
token
)
{
const
tokenName
=
token
.
querySelector
(
'
.name
'
).
textContent
.
trim
();
return
this
.
cantEdit
.
indexOf
(
tokenName
)
===
-
1
;
}
}
app/assets/javascripts/filtered_search/filtered_search_manager.js
View file @
10811a2f
...
...
@@ -84,6 +84,8 @@
const
{
lastVisualToken
}
=
gl
.
FilteredSearchVisualTokens
.
getLastVisualTokenBeforeInput
();
if
(
this
.
filteredSearchInput
.
value
===
''
&&
lastVisualToken
)
{
if
(
this
.
canEdit
&&
!
this
.
canEdit
(
lastVisualToken
))
return
;
this
.
filteredSearchInput
.
value
=
gl
.
FilteredSearchVisualTokens
.
getLastTokenPartial
();
gl
.
FilteredSearchVisualTokens
.
removeLastTokenPartial
();
}
...
...
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