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
50663661
Commit
50663661
authored
Dec 10, 2016
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add loading template to droplab_ajax_filter
parent
efb66820
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
app/assets/javascripts/droplab/droplab_ajax_filter.js
app/assets/javascripts/droplab/droplab_ajax_filter.js
+23
-1
app/assets/javascripts/filtered_search/dropdown_assignee.js.es6
...sets/javascripts/filtered_search/dropdown_assignee.js.es6
+4
-0
app/assets/javascripts/filtered_search/dropdown_author.js.es6
...assets/javascripts/filtered_search/dropdown_author.js.es6
+4
-0
No files found.
app/assets/javascripts/droplab/droplab_ajax_filter.js
View file @
50663661
...
...
@@ -50,6 +50,18 @@ require('../window')(function(w){
searchValue
=
config
.
searchValueFunction
();
}
if
(
config
.
loadingTemplate
&&
this
.
hook
.
list
.
data
===
undefined
||
this
.
hook
.
list
.
data
.
length
===
0
)
{
var
dynamicList
=
this
.
hook
.
list
.
list
.
querySelector
(
'
[data-dynamic]
'
);
var
loadingTemplate
=
document
.
createElement
(
'
div
'
);
loadingTemplate
.
innerHTML
=
config
.
loadingTemplate
;
loadingTemplate
.
setAttribute
(
'
data-loading-template
'
,
true
);
this
.
listTemplate
=
dynamicList
.
outerHTML
;
dynamicList
.
outerHTML
=
loadingTemplate
.
outerHTML
;
}
if
(
getEntireList
)
{
searchValue
=
''
;
}
...
...
@@ -64,8 +76,18 @@ require('../window')(function(w){
params
[
config
.
searchKey
]
=
searchValue
;
var
self
=
this
;
this
.
_loadUrlData
(
config
.
endpoint
+
this
.
buildParams
(
params
)).
then
(
function
(
data
)
{
if
(
config
.
loadingTemplate
&&
self
.
hook
.
list
.
data
===
undefined
||
self
.
hook
.
list
.
data
.
length
===
0
)
{
self
.
hook
.
list
.
list
.
querySelector
(
'
[data-loading-template]
'
).
outerHTML
=
self
.
listTemplate
;
}
if
(
!
self
.
destroyed
)
{
self
.
hook
.
list
.
setData
.
call
(
self
.
hook
.
list
,
data
[
0
]);
if
(
data
[
0
].
length
===
0
)
{
self
.
hook
.
list
.
hide
();
}
else
{
self
.
hook
.
list
.
show
();
self
.
hook
.
list
.
setData
.
call
(
self
.
hook
.
list
,
data
[
0
]);
}
}
self
.
notLoading
();
});
...
...
app/assets/javascripts/filtered_search/dropdown_assignee.js.es6
View file @
50663661
...
...
@@ -17,6 +17,10 @@
current_user: true,
},
searchValueFunction: this.getSearchInput,
loadingTemplate: `
<div class="filter-dropdown-loading">
<i class="fa fa-spinner fa-spin"></i>
</div>`,
}
};
}
...
...
app/assets/javascripts/filtered_search/dropdown_author.js.es6
View file @
50663661
...
...
@@ -17,6 +17,10 @@
current_user: true,
},
searchValueFunction: this.getSearchInput,
loadingTemplate: `
<div class="filter-dropdown-loading">
<i class="fa fa-spinner fa-spin"></i>
</div>`,
}
};
}
...
...
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