Sha256: 4078c0beb891563bd40dc03e3c4247b67c6dce203482b7fd20655ac6b7525551

Contents?: true

Size: 1.98 KB

Versions: 31

Compression:

Stored size: 1.98 KB

Contents

/* This file is part of the Silver skin for WYMeditor by Scott Edwin Lewis */

jQuery.fn.selectify = function() {
    return this.each(function() {
        jQuery(this).hover(
            function() {
                jQuery("h2", this).css("background-position", "0px -18px"); 
                jQuery("ul", this).fadeIn("fast");
            },
		    function() {
		        jQuery("h2", this).css("background-position", ""); 
		        jQuery("ul", this).fadeOut("fast");
		    }
        );
    });
};

WYMeditor.SKINS['silver'] = {

    init: function(wym) {

        //add some elements to improve the rendering
        jQuery(wym._box)
          .append('<div class="clear"></div>')
          .wrapInner('<div class="wym_inner"></div>');

        //render following sections as panels
        jQuery(wym._box).find(wym._options.classesSelector)
          .addClass("wym_panel");

        //render following sections as buttons
        jQuery(wym._box).find(wym._options.toolsSelector)
          .addClass("wym_buttons");

        //render following sections as dropdown menus
        jQuery(wym._box).find(wym._options.containersSelector)
          .addClass("wym_dropdown")
          .selectify();

        // auto add some margin to the main area sides if left area
        // or right area are not empty (if they contain sections)
        jQuery(wym._box).find("div.wym_area_right ul")
          .parents("div.wym_area_right").show()
          .parents(wym._options.boxSelector)
          .find("div.wym_area_main")
          .css({"margin-right": "155px"});

        jQuery(wym._box).find("div.wym_area_left ul")
          .parents("div.wym_area_left").show()
          .parents(wym._options.boxSelector)
          .find("div.wym_area_main")
          .css({"margin-left": "155px"});

        //make hover work under IE < 7
        jQuery(wym._box).find(".wym_section").hover(function(){
          jQuery(this).addClass("hover");
        },function(){
          jQuery(this).removeClass("hover");
        });
    }
};

Version data entries

31 entries across 31 versions & 10 rubygems

Version Path
coalla-cms-0.4.2.0 lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/skin.js
coalla-cms-0.4.4.3 lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/skin.js
wymeditor-simple_form-0.0.5 vendor/assets/wymeditor/wymeditor/skins/silver/skin.js
milksteak-0.0.15 lib/public/milksteak/wymeditor/skins/silver/skin.js
wymeditor-simple_form-0.0.4 vendor/assets/wymeditor/wymeditor/skins/silver/skin.js
wymeditor-simple_form-0.0.2 vendor/assets/wymeditor/skins/silver/skin.js
wymeditor-simple_form-0.0.1 vendor/assets/wymeditor/skins/silver/skin.js
milksteak-0.0.13 lib/public/milksteak/wymeditor/skins/silver/skin.js
milksteak-0.0.12 lib/public/milksteak/wymeditor/skins/silver/skin.js
milksteak-0.0.11 lib/public/milksteak/wymeditor/skins/silver/skin.js
milksteak-0.0.10 lib/public/milksteak/wymeditor/skins/silver/skin.js
milksteak-0.0.9 lib/public/milksteak/wymeditor/skins/silver/skin.js
milksteak-0.0.8 lib/public/milksteak/wymeditor/skins/silver/skin.js
milksteak-0.0.7 lib/public/milksteak/wymeditor/skins/silver/skin.js
milksteak-0.0.6 lib/public/milksteak/wymeditor/skins/silver/skin.js
milksteak-0.0.4 lib/public/milksteak/wymeditor/skins/silver/skin.js
milksteak-0.0.3 lib/public/milksteak/wymeditor/skins/silver/skin.js
milksteak-0.0.2 lib/public/milksteak/wymeditor/skins/silver/skin.js
spud_admin-0.2.0 app/assets/javascripts/wymeditor/skins/silver/skin.js
comatose-rubyisbeautiful-3.0.5 public/javascripts/wymeditor/skins/silver/skin.js