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

(function()
{CKEDITOR.plugins.add('internpage',{lang:[CKEDITOR.lang.detect(CKEDITOR.config.language)]});CKEDITOR.scriptLoader.load(CKEDITOR.plugins.getPath('internpage')+'pages.php');CKEDITOR.on('dialogDefinition',function(ev)
{var dialogName=ev.data.name;var dialogDefinition=ev.data.definition;var editor=ev.editor;if(dialogName=='link')
{var infoTab=dialogDefinition.getContents('info');infoTab.add({type:'select',id:'intern',label:editor.lang.internpage.internpage,'default':'',style:'width:350px',items:InternPagesSelectBox,onChange:function()
{var d=CKEDITOR.dialog.getCurrent();d.setValueOf('info','url',this.getValue());d.setValueOf('info','protocol',!this.getValue()?'http://':'');},setup:function(data)
{this.allowOnChange=false;this.setValue(data.url?data.url.url:'');this.allowOnChange=true;}},'browse');dialogDefinition.onLoad=function()
{var internField=this.getContentElement('info','intern');internField.reset();};}});})();