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
Léo-Paul Géneau
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
...
@@ -148,7 +148,8 @@ class GitLabDropdown
@
appendMenu
(
full_html
)
@
appendMenu
(
full_html
)
opened
:
=>
opened
:
=>
if
@
remote
contentHtml
=
$
(
'.dropdown-content'
,
@
dropdown
).
html
()
if
@
remote
&&
contentHtml
is
""
@
remote
.
execute
()
@
remote
.
execute
()
if
@
options
.
filterable
if
@
options
.
filterable
...
...
app/assets/javascripts/labels_select.js.coffee
View file @
7744b67f
...
@@ -6,6 +6,8 @@ class @LabelsSelect
...
@@ -6,6 +6,8 @@ class @LabelsSelect
selectedLabel
=
$
(
dropdown
).
data
(
'selected'
)
selectedLabel
=
$
(
dropdown
).
data
(
'selected'
)
newLabelField
=
$
(
'#new_label_name'
)
newLabelField
=
$
(
'#new_label_name'
)
newColorField
=
$
(
'#new_label_color'
)
newColorField
=
$
(
'#new_label_color'
)
showNo
=
$
(
dropdown
).
data
(
'show-no'
)
showAny
=
$
(
dropdown
).
data
(
'show-any'
)
if
newLabelField
.
length
if
newLabelField
.
length
$
(
'.suggest-colors-dropdown a'
).
on
"click"
,
(
e
)
->
$
(
'.suggest-colors-dropdown a'
).
on
"click"
,
(
e
)
->
...
@@ -45,6 +47,20 @@ class @LabelsSelect
...
@@ -45,6 +47,20 @@ class @LabelsSelect
title
:
$
(
@
).
text
().
trim
()
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
callback
data
renderRow
:
(
label
)
->
renderRow
:
(
label
)
->
selected
=
if
label
.
title
is
selectedLabel
then
"is-active"
else
""
selected
=
if
label
.
title
is
selectedLabel
then
"is-active"
else
""
...
@@ -56,7 +72,7 @@ class @LabelsSelect
...
@@ -56,7 +72,7 @@ class @LabelsSelect
</li>"
</li>"
filterable
:
true
filterable
:
true
search
:
search
:
fields
:
[
'
nam
e'
]
fields
:
[
'
titl
e'
]
selectable
:
true
selectable
:
true
fieldName
:
$
(
dropdown
).
data
(
'field-name'
)
fieldName
:
$
(
dropdown
).
data
(
'field-name'
)
id
:
(
label
)
->
id
:
(
label
)
->
...
...
app/views/shared/issuable/_filter.html.haml
View file @
7744b67f
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
-
if
params
[
:label_name
]
-
if
params
[
:label_name
]
=
hidden_field_tag
(
:label_name
,
params
[
:label_name
])
=
hidden_field_tag
(
:label_name
,
params
[
:label_name
])
.dropdown
.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
%span
.dropdown-toggle-text
Label
Label
=
icon
(
'chevron-down'
)
=
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