Sha256: 3e571ad4ce04dd3f8b67d6b869a4418f06db375fdbb447d2b2ac005216296e71

Contents?: true

Size: 1.43 KB

Versions: 19

Compression:

Stored size: 1.43 KB

Contents

/*jslint evil: true */
/**
    WYMeditor.hovertools
    ====================

    A hovertools plugin.
*/

WYMeditor.editor.prototype.hovertools = function() {
    var wym = this;

    wym.status(' ');

    // Bind events on buttons
    jQuery(this._box).find(this._options.toolSelector).hover(
        function() {
            wym.status(jQuery(this).html());
        },
        function() {
            wym.status(' ');
        }
    );

    // Classes: add/remove a style attr to matching elems
    // while mouseover/mouseout
    jQuery(this._box).find(this._options.classSelector).hover(
        function() {
            var aClasses = eval(wym._options.classesItems);
            var sName = jQuery(this).attr(WYMeditor.NAME);
            var oClass = WYMeditor.Helper.findByName(aClasses, sName);

            if (oClass){
                jqexpr = oClass.expr;
                // Don't use jQuery.find() on the iframe body
                // because of MSIE + jQuery + expando issue (#JQ1143)
                if (!jQuery.browser.msie) {
                    jQuery(wym._doc).find(jqexpr).css('background-color','#cfc');
                }
            }
        },
        function() {
            // Don't use jQuery.find() on the iframe body
            // because of MSIE + jQuery + expando issue (#JQ1143)
            if (!jQuery.browser.msie) {
                jQuery(wym._doc).find('*').removeAttr('style');
            }
        }
    );
};

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
tandem-0.2.5 vendor/assets/javascripts/tandem/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
tandem-0.2.4 vendor/assets/javascripts/tandem/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
tandem-0.2.3 vendor/assets/javascripts/tandem/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
tandem-0.2.2 vendor/assets/javascripts/tandem/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
tandem-0.2.1 vendor/assets/javascripts/tandem/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
tandem-0.2.0 vendor/assets/javascripts/tandem/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.7.5 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.7.4 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.7.2 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.7.1 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.7.0 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.6.4 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.6.2 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.5.6 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.5.5 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.5.2 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.5.1 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.5.0 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
spud_core-0.4.0 app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js