diff --git a/js/Article.js b/js/Article.js
index ba08e3656..ed74051a6 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -322,7 +322,7 @@ const Article = {
},
editTags: function (id) {
const dialog = new fox.SingleUseDialog({
- title: __("Edit article Tags"),
+ title: __("Article tags"),
content: `
${App.FormFields.hidden_tag("id", id.toString())}
${App.FormFields.hidden_tag("op", "article")}
@@ -334,7 +334,7 @@ const Article = {
+ id='tags_str' name='tags_str'>${__("Loading, please wait...")}
diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js
index fdf282090..651e3f609 100644
--- a/js/PrefHelpers.js
+++ b/js/PrefHelpers.js
@@ -239,60 +239,70 @@ const Helpers = {
},
Prefs: {
customizeCSS: function() {
- xhr.json("backend.php", {op: "pref-prefs", method: "customizeCSS"}, (reply) => {
-
- const dialog = new fox.SingleUseDialog({
- title: __("Customize stylesheet"),
- apply: function() {
- xhr.post("backend.php", this.attr('value'), () => {
- Element.show("css_edit_apply_msg");
- App.byId("user_css_style").innerText = this.attr('value');
- });
- },
- execute: function () {
- Notify.progress('Saving data...', true);
+ const dialog = new fox.SingleUseDialog({
+ title: __("Customize stylesheet"),
+ apply: function() {
+ xhr.post("backend.php", this.attr('value'), () => {
+ Element.show("css_edit_apply_msg");
+ App.byId("user_css_style").innerText = this.attr('value');
+ });
+ },
+ execute: function () {
+ Notify.progress('Saving data...', true);
- xhr.post("backend.php", this.attr('value'), () => {
- window.location.reload();
- });
- },
- content: `
-
- ${__("You can override colors, fonts and layout of your currently selected theme with custom CSS declarations here.")}
-
+ xhr.post("backend.php", this.attr('value'), () => {
+ window.location.reload();
+ });
+ },
+ content: `
+
+ ${__("You can override colors, fonts and layout of your currently selected theme with custom CSS declarations here.")}
+
- ${App.FormFields.hidden_tag('op', 'rpc')}
- ${App.FormFields.hidden_tag('method', 'setpref')}
- ${App.FormFields.hidden_tag('key', 'USER_STYLESHEET')}
+ ${App.FormFields.hidden_tag('op', 'rpc')}
+ ${App.FormFields.hidden_tag('method', 'setpref')}
+ ${App.FormFields.hidden_tag('key', 'USER_STYLESHEET')}
-
-
- ${__("User CSS has been applied, you might need to reload the page to see all changes.")}
-
+
+
+ ${__("User CSS has been applied, you might need to reload the page to see all changes.")}
+
-
-
-
- `
- });
+
- dialog.show();
+
+ `
+ });
+
+ const tmph = dojo.connect(dialog, 'onShow', function () {
+ dojo.disconnect(tmph);
+
+ xhr.json("backend.php", {op: "pref-prefs", method: "customizeCSS"}, (reply) => {
+
+ const editor = dijit.getEnclosingWidget(dialog.domNode.querySelector(".user-css-editor"));
+
+ editor.attr('value', reply.value);
+ editor.attr('disabled', false);
+ });
});
+
+ dialog.show();
+
},
confirmReset: function() {
if (confirm(__("Reset to defaults?"))) {