right-rails 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,8 +30,8 @@ var Rater = new Class(Observer, {
30
30
  },
31
31
 
32
32
  // searches and initializes rating units
33
- rescan: function() {
34
- $$('div.right-rater').each(function(element) {
33
+ rescan: function(scope) {
34
+ ($(scope)||document).select('div.right-rater').each(function(element) {
35
35
  if (!element._rater) new Rater(element);
36
36
  });
37
37
  }
@@ -6,4 +6,4 @@
6
6
  * Copyright (C) 2009 Nikolay V. Nemshilov aka St.
7
7
  */
8
8
  if (!self.RightJS) throw "Gimme RightJS";
9
- eval((function(s,d){for(var i=d.length-1;i>-1;i--)if(d[i])s=s.replace(new RegExp(i,'g'),d[i]);return s})("32 39=59 77(Observer,{extend:{EVENTS:$w('53 55 29'),Options:{28:5,19:22,25:22,16:58,24:58,62:22,61:'rate',60:22},51:4(){$$('21.17-14').44(4(e){if(!e._14)59 39(e)})}},71ialize:4(){32 a=$A(arguments);2.13=(a[0]&&!47(a[0]))?$(a[0]):22;2.$super(47(a.70())?a.70():2.13?eval('('+2.13.get('data-14-12')+')'):22);if(!2.13)2.13=2.63();2.13._14=2.71()},20:4(v){if(!2.16()){v=isString(v)?v.toInt():v;v=isNumber(v)?v.round():0;if(v>2.12.28)v=2.12.28;69 if(v<0)v=0;2.23(v);if(2.19!=v)2.45('53',2.19=v,2)}18 2},getValue:4(){18 2.19},38:4(e,p){2.13.38(e,p);18 2},36:4(b){32 a=4(e,v){if(e=$(e)){if(v===undefined||v===22)v='';e[e.20?'20':'25'](''+v)}}.57(b);32 c=4(e,o){32 e=$(e);if(e&&e.27)e.27(4(){2.20(e.19)}.30(o))}.57(b);if($(b)){a(2.19);c(2)}69 26.41(4(){a(2.19);c(2)}.30(2));18 2.27(a)},29:4(){if(2.12.62){59 60(2.12.62,2.12.60).29(2.12.61+\"=\"+2.19);2.45('29',2.19,2)}18 2},31:4(){2.13.35('17-14-16');18 2},enable:4(){2.13.34('17-14-16');18 2},16:4(){18 2.13.has77('17-14-16')},40:4(i){if(!2.16()){2.23(i+1);2.45('55',i+1,2)}},43:4(i){2.20(i+1);if(2.12.24)2.31();2.29()},54:4(){2.20(2.19)},23:4(n){2.37.44(4(e,a){e[n-1<a?'34':'35']('17-14-74')})},71:4(){2.37=2.13.subNodes();2.37.44(4(e,i){e.onMouseover(2.40.30(2,i)).onClick(2.43.30(2,i))},2);2.13.onMouseout(2.54.30(2));2.20(2.12.19);if(2.12.16)2.31();if(2.12.25)2.36(2.12.25);18 2},63:4(){32 e=$E('21',{'class':'17-14'});2.12.28.times(4(){e.insert($E('21',{html:'&#9733;'}))});18 e}});26.41(4(){39.51()});26.write(\"<65 type=\\\"46/css\\\">21.17-14,21.17-14 21{margin:0;padding:0;background:75;border:75;42:52-block;*42:52;*zoom:1;76-family:Arial;76-28:110%}21.17-14{67:6em;vertical-68:middle}21.17-14 21{67:64;48:64;line-48:64;46-68:center;50:pointer;56:#888}21.17-14 21.17-14-74{56:brown;46-shadow:#666 .72 .72 .15em}21.17-14-16 21{50:default}</65>\");",",,this,,function,,,,,,,,options,element,rater,,disabled,right,return,value,setValue,div,null,highlight,disableOnVote,update,document,onChange,size,send,bind,disable,var,,removeClass,addClass,assignTo,stars,insertTo,Rater,hovered,onReady,display,clicked,each,fire,text,isHash,height,_rater,cursor,rescan,inline,change,leaved,hover,color,curry,false,new,Xhr,param,url,build,1em,style,,width,align,else,last,init,05em,,glow,none,font,Class".split(",")));
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})("32 39=59 77(Observer,{extend:{EVENTS:$w('53 55 28'),Options:{29:5,19:23,25:23,16:58,26:58,62:23,61:'rate',60:23},51:4(s){($(s)||22).select('21.17-14').44(4(e){if(!e._14)59 39(e)})}},71ialize:4(){32 a=$A(arguments);2.13=(a[0]&&!47(a[0]))?$(a[0]):23;2.$super(47(a.70())?a.70():2.13?eval('('+2.13.get('data-14-12')+')'):23);if(!2.13)2.13=2.63();2.13._14=2.71()},20:4(v){if(!2.16()){v=isString(v)?v.toInt():v;v=isNumber(v)?v.round():0;if(v>2.12.29)v=2.12.29;69 if(v<0)v=0;2.24(v);if(2.19!=v)2.45('53',2.19=v,2)}18 2},getValue:4(){18 2.19},38:4(e,p){2.13.38(e,p);18 2},36:4(b){32 a=4(e,v){if(e=$(e)){if(v===undefined||v===23)v='';e[e.20?'20':'25'](''+v)}}.57(b);32 c=4(e,o){32 e=$(e);if(e&&e.27)e.27(4(){2.20(e.19)}.30(o))}.57(b);if($(b)){a(2.19);c(2)}69 22.41(4(){a(2.19);c(2)}.30(2));18 2.27(a)},28:4(){if(2.12.62){59 60(2.12.62,2.12.60).28(2.12.61+\"=\"+2.19);2.45('28',2.19,2)}18 2},31:4(){2.13.35('17-14-16');18 2},enable:4(){2.13.34('17-14-16');18 2},16:4(){18 2.13.has77('17-14-16')},40:4(i){if(!2.16()){2.24(i+1);2.45('55',i+1,2)}},43:4(i){2.20(i+1);if(2.12.26)2.31();2.28()},54:4(){2.20(2.19)},24:4(n){2.37.44(4(e,a){e[n-1<a?'34':'35']('17-14-74')})},71:4(){2.37=2.13.subNodes();2.37.44(4(e,i){e.onMouseover(2.40.30(2,i)).onClick(2.43.30(2,i))},2);2.13.onMouseout(2.54.30(2));2.20(2.12.19);if(2.12.16)2.31();if(2.12.25)2.36(2.12.25);18 2},63:4(){32 e=$E('21',{'class':'17-14'});2.12.29.times(4(){e.insert($E('21',{html:'&#9733;'}))});18 e}});22.41(4(){39.51()});22.write(\"<65 type=\\\"46/css\\\">21.17-14,21.17-14 21{margin:0;padding:0;background:75;border:75;42:52-block;*42:52;*zoom:1;76-family:Arial;76-29:110%}21.17-14{67:6em;vertical-68:middle}21.17-14 21{67:64;48:64;line-48:64;46-68:center;50:pointer;56:#888}21.17-14 21.17-14-74{56:brown;46-shadow:#666 .72 .72 .15em}21.17-14-16 21{50:default}</65>\");",",,this,,function,,,,,,,,options,element,rater,,disabled,right,return,value,setValue,div,document,null,highlight,update,disableOnVote,onChange,send,size,bind,disable,var,,removeClass,addClass,assignTo,stars,insertTo,Rater,hovered,onReady,display,clicked,each,fire,text,isHash,height,_rater,cursor,rescan,inline,change,leaved,hover,color,curry,false,new,Xhr,param,url,build,1em,style,,width,align,else,last,init,05em,,glow,none,font,Class".split(",")));
@@ -30,8 +30,8 @@ var Selectable = new Class(Observer, {
30
30
  refresh: true // a flag if it should automatically refresh the items list
31
31
  },
32
32
 
33
- rescan: function() {
34
- $$('*.right-selectable').each(function(element) {
33
+ rescan: function(scope) {
34
+ ($(scope)||document).select('*.right-selectable').each(function(element) {
35
35
  if (!element._selectable) {
36
36
  new Selectable(element);
37
37
  }
@@ -465,7 +465,7 @@ var Selectable = new Class(Observer, {
465
465
  event.stop();
466
466
  if (this.isSingle) {
467
467
  var dims = this.container.dimensions();
468
-
468
+
469
469
  this.element.setStyle({
470
470
  top: (dims.top + dims.height) + 'px',
471
471
  left: dims.left + 'px',
@@ -4,4 +4,4 @@
4
4
  * Copyright (C) 2009 Nikolay V. Nemshilov aka St.
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})("22 69=157 163(Observer,{extend:{EVENTS:$w('131 28 un28 72 105 80 141 110 107'),Options:{16:40,26:40,25:40,119:91,65:'slide',70:'short',36:40,120:139,50:91},128:11(){$$('*.13-12').33(11(e){if(!e._12)157 69(e)})}},111:'13-12',57:'13-12-132',17:'13-12-26',25163:'13-12-25',18163:'13-12-18',147ialize:11(){22 a=$A(74);if(a[0]&&!134(a[0]))9.15=$(a[0]);9.104(134(a.150())?a.150():9.15?eval('('+9.15.get('data-12-16')+')'):40);if(!9.15)9.15=9.144();9.15._12=9.147()},destroy:11(){9.19.33(11(i){i.27('96',9.48).27('64',9.68).27('46',9.54).27('51',9.56).27('73',9.76)},9);delete(9.15._12)},63:11(v){if(89(v))v=v.split(',').112('trim').99(11(a){14!a.blank()});9.19.33('38',9.17);22 i=9.34(v).33('41',9.17);if(9.21)9.87(i[0]);14 9.49()},getValue:11(){14 9.43},61:11(e,p){9.15.61(e,p);if(9.21)9.18.61(9.15,'136');14 9},117:11(b){22 a=11(e,v){if(e=$(e)){if(v===undefined||v===40)v='';e[e.63?'63':'36'](''+v)}}.143(b);22 c=11(e,o){22 e=$(e);if(e&&e.84)e.84(11(){9.63(e.43)}.31(o))}.143(b);if($(b)){a(9.43);c(9)}53 62.123(11(){a(9.43);c(9)}.31(9));14 9.84(a)},72:11(k){9.39(k).33(11(i){9.32('72',i.41(9.25163))},9);14 9},105:11(k){9.39(k).33(11(i){9.32('105',i.38(9.25163))},9);14 9},25:11(k){14 9.39(k).140('30',9.25163)},28:11(k){22 a=9.34(k);if(9.21&&a){9.19.33('38',9.17);a=[a[0]]}a.33(11(i){9.32('28',i.41(9.17))},9);14 9},un28:11(k){9.34(k).33(11(i){9.32('un28',i.38(9.17))},9);14 9},26:11(k){14 9.34(k).140('30',9.17)},50:11(){9.19=9.15.28('li').33(11(i){if(!9.19||!9.19.include(i))i.on({96:9.48,73:9.76,51:9.56,46:9.54,64:9.68})},9);14 9},147:11(){9.15.41(9.111);if(9.21=!9.16.119||9.15.30(9.57))9.95().15.41(9.57);9.56=9.51.31(9);9.76=9.73.31(9);9.54=9.46.31(9);9.68=9.64.31(9);9.48=9.96.31(9);9.43=40;9.50().86('49').onUn28('49');if(9.21)9.86('87');if(9.16.25)9.72(9.16.25);if(9.16.26)9.28(9.16.26);if(9.16.36)9.117(9.16.36);if(9.21){if(9.16.26===40)9.28(9.19[0]);9.86('85')}if(9.16.50){22 o=9.15.36;9.15.36=11(){22 r=o.138(9.15,74);9.50();14 r}.31(9)}14 9},49:11(){if(9.21){22 a=9.19.121('30',9.17);22 v=a?9.79(a):40}53 22 v=9.19.99('30',9.17).112(11(i){14 9.79(i)},9);if(v!=9.43){9.43=v;9.32('131',v,9)}14 9},79:11(i){14 i.id?9.16.120?i.id.match(/\\d+/):i.id:9.19.71(i)},32:11(n,i){if(i&&i.tagName)9.104(n,i,9.19.71(i),9);53 9.104.138(9,74);14 9},112:11(c){if(!125(c))c=[c];14 c.112(11(k){22 i=(89(k)&&/^\\d+$/.test(k))?k.toInt():k,b=k;if(isNumber(i))b=9.19[i];53 if(89(k))b=9.19.121(11(a){14 a.id==k});14 b},9).compact()},39:11(k){14 k?9.112(k):9.19},34:11(k){14 9.39(k).99(11(i){14!i.30(9.25163)},9)},51:11(e){e.108();22 c=e.98;if(!9.25(c)){if(9.21)9.28(c);53 if(9.26(c)){9.un28(c);9.58=91}53{9.28(c);9.55=91}if((e.shift165||e.meta165)&&9.52){22 a=9.19.71(9.52);22 b=9.19.71(c);if(a!=b){if(a>b){22 t=a;a=b;b=a}156(22 i=a;i<b;i++)9[9.52.30(9.17)?'28':'un28'](9.19[i])}}9.52=c}},73:11(e){e.108();9.58=9.55=139},46:11(e){22 i=e.98;9.32('80',i);if(!9.21){if(9.55)9.28(i);53 if(9.58)9.un28(i)}},64:11(e){9.32('141',e.98)},96:11(e){e.108()},144:11(){22 e=$E('ul'),a=9.16.16;if(125(a))a.33(11(o){e.101($E('li',{127:o}))});53 156(22 k in a)e.101($E('li',{id:k,127:a[k]}));14 e},95:11(){9.18=$E('42',{'145':9.18163}).101([$E('42',{'127':'&bull;','145':'13-12-129'}),$E('ul')]).61(9.15,'136').48(9.110164.31(9));62.48(9.85.31(9));14 9},110164:11(e){e.108();if(9.21){22 d=9.18.dimensions();9.15.setStyle({158:(d.158+d.67)+'px',113:d.113+'px',45:d.45+'px'}).110(9.16.65,{114:9.16.70,116:9.32.31(9,'110',9)});if(!9.16.65)9.32('110',9)}},85:11(){if(9.21&&9.15.visible()){9.15.107(9.16.65,{114:9.16.70,116:9.32.31(9,'107',9)});if(!9.16.65)9.32('107',9)}},87:11(i){9.18.121('ul').36(i?i.cloneNode(91):'<li>&nbsp;</li>')}});62.123(11(){69.128()});62.write(\"<97 type=\\\"151/css\\\">*.13-12,*.13-12 li,*.13-12 dt,*.13-12 dd,*.13-12 ul,42.13-12-18 ul,42.13-12-18 ul li{130:0;47:0;23:92;24:92;list-97:92}*.13-12{23:106 75 #93;23-102:92;37:83-118;*37:83;*146:1;160-45:126;-137-23-81:.59;-103-23-81:.59}*.13-12 li{47:.153 1em;82:122;23-102:106 75 #93}*.13-12 li:80{24:#155}*.13-12 li.13-12-26{90-135:149;24:#161}*.13-12 li.13-12-25,*.13-12 li.13-12-25:80{24:#93;94:#777;82:124}dl.13-12 dt{47:.153 .109;82:124;90-135:149;90-97:italic;94:#444;24:#155;23-102:106 75 #93}dl.13-12 dd li{47-113:1.109}*.13-12-132{-137-154-133:#159 .59 .59 .109;-103-154-133:#159 .59 .59 .109;37:92;position:absolute;24:#FFF}42.13-12-18{23:106 75 #93;-137-23-81:.59;-103-23-81:.59;37:83-118;*37:83;*146:1;*45:126;vertical-142:middle;160-45:126;82:122;67:1.152}42.13-12-18 42.13-12-129{90-family:Arial;float:13;45:0.162;24:#161;151-142:center;67:100%;148-67:0.162;90-size:200%;94:#888;23-113:106 75 #93}42.13-12-18:80 42{94:#666}42.13-12-18 ul{37:118;45:auto;130-13:59;overflow:hidden}42.13-12-18 ul li{148-67:1.152;47:0 .109}</97>\");",",,,,,,,,,this,,function,selectable,right,return,element,options,selectedClass,container,items,,isSingle,var,border,background,disabled,selected,stopObserving,select,disabledClass,hasClass,bind,fire,each,mapEnabled,unselect,update,display,removeClass,mapOrAll,null,addClass,div,value,,width,mouseover,padding,onClick,calcValue,refresh,mousedown,_prevItem,else,onMouseover,_massSelect,onMousedown,singleClass,_massRemove,2em,_selectable,insertTo,document,setValue,mouseout,fxName,,height,onMouseout,Selectable,fxDuration,indexOf,disable,mouseup,arguments,solid,onMouseup,,containerClass,itemValue,hover,radius,cursor,inline,onChange,hideList,onSelect,showItem,,isString,font,true,none,CCC,color,buildSingle,click,style,target,filter,,insert,bottom,webkit,$super,enable,1px,hide,stop,5em,show,baseClass,map,left,duration,showList,onFinish,assignTo,block,multiple,parseIds,first,pointer,onReady,default,isArray,10em,html,rescan,handle,margin,change,single,shadow,isHash,weight,before,moz,apply,false,every,leave,align,curry,build,class,zoom,init,line,bold,last,text,6em,3em,box,EEE,for,new,top,AAA,min,DDD,8em,Class,List,Key".split(",")));
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})("22 70=161 163(Observer,{extend:{EVENTS:$w('133 24 un24 72 98 80 145 107 106'),Options:{15:41,24ed:41,27:41,119:90,65:'slide',68:'short',36:41,117:139,53:90},129:11(s){($(s)||40).24('*.13-12').33(11(e){if(!e._12)161 70(e)})}},113:'13-12',64:'13-12-131',17:'13-12-24ed',27163:'13-12-27',18163:'13-12-18',147ialize:11(){22 a=$A(76);if(a[0]&&!136(a[0]))9.16=$(a[0]);9.104(136(a.148())?a.148():9.16?eval('('+9.16.get('data-12-15')+')'):41);if(!9.16)9.16=9.138();9.16._12=9.147()},destroy:11(){9.19.33(11(i){i.29('93',9.51).29('57',9.69).29('47',9.60).29('52',9.63).29('71',9.75)},9);delete(9.16._12)},61:11(v){if(89(v))v=v.split(',').109('trim').105(11(a){14!a.blank()});9.19.33('38',9.17);22 i=9.34(v).33('42',9.17);if(9.21)9.87(i[0]);14 9.48()},getValue:11(){14 9.46},59:11(e,p){9.16.59(e,p);if(9.21)9.18.59(9.16,'132');14 9},114:11(b){22 a=11(e,v){if(e=$(e)){if(v===undefined||v===41)v='';e[e.61?'61':'36'](''+v)}}.144(b);22 c=11(e,o){22 e=$(e);if(e&&e.86)e.86(11(){9.61(e.46)}.31(o))}.144(b);if($(b)){a(9.46);c(9)}54 40.122(11(){a(9.46);c(9)}.31(9));14 9.86(a)},72:11(k){9.39(k).33(11(i){9.32('72',i.42(9.27163))},9);14 9},98:11(k){9.39(k).33(11(i){9.32('98',i.38(9.27163))},9);14 9},27:11(k){14 9.39(k).143('30',9.27163)},24:11(k){22 a=9.34(k);if(9.21&&a){9.19.33('38',9.17);a=[a[0]]}a.33(11(i){9.32('24',i.42(9.17))},9);14 9},un24:11(k){9.34(k).33(11(i){9.32('un24',i.38(9.17))},9);14 9},24ed:11(k){14 9.34(k).143('30',9.17)},53:11(){9.19=9.16.24('li').33(11(i){if(!9.19||!9.19.include(i))i.on({93:9.51,71:9.75,52:9.63,47:9.60,57:9.69})},9);14 9},147:11(){9.16.42(9.113);if(9.21=!9.15.119||9.16.30(9.64))9.95().16.42(9.64);9.63=9.52.31(9);9.75=9.71.31(9);9.60=9.47.31(9);9.69=9.57.31(9);9.51=9.93.31(9);9.46=41;9.53().85('48').onUn24('48');if(9.21)9.85('87');if(9.15.27)9.72(9.15.27);if(9.15.24ed)9.24(9.15.24ed);if(9.15.36)9.114(9.15.36);if(9.21){if(9.15.24ed===41)9.24(9.19[0]);9.85('84')}if(9.15.53){22 o=9.16.36;9.16.36=11(){22 r=o.137(9.16,76);9.53();14 r}.31(9)}14 9},48:11(){if(9.21){22 a=9.19.115('30',9.17);22 v=a?9.74(a):41}54 22 v=9.19.105('30',9.17).109(11(i){14 9.74(i)},9);if(v!=9.46){9.46=v;9.32('133',v,9)}14 9},74:11(i){14 i.id?9.15.117?i.id.match(/\\d+/):i.id:9.19.73(i)},32:11(n,i){if(i&&i.tagName)9.104(n,i,9.19.73(i),9);54 9.104.137(9,76);14 9},109:11(c){if(!125(c))c=[c];14 c.109(11(k){22 i=(89(k)&&/^\\d+$/.test(k))?k.toInt():k,b=k;if(isNumber(i))b=9.19[i];54 if(89(k))b=9.19.115(11(a){14 a.id==k});14 b},9).compact()},39:11(k){14 k?9.109(k):9.19},34:11(k){14 9.39(k).105(11(i){14!i.30(9.27163)},9)},52:11(e){e.108();22 c=e.99;if(!9.27(c)){if(9.21)9.24(c);54 if(9.24ed(c)){9.un24(c);9.62=90}54{9.24(c);9.58=90}if((e.shift165||e.meta165)&&9.50){22 a=9.19.73(9.50);22 b=9.19.73(c);if(a!=b){if(a>b){22 t=a;a=b;b=a}152(22 i=a;i<b;i++)9[9.50.30(9.17)?'24':'un24'](9.19[i])}}9.50=c}},71:11(e){e.108();9.62=9.58=139},47:11(e){22 i=e.99;9.32('80',i);if(!9.21){if(9.58)9.24(i);54 if(9.62)9.un24(i)}},57:11(e){9.32('145',e.99)},93:11(e){e.108()},138:11(){22 e=$E('ul'),a=9.15.15;if(125(a))a.33(11(o){e.101($E('li',{127:o}))});54 152(22 k in a)e.101($E('li',{id:k,127:a[k]}));14 e},95:11(){9.18=$E('43',{'141':9.18163}).101([$E('43',{'127':'&bull;','141':'13-12-130'}),$E('ul')]).59(9.16,'132').51(9.107164.31(9));40.51(9.84.31(9));14 9},107164:11(e){e.108();if(9.21){22 d=9.18.dimensions();9.16.setStyle({162:(d.162+d.67)+'px',110:d.110+'px',45:d.45+'px'}).107(9.15.65,{121:9.15.68,116:9.32.31(9,'107',9)});if(!9.15.65)9.32('107',9)}},84:11(){if(9.21&&9.16.visible()){9.16.106(9.15.65,{121:9.15.68,116:9.32.31(9,'106',9)});if(!9.15.65)9.32('106',9)}},87:11(i){9.18.115('ul').36(i?i.cloneNode(90):'<li>&nbsp;</li>')}});40.122(11(){70.129()});40.write(\"<94 type=\\\"151/css\\\">*.13-12,*.13-12 li,*.13-12 dt,*.13-12 dd,*.13-12 ul,43.13-12-18 ul,43.13-12-18 ul li{134:0;49:0;23:91;25:91;list-94:91}*.13-12{23:112 78 #97;23-102:91;37:81-120;*37:81;*149:1;157-45:126;-140-23-82:.55;-103-23-82:.55}*.13-12 li{49:.153 1em;83:124;23-102:112 78 #97}*.13-12 li:80{25:#155}*.13-12 li.13-12-24ed{92-135:150;25:#158}*.13-12 li.13-12-27,*.13-12 li.13-12-27:80{25:#97;96:#777;83:123}dl.13-12 dt{49:.153 .111;83:123;92-135:150;92-94:italic;96:#444;25:#155;23-102:112 78 #97}dl.13-12 dd li{49-110:1.111}*.13-12-131{-140-160-128:#156 .55 .55 .111;-103-160-128:#156 .55 .55 .111;37:91;position:absolute;25:#FFF}43.13-12-18{23:112 78 #97;-140-23-82:.55;-103-23-82:.55;37:81-120;*37:81;*149:1;*45:126;vertical-142:middle;157-45:126;83:124;67:1.159}43.13-12-18 43.13-12-130{92-family:Arial;float:13;45:0.154;25:#158;151-142:center;67:100%;146-67:0.154;92-size:200%;96:#888;23-110:112 78 #97}43.13-12-18:80 43{96:#666}43.13-12-18 ul{37:120;45:auto;134-13:55;overflow:hidden}43.13-12-18 ul li{146-67:1.159;49:0 .111}</94>\");",",,,,,,,,,this,,function,selectable,right,return,options,element,selectedClass,container,items,,isSingle,var,border,select,background,selected,disabled,disabledClass,stopObserving,hasClass,bind,fire,each,mapEnabled,unselect,update,display,removeClass,mapOrAll,document,null,addClass,div,,width,value,mouseover,calcValue,padding,_prevItem,onClick,mousedown,refresh,else,2em,_selectable,mouseout,_massSelect,insertTo,onMouseover,setValue,_massRemove,onMousedown,singleClass,fxName,,height,fxDuration,onMouseout,Selectable,mouseup,disable,indexOf,itemValue,onMouseup,arguments,,solid,containerClass,hover,inline,radius,cursor,hideList,onSelect,onChange,showItem,,isString,true,none,font,click,style,buildSingle,color,CCC,enable,target,,insert,bottom,webkit,$super,filter,hide,show,stop,map,left,5em,1px,baseClass,assignTo,first,onFinish,parseIds,showList,multiple,block,duration,onReady,default,pointer,isArray,10em,html,shadow,rescan,handle,single,before,change,margin,weight,isHash,apply,build,false,moz,class,align,every,curry,leave,line,init,last,zoom,bold,text,for,3em,8em,EEE,AAA,min,DDD,6em,box,new,top,Class,List,Key".split(",")));
@@ -24,8 +24,8 @@ var Slider = new Class(Observer, {
24
24
  round: 0 // the number of symbols after the decimal pointer
25
25
  },
26
26
 
27
- rescan: function() {
28
- $$('div.right-slider').each(function(element) {
27
+ rescan: function(scope) {
28
+ ($(scope) || document).select('div.right-slider').each(function(element) {
29
29
  if (!element._slider) {
30
30
  new Slider(element);
31
31
  }
@@ -284,8 +284,8 @@ var Slider = new Class(Observer, {
284
284
  /**
285
285
  * Document onReady hook for sliders
286
286
  *
287
- * Copyright (C) Nikolay V. Nemshilov aka St.
287
+ * Copyright (C) 2009 Nikolay V. Nemshilov aka St.
288
288
  */
289
- document.onReady(Slider.rescan);
289
+ document.onReady(function() { Slider.rescan(); });
290
290
 
291
291
  document.write("<style type=\"text/css\">div.right-slider,div.right-slider-handle{margin:0;padding:0;border:none;background:none}div.right-slider{height:0.4em;width:20em;border:1px solid #CCC;background:#EEE;-moz-border-radius:.2em;-webkit-border-radius:.2em;position:relative;margin:.6em 0;display:inline-block;*display:inline;*zoom:1;vertical-align:middle}div.right-slider-handle{position:absolute;left:0;top:0;cursor:pointer;width:4pt;height:1em;margin-top:-0.4em;margin-left:0.1em;background:#CCC;border:1px solid #AAA;-moz-border-radius:.2em;-webkit-border-radius:.2em}div.right-slider-vertical{height:10em;width:0.4em;margin:0 .3em}div.right-slider-vertical div.right-slider-handle{margin:0;margin-left:-0.4em;margin-top:0.1em;height:4pt;width:1em}</style>");
@@ -4,4 +4,4 @@
4
4
  * Copyright (C) 2009 Nikolay V. Nemshilov aka St.
5
5
  */
6
6
  if (!self.RightJS || !self.Draggable) throw "Gimme RightJS w/ DnD";
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})("14 50=78 83(Observer,{extend:{EVENTS:$w('69'),Options:{32:0,48:100,37:0,21:65,25:'x',40:65,53:0},67:9(){$$('30.17-12').each(9(e){if(!e._12)78 50(e)})}},75ialize:9(){14 a=$A(arguments);7.13=(a[0]&&!70(a[0]))?$(a.shift()):7.74();7.$super(70(a[0])?a[0]:eval('('+7.13.get('data-12-8')+')'));if(7.8.40)7.54(7.8.40);7.13._12=7.75()},destroy:9(){7.16.undo82();delete(7.13._12);18 7},24:9(v){14 v=isString(v)?v.59():v;14 b=Math.pow(10,7.8.53);v=(v*b).53()/b;if(7.8.37){14 s=7.8.37;14 d=v % s;v=d<s/2?v-d:v-d+s}if(v<7.8.32)v=7.8.32;if(v>7.8.48)v=7.8.48;7.39(v);if(v!==7.21)7.fire('69',7.21=v);18 7},getValue:9(){18 7.21},55:9(v){18 7.35().24([v,7.8.21,7.8.32].compact()[0])},52:9(e,p){7.13.52(e,p);18 7.55(7.21)},54:9(b){14 a=9(e,v){if(e=$(e)){if(v===undefined||v===65)v='';e[e.24?'24':'40'](''+v)}}.72(b);14 c=9(e,o){14 e=$(e);if(e&&e.44)e.44(9(){7.24(e.21)}.45(o))}.72(b);if($(b)){a(7.21);c(7)}51 42.64(9(){a(7.21);c(7)}.45(7));18 7.44(a)},75:9(){7.16=7.13.first('30.17-12-16').make82({onBefore:7.56.45(7),onDrag:7.63.45(7)});7.13.onClick(7.61.45(7));if(7.8.25=='y')7.13.add83('17-12-29');51 7.8.25=7.13.has83('17-12-29')?'y':'x';if(7.46=(RightJS.version<'1.5.0'&&!7.16.getBoundingClientRect)){14 p=7.13;14 o=7.16.11;7.16.11=9(){14 d=o.call(7);14 s=p.11();d.22+=s.22;d.19+=s.19;18 d}}18 7.55()},74:9(){18 $E('30',{'71':'17-12'}).insert($E('30',{'71':'17-12-16'}))},61:9(a){a.s22();7.35().39(7.21);14 p=a.43();14 e=7.11;14 p=(7.15?p.x-e.19:p.y-e.22)-7.41;if(p>7.28)p=7.28;51 if(p<0)p=0;7.33(p)},63:9(d,e){7.33(d.13.49[7.15?'19':'22'].59())},56:9(d){7.35().39(7.21);14 o=7.41;14 e=7.11;14 a=d.8;a.36={};if((a.axis=7.8.25)=='x'){a.36.x=[e.19+o,e.19+e.31-o];if(7.46)a.36.x[0]-=e.19}51{a.36.y=[e.22+o,e.22+e.27-o];if(7.46)a.36.y[0]-=e.22}if(7.8.37)a.37=7.28/(7.8.48-7.8.32)*7.8.37},33:9(p){if(!7.15)p=7.28-p;14 v=p/7.28*(7.8.48-7.8.32)+7.8.32;7.24(v)},39:9(v){14 p=7.28/(7.8.48-7.8.32)*(v-7.8.32);if(!7.15)p=7.28-p;7.16.49[7.15?'19':'22']=p+'px';18 7},35:9(){14 h=7.16.setStyle({19:'0',22:'0'}).11();7.11=7.13.11();7.15=7.8.25=='x';7.41=7.15?h.19-7.11.19:h.22-7.11.22;7.28=(7.15?7.11.31-h.31:7.11.27-h.27)-7.41*2;18 7}});42.64(50.67);42.write(\"<49 type=\\\"text/css\\\">30.17-12,30.17-12-16{23:0;padding:0;26:76;34:76}30.17-12{27:0.62;31:20em;26:81 73 #77;34:#EEE;-79-26-38:.58;-66-26-38:.58;43:relative;23:.6em 0;60:68-block;*60:68;*zoom:1;29-align:middle}30.17-12-16{43:absolute;19:0;22:0;cursor:pointer;31:80;27:57;23-22:-0.62;23-19:0.57;34:#77;26:81 73 #AAA;-79-26-38:.58;-66-26-38:.58}30.17-12-29{27:10em;31:0.62;23:0 .3em}30.17-12-29 30.17-12-16{23:0;23-19:-0.62;23-22:0.57;27:80;31:57}</49>\");",",,,,,,,this,options,function,,dimensions,slider,element,var,horizontal,handle,right,return,left,,value,top,margin,setValue,direction,border,height,space,vertical,div,width,min,setPosition,background,precalc,range,snap,radius,moveTo,update,offset,document,position,onChange,bind,konqFix,_slider,max,style,Slider,else,insertTo,round,assignTo,reset,prepare,1em,2em,toFloat,display,clicked,4em,dragged,onReady,null,webkit,rescan,inline,change,isHash,class,curry,solid,build,init,none,CCC,new,moz,4pt,1px,Draggable,Class".split(",")));
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})("14 50=78 83(Observer,{extend:{EVENTS:$w('69'),Options:{32:0,47:100,38:0,21:65,25:'x',39:65,55:0},67:9(s){($(s)||33).select('30.17-12').each(9(e){if(!e._12)78 50(e)})}},75ialize:9(){14 a=$A(arguments);7.13=(a[0]&&!70(a[0]))?$(a.shift()):7.74();7.$super(70(a[0])?a[0]:eval('('+7.13.get('data-12-8')+')'));if(7.8.39)7.54(7.8.39);7.13._12=7.75()},destroy:9(){7.16.undo82();delete(7.13._12);18 7},24:9(v){14 v=isString(v)?v.64():v;14 b=Math.pow(10,7.8.55);v=(v*b).55()/b;if(7.8.38){14 s=7.8.38;14 d=v % s;v=d<s/2?v-d:v-d+s}if(v<7.8.32)v=7.8.32;if(v>7.8.47)v=7.8.47;7.40(v);if(v!==7.21)7.fire('69',7.21=v);18 7},getValue:9(){18 7.21},53:9(v){18 7.36().24([v,7.8.21,7.8.32].compact()[0])},52:9(e,p){7.13.52(e,p);18 7.53(7.21)},54:9(b){14 a=9(e,v){if(e=$(e)){if(v===undefined||v===65)v='';e[e.24?'24':'39'](''+v)}}.72(b);14 c=9(e,o){14 e=$(e);if(e&&e.43)e.43(9(){7.24(e.21)}.45(o))}.72(b);if($(b)){a(7.21);c(7)}51 33.60(9(){a(7.21);c(7)}.45(7));18 7.43(a)},75:9(){7.16=7.13.first('30.17-12-16').make82({onBefore:7.63.45(7),onDrag:7.59.45(7)});7.13.onClick(7.61.45(7));if(7.8.25=='y')7.13.add83('17-12-29');51 7.8.25=7.13.has83('17-12-29')?'y':'x';if(7.46=(RightJS.version<'1.5.0'&&!7.16.getBoundingClientRect)){14 p=7.13;14 o=7.16.11;7.16.11=9(){14 d=o.call(7);14 s=p.11();d.22+=s.22;d.19+=s.19;18 d}}18 7.53()},74:9(){18 $E('30',{'71':'17-12'}).insert($E('30',{'71':'17-12-16'}))},61:9(a){a.s22();7.36().40(7.21);14 p=a.44();14 e=7.11;14 p=(7.15?p.x-e.19:p.y-e.22)-7.42;if(p>7.28)p=7.28;51 if(p<0)p=0;7.34(p)},59:9(d,e){7.34(d.13.48[7.15?'19':'22'].64())},63:9(d){7.36().40(7.21);14 o=7.42;14 e=7.11;14 a=d.8;a.37={};if((a.axis=7.8.25)=='x'){a.37.x=[e.19+o,e.19+e.31-o];if(7.46)a.37.x[0]-=e.19}51{a.37.y=[e.22+o,e.22+e.27-o];if(7.46)a.37.y[0]-=e.22}if(7.8.38)a.38=7.28/(7.8.47-7.8.32)*7.8.38},34:9(p){if(!7.15)p=7.28-p;14 v=p/7.28*(7.8.47-7.8.32)+7.8.32;7.24(v)},40:9(v){14 p=7.28/(7.8.47-7.8.32)*(v-7.8.32);if(!7.15)p=7.28-p;7.16.48[7.15?'19':'22']=p+'px';18 7},36:9(){14 h=7.16.setStyle({19:'0',22:'0'}).11();7.11=7.13.11();7.15=7.8.25=='x';7.42=7.15?h.19-7.11.19:h.22-7.11.22;7.28=(7.15?7.11.31-h.31:7.11.27-h.27)-7.42*2;18 7}});33.60(9(){50.67()});33.write(\"<48 type=\\\"text/css\\\">30.17-12,30.17-12-16{23:0;padding:0;26:76;35:76}30.17-12{27:0.62;31:20em;26:81 73 #77;35:#EEE;-79-26-41:.56;-66-26-41:.56;44:relative;23:.6em 0;58:68-block;*58:68;*zoom:1;29-align:middle}30.17-12-16{44:absolute;19:0;22:0;cursor:pointer;31:80;27:57;23-22:-0.62;23-19:0.57;35:#77;26:81 73 #AAA;-79-26-41:.56;-66-26-41:.56}30.17-12-29{27:10em;31:0.62;23:0 .3em}30.17-12-29 30.17-12-16{23:0;23-19:-0.62;23-22:0.57;27:80;31:57}</48>\");",",,,,,,,this,options,function,,dimensions,slider,element,var,horizontal,handle,right,return,left,,value,top,margin,setValue,direction,border,height,space,vertical,div,width,min,document,setPosition,background,precalc,range,snap,update,moveTo,radius,offset,onChange,position,bind,konqFix,max,style,_slider,Slider,else,insertTo,reset,assignTo,round,2em,1em,display,dragged,onReady,clicked,4em,prepare,toFloat,null,webkit,rescan,inline,change,isHash,class,curry,solid,build,init,none,CCC,new,moz,4pt,1px,Draggable,Class".split(",")));
@@ -34,11 +34,11 @@ var Sortable = new Class(Observer, {
34
34
  },
35
35
 
36
36
  // scans through the page for auto-discoverable sortables
37
- rescan: function() {
37
+ rescan: function(scope) {
38
38
  var key = Sortable.Options.relName;
39
39
  var reg = new RegExp('^'+key+'\\[(.+?)\\]');
40
40
 
41
- $$('ul[rel^="'+key+'"], ol[rel^="'+key+'"]').each(function(element) {
41
+ ($(scope) || document).select('ul[rel^="'+key+'"], ol[rel^="'+key+'"]').each(function(element) {
42
42
  if (!element._sortable) {
43
43
  var data = element.get('data-'+key+'-options');
44
44
  var options = eval('('+data+')') || {};
@@ -89,6 +89,9 @@ var Sortable = new Class(Observer, {
89
89
  item.current_position = index;
90
90
  });
91
91
  }
92
+
93
+ // resetting the left/top positions so it didn't jump next time
94
+ element.setStyle({left:'auto', top: 'auto'});
92
95
  },
93
96
 
94
97
  // tries to send an Xhr request about the element relocation
@@ -152,19 +155,21 @@ var Sortable = new Class(Observer, {
152
155
  // the droppable options
153
156
  var drop_options = {
154
157
  overlap: direction,
155
- containtment: items,
158
+ containment: items,
156
159
  onHover: function(draggable) {
157
- // calculating the swapping direction
158
- var drag_dims = draggable.element.dimensions();
159
- var this_dims = this.element.dimensions();
160
-
161
- var before = draggable.axisY ? (
162
- drag_dims.top > this_dims.top
163
- ) : (
164
- drag_dims.left > this_dims.left
165
- );
166
-
167
- this.element.insert(draggable.clone, before ? 'before' : 'after');
160
+ if (items.include(draggable.element)) {
161
+ // calculating the swapping direction
162
+ var drag_dims = draggable.element.dimensions();
163
+ var this_dims = this.element.dimensions();
164
+
165
+ var before = draggable.axisY ? (
166
+ drag_dims.top > this_dims.top
167
+ ) : (
168
+ drag_dims.left > this_dims.left
169
+ );
170
+
171
+ this.element.insert(draggable.clone, before ? 'before' : 'after');
172
+ }
168
173
  }
169
174
  };
170
175
 
@@ -188,9 +193,9 @@ var Sortable = new Class(Observer, {
188
193
  /**
189
194
  * Document level hooks for sortables
190
195
  *
191
- * Copyright (C) Nikolay V. Nemshilov aka St.
196
+ * Copyright (C) 2009 Nikolay V. Nemshilov aka St.
192
197
  */
193
- document.onReady(Sortable.rescan);
198
+ document.onReady(function() { Sortable.rescan(); });
194
199
 
195
200
  /**
196
201
  * Element level features for the Sortable unit
@@ -6,4 +6,4 @@
6
6
  * Copyright (C) Nikolay V. Nemshilov aka St.
7
7
  */
8
8
  if (!Draggable) throw "Gimme Draggable";
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})("5 9=26 Class(Observer,{extend:{EVENTS:$w('28'),23:{13:'39',37:'li',19:null,15:'put',32:{},21:'id',18:'position',22:40,20:'sortable'},29:3(){5 k=9.23.20;5 r=26 RegExp('^'+k+'\\\\[(.+?)\\\\]');$$('ul[35^=\"'+k+'\"], ol[35^=\"'+k+'\"]').17(3(e){if(!e.8){5 d=e.42('data-'+k+'-4');5 o=eval('('+d+')')||{};5 u=e.42('35').31(r);if(u)o.19=u[1];26 9(e,o)}})}},38ialize:3(e,o){2.6=$(e);2.$super(o);2.6.8=2.38().onUpdate('30')},24:3(){2.10.17(3(i){i.undo43().undo44()});delete(2.6.8);12 2},33:3(e){5 b=2.10();5 p=b.indexOf(e);if(p>-1&&p!=e.7){2.fire('28',e,p);b.17(3(a,i){a.7=i})}},30:3(e,a){if(2.4.19){5 u=2.4.19,p={};5 o=16.34({15:2.4.15,11:{}},2.4.32);5 i=e.id||'';if(2.4.22&&i)i=i.31(/\\d+/)||'';if(u.25('%{id}'))u=u.replace('%{id}',i);36 p[2.4.21]=i;p[2.4.18]=a;if(is45(o.11))o.11+='&'+16.toQuery45(p);36 o.11=16.34(o.11,p);32.load(u,o)}},38:3(){5 h=2.10();if(h.length){5 c=2.33.bind(2);5 e=2.4.13!='39'?2.4.13:['27','right'].25(h[0].42Style('float'))?'x':'y';5 f={range:2.6,axis:e,revert:40,revertDuration:0,onS41:3(){c(2.6)}};5 g={overlap:e,containtment:h,onHover:3(a){5 d=a.6.14();5 t=2.6.14();5 b=a.axisY?(d.41>t.41):(d.27>t.27);2.6.insert(a.clone,b?'before':'after')}};h.17(3(a,i){a.make43(f).make44(g).7=i})}12 2},10:3(){12 2.6.subNodes(2.4.37)}});document.onReady(9.29);Element.addMethods({make9:3(o){26 9(2,o);12 2},undo9:3(){if(2.8)2.8.24();12 2}});",",,this,function,options,var,element,current_position,_sortable,Sortable,getItems,params,return,direction,dimensions,method,Object,each,posParam,url,relName,idParam,parseId,Options,destroy,include,new,left,update,rescan,tryXhr,match,Xhr,moved,merge,rel,else,tags,init,auto,true,top,get,Draggable,Droppable,String".split(",")));
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})("6 9=26 Class(Observer,{extend:{EVENTS:$w('32'),24:{13:'20',39:'li',23:null,16:'put',37:{},28:'id',22:'position',29:42,27:'sortable'},31:3(s){6 k=9.24.27;6 r=26 RegExp('^'+k+'\\\\[(.+?)\\\\]');($(s)||21).select('ul[35^=\"'+k+'\"], ol[35^=\"'+k+'\"]').18(3(e){if(!e.8){6 d=e.43('data-'+k+'-4');6 o=eval('('+d+')')||{};6 u=e.43('35').36(r);if(u)o.23=u[1];26 9(e,o)}})}},41ialize:3(e,o){2.5=$(e);2.$super(o);2.5.8=2.41().onUpdate('30')},25:3(){2.10.18(3(i){i.undo44().undo45()});delete(2.5.8);12 2},34:3(e){6 b=2.10();6 p=b.indexOf(e);if(p>-1&&p!=e.7){2.fire('32',e,p);b.18(3(a,i){a.7=i})}e.set47({19:'20',38:'20'})},30:3(e,a){if(2.4.23){6 u=2.4.23,p={};6 o=17.33({16:2.4.16,11:{}},2.4.37);6 i=e.id||'';if(2.4.29&&i)i=i.36(/\\d+/)||'';if(u.14('%{id}'))u=u.replace('%{id}',i);40 p[2.4.28]=i;p[2.4.22]=a;if(is46(o.11))o.11+='&'+17.toQuery46(p);40 o.11=17.33(o.11,p);37.load(u,o)}},41:3(){6 h=2.10();if(h.length){6 c=2.34.bind(2);6 e=2.4.13!='20'?2.4.13:['19','right'].14(h[0].4347('float'))?'x':'y';6 f={range:2.5,axis:e,revert:42,revertDuration:0,onS38:3(){c(2.5)}};6 g={overlap:e,containment:h,onHover:3(a){if(h.14(a.5)){6 d=a.5.15();6 t=2.5.15();6 b=a.axisY?(d.38>t.38):(d.19>t.19);2.5.insert(a.clone,b?'before':'after')}}};h.18(3(a,i){a.make44(f).make45(g).7=i})}12 2},10:3(){12 2.5.subNodes(2.4.39)}});21.onReady(3(){9.31()});Element.addMethods({make9:3(o){26 9(2,o);12 2},undo9:3(){if(2.8)2.8.25();12 2}});",",,this,function,options,element,var,current_position,_sortable,Sortable,getItems,params,return,direction,include,dimensions,method,Object,each,left,auto,document,posParam,url,Options,destroy,new,relName,idParam,parseId,tryXhr,rescan,update,merge,moved,rel,match,Xhr,top,tags,else,init,true,get,Draggable,Droppable,String,Style".split(",")));