Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/websdk/static/js/wymeditor/skins/compact/skin.js
diff options
context:
space:
mode:
authorSebastian Silva <sebastian@sugarlabs.org>2011-09-28 00:19:33 (GMT)
committer Sebastian Silva <sebastian@sugarlabs.org>2011-09-28 06:54:34 (GMT)
commit5861585e94a32b3032ac473804bf90c6e1363940 (patch)
treefb3a5bab0d75bf8eb780e749737fea87369754db /websdk/static/js/wymeditor/skins/compact/skin.js
parentbe7aa93d7ba3682d5189e1a7d72169c0b02a1ec1 (diff)
Migrated to Flask, added JQuery sugar theme, fixed race condition
Diffstat (limited to 'websdk/static/js/wymeditor/skins/compact/skin.js')
-rw-r--r--websdk/static/js/wymeditor/skins/compact/skin.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/websdk/static/js/wymeditor/skins/compact/skin.js b/websdk/static/js/wymeditor/skins/compact/skin.js
new file mode 100644
index 0000000..cfb7cc1
--- /dev/null
+++ b/websdk/static/js/wymeditor/skins/compact/skin.js
@@ -0,0 +1,35 @@
+WYMeditor.SKINS['compact'] = {
+
+ init: function(wym) {
+
+ //move the containers panel to the top area
+ jQuery(wym._options.containersSelector + ', '
+ + wym._options.classesSelector, wym._box)
+ .appendTo( jQuery("div.wym_area_top", wym._box) )
+ .addClass("wym_dropdown")
+ .css({"margin-right": "10px", "width": "120px", "float": "left"});
+
+ //render following sections as buttons
+ jQuery(wym._options.toolsSelector, wym._box)
+ .addClass("wym_buttons")
+ .css({"margin-right": "10px", "float": "left"});
+
+ //make hover work under IE < 7
+ jQuery(".wym_section", wym._box).hover(function(){
+ jQuery(this).addClass("hover");
+ },function(){
+ jQuery(this).removeClass("hover");
+ });
+
+ var postInit = wym._options.postInit;
+ wym._options.postInit = function(wym) {
+
+ if(postInit) postInit.call(wym, wym);
+ var rule = {
+ name: 'body',
+ css: 'background-color: #f0f0f0;'
+ };
+ wym.addCssRule( wym._doc.styleSheets[0], rule);
+ };
+ }
+};