|
|
@ -103,39 +103,27 @@ define(["dojo/_base/declare"], function (declare) {
|
|
|
|
dialog.show();
|
|
|
|
dialog.show();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
customizeCSS: function() {
|
|
|
|
customizeCSS: function() {
|
|
|
|
require(["codeflask"], function(CodeFlask) {
|
|
|
|
const query = "backend.php?op=pref-prefs&method=customizeCSS";
|
|
|
|
|
|
|
|
|
|
|
|
const query = "backend.php?op=pref-prefs&method=customizeCSS";
|
|
|
|
if (dijit.byId("cssEditDlg"))
|
|
|
|
|
|
|
|
dijit.byId("cssEditDlg").destroyRecursive();
|
|
|
|
|
|
|
|
|
|
|
|
if (dijit.byId("cssEditDlg"))
|
|
|
|
const dialog = new dijit.Dialog({
|
|
|
|
dijit.byId("cssEditDlg").destroyRecursive();
|
|
|
|
id: "cssEditDlg",
|
|
|
|
|
|
|
|
title: __("Customize stylesheet"),
|
|
|
|
const dialog = new dijit.Dialog({
|
|
|
|
style: "width: 600px",
|
|
|
|
id: "cssEditDlg",
|
|
|
|
execute: function () {
|
|
|
|
title: __("Customize stylesheet"),
|
|
|
|
Notify.progress('Saving data...', true);
|
|
|
|
style: "width: 600px",
|
|
|
|
|
|
|
|
execute: function () {
|
|
|
|
|
|
|
|
Notify.progress('Saving data...', true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const params = this.attr('value');
|
|
|
|
|
|
|
|
params.value = this._flask.getCode();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xhrPost("backend.php", params, () => {
|
|
|
|
|
|
|
|
window.location.reload();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
href: query
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dojo.connect(dialog, "onShow", function () {
|
|
|
|
xhrPost("backend.php", this.attr('value'), () => {
|
|
|
|
setTimeout(() => {
|
|
|
|
window.location.reload();
|
|
|
|
dialog._flask = new CodeFlask('#user-css-editor', {language: 'css'});
|
|
|
|
});
|
|
|
|
}, 250);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dialog.show();
|
|
|
|
},
|
|
|
|
|
|
|
|
href: query
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dialog.show();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
confirmReset: function() {
|
|
|
|
confirmReset: function() {
|
|
|
|
if (confirm(__("Reset to defaults?"))) {
|
|
|
|
if (confirm(__("Reset to defaults?"))) {
|
|
|
|