BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1138afe7
Commit
1138afe7
authored
Jan 25, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'filtered-search-hidden-dont-render' into 'master'
Only render the list if it is visible See merge request !8710
parents
a84656fc
0421793b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
droplab_ajax.js
app/assets/javascripts/droplab/droplab_ajax.js
+11
-4
No files found.
app/assets/javascripts/droplab/droplab_ajax.js
View file @
1138afe7
...
...
@@ -29,6 +29,7 @@ require('../window')(function(w){
init
:
function
init
(
hook
)
{
var
self
=
this
;
var
config
=
hook
.
config
.
droplabAjax
;
this
.
hook
=
hook
;
if
(
!
config
||
!
config
.
endpoint
||
!
config
.
method
)
{
return
;
...
...
@@ -52,19 +53,26 @@ require('../window')(function(w){
this
.
_loadUrlData
(
config
.
endpoint
)
.
then
(
function
(
d
)
{
if
(
config
.
loadingTemplate
)
{
var
dataLoadingTemplate
=
hook
.
list
.
list
.
querySelector
(
'[data-loading-template]'
);
var
dataLoadingTemplate
=
self
.
hook
.
list
.
list
.
querySelector
(
'[data-loading-template]'
);
if
(
dataLoadingTemplate
)
{
dataLoadingTemplate
.
outerHTML
=
self
.
listTemplate
;
}
}
hook
.
list
[
config
.
method
].
call
(
hook
.
list
,
d
);
if
(
!
self
.
hook
.
list
.
hidden
)
{
self
.
hook
.
list
[
config
.
method
].
call
(
self
.
hook
.
list
,
d
);
}
}).
catch
(
function
(
e
)
{
throw
new
droplabAjaxException
(
e
.
message
||
e
);
});
},
destroy
:
function
()
{
if
(
this
.
listTemplate
)
{
var
dynamicList
=
this
.
hook
.
list
.
list
.
querySelector
(
'[data-dynamic]'
);
dynamicList
.
outerHTML
=
this
.
listTemplate
;
}
}
};
});
...
...
@@ -76,4 +84,4 @@ module.exports = function(callback) {
};
},{}]},{},[
1
])(
1
)
});
\ No newline at end of file
});
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