/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
/* This file is part of version 0.96beta2 released Fri, 20 Mar 2009 11:01:14 +0100 */
function CreateLink(c){this.editor=c;var a=c.config;var b=this;c.config.btnList.createlink[3]=function(){b.show(b._getSelectedAnchor())}}CreateLink._pluginInfo={name:"CreateLink",origin:"Xinha Core",version:"$LastChangedRevision: 1084 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/trunk/modules/CreateLink/link.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};CreateLink.prototype._lc=function(a){return Xinha._lc(a,"Xinha")};CreateLink.prototype.onGenerateOnce=function(){CreateLink.loadAssets()};CreateLink.loadAssets=function(){var self=CreateLink;if(self.loading){return}self.loading=true;Xinha._getback(_editor_url+"modules/CreateLink/dialog.html",function(getback){self.html=getback;self.dialogReady=true});Xinha._getback(_editor_url+"modules/CreateLink/pluginMethods.js",function(getback){eval(getback);self.methodsReady=true})};CreateLink.prototype.onUpdateToolbar=function(){if(!(CreateLink.dialogReady&&CreateLink.methodsReady)){this.editor._toolbarObjects.createlink.state("enabled",false)}else{this.onUpdateToolbar=null}};CreateLink.prototype.prepareDialog=function(){var a=this;var c=this.editor;var b=this.dialog=new Xinha.Dialog(c,CreateLink.html,"Xinha",{width:400});b.getElementById("ok").onclick=function(){a.apply()};b.getElementById("cancel").onclick=function(){a.dialog.hide()};if(!c.config.makeLinkShowsTarget){b.getElementById("f_target_label").style.visibility="hidden";b.getElementById("f_target").style.visibility="hidden";b.getElementById("f_other_target").style.visibility="hidden"}b.getElementById("f_target").onchange=function(){var d=b.getElementById("f_other_target");if(this.value=="_other"){d.style.visibility="visible";d.select();d.focus()}else{d.style.visibility="hidden"}};this.dialogReady=true};