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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
7744b67f
Commit
7744b67f
authored
Mar 08, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stops excute remote data fetcher when already recieved data
parent
dd35de1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
app/assets/javascripts/gl_dropdown.js.coffee
app/assets/javascripts/gl_dropdown.js.coffee
+2
-1
app/assets/javascripts/labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+17
-1
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+1
-1
No files found.
app/assets/javascripts/gl_dropdown.js.coffee
View file @
7744b67f
...
...
@@ -148,7 +148,8 @@ class GitLabDropdown
@
appendMenu
(
full_html
)
opened
:
=>
if
@
remote
contentHtml
=
$
(
'.dropdown-content'
,
@
dropdown
).
html
()
if
@
remote
&&
contentHtml
is
""
@
remote
.
execute
()
if
@
options
.
filterable
...
...
app/assets/javascripts/labels_select.js.coffee
View file @
7744b67f
...
...
@@ -6,6 +6,8 @@ class @LabelsSelect
selectedLabel
=
$
(
dropdown
).
data
(
'selected'
)
newLabelField
=
$
(
'#new_label_name'
)
newColorField
=
$
(
'#new_label_color'
)
showNo
=
$
(
dropdown
).
data
(
'show-no'
)
showAny
=
$
(
dropdown
).
data
(
'show-any'
)
if
newLabelField
.
length
$
(
'.suggest-colors-dropdown a'
).
on
"click"
,
(
e
)
->
...
...
@@ -45,6 +47,20 @@ class @LabelsSelect
title
:
$
(
@
).
text
().
trim
()
)
if
showNo
data
.
unshift
(
id
:
"0"
title
:
'No label'
)
if
showAny
data
.
unshift
(
title
:
'Any label'
)
if
data
.
length
>
2
data
.
splice
2
,
0
,
"divider"
callback
data
renderRow
:
(
label
)
->
selected
=
if
label
.
title
is
selectedLabel
then
"is-active"
else
""
...
...
@@ -56,7 +72,7 @@ class @LabelsSelect
</li>"
filterable
:
true
search
:
fields
:
[
'
nam
e'
]
fields
:
[
'
titl
e'
]
selectable
:
true
fieldName
:
$
(
dropdown
).
data
(
'field-name'
)
id
:
(
label
)
->
...
...
app/views/shared/issuable/_filter.html.haml
View file @
7744b67f
...
...
@@ -39,7 +39,7 @@
-
if
params
[
:label_name
]
=
hidden_field_tag
(
:label_name
,
params
[
:label_name
])
.dropdown
%button
.dropdown-menu-toggle.js-label-select.js-filter-submit
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
field_name:
"label_name"
,
selected:
params
[
:label_name
],
project_id:
@project
.
id
,
labels:
namespace_project_labels_path
(
@project
.
namespace
,
@project
,
:js
)}}
%button
.dropdown-menu-toggle.js-label-select.js-filter-submit
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
field_name:
"label_name"
,
s
how_no:
"true"
,
show_any:
"true"
,
s
elected:
params
[
:label_name
],
project_id:
@project
.
id
,
labels:
namespace_project_labels_path
(
@project
.
namespace
,
@project
,
:js
)}}
%span
.dropdown-toggle-text
Label
=
icon
(
'chevron-down'
)
...
...
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