pakunok 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. data/.gitignore +7 -0
  2. data/Gemfile +14 -0
  3. data/Gemfile.lock +98 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.md +168 -0
  6. data/Rakefile +37 -0
  7. data/lib/pakunok.rb +4 -0
  8. data/lib/pakunok/version.rb +5 -0
  9. data/lib/tasks/pakunok_tasks.rake +4 -0
  10. data/pakunok.gemspec +24 -0
  11. data/spec/colorpicker_spec.rb +18 -0
  12. data/spec/dummy/Rakefile +7 -0
  13. data/spec/dummy/app/assets/javascripts/application.js +10 -0
  14. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  15. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  16. data/spec/dummy/app/controllers/pages_controller.rb +2 -0
  17. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  18. data/spec/dummy/app/mailers/.gitkeep +0 -0
  19. data/spec/dummy/app/models/.gitkeep +0 -0
  20. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  21. data/spec/dummy/app/views/pages/index.html.erb +20 -0
  22. data/spec/dummy/config.ru +4 -0
  23. data/spec/dummy/config/application.rb +47 -0
  24. data/spec/dummy/config/boot.rb +10 -0
  25. data/spec/dummy/config/database.yml +25 -0
  26. data/spec/dummy/config/environment.rb +5 -0
  27. data/spec/dummy/config/environments/development.rb +27 -0
  28. data/spec/dummy/config/environments/production.rb +51 -0
  29. data/spec/dummy/config/environments/test.rb +39 -0
  30. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  31. data/spec/dummy/config/initializers/inflections.rb +10 -0
  32. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  33. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  34. data/spec/dummy/config/initializers/session_store.rb +8 -0
  35. data/spec/dummy/config/initializers/wrap_parameters.rb +12 -0
  36. data/spec/dummy/config/locales/en.yml +5 -0
  37. data/spec/dummy/config/routes.rb +60 -0
  38. data/spec/dummy/lib/assets/.gitkeep +0 -0
  39. data/spec/dummy/log/.gitkeep +0 -0
  40. data/spec/dummy/public/404.html +26 -0
  41. data/spec/dummy/public/422.html +26 -0
  42. data/spec/dummy/public/500.html +26 -0
  43. data/spec/dummy/public/favicon.ico +0 -0
  44. data/spec/dummy/script/rails +6 -0
  45. data/spec/fileuploader_spec.rb +29 -0
  46. data/spec/jquery-ui_spec.rb +71 -0
  47. data/spec/jquery_spec.rb +10 -0
  48. data/spec/misc_spec.rb +23 -0
  49. data/spec/spec_helper.rb +10 -0
  50. data/spec/support/global.rb +12 -0
  51. data/spec/support/matchers.rb +64 -0
  52. data/vendor/assets/images/pakunok/colorpicker/colorpicker_background.png +0 -0
  53. data/vendor/assets/images/pakunok/colorpicker/colorpicker_hex.png +0 -0
  54. data/vendor/assets/images/pakunok/colorpicker/colorpicker_hsb_b.png +0 -0
  55. data/vendor/assets/images/pakunok/colorpicker/colorpicker_hsb_h.png +0 -0
  56. data/vendor/assets/images/pakunok/colorpicker/colorpicker_hsb_s.png +0 -0
  57. data/vendor/assets/images/pakunok/colorpicker/colorpicker_indic.gif +0 -0
  58. data/vendor/assets/images/pakunok/colorpicker/colorpicker_overlay.png +0 -0
  59. data/vendor/assets/images/pakunok/colorpicker/colorpicker_rgb_b.png +0 -0
  60. data/vendor/assets/images/pakunok/colorpicker/colorpicker_rgb_g.png +0 -0
  61. data/vendor/assets/images/pakunok/colorpicker/colorpicker_rgb_r.png +0 -0
  62. data/vendor/assets/images/pakunok/colorpicker/colorpicker_select.gif +0 -0
  63. data/vendor/assets/images/pakunok/colorpicker/colorpicker_submit.png +0 -0
  64. data/vendor/assets/images/pakunok/fileuploader/loading.gif +0 -0
  65. data/vendor/assets/javascripts/pakunok/colorpicker.js +484 -0
  66. data/vendor/assets/javascripts/pakunok/fileuploader.js +1247 -0
  67. data/vendor/assets/javascripts/pakunok/innershiv.js +87 -0
  68. data/vendor/assets/javascripts/pakunok/jquery-ui.js +20 -0
  69. data/vendor/assets/javascripts/pakunok/jquery-ui/accordion.js +1 -0
  70. data/vendor/assets/javascripts/pakunok/jquery-ui/autocomplete.js +1 -0
  71. data/vendor/assets/javascripts/pakunok/jquery-ui/button.js +1 -0
  72. data/vendor/assets/javascripts/pakunok/jquery-ui/core.js +1 -0
  73. data/vendor/assets/javascripts/pakunok/jquery-ui/datepicker.js +1 -0
  74. data/vendor/assets/javascripts/pakunok/jquery-ui/dialog.js +1 -0
  75. data/vendor/assets/javascripts/pakunok/jquery-ui/draggable.js +1 -0
  76. data/vendor/assets/javascripts/pakunok/jquery-ui/droppable.js +1 -0
  77. data/vendor/assets/javascripts/pakunok/jquery-ui/effects.js +14 -0
  78. data/vendor/assets/javascripts/pakunok/jquery-ui/mouse.js +1 -0
  79. data/vendor/assets/javascripts/pakunok/jquery-ui/order.txt +485 -0
  80. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/accordion.js +4 -0
  81. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/autocomplete.js +5 -0
  82. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/basic.js +5 -0
  83. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/button.js +4 -0
  84. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/datepicker.js +3 -0
  85. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/dialog.js +8 -0
  86. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/draggable.js +5 -0
  87. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/droppable.js +3 -0
  88. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/effects.js +1 -0
  89. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/progressbar.js +4 -0
  90. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/resizable.js +5 -0
  91. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/selectable.js +5 -0
  92. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/slider.js +5 -0
  93. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/sortable.js +5 -0
  94. data/vendor/assets/javascripts/pakunok/jquery-ui/pack/tabs.js +4 -0
  95. data/vendor/assets/javascripts/pakunok/jquery-ui/position.js +1 -0
  96. data/vendor/assets/javascripts/pakunok/jquery-ui/progressbar.js +1 -0
  97. data/vendor/assets/javascripts/pakunok/jquery-ui/resizable.js +1 -0
  98. data/vendor/assets/javascripts/pakunok/jquery-ui/selectable.js +1 -0
  99. data/vendor/assets/javascripts/pakunok/jquery-ui/slider.js +1 -0
  100. data/vendor/assets/javascripts/pakunok/jquery-ui/sortable.js +1 -0
  101. data/vendor/assets/javascripts/pakunok/jquery-ui/tabs.js +1 -0
  102. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery-ui-i18n.js +1379 -0
  103. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-af.js +23 -0
  104. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-ar-DZ.js +23 -0
  105. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-ar.js +23 -0
  106. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-az.js +23 -0
  107. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-bg.js +24 -0
  108. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-bs.js +23 -0
  109. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-ca.js +23 -0
  110. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-cs.js +23 -0
  111. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-da.js +23 -0
  112. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-de.js +23 -0
  113. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-el.js +23 -0
  114. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-en-AU.js +23 -0
  115. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-en-GB.js +23 -0
  116. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-en-NZ.js +23 -0
  117. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-eo.js +23 -0
  118. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-es.js +23 -0
  119. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-et.js +23 -0
  120. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-eu.js +23 -0
  121. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-fa.js +23 -0
  122. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-fi.js +23 -0
  123. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-fo.js +23 -0
  124. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-fr-CH.js +23 -0
  125. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-fr.js +25 -0
  126. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-gl.js +23 -0
  127. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-he.js +23 -0
  128. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-hr.js +23 -0
  129. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-hu.js +23 -0
  130. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-hy.js +23 -0
  131. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-id.js +23 -0
  132. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-is.js +23 -0
  133. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-it.js +23 -0
  134. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-ja.js +23 -0
  135. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-ko.js +23 -0
  136. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-kz.js +23 -0
  137. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-lt.js +23 -0
  138. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-lv.js +23 -0
  139. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-ml.js +23 -0
  140. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-ms.js +23 -0
  141. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-nl.js +23 -0
  142. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-no.js +23 -0
  143. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-pl.js +23 -0
  144. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-pt-BR.js +23 -0
  145. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-pt.js +22 -0
  146. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-rm.js +21 -0
  147. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-ro.js +26 -0
  148. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-ru.js +23 -0
  149. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-sk.js +23 -0
  150. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-sl.js +24 -0
  151. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-sq.js +23 -0
  152. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-sr-SR.js +23 -0
  153. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-sr.js +23 -0
  154. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-sv.js +23 -0
  155. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-ta.js +23 -0
  156. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-th.js +23 -0
  157. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-tj.js +23 -0
  158. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-tr.js +23 -0
  159. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-uk.js +23 -0
  160. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-vi.js +23 -0
  161. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-zh-CN.js +23 -0
  162. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-zh-HK.js +23 -0
  163. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/i18n/jquery.ui.datepicker-zh-TW.js +23 -0
  164. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.blind.js +49 -0
  165. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.bounce.js +78 -0
  166. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.clip.js +54 -0
  167. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.core.js +746 -0
  168. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.drop.js +50 -0
  169. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.explode.js +79 -0
  170. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.fade.js +32 -0
  171. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.fold.js +56 -0
  172. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.highlight.js +50 -0
  173. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.pulsate.js +51 -0
  174. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.scale.js +178 -0
  175. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.shake.js +57 -0
  176. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.slide.js +50 -0
  177. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.effects.transfer.js +45 -0
  178. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.accordion.js +611 -0
  179. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.autocomplete.js +612 -0
  180. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.button.js +416 -0
  181. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.core.js +314 -0
  182. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.datepicker.js +1824 -0
  183. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.dialog.js +878 -0
  184. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.draggable.js +823 -0
  185. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.droppable.js +296 -0
  186. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.mouse.js +156 -0
  187. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.position.js +252 -0
  188. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.progressbar.js +109 -0
  189. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.resizable.js +842 -0
  190. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.selectable.js +266 -0
  191. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.slider.js +666 -0
  192. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.sortable.js +1077 -0
  193. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.tabs.js +758 -0
  194. data/vendor/assets/javascripts/pakunok/jquery-ui/ui/jquery.ui.widget.js +262 -0
  195. data/vendor/assets/javascripts/pakunok/jquery-ui/widget.js +1 -0
  196. data/vendor/assets/javascripts/pakunok/jquery.form.js +911 -0
  197. data/vendor/assets/javascripts/pakunok/jquery.js +1 -0
  198. data/vendor/assets/javascripts/pakunok/jquery.jscrollpane.js +1390 -0
  199. data/vendor/assets/javascripts/pakunok/jquery.mousewheel.js +78 -0
  200. data/vendor/assets/javascripts/pakunok/jquery.validate.js +1166 -0
  201. data/vendor/assets/javascripts/pakunok/jquery.validate/additional-methods.js +280 -0
  202. data/vendor/assets/javascripts/pakunok/jquery.viewport.js +58 -0
  203. data/vendor/assets/javascripts/pakunok/jquery/jquery-1.5.2.js +8374 -0
  204. data/vendor/assets/javascripts/pakunok/jquery/jquery-1.6.2.js +8981 -0
  205. data/vendor/assets/javascripts/pakunok/mwheelIntent.js +76 -0
  206. data/vendor/assets/stylesheets/pakunok/colorpicker.css.erb +161 -0
  207. data/vendor/assets/stylesheets/pakunok/fileuploader.css.erb +31 -0
  208. data/vendor/assets/stylesheets/pakunok/jquery.jscrollpane.css +120 -0
  209. metadata +292 -0
