[PATCH 30/46] patch-list: Make the table header sticky

Damien Lespiau damien.lespiau at intel.com
Sun Nov 9 06:08:48 AEDT 2014


So, when scrolling down the list of patches, we still get what are the
field displayed. This is espacially important as I plan to add a few
more.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 htdocs/css/style.css                | 3 +++
 templates/base.html                 | 5 +++--
 templates/patchwork/patch-list.html | 5 +++++
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/htdocs/css/style.css b/htdocs/css/style.css
index 1ec7400..3d4bebd 100644
--- a/htdocs/css/style.css
+++ b/htdocs/css/style.css
@@ -120,6 +120,9 @@ a.filter-action:hover {
     text-decoration: none;
 }
 
+table#patchlist > thead {
+    background-color: white;
+}
 
 a.colinactive, a.colactive {
 	color: black;
diff --git a/templates/base.html b/templates/base.html
index b7e0588..e79c79a 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -8,8 +8,9 @@
   <link rel="stylesheet" type="text/css" href="/css/selectize.bootstrap3.css"/>
   <link rel="stylesheet" type="text/css" href="/css/style.css"/>
   <script language="JavaScript" type="text/javascript"
-   src="/js/jquery-1.10.1.min.js">
-  </script>
+   src="/js/jquery-1.10.1.min.js"></script>
+  <script language="JavaScript" type="text/javascript"
+   src="/js/jquery.stickytableheaders.min.js"></script>
   <script language="JavaScript" type="text/javascript" src="/js/common.js">
   </script>
   <!-- IE8 support of HTML5 elements and media queries -->
diff --git a/templates/patchwork/patch-list.html b/templates/patchwork/patch-list.html
index bbf5965..e17793c 100644
--- a/templates/patchwork/patch-list.html
+++ b/templates/patchwork/patch-list.html
@@ -31,6 +31,11 @@
 </div>
 {% endif %}
 
+<script type="text/javascript" language="JavaScript">
+$(document).ready(function() {
+    $('#patchlist').stickyTableHeaders();
+});
+</script>
 <form method="post">
 {% csrf_token %}
 <input type="hidden" name="form" value="patchlistform"/>
-- 
1.8.3.1



More information about the Patchwork mailing list