rules_view 0.0.1

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.
Files changed (169) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/LICENSE +20 -0
  4. data/README.textile +129 -0
  5. data/Rakefile +47 -0
  6. data/VERSION +1 -0
  7. data/app/views/layouts/rules_view.html.erb +43 -0
  8. data/app/views/re_view/template.html.erb +196 -0
  9. data/autotest/discover.rb +2 -0
  10. data/generators/install_generator.rb +41 -0
  11. data/generators/layout_generator.rb +41 -0
  12. data/generators/manifests/application.rb +116 -0
  13. data/generators/manifests/application.yml +8 -0
  14. data/generators/manifests/layout.rb +17 -0
  15. data/generators/manifests/layout.yml +5 -0
  16. data/generators/manifests/templates/app/views/layouts/rules_view_layout.html.erb +47 -0
  17. data/generators/manifests/templates/config/initializers/rules_view.rb +1 -0
  18. data/generators/manifests/templates/doc/README.rules_view +97 -0
  19. data/generators/manifests/templates/public/javascripts/rules_view/jquery-1.4.2.min.js +154 -0
  20. data/generators/manifests/templates/public/javascripts/rules_view/jquery.autocomplete.pack.js +13 -0
  21. data/generators/manifests/templates/public/javascripts/rules_view/jquery.blockUI.js +486 -0
  22. data/generators/manifests/templates/public/javascripts/rules_view/jquery.fancybox-1.3.1.js +1077 -0
  23. data/generators/manifests/templates/public/javascripts/rules_view/re_view.js +148 -0
  24. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/ie.css +35 -0
  25. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/cross.png +0 -0
  26. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/key.png +0 -0
  27. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/icons/tick.png +0 -0
  28. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/readme.txt +32 -0
  29. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/buttons/screen.css +97 -0
  30. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/fancy-type/readme.txt +14 -0
  31. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/fancy-type/screen.css +71 -0
  32. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/doc.png +0 -0
  33. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/email.png +0 -0
  34. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/external.png +0 -0
  35. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/feed.png +0 -0
  36. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/im.png +0 -0
  37. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/pdf.png +0 -0
  38. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/visited.png +0 -0
  39. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/icons/xls.png +0 -0
  40. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/readme.txt +18 -0
  41. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/link-icons/screen.css +40 -0
  42. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/rtl/readme.txt +10 -0
  43. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/plugins/rtl/screen.css +110 -0
  44. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/print.css +29 -0
  45. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/screen.css +258 -0
  46. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/forms.css +65 -0
  47. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/grid.css +280 -0
  48. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/grid.png +0 -0
  49. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/ie.css +76 -0
  50. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/print.css +85 -0
  51. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/reset.css +45 -0
  52. data/generators/manifests/templates/public/stylesheets/rules_view/blueprint/src/typography.css +106 -0
  53. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/blank.gif +0 -0
  54. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_close.png +0 -0
  55. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_loading.png +0 -0
  56. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_nav_left.png +0 -0
  57. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_nav_right.png +0 -0
  58. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_e.png +0 -0
  59. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_n.png +0 -0
  60. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_ne.png +0 -0
  61. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_nw.png +0 -0
  62. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_s.png +0 -0
  63. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_se.png +0 -0
  64. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_sw.png +0 -0
  65. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_shadow_w.png +0 -0
  66. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_left.png +0 -0
  67. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_main.png +0 -0
  68. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_over.png +0 -0
  69. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancy_title_right.png +0 -0
  70. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox-x.png +0 -0
  71. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox-y.png +0 -0
  72. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/fancybox.png +0 -0
  73. data/generators/manifests/templates/public/stylesheets/rules_view/fancybox/jquery.fancybox-1.3.1.css +363 -0
  74. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_box/shadowbox.png +0 -0
  75. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_box/whitebox.jpg +0 -0
  76. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/checked-off.gif +0 -0
  77. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/checked-on.gif +0 -0
  78. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/icon-add.png +0 -0
  79. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/icon-delete.png +0 -0
  80. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/list-add.png +0 -0
  81. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/list-remove.png +0 -0
  82. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/list-select.png +0 -0
  83. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-blue-left.gif +0 -0
  84. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-blue-right.gif +0 -0
  85. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-gray-left.gif +0 -0
  86. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-gray-right.gif +0 -0
  87. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-green-left.gif +0 -0
  88. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-green-right.gif +0 -0
  89. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-orange-left.gif +0 -0
  90. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-orange-right.gif +0 -0
  91. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-red-left.gif +0 -0
  92. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_button/oval-red-right.gif +0 -0
  93. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_error/re-alert-close.png +0 -0
  94. data/generators/manifests/templates/public/stylesheets/rules_view/images/re_view_navigate/breadcrumb.png +0 -0
  95. data/generators/manifests/templates/public/stylesheets/rules_view/jquery.autocomplete.css +53 -0
  96. data/generators/manifests/templates/public/stylesheets/rules_view/rules_view.css +738 -0
  97. data/init.rb +1 -0
  98. data/lib/rules_view/alerts.rb +51 -0
  99. data/lib/rules_view/boxes.rb +25 -0
  100. data/lib/rules_view/buttons.rb +113 -0
  101. data/lib/rules_view/config.rb +21 -0
  102. data/lib/rules_view/defer.rb +30 -0
  103. data/lib/rules_view/engine.rb +28 -0
  104. data/lib/rules_view/form_builder.rb +62 -0
  105. data/lib/rules_view/form_fields.rb +41 -0
  106. data/lib/rules_view/form_styles.rb +112 -0
  107. data/lib/rules_view/model_loader.rb +64 -0
  108. data/lib/rules_view/navigate.rb +40 -0
  109. data/lib/rules_view.rb +20 -0
  110. data/rules_view.gemspec +239 -0
  111. data/spec/lib/rules_view/alerts_spec.rb +145 -0
  112. data/spec/lib/rules_view/boxes_spec.rb +49 -0
  113. data/spec/lib/rules_view/buttons_spec.rb +184 -0
  114. data/spec/lib/rules_view/defer_spec.rb +90 -0
  115. data/spec/lib/rules_view/form_builder_fields_spec.rb +184 -0
  116. data/spec/lib/rules_view/form_builder_spec.rb +19 -0
  117. data/spec/lib/rules_view/form_fields_spec.rb +219 -0
  118. data/spec/lib/rules_view/form_styles_spec.rb +290 -0
  119. data/spec/lib/rules_view/model_loader_spec.rb +202 -0
  120. data/spec/lib/rules_view/navigate_spec.rb +61 -0
  121. data/spec/rails_3_0_0_root/.gitignore +4 -0
  122. data/spec/rails_3_0_0_root/.rspec +1 -0
  123. data/spec/rails_3_0_0_root/Gemfile +13 -0
  124. data/spec/rails_3_0_0_root/Gemfile.lock +101 -0
  125. data/spec/rails_3_0_0_root/README +256 -0
  126. data/spec/rails_3_0_0_root/Rakefile +7 -0
  127. data/spec/rails_3_0_0_root/app/controllers/application_controller.rb +3 -0
  128. data/spec/rails_3_0_0_root/app/helpers/application_helper.rb +2 -0
  129. data/spec/rails_3_0_0_root/app/views/layouts/application.html.erb +14 -0
  130. data/spec/rails_3_0_0_root/autotest/discover.rb +2 -0
  131. data/spec/rails_3_0_0_root/config/application.rb +42 -0
  132. data/spec/rails_3_0_0_root/config/boot.rb +13 -0
  133. data/spec/rails_3_0_0_root/config/database.yml +22 -0
  134. data/spec/rails_3_0_0_root/config/environment.rb +5 -0
  135. data/spec/rails_3_0_0_root/config/environments/development.rb +26 -0
  136. data/spec/rails_3_0_0_root/config/environments/production.rb +49 -0
  137. data/spec/rails_3_0_0_root/config/environments/test.rb +35 -0
  138. data/spec/rails_3_0_0_root/config/initializers/backtrace_silencers.rb +7 -0
  139. data/spec/rails_3_0_0_root/config/initializers/inflections.rb +10 -0
  140. data/spec/rails_3_0_0_root/config/initializers/mime_types.rb +5 -0
  141. data/spec/rails_3_0_0_root/config/initializers/secret_token.rb +7 -0
  142. data/spec/rails_3_0_0_root/config/initializers/session_store.rb +8 -0
  143. data/spec/rails_3_0_0_root/config/locales/en.yml +5 -0
  144. data/spec/rails_3_0_0_root/config/routes.rb +58 -0
  145. data/spec/rails_3_0_0_root/config.ru +4 -0
  146. data/spec/rails_3_0_0_root/db/seeds.rb +7 -0
  147. data/spec/rails_3_0_0_root/doc/README_FOR_APP +2 -0
  148. data/spec/rails_3_0_0_root/lib/tasks/.gitkeep +0 -0
  149. data/spec/rails_3_0_0_root/public/404.html +26 -0
  150. data/spec/rails_3_0_0_root/public/422.html +26 -0
  151. data/spec/rails_3_0_0_root/public/500.html +26 -0
  152. data/spec/rails_3_0_0_root/public/favicon.ico +0 -0
  153. data/spec/rails_3_0_0_root/public/images/rails.png +0 -0
  154. data/spec/rails_3_0_0_root/public/index.html +239 -0
  155. data/spec/rails_3_0_0_root/public/javascripts/application.js +2 -0
  156. data/spec/rails_3_0_0_root/public/javascripts/controls.js +965 -0
  157. data/spec/rails_3_0_0_root/public/javascripts/dragdrop.js +974 -0
  158. data/spec/rails_3_0_0_root/public/javascripts/effects.js +1123 -0
  159. data/spec/rails_3_0_0_root/public/javascripts/prototype.js +6001 -0
  160. data/spec/rails_3_0_0_root/public/javascripts/rails.js +175 -0
  161. data/spec/rails_3_0_0_root/public/robots.txt +5 -0
  162. data/spec/rails_3_0_0_root/public/stylesheets/.gitkeep +0 -0
  163. data/spec/rails_3_0_0_root/script/rails +6 -0
  164. data/spec/rails_3_0_0_root/spec/spec_helper.rb +27 -0
  165. data/spec/rails_3_0_0_root/vendor/plugins/.gitkeep +0 -0
  166. data/spec/spec_helper.rb +29 -0
  167. data/spec/support/create_memory_db.rb +2 -0
  168. data/tasks/rspec.rake +46 -0
  169. metadata +278 -0
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Autocomplete - jQuery plugin 1.0.2
3
+ *
4
+ * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ * Revision: $Id: jquery.autocomplete.js 5747 2008-06-25 18:30:55Z joern.zaefferer $
11
+ *
12
+ */
13
+ eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(3($){$.31.1o({12:3(b,d){5 c=Y b=="1w";d=$.1o({},$.D.1L,{11:c?b:14,w:c?14:b,1D:c?$.D.1L.1D:10,Z:d&&!d.1x?10:3U},d);d.1t=d.1t||3(a){6 a};d.1q=d.1q||d.1K;6 I.K(3(){1E $.D(I,d)})},M:3(a){6 I.X("M",a)},1y:3(a){6 I.15("1y",[a])},20:3(){6 I.15("20")},1Y:3(a){6 I.15("1Y",[a])},1X:3(){6 I.15("1X")}});$.D=3(o,r){5 t={2N:38,2I:40,2D:46,2x:9,2v:13,2q:27,2d:3x,2j:33,2o:34,2e:8};5 u=$(o).3f("12","3c").P(r.24);5 p;5 m="";5 n=$.D.2W(r);5 s=0;5 k;5 h={1z:B};5 l=$.D.2Q(r,o,1U,h);5 j;$.1T.2L&&$(o.2K).X("3S.12",3(){4(j){j=B;6 B}});u.X(($.1T.2L?"3Q":"3N")+".12",3(a){k=a.2F;3L(a.2F){Q t.2N:a.1d();4(l.L()){l.2y()}A{W(0,C)}N;Q t.2I:a.1d();4(l.L()){l.2u()}A{W(0,C)}N;Q t.2j:a.1d();4(l.L()){l.2t()}A{W(0,C)}N;Q t.2o:a.1d();4(l.L()){l.2s()}A{W(0,C)}N;Q r.19&&$.1p(r.R)==","&&t.2d:Q t.2x:Q t.2v:4(1U()){a.1d();j=C;6 B}N;Q t.2q:l.U();N;3A:1I(p);p=1H(W,r.1D);N}}).1G(3(){s++}).3v(3(){s=0;4(!h.1z){2k()}}).2i(3(){4(s++>1&&!l.L()){W(0,C)}}).X("1y",3(){5 c=(1n.7>1)?1n[1]:14;3 23(q,a){5 b;4(a&&a.7){16(5 i=0;i<a.7;i++){4(a[i].M.O()==q.O()){b=a[i];N}}}4(Y c=="3")c(b);A u.15("M",b&&[b.w,b.H])}$.K(1g(u.J()),3(i,a){1R(a,23,23)})}).X("20",3(){n.18()}).X("1Y",3(){$.1o(r,1n[1]);4("w"2G 1n[1])n.1f()}).X("1X",3(){l.1u();u.1u();$(o.2K).1u(".12")});3 1U(){5 b=l.26();4(!b)6 B;5 v=b.M;m=v;4(r.19){5 a=1g(u.J());4(a.7>1){v=a.17(0,a.7-1).2Z(r.R)+r.R+v}v+=r.R}u.J(v);1l();u.15("M",[b.w,b.H]);6 C}3 W(b,c){4(k==t.2D){l.U();6}5 a=u.J();4(!c&&a==m)6;m=a;a=1k(a);4(a.7>=r.22){u.P(r.21);4(!r.1C)a=a.O();1R(a,2V,1l)}A{1B();l.U()}};3 1g(b){4(!b){6[""]}5 d=b.1Z(r.R);5 c=[];$.K(d,3(i,a){4($.1p(a))c[i]=$.1p(a)});6 c}3 1k(a){4(!r.19)6 a;5 b=1g(a);6 b[b.7-1]}3 1A(q,a){4(r.1A&&(1k(u.J()).O()==q.O())&&k!=t.2e){u.J(u.J()+a.48(1k(m).7));$.D.1N(o,m.7,m.7+a.7)}};3 2k(){1I(p);p=1H(1l,47)};3 1l(){5 c=l.L();l.U();1I(p);1B();4(r.2U){u.1y(3(a){4(!a){4(r.19){5 b=1g(u.J()).17(0,-1);u.J(b.2Z(r.R)+(b.7?r.R:""))}A u.J("")}})}4(c)$.D.1N(o,o.H.7,o.H.7)};3 2V(q,a){4(a&&a.7&&s){1B();l.2T(a,q);1A(q,a[0].H);l.1W()}A{1l()}};3 1R(f,d,g){4(!r.1C)f=f.O();5 e=n.2S(f);4(e&&e.7){d(f,e)}A 4((Y r.11=="1w")&&(r.11.7>0)){5 c={45:+1E 44()};$.K(r.2R,3(a,b){c[a]=Y b=="3"?b():b});$.43({42:"41",3Z:"12"+o.3Y,2M:r.2M,11:r.11,w:$.1o({q:1k(f),3X:r.Z},c),3W:3(a){5 b=r.1r&&r.1r(a)||1r(a);n.1h(f,b);d(f,b)}})}A{l.2J();g(f)}};3 1r(c){5 d=[];5 b=c.1Z("\\n");16(5 i=0;i<b.7;i++){5 a=$.1p(b[i]);4(a){a=a.1Z("|");d[d.7]={w:a,H:a[0],M:r.1v&&r.1v(a,a[0])||a[0]}}}6 d};3 1B(){u.1e(r.21)}};$.D.1L={24:"3R",2H:"3P",21:"3O",22:1,1D:3M,1C:B,1a:C,1V:B,1j:10,Z:3K,2U:B,2R:{},1S:C,1K:3(a){6 a[0]},1q:14,1A:B,E:0,19:B,R:", ",1t:3(b,a){6 b.2C(1E 3J("(?![^&;]+;)(?!<[^<>]*)("+a.2C(/([\\^\\$\\(\\)\\[\\]\\{\\}\\*\\.\\+\\?\\|\\\\])/2A,"\\\\$1")+")(?![^<>]*>)(?![^&;]+;)","2A"),"<2z>$1</2z>")},1x:C,1s:3I};$.D.2W=3(g){5 h={};5 j=0;3 1a(s,a){4(!g.1C)s=s.O();5 i=s.3H(a);4(i==-1)6 B;6 i==0||g.1V};3 1h(q,a){4(j>g.1j){18()}4(!h[q]){j++}h[q]=a}3 1f(){4(!g.w)6 B;5 f={},2w=0;4(!g.11)g.1j=1;f[""]=[];16(5 i=0,30=g.w.7;i<30;i++){5 c=g.w[i];c=(Y c=="1w")?[c]:c;5 d=g.1q(c,i+1,g.w.7);4(d===B)1P;5 e=d.3G(0).O();4(!f[e])f[e]=[];5 b={H:d,w:c,M:g.1v&&g.1v(c)||d};f[e].1O(b);4(2w++<g.Z){f[""].1O(b)}};$.K(f,3(i,a){g.1j++;1h(i,a)})}1H(1f,25);3 18(){h={};j=0}6{18:18,1h:1h,1f:1f,2S:3(q){4(!g.1j||!j)6 14;4(!g.11&&g.1V){5 a=[];16(5 k 2G h){4(k.7>0){5 c=h[k];$.K(c,3(i,x){4(1a(x.H,q)){a.1O(x)}})}}6 a}A 4(h[q]){6 h[q]}A 4(g.1a){16(5 i=q.7-1;i>=g.22;i--){5 c=h[q.3F(0,i)];4(c){5 a=[];$.K(c,3(i,x){4(1a(x.H,q)){a[a.7]=x}});6 a}}}6 14}}};$.D.2Q=3(e,g,f,k){5 h={G:"3E"};5 j,y=-1,w,1m="",1M=C,F,z;3 2r(){4(!1M)6;F=$("<3D/>").U().P(e.2H).T("3C","3B").1J(2p.2n);z=$("<3z/>").1J(F).3y(3(a){4(V(a).2m&&V(a).2m.3w()==\'2l\'){y=$("1F",z).1e(h.G).3u(V(a));$(V(a)).P(h.G)}}).2i(3(a){$(V(a)).P(h.G);f();g.1G();6 B}).3t(3(){k.1z=C}).3s(3(){k.1z=B});4(e.E>0)F.T("E",e.E);1M=B}3 V(a){5 b=a.V;3r(b&&b.3q!="2l")b=b.3p;4(!b)6[];6 b}3 S(b){j.17(y,y+1).1e(h.G);2h(b);5 a=j.17(y,y+1).P(h.G);4(e.1x){5 c=0;j.17(0,y).K(3(){c+=I.1i});4((c+a[0].1i-z.1c())>z[0].3o){z.1c(c+a[0].1i-z.3n())}A 4(c<z.1c()){z.1c(c)}}};3 2h(a){y+=a;4(y<0){y=j.1b()-1}A 4(y>=j.1b()){y=0}}3 2g(a){6 e.Z&&e.Z<a?e.Z:a}3 2f(){z.2B();5 b=2g(w.7);16(5 i=0;i<b;i++){4(!w[i])1P;5 a=e.1K(w[i].w,i+1,b,w[i].H,1m);4(a===B)1P;5 c=$("<1F/>").3m(e.1t(a,1m)).P(i%2==0?"3l":"3k").1J(z)[0];$.w(c,"2c",w[i])}j=z.3j("1F");4(e.1S){j.17(0,1).P(h.G);y=0}4($.31.2b)z.2b()}6{2T:3(d,q){2r();w=d;1m=q;2f()},2u:3(){S(1)},2y:3(){S(-1)},2t:3(){4(y!=0&&y-8<0){S(-y)}A{S(-8)}},2s:3(){4(y!=j.1b()-1&&y+8>j.1b()){S(j.1b()-1-y)}A{S(8)}},U:3(){F&&F.U();j&&j.1e(h.G);y=-1},L:3(){6 F&&F.3i(":L")},3h:3(){6 I.L()&&(j.2a("."+h.G)[0]||e.1S&&j[0])},1W:3(){5 a=$(g).3g();F.T({E:Y e.E=="1w"||e.E>0?e.E:$(g).E(),2E:a.2E+g.1i,1Q:a.1Q}).1W();4(e.1x){z.1c(0);z.T({29:e.1s,3e:\'3d\'});4($.1T.3b&&Y 2p.2n.3T.29==="3a"){5 c=0;j.K(3(){c+=I.1i});5 b=c>e.1s;z.T(\'3V\',b?e.1s:c);4(!b){j.E(z.E()-28(j.T("32-1Q"))-28(j.T("32-39")))}}}},26:3(){5 a=j&&j.2a("."+h.G).1e(h.G);6 a&&a.7&&$.w(a[0],"2c")},2J:3(){z&&z.2B()},1u:3(){F&&F.37()}}};$.D.1N=3(b,a,c){4(b.2O){5 d=b.2O();d.36(C);d.35("2P",a);d.4c("2P",c);d.4b()}A 4(b.2Y){b.2Y(a,c)}A{4(b.2X){b.2X=a;b.4a=c}}b.1G()}})(49);',62,261,'|||function|if|var|return|length|||||||||||||||||||||||||data||active|list|else|false|true|Autocompleter|width|element|ACTIVE|value|this|val|each|visible|result|break|toLowerCase|addClass|case|multipleSeparator|moveSelect|css|hide|target|onChange|bind|typeof|max||url|autocomplete||null|trigger|for|slice|flush|multiple|matchSubset|size|scrollTop|preventDefault|removeClass|populate|trimWords|add|offsetHeight|cacheLength|lastWord|hideResultsNow|term|arguments|extend|trim|formatMatch|parse|scrollHeight|highlight|unbind|formatResult|string|scroll|search|mouseDownOnSelect|autoFill|stopLoading|matchCase|delay|new|li|focus|setTimeout|clearTimeout|appendTo|formatItem|defaults|needsInit|Selection|push|continue|left|request|selectFirst|browser|selectCurrent|matchContains|show|unautocomplete|setOptions|split|flushCache|loadingClass|minChars|findValueCallback|inputClass||selected||parseInt|maxHeight|filter|bgiframe|ac_data|COMMA|BACKSPACE|fillList|limitNumberOfItems|movePosition|click|PAGEUP|hideResults|LI|nodeName|body|PAGEDOWN|document|ESC|init|pageDown|pageUp|next|RETURN|nullData|TAB|prev|strong|gi|empty|replace|DEL|top|keyCode|in|resultsClass|DOWN|emptyList|form|opera|dataType|UP|createTextRange|character|Select|extraParams|load|display|mustMatch|receiveData|Cache|selectionStart|setSelectionRange|join|ol|fn|padding|||moveStart|collapse|remove||right|undefined|msie|off|auto|overflow|attr|offset|current|is|find|ac_odd|ac_even|html|innerHeight|clientHeight|parentNode|tagName|while|mouseup|mousedown|index|blur|toUpperCase|188|mouseover|ul|default|absolute|position|div|ac_over|substr|charAt|indexOf|180|RegExp|100|switch|400|keydown|ac_loading|ac_results|keypress|ac_input|submit|style|150|height|success|limit|name|port||abort|mode|ajax|Date|timestamp||200|substring|jQuery|selectionEnd|select|moveEnd'.split('|'),0,{}))
@@ -0,0 +1,486 @@
1
+ /*!
2
+ * jQuery blockUI plugin
3
+ * Version 2.33 (29-MAR-2010)
4
+ * @requires jQuery v1.2.3 or later
5
+ *
6
+ * Examples at: http://malsup.com/jquery/block/
7
+ * Copyright (c) 2007-2008 M. Alsup
8
+ * Dual licensed under the MIT and GPL licenses:
9
+ * http://www.opensource.org/licenses/mit-license.php
10
+ * http://www.gnu.org/licenses/gpl.html
11
+ *
12
+ * Thanks to Amir-Hossein Sobhi for some excellent contributions!
13
+ */
14
+
15
+ ;(function($) {
16
+
17
+ if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
18
+ alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery);
19
+ return;
20
+ }
21
+
22
+ $.fn._fadeIn = $.fn.fadeIn;
23
+
24
+ var noOp = function() {};
25
+
26
+ // this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
27
+ // retarded userAgent strings on Vista)
28
+ var mode = document.documentMode || 0;
29
+ var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);
30
+ var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode;
31
+
32
+ // global $ methods for blocking/unblocking the entire page
33
+ $.blockUI = function(opts) { install(window, opts); };
34
+ $.unblockUI = function(opts) { remove(window, opts); };
35
+
36
+ // convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
37
+ $.growlUI = function(title, message, timeout, onClose) {
38
+ var $m = $('<div class="growlUI"></div>');
39
+ if (title) $m.append('<h1>'+title+'</h1>');
40
+ if (message) $m.append('<h2>'+message+'</h2>');
41
+ if (timeout == undefined) timeout = 3000;
42
+ $.blockUI({
43
+ message: $m, fadeIn: 700, fadeOut: 1000, centerY: false,
44
+ timeout: timeout, showOverlay: false,
45
+ onUnblock: onClose,
46
+ css: $.blockUI.defaults.growlCSS
47
+ });
48
+ };
49
+
50
+ // plugin method for blocking element content
51
+ $.fn.block = function(opts) {
52
+ return this.unblock({ fadeOut: 0 }).each(function() {
53
+ if ($.css(this,'position') == 'static')
54
+ this.style.position = 'relative';
55
+ if ($.browser.msie)
56
+ this.style.zoom = 1; // force 'hasLayout'
57
+ install(this, opts);
58
+ });
59
+ };
60
+
61
+ // plugin method for unblocking element content
62
+ $.fn.unblock = function(opts) {
63
+ return this.each(function() {
64
+ remove(this, opts);
65
+ });
66
+ };
67
+
68
+ $.blockUI.version = 2.33; // 2nd generation blocking at no extra cost!
69
+
70
+ // override these in your code to change the default behavior and style
71
+ $.blockUI.defaults = {
72
+ // message displayed when blocking (use null for no message)
73
+ message: '<h1>Please wait...</h1>',
74
+
75
+ title: null, // title string; only used when theme == true
76
+ draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
77
+
78
+ theme: false, // set to true to use with jQuery UI themes
79
+
80
+ // styles for the message when blocking; if you wish to disable
81
+ // these and use an external stylesheet then do this in your code:
82
+ // $.blockUI.defaults.css = {};
83
+ css: {
84
+ padding: 0,
85
+ margin: 0,
86
+ width: '30%',
87
+ top: '40%',
88
+ left: '35%',
89
+ textAlign: 'center',
90
+ color: '#000',
91
+ border: '3px solid #aaa',
92
+ backgroundColor:'#fff',
93
+ cursor: 'wait'
94
+ },
95
+
96
+ // minimal style set used when themes are used
97
+ themedCSS: {
98
+ width: '30%',
99
+ top: '40%',
100
+ left: '35%'
101
+ },
102
+
103
+ // styles for the overlay
104
+ overlayCSS: {
105
+ backgroundColor: '#000',
106
+ opacity: 0.6,
107
+ cursor: 'wait'
108
+ },
109
+
110
+ // styles applied when using $.growlUI
111
+ growlCSS: {
112
+ width: '350px',
113
+ top: '10px',
114
+ left: '',
115
+ right: '10px',
116
+ border: 'none',
117
+ padding: '5px',
118
+ opacity: 0.6,
119
+ cursor: 'default',
120
+ color: '#fff',
121
+ backgroundColor: '#000',
122
+ '-webkit-border-radius': '10px',
123
+ '-moz-border-radius': '10px',
124
+ 'border-radius': '10px'
125
+ },
126
+
127
+ // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
128
+ // (hat tip to Jorge H. N. de Vasconcelos)
129
+ iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
130
+
131
+ // force usage of iframe in non-IE browsers (handy for blocking applets)
132
+ forceIframe: false,
133
+
134
+ // z-index for the blocking overlay
135
+ baseZ: 1000,
136
+
137
+ // set these to true to have the message automatically centered
138
+ centerX: true, // <-- only effects element blocking (page block controlled via css above)
139
+ centerY: true,
140
+
141
+ // allow body element to be stetched in ie6; this makes blocking look better
142
+ // on "short" pages. disable if you wish to prevent changes to the body height
143
+ allowBodyStretch: true,
144
+
145
+ // enable if you want key and mouse events to be disabled for content that is blocked
146
+ bindEvents: true,
147
+
148
+ // be default blockUI will supress tab navigation from leaving blocking content
149
+ // (if bindEvents is true)
150
+ constrainTabKey: true,
151
+
152
+ // fadeIn time in millis; set to 0 to disable fadeIn on block
153
+ fadeIn: 200,
154
+
155
+ // fadeOut time in millis; set to 0 to disable fadeOut on unblock
156
+ fadeOut: 400,
157
+
158
+ // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
159
+ timeout: 0,
160
+
161
+ // disable if you don't want to show the overlay
162
+ showOverlay: true,
163
+
164
+ // if true, focus will be placed in the first available input field when
165
+ // page blocking
166
+ focusInput: true,
167
+
168
+ // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
169
+ applyPlatformOpacityRules: true,
170
+
171
+ // callback method invoked when fadeIn has completed and blocking message is visible
172
+ onBlock: null,
173
+
174
+ // callback method invoked when unblocking has completed; the callback is
175
+ // passed the element that has been unblocked (which is the window object for page
176
+ // blocks) and the options that were passed to the unblock call:
177
+ // onUnblock(element, options)
178
+ onUnblock: null,
179
+
180
+ // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
181
+ quirksmodeOffsetHack: 4
182
+ };
183
+
184
+ // private data and functions follow...
185
+
186
+ var pageBlock = null;
187
+ var pageBlockEls = [];
188
+
189
+ function install(el, opts) {
190
+ var full = (el == window);
191
+ var msg = opts && opts.message !== undefined ? opts.message : undefined;
192
+ opts = $.extend({}, $.blockUI.defaults, opts || {});
193
+ opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
194
+ var css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
195
+ var themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
196
+ msg = msg === undefined ? opts.message : msg;
197
+
198
+ // remove the current block (if there is one)
199
+ if (full && pageBlock)
200
+ remove(window, {fadeOut:0});
201
+
202
+ // if an existing element is being used as the blocking content then we capture
203
+ // its current place in the DOM (and current display style) so we can restore
204
+ // it when we unblock
205
+ if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
206
+ var node = msg.jquery ? msg[0] : msg;
207
+ var data = {};
208
+ $(el).data('blockUI.history', data);
209
+ data.el = node;
210
+ data.parent = node.parentNode;
211
+ data.display = node.style.display;
212
+ data.position = node.style.position;
213
+ if (data.parent)
214
+ data.parent.removeChild(node);
215
+ }
216
+
217
+ var z = opts.baseZ;
218
+
219
+ // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
220
+ // layer1 is the iframe layer which is used to supress bleed through of underlying content
221
+ // layer2 is the overlay layer which has opacity and a wait cursor (by default)
222
+ // layer3 is the message content that is displayed while blocking
223
+
224
+ var lyr1 = ($.browser.msie || opts.forceIframe)
225
+ ? $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>')
226
+ : $('<div class="blockUI" style="display:none"></div>');
227
+ var lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
228
+
229
+ var lyr3, s;
230
+ if (opts.theme && full) {
231
+ s = '<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:fixed">' +
232
+ '<div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title || '&nbsp;')+'</div>' +
233
+ '<div class="ui-widget-content ui-dialog-content"></div>' +
234
+ '</div>';
235
+ }
236
+ else if (opts.theme) {
237
+ s = '<div class="blockUI blockMsg blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:absolute">' +
238
+ '<div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title || '&nbsp;')+'</div>' +
239
+ '<div class="ui-widget-content ui-dialog-content"></div>' +
240
+ '</div>';
241
+ }
242
+ else if (full) {
243
+ s = '<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>';
244
+ }
245
+ else {
246
+ s = '<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>';
247
+ }
248
+ lyr3 = $(s);
249
+
250
+ // if we have a message, style it
251
+ if (msg) {
252
+ if (opts.theme) {
253
+ lyr3.css(themedCSS);
254
+ lyr3.addClass('ui-widget-content');
255
+ }
256
+ else
257
+ lyr3.css(css);
258
+ }
259
+
260
+ // style the overlay
261
+ if (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform)))
262
+ lyr2.css(opts.overlayCSS);
263
+ lyr2.css('position', full ? 'fixed' : 'absolute');
264
+
265
+ // make iframe layer transparent in IE
266
+ if ($.browser.msie || opts.forceIframe)
267
+ lyr1.css('opacity',0.0);
268
+
269
+ //$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
270
+ var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
271
+ $.each(layers, function() {
272
+ this.appendTo($par);
273
+ });
274
+
275
+ if (opts.theme && opts.draggable && $.fn.draggable) {
276
+ lyr3.draggable({
277
+ handle: '.ui-dialog-titlebar',
278
+ cancel: 'li'
279
+ });
280
+ }
281
+
282
+ // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
283
+ var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
284
+ if (ie6 || expr) {
285
+ // give body 100% height
286
+ if (full && opts.allowBodyStretch && $.boxModel)
287
+ $('html,body').css('height','100%');
288
+
289
+ // fix ie6 issue when blocked element has a border width
290
+ if ((ie6 || !$.boxModel) && !full) {
291
+ var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
292
+ var fixT = t ? '(0 - '+t+')' : 0;
293
+ var fixL = l ? '(0 - '+l+')' : 0;
294
+ }
295
+
296
+ // simulate fixed position
297
+ $.each([lyr1,lyr2,lyr3], function(i,o) {
298
+ var s = o[0].style;
299
+ s.position = 'absolute';
300
+ if (i < 2) {
301
+ full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"')
302
+ : s.setExpression('height','this.parentNode.offsetHeight + "px"');
303
+ full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
304
+ : s.setExpression('width','this.parentNode.offsetWidth + "px"');
305
+ if (fixL) s.setExpression('left', fixL);
306
+ if (fixT) s.setExpression('top', fixT);
307
+ }
308
+ else if (opts.centerY) {
309
+ if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
310
+ s.marginTop = 0;
311
+ }
312
+ else if (!opts.centerY && full) {
313
+ var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0;
314
+ var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
315
+ s.setExpression('top',expression);
316
+ }
317
+ });
318
+ }
319
+
320
+ // show the message
321
+ if (msg) {
322
+ if (opts.theme)
323
+ lyr3.find('.ui-widget-content').append(msg);
324
+ else
325
+ lyr3.append(msg);
326
+ if (msg.jquery || msg.nodeType)
327
+ $(msg).show();
328
+ }
329
+
330
+ if (($.browser.msie || opts.forceIframe) && opts.showOverlay)
331
+ lyr1.show(); // opacity is zero
332
+ if (opts.fadeIn) {
333
+ var cb = opts.onBlock ? opts.onBlock : noOp;
334
+ var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
335
+ var cb2 = msg ? cb : noOp;
336
+ if (opts.showOverlay)
337
+ lyr2._fadeIn(opts.fadeIn, cb1);
338
+ if (msg)
339
+ lyr3._fadeIn(opts.fadeIn, cb2);
340
+ }
341
+ else {
342
+ if (opts.showOverlay)
343
+ lyr2.show();
344
+ if (msg)
345
+ lyr3.show();
346
+ if (opts.onBlock)
347
+ opts.onBlock();
348
+ }
349
+
350
+ // bind key and mouse events
351
+ bind(1, el, opts);
352
+
353
+ if (full) {
354
+ pageBlock = lyr3[0];
355
+ pageBlockEls = $(':input:enabled:visible',pageBlock);
356
+ if (opts.focusInput)
357
+ setTimeout(focus, 20);
358
+ }
359
+ else
360
+ center(lyr3[0], opts.centerX, opts.centerY);
361
+
362
+ if (opts.timeout) {
363
+ // auto-unblock
364
+ var to = setTimeout(function() {
365
+ full ? $.unblockUI(opts) : $(el).unblock(opts);
366
+ }, opts.timeout);
367
+ $(el).data('blockUI.timeout', to);
368
+ }
369
+ };
370
+
371
+ // remove the block
372
+ function remove(el, opts) {
373
+ var full = (el == window);
374
+ var $el = $(el);
375
+ var data = $el.data('blockUI.history');
376
+ var to = $el.data('blockUI.timeout');
377
+ if (to) {
378
+ clearTimeout(to);
379
+ $el.removeData('blockUI.timeout');
380
+ }
381
+ opts = $.extend({}, $.blockUI.defaults, opts || {});
382
+ bind(0, el, opts); // unbind events
383
+
384
+ var els;
385
+ if (full) // crazy selector to handle odd field errors in ie6/7
386
+ els = $('body').children().filter('.blockUI').add('body > .blockUI');
387
+ else
388
+ els = $('.blockUI', el);
389
+
390
+ if (full)
391
+ pageBlock = pageBlockEls = null;
392
+
393
+ if (opts.fadeOut) {
394
+ els.fadeOut(opts.fadeOut);
395
+ setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut);
396
+ }
397
+ else
398
+ reset(els, data, opts, el);
399
+ };
400
+
401
+ // move blocking element back into the DOM where it started
402
+ function reset(els,data,opts,el) {
403
+ els.each(function(i,o) {
404
+ // remove via DOM calls so we don't lose event handlers
405
+ if (this.parentNode)
406
+ this.parentNode.removeChild(this);
407
+ });
408
+
409
+ if (data && data.el) {
410
+ data.el.style.display = data.display;
411
+ data.el.style.position = data.position;
412
+ if (data.parent)
413
+ data.parent.appendChild(data.el);
414
+ $(el).removeData('blockUI.history');
415
+ }
416
+
417
+ if (typeof opts.onUnblock == 'function')
418
+ opts.onUnblock(el,opts);
419
+ };
420
+
421
+ // bind/unbind the handler
422
+ function bind(b, el, opts) {
423
+ var full = el == window, $el = $(el);
424
+
425
+ // don't bother unbinding if there is nothing to unbind
426
+ if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
427
+ return;
428
+ if (!full)
429
+ $el.data('blockUI.isBlocked', b);
430
+
431
+ // don't bind events when overlay is not in use or if bindEvents is false
432
+ if (!opts.bindEvents || (b && !opts.showOverlay))
433
+ return;
434
+
435
+ // bind anchors and inputs for mouse and key events
436
+ var events = 'mousedown mouseup keydown keypress';
437
+ b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler);
438
+
439
+ // former impl...
440
+ // var $e = $('a,:input');
441
+ // b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
442
+ };
443
+
444
+ // event handler to suppress keyboard/mouse events when blocking
445
+ function handler(e) {
446
+ // allow tab navigation (conditionally)
447
+ if (e.keyCode && e.keyCode == 9) {
448
+ if (pageBlock && e.data.constrainTabKey) {
449
+ var els = pageBlockEls;
450
+ var fwd = !e.shiftKey && e.target == els[els.length-1];
451
+ var back = e.shiftKey && e.target == els[0];
452
+ if (fwd || back) {
453
+ setTimeout(function(){focus(back)},10);
454
+ return false;
455
+ }
456
+ }
457
+ }
458
+ // allow events within the message content
459
+ if ($(e.target).parents('div.blockMsg').length > 0)
460
+ return true;
461
+
462
+ // allow events for content that is not being blocked
463
+ return $(e.target).parents().children().filter('div.blockUI').length == 0;
464
+ };
465
+
466
+ function focus(back) {
467
+ if (!pageBlockEls)
468
+ return;
469
+ var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
470
+ if (e)
471
+ e.focus();
472
+ };
473
+
474
+ function center(el, x, y) {
475
+ var p = el.parentNode, s = el.style;
476
+ var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
477
+ var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
478
+ if (x) s.left = l > 0 ? (l+'px') : '0';
479
+ if (y) s.top = t > 0 ? (t+'px') : '0';
480
+ };
481
+
482
+ function sz(el, p) {
483
+ return parseInt($.css(el,p))||0;
484
+ };
485
+
486
+ })(jQuery);