Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-16651] Broken Filter field in Plugin Manager.
  • Loading branch information
jglick committed Feb 5, 2013
1 parent 6231f2b commit 9a95d23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion changelog.html
Expand Up @@ -55,7 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=>
<li class=bug>
Plugin Manager’s Filter field did not work. Regression in 1.500.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-16651">issue 16651</a>)
</ul>
</div><!--=TRUNK-END=-->

Expand Down
10 changes: 6 additions & 4 deletions core/src/main/resources/hudson/PluginManager/_table.js
Expand Up @@ -23,15 +23,17 @@ function showhideCategory(col) {
Behaviour.specify("#filter-box", '_table', 0, function(e) {
function applyFilter() {
var filter = e.value.toLowerCase();
var visibles = {};
["TR.plugin","TR.plugin-category"].each(function(clz) {
var encountered = {};
var items = document.getElementsBySelector(clz);
for (var i=0; i<items.length; i++) {
var visible = (filter=="" || items[i].innerHTML.toLowerCase().indexOf(filter)>=0);
var name = items[i].getAttribute("name");
if (name==null || !visibles[name]) {
visible = false;
visibles[name] = true;
if (visible && name != null) {
if (encountered[name]) {
visible = false;
}
encountered[name] = true;
}
items[i].style.display = (visible ? "" : "none");
}
Expand Down

0 comments on commit 9a95d23

Please sign in to comment.