bitbake: toaster: Base table fixes for header text, sort icon and filter icon
authorRavi Chintakunta <ravi.chintakunta@timesys.com>
Fri, 10 Jan 2014 21:36:40 +0000 (16:36 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jan 2014 21:01:05 +0000 (21:01 +0000)
- Display the table column header as a link only if it is sortable.
   Non-sortable column headers are displayed as plain text.

- Display the sort order by an up / down arrow icon next to the
   column header

- Add style for header in default.css

- Set tooltip for the active filter icon

- Pass the view name to the filter dialog

(Bitbake rev: 53ede15926d45b555252d77919a0568a984c6d74)

Signed-off-by: Ravi Chintakunta <ravi.chintakunta@timesys.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/toaster/toastergui/static/css/default.css
bitbake/lib/toaster/toastergui/templates/basetable_bottom.html
bitbake/lib/toaster/toastergui/templates/basetable_top.html

index 53c5004..fe3881e 100644 (file)
@@ -175,3 +175,4 @@ dd p {line-height:20px;}
 
 
 .no-results { margin: 10px 0 0; }
+th > a, th > span { font-weight: normal; color:#333333;}
index 8f81472..abce7c2 100644 (file)
@@ -76,7 +76,7 @@
 </script>
 
 <!-- modal filter boxes -->
-   {% for tc in tablecols %}{% if tc.filter %}{% with f=tc.filter %}
+   {% for tc in tablecols %}{% if tc.filter %}{% with objectname=objectname f=tc.filter %}
         {% include "filtersnippet.html" %}
    {% endwith %}{% endif %} {% endfor %}
 <!-- end modals -->
index b8d5c38..7b3017a 100644 (file)
         <tr>
             {% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}">
                 {%if tc.qhelp%}<i class="icon-question-sign get-help" data-toggle="tooltip" title="{{tc.qhelp}}"></i>{%endif%}
-                <a href="javascript:reload_params({'orderby' : '{{tc.orderfield}}' })" style="font-weight:normal;">{{tc.name}}</a>
+                {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'orderby' : '{{tc.orderfield}}' })" >{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%}
+                {%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%}
                 {%if tc.filter%}<div class="btn-group pull-right">
-                    <a href="#filter_{{tc.filter.class}}" role="button" class="btn btn-mini{%if request.GET.filter in tc.filter.options.values%} btn-primary{%endif%}" data-toggle="modal"> <i class="icon-filter filtered"></i> </a>
+                    <a href="#filter_{{tc.filter.class}}" role="button" class="btn btn-mini {%if request.GET.filter%}{{tc.filter.options|filtered_icon:request.GET.filter}} {%endif%}" {%if request.GET.filter%} title="{{tc.filter.options|filtered_tooltip:request.GET.filter}}"{%endif%} data-toggle="modal"> <i class="icon-filter filtered"></i> </a>
                 </div>{%endif%}
             </th>{% endfor %}
         </tr>