@@ -1314,23 +1314,6 @@ function init_results_autohide() {
1314
1314
}
1315
1315
1316
1316
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
- }
1334
1317
var searchableOptionListOptions = {
1335
1318
maxHeight : '300px' ,
1336
1319
showSelectionBelowList : false ,
@@ -1378,16 +1361,27 @@ function init_searchable_option_list() {
1378
1361
. css ( 'left' , Math . floor ( this . $container . offset ( ) . left ) )
1379
1362
. css ( 'width' , selectionContainerWidth ) ;
1380
1363
} ,
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
+ }
1382
1381
}
1383
1382
} ;
1384
1383
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 ) ;
1391
1385
}
1392
1386
1393
1387
function init_history_input ( ) {
0 commit comments