Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
cf687db5
Commit
cf687db5
authored
Mar 12, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added link to banck on top when sticky is active - improved sticky functions
parent
33a9dbd9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
11 deletions
+71
-11
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+45
-11
debomatic-webui/public/stylesheets/style.css
debomatic-webui/public/stylesheets/style.css
+16
-0
debomatic-webui/views/distribution.ejs
debomatic-webui/views/distribution.ejs
+10
-0
No files found.
debomatic-webui/public/javascripts/page_distribution.js
View file @
cf687db5
...
@@ -193,23 +193,55 @@ function Page_Distrubion(socket)
...
@@ -193,23 +193,55 @@ function Page_Distrubion(socket)
// sticky sidebar
// sticky sidebar
var
sticky
=
{
var
sticky
=
{
start
:
function
()
{
init
:
function
()
{
$
(
window
).
scroll
(
function
()
{
if
(
sidebarOffset
==
0
)
if
(
sidebarOffset
==
0
)
return
return
if
(
$
(
window
).
scrollTop
()
>
sidebarOffset
)
{
if
(
$
(
window
).
scrollTop
()
>
sidebarOffset
)
{
$
(
"
#files
"
).
addClass
(
'
fixed
'
)
sticky
.
show
(
)
}
else
{
}
else
{
$
(
"
#files
"
).
removeClass
(
'
fixed
'
)
sticky
.
hide
(
)
}
}
})
},
start
:
function
()
{
$
(
window
).
scroll
(
sticky
.
init
)
},
},
reset
:
function
()
{
reset
:
function
()
{
sticky
.
stop
()
sticky
.
update
()
sticky
.
init
()
sticky
.
start
()
// onclic - back on top and disable auto-scroll
$
(
"
#sticky-view
"
).
on
(
"
click
"
,
function
(){
$
(
'
html
'
).
animate
({
scrollTop
:
0
},
250
);
})
},
stop
:
function
()
{
$
(
window
).
off
(
"
scroll
"
)
},
show
:
function
()
{
$
(
"
#sticky
"
).
addClass
(
'
fixed
'
)
$
(
"
#sticky-view
"
).
fadeIn
()
},
hide
:
function
()
{
$
(
"
#sticky
"
).
removeClass
(
'
fixed
'
)
$
(
"
#sticky-view
"
).
fadeOut
(
150
)
},
update
:
function
()
{
var
sidebar
=
$
(
"
#files
"
)
var
sidebar
=
$
(
"
#files
"
)
sidebarOffset
=
sidebar
.
offset
().
top
sidebarOffset
=
sidebar
.
offset
().
top
$
(
window
).
off
(
"
scroll
"
)
if
(
Utils
.
check_data_distribution
(
data
))
sticky
.
start
()
$
(
"
#sticky-view .distribution .name
"
).
html
(
data
.
distribution
.
name
)
if
(
Utils
.
check_data_package
(
data
))
{
$
(
"
#sticky-view .package .name
"
).
html
(
data
.
package
.
name
)
$
(
"
#sticky-view .package .version
"
).
html
(
data
.
package
.
version
)
}
},
},
set_status
:
function
(
status_data
)
{
console
.
log
(
status_data
)
var
div
=
$
(
"
#sticky-view .status
"
)
div
.
find
(
'
span.icon
'
).
remove
()
div
.
html
(
div
.
html
()
+
'
'
+
Utils
.
get_status_icon_html
(
status_data
))
}
}
}
var
select
=
function
()
{
var
select
=
function
()
{
...
@@ -294,10 +326,12 @@ function Page_Distrubion(socket)
...
@@ -294,10 +326,12 @@ function Page_Distrubion(socket)
socket
.
on
(
events
.
distribution_packages
.
status
,
function
(
socket_data
){
socket
.
on
(
events
.
distribution_packages
.
status
,
function
(
socket_data
){
packages
.
set_status
(
socket_data
)
packages
.
set_status
(
socket_data
)
sticky
.
set_status
(
socket_data
)
})
})
socket
.
on
(
config
.
events
.
broadcast
.
status_update
,
function
(
socket_data
){
socket
.
on
(
config
.
events
.
broadcast
.
status_update
,
function
(
socket_data
){
packages
.
set_status
(
socket_data
)
packages
.
set_status
(
socket_data
)
sticky
.
set_status
(
socket_data
)
})
})
socket
.
on
(
events
.
package_files_list
.
set
,
function
(
socket_data
){
socket
.
on
(
events
.
package_files_list
.
set
,
function
(
socket_data
){
...
...
debomatic-webui/public/stylesheets/style.css
View file @
cf687db5
...
@@ -17,6 +17,22 @@ aside .nav-pills li {
...
@@ -17,6 +17,22 @@ aside .nav-pills li {
top
:
0
;
top
:
0
;
}
}
#sticky-view
{
display
:
none
;
position
:
fixed
;
bottom
:
50px
;
font-size
:
30px
;
cursor
:
pointer
;
}
#sticky-view
.package
.version
,
#sticky-view
.distribution
{
font-size
:
20px
;
}
#sticky-view
.distribution
.icon
{
margin-top
:
4px
;
}
footer
{
footer
{
height
:
40px
;
height
:
40px
;
...
...
debomatic-webui/views/distribution.ejs
View file @
cf687db5
...
@@ -25,6 +25,16 @@
...
@@ -25,6 +25,16 @@
<ul></ul>
<ul></ul>
</nav>
</nav>
</section>
</section>
<section title="Back on Top" id="sticky-view">
<div class="package">
<div class="name"></div>
<div class="version"></div>
</div>
<div class="distribution text-muted">
<div class="name pull-left"></div>
<div class="status pull-right"></div>
</div>
</section>
</div>
</div>
</aside>
</aside>
...
...
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