File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 6099
6099
"message" : " Save" ,
6100
6100
"description" : " Save button in the VTX tab"
6101
6101
},
6102
+ "vtxButtonSaving" : {
6103
+ "message" : " Saving" ,
6104
+ "description" : " Show state of the Save button in the VTX tab"
6105
+ },
6102
6106
"vtxButtonSaved" : {
6103
6107
"message" : " Saved" ,
6104
6108
"description" : " Saved action button in the VTX tab"
Original file line number Diff line number Diff line change @@ -885,13 +885,19 @@ vtx.initialize = function (callback) {
885
885
886
886
TABS . vtx . vtxTableSavePending = false ;
887
887
888
- const oldText = $ ( "#save_button" ) . text ( ) ;
889
- $ ( "#save_button" ) . html ( i18n . getMessage ( 'vtxButtonSaved' ) ) ;
890
- setTimeout ( function ( ) {
891
- $ ( "#save_button" ) . html ( oldText ) ;
892
- } , 2000 ) ;
888
+ const saveButton = $ ( "#save_button" ) ;
889
+ const oldText = saveButton . text ( ) ;
890
+
891
+ saveButton . html ( i18n . getMessage ( 'vtxButtonSaving' ) ) ;
893
892
894
- TABS . vtx . initialize ( ) ;
893
+ setTimeout ( ( ) => {
894
+ saveButton . html ( i18n . getMessage ( 'vtxButtonSaved' ) ) ;
895
+
896
+ setTimeout ( ( ) => {
897
+ saveButton . html ( oldText ) ;
898
+ TABS . vtx . initialize ( ) ;
899
+ } , 2000 ) ; // Allow firmware to make relevant changes before initialization
900
+ } , 2000 ) ;
895
901
}
896
902
}
897
903
You can’t perform that action at this time.
0 commit comments