]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: fix javascript for table filters
authorAlexandru DAMIAN <alexandru.damian@intel.com>
Tue, 4 Feb 2014 17:38:17 +0000 (17:38 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Feb 2014 15:38:52 +0000 (15:38 +0000)
This patch adds javascript link for resetting page filters
in the tool tip "Show all" button.

Also fixes a JS bug for when the cookie is not set yet.

(Bitbake rev: e123922274ea875105e6ed855b3368b8b77fca64)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/toaster/toastergui/templates/basetable_bottom.html
bitbake/lib/toaster/toastergui/templates/basetable_top.html

index abce7c24b74197cabf7b242e3ee1753d411618ff..4eb303da79272003f02467232fda20d6ff0e90bb 100644 (file)
@@ -40,6 +40,7 @@
 
     // we load cookies for the column display
     save = $.cookie('_displaycols_{{objectname}}');
+               if (save != undefined) {
     setting = save.split(';');
     for ( i = 0; i < setting.length; i++) {
         if (setting[i].length > 0) {
@@ -52,6 +53,7 @@
             }
         }
     }
+    }
 
     $('.chbxtoggle').each(function () {
         showhideTableColumn($(this).attr('id'), $(this).is(':checked'))
index 84c73a72e03bccc3078ebd74438a491d48127523..9a8bacb3843b7cba01806a027665a95f3ef2df2c 100644 (file)
@@ -79,7 +79,7 @@
                 {%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%}{{tc.filter.options|filtered_icon:request.GET.filter}} {%endif%}" {%if request.GET.filter%} title="<p>{{tc.filter.options|filtered_tooltip:request.GET.filter}}</p><p><a class='btn btn-small btn-primary' href=''>Show all {{objectname}}</a></p>" {%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="<p>{{tc.filter.options|filtered_tooltip:request.GET.filter}}</p><p><a class='btn btn-small btn-primary' href=javascript:reload_params({'filter':''})>Show all {{objectname}}</a></p>" {%endif%} data-toggle="modal"> <i class="icon-filter filtered"></i> </a>
                 </div>{%endif%}
             </th>{% endfor %}
         </tr>