summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-11 20:48:17 +0300
committerAndrew Dolgov <[email protected]>2018-12-11 20:48:17 +0300
commitbe49b77b14ac724cf8b35f2f077cdfaf990c0a7e (patch)
tree5a745339c6ff2ee397c5aa3f18e50f818d45c9c2 /js
parent6c9509ebae43a10b54c838ed7b027e4288a4c3b5 (diff)
Revert "use codeflask for user css editor"
This reverts commit daa43e05727d4cd4d7b261a5be3faefab4263dcd.
Diffstat (limited to 'js')
-rw-r--r--js/PrefHelpers.js44
1 files changed, 16 insertions, 28 deletions
diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js
index f7ca2525f..a3d122029 100644
--- a/js/PrefHelpers.js
+++ b/js/PrefHelpers.js
@@ -103,39 +103,27 @@ define(["dojo/_base/declare"], function (declare) {
dialog.show();
},
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"))
- dijit.byId("cssEditDlg").destroyRecursive();
-
- const dialog = new dijit.Dialog({
- id: "cssEditDlg",
- title: __("Customize stylesheet"),
- 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
- });
+ const dialog = new dijit.Dialog({
+ id: "cssEditDlg",
+ title: __("Customize stylesheet"),
+ style: "width: 600px",
+ execute: function () {
+ Notify.progress('Saving data...', true);
- dojo.connect(dialog, "onShow", function () {
- setTimeout(() => {
- dialog._flask = new CodeFlask('#user-css-editor', {language: 'css'});
- }, 250);
- });
+ xhrPost("backend.php", this.attr('value'), () => {
+ window.location.reload();
+ });
- dialog.show();
+ },
+ href: query
});
+
+ dialog.show();
},
confirmReset: function() {
if (confirm(__("Reset to defaults?"))) {