Skip to content

Commit d9cfe49

Browse files
committed
Revert "bugfix: #1830 "Type" dropdown field/box missing with non-project mode"
This reverts commit da6491d. fixes #1877
1 parent 019b38c commit d9cfe49

File tree

2 files changed

+19
-25
lines changed

2 files changed

+19
-25
lines changed

src/org/opensolaris/opengrok/web/Scripts.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public String toHtml() {
125125
SCRIPTS.put("jquery-tablesorter", new FileScript("js/jquery-tablesorter-2.26.6.min.js", 12));
126126
SCRIPTS.put("tablesorter-parsers", new FileScript("js/tablesorter-parsers-0.0.1.js", 13));
127127
SCRIPTS.put("searchable-option-list", new FileScript("js/searchable-option-list-2.0.5.min.js", 14));
128-
SCRIPTS.put("utils", new FileScript("js/utils-0.0.19.js", 15));
128+
SCRIPTS.put("utils", new FileScript("js/utils-0.0.18.js", 15));
129129
SCRIPTS.put("repos", new FileScript("js/repos-0.0.1.js", 20));
130130
SCRIPTS.put("diff", new FileScript("js/diff-0.0.2.js", 20));
131131
}

web/js/utils-0.0.19.js renamed to web/js/utils-0.0.18.js

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,23 +1314,6 @@ function init_results_autohide() {
13141314
}
13151315

13161316
function init_searchable_option_list() {
1317-
function init_sol_on_type_combobox() {
1318-
/**
1319-
* Has to be here because otherwise the offset()
1320-
* takes the original long <select> box and the max-height
1321-
* does not work then.
1322-
*/
1323-
$('#type').searchableOptionList({
1324-
texts: {
1325-
searchplaceholder: 'Click here to restrict the file type'
1326-
},
1327-
maxHeight: $('#type').offset().top + 'px',
1328-
/**
1329-
* Defined in menu.jsp just next to the original <select>
1330-
*/
1331-
resultsContainer: $("#type-select-container")
1332-
});
1333-
}
13341317
var searchableOptionListOptions = {
13351318
maxHeight: '300px',
13361319
showSelectionBelowList: false,
@@ -1378,16 +1361,27 @@ function init_searchable_option_list() {
13781361
.css('left', Math.floor(this.$container.offset().left))
13791362
.css('width', selectionContainerWidth);
13801363
},
1381-
onRendered: init_sol_on_type_combobox
1364+
onRendered: function () {
1365+
/**
1366+
* Has to be here because otherwise the offset()
1367+
* takes the original long <select> box and the max-height
1368+
* does not work then.
1369+
*/
1370+
$('#type').searchableOptionList({
1371+
texts: {
1372+
searchplaceholder: 'Click here to restrict the file type'
1373+
},
1374+
maxHeight: $('#type').offset().top + 'px',
1375+
/**
1376+
* Defined in menu.jsp just next to the original <select>
1377+
*/
1378+
resultsContainer: $("#type-select-container"),
1379+
});
1380+
}
13821381
}
13831382
};
13841383

1385-
var $project = $('#project');
1386-
if ($project.length === 1) {
1387-
$project.searchableOptionList(searchableOptionListOptions);
1388-
} else {
1389-
init_sol_on_type_combobox();
1390-
}
1384+
$('#project').searchableOptionList(searchableOptionListOptions);
13911385
}
13921386

13931387
function init_history_input() {

0 commit comments

Comments
 (0)