diff options
author | Andrew Dolgov <[email protected]> | 2010-11-24 19:23:24 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-24 19:23:24 +0300 |
commit | 88e4e5979c505cdbb494c2624b7a4e09c8145217 (patch) | |
tree | 3bc816f3e2087b462c9028108ceb9c32af32ac09 /prefs.js | |
parent | dcb38ced56c33463bb55f266b2d586308ff12b2f (diff) |
rework user CSS support (bump schema)
Diffstat (limited to 'prefs.js')
-rw-r--r-- | prefs.js | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -926,6 +926,7 @@ function init() { dojo.require("dijit.InlineEditBox"); dojo.require("dijit.ColorPalette"); dojo.require("dijit.ProgressBar"); + dojo.require("dijit.form.SimpleTextarea"); dojo.registerModulePath("lib", ".."); dojo.registerModulePath("fox", "../.."); @@ -1719,3 +1720,33 @@ function clearTwitterCredentials() { exception_error("clearTwitterCredentials", e); } } + +function customizeCSS() { + try { + var query = "backend.php?op=dlg&id=customizeCSS"; + + if (dijit.byId("cssEditDlg")) + dijit.byId("cssEditDlg").destroyRecursive(); + + dialog = new dijit.Dialog({ + id: "cssEditDlg", + title: __("Customize stylesheet"), + style: "width: 600px", + execute: function() { + notify_progress('Saving data...', true); + new Ajax.Request("backend.php", { + parameters: dojo.objectToQuery(this.attr('value')), + onComplete: function(transport) { + notify(''); + window.location.reload(); + } }); + + }, + href: query}); + + dialog.show(); + + } catch (e) { + exception_error("customizeCSS", e); + } +} |