(function(){fcmsJs.Class('fcmsLib_Utils_Autogrow').inherits(fcmsLib_Core_Class);if(typeof jQuery!=='undefined'){(function($){fcmsLib_Utils_Autogrow.construct(function(e){this.element=e;var $this=$(e),minHeight=$this.height(),lineHeight=$this.css('lineHeight');var shadow=$('
').css({position:'absolute',top:-10000,left:-10000,width:$this.width(),fontSize:$this.css('fontSize'),fontFamily:$this.css('fontFamily'),lineHeight:$this.css('lineHeight'),resize:'none'}).appendTo(document.body);var update=function(){var val=$(e).val().replace(//g,'>').replace(/&/g,'&').replace(/\n/g,'
');shadow.html(val);$(e).css('overflow','hidden');$(e).css('height',Math.max(shadow.height()+20,minHeight));};$(e).change(update).keyup(update).keydown(update);update.apply(e);});})(jQuery);}else{fcmsLib_Utils_Autogrow.construct(function(e){fcmsJs.console.error('fcmsLib_Utils_Autogrow benötigt jQuery!');});}})();fcmsLib_Core_DataMethods.register('autogrow',{func:function(e){try{e.each(function(i){var x=new fcmsLib_Utils_Autogrow(i);});}catch(err){fcmsJs.console.error(err);}}});(function(){fcmsJs.Class('fcmsLib_Utils_ClientStore').inherits(fcmsLib_Core_Class).construct(function(name){Persist.remove('cookies');Persist.remove('ie');Persist.remove('flash');this._persist=new Persist.Store(name);}).method('set',function(key,value){this._persist.set(key,value);}).method('get',function(key,callback){this._persist.get(key,callback);}).method('info',function(){return['Backend: ',Persist.type||'none',', ','Approximate Size Limit: ',(Persist.size<0)?'unknown':Persist.size].join('');});})();(function(){fcmsJs.Class('fcmsLib_Utils_Html_Infobox').inherits(fcmsLib_Core_Class).construct(function(name,title,text){var x=document.createElement('div');x.id='helpBox'+name;$(x).setStyle({display:'none'});document.body.appendChild(x);this.name=name;this.title=title;this.text=text;this._template=new fcmsLib_Utils_Pure_Template('helpBoxTemplate','helpBox'+name,{'@id':'"helpBox'+name+'"','.headline span':'title','.infotext':'text'});}).method('display',function(){this._template.render({name:this.name,title:this.title,text:this.text});}).method('show',function(button){var position=$(button).cumulativeOffset();$('helpBox'+this.name).setStyle({top:parseInt(position.top,10)+'px',left:parseInt(position.left,10)-250+'px'});$('helpBox'+this.name).show();$('helpBox'+this.name).observe('click',function(ev){$('helpBox'+this.name).hide();}.bind(this));});})();(function(){fcmsJs.Class('fcmsLib_Utils_Html_ToggleMenu').inherits(fcmsLib_Core_Class).construct(function(domId){this._ids=[];this._domId=domId;$(domId).select('*[data-fcms-toggle]').each(function(elem){this._ids.push(elem.getAttribute('data-fcms-toggle'));elem.observe('click',this._click.curry(elem).bind(this));}.bind(this));}).method('_click',function(elem,ev){this._ids.each(function(i){if($(i)){if(i===elem.getAttribute('data-fcms-toggle')){$(i).toggle();}else{$(i).hide();}}else{var sub=$(this._domId).down('*[data-fcms-domid='+i+']');if(sub){if(i===elem.getAttribute('data-fcms-toggle')){$(sub).toggle();}else{$(sub).hide();}}else{fcmsJs.console.error('Fehler beim toggeln des Menüs ('+i+')');}}}.bind(this));$(this._domId).select('*[data-fCMS-toggle]').each(function(e){if(e.getAttribute('data-fCMS-toggle')===elem.getAttribute('data-fCMS-toggle')){e.addClassName('active');}else{e.removeClassName('active');}}.bind(this));}).method('hideAll',function(){this._ids.each(function(i){$(i).hide();});$(this._domId).select('*[data-fCMS-toggle]').each(function(elem){elem.removeClassName('active');}.bind(this));});fcmsLib_Utils_Html_ToggleMenu.attach=function(domId){var ret=[];$(domId).select('*[data-fCMS-method=makeSimpleMenu]').each(function(m){ret.push(new fcmsLib_Utils_Html_ToggleMenu(m));});return ret;};fcmsLib_Core_DataMethods.register('toggleMenu',function(node){var menu=new fcmsLib_Utils_Html_ToggleMenu(node);});})();(function(){fcmsJs.Class('fcmsLib_Utils_Html').inherits(fcmsLib_Core_Class);fcmsLib_Utils_Html.parseStyle=function(str){var attributes={};str.split(';').each(function(p){if(p.indexOf(':')!==-1){var t=p.split(':');attributes[fcmsLib_Utils_String.trim(t[0])]=fcmsLib_Utils_String.trim(t[1]);}});return attributes;};fcmsLib_Utils_Html.toStyleString=function(hash){var ret='';$H(hash).each(function(pair){ret+=pair.key+': '+pair.value+';';});return ret;};fcmsLib_Utils_Html.removeUnit=function(i){if(i.indexOf('px')!==-1){return i.slice(0,i.indexOf('px'));} return i;};fcmsLib_Utils_Html.method('replaceContent',(function(elemid,content){var elem=$(elemid);var tmpspan;var currentElement=null;var oldwrite=document.write;var oldwriteln=document.writeln;document.write=function(input){var tmpdiv=document.createElement('div');tmpdiv.innerHTML=input;for(var t=0;t]*>([\s\S]*?)<\/script>/igm,'').replace(/]*>([\s\S]*?)<\/noscript>/igm,'');} while(elem.hasChildNodes()){elem.removeChild(elem.firstChild);} if(tmpspan){while(tmpspan.hasChildNodes()){elem.appendChild(tmpspan.firstChild);} this.addScripts(elem,content);if(typeof fcmsLib_Core_DataMethods==='function'){fcmsLib_Core_DataMethods.attachHandlers(elem);}}}}));fcmsLib_Utils_Html.method('addScripts',(function(container,editor){var sregexp=/]*?)>([\s\S]*?)<\/script>/img;var scripts;while(scripts=sregexp.exec(editor)){var newscript=document.createElement("script");newscript.type="text/javascript";newscript.text=scripts[2];var attribs;if(attribs=scripts[1].match(/([a-zA-Z]*)="([^"]*)"/g)){attribs.each(function(a){var att=/([a-zA-Z]*)="([^"]*)"/.exec(a);newscript[att[1]]=att[2];});} container.appendChild(newscript);}}));fcmsLib_Utils_Html.staticMethod('_getSingleton',function(method,func){if(typeof this._singleton!=='object'){this._singleton=new this();} return this._singleton;});fcmsLib_Utils_Html.staticMethod('replaceContent',function(method,func){this._getSingleton().replaceContent(method,func);});fcmsLib_Utils_Html.staticMethod('addScripts',function(method,func){this._getSingleton().addScripts(method,func);});})();(function(){fcmsJs.Class('fcmsLib_Utils_LocationHash_Observer').inherits(fcmsLib_Core_Observer).construct(function(){this._handlers=[];this._previousHash=window.location.hash;this._timerInterval=500;if('onhashchange'in window){Event.observe(window,'hashchange',function(){this.notify();}.bind(this));fcmsJs.console.debug('onhashchange-Event wird unterstützt');}else{this._activateTimer();fcmsJs.console.debug('onhashchange-Event wird nicht unterstützt');}}).method('_activateTimer',function(){window.setInterval(function(){var currentHash=window.location.hash;if(this._previousHash!==currentHash){this.notify();} this._previousHash=currentHash;}.bind(this),this._timerInterval);});})();(function(){fcmsJs.Class('fcmsLib_Utils_LocationHash_Parser').construct(function(hash){fcmsJs.console.enable();if(typeof hash==='undefined'){this._hash=window.location.hash;}else{this._hash=hash;} this._pairs={};this._parse();fcmsJs.console.debug(this._pairs);}).method('_parse',function(){if(this._hash==''||this._hash=='#') {this._pairs={};}else{var arr=[];var tmp;tmp=this._hash.split('/');for(var i in tmp){if(tmp[i]!==''&&tmp[i]!=='#'){arr.push(tmp[i]);}} for(var j in arr){if(typeof arr[j]==='string'){tmp=arr[j].split('=');if(tmp.size()===2){this._pairs[tmp[0]]=tmp[1];}}}}}).method('get',function(key){if(typeof this._pairs[key]!=='undefined'){return this._pairs[key];} return false;}).method('set',function(key,value){this._pairs[key]=value;this._refreshHash();}).method('remove',function(key){delete this._pairs[key];this._refreshHash();}).method('_refreshHash',function(){var hash='';var arr=[];for(var key in this._pairs){if(typeof this._pairs[key]!=='function'){arr.push(key+'='+this._pairs[key]);}} if(arr.length>0){hash='/'+arr.join('/')+'/';} window.location.hash=hash;});})();(function(){function array(n){for(i=0;i=0){a=a%0x80000000;a>>=b;a+=0x40000000>>(b-1);}else a>>=b;return a;} function fCMSmd5_shl1(a){a=a%0x80000000;if(a&0x40000000==0x40000000) {a-=0x40000000;a*=2;a+=0x80000000;}else a*=2;return a;} function fCMSmd5_shl(a,b){a=integer(a);b=integer(b);for(var i=0;i=0) if(t2>=0) return((t1&t2)+0x80000000);else return(t1&b);else if(t2>=0) return(a&t2);else return(a&b);} function fCMSmd5_or(a,b){a=integer(a);b=integer(b);var t1=(a-0x80000000);var t2=(b-0x80000000);if(t1>=0) if(t2>=0) return((t1|t2)+0x80000000);else return((t1|b)+0x80000000);else if(t2>=0) return((a|t2)+0x80000000);else return(a|b);} function fCMSmd5_xor(a,b){a=integer(a);b=integer(b);var t1=(a-0x80000000);var t2=(b-0x80000000);if(t1>=0) if(t2>=0) return(t1^t2);else return((t1^b)+0x80000000);else if(t2>=0) return((a^t2)+0x80000000);else return(a^b);} function fCMSmd5_not(a){a=integer(a);return(0xffffffff-a);} var state=new array(4);var count=new array(2);count[0]=0;count[1]=0;var buffer=new array(64);var transformBuffer=new array(16);var digestBits=new array(16);var S11=7;var S12=12;var S13=17;var S14=22;var S21=5;var S22=9;var S23=14;var S24=20;var S31=4;var S32=11;var S33=16;var S34=23;var S41=6;var S42=10;var S43=15;var S44=21;function fCMSmd5_F(x,y,z){return fCMSmd5_or(fCMSmd5_and(x,y),fCMSmd5_and(fCMSmd5_not(x),z));} function fCMSmd5_G(x,y,z){return fCMSmd5_or(fCMSmd5_and(x,z),fCMSmd5_and(y,fCMSmd5_not(z)));} function fCMSmd5_H(x,y,z){return fCMSmd5_xor(fCMSmd5_xor(x,y),z);} function fCMSmd5_I(x,y,z){return fCMSmd5_xor(y,fCMSmd5_or(x,fCMSmd5_not(z)));} function fCMSmd5_rotateLeft(a,n){return fCMSmd5_or(fCMSmd5_shl(a,n),(fCMSmd5_shr(a,(32-n))));} function fCMSmd5_FF(a,b,c,d,x,s,ac){a=a+fCMSmd5_F(b,c,d)+x+ac;a=fCMSmd5_rotateLeft(a,s);a=a+b;return a;} function fCMSmd5_GG(a,b,c,d,x,s,ac){a=a+fCMSmd5_G(b,c,d)+x+ac;a=fCMSmd5_rotateLeft(a,s);a=a+b;return a;} function fCMSmd5_HH(a,b,c,d,x,s,ac){a=a+fCMSmd5_H(b,c,d)+x+ac;a=fCMSmd5_rotateLeft(a,s);a=a+b;return a;} function fCMSmd5_II(a,b,c,d,x,s,ac){a=a+fCMSmd5_I(b,c,d)+x+ac;a=fCMSmd5_rotateLeft(a,s);a=a+b;return a;} function fCMSmd5_transform(buf,offset){var a=0,b=0,c=0,d=0;var x=transformBuffer;a=state[0];b=state[1];c=state[2];d=state[3];for(i=0;i<16;i++){x[i]=fCMSmd5_and(buf[i*4+offset],0xff);for(j=1;j<4;j++){x[i]+=fCMSmd5_shl(fCMSmd5_and(buf[i*4+j+offset],0xff),j*8);}} a=fCMSmd5_FF(a,b,c,d,x[0],S11,0xd76aa478);d=fCMSmd5_FF(d,a,b,c,x[1],S12,0xe8c7b756);c=fCMSmd5_FF(c,d,a,b,x[2],S13,0x242070db);b=fCMSmd5_FF(b,c,d,a,x[3],S14,0xc1bdceee);a=fCMSmd5_FF(a,b,c,d,x[4],S11,0xf57c0faf);d=fCMSmd5_FF(d,a,b,c,x[5],S12,0x4787c62a);c=fCMSmd5_FF(c,d,a,b,x[6],S13,0xa8304613);b=fCMSmd5_FF(b,c,d,a,x[7],S14,0xfd469501);a=fCMSmd5_FF(a,b,c,d,x[8],S11,0x698098d8);d=fCMSmd5_FF(d,a,b,c,x[9],S12,0x8b44f7af);c=fCMSmd5_FF(c,d,a,b,x[10],S13,0xffff5bb1);b=fCMSmd5_FF(b,c,d,a,x[11],S14,0x895cd7be);a=fCMSmd5_FF(a,b,c,d,x[12],S11,0x6b901122);d=fCMSmd5_FF(d,a,b,c,x[13],S12,0xfd987193);c=fCMSmd5_FF(c,d,a,b,x[14],S13,0xa679438e);b=fCMSmd5_FF(b,c,d,a,x[15],S14,0x49b40821);a=fCMSmd5_GG(a,b,c,d,x[1],S21,0xf61e2562);d=fCMSmd5_GG(d,a,b,c,x[6],S22,0xc040b340);c=fCMSmd5_GG(c,d,a,b,x[11],S23,0x265e5a51);b=fCMSmd5_GG(b,c,d,a,x[0],S24,0xe9b6c7aa);a=fCMSmd5_GG(a,b,c,d,x[5],S21,0xd62f105d);d=fCMSmd5_GG(d,a,b,c,x[10],S22,0x2441453);c=fCMSmd5_GG(c,d,a,b,x[15],S23,0xd8a1e681);b=fCMSmd5_GG(b,c,d,a,x[4],S24,0xe7d3fbc8);a=fCMSmd5_GG(a,b,c,d,x[9],S21,0x21e1cde6);d=fCMSmd5_GG(d,a,b,c,x[14],S22,0xc33707d6);c=fCMSmd5_GG(c,d,a,b,x[3],S23,0xf4d50d87);b=fCMSmd5_GG(b,c,d,a,x[8],S24,0x455a14ed);a=fCMSmd5_GG(a,b,c,d,x[13],S21,0xa9e3e905);d=fCMSmd5_GG(d,a,b,c,x[2],S22,0xfcefa3f8);c=fCMSmd5_GG(c,d,a,b,x[7],S23,0x676f02d9);b=fCMSmd5_GG(b,c,d,a,x[12],S24,0x8d2a4c8a);a=fCMSmd5_HH(a,b,c,d,x[5],S31,0xfffa3942);d=fCMSmd5_HH(d,a,b,c,x[8],S32,0x8771f681);c=fCMSmd5_HH(c,d,a,b,x[11],S33,0x6d9d6122);b=fCMSmd5_HH(b,c,d,a,x[14],S34,0xfde5380c);a=fCMSmd5_HH(a,b,c,d,x[1],S31,0xa4beea44);d=fCMSmd5_HH(d,a,b,c,x[4],S32,0x4bdecfa9);c=fCMSmd5_HH(c,d,a,b,x[7],S33,0xf6bb4b60);b=fCMSmd5_HH(b,c,d,a,x[10],S34,0xbebfbc70);a=fCMSmd5_HH(a,b,c,d,x[13],S31,0x289b7ec6);d=fCMSmd5_HH(d,a,b,c,x[0],S32,0xeaa127fa);c=fCMSmd5_HH(c,d,a,b,x[3],S33,0xd4ef3085);b=fCMSmd5_HH(b,c,d,a,x[6],S34,0x4881d05);a=fCMSmd5_HH(a,b,c,d,x[9],S31,0xd9d4d039);d=fCMSmd5_HH(d,a,b,c,x[12],S32,0xe6db99e5);c=fCMSmd5_HH(c,d,a,b,x[15],S33,0x1fa27cf8);b=fCMSmd5_HH(b,c,d,a,x[2],S34,0xc4ac5665);a=fCMSmd5_II(a,b,c,d,x[0],S41,0xf4292244);d=fCMSmd5_II(d,a,b,c,x[7],S42,0x432aff97);c=fCMSmd5_II(c,d,a,b,x[14],S43,0xab9423a7);b=fCMSmd5_II(b,c,d,a,x[5],S44,0xfc93a039);a=fCMSmd5_II(a,b,c,d,x[12],S41,0x655b59c3);d=fCMSmd5_II(d,a,b,c,x[3],S42,0x8f0ccc92);c=fCMSmd5_II(c,d,a,b,x[10],S43,0xffeff47d);b=fCMSmd5_II(b,c,d,a,x[1],S44,0x85845dd1);a=fCMSmd5_II(a,b,c,d,x[8],S41,0x6fa87e4f);d=fCMSmd5_II(d,a,b,c,x[15],S42,0xfe2ce6e0);c=fCMSmd5_II(c,d,a,b,x[6],S43,0xa3014314);b=fCMSmd5_II(b,c,d,a,x[13],S44,0x4e0811a1);a=fCMSmd5_II(a,b,c,d,x[4],S41,0xf7537e82);d=fCMSmd5_II(d,a,b,c,x[11],S42,0xbd3af235);c=fCMSmd5_II(c,d,a,b,x[2],S43,0x2ad7d2bb);b=fCMSmd5_II(b,c,d,a,x[9],S44,0xeb86d391);state[0]+=a;state[1]+=b;state[2]+=c;state[3]+=d;} function fCMSmd5_init(){count[0]=count[1]=0;state[0]=0x67452301;state[1]=0xefcdab89;state[2]=0x98badcfe;state[3]=0x10325476;for(i=0;i=63){fCMSmd5_transform(buffer,0);}} function fCMSmd5_finish(){var bits=new array(8);var padding;var i=0,index=0,padLen=0;for(i=0;i<4;i++){bits[i]=fCMSmd5_and(fCMSmd5_shr(count[0],(i*8)),0xff);} for(i=0;i<4;i++){bits[i+4]=fCMSmd5_and(fCMSmd5_shr(count[1],(i*8)),0xff);} index=fCMSmd5_and(fCMSmd5_shr(count[0],3),0x3f);padLen=(index<56)?(56-index):(120-index);padding=new array(64);padding[0]=0x80;for(i=0;i?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";fcmsJs.md5=function MD5(entree){var l,s,k,ka,kb,kc,kd;fCMSmd5_init();for(k=0;k0){this.display('Bitte korrigieren Sie folgende Fehler und versuchen es erneut:',response.responseJSON.issues);}else if(response.responseJSON.messages.length>0){this.display('Bitte korrigieren Sie folgende Fehler und versuchen es erneut:',response.responseJSON.messages);}}catch(e){this.display(e.message,[e.description]);}}).method('hide',function(){$(this._editorId).hide();});})();(function(){fcmsJs.Class('fcmsLib_Utils_Message_InfoBar').inherits(fcmsLib_Core_Class).construct(function(domId,options){this._domId=domId;this._hideTimeout=5000;this.icons={ok:'/_/admin/pics/editor/icons/ok.png',running:'/_/admin/pics/editor/icons/info.gif'};fcmsJs.console.info(typeof options);if(typeof options==='object'){for(var i in options){if(options.hasOwnProperty(i)){this['_'+i]=options[i];}}}}).method('setIcons',function(icons){this.icons=fcmsLib_Core_Array.merge(this.icons,icons);fcmsJs.console.debug(this.icons);}).method('info',function(msg,hideTimeout){$(this._domId).removeClassName('warning');$(this._domId).select('img')[0].src=this.icons.ok;$(this._domId).select('.message')[0].innerHTML=msg;$(this._domId).setStyle({display:'block'});if(typeof hideTimeout!=='undefined'){fcmsJs.window.$.setTimeout(this.hide.bind(this),hideTimeout);return true;} if(this._hideTimeout>0){fcmsJs.window.$.setTimeout(this.hide.bind(this),this._hideTimeout);}}).method('hide',function(msg){fcmsJs.console.debug('Hide: '+this._domId);$(this._domId).hide();}).method('error',function(msg){$(this._domId).select('.message')[0].innerHTML=msg;$(this._domId).setStyle({display:'block'});$(this._domId).show();}).method('running',function(msg){$(this._domId).addClassName('warning');$(this._domId).select('img')[0].src=this.icons.running;$(this._domId).select('.message')[0].innerHTML=msg;$(this._domId).setStyle({display:'block'});$(this._domId).show();});})();(function(){var yesObserver=new fcmsLib_Core_Observer('yesObserve');var noObserver=new fcmsLib_Core_Observer('noObserve');fcmsJs.Class('fcmsLib_Utils_Message_Question').inherits(fcmsLib_Core_Class).construct(function(targetId,msg,onYes,onNo){this._templateId='submitcontentboxTemplate';this._targetId=targetId;this.rules={'message':'.message','yes':'.yes','no':'.no'};this._awnsered=false;this._onYes=onYes;this._onNo=onNo;this._msg=msg;}).method('display',function(styles){var rules={};rules[this.rules['message']]='msg';this._tpl=new fcmsLib_Utils_Pure_Template(this._templateId,this._targetId,rules);this._tpl.render({msg:this._msg});fcmsJs.shortcut.add('Enter',this.yes.bind(this),{preventDefault:false});fcmsJs.shortcut.add('Esc',this.no.bind(this),{preventDefault:false});$(this._targetId).setStyle(styles);$(this._targetId).setStyle({display:'block'});$(this._targetId).select('.yes')[0].observe('click',this.yes.bind(this));$(this._targetId).select('.no')[0].observe('click',this.no.bind(this));}).method('yes',function(){if(this._awnsered===false){this.hide();this._onYes();}}).method('hide',function(){$(this._targetId).hide();this._awnsered=true;}).method('no',function(){if(this._awnsered===false){this.hide();this._onNo();}});})();(function(){fcmsJs.Class('fcmsLib_Utils_Pure_List').inherits(fcmsLib_Core_Class).construct(function(domId,templateId,elementName,dir){var directive={};this._domId=domId;this._targetId=domId;this._templateId=templateId;this._elementName=elementName;directive['@id']=function(){return this._targetId;}.bind(this);directive['.item']={};directive['.item'][''+elementName+' <- elements']=dir;try{this._rule=$(this._templateId).compile(directive);directive['@id']=function(){return'';};this._subrule=$(this._templateId).compile(directive);}catch(e){fcmsJs.console.error('Fehler beim Pure-Compile des Templates '+this._templateId);fcmsJs.console.error(e);}}).method('render',function(data){if($(this._targetId)){$(this._targetId).render({elements:data},this._rule);}else{fcmsJs.console.error('DOM-ID: '+this._targetId+' existiert nicht.');}});})();(function(){function getSelected(id,model){var func='get'+id.substr(0,1).toUpperCase()+id.substr(1,id.length);if(typeof model[func]!=='undefined'){return model[func].apply(model);}else{return model.data[id];}} function setSelected(id,model,val){var func='set'+id.substr(0,1).toUpperCase()+id.substr(1,id.length);if(typeof model[func]!=='undefined'){model[func].apply(model,[val]);}else{model.data[id]=val;}} fcmsJs.Class('fcmsLib_Utils_Pure_Select').inherits(fcmsLib_Core_Class).construct(function(id,domId,model,options,callbacks){this._id=id;this._domId=domId;this._model=model;this._options=options;this._origValue=getSelected(id,model);this.callbacks=callbacks;if(typeof this.callbacks==='undefined'){this.callbacks={};}}).method('getSelected',function(){var r;if(typeof this.callbacks['getSelected']==='function'){r=this.callbacks['getSelected']();}else{var func='get'+this._id.substr(0,1).toUpperCase()+this._id.substr(1,this._id.length);if(typeof this._model[func]!=='undefined'){r=this._model[func]();}else{r=this._model.data[this._id];}} return r;}).method('setSelected',function(v){var val;if(v==='true'||v==='1'||v===true||v===''){val=true;}else if(v==='false'){val=false;}else{val=v;} if(typeof this.callbacks['setSelected']==='function'){return this.callbacks['setSelected'](val);} var func='set'+this._id.substr(0,1).toUpperCase()+this._id.substr(1,this._id.length);if(typeof this._model[func]!=='undefined'){this._model[func].apply(this._model,[val]);}else{this._model.data[this._id]=val;}}).method('observe',function(evt,func){$('selectbox_'+this._domId).observe(evt,func);$('selectbox_'+this._domId).observe("fcms:"+evt,func);return this;}).method('revert',function(){setSelected(this._id,this._model,this._origValue);var selected=this._origValue;$('selectbox_'+this._domId).select('span')[0].innerHTML=this._options[selected];$('selectbox_'+this._domId).select('select option[value="'+selected+'"]')[0].selected=true;}).method('enable',function(){this._disabled=false;$('selectbox_'+this._domId).removeClassName('disabled');try{$('selectbox_'+this._domId).down('select').disabled=false;}catch(e){}}).method('disable',function(){this._disabled=true;$('selectbox_'+this._domId).addClassName('disabled');try{$('selectbox_'+this._domId).down('select').disabled=true;}catch(e){}});fcmsLib_Utils_Pure_Select.makeButton=function(id,domId,model,options){function makeSelect(){var selected=getSelected(id,model),lastSelected=getSelected(id,model),selectedName=typeof options[selected]!=='undefined'?options[selected]:'Undefiniert',html=''+selectedName+''+'';$('selectbox_'+domId).innerHTML=html;if(typeof $('selectbox_'+domId).select('select option[value="'+selected+'"]')[0]!=='undefined'){$('selectbox_'+domId).select('select option[value="'+selected+'"]')[0].selected=true;} $('selectbox_'+domId).select('select')[0].observe('click',function(ev){if($('selectbox_'+domId).hasClassName('disabled')){fcmsJs.console.stop('asdf');Event.stop(ev);return false;} return true;});$('selectbox_'+domId).select('select')[0].observe('change',function(){if(!$('selectbox_'+domId).hasClassName('disabled')){$('selectbox_'+domId).select('span')[0].innerHTML=options[$F(this)];setSelected(id,model,$F(this));lastSelected=selected;selected=$F(this);$('selectbox_'+domId).fire('fcms:change');}});return new fcmsLib_Utils_Pure_Select(id,domId,model,options);} try{return makeSelect();}catch(e){fcmsJs.console.error(e);}};fcmsLib_Utils_Pure_Select.makeBooleanButton=function(id,domId,model,options,callbacks){function makeBooleanSelect(){var box=new fcmsLib_Utils_Pure_Select(id,domId,model,options,callbacks),selected=box.getSelected(),html='';if(typeof options[selected]==='undefined'){if(selected){selected='true';}else{selected='false';}} html=''+options[selected]+'';$('selectbox_'+domId).innerHTML=html;$('selectbox_'+domId).fire('fcms:change');$('selectbox_'+domId).select('span')[0].observe('click',function(){if(!$('selectbox_'+domId).hasClassName('disabled')){if(box.getSelected()){box.setSelected(false);}else{box.setSelected(true);} makeBooleanSelect();}});return box;} return makeBooleanSelect();};})();(function(){fcmsJs.Class('fcmsLib_Utils_Pure_Template').inherits(fcmsLib_Core_Class).construct(function(templateId,targetId,dir){this._templateId=templateId;this._targetId=targetId;if(!$(this._templateId)){fcmsJs.console.error('TemplateId '+this._templateId+' nicht gefunden.');} if(dir===null){this._rule=null;}else{dir['@id']=function(){if(typeof targetId==='string'){return targetId;}};this._rule=$(this._templateId).compile(dir);} this._directive=dir;this._renderMode='template';}).method('setRenderMode',function(mode){this._renderMode=mode;}).method('render',function(data){if(this._renderMode==='template'){if($(this._targetId)){if(this._rule===null){$(this._targetId).autoRender(data);}else{$(this._targetId).render(data,this._rule);}}else{fcmsJs.console.error('DOM-ID: '+this._targetId+' existiert nicht.');}}else if(this._renderMode==='update'){$(this._targetId).render(data,this._directive);}});})();(function(){fcmsJs.Class('fcmsLib_Utils_Pure_Util').inherits(fcmsLib_Core_Class);fcmsLib_Utils_Pure_Util.filterFormRules=function(rules){var r={};$H(rules).each(function(p){if(p.key.match(/input.*@value$/)){if(typeof p.value==='string'){r[p.key]=fcmsLib_Utils_Pure_Util.formEscape(p.value);return;}}else if(p.key.match(/textarea[^a-zA-Z]/)){if(typeof p.value==='string'){r[p.key]=fcmsLib_Utils_Pure_Util.formEscape(p.value);return;}} r[p.key]=p.value;});return r;};fcmsLib_Utils_Pure_Util.formEscape=function(src){return function(context){var r=fcmsLib_Core_Array.getMultiDimKey(context.context,src);if(typeof r==='string'){return r.escapeHTML();}else{fcmsJs.console.error('Fehler beim lesen von '+src);fcmsJs.console.debug(context.context);return src;}};};})();(function(){fcmsJs.Class('fcmsLib_Utils_String').inherits(fcmsLib_Core_Class);fcmsLib_Utils_String.ucFirst=function(str){return str.substr(0,1).toUpperCase()+str.substr(1,str.length);};fcmsLib_Utils_String.trim=function(str){if(Object.isString(str)){return str.replace(/^\s+/,'').replace(/\s+$/,'');}else{fcmsJs.console.error('Kein String übergeben.');return str;}};fcmsLib_Utils_String.shorten=function(str,maxLength,endChars){var ret=str;if(str.length>maxLength){ret=str.substr(0,maxLength-endChars.length)+endChars;} return ret;};fcmsLib_Utils_String.replaceAll=function(str,from,to){var index=str.indexOf(from);while(index!==-1){str=str.replace(from,to);index=str.indexOf(from);} return str;};})();(function(){fcmsJs.Class('fcmsLib_Utils_Timer_Controller').construct(function(name,interval){if((typeof name==='undefined')||(typeof name!=='string')){fcmsJs.console.warn('Ein fcmsLib_Utils_Timer_Controller sollte einen Namen haben!');name=String('fcmsLib_Utils_Timer_Controller-'+Math.rand());} if((typeof interval==='undefined')){fcmsJs.console.error('fcmsLib_Utils_Timer_Controller: Kein Intervall definiert. Timer wird nicht starten.');interval=null;} this._name=name;this._interval=interval;this._readyTimeout=10;this._units=[];this._t=null;}).method('getName',function(){return this._name;}).method('add',function(unit){if(unit instanceof fcmsLib_Utils_Timer_Unit){this._units.push(unit);return true;}else{fcmsJs.console.error(this.getName()+': Das hinzuzufügende Objekt ist nicht vom Typ fcmsLib_Utils_Timer_Unit');return false;}}).method('del',function(name){if(typeof name==='undefined'){fcmsJs.console.error(this.getName()+': Keine Name für das zu löschende TimeUnit übergeben.');return false;}else{for(var i=0;i