puffer 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +1 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +12 -0
- data/VERSION +1 -1
- data/app/cells/puffer/base/additional.html.erb +17 -0
- data/app/cells/puffer/base_cell.rb +25 -0
- data/app/controllers/admin/dashboard_controller.rb +12 -0
- data/app/views/admin/dashboard/index.html.erb +1 -0
- data/app/views/layouts/puffer.html.erb +41 -23
- data/app/views/puffer/_form.html.erb +3 -11
- data/app/views/puffer/edit.html.erb +6 -4
- data/app/views/puffer/index.html.erb +11 -38
- data/app/views/puffer/new.html.erb +5 -2
- data/app/views/puffer/show.html.erb +4 -4
- data/config/routes.rb +7 -0
- data/lib/generators/puffer/controller/controller_generator.rb +1 -1
- data/lib/generators/puffer/install/templates/puffer/javascripts/rails-src.js +399 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/rails.js +14 -175
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-calendar-src.js +1461 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-calendar.js +36 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-calendar.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-in-edit-src.js +369 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-in-edit.js +13 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-in-edit.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-lightbox-src.js +905 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-lightbox.js +24 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-lightbox.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-sortable-src.js +428 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-sortable.js +17 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-sortable.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-src.js +5892 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-tabs-src.js +1145 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-tabs.js +29 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right-tabs.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right.js +95 -0
- data/lib/generators/puffer/install/templates/puffer/javascripts/right.js.gz +0 -0
- data/lib/generators/puffer/install/templates/puffer/stylesheets/puffer.css +168 -0
- data/lib/generators/puffer/install/templates/puffer/stylesheets/reset.css +60 -0
- data/lib/puffer.rb +2 -1
- data/lib/puffer/base.rb +15 -14
- data/lib/puffer/controller/config.rb +52 -16
- data/lib/puffer/controller/dsl.rb +27 -29
- data/lib/puffer/controller/helpers.rb +54 -9
- data/lib/puffer/controller/mutate.rb +4 -22
- data/lib/puffer/engine.rb +9 -0
- data/lib/puffer/extensions/controller.rb +5 -3
- data/lib/puffer/extensions/form.rb +14 -0
- data/lib/puffer/extensions/mapper.rb +36 -0
- data/lib/puffer/fields.rb +21 -0
- data/lib/puffer/fields/field.rb +8 -3
- data/lib/puffer/inputs.rb +23 -0
- data/lib/puffer/inputs/association.rb +11 -0
- data/lib/puffer/inputs/base.rb +39 -0
- data/lib/puffer/inputs/boolean.rb +19 -0
- data/lib/puffer/inputs/collection_association.rb +11 -0
- data/lib/puffer/inputs/date_time.rb +16 -0
- data/lib/puffer/inputs/file.rb +11 -0
- data/lib/puffer/inputs/password.rb +11 -0
- data/lib/puffer/inputs/select.rb +11 -0
- data/lib/puffer/inputs/text.rb +11 -0
- data/lib/puffer/path_set.rb +17 -0
- data/lib/puffer/resource.rb +14 -14
- data/puffer.gemspec +75 -8
- data/spec/dummy/app/controllers/admin/categories_controller.rb +4 -0
- data/spec/dummy/app/controllers/admin/posts_controller.rb +4 -0
- data/spec/dummy/app/controllers/admin/profiles_controller.rb +5 -0
- data/spec/dummy/app/controllers/admin/users_controller.rb +4 -0
- data/spec/dummy/app/models/friendship.rb +4 -0
- data/spec/dummy/app/models/profile.rb +2 -0
- data/spec/dummy/app/models/user.rb +7 -0
- data/spec/dummy/app/views/admin/users/index.html.erb +1 -0
- data/spec/dummy/config/puffer.rb +0 -0
- data/spec/dummy/db/migrate/20110107082706_create_friendships.rb +15 -0
- data/spec/dummy/db/schema.rb +9 -1
- data/spec/dummy/public/puffer/javascripts/rails-src.js +399 -0
- data/spec/dummy/public/puffer/javascripts/rails.js +14 -0
- data/spec/dummy/public/puffer/javascripts/right-calendar-src.js +1461 -0
- data/spec/dummy/public/puffer/javascripts/right-calendar.js +36 -0
- data/spec/dummy/public/puffer/javascripts/right-calendar.js.gz +0 -0
- data/spec/dummy/public/puffer/javascripts/right-in-edit-src.js +369 -0
- data/spec/dummy/public/puffer/javascripts/right-in-edit.js +13 -0
- data/spec/dummy/public/puffer/javascripts/right-in-edit.js.gz +0 -0
- data/spec/dummy/public/puffer/javascripts/right-lightbox-src.js +905 -0
- data/spec/dummy/public/puffer/javascripts/right-lightbox.js +24 -0
- data/spec/dummy/public/puffer/javascripts/right-lightbox.js.gz +0 -0
- data/spec/dummy/public/puffer/javascripts/right-sortable-src.js +428 -0
- data/spec/dummy/public/puffer/javascripts/right-sortable.js +17 -0
- data/spec/dummy/public/puffer/javascripts/right-sortable.js.gz +0 -0
- data/spec/dummy/public/puffer/javascripts/right-src.js +5892 -0
- data/spec/dummy/public/puffer/javascripts/right-tabs-src.js +1145 -0
- data/spec/dummy/public/puffer/javascripts/right-tabs.js +29 -0
- data/spec/dummy/public/puffer/javascripts/right-tabs.js.gz +0 -0
- data/spec/dummy/public/puffer/javascripts/right.js +95 -0
- data/spec/dummy/public/puffer/javascripts/right.js.gz +0 -0
- data/spec/dummy/public/puffer/stylesheets/puffer.css +168 -0
- data/spec/dummy/public/puffer/stylesheets/reset.css +60 -0
- data/spec/lib/fields_spec.rb +2 -0
- data/spec/lib/params_spec.rb +55 -54
- metadata +114 -23
- data/lib/generators/puffer/install/templates/puffer/javascripts/application.js +0 -2
- data/lib/generators/puffer/install/templates/puffer/javascripts/controls.js +0 -965
- data/lib/generators/puffer/install/templates/puffer/javascripts/dragdrop.js +0 -974
- data/lib/generators/puffer/install/templates/puffer/javascripts/effects.js +0 -1123
- data/lib/generators/puffer/install/templates/puffer/javascripts/prototype.js +0 -6001
- data/lib/puffer/railtie.rb +0 -5
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* Tabs widget for RightJS (http://rightjs.org/ui/tabs)
|
3
|
+
*
|
4
|
+
* Copyright (C) 2009-2010 Nikolay Nemshilov
|
5
|
+
*/
|
6
|
+
var Tabs=RightJS.Tabs=function(n,t,e){function u(){return h(e.Cookie?(v.get("right-tabs-indexes")||"").split(","):[])}function z(a,b,c){if(e.Cookie){var f=u();f=f.without.apply(f,b.map("id"));f.push(c.target.id);v.set("right-tabs-indexes",f.uniq().join(","),a)}}var h=e,r=e.$,A=e.$w,g=e.$E,B=e.Fx,C=e.Object,D=e.Browser,E=e.isArray,F=e.isNumber,w=e.Class,s=e.Element,v=e.Cookie,G=new e.Class(e.Element,{initialize:function(a){this.$super("div",{"class":"rui-spinner"});this.dots=[];for(var b=0;b<(a||4);b++)this.dots.push(new e.Element("div"));
|
7
|
+
this.dots[0].addClass("glowing");this.insert(this.dots);e(this.shift).bind(this).periodical(300)},shift:function(){if(this.visible()){var a=this.dots.pop();this.dots.unshift(a);this.insert(a,"top")}}}),j=new (function(a,b){if(!b){b=a;a="DIV"}var c=new e.Class(e.Element.Wrappers[a]||e.Element,{initialize:function(f,d){this.key=f;var i=[{"class":"rui-"+f}];this instanceof e.Input||this instanceof e.Form||i.unshift(a);this.$super.apply(this,i);if(e.isString(d))d=e.$(d);if(d instanceof e.Element){this._=
|
8
|
+
d._;if("$listeners"in d)d.$listeners=d.$listeners;d={}}this.setOptions(d,this);return e.Wrapper.Cache[e.$uid(this._)]=this},setOptions:function(f,d){d=d||this;e.Options.setOptions.call(this,e.Object.merge(f,eval("("+(d.get("data-"+this.key)||"{}")+")")));return this}});c=new e.Class(c,b);e.Observer.createShortcuts(c.prototype,c.EVENTS||[]);return c})("UL",{extend:{version:"2.2.0",EVENTS:A("select hide load disable enable add remove move"),Options:{idPrefix:"",tabsElement:null,resizeFx:"both",resizeDuration:400,
|
9
|
+
scrollTabs:false,scrollDuration:400,selected:null,disabled:null,closable:false,loop:false,loopPause:true,url:false,cache:false,Xhr:null,Cookie:null},rescan:function(a){r(a||n).find(".rui-tabs,*[data-tabs]").each(function(b){b instanceof j||new j(b)})}},initialize:function(a,b){this.$super("tabs",a).setOptions(b).addClass("rui-tabs");this.isHarmonica=this._.tagName==="DL";this.isCarousel=this.hasClass("rui-tabs-carousel");this.isSimple=!this.isHarmonica&&!this.isCarousel;this.findTabs().initScrolls().findCurrent().setStyle("visibility:visible");
|
10
|
+
this.options.disabled&&this.disable(this.options.disabled);this.options.loop&&this.startLoop()},select:function(a){return this.callTab(a,"select")},disable:function(a){return this.callTab(a,"disable")},enable:function(a){return this.callTab(a,"enable")},current:function(){return this.tabs.first("current")},enabled:function(){return this.tabs.filter("enabled")},callTab:function(a,b){h(E(a)?a:[a]).each(function(c){if(F(c))c=this.tabs[c];c&&c instanceof o&&c[b]()},this);return this},findTabs:function(){this.tabsList=
|
11
|
+
this.isHarmonica?this:r(this.options.tabsElement)||this.first(".rui-tabs-list")||(this.first("UL")||g("UL").insertTo(this)).addClass("rui-tabs-list");this.tabs=h([]);this.tabsList.children(this.isHarmonica?"dt":null).map(function(c){this.tabs.push(new o(c,this))},this);for(var a=0,b=this.tabsList.get("childNodes");a<b.length;a++)b[a].nodeType==3&&this.tabsList._.removeChild(b[a]);return this}}),o=j.Tab=new w(s,{extend:{autoId:0},initialize:function(a,b){this.$super(a._);this.addClass("rui-tabs-tab");
|
12
|
+
this.main=b;this.link=this.first("a");this.id=this.link.get("href").split("#")[1]||o.autoId++;this.panel=new H(this.findPanel(),this);this.current()&&this.select();b.options.closable&&this.link.insert(g("div",{"class":"rui-tabs-tab-close-icon",html:"×"}).onClick(h(this.remove).bind(this)));this.onClick(this._clicked)},select:function(){if(this.enabled()){var a=this.main.current();a&&a.removeClass("rui-tabs-current").fire("hide");this.addClass("rui-tabs-current");this.main.scrollToTab(this);
|
13
|
+
this.panel.show()}return this.fire("select")},disable:function(){return this.addClass("rui-tabs-disabled").fire("disable")},enable:function(){return this.removeClass("rui-tabs-disabled").fire("enable")},disabled:function(){return!this.enabled()},enabled:function(){return!this.hasClass("rui-tabs-disabled")},current:function(){return this.hasClass("rui-tabs-current")},remove:function(a){a&&a.stop();if(this.current()){a=this.main.enabled();(a=a[a.indexOf(this)+1]||a[a.indexOf(this)-1])&&a.select()}this.main.tabs.splice(this.main.tabs.indexOf(this),
|
14
|
+
1);this.panel.remove();return this.$super().fire("remove")},_clicked:function(a){a.stop();return this.select()},findPanel:function(){var a=this.main,b=a.options.idPrefix+this.id;if(a.isHarmonica)a=(a=this.next())&&a._.tagName==="DD"?a:g("DD").insertTo(this,"after");else a=r(b)||g(a._.tagName==="UL"?"LI":"DIV").insertTo(a);return a.set("id",b)},width:function(){var a=this.next();return a?a.position().x-this.position().x:this.size().x+1}}),H=j.Panel=new w(s,{initialize:function(a,b){this.$super(a._);
|
15
|
+
this.addClass("rui-tabs-panel");this.tab=b;this.id=this.get("id")},show:function(){return this.resizing(function(){this.tab.main.find(".rui-tabs-panel").each(function(a){a[a===this?"addClass":"removeClass"]("rui-tabs-current")},this)})},update:function(a){this.tab.current()?this.resizing(function(){s.prototype.update.call(this,a||"")}):this.$super(a||"");return this},lock:function(){this.insert(this.locker(),"top")},resizing:function(a){var b=this.tab.main;if(b.__working)return this.resizing.bind(this,
|
16
|
+
a).delay(100);var c=b.options,f=b.first(".rui-tabs-panel.rui-tabs-current"),d=this,i=f!==d,q=this.first("div.rui-tabs-panel-locker");d.parent().hasClass("rui-tabs-resizer")&&d.insertTo(f.parent());if(c.resizeFx&&e.Fx&&f&&(i||q)){b.__working=true;var m=c.resizeFx==="both"&&q?"slide":c.resizeFx,k=c.resizeDuration;k=B.Durations[k]||k;c=m==="fade"?0:m==="slide"?k:k/2;q=k-c;m!=="slide"&&d.setStyle({opacity:0});k=b.isHarmonica&&i?0:f.size().y;a.call(this);a=d.size().y;var l=null,p=null,x=null;if(m!=="fade"&&
|
17
|
+
k!==a){b._.style.height=b.size().y+"px";l=g("div",{"class":"rui-tabs-resizer",style:"height: "+k+"px"});if(b.isHarmonica&&i){f.addClass("rui-tabs-current");p=g("div",{"class":"rui-tabs-resizer"});p._.style.height=f.size().y+"px";x=function(){p.replace(f.removeClass("rui-tabs-current"))};f.wrap(p);l._.style.height="0px"}d.wrap(l);b._.style.height="auto"}else{rezise_duration=0;k=q}var y=0;i=function(){if(l){if(m=="both"&&!y)return y++;l.replace(d)}b.__working=false};p&&p.morph({height:"0px"},{duration:c,
|
18
|
+
onFinish:x});l&&l.morph({height:a+"px"},{duration:c,onFinish:i});m!=="slide"&&d.morph.bind(d,{opacity:1},{duration:q,onFinish:i}).delay(c);!l&&m==="slide"&&i()}else a.call(this);return this},locker:function(){return this._locker||(this._locker=g("div",{"class":"rui-tabs-panel-locker"}).insert(new G(5)))}});j.include({next:function(){return this.pickTab(+1)},prev:function(){return this.pickTab(-1)},scrollLeft:function(){this.prevButton.hasClass("rui-tabs-scroller-disabled")||this[this.isCarousel?"prev":
|
19
|
+
"justScroll"](+0.6);return this},scrollRight:function(){this.nextButton.hasClass("rui-tabs-scroller-disabled")||this[this.isCarousel?"next":"justScroll"](-0.6);return this},initScrolls:function(){if(this.scrollable=this.options.scrollTabs||this.isCarousel)this.buildScroller();return this},buildScroller:function(){if(!((this.prevButton=this.first(".rui-tabs-scroller-prev"))&&(this.nextButton=this.first(".rui-tabs-scroller-next")))){this.prevButton=g("div",{"class":"rui-tabs-scroller-prev",html:"«"});
|
20
|
+
this.nextButton=g("div",{"class":"rui-tabs-scroller-next",html:"»"});g("div").insertTo(this.tabsList,"before").replace(g("div",{"class":"rui-tabs-scroller"}).insert([this.prevButton,this.nextButton,this.scroller=g("div",{"class":"rui-tabs-scroller-body"}).insert(this.tabsList)])).remove()}this.prevButton.onClick(h(this.scrollLeft).bind(this));this.nextButton.onClick(h(this.scrollRight).bind(this))},pickTab:function(a){var b=this.current();if(b&&b.enabled()){var c=this.enabled();(a=c[c.indexOf(b)+
|
21
|
+
a])&&a.select()}},scrollToTab:function(a){if(this.scroller){for(var b=0,c=0;c<this.tabs.length;c++){b+=this.tabs[c].width();if(this.tabs[c]===a)break}c=this.scroller.size().x;var f=(this.isCarousel?c/2+a.width()/2:c)-b;if(!this.isCarousel){var d=t(this.tabsList.getStyle("left")||0,10);if(f>=d&&f<d+c-a.width())f=d;else if(d>-b&&d<=a.width()-b)f=a.width()-b}this.scrollTo(f)}},justScroll:function(a){if(!this.scroller)return this;var b=t(this.tabsList.getStyle("left")||0,10),c=this.scroller.size().x;
|
22
|
+
this.scrollTo(b+c*a)},scrollTo:function(a){var b=this.scroller.size().x,c=this.tabs.map("width").sum();if(a<b-c)a=b-c;if(a>0)a=0;this.tabsList.morph({left:a+"px"},{duration:this.options.scrollDuration});this.checkScrollButtons(c,b,a)},checkScrollButtons:function(a,b,c){var f=false,d=false;if(this.isCarousel){a=this.enabled();if(b=a.first("current")){d=a.indexOf(b);f=d>0;d=d<a.length-1}}else{f=c!==0;d=c>b-a}this.prevButton[f?"removeClass":"addClass"]("rui-tabs-scroller-disabled");this.nextButton[d?
|
23
|
+
"removeClass":"addClass"]("rui-tabs-scroller-disabled")}});j.include({findCurrent:function(){var a=this.enabled();(a=this.tabs[this.options.selected]||this.tabs[this.urlIndex()]||this.tabs[this.cookieIndex()]||a.first("current")||a[0])&&a.select();this.options.Cookie&&this.onSelect(h(z).curry(this.options.Cookie,this.tabs));return this},urlIndex:function(){var a=-1,b=n.location.href.split("#")[1];if(b)for(var c=0;c<this.tabs.length;c++)if(this.tabs[c].id==b){a=c;break}return a},cookieIndex:function(){var a=
|
24
|
+
-1;if(this.options.Cookie)for(var b=u(),c=0;c<this.tabs.length;c++)if(b.include(this.tabs[c].id)){a=c;break}return a}});j.include({add:function(a,b,c){c=c||{};a=g(this.isHarmonica?"dt":"li").insert(g("a",{html:a,href:c.url||"#"+(c.id||"")})).insertTo(this.tabsList);a=new o(a,this);a.panel.update(b||"");this.tabs.push(a);a.fire("add");"position"in c&&this.move(a,c.position);return this},move:function(a,b){a=this.tabs[a]||a;if(this.tabs[b]&&this.tabs[b]!==a){this.tabs[b].insert(a,b===this.tabs.length-
|
25
|
+
1?"after":"before");this.isHarmonica&&a.insert(a.panel,"after");this.tabs.splice(this.tabs.indexOf(a),1);this.tabs.splice(b,0,a);a.fire("move",{index:b})}return this},remove:function(a){return this.callTab(a,"remove")}});var I=o.prototype.select;o.include({select:function(){if(this.dogPiling(arguments))return this;var a=I.apply(this,arguments),b=h(this.link.get("href")),c=this.main.options;if(b.includes("#"))b=c.url?c.url.replace("%{id}",b.split("#")[1]):null;if(b&&!this.request&&!(c.cache||this.cache)){this.panel.lock();
|
26
|
+
try{this.request=(new e.Xhr(b,C.merge({method:"get"},c.Xhr))).onComplete(h(function(d){if(this.main.__working)return arguments.callee.bind(this,d).delay(100);this.panel.update(d.text);this.request=null;if(c.cache)this.cache=true;this.fire("load")}).bind(this)).send()}catch(f){if(!D.OLD)throw f;}}return a},dogPiling:function(a){if(this.main.__working){this.main.__timeout&&this.main.__timeout.cancel();this.main.__timeout=h(function(b){this.select.apply(this,b)}).bind(this,a).delay(100);return true}return this.main.__timeout=
|
27
|
+
null}});j.include({startLoop:function(a){if(!a&&!this.options.loop)return this;if(this.options.loopPause){this._stopLoop=this._stopLoop||h(this.stopLoop).bind(this,true);this._startLoop=this._startLoop||h(this.startLoop).bind(this,a);this.forgetHovers().on({mouseover:this._stopLoop,mouseout:this._startLoop})}this.timer&&this.timer.stop();this.timer=h(function(){var b=this.enabled(),c=this.current();this.select(b[b.indexOf(c)+1]||b.first())}).bind(this).periodical(this.options.loop||a);return this},
|
28
|
+
stopLoop:function(a,b){if(this.timer){this.timer.stop();this.timer=null}!b&&this._startLoop&&this.forgetHovers()},forgetHovers:function(){return this.stopObserving("mouseover",this._stopLoop).stopObserving("mouseout",this._startLoop)}});r(n).onReady(function(){j.rescan()});(function(){var a=n.createElement("style"),b=n.createTextNode("div.rui-spinner,div.rui-spinner div{margin:0;padding:0;border:none;background:none;list-style:none;font-weight:normal;float:none;display:inline-block; *display:inline; *zoom:1;border-radius:.12em;-moz-border-radius:.12em;-webkit-border-radius:.12em}div.rui-spinner{text-align:center;white-space:nowrap;background:#EEE;border:1px solid #DDD;height:1.2em;padding:0 .2em}div.rui-spinner div{width:.4em;height:70%;background:#BBB;margin-left:1px}div.rui-spinner div:first-child{margin-left:0}div.rui-spinner div.glowing{background:#777}.rui-tabs,.rui-tabs-list,.rui-tabs-tab,.rui-tabs-panel,.rui-tabs-scroll-left,.rui-tabs-scroll-right,.rui-tabs-scroll-body,.rui-tabs-panel-locker,.rui-tabs-resizer{margin:0;padding:0;background:none;border:none;list-style:none;display:block;width:auto;height:auto}.rui-tabs{display:block;visibility:hidden;border-bottom:1px solid #CCC}.rui-tabs-resizer{overflow:hidden}.rui-tabs-list{display:block;position:relative;padding:0 .5em;border-bottom:1px solid #CCC;white-space:nowrap}.rui-tabs-list .rui-tabs-tab,.rui-tabs-tab *,.rui-tabs-tab *:hover{display:inline-block; *display:inline; *zoom:1;cursor:pointer;text-decoration:none;vertical-align:center}.rui-tabs-list .rui-tabs-tab{vertical-align:bottom;margin-right:.1em}.rui-tabs-tab a{outline:none;position:relative;border:1px solid #CCC;background:#DDD;color:#444;padding:.3em 1em;border-radius:.3em;-moz-border-radius:.3em;-webkit-border-radius:.3em;border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0}.rui-tabs-tab a:hover{border-color:#CCC;background:#EEE}.rui-tabs-list .rui-tabs-current a,.rui-tabs-list .rui-tabs-current a:hover{font-weight:bold;color:#000;background:#FFF;border-bottom:1px solid #FFF;border-top-width:2px;padding-top:.34em;padding-bottom:.34em;top:1px}.rui-tabs-tab a img{border:none;opacity:.6;filter:alpha(opacity=60)}.rui-tabs-tab a:hover img,.rui-tabs-list .rui-tabs-current a img{opacity:1;filter:alpha(opacity=100)}.rui-tabs-disabled a,.rui-tabs-disabled a:hover{background:#EEE;border-color:#DDD;color:#AAA;cursor:default}.rui-tabs-disabled a img,.rui-tabs-disabled a:hover img{opacity:.5;filter:alpha(opacity=50)}.rui-tabs-tab-close-icon{display:inline-block; *display:inline; *zoom:1;margin-right:-0.5em;margin-left:0.5em;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)}.rui-tabs-tab-close-icon:hover{opacity:1;filter:alpha(opacity=100);color:#B00;text-shadow:#888 .15em .15em .2em}.rui-tabs-panel{display:none;position:relative;min-height:4em;padding:.5em 0}.rui-tabs-current{display:block}.rui-tabs-scroller{position:relative;padding:0 1.4em}.rui-tabs-scroller-prev,.rui-tabs-scroller-next{width:1.1em;text-align:center;background:#EEE;color:#666;cursor:pointer;border:1px solid #CCC;border-radius:.2em;-moz-border-radius:.2em;-webkit-border-radius:.2em;position:absolute;bottom:0px;left:0px;padding:0.3em 0;user-select:none;-moz-user-select:none;-webkit-user-select:none}.rui-tabs-scroller-prev:hover,.rui-tabs-scroller-next:hover{color:#000;background:#DDD;border-color:#AAA}.rui-tabs-scroller-prev:active,.rui-tabs-scroller-next:active{background:#eee;border-color:#ccc}.rui-tabs-scroller-next{left:auto;right:0px}.rui-tabs-scroller-disabled,.rui-tabs-scroller-disabled:hover{cursor:default;background:#DDD;border-color:#DDD;color:#AAA}.rui-tabs-scroller-body{overflow:hidden;width:100%;position:relative}.rui-tabs-scroller .rui-tabs-list{padding-left:0;padding-right:0;width:9999em;z-index:10}.rui-tabs-panel-locker{position:absolute;top:0px;left:0px;opacity:0.5;filter:alpha(opacity=50);background:#CCC;width:100%;height:100%;text-align:center}.rui-tabs-panel-locker .rui-spinner{position:absolute;left:44%;top:44%;background:none;border:none;height:2em}.rui-tabs-panel-locker .rui-spinner div{background:#666;width:.65em;margin-left:.15em}.rui-tabs-panel-locker .rui-spinner div.glowing{background:#000}.rui-tabs-carousel .rui-tabs-list{border:none}.rui-tabs-carousel .rui-tabs-tab a,.rui-tabs-carousel .rui-tabs-scroller .rui-tabs-scroller-prev,.rui-tabs-carousel .rui-tabs-scroller .rui-tabs-scroller-next{height:6em;line-height:6em;padding:0;border-bottom:1px solid #ccc;border-radius:.25em;-moz-border-radius:.25em;-webkit-border-radius:.25em}.rui-tabs-carousel .rui-tabs-tab{margin-right:3px}.rui-tabs-carousel .rui-tabs-tab a img{border:1px solid #CCC;vertical-align:middle;margin:.4em;padding:0;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0}.rui-tabs-carousel .rui-tabs-list .rui-tabs-current a{border-width:1px;border-color:#AAA;padding:0;top:auto}.rui-tabs-carousel .rui-tabs-list .rui-tabs-current a img{border-color:#bbb}.rui-tabs-carousel .rui-tabs-panel{text-align:center}dl.rui-tabs{border:none}dt.rui-tabs-tab,dt.rui-tabs-tab a,dt.rui-tabs-tab a:hover{display:block;float:none}dt.rui-tabs-tab a,dt.rui-tabs-tab a:hover{padding:.2em 1em;border:1px solid #ccc;border-radius:.25em;-moz-border-radius:.3em;-webkit-border-radius:.3em}dl.rui-tabs dt.rui-tabs-current a{background:#EEE;border-bottom-left-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0}dl.rui-tabs dd.rui-tabs-current+dt.rui-tabs-tab a{border-top-left-radius:0;border-top-right-radius:0;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0}");
|
29
|
+
a.type="text/css";if(a.styleSheet)a.styleSheet.cssText=b.nodeValue;else a.appendChild(b);n.getElementsByTagName("head")[0].appendChild(a)})();return j}(document,parseInt,RightJS);
|
Binary file
|
@@ -0,0 +1,95 @@
|
|
1
|
+
/**
|
2
|
+
* RightJS, http://rightjs.org
|
3
|
+
* Released under the MIT license
|
4
|
+
*
|
5
|
+
* Copyright (C) 2008-2010 Nikolay Nemshilov
|
6
|
+
*/
|
7
|
+
var RightJS=function(u,l,s,O,w,X,da,q){function E(a){return J(a)?a:[a]}function wa(a,b){var c=a[0],d=P.call(a,1),e=b,f;if(typeof c==="string"){f=c;c=b.length!==0&&typeof b[0][f]==="function"?function(g){return g[f].apply(g,d)}:function(g){return g[f]}}else e=d[0];return[c,e]}function ea(){}function F(a,b,c){try{return a.apply(b,wa(c,b))}catch(d){if(!(d instanceof ea))throw d;}}function xa(a){return!!a}function ya(a,b){return a>b?1:a<b?-1:0}function za(a,b){return s.without.apply(s,[a].concat(fa.concat(b?
|
8
|
+
G("prototype parent ancestors"):["constructor"])))}function Aa(a,b,c){(b[fa[c?0:2]]||b[fa[c?1:3]]||function(){}).call(b,a)}function ga(a,b){var c=b.toUpperCase(),d=a.constructor;d=[a,d].concat(d.ancestors||[]);for(var e=0;e<d.length;e++)if(c in d[e])return d[e][c];else if(b in d[e])return d[e][b];return null}function Ba(a){"prebind"in a&&J(a.prebind)&&a.prebind.each(function(b){a[b]=a[b].bind(a)})}function Ca(a,b,c){var d=P.call(b,2),e=b[0],f=b[1],g=false;if(B(e))switch(typeof f){case "string":g=
|
9
|
+
f;f=f in a?a[f]:function(){};case "function":("$listeners"in a?a.$listeners:a.$listeners=[]).push(c({e:e,f:f,a:d,r:g||false,t:a}));break;default:if(J(f))for(b=0;b<f.length;b++)a.on.apply(a,[e].concat(E(f[b])).concat(d))}else{d=P.call(b,1);for(g in e)a.on.apply(a,[g].concat(E(e[g])).concat(d))}}function Da(a,b,c,d){if(r(b))for(var e in b)a.stopObserving(e,b[e]);else{if(!B(b)){c=b;b=null}if(B(c))c=a[c];a.$listeners=(a.$listeners||[]).filter(function(f){var g=b&&c?f.e!==b||f.f!==c:b?f.e!==b:f.f!==c;
|
10
|
+
g||d(f);return g})}}function bb(){return function(a,b){Ba(this);this.initialize(a,b);var c=this._;c=A in c?c[A]:c[A]=(c.nodeType===1?1:-1)*ha++;K[c]=this}}function Ea(a,b){if(typeof a==="string"){a=m({type:a},b);this.stopped=a.bubbles===false;r(b)&&m(this,b)}this._=a;this.type=a.type;this.which=a.which;this.keyCode=a.keyCode;this.target=t("target"in a&&"nodeType"in a.target&&a.target.nodeType===3?a.target.parentNode:a.target);this.currentTarget=t(a.currentTarget);this.relatedTarget=t(a.relatedTarget);
|
11
|
+
this.pageX=a.pageX;this.pageY=a.pageY;if(!("target"in a)&&"srcElement"in a){this.which=a.button==2?3:a.button==4?2:1;this.target=t(a.srcElement)||b;this.relatedTarget=this.target._===a.fromElement?t(a.toElement):this.target;this.currentTarget=b;var c=this.target.win().scrolls();this.pageX=a.clientX+c.x;this.pageY=a.clientY+c.y}}function t(a){if(a!==null&&a!==undefined){var b=A in a?K[a[A]]:undefined;if(b!==undefined)return b;else if(a.nodeType===1)return new n(a);else if(a.nodeType===9)return new I(a);
|
12
|
+
else if(a.window==a)return new Y(a);else if(Z(a.target)||Z(a.srcElement))return new L(a)}return a}function Fa(a,b,c){if(typeof b==="string"){a._=Ga(b,c);if(c!==undefined)for(var d in c)switch(d){case "id":a._.id=c[d];break;case "html":a._.innerHTML=c[d];break;case "class":a._.className=c[d];break;case "on":a.on(c[d]);break;default:a.set(d,c[d])}}else a._=b}function ia(a,b,c){a=a._;for(var d=[],e=0,f=!c;a=a[b];)if(a.nodeType===1&&(f||t(a).match(c)))d[e++]=t(a);return d}function cb(a){if(typeof a===
|
13
|
+
"string"){var b=this.tagName,c=db,d=Ha[b]||["","",1],e=d[2];for(c.innerHTML=d[0]+"<"+b+">"+a+"</"+b+">"+d[1];e-- >0;)c=c.firstChild;a=c.childNodes}b=0;for(c=a.length;b<c;b++){d=a[a.length===c?b:0];Ia.appendChild(d instanceof n?d._:d)}return Ia}function Ja(a,b){var c,d=b.camelize();switch(d){case "opacity":c=!y?a[d].replace(",","."):(/opacity=(\d+)/i.exec(a.filter||"")||["","100"])[1].toInt()/100+"";break;case "float":d=y?"styleFloat":"cssFloat";default:c=a[d];if(Q&&/color/i.test(d)&&c)c=c.replace(/"/g,
|
14
|
+
"")}return c||null}function ja(a){a=G(a);ka=ka.concat(a);M(n.prototype,a);M(I.prototype,a)}function $(a){var b=new L(a),c=b.target;c=c.parent&&c.parent();b.type=a.type==="focusin"||a.type==="focus"?"focus":"blur";c&&c.fire(b)}function la(a,b,c,d){a=new L(a);a.type=d===true?"mouseenter":"mouseleave";a.bubbles=false;a.target=t(b);a.find=function(e){return ma(e,true).indexOf(this.target._)===-1?undefined:this.target};a.target.fire(a);N.fire(a)}function Ka(a){for(var b=a.relatedTarget||a.fromElement,
|
15
|
+
c=a.target||a.srcElement,d=false,e=[],f;c.nodeType===1;){f=aa(c);if(R[f]===undefined)la(a,c,f,R[f]=true);if(c===b)d=true;e.push(c);c=c.parentNode}if(b&&!d)for(;b.nodeType===1&&e.indexOf(b)===-1;){f=aa(b);if(R[f]!==undefined)la(a,b,f,R[f]=undefined);b=b.parentNode}}function La(a){R.each(function(b,c){b&&K[c]&&la(a,K[c]._,c,false)})}function eb(a,b){var c=i(b),d=c.shift();return function(e){var f=e.find(a);return f===undefined?f:typeof d==="string"?f[d].apply(f,c):d.apply(f,[e].concat(c))}}function Ma(a){a=
|
16
|
+
i(a);var b=a[1]||{},c={},d;if(B(b)){c[b]=a.slice(2);if(J(c[b][0]))c[b]=c[b][0].map(E)}else c=b;for(d in c){c[d]=E(c[d]);c[d]=J(c[d][0])?c[d]:[c[d]]}return c}function Na(a,b){var c=a[0],d,e,f=Ma(a),g=!s.keys(f).length;return(b.$listeners||[]).filter(function(o){return o.dr&&o.n===c&&(g||function(){for(var x in f)if(o.dr===x){d=0;for(e=f[x];d<e.length;d++)if(!e[d].length||e[d][0]===o.dc)return true}return false}())})}function na(a,b){a.stop();this.send(m({spinner:this.first(".spinner")},b))}function Oa(a){var b=
|
17
|
+
a.cr;b&&b.splice(b.indexOf(a),1)}function fb(a,b,c,d){var e=1;a._timer=setInterval(function(){if(e>d)a.finish();else{a.render(b(e/d));e++}},c)}function C(a,b,c){c=i(c).compact();var d=r(c.last())?c.pop():{};b=new (p[b.capitalize()])(a,d);b.start.apply(b,c);return a}function gb(a){function b(){for(var g in f)e[g]=f[g]}var c=this.options,d=this.element,e=d._.style,f=s.only(d.computedStyles(),oa,Pa,Qa);this.onFinish(b).onCancel(function(){e[oa]="none";setTimeout(b,1)});e[oa]="all";e[Pa]=(p.Durations[c.duration]||
|
18
|
+
c.duration)+"ms";e[Qa]=hb[c.transition]||c.transition;setTimeout(function(){d.setStyle(a)},0)}function ib(a){var b=[],c=["Style","Color","Width"],d,e,f;for(d in a)if(d.startsWith("border"))for(e=0;e<3;e++)for(f=0;f<4;f++)b.push("border"+S[f]+c[e]);else if(d==="margin"||d==="padding"){e=b;f=d;for(var g=S,o=0;o<g.length;o++)e.push(f+g[o])}else if(d.startsWith("background")){e=b;f=["Color","Position","PositionX","PositionY"];for(g=0;g<f.length;g++)e.push("background"+f[g])}else d==="opacity"&&y?b.push("filter"):
|
19
|
+
b.push(d);return b}function T(a){return a==="transparent"||a==="rgba(0, 0, 0, 0)"}function Ra(a){var b={},c=/[\d\.\-]+/g,d,e,f;for(e in a){d=a[e].match(c);d=d.map("toFloat");d.t=a[e].split(c);d.r=d.t[0]==="rgb(";d.t.length==1&&d.t.unshift("");for(f=0;f<d.length;f++)d.t.splice(f*2+1,0,d[f]);b[e]=d}return b}function jb(a,b,c){var d;for(d in c)if((d=="width"||d=="height")&&b[d]=="auto")b[d]=a._["offset"+d.capitalize()]+"px";if(c.filter&&!b.filter)b.filter="alpha(opacity=100)";for(var e=0;e<4;e++){var f=
|
20
|
+
"border"+S[e]+"Style",g="border"+S[e]+"Width",o="border"+S[e]+"Color";if(f in b&&b[f]!=c[f]){var x=a._.style;if(b[f]=="none")x[g]="0px";x[f]=c[f];if(T(b[o]))x[o]=a.getStyle("Color")}}for(d in c){if(c[d]!==b[d]&&/color/i.test(d)){if(Q){c[d]=c[d].replace(/"/g,"");b[d]=b[d].replace(/"/g,"")}T(c[d])||(c[d]=c[d].toRgb());T(b[d])||(b[d]=b[d].toRgb());if(!c[d]||!b[d])c[d]=b[d]=""}if(/\d/.test(c[d])&&!/\d/.test(b[d]))b[d]=c[d].replace(/[\d\.\-]+/g,"0");if(c[d]===b[d]||!/\d/.test(b[d])||!/\d/.test(c[d])){delete c[d];
|
21
|
+
delete b[d]}}}function Sa(a,b){for(var c=0,d=b.length,e=a.computedStyles(),f={},g;c<d;c++){g=b[c];if(g in e)f[g]=""+e[g];if(g==="opacity")f[g]=f[g].replace(",",".")}return f}function kb(a,b,c){b=a.clone().setStyle("position:absolute;z-index:-1;visibility:hidden").setWidth(a.size().x).setStyle(b);a.parent()&&a.insert(b,"before");a=Sa(b,c);b.remove();return a}function lb(a,b,c,d){var e={},f=a.marginLeft.toFloat()||0,g=a.marginTop.toFloat()||0,o=c==="right",x=c==="bottom";c=c==="top"||x;if(d==="out"){e[c?
|
22
|
+
"height":"width"]="0px";if(o)e.marginLeft=f+b.x+"px";else if(x)e.marginTop=g+b.y+"px"}else{if(c){e.height=b.y+"px";a.height="0px"}else{e.width=b.x+"px";a.width="0px"}if(o){e.marginLeft=f+"px";a.marginLeft=f+b.x+"px"}else if(x){e.marginTop=g+"px";a.marginTop=g+b.y+"px"}}return e}var h=function(a){return a};h.version="2.2.0";h.modules=["core","dom","form","events","xhr","fx","cookie"];var v=O.prototype,pa=s.prototype.toString,P=v.slice,qa=l.documentElement,ha=1,K=[],A="uniqueNumber",m=h.$ext=function(a,
|
23
|
+
b,c){b=b||{};var d;for(d in b)if(!c||!(d in a))a[d]=b[d];return a},Ua=h.$eval=function(a){if(a)"execScript"in u?N.win()._.execScript(a):Ta("script",{text:a}).insertTo(qa)};h.$break=function(){throw new ea;};var U=h.$alias=function(a,b){for(var c in b)a[c]=a[b[c]];return a};h.defined=function(a){return typeof a!=="undefined"};var V=h.isFunction=function(a){return typeof a==="function"},B=h.isString=function(a){return typeof a==="string"},Va=h.isNumber=function(a){return typeof a==="number"},r=h.isHash=
|
24
|
+
function(a){return pa.call(a)==="[object Object]"},J=h.isArray=function(a){return pa.call(a)==="[object Array]"},Z=h.isElement=function(a){return!!(a&&a.tagName)};h.isNode=function(a){return!!(a&&a.nodeType)};var D=h.$=function(a){if(a instanceof z)return a;else if(typeof a==="string")a=l.getElementById(a);return t(a)},ma=h.$$=function(a,b){return N.find(a,b)},Ta=h.$E=function(a,b){return new n(a,b)},G=h.$w=function(a){return a.trim().split(/\s+/)},i=h.$A=function(a){try{return P.call(a)}catch(b){for(var c=
|
25
|
+
[],d=0,e=a.length;d<e;d++)c[d]=a[d];return c}},aa=h.$uid=function(a){return A in a?a[A]:a[A]=ha++};if(r(qa))r=h.isHash=function(a){return pa.call(a)==="[object Object]"&&a!==null&&typeof a!=="undefined"&&typeof a.hasOwnProperty!=="undefined"};for(var ba=0,ra="Array Function Number String Date RegExp".split(" "),mb=function(){for(var a=0;a<arguments.length;a++)if(r(arguments[a])){m(this.prototype,arguments[a]);m(this.Methods,arguments[a])}};ba<ra.length;ba++)m(h[ra[ba]]=u[ra[ba]],{Methods:{},include:mb});
|
26
|
+
h.Object=s;h.Math=q;m(s,{keys:function(a){var b=[],c;for(c in a)b.push(c);return b},values:function(a){var b=[],c;for(c in a)b.push(a[c]);return b},each:function(a,b,c){for(var d in a)b.call(c,d,a[d]);return a},empty:function(a){for(var b in a)return false;return true},clone:function(a){return s.merge(a)},without:function(){var a=i(arguments),b=a.shift(),c={},d;for(d in b)a.include(d)||(c[d]=b[d]);return c},only:function(){for(var a=i(arguments),b=a.shift(),c={},d=0,e=a.length;d<e;d++)if(a[d]in b)c[a[d]]=
|
27
|
+
b[a[d]];return c},merge:function(){for(var a={},b=0,c=arguments,d;b<c.length;b++)if(r(c[b]))for(d in c[b])a[d]=r(c[b][d])&&!(c[b][d]instanceof j)?s.merge(d in a?a[d]:{},c[b][d]):c[b][d];return a},toQueryString:function(a){var b=[],c,d,e=encodeURIComponent;for(c in a){d=E(a[c]);for(var f=0;f<d.length;f++)b.push(e(c)+"="+e(d[f]))}return b.join("&")}},true);var Wa=q.random;q.random=function(a,b){if(arguments.length===0)return Wa();else if(arguments.length===1){b=a;a=0}return~~(Wa()*(b-a+1)+~~a)};var nb=
|
28
|
+
v.sort,Xa=v.forEach||function(a,b){for(var c=0;c<this.length;c++)a.call(b,this[c],c,this)},ob=v.filter||function(a,b){for(var c=[],d=0,e=0;e<this.length;e++)if(a.call(b,this[e],e,this))c[d++]=this[e];return c},pb=function(a,b){for(var c=[],d=0,e=0;e<this.length;e++)a.call(b,this[e],e,this)||(c[d++]=this[e]);return c},qb=v.map||function(a,b){for(var c=[],d=0;d<this.length;d++)c[d]=a.call(b,this[d],d,this);return c},rb=v.some||function(a,b){for(var c=0;c<this.length;c++)if(a.call(b,this[c],c,this))return true;
|
29
|
+
return false},sb=v.every||function(a,b){for(var c=0;c<this.length;c++)if(!a.call(b,this[c],c,this))return false;return true},tb=function(a,b){for(var c=0;c<this.length;c++)if(a.call(b,this[c],c,this))return this[c]},ub=function(a,b){for(var c=this.length-1;c>-1;c--)if(a.call(b,this[c],c,this))return this[c]};ea.prototype=Error.prototype;O.include({indexOf:v.indexOf||function(a,b){for(var c=b<0?q.max(0,this.length+b):b||0;c<this.length;c++)if(this[c]===a)return c;return-1},lastIndexOf:v.lastIndexOf||
|
30
|
+
function(a){for(var b=this.length-1;b>-1;b--)if(this[b]===a)return b;return-1},first:function(){return arguments.length?F(tb,this,arguments):this[0]},last:function(){return arguments.length?F(ub,this,arguments):this[this.length-1]},random:function(){return this.length===0?undefined:this[q.random(this.length-1)]},size:function(){return this.length},clean:function(){this.length=0;return this},empty:function(){return this.length===0},clone:function(){return this.slice(0)},each:function(){F(Xa,this,arguments);
|
31
|
+
return this},forEach:Xa,map:function(){return F(qb,this,arguments)},filter:function(){return F(ob,this,arguments)},reject:function(){return F(pb,this,arguments)},some:function(a){return F(rb,this,a?arguments:[xa])},every:function(a){return F(sb,this,a?arguments:[xa])},walk:function(){this.map.apply(this,arguments).forEach(function(a,b){this[b]=a},this);return this},merge:function(){for(var a=this.clone(),b,c=0;c<arguments.length;c++){b=E(arguments[c]);for(var d=0;d<b.length;d++)a.indexOf(b[d])==-1&&
|
32
|
+
a.push(b[d])}return a},flatten:function(){var a=[];this.forEach(function(b){if(J(b))a=a.concat(b.flatten());else a.push(b)});return a},compact:function(){return this.without(null,undefined)},uniq:function(){return[].merge(this)},includes:function(){for(var a=0;a<arguments.length;a++)if(this.indexOf(arguments[a])===-1)return false;return true},without:function(){var a=P.call(arguments);return this.filter(function(b){return a.indexOf(b)===-1})},shuffle:function(){for(var a=this.clone(),b,c,d=a.length;d>
|
33
|
+
0;b=q.random(d-1),c=a[--d],a[d]=a[b],a[b]=c);return a},sort:function(a){return nb.apply(this,a||!Va(this[0])?arguments:[ya])},sortBy:function(){var a=wa(arguments,this);return this.sort(function(b,c){return ya(a[0].call(a[1],b),a[0].call(a[1],c))})},min:function(){return q.min.apply(q,this)},max:function(){return q.max.apply(q,this)},sum:function(){for(var a=0,b=0;b<this.length;a+=this[b++]);return a}});v.include=v.includes;w.include({empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},
|
34
|
+
trim:w.prototype.trim||function(){for(var a=this.replace(/^\s\s*/,""),b=a.length;/\s/.test(a.charAt(--b)););return a.slice(0,b+1)},stripTags:function(){return this.replace(/<\/?[^>]+>/ig,"")},stripScripts:function(a){var b="",c=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/img,function(d,e){b+=e+"\n";return""});if(a===true)Ua(b);else V(a)&&a(b,c);return c},extractScripts:function(){var a="";this.stripScripts(function(b){a=b});return a},evalScripts:function(){this.stripScripts(true);return this},
|
35
|
+
camelize:function(){return this.replace(/(\-|_)+(.)?/g,function(a,b,c){return c?c.toUpperCase():""})},underscored:function(){return this.replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/\-/g,"_").toLowerCase()},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},includes:function(a){return this.indexOf(a)!=-1},startsWith:function(a,b){return(b!==true?this.indexOf(a):this.toLowerCase().indexOf(a.toLowerCase()))===0},endsWith:function(a,b){return this.length-(b!==
|
36
|
+
true?this.lastIndexOf(a):this.toLowerCase().lastIndexOf(a.toLowerCase()))===a.length},toInt:function(a){return parseInt(this,a===undefined?10:a)},toFloat:function(a){return parseFloat(a===true?this:this.replace(",",".").replace(/(\d)-(\d)/g,"$1.$2"))}});w.prototype.include=w.prototype.includes;X.include({bind:function(){var a=i(arguments),b=a.shift(),c=this;return function(){return c.apply(b,a.length||arguments.length?a.concat(i(arguments)):a)}},bindAsEventListener:function(){var a=i(arguments),b=
|
37
|
+
a.shift(),c=this;return function(d){return c.apply(b,[d].concat(a).concat(i(arguments)))}},curry:function(){return this.bind.apply(this,[this].concat(i(arguments)))},rcurry:function(){var a=i(arguments),b=this;return function(){return b.apply(b,i(arguments).concat(a))}},delay:function(){var a=i(arguments),b=a.shift();a=new da(setTimeout(this.bind.apply(this,[this].concat(a)),b));a.cancel=function(){clearTimeout(this)};return a},periodical:function(){var a=i(arguments),b=a.shift();a=new da(setInterval(this.bind.apply(this,
|
38
|
+
[this].concat(a)),b));a.stop=function(){clearInterval(this)};return a},chain:function(){var a=i(arguments),b=a.shift(),c=this;return function(){var d=c.apply(c,arguments);b.apply(b,a);return d}}});da.include({times:function(a,b){for(var c=0;c<this;c++)a.call(b,c);return this},upto:function(a,b,c){for(var d=this+0;d<=a;d++)b.call(c,d);return this},downto:function(a,b,c){for(var d=this+0;d>=a;d--)b.call(c,d);return this},abs:function(){return q.abs(this)},round:function(a){return a?parseFloat(this.toFixed(a)):
|
39
|
+
q.round(this)},ceil:function(){return q.ceil(this)},floor:function(){return q.floor(this)},min:function(a){return this<a?a:this+0},max:function(a){return this>a?a:this+0}});RegExp.escape=function(a){return(""+a).replace(/([.*+?\^=!:${}()|\[\]\/\\])/g,"\\$1")};var j=h.Class=function(){var a=i(arguments).slice(0,2),b=a.pop()||{},c=a.pop(),d=arguments[2],e=function(){};if(!a.length&&!r(b)){c=b;b={}}if(!d&&c&&(c===z||c.ancestors.include(z)))d=bb();d=m(d||function(){Ba(this);return"initialize"in this?
|
40
|
+
this.initialize.apply(this,arguments):this},Ya);c=c||j;e.prototype=c.prototype;d.prototype=new e;d.parent=c;d.prototype.constructor=d;for(d.ancestors=[];c;){d.ancestors.push(c);c=c.parent}["extend","include"].each(function(f){f in b&&d[f].apply(d,E(b[f]))});return d.include(b)},Ya={extend:function(){i(arguments).filter(r).each(function(a){m(this,za(a,true));Aa(this,a,true)},this);return this},include:function(){var a=[this].concat(this.ancestors);i(arguments).filter(r).each(function(b){s.each(za(b,
|
41
|
+
false),function(c,d){for(var e,f=0;f<a.length;f++)if(c in a[f].prototype){e=a[f].prototype[c];break}this.prototype[c]=V(d)&&V(e)?function(){this.$super=e;return d.apply(this,arguments)}:d},this);Aa(this,b,false)},this);return this}},fa=G("selfExtended self_extended selfIncluded self_included extend include");m(j,Ya);j.prototype.$super=undefined;O=h.Options={setOptions:function(a){a=this.options=m(m({},ga(this,"Options")),a);var b,c;if(V(this.on))for(c in a)if(b=c.match(/on([A-Z][A-Za-z]+)/)){this.on(b[1].toLowerCase(),
|
42
|
+
a[c]);delete a[c]}return this},cutOptions:function(a){a=i(a);this.setOptions(r(a.last())?a.pop():{});return a}};var W=h.Observer=new j({include:O,initialize:function(a){this.setOptions(a);M(this,ga(this,"Events"));return this},on:function(){Ca(this,arguments,function(a){return a});return this},observes:function(a,b){if(!B(a)){b=a;a=null}if(B(b))b=b in this?this[b]:null;return(this.$listeners||[]).some(function(c){return a&&b?c.e===a&&c.f===b:a?c.e===a:c.f===b})},stopObserving:function(a,b){Da(this,
|
43
|
+
a,b,function(){});return this},listeners:function(a){return(this.$listeners||[]).filter(function(b){return!a||b.e===a}).map(function(b){return b.f}).uniq()},fire:function(){var a=i(arguments),b=a.shift();(this.$listeners||[]).each(function(c){c.e===b&&c.f.apply(this,c.a.concat(a))},this);return this}});X=W.create=function(a,b){m(a,s.without(W.prototype,"initialize","setOptions"),true);return M(a,b||ga(a,"Events"))};var M=W.createShortcuts=function(a,b){(b||[]).each(function(c){var d="on"+c.replace(/(^|_|:)([a-z])/g,
|
44
|
+
function(e,f,g){return g.toUpperCase()});d in a||(a[d]=function(){return this.on.apply(this,[c].concat(i(arguments)))})});return a};v=navigator.userAgent;var Q="opera"in u,y="attachEvent"in u&&!Q,ca=h.Browser={IE:y,Opera:Q,WebKit:v.include("AppleWebKit/"),Gecko:v.include("Gecko")&&!v.include("KHTML"),MobileSafari:/Apple.*Mobile.*Safari/.test(v),Konqueror:v.include("Konqueror"),OLD:!l.querySelector},z=h.Wrapper=new j({_:undefined,initialize:function(a){this._=a}});z.Cache=K;z.Cast=function(a){return a.tagName in
|
45
|
+
H?H[a.tagName]:undefined};var I=h.Document=new j(z,{win:function(){return t(this._.defaultView||this._.parentWindow)}}),N=t(l),Y=h.Window=new j(z,{win:function(){return this},size:function(){var a=this._,b=a.document.documentElement;return a.innerWidth?{x:a.innerWidth,y:a.innerHeight}:{x:b.clientWidth,y:b.clientHeight}},scrolls:function(){var a=this._,b=a.document,c=b.body;b=b.documentElement;return a.pageXOffset||a.pageYOffset?{x:a.pageXOffset,y:a.pageYOffset}:c&&(c.scrollLeft||c.scrollTop)?{x:c.scrollLeft,
|
46
|
+
y:c.scrollTop}:{x:b.scrollLeft,y:b.scrollTop}},scrollTo:function(a,b,c){var d=a,e=b,f=Va(a)?null:D(a);if(f instanceof n)a=f.position();if(r(a)){e=a.y;d=a.x}r(c=c||b)&&h.Fx?(new p.Scroll(this,c)).start({x:d,y:e}):this._.scrollTo(d,e);return this}}),L=h.Event=new j(z,{type:null,which:null,keyCode:null,target:null,currentTarget:null,relatedTarget:null,pageX:null,pageY:null,initialize:Ea,stopPropagation:function(){try{this._.stopPagination()}catch(a){this._.cancelBubble=true}this.stopped=true;return this},
|
47
|
+
preventDefault:function(){try{this._.preventDefault()}catch(a){this._.returnValue=false}return this},stop:function(){return this.stopPropagation().preventDefault()},position:function(){return{x:this.pageX,y:this.pageY}},offset:function(){var a=this.target.position();return{x:this.pageX-a.x,y:this.pageY-a.y}},find:function(a){if(this.target instanceof z&&this.currentTarget instanceof z){var b=this.target._;for(a=this.currentTarget.find(a,true);b;){if(a.indexOf(b)!==-1)return t(b);b=b.parentNode}}}},
|
48
|
+
Ea),ka=[],n=h.Element=new j(z,{initialize:function(a,b){Fa(this,a,b)}},function(a,b){Fa(this,a,b);var c=this,d=c._,e=z.Cast(d),f=A in d?d[A]:d[A]=ha++;if(e!==undefined){c=new e(d);if("$listeners"in this)c.$listeners=this.$listeners}return K[f]=c}),H=n.Wrappers={},sa={},Ga=function(a){return(a in sa?sa[a]:sa[a]=l.createElement(a)).cloneNode(false)};try{l.createElement("<input/>");ca.OLD=true;Ga=function(a,b){if(a==="input"&&b!==undefined)a='<input name="'+b.name+'" type='+b.type+(b.checked?" checked":
|
49
|
+
"")+"/>";return l.createElement(a)}}catch(wb){}n.include({parent:function(a){return a?this.parents(a)[0]:t(this._.parentNode||null)},parents:function(a){return ia(this,"parentNode",a)},children:function(a){return this.find(a).filter(function(b){return b._.parentNode===this._},this)},siblings:function(a){return this.prevSiblings(a).reverse().concat(this.nextSiblings(a))},nextSiblings:function(a){return ia(this,"nextSibling",a)},prevSiblings:function(a){return ia(this,"previousSibling",a)},next:function(a){return this.nextSiblings(a)[0]},
|
50
|
+
prev:function(a){return this.prevSiblings(a)[0]},remove:function(){var a=this._,b=a.parentNode;b&&b.removeChild(a);return this},insert:function(a,b){var c=null,d=this._;b=(b||"bottom").toLowerCase();if(typeof a!=="object")c=a=""+a;else if(a instanceof n)a=a._;vb[b](d,a.nodeType?a:cb.call(b==="bottom"||b==="top"?d:d.parentNode,a));c!==null&&c.evalScripts();return this},insertTo:function(a,b){D(a).insert(this,b);return this},append:function(a){return this.insert(B(a)?i(arguments).join(""):arguments)},
|
51
|
+
update:function(a){if(typeof a!=="object"){a=""+a;try{this._.innerHTML=a}catch(b){return this.clean().insert(a)}a.evalScripts();return this}else return this.clean().insert(a)},html:function(a){return a===undefined?this._.innerHTML:this.update(a)},text:function(a){return a===undefined?this._.innerHTML.stripTags():this.update(this.doc()._.createTextNode(a))},replace:function(a){return this.insert(a,"instead")},wrap:function(a){var b=this._,c=b.parentNode;if(c){a=D(a)._;c.replaceChild(a,b);a.appendChild(b)}return this},
|
52
|
+
clean:function(){for(;this._.firstChild;)this._.removeChild(this._.firstChild);return this},empty:function(){return this.html().blank()},clone:function(){return new n(this._.cloneNode(true))},index:function(){for(var a=this._,b=a.parentNode.firstChild,c=0;b!==a;){b.nodeType===1&&c++;b=b.nextSibling}return c}});var vb={bottom:function(a,b){a.appendChild(b)},top:function(a,b){a.firstChild!==null?a.insertBefore(b,a.firstChild):a.appendChild(b)},after:function(a,b){var c=a.parentNode,d=a.nextSibling;
|
53
|
+
d!==null?c.insertBefore(b,d):c.appendChild(b)},before:function(a,b){a.parentNode.insertBefore(b,a)},instead:function(a,b){a.parentNode.replaceChild(b,a)}},Ha={TBODY:["<TABLE>","</TABLE>",2],TR:["<TABLE><TBODY>","</TBODY></TABLE>",3],TD:["<TABLE><TBODY><TR>","</TR></TBODY></TABLE>",4],COL:["<TABLE><COLGROUP>","</COLGROUP><TBODY></TBODY></TABLE>",2],LEGEND:["<FIELDSET>","</FIELDSET>",2],AREA:["<map>","</map>",2],OPTION:["<SELECT>","</SELECT>",2]};U(Ha,{OPTGROUP:"OPTION",THEAD:"TBODY",TFOOT:"TBODY",
|
54
|
+
TH:"TD"});var Ia=l.createDocumentFragment(),db=l.createElement("DIV");n.include({setStyle:function(a,b){var c,d,e={},f=this._.style;if(b!==undefined){e[a]=b;a=e}else if(B(a)){a.split(";").each(function(g){g=g.split(":").map("trim");if(g[0]&&g[1])e[g[0]]=g[1]});a=e}for(c in a){d=c.indexOf("-")<0?c:c.camelize();if(c==="opacity")if(y)f.filter="alpha(opacity="+a[c]*100+")";else f.opacity=a[c];else if(c==="float")d=y?"styleFloat":"cssFloat";f[d]=a[c]}return this},getStyle:function(a){return Ja(this._.style,
|
55
|
+
a)||Ja(this.computedStyles(),a)},computedStyles:function(){var a=this._;return a.currentStyle||a.runtimeStyle||a.ownerDocument.defaultView.getComputedStyle(a,null)||{}},hasClass:function(a){return(" "+this._.className+" ").indexOf(" "+a+" ")!=-1},setClass:function(a){this._.className=a;return this},getClass:function(){return this._.className},addClass:function(a){var b=" "+this._.className+" ";if(b.indexOf(" "+a+" ")==-1)this._.className+=(b===" "?"":" ")+a;return this},removeClass:function(a){this._.className=
|
56
|
+
(" "+this._.className+" ").replace(" "+a+" "," ").trim();return this},toggleClass:function(a){return this[this.hasClass(a)?"removeClass":"addClass"](a)},radioClass:function(a){this.siblings().each("removeClass",a);return this.addClass(a)}});n.include({set:function(a,b){if(typeof a==="string"){var c={};c[a]=b;a=c}var d;c=this._;for(d in a)if(d==="style")this.setStyle(a[d]);else{d in c||c.setAttribute(d,""+a[d]);c[d]=a[d]}return this},get:function(a){var b=this._;a=b[a]||b.getAttribute(a);return a===
|
57
|
+
""?null:a},has:function(a){return this.get(a)!==null},erase:function(a){this._.removeAttribute(a);return this},hidden:function(){return this.getStyle("display")==="none"},visible:function(){return!this.hidden()},hide:function(){if(this.visible()){this._d=this.getStyle("display");this._.style.display="none"}return this},show:function(){if(this.hidden()){var a=this._,b=a.tagName=="DIV"?"block":"inline";a.style.display=this._d=="none"?b:this._d||b}return this},toggle:function(){return this[this.visible()?
|
58
|
+
"hide":"show"]()},radio:function(a,b){this.siblings().each("hide",a,b);return this.show()}});n.include({doc:function(){return t(this._.ownerDocument)},win:function(){return this.doc().win()},size:function(){return{x:this._.offsetWidth,y:this._.offsetHeight}},position:function(){var a=this._.getBoundingClientRect(),b=this.doc()._.documentElement,c=this.win().scrolls();return{x:a.left+c.x-b.clientLeft,y:a.top+c.y-b.clientTop}},scrolls:function(){return{x:this._.scrollLeft,y:this._.scrollTop}},dimensions:function(){var a=
|
59
|
+
this.size(),b=this.scrolls(),c=this.position();return{top:c.y,left:c.x,width:a.x,height:a.y,scrollLeft:b.x,scrollTop:b.y}},overlaps:function(a){var b=this.position(),c=this.size();return a.x>b.x&&a.x<b.x+c.x&&a.y>b.y&&a.y<b.y+c.y},setWidth:function(a){var b=this._.style;b.width=a+"px";b.width=2*a-this._.offsetWidth+"px";return this},setHeight:function(a){var b=this._.style;b.height=a+"px";b.height=2*a-this._.offsetHeight+"px";return this},resize:function(a,b){if(r(a)){b=a.y;a=a.x}return this.setWidth(a).setHeight(b)},
|
60
|
+
moveTo:function(a,b){if(r(a)){b=a.y;a=a.x}return this.setStyle({left:a+"px",top:b+"px"})},scrollTo:function(a,b){if(r(a)){b=a.y;a=a.x}this._.scrollLeft=a;this._.scrollTop=b;return this},scrollThere:function(a){this.win().scrollTo(this,a);return this}});[n,I,Y].each("include",m(X({}),{on:function(){Ca(this,arguments,function(a){if(a.e==="mouseenter"||a.e==="mouseleave"){if(Za){Za=false;if(y){l.attachEvent("onmouseover",Ka);u.attachEvent("blur",La)}else{l.addEventListener("mouseover",Ka,false);u.addEventListener("blur",
|
61
|
+
La,false)}}a.n=a.e;a.w=function(){}}else{a.n=a.e==="contextmenu"&&ca.Konqueror?"rightclick":a.e==="mousewheel"&&ca.Gecko?"DOMMouseScroll":a.e;a.w=function(b){b=new L(b,a.t);if(a.f.apply(a.t,(a.r?[]:[b]).concat(a.a))===false)b.stop()};y?a.t._.attachEvent("on"+a.n,a.w):a.t._.addEventListener(a.n,a.w,false)}return a});return this},stopObserving:function(a,b){Da(this,a,b,function(c){y?c.t._.detachEvent("on"+c.n,c.w):c.t._.removeEventListener(c.n,c.w,false)});return this},fire:function(a,b){var c=this.parent&&
|
62
|
+
this.parent();a instanceof L||(a=new L(a,m({target:this._},b)));a.currentTarget=this;(this.$listeners||[]).each(function(d){if(d.e===a.type&&d.f.apply(this,(d.r?[]:[a]).concat(d.a))===false)a.stop()},this);if(c&&c.fire&&!(a.bubbles===false||a.stopped))c.fire(a);return this},stopEvent:function(){return false}}));M(Y.prototype,G("blur focus scroll resize load"));ja("click rightclick contextmenu mousedown mouseup mouseover mouseout mousemove keypress keydown keyup");[n,I].each("include",{first:function(a){return t(this._.querySelector(a||
|
63
|
+
"*"))},find:function(a,b){var c=this._.querySelectorAll(a||"*"),d,e=0,f=c.length;if(b===true)d=i(c);else for(d=[];e<f;e++)d[e]=t(c[e]);return d},match:function(a){for(var b=this._,c=b,d=false;c.parentNode!==null&&c.parentNode.nodeType!==11;)c=c.parentNode;if(b===c){c=l.createElement("div");c.appendChild(b);d=true}a=t(c).find(a,true).indexOf(b)!==-1;d&&c.removeChild(b);return a}});I.include({on:function(a){if(a==="ready"&&!this._iR){var b=this._,c=this.fire.bind(this,"ready");"readyState"in b?function(){["loaded",
|
64
|
+
"complete"].include(b.readyState)?c():arguments.callee.delay(50)}():b.addEventListener("DOMContentLoaded",c,false);this._iR=true}return this.$super.apply(this,arguments)}});M(I.prototype,["ready"]);var $a=h.Form=H.FORM=new j(n,{initialize:function(a){a=a||{};var b="remote"in a,c=a;if(r(a)&&!Z(a)){c="form";a=s.without(a,"remote")}this.$super(c,a);b&&this.remotize()},elements:function(){return this.find("input,button,select,textarea")},inputs:function(){return this.elements().filter(function(a){return!["submit",
|
65
|
+
"button","reset","image",null].include(a._.type)})},input:function(a){return t(this._[a])},focus:function(){var a=this.inputs().first(function(b){return b._.type!=="hidden"});a&&a.focus();return this},blur:function(){this.elements().each("blur");return this},disable:function(){this.elements().each("disable");return this},enable:function(){this.elements().each("enable");return this},values:function(){var a={},b,c,d;this.inputs().each(function(e){d=e._;c=d.name;if(!d.disabled&&c&&(!["checkbox","radio"].include(d.type)||
|
66
|
+
d.checked)){b=e.getValue();if(c.endsWith("[]"))b=(a[c]||[]).concat([b]);a[c]=b}});return a},serialize:function(){return s.toQueryString(this.values())},submit:function(){this._.submit();return this},reset:function(){this._.reset();return this}});ja("submit reset focus blur disable enable change");h.Input=H.INPUT=H.BUTTON=H.SELECT=H.TEXTAREA=H.OPTGROUP=new j(n,{initialize:function(a,b){if(!a||r(a)&&!Z(a)){b=a||{};if(/textarea|select/.test(b.type||"")){a=b.type;delete b.type}else a="input"}this.$super(a,
|
67
|
+
b)},form:function(){return t(this._.form)},insert:function(a,b){this.$super(a,b);this.find("option").each(function(c){c._.selected=!!c.get("selected")});return this},update:function(a){return this.clean().insert(a)},getValue:function(){return this._.type=="select-multiple"?this.find("option").map(function(a){return a._.selected?a._.value:null}).compact():this._.value},setValue:function(a){if(this._.type=="select-multiple"){a=E(a).map(w);this.find("option").each(function(b){b._.selected=a.include(b._.value)})}else this._.value=
|
68
|
+
a;return this},value:function(a){return this[a===undefined?"getValue":"setValue"](a)},focus:function(){this._.focus();this.focused=true;y&&this.fire("focus",{bubbles:false});return this},blur:function(){this._.blur();this.focused=false;y&&this.fire("blur",{bubbles:false});return this},select:function(){this._.select();return this.focus()},disable:function(){this._.disabled=true;return this.fire("disable")},enable:function(){this._.disabled=false;return this.fire("enable")},disabled:function(a){return a===
|
69
|
+
undefined?this._.disabled:this[a?"disable":"enable"]()},checked:function(a){if(a===undefined)a=this._.checked;else{this._.checked=a;a=this}return a}});if(y){l.attachEvent("onfocusin",$);l.attachEvent("onfocusout",$)}else{l.addEventListener("focus",$,true);l.addEventListener("blur",$,true)}var R=[],Za=true;ja("mouseenter mouseleave");[n,I].each("include",{delegate:function(a){var b=Ma(arguments),c,d,e;for(c in b){d=0;for(e=b[c];d<e.length;d++){this.on(a,eb(c,e[d],this));m(this.$listeners.last(),{dr:c,
|
70
|
+
dc:e[d][0]})}}return this},undelegate:function(){Na(arguments,this).each(function(a){this.stopObserving(a.n,a.f)},this);return this},delegates:function(){return!!Na(arguments,this).length}});s.each({on:"delegate",stopObserving:"undelegate",observes:"delegates"},function(a,b){w.prototype[a]=function(){var c=i(arguments);c.splice(1,0,""+this);c=N[b].apply(N,c);return c===N?this:c}});var ab=w.prototype.on;w.prototype.on=function(a){if(r(a))for(var b in a)ab.apply(this,[b].concat([a[b]]));else ab.apply(this,
|
71
|
+
arguments);return this};ka.each(function(a){w.prototype["on"+a.capitalize()]=function(){return this.on.apply(this,[a].concat(i(arguments)))}});G("Element Input Form").each(function(a){s.each(a in h?h[a].prototype:{},function(b,c){if(V(c)&&!(b in w.prototype))w.prototype[b]=function(){for(var d=ma(this,true),e=0,f=d.length,g=true,o,x;e<f;e++){o=t(d[e]);x=o[b].apply(o,arguments);if(g){if(x!==o)return x;g=false}}return null}})});var k=h.Xhr=new j(W,{extend:{EVENTS:G("success failure complete request cancel create"),
|
72
|
+
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,evalJS:true,evalJSON:true,secureJSON:true,urlEncoded:true,spinner:null,spinnerFx:"fade",params:null,iframed:false,jsonp:false},load:function(a,b){return(new this(a,m({method:"get"},b))).send()}},initialize:function(a,b){this.initCallbacks();this.url=a;m(this.$super(b),this.options);if(k.Options.spinner&&
|
73
|
+
D(this.spinner)===D(k.Options.spinner))this.spinner=null},setHeader:function(a,b){this.headers[a]=b;return this},getHeader:function(a){var b;try{b=this.xhr.getResponseHeader(a)}catch(c){}return b},successful:function(){return this.status>=200&&this.status<300},send:function(a){var b={},c=this.url,d=this.method.toLowerCase(),e=this.headers,f;if(d=="put"||d=="delete"){b._method=d;d="post"}b=this.prepareData(this.params,this.prepareParams(a),b);this.urlEncoded&&d=="post"&&!e["Content-type"]&&this.setHeader("Content-type",
|
74
|
+
"application/x-www-form-urlencoded;charset="+this.encoding);if(d=="get"){if(b)c+=(c.include("?")?"&":"?")+b;b=null}a=this.xhr=this.createXhr();this.fire("create");a.open(d,c,this.async);a.onreadystatechange=this.stateChanged.bind(this);for(f in e)a.setRequestHeader(f,e[f]);a.send(b);this.fire("request");this.async||this.stateChanged();return this},update:function(a,b){return this.onSuccess(function(c){a.update(c.text)}).send(b)},cancel:function(){var a=this.xhr;if(!a||a.canceled)return this;a.abort();
|
75
|
+
a.onreadystatechange=function(){};a.canceled=true;return this.fire("cancel")},fire:function(a){return this.$super(a,this,this.xhr)},createXhr:function(){if(this.jsonp)return new k.JSONP(this);else if(this.form&&this.form.first("input[type=file]"))return new k.IFramed(this.form);else try{return new XMLHttpRequest}catch(a){return new ActiveXObject("MSXML2.XMLHTTP")}},prepareParams:function(a){if(a&&a instanceof $a){this.form=a;a=a.values()}return a},prepareData:function(){return i(arguments).map(function(a){B(a)||
|
76
|
+
(a=s.toQueryString(a));return a.blank()?null:a}).compact().join("&")},stateChanged:function(){var a=this.xhr;if(!(a.readyState!=4||a.canceled)){try{this.status=a.status}catch(b){this.status=0}this.text=this.responseText=a.responseText;this.xml=this.responseXML=a.responseXML;this.fire("complete").fire(this.successful()?"success":"failure")}},tryScripts:function(){var a=this.getHeader("Content-type");if(this.evalResponse||this.evalJS&&/(ecma|java)script/i.test(a))Ua(this.text);else if(/json/.test(a)&&
|
77
|
+
this.evalJSON)this.json=this.responseJSON=this.sanitizedJSON();else this.evalScripts&&this.text.evalScripts()},sanitizedJSON:function(){try{return JSON.parse(this.text)}catch(a){if(u.JSON||!/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(this.text.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){if(this.secureJSON)throw"JSON error: "+this.text;return null}}return eval("("+this.text+")")},initCallbacks:function(){this.on({success:"tryScripts",create:"showSpinner",complete:"hideSpinner",cancel:"hideSpinner"});
|
78
|
+
k.EVENTS.each(function(a){this.on(a,function(){k.fire(a,this,this.xhr)})},this)},showSpinner:function(){k.showSpinner.call(this,this)},hideSpinner:function(){k.hideSpinner.call(this,this)}});m(X(k),{counter:0,showSpinner:function(a){k.trySpinner(a,"show")},hideSpinner:function(a){k.trySpinner(a,"hide")},trySpinner:function(a,b){var c=a||k.Options,d=D(c.spinner);d&&d[b](c.spinnerFx,{duration:100})},countIn:function(){k.counter++;k.showSpinner()},countOut:function(){k.counter--;k.counter<1&&k.hideSpinner()}}).on({create:"countIn",
|
79
|
+
complete:"countOut",cancel:"countOut"});$a.include({send:function(a){a=a||{};a.method=a.method||this._.method||"post";(new k(this._.action||l.location.href,a)).onComplete(this.enable.bind(this)).send(this);this.disable.bind(this).delay(1);return this},remotize:function(a){if(!this.observes("submit",na)){this.on("submit",na,a);this.remote=true}return this},unremotize:function(){this.stopObserving("submit",na);this.remote=false;return this}});n.include({load:function(a,b){(new k(a,m({method:"get"},
|
80
|
+
b))).update(this);return this}});k.Dummy={open:function(){},abort:function(){},setRequestHeader:function(){},onreadystatechange:function(){}};k.IFramed=new j({include:k.Dummy,initialize:function(a){this.form=a;this.id="xhr_"+(new Date).getTime();a.insert('<i><iframe name="'+this.id+'" id="'+this.id+'" width="0" height="0" frameborder="0" src="about:blank"></iframe></i>',"after");D(this.id).on("load",this.onLoad.bind(this))},send:function(){this.form.set("target",this.id).submit()},onLoad:function(){this.status=
|
81
|
+
200;this.readyState=4;this.form.set("target","");try{this.responseText=u[this.id].document.documentElement.innerHTML}catch(a){}this.onreadystatechange()}});k.JSONP=new j({include:k.Dummy,prefix:"jsonp",initialize:function(a){this.xhr=a;this.name=this.prefix+(new Date).getTime();this.param=(B(a.jsonp)?a.jsonp:"callback")+"="+this.name;this.script=Ta("script",{charset:a.encoding,async:a.async})},open:function(a,b){this.url=b;this.method=a},send:function(a){u[this.name]=this.finish.bind(this);this.script.set("src",
|
82
|
+
this.url+(this.url.include("?")?"&":"?")+this.param+"&"+a).insertTo(ma("script").last(),"after")},finish:function(a){this.status=200;this.readyState=4;this.xhr.json=this.xhr.responseJSON=a;this.onreadystatechange()}});var p=h.Fx=new j(W,{extend:{EVENTS:G("start finish cancel"),Durations:{"short":200,normal:400,"long":800},Options:{fps:y?40:60,duration:"normal",transition:"Sin",queue:true},Transitions:{Sin:function(a){return-(q.cos(q.PI*a)-1)/2},Cos:function(a){return q.asin((a-0.5)*2)/q.PI+0.5},Exp:function(a){return q.pow(2,
|
83
|
+
8*(a-1))},Log:function(a){return 1-q.pow(2,-8*a)},Lin:function(a){return a}}},initialize:function(a,b){this.$super(b);this.element=D(a);var c=aa((this.element||{})._||{});this.ch=ta[c]=ta[c]||[];this.cr=ua[c]=ua[c]||[]},start:function(){var a;a=arguments;var b=this.ch,c=this.options.queue;if(!b||this.$ch)a=this.$ch=false;else{c&&b.push([a,this]);a=c&&b[0][1]!==this}if(a)return this;b=this.options;a=p.Transitions[b.transition]||b.transition;b=((p.Durations[b.duration]||b.duration)/1E3*this.options.fps).ceil();
|
84
|
+
c=(1E3/this.options.fps).round();this.cr&&this.cr.push(this);this.prepare.apply(this,arguments);fb(this,a,c,b);return this.fire("start",this)},finish:function(){this._timer&&clearInterval(this._timer);Oa(this);this.fire("finish");var a=this.ch,b=a.shift();if(b=a[0]){b[1].$ch=true;b[1].start.apply(b[1],b[0])}return this},cancel:function(){this._timer&&clearInterval(this._timer);Oa(this);return this.fire("cancel")},prepare:function(){},render:function(){}}),ta=[],ua=[];w.COLORS={maroon:"#800000",red:"#ff0000",
|
85
|
+
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"};w.include({toHex:function(){var a=/^#(\w)(\w)(\w)$/.exec(this);return a=a?"#"+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]:(a=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/.exec(this))?"#"+a.slice(1).map(function(b){b=(b-0).toString(16);return b.length==1?"0"+b:b}).join(""):
|
86
|
+
w.COLORS[this]||this},toRgb:function(a){var b=/#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})/i.exec(this.toHex()||"");if(b){b=b.slice(1).map("toInt",16);b=a?b:"rgb("+b+")"}return b}});n.include({stop:function(){var a=aa(this._);(ua[a]||[]).each("cancel");(ta[a]||[]).splice(0);return this},hide:function(a,b){return a&&this.visible()?C(this,a,["out",b]):this.$super()},show:function(a,b){return a&&!this.visible()?C(this,a,["in",b]):this.$super()},toggle:function(a,b){return a?C(this,a,["toggle",b]):this.$super()},
|
87
|
+
remove:function(a,b){return a&&this.visible()?C(this,a,["out",m(b||{},{onFinish:this.$super.bind(this)})]):this.$super()},morph:function(a,b){return C(this,"morph",[a,b||{}])},highlight:function(){return C(this,"highlight",arguments)},fade:function(){return C(this,"fade",arguments)},slide:function(){return C(this,"slide",arguments)},scroll:function(a,b){return C(this,"scroll",[a,b||{}])},scrollTo:function(a,b){return r(b)?this.scroll(a,b):this.$super.apply(this,arguments)}});var va=["WebkitT","OT",
|
88
|
+
"MozT","MsT","t"].first(function(a){return a+"ransition"in qa.style});U=va+"ransition";var oa=U+"Property",Pa=U+"Duration",Qa=U+"TimingFunction",hb={Sin:"cubic-bezier(.3,0,.6,1)",Cos:"cubic-bezier(0,.3,.6,0)",Log:"cubic-bezier(0.6,.3,.8)",Exp:"cubic-bezier(.6,0,.8,.3)",Lin:"cubic-bezier(0,0,1,1)"};p.Options.engine=va===undefined||Q?"javascript":"native";p.Morph=new j(p,{prepare:function(a){if(this.options.engine==="native"&&va!==undefined){this.render=this.transition=function(){};gb.call(this,a)}else{var b=
|
89
|
+
ib(a),c=Sa(this.element,b);a=kb(this.element,a,b);jb(this.element,c,a);this.before=Ra(c);this.after=Ra(a)}},render:function(a){var b,c,d,e=this.element._.style,f,g,o;for(f in this.after){b=this.before[f];c=this.after[f];g=0;for(o=c.length;g<o;g++){d=b[g]+(c[g]-b[g])*a;if(c.r)d=q.round(d);c.t[g*2+1]=d}e[f]=c.t.join("")}}});var S=G("Top Left Right Bottom");p.Highlight=new j(p.Morph,{extend:{Options:s.merge(p.Options,{color:"#FF8",transition:"Exp"})},prepare:function(a,b){var c=this.element,d=c._.style,
|
90
|
+
e=b||c.getStyle("backgroundColor");if(T(e)){this.onFinish(function(){d.backgroundColor="transparent"});e=[c].concat(c.parents()).map("getStyle","backgroundColor").reject(T).compact().first()||"#FFF"}d.backgroundColor=a||this.options.color;return this.$super({backgroundColor:e})}});p.Twin=new j(p.Morph,{finish:function(){this.how==="out"&&n.prototype.hide.call(this.element);return this.$super()},setHow:function(a){this.how=a||"toggle";if(this.how==="toggle")this.how=this.element.visible()?"out":"in"}});
|
91
|
+
p.Slide=new j(p.Twin,{extend:{Options:s.merge(p.Options,{direction:"top"})},prepare:function(a){function b(){for(var e in d)c[e]=d[e]}this.setHow(a);a=n.prototype.show.call(this.element);var c=a._.style,d=s.only(c,"overflow","width","height","marginTop","marginLeft");this.onFinish(b).onCancel(b);c.overflow="hidden";return this.$super(lb(c,a.size(),this.options.direction,this.how))}});p.Fade=new j(p.Twin,{prepare:function(a){this.setHow(a);this.how==="in"&&n.prototype.show.call(this.element.setStyle({opacity:0}));
|
92
|
+
return this.$super({opacity:this.how==="in"?1:0})}});p.Attr=new j(p,{prepare:function(a){this.before={};this.after=a;var b,c=this.element._;for(b in a)this.before[b]=c[b]},render:function(a){var b,c=this.element._,d=this.before;for(b in d)c[b]=d[b]+(this.after[b]-d[b])*a}});p.Scroll=new j(p.Attr,{initialize:function(a,b){a=D(a);this.$super(a instanceof Y?a._.document[ca.WebKit?"body":"documentElement"]:a,b)},prepare:function(a){var b={};if("x"in a)b.scrollLeft=a.x;if("y"in a)b.scrollTop=a.y;this.$super(b)}});
|
93
|
+
h.Cookie=new j({include:O,extend:{set:function(a,b,c){return(new this(a,c)).set(b)},get:function(a){return(new this(a)).get()},remove:function(a){return(new this(a)).remove()},enabled:function(){l.cookie="__t=1";return l.cookie.indexOf("__t=1")!=-1},Options:{secure:false,document:l}},initialize:function(a,b){this.name=a;this.setOptions(b)},set:function(a){a=encodeURIComponent(a);var b=this.options;if(b.domain)a+="; domain="+b.domain;if(b.path)a+="; path="+b.path;if(b.duration){var c=new Date;c.setTime(c.getTime()+
|
94
|
+
b.duration*24*60*60*1E3);a+="; expires="+c.toGMTString()}if(b.secure)a+="; secure";b.document.cookie=this.name+"="+a;return this},get:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+RegExp.escape(this.name)+"=([^;]*)");return a?decodeURIComponent(a[1]):null},remove:function(){this.options.duration=-1;return this.set("")}});m(u,s.without(h,"version","modules"));return h}(window,document,Object,Array,String,Function,Number,Math);
|
95
|
+
RightJS.Browser.OLD&&function(u){var l=u.createElement("script");u=u.getElementsByTagName("script");u=u[u.length-1];l.src=u.src.replace(/(^|\/)(right)([^\/]+)$/,"$1$2-olds$3");u.parentNode.appendChild(l)}(document);
|
Binary file
|
@@ -0,0 +1,168 @@
|
|
1
|
+
body, html
|
2
|
+
{
|
3
|
+
behavior: url(csshover.htc);
|
4
|
+
height: 100%;
|
5
|
+
width: 100%;
|
6
|
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
7
|
+
font-size: 10pt;
|
8
|
+
color: #000;
|
9
|
+
background: #3D576D;
|
10
|
+
}
|
11
|
+
|
12
|
+
a
|
13
|
+
{
|
14
|
+
color: #f60;
|
15
|
+
text-decoration: underline;
|
16
|
+
}
|
17
|
+
|
18
|
+
a:hover
|
19
|
+
{
|
20
|
+
text-decoration: none;
|
21
|
+
}
|
22
|
+
|
23
|
+
.body
|
24
|
+
{
|
25
|
+
position: relative;
|
26
|
+
height: auto !important;
|
27
|
+
height: 100%;
|
28
|
+
min-height: 100%;
|
29
|
+
margin: 0 auto;
|
30
|
+
width: 100%;
|
31
|
+
}
|
32
|
+
|
33
|
+
.header
|
34
|
+
{
|
35
|
+
height: 120px;
|
36
|
+
position: relative;
|
37
|
+
}
|
38
|
+
|
39
|
+
.logo
|
40
|
+
{
|
41
|
+
position: absolute;
|
42
|
+
top: 10px;
|
43
|
+
left: 20px;
|
44
|
+
}
|
45
|
+
|
46
|
+
.logo a
|
47
|
+
{
|
48
|
+
color: #ddd;
|
49
|
+
font-size: 30pt;
|
50
|
+
font-weight: bold;
|
51
|
+
text-decoration: none;
|
52
|
+
text-shadow: #0A2337 -1px -1px 0;
|
53
|
+
}
|
54
|
+
|
55
|
+
.navigation
|
56
|
+
{
|
57
|
+
position: absolute;
|
58
|
+
left: 12px;
|
59
|
+
bottom: 20px;
|
60
|
+
}
|
61
|
+
|
62
|
+
.navigation li
|
63
|
+
{
|
64
|
+
display: inline-block;
|
65
|
+
*display: inline;
|
66
|
+
zoom: 1;
|
67
|
+
-moz-border-radius: 3px;
|
68
|
+
border-radius: 3px;
|
69
|
+
}
|
70
|
+
|
71
|
+
.navigation li:hover, .navigation li.selected
|
72
|
+
{
|
73
|
+
-moz-box-shadow: -1px -1px 0 #0A2337;
|
74
|
+
-webkit-box-shadow: -1px -1px 0 #0A2337;
|
75
|
+
box-shadow: -1px -1px 0 #304759;
|
76
|
+
background: #536C80;
|
77
|
+
}
|
78
|
+
|
79
|
+
.navigation li>a
|
80
|
+
{
|
81
|
+
display: inline-block;
|
82
|
+
*display: inline;
|
83
|
+
zoom: 1;
|
84
|
+
color: #ddd;
|
85
|
+
padding: 3px 12px;
|
86
|
+
font-size: 11pt;
|
87
|
+
text-decoration: none;
|
88
|
+
text-shadow: #304759 -1px -1px 0;
|
89
|
+
}
|
90
|
+
|
91
|
+
.sidebar .navigation
|
92
|
+
{
|
93
|
+
position: static;
|
94
|
+
}
|
95
|
+
|
96
|
+
.sidebar .navigation li
|
97
|
+
{
|
98
|
+
display: block;
|
99
|
+
margin-bottom: 5px;
|
100
|
+
}
|
101
|
+
|
102
|
+
.sidebar .navigation li>a
|
103
|
+
{
|
104
|
+
display: block;
|
105
|
+
}
|
106
|
+
|
107
|
+
.sidebar .navigation li .additional
|
108
|
+
{
|
109
|
+
padding: 10px 12px;
|
110
|
+
background: #eee;
|
111
|
+
-moz-border-radius-bottomleft: 3px;
|
112
|
+
-moz-border-radius-bottomright: 3px;
|
113
|
+
border-bottom-left-radius: 3px;
|
114
|
+
border-bottom-right-radius: 3px;
|
115
|
+
}
|
116
|
+
|
117
|
+
.columns
|
118
|
+
{
|
119
|
+
width: 100%;
|
120
|
+
display: table;
|
121
|
+
clear: both;
|
122
|
+
}
|
123
|
+
|
124
|
+
.column
|
125
|
+
{
|
126
|
+
display: table-cell;
|
127
|
+
vertical-align: top;
|
128
|
+
}
|
129
|
+
|
130
|
+
.column,
|
131
|
+
{
|
132
|
+
display: inline;
|
133
|
+
vertical-align: top;
|
134
|
+
width: expression(function(t){
|
135
|
+
var sum = 0;
|
136
|
+
for (var i = 0; i < t.parentNode.childNodes.length; i++) {
|
137
|
+
if (t.parentNode.childNodes[i] != t) {
|
138
|
+
sum += t.parentNode.childNodes[i].offsetWidth;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
return t.parentNode.clientWidth - sum + 'px';
|
142
|
+
}(this));
|
143
|
+
zoom: 1;
|
144
|
+
}
|
145
|
+
|
146
|
+
.sidebar
|
147
|
+
{
|
148
|
+
width: 250px;
|
149
|
+
}
|
150
|
+
|
151
|
+
.padder
|
152
|
+
{
|
153
|
+
padding: 0 12px;
|
154
|
+
}
|
155
|
+
|
156
|
+
.content
|
157
|
+
{
|
158
|
+
min-height: 300px;
|
159
|
+
-moz-box-shadow: -1px -1px 0 #0A2337;
|
160
|
+
-webkit-box-shadow: -1px -1px 0 #0A2337;
|
161
|
+
box-shadow: -1px -1px 0 #304759;
|
162
|
+
-moz-border-radius-topleft: 5px;
|
163
|
+
-moz-border-radius-bottomleft: 5px;
|
164
|
+
border-top-left-radius: 5px;
|
165
|
+
border-bottom-left-radius: 5px;
|
166
|
+
background: #fff;
|
167
|
+
padding: 15px;
|
168
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
html, body, div, span, applet, object, iframe,
|
2
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
3
|
+
a, abbr, acronym, address, big, cite, code,
|
4
|
+
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
5
|
+
small, strike, strong, sub, sup, tt, var,
|
6
|
+
b, u, i, center,
|
7
|
+
dl, dt, dd, ol, ul, li,
|
8
|
+
fieldset, form, label, legend,
|
9
|
+
table, caption, tbody, tfoot, thead, tr, th, td {
|
10
|
+
margin: 0;
|
11
|
+
padding: 0;
|
12
|
+
border: 0;
|
13
|
+
outline: 0;
|
14
|
+
font-size: 100%;
|
15
|
+
line-height: 130%;
|
16
|
+
vertical-align: baseline;
|
17
|
+
background: transparent;
|
18
|
+
font-weight: normal;
|
19
|
+
}
|
20
|
+
strong, b {
|
21
|
+
font-weight: bold;
|
22
|
+
}
|
23
|
+
a {
|
24
|
+
text-decoration: underline;
|
25
|
+
color: #000;
|
26
|
+
}
|
27
|
+
a:hover {
|
28
|
+
text-decoration: none;
|
29
|
+
}
|
30
|
+
sup, sub {
|
31
|
+
position: relative;
|
32
|
+
font-size: 80%;
|
33
|
+
}
|
34
|
+
sup {
|
35
|
+
top: -0.6em;
|
36
|
+
}
|
37
|
+
sub {
|
38
|
+
bottom: -0.2em;
|
39
|
+
}
|
40
|
+
blockquote, q {
|
41
|
+
quotes: none;
|
42
|
+
}
|
43
|
+
blockquote:before, blockquote:after,
|
44
|
+
q:before, q:after {
|
45
|
+
content: '';
|
46
|
+
content: none;
|
47
|
+
}
|
48
|
+
:focus {
|
49
|
+
outline: 0;
|
50
|
+
}
|
51
|
+
ins {
|
52
|
+
text-decoration: none;
|
53
|
+
}
|
54
|
+
del {
|
55
|
+
text-decoration: line-through;
|
56
|
+
}
|
57
|
+
table {
|
58
|
+
border-collapse: collapse;
|
59
|
+
border-spacing: 0;
|
60
|
+
}
|
data/spec/lib/fields_spec.rb
CHANGED
@@ -11,6 +11,8 @@ describe "Field" do
|
|
11
11
|
field.model.should == Profile
|
12
12
|
field = Puffer::Fields::Field.new Post, 'user.email'
|
13
13
|
field.model.should == User
|
14
|
+
field = Puffer::Fields::Field.new Post, 'user'
|
15
|
+
field.model.should == Post
|
14
16
|
field = Puffer::Fields::Field.new Post, 'title'
|
15
17
|
field.model.should == Post
|
16
18
|
end
|
data/spec/lib/params_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe "Params" do
|
4
4
|
|
5
|
-
include RSpec::Rails::
|
5
|
+
include RSpec::Rails::RoutingExampleGroup
|
6
6
|
|
7
7
|
=begin
|
8
8
|
params_examples = [
|
@@ -22,98 +22,99 @@ describe "Params" do
|
|
22
22
|
end
|
23
23
|
=end
|
24
24
|
|
25
|
-
before :each do
|
26
|
-
@resource = mock(Puffer::Resource, :collection => [], :member => nil, :template => {:nothing => true}, :includes => nil)
|
27
|
-
Puffer::Resource.stub(:new) {@resource}
|
28
|
-
end
|
29
|
-
|
30
25
|
describe "GET /admin/users" do
|
31
26
|
it "should set proper params" do
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
27
|
+
assert_recognizes({"ancestors"=>[],
|
28
|
+
"action"=>"index",
|
29
|
+
"plural"=>true,
|
30
|
+
"controller"=>"admin/users",
|
31
|
+
"children"=>[:profile, :posts]}, '/admin/users')
|
37
32
|
end
|
38
33
|
end
|
39
34
|
|
40
35
|
describe "GET /admin/users/1/profile" do
|
41
36
|
it "should set proper params" do
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
37
|
+
assert_recognizes({"ancestors"=>[:users],
|
38
|
+
"action"=>"show",
|
39
|
+
"user_id"=>"1",
|
40
|
+
"plural"=>false,
|
41
|
+
"controller"=>"admin/profiles",
|
42
|
+
"children"=>[:tags]}, '/admin/users/1/profile')
|
47
43
|
end
|
48
44
|
end
|
49
45
|
|
50
46
|
describe "get /admin/users/1/posts" do
|
51
47
|
it "should set proper params" do
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
48
|
+
assert_recognizes({"ancestors"=>[:users],
|
49
|
+
"action"=>"index",
|
50
|
+
"user_id"=>"1",
|
51
|
+
"plural"=>true,
|
52
|
+
"controller"=>"admin/posts",
|
53
|
+
"children"=>[:categories, :tags]}, '/admin/users/1/posts')
|
57
54
|
end
|
58
55
|
end
|
59
56
|
|
60
57
|
describe "GET /admin/users/1/posts/1/categories" do
|
61
58
|
it "should set proper params" do
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
59
|
+
assert_recognizes({"ancestors"=>[:users, :posts],
|
60
|
+
"action"=>"index",
|
61
|
+
"post_id"=>"1",
|
62
|
+
"user_id"=>"1",
|
63
|
+
"plural"=>true,
|
64
|
+
"controller"=>"admin/categories",
|
65
|
+
"children"=>[]}, '/admin/users/1/posts/1/categories')
|
67
66
|
end
|
68
67
|
end
|
69
68
|
|
70
|
-
describe "GET /profiles" do
|
69
|
+
describe "GET /admin/profiles" do
|
71
70
|
it "should set proper params" do
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
assert_recognizes({"ancestors"=>[],
|
72
|
+
"action"=>"index",
|
73
|
+
"plural"=>true,
|
74
|
+
"controller"=>"admin/profiles",
|
75
|
+
"children"=>[:tags]}, '/admin/profiles')
|
77
76
|
end
|
78
77
|
end
|
79
78
|
|
80
|
-
describe "GET /posts" do
|
79
|
+
describe "GET /admin/posts" do
|
81
80
|
it "should set proper params" do
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
81
|
+
assert_recognizes({"ancestors"=>[],
|
82
|
+
"action"=>"index",
|
83
|
+
"plural"=>true,
|
84
|
+
"controller"=>"admin/posts",
|
85
|
+
"children"=>[:user, :categories]}, '/admin/posts')
|
87
86
|
end
|
88
87
|
end
|
89
88
|
|
90
89
|
describe "GET /admin/posts/1/categories" do
|
91
90
|
it "should set proper params" do
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
91
|
+
assert_recognizes({"ancestors"=>[:posts],
|
92
|
+
"action"=>"index",
|
93
|
+
"post_id"=>"1",
|
94
|
+
"plural"=>true,
|
95
|
+
"controller"=>"admin/categories",
|
96
|
+
"children"=>[]}, '/admin/posts/1/categories')
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
100
|
-
describe "GET /categories" do
|
100
|
+
describe "GET /admin/categories" do
|
101
101
|
it "should set proper params" do
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
102
|
+
assert_recognizes({"ancestors"=>[],
|
103
|
+
"action"=>"index",
|
104
|
+
"plural"=>true,
|
105
|
+
"controller"=>"admin/categories",
|
106
|
+
"children"=>[:posts]}, '/admin/categories')
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
110
110
|
describe "GET /admin/categories/1/posts" do
|
111
111
|
it "should set proper params" do
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
112
|
+
assert_recognizes({"ancestors"=>[:categories],
|
113
|
+
"action"=>"index",
|
114
|
+
"category_id"=>"1",
|
115
|
+
"plural"=>true,
|
116
|
+
"controller"=>"admin/posts",
|
117
|
+
"children"=>[]}, '/admin/categories/1/posts')
|
117
118
|
end
|
118
119
|
end
|
119
120
|
end
|