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
7b202460
Commit
7b202460
authored
Dec 10, 2016
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ajax bug
parent
98a95633
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
app/assets/javascripts/droplab/droplab.js
app/assets/javascripts/droplab/droplab.js
+1
-6
app/assets/javascripts/droplab/droplab_ajax_filter.js
app/assets/javascripts/droplab/droplab_ajax_filter.js
+7
-2
No files found.
app/assets/javascripts/droplab/droplab.js
View file @
7b202460
...
...
@@ -31,18 +31,13 @@ if ( typeof CustomEvent === "function" ) {
var
CustomEvent
=
require
(
'
./custom_event_polyfill
'
);
var
utils
=
require
(
'
./utils
'
);
var
DropDown
=
function
(
list
,
trigger
)
{
var
DropDown
=
function
(
list
)
{
this
.
hidden
=
true
;
this
.
list
=
list
;
this
.
trigger
=
trigger
;
this
.
items
=
[];
this
.
getItems
();
this
.
addEvents
();
this
.
initialState
=
list
.
innerHTML
;
if
(
this
.
initialState
.
indexOf
(
'
{{
'
)
==
-
1
)
{
debugger
}
};
Object
.
assign
(
DropDown
.
prototype
,
{
...
...
app/assets/javascripts/droplab/droplab_ajax_filter.js
View file @
7b202460
...
...
@@ -5,6 +5,7 @@
require
(
'
../window
'
)(
function
(
w
){
w
.
droplabAjaxFilter
=
{
init
:
function
(
hook
)
{
this
.
destroyed
=
false
;
this
.
hook
=
hook
;
this
.
notLoading
();
...
...
@@ -49,14 +50,16 @@ require('../window')(function(w){
}
this
.
loading
=
true
;
this
.
hook
.
list
.
setData
([]);
var
params
=
config
.
params
||
{};
params
[
config
.
searchKey
]
=
searchValue
;
var
self
=
this
;
this
.
_loadUrlData
(
config
.
endpoint
+
this
.
buildParams
(
params
)).
then
(
function
(
data
)
{
self
.
hook
.
restoreInitialState
.
call
(
self
.
hook
);
self
.
hook
.
list
.
setData
.
call
(
self
.
hook
.
list
,
data
[
0
]);
if
(
!
self
.
destroyed
)
{
self
.
hook
.
list
.
setData
.
call
(
self
.
hook
.
list
,
data
[
0
]);
}
self
.
notLoading
();
});
},
...
...
@@ -92,6 +95,8 @@ require('../window')(function(w){
clearTimeout
(
this
.
timeout
);
}
this
.
destroyed
=
true
;
this
.
hook
.
trigger
.
removeEventListener
(
'
keydown.dl
'
,
this
.
debounceTriggerWrapper
);
this
.
hook
.
trigger
.
removeEventListener
(
'
focus
'
,
this
.
debounceTriggerWrapper
);
}
...
...
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