summaryrefslogtreecommitdiff
path: root/sitestatic
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-05-25 19:34:21 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-05-25 19:34:21 -0400
commit1a1fd4a3d6aa7f6b2338f7751f5f97a30a059a04 (patch)
treef608874663d24f19ecf175ec556f2a330d47a726 /sitestatic
parent747a562ddca10e29dd003e8b3c59f8f384d1bc8d (diff)
parentcd7222047b41ac3efa389a22fdd22148d03c1d61 (diff)
Merge tag 'release_2014-03-22' into archweb-generic
Fix long filenames; local storage for filter prefs Conflicts: templates/public/download.html
Diffstat (limited to 'sitestatic')
-rw-r--r--sitestatic/archweb.css1
-rw-r--r--sitestatic/archweb.js50
2 files changed, 50 insertions, 1 deletions
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 {
diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js
index be6f5256..43816c5b 100644
--- a/sitestatic/archweb.js
+++ b/sitestatic/archweb.js
@@ -123,7 +123,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);
},
@@ -387,6 +387,38 @@ 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 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');
+ });
+}
+
+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
@@ -464,6 +496,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');
@@ -471,6 +504,21 @@ 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 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');
+ });
+}
function collapseNotes(elements) {
// Remove any trailing <br/> tags from the note contents