Skip to content

Commit

Permalink
Merge pull request #226 from d-rep/JENKINS-10443
Browse files Browse the repository at this point in the history
Fix for JENKINS-10443: Added way to mark all plugins to be updated at onc
  • Loading branch information
ndeloof committed Sep 5, 2011
2 parents 17ab5d5 + 920e8cd commit 39b19fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -55,6 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Added way to mark all plugins to be updated at once
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10443">issue 10443</a>)
<li class=bug>
Fixed a bug in the UI JavaScript behavior with IE
<li class=bug>
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/hudson/PluginManager/index.jelly
Expand Up @@ -29,6 +29,7 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<local:table page="updates" list="${app.updateCenter.updates}" xmlns:local="/hudson/PluginManager">
<div style="margin-top:1em">
Select: <a href="javascript:toggleCheckboxes(true);">All</a>, <a href="javascript:toggleCheckboxes(false);">None</a><br/>
${%UpdatePageDescription}
<j:if test="${!empty(app.updateCenter.jobs)}">
<br/> ${%UpdatePageLegend(rootURL+'/updateCenter/')}
Expand Down
13 changes: 13 additions & 0 deletions war/src/main/webapp/scripts/hudson-behavior.js
Expand Up @@ -1944,6 +1944,19 @@ function buildFormTree(form) {
}
}

/**
* @param {boolean} toggle
* When true, will check all checkboxes in the page. When false, unchecks them all.
*/
var toggleCheckboxes = function(toggle) {
var inputs = document.getElementsByTagName("input");
for(var i=0; i<inputs.length; i++) {
if(inputs[i].type === "checkbox") {
inputs[i].checked = toggle;
}
}
};

// this used to be in prototype.js but it must have been removed somewhere between 1.4.0 to 1.5.1
String.prototype.trim = function() {
var temp = this;
Expand Down

0 comments on commit 39b19fb

Please sign in to comment.