[projects/pld-builder.new] make filter toolbox float at the top
glen
glen at pld-linux.org
Fri Apr 26 09:53:07 CEST 2013
commit c35cae86e9325e602811109cfb525d7b784755dc
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Fri Apr 26 10:51:52 2013 +0300
make filter toolbox float at the top
PLD_Builder/bqueue.py | 9 +++++++--
PLD_Builder/script.js | 7 +++++--
PLD_Builder/style.css | 21 ++++++++++++++++++++-
3 files changed, 32 insertions(+), 5 deletions(-)
---
diff --git a/PLD_Builder/bqueue.py b/PLD_Builder/bqueue.py
index 65546bf..e8d544a 100644
--- a/PLD_Builder/bqueue.py
+++ b/PLD_Builder/bqueue.py
@@ -46,13 +46,18 @@ class B_Queue:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="script.js"></script>
</head>
-<body>\n"""
+<body>
+<div id="header">
+ <div id="requesters-filter">Filter by requesters:<br></div>
+</div>
+<div id="content">
+"""
)
self.requests.reverse()
for r in self.requests:
r.dump_html(f)
self.requests.reverse()
- f.write("</body></html>\n")
+ f.write("</div></body></html>\n")
f.flush()
os.fsync(f.fileno())
f.close()
diff --git a/PLD_Builder/script.js b/PLD_Builder/script.js
index 4f11345..8c137d3 100644
--- a/PLD_Builder/script.js
+++ b/PLD_Builder/script.js
@@ -26,8 +26,11 @@ jQuery(function($) {
}
});
- var $filter = $('<div id=requesters-filter>Filter by requesters:<br></div>');
- $('body').prepend($filter);
+ var $filter = $('#requesters-filter');
+ if ($filter.length == 0) {
+ $filter = $('<div id=requesters-filter>Filter by requesters:<br></div>');
+ $('body').prepend($filter);
+ }
requesters.forEach(function(r) {
var $button = $('<button class=request-filter>'+ r + '</button>');
$button.on('click', function() {
diff --git a/PLD_Builder/style.css b/PLD_Builder/style.css
index e0379a2..95fc7e5 100644
--- a/PLD_Builder/style.css
+++ b/PLD_Builder/style.css
@@ -36,7 +36,7 @@ pre {
position: relative;
}
- div {
+ div.request {
background-color: white;
margin: 10px 0px;
padding: 2px;
@@ -55,12 +55,31 @@ pre {
background-color: #ffffcc;
color: black;
}
+
+ #header {
+ background-color: white;
+ border: 1px solid black;
+ padding: 0.5em;
+ position: fixed;
+ z-index: 100;
+ }
+
+ #content {
+ clear: both;
+ margin-top: 5em;
+ overflow: auto;
+ position: absolute;
+ width: 100%;
+ }
}
@media print {
a {
background-color: inherit;
color: inherit;
}
+ #header {
+ display: none;
+ }
}
@media projection {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/c35cae86e9325e602811109cfb525d7b784755dc
More information about the pld-cvs-commit
mailing list