mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix post merge bugs for desktop mode
This commit is contained in:
parent
4b7b18ca6f
commit
3d6cd3e576
@ -29,18 +29,14 @@
|
|||||||
this.isPublicCheckbox.setAttribute('checked', true);
|
this.isPublicCheckbox.setAttribute('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Environment dependent configuration:
|
|
||||||
if (pskl.utils.Environment.detectNodeWebkit()) {
|
if (pskl.utils.Environment.detectNodeWebkit()) {
|
||||||
// running in Node-Webkit...
|
// hide "save in browser"
|
||||||
this.addEventListener('#save-file-button', 'click', this.saveFileDesktop);
|
|
||||||
// hide the "save in browser" part of the gui
|
|
||||||
var saveInBrowserSection = document.querySelector('#save-in-browser');
|
var saveInBrowserSection = document.querySelector('#save-in-browser');
|
||||||
saveInBrowserSection.style.display = 'none';
|
saveInBrowserSection.style.display = 'none';
|
||||||
} else {
|
|
||||||
// running in browser...
|
|
||||||
this.addEventListener('#save-file-button', 'click', this.saveFileBrowser_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.addEventListener('#save-file-button', 'click', this.saveFile_);
|
||||||
|
|
||||||
this.addEventListener('#save-browser-button', 'click', this.saveLocal_);
|
this.addEventListener('#save-browser-button', 'click', this.saveLocal_);
|
||||||
|
|
||||||
this.saveOnlineButton = document.querySelector('#save-online-button');
|
this.saveOnlineButton = document.querySelector('#save-online-button');
|
||||||
@ -142,10 +138,6 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated - renamed "saveFileBrowser_"
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
ns.SaveController.prototype.saveFile_ = function () {
|
ns.SaveController.prototype.saveFile_ = function () {
|
||||||
// detect if this is running in NodeWebkit
|
// detect if this is running in NodeWebkit
|
||||||
if (pskl.utils.Environment.detectNodeWebkit()) {
|
if (pskl.utils.Environment.detectNodeWebkit()) {
|
||||||
|
@ -52,8 +52,8 @@
|
|||||||
// TODO: if there is already a file path, use it for the dialog's
|
// TODO: if there is already a file path, use it for the dialog's
|
||||||
// working directory and filename
|
// working directory and filename
|
||||||
pskl.utils.FileUtilsDesktop.saveAs(serialized, null, 'piskel', function (selectedSavePath) {
|
pskl.utils.FileUtilsDesktop.saveAs(serialized, null, 'piskel', function (selectedSavePath) {
|
||||||
this.onSaveSuccess_();
|
|
||||||
this.piskelController.setSavePath(selectedSavePath);
|
this.piskelController.setSavePath(selectedSavePath);
|
||||||
|
this.onSaveSuccess_();
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user