right-rails 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.textile +7 -7
- data/init.rb +10 -9
- data/javascripts/right-rails-src.js +2 -2
- data/javascripts/right-rails.js +1 -1
- data/javascripts/right-selectable-src.js +20 -9
- data/javascripts/right-selectable.js +1 -1
- data/lib/right_rails/helpers/forms.rb +2 -0
- metadata +3 -3
data/README.textile
CHANGED
@@ -4,7 +4,7 @@ RightRails is a RubyOnRails plugin for RightJS javascript framework.
|
|
4
4
|
|
5
5
|
It works as a drop in replacement for all the Prototype/Scriptaculous
|
6
6
|
methods, plus it brings some more sweets and routine ajax operations
|
7
|
-
|
7
|
+
helpers.
|
8
8
|
|
9
9
|
|
10
10
|
h2. Features
|
@@ -28,6 +28,10 @@ See the wiki-pages for the documentation
|
|
28
28
|
|
29
29
|
<a href="http://wiki.github.com/MadRabbit/right-rails">http://wiki.github.com/MadRabbit/right-rails</a>
|
30
30
|
|
31
|
+
See also the demo application for examples
|
32
|
+
|
33
|
+
<a herf="http://github.com/MadRabbit/right-rails-demo">http://github.com/MadRabbit/right-rails-demo</a>
|
34
|
+
|
31
35
|
|
32
36
|
h3. Usage
|
33
37
|
|
@@ -45,11 +49,7 @@ You also will have an ajax-friendly scaffold generator
|
|
45
49
|
|
46
50
|
h4. Ruby Gem
|
47
51
|
|
48
|
-
Ruby gem version is now also available.
|
49
|
-
|
50
|
-
<pre><code>gem sources -a http://gemcutter.org</code></pre>
|
51
|
-
|
52
|
-
Install the gem:
|
52
|
+
Ruby gem version is now also available.
|
53
53
|
|
54
54
|
<pre><code>gem install right-rails</code></pre>
|
55
55
|
|
@@ -62,4 +62,4 @@ end</code></pre>
|
|
62
62
|
|
63
63
|
|
64
64
|
|
65
|
-
Copyright (c) 2009 Nikolay V. Nemshilov, released under the MIT license
|
65
|
+
Copyright (c) 2009-2010 Nikolay V. Nemshilov, released under the MIT license
|
data/init.rb
CHANGED
@@ -1,4 +1,14 @@
|
|
1
1
|
# Include hook code here
|
2
|
+
|
3
|
+
require 'right_rails'
|
4
|
+
require 'right_rails/controller_extensions'
|
5
|
+
require 'right_rails/java_script_generator'
|
6
|
+
require 'right_rails/helpers'
|
7
|
+
require 'right_rails/helpers/basic'
|
8
|
+
require 'right_rails/helpers/forms'
|
9
|
+
require 'right_rails/helpers/misc'
|
10
|
+
require 'right_rails/helpers/rails'
|
11
|
+
|
2
12
|
if defined?(Rails)
|
3
13
|
if Rails::VERSION::MAJOR == 2
|
4
14
|
# Rails 2.x.x initalizer
|
@@ -19,15 +29,6 @@ if defined?(Rails)
|
|
19
29
|
require 'action_controller/railtie'
|
20
30
|
|
21
31
|
if defined?(ActionController)
|
22
|
-
require 'right_rails'
|
23
|
-
require 'right_rails/controller_extensions'
|
24
|
-
require 'right_rails/java_script_generator'
|
25
|
-
require 'right_rails/helpers'
|
26
|
-
require 'right_rails/helpers/basic'
|
27
|
-
require 'right_rails/helpers/forms'
|
28
|
-
require 'right_rails/helpers/misc'
|
29
|
-
require 'right_rails/helpers/rails'
|
30
|
-
|
31
32
|
class ActionController::Base
|
32
33
|
include RightRails::ControllerExtensions
|
33
34
|
|
@@ -110,12 +110,12 @@ var RR = {
|
|
110
110
|
remove: function(id) {
|
111
111
|
var element = $(id);
|
112
112
|
if (element) {
|
113
|
-
var remove_element = element.remove.bind(element)
|
113
|
+
var remove_element = element.remove.bind(element);
|
114
114
|
|
115
115
|
if (this.Options.removeFx) {
|
116
116
|
element.hide(this.Options.removeFx, {onFinish: remove_element});
|
117
117
|
} else {
|
118
|
-
remove_element;
|
118
|
+
remove_element();
|
119
119
|
}
|
120
120
|
}
|
121
121
|
},
|
data/javascripts/right-rails.js
CHANGED
@@ -6,4 +6,4 @@
|
|
6
6
|
*
|
7
7
|
* Copyright (C) 2009-2010 Nikolay V. Nemshilov
|
8
8
|
*/
|
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})("8 RR={6:{17at:'js',36:'flashes',37:'slide',
|
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})("8 RR={6:{17at:'js',36:'flashes',37:'slide',12:3200,1688:60,30:'fade',26:'.45_edit',23:'.45_delete',149089:60},update_flash:4(c){8 e=$(5.6.36);if(e)5.10(e,c).24();7 5},24:4(){if(5.6.12>-1){8 e=$(5.6.36);if(e&&e.visible())e.79.82(e,5.6.37).delay(5.6.12)}7 5},16:4(i){if(5.6.1688)$(i).16();7 5},19:4(a,w){7 5.16($(a).19(w).lastChild).14(a)},10:4(i,s){$(i).10(s);7 5.16(i).14(i)},41:4(i){8 e=$(i);if(e){8 r=e.41.82(e);if(5.6.30)e.79(5.6.30,{onFinish:r});47 r()}},15:4(i){8 f=$(i);if(f)f.remotize().enable().65+='.'+5.6.17at;7 5},10_17:4(i,s){8 f=$(i);if(f){f.10(s);5.15(i)}7 5.14(i)},show_17_86:4(i,s){$(i).select('17').46('41');$(i).19(s);7 5.15($(i).49('17')).14(i)},28:4(e){8 t=e.tar29,l=[t].68(t.53()).49('34','a');if(l){if(l.34(5.6.26)){e.33();85.81(l.58+'.'+5.6.17at)}47 if(l.34(5.6.23)&&l.87('52')){e.33();eval('({f:'+l.52.to66().10('.39','.78')+'})').f.call(l)}}},14:4(s){$w('Draggable Droppable Tabs Slider Selectable').46(4(n){if(84[n])84[n].14(5.6.149089?s:80)},5);7 5}};(4(){8 u=4(a,e){8 m=e.29('31-51');if(m&&!51(m)){a.33();7 60}};8 c=4(e,o){7 63.merge({onCreate:4(){e.43('45:81ing',5)},onComplete:4(){e.43('45:complete',5)},onSuccess:4(){e.43('45:success',5)},onFailure:4(){e.43('45:failure',5)}},o)};8 g=4(e,l){8 m=l.29('31-38'),r=l.29('31-69');if(u(e,l))7;if(m||r)e.33();if(r)85.81(l.58,c(l,{38:m||'29',55:l.29('31-55')}));47 if(m){8 p=$$('83[44=77-param]')[0],t=$$('83[44=77-token]')[0],f=$E('17',{65:l.58,38:'post'});if(p&&t)f.19('<73 59=\"62\" 44=\"'+p.29('56')+'\" 71=\"'+t.29('56')+'\" />');f.19('<73 59=\"62\" 44=\"_38\" 71=\"'+m+'\"/>').19To(18.body).39()}};8 d=4(e,b){if(!u(e,b)&&$(b.17).87('31-69')){e.33();b.17.78(c(b.17))}};18.on({72:4(e){8 t=e.tar29,f=t.17,l=[t].68(t.53()).49('34','a');if(f&&['39','image'].57(t.59))d(e,t);47 if(l)g(e,l)},keydown:4(e){8 t=e.tar29,f=t.17;if(f&&t.tagName==='INPUT'&&e.keyCode==13)d(e,t)}})})();18.on({ready:4(){RR.24()},72:4(e){RR.28(e)}});[66.9,70.9,Function.9,63,6,48,48.9,window,18].46(4(o){86(8 k in o)try{if(/[A-Z]/.76(k)&&59of(o[k])==='4'){8 u=k.35();if(o[u]===80||o[u]===undefined)o[u]=o[k]}}catch(e){}});[54,Event,75,75.54].46(4(o){8 a={},m=o.Methods;86(8 k in m)if(/[A-Z]/.76(k)&&59of(m[k])==='4')a[k.35()]=m[k];o.57(a)});61(66.9,{50:'25',27:'11',to_f:'toFloat',to_i:'toInt',gsub:'10',downcase:'toLower91',upcase:'toUpper91',74:'25',67:'11',strip:'trim'});61(70.9,{collect:'map',detect:'filter',50:'25',27:'11',74:'25',67:'11'});",",,,,function,this,Options,return,var,prototype,replace,lastIndexOf,flashHideDelay,,rescan,remotize_form,highlight,form,document,insert,,highlightUpdates,rescanWithScopes,linkToAjaxDelete,hide_flash,indexOf,linkToAjaxEdit,last_index_of,process_click,get,removeFx,data,,stop,match,underscored,flashId,flashHideFx,method,submit,format,remove,target,fire,name,ajax,each,else,Observer,first,index_of,confirm,onclick,parents,Element,spinner,content,include,href,type,true,$alias,hidden,Object,typeof,action,String,rindex,concat,remote,Array,value,click,input,index,Form,test,csrf,send,hide,null,load,bind,meta,self,Xhr,for,has,Updates,Scopes,With,Case".split(",")));
|
@@ -130,8 +130,7 @@ var Selectable = new Class(Observer, {
|
|
130
130
|
* @return Selectable this
|
131
131
|
*/
|
132
132
|
insertTo: function(element, position) {
|
133
|
-
this.element.insertTo(element, position);
|
134
|
-
if (this.isSingle) this.container.insertTo(this.element, 'before');
|
133
|
+
this[this.isSingle ? 'container' : 'element'].insertTo(element, position);
|
135
134
|
return this;
|
136
135
|
},
|
137
136
|
|
@@ -469,24 +468,36 @@ var Selectable = new Class(Observer, {
|
|
469
468
|
// builds a container for a single-select
|
470
469
|
buildSingle: function() {
|
471
470
|
this.container = $E('div', {'class': this.containerClass})
|
472
|
-
.insert([
|
473
|
-
|
474
|
-
|
471
|
+
.insert([
|
472
|
+
$E('div', {'html': this.options.hCont, 'class': 'right-selectable-handle'}),
|
473
|
+
$E('ul', {'class': 'right-selectable-display'})
|
474
|
+
])
|
475
|
+
.insertTo(this.element, 'instead')
|
476
|
+
.insert(this.element)
|
477
|
+
.onClick(this.toggleList.bind(this));
|
475
478
|
|
476
479
|
document.onClick(this.hideList.bind(this));
|
477
480
|
|
478
481
|
return this;
|
479
482
|
},
|
480
483
|
|
484
|
+
// toggles the single-selects list
|
485
|
+
toggleList: function(event) {
|
486
|
+
event.stop();
|
487
|
+
return this.element.visible() ? this.hideList() : this.showList(event);
|
488
|
+
},
|
489
|
+
|
481
490
|
// shows list for the single-selects
|
482
491
|
showList: function(event) {
|
483
492
|
event.stop();
|
484
493
|
if (this.isSingle) {
|
485
|
-
|
494
|
+
$$('.right-selectable-single').without(this.element).each('hide');
|
495
|
+
|
496
|
+
var dims = this.container.dimensions(), pos = this.container.position();
|
486
497
|
|
487
498
|
this.element.setStyle({
|
488
|
-
top: (dims.top + dims.height) + 'px',
|
489
|
-
left: dims.left + 'px',
|
499
|
+
top: (dims.top + dims.height - pos.y) + 'px',
|
500
|
+
left: (dims.left - pos.x) + 'px',
|
490
501
|
width: dims.width + 'px'
|
491
502
|
}).show(this.options.fxName, {
|
492
503
|
duration: this.options.fxDuration,
|
@@ -549,4 +560,4 @@ var Selectable = new Class(Observer, {
|
|
549
560
|
*/
|
550
561
|
document.onReady(function() { Selectable.rescan(); });
|
551
562
|
|
552
|
-
document.write("<style type=\"text/css\">*.right-selectable,*.right-selectable li,*.right-selectable dt,*.right-selectable dd,*.right-selectable ul,div.right-selectable-container ul,div.right-selectable-container ul li{margin:0;padding:0;border:none;background:none;list-style:none}*.right-selectable{border:1px solid #CCC;border-bottom:none;display:inline-block;*display:inline;*zoom:1;min-width:10em;-moz-border-radius:.2em;-webkit-border-radius:.2em}*.right-selectable li{padding:.3em 1em;cursor:pointer;border-bottom:1px solid #CCC}*.right-selectable li:hover{background:#EEE}*.right-selectable li.right-selectable-selected{font-weight:bold;background:#DDD}*.right-selectable li.right-selectable-disabled,*.right-selectable li.right-selectable-disabled:hover{background:#CCC;color:#777;cursor:default}dl.right-selectable dt{padding:.3em .5em;cursor:default;font-weight:bold;font-style:italic;color:#444;background:#EEE;border-bottom:1px solid #CCC}dl.right-selectable dd li{padding-left:1.5em}*.right-selectable-single{-moz-box-shadow:#AAA .2em .2em .5em;-webkit-box-shadow:#AAA .2em .2em .5em;display:none;position:absolute;background:#FFF}div.right-selectable-container{border:1px solid #CCC;-moz-border-radius:.2em;-webkit-border-radius:.2em;display:inline-block;*display:inline;*zoom:1;*width:10em;vertical-align:middle;min-width:10em;cursor:pointer;height:1.6em}div.right-selectable-container div.right-selectable-handle{font-family:Arial;float:right;width:0.8em;background:#DDD;text-align:center;height:100%;line-height:0.8em;font-size:200%;color:#888;border-left:1px solid #CCC}div.right-selectable-container:hover div{color:#666}div.right-selectable-container ul{display:block;width:auto;margin-right:2em;overflow:hidden}div.right-selectable-container ul li{line-height:1.6em;padding:0 .5em}</style>");
|
563
|
+
document.write("<style type=\"text/css\">*.right-selectable,*.right-selectable li,*.right-selectable dt,*.right-selectable dd,*.right-selectable ul,div.right-selectable-container ul.right-selectable-display,div.right-selectable-container ul.right-selectable-display li{margin:0;padding:0;border:none;background:none;list-style:none}*.right-selectable{border:1px solid #CCC;border-bottom:none;display:inline-block;*display:inline;*zoom:1;min-width:10em;-moz-border-radius:.2em;-webkit-border-radius:.2em}*.right-selectable li{padding:.3em 1em;cursor:pointer;border-bottom:1px solid #CCC}*.right-selectable li:hover{background:#EEE}*.right-selectable li.right-selectable-selected{font-weight:bold;background:#DDD}*.right-selectable li.right-selectable-disabled,*.right-selectable li.right-selectable-disabled:hover{background:#CCC;color:#777;cursor:default}dl.right-selectable dt{padding:.3em .5em;cursor:default;font-weight:bold;font-style:italic;color:#444;background:#EEE;border-bottom:1px solid #CCC}dl.right-selectable dd li{padding-left:1.5em}*.right-selectable-single{-moz-box-shadow:#AAA .2em .2em .5em;-webkit-box-shadow:#AAA .2em .2em .5em;display:none;position:absolute;background:#FFF;z-index:99999}div.right-selectable-container{border:1px solid #CCC;-moz-border-radius:.2em;-webkit-border-radius:.2em;display:inline-block;*display:inline;*zoom:1;*width:10em;vertical-align:middle;min-width:10em;cursor:pointer;height:1.6em;position:relative}div.right-selectable-container div.right-selectable-handle{font-family:Arial;float:right;width:0.8em;background:#DDD;text-align:center;height:100%;line-height:0.8em;font-size:200%;color:#888;border-left:1px solid #CCC}div.right-selectable-container:hover div.right-selectable-handle{color:#666}div.right-selectable-container ul.right-selectable-display{display:block;width:auto;margin-right:2em;overflow:hidden}div.right-selectable-container ul.right-selectable-display li{line-height:1.6em;padding:0 .5em}</style>");
|
@@ -4,4 +4,4 @@
|
|
4
4
|
* Copyright (C) 2009 Nikolay V. Nemshilov
|
5
5
|
*/
|
6
6
|
if (!self.RightJS) throw "Gimme RightJS";
|
7
|
-
eval((function(s,d){for(var i=d.length-1;i>-1;i--)if(d[i])s=s.replace(new RegExp(i,'g'),d[i]);return s})("
|
7
|
+
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})("25 71=new 167(Observer,{extend:{EVENTS:$w('154 26 un26 76 118 79 161 122 101'),Options:{15:37,19:37,23:37,42:102,70:'slide',72:'short',38:37,130:158,135:37,157:'•',50:102},151:12(s){($(s)||46).26('*.14-13').34(12(e){if(!e._13)new 71(e)})}},120:'14-13',69:'14-13-112',19167:'14-13-19',23167:'14-13-23',18167:'14-13-18',initialize:12(){25 a=$A(84),s;if(a[0]&&!150(a[0]))11.17=$(a[0]);11.115(150(a.last())?a.last():11.17?eval('('+11.17.get('data-13-15')+')'):37);if(!11.17)11.17=11.134();43 if((s=11.17.141=='SELECT')){11.26box=11.86(11.17);11.17=11.134().58(11.26box,'before')}11.17._13=11.init();if(s)11.94(11.98(11.26box))},destroy:12(){11.22.34(12(i){i.31('109',11.51).31('61',11.73).31('52',11.55).31('49',11.59).31('75',11.78)},11);delete(11.17._13)},67:12(v){if(97(v))v=v.split(',').123('trim').89(12(a){16!a.blank()});11.22.34('39',11.19167);16 11.26(v)},62:12(){if(11.24){25 a=11.22.133('30',11.19167);16 a?11.85(a):37}43 16 11.22.89('30',11.19167).123(12(i){16 11.85(i)},11)},58:12(e,p){11[11.24?'18':'17'].58(e,p);16 11},94:12(b){25 a=12(e,v){if(e=$(e)){if(v===undefined||v===37)v='';e[e.67?'67':'38'](e.type=='26-42'?v:''+v)}}.156(b);25 c=12(e,o){25 e=$(e);if(e&&e.95)e.95(12(){11.67(e.81)}.33(o))}.156(b);if($(b)){a(11.62());c(11)}43 46.144(12(){a(11.62());c(11)}.33(11));16 11.95(a)},76:12(k){11.45(k).34(12(i){11.35('76',i.60(11.23167))},11);16 11},118:12(k){11.45(k).34(12(i){11.35('118',i.39(11.23167))},11);16 11},23:12(k){16 11.45(k).160('30',11.23167)},26:12(k){25 b=11.47(k),d=11.19167;if(11.24&&b){11.22.34('39',d);b=[b[0]]}if(!11.24&&11.15.135){25 s=11.22.89('30',d),c=[];while(b.117&&(s.117+c.117)<11.15.135){25 a=b.shift();if(!s.140(a))c.147(a)}b=c}b.34(12(i){11.35('26',i.60(d))},11);16 11},un26:12(k){11.47(k).34(12(i){11.35('un26',i.39(11.19167))},11);16 11},19:12(k){16 11.47(k).160('30',11.19167)},50:12(){11.22=11.17.26('li').34(12(i){if(!11.22||!11.22.140(i))i.on({109:11.51,75:11.78,49:11.59,52:11.55,61:11.73})},11);16 11},init:12(){11.17.60(11.120);if(11.24=!11.15.42||11.17.30(11.69))11.106().17.60(11.69);11.59=11.49.33(11);11.78=11.75.33(11);11.55=11.52.33(11);11.73=11.61.33(11);11.51=11.109.33(11);11.81=37;25 a=12(){25 v=11.62();if(v!=11.81){11.81=v;11.35('154',v,11)}}.33(11);11.50().96(a).onUn26(a);if(11.24)11.96('122Item');if(11.15.23)11.76(11.15.23);if(11.15.19)11.26(11.15.19);if(11.15.38)11.94(11.15.38);if(11.24){if(11.15.19===37)11.26(11.22[0]);11.96('65')}if(11.15.50){25 o=11.17.38;11.17.38=12(){25 r=o.159(11.17,84);11.50();16 r}.33(11)}16 11},85:12(i){16 i.id?11.15.130?i.id.match(/\\d+/):i.id:11.22.74(i)},35:12(n,i){if(i&&i.141)11.115(n,i,11.22.74(i),11);43 11.115.159(11,84);16 11},123:12(c){if(!143(c))c=[c];16 c.123(12(k){25 i=(97(k)&&/^\\d+$/.test(k))?k.toInt():k,b=k;if(isNumber(i))b=11.22[i];43 if(97(k))b=11.22.133(12(a){16 a.id==k});16 b},11).compact()},45:12(k){16 defined(k)?11.123(k):11.22},47:12(k){16 11.45(k).89(12(i){16!i.30(11.23167)},11)},49:12(e){e.105();25 c=e.116;if(!11.23(c)){if(11.24)11.26(c);43 if(11.19(c)){11.un26(c);11.64=102}43{11.26(c);11.56=102}if((e.shiftKey||e.metaKey)&&11.54){25 a=11.22.74(11.54);25 b=11.22.74(c);if(a!=b){if(a>b){25 t=a;a=b;b=a}for(25 i=a;i<b;i++)11[11.54.30(11.19167)?'26':'un26'](11.22[i])}}11.54=c}},75:12(e){e.105();11.64=11.56=158},52:12(e){25 i=e.116;11.35('79',i);if(!11.24){if(11.56)11.26(i);43 if(11.64)11.un26(i)}},61:12(e){11.35('161',e.116)},109:12(e){e.105()},134:12(){25 e=$E('ul'),a=11.15.15;if(143(a))a.34(12(o){e.90($E('li',{146:o}))});43 for(25 k in a)e.90($E('li',{id:k,146:a[k]}));16 e},106:12(){11.18=$E('41',{'131':11.18167}).90([$E('41',{'146':11.15.157,'131':'14-13-119'}),$E('ul',{'131':'14-13-27'})]).58(11.17,'instead').90(11.17).51(11.110.33(11));46.51(11.65.33(11));16 11},110:12(e){e.105();16 11.17.142()?11.65():11.122List(e)},122List:12(e){e.105();if(11.24){$$('.14-13-112').without(11.17).34('101');25 d=11.18.dimensions(),p=11.18.68();11.17.setStyle({top:(d.top+d.48-p.y)+'px',121:(d.121-p.x)+'px',40:d.40+'px'}).122(11.15.70,{127:11.15.72,132:11.35.33(11,'122',11)});if(!11.15.70)11.35('122',11)}},65:12(){if(11.24&&11.17.142()){11.17.101(11.15.70,{127:11.15.72,132:11.35.33(11,'101',11)});if(!11.15.70)11.35('101',11)}},122Item:12(i){11.18.133('ul').38(i?i.cloneNode(102):'<li> </li>')},86:12(b){25 a=11.15;if(b){a.42=b.has('42');a.15={};a.19=[];a.23=[];$A(b.getElementsByTagName('OPTION')).34(12(o,i){a.15[$(o).get('81')||o.126]=o.126;if(o.19)a.19.147(i);if(o.23)a.23.147(i)});if(a.19.empty())a.19=0}16 b},98:12(e){16 e.wrap($E('41',{87:'68:138;z-162:-1;visibility:114;40:0;48:0;129:114'}))}});46.144(12(){71.151()});46.write(\"<87 type=\\\"165/css\\\">*.14-13,*.14-13 li,*.14-13 dt,*.14-13 dd,*.14-13 ul,41.14-13-18 ul.14-13-27,41.14-13-18 ul.14-13-27 li{149:0;53:0;29:104;28:104;list-87:104}*.14-13{29:125 83 #107;29-111:104;27:92-137;*27:92;*zoom:1;min-40:148;-155-29-91:.63;-113-29-91:.63}*.14-13 li{53:.3em 1em;93:145;29-111:125 83 #107}*.14-13 li:79{28:#EEE}*.14-13 li.14-13-19{103-152:166;28:#DDD}*.14-13 li.14-13-23,*.14-13 li.14-13-23:79{28:#107;108:#777;93:139}dl.14-13 dt{53:.3em .124;93:139;103-152:166;103-87:italic;108:#444;28:#EEE;29-111:125 83 #107}dl.14-13 dd li{53-121:1.124}*.14-13-112{-155-box-153:#AAA .63 .63 .124;-113-box-153:#AAA .63 .63 .124;27:104;68:138;28:#FFF;z-162:99999}41.14-13-18{29:125 83 #107;-155-29-91:.63;-113-29-91:.63;27:92-137;*27:92;*zoom:1;*40:148;vertical-163:middle;min-40:148;93:145;48:1.6em;68:relative}41.14-13-18 41.14-13-119{103-family:Arial;float:14;40:0.8em;28:#DDD;165-163:center;48:100%;164-48:0.8em;103-size:200%;108:#888;29-121:125 83 #107}41.14-13-18:79 41.14-13-119{108:#666}41.14-13-18 ul.14-13-27{27:137;40:auto;149-14:63;129:114}41.14-13-18 ul.14-13-27 li{164-48:1.6em;53:0 .124}</87>\");",",,,,,,,,,,,this,function,selectable,right,options,return,element,container,selected,,selectedClass,items,disabled,isSingle,var,select,display,background,border,hasClass,stopObserving,disabledClass,bind,each,fire,unselect,null,update,removeClass,width,div,multiple,else,,mapOrAll,document,mapEnabled,height,mousedown,refresh,onClick,mouseover,padding,_prevItem,onMouseover,_massSelect,_selectable,insertTo,onMousedown,addClass,mouseout,getValue,2em,_massRemove,hideList,,setValue,position,singleClass,fxName,Selectable,fxDuration,onMouseout,indexOf,mouseup,disable,,onMouseup,hover,selectbox,value,containerClass,solid,arguments,itemValue,harvestOptions,style,,filter,insert,radius,inline,cursor,assignTo,onChange,onSelect,isString,hideOriginal,,,hide,true,font,none,stop,buildSingle,CCC,color,click,toggleList,bottom,single,webkit,hidden,$super,target,length,enable,handle,baseClass,left,show,map,5em,1px,innerHTML,duration,showList,overflow,parseIds,class,onFinish,first,build,limit,showItem,block,absolute,default,include,tagName,visible,isArray,onReady,pointer,html,push,10em,margin,isHash,rescan,weight,shadow,change,moz,curry,hCont,false,apply,every,leave,index,align,line,text,bold,Class".split(",")));
|
@@ -121,6 +121,8 @@ module RightRails::Helpers::Forms
|
|
121
121
|
# Builds a dummy rater, just for displaying purposes
|
122
122
|
#
|
123
123
|
def rater_display(value, options={})
|
124
|
+
rightjs_include_module 'rater'
|
125
|
+
|
124
126
|
content_tag :div, (0...(options[:size] || 5)).to_a.collect{ |i|
|
125
127
|
content_tag :div, '★', :class => i < value ? 'right-rater-glow' : nil
|
126
128
|
}.join(''), :class => 'right-rater right-rater-disabled'
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 3
|
9
|
+
version: 0.5.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nikolay Nemshilov
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-24 00:00:00 +04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|