OSDN Git Service

replace openWYSIWYG -> WYMeditor
[feedblog/feedgenerator.git] / wymeditor / skins / twopanels / skin.js
1 WYMeditor.SKINS['twopanels'] = {
2
3     init: function(wym) {
4     
5         //move the containers panel to the left area
6         jQuery(wym._box).find(wym._options.containersSelector)
7           .appendTo("div.wym_area_left");
8
9         //render following sections as panels
10         jQuery(wym._box).find(wym._options.classesSelector + ', '
11           + wym._options.containersSelector)
12           .addClass("wym_panel");
13
14         //render following sections as buttons
15         jQuery(wym._box).find(wym._options.toolsSelector)
16           .addClass("wym_buttons");
17
18         // auto add some margin to the main area sides if left area
19         // or right area are not empty (if they contain sections)
20         jQuery(wym._box).find("div.wym_area_right ul")
21           .parents("div.wym_area_right").show()
22           .parents(wym._options.boxSelector)
23           .find("div.wym_area_main")
24           .css({"margin-right": "155px"});
25
26         jQuery(wym._box).find("div.wym_area_left ul")
27           .parents("div.wym_area_left").show()
28           .parents(wym._options.boxSelector)
29           .find("div.wym_area_main")
30           .css({"margin-left": "115px"});
31
32         //make hover work under IE < 7
33         jQuery(wym._box).find(".wym_section").hover(function(){
34           jQuery(this).addClass("hover");
35         },function(){
36           jQuery(this).removeClass("hover");
37         });
38     }
39 };