summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/detail_pagination_bottom.html
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-05-19 13:30:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-29 11:59:45 +0100
commitfea4a82a2b9fdbbccd0a09a76208cebbefdd8b20 (patch)
tree2b1e673def85529d4b05151cd20e9dd308ce4eb0 /bitbake/lib/toaster/toastergui/templates/detail_pagination_bottom.html
parent1b6a50c6b2857c7c21fe4287966f3babca71a142 (diff)
downloadpoky-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/detail_pagination_bottom.html')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/detail_pagination_bottom.html5
1 files changed, 0 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/detail_pagination_bottom.html b/bitbake/lib/toaster/toastergui/templates/detail_pagination_bottom.html
index 355ae9073c..434facba93 100644
--- a/bitbake/lib/toaster/toastergui/templates/detail_pagination_bottom.html
+++ b/bitbake/lib/toaster/toastergui/templates/detail_pagination_bottom.html
@@ -41,17 +41,12 @@
41 // load cookie for number of entries to be displayed on page 41 // load cookie for number of entries to be displayed on page
42 if ({{request.GET.count}} != "") { 42 if ({{request.GET.count}} != "") {
43 pagesize = {{request.GET.count}}; 43 pagesize = {{request.GET.count}};
44 } else {
45 pagesize = $.cookie('_count');
46 } 44 }
47
48 $('.pagesize option').prop('selected', false) 45 $('.pagesize option').prop('selected', false)
49 .filter('[value="' + pagesize + '"]') 46 .filter('[value="' + pagesize + '"]')
50 .attr('selected', true); 47 .attr('selected', true);
51 48
52 $(".pagesize").change(function () { 49 $(".pagesize").change(function () {
53 // save cookie with pagesize
54 $.cookie("_count", $(this).val(), { path : $(location).attr('pathname') });
55 reload_params({"count":$(this).val()}); 50 reload_params({"count":$(this).val()});
56 }); 51 });
57}); 52});