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

user css dialog: allow saving and applying CSS without closing the dialog

This commit is contained in:
Andrew Dolgov
2019-12-06 14:02:30 +03:00
parent 0697eca0e1
commit ac95ab4a65
3 changed files with 15 additions and 3 deletions

View File

@@ -1132,12 +1132,18 @@ class Pref_Prefs extends Handler_Protected {
print_hidden("method", "setpref");
print_hidden("key", "USER_STYLESHEET");
print "<div id='css_edit_apply_msg' style='display : none'>";
print_warning(__("User CSS has been applied, you might need to reload the page to see all changes."));
print "</div>";
print "<textarea class='panel user-css-editor' dojoType='dijit.form.SimpleTextarea'
style='font-size : 12px;' name='value'>$value</textarea>";
print "<footer>";
print "<button dojoType='dijit.form.Button'
onclick=\"dijit.byId('cssEditDlg').execute()\">".__('Save')."</button> ";
print "<button dojoType='dijit.form.Button' class='alt-success'
onclick=\"dijit.byId('cssEditDlg').apply()\">".__('Apply')."</button> ";
print "<button dojoType='dijit.form.Button' class='alt-primary'
onclick=\"dijit.byId('cssEditDlg').execute()\">".__('Save and reload')."</button> ";
print "<button dojoType='dijit.form.Button'
onclick=\"dijit.byId('cssEditDlg').hide()\">".__('Cancel')."</button>";
print "</footer>";