Sha256: 818a5758e96294f52e3ce3acb239c6f54d3ef57d2d737b9b566f821d5b053558
Contents?: true
Size: 1.6 KB
Versions: 1
Compression:
Stored size: 1.6 KB
Contents
/* * WYMeditor : what you see is What You Mean web-based editor * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * * For further information visit: * http://www.wymeditor.org/ * * File Name: * jquery.wymeditor.hovertools.js * hovertools plugin for WYMeditor * * File Authors: * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) */ //Extend WYMeditor WYMeditor.editor.prototype.hovertools = function() { var wym = this; //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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spree_static_content-0.30.0 | lib/generators/templates/public/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js |