Commit 0efa9f97 authored by Robert Lyon's avatar Robert Lyon
Browse files

Be able to select all pages when adding to collection (Bug 1349311)



The 'Add pages to collection' list needs an all/none option.

Change-Id: I36e3ae4c5066e0963cb9da8f1b5a824c61de7d68
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 2a1b9c77
......@@ -211,6 +211,20 @@ $inlinejs = <<<EOF
});
};
var wireselectall = function() {
\$j("#selectall").click(function(e) {
e.preventDefault();
\$j("#addviews :checkbox").prop("checked", true);
});
};
var wireselectnone = function() {
\$j("#selectnone").click(function(e) {
e.preventDefault();
\$j("#addviews :checkbox").prop("checked", false);
});
};
// init
if (\$j('#collectionviews tbody').length > 0) {
wireaddrow();
......@@ -220,6 +234,8 @@ $inlinejs = <<<EOF
wireaddnewrow();
wiredrop();
}
wireselectall();
wireselectnone();
});
EOF;
......
......@@ -8,6 +8,7 @@
<fieldset id="pagestoadd">
<legend>{str tag=addviewstocollection section=collection}</legend>
{if $viewsform}
<div class="right"><a href="" id="selectall">{str tag=All}</a>&nbsp;&nbsp;<a href="" id="selectnone">{str tag=none}</a></div>
{$viewsform|safe}
{else}
{str tag=noviewsavailable section=collection}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment