Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/panel-dialog.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/panel-dialog.js,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/panel-dialog.js 24 Nov 2007 15:35:29 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/Dialogs/panel-dialog.js 16 May 2008 17:04:32 -0000 1.2.2.1 @@ -1,77 +1,51 @@ - -Xinha.PanelDialog = function(editor, side, html, localizer) -{ - this.id = { }; - this.r_id = { }; // reverse lookup id - this.editor = editor; - this.document = document; - this.rootElem = editor.addPanel(side); - - var dialog = this; - if(typeof localizer == 'function') - { - this._lc = localizer; - } - else if(localizer) - { - this._lc = function(string) - { - return Xinha._lc(string,localizer); - }; - } - else - { - this._lc = function(string) - { - return string; - }; - } - - html = html.replace(/\[([a-z0-9_]+)\]/ig, - function(fullString, id) - { - if(typeof dialog.id[id] == 'undefined') - { - dialog.id[id] = Xinha.uniq('Dialog'); - dialog.r_id[dialog.id[id]] = id; - } - return dialog.id[id]; - } - ).replace(/(.*?)<\/l10n>/ig, - function(fullString,translate) - { - return dialog._lc(translate) ; - } - ).replace(/="_\((.*?)\)"/g, - function(fullString, translate) - { - return '="' + dialog._lc(translate) + '"'; - } - ); - - this.rootElem.innerHTML = html; +/* 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.95 released Mon, 12 May 2008 17:33:15 +0200 */ +/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/Dialogs/panel-dialog.js */ +Xinha.PanelDialog=function(_1,_2,_3,_4){ +this.id={}; +this.r_id={}; +this.editor=_1; +this.document=document; +this.rootElem=_1.addPanel(_2); +var _5=this; +if(typeof _4=="function"){ +this._lc=_4; +}else{ +if(_4){ +this._lc=function(_6){ +return Xinha._lc(_6,_4); }; - -Xinha.PanelDialog.prototype.show = function(values) -{ - this.setValues(values); - this.editor.showPanel(this.rootElem); +}else{ +this._lc=function(_7){ +return _7; }; - -Xinha.PanelDialog.prototype.hide = function() -{ - this.editor.hidePanel(this.rootElem); - return this.getValues(); +} +} +_3=_3.replace(/\[([a-z0-9_]+)\]/ig,function(_8,id){ +if(typeof _5.id[id]=="undefined"){ +_5.id[id]=Xinha.uniq("Dialog"); +_5.r_id[_5.id[id]]=id; +} +return _5.id[id]; +}).replace(/(.*?)<\/l10n>/ig,function(_a,_b){ +return _5._lc(_b); +}).replace(/="_\((.*?)\)"/g,function(_c,_d){ +return "=\""+_5._lc(_d)+"\""; +}); +this.rootElem.innerHTML=_3; }; +Xinha.PanelDialog.prototype.show=function(_e){ +this.setValues(_e); +this.editor.showPanel(this.rootElem); +}; +Xinha.PanelDialog.prototype.hide=function(){ +this.editor.hidePanel(this.rootElem); +return this.getValues(); +}; +Xinha.PanelDialog.prototype.onresize=Xinha.Dialog.prototype.onresize; +Xinha.PanelDialog.prototype.toggle=Xinha.Dialog.prototype.toggle; +Xinha.PanelDialog.prototype.setValues=Xinha.Dialog.prototype.setValues; +Xinha.PanelDialog.prototype.getValues=Xinha.Dialog.prototype.getValues; +Xinha.PanelDialog.prototype.getElementById=Xinha.Dialog.prototype.getElementById; +Xinha.PanelDialog.prototype.getElementsByName=Xinha.Dialog.prototype.getElementsByName; -Xinha.PanelDialog.prototype.onresize = Xinha.Dialog.prototype.onresize; - -Xinha.PanelDialog.prototype.toggle = Xinha.Dialog.prototype.toggle; - -Xinha.PanelDialog.prototype.setValues = Xinha.Dialog.prototype.setValues; - -Xinha.PanelDialog.prototype.getValues = Xinha.Dialog.prototype.getValues; - -Xinha.PanelDialog.prototype.getElementById = Xinha.Dialog.prototype.getElementById; - -Xinha.PanelDialog.prototype.getElementsByName = Xinha.Dialog.prototype.getElementsByName; \ No newline at end of file