gluttonberg-core 2.5.4 → 2.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (300) hide show
  1. data/app/assets/images/{arrow.png → gb_arrow.png} +0 -0
  2. data/app/assets/images/{bg.png → gb_bg.png} +0 -0
  3. data/app/assets/images/{button_bkg_grey.gif → gb_button_bkg_grey.gif} +0 -0
  4. data/app/assets/images/{drag_handle.png → gb_drag_handle.png} +0 -0
  5. data/app/assets/images/{icon_add.png → gb_icon_add.png} +0 -0
  6. data/app/assets/images/{icon_asset.png → gb_icon_asset.png} +0 -0
  7. data/app/assets/images/{icon_blog.png → gb_icon_blog.png} +0 -0
  8. data/app/assets/images/{icon_collection.png → gb_icon_collection.png} +0 -0
  9. data/app/assets/images/{icon_content.png → gb_icon_content.png} +0 -0
  10. data/app/assets/images/{icon_content_2.png → gb_icon_content_2.png} +0 -0
  11. data/app/assets/images/{icon_dash.png → gb_icon_dash.png} +0 -0
  12. data/app/assets/images/{icon_dashboard.png → gb_icon_dashboard.png} +0 -0
  13. data/app/assets/images/{icon_default.png → gb_icon_default.png} +0 -0
  14. data/app/assets/images/{icon_group.png → gb_icon_group.png} +0 -0
  15. data/app/assets/images/{icon_library.png → gb_icon_library.png} +0 -0
  16. data/app/assets/images/{icon_library_2.png → gb_icon_library_2.png} +0 -0
  17. data/app/assets/images/{icon_member.png → gb_icon_member.png} +0 -0
  18. data/app/assets/images/{icon_members.png → gb_icon_members.png} +0 -0
  19. data/app/assets/images/{icon_pages.png → gb_icon_pages.png} +0 -0
  20. data/app/assets/images/{icon_settings.png → gb_icon_settings.png} +0 -0
  21. data/app/assets/images/{icon_upload.png → gb_icon_upload.png} +0 -0
  22. data/app/assets/images/{page_content_fillin.gif → gb_page_content_fillin.gif} +0 -0
  23. data/app/assets/images/{paginator.gif → gb_paginator.gif} +0 -0
  24. data/app/assets/images/{row_divider.jpg → gb_row_divider.jpg} +0 -0
  25. data/app/assets/images/{spinner.gif → gb_spinner.gif} +0 -0
  26. data/app/assets/images/{spinner_for_dialouge.gif → gb_spinner_for_dialouge.gif} +0 -0
  27. data/app/assets/images/{sub_nav_back_bkg.gif → gb_sub_nav_back_bkg.gif} +0 -0
  28. data/app/assets/images/{subnav_bkg.gif → gb_subnav_bkg.gif} +0 -0
  29. data/app/assets/images/{table_head_bkg.gif → gb_table_head_bkg.gif} +0 -0
  30. data/app/assets/images/{wrapper_bkg.png → gb_wrapper_bkg.png} +0 -0
  31. data/app/assets/images/help/{help.jpg → gb_help.jpg} +0 -0
  32. data/app/assets/images/icons/{collapsed.png → gb_collapsed.png} +0 -0
  33. data/app/assets/images/icons/{expanded.png → gb_expanded.png} +0 -0
  34. data/app/assets/images/library/{back.gif → gb_back.gif} +0 -0
  35. data/app/assets/images/library/{dialog_overlay.png → gb_dialog_overlay.png} +0 -0
  36. data/app/assets/images/library/{inactive_tab.jpg → gb_inactive_tab.jpg} +0 -0
  37. data/app/assets/images/library/{search_icon.gif → gb_search_icon.gif} +0 -0
  38. data/app/assets/images/library/{sort_by_asc.png → gb_sort_by_asc.png} +0 -0
  39. data/app/assets/images/library/{sort_by_desc.png → gb_sort_by_desc.png} +0 -0
  40. data/app/assets/javascripts/{ajaxfileupload.js → gb_ajaxfileupload.js} +0 -0
  41. data/app/assets/javascripts/gb_application.js +30 -30
  42. data/app/assets/javascripts/{bootstrap-datepicker.js → gb_bootstrap-datepicker.js} +0 -0
  43. data/app/assets/javascripts/{bootstrap.js → gb_bootstrap.js} +0 -0
  44. data/app/assets/javascripts/{expander.js → gb_expander.js} +0 -0
  45. data/app/assets/javascripts/{jeditable.js → gb_jeditable.js} +0 -0
  46. data/app/assets/javascripts/{jquery-dragTree.js → gb_jquery-dragTree.js} +0 -0
  47. data/app/assets/javascripts/{jquery-tagarea.js → gb_jquery-tagarea.js} +0 -0
  48. data/app/assets/javascripts/jcrop/css/{Jcrop.gif → gb_Jcrop.gif} +0 -0
  49. data/app/assets/javascripts/jcrop/css/{jquery-Jcrop.css → gb_jquery-Jcrop.css} +1 -1
  50. data/app/assets/stylesheets/{admin-ie6.sass → gb_admin-ie6.sass} +0 -0
  51. data/app/assets/stylesheets/{admin-ie7.sass → gb_admin-ie7.sass} +1 -1
  52. data/app/assets/stylesheets/{admin-override.sass → gb_admin-override.sass} +22 -22
  53. data/app/assets/stylesheets/{bootstrap-responsive.css → gb_bootstrap-responsive.css} +0 -0
  54. data/app/assets/stylesheets/{bootstrap.css → gb_bootstrap.css} +0 -0
  55. data/app/views/gluttonberg/admin/asset_library/assets/_browser_root.html.haml +1 -1
  56. data/app/views/gluttonberg/admin/content/galleries/_images_list.html.haml +1 -1
  57. data/app/views/gluttonberg/admin/settings/generic_settings/index.html.haml +2 -2
  58. data/app/views/gluttonberg/admin/shared/delete.html.haml +8 -8
  59. data/app/views/gluttonberg/public/members/_form.html.haml +17 -18
  60. data/app/views/gluttonberg/public/members/edit.html.haml +18 -18
  61. data/app/views/gluttonberg/public/members/show.html.haml +8 -8
  62. data/app/views/gluttonberg/public/pages/restrict_site_access.html.haml +12 -12
  63. data/app/views/layouts/bare.html.haml +5 -5
  64. data/app/views/layouts/gluttonberg.html.haml +4 -4
  65. data/lib/generators/gluttonberg/resource/templates/backend_view_index.html.haml +2 -0
  66. data/lib/gluttonberg/version.rb +1 -1
  67. metadata +55 -288
  68. data/app/assets/images/content/blogs.png +0 -0
  69. data/app/assets/images/content/pages.png +0 -0
  70. data/app/assets/images/form/field_bg.jpg +0 -0
  71. data/app/assets/images/form/field_bg_active.jpg +0 -0
  72. data/app/assets/images/form/input_bkg.gif +0 -0
  73. data/app/assets/images/form/input_bkg.jpg +0 -0
  74. data/app/assets/images/form/login_bg.png +0 -0
  75. data/app/assets/images/form/login_form_bg.jpg +0 -0
  76. data/app/assets/images/form/plus_and_minus.gif +0 -0
  77. data/app/assets/images/form/warning.gif +0 -0
  78. data/app/assets/images/icons/cross.png +0 -0
  79. data/app/assets/images/icons/folder.png +0 -0
  80. data/app/assets/images/icons/symbol-add.png +0 -0
  81. data/app/assets/images/library/all.png +0 -0
  82. data/app/assets/images/library/audio.png +0 -0
  83. data/app/assets/images/library/icon_document.jpg +0 -0
  84. data/app/assets/images/library/image.png +0 -0
  85. data/app/assets/images/library/other.png +0 -0
  86. data/app/assets/images/library/video.png +0 -0
  87. data/app/assets/images/settings/config.png +0 -0
  88. data/app/assets/images/settings/locale.jpg +0 -0
  89. data/app/assets/images/settings/stylesheet.gif +0 -0
  90. data/app/assets/images/settings/users.png +0 -0
  91. data/app/assets/images/sidebar/icon_content.png +0 -0
  92. data/app/assets/images/sidebar/icon_dashboard.png +0 -0
  93. data/app/assets/images/sidebar/icon_feedback.png +0 -0
  94. data/app/assets/images/sidebar/icon_library.png +0 -0
  95. data/app/assets/images/sidebar/icon_settings.png +0 -0
  96. data/app/assets/images/sidebar/menu_active.jpg +0 -0
  97. data/app/assets/images/sidebar/menu_expanded_bg.jpg +0 -0
  98. data/app/assets/images/sidebar/menu_off.jpg +0 -0
  99. data/app/assets/images/sidebar/menu_over.jpg +0 -0
  100. data/app/assets/images/sidebar/nav_closed.png +0 -0
  101. data/app/assets/images/sidebar/nav_open.png +0 -0
  102. data/app/assets/javascripts/bootstrap.min.js +0 -1
  103. data/app/assets/javascripts/jcrop/MIT-LICENSE.txt +0 -22
  104. data/app/assets/javascripts/jcrop/build/LICENSE +0 -7
  105. data/app/assets/javascripts/jcrop/build/README +0 -11
  106. data/app/assets/javascripts/jcrop/build/minimize.bash +0 -10
  107. data/app/assets/javascripts/jcrop/build/pre-commit.bash +0 -11
  108. data/app/assets/javascripts/jcrop/demos/crop.php +0 -106
  109. data/app/assets/javascripts/jcrop/demos/demo_files/demos.css +0 -36
  110. data/app/assets/javascripts/jcrop/demos/demo_files/flowers.jpg +0 -0
  111. data/app/assets/javascripts/jcrop/demos/demo_files/sago.jpg +0 -0
  112. data/app/assets/javascripts/jcrop/demos/demo_files/sagomod.jpg +0 -0
  113. data/app/assets/javascripts/jcrop/demos/demo_files/sagomod.png +0 -0
  114. data/app/assets/javascripts/jcrop/demos/tutorial1.html +0 -47
  115. data/app/assets/javascripts/jcrop/demos/tutorial2.html +0 -94
  116. data/app/assets/javascripts/jcrop/demos/tutorial3.html +0 -94
  117. data/app/assets/javascripts/jcrop/demos/tutorial4.html +0 -154
  118. data/app/assets/javascripts/jcrop/demos/tutorial5.html +0 -240
  119. data/app/assets/javascripts/jcrop/index.html +0 -63
  120. data/app/assets/javascripts/jcrop/js/jquery.Jcrop.js +0 -1605
  121. data/app/assets/javascripts/jcrop/js/jquery.color.js +0 -123
  122. data/app/assets/javascripts/jcrop/js/jquery.min.js +0 -18
  123. data/app/assets/javascripts/jquery-1-4-2-min.js +0 -154
  124. data/app/assets/javascripts/jquery-ui-1-8-1-custom-min.js +0 -756
  125. data/app/assets/javascripts/jquery-ui-1-8-18-custom-min.js +0 -356
  126. data/app/assets/javascripts/jquery-ui-1-8-18-custom2-min.js +0 -266
  127. data/app/assets/javascripts/jquery-ui-datetimepicker-min.js +0 -1060
  128. data/app/assets/javascripts/tiny_mce/license.txt +0 -504
  129. data/app/assets/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +0 -57
  130. data/app/assets/javascripts/tiny_mce/plugins/advimage/css/advimage.css +0 -13
  131. data/app/assets/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +0 -1
  132. data/app/assets/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +0 -50
  133. data/app/assets/javascripts/tiny_mce/plugins/advimage/image.htm +0 -235
  134. data/app/assets/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
  135. data/app/assets/javascripts/tiny_mce/plugins/advimage/js/image.js +0 -458
  136. data/app/assets/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +0 -45
  137. data/app/assets/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +0 -61
  138. data/app/assets/javascripts/tiny_mce/plugins/advlist/editor_plugin_src.js +0 -161
  139. data/app/assets/javascripts/tiny_mce/plugins/autolink/editor_plugin_src.js +0 -172
  140. data/app/assets/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +0 -1
  141. data/app/assets/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +0 -137
  142. data/app/assets/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +0 -1
  143. data/app/assets/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +0 -431
  144. data/app/assets/javascripts/tiny_mce/plugins/autosave/langs/en.js +0 -4
  145. data/app/assets/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +0 -1
  146. data/app/assets/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +0 -120
  147. data/app/assets/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +0 -1
  148. data/app/assets/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +0 -160
  149. data/app/assets/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +0 -1
  150. data/app/assets/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +0 -82
  151. data/app/assets/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +0 -1
  152. data/app/assets/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +0 -43
  153. data/app/assets/javascripts/tiny_mce/plugins/emotions/emotions.htm +0 -41
  154. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
  155. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
  156. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  157. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  158. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
  159. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
  160. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
  161. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  162. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  163. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  164. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  165. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  166. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  167. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
  168. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  169. data/app/assets/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
  170. data/app/assets/javascripts/tiny_mce/plugins/emotions/js/emotions.js +0 -22
  171. data/app/assets/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +0 -20
  172. data/app/assets/javascripts/tiny_mce/plugins/example/dialog.htm +0 -22
  173. data/app/assets/javascripts/tiny_mce/plugins/example/editor_plugin.js +0 -1
  174. data/app/assets/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +0 -84
  175. data/app/assets/javascripts/tiny_mce/plugins/example/img/example.gif +0 -0
  176. data/app/assets/javascripts/tiny_mce/plugins/example/js/dialog.js +0 -19
  177. data/app/assets/javascripts/tiny_mce/plugins/example/langs/en.js +0 -3
  178. data/app/assets/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +0 -3
  179. data/app/assets/javascripts/tiny_mce/plugins/example_dependency/editor_plugin.js +0 -1
  180. data/app/assets/javascripts/tiny_mce/plugins/example_dependency/editor_plugin_src.js +0 -50
  181. data/app/assets/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +0 -143
  182. data/app/assets/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +0 -1
  183. data/app/assets/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +0 -399
  184. data/app/assets/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +0 -259
  185. data/app/assets/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +0 -232
  186. data/app/assets/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +0 -85
  187. data/app/assets/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +0 -159
  188. data/app/assets/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +0 -1
  189. data/app/assets/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +0 -54
  190. data/app/assets/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +0 -696
  191. data/app/assets/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +0 -83
  192. data/app/assets/javascripts/tiny_mce/plugins/layer/editor_plugin.js +0 -1
  193. data/app/assets/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +0 -214
  194. data/app/assets/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +0 -1
  195. data/app/assets/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +0 -139
  196. data/app/assets/javascripts/tiny_mce/plugins/lists/editor_plugin_src.js +0 -688
  197. data/app/assets/javascripts/tiny_mce/plugins/media/css/media.css +0 -17
  198. data/app/assets/javascripts/tiny_mce/plugins/media/editor_plugin.js +0 -1
  199. data/app/assets/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +0 -777
  200. data/app/assets/javascripts/tiny_mce/plugins/media/js/embed.js +0 -73
  201. data/app/assets/javascripts/tiny_mce/plugins/media/js/media.js +0 -355
  202. data/app/assets/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +0 -109
  203. data/app/assets/javascripts/tiny_mce/plugins/media/media.htm +0 -812
  204. data/app/assets/javascripts/tiny_mce/plugins/media/moxieplayer.swf +0 -0
  205. data/app/assets/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +0 -1
  206. data/app/assets/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +0 -53
  207. data/app/assets/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +0 -1
  208. data/app/assets/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +0 -92
  209. data/app/assets/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +0 -1
  210. data/app/assets/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +0 -74
  211. data/app/assets/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +0 -941
  212. data/app/assets/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +0 -53
  213. data/app/assets/javascripts/tiny_mce/plugins/preview/example.html +0 -28
  214. data/app/assets/javascripts/tiny_mce/plugins/print/editor_plugin.js +0 -1
  215. data/app/assets/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +0 -34
  216. data/app/assets/javascripts/tiny_mce/plugins/save/editor_plugin.js +0 -1
  217. data/app/assets/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +0 -101
  218. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +0 -6
  219. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +0 -1
  220. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +0 -61
  221. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +0 -142
  222. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +0 -16
  223. data/app/assets/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +0 -100
  224. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/css/content.css +0 -1
  225. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +0 -1
  226. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +0 -434
  227. data/app/assets/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
  228. data/app/assets/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +0 -55
  229. data/app/assets/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +0 -1
  230. data/app/assets/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +0 -114
  231. data/app/assets/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +0 -1209
  232. data/app/assets/javascripts/tiny_mce/plugins/template/blank.htm +0 -12
  233. data/app/assets/javascripts/tiny_mce/plugins/template/css/template.css +0 -23
  234. data/app/assets/javascripts/tiny_mce/plugins/template/editor_plugin.js +0 -1
  235. data/app/assets/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +0 -159
  236. data/app/assets/javascripts/tiny_mce/plugins/template/js/template.js +0 -106
  237. data/app/assets/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +0 -15
  238. data/app/assets/javascripts/tiny_mce/plugins/template/template.htm +0 -31
  239. data/app/assets/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +0 -1
  240. data/app/assets/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +0 -83
  241. data/app/assets/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +0 -114
  242. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +0 -142
  243. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +0 -142
  244. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +0 -149
  245. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +0 -142
  246. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +0 -11
  247. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +0 -9
  248. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +0 -162
  249. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +0 -1
  250. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +0 -132
  251. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +0 -162
  252. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +0 -28
  253. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +0 -28
  254. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +0 -111
  255. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +0 -28
  256. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +0 -53
  257. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +0 -229
  258. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +0 -53
  259. data/app/assets/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +0 -32
  260. data/app/assets/javascripts/tiny_mce/themes/advanced/about.htm +0 -52
  261. data/app/assets/javascripts/tiny_mce/themes/advanced/charmap.htm +0 -51
  262. data/app/assets/javascripts/tiny_mce/themes/advanced/color_picker.htm +0 -74
  263. data/app/assets/javascripts/tiny_mce/themes/advanced/image.htm +0 -80
  264. data/app/assets/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  265. data/app/assets/javascripts/tiny_mce/themes/advanced/img/flash.gif +0 -0
  266. data/app/assets/javascripts/tiny_mce/themes/advanced/img/iframe.gif +0 -0
  267. data/app/assets/javascripts/tiny_mce/themes/advanced/img/pagebreak.gif +0 -0
  268. data/app/assets/javascripts/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
  269. data/app/assets/javascripts/tiny_mce/themes/advanced/img/realmedia.gif +0 -0
  270. data/app/assets/javascripts/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
  271. data/app/assets/javascripts/tiny_mce/themes/advanced/img/video.gif +0 -0
  272. data/app/assets/javascripts/tiny_mce/themes/advanced/img/windowsmedia.gif +0 -0
  273. data/app/assets/javascripts/tiny_mce/themes/advanced/js/about.js +0 -73
  274. data/app/assets/javascripts/tiny_mce/themes/advanced/js/charmap.js +0 -355
  275. data/app/assets/javascripts/tiny_mce/themes/advanced/js/color_picker.js +0 -329
  276. data/app/assets/javascripts/tiny_mce/themes/advanced/js/image.js +0 -247
  277. data/app/assets/javascripts/tiny_mce/themes/advanced/link.htm +0 -57
  278. data/app/assets/javascripts/tiny_mce/themes/advanced/shortcuts.htm +0 -47
  279. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/content.css +0 -23
  280. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +0 -105
  281. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/ui.css +0 -102
  282. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +0 -46
  283. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +0 -117
  284. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  285. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  286. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  287. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +0 -217
  288. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +0 -8
  289. data/app/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +0 -5
  290. data/app/assets/javascripts/tiny_mce/themes/simple/editor_template.js +0 -1
  291. data/app/assets/javascripts/tiny_mce/themes/simple/editor_template_src.js +0 -84
  292. data/app/assets/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
  293. data/app/assets/javascripts/tiny_mce/themes/simple/langs/en.js +0 -11
  294. data/app/assets/javascripts/tiny_mce/themes/simple/skins/default/content.css +0 -25
  295. data/app/assets/javascripts/tiny_mce/themes/simple/skins/default/ui.css +0 -32
  296. data/app/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +0 -17
  297. data/app/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  298. data/app/assets/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +0 -35
  299. data/app/assets/javascripts/tiny_mce/tiny_mce_src.js +0 -15216
  300. data/app/assets/stylesheets/admin.sass +0 -2919
