/** * 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})("8 RR={6:{17at:'js',36:'flashes',37:'slide',12:3200,1688:60,30:'fade',26:'.45_edit',23:'.45_delete',149089:60},update_flash:4(c){8 e=$(5.6.36);if(e)5.10(e,c).24();7 5},24:4(){if(5.6.12>-1){8 e=$(5.6.36);if(e&&e.visible())e.79.82(e,5.6.37).delay(5.6.12)}7 5},16:4(i){if(5.6.1688)$(i).16();7 5},19:4(a,w){7 5.16($(a).19(w).lastChild).14(a)},10:4(i,s){$(i).10(s);7 5.16(i).14(i)},41:4(i){8 e=$(i);if(e){8 r=e.41.82(e);if(5.6.30)e.79(5.6.30,{onFinish:r});47 r()}},15:4(i){8 f=$(i);if(f)f.remotize().enable().65+='.'+5.6.17at;7 5},10_17:4(i,s){8 f=$(i);if(f){f.10(s);5.15(i)}7 5.14(i)},show_17_86:4(i,s){$(i).select('17').46('41');$(i).19(s);7 5.15($(i).49('17')).14(i)},28:4(e){8 t=e.tar29,l=[t].68(t.53()).49('34','a');if(l){if(l.34(5.6.26)){e.33();85.81(l.58+'.'+5.6.17at)}47 if(l.34(5.6.23)&&l.87('52')){e.33();eval('({f:'+l.52.to66().10('.39','.78')+'})').f.call(l)}}},14:4(s){$w('Draggable Droppable Tabs Slider Selectable').46(4(n){if(84[n])84[n].14(5.6.149089?s:80)},5);7 5}};(4(){8 u=4(a,e){8 m=e.29('31-51');if(m&&!51(m)){a.33();7 60}};8 c=4(e,o){7 63.merge({onCreate:4(){e.43('45:81ing',5)},onComplete:4(){e.43('45:complete',5)},onSuccess:4(){e.43('45:success',5)},onFailure:4(){e.43('45:failure',5)}},o)};8 g=4(e,l){8 m=l.29('31-38'),r=l.29('31-69');if(u(e,l))7;if(m||r)e.33();if(r)85.81(l.58,c(l,{38:m||'29',55:l.29('31-55')}));47 if(m){8 p=$$('83[44=77-param]')[0],t=$$('83[44=77-token]')[0],f=$E('17',{65:l.58,38:'post'});if(p&&t)f.19('<73 59=\"62\" 44=\"'+p.29('56')+'\" 71=\"'+t.29('56')+'\" />');f.19('<73 59=\"62\" 44=\"_38\" 71=\"'+m+'\"/>').19To(18.body).39()}};8 d=4(e,b){if(!u(e,b)&&$(b.17).87('31-69')){e.33();b.17.78(c(b.17))}};18.on({72:4(e){8 t=e.tar29,f=t.17,l=[t].68(t.53()).49('34','a');if(f&&['39','image'].57(t.59))d(e,t);47 if(l)g(e,l)},keydown:4(e){8 t=e.tar29,f=t.17;if(f&&t.tagName==='INPUT'&&e.keyCode==13)d(e,t)}})})();18.on({ready:4(){RR.24()},72:4(e){RR.28(e)}});[66.9,70.9,Function.9,63,6,48,48.9,window,18].46(4(o){86(8 k in o)try{if(/[A-Z]/.76(k)&&59of(o[k])==='4'){8 u=k.35();if(o[u]===80||o[u]===undefined)o[u]=o[k]}}catch(e){}});[54,Event,75,75.54].46(4(o){8 a={},m=o.Methods;86(8 k in m)if(/[A-Z]/.76(k)&&59of(m[k])==='4')a[k.35()]=m[k];o.57(a)});61(66.9,{50:'25',27:'11',to_f:'toFloat',to_i:'toInt',gsub:'10',downcase:'toLower91',upcase:'toUpper91',74:'25',67:'11',strip:'trim'});61(70.9,{collect:'map',detect:'filter',50:'25',27:'11',74:'25',67:'11'});",",,,,function,this,Options,return,var,prototype,replace,lastIndexOf,flashHideDelay,,rescan,remotize_form,highlight,form,document,insert,,highlightUpdates,rescanWithScopes,linkToAjaxDelete,hide_flash,indexOf,linkToAjaxEdit,last_index_of,process_click,get,removeFx,data,,stop,match,underscored,flashId,flashHideFx,method,submit,format,remove,target,fire,name,ajax,each,else,Observer,first,index_of,confirm,onclick,parents,Element,spinner,content,include,href,type,true,$alias,hidden,Object,typeof,action,String,rindex,concat,remote,Array,value,click,input,index,Form,test,csrf,send,hide,null,load,bind,meta,self,Xhr,for,has,Updates,Scopes,With,Case".split(",")));