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
b33dd391
Commit
b33dd391
authored
Mar 12, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added fixed sidebar [buggy]
parent
d3f532aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
25 deletions
+43
-25
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+31
-18
debomatic-webui/public/stylesheets/style.css
debomatic-webui/public/stylesheets/style.css
+11
-6
debomatic-webui/views/distribution.ejs
debomatic-webui/views/distribution.ejs
+1
-1
No files found.
debomatic-webui/public/javascripts/page_distribution.js
View file @
b33dd391
...
@@ -3,6 +3,7 @@ function Page_Distrubion(socket)
...
@@ -3,6 +3,7 @@ function Page_Distrubion(socket)
var
socket
=
socket
var
socket
=
socket
var
events
=
config
.
events
.
client
var
events
=
config
.
events
.
client
var
data
=
Utils
.
from_hash_to_data
()
var
data
=
Utils
.
from_hash_to_data
()
var
sidebarOffset
=
0
function
__check_hash_makes_sense
()
{
function
__check_hash_makes_sense
()
{
if
(
!
window
.
location
.
hash
)
if
(
!
window
.
location
.
hash
)
...
@@ -189,18 +190,30 @@ function Page_Distrubion(socket)
...
@@ -189,18 +190,30 @@ function Page_Distrubion(socket)
}
}
}
}
// stiky sidebar
// sticky sidebar
var
sticky
=
function
()
{
var
sticky
=
{
// $(window).off("scroll")
// // back on top
start
:
function
()
{
//// $("html, body").animate({scrollTop: 0}, 0);
$
(
window
).
scroll
(
function
()
{
// var offset = $("#sticky").offset();
// FIXME: on load sidebarOffset is always 0 !!!
// $(window).scroll(function() {
if
(
sidebarOffset
==
0
)
// if ($(window).scrollTop() > offset.top)
return
// $("#sticky").stop().addClass('fixed');
if
(
$
(
window
).
scrollTop
()
>
sidebarOffset
)
{
// else
//console.log("sidebar.start -> adding: ", $(window).scrollTop(), sidebarOffset, $("#files").offset().top)
// $("#sticky").stop().removeClass('fixed');
$
(
"
#files
"
).
addClass
(
'
fixed
'
)
// })
}
else
{
//console.log("sidebar.start -> remove: ", $(window).scrollTop(), sidebarOffset, $("#files").offset().top)
$
(
"
#files
"
).
removeClass
(
'
fixed
'
)
}
})
},
reset
:
function
()
{
var
sidebar
=
$
(
"
#files
"
)
sidebarOffset
=
sidebar
.
offset
().
top
$
(
window
).
off
(
"
scroll
"
)
sticky
.
start
()
},
}
}
var
select
=
function
()
{
var
select
=
function
()
{
...
@@ -265,7 +278,7 @@ function Page_Distrubion(socket)
...
@@ -265,7 +278,7 @@ function Page_Distrubion(socket)
title
.
set
()
title
.
set
()
breadcrumb
.
update
()
breadcrumb
.
update
()
select
()
select
()
sticky
()
sticky
.
reset
()
}
}
}
}
...
@@ -279,19 +292,19 @@ function Page_Distrubion(socket)
...
@@ -279,19 +292,19 @@ function Page_Distrubion(socket)
this
.
start
=
function
()
{
this
.
start
=
function
()
{
socket
.
on
(
events
.
distribution_packages
.
set
,
function
(
socket_data
){
socket
.
on
(
events
.
distribution_packages
.
set
,
function
(
socket_data
){
packages
.
set
(
socket_data
)
packages
.
set
(
socket_data
)
})
})
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
)
})
})
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
)
})
})
socket
.
on
(
events
.
package_files_list
.
set
,
function
(
socket_data
){
socket
.
on
(
events
.
package_files_list
.
set
,
function
(
socket_data
){
files
.
set
(
socket_data
)
files
.
set
(
socket_data
)
})
})
...
@@ -299,7 +312,7 @@ function Page_Distrubion(socket)
...
@@ -299,7 +312,7 @@ function Page_Distrubion(socket)
file
.
set
(
socket_data
)
file
.
set
(
socket_data
)
})
})
socket
.
on
(
events
.
file_newcontent
,
function
(
socket_data
)
{
socket
.
on
(
events
.
file_newcontent
,
function
(
socket_data
)
{
file
.
append
(
socket_data
)
file
.
append
(
socket_data
)
})
})
...
...
debomatic-webui/public/stylesheets/style.css
View file @
b33dd391
.fixed
{
position
:
fixed
;
width
:
220px
!important
;
top
:
10px
;
}
#header
{
#header
{
background
:
url('../images/debian-logo.gif')
right
no-repeat
;
background
:
url('../images/debian-logo.gif')
right
no-repeat
;
cursor
:
pointer
;
cursor
:
pointer
;
...
@@ -13,6 +7,17 @@ aside .nav-pills li {
...
@@ -13,6 +7,17 @@ aside .nav-pills li {
line-height
:
10px
;
line-height
:
10px
;
}
}
#sidebar
{
position
:
relative
;
}
#sidebar
.fixed
{
position
:
fixed
;
width
:
220px
!important
;
top
:
0
;
}
footer
{
footer
{
height
:
40px
;
height
:
40px
;
}
}
...
...
debomatic-webui/views/distribution.ejs
View file @
b33dd391
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
</nav>
</nav>
<article class="row">
<article class="row">
<aside class="col-md-3">
<aside
id="sidebar"
class="col-md-3">
<nav id="packages">
<nav id="packages">
<h2>Packages</h2>
<h2>Packages</h2>
<ul class="nav nav-pills nav-stacked"></ul>
<ul class="nav nav-pills nav-stacked"></ul>
...
...
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