Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iliya Manolov
slapos.toolbox
Commits
cc3aa9cf
Commit
cc3aa9cf
authored
Oct 11, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jslint compliance
parent
2b3282da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
26 deletions
+26
-26
slapos/runner/static/js/jquery/jqueryTabs.js
slapos/runner/static/js/jquery/jqueryTabs.js
+12
-12
slapos/runner/static/js/jquery/popup.js
slapos/runner/static/js/jquery/popup.js
+14
-14
No files found.
slapos/runner/static/js/jquery/jqueryTabs.js
View file @
cc3aa9cf
$
(
document
).
ready
(
function
(){
$
(
"
.tabContents
"
).
hide
();
// Hide all tab content divs by default
$
(
"
.tabContents
"
).
hide
();
// Hide all tab content divs by default
var
hashes
=
window
.
location
.
href
.
split
(
'
#
'
);
var
fromheight
=
0
;
var
previoustab
=
null
;
...
...
@@ -18,17 +18,17 @@ $(document).ready(function(){
});
}
else
{
$
(
"
.tabContents:first
"
).
show
();
previoustab
=
"
.tabContents:first
"
;}
// Show the first div of tab content by default
$
(
"
#tabContaier ul li a
"
).
click
(
function
(){
//Fire the click event
if
(
$
(
this
).
hasClass
(
'
active
'
)){
return
false
;
}
$
(
"
#tabContaier ul li a
"
).
click
(
function
(){
//Fire the click event
if
(
$
(
this
).
hasClass
(
'
active
'
)){
return
false
;
}
fromheight
=
$
(
previoustab
).
height
();
var
activeTab
=
$
(
this
).
attr
(
"
href
"
);
// Catch the click link
var
activeTab
=
$
(
this
).
attr
(
"
href
"
);
// Catch the click link
$
(
"
#tabContaier .tabDetails
"
).
css
(
"
height
"
,
$
(
"
#tabContaier .tabDetails
"
).
height
());
$
(
"
#tabContaier ul li a
"
).
removeClass
(
"
active
"
);
// Remove pre-highlighted link
$
(
this
).
addClass
(
"
active
"
);
// set clicked link to highlight state
$
(
"
.tabContents
"
).
hide
();
// hide currently visible tab content div
$
(
activeTab
).
fadeIn
();
// show the target tab content div by matching clicked link.
$
(
"
#tabContaier ul li a
"
).
removeClass
(
"
active
"
);
// Remove pre-highlighted link
$
(
this
).
addClass
(
"
active
"
);
// set clicked link to highlight state
$
(
"
.tabContents
"
).
hide
();
// hide currently visible tab content div
$
(
activeTab
).
fadeIn
();
// show the target tab content div by matching clicked link.
var
diff
=
fromheight
-
$
(
activeTab
).
height
();
if
(
diff
>
0
){
$
(
"
#tabContaier .tabDetails
"
).
animate
({
height
:
'
-=
'
+
diff
+
'
px
'
},
850
,
'
swing
'
,
function
()
{
$
(
"
#tabContaier .tabDetails
"
).
css
(
"
height
"
,
""
);
...
...
@@ -39,5 +39,5 @@ $(document).ready(function(){
previoustab
=
activeTab
;
$
(
"
#tabContaier .tabDetails
"
).
css
(
"
height
"
,
$
(
"
#tabContaier .tabDetails
"
).
height
());
return
false
;
//this reinitialize tab index when reload page
});
});
\ No newline at end of file
});
});
slapos/runner/static/js/jquery/popup.js
View file @
cc3aa9cf
...
...
@@ -30,43 +30,43 @@
$box
.
show
();
$box
.
append
(
'
<div><table id="bcontent"><tr>
'
+
'
<td valign="middle" class="logo
'
+
option
.
type
+
'
_message"></td>
'
+
'
<td valign="middle"><p>
'
+
msg
+
'
</p></td>
'
+
'
<td valign="middle" class="b_close"><span id="pClose"></span></td></tr></table></div>
'
);
'
<td valign="middle"><p>
'
+
msg
+
'
</p></td>
'
+
'
<td valign="middle" class="b_close"><span id="pClose"></span></td></tr></table></div>
'
);
$
(
window
).
scroll
(
function
(){
$box
.
animate
({
top
:
$
(
window
).
scrollTop
()
+
"
px
"
},{
queue
:
false
,
duration
:
350
});
$box
.
animate
({
top
:
$
(
window
).
scrollTop
()
+
"
px
"
},{
queue
:
false
,
duration
:
350
});
});
h
=
$
(
"
#bcontent
"
).
height
()
+
5
;
$
(
"
#pClose
"
).
bind
(
"
click
"
,
function
()
{
close
();
close
();
});
showBox
();
if
(
option
.
duration
!=
0
){
showDelayTimer
=
setTimeout
(
function
(){
showDelayTimer
=
setTimeout
(
function
(){
showDelayTimer
=
null
;
close
();
},
option
.
duration
);
close
();
},
option
.
duration
);
}
}
function
showBox
(){
if
(
option
.
load
){
$
(
window
).
load
(
function
(){
$box
.
css
(
'
top
'
,
+
(
$
(
window
).
scrollTop
()
-
h
)
+
'
px
'
);
$box
.
animate
({
top
:
"
+=
"
+
h
+
"
px
"
},
"
slow
"
);
$box
.
animate
({
top
:
"
+=
"
+
h
+
"
px
"
},
"
slow
"
);
isShow
=
true
;
});
});
}
else
{
$box
.
css
(
'
top
'
,
+
(
$
(
window
).
scrollTop
()
-
h
)
+
'
px
'
);
$box
.
animate
({
top
:
"
+=
"
+
h
+
"
px
"
},
"
slow
"
);
$box
.
css
(
'
top
'
,
+
(
$
(
window
).
scrollTop
()
-
h
)
+
'
px
'
);
$box
.
animate
({
top
:
"
+=
"
+
h
+
"
px
"
},
"
slow
"
);
isShow
=
true
;
}
}
function
close
(){
$box
.
animate
({
top
:
"
-=
"
+
h
+
"
px
"
},
"
slow
"
,
function
(){
$box
.
fadeOut
(
"
normal
"
,
function
()
{
$box
.
animate
({
top
:
"
-=
"
+
h
+
"
px
"
},
"
slow
"
,
function
(){
$box
.
fadeOut
(
"
normal
"
,
function
()
{
isShow
=
false
;
});
});
});
}
}
});
...
...
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