Skip to content

Commit

Permalink
[FIXED JENKINS-44665] - "Select all" button inverts all permissions i…
Browse files Browse the repository at this point in the history
…n the Matrix Auth Security settings
  • Loading branch information
ksenia-nenasheva committed Jun 11, 2017
1 parent ae9771e commit 711dce7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
Expand Up @@ -39,8 +39,11 @@ THE SOFTWARE.
</j:forEach>
</j:forEach>
<td class="stop" style="text-align:left;">
<a href="#" class="toggleall">
<img alt="${%Toggle all}" src="${imagesURL}/16x16/edit-select-all.png" height="16" width="16"/>
<a href="#" class="selectall">
<img alt="${%Select all}" src="${rootURL}/plugin/matrix-auth/images/16x16/select-all.png" height="16" width="16"/>
</a>
<a href="#" class="unselectall">
<img alt="${%Unselect all}" src="${rootURL}/plugin/matrix-auth/images/16x16/unselect-all.png" height="16" width="16"/>
</a>
<j:if test="${attrs.sid!='anonymous'}">
<a href="#" class="remove">
Expand Down Expand Up @@ -152,12 +155,23 @@ THE SOFTWARE.
}
e = null; <!-- avoid memory leak -->
});
Behaviour.specify("#${strategyid} TD.stop A.toggleall", 'GlobalMatrixAuthorizationStrategy', 0, function(e) {
Behaviour.specify("#${strategyid} TD.stop A.selectall", 'GlobalMatrixAuthorizationStrategy', 0, function(e) {
e.onclick = function() {
var tr = findAncestor(this,"TR");
var inputs = tr.getElementsByTagName("INPUT");
for(var i=0; i&lt;inputs.length; i++){
if(inputs[i].type == "checkbox") inputs[i].checked = true;
}
return false;
};
e = null; <!-- avoid memory leak -->
});
Behaviour.specify("#${strategyid} TD.stop A.unselectall", 'GlobalMatrixAuthorizationStrategy', 0, function(e) {
e.onclick = function() {
var tr = findAncestor(this,"TR");
var inputs = tr.getElementsByTagName("INPUT");
for(var i=0; i&lt;inputs.length; i++){
if(inputs[i].type == "checkbox") inputs[i].checked = !inputs[i].checked;
if(inputs[i].type == "checkbox") inputs[i].checked = false;
}
return false;
};
Expand Down
Binary file added src/main/webapp/images/16x16/select-all.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/images/16x16/select-all.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/images/16x16/unselect-all.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/images/16x16/unselect-all.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 711dce7

Please sign in to comment.