
/**************************************
    Webutler V3.0 - www.webutler.de
    Copyright (c) 2008 - 2014
    Autor: Sven Zinke
    Free for any use
    Lizenz: GPL
**************************************/

(function()
{CKEDITOR.scriptLoader.load(CKEDITOR.plugins.getPath('formsendto')+'dialogs/sendtos.php');CKEDITOR.plugins.add('formsendto',{lang:[CKEDITOR.lang.detect(CKEDITOR.config.language)],init:function(editor)
{CKEDITOR.addCss('img.cke_sendtofield {'+'  background-image: url('+CKEDITOR.getUrl(this.path+'sendto.png')+');'+'    background-position: center center;'+'    background-repeat: no-repeat;'+'    border: 1px solid #a9a9a9;'+'    width: 16px;'+'    height: 16px;'+'}');editor.addCommand('formsendto',new CKEDITOR.dialogCommand('formsendto'));editor.on('doubleclick',function(evt)
{var element=evt.data.element;if(element&&element.data('cke-real-element-type')=='sendtofield'&&element.hasClass('cke_sendtofield'))
evt.data.dialog='formsendto';else
return null;});if(editor.addMenuItems)
{editor.addMenuItems({sendtofield:{label:editor.lang.formsendto.properties,icon:this.path+'sendto.png',command:'formsendto',group:'sendtofield'}});}
if(editor.contextMenu)
{editor.contextMenu.addListener(function(element,selection)
{if(element&&element.data('cke-real-element-type')=='sendtofield'&&element.hasClass('cke_sendtofield'))
return{sendtofield:CKEDITOR.TRISTATE_OFF};else
return null;});}
CKEDITOR.dialog.add('formsendto',this.path+'dialogs/formsendto.js');var dataProcessor=editor.dataProcessor,dataFilter=dataProcessor&&dataProcessor.dataFilter;if(dataFilter)
{dataFilter.addRules({elements:{input:function(element)
{if(element.attributes.type=='hidden'&&element.attributes.name=='sendto')
return editor.createFakeParserElement(element,'cke_sendtofield','sendtofield',false);}}},{applyToAll:true});}},requires:['dialog','fakeobjects']});})();