right-rails 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.textile +50 -0
- data/Rakefile +23 -0
- data/generators/right_rails/right_rails_generator.rb +41 -0
- data/generators/right_rails/templates/iframed.html.erb +10 -0
- data/generators/right_scaffold/right_scaffold_generator.rb +53 -0
- data/generators/right_scaffold/templates/controller.rb +99 -0
- data/generators/right_scaffold/templates/helper.rb +2 -0
- data/generators/right_scaffold/templates/layout.html.erb +18 -0
- data/generators/right_scaffold/templates/style.css +54 -0
- data/generators/right_scaffold/templates/view__form.html.erb +16 -0
- data/generators/right_scaffold/templates/view__item.html.erb +13 -0
- data/generators/right_scaffold/templates/view_edit.html.erb +6 -0
- data/generators/right_scaffold/templates/view_index.html.erb +9 -0
- data/generators/right_scaffold/templates/view_new.html.erb +5 -0
- data/generators/right_scaffold/templates/view_show.html.erb +10 -0
- data/init.rb +12 -0
- data/javascripts/right-autocompleter-src.js +303 -0
- data/javascripts/right-autocompleter.js +9 -0
- data/javascripts/right-behavior-src.js +240 -0
- data/javascripts/right-behavior.js +8 -0
- data/javascripts/right-calendar-src.js +855 -0
- data/javascripts/right-calendar.js +9 -0
- data/javascripts/right-dnd-src.js +555 -0
- data/javascripts/right-dnd.js +9 -0
- data/javascripts/right-effects-src.js +425 -0
- data/javascripts/right-effects.js +6 -0
- data/javascripts/right-events-src.js +369 -0
- data/javascripts/right-events.js +6 -0
- data/javascripts/right-json-src.js +176 -0
- data/javascripts/right-json.js +6 -0
- data/javascripts/right-lightbox-src.js +597 -0
- data/javascripts/right-lightbox.js +9 -0
- data/javascripts/right-rails-src.js +269 -0
- data/javascripts/right-rails.js +9 -0
- data/javascripts/right-rater-src.js +248 -0
- data/javascripts/right-rater.js +9 -0
- data/javascripts/right-selectable-src.js +507 -0
- data/javascripts/right-selectable.js +7 -0
- data/javascripts/right-slider-src.js +291 -0
- data/javascripts/right-slider.js +7 -0
- data/javascripts/right-sortable-src.js +221 -0
- data/javascripts/right-sortable.js +9 -0
- data/javascripts/right-src.js +4939 -0
- data/javascripts/right-tabs-src.js +776 -0
- data/javascripts/right-tabs.js +6 -0
- data/javascripts/right-tooltips-src.js +130 -0
- data/javascripts/right-tooltips.js +9 -0
- data/javascripts/right-ui-i18n-de.js +29 -0
- data/javascripts/right-ui-i18n-en-us.js +11 -0
- data/javascripts/right-ui-i18n-es.js +29 -0
- data/javascripts/right-ui-i18n-fr.js +29 -0
- data/javascripts/right-ui-i18n-jp.js +33 -0
- data/javascripts/right-ui-i18n-ru.js +29 -0
- data/javascripts/right-ui-i18n-uk.js +29 -0
- data/javascripts/right.js +10 -0
- data/lib/right-rails.rb +11 -0
- data/lib/right_rails/controller_extensions.rb +85 -0
- data/lib/right_rails/helpers/basic.rb +111 -0
- data/lib/right_rails/helpers/forms.rb +239 -0
- data/lib/right_rails/helpers/misc.rb +164 -0
- data/lib/right_rails/helpers/rails.rb +166 -0
- data/lib/right_rails/helpers.rb +5 -0
- data/lib/right_rails/java_script_generator.rb +313 -0
- data/lib/right_rails.rb +6 -0
- data/spec/lib/right_rails/controller_extensions_spec.rb +60 -0
- data/spec/lib/right_rails/helpers/basic_spec.rb +74 -0
- data/spec/lib/right_rails/helpers/forms_spec.rb +51 -0
- data/spec/lib/right_rails/helpers/misc_spec.rb +120 -0
- data/spec/lib/right_rails/helpers/rails_spec.rb +149 -0
- data/spec/lib/right_rails/java_script_generator_spec.rb +317 -0
- data/spec/spec.opts +5 -0
- data/spec/spec_helper.rb +15 -0
- metadata +128 -0
@@ -0,0 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* Unified tabs engine for RightJS (http://rightjs.org/ui/tabs)
|
3
|
+
*
|
4
|
+
* Copyright (C) 2009 Nikolay V. Nemshilov aka St.
|
5
|
+
*/
|
6
|
+
if (!RightJS) throw "Gimme RightJS";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})("19 45=128 176(Observer,{extend:{EVENTS:$w('52 hide 149 load 79 108 add 56 168'),Options:{132:'',14Element:84,98:'both',124:400,2445:95,24177:400,134:84,27:[],closable:95,url:95,122:95,Xhr:84,62:84},rescan:16(){$$('*.13-14').each(16(e){if(!e._14)128 45(e)})}},64:16(e,o){11.17=$(e);11.$super(o||eval('('+11.17.get('data-14-29')+')'));11.17._14=11.174()},destroy:16(){delete(11.17._14)},52:16(t){18 11.87(t,'52')},79:16(t){18 11.87(t,'79')},108:16(t){18 11.87(t,'108')},87:16(t,m){if(isArray(t))t.each(11[m],11);89 if(t=isNumber(t)?11.14[t]:t)t[m]();18 11},174:16(){11.36=11.17.146=='DL';11.41=11.17.105('13-14-58');11.isSimple=!11.36&&!11.41;11.find45();11.17.43('13-14');if(11.isSimple)11.17.43('13-14-49');18 11.79(11.29.27)},find45:16(){11.14175=11.36?11.17:$(11.29.14Element)||11.17.67('UL').43('13-14-74');11.14=11.14175.subNodes(11.36?'dt':84).map(16(n){18 128 45.156(n,11)},11)},173:16(t){19 a=11.29.132+t.id,p;if(11.36){19 n=t.17.next();p=(n&&n.146=='DD')?n:$E('DD').57To(t.17,'after')}89 p=$(a)||$E(11.17.146=='UL'?'LI':'DIV').57To(11.17);18 p.set('id',a)}});45.156=128 176({extend:{167Id:0},64:16(e,c){11.17=e.43('13-14-42');11.33=c;11.17.148(11.149.85(11)).115('s76Event');11.findLink();11.26=128 45.Panel(c.173(11),11);if(c.29.closable)11.169.57($E('69',{'59':'13-14-42-close-icon','164':'×'}).148(11.56.85(11)).115('s76Event'))},149:16(e){e.s76();18 11.72('149').52()},52:16(){if(11.53()){19 p=11.33.14.67('25');if(p)p.72('hide');11.17.159('13-14-25');11.33.24To156(11);11.26.52();11.72('52')}18 11},79:16(){11.17.43('13-14-27');18 11.72('79')},108:16(){11.17.56176('13-14-27');18 11.72('108')},27:16(){18!11.53()},53:16(){18!11.17.105('13-14-27')},25:16(){18 11.17.105('13-14-25')},56:16(a){if(a)a.s76();if(11.25()){19 e=11.33.14.48('53');19 s=e[e.80(11)+1]||e[e.80(11)-1];if(s)s.52()}11.33.14.162(11.33.14.80(11),1);11.17.56();11.26.56();18 11},46:16(){18 11.17.78+11.17.94('39Right').155()},72:16(e){11.33.72(e,11);18 11},findLink:16(){11.169=11.17.67('a');11.id=11.169.165.126('#')[1]||(11.33.29.132+(45.156.167Id++))}});45.Panel=128 176(Observer,{64:16(e,t){11.42=t;11.id=e.id;11.17=e.43('13-14-26')},52:16(){18 11.104(16(){11.17.159('13-14-26-25')})},131:16(c){18 11.104(16(){11.17.131(c||'')})},56:16(){11.17.56();18 11},lock:16(){19 l=$E('69',{'59':'13-14-26-61'});19 s=$E('69',{'59':'13-14-26-61-117'}).57To(l);19 d='1234'.126('').map(16(a){18 $E('69',{'59':a==1?'glow':84}).57To(s)});(16(){s.57(d.last(),'76');d.unshift(d.pop())}).periodical(400);11.17.57(l,'76')},104:16(c){if(11.120)18 11.104.85(11,c).delay(20);19 a=11.42.33;19 o=a.29;19 g=a.17.subNodes().67('105','13-14-26-25');19 t=11.17;19 j=g!=t;19 l=11.17.67('69.13-14-26-61');if(o.98&&self.Fx&&g&&(j||l)){11.120=true;19 b=(o.98=='both'&&l)?'150':o.98;19 d=o.124;d=Fx.177s[d]||d;19 r=b=='fade'?0:b=='150'?d:d/2;19 f=d-r;if(b!='150')t.setStyle({31:0});19 i=(a.36&&j)?0:g.68;c.call(11);19 n=t.68;if(b!='fade'&&i!=n){a.17.119.32=a.17.68+'px';19 e=$E('69',{'59':'13-14-118'}).171(i);19 s=e.152.85(e,t);t.wrap(e);if(a.36&&j){g.43('13-14-26-25');19 h=$E('69',{'59':'13-14-118'}).171(g.68);19 p=16(){h.152(g.56176('13-14-26-25'))};g.wrap(h)}a.17.119.32='167';if(h)h.143({32:'153'},{102:r,onFinish:p});e.143({32:n+'px'},{102:r,onFinish:s})}89{rezise_102=0;d=f}if(b!='150')t.143.85(t,{31:1},{102:f}).delay(r);(16(){11.120=95}).85(11).delay(d)}89 c.call(11);18 11}});45.90((16(){19 d=45.121.174;18{next:16(){18 11.151(+1)},prev:16(){18 11.151(-1)},24Left:16(){18 11[11.41?'prev':'111'](+0.6)},24Right:16(){18 11[11.41?'next':'111'](-0.6)},174:16(){d.call(11);if(11.24able=(11.29.2445||11.41))11.129();18 11},129:16(){if(!11.17.67('13-14-22')){11.114=$E('69',{'59':'13-14-24-37','164':'«'}).115(11.24Left.85(11));11.110=$E('69',{'59':'13-14-24-13','164':'»'}).115(11.24Right.85(11));11.17.57($E('69',{'59':'13-14-22'}).57([11.114,11.110,$E('69',{'59':'13-14-24-139'}).57(11.14175)]),'76')}},151:16(p){19 c=11.14.67('25');if(c&&c.53()){19 e=11.14.48('53');19 t=e[e.80(c)+p];if(t)t.52()}},24To156:16(t){if(11.24able){19 b=0;for(19 i=0;i<11.14.86;i++){b+=11.14[i].46();if(11.14[i]==t)break}19 a=11.14175.113.78;19 s=(11.41?(a/2+t.46()/2):a)-b;if(!11.41){19 c=11.14175.94('37').155()||0;if(s>=c&&s<(c+a-t.46()))s=c;89 if(c>-b&&c<=(t.46()-b))s=t.46()-b}11.24To(s)}},111:16(s){19 c=11.14175.94('37').155()||0;19 a=11.14175.113.78;11.24To(c+a*s)},24To:16(s){19 c=11.14175.94('37').155()||0;19 a=11.14175.113.78;19 o=0;for(19 i=0;i<11.14.86;i++)o+=11.14[i].46();if(s<(a-o))s=a-o;if(s>0)s=0;19 b={37:s+'px'};if(11.29.24177&&self.Fx&&c!=s)11.14175.143(b,{102:11.29.24177});89 11.14175.setStyle(b);11.92(o,a,s)},92:16(o,a,s){19 h=97=95;if(11.41){19 e=11.14.48('53');19 c=e.67('25');if(c){19 i=e.80(c);h=i>0;97=i<e.86-1}}89{h=s!=0;97=s>(a-o)}11.114[h?'56176':'43']('13-14-24-27');11.110[97?'56176':'43']('13-14-24-27')}}})());45.90((16(){19 d=45.121.64;19 g=16(){18 self.62?(62.get('13-14-indexes')||'').126(','):[]};19 s=16(o,a,t){if(self.62){19 i=g();i=i.without.apply(i,a.map('id'));i.push(t.id);62.set('13-14-indexes',i.uniq().join(','),o)}};18{64:16(){d.apply(11,170);11.157();if(11.29.62)11.onShow(s.curry(11.29.62,11.14))},157:16(){19 c;if(11.29.134!==84)c=11.29.134;89{19 e=11.14.48('53');c=e[11.urlIndex()]||e[11.142()]||e.67('25')||e[0]}if(c)c.52()},urlIndex:16(){19 b=-1,a=137.location.165.126('#')[1];if(a)for(19 i=0;i<11.14.86;i++)if(11.14[i].id==a){b=i;break}18 b},142:16(){19 a=-1;if(11.29.62){19 b=g();for(19 i=0;i<11.14.86;i++)if(b.90(11.14[i].id)){a=i;break}}18 a}}})());45.90({add:16(a,c,o){19 o=o||{};19 e=$E(11.36?'dt':'li').57($E('a',{164:a,165:o.url||'#'+(o.id||'')})).57To(11.14175);19 t=128 45.156(e,11);t.26.17.131(c||'');11.14.push(t);if(defined(o.38))11.168(t,o.38);18 11.72('add',t)},168:16(t,p){19 t=11.14[t]||t;if(11.14[p]&&11.14[p]!==t){11.14[p].17.57(t.17,(p==11.14.86-1)?'after':'before');if(11.36)t.17.57(t.26.17,'after');11.14.162(11.14.80(t),1);11.14.162(p,0,t);11.72('168',t,p)}18 11},56:16(t){18 11.87(t,'56')}});45.156.90((16(){19 b=45.156.121.52;18{52:16(){19 a=b.apply(11,170);19 u=11.169.165;19 o=11.33.29;if(u.90s('#'))u=o.url?o.url.152('%{id}',u.126('#')[1]):84;if(u&&!11.141&&!(o.122||11.122)){11.26.lock();try{11.141=Xhr.load(u,o.Xhr).onComplete(16(r){11.26.131(r.127);11.141=84;if(o.122)11.122=true;11.72('load')}.85(11))}catch(e){if(!Browser.OLD)throw(e)}}18 a}}})());137.onReady(16(){45.rescan()});137.write(\"<119 type=\\\"127/css\\\">.13-14,.13-14 .13-14-74,.13-14 .13-14-42,.13-14 .13-14-26,.13-14-24-37,.13-14-24-13,.13-14-24-139,.13-14-26-61,.13-14-118{39:0;54:0;28:70;21:70;74-119:70;63:125;46:167;32:167}.13-14{21-47:91 103 #116}.13-14-118{136:hidden}.13-14-42,.13-14-42 a{63:125;float:37}.13-14-42 a{38:65;109:154;127-decoration:70;21:91 103 #116;28:#166;51:#444;-107-21-30:.3em;-55-21-30:.3em}.13-14-42 a:75{21-51:#116;28:#EEE}.13-14 .13-14-74 .13-14-25 a,dl.13-14 dt.13-14-25 a{font-weight:bold;51:#000;28:#FFF}.13-14-42 a 147{21:70;31:.6;48:93(31=60)}.13-14-42 a:75 147,.13-14 .13-14-74 .13-14-25 a 147{31:1;48:93(31=130)}.13-14-27,.13-14-27 a,.13-14-27 a:75{28:#EEE;21-51:#166;51:#AAA;109:default}.13-14-27 a 147,.13-14-27 a:75 147{31:.5;48:93(31=50)}.13-14-42-close-icon{63:in138-125;*63:in138;*zoom:1;39-13:-0.172;39-37:0.172;109:154;31:0.5;48:93(31=50)}.13-14-42-close-icon:75{31:1;48:93(31=130);51:#B00;127-shadow:#888 .1172 .1172 .101}.13-14 .13-14-26{63:70;38:65;min-32:4em;54:.172 0}.13-14 .13-14-26-25{63:125}.13-14-26-61{38:133;76:153;37:153;31:0.5;48:93(31=50);28:#116;46:130%;32:130%;127-align:center;138-32:130%}.13-14-26-61-117{38:133;37:44%;76:44%}.13-14-26-61-117 69{float:37;28:#777;46:.172;32:106;39-13:.106;-107-21-30:.106;-55-21-30:.106}.13-14-26-61-117 69.glow{28:#444;32:1.101;39-76:-0.106}.13-14 .13-14-22{54:0 1.4em;38:65;39-47:.172}.13-14 .13-14-22 .13-14-24-37,.13-14 .13-14-22 .13-14-24-13{46:1.106;127-align:center;28:#EEE;51:#666;109:154;21:91 103 #116;-107-21-30:.101;-55-21-30:.101;38:133;76:153;37:153;z-index:130}.13-14 .13-14-22 .13-14-24-37:75,.13-14 .13-14-22 .13-14-24-13:75{51:#000;28:#166;21-51:#AAA}.13-14 .13-14-22 .13-14-24-13{37:167;13:153}.13-14 .13-14-22 .13-14-24-27,.13-14 .13-14-22 .13-14-24-27:75{109:default;28:#166;21-51:#166;51:#AAA}.13-14 .13-14-22 .13-14-24-139{46:130%;136:hidden;38:65;z-index:50}.13-14 .13-14-22 .13-14-74{38:65;46:999em;39:0}.13-14-49 .13-14-74{32:101;54:0 106;21-47:91 103 #116}.13-14-49 .13-14-42{39-76:-91;39-13:91}.13-14-49 .13-14-42 a{138-32:1.8em;39-76:.101;54:0 106;21-47:70;-107-21-30-4737:0;-107-21-30-4713:0;-55-21-47-37-30:0;-55-21-47-13-30:0}.13-14-49 .13-14-74 .13-14-25 a{138-32:101;39-76:91}.13-14-49 .13-14-22{21-47:91 103 #116}.13-14-49 .13-14-22 .13-14-24-37,.13-14-49 .13-14-22 .13-14-24-13{138-32:1.8em;76:.101;-107-21-30-4737:0;-107-21-30-4713:0;-55-21-47-37-30:0;-55-21-47-13-30:0}.13-14-49 .13-14-22 .13-14-24-139{38:65;76:91}.13-14-49 .13-14-22 .13-14-24-139 .13-14-74{54:0}.13-14-58 .13-14-74,.13-14-58 .13-14-42 a,.13-14-58 .13-14-22 .13-14-24-37,.13-14-58 .13-14-22 .13-14-24-13{32:6em;138-32:6em}.13-14-58 .13-14-42{39-13:2px}.13-14-58 .13-14-42 a 147{21:91 103 #116;39:.4em;54:0}dl.13-14{136:70;21:70}dt.13-14-42,dt.13-14-42 a{63:125;float:70}dt.13-14-42 a{54:.101 106}dl.13-14 dt.13-14-25 a{28:#EEE;-107-21-30-4737:0;-107-21-30-4713:0;-55-21-47-37-30:0;-55-21-47-13-30:0}</119>\");",",,,,,,,,,,,this,,right,tabs,,function,element,return,var,,border,scroller,,scroll,current,panel,disabled,background,options,radius,opacity,height,controller,,tabsList,isHarmonica,left,position,margin,,isCarousel,tab,addClass,,Tabs,width,bottom,filter,simple,,color,show,enabled,padding,webkit,remove,insert,carousel,class,,locker,Cookie,display,initialize,relative,,first,offsetHeight,div,none,,fire,,list,hover,top,,offsetWidth,disable,indexOf,removeClass,scrollDuration,insertTo,null,bind,length,callTab,,else,include,1px,checkScrollButtons,alpha,getStyle,false,bottomright,has_next,resizeFx,,,2em,duration,solid,resizing,hasClass,1em,moz,enable,cursor,nextButton,justScroll,bottomleft,parentNode,prevButton,onClick,CCC,spinner,resizer,style,__working,prototype,cache,,resizeDuration,block,split,text,new,buildScroller,100,update,idPrefix,absolute,selected,scrollTo,overflow,document,line,body,scrollToTab,request,cookieIndex,morph,scrollRight,tabsElement,tagName,img,onMousedown,click,slide,pickTab,replace,0px,pointer,toInt,Tab,findCurrent,scrollLeft,radioClass,scrollTabs,scrollable,splice,stopEvent,html,href,DDD,auto,move,link,arguments,setHeight,5em,findPanel,init,List,Class,Duration".split(",")));
|
@@ -0,0 +1,130 @@
|
|
1
|
+
/**
|
2
|
+
* The native tooltips feature for RightJS
|
3
|
+
*
|
4
|
+
* See http://rightjs.org/ui/tooltips for more details
|
5
|
+
*
|
6
|
+
* Copyright (C) 2009 Nikolay V. Nemshilov aka St.
|
7
|
+
*/
|
8
|
+
if (!RightJS) throw "Gimme RightJS!";
|
9
|
+
|
10
|
+
/**
|
11
|
+
* The native tooltips feature for RithJS
|
12
|
+
*
|
13
|
+
*
|
14
|
+
* Copyright (C) 2009 Nikolay V. Nemshilov aka St.
|
15
|
+
*/
|
16
|
+
|
17
|
+
var Tooltip = new Class({
|
18
|
+
include: Options,
|
19
|
+
|
20
|
+
extend: {
|
21
|
+
Options: {
|
22
|
+
checkTags: '*', // tags that should be checked on-load
|
23
|
+
relName: 'tooltip',
|
24
|
+
idSuffix: '-tooltip',
|
25
|
+
fxName: 'fade',
|
26
|
+
fxDuration: 400,
|
27
|
+
delay: 400 // the appearance delay
|
28
|
+
},
|
29
|
+
|
30
|
+
current: null, // currently active tooltip reference
|
31
|
+
|
32
|
+
// scans the page for auto-discoverable tooltiped elements
|
33
|
+
rescan: function() {
|
34
|
+
var key = Tooltip.Options.relName;
|
35
|
+
$$(Tooltip.Options.checkTags+'[rel='+key+']').each(function(element) {
|
36
|
+
var text = element.get('title') || element.get('alt');
|
37
|
+
if (text) {
|
38
|
+
var data = element.get('data-'+key+'-options');
|
39
|
+
new Tooltip(element, eval('('+data+')'));
|
40
|
+
}
|
41
|
+
});
|
42
|
+
}
|
43
|
+
},
|
44
|
+
|
45
|
+
initialize: function(element, options) {
|
46
|
+
this.element = $E('div', {'class': 'right-tooltip'}).insertTo(document.body).hide();
|
47
|
+
this.container = $E('div', {'class': 'right-tooltip-container'}).insertTo(this.element);
|
48
|
+
|
49
|
+
this.setOptions(options).assignTo(element);
|
50
|
+
},
|
51
|
+
|
52
|
+
setText: function(text) {
|
53
|
+
this.container.update(text);
|
54
|
+
return this;
|
55
|
+
},
|
56
|
+
|
57
|
+
getText: function() {
|
58
|
+
return this.container.innerHTML;
|
59
|
+
},
|
60
|
+
|
61
|
+
hide: function() {
|
62
|
+
Tooltip.current = null;
|
63
|
+
this.cancelTimer();
|
64
|
+
this.element.hide(this.options.fxName, {duration: this.options.fxDuration});
|
65
|
+
|
66
|
+
return this;
|
67
|
+
},
|
68
|
+
|
69
|
+
show: function() {
|
70
|
+
Tooltip.current = this;
|
71
|
+
this.element.show(this.options.fxName, {duration: this.options.fxDuration});
|
72
|
+
|
73
|
+
return this;
|
74
|
+
},
|
75
|
+
|
76
|
+
showDelayed: function() {
|
77
|
+
Tooltip.current = this;
|
78
|
+
this.timer = this.show.bind(this).delay(this.options.delay);
|
79
|
+
},
|
80
|
+
|
81
|
+
cancelTimer: function() {
|
82
|
+
if (this.timer) {
|
83
|
+
this.timer.cancel();
|
84
|
+
this.timer = null;
|
85
|
+
}
|
86
|
+
},
|
87
|
+
|
88
|
+
moveTo: function(event) {
|
89
|
+
this.element.style.left = event.pageX + 'px';
|
90
|
+
this.element.style.top = event.pageY + 'px';
|
91
|
+
|
92
|
+
return this;
|
93
|
+
},
|
94
|
+
|
95
|
+
assignTo: function(element) {
|
96
|
+
this.setText(element.get('title') || element.get('alt'));
|
97
|
+
|
98
|
+
// removing the element native title and alt
|
99
|
+
element.setAttribute('title', '');
|
100
|
+
element.setAttribute('alt', '');
|
101
|
+
|
102
|
+
element.on({
|
103
|
+
mouseover: this.showDelayed.bind(this),
|
104
|
+
mouseout: this.hide.bind(this)
|
105
|
+
});
|
106
|
+
|
107
|
+
if (element.id) this.element.id = element.id + this.options.idSuffix;
|
108
|
+
|
109
|
+
this.associate = element;
|
110
|
+
|
111
|
+
return this;
|
112
|
+
}
|
113
|
+
});
|
114
|
+
|
115
|
+
/**
|
116
|
+
* The post load tooltips initialization script
|
117
|
+
*
|
118
|
+
* Copyright (C) 2009 Nikolay V. Nemshilov aka St.
|
119
|
+
*/
|
120
|
+
document.on({
|
121
|
+
ready: Tooltip.rescan,
|
122
|
+
|
123
|
+
mousemove: function(event) {
|
124
|
+
if (Tooltip.current) {
|
125
|
+
Tooltip.current.moveTo(event);
|
126
|
+
}
|
127
|
+
}
|
128
|
+
});
|
129
|
+
|
130
|
+
document.write("<style type=\"text/css\">div.right-tooltip{position:absolute;margin-top:16pt;margin-left:2pt;border:1px solid #DDD;background-color:#FFF8EE;color:#666;font-size:80%;cursor:default;border-radius:.4em;-moz-border-radius:.4em;-webkit-border-radius:.4em;box-shadow:.4em .4em .4em #AAA;-moz-box-shadow:.4em .4em .4em #AAA;-webkit-box-shadow:.4em .4em .4em #AAA}div.right-tooltip-container{margin:.6em;border-left:2px solid brown;padding-left:.5em}</style>");
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* The native tooltips feature for RightJS
|
3
|
+
*
|
4
|
+
* See http://rightjs.org/ui/tooltips for more details
|
5
|
+
*
|
6
|
+
* Copyright (C) 2009 Nikolay V. Nemshilov aka St.
|
7
|
+
*/
|
8
|
+
if (!RightJS) throw "Gimme RightJS!";
|
9
|
+
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})("44 9=59 Class({include:20,extend:{20:{35:'*',45:'15',37:'-15',31:'fade',19:61,39:61},14:47,51:7(){44 k=9.20.45;$$(9.20.35+'[rel='+k+']').each(7(e){44 t=e.34('42')||e.34('56');if(t){44 d=e.34('data-'+k+'-10');59 9(e,eval('('+d+')'))}})}},initialize:7(e,o){3.11=$E('43',{'55':'24-15'}).36(21.body).33();3.12=$E('43',{'55':'24-15-12'}).36(3.11);3.set20(o).41(e)},46:7(t){3.12.update(t);17 3},34Text:7(){17 3.12.innerHTML},33:7(){9.14=47;3.26();3.11.33(3.10.31,{38:3.10.19});17 3},49:7(){9.14=3;3.11.49(3.10.31,{38:3.10.19});17 3},27:7(){9.14=3;3.23=3.49.48(3).39(3.10.39)},26:7(){if(3.23){3.23.cancel();3.23=47}},52:7(e){3.11.25.32=e.pageX+'px';3.11.25.62=e.pageY+'px';17 3},41:7(e){3.46(e.34('42')||e.34('56'));e.22('42','');e.22('56','');e.on({mouseover:3.27.48(3),mouseout:3.33.48(3)});if(e.id)3.11.id=e.id+3.10.37;3.associate=e;17 3}});21.on({ready:9.51,mousemove:7(e){if(9.14)9.14.52(e)}});21.write(\"<25 type=\\\"text/css\\\">43.24-15{position:absolute;30-62:16pt;30-32:2pt;18:1px 53 #DDD;background-57:#FFF8EE;57:#666;font-size:80%;cursor:default;18-29:.13;-60-18-29:.13;-50-18-29:.13;58-28:.13 .13 .13 #54;-60-58-28:.13 .13 .13 #54;-50-58-28:.13 .13 .13 #54}43.24-15-12{30:.6em;18-32:2px 53 brown;padding-32:.5em}</25>\");",",,,this,,,,function,,Tooltip,options,element,container,4em,current,tooltip,,return,border,fxDuration,Options,document,setAttribute,timer,right,style,cancelTimer,showDelayed,shadow,radius,margin,fxName,left,hide,get,checkTags,insertTo,idSuffix,duration,delay,,assignTo,title,div,var,relName,setText,null,bind,show,webkit,rescan,moveTo,solid,AAA,class,alt,color,box,new,moz,400,top".split(",")));
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* RightJS UI Internationalization: German module
|
3
|
+
*
|
4
|
+
* Copyright (C) Nikolay V. Nemshilov aka St.
|
5
|
+
*/
|
6
|
+
if (self.Calendar) {
|
7
|
+
$ext(Calendar.i18n, {
|
8
|
+
Done: 'Erledigt',
|
9
|
+
Now: 'Jetzt',
|
10
|
+
Next: 'Nächster Monat',
|
11
|
+
Prev: 'Vorhergehender Monat',
|
12
|
+
NextYear: 'Nächstes Jahr',
|
13
|
+
PrevYear: 'Vorhergehendes Jahr',
|
14
|
+
|
15
|
+
dayNames: $w('Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag'),
|
16
|
+
dayNamesShort: $w('So Mo Di Mi Do Fr Sa'),
|
17
|
+
dayNamesMin: $w('So Mo Di Mi Do Fr Sa'),
|
18
|
+
monthNames: $w('Januar Februar März April Mai Juni Juli August September Oktober November Dezember'),
|
19
|
+
monthNamesShort: $w('Jan Feb Mär Apr Mai Jun Jul Aug Sep Okt Nov Dez')
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
if (self.Lightbox) {
|
24
|
+
$ext(Lightbox.i18n, {
|
25
|
+
CloseTitle: 'Schliessen',
|
26
|
+
PrevTitle: 'Vorhergehendes Bild',
|
27
|
+
NextTitle: 'Nächstes Bild'
|
28
|
+
});
|
29
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* RightJS UI Internationalization: Spanish module
|
3
|
+
*
|
4
|
+
* Copyright (C) Nikolay V. Nemshilov aka St.
|
5
|
+
*/
|
6
|
+
if (self.Calendar) {
|
7
|
+
$ext(Calendar.i18n, {
|
8
|
+
Done: 'Hecho',
|
9
|
+
Now: 'Ahora',
|
10
|
+
Next: 'Mes siguiente',
|
11
|
+
Prev: 'Mes precedente',
|
12
|
+
NextYear: 'Año siguiente',
|
13
|
+
PrevYear: 'Año precedente',
|
14
|
+
|
15
|
+
dayNames: $w('Domingo Lunes Martes Miércoles Jueves Viernes Sábado'),
|
16
|
+
dayNamesShort: $w('Dom Lun Mar Mié Jue Vie Sab'),
|
17
|
+
dayNamesMin: $w('Do Lu Ma Mi Ju Vi Sa'),
|
18
|
+
monthNames: $w('Enero Febrero Marzo Abril Mayo Junio Julio Agosto Septiembre Octubre Noviembre Diciembre'),
|
19
|
+
monthNamesShort: $w('Ene Feb Mar Abr May Jun Jul Ago Sep Oct Nov Dic')
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
if (self.Lightbox) {
|
24
|
+
$ext(Lightbox.i18n, {
|
25
|
+
CloseTitle: 'Cerrar',
|
26
|
+
PrevTitle: 'Imagen precedente',
|
27
|
+
NextTitle: 'Imagen siguiente'
|
28
|
+
});
|
29
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* RightJS UI Internationalization: French module
|
3
|
+
*
|
4
|
+
* Copyright (C) Nikolay V. Nemshilov aka St.
|
5
|
+
*/
|
6
|
+
if (self.Calendar) {
|
7
|
+
$ext(Calendar.i18n, {
|
8
|
+
Done: "Fait",
|
9
|
+
Now: "Maint.",
|
10
|
+
Next: "Mois prochain",
|
11
|
+
Prev: "Mois précédent",
|
12
|
+
NextYear: "L'année prochain",
|
13
|
+
PrevYear: "L'année précédent",
|
14
|
+
|
15
|
+
dayNames: $w('Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi'),
|
16
|
+
dayNamesShort: $w('Dim Lun Mar Mer Jeu Ven Sam'),
|
17
|
+
dayNamesMin: $w('Di Lu Ma Me Je Ve Sa'),
|
18
|
+
monthNames: $w('Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Décembre'),
|
19
|
+
monthNamesShort: $w('Jan Fév Mar Avr Mai Juin Juil Août Sept Oct Nov Déc')
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
if (self.Lightbox) {
|
24
|
+
$ext(Lightbox.i18n, {
|
25
|
+
CloseTitle: 'Fin',
|
26
|
+
PrevTitle: 'Image précédente',
|
27
|
+
NextTitle: 'Prochaine image'
|
28
|
+
});
|
29
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* RightJS UI Internationalization: Japanese module
|
3
|
+
*
|
4
|
+
* Copyright (C) Nikolay V. Nemshilov aka St.
|
5
|
+
*/
|
6
|
+
if (self.Calendar) {
|
7
|
+
$ext(Calendar.Options, {
|
8
|
+
format: 'POSIX'
|
9
|
+
});
|
10
|
+
|
11
|
+
$ext(Calendar.i18n, {
|
12
|
+
Done: 'Done',
|
13
|
+
Now: '今日',
|
14
|
+
Next: '翌月',
|
15
|
+
Prev: '前の月',
|
16
|
+
NextYear: '翌年',
|
17
|
+
PrevYear: '前年',
|
18
|
+
|
19
|
+
dayNames: $w('日曜日 月曜日 火曜日 水曜日 木曜日 金曜日 土曜日'),
|
20
|
+
dayNamesShort: $w('日 月 火 水 木 金 土'),
|
21
|
+
dayNamesMin: $w('日 月 火 水 木 金 土'),
|
22
|
+
monthNames: $w('1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月'),
|
23
|
+
monthNamesShort: $w('1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月')
|
24
|
+
});
|
25
|
+
}
|
26
|
+
|
27
|
+
if (self.Lightbox) {
|
28
|
+
$ext(Lightbox.i18n, {
|
29
|
+
CloseTitle: 'Close',
|
30
|
+
PrevTitle: 'Previous Image',
|
31
|
+
NextTitle: 'Next Image'
|
32
|
+
});
|
33
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* RightJS UI Internationalization: Russian module
|
3
|
+
*
|
4
|
+
* Copyright (C) Nikolay V. Nemshilov aka St.
|
5
|
+
*/
|
6
|
+
if (self.Calendar) {
|
7
|
+
$ext(Calendar.i18n, {
|
8
|
+
Done: 'Готово',
|
9
|
+
Now: 'Сейчас',
|
10
|
+
Next: 'Следующий месяц',
|
11
|
+
Prev: 'Предыдущий месяц',
|
12
|
+
NextYear: 'Следующий год',
|
13
|
+
PrevYear: 'Предыдущий год',
|
14
|
+
|
15
|
+
dayNames: $w('Вокскресенье Понедельник Вторник Среда Четверг Пятница Суббота'),
|
16
|
+
dayNamesShort: $w('Вск Пнд Втр Срд Чтв Птн Сбт'),
|
17
|
+
dayNamesMin: $w('Вс Пн Вт Ср Чт Пт Сб'),
|
18
|
+
monthNames: $w('Январь Февраль Март Аперль Май Инюнь Июль Август Сентябрь Октябрь Ноябрь Декабрь'),
|
19
|
+
monthNamesShort: $w('Янв Фев Мар Апр Май Инь Иль Авг Сен Окт Ноя Дек')
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
if (self.Lightbox) {
|
24
|
+
$ext(Lightbox.i18n, {
|
25
|
+
CloseTitle: 'Закрыть',
|
26
|
+
PrevTitle: 'Предыдущее изображение',
|
27
|
+
NextTitle: 'Следующее изображение'
|
28
|
+
});
|
29
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* RightJS UI Internationalization: Ukrainian module
|
3
|
+
*
|
4
|
+
* Copyright (C) Nikolay V. Nemshilov aka St.
|
5
|
+
*/
|
6
|
+
if (self.Calendar) {
|
7
|
+
$ext(Calendar.i18n, {
|
8
|
+
Done: 'Готово',
|
9
|
+
Now: 'Сейчас',
|
10
|
+
Next: 'Следующий месяц',
|
11
|
+
Prev: 'Предыдущий месяц',
|
12
|
+
NextYear: 'Следующий год',
|
13
|
+
PrevYear: 'Предыдущий год',
|
14
|
+
|
15
|
+
dayNames: $w('Неділя Понеділок Вівторок Середа Четвер П\'ятниця Субота'),
|
16
|
+
dayNamesShort: $w('Ндл Пнд Втр Срд Чтв Птн Сбт'),
|
17
|
+
dayNamesMin: $w('Нд Пн Вт Ср Чт Пт Сб'),
|
18
|
+
monthNames: $w('Січень Лютий Березень Квітень Травень Червень Липень Серпень Вересень Жовтень Листопад Грудень'),
|
19
|
+
monthNamesShort: $w('Січ Лют Бер Квіт Трав Черв Лип Серп Вер Жовт Лист Груд')
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
if (self.Lightbox) {
|
24
|
+
$ext(Lightbox.i18n, {
|
25
|
+
CloseTitle: 'Закрыть',
|
26
|
+
PrevTitle: 'Предыдущее изображение',
|
27
|
+
NextTitle: 'Следующее изображение'
|
28
|
+
});
|
29
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* RightJS - the right javascript framework
|
3
|
+
*
|
4
|
+
* The library released under terms of the MIT license
|
5
|
+
* Visit http://rightjs.org for more details
|
6
|
+
*
|
7
|
+
* Copyright (C) 2008-2009 Nikolay V. Nemshilov aka St.
|
8
|
+
*/
|
9
|
+
|
10
|
+
var RightJS={version:"1.4.3",modules:["core","form","cookie","xhr","fx"]};var Browser=(function(a){return{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:a.indexOf('AppleWebKit/')>-1,Gecko:a.indexOf('Gecko')>-1&&a.indexOf('KHTML')<0,MobileSafari:!!a.match(/Apple.*Mobile.*Safari/),Konqueror:a.indexOf('Konqueror')>-1,OLD:a.indexOf('MSIE 6')>-1||a.indexOf('MSIE 7')>-1,IE8:a.indexOf('MSIE 8')>-1}})(navigator.userAgent);function $ext(d,s,a){var s=s||{};for(var k in s)if(!(a&&d[k]!==undefined))d[k]=s[k];return d};function $try(){for(var i=0;i<arguments.length;i++)try{return arguments[i]()}catch(e){}};function $eval(t){if(!isString(t)||t.blank())return;if(window.execScript)window.execScript(t);else{var s=document.createElement('script');s.setAttribute('type','text/javascript');s.text=t;document.body.appendChild(s)}}function $break(){throw new Break()};function $alias(o,n){for(var a in n)o[a]=o[n[a]];return o};function defined(v){return v!==undefined};function isHash(v){return typeof(v)=='object'&&v!==null&&v.constructor===Object};if(navigator.userAgent.indexOf('Konqueror/3')!=-1)eval(isHash.toString().replace(';','&&!(arguments[0] instanceof HTMLElement);'));function isFunction(v){return typeof(v)=='function'};function isString(v){return typeof(v)=='string'};function isArray(v){return v instanceof Array};function isNumber(v){return typeof(v)=='number'};function isElement(v){return v&&!!v.tagName};function isNode(v){return v&&!!v.nodeType};var $A=(function(s){return function(b){try{var a=s.call(b)}catch(e){for(var a=[],i=0,l=b.length;i<l;i++)a[i]=b[i]}return a}})(Array.prototype.slice);function $E(t,o){return new Element(t,o)};function $(e){var e=typeof(e)=='string'?document.getElementById(e):e;return Browser.OLD?Element.prepare(e):e};function $$(c){return $A(document.querySelectorAll(c))};function $w(s){return s.trim().split(/\s+/)}var $uid=(function(){var U=1;return function(i){return i.uid||(i.uid=U++)}})();$ext(Object,{keys:function(o){var a=[];for(var k in o)a.push(k);return a},values:function(o){var v=[];for(var k in o)v.push(o[k]);return v},empty:function(o){for(var k in o)break;return!k},without:function(){var f=$A(arguments),o=f.shift(),c={};for(var k in o)if(!f.includes(k))c[k]=o[k];return c},only:function(){var f=$A(arguments),o=f.shift(),c={};for(var i=0,l=f.length;i<l;i++)if(defined(o[f[i]]))c[f[i]]=o[f[i]];return c},merge:function(){var o={};for(var i=0,l=arguments.length;i<l;i++)if(isHash(arguments[i]))$ext(o,arguments[i]);return o},toQueryString:function(o){var t=[];for(var k in o)t.push(k+'='+encodeURIComponent(o[k]));return t.join('&')}});$ext(Math,{random:function(a,m){var r=this._random();if(arguments.length==0)return r;if(arguments.length==1)var m=a,a=0;return Math.floor(r*(m-a+1)+a)},_random:Math.random});$ext(Array.prototype,(function(A){var n=A.forEach||function(c,s){for(var i=0,l=this.length;i<l;i++)c.call(s,this[i],i,this)};var k=A.filter||function(c,s){for(var r=[],i=0,l=this.length;i<l;i++)if(c.call(s,this[i],i,this))r.push(this[i]);return r};var u=A.map||function(c,s){for(var r=[],i=0,l=this.length;i<l;i++)r.push(c.call(s,this[i],i,this));return r};var w=A.some||function(c,s){for(var i=0,l=this.length;i<l;i++)if(c.call(s,this[i],i,this))return true;return false};var h=A.every||function(c,s){for(var i=0,l=this.length;i<l;i++)if(!c.call(s,this[i],i,this))return false;return true};var m=function(c,s){for(var i=0,l=this.length;i<l;i++)if(c.call(s,this[i],i,this))return this[i];return undefined};var t=function(c,s){for(var i=this.length-1;i>-1;i--)if(c.call(s,this[i],i,this))return this[i];return undefined};var q=function(a,b){var d=a[0],a=A.slice.call(a,1),s=b;if(isString(d)){var c=d;if(b.length&&isFunction(b[0][c]))d=function(o){return o[c].apply(o,a)};else d=function(o){return o[c]}}else s=a[0];return[d,s]};var g=function(f,s,a){try{return f.apply(s,q(a,s))}catch(e){if(!(e instanceof Break))throw(e)}};return{indexOf:A.indexOf||function(v,f){for(var i=(f<0)?Math.max(0,this.length+f):f||0;i<this.length;i++)if(this[i]===v)return i;return-1},lastIndexOf:A.lastIndexOf||function(v){for(var i=this.length-1;i>-1;i--)if(this[i]===v)return i;return-1},first:function(){return arguments.length?g(m,this,arguments):this[0]},last:function(){return arguments.length?g(t,this,arguments):this[this.length-1]},random:function(){return this.length?this[Math.random(this.length-1)]:null},size:function(){return this.length},clean:function(){this.length=0;return this},empty:function(){return!this.length},clone:function(){return this.slice(0)},each:function(){g(n,this,arguments);return this},forEach:n,map:function(){return g(u,this,arguments)},filter:function(){return g(k,this,arguments)},some:function(){return g(w,this,arguments.length?arguments:[function(a){return!!a}])},every:function(){return g(h,this,arguments.length?arguments:[function(a){return!!a}])},walk:function(){this.map.apply(this,arguments).forEach(function(v,a){this[a]=v},this);return this},merge:function(){for(var c=this.clone(),a,i=0,l=arguments.length;i<l;i++){a=arguments[i];if(isArray(a)){for(var j=0;j<a.length;j++)if(c.indexOf(a[j])==-1)c.push(a[j])}else if(c.indexOf(a)==-1)c.push(a)}return c},flatten:function(){var c=[];this.forEach(function(v){if(isArray(v))c=c.concat(v.flatten());else c.push(v)});return c},compact:function(){return this.without(null,undefined)},uniq:function(){return[].merge(this)},includes:function(){for(var i=0,l=arguments.length;i<l;i++)if(this.indexOf(arguments[i])==-1)return false;return true},without:function(){var f=$A(arguments);return this.filter(function(v){return!f.includes(v)})},shuffle:function(){var s=this.clone();for(var j,x,i=s.length;i;j=Math.random(i-1),x=s[--i],s[i]=s[j],s[j]=x);return s},sortBy:function(){var p=q(arguments,this);return this.map(function(b,a){return{item:b,value:p[0].call(p[1],b,a,this)}}).sort(function(c,d){return c.value>d.value?1:c.value<d.value?-1:0}).map('item')}}})(Array.prototype));$alias(Array.prototype,{include:'includes',all:'every',any:'some'});$ext(String.prototype,{empty:function(){return this==''},blank:function(){return/^\s*$/.test(this)},trim:String.prototype.trim||function(){var a=this.replace(/^\s\s*/,''),i=a.length;while(/\s/.test(a.charAt(--i)));return a.slice(0,i+1)},stripTags:function(){return this.replace(/<\/?[^>]+>/ig,'')},stripScripts:function(o){var a='';var t=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/img,function(m,s){a+=s.trim()+"\n";return ''});if(o===true)$eval(a);else if(isFunction(o))o(a,t);else if(isNumber(o))$eval.bind(a).delay(options);return t},extractScripts:function(){var s='';this.stripScripts(function(a,t){s=a});return s},evalScripts:function(){$eval(this.extractScripts());return this},camelize:function(){var p=this.match(/^(\-|_)+?/g)||'';return p+this.substr(p.length,this.length).replace(/(\-|_)+?(\D)/g,function(m){return m.replace(/\-|_/,'').toUpperCase()})},underscored:function(){return this.replace(/([a-z0-9])([A-Z]+)/g,function(m,f,s){return f+"_"+(s.length>1?s:s.toLowerCase())}).replace(/\-/g,'_')},capitalize:function(){return this.replace(/(^|\s|\-|_)[a-z\u00e0-\u00fe\u0430-\u045f]/g,function(m){return m.toUpperCase()})},includes:function(s){return this.indexOf(s)!=-1},startsWith:function(a,i){var s=this.substr(0,a.length);return i?s.toLowerCase()==a.toLowerCase():s==a},endsWith:function(s,i){var e=this.substring(this.length-s.length);return i?e.toLowerCase()==s.toLowerCase():e==s},toInt:function(b){return parseInt(this,b||10)},toFloat:function(s){return parseFloat(s?this:this.replace(',','.').replace(/(\d)-(\d)/g,'$1.$2'))}});$alias(String.prototype,{include:'includes'});$ext(Function.prototype,{bind:function(){if(arguments.length<2&&!defined(arguments[0]))return this;var m=this,a=$A(arguments),s=a.shift();return function(){return m.apply(s,a.concat($A(arguments)))}},bindAsEventListener:function(){var m=this,a=$A(arguments),s=a.shift();return function(e){return m.apply(s,[e||window.event].concat(a).concat($A(arguments)))}},curry:function(){return this.bind.apply(this,[this].concat($A(arguments)))},delay:function(){var a=$A(arguments),t=a.shift();var b=new Number(window.setTimeout(this.bind.apply(this,[this].concat(a)),t));b['cancel']=function(){window.clearTimeout(this)};return b},periodical:function(){var a=$A(arguments),t=a.shift();var b=new Number(window.setInterval(this.bind.apply(this,[this].concat(a)),t));b['stop']=function(){window.clearInterval(this)};return b}});$ext(Number.prototype,{times:function(c,s){for(var i=0;i<this;i++)c.call(s,i);return this},upto:function(n,c,s){for(var i=this+0;i<=n;i++)c.call(s,i);return this},downto:function(n,c,s){for(var i=this+0;i>=n;i--)c.call(s,i);return this},abs:function(){return Math.abs(this)},round:function(){return Math.round(this)},ceil:function(){return Math.ceil(this)},floor:function(){return Math.floor(this)}});$ext(RegExp,{escape:function(s){return String(s).replace(/([.*+?^=!:${}()|[\]\/\\])/g,'\\$1')}});var Class=function(){var a=$A(arguments),b=a.pop()||{},p=a.pop();if(arguments.length==1&&isFunction(b)){p=b;b={}}var k=function(){return this.initialize?this.initialize.apply(this,arguments):this};$ext(k,Class.Methods);Class.Util.catchSuper(k,p);k.prototype.constructor=k;Class.Util.catchExtends(k,b);Class.Util.catchIncludes(k,b);k.include(b);return k};Class.Util={catchSuper:function(k,p){if(p&&defined(p.prototype)){k.parent=p;var s=function(){};s.prototype=p.prototype;k.prototype=new s}k.ancestors=[];while(p){k.ancestors.push(p);p=p.parent}},catchExtends:function(k,p){if(p['extend']){var e=p['extend'];k.extend.apply(k,isArray(e)?e:[e]);delete(p['extend'])}},catchIncludes:function(k,p){if(p['include']){var i=p['include'];k.include.apply(k,isArray(i)?i:[i]);delete(p['include'])}}};Class.Methods={extend:function(){var f=['prototype','name','parent','extend','include'];for(var i=0;i<arguments.length;i++)if(isHash(arguments[i]))for(var k in arguments[i])if(!f.includes(k))this[k]=arguments[i][k];return this},include:function(){for(var i=0;i<arguments.length;i++)if(isHash(arguments[i]))for(var b in arguments[i])if(b!='klass'&&b!='constructor'){var a=this.ancestors.first(function(k){return isFunction(k.prototype[b])});if(a)(function(n,m,$super){this.prototype[n]=function(){this.$super=$super;return m.apply(this,arguments)}}).call(this,b,arguments[i][b],a.prototype[b]);else this.prototype[b]=arguments[i][b]}return this}};var Options={setOptions:function(d){var b=$w('OPTIONS Options options'),c=[this,this.constructor].concat(this.constructor.ancestors),O=c.map(function(o){return b.map(function(n){return o[n]})}).flatten().first(function(a){return!!a});this.options=Object.merge({},O,d);if(isFunction(this.on)){var m;for(var k in this.options)if(m=k.match(/on([A-Z][a-z]+)/)){this.on(m[1].toLowerCase(),this.options[k]);delete(this.options[k])}}return this}};var Observer=new Class({include:Options,initialize:function(o){this.setOptions(o);var a,s=this.EVENTS||this.constructor.EVENTS||((a=this.constructor.ancestors.first('EVENTS'))?a.EVENTS:null);Observer.createShortcuts(this,s)},observe:function(){var b=$A(arguments),d=b.shift();if(!d.trim)for(var n in d)this.observe.apply(this,[n].concat(isArray(d[n])?d[n]:[d[n]]).concat(b));if(!this.$listeners)this.$listeners=[];var c=b.shift();switch(typeof(c)){case "string":c=this[c];case "function":var h={e:d,f:c,a:b};this.$listeners.push(h);if(this.$o&&this.$o.add)this.$o.add.call(this,h);break;default:if(isArray(c))c.each(function(p){this.observe.apply(this,[d].concat(isArray(p)?p:[p]).concat(b))},this)}return this},observes:function(e,c){if(this.$listeners){if(!isString(e)){c=e;e=null}if(isString(c))c=this[c];return this.$listeners.some(function(a){return(e&&c)?a.e==e&&a.f==c:e?a.e==e:a.f==c})}return false},stopObserving:function(e,c){if(this.$listeners){if(!isString(e)){c=e;e=null}if(isString(c))c=this[c];this.$listeners=this.$listeners.filter(function(a){var r=(e&&c)?(a.e!=e||a.f!=c):(e?a.e!=e:a.f!=c);if(!r&&this.$o&&this.$o.remove)this.$o.remove.call(this,a);return r},this)}return this},listeners:function(e){return(this.$listeners||[]).filter(function(a){return!e||a.e==e}).map(function(a){return a.f}).uniq()},fire:function(){var b=$A(arguments),e=b.shift();(this.$listeners||[]).each(function(a){if(a.e==e)(this.$o&&this.$o.fire)?this.$o.fire.call(this,e,b,a):a.f.apply(this,a.a.concat(b))},this);return this},extend:{create:function(o,e){$ext(o,Object.without(this.prototype,'initialize','setOptions'),true);return this.createShortcuts(o,e||o['EVENTS'])},createShortcuts:function(o,a){(a||[]).each(function(n){var s={},m=n.replace(/:/g,'_').camelize();s[m]=function(){return this.fire.apply(this,[n].concat($A(arguments)))};s['on'+m.capitalize()]=function(){return this.on.apply(this,[n].concat($A(arguments)))};$ext(o,s,true)});return o}}});$alias(Observer.prototype,{on:'observe'});var Break=new Class(Error,{message:"Manual iterator break"});var Event=new Class(Event,{extend:{ext:function(e){if(!e.stop){$ext(e,this.Methods,true);if(Browser.IE){if(e.type=='click'||e.type=='dblclick')e.which=1;else if(e.type=='contextmenu')e.which=3;else e.which=e.button==2?3:e.button==4?2:1;var s=window.scrolls();e.pageX=e.clientX+s.x;e.pageY=e.clientY+s.y;e.relatedElement=e.type=='mouseover'?e.fromEvent:e.type=='mouseout'?e.toEvent:null;e.target=e.srcElement}}if(e.target&&e.target.nodeType==3)e.target=e.target.parentNode;return e},cleanName:function(n){n=n.toLowerCase();n=n.startsWith('on')?n.slice(2):n;n=n=='rightclick'?'contextmenu':n;return n},realName:function(n){if(Browser.Gecko&&n=='mousewheel')n='DOMMouseScroll';if(Browser.Konqueror&&n=='contextmenu')n='rightclick';return n},addMethods:function(m){$ext(this.Methods,m);try{$ext(Event.parent.prototype,m,true)}catch(e){}},Methods:{}},initialize:function(n,o){return new Event.Custom(Event.cleanName(n),o)}});Event.addMethods({stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},stop:function(){this.stopPropagation();this.preventDefault();return this},position:function(){return{x:this.pageX,y:this.pageY}}});Event.Custom=new Class({initialize:function(n,o){this.type=n;$ext(this,o||{})},stop:function(){}});window.Element=new Class(window.Element,{initialize:function(t,o){if(Browser.IE&&t=='input'&&o&&o.checked)t='<input checked="true"/>';var e=$(document.createElement(t)),o=o||{};if(o['html']){e.innerHTML=o['html'];delete(o['html'])}if(o['class']){e.className=o['class'];delete(o['class'])}if(o['style']){e.setStyle(o['style']);delete(o['style'])}if(o['observe']){e.observe(o['observe']);delete(o['observe'])}return e.set(o)},extend:{Methods:{},prepare:function(e){if(e&&e.tagName&&!e.set){$ext(e,Element.Methods,true);if(self['Form'])switch(e.tagName){case 'FORM':Form.ext(e);break;case 'INPUT':case 'SELECT':case 'BUTTON':case 'TEXTAREA':Form.Element.ext(e);break}}return e},addMethods:function(m,d){$ext(this.Methods,m,d);try{$ext(HTMLElement.prototype,m,d)}catch(e){try{$ext(this.parent.prototype,m,d)}catch(e){}}return this}}});Element.addMethods({parent:function(c){return c?this.parents(c).first():$(this.parentNode)},parents:function(c){return this.rCollect('parentNode',c)},subNodes:function(c){return this.firstChild?(this.firstChild.tagName?[$(this.firstChild)]:[]).concat(this.rCollect.call(this.firstChild,'nextSibling',c)):[]},siblings:function(c){return this.prevSiblings(c).reverse().concat(this.nextSiblings(c))},nextSiblings:function(c){return this.rCollect('nextSibling',c)},prevSiblings:function(c){return this.rCollect('previousSibling',c)},next:function(c){return this.nextSiblings(c).first()},prev:function(c){return this.prevSiblings(c).first()},match:function(c){return new Selector(c).match(this)},remove:function(){if(this.parentNode)this.parentNode.removeChild(this);return this},insert:function(c,p){if(isHash(c))for(var p in c)this.insert(c[p],p);else{var s='';p=isString(p)?p.toLowerCase():'bottom';if(isString(c))c=c.stripScripts(function(a,h){s=a});Element.insertions[p](this,c.tagName?c:Element.insertions.createFragment.call((p=='bottom'||p=='top'||!this.parentNode)?this:this.parentNode,c));$eval(s)}return this},insertTo:function(e,p){$(e).insert(this,p);return this},replace:function(c){return this.insert(c,'instead')},update:function(c){if(isString(c)){this.innerHTML=c.stripScripts();c.evalScripts()}else this.clean().insert(c);return this},wrap:function(e){if(this.parentNode){this.parentNode.replaceChild(e,this);e.appendChild(this)}return this},clean:function(){while(this.firstChild)this.removeChild(this.firstChild);return this},empty:function(){return this.innerHTML.blank()},rCollect:function(a,c){var n=this,b=[];while((n=n[a]))if(n.tagName&&(!c||new Selector(c).match(n)))b.push(Browser.OLD?Element.prepare(n):n);return b}});Element.insertions={bottom:function(t,c){t.appendChild(c)},top:function(t,c){t.firstChild?t.insertBefore(c,t.firstChild):t.appendChild(c)},after:function(t,c){if(t.parentNode)t.nextSibling?t.parentNode.insertBefore(c,t.nextSibling):t.parentNode.appendChild(c)},before:function(t,c){if(t.parentNode)t.parentNode.insertBefore(c,t)},instead:function(t,c){if(t.parentNode)t.parentNode.replaceChild(c,t)},createFragment:function(c){var f;if(isString(c)){var t=document.createElement('div'),w=Element.insertions.wraps[this.tagName]||['','',0],d=w[2];t.innerHTML=w[0]+c+w[1];while(d>0){t=t.firstChild;d--}f=arguments.callee.call(this,t.childNodes)}else{f=document.createDocumentFragment();if(isNode(c))f.appendChild(c);else if(c&&c.length)for(var i=0,l=c.length;i<l;i++)f.appendChild(c[c.length==l?i:0])}return f},wraps:{TABLE:['<table>','</table>',1],TBODY:['<table><tbody>','</tbody></table>',2],TR:['<table><tbody><tr>','</tr></tbody></table>',3],TD:['<table><tbody><tr><td>','</td></tr></tbody></table>',4],SELECT:['<select>','</select>',1]}};$alias(Element.insertions.wraps,{THEAD:'TBODY',TFOOT:'TBODY',TH:'TD'});Element.addMethods({setStyle:function(h,v){if(v){var s={};s[h]=v;h=s}else if(isString(h)){var s={};h.split(';').each(function(o){var e=o.split(':').map('trim');if(e[0]&&e[1])s[e[0]]=e[1]});h=s}var c;for(var k in h){c=k.indexOf('-')!=-1?k.camelize():k;if(k=='opacity')this.setOpacity(h[k]);else if(k=='float')c=Browser.IE?'styleFloat':'cssFloat';this.style[c]=h[k]}return this},setOpacity:function(v){var k='opacity';if(Browser.IE){k='filter';v='alpha(opacity='+v*100+')'}this.style[k]=v;return this},getStyle:function(k){return this._getStyle(this.style,k)||this._getStyle(this.computedStyles(),k)},computedStyles:function(){return this.currentStyle||this.runtimeStyle||this.ownerDocument.defaultView.getComputedStyle(this,null)||{}},_getStyle:function(s,k){var v,k=k.camelize();switch(k){case 'opacity':v=!Browser.IE?s[k]:(((s['filter']||'').match(/opacity=(\d+)/i)||['','100'])[1].toInt()/100)+'';break;case 'float':k=Browser.IE?'styleFloat':'cssFloat';default:if(s[k])v=s[k];else{var a=$w('top right bottom left').map(function(n){var t=k.underscored().split('_');t.splice(1,0,n);return s[t.join('_').camelize()]}).uniq();if(a.length==1)v=a[0]}if(v&&Browser.Opera&&/color/.test(k)){var m=v.match(/"(.+?)"/);v=m?m[1]:v}}return v?v:null},hasClass:function(n){return(' '+this.className+' ').indexOf(' '+n+' ')!=-1},setClass:function(c){this.className=c;return this},addClass:function(n){if((' '+this.className+' ').indexOf(' '+n+' ')==-1)this.className+=(this.className?' ':'')+n;return this},removeClass:function(n){this.className=(' '+this.className+' ').replace(' '+n+' ',' ').trim();return this},toggleClass:function(n){return this[this.hasClass(n)?'removeClass':'addClass'](n)},radioClass:function(n){this.siblings().each('removeClass',n);return this.addClass(n)}});Element.addMethods({set:function(h,a){if(a){var v={};v[h]=a;h=v}for(var k in h)this[k]=h[k];return this},get:function(n){var v=this.getAttribute(n)||this[n];return v==''?null:v},has:function(n){return this.get(n)!=null},erase:function(n){this.removeAttribute(n);return this},hidden:function(){return this.getStyle('display')=='none'},visible:function(){return!this.hidden()},hide:function(e,o){this._$pd=this.getStyle('display');this.style.display='none';return this},show:function(e,o){var v=this.tagName=='DIV'?'block':'inline';this.style.display=this._$pd=='none'?v:this._$pd||v;return this},toggle:function(e,o){return this[this.hidden()?'show':'hide'](e,o)},radio:function(e,o){this.siblings().each('hide',e,o);return this.show()}});Element.addMethods({sizes:function(){return{x:this.offsetWidth,y:this.offsetHeight}},position:function(){var d=this.dimensions();return{x:d.left,y:d.top}},scrolls:function(){return{x:this.scrollLeft,y:this.scrollTop}},dimensions:function(){var l=0,t=0;if(this.getBoundingClientRect){var r=this.getBoundingClientRect(),d=this.ownerDocument.documentElement,s=window.scrolls();l=r.left+s.x-d.clientLeft;t=r.top+s.y-d.clientTop}else{l=this.offsetLeft;t=this.offsetTop;if(this.getStyle('position')!='absolute'){var b=this.ownerDocument.body,h=b.parentNode;l+=b.offsetLeft+h.offsetLeft;t+=b.offsetTop+h.offsetTop}}return{top:t,left:l,width:this.sizes().x,height:this.sizes().y,scrollLeft:this.scrolls().x,scrollTop:this.scrolls().y}},setWidth:function(w){this.style.width=w+'px';if(this.offsetWidth)this.style.width=(2*w-this.offsetWidth)+'px';return this},setHeight:function(h){this.style.height=h+'px';if(this.offsetHeight)this.style.height=(2*h-this.offsetHeight)+'px';return this},resize:function(w,h){if(isHash(w)){h=w.y;w=w.x}this.setWidth(w);return this.setHeight(h)},moveTo:function(l,t){if(isHash(l)){t=l.y;l=l.x}return this.setStyle({left:l+'px',top:t+'px'})},scrollTo:function(l,t){if(isHash(l)){t=l.y;l=l.x}this.scrollLeft=l;this.scrollTop=t;return this},scrollThere:function(){window.scrollTo(this);return this}});Element.addMethods((function(){var o=Observer.create({},$w('click rightclick contextmenu mousedown mouseup mouseover mouseout mousemove keypress keydown keyup'));o.$o={add:function(h){var c=h.f,a=h.a;h.e=Event.cleanName(h.e);h.n=Event.realName(h.e);h.w=function(){Event.ext(arguments[0]);return c.apply(this,$A(arguments).concat(a))};if(this.addEventListener)this.addEventListener(h.n,h.w,false);else{h.w=h.w.bind(this);this.attachEvent('on'+h.n,h.w)}},remove:function(h){if(this.removeEventListener)this.removeEventListener(h.n,h.w,false);else this.detachEvent('on'+h.n,h.w)},fire:function(n,a,h){var e=new Event(n,a.shift());h.f.apply(this,[e].concat(h.a).concat(a))}};o.stopEvent=function(a){a.stop()};$ext(window,o);$ext(document,o);return o})());[document,(Element.parent||self['HTMLElement']||{}.constructor).prototype].each(function(o,a){var b=o.querySelector;var d=o.querySelectorAll;var s={};if(!b)s.querySelector=function(c){return new Selector(c).first(this)};if(!d)s.querySelectorAll=function(c){return new Selector(c).select(this)};s.first=b?a?function(c){return this.querySelector(this.tagName+' '+(c||'*'))}:function(c){return this.querySelector(c||'*')}:s.querySelector;s.select=d?a?function(c){return $A(this.querySelectorAll(this.tagName+' '+(c||'*')))}:function(c){return $A(this.querySelectorAll(c||'*'))}:s.querySelectorAll;return a?Element.addMethods(s):$ext(o,s)});var Selector=new Class({extend:{cache:{}},initialize:function(a){var c=isString(a)?Selector.cache[a]:a;if(c)return c;Selector.cache[a]=this;this.cssRule=a||'*';var s='Manual';if(this.cssRule.includes(','))s='Multiple';this.strategy=new Selector[s](this.cssRule)},first:Browser.OLD?function(e){var e=this.strategy.first(e);return e?$(e):null}:function(e){return this.strategy.first(e)},select:Browser.OLD?function(e){return this.strategy.select(e).map(Element.prepare)}:function(e){return this.strategy.select(e)},match:function(e){return this.strategy.match(e)}});Selector.Atom=new Class({id:null,tag:'*',classes:[],pseudo:null,pseudoValue:null,attrs:{},rel:' ',ID_RE:/#([\w\-_]+)/,TAG_RE:/^[\w\*]+/,CLASS_RE:/\.([\w\-\._]+)/,PSEUDO_RE:/:([\w\-]+)(\((.+?)\))*$/,ATTRS_RE:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/,initialize:function(c,r){c=c.trim();this.rel=r||' ';this.hasNonTagMatcher=!/^[a-z\*]+$/.test(c);this.attrs={};while((m=c.match(this.ATTRS_RE))){this.attrs[m[1]]={op:m[2],value:m[5]||m[6]};c=c.replace(m[0],'')}if((m=c.match(this.PSEUDO_RE))){this.pseudo=m[1];this.pseudoValue=m[3]==''?null:m[3];c=c.replace(m[0],'')}else{this.pseudo=null;this.pseudoValue=null}this.id=(c.match(this.ID_RE)||[1,null])[1];this.tag=(c.match(this.TAG_RE)||'*').toString().toUpperCase();this.classes=(c.match(this.CLASS_RE)||[1,''])[1].split('.').without('');this.buildMatch()},match:null,buildMatch:function(){var m=[];if(this.id)m.push('matchId');if(this.tag!='*')m.push('matchTag');if(this.classes.length)m.push('matchClass');if(!Object.empty(this.attrs))m.push('matchAttrs');if(this.pseudo)m.push('matchPseudo');if(m.length==1)this.match=this[m[0]];else if(m.length){var l=m.length;this.match=function(e){for(var i=0;i<l;i++)if(!this[m[i]](e))return false;return true}}else this.match=function(){return true}},matchId:function(e){return e.id==this.id},matchTag:function(e){return e.tagName==this.tag},matchClass:function(e){if(e.className){var n=e.className.split(' ');if(n.length==1)return this.classes.indexOf(n[0])!=-1;else{for(var i=0,l=this.classes.length;i<l;i++)if(n.indexOf(this.classes[i])==-1)return false;return true}}return false},matchAttrs:function(e){var m=true;for(var k in this.attrs)m &=this.matchAttr(e,k,this.attrs[k]['op'],this.attrs[k]['value']);return m},matchAttr:function(e,n,o,v){var a=e.getAttribute(n)||'';switch(o){case '=':return a==v;case '*=':return a.includes(v);case '^=':return a.startsWith(v);case '$=':return a.endsWith(v);case '~=':return a.split(' ').includes(v);case '|=':return a.split('-').includes(v);default:return a!=''}return false},matchPseudo:function(e){return this.pseudoMatchers[this.pseudo].call(e,this.pseudoValue,this.pseudoMatchers)},pseudoMatchers:{checked:function(){return this.checked},disabled:function(){return this.disabled},empty:function(){return!(this.innerText||this.innerHTML||this.textContent||'').length},'first-child':function(t){var n=this;while((n=n.previousSibling))if(n.tagName&&(!t||n.tagName==t))return false;return true},'first-of-type':function(){return arguments[1]['first-child'].call(this,this.tagName)},'last-child':function(t){var n=this;while((n=n.nextSibling))if(n.tagName&&(!t||n.tagName==t))return false;return true},'last-of-type':function(){return arguments[1]['last-child'].call(this,this.tagName)},'only-child':function(t,m){return m['first-child'].call(this,t)&&m['last-child'].call(this,t)},'only-of-type':function(){return arguments[1]['only-child'].call(this,this.tagName,arguments[1])},'nth-child':function(d,c,t){if(!c.hasParent(this))return false;d=d.toLowerCase();if(d=='n')return true;if(d.includes('n')){var a=b=0;if(m=d.match(/^([+-]?\d*)?n([+-]?\d*)?$/)){a=m[1]=='-'?-1:parseInt(m[1],10)||1;b=parseInt(m[2],10)||0}var i=1,n=this;while((n=n.previousSibling))if(n.tagName&&(!t||n.tagName==t))i++;return(i-b)% a==0&&(i-b)/a>=0}else return c['index'].call(this,d.toInt()-1,c,t)},'nth-of-type':function(n){return arguments[1]['nth-child'].call(this,n,arguments[1],this.tagName)},index:function(a,m,t){a=isString(a)?a.toInt():a;var n=this,c=0;while((n=n.previousSibling))if(n.tagName&&(!t||n.tagName==t)&&++c>a)return false;return c==a},hasParent:function(e){return e.parentNode&&e.parentNode.id!='-----fake'}}});Selector.Manual=new Class({ATOMS_SPLIT_RE:/(\s*([~>+ ])\s*)(?![^\s\)\]]*(\)|\]))/,initialize:function(c){var c=c.trim();this.cssRule=c;this.atoms=[];var r=null,m=null;while(m=c.match(this.ATOMS_SPLIT_RE)){separator_pos=c.indexOf(m[0]);this.atoms.push(new Selector.Atom(c.substring(0,separator_pos),r));r=m[2];c=c.substr(separator_pos+(m[1].length==1?1:m[1].length-1)).trim()}this.atoms.push(new Selector.Atom(c,r))},first:function(n){return this.select(n).first()},select:function(n){var f,a,c,s;for(var i=0,b=this.atoms.length;i<b;i++){a=this.atoms[i];if(i==0)f=this.find[a.rel](n,a);else{if(i>1)f=this.uniq(f);for(var j=0;j<f.length;j++){s=this.find[a.rel](f[j],a);s.unshift(1);s.unshift(j);f.splice.apply(f,s);j+=s.length-3}}}return this.atoms.length>1?this.uniq(f):f},match:function(e){if(!this.atoms||this.atoms.length>1){if(e.parentNode){var p=e,a;while((p=p.parentNode))a=p}else{var a=document.createElement('div'),b=true;a.id='-----fake';a.appendChild(e)}var m=this.select(a).includes(e);if(b)a.removeChild(e)}else var m=this.atoms[0].match(e);return m},uniq:function(e){var b=[],a=[],u;for(var i=0,l=e.length;i<l;i++){u=$uid(e[i]);if(!a[u]){b.push(e[i]);a[u]=true}}return b},find:{' ':function(e,a){var f=$A(e.getElementsByTagName(a.tag));if(a.hasNonTagMatcher){var m=[];for(var i=0,l=f.length;i<l;i++)if(a.match(f[i]))m.push(f[i]);return m}return f},'>':function(e,a){var n=e.firstChild,m=[];while(n){if(a.match(n))m.push(n);n=n.nextSibling}return m},'+':function(e,a){while((e=e.nextSibling))if(e.tagName)return a.match(e)?[e]:[];return[]},'~':function(e,a){var f=[];while((e=e.nextSibling))if(a.match(e))f.push(e);return f}}});Selector.Multiple=new Class({initialize:function(c){this.cssRule=c;this.selectors=c.split(',').map(function(r){return r.blank()?null:new Selector.Manual(r)}).compact()},first:function(n){return this.selectors.map('first',n).first(function(a){return!!a})},select:function(n){return this.selectors.map('select',n,null).flatten().uniq()},match:function(n){return this.selectors.some('match',n)||!this.selectors.length}});$ext(self,(function(w){var o=w.scrollTo;return{sizes:function(){return this.innerWidth?{x:this.innerWidth,y:this.innerHeight}:{x:document.documentElement.clientWidth,y:document.documentElement.clientHeight}},scrolls:function(){return(this.pageXOffset||this.pageYOffset)?{x:this.pageXOffset,y:this.pageYOffset}:(this.document.body.scrollLeft||this.document.body.scrollTop)?{x:this.document.body.scrollLeft,y:this.document.body.scrollTop}:{x:this.document.documentElement.scrollLeft,y:this.document.documentElement.scrollTop}},scrollTo:function(l,t){if(isElement(l)||(isString(l)&&$(l)))l=$(l).position();if(isHash(l)){t=l.y;l=l.x}o(l,t);return this}}})(window));[window,document].each(function(o){Observer.createShortcuts(o,['ready']);var r=o.ready.bind(o);if(Browser.IE){var t=$E('div');(function(){var l=false;try{document.body.appendChild(t);t.remove();l=true}catch(e){arguments.callee.delay(50)}if(l)r()})()}else if(document['readyState']!==undefined)(function(){$w('loaded complete').includes(document.readyState)?r():arguments.callee.delay(50)})();else document.addEventListener('DOMContentLoaded',r,false)});var Form=new Class(Element,{initialize:function(o){var o=o||{},r=o['remote'],f=this.$super('form',Object.without(o,'remote'));if(r)f.remotize();return f},extend:{ext:function(e){return $ext(e,this.Methods)},Methods:{},addMethods:function(m,d){$ext(Form.Methods,m,d);try{$ext(HTMLFormElement.prototype,m,d)}catch(e){}}}});Form.addMethods({getElements:function(){return this.select('input,select,textarea,button')},inputs:function(){return this.getElements().filter(function(i){return!['submit','button','reset','image',null].includes(i.type)})},focus:function(){var f=this.inputs().first(function(i){return i.type!='hidden'});if(f)f.focus();return this.fire('focus')},blur:function(){this.getElements().each('blur');return this.fire('blur')},disable:function(){this.getElements().each('disable');return this.fire('disable')},enable:function(){this.getElements().each('enable');return this.fire('enable')},values:function(){var v={};this.inputs().each(function(i){if(!i.disabled&&i.name&&(!['checkbox','radio'].includes(i.type)||i.checked))v[i.name]=i.getValue()});return v},serialize:function(){return Object.toQueryString(this.values())}});Form.addMethods(Observer.createShortcuts({},$w('submit reset focus')),true);(function(){try{var i=[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement]}catch(e){var i=[]}Form.Element={ext:function(e){e._blur=e.blur;e._focus=e.focus;e._select=e.select;return $ext(e,this.Methods)},Methods:{},addMethods:function(m,d){$ext(this.Methods,m,d);i.each(function(k){$ext(k.prototype,m,d)})}};i.each(function(k){$alias(k.prototype,{_blur:'blur',_focus:'focus',_select:'select'})})})();Form.Element.addMethods({getValue:function(){if(this.type=='select-multiple')return $A(this.getElementsByTagName('option')).map(function(o){return o.selected?o.value:null}).compact();else return this.value},setValue:function(v){if(this.type=='select-multiple'){v=(isArray(v)?v:[v]).map(String);$A(this.getElementsByTagName('option')).each(function(o){o.selected=v.includes(o.value)})}else this.value=v;return this},disable:function(){this.disabled=true;this.fire('disable');return this},enable:function(){this.disabled=false;this.fire('enable');return this},focus:function(){Browser.OLD?this._focus():this._focus.call(this);this.focused=true;this.fire('focus');return this},select:function(){this.focus();Browser.OLD?this._select():this._select.call(this);return this},blur:function(){Browser.OLD?this._blur():this._blur.call(this);this.focused=false;this.fire('blur');return this}});Form.Element.addMethods(Observer.createShortcuts({},$w('disable enable focus blur change')),true);var Cookie=new Class({include:Options,extend:{set:function(n,v,o){return new this(n,o).set(v)},get:function(n){return new this(n).get()},remove:function(n){return new this(n).remove()},enabled:function(){document.cookie="__t=1";return document.cookie.indexOf("__t=1")!=-1},Options:{secure:false,document:document}},initialize:function(n,o){this.name=n;this.setOptions(o)},set:function(v){var v=encodeURIComponent(v);if(this.options.domain)v+='; domain='+this.options.domain;if(this.options.path)v+='; path='+this.options.path;if(this.options.duration){var d=new Date();d.setTime(d.getTime()+this.options.duration*24*60*60*1000);v+='; expires='+d.toGMTString()}if(this.options.secure)v+='; secure';this.options.document.cookie=this.name+'='+v;return this},get:function(){var v=this.options.document.cookie.match('(?:^|;)\\s*'+RegExp.escape(this.name)+'=([^;]*)');return(v)?decodeURIComponent(v[1]):null},remove:function(){this.options.duration=-1;return this.set('')}});var Xhr=new Class(Observer,{extend:{EVENTS:$w('success failure complete request cancel create'),Options:{headers:{'X-Requested-With':'XMLHttpRequest','Accept':'text/javascript, text/html, application/xml, text/xml, */*'},method:'post',encoding:'utf-8',async:true,evalScripts:false,evalResponse:false,evalJSON:true,secureJSON:true,urlEncoded:true,spinner:null,spinnerFx:'fade',params:null},load:function(u,o){return new this(u,Object.merge({method:'get'},o)).send()}},initialize:function(u,o){this.initCallbacks();this.url=u;this.$super(o);for(var k in Xhr.Options)this[k]=this.options[k];this.initSpinner()},setHeader:function(n,v){this.headers[n]=v;return this},getHeader:function(n){try{return this.xhr.getResponseHeader(n)}catch(e){}},successful:function(){return(this.status>=200)&&(this.status<300)},send:function(p){var a={},u=this.url;var m=this.method.toUpperCase();if(['PUT','DELETE'].includes(m)){a['_method']=m.toLowerCase();m='POST'}var d=this.prepareData(this.params,this.prepareParams(p),a);if(this.urlEncoded&&m=='POST'&&!this.headers['Content-type'])this.setHeader('Content-type','application/x-www-form-urlencoded; charset='+this.encoding);if(m=='GET'){u+=(u.includes('?')?'&':'?')+d;d=null}this.xhr=this.createXhr();this.fire('create');this.xhr.open(m,u,this.async);this.xhr.onreadystatechange=this.stateChanged.bind(this);for(var k in this.headers)this.xhr.setRequestHeader(k,this.headers[k]);this.xhr.send(d);this.fire('request');if(!this.async)this.stateChanged();return this},update:function(e,p){return this.onSuccess(function(a){e.update(a.text)}).send(p)},cancel:function(){if(!this.xhr||this.xhr.canceled)return this;this.xhr.abort();this.xhr.onreadystatechange=function(){};this.xhr.canceled=true;return this.fire('cancel')},fire:function(n){return this.$super(n,this,this.xhr)},createXhr:function(){if(this.form&&this.form.getElements().map('type').includes('file'))return new Xhr.IFramed(this.form);else try{return new XMLHttpRequest()}catch(e){return new ActiveXObject('MSXML2.XMLHTTP')}},prepareParams:function(p){if(p&&p.tagName=='FORM'){this.form=p;p=p.values()}return p},prepareData:function(){return $A(arguments).map(function(p){if(!isString(p))p=Object.toQueryString(p);return p.blank()?null:p}).compact().join('&')},stateChanged:function(){if(this.xhr.readyState!=4||this.xhr.canceled)return;try{this.status=this.xhr.status}catch(e){this.status=0}this.text=this.responseText=this.xhr.responseText;this.xml=this.responseXML=this.xhr.responseXML;this.fire('complete').fire(this.successful()?'success':'failure')},tryScripts:function(r){if(this.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))$eval(this.text);else if((/json/).test(this.getHeader('Content-type'))&&this.evalJSON)this.json=this.responseJSON=this.sanitizedJSON();else if(this.evalScripts)this.text.evalScripts()},sanitizedJSON:function(){if(!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(this.text.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"/g,''))){if(this.secureJSON)throw "JSON parse error: "+this.text;else return null}return eval("("+this.text+")")},initCallbacks:function(){this.on('create','showSpinner').on('complete','hideSpinner').on('cancel','hideSpinner');this.on('success','tryScripts');Xhr.EVENTS.each(function(n){this.on(n,function(){Xhr.fire(n,this,this.xhr)})},this)},initSpinner:function(){if(this.spinner)this.spinner=$(this.spinner);if(Xhr.Options.spinner&&this.spinner===$(Xhr.Options.spinner))this.spinner=null},showSpinner:function(){if(this.spinner)this.spinner.show(this.spinnerFx,{duration:100})},hideSpinner:function(){if(this.spinner)this.spinner.hide(this.spinnerFx,{duration:100})}});Observer.create(Xhr);$ext(Xhr,{counter:0,showSpinner:function(){if(this.Options.spinner)$(this.Options.spinner).show(this.Options.spinnerFx,{duration:100})},hideSpinner:function(){if(this.Options.spinner)$(this.Options.spinner).hide(this.Options.spinnerFx,{duration:100})}});Xhr.on('create',function(){this.counter++;this.showSpinner()}).on('complete',function(){this.counter--;if(this.counter<1)this.hideSpinner()}).on('cancel',function(){this.counter--;if(this.counter<1)this.hideSpinner()});Form.addMethods({send:function(o){o=o||{};o['method']=o['method']||this.method||'post';new Xhr(this.get('action')||document.location.href,o).onRequest(this.disable.bind(this)).onComplete(this.enable.bind(this)).send(this);return this},remotize:function(o){this.onsubmit=function(){this.send.bind(this,Object.merge({spinner:this.first('.spinner')},o)).delay(20);return false};this.remote=true;return this},unremotize:function(){this.onsubmit=function(){};this.remote=false;return this}});Element.addMethods({load:function(u,o){new Xhr(u,Object.merge({method:'get'},o)).update(this);return this}});Xhr.IFramed=new Class({initialize:function(f){this.form=f;var i='xhr_frame_'+Math.random().toString().split('.').last();$E('div').insertTo(document.body).update('<iframe name="'+i+'" id="'+i+'" width="0" height="0" frameborder="0" src="about:blank"></iframe>');this.iframe=$(i);this.iframe.on('load',this.onLoad.bind(this))},send:function(){var o=this.form.onsubmit,a=this.form.target;this.form.onsubmit=function(){};this.form.target=this.iframe.id;this.form.submit();this.form.onsubmit=o;this.form.target=a},onLoad:function(){this.status=200;this.readyState=4;var d=window[this.iframe.id].document.documentElement;this.responseText=d?d.innerHTML:null;this.onreadystatechange()},open:function(){},abort:function(){},setRequestHeader:function(){},onreadystatechange:function(){}});var Fx=new Class(Observer,{extend:{EVENTS:$w('start finish cancel'),Durations:{'short':200,'normal':400,'long':800},Options:{fps:Browser.IE?40:60,duration:'normal',transition:'Sin',queue:true},Transitions:{Sin:function(a){return-(Math.cos(Math.PI*a)-1)/2},Cos:function(a){return Math.asin((a-0.5)*2)/Math.PI+0.5},Exp:function(a){return Math.pow(2,8*(a-1))},Log:function(a){return 1-Math.pow(2,-8*a)},Lin:function(a){return a}}},initialize:function(e,o){this.$super(o);this.element=$(e)},start:function(){if(this.queue(arguments))return this;this.prepare.apply(this,arguments);this.transition=Fx.Transitions[this.options.transition]||this.options.transition;var d=Fx.Durations[this.options.duration]||this.options.duration;this.steps=(d/1000*this.options.fps).ceil();this.number=1;return this.fire('start',this).startTimer()},finish:function(){return this.stopTimer().fire('finish').next()},cancel:function(){return this.stopTimer().fire('cancel').next()},pause:function(){return this.stopTimer()},resume:function(){return this.startTimer()},prepare:function(){},render:function(v){},step:function(t){if(t.steps>=t.number){t.render(t.transition(t.number/t.steps));t.number++}else t.finish()},calc:function(s,e,d){return s+(e-s)*delta},startTimer:function(){this.timer=this.step.periodical((1000/this.options.fps).round(),this);return this},stopTimer:function(){if(this.timer)this.timer.stop();return this},queue:function(a){if(!this.element)return false;if(this.$chained){delete(this['$chained']);return false}var u=$uid(this.element),c;if(!Fx.$chains)Fx.$chains={};if(!Fx.$chains[u])Fx.$chains[u]=[];c=Fx.$chains[u];if(this.options.queue)c.push([a,this]);this.next=function(){var n=c.shift();n=c[0];if(n){n[1].$chained=true;n[1].start.apply(n[1],n[0])}return this};return c[0][1]!==this&&this.options.queue},next:function(){return this}});$ext(Array.prototype,{toRgb:function(){return 'rgb('+this.map(Math.round)+')'}});String.COLORS={maroon:'#800000',red:'#ff0000',orange:'#ffA500',yellow:'#ffff00',olive:'#808000',purple:'#800080',fuchsia:'#ff00ff',white:'#ffffff',lime:'#00ff00',green:'#008000',navy:'#000080',blue:'#0000ff',aqua:'#00ffff',teal:'#008080',black:'#000000',silver:'#c0c0c0',gray:'#808080',brown:'#a52a2a'};$ext(String.prototype,{toHex:function(){var m=this.match(/^#(\w)(\w)(\w)$/);if(m)m="#"+m[1]+m[1]+m[2]+m[2]+m[3]+m[3];else if(m=this.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))m="#"+m.slice(1).map(function(b){b=(b-0).toString(16);return b.length==1?'0'+b:b}).join('');else m=String.COLORS[this]||this;return m},toRgb:function(a){var m=(this.toHex()||'').match(/#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})/i);if(m){m=m.slice(1).map('toInt',16);m=a?m:m.toRgb()}return m}});Fx.Morph=new Class(Fx,{prepare:function(s){this.endStyle=this._findStyle(s);this.startStyle=this._getStyle(this.element,Object.keys(this.endStyle));this._cleanStyles();return this.$super()},render:function(d){var b,s,e;for(var k in this.endStyle){s=this.startStyle[k];e=this.endStyle[k];if(typeof(s)=='number')b=s+(e-s)*d;else if(s.length==2)b=(s[0]+(e[0]-s[0])*d)+e[1];else if(s.length==3)b=e.map(function(v,a){return s[a]+(v-s[a])*d}).toRgb();if(k=='opacity')this.element.setOpacity(b);else this.element.style[k]=b}},_findStyle:function(s){var e=this._dummy().setStyle(s);var c=e.computedStyles();var t=this.element.computedStyles();var d=this._getStyle(e,Object.keys(s),c);var b=c.borderTopStyle,a=t.borderTopStyle;if(b!=a){if(a=='none')this.element.style.borderWidth='0px';this.element.style.borderStyle=b;if(this._transp(t.borderTopColor))this.element.style.borderColor=t.color}e.remove();return d},_dummy:function(){var c=Fx.Morph.$c=(Fx.Morph.$c||$E('div',{style:"visibility:hidden;float:left;height:0;width:0"}));if(this.element.parentNode)this.element.parentNode.insertBefore(c,this.element);return $(this.element.cloneNode(false)).insertTo(c)},_getStyle:function(e,a,b){var s={},b=b||e.computedStyles(),n;if(isString(a))n=a,a=[a];for(var i=0;i<a.length;i++){var k=a[i].camelize();if(k=='background')k='backgroundColor';else if(k=='border'){k='borderWidth';a.splice(i+1,0,'borderColor')}s[k]=e._getStyle(b,k);if(Browser.Opera&&/color/i.test(k))s[k]=s[k].replace(/'|"/g,'');if(this._transp(s[k]))s[k]=this._getBGColor(e);if(!s[k]||s[k]=='auto')s[k]=k=='width'?e.offsetWidth+'px':k=='height'?e.offsetHeight+'px':''}return n?s[n]:s},_getBGColor:function(e){return[e].concat(e.parents()).map(function(n){var b=n.getStyle('backgroundColor');return(b&&!this._transp(b))?b:null},this).compact().first()||'rgb(255,255,255)'},_cleanStyles:function(){var e=this.endStyle,s=this.startStyle;for(var k in e)if(s[k]===''&&/^[\d\.\-]+[a-z]+$/.test(e[k]))s[k]='0px';[e,s].each(this._cleanStyle,this);for(var k in e)if(!defined(s[k])||(e[k]instanceof Array?e[k].join()===s[k].join():e[k]===s[k])){delete(e[k]);delete(s[k])}},_cleanStyle:function(s){var m;for(var k in s){s[k]=String(s[k]);if(/color/i.test(k)){s[k]=s[k].toRgb(true);if(!s[k])delete(s[k])}else if(/^[\d\.]+$/.test(s[k]))s[k]=s[k].toFloat();else if(m=s[k].match(/^([\d\.\-]+)([a-z]+)$/i))s[k]=[m[1].toFloat(),m[2]];else delete(s[k])}},_transp:function(c){return c=='transparent'||c=='rgba(0, 0, 0, 0)'}});Fx.Highlight=new Class(Fx.Morph,{extend:{Options:Object.merge(Fx.Options,{color:'#FF8',transition:'Exp'})},prepare:function(s,e){var a=e||this.element.getStyle('backgroundColor');if(this._transp(a)){this.onFinish(function(){this.element.style.backgroundColor='transparent'});a=this._getBGColor(this.element)}this.element.style.backgroundColor=(s||this.options.color);return this.$super({backgroundColor:a})}});Fx.Twin=new Class(Fx.Morph,{finish:function(){if(this.how=='out')this.element.hide();return this.$super()},setHow:function(h){this.how=h||'toggle';if(this.how=='toggle')this.how=this.element.visible()?'out':'in'}});Fx.Slide=new Class(Fx.Twin,{extend:{Options:Object.merge(Fx.Options,{direction:'top'})},prepare:function(h){this.setHow(h);this.element.show();this.sizes=this.element.sizes();this.styles={};$w('overflow height width marginTop marginLeft').each(function(k){this.styles[k]=this.element.style[k]},this);this.element.style.overflow='hidden';this.onFinish('_getBack').onCancel('_getBack');return this.$super(this._endStyle(this.options.direction))},_getBack:function(){this.element.setStyle(this.styles)},_endStyle:function(d){var b={},s=this.sizes,m=(this.styles.marginLeft||'0').toFloat(),a=(this.styles.marginTop||'0').toFloat();if(this.how=='out'){b[['top','bottom'].includes(d)?'height':'width']='0px';if(d=='right')b.marginLeft=m+s.x+'px';else if(d=='bottom')b.marginTop=a+s.y+'px'}else if(this.how=='in'){var e=this.element.style;if(['top','bottom'].includes(d)){b.height=s.y+'px';e.height='0px'}else{b.width=s.x+'px';e.width='0px'}if(d=='right'){b.marginLeft=m+'px';e.marginLeft=m+s.x+'px'}else if(d=='bottom'){b.marginTop=a+'px';e.marginTop=a+s.y+'px'}}return b}});Fx.Fade=new Class(Fx.Twin,{prepare:function(h){this.setHow(h);if(this.how=='in')this.element.setOpacity(0).show();return this.$super({opacity:typeof(h)=='number'?h:this.how=='in'?1:0})}});Element.addMethods((function(m){var c=m.hide,e=m.show,d=m.resize;return{hide:function(f,o){return f?this.fx(f,['out',o],c):c.call(this)},show:function(f,o){return f?this.fx(f,['in',o],e):e.call(this)},resize:function(w,h,o){if(isHash(w)){h=w.y;w=w.x}if(o){var s={};if(isNumber(h))s.height=h+'px';if(isNumber(w))s.width=w+'px';if(!isHash(o))o={duration:o};return this.fx('morph',[s,o])}else return d.call(this,w,h)},morph:function(s,o){return this.fx('morph',[s,o||{}])},highlight:function(){return this.fx('highlight',arguments)},fade:function(){return this.fx('fade',arguments)},slide:function(){return this.fx('slide',arguments)},fx:function(n,a,o){var a=$A(a).compact(),b={};if(isHash(a.last()))b=a.pop();var f=new Fx[n.capitalize()](this,b);if(o)f.onFinish(o.bind(this));f.start.apply(f,a);return this}}})(Element.Methods));
|
data/lib/right-rails.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#
|
2
|
+
# The plugin/gem is named with the dash symbol, but auto-resolving
|
3
|
+
# feature will be looking for an underscored file. Plus we need to hook
|
4
|
+
# up the initialization script too. So this is just a nasty trick
|
5
|
+
# to make it automatically initialized when you include the plugin as
|
6
|
+
# a gem in your environment.rb without the actual lib option specification
|
7
|
+
#
|
8
|
+
# Copyright (C) 2009 Nikolay V. Nemshilov aka St.
|
9
|
+
#
|
10
|
+
require 'right_rails'
|
11
|
+
require File.dirname(__FILE__) + '/../init.rb'
|
@@ -0,0 +1,85 @@
|
|
1
|
+
#
|
2
|
+
# The ActionController extensions
|
3
|
+
#
|
4
|
+
#
|
5
|
+
module RightRails::ControllerExtensions
|
6
|
+
|
7
|
+
#
|
8
|
+
# This method returns a wrapped RightRails scripts builder
|
9
|
+
#
|
10
|
+
# USAGE:
|
11
|
+
# def create
|
12
|
+
# @zing = Zing.new(params[:zing])
|
13
|
+
#
|
14
|
+
# if @zing.save
|
15
|
+
# flash[:notice] = 'Here you go'
|
16
|
+
# render rjs.insert @zing
|
17
|
+
# else
|
18
|
+
# render rjs.replace_form_for(@zing)
|
19
|
+
# end
|
20
|
+
# end
|
21
|
+
#
|
22
|
+
# def alert_that
|
23
|
+
# render rjs.alert 'that'
|
24
|
+
# end
|
25
|
+
#
|
26
|
+
# def as_a_block
|
27
|
+
# render rjs do |page|
|
28
|
+
# page[:zings].last.hide('slide')
|
29
|
+
# end
|
30
|
+
# end
|
31
|
+
#
|
32
|
+
def rjs(options={}, &block)
|
33
|
+
@template.send(:_evaluate_assigns_and_ivars)
|
34
|
+
|
35
|
+
wrapper = RenderWrapper.new(@template, options)
|
36
|
+
|
37
|
+
if block_given?
|
38
|
+
wrapper.render_block(&block)
|
39
|
+
else
|
40
|
+
wrapper
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# This class wraps the standard JavaScript responses in the controller
|
46
|
+
#
|
47
|
+
# It delegates all the script generating calls to the JavaScriptGenerator
|
48
|
+
# instance, then grabs thre reults and creates a suitable hash of options
|
49
|
+
# for the ActionController::Base#render method
|
50
|
+
#
|
51
|
+
class RenderWrapper
|
52
|
+
def initialize(template, options)
|
53
|
+
@template = template
|
54
|
+
@generator = RightRails::JavaScriptGenerator.new(template)
|
55
|
+
@options = options
|
56
|
+
end
|
57
|
+
|
58
|
+
def render_block(&block)
|
59
|
+
yield(@generator)
|
60
|
+
render
|
61
|
+
end
|
62
|
+
|
63
|
+
def method_missing(name, *args)
|
64
|
+
@generator.send(name, *args)
|
65
|
+
render
|
66
|
+
end
|
67
|
+
|
68
|
+
protected
|
69
|
+
|
70
|
+
#
|
71
|
+
# Compiles the options for the controller#render method
|
72
|
+
#
|
73
|
+
def render
|
74
|
+
result = {:text => @generator.to_s, :content_type => Mime::JS}
|
75
|
+
|
76
|
+
# iframed uploads context overloading
|
77
|
+
if @template.request.content_type == 'multipart/form-data'
|
78
|
+
result.merge! :content_type => Mime::HTML, :layout => 'iframed'
|
79
|
+
end
|
80
|
+
|
81
|
+
result.merge! @options
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|