Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1feac858
authored
Oct 15, 2013
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: jquery slider fix for vm create
parent
e78300a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
21 deletions
+29
-21
circle/dashboard/static/dashboard/dashboard.js
+29
-21
No files found.
circle/dashboard/static/dashboard/dashboard.js
View file @
1feac858
...
...
@@ -21,9 +21,9 @@ $(function () {
'</div>' + */
'</div><!-- /.modal-content -->'
+
'</div><!-- /.modal-dialog -->'
+
'</div>
<!-- /.modal -->
'
;
'</div>'
;
$
(
'
.container
'
).
append
(
html
);
$
(
'
body
'
).
append
(
html
);
vmCreateLoaded
();
$
(
'#vm-create-modal'
).
modal
(
'show'
);
$
(
'#vm-create-modal'
).
on
(
'hidden.bs.modal'
,
function
()
{
...
...
@@ -52,23 +52,7 @@ $(function () {
$
(
'[title]'
).
tooltip
();
$
(
':input[title]'
).
tooltip
({
trigger
:
'focus'
,
placement
:
'auto right'
});
$
(
".knob"
).
knob
();
$
(
"[data-slider]"
)
.
each
(
function
()
{
var
input
=
$
(
this
);
$
(
"<span>"
)
.
addClass
(
"output"
)
.
html
(
$
(
this
).
val
())
.
insertAfter
(
input
);
})
.
bind
(
"slider:ready slider:changed"
,
function
(
event
,
data
)
{
$
(
this
)
.
nextAll
(
".output:first"
)
.
html
(
data
.
value
.
toFixed
(
3
));
});
$
(
"[data-mark]"
)
.
each
(
function
()
{
var
value
=
$
(
this
).
attr
(
'data-mark'
).
parseFloat
();
});
if
(
window
.
location
.
hash
)
$
(
"a[href="
+
window
.
location
.
hash
+
"]"
).
tab
(
'show'
);
...
...
@@ -76,7 +60,8 @@ $(function () {
});
function
vmCreateLoaded
()
{
$
(
'.vm-create-advanced'
).
hide
();
// temporarily disable for testing
//$('.vm-create-advanced').hide();
$
(
'.vm-create-advanced-btn'
).
click
(
function
()
{
$
(
'.vm-create-advanced'
).
stop
().
slideToggle
();
if
(
$
(
'.vm-create-advanced-icon'
).
hasClass
(
'icon-caret-down'
))
{
...
...
@@ -85,5 +70,28 @@ function vmCreateLoaded() {
$
(
'.vm-create-advanced-icon'
).
removeClass
(
'icon-caret-up'
).
addClass
(
'icon-caret-down'
);
}
});
}
$
(
"[data-slider]"
).
each
(
function
()
{
if
(
$
(
this
).
css
(
'display'
)
!=
"none"
)
$
(
this
).
simpleSlider
();
});
$
(
"[data-slider]"
)
.
each
(
function
()
{
var
input
=
$
(
this
);
$
(
"<span>"
)
.
addClass
(
"output"
)
.
html
(
$
(
this
).
val
())
.
insertAfter
(
input
);
})
.
bind
(
"slider:ready slider:changed"
,
function
(
event
,
data
)
{
$
(
this
)
.
nextAll
(
".output:first"
)
.
html
(
data
.
value
.
toFixed
(
3
));
});
$
(
"[data-mark]"
).
each
(
function
()
{
var
value
=
$
(
this
).
attr
(
'data-mark'
).
parseFloat
();
});
}
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