diff options
| author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-05-19 13:30:05 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-29 11:59:45 +0100 |
| commit | fea4a82a2b9fdbbccd0a09a76208cebbefdd8b20 (patch) | |
| tree | 2b1e673def85529d4b05151cd20e9dd308ce4eb0 /bitbake/lib/toaster/toastergui/templates/basetable_top.html | |
| parent | 1b6a50c6b2857c7c21fe4287966f3babca71a142 (diff) | |
| download | poky-fea4a82a2b9fdbbccd0a09a76208cebbefdd8b20.tar.gz | |
bitbake: toasterui: replace cookie-based preferences with session data
We switch from storing the user preferences using cookies
to saving them in the server-side session.
Patch for "count/pagesize" and "orderby" fields in the table-based
pages.
This patch will solve two problems:
* the browser-side race between the GET header data and the cookie data
* page breakages when field names chances in orderby statements.
(Bitbake rev: 125d0e05805247450be0675e281a21bd6146d108)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/basetable_top.html')
| -rw-r--r-- | bitbake/lib/toaster/toastergui/templates/basetable_top.html | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basetable_top.html b/bitbake/lib/toaster/toastergui/templates/basetable_top.html index 92a3b50801..fcd2f036ec 100644 --- a/bitbake/lib/toaster/toastergui/templates/basetable_top.html +++ b/bitbake/lib/toaster/toastergui/templates/basetable_top.html | |||
| @@ -156,13 +156,6 @@ | |||
| 156 | showhideImmediateTableAction( clname, sh, orderkey ); | 156 | showhideImmediateTableAction( clname, sh, orderkey ); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | // | ||
| 160 | // saves a cookie with selected order field | ||
| 161 | // | ||
| 162 | function saveOrderCookie( orderfield ) { | ||
| 163 | $.cookie("orderby", orderfield, { path: $(location).attr('pathname') }); | ||
| 164 | } | ||
| 165 | |||
| 166 | </script> | 159 | </script> |
| 167 | 160 | ||
| 168 | <!-- control header --> | 161 | <!-- control header --> |
| @@ -230,7 +223,7 @@ | |||
| 230 | <tr> | 223 | <tr> |
| 231 | {% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}"> | 224 | {% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}"> |
| 232 | {%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%} | 225 | {%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%} |
| 233 | {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'page': 1, 'orderby' : '{{tc.orderfield}}' })" onclick="saveOrderCookie('{{tc.orderfield}}')">{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%} | 226 | {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'page': 1, 'orderby' : '{{tc.orderfield}}' })">{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%} |
| 234 | {%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%} | 227 | {%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%} |
| 235 | {%if tc.filter%}<div class="btn-group pull-right"> | 228 | {%if tc.filter%}<div class="btn-group pull-right"> |
| 236 | <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 and tc.filter.options|filtered_tooltip: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 {% if filter_search_display %}{{filter_search_display}}{% else %}{{objectname}}{% endif %}</a></p>" {%endif%} data-toggle="modal"> <i class="icon-filter filtered"></i> </a> | 229 | <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 and tc.filter.options|filtered_tooltip: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 {% if filter_search_display %}{{filter_search_display}}{% else %}{{objectname}}{% endif %}</a></p>" {%endif%} data-toggle="modal"> <i class="icon-filter filtered"></i> </a> |
