File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 225225 line-height : 20px ;
226226 }
227227 }
228+ .blackboxDebugModeText {
229+ margin-left : 7px !important ;
230+ }
228231 .sdcard {
229232 padding : 10px ;
230233 float : left ;
Original file line number Diff line number Diff line change @@ -340,7 +340,22 @@ onboard_logging.initialize = function (callback) {
340340 }
341341
342342 debugModeSelect . val ( FC . PID_ADVANCED_CONFIG . debugMode ) ;
343- debugModeSelect . sortSelect ( "NONE" ) ;
343+
344+ // Convert to select2 and order alphabetic
345+ debugModeSelect . select2 ( {
346+ sorter ( data ) {
347+ return data . sort ( function ( a , b ) {
348+ if ( a . text === "NONE" || b . text === i18n . getMessage ( 'onboardLoggingDebugModeUnknown' ) ) {
349+ return - 1 ;
350+ } else if ( b . text === "NONE" || a . text === i18n . getMessage ( 'onboardLoggingDebugModeUnknown' ) ) {
351+ return 1 ;
352+ } else {
353+ return a . text . localeCompare ( b . text ) ;
354+ }
355+ } ) ;
356+ } ,
357+ } ) ;
358+ // debugModeSelect.sortSelect("NONE");
344359
345360 } else {
346361 $ ( '.blackboxDebugMode' ) . hide ( ) ;
You can’t perform that action at this time.
0 commit comments