mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
1b6a50c6b2
commit
fea4a82a2b
@@ -156,13 +156,6 @@
|
||||
showhideImmediateTableAction( clname, sh, orderkey );
|
||||
}
|
||||
|
||||
//
|
||||
// saves a cookie with selected order field
|
||||
//
|
||||
function saveOrderCookie( orderfield ) {
|
||||
$.cookie("orderby", orderfield, { path: $(location).attr('pathname') });
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<!-- control header -->
|
||||
@@ -230,7 +223,7 @@
|
||||
<tr>
|
||||
{% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}">
|
||||
{%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%}
|
||||
{%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%}
|
||||
{%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%}
|
||||
{%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 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>
|
||||
|
||||
Reference in New Issue
Block a user