@@ -1,1060 +0,0 @@
1
- /*
2
- * jQuery timepicker addon
3
- * By: Trent Richardson [http://trentrichardson.com]
4
- * Version 0.9.6
5
- * Last Modified: 07/20/2011
6
- *
7
- * Copyright 2011 Trent Richardson
8
- * Dual licensed under the MIT and GPL licenses.
9
- * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
10
- * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
11
- *
12
- * HERES THE CSS:
13
- * .ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
14
- * .ui-timepicker-div dl{ text-align: left; }
15
- * .ui-timepicker-div dl dt{ height: 25px; }
16
- * .ui-timepicker-div dl dd{ margin: -25px 10px 10px 65px; }
17
- * .ui-timepicker-div td { font-size: 90%; }
18
- */
19
-
20
- (function($) {
21
-
22
- $.extend($.ui, { timepicker: { version: "0.9.6" } });
23
-
24
- /* Time picker manager.
25
- Use the singleton instance of this class, $.timepicker, to interact with the time picker.
26
- Settings for (groups of) time pickers are maintained in an instance object,
27
- allowing multiple different settings on the same page. */
28
-
29
- function Timepicker() {
30
- this.regional = []; // Available regional settings, indexed by language code
31
- this.regional[''] = { // Default regional settings
32
- currentText: 'Now',
33
- closeText: 'Done',
34
- ampm: false,
35
- timeFormat: 'hh:mm tt',
36
- timeSuffix: '',
37
- timeOnlyTitle: 'Choose Time',
38
- timeText: 'Time',
39
- hourText: 'Hour',
40
- minuteText: 'Minute',
41
- secondText: 'Second',
42
- timezoneText: 'Time Zone'
43
- };
44
- this._defaults = { // Global defaults for all the datetime picker instances
45
- showButtonPanel: true,
46
- timeOnly: false,
47
- showHour: true,
48
- showMinute: true,
49
- showSecond: false,
50
- showTimezone: false,
51
- showTime: true,
52
- stepHour: 0.05,
53
- stepMinute: 0.05,
54
- stepSecond: 0.05,
55
- hour: 0,
56
- minute: 0,
57
- second: 0,
58
- timezone: '+0000',
59
- hourMin: 0,
60
- minuteMin: 0,
61
- secondMin: 0,
62
- hourMax: 23,
63
- minuteMax: 59,
64
- secondMax: 59,
65
- minDateTime: null,
66
- maxDateTime: null,
67
- hourGrid: 0,
68
- minuteGrid: 0,
69
- secondGrid: 0,
70
- alwaysSetTime: true,
71
- separator: ' ',
72
- altFieldTimeOnly: true,
73
- showTimepicker: true,
74
- timezoneList: ["-1100", "-1000", "-0900", "-0800", "-0700", "-0600",
75
- "-0500", "-0400", "-0300", "-0200", "-0100", "+0000",
76
- "+0100", "+0200", "+0300", "+0400", "+0500", "+0600",
77
- "+0700", "+0800", "+0900", "+1000", "+1100", "+1200"]
78
- };
79
- $.extend(this._defaults, this.regional['']);
80
- }
81
-
82
- $.extend(Timepicker.prototype, {
83
- $input: null,
84
- $altInput: null,
85
- $timeObj: null,
86
- inst: null,
87
- hour_slider: null,
88
- minute_slider: null,
89
- second_slider: null,
90
- timezone_select: null,
91
- hour: 0,
92
- minute: 0,
93
- second: 0,
94
- timezone: '+0000',
95
- hourMinOriginal: null,
96
- minuteMinOriginal: null,
97
- secondMinOriginal: null,
98
- hourMaxOriginal: null,
99
- minuteMaxOriginal: null,
100
- secondMaxOriginal: null,
101
- ampm: '',
102
- formattedDate: '',
103
- formattedTime: '',
104
- formattedDateTime: '',
105
- timezoneList: ["-1100", "-1000", "-0900", "-0800", "-0700", "-0600",
106
- "-0500", "-0400", "-0300", "-0200", "-0100", "+0000",
107
- "+0100", "+0200", "+0300", "+0400", "+0500", "+0600",
108
- "+0700", "+0800", "+0900", "+1000", "+1100", "+1200"],
109
-
110
- /* Override the default settings for all instances of the time picker.
111
- @param settings object - the new settings to use as defaults (anonymous object)
112
- @return the manager object */
113
- setDefaults: function(settings) {
114
- extendRemove(this._defaults, settings || {});
115
- return this;
116
- },
117
-
118
- //########################################################################
119
- // Create a new Timepicker instance
120
- //########################################################################
121
- _newInst: function($input, o) {
122
- var tp_inst = new Timepicker(),
123
- inlineSettings = {};
124
-
125
- for (var attrName in this._defaults) {
126
- var attrValue = $input.attr('time:' + attrName);
127
- if (attrValue) {
128
- try {
129
- inlineSettings[attrName] = eval(attrValue);
130
- } catch (err) {
131
- inlineSettings[attrName] = attrValue;
132
- }
133
- }
134
- }
135
- tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, o, {
136
- beforeShow: function(input, dp_inst) {
137
- if ($.isFunction(o.beforeShow))
138
- o.beforeShow(input, dp_inst, tp_inst);
139
- },
140
- onChangeMonthYear: function(year, month, dp_inst) {
141
- // Update the time as well : this prevents the time from disappearing from the $input field.
142
- tp_inst._updateDateTime(dp_inst);
143
- if ($.isFunction(o.onChangeMonthYear))
144
- o.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst);
145
- },
146
- onClose: function(dateText, dp_inst) {
147
- if (tp_inst.timeDefined === true && $input.val() != '')
148
- tp_inst._updateDateTime(dp_inst);
149
- if ($.isFunction(o.onClose))
150
- o.onClose.call($input[0], dateText, dp_inst, tp_inst);
151
- },
152
- timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');
153
- });
154
-
155
- tp_inst.hour = tp_inst._defaults.hour;
156
- tp_inst.minute = tp_inst._defaults.minute;
157
- tp_inst.second = tp_inst._defaults.second;
158
- tp_inst.ampm = '';
159
- tp_inst.$input = $input;
160
-
161
- if (o.altField)
162
- tp_inst.$altInput = $(o.altField)
163
- .css({ cursor: 'pointer' })
164
- .focus(function(){ $input.trigger("focus"); });
165
-
166
- // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime..
167
- if(tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date)
168
- tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime());
169
- if(tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date)
170
- tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());
171
- if(tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date)
172
- tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime());
173
- if(tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date)
174
- tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());
175
-
176
- return tp_inst;
177
- },
178
-
179
- //########################################################################
180
- // add our sliders to the calendar
181
- //########################################################################
182
- _addTimePicker: function(dp_inst) {
183
- var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ?
184
- this.$input.val() + ' ' + this.$altInput.val() :
185
- this.$input.val();
186
-
187
- this.timeDefined = this._parseTime(currDT);
188
- this._limitMinMaxDateTime(dp_inst, false);
189
- this._injectTimePicker();
190
- },
191
-
192
- //########################################################################
193
- // parse the time string from input value or _setTime
194
- //########################################################################
195
- _parseTime: function(timeString, withDate) {
196
- var regstr = this._defaults.timeFormat.toString()
197
- .replace(/h{1,2}/ig, '(\\d?\\d)')
198
- .replace(/m{1,2}/ig, '(\\d?\\d)')
199
- .replace(/s{1,2}/ig, '(\\d?\\d)')
200
- .replace(/t{1,2}/ig, '(am|pm|a|p)?')
201
- .replace(/z{1}/ig, '((\\+|-)\\d\\d\\d\\d)?')
202
- .replace(/\s/g, '\\s?') + this._defaults.timeSuffix + '$',
203
- order = this._getFormatPositions(),
204
- treg;
205
-
206
- if (!this.inst) this.inst = $.datepicker._getInst(this.$input[0]);
207
-
208
- if (withDate || !this._defaults.timeOnly) {
209
- // the time should come after x number of characters and a space.
210
- // x = at least the length of text specified by the date format
211
- var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');
212
- // escape special regex characters in the seperator
213
- var specials = new RegExp("[.*+?|()\\[\\]{}\\\\]", "g");
214
- regstr = '.{' + dp_dateFormat.length + ',}' + this._defaults.separator.replace(specials, "\\$&") + regstr;
215
- }
216
-
217
- treg = timeString.match(new RegExp(regstr, 'i'));
218
-
219
- if (treg) {
220
- if (order.t !== -1)
221
- this.ampm = ((treg[order.t] === undefined || treg[order.t].length === 0) ?
222
- '' :
223
- (treg[order.t].charAt(0).toUpperCase() == 'A') ? 'AM' : 'PM').toUpperCase();
224
-
225
- if (order.h !== -1) {
226
- if (this.ampm == 'AM' && treg[order.h] == '12')
227
- this.hour = 0; // 12am = 0 hour
228
- else if (this.ampm == 'PM' && treg[order.h] != '12')
229
- this.hour = (parseFloat(treg[order.h]) + 12).toFixed(0); // 12pm = 12 hour, any other pm = hour + 12
230
- else this.hour = Number(treg[order.h]);
231
- }
232
-
233
- if (order.m !== -1) this.minute = Number(treg[order.m]);
234
- if (order.s !== -1) this.second = Number(treg[order.s]);
235
- if (order.z !== -1) this.timezone = treg[order.z];
236
-
237
- return true;
238
-
239
- }
240
- return false;
241
- },
242
-
243
- //########################################################################
244
- // figure out position of time elements.. cause js cant do named captures
245
- //########################################################################
246
- _getFormatPositions: function() {
247
- var finds = this._defaults.timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|t{1,2}|z)/g),
248
- orders = { h: -1, m: -1, s: -1, t: -1, z: -1 };
249
-
250
- if (finds)
251
- for (var i = 0; i < finds.length; i++)
252
- if (orders[finds[i].toString().charAt(0)] == -1)
253
- orders[finds[i].toString().charAt(0)] = i + 1;
254
-
255
- return orders;
256
- },
257
-
258
- //########################################################################
259
- // generate and inject html for timepicker into ui datepicker
260
- //########################################################################
261
- _injectTimePicker: function() {
262
- var $dp = this.inst.dpDiv,
263
- o = this._defaults,
264
- tp_inst = this,
265
- // Added by Peter Medeiros:
266
- // - Figure out what the hour/minute/second max should be based on the step values.
267
- // - Example: if stepMinute is 15, then minMax is 45.
268
- hourMax = (o.hourMax - (o.hourMax % o.stepHour)).toFixed(0),
269
- minMax = (o.minuteMax - (o.minuteMax % o.stepMinute)).toFixed(0),
270
- secMax = (o.secondMax - (o.secondMax % o.stepSecond)).toFixed(0),
271
- dp_id = this.inst.id.toString().replace(/([^A-Za-z0-9_])/g, '');
272
-
273
- // Prevent displaying twice
274
- //if ($dp.find("div#ui-timepicker-div-"+ dp_id).length === 0) {
275
- if ($dp.find("div#ui-timepicker-div-"+ dp_id).length === 0 && o.showTimepicker) {
276
- var noDisplay = ' style="display:none;"',
277
- html = '<div class="ui-timepicker-div" id="ui-timepicker-div-' + dp_id + '"><dl>' +
278
- '<dt class="ui_tpicker_time_label" id="ui_tpicker_time_label_' + dp_id + '"' +
279
- ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' +
280
- '<dd class="ui_tpicker_time" id="ui_tpicker_time_' + dp_id + '"' +
281
- ((o.showTime) ? '' : noDisplay) + '></dd>' +
282
- '<dt class="ui_tpicker_hour_label" id="ui_tpicker_hour_label_' + dp_id + '"' +
283
- ((o.showHour) ? '' : noDisplay) + '>' + o.hourText + '</dt>',
284
- hourGridSize = 0,
285
- minuteGridSize = 0,
286
- secondGridSize = 0,
287
- size;
288
-
289
- if (o.showHour && o.hourGrid > 0) {
290
- html += '<dd class="ui_tpicker_hour">' +
291
- '<div id="ui_tpicker_hour_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '></div>' +
292
- '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
293
-
294
- for (var h = o.hourMin; h <= hourMax; h += o.hourGrid) {
295
- hourGridSize++;
296
- var tmph = (o.ampm && h > 12) ? h-12 : h;
297
- if (tmph < 10) tmph = '0' + tmph;
298
- if (o.ampm) {
299
- if (h == 0) tmph = 12 +'a';
300
- else if (h < 12) tmph += 'a';
301
- else tmph += 'p';
302
- }
303
- html += '<td>' + tmph + '</td>';
304
- }
305
-
306
- html += '</tr></table></div>' +
307
- '</dd>';
308
- } else html += '<dd class="ui_tpicker_hour" id="ui_tpicker_hour_' + dp_id + '"' +
309
- ((o.showHour) ? '' : noDisplay) + '></dd>';
310
-
311
- html += '<dt class="ui_tpicker_minute_label" id="ui_tpicker_minute_label_' + dp_id + '"' +
312
- ((o.showMinute) ? '' : noDisplay) + '>' + o.minuteText + '</dt>';
313
-
314
- if (o.showMinute && o.minuteGrid > 0) {
315
- html += '<dd class="ui_tpicker_minute ui_tpicker_minute_' + o.minuteGrid + '">' +
316
- '<div id="ui_tpicker_minute_' + dp_id + '"' +
317
- ((o.showMinute) ? '' : noDisplay) + '></div>' +
318
- '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
319
-
320
- for (var m = o.minuteMin; m <= minMax; m += o.minuteGrid) {
321
- minuteGridSize++;
322
- html += '<td>' + ((m < 10) ? '0' : '') + m + '</td>';
323
- }
324
-
325
- html += '</tr></table></div>' +
326
- '</dd>';
327
- } else html += '<dd class="ui_tpicker_minute" id="ui_tpicker_minute_' + dp_id + '"' +
328
- ((o.showMinute) ? '' : noDisplay) + '></dd>';
329
-
330
- html += '<dt class="ui_tpicker_second_label" id="ui_tpicker_second_label_' + dp_id + '"' +
331
- ((o.showSecond) ? '' : noDisplay) + '>' + o.secondText + '</dt>';
332
-
333
- if (o.showSecond && o.secondGrid > 0) {
334
- html += '<dd class="ui_tpicker_second ui_tpicker_second_' + o.secondGrid + '">' +
335
- '<div id="ui_tpicker_second_' + dp_id + '"' +
336
- ((o.showSecond) ? '' : noDisplay) + '></div>' +
337
- '<div style="padding-left: 1px"><table><tr>';
338
-
339
- for (var s = o.secondMin; s <= secMax; s += o.secondGrid) {
340
- secondGridSize++;
341
- html += '<td>' + ((s < 10) ? '0' : '') + s + '</td>';
342
- }
343
-
344
- html += '</tr></table></div>' +
345
- '</dd>';
346
- } else html += '<dd class="ui_tpicker_second" id="ui_tpicker_second_' + dp_id + '"' +
347
- ((o.showSecond) ? '' : noDisplay) + '></dd>';
348
-
349
- html += '<dt class="ui_tpicker_timezone_label" id="ui_tpicker_timezone_label_' + dp_id + '"' +
350
- ((o.showTimezone) ? '' : noDisplay) + '>' + o.timezoneText + '</dt>';
351
- html += '<dd class="ui_tpicker_timezone" id="ui_tpicker_timezone_' + dp_id + '"' +
352
- ((o.showTimezone) ? '' : noDisplay) + '></dd>';
353
-
354
- html += '</dl></div>';
355
- $tp = $(html);
356
-
357
- // if we only want time picker...
358
- if (o.timeOnly === true) {
359
- $tp.prepend(
360
- '<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' +
361
- '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' +
362
- '</div>');
363
- $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide();
364
- }
365
-
366
- this.hour_slider = $tp.find('#ui_tpicker_hour_'+ dp_id).slider({
367
- orientation: "horizontal",
368
- value: this.hour,
369
- min: o.hourMin,
370
- max: hourMax,
371
- step: o.stepHour,
372
- slide: function(event, ui) {
373
- tp_inst.hour_slider.slider( "option", "value", ui.value);
374
- tp_inst._onTimeChange();
375
- }
376
- });
377
-
378
- // Updated by Peter Medeiros:
379
- // - Pass in Event and UI instance into slide function
380
- this.minute_slider = $tp.find('#ui_tpicker_minute_'+ dp_id).slider({
381
- orientation: "horizontal",
382
- value: this.minute,
383
- min: o.minuteMin,
384
- max: minMax,
385
- step: o.stepMinute,
386
- slide: function(event, ui) {
387
- // update the global minute slider instance value with the current slider value
388
- tp_inst.minute_slider.slider( "option", "value", ui.value);
389
- tp_inst._onTimeChange();
390
- }
391
- });
392
-
393
- this.second_slider = $tp.find('#ui_tpicker_second_'+ dp_id).slider({
394
- orientation: "horizontal",
395
- value: this.second,
396
- min: o.secondMin,
397
- max: secMax,
398
- step: o.stepSecond,
399
- slide: function(event, ui) {
400
- tp_inst.second_slider.slider( "option", "value", ui.value);
401
- tp_inst._onTimeChange();
402
- }
403
- });
404
-
405
-
406
- this.timezone_select = $tp.find('#ui_tpicker_timezone_'+ dp_id).append('<select></select>').find("select");
407
- $.fn.append.apply(this.timezone_select,
408
- $.map(o.timezoneList, function(val, idx) {
409
- return $("<option />")
410
- .val(typeof val == "object" ? val.value : val)
411
- .text(typeof val == "object" ? val.label : val);
412
- })
413
- );
414
- this.timezone_select.val((typeof this.timezone != "undefined" && this.timezone != null && this.timezone != "") ? this.timezone : o.timezone);
415
- this.timezone_select.change(function() {
416
- tp_inst._onTimeChange();
417
- });
418
-
419
- // Add grid functionality
420
- if (o.showHour && o.hourGrid > 0) {
421
- size = 100 * hourGridSize * o.hourGrid / (hourMax - o.hourMin);
422
-
423
- $tp.find(".ui_tpicker_hour table").css({
424
- width: size + "%",
425
- marginLeft: (size / (-2 * hourGridSize)) + "%",
426
- borderCollapse: 'collapse'
427
- }).find("td").each( function(index) {
428
- $(this).click(function() {
429
- var h = $(this).html();
430
- if(o.ampm) {
431
- var ap = h.substring(2).toLowerCase(),
432
- aph = parseInt(h.substring(0,2), 10);
433
- if (ap == 'a') {
434
- if (aph == 12) h = 0;
435
- else h = aph;
436
- } else if (aph == 12) h = 12;
437
- else h = aph + 12;
438
- }
439
- tp_inst.hour_slider.slider("option", "value", h);
440
- tp_inst._onTimeChange();
441
- tp_inst._onSelectHandler();
442
- }).css({
443
- cursor: 'pointer',
444
- width: (100 / hourGridSize) + '%',
445
- textAlign: 'center',
446
- overflow: 'hidden'
447
- });
448
- });
449
- }
450
-
451
- if (o.showMinute && o.minuteGrid > 0) {
452
- size = 100 * minuteGridSize * o.minuteGrid / (minMax - o.minuteMin);
453
- $tp.find(".ui_tpicker_minute table").css({
454
- width: size + "%",
455
- marginLeft: (size / (-2 * minuteGridSize)) + "%",
456
- borderCollapse: 'collapse'
457
- }).find("td").each(function(index) {
458
- $(this).click(function() {
459
- tp_inst.minute_slider.slider("option", "value", $(this).html());
460
- tp_inst._onTimeChange();
461
- tp_inst._onSelectHandler();
462
- }).css({
463
- cursor: 'pointer',
464
- width: (100 / minuteGridSize) + '%',
465
- textAlign: 'center',
466
- overflow: 'hidden'
467
- });
468
- });
469
- }
470
-
471
- if (o.showSecond && o.secondGrid > 0) {
472
- $tp.find(".ui_tpicker_second table").css({
473
- width: size + "%",
474
- marginLeft: (size / (-2 * secondGridSize)) + "%",
475
- borderCollapse: 'collapse'
476
- }).find("td").each(function(index) {
477
- $(this).click(function() {
478
- tp_inst.second_slider.slider("option", "value", $(this).html());
479
- tp_inst._onTimeChange();
480
- tp_inst._onSelectHandler();
481
- }).css({
482
- cursor: 'pointer',
483
- width: (100 / secondGridSize) + '%',
484
- textAlign: 'center',
485
- overflow: 'hidden'
486
- });
487
- });
488
- }
489
-
490
- var $buttonPanel = $dp.find('.ui-datepicker-buttonpane');
491
- if ($buttonPanel.length) $buttonPanel.before($tp);
492
- else $dp.append($tp);
493
-
494
- this.$timeObj = $tp.find('#ui_tpicker_time_'+ dp_id);
495
-
496
- if (this.inst !== null) {
497
- var timeDefined = this.timeDefined;
498
- this._onTimeChange();
499
- this.timeDefined = timeDefined;
500
- }
501
-
502
- //Emulate datepicker onSelect behavior. Call on slidestop.
503
- var onSelectDelegate = function() {
504
- tp_inst._onSelectHandler();
505
- };
506
- this.hour_slider.bind('slidestop',onSelectDelegate);
507
- this.minute_slider.bind('slidestop',onSelectDelegate);
508
- this.second_slider.bind('slidestop',onSelectDelegate);
509
- }
510
- },
511
-
512
- //########################################################################
513
- // This function tries to limit the ability to go outside the
514
- // min/max date range
515
- //########################################################################
516
- _limitMinMaxDateTime: function(dp_inst, adjustSliders){
517
- var o = this._defaults,
518
- dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
519
-
520
- if(!this._defaults.showTimepicker) return; // No time so nothing to check here
521
-
522
- if($.datepicker._get(dp_inst, 'minDateTime') !== null && dp_date){
523
- var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'),
524
- minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0);
525
-
526
- if(this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null){
527
- this.hourMinOriginal = o.hourMin;
528
- this.minuteMinOriginal = o.minuteMin;
529
- this.secondMinOriginal = o.secondMin;
530
- }
531
-
532
- if(dp_inst.settings.timeOnly || minDateTimeDate.getTime() == dp_date.getTime()) {
533
- this._defaults.hourMin = minDateTime.getHours();
534
- if (this.hour <= this._defaults.hourMin) {
535
- this.hour = this._defaults.hourMin;
536
- this._defaults.minuteMin = minDateTime.getMinutes();
537
- if (this.minute <= this._defaults.minuteMin) {
538
- this.minute = this._defaults.minuteMin;
539
- this._defaults.secondMin = minDateTime.getSeconds();
540
- } else {
541
- if(this.second < this._defaults.secondMin) this.second = this._defaults.secondMin;
542
- this._defaults.secondMin = this.secondMinOriginal;
543
- }
544
- } else {
545
- this._defaults.minuteMin = this.minuteMinOriginal;
546
- this._defaults.secondMin = this.secondMinOriginal;
547
- }
548
- }else{
549
- this._defaults.hourMin = this.hourMinOriginal;
550
- this._defaults.minuteMin = this.minuteMinOriginal;
551
- this._defaults.secondMin = this.secondMinOriginal;
552
- }
553
- }
554
-
555
- if($.datepicker._get(dp_inst, 'maxDateTime') !== null && dp_date){
556
- var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),
557
- maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);
558
-
559
- if(this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null){
560
- this.hourMaxOriginal = o.hourMax;
561
- this.minuteMaxOriginal = o.minuteMax;
562
- this.secondMaxOriginal = o.secondMax;
563
- }
564
-
565
- if(dp_inst.settings.timeOnly || maxDateTimeDate.getTime() == dp_date.getTime()){
566
- this._defaults.hourMax = maxDateTime.getHours();
567
- if (this.hour >= this._defaults.hourMax) {
568
- this.hour = this._defaults.hourMax;
569
- this._defaults.minuteMax = maxDateTime.getMinutes();
570
- if (this.minute >= this._defaults.minuteMax) {
571
- this.minute = this._defaults.minuteMax;
572
- this._defaults.secondMax = maxDateTime.getSeconds();
573
- } else {
574
- if(this.second > this._defaults.secondMax) this.second = this._defaults.secondMax;
575
- this._defaults.secondMax = this.secondMaxOriginal;
576
- }
577
- } else {
578
- this._defaults.minuteMax = this.minuteMaxOriginal;
579
- this._defaults.secondMax = this.secondMaxOriginal;
580
- }
581
- }else{
582
- this._defaults.hourMax = this.hourMaxOriginal;
583
- this._defaults.minuteMax = this.minuteMaxOriginal;
584
- this._defaults.secondMax = this.secondMaxOriginal;
585
- }
586
- }
587
-
588
- if(adjustSliders !== undefined && adjustSliders === true){
589
- var hourMax = (this._defaults.hourMax - (this._defaults.hourMax % this._defaults.stepHour)).toFixed(0),
590
- minMax = (this._defaults.minuteMax - (this._defaults.minuteMax % this._defaults.stepMinute)).toFixed(0),
591
- secMax = (this._defaults.secondMax - (this._defaults.secondMax % this._defaults.stepSecond)).toFixed(0);
592
-
593
- if(this.hour_slider)
594
- this.hour_slider.slider("option", { min: this._defaults.hourMin, max: hourMax }).slider('value', this.hour);
595
- if(this.minute_slider)
596
- this.minute_slider.slider("option", { min: this._defaults.minuteMin, max: minMax }).slider('value', this.minute);
597
- if(this.second_slider)
598
- this.second_slider.slider("option", { min: this._defaults.secondMin, max: secMax }).slider('value', this.second);
599
- }
600
-
601
- },
602
-
603
-
604
- //########################################################################
605
- // when a slider moves, set the internal time...
606
- // on time change is also called when the time is updated in the text field
607
- //########################################################################
608
- _onTimeChange: function() {
609
- var hour = (this.hour_slider) ? this.hour_slider.slider('value') : false,
610
- minute = (this.minute_slider) ? this.minute_slider.slider('value') : false,
611
- second = (this.second_slider) ? this.second_slider.slider('value') : false,
612
- timezone = (this.timezone_select) ? this.timezone_select.val() : false;
613
-
614
- if (typeof(hour) == 'object') hour = false;
615
- if (typeof(minute) == 'object') minute = false;
616
- if (typeof(second) == 'object') second = false;
617
- if (typeof(timezone) == 'object') timezone = false;
618
-
619
- if (hour !== false) hour = parseInt(hour,10);
620
- if (minute !== false) minute = parseInt(minute,10);
621
- if (second !== false) second = parseInt(second,10);
622
-
623
- var ampm = (hour < 12) ? 'AM' : 'PM';
624
-
625
- // If the update was done in the input field, the input field should not be updated.
626
- // If the update was done using the sliders, update the input field.
627
- var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || (this.ampm.length > 0 && this.ampm != ampm) || timezone != this.timezone);
628
-
629
- if (hasChanged) {
630
-
631
- if (hour !== false)this.hour = hour;
632
- if (minute !== false) this.minute = minute;
633
- if (second !== false) this.second = second;
634
- if (timezone !== false) this.timezone = timezone;
635
-
636
- if (!this.inst) this.inst = $.datepicker._getInst(this.$input[0]);
637
-
638
- this._limitMinMaxDateTime(this.inst, true);
639
- }
640
- if (this._defaults.ampm) this.ampm = ampm;
641
-
642
- this._formatTime();
643
- if (this.$timeObj) this.$timeObj.text(this.formattedTime + this._defaults.timeSuffix);
644
- this.timeDefined = true;
645
- if (hasChanged) this._updateDateTime();
646
- },
647
-
648
- //########################################################################
649
- // call custom onSelect.
650
- // bind to sliders slidestop, and grid click.
651
- //########################################################################
652
- _onSelectHandler: function() {
653
- var onSelect = this._defaults['onSelect'];
654
- var inputEl = this.$input ? this.$input[0] : null;
655
- if (onSelect && inputEl) {
656
- onSelect.apply(inputEl, [this.formattedDateTime, this]);
657
- }
658
- },
659
-
660
- //########################################################################
661
- // format the time all pretty...
662
- //########################################################################
663
- _formatTime: function(time, format, ampm) {
664
- if (ampm == undefined) ampm = this._defaults.ampm;
665
- time = time || { hour: this.hour, minute: this.minute, second: this.second, ampm: this.ampm, timezone: this.timezone };
666
- var tmptime = format || this._defaults.timeFormat.toString();
667
-
668
- if (ampm) {
669
- var hour12 = ((time.ampm == 'AM') ? (time.hour) : (time.hour % 12));
670
- hour12 = (Number(hour12) === 0) ? 12 : hour12;
671
- tmptime = tmptime.toString()
672
- .replace(/hh/g, ((hour12 < 10) ? '0' : '') + hour12)
673
- .replace(/h/g, hour12)
674
- .replace(/mm/g, ((time.minute < 10) ? '0' : '') + time.minute)
675
- .replace(/m/g, time.minute)
676
- .replace(/ss/g, ((time.second < 10) ? '0' : '') + time.second)
677
- .replace(/s/g, time.second)
678
- .replace(/TT/g, time.ampm.toUpperCase())
679
- .replace(/Tt/g, time.ampm.toUpperCase())
680
- .replace(/tT/g, time.ampm.toLowerCase())
681
- .replace(/tt/g, time.ampm.toLowerCase())
682
- .replace(/T/g, time.ampm.charAt(0).toUpperCase())
683
- .replace(/t/g, time.ampm.charAt(0).toLowerCase())
684
- .replace(/z/g, time.timezone);
685
- } else {
686
- tmptime = tmptime.toString()
687
- .replace(/hh/g, ((time.hour < 10) ? '0' : '') + time.hour)
688
- .replace(/h/g, time.hour)
689
- .replace(/mm/g, ((time.minute < 10) ? '0' : '') + time.minute)
690
- .replace(/m/g, time.minute)
691
- .replace(/ss/g, ((time.second < 10) ? '0' : '') + time.second)
692
- .replace(/s/g, time.second)
693
- .replace(/z/g, time.timezone);
694
- tmptime = $.trim(tmptime.replace(/t/gi, ''));
695
- }
696
-
697
- if (arguments.length) return tmptime;
698
- else this.formattedTime = tmptime;
699
- },
700
-
701
- //########################################################################
702
- // update our input with the new date time..
703
- //########################################################################
704
- _updateDateTime: function(dp_inst) {
705
- dp_inst = this.inst || dp_inst,
706
- dt = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay),
707
- dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
708
- formatCfg = $.datepicker._getFormatConfig(dp_inst),
709
- timeAvailable = dt !== null && this.timeDefined;
710
- this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg);
711
- var formattedDateTime = this.formattedDate;
712
- if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0))
713
- return;
714
-
715
- if (this._defaults.timeOnly === true) {
716
- formattedDateTime = this.formattedTime;
717
- } else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
718
- formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix;
719
- }
720
-
721
- this.formattedDateTime = formattedDateTime;
722
-
723
- if(!this._defaults.showTimepicker) {
724
- this.$input.val(this.formattedDate);
725
- } else if (this.$altInput && this._defaults.altFieldTimeOnly === true) {
726
- this.$altInput.val(this.formattedTime);
727
- this.$input.val(this.formattedDate);
728
- } else if(this.$altInput) {
729
- this.$altInput.val(formattedDateTime);
730
- this.$input.val(formattedDateTime);
731
- } else {
732
- this.$input.val(formattedDateTime);
733
- }
734
-
735
- this.$input.trigger("change");
736
- }
737
-
738
- });
739
-
740
- $.fn.extend({
741
- //########################################################################
742
- // shorthand just to use timepicker..
743
- //########################################################################
744
- timepicker: function(o) {
745
- o = o || {};
746
- var tmp_args = arguments;
747
-
748
- if (typeof o == 'object') tmp_args[0] = $.extend(o, { timeOnly: true });
749
-
750
- return $(this).each(function() {
751
- $.fn.datetimepicker.apply($(this), tmp_args);
752
- });
753
- },
754
-
755
- //########################################################################
756
- // extend timepicker to datepicker
757
- //########################################################################
758
- datetimepicker: function(o) {
759
- o = o || {};
760
- var $input = this,
761
- tmp_args = arguments;
762
-
763
- if (typeof(o) == 'string'){
764
- if(o == 'getDate')
765
- return $.fn.datepicker.apply($(this[0]), tmp_args);
766
- else
767
- return this.each(function() {
768
- var $t = $(this);
769
- $t.datepicker.apply($t, tmp_args);
770
- });
771
- }
772
- else
773
- return this.each(function() {
774
- var $t = $(this);
775
- $t.datepicker($.timepicker._newInst($t, o)._defaults);
776
- });
777
- }
778
- });
779
-
780
- //########################################################################
781
- // the bad hack :/ override datepicker so it doesnt close on select
782
- // inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378
783
- //########################################################################
784
- $.datepicker._base_selectDate = $.datepicker._selectDate;
785
- $.datepicker._selectDate = function (id, dateStr) {
786
- var inst = this._getInst($(id)[0]),
787
- tp_inst = this._get(inst, 'timepicker');
788
-
789
- if (tp_inst) {
790
- tp_inst._limitMinMaxDateTime(inst, true);
791
- inst.inline = inst.stay_open = true;
792
- //This way the onSelect handler called from calendarpicker get the full dateTime
793
- this._base_selectDate(id, dateStr + tp_inst._defaults.separator + tp_inst.formattedTime + tp_inst._defaults.timeSuffix);
794
- inst.inline = inst.stay_open = false;
795
- this._notifyChange(inst);
796
- this._updateDatepicker(inst);
797
- }
798
- else this._base_selectDate(id, dateStr);
799
- };
800
-
801
- //#############################################################################################
802
- // second bad hack :/ override datepicker so it triggers an event when changing the input field
803
- // and does not redraw the datepicker on every selectDate event
804
- //#############################################################################################
805
- $.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker;
806
- $.datepicker._updateDatepicker = function(inst) {
807
-
808
- // don't popup the datepicker if there is another instance already opened
809
- var input = inst.input[0];
810
- if($.datepicker._curInst &&
811
- $.datepicker._curInst != inst &&
812
- $.datepicker._datepickerShowing &&
813
- $.datepicker._lastInput != input) {
814
- return;
815
- }
816
-
817
- if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) {
818
-
819
- this._base_updateDatepicker(inst);
820
-
821
- // Reload the time control when changing something in the input text field.
822
- var tp_inst = this._get(inst, 'timepicker');
823
- if(tp_inst) tp_inst._addTimePicker(inst);
824
- }
825
- };
826
-
827
- //#######################################################################################
828
- // third bad hack :/ override datepicker so it allows spaces and colon in the input field
829
- //#######################################################################################
830
- $.datepicker._base_doKeyPress = $.datepicker._doKeyPress;
831
- $.datepicker._doKeyPress = function(event) {
832
- var inst = $.datepicker._getInst(event.target),
833
- tp_inst = $.datepicker._get(inst, 'timepicker');
834
-
835
- if (tp_inst) {
836
- if ($.datepicker._get(inst, 'constrainInput')) {
837
- var ampm = tp_inst._defaults.ampm,
838
- dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')),
839
- datetimeChars = tp_inst._defaults.timeFormat.toString()
840
- .replace(/[hms]/g, '')
841
- .replace(/TT/g, ampm ? 'APM' : '')
842
- .replace(/Tt/g, ampm ? 'AaPpMm' : '')
843
- .replace(/tT/g, ampm ? 'AaPpMm' : '')
844
- .replace(/T/g, ampm ? 'AP' : '')
845
- .replace(/tt/g, ampm ? 'apm' : '')
846
- .replace(/t/g, ampm ? 'ap' : '') +
847
- " " +
848
- tp_inst._defaults.separator +
849
- tp_inst._defaults.timeSuffix +
850
- (tp_inst._defaults.showTimezone ? tp_inst._defaults.timezoneList.join('') : '') +
851
- dateChars,
852
- chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);
853
- return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);
854
- }
855
- }
856
-
857
- return $.datepicker._base_doKeyPress(event);
858
- };
859
-
860
- //#######################################################################################
861
- // Override key up event to sync manual input changes.
862
- //#######################################################################################
863
- $.datepicker._base_doKeyUp = $.datepicker._doKeyUp;
864
- $.datepicker._doKeyUp = function (event) {
865
- var inst = $.datepicker._getInst(event.target),
866
- tp_inst = $.datepicker._get(inst, 'timepicker');
867
-
868
- if (tp_inst) {
869
- if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {
870
- try {
871
- $.datepicker._updateDatepicker(inst);
872
- }
873
- catch (err) {
874
- $.datepicker.log(err);
875
- }
876
- }
877
- }
878
-
879
- return $.datepicker._base_doKeyUp(event);
880
- };
881
-
882
- //#######################################################################################
883
- // override "Today" button to also grab the time.
884
- //#######################################################################################
885
- $.datepicker._base_gotoToday = $.datepicker._gotoToday;
886
- $.datepicker._gotoToday = function(id) {
887
- this._base_gotoToday(id);
888
- this._setTime(this._getInst($(id)[0]), new Date());
889
- };
890
-
891
- //#######################################################################################
892
- // Disable & enable the Time in the datetimepicker
893
- //#######################################################################################
894
- $.datepicker._disableTimepickerDatepicker = function(target, date, withDate) {
895
- var inst = this._getInst(target),
896
- tp_inst = this._get(inst, 'timepicker');
897
- $(target).datepicker('getDate'); // Init selected[Year|Month|Day]
898
- if (tp_inst) {
899
- tp_inst._defaults.showTimepicker = false;
900
- tp_inst._updateDateTime(inst);
901
- }
902
- };
903
-
904
- $.datepicker._enableTimepickerDatepicker = function(target, date, withDate) {
905
- var inst = this._getInst(target),
906
- tp_inst = this._get(inst, 'timepicker');
907
- $(target).datepicker('getDate'); // Init selected[Year|Month|Day]
908
- if (tp_inst) {
909
- tp_inst._defaults.showTimepicker = true;
910
- tp_inst._addTimePicker(inst); // Could be disabled on page load
911
- tp_inst._updateDateTime(inst);
912
- }
913
- };
914
-
915
- //#######################################################################################
916
- // Create our own set time function
917
- //#######################################################################################
918
- $.datepicker._setTime = function(inst, date) {
919
- var tp_inst = this._get(inst, 'timepicker');
920
- if (tp_inst) {
921
- var defaults = tp_inst._defaults,
922
- // calling _setTime with no date sets time to defaults
923
- hour = date ? date.getHours() : defaults.hour,
924
- minute = date ? date.getMinutes() : defaults.minute,
925
- second = date ? date.getSeconds() : defaults.second;
926
-
927
- //check if within min/max times..
928
- if ((hour < defaults.hourMin || hour > defaults.hourMax) || (minute < defaults.minuteMin || minute > defaults.minuteMax) || (second < defaults.secondMin || second > defaults.secondMax)) {
929
- hour = defaults.hourMin;
930
- minute = defaults.minuteMin;
931
- second = defaults.secondMin;
932
- }
933
-
934
- tp_inst.hour = hour;
935
- tp_inst.minute = minute;
936
- tp_inst.second = second;
937
-
938
- if (tp_inst.hour_slider) tp_inst.hour_slider.slider('value', hour);
939
- if (tp_inst.minute_slider) tp_inst.minute_slider.slider('value', minute);
940
- if (tp_inst.second_slider) tp_inst.second_slider.slider('value', second);
941
-
942
- tp_inst._onTimeChange();
943
- tp_inst._updateDateTime(inst);
944
- }
945
- };
946
-
947
- //#######################################################################################
948
- // Create new public method to set only time, callable as $().datepicker('setTime', date)
949
- //#######################################################################################
950
- $.datepicker._setTimeDatepicker = function(target, date, withDate) {
951
- var inst = this._getInst(target),
952
- tp_inst = this._get(inst, 'timepicker');
953
-
954
- if (tp_inst) {
955
- this._setDateFromField(inst);
956
- var tp_date;
957
- if (date) {
958
- if (typeof date == "string") {
959
- tp_inst._parseTime(date, withDate);
960
- tp_date = new Date();
961
- tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second);
962
- }
963
- else tp_date = new Date(date.getTime());
964
- if (tp_date.toString() == 'Invalid Date') tp_date = undefined;
965
- this._setTime(inst, tp_date);
966
- }
967
- }
968
-
969
- };
970
-
971
- //#######################################################################################
972
- // override setDate() to allow setting time too within Date object
973
- //#######################################################################################
974
- $.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker;
975
- $.datepicker._setDateDatepicker = function(target, date) {
976
- var inst = this._getInst(target),
977
- tp_date = (date instanceof Date) ? new Date(date.getTime()) : date;
978
-
979
- this._updateDatepicker(inst);
980
- this._base_setDateDatepicker.apply(this, arguments);
981
- this._setTimeDatepicker(target, tp_date, true);
982
- };
983
-
984
- //#######################################################################################
985
- // override getDate() to allow getting time too within Date object
986
- //#######################################################################################
987
- $.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker;
988
- $.datepicker._getDateDatepicker = function(target, noDefault) {
989
- var inst = this._getInst(target),
990
- tp_inst = this._get(inst, 'timepicker');
991
-
992
- if (tp_inst) {
993
- this._setDateFromField(inst, noDefault);
994
- var date = this._getDate(inst);
995
- if (date && tp_inst._parseTime($(target).val(), tp_inst.timeOnly)) date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second);
996
- return date;
997
- }
998
- return this._base_getDateDatepicker(target, noDefault);
999
- };
1000
-
1001
- //#######################################################################################
1002
- // override parseDate() because UI 1.8.14 throws an error about "Extra characters"
1003
- // An option in datapicker to ignore extra format characters would be nicer.
1004
- //#######################################################################################
1005
- $.datepicker._base_parseDate = $.datepicker.parseDate;
1006
- $.datepicker.parseDate = function(format, value, settings) {
1007
- var date;
1008
- try {
1009
- date = this._base_parseDate(format, value, settings);
1010
- } catch (err) {
1011
- // Hack! The error message ends with a colon, a space, and
1012
- // the "extra" characters. We rely on that instead of
1013
- // attempting to perfectly reproduce the parsing algorithm.
1014
- date = this._base_parseDate(format, value.substring(0,value.length-(err.length-err.indexOf(':')-2)), settings);
1015
- }
1016
- return date;
1017
- };
1018
-
1019
- //#######################################################################################
1020
- // override options setter to add time to maxDate(Time) and minDate(Time)
1021
- //#######################################################################################
1022
- $.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker;
1023
- $.datepicker._optionDatepicker = function(target, name, value) {
1024
- this._base_optionDatepicker(target, name, value);
1025
- var inst = this._getInst(target),
1026
- tp_inst = this._get(inst, 'timepicker');
1027
- if (tp_inst) {
1028
- //Set minimum and maximum date values if we have timepicker
1029
- if(name==='minDate') {
1030
- if(tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date)
1031
- tp_inst._defaults.minDateTime = new Date(value);
1032
- if(tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date)
1033
- tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());
1034
- tp_inst._limitMinMaxDateTime(inst,true);
1035
- }
1036
- if(name==='maxDate') {
1037
- if(tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date)
1038
- tp_inst._defaults.maxDateTime = new Date(value);
1039
- if(tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date)
1040
- tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());
1041
- tp_inst._limitMinMaxDateTime(inst,true);
1042
- }
1043
- }
1044
- };
1045
-
1046
- //#######################################################################################
1047
- // jQuery extend now ignores nulls!
1048
- //#######################################################################################
1049
- function extendRemove(target, props) {
1050
- $.extend(target, props);
1051
- for (var name in props)
1052
- if (props[name] === null || props[name] === undefined)
1053
- target[name] = props[name];
1054
- return target;
1055
- }
1056
-
1057
- $.timepicker = new Timepicker(); // singleton instance
1058
- $.timepicker.version = "0.9.6";
1059
-
1060
- })(jQuery);