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,324 @@
1
+ /*!
2
+ * jQuery UI Core @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/category/ui-core/
10
+ */
11
+ (function( $, undefined ) {
12
+
13
+ var uuid = 0,
14
+ runiqueId = /^ui-id-\d+$/;
15
+
16
+ // prevent duplicate loading
17
+ // this is only a problem because we proxy existing functions
18
+ // and we don't want to double proxy them
19
+ $.ui = $.ui || {};
20
+ if ( $.ui.version ) {
21
+ return;
22
+ }
23
+
24
+ $.extend( $.ui, {
25
+ version: "1.9.2",
26
+
27
+ keyCode: {
28
+ BACKSPACE: 8,
29
+ COMMA: 188,
30
+ DELETE: 46,
31
+ DOWN: 40,
32
+ END: 35,
33
+ ENTER: 13,
34
+ ESCAPE: 27,
35
+ HOME: 36,
36
+ LEFT: 37,
37
+ NUMPAD_ADD: 107,
38
+ NUMPAD_DECIMAL: 110,
39
+ NUMPAD_DIVIDE: 111,
40
+ NUMPAD_ENTER: 108,
41
+ NUMPAD_MULTIPLY: 106,
42
+ NUMPAD_SUBTRACT: 109,
43
+ PAGE_DOWN: 34,
44
+ PAGE_UP: 33,
45
+ PERIOD: 190,
46
+ RIGHT: 39,
47
+ SPACE: 32,
48
+ TAB: 9,
49
+ UP: 38
50
+ }
51
+ });
52
+
53
+ // plugins
54
+ $.fn.extend({
55
+ _focus: $.fn.focus,
56
+ focus: function( delay, fn ) {
57
+ return typeof delay === "number" ?
58
+ this.each(function() {
59
+ var elem = this;
60
+ setTimeout(function() {
61
+ $( elem ).focus();
62
+ if ( fn ) {
63
+ fn.call( elem );
64
+ }
65
+ }, delay );
66
+ }) :
67
+ this._focus.apply( this, arguments );
68
+ },
69
+
70
+ scrollParent: function() {
71
+ var scrollParent;
72
+ if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
73
+ scrollParent = this.parents().filter(function() {
74
+ return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
75
+ }).eq(0);
76
+ } else {
77
+ scrollParent = this.parents().filter(function() {
78
+ return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
79
+ }).eq(0);
80
+ }
81
+
82
+ return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
83
+ },
84
+
85
+ zIndex: function( zIndex ) {
86
+ if ( zIndex !== undefined ) {
87
+ return this.css( "zIndex", zIndex );
88
+ }
89
+
90
+ if ( this.length ) {
91
+ var elem = $( this[ 0 ] ), position, value;
92
+ while ( elem.length && elem[ 0 ] !== document ) {
93
+ // Ignore z-index if position is set to a value where z-index is ignored by the browser
94
+ // This makes behavior of this function consistent across browsers
95
+ // WebKit always returns auto if the element is positioned
96
+ position = elem.css( "position" );
97
+ if ( position === "absolute" || position === "relative" || position === "fixed" ) {
98
+ // IE returns 0 when zIndex is not specified
99
+ // other browsers return a string
100
+ // we ignore the case of nested elements with an explicit value of 0
101
+ // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
102
+ value = parseInt( elem.css( "zIndex" ), 10 );
103
+ if ( !isNaN( value ) && value !== 0 ) {
104
+ return value;
105
+ }
106
+ }
107
+ elem = elem.parent();
108
+ }
109
+ }
110
+
111
+ return 0;
112
+ },
113
+
114
+ uniqueId: function() {
115
+ return this.each(function() {
116
+ if ( !this.id ) {
117
+ this.id = "ui-id-" + (++uuid);
118
+ }
119
+ });
120
+ },
121
+
122
+ removeUniqueId: function() {
123
+ return this.each(function() {
124
+ if ( runiqueId.test( this.id ) ) {
125
+ $( this ).removeAttr( "id" );
126
+ }
127
+ });
128
+ }
129
+ });
130
+
131
+ // selectors
132
+ function focusable( element, isTabIndexNotNaN ) {
133
+ var map, mapName, img,
134
+ nodeName = element.nodeName.toLowerCase();
135
+ if ( "area" === nodeName ) {
136
+ map = element.parentNode;
137
+ mapName = map.name;
138
+ if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
139
+ return false;
140
+ }
141
+ img = $( "img[usemap=#" + mapName + "]" )[0];
142
+ return !!img && visible( img );
143
+ }
144
+ return ( /input|select|textarea|button|object/.test( nodeName ) ?
145
+ !element.disabled :
146
+ "a" === nodeName ?
147
+ element.href || isTabIndexNotNaN :
148
+ isTabIndexNotNaN) &&
149
+ // the element and all of its ancestors must be visible
150
+ visible( element );
151
+ }
152
+
153
+ function visible( element ) {
154
+ return $.expr.filters.visible( element ) &&
155
+ !$( element ).parents().addBack().filter(function() {
156
+ return $.css( this, "visibility" ) === "hidden";
157
+ }).length;
158
+ }
159
+
160
+ $.extend( $.expr[ ":" ], {
161
+ data: $.expr.createPseudo ?
162
+ $.expr.createPseudo(function( dataName ) {
163
+ return function( elem ) {
164
+ return !!$.data( elem, dataName );
165
+ };
166
+ }) :
167
+ // support: jQuery <1.8
168
+ function( elem, i, match ) {
169
+ return !!$.data( elem, match[ 3 ] );
170
+ },
171
+
172
+ focusable: function( element ) {
173
+ return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
174
+ },
175
+
176
+ tabbable: function( element ) {
177
+ var tabIndex = $.attr( element, "tabindex" ),
178
+ isTabIndexNaN = isNaN( tabIndex );
179
+ return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
180
+ }
181
+ });
182
+
183
+ // support: jQuery <1.8
184
+ if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
185
+ $.each( [ "Width", "Height" ], function( i, name ) {
186
+ var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
187
+ type = name.toLowerCase(),
188
+ orig = {
189
+ innerWidth: $.fn.innerWidth,
190
+ innerHeight: $.fn.innerHeight,
191
+ outerWidth: $.fn.outerWidth,
192
+ outerHeight: $.fn.outerHeight
193
+ };
194
+
195
+ function reduce( elem, size, border, margin ) {
196
+ $.each( side, function() {
197
+ size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
198
+ if ( border ) {
199
+ size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
200
+ }
201
+ if ( margin ) {
202
+ size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
203
+ }
204
+ });
205
+ return size;
206
+ }
207
+
208
+ $.fn[ "inner" + name ] = function( size ) {
209
+ if ( size === undefined ) {
210
+ return orig[ "inner" + name ].call( this );
211
+ }
212
+
213
+ return this.each(function() {
214
+ $( this ).css( type, reduce( this, size ) + "px" );
215
+ });
216
+ };
217
+
218
+ $.fn[ "outer" + name] = function( size, margin ) {
219
+ if ( typeof size !== "number" ) {
220
+ return orig[ "outer" + name ].call( this, size );
221
+ }
222
+
223
+ return this.each(function() {
224
+ $( this).css( type, reduce( this, size, true, margin ) + "px" );
225
+ });
226
+ };
227
+ });
228
+ }
229
+
230
+ // support: jQuery <1.8
231
+ if ( !$.fn.addBack ) {
232
+ $.fn.addBack = function( selector ) {
233
+ return this.add( selector == null ?
234
+ this.prevObject : this.prevObject.filter( selector )
235
+ );
236
+ };
237
+ }
238
+
239
+ // support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
240
+ if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
241
+ $.fn.removeData = (function( removeData ) {
242
+ return function( key ) {
243
+ if ( arguments.length ) {
244
+ return removeData.call( this, $.camelCase( key ) );
245
+ } else {
246
+ return removeData.call( this );
247
+ }
248
+ };
249
+ })( $.fn.removeData );
250
+ }
251
+
252
+
253
+
254
+
255
+
256
+ // deprecated
257
+ $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
258
+
259
+ $.support.selectstart = "onselectstart" in document.createElement( "div" );
260
+ $.fn.extend({
261
+ disableSelection: function() {
262
+ return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
263
+ ".ui-disableSelection", function( event ) {
264
+ event.preventDefault();
265
+ });
266
+ },
267
+
268
+ enableSelection: function() {
269
+ return this.unbind( ".ui-disableSelection" );
270
+ }
271
+ });
272
+
273
+ $.extend( $.ui, {
274
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
275
+ plugin: {
276
+ add: function( module, option, set ) {
277
+ var i,
278
+ proto = $.ui[ module ].prototype;
279
+ for ( i in set ) {
280
+ proto.plugins[ i ] = proto.plugins[ i ] || [];
281
+ proto.plugins[ i ].push( [ option, set[ i ] ] );
282
+ }
283
+ },
284
+ call: function( instance, name, args ) {
285
+ var i,
286
+ set = instance.plugins[ name ];
287
+ if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
288
+ return;
289
+ }
290
+
291
+ for ( i = 0; i < set.length; i++ ) {
292
+ if ( instance.options[ set[ i ][ 0 ] ] ) {
293
+ set[ i ][ 1 ].apply( instance.element, args );
294
+ }
295
+ }
296
+ }
297
+ },
298
+
299
+ // only used by resizable
300
+ hasScroll: function( el, a ) {
301
+
302
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
303
+ if ( $( el ).css( "overflow" ) === "hidden") {
304
+ return false;
305
+ }
306
+
307
+ var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
308
+ has = false;
309
+
310
+ if ( el[ scroll ] > 0 ) {
311
+ return true;
312
+ }
313
+
314
+ // TODO: determine which cases actually cause this to happen
315
+ // if the element doesn't have the scroll set, see if it's possible to
316
+ // set the scroll
317
+ el[ scroll ] = 1;
318
+ has = ( el[ scroll ] > 0 );
319
+ el[ scroll ] = 0;
320
+ return has;
321
+ }
322
+ });
323
+
324
+ })( jQuery );