old_sql 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (459) hide show
  1. data/Gemfile +8 -0
  2. data/Gemfile.lock +92 -0
  3. data/Rakefile +8 -6
  4. data/TODO.mkd +8 -3
  5. data/VERSION +1 -1
  6. data/app/controllers/old_sql/report_controller.rb +37 -44
  7. data/app/views/layouts/old_sql/report.html.erb +14 -0
  8. data/app/views/old_sql/report/datagrid.html.erb +24 -15
  9. data/app/views/old_sql/report/index.html.erb +26 -30
  10. data/config/locales/old_sql.en.yml +5 -0
  11. data/config/routes.rb +8 -6
  12. data/lib/old_sql/engine.rb +4 -0
  13. data/lib/old_sql/report_processor/base.rb +92 -0
  14. data/old_sql.gemspec +149 -322
  15. data/pkg/old_sql-0.1.0.gem +0 -0
  16. data/pkg/old_sql-0.2.0.gem +0 -0
  17. data/pkg/old_sql-0.3.0.gem +0 -0
  18. data/pkg/old_sql-0.4.0.gem +0 -0
  19. data/pkg/old_sql-0.5.0.gem +0 -0
  20. data/pkg/old_sql-0.6.0.gem +0 -0
  21. data/public/javascripts/old_sql/date_format.js +126 -0
  22. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-bg.js +1 -0
  23. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-bg1251.js +1 -0
  24. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-cat.js +1 -0
  25. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-cn.js +1 -0
  26. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-cs.js +1 -0
  27. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-da.js +1 -0
  28. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-de.js +1 -0
  29. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-el.js +1 -0
  30. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-en.js +1 -0
  31. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-es.js +1 -0
  32. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-fa.js +1 -0
  33. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-fi.js +1 -0
  34. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-fr.js +1 -0
  35. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-gl.js +1 -0
  36. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-he.js +1 -0
  37. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-hu.js +1 -0
  38. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-is.js +1 -0
  39. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-it.js +1 -0
  40. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-ja.js +1 -0
  41. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-nl.js +1 -0
  42. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-no.js +1 -0
  43. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-pl.js +1 -0
  44. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-pt-br.js +1 -0
  45. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-pt.js +1 -0
  46. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-ro.js +1 -0
  47. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-ru.js +1 -0
  48. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-sk.js +1 -0
  49. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-sv.js +1 -0
  50. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-tr.js +1 -0
  51. data/public/javascripts/old_sql/jqgrid/i18n/grid.locale-ua.js +1 -0
  52. data/public/javascripts/old_sql/jqgrid/jquery-ui-1.8.custom.min.js +778 -0
  53. data/public/javascripts/old_sql/jqgrid/jquery.jqGrid.min.js +457 -0
  54. data/public/javascripts/old_sql/jqgrid/ui.multiselect.js +314 -0
  55. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom.min.js +252 -0
  56. data/public/javascripts/old_sql/jquery-ui-timepicker-addon.js +985 -0
  57. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png +0 -0
  58. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-bg_flat_15_cd0a0a_40x100.png +0 -0
  59. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
  60. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-bg_glass_50_3baae3_1x400.png +0 -0
  61. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
  62. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png +0 -0
  63. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-bg_highlight-hard_70_000000_1x100.png +0 -0
  64. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-bg_highlight-soft_100_deedf7_1x100.png +0 -0
  65. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-bg_highlight-soft_25_ffef8f_1x100.png +0 -0
  66. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-icons_2694e8_256x240.png +0 -0
  67. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base → stylesheets/old_sql/jqgrid/themes/default}/images/ui-icons_2e83ff_256x240.png +0 -0
  68. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-icons_3d80b3_256x240.png +0 -0
  69. data/public/stylesheets/old_sql/jqgrid/themes/default/images/ui-icons_72a7cf_256x240.png +0 -0
  70. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css/ui-lightness → stylesheets/old_sql/jqgrid/themes/default}/images/ui-icons_ffffff_256x240.png +0 -0
  71. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery-ui-1.8.13.custom.css → stylesheets/old_sql/jqgrid/themes/default/jquery-ui-1.8.custom.css} +108 -54
  72. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-anim_basic_16x16.gif +0 -0
  73. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base → stylesheets/old_sql/jqgrid/themes/redroad}/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  74. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  75. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  76. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  77. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base → stylesheets/old_sql/jqgrid/themes/redroad}/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  78. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  79. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  80. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  81. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-icons_217bc0_256x240.png +0 -0
  82. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-icons_2e83ff_256x240.png +0 -0
  83. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-icons_469bdd_256x240.png +0 -0
  84. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-icons_6da8d5_256x240.png +0 -0
  85. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base → stylesheets/old_sql/jqgrid/themes/redroad}/images/ui-icons_cd0a0a_256x240.png +0 -0
  86. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-icons_d8e7f3_256x240.png +0 -0
  87. data/public/stylesheets/old_sql/jqgrid/themes/redroad/images/ui-icons_f9bd01_256x240.png +0 -0
  88. data/public/stylesheets/old_sql/jqgrid/themes/redroad/jquery-ui-1.8.custom.css +489 -0
  89. data/public/stylesheets/old_sql/jqgrid/ui.jqgrid.css +138 -0
  90. data/public/stylesheets/old_sql/jqgrid/ui.multiselect.css +30 -0
  91. data/public/stylesheets/old_sql/old_sql.css +85 -0
  92. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  93. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  94. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  95. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  96. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  97. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  98. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  99. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  100. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  101. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  102. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  103. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  104. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  105. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes → stylesheets/old_sql}/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  106. data/public/{javascripts/old_sql/jquery-ui-1.8.13.custom (3)/css → stylesheets/old_sql}/ui-lightness/jquery-ui-1.8.13.custom.css +0 -0
  107. data/test/dummy/config/application.rb +8 -5
  108. data/test/dummy/config/boot.rb +7 -3
  109. data/test/dummy/config/initializers/secret_token.rb +1 -1
  110. data/test/dummy/config/report_sql/users.erb +2 -4
  111. data/test/dummy/config/reports.yml +3 -4
  112. data/test/dummy/db/development.sqlite3 +0 -0
  113. data/test/dummy/db/test.sqlite3 +0 -0
  114. data/test/dummy/lib/old_sql/report_processor/users.rb +19 -0
  115. data/test/dummy/log/development.log +4742 -0
  116. data/test/dummy/{lib/tasks/.gitkeep → log/production.log} +0 -0
  117. data/test/dummy/{vendor/plugins/.gitkeep → log/server.log} +0 -0
  118. data/test/dummy/log/test.log +27 -0
  119. data/test/dummy/tmp/pids/server.pid +1 -0
  120. data/test/fixtures/users.yml +3 -0
  121. data/test/integration/navigation_test.rb +7 -0
  122. data/test/old_sql_test.rb +7 -0
  123. data/test/support/integration_case.rb +5 -0
  124. data/test/test_helper.rb +22 -0
  125. data/vendor/cache/abstract-1.0.0.gem +0 -0
  126. data/vendor/cache/actionmailer-3.0.6.gem +0 -0
  127. data/vendor/cache/actionpack-3.0.6.gem +0 -0
  128. data/vendor/cache/activemodel-3.0.6.gem +0 -0
  129. data/vendor/cache/activerecord-3.0.6.gem +0 -0
  130. data/vendor/cache/activeresource-3.0.6.gem +0 -0
  131. data/vendor/cache/activesupport-3.0.6.gem +0 -0
  132. data/vendor/cache/arel-2.0.10.gem +0 -0
  133. data/vendor/cache/builder-2.1.2.gem +0 -0
  134. data/vendor/cache/capybara-0.4.1.2.gem +0 -0
  135. data/vendor/cache/celerity-0.8.9.gem +0 -0
  136. data/vendor/cache/childprocess-0.1.9.gem +0 -0
  137. data/vendor/cache/culerity-0.2.15.gem +0 -0
  138. data/vendor/cache/erubis-2.6.6.gem +0 -0
  139. data/vendor/cache/ffi-1.0.9.gem +0 -0
  140. data/vendor/cache/git-1.2.5.gem +0 -0
  141. data/vendor/cache/i18n-0.5.0.gem +0 -0
  142. data/vendor/cache/jeweler-1.6.2.gem +0 -0
  143. data/vendor/cache/json_pure-1.5.1.gem +0 -0
  144. data/vendor/cache/mail-2.2.19.gem +0 -0
  145. data/vendor/cache/mime-types-1.16.gem +0 -0
  146. data/vendor/cache/nokogiri-1.4.4.gem +0 -0
  147. data/vendor/cache/polyglot-0.3.1.gem +0 -0
  148. data/vendor/cache/rack-1.2.3.gem +0 -0
  149. data/vendor/cache/rack-mount-0.6.14.gem +0 -0
  150. data/vendor/cache/rack-test-0.5.7.gem +0 -0
  151. data/vendor/cache/rails-3.0.6.gem +0 -0
  152. data/vendor/cache/railties-3.0.6.gem +0 -0
  153. data/vendor/cache/rake-0.9.1.gem +0 -0
  154. data/vendor/cache/rubyzip-0.9.4.gem +0 -0
  155. data/vendor/cache/sanitize-2.0.2.gem +0 -0
  156. data/vendor/cache/selenium-webdriver-0.2.1.gem +0 -0
  157. data/vendor/cache/sqlite3-1.3.3.gem +0 -0
  158. data/vendor/cache/thor-0.14.6.gem +0 -0
  159. data/vendor/cache/treetop-1.4.9.gem +0 -0
  160. data/vendor/cache/tzinfo-0.3.27.gem +0 -0
  161. data/vendor/cache/xpath-0.1.4.gem +0 -0
  162. metadata +160 -325
  163. data/lib/report_processor/base.rb +0 -86
  164. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/AUTHORS.txt +0 -30
  165. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/GPL-LICENSE.txt +0 -278
  166. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/MIT-LICENSE.txt +0 -25
  167. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/categories.html +0 -71
  168. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/combobox.html +0 -174
  169. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/custom-data.html +0 -95
  170. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/default.html +0 -64
  171. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/folding.html +0 -62
  172. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/images/jquery_32x32.png +0 -0
  173. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/images/jqueryui_32x32.png +0 -0
  174. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/images/sizzlejs_32x32.png +0 -0
  175. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/images/transparent_1x1.png +0 -0
  176. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/images/ui-anim_basic_16x16.gif +0 -0
  177. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/index.html +0 -27
  178. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/london.xml +0 -114
  179. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/maxheight.html +0 -79
  180. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/multiple-remote.html +0 -84
  181. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/multiple.html +0 -99
  182. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/remote-jsonp.html +0 -86
  183. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/remote-with-cache.html +0 -59
  184. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/remote.html +0 -59
  185. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/search.php +0 -640
  186. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/autocomplete/xml.html +0 -72
  187. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/button/checkbox.html +0 -44
  188. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/button/default.html +0 -38
  189. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/button/icons.html +0 -56
  190. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/button/index.html +0 -23
  191. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/button/radio.html +0 -39
  192. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/button/splitbutton.html +0 -55
  193. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/button/toolbar.html +0 -120
  194. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/alt-field.html +0 -36
  195. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/animation.html +0 -58
  196. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/buttonbar.html +0 -35
  197. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/date-formats.html +0 -47
  198. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/date-range.html +0 -49
  199. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/default.html +0 -33
  200. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/dropdown-month-year.html +0 -36
  201. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/icon-trigger.html +0 -37
  202. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/images/calendar.gif +0 -0
  203. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/index.html +0 -31
  204. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/inline.html +0 -33
  205. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/localization.html +0 -162
  206. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/min-max.html +0 -33
  207. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/multiple-calendars.html +0 -36
  208. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/other-months.html +0 -37
  209. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/datepicker/show-week.html +0 -39
  210. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/demos.css +0 -334
  211. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/dialog/animated.html +0 -56
  212. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/dialog/default.html +0 -54
  213. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/dialog/index.html +0 -23
  214. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/dialog/modal-confirmation.html +0 -69
  215. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/dialog/modal-form.html +0 -167
  216. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/dialog/modal-message.html +0 -71
  217. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/dialog/modal.html +0 -60
  218. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/constrain-movement.html +0 -69
  219. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/cursor-style.html +0 -49
  220. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/default.html +0 -39
  221. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/delay-start.html +0 -45
  222. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/events.html +0 -77
  223. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/handle.html +0 -50
  224. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/index.html +0 -28
  225. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/revert.html +0 -44
  226. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/scroll.html +0 -51
  227. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/snap-to.html +0 -68
  228. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/sortable.html +0 -57
  229. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/draggable/visual-feedback.html +0 -77
  230. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/accepted-elements.html +0 -60
  231. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/default.html +0 -53
  232. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/images/high_tatras.jpg +0 -0
  233. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/images/high_tatras2.jpg +0 -0
  234. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/images/high_tatras2_min.jpg +0 -0
  235. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/images/high_tatras3.jpg +0 -0
  236. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/images/high_tatras3_min.jpg +0 -0
  237. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/images/high_tatras4.jpg +0 -0
  238. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/images/high_tatras4_min.jpg +0 -0
  239. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/images/high_tatras_min.jpg +0 -0
  240. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/index.html +0 -24
  241. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/photo-manager.html +0 -184
  242. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/propagation.html +0 -80
  243. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/revert.html +0 -61
  244. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/shopping-cart.html +0 -101
  245. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/droppable/visual-feedback.html +0 -78
  246. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/images/calendar.gif +0 -0
  247. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/images/demo-config-on-tile.gif +0 -0
  248. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/images/demo-config-on.gif +0 -0
  249. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/images/demo-spindown-closed.gif +0 -0
  250. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/images/demo-spindown-open.gif +0 -0
  251. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/images/icon-docs-info.gif +0 -0
  252. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/images/pbar-ani.gif +0 -0
  253. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/index.html +0 -321
  254. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/position/cycler.html +0 -122
  255. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/position/default.html +0 -153
  256. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/position/images/earth.jpg +0 -0
  257. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/position/images/flight.jpg +0 -0
  258. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/position/images/rocket.jpg +0 -0
  259. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/position/index.html +0 -19
  260. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/progressbar/animated.html +0 -44
  261. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/progressbar/default.html +0 -35
  262. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/progressbar/images/pbar-ani.gif +0 -0
  263. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/progressbar/index.html +0 -20
  264. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/progressbar/resize.html +0 -40
  265. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/animate.html +0 -43
  266. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/aspect-ratio.html +0 -42
  267. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/constrain-area.html +0 -47
  268. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/default.html +0 -40
  269. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/delay-start.html +0 -52
  270. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/helper.html +0 -43
  271. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/index.html +0 -28
  272. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/max-min.html +0 -45
  273. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/snap-to-grid.html +0 -42
  274. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/synchronous-resize.html +0 -49
  275. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/textarea.html +0 -41
  276. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/resizable/visual-feedback.html +0 -43
  277. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/selectable/default.html +0 -50
  278. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/selectable/display-grid.html +0 -55
  279. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/selectable/index.html +0 -20
  280. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/selectable/serialize.html +0 -61
  281. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/sortable/connect-lists-through-tabs.html +0 -78
  282. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/sortable/connect-lists.html +0 -58
  283. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/sortable/default.html +0 -51
  284. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/sortable/delay-start.html +0 -67
  285. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/sortable/display-grid.html +0 -54
  286. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/sortable/empty-lists.html +0 -69
  287. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/sortable/index.html +0 -26
  288. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/sortable/items.html +0 -70
  289. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/sortable/placeholder.html +0 -56
  290. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/demos/sortable/portlets.html +0 -96
  291. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/docs/autocomplete.html +0 -875
  292. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/docs/button.html +0 -500
  293. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/docs/datepicker.html +0 -2570
  294. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/docs/dialog.html +0 -1698
  295. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/docs/draggable.html +0 -1577
  296. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/docs/droppable.html +0 -829
  297. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/docs/position.html +0 -227
  298. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/docs/progressbar.html +0 -460
  299. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/docs/resizable.html +0 -1201
  300. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/docs/selectable.html +0 -848
  301. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/docs/sortable.html +0 -1953
  302. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/external/jquery.bgiframe-2.1.2.js +0 -39
  303. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/external/jquery.cookie.js +0 -89
  304. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/external/jquery.metadata.js +0 -122
  305. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/external/qunit.css +0 -153
  306. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/external/qunit.js +0 -1261
  307. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/jquery-1.5.1.js +0 -8316
  308. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  309. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  310. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  311. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  312. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  313. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  314. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/images/ui-icons_222222_256x240.png +0 -0
  315. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/images/ui-icons_454545_256x240.png +0 -0
  316. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/images/ui-icons_888888_256x240.png +0 -0
  317. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/jquery.ui.all.css +0 -11
  318. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/jquery.ui.autocomplete.css +0 -53
  319. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/jquery.ui.base.css +0 -8
  320. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/jquery.ui.button.css +0 -38
  321. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/jquery.ui.core.css +0 -41
  322. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/jquery.ui.datepicker.css +0 -68
  323. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/jquery.ui.dialog.css +0 -21
  324. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/jquery.ui.progressbar.css +0 -11
  325. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/jquery.ui.resizable.css +0 -25
  326. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/jquery.ui.selectable.css +0 -10
  327. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/base/jquery.ui.theme.css +0 -252
  328. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  329. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  330. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  331. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  332. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  333. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  334. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  335. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  336. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  337. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  338. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  339. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  340. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  341. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery.ui.all.css +0 -11
  342. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery.ui.autocomplete.css +0 -53
  343. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery.ui.base.css +0 -8
  344. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery.ui.button.css +0 -38
  345. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery.ui.core.css +0 -41
  346. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery.ui.datepicker.css +0 -68
  347. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery.ui.dialog.css +0 -21
  348. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery.ui.progressbar.css +0 -11
  349. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery.ui.resizable.css +0 -25
  350. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery.ui.selectable.css +0 -10
  351. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/themes/ui-lightness/jquery.ui.theme.css +0 -254
  352. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery-ui-i18n.js +0 -1379
  353. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-af.js +0 -23
  354. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-ar-DZ.js +0 -23
  355. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-ar.js +0 -23
  356. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-az.js +0 -23
  357. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-bg.js +0 -24
  358. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-bs.js +0 -23
  359. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-ca.js +0 -23
  360. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-cs.js +0 -23
  361. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-da.js +0 -23
  362. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-de.js +0 -23
  363. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-el.js +0 -23
  364. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-en-AU.js +0 -23
  365. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-en-GB.js +0 -23
  366. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-en-NZ.js +0 -23
  367. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-eo.js +0 -23
  368. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-es.js +0 -23
  369. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-et.js +0 -23
  370. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-eu.js +0 -23
  371. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-fa.js +0 -23
  372. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-fi.js +0 -23
  373. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-fo.js +0 -23
  374. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-fr-CH.js +0 -23
  375. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-fr.js +0 -25
  376. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-gl.js +0 -23
  377. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-he.js +0 -23
  378. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-hr.js +0 -23
  379. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-hu.js +0 -23
  380. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-hy.js +0 -23
  381. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-id.js +0 -23
  382. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-is.js +0 -23
  383. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-it.js +0 -23
  384. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-ja.js +0 -23
  385. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-ko.js +0 -23
  386. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-kz.js +0 -23
  387. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-lt.js +0 -23
  388. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-lv.js +0 -23
  389. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-ml.js +0 -23
  390. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-ms.js +0 -23
  391. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-nl.js +0 -23
  392. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-no.js +0 -23
  393. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-pl.js +0 -23
  394. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-pt-BR.js +0 -23
  395. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-pt.js +0 -22
  396. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-rm.js +0 -21
  397. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-ro.js +0 -26
  398. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-ru.js +0 -23
  399. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-sk.js +0 -23
  400. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-sl.js +0 -24
  401. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-sq.js +0 -23
  402. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-sr-SR.js +0 -23
  403. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-sr.js +0 -23
  404. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-sv.js +0 -23
  405. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-ta.js +0 -23
  406. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-th.js +0 -23
  407. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-tj.js +0 -23
  408. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-tr.js +0 -23
  409. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-uk.js +0 -23
  410. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-vi.js +0 -23
  411. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-zh-CN.js +0 -23
  412. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-zh-HK.js +0 -23
  413. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/i18n/jquery.ui.datepicker-zh-TW.js +0 -23
  414. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery-ui-1.8.13.custom.js +0 -8021
  415. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.autocomplete.js +0 -612
  416. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.button.js +0 -388
  417. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.core.js +0 -312
  418. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.datepicker.js +0 -1791
  419. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.dialog.js +0 -878
  420. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.draggable.js +0 -815
  421. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.droppable.js +0 -285
  422. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.mouse.js +0 -160
  423. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.position.js +0 -252
  424. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.progressbar.js +0 -109
  425. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.resizable.js +0 -814
  426. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.selectable.js +0 -266
  427. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.sortable.js +0 -1077
  428. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/jquery.ui.widget.js +0 -262
  429. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.autocomplete.min.js +0 -32
  430. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.button.min.js +0 -25
  431. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.core.min.js +0 -17
  432. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.datepicker.min.js +0 -82
  433. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.dialog.min.js +0 -40
  434. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.draggable.min.js +0 -50
  435. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.droppable.min.js +0 -26
  436. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.mouse.min.js +0 -17
  437. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.position.min.js +0 -16
  438. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.progressbar.min.js +0 -16
  439. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.resizable.min.js +0 -48
  440. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.selectable.min.js +0 -22
  441. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.sortable.min.js +0 -60
  442. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/ui/minified/jquery.ui.widget.min.js +0 -15
  443. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/development-bundle/version.txt +0 -1
  444. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/index.html +0 -321
  445. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/js/jquery-1.5.1.min.js +0 -16
  446. data/public/javascripts/old_sql/jquery-ui-1.8.13.custom (3)/js/jquery-ui-1.8.13.custom.min.js +0 -467
  447. data/test/dummy/.gitignore +0 -4
  448. data/test/dummy/Gemfile +0 -14
  449. data/test/dummy/Gemfile.lock +0 -78
  450. data/test/dummy/README +0 -256
  451. data/test/dummy/db/schema.rb +0 -15
  452. data/test/dummy/db/seeds.rb +0 -7
  453. data/test/dummy/doc/README_FOR_APP +0 -2
  454. data/test/dummy/public/images/rails.png +0 -0
  455. data/test/dummy/public/index.html +0 -239
  456. data/test/dummy/public/robots.txt +0 -5
  457. data/test/dummy/test/performance/browsing_test.rb +0 -9
  458. data/test/dummy/test/test_helper.rb +0 -14
  459. data/test/dummy/test/unit/hello_world_test.rb +0 -9