@@ -0,0 +1,23 @@
1
+ /* Vietnamese initialisation for the jQuery UI date picker plugin. */
2
+ /* Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['vi'] = {
5
+ closeText: 'Đóng',
6
+ prevText: '<Trước',
7
+ nextText: 'Tiếp>',
8
+ currentText: 'Hôm nay',
9
+ monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu',
10
+ 'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'],
11
+ monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6',
12
+ 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
13
+ dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
14
+ dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
15
+ dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
16
+ weekHeader: 'Tu',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['vi']);
23
+ });
@@ -0,0 +1,23 @@
1
+ /* Chinese initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Cloudream (cloudream@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['zh-CN'] = {
5
+ closeText: '关闭',
6
+ prevText: '<上月',
7
+ nextText: '下月>',
8
+ currentText: '今天',
9
+ monthNames: ['一月','二月','三月','四月','五月','六月',
10
+ '七月','八月','九月','十月','十一月','十二月'],
11
+ monthNamesShort: ['一','二','三','四','五','六',
12
+ '七','八','九','十','十一','十二'],
13
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
14
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
15
+ dayNamesMin: ['日','一','二','三','四','五','六'],
16
+ weekHeader: '周',
17
+ dateFormat: 'yy-mm-dd',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: true,
21
+ yearSuffix: '年'};
22
+ $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
23
+ });
@@ -0,0 +1,23 @@
1
+ /* Chinese initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by SCCY (samuelcychan@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['zh-HK'] = {
5
+ closeText: '關閉',
6
+ prevText: '<上月',
7
+ nextText: '下月>',
8
+ currentText: '今天',
9
+ monthNames: ['一月','二月','三月','四月','五月','六月',
10
+ '七月','八月','九月','十月','十一月','十二月'],
11
+ monthNamesShort: ['一','二','三','四','五','六',
12
+ '七','八','九','十','十一','十二'],
13
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
14
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
15
+ dayNamesMin: ['日','一','二','三','四','五','六'],
16
+ weekHeader: '周',
17
+ dateFormat: 'dd-mm-yy',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: true,
21
+ yearSuffix: '年'};
22
+ $.datepicker.setDefaults($.datepicker.regional['zh-HK']);
23
+ });
@@ -0,0 +1,23 @@
1
+ /* Chinese initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Ressol (ressol@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['zh-TW'] = {
5
+ closeText: '關閉',
6
+ prevText: '<上月',
7
+ nextText: '下月>',
8
+ currentText: '今天',
9
+ monthNames: ['一月','二月','三月','四月','五月','六月',
10
+ '七月','八月','九月','十月','十一月','十二月'],
11
+ monthNamesShort: ['一','二','三','四','五','六',
12
+ '七','八','九','十','十一','十二'],
13
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
14
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
15
+ dayNamesMin: ['日','一','二','三','四','五','六'],
16
+ weekHeader: '周',
17
+ dateFormat: 'yy/mm/dd',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: true,
21
+ yearSuffix: '年'};
22
+ $.datepicker.setDefaults($.datepicker.regional['zh-TW']);
23
+ });
@@ -0,0 +1,49 @@
1
+ /*
2
+ * jQuery UI Effects Blind 1.8.15
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Effects/Blind
9
+ *
10
+ * Depends:
11
+ * jquery.effects.core.js
12
+ */
13
+ (function( $, undefined ) {
14
+
15
+ $.effects.blind = function(o) {
16
+
17
+ return this.queue(function() {
18
+
19
+ // Create element
20
+ var el = $(this), props = ['position','top','bottom','left','right'];
21
+
22
+ // Set options
23
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
24
+ var direction = o.options.direction || 'vertical'; // Default direction
25
+
26
+ // Adjust
27
+ $.effects.save(el, props); el.show(); // Save & Show
28
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
29
+ var ref = (direction == 'vertical') ? 'height' : 'width';
30
+ var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
31
+ if(mode == 'show') wrapper.css(ref, 0); // Shift
32
+
33
+ // Animation
34
+ var animation = {};
35
+ animation[ref] = mode == 'show' ? distance : 0;
36
+
37
+ // Animate
38
+ wrapper.animate(animation, o.duration, o.options.easing, function() {
39
+ if(mode == 'hide') el.hide(); // Hide
40
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
41
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
42
+ el.dequeue();
43
+ });
44
+
45
+ });
46
+
47
+ };
48
+
49
+ })(jQuery);
@@ -0,0 +1,78 @@
1
+ /*
2
+ * jQuery UI Effects Bounce 1.8.15
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Effects/Bounce
9
+ *
10
+ * Depends:
11
+ * jquery.effects.core.js
12
+ */
13
+ (function( $, undefined ) {
14
+
15
+ $.effects.bounce = function(o) {
16
+
17
+ return this.queue(function() {
18
+
19
+ // Create element
20
+ var el = $(this), props = ['position','top','bottom','left','right'];
21
+
22
+ // Set options
23
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
24
+ var direction = o.options.direction || 'up'; // Default direction
25
+ var distance = o.options.distance || 20; // Default distance
26
+ var times = o.options.times || 5; // Default # of times
27
+ var speed = o.duration || 250; // Default speed per bounce
28
+ if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE
29
+
30
+ // Adjust
31
+ $.effects.save(el, props); el.show(); // Save & Show
32
+ $.effects.createWrapper(el); // Create Wrapper
33
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
34
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
35
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 3 : el.outerWidth({margin:true}) / 3);
36
+ if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
37
+ if (mode == 'hide') distance = distance / (times * 2);
38
+ if (mode != 'hide') times--;
39
+
40
+ // Animate
41
+ if (mode == 'show') { // Show Bounce
42
+ var animation = {opacity: 1};
43
+ animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
44
+ el.animate(animation, speed / 2, o.options.easing);
45
+ distance = distance / 2;
46
+ times--;
47
+ };
48
+ for (var i = 0; i < times; i++) { // Bounces
49
+ var animation1 = {}, animation2 = {};
50
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
51
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
52
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing);
53
+ distance = (mode == 'hide') ? distance * 2 : distance / 2;
54
+ };
55
+ if (mode == 'hide') { // Last Bounce
56
+ var animation = {opacity: 0};
57
+ animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
58
+ el.animate(animation, speed / 2, o.options.easing, function(){
59
+ el.hide(); // Hide
60
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
61
+ if(o.callback) o.callback.apply(this, arguments); // Callback
62
+ });
63
+ } else {
64
+ var animation1 = {}, animation2 = {};
65
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
66
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
67
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){
68
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
69
+ if(o.callback) o.callback.apply(this, arguments); // Callback
70
+ });
71
+ };
72
+ el.queue('fx', function() { el.dequeue(); });
73
+ el.dequeue();
74
+ });
75
+
76
+ };
77
+
78
+ })(jQuery);
@@ -0,0 +1,54 @@
1
+ /*
2
+ * jQuery UI Effects Clip 1.8.15
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Effects/Clip
9
+ *
10
+ * Depends:
11
+ * jquery.effects.core.js
12
+ */
13
+ (function( $, undefined ) {
14
+
15
+ $.effects.clip = function(o) {
16
+
17
+ return this.queue(function() {
18
+
19
+ // Create element
20
+ var el = $(this), props = ['position','top','bottom','left','right','height','width'];
21
+
22
+ // Set options
23
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
24
+ var direction = o.options.direction || 'vertical'; // Default direction
25
+
26
+ // Adjust
27
+ $.effects.save(el, props); el.show(); // Save & Show
28
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
29
+ var animate = el[0].tagName == 'IMG' ? wrapper : el;
30
+ var ref = {
31
+ size: (direction == 'vertical') ? 'height' : 'width',
32
+ position: (direction == 'vertical') ? 'top' : 'left'
33
+ };
34
+ var distance = (direction == 'vertical') ? animate.height() : animate.width();
35
+ if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
36
+
37
+ // Animation
38
+ var animation = {};
39
+ animation[ref.size] = mode == 'show' ? distance : 0;
40
+ animation[ref.position] = mode == 'show' ? 0 : distance / 2;
41
+
42
+ // Animate
43
+ animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
44
+ if(mode == 'hide') el.hide(); // Hide
45
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
46
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
47
+ el.dequeue();
48
+ }});
49
+
50
+ });
51
+
52
+ };
53
+
54
+ })(jQuery);
@@ -0,0 +1,746 @@
1
+ /*
2
+ * jQuery UI Effects 1.8.15
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Effects/
9
+ */
10
+ ;jQuery.effects || (function($, undefined) {
11
+
12
+ $.effects = {};
13
+
14
+
15
+
16
+ /******************************************************************************/
17
+ /****************************** COLOR ANIMATIONS ******************************/
18
+ /******************************************************************************/
19
+
20
+ // override the animation for color styles
21
+ $.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
22
+ 'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'],
23
+ function(i, attr) {
24
+ $.fx.step[attr] = function(fx) {
25
+ if (!fx.colorInit) {
26
+ fx.start = getColor(fx.elem, attr);
27
+ fx.end = getRGB(fx.end);
28
+ fx.colorInit = true;
29
+ }
30
+
31
+ fx.elem.style[attr] = 'rgb(' +
32
+ Math.max(Math.min(parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0], 10), 255), 0) + ',' +
33
+ Math.max(Math.min(parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1], 10), 255), 0) + ',' +
34
+ Math.max(Math.min(parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2], 10), 255), 0) + ')';
35
+ };
36
+ });
37
+
38
+ // Color Conversion functions from highlightFade
39
+ // By Blair Mitchelmore
40
+ // http://jquery.offput.ca/highlightFade/
41
+
42
+ // Parse strings looking for color tuples [255,255,255]
43
+ function getRGB(color) {
44
+ var result;
45
+
46
+ // Check if we're already dealing with an array of colors
47
+ if ( color && color.constructor == Array && color.length == 3 )
48
+ return color;
49
+
50
+ // Look for rgb(num,num,num)
51
+ if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
52
+ return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];
53
+
54
+ // Look for rgb(num%,num%,num%)
55
+ if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
56
+ return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
57
+
58
+ // Look for #a0b1c2
59
+ if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
60
+ return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
61
+
62
+ // Look for #fff
63
+ if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
64
+ return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
65
+
66
+ // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
67
+ if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
68
+ return colors['transparent'];
69
+
70
+ // Otherwise, we're most likely dealing with a named color
71
+ return colors[$.trim(color).toLowerCase()];
72
+ }
73
+
74
+ function getColor(elem, attr) {
75
+ var color;
76
+
77
+ do {
78
+ color = $.curCSS(elem, attr);
79
+
80
+ // Keep going until we find an element that has color, or we hit the body
81
+ if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )
82
+ break;
83
+
84
+ attr = "backgroundColor";
85
+ } while ( elem = elem.parentNode );
86
+
87
+ return getRGB(color);
88
+ };
89
+
90
+ // Some named colors to work with
91
+ // From Interface by Stefan Petre
92
+ // http://interface.eyecon.ro/
93
+
94
+ var colors = {
95
+ aqua:[0,255,255],
96
+ azure:[240,255,255],
97
+ beige:[245,245,220],
98
+ black:[0,0,0],
99
+ blue:[0,0,255],
100
+ brown:[165,42,42],
101
+ cyan:[0,255,255],
102
+ darkblue:[0,0,139],
103
+ darkcyan:[0,139,139],
104
+ darkgrey:[169,169,169],
105
+ darkgreen:[0,100,0],
106
+ darkkhaki:[189,183,107],
107
+ darkmagenta:[139,0,139],
108
+ darkolivegreen:[85,107,47],
109
+ darkorange:[255,140,0],
110
+ darkorchid:[153,50,204],
111
+ darkred:[139,0,0],
112
+ darksalmon:[233,150,122],
113
+ darkviolet:[148,0,211],
114
+ fuchsia:[255,0,255],
115
+ gold:[255,215,0],
116
+ green:[0,128,0],
117
+ indigo:[75,0,130],
118
+ khaki:[240,230,140],
119
+ lightblue:[173,216,230],
120
+ lightcyan:[224,255,255],
121
+ lightgreen:[144,238,144],
122
+ lightgrey:[211,211,211],
123
+ lightpink:[255,182,193],
124
+ lightyellow:[255,255,224],
125
+ lime:[0,255,0],
126
+ magenta:[255,0,255],
127
+ maroon:[128,0,0],
128
+ navy:[0,0,128],
129
+ olive:[128,128,0],
130
+ orange:[255,165,0],
131
+ pink:[255,192,203],
132
+ purple:[128,0,128],
133
+ violet:[128,0,128],
134
+ red:[255,0,0],
135
+ silver:[192,192,192],
136
+ white:[255,255,255],
137
+ yellow:[255,255,0],
138
+ transparent: [255,255,255]
139
+ };
140
+
141
+
142
+
143
+ /******************************************************************************/
144
+ /****************************** CLASS ANIMATIONS ******************************/
145
+ /******************************************************************************/
146
+
147
+ var classAnimationActions = ['add', 'remove', 'toggle'],
148
+ shorthandStyles = {
149
+ border: 1,
150
+ borderBottom: 1,
151
+ borderColor: 1,
152
+ borderLeft: 1,
153
+ borderRight: 1,
154
+ borderTop: 1,
155
+ borderWidth: 1,
156
+ margin: 1,
157
+ padding: 1
158
+ };
159
+
160
+ function getElementStyles() {
161
+ var style = document.defaultView
162
+ ? document.defaultView.getComputedStyle(this, null)
163
+ : this.currentStyle,
164
+ newStyle = {},
165
+ key,
166
+ camelCase;
167
+
168
+ // webkit enumerates style porperties
169
+ if (style && style.length && style[0] && style[style[0]]) {
170
+ var len = style.length;
171
+ while (len--) {
172
+ key = style[len];
173
+ if (typeof style[key] == 'string') {
174
+ camelCase = key.replace(/\-(\w)/g, function(all, letter){
175
+ return letter.toUpperCase();
176
+ });
177
+ newStyle[camelCase] = style[key];
178
+ }
179
+ }
180
+ } else {
181
+ for (key in style) {
182
+ if (typeof style[key] === 'string') {
183
+ newStyle[key] = style[key];
184
+ }
185
+ }
186
+ }
187
+
188
+ return newStyle;
189
+ }
190
+
191
+ function filterStyles(styles) {
192
+ var name, value;
193
+ for (name in styles) {
194
+ value = styles[name];
195
+ if (
196
+ // ignore null and undefined values
197
+ value == null ||
198
+ // ignore functions (when does this occur?)
199
+ $.isFunction(value) ||
200
+ // shorthand styles that need to be expanded
201
+ name in shorthandStyles ||
202
+ // ignore scrollbars (break in IE)
203
+ (/scrollbar/).test(name) ||
204
+
205
+ // only colors or values that can be converted to numbers
206
+ (!(/color/i).test(name) && isNaN(parseFloat(value)))
207
+ ) {
208
+ delete styles[name];
209
+ }
210
+ }
211
+
212
+ return styles;
213
+ }
214
+
215
+ function styleDifference(oldStyle, newStyle) {
216
+ var diff = { _: 0 }, // http://dev.jquery.com/ticket/5459
217
+ name;
218
+
219
+ for (name in newStyle) {
220
+ if (oldStyle[name] != newStyle[name]) {
221
+ diff[name] = newStyle[name];
222
+ }
223
+ }
224
+
225
+ return diff;
226
+ }
227
+
228
+ $.effects.animateClass = function(value, duration, easing, callback) {
229
+ if ($.isFunction(easing)) {
230
+ callback = easing;
231
+ easing = null;
232
+ }
233
+
234
+ return this.queue(function() {
235
+ var that = $(this),
236
+ originalStyleAttr = that.attr('style') || ' ',
237
+ originalStyle = filterStyles(getElementStyles.call(this)),
238
+ newStyle,
239
+ className = that.attr('class');
240
+
241
+ $.each(classAnimationActions, function(i, action) {
242
+ if (value[action]) {
243
+ that[action + 'Class'](value[action]);
244
+ }
245
+ });
246
+ newStyle = filterStyles(getElementStyles.call(this));
247
+ that.attr('class', className);
248
+
249
+ that.animate(styleDifference(originalStyle, newStyle), {
250
+ queue: false,
251
+ duration: duration,
252
+ easing: easing,
253
+ complete: function() {
254
+ $.each(classAnimationActions, function(i, action) {
255
+ if (value[action]) { that[action + 'Class'](value[action]); }
256
+ });
257
+ // work around bug in IE by clearing the cssText before setting it
258
+ if (typeof that.attr('style') == 'object') {
259
+ that.attr('style').cssText = '';
260
+ that.attr('style').cssText = originalStyleAttr;
261
+ } else {
262
+ that.attr('style', originalStyleAttr);
263
+ }
264
+ if (callback) { callback.apply(this, arguments); }
265
+ $.dequeue( this );
266
+ }
267
+ });
268
+ });
269
+ };
270
+
271
+ $.fn.extend({
272
+ _addClass: $.fn.addClass,
273
+ addClass: function(classNames, speed, easing, callback) {
274
+ return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
275
+ },
276
+
277
+ _removeClass: $.fn.removeClass,
278
+ removeClass: function(classNames,speed,easing,callback) {
279
+ return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
280
+ },
281
+
282
+ _toggleClass: $.fn.toggleClass,
283
+ toggleClass: function(classNames, force, speed, easing, callback) {
284
+ if ( typeof force == "boolean" || force === undefined ) {
285
+ if ( !speed ) {
286
+ // without speed parameter;
287
+ return this._toggleClass(classNames, force);
288
+ } else {
289
+ return $.effects.animateClass.apply(this, [(force?{add:classNames}:{remove:classNames}),speed,easing,callback]);
290
+ }
291
+ } else {
292
+ // without switch parameter;
293
+ return $.effects.animateClass.apply(this, [{ toggle: classNames },force,speed,easing]);
294
+ }
295
+ },
296
+
297
+ switchClass: function(remove,add,speed,easing,callback) {
298
+ return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
299
+ }
300
+ });
301
+
302
+
303
+
304
+ /******************************************************************************/
305
+ /*********************************** EFFECTS **********************************/
306
+ /******************************************************************************/
307
+
308
+ $.extend($.effects, {
309
+ version: "1.8.15",
310
+
311
+ // Saves a set of properties in a data storage
312
+ save: function(element, set) {
313
+ for(var i=0; i < set.length; i++) {
314
+ if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);
315
+ }
316
+ },
317
+
318
+ // Restores a set of previously saved properties from a data storage
319
+ restore: function(element, set) {
320
+ for(var i=0; i < set.length; i++) {
321
+ if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));
322
+ }
323
+ },
324
+
325
+ setMode: function(el, mode) {
326
+ if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
327
+ return mode;
328
+ },
329
+
330
+ getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
331
+ // this should be a little more flexible in the future to handle a string & hash
332
+ var y, x;
333
+ switch (origin[0]) {
334
+ case 'top': y = 0; break;
335
+ case 'middle': y = 0.5; break;
336
+ case 'bottom': y = 1; break;
337
+ default: y = origin[0] / original.height;
338
+ };
339
+ switch (origin[1]) {
340
+ case 'left': x = 0; break;
341
+ case 'center': x = 0.5; break;
342
+ case 'right': x = 1; break;
343
+ default: x = origin[1] / original.width;
344
+ };
345
+ return {x: x, y: y};
346
+ },
347
+
348
+ // Wraps the element around a wrapper that copies position properties
349
+ createWrapper: function(element) {
350
+
351
+ // if the element is already wrapped, return it
352
+ if (element.parent().is('.ui-effects-wrapper')) {
353
+ return element.parent();
354
+ }
355
+
356
+ // wrap the element
357
+ var props = {
358
+ width: element.outerWidth(true),
359
+ height: element.outerHeight(true),
360
+ 'float': element.css('float')
361
+ },
362
+ wrapper = $('<div></div>')
363
+ .addClass('ui-effects-wrapper')
364
+ .css({
365
+ fontSize: '100%',
366
+ background: 'transparent',
367
+ border: 'none',
368
+ margin: 0,
369
+ padding: 0
370
+ });
371
+
372
+ element.wrap(wrapper);
373
+ wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
374
+
375
+ // transfer positioning properties to the wrapper
376
+ if (element.css('position') == 'static') {
377
+ wrapper.css({ position: 'relative' });
378
+ element.css({ position: 'relative' });
379
+ } else {
380
+ $.extend(props, {
381
+ position: element.css('position'),
382
+ zIndex: element.css('z-index')
383
+ });
384
+ $.each(['top', 'left', 'bottom', 'right'], function(i, pos) {
385
+ props[pos] = element.css(pos);
386
+ if (isNaN(parseInt(props[pos], 10))) {
387
+ props[pos] = 'auto';
388
+ }
389
+ });
390
+ element.css({position: 'relative', top: 0, left: 0, right: 'auto', bottom: 'auto' });
391
+ }
392
+
393
+ return wrapper.css(props).show();
394
+ },
395
+
396
+ removeWrapper: function(element) {
397
+ if (element.parent().is('.ui-effects-wrapper'))
398
+ return element.parent().replaceWith(element);
399
+ return element;
400
+ },
401
+
402
+ setTransition: function(element, list, factor, value) {
403
+ value = value || {};
404
+ $.each(list, function(i, x){
405
+ unit = element.cssUnit(x);
406
+ if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];
407
+ });
408
+ return value;
409
+ }
410
+ });
411
+
412
+
413
+ function _normalizeArguments(effect, options, speed, callback) {
414
+ // shift params for method overloading
415
+ if (typeof effect == 'object') {
416
+ callback = options;
417
+ speed = null;
418
+ options = effect;
419
+ effect = options.effect;
420
+ }
421
+ if ($.isFunction(options)) {
422
+ callback = options;
423
+ speed = null;
424
+ options = {};
425
+ }
426
+ if (typeof options == 'number' || $.fx.speeds[options]) {
427
+ callback = speed;
428
+ speed = options;
429
+ options = {};
430
+ }
431
+ if ($.isFunction(speed)) {
432
+ callback = speed;
433
+ speed = null;
434
+ }
435
+
436
+ options = options || {};
437
+
438
+ speed = speed || options.duration;
439
+ speed = $.fx.off ? 0 : typeof speed == 'number'
440
+ ? speed : speed in $.fx.speeds ? $.fx.speeds[speed] : $.fx.speeds._default;
441
+
442
+ callback = callback || options.complete;
443
+
444
+ return [effect, options, speed, callback];
445
+ }
446
+
447
+ function standardSpeed( speed ) {
448
+ // valid standard speeds
449
+ if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
450
+ return true;
451
+ }
452
+
453
+ // invalid strings - treat as "normal" speed
454
+ if ( typeof speed === "string" && !$.effects[ speed ] ) {
455
+ return true;
456
+ }
457
+
458
+ return false;
459
+ }
460
+
461
+ $.fn.extend({
462
+ effect: function(effect, options, speed, callback) {
463
+ var args = _normalizeArguments.apply(this, arguments),
464
+ // TODO: make effects take actual parameters instead of a hash
465
+ args2 = {
466
+ options: args[1],
467
+ duration: args[2],
468
+ callback: args[3]
469
+ },
470
+ mode = args2.options.mode,
471
+ effectMethod = $.effects[effect];
472
+
473
+ if ( $.fx.off || !effectMethod ) {
474
+ // delegate to the original method (e.g., .show()) if possible
475
+ if ( mode ) {
476
+ return this[ mode ]( args2.duration, args2.callback );
477
+ } else {
478
+ return this.each(function() {
479
+ if ( args2.callback ) {
480
+ args2.callback.call( this );
481
+ }
482
+ });
483
+ }
484
+ }
485
+
486
+ return effectMethod.call(this, args2);
487
+ },
488
+
489
+ _show: $.fn.show,
490
+ show: function(speed) {
491
+ if ( standardSpeed( speed ) ) {
492
+ return this._show.apply(this, arguments);
493
+ } else {
494
+ var args = _normalizeArguments.apply(this, arguments);
495
+ args[1].mode = 'show';
496
+ return this.effect.apply(this, args);
497
+ }
498
+ },
499
+
500
+ _hide: $.fn.hide,
501
+ hide: function(speed) {
502
+ if ( standardSpeed( speed ) ) {
503
+ return this._hide.apply(this, arguments);
504
+ } else {
505
+ var args = _normalizeArguments.apply(this, arguments);
506
+ args[1].mode = 'hide';
507
+ return this.effect.apply(this, args);
508
+ }
509
+ },
510
+
511
+ // jQuery core overloads toggle and creates _toggle
512
+ __toggle: $.fn.toggle,
513
+ toggle: function(speed) {
514
+ if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
515
+ return this.__toggle.apply(this, arguments);
516
+ } else {
517
+ var args = _normalizeArguments.apply(this, arguments);
518
+ args[1].mode = 'toggle';
519
+ return this.effect.apply(this, args);
520
+ }
521
+ },
522
+
523
+ // helper functions
524
+ cssUnit: function(key) {
525
+ var style = this.css(key), val = [];
526
+ $.each( ['em','px','%','pt'], function(i, unit){
527
+ if(style.indexOf(unit) > 0)
528
+ val = [parseFloat(style), unit];
529
+ });
530
+ return val;
531
+ }
532
+ });
533
+
534
+
535
+
536
+ /******************************************************************************/
537
+ /*********************************** EASING ***********************************/
538
+ /******************************************************************************/
539
+
540
+ /*
541
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
542
+ *
543
+ * Uses the built in easing capabilities added In jQuery 1.1
544
+ * to offer multiple easing options
545
+ *
546
+ * TERMS OF USE - jQuery Easing
547
+ *
548
+ * Open source under the BSD License.
549
+ *
550
+ * Copyright 2008 George McGinley Smith
551
+ * All rights reserved.
552
+ *
553
+ * Redistribution and use in source and binary forms, with or without modification,
554
+ * are permitted provided that the following conditions are met:
555
+ *
556
+ * Redistributions of source code must retain the above copyright notice, this list of
557
+ * conditions and the following disclaimer.
558
+ * Redistributions in binary form must reproduce the above copyright notice, this list
559
+ * of conditions and the following disclaimer in the documentation and/or other materials
560
+ * provided with the distribution.
561
+ *
562
+ * Neither the name of the author nor the names of contributors may be used to endorse
563
+ * or promote products derived from this software without specific prior written permission.
564
+ *
565
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
566
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
567
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
568
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
569
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
570
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
571
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
572
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
573
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
574
+ *
575
+ */
576
+
577
+ // t: current time, b: begInnIng value, c: change In value, d: duration
578
+ $.easing.jswing = $.easing.swing;
579
+
580
+ $.extend($.easing,
581
+ {
582
+ def: 'easeOutQuad',
583
+ swing: function (x, t, b, c, d) {
584
+ //alert($.easing.default);
585
+ return $.easing[$.easing.def](x, t, b, c, d);
586
+ },
587
+ easeInQuad: function (x, t, b, c, d) {
588
+ return c*(t/=d)*t + b;
589
+ },
590
+ easeOutQuad: function (x, t, b, c, d) {
591
+ return -c *(t/=d)*(t-2) + b;
592
+ },
593
+ easeInOutQuad: function (x, t, b, c, d) {
594
+ if ((t/=d/2) < 1) return c/2*t*t + b;
595
+ return -c/2 * ((--t)*(t-2) - 1) + b;
596
+ },
597
+ easeInCubic: function (x, t, b, c, d) {
598
+ return c*(t/=d)*t*t + b;
599
+ },
600
+ easeOutCubic: function (x, t, b, c, d) {
601
+ return c*((t=t/d-1)*t*t + 1) + b;
602
+ },
603
+ easeInOutCubic: function (x, t, b, c, d) {
604
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
605
+ return c/2*((t-=2)*t*t + 2) + b;
606
+ },
607
+ easeInQuart: function (x, t, b, c, d) {
608
+ return c*(t/=d)*t*t*t + b;
609
+ },
610
+ easeOutQuart: function (x, t, b, c, d) {
611
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
612
+ },
613
+ easeInOutQuart: function (x, t, b, c, d) {
614
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
615
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
616
+ },
617
+ easeInQuint: function (x, t, b, c, d) {
618
+ return c*(t/=d)*t*t*t*t + b;
619
+ },
620
+ easeOutQuint: function (x, t, b, c, d) {
621
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
622
+ },
623
+ easeInOutQuint: function (x, t, b, c, d) {
624
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
625
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
626
+ },
627
+ easeInSine: function (x, t, b, c, d) {
628
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
629
+ },
630
+ easeOutSine: function (x, t, b, c, d) {
631
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
632
+ },
633
+ easeInOutSine: function (x, t, b, c, d) {
634
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
635
+ },
636
+ easeInExpo: function (x, t, b, c, d) {
637
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
638
+ },
639
+ easeOutExpo: function (x, t, b, c, d) {
640
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
641
+ },
642
+ easeInOutExpo: function (x, t, b, c, d) {
643
+ if (t==0) return b;
644
+ if (t==d) return b+c;
645
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
646
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
647
+ },
648
+ easeInCirc: function (x, t, b, c, d) {
649
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
650
+ },
651
+ easeOutCirc: function (x, t, b, c, d) {
652
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
653
+ },
654
+ easeInOutCirc: function (x, t, b, c, d) {
655
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
656
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
657
+ },
658
+ easeInElastic: function (x, t, b, c, d) {
659
+ var s=1.70158;var p=0;var a=c;
660
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
661
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
662
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
663
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
664
+ },
665
+ easeOutElastic: function (x, t, b, c, d) {
666
+ var s=1.70158;var p=0;var a=c;
667
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
668
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
669
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
670
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
671
+ },
672
+ easeInOutElastic: function (x, t, b, c, d) {
673
+ var s=1.70158;var p=0;var a=c;
674
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
675
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
676
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
677
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
678
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
679
+ },
680
+ easeInBack: function (x, t, b, c, d, s) {
681
+ if (s == undefined) s = 1.70158;
682
+ return c*(t/=d)*t*((s+1)*t - s) + b;
683
+ },
684
+ easeOutBack: function (x, t, b, c, d, s) {
685
+ if (s == undefined) s = 1.70158;
686
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
687
+ },
688
+ easeInOutBack: function (x, t, b, c, d, s) {
689
+ if (s == undefined) s = 1.70158;
690
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
691
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
692
+ },
693
+ easeInBounce: function (x, t, b, c, d) {
694
+ return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;
695
+ },
696
+ easeOutBounce: function (x, t, b, c, d) {
697
+ if ((t/=d) < (1/2.75)) {
698
+ return c*(7.5625*t*t) + b;
699
+ } else if (t < (2/2.75)) {
700
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
701
+ } else if (t < (2.5/2.75)) {
702
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
703
+ } else {
704
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
705
+ }
706
+ },
707
+ easeInOutBounce: function (x, t, b, c, d) {
708
+ if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
709
+ return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
710
+ }
711
+ });
712
+
713
+ /*
714
+ *
715
+ * TERMS OF USE - EASING EQUATIONS
716
+ *
717
+ * Open source under the BSD License.
718
+ *
719
+ * Copyright 2001 Robert Penner
720
+ * All rights reserved.
721
+ *
722
+ * Redistribution and use in source and binary forms, with or without modification,
723
+ * are permitted provided that the following conditions are met:
724
+ *
725
+ * Redistributions of source code must retain the above copyright notice, this list of
726
+ * conditions and the following disclaimer.
727
+ * Redistributions in binary form must reproduce the above copyright notice, this list
728
+ * of conditions and the following disclaimer in the documentation and/or other materials
729
+ * provided with the distribution.
730
+ *
731
+ * Neither the name of the author nor the names of contributors may be used to endorse
732
+ * or promote products derived from this software without specific prior written permission.
733
+ *
734
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
735
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
736
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
737
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
738
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
739
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
740
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
741
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
742
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
743
+ *
744
+ */
745
+
746
+ })(jQuery);