spiderfw 0.6.27 → 0.6.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. data/CHANGELOG +4 -0
  2. data/VERSION +1 -1
  3. data/apps/core/admin/admin.rb +6 -2
  4. data/apps/core/admin/controllers/admin_controller.rb +10 -3
  5. data/apps/core/admin/controllers/app_admin_controller.rb +15 -0
  6. data/apps/core/admin/public/css/sass/admin.css +29 -33
  7. data/apps/core/admin/public/css/sass/grid.css +14 -0
  8. data/apps/core/admin/public/sass/admin.scss +3 -2
  9. data/apps/core/admin/views/admin.layout.shtml +1 -0
  10. data/apps/core/auth/controllers/mixins/auth_helper.rb +15 -5
  11. data/apps/core/components/assets.rb +60 -41
  12. data/apps/core/components/public/js/jquery/jquery-1.8.3.js +9472 -0
  13. data/apps/core/components/public/js/jquery/jquery-ui-1.8.11/ui/jquery.ui.core.js +1 -1
  14. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/button_bg.png +0 -0
  15. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/datepicker.gif +0 -0
  16. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/icon_sprite.png +0 -0
  17. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/progress_bar.gif +0 -0
  18. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/slider_h_bg.gif +0 -0
  19. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/slider_handles.png +0 -0
  20. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/slider_v_bg.gif +0 -0
  21. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/tab_bg.gif +0 -0
  22. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/the_gradient.gif +0 -0
  23. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-anim_basic_16x16.gif +0 -0
  24. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  25. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  26. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-bg_flat_10_000000_40x100.png +0 -0
  27. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  28. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  29. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  30. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  31. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  32. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  33. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-icons_222222_256x240.png +0 -0
  34. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-icons_228ef1_256x240.png +0 -0
  35. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-icons_ef8c08_256x240.png +0 -0
  36. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-icons_ffd27a_256x240.png +0 -0
  37. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/images/ui-icons_ffffff_256x240.png +0 -0
  38. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/css/Aristo/jquery-ui.custom.css +528 -0
  39. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-af.js +23 -0
  40. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ar-DZ.js +23 -0
  41. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ar.js +23 -0
  42. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-az.js +23 -0
  43. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-be.js +23 -0
  44. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-bg.js +24 -0
  45. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-bs.js +23 -0
  46. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ca.js +23 -0
  47. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-cs.js +23 -0
  48. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-cy-GB.js +23 -0
  49. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-da.js +23 -0
  50. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-de.js +23 -0
  51. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-el.js +23 -0
  52. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-en-AU.js +23 -0
  53. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-en-GB.js +23 -0
  54. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-en-NZ.js +23 -0
  55. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-eo.js +23 -0
  56. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-es.js +23 -0
  57. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-et.js +23 -0
  58. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-eu.js +23 -0
  59. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-fa.js +59 -0
  60. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-fi.js +23 -0
  61. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-fo.js +23 -0
  62. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-fr-CA.js +23 -0
  63. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-fr-CH.js +23 -0
  64. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-fr.js +25 -0
  65. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-gl.js +23 -0
  66. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-he.js +23 -0
  67. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-hi.js +23 -0
  68. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-hr.js +23 -0
  69. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-hu.js +23 -0
  70. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-hy.js +23 -0
  71. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-id.js +23 -0
  72. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-is.js +23 -0
  73. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-it.js +23 -0
  74. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ja.js +23 -0
  75. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ka.js +21 -0
  76. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-kk.js +23 -0
  77. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-km.js +23 -0
  78. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ko.js +23 -0
  79. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ky.js +24 -0
  80. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-lb.js +23 -0
  81. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-lt.js +23 -0
  82. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-lv.js +23 -0
  83. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-mk.js +23 -0
  84. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ml.js +23 -0
  85. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ms.js +23 -0
  86. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-nb.js +22 -0
  87. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-nl-BE.js +23 -0
  88. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-nl.js +23 -0
  89. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-nn.js +22 -0
  90. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-no.js +23 -0
  91. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-pl.js +23 -0
  92. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-pt-BR.js +23 -0
  93. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-pt.js +22 -0
  94. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-rm.js +21 -0
  95. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ro.js +26 -0
  96. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ru.js +23 -0
  97. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-sk.js +23 -0
  98. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-sl.js +24 -0
  99. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-sq.js +23 -0
  100. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-sr-SR.js +23 -0
  101. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-sr.js +23 -0
  102. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-sv.js +23 -0
  103. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-ta.js +23 -0
  104. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-th.js +23 -0
  105. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-tj.js +23 -0
  106. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-tr.js +23 -0
  107. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-uk.js +24 -0
  108. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-vi.js +23 -0
  109. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-zh-CN.js +23 -0
  110. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-zh-HK.js +23 -0
  111. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-zh-TW.js +23 -0
  112. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.accordion.js +571 -0
  113. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.autocomplete.js +614 -0
  114. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.button.js +419 -0
  115. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.core.js +324 -0
  116. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.datepicker.js +2044 -0
  117. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.dialog.js +767 -0
  118. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.draggable.js +941 -0
  119. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.droppable.js +364 -0
  120. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-blind.js +82 -0
  121. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-bounce.js +113 -0
  122. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-clip.js +67 -0
  123. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-drop.js +65 -0
  124. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-explode.js +97 -0
  125. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-fade.js +30 -0
  126. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-fold.js +76 -0
  127. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-highlight.js +50 -0
  128. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-pulsate.js +63 -0
  129. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-scale.js +318 -0
  130. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-shake.js +74 -0
  131. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-slide.js +64 -0
  132. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect-transfer.js +47 -0
  133. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.effect.js +1259 -0
  134. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.menu.js +621 -0
  135. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.mouse.js +169 -0
  136. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.position.js +497 -0
  137. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.progressbar.js +145 -0
  138. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.resizable.js +963 -0
  139. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.selectable.js +269 -0
  140. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.slider.js +641 -0
  141. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.sortable.js +1236 -0
  142. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.spinner.js +492 -0
  143. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.tabs.js +846 -0
  144. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.tooltip.js +400 -0
  145. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/jquery.ui.widget.js +521 -0
  146. data/apps/core/components/public/js/jquery/plugins/bsmselect/js/jquery.bsmselect.js +3 -1
  147. data/apps/core/components/public/js/plugins/sortable.js +5 -5
  148. data/apps/core/components/widgets/month_calendar/month_calendar.shtml +1 -1
  149. data/apps/core/components/widgets/table/table.rb +18 -5
  150. data/apps/core/forms/public/date_time.js +3 -0
  151. data/apps/core/forms/widgets/form/form.rb +1 -1
  152. data/apps/core/forms/widgets/inputs/date_time/date_time.rb +5 -0
  153. data/apps/core/forms/widgets/inputs/file_input/file_input.rb +1 -1
  154. data/apps/core/forms/widgets/inputs/select/select.rb +11 -16
  155. data/apps/messenger/config/options.rb +5 -5
  156. data/apps/messenger/controllers/messenger_admin_controller.rb +1 -1
  157. data/apps/messenger/controllers/messenger_controller.rb +1 -1
  158. data/apps/messenger/lib/backends/mobyt.rb +1 -1
  159. data/apps/messenger/messenger.rb +4 -2
  160. data/apps/messenger/views/admin/index.shtml +1 -1
  161. data/lib/spiderfw/controller/dispatcher.rb +5 -5
  162. data/lib/spiderfw/controller/mixins/visual.rb +10 -8
  163. data/lib/spiderfw/http/http.rb +1 -1
  164. data/lib/spiderfw/model/base_model.rb +2 -2
  165. data/lib/spiderfw/model/mappers/db_mapper.rb +4 -2
  166. data/lib/spiderfw/model/mixins/tree.rb +4 -5
  167. data/lib/spiderfw/model/model.rb +2 -1
  168. data/lib/spiderfw/model/storage/db/adapters/mysql.rb +18 -20
  169. data/lib/spiderfw/model/storage/db/adapters/oracle.rb +1 -1
  170. data/lib/spiderfw/spider.rb +5 -1
  171. data/lib/spiderfw/templates/blocks/layout_assets.rb +5 -2
  172. data/lib/spiderfw/templates/layout.rb +7 -3
  173. data/lib/spiderfw/templates/template.rb +8 -1
  174. data/lib/spiderfw/utils/monkey/date_time.rb +7 -5
  175. data/lib/spiderfw/utils/monkey/module.rb +12 -0
  176. metadata +373 -157
  177. data/lib/spiderfw/model/storage/db/connectors/mysql.rb +0 -16
  178. data/lib/spiderfw/model/storage/db/connectors/mysql2.rb +0 -9
  179. /data/apps/core/admin/public/img/{icons-s845a69dd9f.png → icons-s8b18557db6.png} +0 -0
