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
Commit
256c58e4
authored
Feb 14, 2013
by
Dányi Bence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: js refactoring
parent
bdb7bc21
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
one/static/cloud.js
+7
-7
No files found.
one/static/cloud.js
View file @
256c58e4
...
...
@@ -28,11 +28,11 @@ $(function() {
}
});
toggleDetails
=
throttle
(
function
(){
if
(
$
(
this
).
parent
(
'.
wm
'
).
hasClass
(
'opened'
))
{
$
(
this
).
parent
(
'.
wm
'
).
removeClass
(
'opened'
);
if
(
$
(
this
).
parent
(
'.
entry
'
).
hasClass
(
'opened'
))
{
$
(
this
).
parent
(
'.
entry
'
).
removeClass
(
'opened'
);
$
(
this
).
next
(
'.details'
).
slideUp
(
700
);
}
else
{
$
(
this
).
parent
(
'.
wm
'
).
addClass
(
'opened'
);
$
(
this
).
parent
(
'.
entry
'
).
addClass
(
'opened'
);
$
(
this
).
next
(
'.details'
).
slideDown
(
700
);
}
})
...
...
@@ -40,7 +40,7 @@ $(function() {
e
.
preventDefault
();
e
.
stopPropagation
();
delete_template_confirm
(
$
(
this
).
data
(
'id'
),
$
(
this
).
data
(
'name'
));
});
$
(
'.
wm
.summary'
).
unbind
(
'click'
).
click
(
toggleDetails
);
$
(
'.
entry
.summary'
).
unbind
(
'click'
).
click
(
toggleDetails
);
if
(
window
.
navigator
.
userAgent
.
indexOf
(
'cloud-gui'
)
!=
0
)
{
$
(
'.connect-vm-button'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
...
...
@@ -80,10 +80,10 @@ $(function() {
e
.
preventDefault
();
e
.
stopPropagation
();
renew_delete_vm
(
$
(
this
).
data
(
'id'
))
});
$
(
'#new-
w
m-button'
).
click
(
function
()
{
$
(
'#new-
v
m-button'
).
click
(
function
()
{
$
(
'#modal'
).
show
();
$
(
'#modal-container'
).
html
(
$
(
'#new-
w
m'
).
html
());
$
(
'#modal-container .
wm
.summary'
).
click
(
toggleDetails
);
$
(
'#modal-container'
).
html
(
$
(
'#new-
v
m'
).
html
());
$
(
'#modal-container .
entry
.summary'
).
click
(
toggleDetails
);
});
$
(
'#new-template-button'
).
click
(
function
()
{
$
.
get
(
'/ajax/templateWizard'
,
function
(
data
)
{
...
...
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