1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 22:15:56 +00:00

Revert "use codeflask for user css editor"

This reverts commit daa43e0572.
This commit is contained in:
Andrew Dolgov
2018-12-11 20:48:17 +03:00
parent 6c9509ebae
commit be49b77b14
9 changed files with 24 additions and 55 deletions

View File

@@ -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 dialog = new dijit.Dialog({
id: "cssEditDlg",
title: __("Customize stylesheet"),
style: "width: 600px",
execute: function () {
Notify.progress('Saving data...', true);
xhrPost("backend.php", this.attr('value'), () => {
window.location.reload();
});
const params = this.attr('value');
params.value = this._flask.getCode();
xhrPost("backend.php", params, () => {
window.location.reload();
});
},
href: query
});
dojo.connect(dialog, "onShow", function () {
setTimeout(() => {
dialog._flask = new CodeFlask('#user-css-editor', {language: 'css'});
}, 250);
});
dialog.show();
},
href: query
});
dialog.show();
},
confirmReset: function() {
if (confirm(__("Reset to defaults?"))) {