right-rails 0.6.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. data/CHANGELOG +8 -0
  2. data/README.rdoc +71 -0
  3. data/Rakefile +144 -14
  4. data/generators/right_rails/right_rails_generator.rb +18 -21
  5. data/init.rb +11 -32
  6. data/lib/generators/right_rails/right_rails_generator.rb +27 -0
  7. data/lib/generators/right_rails/templates/iframed.html.erb +10 -0
  8. data/lib/right-rails.rb +1 -1
  9. data/lib/right_rails/config.rb +278 -0
  10. data/lib/right_rails/controller_extensions.rb +10 -5
  11. data/lib/right_rails/helpers/basic.rb +10 -66
  12. data/lib/right_rails/helpers/forms.rb +141 -139
  13. data/lib/right_rails/helpers/misc.rb +45 -67
  14. data/lib/right_rails/helpers/rails.rb +40 -105
  15. data/lib/right_rails/helpers.rb +364 -1
  16. data/lib/right_rails/java_script_generator.rb +34 -24
  17. data/lib/right_rails.rb +6 -1
  18. data/{images → public/images}/colorpicker.png +0 -0
  19. data/{images → public/images}/resizable.png +0 -0
  20. data/public/javascripts/right/autocompleter-src.js +612 -0
  21. data/public/javascripts/right/autocompleter.js +18 -0
  22. data/public/javascripts/right/calendar-src.js +1448 -0
  23. data/public/javascripts/right/calendar.js +36 -0
  24. data/public/javascripts/right/colorpicker-src.js +967 -0
  25. data/public/javascripts/right/colorpicker.js +26 -0
  26. data/{javascripts/right-dnd-src.js → public/javascripts/right/dnd-src.js} +86 -52
  27. data/public/javascripts/right/dnd.js +20 -0
  28. data/{javascripts/right-effects-src.js → public/javascripts/right/effects-src.js} +90 -45
  29. data/public/javascripts/right/effects.js +17 -0
  30. data/{javascripts/right-ui-i18n-de.js → public/javascripts/right/i18n/de.js} +7 -7
  31. data/{javascripts/right-ui-i18n-en-us.js → public/javascripts/right/i18n/en-us.js} +1 -1
  32. data/{javascripts/right-ui-i18n-es.js → public/javascripts/right/i18n/es.js} +7 -7
  33. data/{javascripts/right-ui-i18n-fr.js → public/javascripts/right/i18n/fr.js} +7 -7
  34. data/{javascripts/right-ui-i18n-hu.js → public/javascripts/right/i18n/hu.js} +7 -7
  35. data/{javascripts/right-ui-i18n-jp.js → public/javascripts/right/i18n/jp.js} +7 -7
  36. data/{javascripts/right-ui-i18n-nl.js → public/javascripts/right/i18n/nl.js} +7 -7
  37. data/{javascripts/right-ui-i18n-pt-br.js → public/javascripts/right/i18n/pt-br.js} +7 -7
  38. data/{javascripts/right-ui-i18n-ru.js → public/javascripts/right/i18n/ru.js} +7 -7
  39. data/{javascripts/right-ui-i18n-ua.js → public/javascripts/right/i18n/ua.js} +17 -12
  40. data/public/javascripts/right/in-edit-src.js +352 -0
  41. data/public/javascripts/right/in-edit.js +13 -0
  42. data/public/javascripts/right/json-src.js +160 -0
  43. data/public/javascripts/right/json.js +10 -0
  44. data/public/javascripts/right/lightbox-src.js +881 -0
  45. data/public/javascripts/right/lightbox.js +24 -0
  46. data/{javascripts/right-rails-src.js → public/javascripts/right/rails-src.js} +195 -171
  47. data/public/javascripts/right/rails.js +14 -0
  48. data/public/javascripts/right/rater-src.js +366 -0
  49. data/public/javascripts/right/rater.js +13 -0
  50. data/public/javascripts/right/resizable-src.js +420 -0
  51. data/public/javascripts/right/resizable.js +15 -0
  52. data/public/javascripts/right/selectable-src.js +687 -0
  53. data/public/javascripts/right/selectable.js +22 -0
  54. data/public/javascripts/right/slider-src.js +377 -0
  55. data/public/javascripts/right/slider.js +14 -0
  56. data/public/javascripts/right/sortable-src.js +392 -0
  57. data/public/javascripts/right/sortable.js +16 -0
  58. data/public/javascripts/right/tabs-src.js +1123 -0
  59. data/public/javascripts/right/tabs.js +29 -0
  60. data/public/javascripts/right/tooltip-src.js +307 -0
  61. data/public/javascripts/right/tooltip.js +12 -0
  62. data/public/javascripts/right/uploader-src.js +283 -0
  63. data/public/javascripts/right/uploader.js +13 -0
  64. data/{javascripts → public/javascripts}/right-olds-src.js +134 -186
  65. data/public/javascripts/right-olds.js +18 -0
  66. data/public/javascripts/right-safe-src.js +161 -0
  67. data/public/javascripts/right-safe.js +8 -0
  68. data/{javascripts → public/javascripts}/right-src.js +2558 -1750
  69. data/public/javascripts/right.js +92 -0
  70. data/spec/lib/right_rails/config_spec.rb +133 -0
  71. data/spec/lib/right_rails/controller_extensions_spec.rb +1 -1
  72. data/spec/lib/right_rails/helpers/basic_spec.rb +77 -66
  73. data/spec/lib/right_rails/helpers/forms_spec.rb +231 -33
  74. data/spec/lib/right_rails/helpers/misc_spec.rb +94 -26
  75. data/spec/lib/right_rails/helpers/rails_spec.rb +42 -7
  76. data/spec/lib/right_rails/helpers_spec.rb +125 -0
  77. data/spec/lib/right_rails/java_script_generator_spec.rb +30 -0
  78. data/spec/rcov.opts +3 -0
  79. data/spec/spec_helper.rb +12 -7
  80. metadata +70 -61
  81. data/README.textile +0 -69
  82. data/javascripts/right-autocompleter-src.js +0 -318
  83. data/javascripts/right-autocompleter.js +0 -9
  84. data/javascripts/right-behavior-src.js +0 -261
  85. data/javascripts/right-behavior.js +0 -8
  86. data/javascripts/right-calendar-src.js +0 -946
  87. data/javascripts/right-calendar.js +0 -9
  88. data/javascripts/right-colorpicker-src.js +0 -635
  89. data/javascripts/right-colorpicker.js +0 -9
  90. data/javascripts/right-dnd.js +0 -9
  91. data/javascripts/right-effects.js +0 -6
  92. data/javascripts/right-events-src.js +0 -321
  93. data/javascripts/right-events.js +0 -6
  94. data/javascripts/right-in-edit-src.js +0 -194
  95. data/javascripts/right-in-edit.js +0 -6
  96. data/javascripts/right-json-src.js +0 -141
  97. data/javascripts/right-json.js +0 -6
  98. data/javascripts/right-lightbox-src.js +0 -651
  99. data/javascripts/right-lightbox.js +0 -9
  100. data/javascripts/right-olds.js +0 -9
  101. data/javascripts/right-rails.js +0 -9
  102. data/javascripts/right-rater-src.js +0 -253
  103. data/javascripts/right-rater.js +0 -9
  104. data/javascripts/right-resizable-src.js +0 -336
  105. data/javascripts/right-resizable.js +0 -9
  106. data/javascripts/right-selectable-src.js +0 -565
  107. data/javascripts/right-selectable.js +0 -7
  108. data/javascripts/right-slider-src.js +0 -288
  109. data/javascripts/right-slider.js +0 -7
  110. data/javascripts/right-sortable-src.js +0 -225
  111. data/javascripts/right-sortable.js +0 -9
  112. data/javascripts/right-tabs-src.js +0 -937
  113. data/javascripts/right-tabs.js +0 -6
  114. data/javascripts/right-tooltips-src.js +0 -195
  115. data/javascripts/right-tooltips.js +0 -9
  116. data/javascripts/right-uploader-src.js +0 -167
  117. data/javascripts/right-uploader.js +0 -9
  118. data/javascripts/right.js +0 -7
