fix:confirmation on editor closing
- add variable definition on saving the file for confirmation question - add editor focus after confirmation message
This commit is contained in:
parent
a38f76499c
commit
f7ae941e9e
|
@ -56,6 +56,9 @@ $(function () {
|
|||
var dialog = $("#klipper_editor");
|
||||
dialog.modal('hide');
|
||||
},
|
||||
oncancel: function () {
|
||||
self.editorFocusDelay(1000);
|
||||
},
|
||||
nofade: true
|
||||
});
|
||||
} else {
|
||||
|
@ -133,6 +136,7 @@ $(function () {
|
|||
OctoPrint.plugins.klipper.saveCfg(editor.session.getValue(), self.CfgFilename())
|
||||
.done(function (response) {
|
||||
var msg = ""
|
||||
self.loadedConfig = editor.session.getValue();
|
||||
if (response.saved === true) {
|
||||
self.klipperViewModel.showPopUp("success", gettext("Save Config"), gettext("File saved."));
|
||||
if (self.settings.settings.plugins.klipper.configuration.restart_onsave()==true) {
|
||||
|
|
Loading…
Reference in New Issue