PageRenderTime 204ms CodeModel.GetById 47ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 41ms

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