@@ -1,9 +0,0 @@
1
- /**
2
- * RightJS UI Colorpicker widget
3
- *
4
- * See http://rightjs.org/ui/colorpicker
5
- *
6
- * Copyright (C) 2010 Nikolay Nemshilov
7
- */
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})("34 14=new 172(Observer,{extend:{EVENTS:$w('147 64 49 167'),76:{117:'hex',46:98,46Bg:98,118:'fade',74:'short',77:'*[rel^=12]'},168:{146:'146'},144:13(e){34 u=$uid(e),b=14.125;if(!b[u]){34 p=b[u]=new 14(eval('('+e.151('data-12-33')+')'));if(e.78=='103')p.68(e);39{34 a=14.76.77.106('[').165().106('^=').150(),m=/\\[(.+?)\\]/.101(e.151(a)),i;if(m&&(i=$(m[1])))p.68(i,e)}}23 b[u]},125:[]},164ialize:13(o){11.$super(o);11.164()},69:13(a){34 c=isArray(a)?a:11.108(a);if(c&&c.length==3){c=c.119(13(v){23 11.62((''+v).133(),0,82)},11);11.30=c;11.30271().46()}23 11},151Value:13(a){23 a?11.30:11[11.33.117==='61'?'111':'104']()},31:13(e,p){11.28.add172('19-12-44').31(e,p);23 11},164:13(){11.161();[11.29,11.27].140(13(e){e.110(11.113.41(11))},11);[11.22,11.96,11.93,11.90].140('on',{keyup:11.86.41(11),145:11.46.41(11),134:11.56.41(11)});11.51.135(11.120.41(11,'167'));11.28.110(13(e){if(e.35.78!=='103'){e.s48();11.56()}}.41(11));11.on146('49').129(13(c){if(11.35)11.35[11.35.78=='103'?'47':'innerHTML']=11[11.33.117=='61'?'111':'104']()}.41(11));if(11.33.46)11.68(11.33.46);if(11.33.46Bg)11.46Bg(11.33.46Bg);11.71=[1,0,0];11.80=0;11.b19=1;11.30=[82,82,82];11.86().46()},161:13(){34 b=11.28=$E('21',{'45':'19-12 19-ui-panel'});11.29=$E('21',{'45':'29'}).31(b);11.29169=$E('21',{'45':'29-36'}).31(11.29);11.27=$E('21',{'45':'27'}).31(b);11.27169=$E('21',{'45':'27-36'}).31(11.27);$E('21',{'45':'91'}).72([11.53=$E('21',{'45':'53','127':'&nbsp;'}).31(b),11.22=$E('37',{'142':'121','45':'22',63:7}).31(b),$E('21',{'45':'61-22'}).72([$E('21').72([$E('107',{127:'R:'}),11.96=$E('37',{63:3,85:0})]),$E('21').72([$E('107',{127:'G:'}),11.93=$E('37',{63:3,85:1})]),$E('21').72([$E('107',{127:'B:'}),11.90=$E('37',{63:3,85:2})])]),11.51=$E('37',{'142':'51','45':'19-ui-51',47:14.168.146})]).31(b)},46:13(){11.29.54.26171='61('+11.71.119(13(a){23(a*82).149()})+')';11.53.54.26171=11.22.47=11.104();34 c=11.30;11.96.47=c[0];11.93.47=c[1];11.90.47=c[2];34 p=11.29169.54,f=11.29.157(),d=f.y-11.b19*f.y-2,l=11.80*f.x-2;p.48=11.62(d,0,f.y-5)+'px';p.59=11.62(l,0,f.x-5)+'px';34 f=11.27.157(),t=11.71,b;if(t[1]==0)b=t[0]==1?t[2]:(2-t[0]);39 if(t[0]==0)b=2+(t[2]==1?t[1]:(2-t[2]));39 b=4+(t[1]==1?t[0]:(2-t[1]));b=b/6*f.y;11.27169.54.48=11.62(b,0,f.y-4)+'px';if(11.122!==''+11.30){11.120('147',11.30);11.122=''+11.30}23 11},86:13(e){if(e){34 f=e.35,v=f.47,a=11.30.156(),c=105;if(f==11.22&&/#\\w{6}/.143(v))c=a=11.108(v);39 if(/^\\d+$/.143(v)){a[f.85]=v;c=true}if(c)11.69(a)}39 11.71230();23 11},113:13(e){e.s48();11.s48170();11.56();14.24=11;e.35.24=true;11.81(e)},s48170:13(){14.24=105;11.29.24=105;11.27.24=105},81:13(e){34 f,p=e.32(),b,l;if(11.29.24)f=11.29.75();39 if(11.27.24)f=11.27.75();if(f){b=11.62(p.y-f.48,0,f.40);l=11.62(p.x-f.59,0,f.42);if(11.29.24){11.80=l/f.42;11.b19=1-b/f.40}39 if(11.27.24){if(b==f.40)b=f.40-0.1;34 s=f.40/6,t=11.71=[0,0,0],a=b % s/s,r=1-a;if(b<s){t[0]=1;t[2]=a}39 if(b<s*2){t[0]=r;t[2]=1}39 if(b<s*3){t[2]=1;t[1]=a}39 if(b<s*4){t[2]=r;t[1]=1}39 if(b<s*5){t[1]=1;t[0]=a}39{t[1]=r;t[0]=1}}11.86().46()}}});14.102({111:13(c){23 '61('+11.30.166(',')+')'},104:13(c){23 '#'+11.30.119(13(a){23(a<16?'0':'')+a.toString(16)}).166('')},108:13(i){34 v=i.toLowerCase(),m;if(m=/61\\((\\d+),(\\d+),(\\d+)\\)/.101(v))23[m[1],m[2],m[3]].119('133');39 if(/#[\\da-f]+/.143(v)){if(m=/^#([\\da-f])([\\da-f])([\\da-f])$/.101(v))v='#'+m[1]+m[1]+m[2]+m[2]+m[3]+m[3];if(m=/#([\\da-f]{2})([\\da-f]{2})([\\da-f]{2})/.101(v))23[m[1],m[2],m[3]].119('133',16)}},30271:13(){34 b=11.30.156().sort(13(c,d){23 c-d}),e=b[0],m=b[2];11.b19=m/82;11.80=1-e/(m||1);11.71.140(13(v,a){23 11.71[a]=((!e&&!m)||e==m)?a==0?1:0:(11.30[a]-e)/(m-e)},11);23 11},71230:13(){34 t=11.71,c=11.30;for(34 i=0;i<3;i++){c[i]=1+11.80*(t[i]-1);c[i]=(82*c[i]*11.b19).149()}23 11},62:13(i,a,m){34 v=i;if(a<m)v=v<a?a:v>m?m:v;39{if(v>m)v=m;if(v<a)v=a}23 v}});14.102({49:13(){if(!11.28.has172('19-12-44')){11.35=98;14.57=98;11.28.49(11.33.118,{131:11.33.74});11.120('49')}23 11},64:13(t){if(t){34 e=$(t).75(),s=11.28.54;if(e){s.59=e.59+'px';s.48=e.48+e.40+'px';11.35=$(t)}}if(14.57&&14.57!==11)14.57.28.49();11.28.31(95.body);if(!11.28.136()){11.28.64(11.33.118,{131:11.33.74});11.120('64')}if(11.35)11.69(11.35.47);23 14.57=11},148:13(t){23 11[11.28.136()?'49':'64'](t)},68:13(i,t){34 i=$(i),t=$(t);if(t)t.135(13(a){a.s48();11.148(i.134())}.41(11));39 i.onFocus(11.64.41(11,i));i.on({145:13(){11.109=(13(){11.49()}).41(11).158(153)}.41(11),keyUp:13(){11.69(i.47)}.41(11)});11.28.49();23 11},46Bg:13(a){34 e=$(a);if(e)11.129(13(c){e.54.26171=11.111()}.41(11));23 11},56:13(){(13(){if(11.109){11.109.cancel();11.109=98}}).41(11).158(10)}});95.on({mouseup:13(){if(14.24)14.24.s48170()},mousemove:13(e){if(14.24)14.24.81(e)},mousedown:13(e){34 p=14.57,t=e.35;if(p&&t!=p.35&&![t].concat(t.parents()).102(p.28))p.49()}});window.on('145',13(){if(14.24)14.24.s48170()});14.76.77.on({134:13(e){if(11.78=='103')14.144(11).64(11)},click:13(e){34 a=14.76.77.106('[').165().106('^=').150(),m=/\\[(.+?)\\]/.101(11.151(a)),i;if(m&&(i=$(m[1]))){e.s48();14.144(11).64(i)}}});95.write(\"<54 142=\\\"121/css\\\">21.19-12,21.19-12*{43:58;26:58;42:128;40:128;32:static;float:58;48:58;59:58;19:58;116:58;38:0;67:0;22:112;141-weight:normal;94-79:center}21.19-12{32:92;67:.6em;26:#EEE;43:160 155 #CCC;-138-43-84:.65;-83-43-84:.65;-138-139-87:#152 .137 .137 .4em;-83-139-87:#152 .137 .137 .4em;z-159:9999}21.19-12 21.29,21.19-12 21.29-36,21.19-12 21.27,21.19-12 21.27-36{26:url(/images/rightjs-ui/12.png) no-repeat 0 0}21.19-12 21.29,21.19-12 21.27,21.19-12 21.91{22:44-112;*22:44;*162:1;32:132;94-79:48;40:130}21.19-12 21.29-36,21.19-12 21.27-36{32:92;48:0px;59:0;42:9px;40:9px}21.19-12 37.22,21.19-12 21.53,21.19-12 21.61-22,21.19-12 37.19-ui-51{141-163:153%;22:112;42:128;67:0 .65}21.19-12 37.22,21.19-12 21.53,21.19-12 21.61-22 37,21.19-12 37.19-ui-51{43:160 155 #152;-138-43-84:.65;-83-43-84:.65}21.19-12 21.29{42:130;26-30:red;89:crosshair;38-19:1.65}21.19-12 21.29-36{26-32:-154 0;38-59:-2px;38-48:-2px}21.19-12 21.27{42:16px;26-32:-130 0;43-30:#EEE;89:36;38-19:.6em}21.19-12 21.27-36{89:default;26-32:-154 -20px;38-59:-8px;38-48:-3px}21.19-12 21.91{42:124}21.19-12 21.53{40:65;26:white;43-30:#BBB}21.19-12 37.22{38-48:.124;26:#FFF;42:4.124}21.19-12 21.61-22{67:0;121-79:19;38-48:.124}21.19-12 21.61-22 107{22:44}21.19-12 21.61-22 37{94-79:48;141-163:153%;42:65;121-79:19;38-59:.65;67:0 .65;26:#FFF;38-116:160;22:44}21.19-12 37.19-ui-51{89:36;32:92;116:0;42:124;26:#CCC}21.19-12-44{22:44-112;*22:44;*162:1;32:132;-138-139-87:58;-83-139-87:58;z-159:128}</54>\");",",,,,,,,,,,,this,colorpicker,function,Colorpicker,,,,,right,,div,display,return,tracking,,background,colors,element,field,color,insertTo,position,options,var,target,pointer,input,margin,else,height,bind,width,border,inline,class,update,value,top,hide,,button,backgroundColor,preview,style,,cancelTimer,current,none,left,updateBg,rgb,bound,maxlength,show,2em,stopTrack,padding,assignTo,setValue,,tint,insert,bright,fxDuration,dimensions,Options,cssRule,tagName,align,satur,trackMove,255,webkit,radius,cIndex,recalc,shadow,colorsPointer,cursor,bDisplay,controls,absolute,gDisplay,vertical,document,rDisplay,fieldPointer,null,,,exec,include,INPUT,toHex,false,split,label,toColor,timer,onMousedown,toRgb,block,startTrack,tint2color,color2tint,bottom,format,fxName,map,fire,text,prevColor,,5em,instances,stop,html,auto,onChange,150px,duration,relative,toInt,focus,onClick,visible,3em,moz,box,each,font,type,test,find,blur,Done,change,toggle,round,first,get,AAA,100,170px,solid,clone,sizes,delay,index,1px,build,zoom,size,init,last,join,done,i18n,Pointer,Track,Color,Class".split(",")));
@@ -1,9 +0,0 @@
1
- /**
2
- * Drag'n'Drop module for RightJS
3
- *
4
- * See http://rightjs.org/goods/drag-n-drop
5
- *
6
- * Copyright (C) 2009-2010 Nikolay V. Nemshilov
7
- */
8
- if (!RightJS) throw "Gimme RightJS";
9
- eval((function(s,d){for(var i=d.length-1;i>-1;i--)if(d[i])s=s.replace(new RegExp(i,'g'),d[i]);return s})("13 9=75 112(83,{97:{98:$w('57 105 119 s31 78'),46:{29:39,60:0,114:39,108:39,53:'119ging',18:54,41:54,27:'normal',96:42,36:32,38:10000000,89:54,63:'119gable'},20:39,40:8(s){13 k=4.46.63;($(s)||59).select('*[rel^=\"'+k+'\"]').each(8(e){if(!e.19){13 d=e.get('data-'+k+'-7');75 4(e,116('('+d+')')||{})}},4)}},68:8(e,o){4.6=$(e);4.71(o);4.6.19=4.118()},47:8(){4.29.s31Observing('mousedown',4.43);99(4.6.19);11 4},set46:8(o){4.71(o);4.29=4.7.29?$(4.7.29):4.6;if(isArray(4.7.60)){4.60X=4.7.60[0];4.60Y=4.7.60[1]}50 4.60X=4.60Y=4.7.60;11 4},41:8(){13 p=4.18.25();13 e={31:(p.y+4.56)+'px',24:(p.x+4.55)+'px'};if(4.7.27&&4.6.109)4.6.109(e,{duration:4.7.27,onFinish:4.58.115(4)});50{4.6.34(e);4.58()}11 4},118:8(){4.43=4.77.115(4);4.29.onMousedown(4.43);11 4},77:8(e){4.30('57',4,e.s31());13 p=p=4.6.25();4.106=e.79-p.x;4.113=e.85-p.y;13 r={y:4.6.16('31').88(),x:4.6.16('24').88()};4.55=104(r.x)?0:(r.x-p.x);4.56=104(r.y)?0:(r.y-p.y);13 s={x:4.6.16('17'),y:4.6.16('15')};if(s.x=='117')s.x=4.6.offsetWidth+'px';if(s.y=='117')s.y=4.6.offsetHeight+'px';if(4.7.18||4.7.41)4.18=$(4.6.18Node(42)).34({visibility:4.7.18?'visible':'hidden'}).80(4.6,'57');4.6.34({25:'absolute',38:9.46.38++,31:(p.y+4.56)+'px',24:(p.x+4.55)+'px',17:s.x,15:s.y}).87(4.7.53);if(4.7.89)4.6.80(59.body);4.12=70.96s();4.26=70.107();9.20=4.48().30('105',4,e)},62:8(e){13 p=e.79,a=e.85,x=p-4.106,y=a-4.113;if(4.73){if(4.93>x)x=4.93;if(4.94<x)x=4.94;if(4.92>y)y=4.92;if(4.91<y)y=4.91}if(4.7.96){13 s={x:4.12.x,y:4.12.y},b=4.7.36;if((a-s.y)<b)s.y=a-b;50 if((s.y+4.26.y-a)<b)s.y=a-4.26.y+b;if((p-s.x)<b)s.x=p-b;50 if((s.x+4.26.x-p)<b)s.x=p-4.26.x+b;if(s.y<0)s.y=0;if(s.x<0)s.x=0;if(s.y<4.12.y||s.y>4.12.y||s.x<4.12.x||s.x>4.12.x)70.96To(4.12=s)}if(4.60X)x=x-x % 4.60X;if(4.60Y)y=y-y % 4.60Y;if(!4.103)4.6.110.24=(x+4.55)+'px';if(!4.101)4.6.110.31=(y+4.56)+'px';4.30('119',4,e)},119S31:8(e){4.6.37(4.7.53);14.33(e,4);if(4.7.41)4.41();9.20=39;4.30('s31',4,e)},58:8(){if(4.18)4.18.insert(4.6.34({17:4.18.16('17'),15:4.18.16('15'),25:4.18.16('25'),38:4.18.16('38')||''}),'57').remove()},48:8(){13 a=4.7.114;4.101=['x','69'].66(a);4.103=['y','82'].66(a);4.73=54;13 r=4.7.108;if(r){4.73=42;13 e=$(r);if(is121(e)){13 d=e.45();r={x:[d.24,d.24+d.17],y:[d.31,d.31+d.15]}}if(isHash(r)){13 s=4.6.107();if(r.x){4.93=r.x[0];4.94=r.x[1]-s.x}if(r.y){4.92=r.y[0];4.91=r.y[1]-s.y}}}11 4}});13 14=75 112(83,{97:{98:$w('78 102 111'),46:{72:'*',21:39,61:39,61122:0.5,44:'51-allow',49:'51-deny',63:'51'},40:116('({f:'+9.40.toString().replace(/\\.19/g,'.23')+'})').f,28:8(e,d){120(13 i=0,l=4.22.95;i<l;i++)4.22[i].28(e,d)},33:8(e,d){120(13 i=0,l=4.22.95;i<l;i++)4.22[i].33(e,d)},22:[]},68:8(e,o){4.6=$(e);4.71(o);14.22.push(4.6.23=4)},47:8(){14.22=14.22.without(4);99(4.6.23);11 4},28:8(e,d){if(4.52(e,d)){if(!4.35){4.35=42;4.6.87(4.7[4.74(d)?'44':'49']);4.30('102',d,4,e)}}50 if(4.35){4.35=54;4.81().30('111',d,4,e)}},33:8(e,d){4.81();if(4.52(e,d)&&4.74(d)){d.30('78',4,d,e);4.30('78',d,4,e)}},81:8(){4.6.37(4.7.44).37(4.7.49);11 4},52:8(e,c){13 d=4.6.45(),k=d.31,i=d.24,j=d.24+d.17,t=d.31+d.15,f=e.79,g=e.85;if(4.7.61){13 a=c.6.45(),h=4.7.61122,m=a.31,l=a.24,r=a.24+a.17,b=a.31+a.15;switch(4.7.61){76 'x':76 '69':11((m>k&&m<t)||(b>k&&b<t))&&((l>i&&l<(j-d.17*h))||(r<j&&r>(i+d.17*h)));76 'y':76 '82':11((l>i&&l<j)||(r>i&&r<j))&&((m>k&&m<(t-d.15*h))||(b<t&&b>(k+d.15*h)));default:11((l>i&&l<(j-d.17*h))||(r<j&&r>(i+d.17*h)))&&((m>k&&m<(t-d.15*h))||(b<t&&b>(k+d.15*h)))}}50 11 f>i&&f<j&&g>k&&g<t},74:8(d){if(4.7.21&&!4.86){4.7.21.walk($);4.86=42}13 w=4.7.21?4.7.21.66s(d.6):42;11 w&&(4.7.72=='*'?42:d.6.match(4.7.72))}});59.on({ready:8(){9.40();14.40()},mousemove:8(e){if(9.20){9.20.62(e);14.28(e,9.20)}},mouseup:8(e){if(9.20)9.20.119S31(e)}});121.66({make9:8(o){75 9(4,o);11 4},undo9:8(){if(4.19)4.19.47();11 4},make14:8(o){75 14(4,o);11 4},undo14:8(){if(4.23)4.23.47();11 4}});",",,,,this,,element,options,function,Draggable,,return,winScrolls,var,Droppable,height,getStyle,width,clone,_draggable,current,containment,active,_droppable,left,position,winSizes,revertDuration,checkHover,handle,fire,top,,checkDrop,setStyle,_hovered,scrollSensitivity,removeClass,zIndex,null,rescan,revert,true,_dragStart,allowClass,dimensions,Options,destroy,calcConstraints,denyClass,else,droppable,hoveredBy,dragClass,false,rxDiff,ryDiff,before,swapBack,document,snap,overlap,dragProcess,relName,snapX,snapY,include,overlapSize,initialize,horizontal,window,$super,accept,ranged,allows,new,case,dragStart,drop,pageX,insertTo,reset,vertical,Observer,dragStop,pageY,_scanned,addClass,toFloat,moveOut,stop,maxY,minY,minX,maxX,length,scroll,extend,EVENTS,delete,,axisX,hover,axisY,isNaN,start,xDiff,sizes,range,morph,style,leave,Class,yDiff,axis,bind,eval,auto,init,drag,for,Element,Size".split(",")));
@@ -1,6 +0,0 @@
1
- /**
2
- * Additional visual effects module
3
- *
4
- * Copyright (C) 2008-2010 Nikolay V. Nemshilov
5
- */
6
- if (!self.Fx) throw "RightJS Fx is missing";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})("Fx.22=40 43(Fx.66,{46:{17:28.35(Fx.17,{24:'long',14:'41'})},31:7(e){9 3.36(3.12(e))},12:7(e){11 b=3.5.get93('14'),a={};if(b!='41'||b!='26')3.5.68.14=b=b=='fixed'?'41':'26';if(e.44)e.y=e.44.76();if(e.21)e.x=e.21.76();11 c=3.5.14();11 p=3.45();11 r=c.x-p.x;11 d=c.y-p.y;if(3.19.14=='26'){if(b=='41'){if(32(e.x))e.x+=c.x;if(32(e.y))e.y+=c.x}33{if(32(e.x))e.x+=r;if(32(e.y))e.y+=d}}33 if(b=='26'){if(32(e.x))e.x+=r-c.x;if(32(e.y))e.y+=d-c.y}89(11 k in e)62(k){18 '44':18 '21':25;18 'y':a.44=e.y+'px';25;18 'x':a.21=e.x+'px';25;70:a[k]=e[k]}9 a},45:7(){Fx.22.52=Fx.22.52||40 69('78',{68:'37:0;23:0;20:61'});3.5.insert(Fx.22.52,'be89e');11 p=Fx.22.52.14();Fx.22.52.re84();9 p}});Fx.72=40 43(Fx.22,{58:$w('37 23 57 paddingTop paddingRight paddingBottom paddingLeft 65 30'),46:{17:28.35(Fx.22.17,{14:'26',24:'normal',87:'74'})},31:7(s,a){9 3.36(3.15(s,a))},15:7(s,a){11 p=3.51(s);9 28.35(3.50(p),3._12(p),a||{})},51:7(s){if(isHash(s)){11 a=$E('78').64($E('78',{68:\"20:61;float:21;23:0;37:0\"}).64(document.body)).13(s).55();if(s.23)s=a.y/3.5.55().y;33 s=a.x/3.5.55().x}33 if(is92(s))s=s.endsWith('%')?s.49()/100:s.49();9 s},50:7(p){11 s=3._clone93(3.5,3.58),r=/([\\d\\.]+)/g;89(11 k in s){if(k==='37'||k==='23')s[k]=s[k]||(3.5['offset'+k.capitalize()]+'px');if(s[k].match(r))s[k]=s[k].54(r,7(a){9 ''+(a.49()*p)});33 delete(s[k])}if(s.30&&s.30.49()<1)s.30='1px';9 s},_12:7(a){11 p={};11 s=3.5.55();11 x=s.x*(a-1);11 y=s.y*(a-1);62(3.19.87.54('-',' ').split(' ').sort().join('_')){18 '44':p.x=-x/2;25;18 '67':p.x=-x;p.y=-y/2;25;18 '60':p.x=-x/2;18 '60_21':p.y=-y;25;18 '60_67':p.y=-y;18 '67_44':p.x=-x;25;18 '74':p.x=-x/2;18 '21':p.y=-y/2;25;70:}9 p}});Fx.Bounce=40 43(Fx,{46:{17:28.35(Fx.17,{24:'short',27:'44',77:16})},31:7(v){v=v||3.19.77;11 p=3.5.14();11 a=Fx.Durations[3.19.24]||3.19.24;11 m={24:a,14:'26'};11 k='y';62(3.19.27){18 '67':v=-v;18 '21':k='x';25;18 '60':v=-v}11 u={},d={};u[k]=-v;d[k]=v;40 Fx.22(3.5,m).79(u);40 Fx.22(3.5,m).79(d);3.finish.71(3).delay(1);9 3}});Fx.Run=40 43(Fx.22,{46:{17:28.35(Fx.22.17,{27:'21'})},31:7(h){11 h=h||'53',p={},d=3.5.59(),t=80;if(h=='88'||(h=='53'&&3.5.39())){if(3.19.27=='21')p.x=-d.37-t;33 p.y=-d.23-t;3.34(7(){3.5.85().13(3.12({x:d.21,y:d.44}))})}33{d=3.5.13('20: 61').82().59();11 a={};if(3.19.27=='21'){a.x=-d.37-t;p.x=d.21}33{a.y=-d.23-t;p.y=d.44}3.5.13(3.12(a)).13('20: 39')}9 3.36(p)}});Fx.Puff=40 43(Fx.72,{46:{17:28.35(Fx.72.17,{81:1.4})},31:7(h){11 h=h||'53',o=0,s=3.19.81;if(h=='88'||(h=='53'&&3.5.39())){11 i=3.12(3.15(1));3.34(7(){i.47=1;3.5.85().13(i)})}33{3.5.13('20: 39').82();11 w=3.5.56;11 i=3.12(3.15(1));3.34(7(){3.5.13(i)});3.5.13(28.35(3.12(3.15(s)),{47:0,20:'39'}));s=w/3.5.56;o=1}9 3.36(s,{47:o})}});Fx.91=40 43(Fx.66,{73:$w('37 23 57 47 border padding margin color 65 background 44 21 67 60'),31:7(a,r){3.42=a||'';3.29=r||'';if(a)3.34(3.5.42.71(3.5,a));if(r)3.34(3.5.29.71(3.5,r));9 3.36({})},63:eval(\"({f:\"+Fx.66.prototype.63.to92().54(/(\\.13\\(\\w+\\))/,'$1.42(3.42).29(3.29)')+\"})\").f,_68Keys:7(){11 h={};3.73.each(7(n){h[n]=1});9 3.36(h)}});69.include({84:7(p,o){9 3.fx('84',[p,o||{}])},75:7(){9 3.fx('75',38)},83:7(s,o){9 3.fx('83',[s,o||{}])},90:7(){9 3.fx('90',38)},86:7(){9 3.fx('86',38)},morphTo43:7(){11 a=$A(38);if(a[0]===null)a[0]='';9 3.fx('91',a)}});",",,,this,,element,,function,,return,,var,getEndPosition,setStyle,position,_getZoomedStyle,,Options,case,options,visibility,left,Move,height,duration,break,relative,direction,Object,removeClass,borderWidth,prepare,defined,else,onFinish,merge,$super,width,arguments,visible,new,absolute,addClass,Class,top,getParentPosition,extend,opacity,_getEndPosition,toFloat,_getBasicStyle,_getProportion,Dummy,toggle,replace,sizes,offsetWidth,lineHeight,PROPERTIES,dimensions,bottom,hidden,switch,_endStyle,insertTo,fontSize,Morph,right,style,Element,default,bind,Zoom,STYLES,center,bounce,toInt,value,div,start,,size,show,zoom,move,hide,puff,from,out,for,run,CSS,String,Style".split(",")));
@@ -1,321 +0,0 @@
1
- /**
2
- * Advanced dom events handling module
3
- *
4
- * Copyright (C) 2008-2010 Nikolay V. Nemshilov
5
- */
6
-
7
- /**
8
- * The Event class additional functionality
9
- *
10
- * Copyright (C) 2008-2010 Nikolay V. Nemshilov
11
- */
12
- Event.extend({
13
- // keyboard key codes
14
- KEYS: {
15
- BACKSPACE: 8,
16
- TAB: 9,
17
- ENTER: 13,
18
- ESCAPE: 27,
19
- SPACE: 32,
20
- PAGE_UP: 33,
21
- PAGE_DOWN: 34,
22
- END: 35,
23
- HOME: 36,
24
- LEFT: 37,
25
- UP: 38,
26
- RIGHT: 39,
27
- DOWN: 40,
28
- INSERT: 45,
29
- DELETE: 46
30
- },
31
-
32
- // mouse button codes
33
- BUTTONS: (Browser.IE || Browser.Konqueror) ? {
34
- LEFT: 1,
35
- MIDDLE: 4,
36
- RIGHT: 2
37
- } : {
38
- LEFT: 0,
39
- MIDDLE: 1,
40
- RIGHT: 2
41
- }
42
-
43
- });
44
-
45
-
46
- /**
47
- * constructor. pretty much plays a virtual factory, instances new events or extends
48
- * existing ones and always returns an event instead of void as a normal constructor
49
- *
50
- * @param mixed native Event instance or String event name
51
- * @param Object options
52
- * @return Event instance
53
- */
54
- Event.prototype.initialize = function() {
55
- var args = $A(arguments), event = args.shift(), options = args.pop() || {};
56
-
57
- if (isString(event)) {
58
- var name = Event.cleanName(event);
59
- if (Event.Mouse.NAMES.includes(name)) {
60
- event = new Event.Mouse(name, options);
61
- } else if (Event.Keyboard.NAMES.includes(name)) {
62
- event = new Event.Keyboard(name, options);
63
- } else {
64
- event = new Event.Custom(name, options);
65
- }
66
- }
67
-
68
- return Event.ext(event);
69
- };
70
-
71
- /**
72
- * presents the basic events class
73
- *
74
- * Copyright (C) 2008-2010 Nikolay V. Nemshilov
75
- */
76
- Event.Base = new Class({
77
- extend: {
78
- // basic default events options
79
- Options: {
80
- bubbles: true,
81
- cancelable: true,
82
- altKey: false,
83
- ctrlKey: false,
84
- shiftKey: false,
85
- metaKey: false
86
- }
87
- },
88
-
89
- /**
90
- * basic constructor
91
- *
92
- * NOTE: that's a virtual constructor, it returns a new object instance
93
- * not the actual class instance.
94
- *
95
- * @param String event name
96
- * @param Object options
97
- * @return Event new event
98
- */
99
- initialize: function(name, options) {
100
- return this.build(this.options(name, options));
101
- },
102
-
103
- // protected
104
-
105
- /**
106
- * default building method
107
- *
108
- * the main purpose is that IE browsers share events instaciation interface
109
- *
110
- * @param Object options
111
- * @return Event new event
112
- */
113
- build: Browser.IE ? function(options) {
114
- var event = document.createEventObject();
115
- event.type = event.eventType = "on" + options.name;
116
- event.altKey = options.altKey;
117
- event.ctrlKey = options.ctrlKey;
118
- event.shiftKey = options.shiftKey;
119
- return event;
120
- } : null,
121
-
122
- /**
123
- * initial options parsing
124
- *
125
- * @params Sting event name
126
- * @params Object user options
127
- * @return Object clean options
128
- */
129
- options: function(name, options) {
130
- options = Object.merge({}, Event.Base.Options, this.Options, options);
131
- options.name = name;
132
-
133
- return options;
134
- }
135
- });
136
- /**
137
- * presents the mouse events class
138
- *
139
- * NOTE: this class generally is for an internal usage, it builds a new clean
140
- * unextended mouse event.
141
- * Use the Event general constructor, if you need a usual extened event.
142
- *
143
- * Copyright (C) 2008-2010 Nikolay V. Nemshilov
144
- */
145
- Event.Mouse = new Class(Event.Base, {
146
-
147
- extend: {
148
- NAMES: $w('click middleclick rightclick dblclick mousedown mouseup mouseover mouseout mousemove'),
149
-
150
- Methods: {
151
- isLeftClick: function() {
152
- return this.which == 1;
153
- },
154
-
155
- isRightClick : function() {
156
- return this.which == 3;
157
- },
158
-
159
- over: function(element) {
160
- var dims = $(element).dimensions(), x = this.pageX, y = this.pageY;
161
- return !(x < dims.left || x > (dims.left + dims.width) || y < dims.top || y > (dims.top + dims.height));
162
- }
163
- }
164
- },
165
-
166
- // default mouse events related options
167
- Options: {
168
- pointerX: 0,
169
- pointerY: 0,
170
- button: 0
171
- },
172
-
173
- // protecteds
174
- build: function(options) {
175
- var event = Browser.IE ? this.$super(options) : document.createEvent("MouseEvent");
176
- this[Browser.IE ? 'initIE' : 'initW3C'](event, options);
177
- return event;
178
- },
179
-
180
- options: function(name, options) {
181
- options = this.$super(name, options);
182
- options.button = Event.BUTTONS[options.name == 'rightclick' ? 'RIGHT' : options.name == 'middleclick' ? 'MIDDLE' : 'LEFT'];
183
- options.name = Event.realName(options.name);
184
-
185
- return options;
186
- },
187
-
188
- // private
189
- initIE: function(event, options) {
190
- event.clientX = options.pointerX;
191
- event.clientY = options.pointerY;
192
- event.button = options.button;
193
- },
194
-
195
- initW3C: function(event, options) {
196
- event.initMouseEvent(options.name, options.bubbles, options.cancelable, document.defaultView,
197
- name == 'dblclick' ? 2 : 1, options.pointerX, options.pointerY, options.pointerX, options.pointerY,
198
- options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, options.button, options.element
199
- );
200
- }
201
- });
202
-
203
- Event.include(Event.Mouse.Methods);
204
- /**
205
- * presents the keyboard events class
206
- *
207
- * NOTE: this class generally is for an internal usage, it builds a new clean
208
- * unextended mouse event.
209
- * Use the Event general constructor, if you need a usual extened event.
210
- *
211
- * Copyright (C) 2008-2010 Nikolay V. Nemshilov
212
- */
213
- Event.Keyboard = new Class(Event.Base, {
214
-
215
- extend: {
216
- NAMES: $w('keypress keydown keyup'),
217
-
218
- /**
219
- * automatically generates the key checking methods like
220
- * isEscape()
221
- * isEnter()
222
- * etc
223
- */
224
- Methods: {} // generated at the end of the file
225
- },
226
-
227
- // default keyboard related events options
228
- Options: {
229
- keyCode: 0,
230
- charCode: 0
231
- },
232
-
233
- // protected
234
- build: function(options) {
235
- var event = null;
236
-
237
- if (Browser.IE) {
238
- event = this.$super(options);
239
- this.initIE(event, options)
240
- } else try {
241
- // Gecko, WebKit, Chrome
242
- event = document.createEvent('KeyboardEvent');
243
- this['init'+(Browser.WebKit ? 'Webkit' : 'Gecko')](event, options);
244
- } catch(e) {
245
- // basically Opera
246
- event = document.createEvent('UIEvent');
247
- this.initDOM2(event, options);
248
- }
249
-
250
- return event;
251
- },
252
-
253
- initGecko: function(event, options) {
254
- event.initKeyEvent(options.name,
255
- options.bubbles, options.cancelable, document.defaultView,
256
- options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,
257
- options.keyCode, options.charCode
258
- );
259
- },
260
-
261
- initWebkit: function(event, options) {
262
- event.initKeyboardEvent(options.name,
263
- options.bubbles, options.cancelable, document.defaultView,
264
- null, 0, options.ctrlKey, options.altKey, options.shiftKey, options.metaKey
265
- );
266
- },
267
-
268
- initDOM2: function(event, options) {
269
- event.initUIEvent(options.name, options.bubbles, options.cancelable, document.defaultView, 1);
270
-
271
- event.keyCode = options.keyCode;
272
- event.charCode = options.charCode;
273
- event.altKey = options.altKey;
274
- event.metaKey = options.metaKey;
275
- event.ctrlKey = options.ctrlKey;
276
- event.shiftKey = options.shiftKey;
277
- },
278
-
279
- initIE: function(event, options) {
280
- event.keyCode = options.keyCode;
281
- event.charCode = options.charCode;
282
- }
283
- });
284
-
285
- // generates the key checking methods
286
- (function() {
287
- for (var key in Event.KEYS) {
288
- (function(key, key_code) {
289
- Event.Keyboard.Methods[('is_'+key.toLowerCase()).camelize()] = function() {
290
- return this.keyCode == key_code;
291
- };
292
- })(key, Event.KEYS[key]);
293
- };
294
-
295
- Event.include(Event.Keyboard.Methods);
296
- })();
297
-
298
- /**
299
- * Reassigning the element #fire method to support the native events dispatching
300
- *
301
- * @copyright 2009-2010 Nikolay V. Nemshilov
302
- */
303
- Element.include({
304
- fire: function() {
305
- var args = $A(arguments), event = new Event(args.shift(), Object.merge(args.shift(), {element: this}));
306
-
307
- if (event instanceof Event.Custom) {
308
- (this.$listeners || []).each(function(i) {
309
- if (i.e == event.type) {
310
- i.f.apply(this, [event].concat(i.a).concat(args));
311
- }
312
- }, this);
313
- } else if (this.dispatchEvent) {
314
- this.dispatchEvent(event);
315
- } else {
316
- this.fireEvent(event.eventType, event);
317
- }
318
-
319
- return this;
320
- }
321
- });
@@ -1,6 +0,0 @@
1
- /**
2
- * Advanced dom events handling module
3
- *
4
- * Copyright (C) 2008-2010 Nikolay V. Nemshilov
5
- */
6
- 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})("11.48({78:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,68:37,UP:38,57:39,DOWN:40,INSERT:45,DELETE:46},76:(20.IE||20.Konqueror)?{68:1,64:4,57:2}:{68:0,64:1,57:2}});11.proto84.62=10(){44 a=$A(66),e=a.70(),o=a.pop()||{};if(isString(e)){44 n=11.clean91(e);if(11.56.58.59s(n))e=49 11.56(n,o);51 if(11.26.58.59s(n))e=49 11.26(n,o);51 e=49 11.79(n,o)}14 11.ext(e)};11.65=49 72({48:{30:{28:85,21:85,19:54,17:54,16:54,24:54}},62:10(n,o){14 12.55(12.52(n,o))},55:20.IE?10(o){44 e=15.create1181();e.84=e.67=\"on\"+o.22;e.19=o.19;e.17=o.17;e.16=o.16;14 e}:77,52:10(n,o){o=81.83({},11.65.30,12.30,o);o.22=n;14 o}});11.56=49 72(11.65,{48:{58:$w('click 53 60 69 mousedown mouseup mouseover mouseout mousemove'),29:{isLeft90:10(){14 12.82==1},isRight90:10(){14 12.82==3},over:10(e){44 d=$(e).dimensions(),x=12.pageX,y=12.pageY;14!(x<d.86||x>(d.86+d.width)||y<d.87||y>(d.87+d.height))}}},30:{31:0,42:0,43:0},55:10(o){44 e=20.IE?12.63(o):15.create11(\"5611\");12[20.IE?'47':'74'](e,o);14 e},52:10(n,o){o=12.63(n,o);o.43=11.76[o.22=='60'?'57':o.22=='53'?'64':'68'];o.22=11.real91(o.22);14 o},47:10(e,o){e.clientX=o.31;e.clientY=o.42;e.43=o.43},74:10(e,o){e.init5611(o.22,o.28,o.21,15.25,22=='69'?2:1,o.31,o.42,o.31,o.42,o.17,o.19,o.16,o.24,o.43,o.75)}});11.59(11.56.29);11.26=49 72(11.65,{48:{58:$w('keypress keydown keyup'),29:{}},30:{18:0,23:0},55:10(o){44 a=77;if(20.IE){a=12.63(o);12.47(a,o)}51 try{a=15.create11('2611');12['init'+(20.WebKit?'88':'89')](a,o)}catch(e){a=15.create11('UI11');12.73(a,o)}14 a},init89:10(e,o){e.initKey11(o.22,o.28,o.21,15.25,o.17,o.19,o.16,o.24,o.18,o.23)},init88:10(e,o){e.init2611(o.22,o.28,o.21,15.25,77,0,o.17,o.19,o.16,o.24)},73:10(e,o){e.initUI11(o.22,o.28,o.21,15.25,1);e.18=o.18;e.23=o.23;e.19=o.19;e.24=o.24;e.17=o.17;e.16=o.16},47:10(e,o){e.18=o.18;e.23=o.23}});(10(){for(44 b in 11.78)(10(k,a){11.26.29[('is_'+k.toLowerCase()).camelize()]=10(){14 12.18==a}})(b,11.78[b]);;11.59(11.26.29)})();Element.59({fire:10(){44 b=$A(66),e=49 11(b.70(),81.83(b.70(),{75:12}));if(e instanceof 11.79){(12.$listeners||[]).each(10(a){if(a.e==e.84)a.f.apply(12,[e].80(a.a).80(b))},12)}51 if(12.dispatch11)12.dispatch11(e);51 12.fire11(e.67,e);14 12}});",",,,,,,,,,,function,Event,this,,return,document,shiftKey,ctrlKey,keyCode,altKey,Browser,cancelable,name,charCode,metaKey,defaultView,Keyboard,,bubbles,Methods,Options,pointerX,,,,,,,,,,createEvent,pointerY,button,var,,,initIE,extend,new,dispatchEvent,else,options,middleclick,false,build,Mouse,RIGHT,NAMES,include,rightclick,,initialize,$super,MIDDLE,Base,arguments,eventType,LEFT,dblclick,shift,includes,Class,initDOM2,initW3C,element,BUTTONS,null,KEYS,Custom,concat,Object,which,merge,type,true,left,top,Webkit,Gecko,Click,Name".split(",")));
@@ -1,194 +0,0 @@
1
- /**
2
- * Inline editor feature for RightJS (http://rightjs.org/ui/in-edit)
3
- *
4
- * Copyright (C) 2009-2010 Nikolay V. Nemshilov
5
- */
6
- /**
7
- * An inline editor feature
8
- *
9
- * Copyright (C) 2009 Nikolay V. Nemshilov
10
- */
11
- var InEdit = new Class(Observer, {
12
- extend: {
13
- EVENTS: $w('show hide send update'),
14
-
15
- Options: {
16
- url: null, // the url address where to send the stuff
17
- name: 'text', // the field name
18
- method: 'put', // the method
19
-
20
- type: 'text', // the input type, 'text', 'file', 'password' or 'textarea'
21
-
22
- toggle: null, // a reference to an element that should get hidden when the editor is active
23
-
24
- update: true, // a marker if the element should be updated with the response-text
25
-
26
- Xhr: {} // additional Xhr options
27
- },
28
-
29
- i18n: {
30
- save: 'Save',
31
- cancel: 'Cancel'
32
- },
33
-
34
- current: null // currently opened editor
35
- },
36
-
37
- /**
38
- * Constructor
39
- *
40
- * @param mixed an element reference
41
- * @param Object options
42
- */
43
- initialize: function(element, options) {
44
- this.setOptions(options);
45
- this.element = $(element);
46
-
47
- this.build();
48
- },
49
-
50
- /**
51
- * Shows the inline-editor form
52
- *
53
- * @return InEdit this
54
- */
55
- show: function() {
56
- if (InEdit.current !== this) {
57
- if (InEdit.current) InEdit.current.hide();
58
-
59
- this.oldContent = this.element.innerHTML;
60
-
61
- if (!['file', 'password'].include(this.options.type))
62
- this.field.value = this.oldContent;
63
-
64
- this.element.clean().insert(this.form);
65
-
66
- this.spinner.hide();
67
- this.submit.show();
68
-
69
- if (this.options.toggle)
70
- $(this.options.toggle).hide();
71
- }
72
-
73
- if (this.options.type != 'file')
74
- this.field.focus();
75
-
76
- InEdit.current = this;
77
- return this.fire('show', this);
78
- },
79
-
80
- /**
81
- * Hides the form and brings the content back
82
- *
83
- * @param String optional new content
84
- * @return InEdit this
85
- */
86
- hide: function() {
87
- this.element.innerHTML = this.oldContent;
88
-
89
- if (this.xhr) this.xhr.cancel();
90
-
91
- return this.finish();
92
- },
93
-
94
- /**
95
- * Triggers the form remote submit
96
- *
97
- * @return InEdit this
98
- */
99
- send: function() {
100
- this.spinner.show().resize(this.submit.sizes());
101
- this.submit.hide();
102
-
103
- this.xhr = new Xhr(this.options.url, Object.merge(this.options.Xhr, {
104
- method: this.options.method,
105
- spinner: this.spinner,
106
- onComplete: this.update.bind(this)
107
- })).send(this.form);
108
-
109
- return this.fire('send', this)
110
- },
111
-
112
- // protected
113
-
114
- finish: function() {
115
- if (this.options.toggle)
116
- this.options.toggle.show();
117
-
118
- InEdit.current = null;
119
- return this.fire('hide', this);
120
- },
121
-
122
- update: function() {
123
- if (this.options.update) {
124
- this.element.update(this.xhr.text);
125
- this.fire('update', this);
126
- }
127
-
128
- this.xhr = null;
129
-
130
- this.finish();
131
- },
132
-
133
- build: function() {
134
- this.field = this.buildField();
135
- this.spinner = this.buildSpinner();
136
- this.submit = $E('input', {type: 'submit', 'class': 'right-in-edit-submit', value: this.constructor.i18n.save});
137
- this.cancel = $E('a', {href: '', 'class': 'right-in-edit-cancel', html: this.constructor.i18n.cancel});
138
- this.form = $E('form', {'class': 'right-in-edit', action: this.options.url})
139
- .insert([this.field, this.spinner, this.submit, this.cancel]);
140
-
141
- this.form.onSubmit(function(e) {e.stop(); this.send(); }.bind(this));
142
- this.cancel.onClick(function(e) {e.stop(); this.hide(); }.bind(this));
143
- },
144
-
145
- buildField: function() {
146
- return (this.options.type == 'textarea' ? $E('textarea') :
147
- $E('input', {type: this.options.type}))
148
- .addClass('right-in-edit-field')
149
- .set('name', this.options.name);
150
- },
151
-
152
- buildSpinner: function() {
153
- var spinner = $E('div', {
154
- 'class': 'right-in-edit-spinner',
155
- 'html': '<div class="glow"></div><div></div><div></div>'
156
- });
157
-
158
- (function() {
159
- if (spinner.firstChild) {
160
- spinner.insertBefore(spinner.lastChild, spinner.firstChild);
161
- }
162
- }).periodical(400);
163
-
164
- return spinner;
165
- }
166
-
167
- });
168
-
169
- /**
170
- * The document hooks for in-edit form
171
- *
172
- * Copyright (C) 2010 Nikolay V. Nemshilov
173
- */
174
- document.onKeydown(function(event) {
175
- if (event.keyCode == 27 && InEdit.current)
176
- InEdit.current.hide();
177
- });
178
-
179
- /**
180
- * The element level inline editor extension
181
- *
182
- * Copyright (C) 2009-2010 Nikolay V. Nemshilov
183
- */
184
- Element.include({
185
- /**
186
- * Triggers an inline-editor feature on the element
187
- *
188
- * @param Object options for the InEdit class
189
- * @return InEdit object
190
- */
191
- inEdit: function(options) {
192
- return new InEdit(this, options).show();
193
- }
194
- });document.write("<style type=\"text/css\">form.right-in-edit,*.right-in-edit-field,*.right-in-edit-submit,*.right-in-edit-cancel,*.right-in-edit-spinner,*.right-in-edit-spinner div{margin:0;padding:0}form.right-in-edit,*.right-in-edit-spinner,*.right-in-edit-spinner div{display:inline-block;*display:inline;*zoom:1;border:none;background:none}textarea.right-in-edit-field{width:100%;margin-bottom:.5em}*.right-in-edit-field,*.right-in-edit-submit,*.right-in-edit-spinner{margin-right:.2em}*.right-in-edit-spinner{background:#EEE;border:1px solid #DDD;-moz-border-radius:.2em;-webkit-border-radius:.2em;text-align:center;line-height:100%}*.right-in-edit-spinner div{width:.3em;height:.7em;margin-top:.3em;background:#BBB;margin-right:2px;-moz-border-radius:.1em;-webkit-border-radius:.1em}*.right-in-edit-spinner div.glow{background:#777}</style>");
@@ -1,6 +0,0 @@
1
- /**
2
- * Inline editor feature for RightJS (http://rightjs.org/ui/in-edit)
3
- *
4
- * Copyright (C) 2009-2010 Nikolay V. Nemshilov
5
- */
6
- 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})("80 16=68 83(Observer,{extend:{EVENTS:$w('31 23 39 21'),82:{67:41,54:'42',46:'put',29:'42',30:41,21:true,62:{}},56:{75:'Save',19:'Cancel'},15:41},initialize:11(e,o){6.set82(o);6.28=$(e);6.63()},31:11(){if(16.15!==6){if(16.15)16.15.23();6.34=6.28.50;if(!['70','password'].52(6.13.29))6.22.61=6.34;6.28.clean().58(6.32);6.12.23();6.17.31();if(6.13.30)$(6.13.30).23()}if(6.13.29!='70')6.22.focus();16.15=6;20 6.48('31',6)},23:11(){6.28.50=6.34;if(6.49)6.49.19();20 6.47()},39:11(){6.12.31().resize(6.17.sizes());6.17.23();6.49=68 62(6.13.67,Object.merge(6.13.62,{46:6.13.46,12:6.12,onComplete:6.21.55(6)})).39(6.32);20 6.48('39',6)},47:11(){if(6.13.30)6.13.30.31();16.15=41;20 6.48('23',6)},21:11(){if(6.13.21){6.28.21(6.49.42);6.48('21',6)}6.49=41;6.47()},63:11(){6.22=6.45();6.12=6.38();6.17=$E('65',{29:'17','35':'9-in-14-17',61:6.43.56.75});6.19=$E('a',{href:'','35':'9-in-14-19',71:6.43.56.19});6.32=$E('32',{'35':'9-in-14',action:6.13.67}).58([6.22,6.12,6.17,6.19]);6.32.onSubmit(11(a){a.74();6.39()}.55(6));6.19.onClick(11(a){a.74();6.23()}.55(6))},45:11(){20(6.13.29=='37'?$E('37'):$E('65',{29:6.13.29})).add83('9-in-14-22').set('54',6.13.54)},38:11(){80 s=$E('24',{'35':'9-in-14-12','71':'<24 35=\"73\"></24><24></24><24></24>'});(11(){if(s.44)s.58Before(s.lastChild,s.44)}).periodical(400);20 s}});51.onKeydown(11(e){if(e.keyCode==27&&16.15)16.15.23()});Element.52({inEdit:11(o){20 68 16(6,o).31()}});51.write(\"<64 29=\\\"42/css\\\">32.9-in-14,*.9-in-14-22,*.9-in-14-17,*.9-in-14-19,*.9-in-14-12,*.9-in-14-12 24{33:0;padding:0}32.9-in-14,*.9-in-14-12,*.9-in-14-12 24{53:57-block;*53:57;*zoom:1;26:72;25:72}37.9-in-14-22{69:78%;33-bottom:.5em}*.9-in-14-22,*.9-in-14-17,*.9-in-14-12{33-9:.66}*.9-in-14-12{25:#EEE;26:1px solid #DDD;-79-26-36:.66;-60-26-36:.66;42-align:center;line-59:78%}*.9-in-14-12 24{69:.81;59:.7em;33-top:.81;25:#BBB;33-9:2px;-79-26-36:.76;-60-26-36:.76}*.9-in-14-12 24.73{25:#777}</64>\");",",,,,,,this,,,right,,function,spinner,options,edit,current,InEdit,submit,,cancel,return,update,field,hide,div,background,border,,element,type,toggle,show,form,margin,oldContent,class,radius,textarea,buildSpinner,send,,null,text,constructor,firstChild,buildField,method,finish,fire,xhr,innerHTML,document,include,display,name,bind,i18n,inline,insert,height,webkit,value,Xhr,build,style,input,2em,url,new,width,file,html,none,glow,stop,save,1em,,100,moz,var,3em,Options,Class".split(",")));