| Server IP : 213.186.33.4 / Your IP : 216.73.216.193 Web Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : awebpaca ( 35430) PHP Version : 8.5.0 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/awebpaca/visitevirtuelle/components/com_jce/editor/tiny_mce/plugins/caption/ |
Upload File : |
/* Captions - 2.1.7 | 19 May 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 - http://www.gnu.org/licenses/gpl-2.0.html */
(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.CaptionPlugin',{init:function(ed,url){var t=this;t.ed=ed;function isCaption(n){return n&&ed.dom.getParent(n,'.mceItemCaption');}
ed.onInit.add(function(){if(!ed.settings.compress.css)
ed.dom.loadCSS(url+"/css/content.css");});ed.onSetContent.add(function(ed){var dom=ed.dom;each(dom.select('.jce_caption, .wf_caption',ed.getBody()),function(n){dom.addClass(n,'mceItemCaption');});});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;if(o.set){each(dom.select('.jce_caption, .wf_caption',o.node),function(n){dom.addClass(n,'mceItemCaption');});}
if(o.get){each(dom.select('.mceCaption',o.node),function(n){dom.removeClass(n,'mceItemCaption');});}
each(dom.select('.jce_caption, .wf_caption',o.node),function(n){var w=0;each(n.childNodes,function(c){if(c.nodeName==="IMG"){w=c.getAttribute('width')||c.width;}
if(c.nodeName==="SPAN"){if(c.style.width){c.style.maxWidth=c.style.width;c.style.width='';}}});if(w){var x=0,w=parseInt(w);each(['margin-right','margin-left','padding-right','padding-left'],function(s){x+=parseInt(dom.getStyle(n,s));});n.style.maxWidth=w+'px';}
try{dom.setStyle(n,'display','inherit');}catch(e){}});});ed.addCommand('mceCaption',function(){var se=ed.selection,n=se.getNode(),p=ed.dom.getParent(n,'.mceItemCaption');if((n.nodeName==='SPAN'&&p)||n===p){n=ed.dom.select('img',p)[0];}
if(n.nodeName!=='IMG'){return false;}
ed.dom.select(n);ed.windowManager.open({file:ed.getParam('site_url')+'index.php?option=com_jce&view=editor&layout=plugin&plugin=caption',width:530+ed.getLang('caption.delta_width',0),height:540+ed.getLang('caption.delta_height',0),inline:1,popup_css:false},{plugin_url:url});});ed.addCommand('mceCaptionDelete',function(){var c,m,f,a,se=ed.selection,n=se.getNode();c=ed.dom.getParent(n,'.mceItemCaption');if(c){tinymce.each(ed.dom.select('img',c),function(o){tinymce.each(['top','right','bottom','left'],function(s){m=ed.dom.getStyle(c,'margin-'+s);ed.dom.setStyle(o,'margin-'+s,m);});f=ed.dom.getStyle(c,'float');if(f){ed.dom.setStyle(o,'float',f);}
a=ed.dom.getStyle(c,'text-align');if(a){ed.dom.setStyle(o,'float',a);}});ed.dom.remove(ed.dom.select('span, div',c));ed.dom.remove(c,true);}});ed.addButton('caption_add',{title:'caption.desc',cmd:'mceCaption',image:url+'/img/caption_add.png'});ed.addButton('caption_delete',{title:'caption.delete',cmd:'mceCaptionDelete',image:url+'/img/caption_delete.png'});ed.onNodeChange.add(function(ed,cm,n,co){var s=isCaption(n);cm.setDisabled('formatselect',s);cm.setDisabled('blockquote',s);cm.setActive('caption_delete',s);cm.setActive('caption_add',s);cm.setDisabled('caption_add',!s);cm.setDisabled('caption_delete',!s);if(!s&&n.nodeName=='IMG'){cm.setDisabled('caption_add',false);}
if(s){if(tinymce.isIE&&document.documentMode>=9){if(n.nodeName=='IMG'){ed.selection.select(n);}}}});},getInfo:function(){return{longname:'Caption',author:'Ryan Demmer',authorurl:'http://www.joomlacontenteditor.net',infourl:'http://www.joomlacontenteditor.net',version:'2.1.7'};}});tinymce.PluginManager.add('caption',tinymce.plugins.CaptionPlugin);})();