@@ -1,1791 +0,0 @@
1
- /*
2
- * jQuery UI Datepicker 1.8.13
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/Datepicker
9
- *
10
- * Depends:
11
- * jquery.ui.core.js
12
- */
13
- (function( $, undefined ) {
14
-
15
- $.extend($.ui, { datepicker: { version: "1.8.13" } });
16
-
17
- var PROP_NAME = 'datepicker';
18
- var dpuuid = new Date().getTime();
19
- var instActive;
20
-
21
- /* Date picker manager.
22
- Use the singleton instance of this class, $.datepicker, to interact with the date picker.
23
- Settings for (groups of) date pickers are maintained in an instance object,
24
- allowing multiple different settings on the same page. */
25
-
26
- function Datepicker() {
27
- this.debug = false; // Change this to true to start debugging
28
- this._curInst = null; // The current instance in use
29
- this._keyEvent = false; // If the last event was a key event
30
- this._disabledInputs = []; // List of date picker inputs that have been disabled
31
- this._datepickerShowing = false; // True if the popup picker is showing , false if not
32
- this._inDialog = false; // True if showing within a "dialog", false if not
33
- this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
34
- this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
35
- this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
36
- this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
37
- this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
38
- this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
39
- this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
40
- this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
41
- this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
42
- this.regional = []; // Available regional settings, indexed by language code
43
- this.regional[''] = { // Default regional settings
44
- closeText: 'Done', // Display text for close link
45
- prevText: 'Prev', // Display text for previous month link
46
- nextText: 'Next', // Display text for next month link
47
- currentText: 'Today', // Display text for current month link
48
- monthNames: ['January','February','March','April','May','June',
49
- 'July','August','September','October','November','December'], // Names of months for drop-down and formatting
50
- monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
51
- dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
52
- dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
53
- dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
54
- weekHeader: 'Wk', // Column header for week of the year
55
- dateFormat: 'mm/dd/yy', // See format options on parseDate
56
- firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
57
- isRTL: false, // True if right-to-left language, false if left-to-right
58
- showMonthAfterYear: false, // True if the year select precedes month, false for month then year
59
- yearSuffix: '' // Additional text to append to the year in the month headers
60
- };
61
- this._defaults = { // Global defaults for all the date picker instances
62
- showOn: 'focus', // 'focus' for popup on focus,
63
- // 'button' for trigger button, or 'both' for either
64
- showAnim: 'fadeIn', // Name of jQuery animation for popup
65
- showOptions: {}, // Options for enhanced animations
66
- defaultDate: null, // Used when field is blank: actual date,
67
- // +/-number for offset from today, null for today
68
- appendText: '', // Display text following the input box, e.g. showing the format
69
- buttonText: '...', // Text for trigger button
70
- buttonImage: '', // URL for trigger button image
71
- buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
72
- hideIfNoPrevNext: false, // True to hide next/previous month links
73
- // if not applicable, false to just disable them
74
- navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
75
- gotoCurrent: false, // True if today link goes back to current selection instead
76
- changeMonth: false, // True if month can be selected directly, false if only prev/next
77
- changeYear: false, // True if year can be selected directly, false if only prev/next
78
- yearRange: 'c-10:c+10', // Range of years to display in drop-down,
79
- // either relative to today's year (-nn:+nn), relative to currently displayed year
80
- // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
81
- showOtherMonths: false, // True to show dates in other months, false to leave blank
82
- selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
83
- showWeek: false, // True to show week of the year, false to not show it
84
- calculateWeek: this.iso8601Week, // How to calculate the week of the year,
85
- // takes a Date and returns the number of the week for it
86
- shortYearCutoff: '+10', // Short year values < this are in the current century,
87
- // > this are in the previous century,
88
- // string value starting with '+' for current year + value
89
- minDate: null, // The earliest selectable date, or null for no limit
90
- maxDate: null, // The latest selectable date, or null for no limit
91
- duration: 'fast', // Duration of display/closure
92
- beforeShowDay: null, // Function that takes a date and returns an array with
93
- // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
94
- // [2] = cell title (optional), e.g. $.datepicker.noWeekends
95
- beforeShow: null, // Function that takes an input field and
96
- // returns a set of custom settings for the date picker
97
- onSelect: null, // Define a callback function when a date is selected
98
- onChangeMonthYear: null, // Define a callback function when the month or year is changed
99
- onClose: null, // Define a callback function when the datepicker is closed
100
- numberOfMonths: 1, // Number of months to show at a time
101
- showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
102
- stepMonths: 1, // Number of months to step back/forward
103
- stepBigMonths: 12, // Number of months to step back/forward for the big links
104
- altField: '', // Selector for an alternate field to store selected dates into
105
- altFormat: '', // The date format to use for the alternate field
106
- constrainInput: true, // The input is constrained by the current date format
107
- showButtonPanel: false, // True to show button panel, false to not show it
108
- autoSize: false // True to size the input for the date format, false to leave as is
109
- };
110
- $.extend(this._defaults, this.regional['']);
111
- this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'));
112
- }
113
-
114
- $.extend(Datepicker.prototype, {
115
- /* Class name added to elements to indicate already configured with a date picker. */
116
- markerClassName: 'hasDatepicker',
117
-
118
- /* Debug logging (if enabled). */
119
- log: function () {
120
- if (this.debug)
121
- console.log.apply('', arguments);
122
- },
123
-
124
- // TODO rename to "widget" when switching to widget factory
125
- _widgetDatepicker: function() {
126
- return this.dpDiv;
127
- },
128
-
129
- /* Override the default settings for all instances of the date picker.
130
- @param settings object - the new settings to use as defaults (anonymous object)
131
- @return the manager object */
132
- setDefaults: function(settings) {
133
- extendRemove(this._defaults, settings || {});
134
- return this;
135
- },
136
-
137
- /* Attach the date picker to a jQuery selection.
138
- @param target element - the target input field or division or span
139
- @param settings object - the new settings to use for this date picker instance (anonymous) */
140
- _attachDatepicker: function(target, settings) {
141
- // check for settings on the control itself - in namespace 'date:'
142
- var inlineSettings = null;
143
- for (var attrName in this._defaults) {
144
- var attrValue = target.getAttribute('date:' + attrName);
145
- if (attrValue) {
146
- inlineSettings = inlineSettings || {};
147
- try {
148
- inlineSettings[attrName] = eval(attrValue);
149
- } catch (err) {
150
- inlineSettings[attrName] = attrValue;
151
- }
152
- }
153
- }
154
- var nodeName = target.nodeName.toLowerCase();
155
- var inline = (nodeName == 'div' || nodeName == 'span');
156
- if (!target.id) {
157
- this.uuid += 1;
158
- target.id = 'dp' + this.uuid;
159
- }
160
- var inst = this._newInst($(target), inline);
161
- inst.settings = $.extend({}, settings || {}, inlineSettings || {});
162
- if (nodeName == 'input') {
163
- this._connectDatepicker(target, inst);
164
- } else if (inline) {
165
- this._inlineDatepicker(target, inst);
166
- }
167
- },
168
-
169
- /* Create a new instance object. */
170
- _newInst: function(target, inline) {
171
- var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
172
- return {id: id, input: target, // associated target
173
- selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
174
- drawMonth: 0, drawYear: 0, // month being drawn
175
- inline: inline, // is datepicker inline or not
176
- dpDiv: (!inline ? this.dpDiv : // presentation div
177
- bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')))};
178
- },
179
-
180
- /* Attach the date picker to an input field. */
181
- _connectDatepicker: function(target, inst) {
182
- var input = $(target);
183
- inst.append = $([]);
184
- inst.trigger = $([]);
185
- if (input.hasClass(this.markerClassName))
186
- return;
187
- this._attachments(input, inst);
188
- input.addClass(this.markerClassName).keydown(this._doKeyDown).
189
- keypress(this._doKeyPress).keyup(this._doKeyUp).
190
- bind("setData.datepicker", function(event, key, value) {
191
- inst.settings[key] = value;
192
- }).bind("getData.datepicker", function(event, key) {
193
- return this._get(inst, key);
194
- });
195
- this._autoSize(inst);
196
- $.data(target, PROP_NAME, inst);
197
- },
198
-
199
- /* Make attachments based on settings. */
200
- _attachments: function(input, inst) {
201
- var appendText = this._get(inst, 'appendText');
202
- var isRTL = this._get(inst, 'isRTL');
203
- if (inst.append)
204
- inst.append.remove();
205
- if (appendText) {
206
- inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
207
- input[isRTL ? 'before' : 'after'](inst.append);
208
- }
209
- input.unbind('focus', this._showDatepicker);
210
- if (inst.trigger)
211
- inst.trigger.remove();
212
- var showOn = this._get(inst, 'showOn');
213
- if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
214
- input.focus(this._showDatepicker);
215
- if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
216
- var buttonText = this._get(inst, 'buttonText');
217
- var buttonImage = this._get(inst, 'buttonImage');
218
- inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
219
- $('<img/>').addClass(this._triggerClass).
220
- attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
221
- $('<button type="button"></button>').addClass(this._triggerClass).
222
- html(buttonImage == '' ? buttonText : $('<img/>').attr(
223
- { src:buttonImage, alt:buttonText, title:buttonText })));
224
- input[isRTL ? 'before' : 'after'](inst.trigger);
225
- inst.trigger.click(function() {
226
- if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
227
- $.datepicker._hideDatepicker();
228
- else
229
- $.datepicker._showDatepicker(input[0]);
230
- return false;
231
- });
232
- }
233
- },
234
-
235
- /* Apply the maximum length for the date format. */
236
- _autoSize: function(inst) {
237
- if (this._get(inst, 'autoSize') && !inst.inline) {
238
- var date = new Date(2009, 12 - 1, 20); // Ensure double digits
239
- var dateFormat = this._get(inst, 'dateFormat');
240
- if (dateFormat.match(/[DM]/)) {
241
- var findMax = function(names) {
242
- var max = 0;
243
- var maxI = 0;
244
- for (var i = 0; i < names.length; i++) {
245
- if (names[i].length > max) {
246
- max = names[i].length;
247
- maxI = i;
248
- }
249
- }
250
- return maxI;
251
- };
252
- date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
253
- 'monthNames' : 'monthNamesShort'))));
254
- date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
255
- 'dayNames' : 'dayNamesShort'))) + 20 - date.getDay());
256
- }
257
- inst.input.attr('size', this._formatDate(inst, date).length);
258
- }
259
- },
260
-
261
- /* Attach an inline date picker to a div. */
262
- _inlineDatepicker: function(target, inst) {
263
- var divSpan = $(target);
264
- if (divSpan.hasClass(this.markerClassName))
265
- return;
266
- divSpan.addClass(this.markerClassName).append(inst.dpDiv).
267
- bind("setData.datepicker", function(event, key, value){
268
- inst.settings[key] = value;
269
- }).bind("getData.datepicker", function(event, key){
270
- return this._get(inst, key);
271
- });
272
- $.data(target, PROP_NAME, inst);
273
- this._setDate(inst, this._getDefaultDate(inst), true);
274
- this._updateDatepicker(inst);
275
- this._updateAlternate(inst);
276
- inst.dpDiv.show();
277
- },
278
-
279
- /* Pop-up the date picker in a "dialog" box.
280
- @param input element - ignored
281
- @param date string or Date - the initial date to display
282
- @param onSelect function - the function to call when a date is selected
283
- @param settings object - update the dialog date picker instance's settings (anonymous object)
284
- @param pos int[2] - coordinates for the dialog's position within the screen or
285
- event - with x/y coordinates or
286
- leave empty for default (screen centre)
287
- @return the manager object */
288
- _dialogDatepicker: function(input, date, onSelect, settings, pos) {
289
- var inst = this._dialogInst; // internal instance
290
- if (!inst) {
291
- this.uuid += 1;
292
- var id = 'dp' + this.uuid;
293
- this._dialogInput = $('<input type="text" id="' + id +
294
- '" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
295
- this._dialogInput.keydown(this._doKeyDown);
296
- $('body').append(this._dialogInput);
297
- inst = this._dialogInst = this._newInst(this._dialogInput, false);
298
- inst.settings = {};
299
- $.data(this._dialogInput[0], PROP_NAME, inst);
300
- }
301
- extendRemove(inst.settings, settings || {});
302
- date = (date && date.constructor == Date ? this._formatDate(inst, date) : date);
303
- this._dialogInput.val(date);
304
-
305
- this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
306
- if (!this._pos) {
307
- var browserWidth = document.documentElement.clientWidth;
308
- var browserHeight = document.documentElement.clientHeight;
309
- var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
310
- var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
311
- this._pos = // should use actual width/height below
312
- [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
313
- }
314
-
315
- // move input on screen for focus, but hidden behind dialog
316
- this._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px');
317
- inst.settings.onSelect = onSelect;
318
- this._inDialog = true;
319
- this.dpDiv.addClass(this._dialogClass);
320
- this._showDatepicker(this._dialogInput[0]);
321
- if ($.blockUI)
322
- $.blockUI(this.dpDiv);
323
- $.data(this._dialogInput[0], PROP_NAME, inst);
324
- return this;
325
- },
326
-
327
- /* Detach a datepicker from its control.
328
- @param target element - the target input field or division or span */
329
- _destroyDatepicker: function(target) {
330
- var $target = $(target);
331
- var inst = $.data(target, PROP_NAME);
332
- if (!$target.hasClass(this.markerClassName)) {
333
- return;
334
- }
335
- var nodeName = target.nodeName.toLowerCase();
336
- $.removeData(target, PROP_NAME);
337
- if (nodeName == 'input') {
338
- inst.append.remove();
339
- inst.trigger.remove();
340
- $target.removeClass(this.markerClassName).
341
- unbind('focus', this._showDatepicker).
342
- unbind('keydown', this._doKeyDown).
343
- unbind('keypress', this._doKeyPress).
344
- unbind('keyup', this._doKeyUp);
345
- } else if (nodeName == 'div' || nodeName == 'span')
346
- $target.removeClass(this.markerClassName).empty();
347
- },
348
-
349
- /* Enable the date picker to a jQuery selection.
350
- @param target element - the target input field or division or span */
351
- _enableDatepicker: function(target) {
352
- var $target = $(target);
353
- var inst = $.data(target, PROP_NAME);
354
- if (!$target.hasClass(this.markerClassName)) {
355
- return;
356
- }
357
- var nodeName = target.nodeName.toLowerCase();
358
- if (nodeName == 'input') {
359
- target.disabled = false;
360
- inst.trigger.filter('button').
361
- each(function() { this.disabled = false; }).end().
362
- filter('img').css({opacity: '1.0', cursor: ''});
363
- }
364
- else if (nodeName == 'div' || nodeName == 'span') {
365
- var inline = $target.children('.' + this._inlineClass);
366
- inline.children().removeClass('ui-state-disabled');
367
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
368
- removeAttr("disabled");
369
- }
370
- this._disabledInputs = $.map(this._disabledInputs,
371
- function(value) { return (value == target ? null : value); }); // delete entry
372
- },
373
-
374
- /* Disable the date picker to a jQuery selection.
375
- @param target element - the target input field or division or span */
376
- _disableDatepicker: function(target) {
377
- var $target = $(target);
378
- var inst = $.data(target, PROP_NAME);
379
- if (!$target.hasClass(this.markerClassName)) {
380
- return;
381
- }
382
- var nodeName = target.nodeName.toLowerCase();
383
- if (nodeName == 'input') {
384
- target.disabled = true;
385
- inst.trigger.filter('button').
386
- each(function() { this.disabled = true; }).end().
387
- filter('img').css({opacity: '0.5', cursor: 'default'});
388
- }
389
- else if (nodeName == 'div' || nodeName == 'span') {
390
- var inline = $target.children('.' + this._inlineClass);
391
- inline.children().addClass('ui-state-disabled');
392
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
393
- attr("disabled", "disabled");
394
- }
395
- this._disabledInputs = $.map(this._disabledInputs,
396
- function(value) { return (value == target ? null : value); }); // delete entry
397
- this._disabledInputs[this._disabledInputs.length] = target;
398
- },
399
-
400
- /* Is the first field in a jQuery collection disabled as a datepicker?
401
- @param target element - the target input field or division or span
402
- @return boolean - true if disabled, false if enabled */
403
- _isDisabledDatepicker: function(target) {
404
- if (!target) {
405
- return false;
406
- }
407
- for (var i = 0; i < this._disabledInputs.length; i++) {
408
- if (this._disabledInputs[i] == target)
409
- return true;
410
- }
411
- return false;
412
- },
413
-
414
- /* Retrieve the instance data for the target control.
415
- @param target element - the target input field or division or span
416
- @return object - the associated instance data
417
- @throws error if a jQuery problem getting data */
418
- _getInst: function(target) {
419
- try {
420
- return $.data(target, PROP_NAME);
421
- }
422
- catch (err) {
423
- throw 'Missing instance data for this datepicker';
424
- }
425
- },
426
-
427
- /* Update or retrieve the settings for a date picker attached to an input field or division.
428
- @param target element - the target input field or division or span
429
- @param name object - the new settings to update or
430
- string - the name of the setting to change or retrieve,
431
- when retrieving also 'all' for all instance settings or
432
- 'defaults' for all global defaults
433
- @param value any - the new value for the setting
434
- (omit if above is an object or to retrieve a value) */
435
- _optionDatepicker: function(target, name, value) {
436
- var inst = this._getInst(target);
437
- if (arguments.length == 2 && typeof name == 'string') {
438
- return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
439
- (inst ? (name == 'all' ? $.extend({}, inst.settings) :
440
- this._get(inst, name)) : null));
441
- }
442
- var settings = name || {};
443
- if (typeof name == 'string') {
444
- settings = {};
445
- settings[name] = value;
446
- }
447
- if (inst) {
448
- if (this._curInst == inst) {
449
- this._hideDatepicker();
450
- }
451
- var date = this._getDateDatepicker(target, true);
452
- var minDate = this._getMinMaxDate(inst, 'min');
453
- var maxDate = this._getMinMaxDate(inst, 'max');
454
- extendRemove(inst.settings, settings);
455
- // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
456
- if (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined)
457
- inst.settings.minDate = this._formatDate(inst, minDate);
458
- if (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined)
459
- inst.settings.maxDate = this._formatDate(inst, maxDate);
460
- this._attachments($(target), inst);
461
- this._autoSize(inst);
462
- this._setDate(inst, date);
463
- this._updateAlternate(inst);
464
- this._updateDatepicker(inst);
465
- }
466
- },
467
-
468
- // change method deprecated
469
- _changeDatepicker: function(target, name, value) {
470
- this._optionDatepicker(target, name, value);
471
- },
472
-
473
- /* Redraw the date picker attached to an input field or division.
474
- @param target element - the target input field or division or span */
475
- _refreshDatepicker: function(target) {
476
- var inst = this._getInst(target);
477
- if (inst) {
478
- this._updateDatepicker(inst);
479
- }
480
- },
481
-
482
- /* Set the dates for a jQuery selection.
483
- @param target element - the target input field or division or span
484
- @param date Date - the new date */
485
- _setDateDatepicker: function(target, date) {
486
- var inst = this._getInst(target);
487
- if (inst) {
488
- this._setDate(inst, date);
489
- this._updateDatepicker(inst);
490
- this._updateAlternate(inst);
491
- }
492
- },
493
-
494
- /* Get the date(s) for the first entry in a jQuery selection.
495
- @param target element - the target input field or division or span
496
- @param noDefault boolean - true if no default date is to be used
497
- @return Date - the current date */
498
- _getDateDatepicker: function(target, noDefault) {
499
- var inst = this._getInst(target);
500
- if (inst && !inst.inline)
501
- this._setDateFromField(inst, noDefault);
502
- return (inst ? this._getDate(inst) : null);
503
- },
504
-
505
- /* Handle keystrokes. */
506
- _doKeyDown: function(event) {
507
- var inst = $.datepicker._getInst(event.target);
508
- var handled = true;
509
- var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
510
- inst._keyEvent = true;
511
- if ($.datepicker._datepickerShowing)
512
- switch (event.keyCode) {
513
- case 9: $.datepicker._hideDatepicker();
514
- handled = false;
515
- break; // hide on tab out
516
- case 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' +
517
- $.datepicker._currentClass + ')', inst.dpDiv);
518
- if (sel[0])
519
- $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
520
- else
521
- $.datepicker._hideDatepicker();
522
- return false; // don't submit the form
523
- break; // select the value on enter
524
- case 27: $.datepicker._hideDatepicker();
525
- break; // hide on escape
526
- case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
527
- -$.datepicker._get(inst, 'stepBigMonths') :
528
- -$.datepicker._get(inst, 'stepMonths')), 'M');
529
- break; // previous month/year on page up/+ ctrl
530
- case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
531
- +$.datepicker._get(inst, 'stepBigMonths') :
532
- +$.datepicker._get(inst, 'stepMonths')), 'M');
533
- break; // next month/year on page down/+ ctrl
534
- case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
535
- handled = event.ctrlKey || event.metaKey;
536
- break; // clear on ctrl or command +end
537
- case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
538
- handled = event.ctrlKey || event.metaKey;
539
- break; // current on ctrl or command +home
540
- case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
541
- handled = event.ctrlKey || event.metaKey;
542
- // -1 day on ctrl or command +left
543
- if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
544
- -$.datepicker._get(inst, 'stepBigMonths') :
545
- -$.datepicker._get(inst, 'stepMonths')), 'M');
546
- // next month/year on alt +left on Mac
547
- break;
548
- case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
549
- handled = event.ctrlKey || event.metaKey;
550
- break; // -1 week on ctrl or command +up
551
- case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
552
- handled = event.ctrlKey || event.metaKey;
553
- // +1 day on ctrl or command +right
554
- if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
555
- +$.datepicker._get(inst, 'stepBigMonths') :
556
- +$.datepicker._get(inst, 'stepMonths')), 'M');
557
- // next month/year on alt +right
558
- break;
559
- case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
560
- handled = event.ctrlKey || event.metaKey;
561
- break; // +1 week on ctrl or command +down
562
- default: handled = false;
563
- }
564
- else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
565
- $.datepicker._showDatepicker(this);
566
- else {
567
- handled = false;
568
- }
569
- if (handled) {
570
- event.preventDefault();
571
- event.stopPropagation();
572
- }
573
- },
574
-
575
- /* Filter entered characters - based on date format. */
576
- _doKeyPress: function(event) {
577
- var inst = $.datepicker._getInst(event.target);
578
- if ($.datepicker._get(inst, 'constrainInput')) {
579
- var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
580
- var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
581
- return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
582
- }
583
- },
584
-
585
- /* Synchronise manual entry and field/alternate field. */
586
- _doKeyUp: function(event) {
587
- var inst = $.datepicker._getInst(event.target);
588
- if (inst.input.val() != inst.lastVal) {
589
- try {
590
- var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
591
- (inst.input ? inst.input.val() : null),
592
- $.datepicker._getFormatConfig(inst));
593
- if (date) { // only if valid
594
- $.datepicker._setDateFromField(inst);
595
- $.datepicker._updateAlternate(inst);
596
- $.datepicker._updateDatepicker(inst);
597
- }
598
- }
599
- catch (event) {
600
- $.datepicker.log(event);
601
- }
602
- }
603
- return true;
604
- },
605
-
606
- /* Pop-up the date picker for a given input field.
607
- @param input element - the input field attached to the date picker or
608
- event - if triggered by focus */
609
- _showDatepicker: function(input) {
610
- input = input.target || input;
611
- if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
612
- input = $('input', input.parentNode)[0];
613
- if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
614
- return;
615
- var inst = $.datepicker._getInst(input);
616
- if ($.datepicker._curInst && $.datepicker._curInst != inst) {
617
- $.datepicker._curInst.dpDiv.stop(true, true);
618
- }
619
- var beforeShow = $.datepicker._get(inst, 'beforeShow');
620
- extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
621
- inst.lastVal = null;
622
- $.datepicker._lastInput = input;
623
- $.datepicker._setDateFromField(inst);
624
- if ($.datepicker._inDialog) // hide cursor
625
- input.value = '';
626
- if (!$.datepicker._pos) { // position below input
627
- $.datepicker._pos = $.datepicker._findPos(input);
628
- $.datepicker._pos[1] += input.offsetHeight; // add the height
629
- }
630
- var isFixed = false;
631
- $(input).parents().each(function() {
632
- isFixed |= $(this).css('position') == 'fixed';
633
- return !isFixed;
634
- });
635
- if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
636
- $.datepicker._pos[0] -= document.documentElement.scrollLeft;
637
- $.datepicker._pos[1] -= document.documentElement.scrollTop;
638
- }
639
- var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
640
- $.datepicker._pos = null;
641
- //to avoid flashes on Firefox
642
- inst.dpDiv.empty();
643
- // determine sizing offscreen
644
- inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
645
- $.datepicker._updateDatepicker(inst);
646
- // fix width for dynamic number of date pickers
647
- // and adjust position before showing
648
- offset = $.datepicker._checkOffset(inst, offset, isFixed);
649
- inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
650
- 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
651
- left: offset.left + 'px', top: offset.top + 'px'});
652
- if (!inst.inline) {
653
- var showAnim = $.datepicker._get(inst, 'showAnim');
654
- var duration = $.datepicker._get(inst, 'duration');
655
- var postProcess = function() {
656
- var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
657
- if( !! cover.length ){
658
- var borders = $.datepicker._getBorders(inst.dpDiv);
659
- cover.css({left: -borders[0], top: -borders[1],
660
- width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
661
- }
662
- };
663
- inst.dpDiv.zIndex($(input).zIndex()+1);
664
- $.datepicker._datepickerShowing = true;
665
- if ($.effects && $.effects[showAnim])
666
- inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
667
- else
668
- inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
669
- if (!showAnim || !duration)
670
- postProcess();
671
- if (inst.input.is(':visible') && !inst.input.is(':disabled'))
672
- inst.input.focus();
673
- $.datepicker._curInst = inst;
674
- }
675
- },
676
-
677
- /* Generate the date picker content. */
678
- _updateDatepicker: function(inst) {
679
- var self = this;
680
- var borders = $.datepicker._getBorders(inst.dpDiv);
681
- instActive = inst; // for delegate hover events
682
- inst.dpDiv.empty().append(this._generateHTML(inst));
683
- var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
684
- if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
685
- cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
686
- }
687
- inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();
688
- var numMonths = this._getNumberOfMonths(inst);
689
- var cols = numMonths[1];
690
- var width = 17;
691
- inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
692
- if (cols > 1)
693
- inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
694
- inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
695
- 'Class']('ui-datepicker-multi');
696
- inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
697
- 'Class']('ui-datepicker-rtl');
698
- if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
699
- // #6694 - don't focus the input if it's already focused
700
- // this breaks the change event in IE
701
- inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
702
- inst.input.focus();
703
- // deffered render of the years select (to avoid flashes on Firefox)
704
- if( inst.yearshtml ){
705
- var origyearshtml = inst.yearshtml;
706
- setTimeout(function(){
707
- //assure that inst.yearshtml didn't change.
708
- if( origyearshtml === inst.yearshtml && inst.yearshtml ){
709
- inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
710
- }
711
- origyearshtml = inst.yearshtml = null;
712
- }, 0);
713
- }
714
- },
715
-
716
- /* Retrieve the size of left and top borders for an element.
717
- @param elem (jQuery object) the element of interest
718
- @return (number[2]) the left and top borders */
719
- _getBorders: function(elem) {
720
- var convert = function(value) {
721
- return {thin: 1, medium: 2, thick: 3}[value] || value;
722
- };
723
- return [parseFloat(convert(elem.css('border-left-width'))),
724
- parseFloat(convert(elem.css('border-top-width')))];
725
- },
726
-
727
- /* Check positioning to remain on screen. */
728
- _checkOffset: function(inst, offset, isFixed) {
729
- var dpWidth = inst.dpDiv.outerWidth();
730
- var dpHeight = inst.dpDiv.outerHeight();
731
- var inputWidth = inst.input ? inst.input.outerWidth() : 0;
732
- var inputHeight = inst.input ? inst.input.outerHeight() : 0;
733
- var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
734
- var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
735
-
736
- offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
737
- offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
738
- offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
739
-
740
- // now check if datepicker is showing outside window viewport - move to a better place if so.
741
- offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
742
- Math.abs(offset.left + dpWidth - viewWidth) : 0);
743
- offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
744
- Math.abs(dpHeight + inputHeight) : 0);
745
-
746
- return offset;
747
- },
748
-
749
- /* Find an object's position on the screen. */
750
- _findPos: function(obj) {
751
- var inst = this._getInst(obj);
752
- var isRTL = this._get(inst, 'isRTL');
753
- while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) {
754
- obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
755
- }
756
- var position = $(obj).offset();
757
- return [position.left, position.top];
758
- },
759
-
760
- /* Hide the date picker from view.
761
- @param input element - the input field attached to the date picker */
762
- _hideDatepicker: function(input) {
763
- var inst = this._curInst;
764
- if (!inst || (input && inst != $.data(input, PROP_NAME)))
765
- return;
766
- if (this._datepickerShowing) {
767
- var showAnim = this._get(inst, 'showAnim');
768
- var duration = this._get(inst, 'duration');
769
- var postProcess = function() {
770
- $.datepicker._tidyDialog(inst);
771
- this._curInst = null;
772
- };
773
- if ($.effects && $.effects[showAnim])
774
- inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
775
- else
776
- inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
777
- (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
778
- if (!showAnim)
779
- postProcess();
780
- var onClose = this._get(inst, 'onClose');
781
- if (onClose)
782
- onClose.apply((inst.input ? inst.input[0] : null),
783
- [(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback
784
- this._datepickerShowing = false;
785
- this._lastInput = null;
786
- if (this._inDialog) {
787
- this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
788
- if ($.blockUI) {
789
- $.unblockUI();
790
- $('body').append(this.dpDiv);
791
- }
792
- }
793
- this._inDialog = false;
794
- }
795
- },
796
-
797
- /* Tidy up after a dialog display. */
798
- _tidyDialog: function(inst) {
799
- inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
800
- },
801
-
802
- /* Close date picker if clicked elsewhere. */
803
- _checkExternalClick: function(event) {
804
- if (!$.datepicker._curInst)
805
- return;
806
- var $target = $(event.target);
807
- if ($target[0].id != $.datepicker._mainDivId &&
808
- $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
809
- !$target.hasClass($.datepicker.markerClassName) &&
810
- !$target.hasClass($.datepicker._triggerClass) &&
811
- $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
812
- $.datepicker._hideDatepicker();
813
- },
814
-
815
- /* Adjust one of the date sub-fields. */
816
- _adjustDate: function(id, offset, period) {
817
- var target = $(id);
818
- var inst = this._getInst(target[0]);
819
- if (this._isDisabledDatepicker(target[0])) {
820
- return;
821
- }
822
- this._adjustInstDate(inst, offset +
823
- (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
824
- period);
825
- this._updateDatepicker(inst);
826
- },
827
-
828
- /* Action for current link. */
829
- _gotoToday: function(id) {
830
- var target = $(id);
831
- var inst = this._getInst(target[0]);
832
- if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
833
- inst.selectedDay = inst.currentDay;
834
- inst.drawMonth = inst.selectedMonth = inst.currentMonth;
835
- inst.drawYear = inst.selectedYear = inst.currentYear;
836
- }
837
- else {
838
- var date = new Date();
839
- inst.selectedDay = date.getDate();
840
- inst.drawMonth = inst.selectedMonth = date.getMonth();
841
- inst.drawYear = inst.selectedYear = date.getFullYear();
842
- }
843
- this._notifyChange(inst);
844
- this._adjustDate(target);
845
- },
846
-
847
- /* Action for selecting a new month/year. */
848
- _selectMonthYear: function(id, select, period) {
849
- var target = $(id);
850
- var inst = this._getInst(target[0]);
851
- inst._selectingMonthYear = false;
852
- inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
853
- inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
854
- parseInt(select.options[select.selectedIndex].value,10);
855
- this._notifyChange(inst);
856
- this._adjustDate(target);
857
- },
858
-
859
- /* Restore input focus after not changing month/year. */
860
- _clickMonthYear: function(id) {
861
- var target = $(id);
862
- var inst = this._getInst(target[0]);
863
- if (inst.input && inst._selectingMonthYear) {
864
- setTimeout(function() {
865
- inst.input.focus();
866
- }, 0);
867
- }
868
- inst._selectingMonthYear = !inst._selectingMonthYear;
869
- },
870
-
871
- /* Action for selecting a day. */
872
- _selectDay: function(id, month, year, td) {
873
- var target = $(id);
874
- if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
875
- return;
876
- }
877
- var inst = this._getInst(target[0]);
878
- inst.selectedDay = inst.currentDay = $('a', td).html();
879
- inst.selectedMonth = inst.currentMonth = month;
880
- inst.selectedYear = inst.currentYear = year;
881
- this._selectDate(id, this._formatDate(inst,
882
- inst.currentDay, inst.currentMonth, inst.currentYear));
883
- },
884
-
885
- /* Erase the input field and hide the date picker. */
886
- _clearDate: function(id) {
887
- var target = $(id);
888
- var inst = this._getInst(target[0]);
889
- this._selectDate(target, '');
890
- },
891
-
892
- /* Update the input field with the selected date. */
893
- _selectDate: function(id, dateStr) {
894
- var target = $(id);
895
- var inst = this._getInst(target[0]);
896
- dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
897
- if (inst.input)
898
- inst.input.val(dateStr);
899
- this._updateAlternate(inst);
900
- var onSelect = this._get(inst, 'onSelect');
901
- if (onSelect)
902
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
903
- else if (inst.input)
904
- inst.input.trigger('change'); // fire the change event
905
- if (inst.inline)
906
- this._updateDatepicker(inst);
907
- else {
908
- this._hideDatepicker();
909
- this._lastInput = inst.input[0];
910
- if (typeof(inst.input[0]) != 'object')
911
- inst.input.focus(); // restore focus
912
- this._lastInput = null;
913
- }
914
- },
915
-
916
- /* Update any alternate field to synchronise with the main field. */
917
- _updateAlternate: function(inst) {
918
- var altField = this._get(inst, 'altField');
919
- if (altField) { // update alternate field too
920
- var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
921
- var date = this._getDate(inst);
922
- var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
923
- $(altField).each(function() { $(this).val(dateStr); });
924
- }
925
- },
926
-
927
- /* Set as beforeShowDay function to prevent selection of weekends.
928
- @param date Date - the date to customise
929
- @return [boolean, string] - is this date selectable?, what is its CSS class? */
930
- noWeekends: function(date) {
931
- var day = date.getDay();
932
- return [(day > 0 && day < 6), ''];
933
- },
934
-
935
- /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
936
- @param date Date - the date to get the week for
937
- @return number - the number of the week within the year that contains this date */
938
- iso8601Week: function(date) {
939
- var checkDate = new Date(date.getTime());
940
- // Find Thursday of this week starting on Monday
941
- checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
942
- var time = checkDate.getTime();
943
- checkDate.setMonth(0); // Compare with Jan 1
944
- checkDate.setDate(1);
945
- return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
946
- },
947
-
948
- /* Parse a string value into a date object.
949
- See formatDate below for the possible formats.
950
-
951
- @param format string - the expected format of the date
952
- @param value string - the date in the above format
953
- @param settings Object - attributes include:
954
- shortYearCutoff number - the cutoff year for determining the century (optional)
955
- dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
956
- dayNames string[7] - names of the days from Sunday (optional)
957
- monthNamesShort string[12] - abbreviated names of the months (optional)
958
- monthNames string[12] - names of the months (optional)
959
- @return Date - the extracted date value or null if value is blank */
960
- parseDate: function (format, value, settings) {
961
- if (format == null || value == null)
962
- throw 'Invalid arguments';
963
- value = (typeof value == 'object' ? value.toString() : value + '');
964
- if (value == '')
965
- return null;
966
- var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
967
- shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
968
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
969
- var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
970
- var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
971
- var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
972
- var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
973
- var year = -1;
974
- var month = -1;
975
- var day = -1;
976
- var doy = -1;
977
- var literal = false;
978
- // Check whether a format character is doubled
979
- var lookAhead = function(match) {
980
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
981
- if (matches)
982
- iFormat++;
983
- return matches;
984
- };
985
- // Extract a number from the string value
986
- var getNumber = function(match) {
987
- var isDoubled = lookAhead(match);
988
- var size = (match == '@' ? 14 : (match == '!' ? 20 :
989
- (match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2))));
990
- var digits = new RegExp('^\\d{1,' + size + '}');
991
- var num = value.substring(iValue).match(digits);
992
- if (!num)
993
- throw 'Missing number at position ' + iValue;
994
- iValue += num[0].length;
995
- return parseInt(num[0], 10);
996
- };
997
- // Extract a name from the string value and convert to an index
998
- var getName = function(match, shortNames, longNames) {
999
- var names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
1000
- return [ [k, v] ];
1001
- }).sort(function (a, b) {
1002
- return -(a[1].length - b[1].length);
1003
- });
1004
- var index = -1;
1005
- $.each(names, function (i, pair) {
1006
- var name = pair[1];
1007
- if (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) {
1008
- index = pair[0];
1009
- iValue += name.length;
1010
- return false;
1011
- }
1012
- });
1013
- if (index != -1)
1014
- return index + 1;
1015
- else
1016
- throw 'Unknown name at position ' + iValue;
1017
- };
1018
- // Confirm that a literal character matches the string value
1019
- var checkLiteral = function() {
1020
- if (value.charAt(iValue) != format.charAt(iFormat))
1021
- throw 'Unexpected literal at position ' + iValue;
1022
- iValue++;
1023
- };
1024
- var iValue = 0;
1025
- for (var iFormat = 0; iFormat < format.length; iFormat++) {
1026
- if (literal)
1027
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
1028
- literal = false;
1029
- else
1030
- checkLiteral();
1031
- else
1032
- switch (format.charAt(iFormat)) {
1033
- case 'd':
1034
- day = getNumber('d');
1035
- break;
1036
- case 'D':
1037
- getName('D', dayNamesShort, dayNames);
1038
- break;
1039
- case 'o':
1040
- doy = getNumber('o');
1041
- break;
1042
- case 'm':
1043
- month = getNumber('m');
1044
- break;
1045
- case 'M':
1046
- month = getName('M', monthNamesShort, monthNames);
1047
- break;
1048
- case 'y':
1049
- year = getNumber('y');
1050
- break;
1051
- case '@':
1052
- var date = new Date(getNumber('@'));
1053
- year = date.getFullYear();
1054
- month = date.getMonth() + 1;
1055
- day = date.getDate();
1056
- break;
1057
- case '!':
1058
- var date = new Date((getNumber('!') - this._ticksTo1970) / 10000);
1059
- year = date.getFullYear();
1060
- month = date.getMonth() + 1;
1061
- day = date.getDate();
1062
- break;
1063
- case "'":
1064
- if (lookAhead("'"))
1065
- checkLiteral();
1066
- else
1067
- literal = true;
1068
- break;
1069
- default:
1070
- checkLiteral();
1071
- }
1072
- }
1073
- if (year == -1)
1074
- year = new Date().getFullYear();
1075
- else if (year < 100)
1076
- year += new Date().getFullYear() - new Date().getFullYear() % 100 +
1077
- (year <= shortYearCutoff ? 0 : -100);
1078
- if (doy > -1) {
1079
- month = 1;
1080
- day = doy;
1081
- do {
1082
- var dim = this._getDaysInMonth(year, month - 1);
1083
- if (day <= dim)
1084
- break;
1085
- month++;
1086
- day -= dim;
1087
- } while (true);
1088
- }
1089
- var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
1090
- if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
1091
- throw 'Invalid date'; // E.g. 31/02/00
1092
- return date;
1093
- },
1094
-
1095
- /* Standard date formats. */
1096
- ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
1097
- COOKIE: 'D, dd M yy',
1098
- ISO_8601: 'yy-mm-dd',
1099
- RFC_822: 'D, d M y',
1100
- RFC_850: 'DD, dd-M-y',
1101
- RFC_1036: 'D, d M y',
1102
- RFC_1123: 'D, d M yy',
1103
- RFC_2822: 'D, d M yy',
1104
- RSS: 'D, d M y', // RFC 822
1105
- TICKS: '!',
1106
- TIMESTAMP: '@',
1107
- W3C: 'yy-mm-dd', // ISO 8601
1108
-
1109
- _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
1110
- Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
1111
-
1112
- /* Format a date object into a string value.
1113
- The format can be combinations of the following:
1114
- d - day of month (no leading zero)
1115
- dd - day of month (two digit)
1116
- o - day of year (no leading zeros)
1117
- oo - day of year (three digit)
1118
- D - day name short
1119
- DD - day name long
1120
- m - month of year (no leading zero)
1121
- mm - month of year (two digit)
1122
- M - month name short
1123
- MM - month name long
1124
- y - year (two digit)
1125
- yy - year (four digit)
1126
- @ - Unix timestamp (ms since 01/01/1970)
1127
- ! - Windows ticks (100ns since 01/01/0001)
1128
- '...' - literal text
1129
- '' - single quote
1130
-
1131
- @param format string - the desired format of the date
1132
- @param date Date - the date value to format
1133
- @param settings Object - attributes include:
1134
- dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
1135
- dayNames string[7] - names of the days from Sunday (optional)
1136
- monthNamesShort string[12] - abbreviated names of the months (optional)
1137
- monthNames string[12] - names of the months (optional)
1138
- @return string - the date in the above format */
1139
- formatDate: function (format, date, settings) {
1140
- if (!date)
1141
- return '';
1142
- var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
1143
- var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
1144
- var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
1145
- var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
1146
- // Check whether a format character is doubled
1147
- var lookAhead = function(match) {
1148
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
1149
- if (matches)
1150
- iFormat++;
1151
- return matches;
1152
- };
1153
- // Format a number, with leading zero if necessary
1154
- var formatNumber = function(match, value, len) {
1155
- var num = '' + value;
1156
- if (lookAhead(match))
1157
- while (num.length < len)
1158
- num = '0' + num;
1159
- return num;
1160
- };
1161
- // Format a name, short or long as requested
1162
- var formatName = function(match, value, shortNames, longNames) {
1163
- return (lookAhead(match) ? longNames[value] : shortNames[value]);
1164
- };
1165
- var output = '';
1166
- var literal = false;
1167
- if (date)
1168
- for (var iFormat = 0; iFormat < format.length; iFormat++) {
1169
- if (literal)
1170
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
1171
- literal = false;
1172
- else
1173
- output += format.charAt(iFormat);
1174
- else
1175
- switch (format.charAt(iFormat)) {
1176
- case 'd':
1177
- output += formatNumber('d', date.getDate(), 2);
1178
- break;
1179
- case 'D':
1180
- output += formatName('D', date.getDay(), dayNamesShort, dayNames);
1181
- break;
1182
- case 'o':
1183
- output += formatNumber('o',
1184
- (date.getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000, 3);
1185
- break;
1186
- case 'm':
1187
- output += formatNumber('m', date.getMonth() + 1, 2);
1188
- break;
1189
- case 'M':
1190
- output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
1191
- break;
1192
- case 'y':
1193
- output += (lookAhead('y') ? date.getFullYear() :
1194
- (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
1195
- break;
1196
- case '@':
1197
- output += date.getTime();
1198
- break;
1199
- case '!':
1200
- output += date.getTime() * 10000 + this._ticksTo1970;
1201
- break;
1202
- case "'":
1203
- if (lookAhead("'"))
1204
- output += "'";
1205
- else
1206
- literal = true;
1207
- break;
1208
- default:
1209
- output += format.charAt(iFormat);
1210
- }
1211
- }
1212
- return output;
1213
- },
1214
-
1215
- /* Extract all possible characters from the date format. */
1216
- _possibleChars: function (format) {
1217
- var chars = '';
1218
- var literal = false;
1219
- // Check whether a format character is doubled
1220
- var lookAhead = function(match) {
1221
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
1222
- if (matches)
1223
- iFormat++;
1224
- return matches;
1225
- };
1226
- for (var iFormat = 0; iFormat < format.length; iFormat++)
1227
- if (literal)
1228
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
1229
- literal = false;
1230
- else
1231
- chars += format.charAt(iFormat);
1232
- else
1233
- switch (format.charAt(iFormat)) {
1234
- case 'd': case 'm': case 'y': case '@':
1235
- chars += '0123456789';
1236
- break;
1237
- case 'D': case 'M':
1238
- return null; // Accept anything
1239
- case "'":
1240
- if (lookAhead("'"))
1241
- chars += "'";
1242
- else
1243
- literal = true;
1244
- break;
1245
- default:
1246
- chars += format.charAt(iFormat);
1247
- }
1248
- return chars;
1249
- },
1250
-
1251
- /* Get a setting value, defaulting if necessary. */
1252
- _get: function(inst, name) {
1253
- return inst.settings[name] !== undefined ?
1254
- inst.settings[name] : this._defaults[name];
1255
- },
1256
-
1257
- /* Parse existing date and initialise date picker. */
1258
- _setDateFromField: function(inst, noDefault) {
1259
- if (inst.input.val() == inst.lastVal) {
1260
- return;
1261
- }
1262
- var dateFormat = this._get(inst, 'dateFormat');
1263
- var dates = inst.lastVal = inst.input ? inst.input.val() : null;
1264
- var date, defaultDate;
1265
- date = defaultDate = this._getDefaultDate(inst);
1266
- var settings = this._getFormatConfig(inst);
1267
- try {
1268
- date = this.parseDate(dateFormat, dates, settings) || defaultDate;
1269
- } catch (event) {
1270
- this.log(event);
1271
- dates = (noDefault ? '' : dates);
1272
- }
1273
- inst.selectedDay = date.getDate();
1274
- inst.drawMonth = inst.selectedMonth = date.getMonth();
1275
- inst.drawYear = inst.selectedYear = date.getFullYear();
1276
- inst.currentDay = (dates ? date.getDate() : 0);
1277
- inst.currentMonth = (dates ? date.getMonth() : 0);
1278
- inst.currentYear = (dates ? date.getFullYear() : 0);
1279
- this._adjustInstDate(inst);
1280
- },
1281
-
1282
- /* Retrieve the default date shown on opening. */
1283
- _getDefaultDate: function(inst) {
1284
- return this._restrictMinMax(inst,
1285
- this._determineDate(inst, this._get(inst, 'defaultDate'), new Date()));
1286
- },
1287
-
1288
- /* A date may be specified as an exact value or a relative one. */
1289
- _determineDate: function(inst, date, defaultDate) {
1290
- var offsetNumeric = function(offset) {
1291
- var date = new Date();
1292
- date.setDate(date.getDate() + offset);
1293
- return date;
1294
- };
1295
- var offsetString = function(offset) {
1296
- try {
1297
- return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
1298
- offset, $.datepicker._getFormatConfig(inst));
1299
- }
1300
- catch (e) {
1301
- // Ignore
1302
- }
1303
- var date = (offset.toLowerCase().match(/^c/) ?
1304
- $.datepicker._getDate(inst) : null) || new Date();
1305
- var year = date.getFullYear();
1306
- var month = date.getMonth();
1307
- var day = date.getDate();
1308
- var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
1309
- var matches = pattern.exec(offset);
1310
- while (matches) {
1311
- switch (matches[2] || 'd') {
1312
- case 'd' : case 'D' :
1313
- day += parseInt(matches[1],10); break;
1314
- case 'w' : case 'W' :
1315
- day += parseInt(matches[1],10) * 7; break;
1316
- case 'm' : case 'M' :
1317
- month += parseInt(matches[1],10);
1318
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
1319
- break;
1320
- case 'y': case 'Y' :
1321
- year += parseInt(matches[1],10);
1322
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
1323
- break;
1324
- }
1325
- matches = pattern.exec(offset);
1326
- }
1327
- return new Date(year, month, day);
1328
- };
1329
- var newDate = (date == null || date === '' ? defaultDate : (typeof date == 'string' ? offsetString(date) :
1330
- (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
1331
- newDate = (newDate && newDate.toString() == 'Invalid Date' ? defaultDate : newDate);
1332
- if (newDate) {
1333
- newDate.setHours(0);
1334
- newDate.setMinutes(0);
1335
- newDate.setSeconds(0);
1336
- newDate.setMilliseconds(0);
1337
- }
1338
- return this._daylightSavingAdjust(newDate);
1339
- },
1340
-
1341
- /* Handle switch to/from daylight saving.
1342
- Hours may be non-zero on daylight saving cut-over:
1343
- > 12 when midnight changeover, but then cannot generate
1344
- midnight datetime, so jump to 1AM, otherwise reset.
1345
- @param date (Date) the date to check
1346
- @return (Date) the corrected date */
1347
- _daylightSavingAdjust: function(date) {
1348
- if (!date) return null;
1349
- date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
1350
- return date;
1351
- },
1352
-
1353
- /* Set the date(s) directly. */
1354
- _setDate: function(inst, date, noChange) {
1355
- var clear = !date;
1356
- var origMonth = inst.selectedMonth;
1357
- var origYear = inst.selectedYear;
1358
- var newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
1359
- inst.selectedDay = inst.currentDay = newDate.getDate();
1360
- inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
1361
- inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
1362
- if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)
1363
- this._notifyChange(inst);
1364
- this._adjustInstDate(inst);
1365
- if (inst.input) {
1366
- inst.input.val(clear ? '' : this._formatDate(inst));
1367
- }
1368
- },
1369
-
1370
- /* Retrieve the date(s) directly. */
1371
- _getDate: function(inst) {
1372
- var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
1373
- this._daylightSavingAdjust(new Date(
1374
- inst.currentYear, inst.currentMonth, inst.currentDay)));
1375
- return startDate;
1376
- },
1377
-
1378
- /* Generate the HTML for the current state of the date picker. */
1379
- _generateHTML: function(inst) {
1380
- var today = new Date();
1381
- today = this._daylightSavingAdjust(
1382
- new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
1383
- var isRTL = this._get(inst, 'isRTL');
1384
- var showButtonPanel = this._get(inst, 'showButtonPanel');
1385
- var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
1386
- var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
1387
- var numMonths = this._getNumberOfMonths(inst);
1388
- var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
1389
- var stepMonths = this._get(inst, 'stepMonths');
1390
- var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
1391
- var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
1392
- new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
1393
- var minDate = this._getMinMaxDate(inst, 'min');
1394
- var maxDate = this._getMinMaxDate(inst, 'max');
1395
- var drawMonth = inst.drawMonth - showCurrentAtPos;
1396
- var drawYear = inst.drawYear;
1397
- if (drawMonth < 0) {
1398
- drawMonth += 12;
1399
- drawYear--;
1400
- }
1401
- if (maxDate) {
1402
- var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
1403
- maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
1404
- maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
1405
- while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
1406
- drawMonth--;
1407
- if (drawMonth < 0) {
1408
- drawMonth = 11;
1409
- drawYear--;
1410
- }
1411
- }
1412
- }
1413
- inst.drawMonth = drawMonth;
1414
- inst.drawYear = drawYear;
1415
- var prevText = this._get(inst, 'prevText');
1416
- prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
1417
- this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
1418
- this._getFormatConfig(inst)));
1419
- var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
1420
- '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + dpuuid +
1421
- '.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
1422
- ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
1423
- (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
1424
- var nextText = this._get(inst, 'nextText');
1425
- nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
1426
- this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
1427
- this._getFormatConfig(inst)));
1428
- var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
1429
- '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + dpuuid +
1430
- '.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
1431
- ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
1432
- (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
1433
- var currentText = this._get(inst, 'currentText');
1434
- var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
1435
- currentText = (!navigationAsDateFormat ? currentText :
1436
- this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
1437
- var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
1438
- '.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
1439
- var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
1440
- (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
1441
- '.datepicker._gotoToday(\'#' + inst.id + '\');"' +
1442
- '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
1443
- var firstDay = parseInt(this._get(inst, 'firstDay'),10);
1444
- firstDay = (isNaN(firstDay) ? 0 : firstDay);
1445
- var showWeek = this._get(inst, 'showWeek');
1446
- var dayNames = this._get(inst, 'dayNames');
1447
- var dayNamesShort = this._get(inst, 'dayNamesShort');
1448
- var dayNamesMin = this._get(inst, 'dayNamesMin');
1449
- var monthNames = this._get(inst, 'monthNames');
1450
- var monthNamesShort = this._get(inst, 'monthNamesShort');
1451
- var beforeShowDay = this._get(inst, 'beforeShowDay');
1452
- var showOtherMonths = this._get(inst, 'showOtherMonths');
1453
- var selectOtherMonths = this._get(inst, 'selectOtherMonths');
1454
- var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
1455
- var defaultDate = this._getDefaultDate(inst);
1456
- var html = '';
1457
- for (var row = 0; row < numMonths[0]; row++) {
1458
- var group = '';
1459
- for (var col = 0; col < numMonths[1]; col++) {
1460
- var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
1461
- var cornerClass = ' ui-corner-all';
1462
- var calender = '';
1463
- if (isMultiMonth) {
1464
- calender += '<div class="ui-datepicker-group';
1465
- if (numMonths[1] > 1)
1466
- switch (col) {
1467
- case 0: calender += ' ui-datepicker-group-first';
1468
- cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
1469
- case numMonths[1]-1: calender += ' ui-datepicker-group-last';
1470
- cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
1471
- default: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break;
1472
- }
1473
- calender += '">';
1474
- }
1475
- calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
1476
- (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
1477
- (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
1478
- this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
1479
- row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
1480
- '</div><table class="ui-datepicker-calendar"><thead>' +
1481
- '<tr>';
1482
- var thead = (showWeek ? '<th class="ui-datepicker-week-col">' + this._get(inst, 'weekHeader') + '</th>' : '');
1483
- for (var dow = 0; dow < 7; dow++) { // days of the week
1484
- var day = (dow + firstDay) % 7;
1485
- thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
1486
- '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
1487
- }
1488
- calender += thead + '</tr></thead><tbody>';
1489
- var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
1490
- if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
1491
- inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
1492
- var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
1493
- var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate
1494
- var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
1495
- for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
1496
- calender += '<tr>';
1497
- var tbody = (!showWeek ? '' : '<td class="ui-datepicker-week-col">' +
1498
- this._get(inst, 'calculateWeek')(printDate) + '</td>');
1499
- for (var dow = 0; dow < 7; dow++) { // create date picker days
1500
- var daySettings = (beforeShowDay ?
1501
- beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
1502
- var otherMonth = (printDate.getMonth() != drawMonth);
1503
- var unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
1504
- (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
1505
- tbody += '<td class="' +
1506
- ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
1507
- (otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
1508
- ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
1509
- (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
1510
- // or defaultDate is current printedDate and defaultDate is selectedDate
1511
- ' ' + this._dayOverClass : '') + // highlight selected day
1512
- (unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
1513
- (otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
1514
- (printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day
1515
- (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
1516
- ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
1517
- (unselectable ? '' : ' onclick="DP_jQuery_' + dpuuid + '.datepicker._selectDay(\'#' +
1518
- inst.id + '\',' + printDate.getMonth() + ',' + printDate.getFullYear() + ', this);return false;"') + '>' + // actions
1519
- (otherMonth && !showOtherMonths ? '&#xa0;' : // display for other months
1520
- (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
1521
- (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
1522
- (printDate.getTime() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
1523
- (otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months
1524
- '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date
1525
- printDate.setDate(printDate.getDate() + 1);
1526
- printDate = this._daylightSavingAdjust(printDate);
1527
- }
1528
- calender += tbody + '</tr>';
1529
- }
1530
- drawMonth++;
1531
- if (drawMonth > 11) {
1532
- drawMonth = 0;
1533
- drawYear++;
1534
- }
1535
- calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
1536
- ((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
1537
- group += calender;
1538
- }
1539
- html += group;
1540
- }
1541
- html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
1542
- '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
1543
- inst._keyEvent = false;
1544
- return html;
1545
- },
1546
-
1547
- /* Generate the month and year header. */
1548
- _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
1549
- secondary, monthNames, monthNamesShort) {
1550
- var changeMonth = this._get(inst, 'changeMonth');
1551
- var changeYear = this._get(inst, 'changeYear');
1552
- var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
1553
- var html = '<div class="ui-datepicker-title">';
1554
- var monthHtml = '';
1555
- // month selection
1556
- if (secondary || !changeMonth)
1557
- monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span>';
1558
- else {
1559
- var inMinYear = (minDate && minDate.getFullYear() == drawYear);
1560
- var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
1561
- monthHtml += '<select class="ui-datepicker-month" ' +
1562
- 'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
1563
- 'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
1564
- '>';
1565
- for (var month = 0; month < 12; month++) {
1566
- if ((!inMinYear || month >= minDate.getMonth()) &&
1567
- (!inMaxYear || month <= maxDate.getMonth()))
1568
- monthHtml += '<option value="' + month + '"' +
1569
- (month == drawMonth ? ' selected="selected"' : '') +
1570
- '>' + monthNamesShort[month] + '</option>';
1571
- }
1572
- monthHtml += '</select>';
1573
- }
1574
- if (!showMonthAfterYear)
1575
- html += monthHtml + (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '');
1576
- // year selection
1577
- if ( !inst.yearshtml ) {
1578
- inst.yearshtml = '';
1579
- if (secondary || !changeYear)
1580
- html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
1581
- else {
1582
- // determine range of years to display
1583
- var years = this._get(inst, 'yearRange').split(':');
1584
- var thisYear = new Date().getFullYear();
1585
- var determineYear = function(value) {
1586
- var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) :
1587
- (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) :
1588
- parseInt(value, 10)));
1589
- return (isNaN(year) ? thisYear : year);
1590
- };
1591
- var year = determineYear(years[0]);
1592
- var endYear = Math.max(year, determineYear(years[1] || ''));
1593
- year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
1594
- endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
1595
- inst.yearshtml += '<select class="ui-datepicker-year" ' +
1596
- 'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
1597
- 'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
1598
- '>';
1599
- for (; year <= endYear; year++) {
1600
- inst.yearshtml += '<option value="' + year + '"' +
1601
- (year == drawYear ? ' selected="selected"' : '') +
1602
- '>' + year + '</option>';
1603
- }
1604
- inst.yearshtml += '</select>';
1605
-
1606
- html += inst.yearshtml;
1607
- inst.yearshtml = null;
1608
- }
1609
- }
1610
- html += this._get(inst, 'yearSuffix');
1611
- if (showMonthAfterYear)
1612
- html += (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '') + monthHtml;
1613
- html += '</div>'; // Close datepicker_header
1614
- return html;
1615
- },
1616
-
1617
- /* Adjust one of the date sub-fields. */
1618
- _adjustInstDate: function(inst, offset, period) {
1619
- var year = inst.drawYear + (period == 'Y' ? offset : 0);
1620
- var month = inst.drawMonth + (period == 'M' ? offset : 0);
1621
- var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
1622
- (period == 'D' ? offset : 0);
1623
- var date = this._restrictMinMax(inst,
1624
- this._daylightSavingAdjust(new Date(year, month, day)));
1625
- inst.selectedDay = date.getDate();
1626
- inst.drawMonth = inst.selectedMonth = date.getMonth();
1627
- inst.drawYear = inst.selectedYear = date.getFullYear();
1628
- if (period == 'M' || period == 'Y')
1629
- this._notifyChange(inst);
1630
- },
1631
-
1632
- /* Ensure a date is within any min/max bounds. */
1633
- _restrictMinMax: function(inst, date) {
1634
- var minDate = this._getMinMaxDate(inst, 'min');
1635
- var maxDate = this._getMinMaxDate(inst, 'max');
1636
- var newDate = (minDate && date < minDate ? minDate : date);
1637
- newDate = (maxDate && newDate > maxDate ? maxDate : newDate);
1638
- return newDate;
1639
- },
1640
-
1641
- /* Notify change of month/year. */
1642
- _notifyChange: function(inst) {
1643
- var onChange = this._get(inst, 'onChangeMonthYear');
1644
- if (onChange)
1645
- onChange.apply((inst.input ? inst.input[0] : null),
1646
- [inst.selectedYear, inst.selectedMonth + 1, inst]);
1647
- },
1648
-
1649
- /* Determine the number of months to show. */
1650
- _getNumberOfMonths: function(inst) {
1651
- var numMonths = this._get(inst, 'numberOfMonths');
1652
- return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
1653
- },
1654
-
1655
- /* Determine the current maximum date - ensure no time components are set. */
1656
- _getMinMaxDate: function(inst, minMax) {
1657
- return this._determineDate(inst, this._get(inst, minMax + 'Date'), null);
1658
- },
1659
-
1660
- /* Find the number of days in a given month. */
1661
- _getDaysInMonth: function(year, month) {
1662
- return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
1663
- },
1664
-
1665
- /* Find the day of the week of the first of a month. */
1666
- _getFirstDayOfMonth: function(year, month) {
1667
- return new Date(year, month, 1).getDay();
1668
- },
1669
-
1670
- /* Determines if we should allow a "next/prev" month display change. */
1671
- _canAdjustMonth: function(inst, offset, curYear, curMonth) {
1672
- var numMonths = this._getNumberOfMonths(inst);
1673
- var date = this._daylightSavingAdjust(new Date(curYear,
1674
- curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
1675
- if (offset < 0)
1676
- date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
1677
- return this._isInRange(inst, date);
1678
- },
1679
-
1680
- /* Is the given date in the accepted range? */
1681
- _isInRange: function(inst, date) {
1682
- var minDate = this._getMinMaxDate(inst, 'min');
1683
- var maxDate = this._getMinMaxDate(inst, 'max');
1684
- return ((!minDate || date.getTime() >= minDate.getTime()) &&
1685
- (!maxDate || date.getTime() <= maxDate.getTime()));
1686
- },
1687
-
1688
- /* Provide the configuration settings for formatting/parsing. */
1689
- _getFormatConfig: function(inst) {
1690
- var shortYearCutoff = this._get(inst, 'shortYearCutoff');
1691
- shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
1692
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
1693
- return {shortYearCutoff: shortYearCutoff,
1694
- dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
1695
- monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
1696
- },
1697
-
1698
- /* Format the given date for display. */
1699
- _formatDate: function(inst, day, month, year) {
1700
- if (!day) {
1701
- inst.currentDay = inst.selectedDay;
1702
- inst.currentMonth = inst.selectedMonth;
1703
- inst.currentYear = inst.selectedYear;
1704
- }
1705
- var date = (day ? (typeof day == 'object' ? day :
1706
- this._daylightSavingAdjust(new Date(year, month, day))) :
1707
- this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
1708
- return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
1709
- }
1710
- });
1711
-
1712
- /*
1713
- * Bind hover events for datepicker elements.
1714
- * Done via delegate so the binding only occurs once in the lifetime of the parent div.
1715
- * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
1716
- */
1717
- function bindHover(dpDiv) {
1718
- var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';
1719
- return dpDiv.delegate(selector, 'mouseout', function() {
1720
- $(this).removeClass('ui-state-hover');
1721
- if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
1722
- if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
1723
- })
1724
- .delegate(selector, 'mouseover', function(){
1725
- if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
1726
- $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
1727
- $(this).addClass('ui-state-hover');
1728
- if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
1729
- if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
1730
- }
1731
- });
1732
- }
1733
-
1734
- /* jQuery extend now ignores nulls! */
1735
- function extendRemove(target, props) {
1736
- $.extend(target, props);
1737
- for (var name in props)
1738
- if (props[name] == null || props[name] == undefined)
1739
- target[name] = props[name];
1740
- return target;
1741
- };
1742
-
1743
- /* Determine whether an object is an array. */
1744
- function isArray(a) {
1745
- return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
1746
- (a.constructor && a.constructor.toString().match(/\Array\(\)/))));
1747
- };
1748
-
1749
- /* Invoke the datepicker functionality.
1750
- @param options string - a command, optionally followed by additional parameters or
1751
- Object - settings for attaching new datepicker functionality
1752
- @return jQuery object */
1753
- $.fn.datepicker = function(options){
1754
-
1755
- /* Verify an empty collection wasn't passed - Fixes #6976 */
1756
- if ( !this.length ) {
1757
- return this;
1758
- }
1759
-
1760
- /* Initialise the date picker. */
1761
- if (!$.datepicker.initialized) {
1762
- $(document).mousedown($.datepicker._checkExternalClick).
1763
- find('body').append($.datepicker.dpDiv);
1764
- $.datepicker.initialized = true;
1765
- }
1766
-
1767
- var otherArgs = Array.prototype.slice.call(arguments, 1);
1768
- if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget'))
1769
- return $.datepicker['_' + options + 'Datepicker'].
1770
- apply($.datepicker, [this[0]].concat(otherArgs));
1771
- if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
1772
- return $.datepicker['_' + options + 'Datepicker'].
1773
- apply($.datepicker, [this[0]].concat(otherArgs));
1774
- return this.each(function() {
1775
- typeof options == 'string' ?
1776
- $.datepicker['_' + options + 'Datepicker'].
1777
- apply($.datepicker, [this].concat(otherArgs)) :
1778
- $.datepicker._attachDatepicker(this, options);
1779
- });
1780
- };
1781
-
1782
- $.datepicker = new Datepicker(); // singleton instance
1783
- $.datepicker.initialized = false;
1784
- $.datepicker.uuid = new Date().getTime();
1785
- $.datepicker.version = "1.8.13";
1786
-
1787
- // Workaround for #4055
1788
- // Add another global to avoid noConflict issues with inline event handlers
1789
- window['DP_jQuery_' + dpuuid] = $;
1790
-
1791
- })(jQuery);