Skip to content

Commit 0a9763a

Browse files
emergieVladimir Kotal
authored andcommitted
rework of "bugfix: #1830 "Type" dropdown field/box missing with non-project mode""
1 parent f6ee653 commit 0a9763a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

web/js/utils-0.0.19.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,16 +1318,20 @@ function init_results_autohide() {
13181318

13191319
function init_searchable_option_list() {
13201320
function init_sol_on_type_combobox() {
1321+
var $type = $('#type');
1322+
if ($type.length === 0) {
1323+
return;
1324+
}
13211325
/**
13221326
* Has to be here because otherwise the offset()
13231327
* takes the original long <select> box and the max-height
13241328
* does not work then.
13251329
*/
1326-
$('#type').searchableOptionList({
1330+
$type.searchableOptionList({
13271331
texts: {
13281332
searchplaceholder: 'Click here to restrict the file type'
13291333
},
1330-
maxHeight: $('#type').offset().top + 'px',
1334+
maxHeight: $type.offset().top + 'px',
13311335
/**
13321336
* Defined in menu.jsp just next to the original <select>
13331337
*/

0 commit comments

Comments
 (0)