summaryrefslogtreecommitdiff
path: root/sitestatic/archweb.js
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-11-14 22:44:27 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-11-14 22:44:27 -0500
commit64f6dd9cb41ddbc84376549f558ed7d52d9e600a (patch)
tree81f31f1ceb5fc6e4d94508d273003996e036191c /sitestatic/archweb.js
parentbc432a1ff0e69bf45c5f3b97077a13952611196d (diff)
parentb2b5c1a064d5d3c33f4c4fc119bd67cf9ca1b7ba (diff)
Merge tag 'release_2012-01-11'
Pkgbase view in todos, other changes related to caching Conflicts: public/views.py
Diffstat (limited to 'sitestatic/archweb.js')
-rw-r--r--sitestatic/archweb.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js
index 7b8230a4..f5a682d6 100644
--- a/sitestatic/archweb.js
+++ b/sitestatic/archweb.js
@@ -143,6 +143,26 @@ if (typeof $.tablesorter !== 'undefined') {
});
}
+(function($) {
+ $.fn.enableCheckboxRangeSelection = function() {
+ var lastCheckbox = null;
+ var lastElement = null;
+
+ var spec = this;
+ spec.unbind("click.checkboxrange");
+ spec.bind("click.checkboxrange", function(e) {
+ if (lastCheckbox != null && e.shiftKey) {
+ spec.slice(
+ Math.min(spec.index(lastCheckbox), spec.index(e.target)),
+ Math.max(spec.index(lastCheckbox), spec.index(e.target)) + 1
+ ).attr({checked: e.target.checked ? "checked" : ""});
+ }
+ lastCheckbox = e.target;
+ });
+
+ };
+})(jQuery);
+
/* news/add.html */
function enablePreview() {
$('#news-preview-button').click(function(event) {