Skip to content

Commit ff84b9a

Browse files
authored
Merge pull request #3152 from idodeclare/bugfix/clear_file_type
Fix #3028 : on Clear, reset the radio to Any
2 parents 34e122f + 9a0b78d commit ff84b9a

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/web/Scripts.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ public String toHtml() {
110110
putjs("jquery-ui", "js/jquery-ui-1.12.1-custom", 11);
111111
putjs("jquery-tablesorter", "js/jquery-tablesorter-2.26.6", 12);
112112
putjs("tablesorter-parsers", "js/tablesorter-parsers-0.0.2", 13, true);
113-
putjs("searchable-option-list", "js/searchable-option-list-2.0.13", 14);
114-
putjs("utils", "js/utils-0.0.35", 15, true);
113+
putjs("searchable-option-list", "js/searchable-option-list-2.0.14", 14);
114+
putjs("utils", "js/utils-0.0.36", 15, true);
115115
putjs("repos", "js/repos-0.0.2", 20, true);
116116
putjs("diff", "js/diff-0.0.4", 20, true);
117117
putjs("jquery-caret", "js/jquery.caret-1.5.2", 25);

opengrok-web/src/main/webapp/js/searchable-option-list-2.0.13.js renamed to opengrok-web/src/main/webapp/js/searchable-option-list-2.0.14.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,19 @@
13171317
}
13181318
},
13191319

1320+
selectRadio: function(val) {
1321+
this.$selectionContainer.find('input[type="radio"]')
1322+
.each(function (index, item) {
1323+
var $currentOptionItem = $(item);
1324+
if ($currentOptionItem.val() === val) {
1325+
if (!$currentOptionItem.is(':checked')) {
1326+
$currentOptionItem.prop("checked", true).trigger('change', true);
1327+
}
1328+
return false;
1329+
}
1330+
});
1331+
},
1332+
13201333
getSelection: function () {
13211334
return this.$selection.find('input:checked');
13221335
}

opengrok-web/src/main/webapp/js/utils-0.0.35.js renamed to opengrok-web/src/main/webapp/js/utils-0.0.36.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/*
2121
* Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
2222
* Portions Copyright 2011 Jens Elkner.
23-
* Portions Copyright (c) 2017, Chris Fraire <[email protected]>.
23+
* Portions Copyright (c) 2017, 2020, Chris Fraire <[email protected]>.
2424
*/
2525

2626
/**
@@ -2169,7 +2169,7 @@ function clearSearchFrom() {
21692169
$("#sbox input[type='text']").each(function () {
21702170
$(this).val("");
21712171
});
2172-
$("#type :selected").prop("selected", false);
2172+
$("#type").searchableOptionList().selectRadio("");
21732173
}
21742174

21752175
function getSelectedProjectNames() {

0 commit comments

Comments
 (0)