File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -1213,17 +1213,19 @@ var unbxdSearchInit = function(jQuery, Handlebars){
1213
1213
, ranges : { }
1214
1214
, categoryId : ""
1215
1215
, extra : {
1216
- format : "json"
1217
- , page : 1
1218
- , rows : 12
1219
- , view : ( this . options . viewTypes !== undefined && this . options . viewTypes . length > 0 ? this . options . viewTypes [ 0 ] : "" )
1216
+ format : "json"
1217
+ , page : 1
1218
+ , rows : 12
1220
1219
}
1221
1220
} ;
1222
1221
1223
- if ( typeof this . options . customReset == "function" )
1224
- this . options . customReset . call ( this ) ;
1222
+ if ( this . options . viewTypes && this . options . viewTypes . length > 0 )
1223
+ this . params . extra . view = this . options . viewTypes [ 0 ] ;
1225
1224
1226
- return this ;
1225
+ if ( typeof this . options . customReset == "function" )
1226
+ this . options . customReset . call ( this ) ;
1227
+
1228
+ return this ;
1227
1229
}
1228
1230
, setDefaultParams : function ( params ) {
1229
1231
this . options . setDefaultFilters . call ( this ) ;
@@ -1310,13 +1312,12 @@ var unbxdSearchInit = function(jQuery, Handlebars){
1310
1312
if ( "start" in obj )
1311
1313
params . extra . page = ( parseInt ( obj . start ) / parseInt ( params . extra . rows ) ) + 1 ;
1312
1314
1313
- if ( ! ( "view" in obj ) ) {
1314
- params . extra . view = ( this . options . viewTypes !== undefined && this . options . viewTypes . length > 0 ? this . options . viewTypes [ 0 ] : "" ) ;
1315
- } else {
1316
- params . extra . view = obj [ "view" ] ;
1317
- }
1315
+ if ( "view" in obj )
1316
+ params . extra . view = obj [ 'view' ] ;
1317
+ else if ( this . options . viewTypes && this . options . viewTypes . length > 0 )
1318
+ params . extra . view = this . options . viewTypes [ 0 ] ;
1318
1319
1319
- return params ;
1320
+ return params ;
1320
1321
}
1321
1322
, paintResultSet : function ( obj ) {
1322
1323
this . _internalPaintResultSet ( obj , true ) ;
You can’t perform that action at this time.
0 commit comments