Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
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
b558a8da
authored
Jan 29, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: goto vm with enter if there is only one result in search
parent
ff72e3a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
circle/dashboard/static/dashboard/dashboard.js
+6
-1
No files found.
circle/dashboard/static/dashboard/dashboard.js
View file @
b558a8da
...
@@ -132,7 +132,7 @@ $(function () {
...
@@ -132,7 +132,7 @@ $(function () {
/* search for vms */
/* search for vms */
var
my_vms
=
[]
var
my_vms
=
[]
$
(
"#dashboard-vm-search-input"
).
keyup
(
function
()
{
$
(
"#dashboard-vm-search-input"
).
keyup
(
function
(
e
)
{
// if my_vms is empty get a list of our vms
// if my_vms is empty get a list of our vms
if
(
my_vms
.
length
<
1
)
{
if
(
my_vms
.
length
<
1
)
{
$
.
ajaxSetup
(
{
"async"
:
false
}
);
$
.
ajaxSetup
(
{
"async"
:
false
}
);
...
@@ -164,6 +164,11 @@ $(function () {
...
@@ -164,6 +164,11 @@ $(function () {
html
+=
'<div class="list-group-item">No result</div>'
;
html
+=
'<div class="list-group-item">No result</div>'
;
$
(
"#dashboard-vm-list"
).
html
(
html
);
$
(
"#dashboard-vm-list"
).
html
(
html
);
$
(
'.title-favourite'
).
tooltip
({
'placement'
:
'right'
});
$
(
'.title-favourite'
).
tooltip
({
'placement'
:
'right'
});
// if there is only one result and ENTER is pressed redirect
if
(
e
.
keyCode
==
13
&&
search_result
.
length
==
1
)
{
window
.
location
.
href
=
"/dashboard/vm/"
+
search_result
[
0
].
pk
+
"/"
;
}
});
});
});
});
...
...
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