/** * Ruby On Rails common Ajax operations conventional wrapper * and underscored aliases for core methods * * http://github.com/MadRabbit/right-rails * * Copyright (C) 2009-2010 Nikolay V. Nemshilov */ eval((function(s,d){for(var i=d.length-1;i>-1;i--)if(d[i])s=s.replace(new RegExp(i,'g'),d[i]);return s})("7 RR={6:{17at:'js',37:'flashes',42:'slide',14:3200,1096:65,31:'86',19Fx:'86',1995:'73',27:'.52_edit',23:'.52_delete',1510097:65},update_flash:4(c){7 e=$(5.6.37);if(e)5.11(e,c).24();8 5},24:4(){if(5.6.14>-1){7 e=$(5.6.37);if(e&&e.visible())e.67.64(e,5.6.42).delay(5.6.14)}8 5},10:4(i){if($(i)&&5.6.1096)$(i).10();8 5},19:4(a,w,i){7 p=i||5.6.1995,n,c=$(a).19(w,p);switch(p){51 '73':n=c.subNodes().last();40;51 'top':n=c.39();40;51 'be93e':n=c.prev();40;51 'after':n=c.next();40}if(n&&5.6.19Fx)n.67().show(5.6.19Fx,{55:5.10.64(5,n)});34 5.10(n);8 5.15(a)},11:4(i,s){$(i).11(s);8 5.10(i).15(i)},43:4(i){7 e=$(i);if(e){7 r=e.43.64(e);if(5.6.31)e.67(5.6.31,{55:r});34 r()}},16:4(i){7 f=$(i);if(f)f.remotize().enable().71+='.'+5.6.17at;8 5},11_17:4(i,s){7 f=$(i);if(f){f.11(s);5.16(i)}8 5.15(i)},show_17_93:4(i,s){$(i).select('17').49('43');$(i).19(s);8 5.16($(i).39('17')).15(i)},30:4(e){7 t=e.tar29,l=[t].75(t.56()).39('38','a');if(l){if(l.38(5.6.27)){e.36();92.83(l.66+'.'+5.6.17at)}34 if(l.38(5.6.23)&&l.94('59')){e.36();eval('({f:'+l.59.to68().11('.45','.85')+'})').f.call(l)}}},15:4(s){$w('Draggable Droppable Tabs Slider Selectable').49(4(n){if(n in 89)89[n].15(5.6.1510097?s:90)},5);8 5}};(4(){7 u=4(a,e){7 m=e.29('35-58');if(m&&!58(m)){a.36();8 65}};7 c=4(e,o){8 70.merge({onCreate:4(){e.50('52:83ing',5)},onComplete:4(){e.50('52:complete',5)},onSuccess:4(){e.50('52:success',5)},onFailure:4(){e.50('52:failure',5)}},o)};7 g=4(e,l){7 m=l.29('35-44'),r=l.29('35-76');if(u(e,l))8;if(m||r)e.36();if(r)92.83(l.66,c(l,{44:m||'29',57:l.29('35-57')}));34 if(m){7 p=$$('84[48=88-param]')[0],t=$$('84[48=88-token]')[0],f=$E('17',{71:l.66,44:'post'});if(p&&t)f.19('<79 63=\"74\" 48=\"'+p.29('62')+'\" 81=\"'+t.29('62')+'\" />');f.19('<79 63=\"74\" 48=\"_44\" 81=\"'+m+'\"/>').19To(18.body).45()}};7 d=4(e,b){if(!u(e,b)&&$(b.17).94('35-76')){e.36();b.17.85(c(b.17))}};18.on({80:4(e){7 t=e.tar29,f=t.17,l=[t].75(t.56()).39('38','a');if(f&&['45','image'].60(t.63))d(e,t);34 if(l)g(e,l)},keydown:4(e){7 t=e.tar29,f=t.17;if(f&&t.tagName==='INPUT'&&e.keyCode==13)d(e,t)}})})();18.on({ready:4(){RR.24()},80:4(e){RR.30(e)}});[68.9,78.9,Function.9,70,6,53,53.9,window,18].49(4(o){93(7 k in o)try{if(/[A-Z]/.87(k)&&63of(o[k])==='4'){7 u=k.41();if(o[u]===90||o[u]===undefined)o[u]=o[k]}}catch(e){}});[61,Event,91,91.61].49(4(o){7 a={},m=o.Methods;93(7 k in m)if(/[A-Z]/.87(k)&&63of(m[k])==='4')a[k.41()]=m[k];o.60(a)});69(68.9,{54:'25',28:'12',to_f:'toFloat',to_i:'toInt',gsub:'11',down51:'toLower98',up51:'toUpper98',82:'25',77:'12',strip:'trim'});69(78.9,{collect:'map',detect:'filter',54:'25',28:'12',82:'25',77:'12'});",",,,,function,this,Options,var,return,prototype,highlight,replace,lastIndexOf,,flashHideDelay,rescan,remotize_form,form,document,insert,,highlightUpdates,rescanWithScopes,linkToAjaxDelete,hide_flash,indexOf,insertPosition,linkToAjaxEdit,last_index_of,get,process_click,removeFx,,insertFx,else,data,stop,flashId,match,first,break,underscored,flashHideFx,remove,method,submit,target,format,name,each,fire,case,ajax,Observer,index_of,onFinish,parents,spinner,confirm,onclick,include,Element,content,type,bind,true,href,hide,String,$alias,Object,action,typeof,bottom,hidden,concat,remote,rindex,Array,input,click,value,index,load,meta,send,fade,test,csrf,self,null,Form,Xhr,for,has,Position,Updates,Scopes,Case,,With".split(",")));