From 8af4d27cd67157b4f53286913d886d8896f7010a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 27 Jan 2014 13:17:49 -0600 Subject: Fix linebreak issues in preformatted code blocks In text blocks that have preformatted code, such as news items, we don't handle the overflow case very well. Let the browser do the job and wrap things if absolutely required. Fixes FS#35649. Signed-off-by: Dan McGee --- sitestatic/archweb.css | 1 + 1 file changed, 1 insertion(+) (limited to 'sitestatic') diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css index b7d6e1ee..53fa6274 100644 --- a/sitestatic/archweb.css +++ b/sitestatic/archweb.css @@ -79,6 +79,7 @@ pre { pre code { display: block; background: none; + overflow: auto; } blockquote { -- cgit v1.2.3 From 81a2051e346bb41fb9756695566f735d5035bfd8 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 9 Mar 2014 11:12:40 -0500 Subject: Allow filesize sorter to match   character This gets the sorter working correctly again on the developer reports pages where we show file sizes. Apparently the Django filesizeformat tag now uses non-breaking spaces. Signed-off-by: Dan McGee --- sitestatic/archweb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sitestatic') diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index 800c5add..209d6f67 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -103,7 +103,7 @@ if (typeof $ !== 'undefined' && typeof $.tablesorter !== 'undefined') { $.tablesorter.addParser({ id: 'filesize', - re: /^(\d+(?:\.\d+)?) (bytes?|[KMGTPEZY]i?B)$/, + re: /^(\d+(?:\.\d+)?)[ \u00a0](bytes?|[KMGTPEZY]i?B)$/, is: function(s) { return this.re.test(s); }, -- cgit v1.2.3 From 2e06e74d3a2a09cbb2a2521cdd55d6543cb56674 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 9 Mar 2014 11:40:58 -0500 Subject: Use localStorage to save/restore signoffs filters Signed-off-by: Dan McGee --- sitestatic/archweb.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'sitestatic') diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index 209d6f67..8212e85b 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -444,6 +444,7 @@ function filter_signoffs() { $('#filter-count').text(rows.length); /* make sure we update the odd/even styling from sorting */ $('.results').trigger('applyWidgets', [false]); + filter_signoffs_save(); } function filter_signoffs_reset() { $('#signoffs_filter .arch_filter').attr('checked', 'checked'); @@ -451,6 +452,23 @@ function filter_signoffs_reset() { $('#id_pending').removeAttr('checked'); filter_signoffs(); } +function filter_signoffs_save() { + var state = $('#signoffs_filter').serializeArray(); + localStorage['filter_signoffs'] = JSON.stringify(state); +} +function filter_signoffs_load() { + var state = localStorage['filter_signoffs']; + if (!state) + return; + state = JSON.parse(state); + $('#signoffs_filter .arch_filter').removeAttr('checked'); + $('#signoffs_filter .repo_filter').removeAttr('checked'); + $('#id_pending').removeAttr('checked'); + $.each(state, function (i, v) { + // this assumes our only filters are checkboxes + $('#signoffs_filter input[name="' + v['name'] + '"]').attr('checked', 'checked'); + }); +} function collapseNotes(elements) { // Remove any trailing
tags from the note contents -- cgit v1.2.3 From 697a2b15c1e402c1c624af1ffeaf5123d7fb0e9f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 9 Mar 2014 11:49:22 -0500 Subject: Use localStorage to save/restore todolist filters Signed-off-by: Dan McGee --- sitestatic/archweb.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'sitestatic') diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index 8212e85b..457e334c 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -367,6 +367,25 @@ function filter_pkgs_reset(callback) { callback(); } +function filter_todolist_save(list_id) { + var state = $('#todolist_filter').serializeArray(); + localStorage['filter_todolist_' + list_id] = JSON.stringify(state); +} +function filter_todolist_load(list_id) { + var state = localStorage['filter_todolist_' + list_id]; + if (!state) + return; + state = JSON.parse(state); + $('#todolist_filter .arch_filter').removeAttr('checked'); + $('#todolist_filter .repo_filter').removeAttr('checked'); + $('#id_incomplete').removeAttr('checked'); + $('#id_mine_only').removeAttr('checked'); + $.each(state, function (i, v) { + // this assumes our only filters are checkboxes + $('#todolist_filter input[name="' + v['name'] + '"]').attr('checked', 'checked'); + }); +} + /* signoffs.html */ function signoff_package() { // TODO: fix usage of this -- cgit v1.2.3 From 268317dd331bcdbe1c2828583034c0274a19eea3 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 9 Mar 2014 11:58:51 -0500 Subject: Use localStorage to save/restore developer report filters Signed-off-by: Dan McGee --- sitestatic/archweb.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'sitestatic') diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index 457e334c..0a979494 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -386,6 +386,22 @@ function filter_todolist_load(list_id) { }); } +function filter_report_save(report_id) { + var state = $('#report_filter').serializeArray(); + localStorage['filter_report_' + report_id] = JSON.stringify(state); +} +function filter_report_load(report_id) { + var state = localStorage['filter_report_' + report_id]; + if (!state) + return; + state = JSON.parse(state); + $('#report_filter input[type="checkbox"]').removeAttr('checked') + $.each(state, function (i, v) { + // this assumes our only filters are checkboxes + $('#report_filter input[name="' + v['name'] + '"]').attr('checked', 'checked'); + }); +} + /* signoffs.html */ function signoff_package() { // TODO: fix usage of this -- cgit v1.2.3 From 3f1ca4da2a0e29850eadec7a8d69444081da099c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 9 Mar 2014 12:02:00 -0500 Subject: Simplify filter reload code Signed-off-by: Dan McGee --- sitestatic/archweb.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'sitestatic') diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index 0a979494..0c4059a9 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -376,10 +376,7 @@ function filter_todolist_load(list_id) { if (!state) return; state = JSON.parse(state); - $('#todolist_filter .arch_filter').removeAttr('checked'); - $('#todolist_filter .repo_filter').removeAttr('checked'); - $('#id_incomplete').removeAttr('checked'); - $('#id_mine_only').removeAttr('checked'); + $('#todolist_filter input[type="checkbox"]').removeAttr('checked'); $.each(state, function (i, v) { // this assumes our only filters are checkboxes $('#todolist_filter input[name="' + v['name'] + '"]').attr('checked', 'checked'); @@ -395,7 +392,7 @@ function filter_report_load(report_id) { if (!state) return; state = JSON.parse(state); - $('#report_filter input[type="checkbox"]').removeAttr('checked') + $('#report_filter input[type="checkbox"]').removeAttr('checked'); $.each(state, function (i, v) { // this assumes our only filters are checkboxes $('#report_filter input[name="' + v['name'] + '"]').attr('checked', 'checked'); @@ -496,9 +493,7 @@ function filter_signoffs_load() { if (!state) return; state = JSON.parse(state); - $('#signoffs_filter .arch_filter').removeAttr('checked'); - $('#signoffs_filter .repo_filter').removeAttr('checked'); - $('#id_pending').removeAttr('checked'); + $('#signoffs_filter input[type="checkbox"]').removeAttr('checked'); $.each(state, function (i, v) { // this assumes our only filters are checkboxes $('#signoffs_filter input[name="' + v['name'] + '"]').attr('checked', 'checked'); -- cgit v1.2.3