@@ -0,0 +1,364 @@
1
+ /*!
2
+ * jQuery UI Droppable @VERSION
3
+ * http://jqueryui.com
4
+ *
5
+ * Copyright 2012 jQuery Foundation and other contributors
6
+ * Released under the MIT license.
7
+ * http://jquery.org/license
8
+ *
9
+ * http://api.jqueryui.com/droppable/
10
+ *
11
+ * Depends:
12
+ * jquery.ui.core.js
13
+ * jquery.ui.widget.js
14
+ * jquery.ui.mouse.js
15
+ * jquery.ui.draggable.js
16
+ */
17
+ (function( $, undefined ) {
18
+
19
+ function isOverAxis( x, reference, size ) {
20
+ return ( x > reference ) && ( x < ( reference + size ) );
21
+ }
22
+
23
+ $.widget("ui.droppable", {
24
+ version: "@VERSION",
25
+ widgetEventPrefix: "drop",
26
+ options: {
27
+ accept: "*",
28
+ activeClass: false,
29
+ addClasses: true,
30
+ greedy: false,
31
+ hoverClass: false,
32
+ scope: "default",
33
+ tolerance: "intersect"
34
+ },
35
+ _create: function() {
36
+
37
+ var o = this.options,
38
+ accept = o.accept;
39
+
40
+ this.isover = false;
41
+ this.isout = true;
42
+
43
+ this.accept = $.isFunction(accept) ? accept : function(d) {
44
+ return d.is(accept);
45
+ };
46
+
47
+ //Store the droppable's proportions
48
+ this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
49
+
50
+ // Add the reference and positions to the manager
51
+ $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
52
+ $.ui.ddmanager.droppables[o.scope].push(this);
53
+
54
+ (o.addClasses && this.element.addClass("ui-droppable"));
55
+
56
+ },
57
+
58
+ _destroy: function() {
59
+ var i = 0,
60
+ drop = $.ui.ddmanager.droppables[this.options.scope];
61
+
62
+ for ( ; i < drop.length; i++ ) {
63
+ if ( drop[i] === this ) {
64
+ drop.splice(i, 1);
65
+ }
66
+ }
67
+
68
+ this.element.removeClass("ui-droppable ui-droppable-disabled");
69
+ },
70
+
71
+ _setOption: function(key, value) {
72
+
73
+ if(key === "accept") {
74
+ this.accept = $.isFunction(value) ? value : function(d) {
75
+ return d.is(value);
76
+ };
77
+ }
78
+ $.Widget.prototype._setOption.apply(this, arguments);
79
+ },
80
+
81
+ _activate: function(event) {
82
+ var draggable = $.ui.ddmanager.current;
83
+ if(this.options.activeClass) {
84
+ this.element.addClass(this.options.activeClass);
85
+ }
86
+ if(draggable){
87
+ this._trigger("activate", event, this.ui(draggable));
88
+ }
89
+ },
90
+
91
+ _deactivate: function(event) {
92
+ var draggable = $.ui.ddmanager.current;
93
+ if(this.options.activeClass) {
94
+ this.element.removeClass(this.options.activeClass);
95
+ }
96
+ if(draggable){
97
+ this._trigger("deactivate", event, this.ui(draggable));
98
+ }
99
+ },
100
+
101
+ _over: function(event) {
102
+
103
+ var draggable = $.ui.ddmanager.current;
104
+
105
+ // Bail if draggable and droppable are same element
106
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
107
+ return;
108
+ }
109
+
110
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
111
+ if(this.options.hoverClass) {
112
+ this.element.addClass(this.options.hoverClass);
113
+ }
114
+ this._trigger("over", event, this.ui(draggable));
115
+ }
116
+
117
+ },
118
+
119
+ _out: function(event) {
120
+
121
+ var draggable = $.ui.ddmanager.current;
122
+
123
+ // Bail if draggable and droppable are same element
124
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
125
+ return;
126
+ }
127
+
128
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
129
+ if(this.options.hoverClass) {
130
+ this.element.removeClass(this.options.hoverClass);
131
+ }
132
+ this._trigger("out", event, this.ui(draggable));
133
+ }
134
+
135
+ },
136
+
137
+ _drop: function(event,custom) {
138
+
139
+ var draggable = custom || $.ui.ddmanager.current,
140
+ childrenIntersection = false;
141
+
142
+ // Bail if draggable and droppable are same element
143
+ if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
144
+ return false;
145
+ }
146
+
147
+ this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
148
+ var inst = $.data(this, "ui-droppable");
149
+ if(
150
+ inst.options.greedy &&
151
+ !inst.options.disabled &&
152
+ inst.options.scope === draggable.options.scope &&
153
+ inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
154
+ $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
155
+ ) { childrenIntersection = true; return false; }
156
+ });
157
+ if(childrenIntersection) {
158
+ return false;
159
+ }
160
+
161
+ if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
162
+ if(this.options.activeClass) {
163
+ this.element.removeClass(this.options.activeClass);
164
+ }
165
+ if(this.options.hoverClass) {
166
+ this.element.removeClass(this.options.hoverClass);
167
+ }
168
+ this._trigger("drop", event, this.ui(draggable));
169
+ return this.element;
170
+ }
171
+
172
+ return false;
173
+
174
+ },
175
+
176
+ ui: function(c) {
177
+ return {
178
+ draggable: (c.currentItem || c.element),
179
+ helper: c.helper,
180
+ position: c.position,
181
+ offset: c.positionAbs
182
+ };
183
+ }
184
+
185
+ });
186
+
187
+ $.ui.intersect = function(draggable, droppable, toleranceMode) {
188
+
189
+ if (!droppable.offset) {
190
+ return false;
191
+ }
192
+
193
+ var draggableLeft, draggableTop,
194
+ x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
195
+ y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
196
+ l = droppable.offset.left, r = l + droppable.proportions.width,
197
+ t = droppable.offset.top, b = t + droppable.proportions.height;
198
+
199
+ switch (toleranceMode) {
200
+ case "fit":
201
+ return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
202
+ case "intersect":
203
+ return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half
204
+ x2 - (draggable.helperProportions.width / 2) < r && // Left Half
205
+ t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half
206
+ y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
207
+ case "pointer":
208
+ draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
209
+ draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
210
+ return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
211
+ case "touch":
212
+ return (
213
+ (y1 >= t && y1 <= b) || // Top edge touching
214
+ (y2 >= t && y2 <= b) || // Bottom edge touching
215
+ (y1 < t && y2 > b) // Surrounded vertically
216
+ ) && (
217
+ (x1 >= l && x1 <= r) || // Left edge touching
218
+ (x2 >= l && x2 <= r) || // Right edge touching
219
+ (x1 < l && x2 > r) // Surrounded horizontally
220
+ );
221
+ default:
222
+ return false;
223
+ }
224
+
225
+ };
226
+
227
+ /*
228
+ This manager tracks offsets of draggables and droppables
229
+ */
230
+ $.ui.ddmanager = {
231
+ current: null,
232
+ droppables: { "default": [] },
233
+ prepareOffsets: function(t, event) {
234
+
235
+ var i, j,
236
+ m = $.ui.ddmanager.droppables[t.options.scope] || [],
237
+ type = event ? event.type : null, // workaround for #2317
238
+ list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
239
+
240
+ droppablesLoop: for (i = 0; i < m.length; i++) {
241
+
242
+ //No disabled and non-accepted
243
+ if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
244
+ continue;
245
+ }
246
+
247
+ // Filter out elements in the current dragged item
248
+ for (j=0; j < list.length; j++) {
249
+ if(list[j] === m[i].element[0]) {
250
+ m[i].proportions.height = 0;
251
+ continue droppablesLoop;
252
+ }
253
+ }
254
+
255
+ m[i].visible = m[i].element.css("display") !== "none";
256
+ if(!m[i].visible) {
257
+ continue;
258
+ }
259
+
260
+ //Activate the droppable if used directly from draggables
261
+ if(type === "mousedown") {
262
+ m[i]._activate.call(m[i], event);
263
+ }
264
+
265
+ m[i].offset = m[i].element.offset();
266
+ m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
267
+
268
+ }
269
+
270
+ },
271
+ drop: function(draggable, event) {
272
+
273
+ var dropped = false;
274
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
275
+
276
+ if(!this.options) {
277
+ return;
278
+ }
279
+ if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
280
+ dropped = this._drop.call(this, event) || dropped;
281
+ }
282
+
283
+ if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
284
+ this.isout = true;
285
+ this.isover = false;
286
+ this._deactivate.call(this, event);
287
+ }
288
+
289
+ });
290
+ return dropped;
291
+
292
+ },
293
+ dragStart: function( draggable, event ) {
294
+ //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
295
+ draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
296
+ if( !draggable.options.refreshPositions ) {
297
+ $.ui.ddmanager.prepareOffsets( draggable, event );
298
+ }
299
+ });
300
+ },
301
+ drag: function(draggable, event) {
302
+
303
+ //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
304
+ if(draggable.options.refreshPositions) {
305
+ $.ui.ddmanager.prepareOffsets(draggable, event);
306
+ }
307
+
308
+ //Run through all droppables and check their positions based on specific tolerance options
309
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
310
+
311
+ if(this.options.disabled || this.greedyChild || !this.visible) {
312
+ return;
313
+ }
314
+
315
+ var parentInstance, scope, parent,
316
+ intersects = $.ui.intersect(draggable, this, this.options.tolerance),
317
+ c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
318
+ if(!c) {
319
+ return;
320
+ }
321
+
322
+ if (this.options.greedy) {
323
+ // find droppable parents with same scope
324
+ scope = this.options.scope;
325
+ parent = this.element.parents(":data(ui-droppable)").filter(function () {
326
+ return $.data(this, "ui-droppable").options.scope === scope;
327
+ });
328
+
329
+ if (parent.length) {
330
+ parentInstance = $.data(parent[0], "ui-droppable");
331
+ parentInstance.greedyChild = (c === "isover");
332
+ }
333
+ }
334
+
335
+ // we just moved into a greedy child
336
+ if (parentInstance && c === "isover") {
337
+ parentInstance.isover = false;
338
+ parentInstance.isout = true;
339
+ parentInstance._out.call(parentInstance, event);
340
+ }
341
+
342
+ this[c] = true;
343
+ this[c === "isout" ? "isover" : "isout"] = false;
344
+ this[c === "isover" ? "_over" : "_out"].call(this, event);
345
+
346
+ // we just moved out of a greedy child
347
+ if (parentInstance && c === "isout") {
348
+ parentInstance.isout = false;
349
+ parentInstance.isover = true;
350
+ parentInstance._over.call(parentInstance, event);
351
+ }
352
+ });
353
+
354
+ },
355
+ dragStop: function( draggable, event ) {
356
+ draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
357
+ //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
358
+ if( !draggable.options.refreshPositions ) {
359
+ $.ui.ddmanager.prepareOffsets( draggable, event );
360
+ }
361
+ }
362
+ };
363
+
364
+ })(jQuery);
@@ -0,0 +1,82 @@
1
+ /*!
2
+ * jQuery UI Effects Blind @VERSION
3
+ * http://jqueryui.com
4
+ *
5
+ * Copyright 2012 jQuery Foundation and other contributors
6
+ * Released under the MIT license.
7
+ * http://jquery.org/license
8
+ *
9
+ * http://api.jqueryui.com/blind-effect/
10
+ *
11
+ * Depends:
12
+ * jquery.ui.effect.js
13
+ */
14
+ (function( $, undefined ) {
15
+
16
+ var rvertical = /up|down|vertical/,
17
+ rpositivemotion = /up|left|vertical|horizontal/;
18
+
19
+ $.effects.effect.blind = function( o, done ) {
20
+ // Create element
21
+ var el = $( this ),
22
+ props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
23
+ mode = $.effects.setMode( el, o.mode || "hide" ),
24
+ direction = o.direction || "up",
25
+ vertical = rvertical.test( direction ),
26
+ ref = vertical ? "height" : "width",
27
+ ref2 = vertical ? "top" : "left",
28
+ motion = rpositivemotion.test( direction ),
29
+ animation = {},
30
+ show = mode === "show",
31
+ wrapper, distance, margin;
32
+
33
+ // if already wrapped, the wrapper's properties are my property. #6245
34
+ if ( el.parent().is( ".ui-effects-wrapper" ) ) {
35
+ $.effects.save( el.parent(), props );
36
+ } else {
37
+ $.effects.save( el, props );
38
+ }
39
+ el.show();
40
+ wrapper = $.effects.createWrapper( el ).css({
41
+ overflow: "hidden"
42
+ });
43
+
44
+ distance = wrapper[ ref ]();
45
+ margin = parseFloat( wrapper.css( ref2 ) ) || 0;
46
+
47
+ animation[ ref ] = show ? distance : 0;
48
+ if ( !motion ) {
49
+ el
50
+ .css( vertical ? "bottom" : "right", 0 )
51
+ .css( vertical ? "top" : "left", "auto" )
52
+ .css({ position: "absolute" });
53
+
54
+ animation[ ref2 ] = show ? margin : distance + margin;
55
+ }
56
+
57
+ // start at 0 if we are showing
58
+ if ( show ) {
59
+ wrapper.css( ref, 0 );
60
+ if ( ! motion ) {
61
+ wrapper.css( ref2, margin + distance );
62
+ }
63
+ }
64
+
65
+ // Animate
66
+ wrapper.animate( animation, {
67
+ duration: o.duration,
68
+ easing: o.easing,
69
+ queue: false,
70
+ complete: function() {
71
+ if ( mode === "hide" ) {
72
+ el.hide();
73
+ }
74
+ $.effects.restore( el, props );
75
+ $.effects.removeWrapper( el );
76
+ done();
77
+ }
78
+ });
79
+
80
+ };
81
+
82
+ })(jQuery);
@@ -0,0 +1,113 @@
1
+ /*!
2
+ * jQuery UI Effects Bounce @VERSION
3
+ * http://jqueryui.com
4
+ *
5
+ * Copyright 2012 jQuery Foundation and other contributors
6
+ * Released under the MIT license.
7
+ * http://jquery.org/license
8
+ *
9
+ * http://api.jqueryui.com/bounce-effect/
10
+ *
11
+ * Depends:
12
+ * jquery.ui.effect.js
13
+ */
14
+ (function( $, undefined ) {
15
+
16
+ $.effects.effect.bounce = function( o, done ) {
17
+ var el = $( this ),
18
+ props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
19
+
20
+ // defaults:
21
+ mode = $.effects.setMode( el, o.mode || "effect" ),
22
+ hide = mode === "hide",
23
+ show = mode === "show",
24
+ direction = o.direction || "up",
25
+ distance = o.distance,
26
+ times = o.times || 5,
27
+
28
+ // number of internal animations
29
+ anims = times * 2 + ( show || hide ? 1 : 0 ),
30
+ speed = o.duration / anims,
31
+ easing = o.easing,
32
+
33
+ // utility:
34
+ ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
35
+ motion = ( direction === "up" || direction === "left" ),
36
+ i,
37
+ upAnim,
38
+ downAnim,
39
+
40
+ // we will need to re-assemble the queue to stack our animations in place
41
+ queue = el.queue(),
42
+ queuelen = queue.length;
43
+
44
+ // Avoid touching opacity to prevent clearType and PNG issues in IE
45
+ if ( show || hide ) {
46
+ props.push( "opacity" );
47
+ }
48
+
49
+ $.effects.save( el, props );
50
+ el.show();
51
+ $.effects.createWrapper( el ); // Create Wrapper
52
+
53
+ // default distance for the BIGGEST bounce is the outer Distance / 3
54
+ if ( !distance ) {
55
+ distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
56
+ }
57
+
58
+ if ( show ) {
59
+ downAnim = { opacity: 1 };
60
+ downAnim[ ref ] = 0;
61
+
62
+ // if we are showing, force opacity 0 and set the initial position
63
+ // then do the "first" animation
64
+ el.css( "opacity", 0 )
65
+ .css( ref, motion ? -distance * 2 : distance * 2 )
66
+ .animate( downAnim, speed, easing );
67
+ }
68
+
69
+ // start at the smallest distance if we are hiding
70
+ if ( hide ) {
71
+ distance = distance / Math.pow( 2, times - 1 );
72
+ }
73
+
74
+ downAnim = {};
75
+ downAnim[ ref ] = 0;
76
+ // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
77
+ for ( i = 0; i < times; i++ ) {
78
+ upAnim = {};
79
+ upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
80
+
81
+ el.animate( upAnim, speed, easing )
82
+ .animate( downAnim, speed, easing );
83
+
84
+ distance = hide ? distance * 2 : distance / 2;
85
+ }
86
+
87
+ // Last Bounce when Hiding
88
+ if ( hide ) {
89
+ upAnim = { opacity: 0 };
90
+ upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
91
+
92
+ el.animate( upAnim, speed, easing );
93
+ }
94
+
95
+ el.queue(function() {
96
+ if ( hide ) {
97
+ el.hide();
98
+ }
99
+ $.effects.restore( el, props );
100
+ $.effects.removeWrapper( el );
101
+ done();
102
+ });
103
+
104
+ // inject all the animations we just queued to be first in line (after "inprogress")
105
+ if ( queuelen > 1) {
106
+ queue.splice.apply( queue,
107
+ [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
108
+ }
109
+ el.dequeue();
110
+
111
+ };
112
+
113
+ })(jQuery);
@@ -0,0 +1,67 @@
1
+ /*!
2
+ * jQuery UI Effects Clip @VERSION
3
+ * http://jqueryui.com
4
+ *
5
+ * Copyright 2012 jQuery Foundation and other contributors
6
+ * Released under the MIT license.
7
+ * http://jquery.org/license
8
+ *
9
+ * http://api.jqueryui.com/clip-effect/
10
+ *
11
+ * Depends:
12
+ * jquery.ui.effect.js
13
+ */
14
+ (function( $, undefined ) {
15
+
16
+ $.effects.effect.clip = function( o, done ) {
17
+ // Create element
18
+ var el = $( this ),
19
+ props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
20
+ mode = $.effects.setMode( el, o.mode || "hide" ),
21
+ show = mode === "show",
22
+ direction = o.direction || "vertical",
23
+ vert = direction === "vertical",
24
+ size = vert ? "height" : "width",
25
+ position = vert ? "top" : "left",
26
+ animation = {},
27
+ wrapper, animate, distance;
28
+
29
+ // Save & Show
30
+ $.effects.save( el, props );
31
+ el.show();
32
+
33
+ // Create Wrapper
34
+ wrapper = $.effects.createWrapper( el ).css({
35
+ overflow: "hidden"
36
+ });
37
+ animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
38
+ distance = animate[ size ]();
39
+
40
+ // Shift
41
+ if ( show ) {
42
+ animate.css( size, 0 );
43
+ animate.css( position, distance / 2 );
44
+ }
45
+
46
+ // Create Animation Object:
47
+ animation[ size ] = show ? distance : 0;
48
+ animation[ position ] = show ? 0 : distance / 2;
49
+
50
+ // Animate
51
+ animate.animate( animation, {
52
+ queue: false,
53
+ duration: o.duration,
54
+ easing: o.easing,
55
+ complete: function() {
56
+ if ( !show ) {
57
+ el.hide();
58
+ }
59
+ $.effects.restore( el, props );
60
+ $.effects.removeWrapper( el );
61
+ done();
62
+ }
63
+ });
64
+
65
+ };
66
+
67
+ })(jQuery);
@@ -0,0 +1,65 @@
1
+ /*!
2
+ * jQuery UI Effects Drop @VERSION
3
+ * http://jqueryui.com
4
+ *
5
+ * Copyright 2012 jQuery Foundation and other contributors
6
+ * Released under the MIT license.
7
+ * http://jquery.org/license
8
+ *
9
+ * http://api.jqueryui.com/drop-effect/
10
+ *
11
+ * Depends:
12
+ * jquery.ui.effect.js
13
+ */
14
+ (function( $, undefined ) {
15
+
16
+ $.effects.effect.drop = function( o, done ) {
17
+
18
+ var el = $( this ),
19
+ props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
20
+ mode = $.effects.setMode( el, o.mode || "hide" ),
21
+ show = mode === "show",
22
+ direction = o.direction || "left",
23
+ ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
24
+ motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
25
+ animation = {
26
+ opacity: show ? 1 : 0
27
+ },
28
+ distance;
29
+
30
+ // Adjust
31
+ $.effects.save( el, props );
32
+ el.show();
33
+ $.effects.createWrapper( el );
34
+
35
+ distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2;
36
+
37
+ if ( show ) {
38
+ el
39
+ .css( "opacity", 0 )
40
+ .css( ref, motion === "pos" ? -distance : distance );
41
+ }
42
+
43
+ // Animation
44
+ animation[ ref ] = ( show ?
45
+ ( motion === "pos" ? "+=" : "-=" ) :
46
+ ( motion === "pos" ? "-=" : "+=" ) ) +
47
+ distance;
48
+
49
+ // Animate
50
+ el.animate( animation, {
51
+ queue: false,
52
+ duration: o.duration,
53
+ easing: o.easing,
54
+ complete: function() {
55
+ if ( mode === "hide" ) {
56
+ el.hide();
57
+ }
58
+ $.effects.restore( el, props );
59
+ $.effects.removeWrapper( el );
60
+ done();
61
+ }
62
+ });
63
+ };
64
+
65
+ })(jQuery);