Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
d2e95303
authored
Feb 11, 2015
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix dashboard search
parent
0a6762e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
circle/dashboard/static/dashboard/dashboard.js
+11
-7
No files found.
circle/dashboard/static/dashboard/dashboard.js
View file @
d2e95303
...
...
@@ -154,25 +154,29 @@ $(function () {
addSliderMiscs
();
/* search */
/* search */
function
register_search
(
form
,
list
,
generateHTML
)
{
var
my_vms
=
[];
var
search_in_progress
=
false
;
/* 0 - default state
* 1 - ajax request sent
* 2 - ajax request received, we have our list of vms
*/
var
search_state
=
0
;
form
.
find
(
'input'
).
keyup
(
function
(
e
)
{
if
(
search_
in_progress
)
{
if
(
search_
state
==
1
)
{
return
;
}
// if my_vms is empty get a list of our vms
if
(
my_vms
.
length
<
1
)
{
search_
in_progress
=
true
;
if
(
search_state
===
0
)
{
search_
state
=
1
;
var
btn
=
form
.
find
(
'button'
);
btn
.
find
(
'i'
).
addClass
(
"fa-spinner fa-spin"
);
$
.
get
(
form
.
prop
(
'action'
),
function
(
result
)
{
search_
in_progress
=
false
;
search_
state
=
3
;
my_vms
=
result
;
$
(
this
).
trigger
(
"keyup"
);
form
.
find
(
"input"
).
trigger
(
"keyup"
);
btn
.
find
(
'i'
).
removeClass
(
"fa-spinner fa-spin"
).
addClass
(
"fa-search"
);
});
return
;
...
...
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