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
91dad4da
Commit
91dad4da
authored
Jan 25, 2017
by
Jacob Schatz
Committed by
James Lopez
Jan 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'filtered-search-hidden-dont-render' into 'master'
Only render the list if it is visible See merge request !8710
parent
55e7f58c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
droplab_ajax.js
app/assets/javascripts/droplab/droplab_ajax.js
+10
-2
No files found.
app/assets/javascripts/droplab/droplab_ajax.js
View file @
91dad4da
...
@@ -29,6 +29,7 @@ require('../window')(function(w){
...
@@ -29,6 +29,7 @@ require('../window')(function(w){
init
:
function
init
(
hook
)
{
init
:
function
init
(
hook
)
{
var
self
=
this
;
var
self
=
this
;
var
config
=
hook
.
config
.
droplabAjax
;
var
config
=
hook
.
config
.
droplabAjax
;
this
.
hook
=
hook
;
if
(
!
config
||
!
config
.
endpoint
||
!
config
.
method
)
{
if
(
!
config
||
!
config
.
endpoint
||
!
config
.
method
)
{
return
;
return
;
...
@@ -52,19 +53,26 @@ require('../window')(function(w){
...
@@ -52,19 +53,26 @@ require('../window')(function(w){
this
.
_loadUrlData
(
config
.
endpoint
)
this
.
_loadUrlData
(
config
.
endpoint
)
.
then
(
function
(
d
)
{
.
then
(
function
(
d
)
{
if
(
config
.
loadingTemplate
)
{
if
(
config
.
loadingTemplate
)
{
var
dataLoadingTemplate
=
hook
.
list
.
list
.
querySelector
(
'[data-loading-template]'
);
var
dataLoadingTemplate
=
self
.
hook
.
list
.
list
.
querySelector
(
'[data-loading-template]'
);
if
(
dataLoadingTemplate
)
{
if
(
dataLoadingTemplate
)
{
dataLoadingTemplate
.
outerHTML
=
self
.
listTemplate
;
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
)
{
}).
catch
(
function
(
e
)
{
throw
new
droplabAjaxException
(
e
.
message
||
e
);
throw
new
droplabAjaxException
(
e
.
message
||
e
);
});
});
},
},
destroy
:
function
()
{
destroy
:
function
()
{
if
(
this
.
listTemplate
)
{
var
dynamicList
=
this
.
hook
.
list
.
list
.
querySelector
(
'[data-dynamic]'
);
dynamicList
.
outerHTML
=
this
.
listTemplate
;
}
}
}
};
};
});
});
...
...
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