/static/wymeditor/skins/galaxy/skin.js

https://bitbucket.org/cistrome/cistrome-harvard/ · JavaScript · 35 lines · 26 code · 6 blank · 3 comment · 1 complexity · 6cb70465c20402147bf0e19351e1d1c4 MD5 · raw file

  1. WYMeditor.SKINS['galaxy'] = {
  2. init: function(wym) {
  3. //move the containers panel to the top area
  4. jQuery(wym._options.containersSelector + ', '
  5. + wym._options.classesSelector, wym._box)
  6. .appendTo( jQuery("div.wym_area_top", wym._box) )
  7. .addClass("wym_dropdown")
  8. .css({"margin-right": "10px", "width": "120px", "float": "left"});
  9. //render following sections as buttons
  10. jQuery(wym._options.toolsSelector, wym._box)
  11. .addClass("wym_buttons")
  12. .css({"margin-right": "10px", "float": "left"});
  13. //make hover work under IE < 7
  14. jQuery(".wym_section", wym._box).hover(function(){
  15. jQuery(this).addClass("hover");
  16. },function(){
  17. jQuery(this).removeClass("hover");
  18. });
  19. var postInit = wym._options.postInit;
  20. wym._options.postInit = function(wym) {
  21. if(postInit) postInit.call(wym, wym);
  22. var rule = {
  23. name: 'body',
  24. css: 'background-color: #f0f0f0;'
  25. };
  26. wym.addCssRule( wym._doc.styleSheets[0], rule);
  27. };
  28. }
  29. };