tweak filter styles
authorTero Marttila <terom@paivola.fi>
Thu, 11 Oct 2012 01:25:05 +0300
changeset 10 513eb70e54f2
parent 9 3334d8ddf2f1
child 11 d1e17bd498e7
tweak filter styles
pvl/verkko/hosts.py
static/style.css
--- a/pvl/verkko/hosts.py	Thu Oct 11 01:11:33 2012 +0300
+++ b/pvl/verkko/hosts.py	Thu Oct 11 01:25:05 2012 +0300
@@ -110,11 +110,11 @@
     
     def render_hosts (self, hosts, title=None, filters=False) :
         COLS = (
-            #title          sort        filter
-            ('IP',          'ip',       'ip'    ),
-            ('MAC',         'mac',      'mac'   ),
-            ('Hostname',    'name',     False   ),
-            ('Seen',        'seen',     False   ),
+            #title          sort        filter      class
+            ('IP',          'ip',       'ip',       'ip'    ),
+            ('MAC',         'mac',      'mac',      'mac'   ),
+            ('Hostname',    'name',     False,      False   ),
+            ('Seen',        'seen',     False,      False   ),
         )
 
         def url (**opts) :
@@ -131,7 +131,7 @@
                     (
                         html.th(
                             html.a(href=url(sort=sort))(title) if sort else (title)
-                        ) for title, sort, filter in COLS
+                        ) for title, sort, filter, class_ in COLS
                     )
                 ),
                 html.tr(class_='filter')(
@@ -139,9 +139,9 @@
                         html.input(type='submit', value=u'\u00BF'),
                     ),
                     (
-                        html.td(
+                        html.td(class_=class_)(
                             html.input(type='text', name=filter, value=filters.get(filter)) if filter else None
-                        ) for title, sort, filter in COLS
+                        ) for title, sort, filter, class_ in COLS
                     )
                 ) if filters is not False else None
             ),
--- a/static/style.css	Thu Oct 11 01:11:33 2012 +0300
+++ b/static/style.css	Thu Oct 11 01:25:05 2012 +0300
@@ -42,18 +42,28 @@
 }
 
 /* Filter */
+tr.filter
+{
+    height: 1em;
+}
+
 tr.filter td
 {
-    padding: 0px;
+    padding: 0em 1em;
 }
 
 tr.filter td input
 {
+    display: block;
     width: 100%;
-    margin: 0px;
+
     border: 0px;
+    padding: 0em; 
 
     background-color: #d0d0d0;
+
+    font-family: inherit;
+    font-size: inherit;
 }
 
 tr.filter td input:hover