diff options
| author | Stephen Finucane <stephen.finucane@intel.com> | 2016-03-14 16:11:56 +0000 |
|---|---|---|
| committer | Stephen Finucane <stephen.finucane@intel.com> | 2016-03-15 11:30:36 +0000 |
| commit | 44fe7bae80be9de34c6d6ce4e239f51beb2f16ff (patch) | |
| tree | 0721b24a2078c3ebf66fc92aefaedf7b548cb807 /htdocs | |
| parent | 254b7fb1fdae3b3632770b93e3e269267fbbff96 (diff) | |
| download | patchwork-44fe7bae80be9de34c6d6ce4e239f51beb2f16ff.tar patchwork-44fe7bae80be9de34c6d6ce4e239f51beb2f16ff.tar.gz | |
js: Allow shift-select of checkboxes
Allow bulk modification of patches through shift-select of the check
boxes on each line.
This allows for the removal of the 'common.js' file, which was only
being used in one location.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Diffstat (limited to 'htdocs')
| -rw-r--r-- | htdocs/js/bundle.js | 6 | ||||
| -rw-r--r-- | htdocs/js/common.js | 25 | ||||
| l--------- | htdocs/js/jquery.checkboxes-1.0.6.min.js | 1 |
3 files changed, 7 insertions, 25 deletions
diff --git a/htdocs/js/bundle.js b/htdocs/js/bundle.js index 0bdf41a..c969d0b 100644 --- a/htdocs/js/bundle.js +++ b/htdocs/js/bundle.js @@ -80,3 +80,9 @@ function row_to_patch_id(node) return id_str.substring(i + 1); } + +function confirm_delete(type, name) +{ + return confirm("Are you sure you want to delete the " + type + + " '" + name + "'?"); +} diff --git a/htdocs/js/common.js b/htdocs/js/common.js deleted file mode 100644 index f725693..0000000 --- a/htdocs/js/common.js +++ /dev/null @@ -1,25 +0,0 @@ - -function confirm_delete(type, name) -{ - return confirm("Are you sure you want to delete the " + type + - " '" + name + "'?"); -} - -function select_all(obj) -{ - var value = obj.checked; - var form = obj.form; - - select_all_checkbox = obj; - - for (var i = 0; i < form.elements.length; i++ ) { - var element = form.elements[i]; - if (element.type != 'checkbox') { - continue; - } - if (element.name.substring(0, 9) != 'patch_id:') { - continue; - } - element.checked = value; - } -} diff --git a/htdocs/js/jquery.checkboxes-1.0.6.min.js b/htdocs/js/jquery.checkboxes-1.0.6.min.js new file mode 120000 index 0000000..dfef5d4 --- /dev/null +++ b/htdocs/js/jquery.checkboxes-1.0.6.min.js @@ -0,0 +1 @@ +../../lib/packages/jquery/jquery.checkboxes-1.0.6.min.js
\ No newline at end of file |