Social Media Share Buttons | MashShare - Version 3.5.4

Version Description

  • New: Support for Yoast custom variables e.g. %%title%%
  • New: Add sharedcount.com 10.000 free daily api requests
  • New: Switch from newsharecount to opensharecount.com to collect twitter shares
  • New: Collect twitter shares with social network add-on
Download this release

Release Info

Developer ReneHermi
Plugin Icon 128x128 Social Media Share Buttons | MashShare
Version 3.5.4
Comparing to
See all releases

Code changes from version 3.5.3 to 3.5.4

Files changed (189) hide show
  1. assets/css/fonts/mashsb-font.svg +77 -77
  2. assets/js/chosen.jquery.js +1284 -1284
  3. assets/js/chosen.jquery.min.js +1 -1
  4. includes/admin/admin-notices.php +3 -3
  5. includes/admin/meta-box/css/autocomplete.css +13 -13
  6. includes/admin/meta-box/css/checkbox.css +4 -4
  7. includes/admin/meta-box/css/color.css +7 -7
  8. includes/admin/meta-box/css/datepicker.css +231 -231
  9. includes/admin/meta-box/css/divider.css +6 -6
  10. includes/admin/meta-box/css/file.css +57 -57
  11. includes/admin/meta-box/css/heading.css +11 -11
  12. includes/admin/meta-box/css/image-advanced.css +43 -43
  13. includes/admin/meta-box/css/image-select.css +20 -20
  14. includes/admin/meta-box/css/image.css +66 -66
  15. includes/admin/meta-box/css/input-list.css +7 -7
  16. includes/admin/meta-box/css/jqueryui/jquery-ui-timepicker-addon.min.css +4 -4
  17. includes/admin/meta-box/css/jqueryui/jquery.ui.core.css +38 -38
  18. includes/admin/meta-box/css/jqueryui/jquery.ui.datepicker.css +67 -67
  19. includes/admin/meta-box/css/jqueryui/jquery.ui.slider.css +23 -23
  20. includes/admin/meta-box/css/jqueryui/jquery.ui.theme.css +248 -248
  21. includes/admin/meta-box/css/map.css +4 -4
  22. includes/admin/meta-box/css/media.css +81 -81
  23. includes/admin/meta-box/css/oembed.css +10 -10
  24. includes/admin/meta-box/css/plupload-image.css +24 -24
  25. includes/admin/meta-box/css/range.css +13 -13
  26. includes/admin/meta-box/css/select-advanced.css +7 -7
  27. includes/admin/meta-box/css/select-tree.css +7 -7
  28. includes/admin/meta-box/css/select.css +4 -4
  29. includes/admin/meta-box/css/select2/select2.css +483 -483
  30. includes/admin/meta-box/css/slider.css +12 -12
  31. includes/admin/meta-box/css/style-rtl.css +6 -6
  32. includes/admin/meta-box/css/upload.css +30 -30
  33. includes/admin/meta-box/css/wysiwyg.css +6 -6
  34. includes/admin/meta-box/inc/core.php +142 -142
  35. includes/admin/meta-box/inc/field.php +495 -495
  36. includes/admin/meta-box/inc/fields/autocomplete.php +120 -120
  37. includes/admin/meta-box/inc/fields/button.php +47 -47
  38. includes/admin/meta-box/inc/fields/checkbox-list.php +19 -19
  39. includes/admin/meta-box/inc/fields/checkbox.php +87 -87
  40. includes/admin/meta-box/inc/fields/choice.php +160 -160
  41. includes/admin/meta-box/inc/fields/color.php +85 -85
  42. includes/admin/meta-box/inc/fields/date.php +31 -31
  43. includes/admin/meta-box/inc/fields/datetime.php +264 -264
  44. includes/admin/meta-box/inc/fields/divider.php +43 -43
  45. includes/admin/meta-box/inc/fields/email.php +50 -50
  46. includes/admin/meta-box/inc/fields/fieldset-text.php +84 -84
  47. includes/admin/meta-box/inc/fields/file-advanced.php +43 -43
  48. includes/admin/meta-box/inc/fields/file-input.php +64 -64
  49. includes/admin/meta-box/inc/fields/file-upload.php +39 -39
  50. includes/admin/meta-box/inc/fields/heading.php +45 -45
  51. includes/admin/meta-box/inc/fields/hidden-data.php +28 -28
  52. includes/admin/meta-box/inc/fields/hidden.php +22 -22
  53. includes/admin/meta-box/inc/fields/image-advanced.php +90 -90
  54. includes/admin/meta-box/inc/fields/image-select.php +116 -116
  55. includes/admin/meta-box/inc/fields/image-upload.php +30 -30
  56. includes/admin/meta-box/inc/fields/input-list.php +91 -91
  57. includes/admin/meta-box/inc/fields/input.php +83 -83
  58. includes/admin/meta-box/inc/fields/key-value.php +149 -149
  59. includes/admin/meta-box/inc/fields/map.php +162 -162
  60. includes/admin/meta-box/inc/fields/media.php +152 -152
  61. includes/admin/meta-box/inc/fields/multiple-values.php +73 -73
  62. includes/admin/meta-box/inc/fields/number.php +47 -47
  63. includes/admin/meta-box/inc/fields/object-choice.php +145 -145
  64. includes/admin/meta-box/inc/fields/oembed.php +122 -122
  65. includes/admin/meta-box/inc/fields/password.php +34 -34
  66. includes/admin/meta-box/inc/fields/plupload-image.php +5 -5
  67. includes/admin/meta-box/inc/fields/post.php +132 -132
  68. includes/admin/meta-box/inc/fields/radio.php +19 -19
  69. includes/admin/meta-box/inc/fields/range.php +93 -93
  70. includes/admin/meta-box/inc/fields/select-advanced.php +102 -102
  71. includes/admin/meta-box/inc/fields/select-tree.php +64 -64
  72. includes/admin/meta-box/inc/fields/select.php +95 -95
  73. includes/admin/meta-box/inc/fields/slider.php +66 -66
  74. includes/admin/meta-box/inc/fields/taxonomy-advanced.php +89 -89
  75. includes/admin/meta-box/inc/fields/taxonomy.php +164 -164
  76. includes/admin/meta-box/inc/fields/text-list.php +91 -91
  77. includes/admin/meta-box/inc/fields/text.php +48 -48
  78. includes/admin/meta-box/inc/fields/textarea.php +79 -79
  79. includes/admin/meta-box/inc/fields/thickbox-image.php +79 -79
  80. includes/admin/meta-box/inc/fields/time.php +31 -31
  81. includes/admin/meta-box/inc/fields/url.php +37 -37
  82. includes/admin/meta-box/inc/fields/user.php +89 -89
  83. includes/admin/meta-box/inc/fields/wysiwyg.php +106 -106
  84. includes/admin/meta-box/inc/functions.php +136 -136
  85. includes/admin/meta-box/inc/helper.php +135 -135
  86. includes/admin/meta-box/inc/loader.php +132 -132
  87. includes/admin/meta-box/inc/meta-box.php +427 -427
  88. includes/admin/meta-box/inc/templates/image-advanced.php +22 -22
  89. includes/admin/meta-box/inc/templates/image-advanced_1.php +33 -33
  90. includes/admin/meta-box/inc/templates/media.php +49 -49
  91. includes/admin/meta-box/inc/templates/upload.php +9 -9
  92. includes/admin/meta-box/inc/validation.php +45 -45
  93. includes/admin/meta-box/inc/walkers/input-list-walker.php +70 -70
  94. includes/admin/meta-box/inc/walkers/select-tree-walker.php +75 -75
  95. includes/admin/meta-box/inc/walkers/select-walker.php +32 -32
  96. includes/admin/meta-box/inc/walkers/walker.php +34 -34
  97. includes/admin/meta-box/js/autocomplete.js +55 -55
  98. includes/admin/meta-box/js/autosave.js +19 -19
  99. includes/admin/meta-box/js/clone.js +211 -211
  100. includes/admin/meta-box/js/color.js +38 -38
  101. includes/admin/meta-box/js/date.js +57 -57
  102. includes/admin/meta-box/js/datetime.js +67 -67
  103. includes/admin/meta-box/js/file-input.js +42 -42
  104. includes/admin/meta-box/js/file-upload.js +199 -199
  105. includes/admin/meta-box/js/file.js +157 -157
  106. includes/admin/meta-box/js/image-advanced.js +36 -36
  107. includes/admin/meta-box/js/image-select.js +26 -26
  108. includes/admin/meta-box/js/image-upload.js +31 -31
  109. includes/admin/meta-box/js/image.js +25 -25
  110. includes/admin/meta-box/js/input-list.js +25 -25
  111. includes/admin/meta-box/js/jquery.validate.min.js +1 -1
  112. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-af.js +23 -23
  113. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar-DZ.js +23 -23
  114. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar.js +23 -23
  115. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-az.js +23 -23
  116. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-be.js +23 -23
  117. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bg.js +24 -24
  118. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bs.js +23 -23
  119. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ca.js +23 -23
  120. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cs.js +23 -23
  121. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cy-GB.js +23 -23
  122. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-da.js +23 -23
  123. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-de.js +23 -23
  124. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-el.js +23 -23
  125. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-AU.js +23 -23
  126. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-GB.js +23 -23
  127. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-NZ.js +23 -23
  128. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eo.js +23 -23
  129. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-es.js +23 -23
  130. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-et.js +23 -23
  131. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eu.js +23 -23
  132. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fa.js +59 -59
  133. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fi.js +23 -23
  134. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fo.js +23 -23
  135. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CA.js +23 -23
  136. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CH.js +23 -23
  137. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr.js +25 -25
  138. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-gl.js +23 -23
  139. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-he.js +23 -23
  140. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hi.js +23 -23
  141. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hr.js +23 -23
  142. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hu.js +23 -23
  143. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hy.js +23 -23
  144. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-id.js +23 -23
  145. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-is.js +23 -23
  146. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-it.js +23 -23
  147. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ja.js +23 -23
  148. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ka.js +21 -21
  149. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-kk.js +23 -23
  150. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-km.js +23 -23
  151. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ko.js +23 -23
  152. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ky.js +24 -24
  153. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lb.js +23 -23
  154. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lt.js +23 -23
  155. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lv.js +23 -23
  156. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-mk.js +23 -23
  157. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ml.js +23 -23
  158. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ms.js +23 -23
  159. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nb.js +22 -22
  160. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl-BE.js +23 -23
  161. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl.js +23 -23
  162. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nn.js +22 -22
  163. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-no.js +23 -23
  164. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pl.js +23 -23
  165. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt-BR.js +23 -23
  166. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt.js +22 -22
  167. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-rm.js +21 -21
  168. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ro.js +26 -26
  169. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ru.js +23 -23
  170. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sk.js +23 -23
  171. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sl.js +24 -24
  172. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sq.js +23 -23
  173. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr-SR.js +23 -23
  174. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr.js +23 -23
  175. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sv.js +23 -23
  176. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ta.js +23 -23
  177. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-th.js +23 -23
  178. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tj.js +23 -23
  179. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tr.js +23 -23
  180. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-uk.js +24 -24
  181. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-vi.js +23 -23
  182. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-CN.js +23 -23
  183. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-HK.js +23 -23
  184. includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-TW.js +23 -23
  185. includes/admin/meta-box/js/jqueryui/jquery-ui-timepicker-addon-i18n.min.js +4 -4
  186. includes/admin/meta-box/js/jqueryui/jquery-ui-timepicker-addon.min.js +4 -4
  187. includes/admin/meta-box/js/map-frontend.js +71 -71
  188. includes/admin/meta-box/js/map.js +227 -227
  189. includes/admin/meta-box/js/media.js +201 -451
assets/css/fonts/mashsb-font.svg CHANGED
@@ -1,78 +1,78 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
5
- <defs>
6
- <font id="mashsb-font" horiz-adv-x="1000" >
7
- <font-face font-family="mashsb-font" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
- <missing-glyph horiz-adv-x="1000" />
9
- <glyph glyph-name="facebook" unicode="&#xe800;" d="M535 843v-147h-87q-48 0-65-20t-17-60v-106h164l-22-165h-142v-424h-171v424h-142v165h142v122q0 104 58 161t155 57q82 0 127-7z" horiz-adv-x="571.4" />
10
-
11
- <glyph glyph-name="google" unicode="&#xe801;" d="M0 32q0 87 89 155t215 68l54 0q-42 40-42 86 0 29 16 58-10-1-29-1-104 0-170 65t-66 160q0 91 82 159t187 68l310 0-69-50-98 0q47-18 74-68t26-111q0-93-88-162-37-29-48-46t-11-42q0-19 27-48t54-49q61-43 85-88t23-113q0-90-82-157t-222-66q-133 0-225 50t-92 132z m112 33q0-69 59-118t145-48q119 0 173 44t53 117q0 19-4 32-3 11-7 21t-12 19-14 16-19 16-21 15-25 18-26 17q-39 12-77 12l-4 0q-87 0-153-47-68-48-68-114z m66 559q11-79 61-136t109-58l4 0q56 0 90 52 27 42 27 99 0 16-2 34-10 79-59 134t-110 57l-4 0q-57 0-91-51-27-41-27-98 0-16 2-33z" horiz-adv-x="646" />
12
-
13
- <glyph glyph-name="pinterest" unicode="&#xe802;" d="M0 350q4 213 150 356t350 144q219-4 358-149t142-351q-4-211-150-354t-350-146q-70 0-141 21 14 22 28 49 15 34 39 125 6 26 17 69 14-24 47-43 88-41 186 8 101 58 140 181 36 129-8 239t-158 160q-142 41-277-9t-187-171q-14-45-17-89t3-86 29-75 63-51q9-4 15 0 8 4 16 31t6 38q-2 3-8 13-41 67-27 140t60 124q72 64 169 70t165-53q37-42 48-103t0-116-38-105q-49-76-115-78-39 2-64 30t-14 66q3 21 23 84t22 94q-6 74-69 76-49-6-72-44t-26-87q6-57 18-78-21-88-33-141-4-14-22-84t-19-107l0-55q-139 64-219 187t-80 270z" horiz-adv-x="1000" />
14
-
15
- <glyph glyph-name="linkedin" unicode="&#xe803;" d="M0-150l0 1000 1000 0 0-1000-1000 0z m164 729q2-34 25-54t53-23l2 0q35 2 59 24t23 53q-2 33-25 53t-55 21q-35 0-58-22t-24-52z m8-569l144 0 0 434-144 0 0-434z m225 0l144 0 0 242q0 24 4 36 27 52 74 52 72-2 72-97l0-233 145 0 0 248q-2 98-47 149-47 47-119 49-53-2-86-26-21-15-43-47l0 61-144 0q1-18 1-70 0-90-1-364z" horiz-adv-x="1000" />
16
-
17
- <glyph glyph-name="digg" unicode="&#xe804;" d="M0 152l0 372q0 13 13 13l176 0 0 129q0 14 13 14l98 0 0-514q0-14-12-14l-288 0z m109 83l67 0q13 0 13 14l0 206-67 0q-13 0-13-14l0-206z m225-83l0 372q0 13 13 13l98 0 0-371q0-14-12-14l-99 0z m0 445l0 69q0 14 12 14l99 0 0-69q0-14-12-14l-99 0z m149-445l0 372q0 13 13 13l288 0 0-504q0-13-13-13l-288 0 1 69q0 14 12 14l176 0 0 49-189 0z m110 83l67 0q12 0 12 14l0 206-67 0q-12 0-12-14l0-206z m229-146q0 14 13 14l176 0 0 49-189 0 0 372q0 13 13 13l287 0 0-504q0-13-12-13l-288 0 0 69z m109 146l67 0q13 0 13 14l0 206-67 0q-13 0-13-14l0-206z" horiz-adv-x="1122" />
18
-
19
- <glyph glyph-name="reddit" unicode="&#xe805;" d="M0 353q0 62 50 106t112 44q62 0 105-36l5 0q134 82 335 82l5 4 70 267 242-36q0-1 2-1 1 0 0 1 2 1 12 16t14 18q34 32 82 32 49 0 83-32t33-82-33-84-83-35q-57 0-87 39t-30 96q-2-1-97 13t-110 17l-3 0q-2-2-16-53t-30-109-18-64l0-3 5-4q72 0 148-20t130-58l3-2q1 1 2 1t2 1q25 18 36 25t29 13 43 6q68 0 116-48t48-117q0-47-26-86t-70-60q0-195-260-303-41-18-56-23-32-10-91-19t-93-9q-120 0-231 35-2 2-72 38-95 51-152 116t-58 156l-5 0q-33 17-59 50l-9 12q-15 27-19 46t-4 50z m34-12q0-66 57-112 5 59 48 116t101 101q-37 26-82 26-49 0-86-40t-38-91z m102-146q0-54 31-104t80-85 102-60 105-34q75-14 146-14 123 0 233 39t185 123l-3 0q30 38 43 69t13 72q0 54-26 103t-70 84-92 61-100 38q-85 23-181 23-74 0-151-18t-150-54-119-99-46-144z m186 73q0 37 23 60t59 22 62-22 25-60q0-36-25-60t-62-24-59 24-23 60z m36-164l44 0q25-45 80-68t111-24q58 0 110 24t84 68l41 0q-25-62-93-96t-142-34q-72 0-141 35t-94 95z m336 164q0 38 23 60t61 22q34 0 58-24t24-58-24-59-58-25q-37 0-60 24t-24 60z m255 468q0-35 25-60t60-25q36 0 59 25t23 60q0 34-24 58t-58 24-59-24-26-58z m14-281q55-36 95-92t56-120q59 43 59 96 0 58-35 100t-93 42q-45 0-82-26z" horiz-adv-x="1205" />
20
-
21
- <glyph glyph-name="stumbleupon" unicode="&#xe806;" d="M0 143l0 181 224 0 0-179q0-28 20-48t49-21 50 20 20 49l0 423q0 117 87 200t205 82 206-83 86-201l0-92-134-40-89 42 0 80q0 29-20 49t-49 20-49-20-21-49l0-417q0-120-86-205t-206-84q-121 0-207 85t-86 208z m724-3l0 183 89-42 134 40 0-184q0-29 20-49t49-21 49 21 20 49l0 187 224 0 0-181q0-121-85-207t-207-86-207 85-86 205z" horiz-adv-x="1309" />
22
-
23
- <glyph glyph-name="twitter" unicode="&#xe807;" d="M0-37q30-3 60-3 176 0 314 108-82 1-147 50t-89 125q20-4 47-4 35 0 67 9-88 17-145 87t-58 160l0 3q53-30 115-31-52 34-82 90t-31 120q0 68 35 127 94-117 230-186t290-78q-7 33-7 58 0 104 74 178t179 74q109 0 184-80 87 18 160 62-28-91-110-140 73 9 144 40-48-75-125-131l0-33q0-101-29-202t-90-194-145-165-201-115-253-42q-209 0-387 113z" horiz-adv-x="1230" />
24
-
25
- <glyph glyph-name="mail" unicode="&#xe808;" d="M0 28v644q0 8 2 18l460-460q39-39 95-39 55 0 94 39l460 460q2-9 2-18v-644q0-37-26-62t-62-26h-937q-36 0-62 26t-26 62z m63 728q13 4 25 4h937q12 0 25-4l-463-463q-13-12-31-12t-30 12z" horiz-adv-x="1113.3" />
26
-
27
- <glyph glyph-name="vk" unicode="&#xe809;" d="M0 654q10 8 25 12 14 4 25 4l9 0q10 0 24-1 22-1 32-1 6 0 38 2 16 1 29 1t23-1q20-2 32-8 6-3 13-13t12-19 11-25 10-22q38-82 94-163 2-3 7-11t9-12 9-12 10-11 11-8 11-6 12 0q28 5 31 117 1 19 1 35 0 74-15 102-6 11-15 18t-25 12-23 10q14 28 50 37t96 9l53 0t26 0 27-3l22-6t20-9 12-14q9-18 11-42 0-7 1-14 0-20-3-52-4-42-4-52-3-23-3-46 0-18 2-38 4-44 30-61 9 1 17 4t15 11 11 12 13 16 10 14q47 62 94 163l9 23t12 26 12 20 15 13q16 7 38 7l9 0q20 0 46-2 32-2 47-2 9 0 28 1t32 2 30-1 25-6 14-13q3-6 3-13 0-29-35-87-17-29-34-52t-46-58-37-47q-2-2-14-18t-17-24-12-22-5-27q0-8 3-15t10-15 10-12 13-13 12-11q71-65 112-117 40-52 40-75 0-33-51-41-26-4-53-4-21 0-43 3-20 2-37 2-26 0-45-5l-6 0q-66 11-139 94-4 4-17 21t-22 25-23 17-27 6q-23-4-30-29t-9-59-10-49q-13-24-79-24-28 0-66 4-78 8-141 40t-101 68-81 92q-104 133-197 322-3 6-11 23t-12 25-9 24-8 28-3 26z" horiz-adv-x="1220" />
28
-
29
- <glyph glyph-name="print" unicode="&#xe80a;" d="M866 564c40 0 75-35 75-78l0-366c0-42-35-77-75-77l-76 0 34-153-691 0 27 153-82 0c-45 0-78 35-78 77l0 366c0 43 33 78 78 78l96 0 0 117 34 0 0 129 527 0 0-129 34 0 0-117 97 0z m-623 199l0-292 457 0 0 292-457 0z m-113-389c30 0 55 24 55 54 0 28-25 53-55 53-29 0-54-25-54-53 0-30 25-54 54-54z m63-438l567 0-47 242-484 0z m252 113l-139 0 0 35 139 0 0-35z m198 0l-139 0 0 35 139 0 0-35z" horiz-adv-x="941" />
30
-
31
- <glyph glyph-name="delicious" unicode="&#xe80b;" d="M0-150l0 501 501 0 0-501-501 0z m509 499l0 501 500 0 0-501-500 0z" horiz-adv-x="1009" />
32
-
33
- <glyph glyph-name="buffer" unicode="&#xe80c;" d="M0 88q11 15 32 26t49 20 40 15q19 0 34-4t33-15 25-13q47-21 260-119 19-4 36 0t39 18 24 14q20 9 77 35t87 39q4 2 42 21t60 24q13 2 28-1t23-7 23-13 18-11 16-6 18-8 11-11q3-4 4-14-10-13-31-24t-51-22-40-16q-43-20-128-62t-129-61q-7-3-21-12t-23-13-26-11-27-7-30 2l-264 123q-6 3-32 14t-51 22-54 24-46 24-22 16q-4 4-4 13z m0 268q11 15 32 25t50 20 41 15q19 0 34-4t35-15 25-14q42-19 127-58t127-59q19-5 37 0t39 17 25 14q68 32 160 72 11 5 32 17t38 19 36 11q16 3 32-1t37-17 23-13q5-3 16-6t18-8 11-11q3-5 4-14-10-14-31-25t-53-23-41-16q-48-23-135-65t-123-59q-7-3-26-14t-29-15-32-10-36 0q-214 101-260 122-6 3-44 19t-69 30-62 30-34 22q-4 4-4 14z m0 267q10 15 32 27t52 22 41 16l348 162q30 0 54-7t56-26 40-22q39-18 117-54t117-55q4-2 37-15t54-24 27-20q3-4 4-13-9-13-26-22t-43-19-35-14q-47-22-140-66t-139-67q-6-3-20-11t-23-12-25-11-27-6-28 1q-245 114-256 119-4 2-63 28t-102 46-48 30q-4 4-4 13z" horiz-adv-x="979" />
34
-
35
- <glyph glyph-name="heart" unicode="&#xe80d;" d="M500-79q-14 0-25 10l-348 336q-5 5-15 15t-31 37-38 54-30 67-13 77q0 123 71 192t196 70q34 0 70-12t67-33 54-38 42-38q20 20 42 38t54 38 67 33 70 12q125 0 196-70t71-192q0-123-128-251l-347-335q-10-10-25-10z" horiz-adv-x="1000" />
36
-
37
- <glyph glyph-name="weibo" unicode="&#xe80e;" d="M0 178q0 161 184 347 117 116 236 162 56 23 97 23 45 0 72-27 26-26 26-72 0-31-12-72-4-14 3-17t16-1l10 4q96 40 170 40t106-42q15-22 15-52 0-31-16-71-7-10-2-17t8-9 14-5q62-19 106-62t44-107q0-59-41-120t-111-113-178-84-229-33q-131 0-247 38t-194 116-77 174z m125-48q10-101 125-161 92-49 209-49 29 0 60 3 153 15 255 97 92 75 92 165 0 9-1 18-10 100-125 160-93 49-210 49-29 0-59-3-101-10-183-51t-126-101q-38-53-38-109 0-9 1-18z m160-62q-13 29-13 59 0 35 18 70 31 64 104 96 45 20 91 20 27 0 54-7 76-20 109-82 17-32 17-66 0-32-15-65-31-71-109-104-44-19-88-19-34 0-67 11-73 23-101 87z m56 19q6-25 30-35 13-6 27-6 12 0 24 4 28 9 43 33 10 16 10 32 0 7-3 15-6 24-30 34-13 5-26 5-12 0-25-4-27-9-41-32-11-16-11-33 0-7 2-13z m141 79q3-9 13-13 5-2 10-2t9 2q11 4 16 13t2 18-12 13q-9 3-19 0t-16-13q-3-6-3-12l0-6z m321 621q-1 5-1 10 0 13 8 25 10 16 29 21 34 7 68 7 51 0 100-15 83-27 143-93t78-153q7-35 7-68 0-51-16-98l0-1q-6-18-23-27-11-5-22-5-7 0-15 2-19 6-27 23-5 11-5 21 0 8 2 15l0 1q11 34 11 70 0 23-4 48-13 62-56 109t-102 66q-35 10-70 10-24 0-49-5-5-1-10-1-14 0-26 8-16 11-20 30z m40-157q-1 5-1 10 0 10 6 21 9 14 26 18 19 4 37 4 67 0 115-53 29-33 38-75 3-17 3-33 0-24-8-48-5-16-20-23-9-5-18-5-7 0-13 2-16 5-24 20-4 9-4 18 0 7 2 13 4 14 4 26 0 28-21 50-22 26-54 26-10 0-20-2-5-1-9-1-11 0-21 7-14 9-18 25z" horiz-adv-x="1235" />
38
-
39
- <glyph glyph-name="pocket" unicode="&#xe80f;" d="M2 520q-7 215 12 270 4 9 9 16t14 12 14 10 17 10 17 8q136 0 386 2t329 2l94 0t55 0 56-3 45-6 33-10q16-9 27-24t16-29 8-40 2-42-1-50 0-50q0-207-23-327t-96-213q-70-88-165-140t-193-62-200 11-186 73-151 134-96 181q-15 52-23 267z m232 2q-26-28 15-89t104-124q2-2 39-40t54-52 47-35 57-29q11-3 22-3t20 1 19 7 16 7 16 12 12 10 12 11l3 3q9 9 60 56t86 81 68 79 35 75q-15 40-38 56t-51 9-56-26-59-48-56-56-49-51-37-33q-27 16-73 60t-82 82-73 64-55 14q-25-15-56-41z" horiz-adv-x="1136" />
40
-
41
- <glyph glyph-name="xing" unicode="&#xe810;" d="M0 152l219 0 173 286-130 229-219 0 130-229z m362 90l346 608 232 0-345-608 222-392-232 0z" horiz-adv-x="940" />
42
-
43
- <glyph glyph-name="flattr" unicode="&#xe811;" d="M0-37l0 514q0 179 85 278t259 99l548 0q-5-5-52-53t-100-101-109-109-95-93-42-37q-15 0-15 16l0 156-48 0q-59 0-94-6t-63-26-39-57-12-96l0-262z m67-117q5 5 53 53t100 101 109 110 95 93 41 36q15 0 15-16l0-156 48 0q116 0 162 36t45 149l0 262 224 223 0-514q0-179-84-278t-260-99l-548 0z" horiz-adv-x="959" />
44
-
45
- <glyph glyph-name="odnoklassniki" unicode="&#xe812;" d="M1000 761v-824q0-36-26-62t-62-26h-824q-36 0-62 26t-26 62v824q0 36 26 62t62 26h824q36 0 62-26t26-62z m-295-216q0 87-59 150t-146 63-146-63-59-150 59-150 146-63 146 63 59 150z m22-279q0 26-17 45t-43 18q-15 0-28-8-70-36-140-36-69 0-138 36-16 7-28 7-25 0-42-18t-18-45q0-68 147-97l-117-121q-18-18-18-44t18-45 42-18 43 18l112 116 112-116q18-18 43-18t43 18 17 45-18 44l-117 121q147 30 147 98z m-142 279q0-36-24-62t-61-26-60 26-25 62 25 62 60 26 61-26 24-62z" horiz-adv-x="1000" />
46
-
47
- <glyph glyph-name="tumblr" unicode="&#xe813;" d="M0 440l0 142q60 20 101 55 41 33 67 86 26 51 35 127l143 0 0-253 237 0 0-157-237 0 0-256q0-86 9-112 9-24 34-39 34-20 76-20 77 0 151 49l0-157q-63-31-116-43-52-12-112-12-68 0-122 17-55 19-89 50-36 31-52 68-14 34-14 105l0 350-111 0z" horiz-adv-x="616" />
48
-
49
- <glyph glyph-name="whatsapp" unicode="&#xe814;" d="M952 362c0-244-198-441-444-441-78 0-151 20-214 55l-246-78 80 236c-41 67-64 144-64 228 0 243 199 440 444 440 246 0 444-197 444-440z m-444 370c-206 0-373-166-373-370 0-81 26-156 71-217l-47-138 144 45c59-38 129-61 205-61 206 0 374 166 374 371 0 204-168 370-374 370z m225-472c-3 5-10 7-21 13-11 5-65 31-75 35-10 4-17 5-24-5-7-11-28-36-35-43-6-7-12-8-23-3-11 6-46 17-88 54-32 29-54 64-60 75-7 11-1 17 4 22 5 5 11 13 17 19 5 6 7 11 11 18 3 7 1 13-1 19-3 5-25 58-34 80-9 22-18 18-24 18-7 0-14 1-21 1-7 0-19-3-29-14-10-10-38-37-38-90 0-53 39-104 44-111 6-8 75-120 186-163 111-44 111-29 131-27 20 1 64 26 73 51 9 25 9 47 7 51z" horiz-adv-x="1000" />
50
-
51
- <glyph glyph-name="meneame" unicode="&#xe815;" d="M508 378c-21-13-41-20-63-24-32-7-64-7-96-1-28 5-50 20-68 41-37 41-63 87-70 142-11 76 15 137 73 185 42 34 91 51 144 60 82 15 159-1 235-34 38-16 76-36 115-50 9-3 18-6 27-7 17-2 31 3 42 16 14 16 19 36 19 57 4 0 5-3 6-5 13-23 9-60-7-79-18-20-41-23-66-20-28 3-54 11-80 23-48 23-96 44-148 56-66 15-130 12-194-9-92-31-140-122-115-216 14-54 45-97 93-127 20-13 43-18 67-17 24 0 48 5 71 9 5 1 9 2 15 0z m97-462c-5 1-13-4-14 3-1 6 7 8 12 10 31 12 62 25 92 37 19 8 38 17 55 29 6 4 11 8 16 14 7 8 9 17 5 28-23 58-49 115-70 175-16 48-29 96-33 147-4 60 17 107 69 139 24 15 51 27 77 38 32 14 64 28 93 50 43 33 57 76 53 128-2 23-6 46-11 68 0 3-4 7 1 9 4 1 6-2 8-5 14-25 25-52 28-81 6-55-18-98-57-135-24-23-54-38-84-53-27-13-55-26-80-42-28-18-51-40-58-74-7-28-2-55 4-81 12-59 36-114 59-169 13-29 26-57 35-86 16-47 3-84-39-111-30-19-64-27-99-33-20-3-41-4-62-5z m-408 567c0-5-3-8-6-12-45-64-83-132-112-205-21-51-25-103-12-156 16-66 60-106 122-130 45-18 91-26 139-32 65-7 131-13 197-19 7-1 13-2 19-4 3-1 7-2 7-6-1-5-5-3-8-4-43-3-86-5-128-6-61-1-121-1-180 9-97 16-172 64-208 159-19 51-17 104-1 156 23 77 59 148 117 207 15 15 32 28 48 41 2 1 3 3 6 2z m165-353c68 12 137 18 205 10 33-4 39-11 40-44 1-52-6-104-21-154-3-8-6-16-11-23-2-3-4-7-8-5-4 1-3 5-4 8-1 23 3 45 5 67 3 31 8 63 5 95-1 10-5 16-14 21-27 12-55 16-84 19-35 4-71 3-106 6-2 0-5 0-7 0z" horiz-adv-x="1000" />
52
-
53
- <glyph glyph-name="managewp" unicode="&#xe816;" d="M779 604c0 0-12-237-175-199-111 32-92 160-92 160s-127-55-143-173c-3 95-127 159-127 159 29-35 51-121 23-186-41-96-121-118-121-118 55-149 187-256 356-256 215 0 356 164 356 380 0 87-29 168-77 233m-279 198c-250 0-452-202-452-452 0-250 202-452 452-452 250 0 452 202 452 452 0 250-202 452-452 452m0-863c-227 0-411 184-411 411 0 227 184 411 411 411 227 0 411-184 411-411 0-227-184-411-411-411" horiz-adv-x="1000" />
54
-
55
- <glyph glyph-name="thumbs-up" unicode="&#xe817;" d="M143 100q0 15-11 25t-25 11-25-11-11-25 11-25 25-11 25 11 11 25z m643 321q0 29-22 50t-50 22h-196q0 32 27 89t26 89q0 55-17 81t-72 27q-14-15-21-48t-17-70-33-61q-13-13-43-51-2-3-13-16t-18-23-19-24-22-25-22-19-22-15-20-6h-18v-357h18q7 0 18-1t18-4 21-6 20-7 20-6 16-6q118-41 191-41h67q107 0 107 93 0 15-2 31 16 9 26 30t10 41-10 38q29 28 29 67 0 14-5 31t-14 26q18 1 30 26t12 45z m71 1q0-50-27-91 5-18 5-38 0-43-21-81 1-12 1-24 0-56-33-99 0-78-48-123t-126-45h-72q-54 0-106 13t-121 36q-65 23-77 23h-161q-29 0-50 21t-21 50v357q0 30 21 51t50 21h153q20 13 77 86 32 42 60 72 13 14 19 48t17 70 35 60q22 21 50 21 47 0 84-18t57-57 20-104q0-51-27-107h98q58 0 101-42t42-100z" horiz-adv-x="857.1" />
56
-
57
- <glyph glyph-name="facebook-squared" unicode="&#xe818;" d="M696 779q67 0 114-48t47-113v-536q0-66-47-113t-114-48h-104v333h111l16 129h-127v83q0 31 13 46t51 16l68 1v115q-35 5-100 5-75 0-121-44t-45-127v-95h-112v-129h112v-333h-297q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535z" horiz-adv-x="857.1" />
58
-
59
- <glyph glyph-name="mailru" unicode="&#xe819;" d="M542 418q0 60-29 94t-83 34q-35 0-69-17t-61-47-45-77-17-100q0-63 30-97t84-34q54 0 98 37t69 93 23 114z m315-68q0-62-20-110t-55-75-74-42-81-15q-3 0-8 0t-10-1q-53 0-79 30-15 18-18 46-29-37-74-61t-96-25q-90 0-140 54t-49 150q0 88 37 162t100 117 137 43q48 0 86-19t60-56l1 11 6 31q0 3 3 7t5 3h66q3 0 7-6 3-3 2-9l-67-343q-3-13-3-26 0-22 7-29t25-8q16 1 32 3t41 14 43 28 31 50 14 76q0 163-97 260t-260 97q-73 0-139-28t-114-76-76-114-29-139 29-139 76-113 114-77 139-28q127 0 226 80 6 5 13 5t12-7l23-27q4-7 4-14-2-7-7-12-57-46-127-72t-144-25q-87 0-167 34t-136 92-92 137-34 166 34 166 92 137 136 92 167 34q192 0 310-119t118-310z" horiz-adv-x="857.1" />
60
-
61
- <glyph glyph-name="line" unicode="&#xe81a;" d="M0 850h1000v-1000h-1000z m875-447c0 168-168 304-375 304s-375-136-375-304c0-150 133-276 314-300 12-3 28-8 33-19 4-9 2-24 1-34l-5-32c-2-9-8-37 32-20s216 127 295 218c54 59 80 120 80 187z m-522-100h-74c-11 0-20 9-20 20v149c0 11 9 20 20 20 11 0 19-9 19-20v-130h55c11 0 20-8 20-19 0-11-9-20-20-20z m77 20c0-11-9-20-19-20-11 0-20 9-20 20v149c0 11 9 20 20 20 10 0 19-9 19-20v-149z m180 0c0-9-6-16-14-19-2 0-4-1-6-1-6 0-12 3-16 8l-76 104v-92c0-11-9-20-20-20-11 0-19 9-19 20v149c0 8 5 16 13 19 2 0 4 1 6 1 6 0 12-3 16-8l76-104v92c0 11 9 20 20 20 11 0 20-9 20-20v-149z m120 94c11 0 20-9 20-20 0-10-9-19-20-19h-55v-35h55c11 0 20-9 20-20 0-11-9-20-20-20h-74c-11 0-20 9-20 20v149c0 11 9 20 20 20h74c11 0 20-9 20-20 0-11-9-20-20-20h-55v-35h55z" horiz-adv-x="1000" />
62
-
63
- <glyph glyph-name="yummly" unicode="&#xe81b;" d="M791 265c12-1 23 2 33 6 6 3 9 7 7 14-2 6-4 13-2 20 8 49 16 98 25 147 0 3 1 6 3 8 11 7 23 14 37 13 9-1 14-6 15-15 1-6 1-12 0-18-6-31-11-61-16-91-3-15-5-31-7-46-3-21 5-34 24-37 15-3 30-2 44 4 7 3 10 8 8 15-3 10-3 19-1 29 7 44 15 88 23 133 3 19 7 38 4 58-4 20-16 33-36 38-14 3-27 3-40-1-19-4-36-12-52-21-5-3-7-2-10 2-6 11-16 17-27 20-14 3-28 3-42-1-15-3-29-9-43-16-5-3-8-2-10 2-4 7-11 10-18 12-16 4-32 1-47-5-7-3-9-7-7-14 3-9 3-19 1-28-8-47-17-94-25-140-3-20-8-38-8-58 0-17 8-27 25-30 15-2 29-1 43 5 8 4 10 7 8 16-1 8-3 15-1 23 8 48 16 95 24 143 1 3 2 6 5 8 9 6 18 11 29 12 15 2 22-4 22-19 0-4 0-8-1-12-5-30-10-60-15-90-3-18-8-36-8-55-1-19 10-30 30-31 2 0 5 0 6 0z m-418 69c0-2 0-4 0-6 1-42 30-65 71-58 19 3 36 9 53 16 5 2 7 2 9-3 4-11 13-16 24-18 15-2 30 0 44 6 7 2 9 7 7 13-3 11-3 22-1 33 8 45 16 90 24 135 3 20 9 40 8 61 0 14-8 23-22 27-16 3-31 1-46-5-7-3-9-7-8-14 2-8 4-15 2-23-8-46-16-93-24-139-1-3-2-6-5-8-11-5-21-10-33-10-16-1-24 7-24 22 0 4 0 8 1 13 4 26 9 52 13 78 4 20 9 39 9 59-1 15-9 24-23 27-15 4-30 2-44-3-10-4-11-7-9-17 2-8 3-15 1-23-5-29-10-58-15-87-4-25-10-50-12-76z m601-100c-4 4-8 5-14 2-10-7-21-12-33-17-52-21-106-29-165-28-32-1-67 3-102 7-65 8-130 21-195 32-47 8-93 16-141 19-12 1-12 1-10 13 17 96 34 192 50 288 5 25 10 50 13 74 2 21-7 33-27 36-15 3-29 1-42-5-8-3-10-6-8-15 2-9 3-17 1-26-13-73-26-146-39-220-1-4-3-8-7-10-22-12-46-21-70-26-11-2-22-4-33-1-11 2-15 6-17 17-1 8 0 16 2 23 11 43 22 87 33 130 6 23 13 47 12 72-2 35-21 59-56 63-44 5-83-10-116-39-8-6-8-16-6-25 5-14 13-26 25-36 4-4 9-4 13 1 2 2 4 4 6 5 11 9 23 17 38 18 11 1 17-4 18-15 1-7-1-13-3-20-9-35-18-69-27-104-8-30-18-60-23-92-5-38 12-81 69-83 42-1 82 8 119 30 2 1 4 3 6 2 1-1 0-4 0-5-2-13-5-25-6-37-1-9-6-12-13-13-31-4-60-12-87-27-44-22-71-59-78-108-6-36 10-68 41-85 19-10 40-12 61-10 46 4 79 29 102 67 18 29 29 61 35 95 2 11 3 12 14 11 47-4 93-12 138-22 86-17 170-38 257-50 55-7 110-10 165-2 39 6 75 18 107 40 10 7 16 16 16 29-1 19-9 34-23 47z m-756-56c-6-23-13-46-27-66-7-10-16-16-27-19-17-4-28 6-29 23 1 16 8 30 20 40 16 16 36 23 58 28 4 1 6-1 5-6z" horiz-adv-x="1000" />
64
-
65
- <glyph glyph-name="frype" unicode="&#xe81c;" d="M420 188c3-18 7-29 14-35 8-8 18-10 31-12 16 2 27 5 34 16 4 7 7 17 9 31 1 13 2 35 5 60v1l-1 9-2 9-1 9-1 8-1 9-2 9-1 9-1 8-2 8-1 8-1 8v1l-1 7-1 7-2 7-1 6-1 6-2 6-2 8-2 9-2 9-3 10-2 10-3 11-2 10-3 11-2 11-1 11-2 11-1 12-1 11-1 11v11l1 11 1 11 1 11 3 11 3 10 5 10 5 10 3 4c-10 2-22 4-36 4-5 0-11 0-16-1-120-10-71-147-50-222 14-52 30-173 36-210z m14 448c5-1 10-1 15-1 25 0 41 13 50 33 6 14 8 31 8 50-1 15-3 30-8 42-10 24-28 41-55 41-3 0-7 0-10-1-34-5-49-40-48-82 1-40 17-74 48-82z m65-198c4-18 9-35 12-50 15-60 29-199 35-241 5-43 20-51 50-54 30 3 45 11 50 54 5 42 19 181 34 241 3 15 8 32 12 50 13 55 24 119 0 161-15 26-45 44-96 44-52 0-82-18-97-44-24-42-13-106 0-161z m96 221h1c46 0 68 43 68 95 0 53-22 96-68 96h-1c-47 0-69-43-69-96 0-52 22-95 69-95z m146-38c-14 0-26-2-36-4l3-4 5-10 5-10 3-10 3-11 2-11 1-11 0-11v-11l-1-11 0-11-2-12-1-11-2-11-3-11-2-11-2-10-2-11-3-10-2-10-3-9-2-9-2-8-1-6-2-6-1-6-1-7-2-7-1-6v-2l-1-8-2-8-1-8-1-8-1-9-2-9-1-9-1-8-1-9-1-9-1-9v0c2-26 4-48 5-61 1-14 4-24 8-31 7-11 18-14 34-16 13 2 23 4 31 12 7 6 11 17 14 35 6 37 22 158 37 210 20 75 69 212-51 222-5 1-10 1-16 1z m1 14c5 0 10 0 15 1 31 8 47 42 48 82 2 42-13 77-48 82-3 1-6 1-10 1-27 0-45-17-55-41-4-12-7-27-8-42 0-19 2-36 8-50 9-20 25-33 50-33z m144-62c223-3 353-139 205-326-67-86-182-171-334-226-7-3-15-5-22-8-14-4-29-9-43-13-33-9-65-17-96-24-34-6-66-11-97-15-22-2-44-4-65-4-141-4-248 35-283 118-42 100 43 238 213 343-126-50-354-169-364-340v-22c1-17 4-34 10-53 36-115 207-169 424-149 22 2 43 4 65 7 32 5 64 11 97 19 31 8 64 16 96 27 7 2 15 4 22 7 14 4 29 9 43 15 188 68 328 159 410 264 46 60 70 116 75 165v38c-13 124-158 197-356 177" horiz-adv-x="1242" />
66
-
67
- <glyph glyph-name="skype" unicode="&#xe81d;" d="M655 257q0 28-11 51t-27 38-41 27-46 19-49 13l-58 14q-17 4-25 6t-19 6-17 9-9 12-4 16q0 43 80 43 24 0 43-6t30-16 21-19 23-16 27-7q26 0 42 18t16 43q0 31-32 55t-79 38-101 13q-38 0-74-9t-67-26-49-48-19-72q0-34 10-60t32-42 44-27 58-18l81-20q51-12 63-20 18-11 18-34 0-21-23-36t-58-14q-29 0-51 9t-37 22-25 25-26 21-30 9q-28 0-42-17t-14-41q0-52 68-88t162-37q41 0 78 10t69 30 49 52 19 74z m202-121q0-89-63-152t-151-63q-73 0-131 45-43-9-83-9-80 0-153 31t-126 84-83 125-31 153q0 41 9 84-45 58-45 130 0 89 63 152t151 63q73 0 131-45 43 9 84 9 79 0 152-31t126-84 84-125 30-153q0-41-8-84 44-58 44-130z" horiz-adv-x="857.1" />
68
-
69
- <glyph glyph-name="share" unicode="&#xe81e;" d="M679 279q74 0 126-53t52-126-52-126-126-53-127 53-52 126q0 7 1 19l-201 100q-51-48-121-48-75 0-127 53t-52 126 52 126 127 53q70 0 121-48l201 100q-1 12-1 19 0 74 52 126t127 53 126-53 52-126-52-126-126-53q-71 0-122 48l-201-100q1-12 1-19t-1-19l201-100q51 48 122 48z" horiz-adv-x="857.1" />
70
-
71
- <glyph glyph-name="telegram" unicode="&#xe81f;" d="M364-1c-24 0-20 9-29 31l-72 225 557 313m-456-569c19 0 28 8 38 18l102 93-127 72m0 0l307-214c35-18 60-9 68 31l125 555c13 49-19 71-53 56l-732-267c-50-18-50-45-9-57l188-55 435 259c20 12 39 6 24-7" horiz-adv-x="1000" />
72
-
73
- <glyph glyph-name="hackernews" unicode="&#xe820;" d="M0 850l161 0 197-301q49-75 102-170 48 85 109 177l194 294 154 0-399-576 0-424-133 0 0 424z" horiz-adv-x="917" />
74
-
75
- <glyph glyph-name="flipboard" unicode="&#xe821;" d="M10 350v-490h163 163v163 163l163 1 163 1 1 163 1 163 163 1 163 1v162 162h-490-490v-490z" horiz-adv-x="1000" />
76
- </font>
77
- </defs>
78
  </svg>
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
5
+ <defs>
6
+ <font id="mashsb-font" horiz-adv-x="1000" >
7
+ <font-face font-family="mashsb-font" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8
+ <missing-glyph horiz-adv-x="1000" />
9
+ <glyph glyph-name="facebook" unicode="&#xe800;" d="M535 843v-147h-87q-48 0-65-20t-17-60v-106h164l-22-165h-142v-424h-171v424h-142v165h142v122q0 104 58 161t155 57q82 0 127-7z" horiz-adv-x="571.4" />
10
+
11
+ <glyph glyph-name="google" unicode="&#xe801;" d="M0 32q0 87 89 155t215 68l54 0q-42 40-42 86 0 29 16 58-10-1-29-1-104 0-170 65t-66 160q0 91 82 159t187 68l310 0-69-50-98 0q47-18 74-68t26-111q0-93-88-162-37-29-48-46t-11-42q0-19 27-48t54-49q61-43 85-88t23-113q0-90-82-157t-222-66q-133 0-225 50t-92 132z m112 33q0-69 59-118t145-48q119 0 173 44t53 117q0 19-4 32-3 11-7 21t-12 19-14 16-19 16-21 15-25 18-26 17q-39 12-77 12l-4 0q-87 0-153-47-68-48-68-114z m66 559q11-79 61-136t109-58l4 0q56 0 90 52 27 42 27 99 0 16-2 34-10 79-59 134t-110 57l-4 0q-57 0-91-51-27-41-27-98 0-16 2-33z" horiz-adv-x="646" />
12
+
13
+ <glyph glyph-name="pinterest" unicode="&#xe802;" d="M0 350q4 213 150 356t350 144q219-4 358-149t142-351q-4-211-150-354t-350-146q-70 0-141 21 14 22 28 49 15 34 39 125 6 26 17 69 14-24 47-43 88-41 186 8 101 58 140 181 36 129-8 239t-158 160q-142 41-277-9t-187-171q-14-45-17-89t3-86 29-75 63-51q9-4 15 0 8 4 16 31t6 38q-2 3-8 13-41 67-27 140t60 124q72 64 169 70t165-53q37-42 48-103t0-116-38-105q-49-76-115-78-39 2-64 30t-14 66q3 21 23 84t22 94q-6 74-69 76-49-6-72-44t-26-87q6-57 18-78-21-88-33-141-4-14-22-84t-19-107l0-55q-139 64-219 187t-80 270z" horiz-adv-x="1000" />
14
+
15
+ <glyph glyph-name="linkedin" unicode="&#xe803;" d="M0-150l0 1000 1000 0 0-1000-1000 0z m164 729q2-34 25-54t53-23l2 0q35 2 59 24t23 53q-2 33-25 53t-55 21q-35 0-58-22t-24-52z m8-569l144 0 0 434-144 0 0-434z m225 0l144 0 0 242q0 24 4 36 27 52 74 52 72-2 72-97l0-233 145 0 0 248q-2 98-47 149-47 47-119 49-53-2-86-26-21-15-43-47l0 61-144 0q1-18 1-70 0-90-1-364z" horiz-adv-x="1000" />
16
+
17
+ <glyph glyph-name="digg" unicode="&#xe804;" d="M0 152l0 372q0 13 13 13l176 0 0 129q0 14 13 14l98 0 0-514q0-14-12-14l-288 0z m109 83l67 0q13 0 13 14l0 206-67 0q-13 0-13-14l0-206z m225-83l0 372q0 13 13 13l98 0 0-371q0-14-12-14l-99 0z m0 445l0 69q0 14 12 14l99 0 0-69q0-14-12-14l-99 0z m149-445l0 372q0 13 13 13l288 0 0-504q0-13-13-13l-288 0 1 69q0 14 12 14l176 0 0 49-189 0z m110 83l67 0q12 0 12 14l0 206-67 0q-12 0-12-14l0-206z m229-146q0 14 13 14l176 0 0 49-189 0 0 372q0 13 13 13l287 0 0-504q0-13-12-13l-288 0 0 69z m109 146l67 0q13 0 13 14l0 206-67 0q-13 0-13-14l0-206z" horiz-adv-x="1122" />
18
+
19
+ <glyph glyph-name="reddit" unicode="&#xe805;" d="M0 353q0 62 50 106t112 44q62 0 105-36l5 0q134 82 335 82l5 4 70 267 242-36q0-1 2-1 1 0 0 1 2 1 12 16t14 18q34 32 82 32 49 0 83-32t33-82-33-84-83-35q-57 0-87 39t-30 96q-2-1-97 13t-110 17l-3 0q-2-2-16-53t-30-109-18-64l0-3 5-4q72 0 148-20t130-58l3-2q1 1 2 1t2 1q25 18 36 25t29 13 43 6q68 0 116-48t48-117q0-47-26-86t-70-60q0-195-260-303-41-18-56-23-32-10-91-19t-93-9q-120 0-231 35-2 2-72 38-95 51-152 116t-58 156l-5 0q-33 17-59 50l-9 12q-15 27-19 46t-4 50z m34-12q0-66 57-112 5 59 48 116t101 101q-37 26-82 26-49 0-86-40t-38-91z m102-146q0-54 31-104t80-85 102-60 105-34q75-14 146-14 123 0 233 39t185 123l-3 0q30 38 43 69t13 72q0 54-26 103t-70 84-92 61-100 38q-85 23-181 23-74 0-151-18t-150-54-119-99-46-144z m186 73q0 37 23 60t59 22 62-22 25-60q0-36-25-60t-62-24-59 24-23 60z m36-164l44 0q25-45 80-68t111-24q58 0 110 24t84 68l41 0q-25-62-93-96t-142-34q-72 0-141 35t-94 95z m336 164q0 38 23 60t61 22q34 0 58-24t24-58-24-59-58-25q-37 0-60 24t-24 60z m255 468q0-35 25-60t60-25q36 0 59 25t23 60q0 34-24 58t-58 24-59-24-26-58z m14-281q55-36 95-92t56-120q59 43 59 96 0 58-35 100t-93 42q-45 0-82-26z" horiz-adv-x="1205" />
20
+
21
+ <glyph glyph-name="stumbleupon" unicode="&#xe806;" d="M0 143l0 181 224 0 0-179q0-28 20-48t49-21 50 20 20 49l0 423q0 117 87 200t205 82 206-83 86-201l0-92-134-40-89 42 0 80q0 29-20 49t-49 20-49-20-21-49l0-417q0-120-86-205t-206-84q-121 0-207 85t-86 208z m724-3l0 183 89-42 134 40 0-184q0-29 20-49t49-21 49 21 20 49l0 187 224 0 0-181q0-121-85-207t-207-86-207 85-86 205z" horiz-adv-x="1309" />
22
+
23
+ <glyph glyph-name="twitter" unicode="&#xe807;" d="M0-37q30-3 60-3 176 0 314 108-82 1-147 50t-89 125q20-4 47-4 35 0 67 9-88 17-145 87t-58 160l0 3q53-30 115-31-52 34-82 90t-31 120q0 68 35 127 94-117 230-186t290-78q-7 33-7 58 0 104 74 178t179 74q109 0 184-80 87 18 160 62-28-91-110-140 73 9 144 40-48-75-125-131l0-33q0-101-29-202t-90-194-145-165-201-115-253-42q-209 0-387 113z" horiz-adv-x="1230" />
24
+
25
+ <glyph glyph-name="mail" unicode="&#xe808;" d="M0 28v644q0 8 2 18l460-460q39-39 95-39 55 0 94 39l460 460q2-9 2-18v-644q0-37-26-62t-62-26h-937q-36 0-62 26t-26 62z m63 728q13 4 25 4h937q12 0 25-4l-463-463q-13-12-31-12t-30 12z" horiz-adv-x="1113.3" />
26
+
27
+ <glyph glyph-name="vk" unicode="&#xe809;" d="M0 654q10 8 25 12 14 4 25 4l9 0q10 0 24-1 22-1 32-1 6 0 38 2 16 1 29 1t23-1q20-2 32-8 6-3 13-13t12-19 11-25 10-22q38-82 94-163 2-3 7-11t9-12 9-12 10-11 11-8 11-6 12 0q28 5 31 117 1 19 1 35 0 74-15 102-6 11-15 18t-25 12-23 10q14 28 50 37t96 9l53 0t26 0 27-3l22-6t20-9 12-14q9-18 11-42 0-7 1-14 0-20-3-52-4-42-4-52-3-23-3-46 0-18 2-38 4-44 30-61 9 1 17 4t15 11 11 12 13 16 10 14q47 62 94 163l9 23t12 26 12 20 15 13q16 7 38 7l9 0q20 0 46-2 32-2 47-2 9 0 28 1t32 2 30-1 25-6 14-13q3-6 3-13 0-29-35-87-17-29-34-52t-46-58-37-47q-2-2-14-18t-17-24-12-22-5-27q0-8 3-15t10-15 10-12 13-13 12-11q71-65 112-117 40-52 40-75 0-33-51-41-26-4-53-4-21 0-43 3-20 2-37 2-26 0-45-5l-6 0q-66 11-139 94-4 4-17 21t-22 25-23 17-27 6q-23-4-30-29t-9-59-10-49q-13-24-79-24-28 0-66 4-78 8-141 40t-101 68-81 92q-104 133-197 322-3 6-11 23t-12 25-9 24-8 28-3 26z" horiz-adv-x="1220" />
28
+
29
+ <glyph glyph-name="print" unicode="&#xe80a;" d="M866 564c40 0 75-35 75-78l0-366c0-42-35-77-75-77l-76 0 34-153-691 0 27 153-82 0c-45 0-78 35-78 77l0 366c0 43 33 78 78 78l96 0 0 117 34 0 0 129 527 0 0-129 34 0 0-117 97 0z m-623 199l0-292 457 0 0 292-457 0z m-113-389c30 0 55 24 55 54 0 28-25 53-55 53-29 0-54-25-54-53 0-30 25-54 54-54z m63-438l567 0-47 242-484 0z m252 113l-139 0 0 35 139 0 0-35z m198 0l-139 0 0 35 139 0 0-35z" horiz-adv-x="941" />
30
+
31
+ <glyph glyph-name="delicious" unicode="&#xe80b;" d="M0-150l0 501 501 0 0-501-501 0z m509 499l0 501 500 0 0-501-500 0z" horiz-adv-x="1009" />
32
+
33
+ <glyph glyph-name="buffer" unicode="&#xe80c;" d="M0 88q11 15 32 26t49 20 40 15q19 0 34-4t33-15 25-13q47-21 260-119 19-4 36 0t39 18 24 14q20 9 77 35t87 39q4 2 42 21t60 24q13 2 28-1t23-7 23-13 18-11 16-6 18-8 11-11q3-4 4-14-10-13-31-24t-51-22-40-16q-43-20-128-62t-129-61q-7-3-21-12t-23-13-26-11-27-7-30 2l-264 123q-6 3-32 14t-51 22-54 24-46 24-22 16q-4 4-4 13z m0 268q11 15 32 25t50 20 41 15q19 0 34-4t35-15 25-14q42-19 127-58t127-59q19-5 37 0t39 17 25 14q68 32 160 72 11 5 32 17t38 19 36 11q16 3 32-1t37-17 23-13q5-3 16-6t18-8 11-11q3-5 4-14-10-14-31-25t-53-23-41-16q-48-23-135-65t-123-59q-7-3-26-14t-29-15-32-10-36 0q-214 101-260 122-6 3-44 19t-69 30-62 30-34 22q-4 4-4 14z m0 267q10 15 32 27t52 22 41 16l348 162q30 0 54-7t56-26 40-22q39-18 117-54t117-55q4-2 37-15t54-24 27-20q3-4 4-13-9-13-26-22t-43-19-35-14q-47-22-140-66t-139-67q-6-3-20-11t-23-12-25-11-27-6-28 1q-245 114-256 119-4 2-63 28t-102 46-48 30q-4 4-4 13z" horiz-adv-x="979" />
34
+
35
+ <glyph glyph-name="heart" unicode="&#xe80d;" d="M500-79q-14 0-25 10l-348 336q-5 5-15 15t-31 37-38 54-30 67-13 77q0 123 71 192t196 70q34 0 70-12t67-33 54-38 42-38q20 20 42 38t54 38 67 33 70 12q125 0 196-70t71-192q0-123-128-251l-347-335q-10-10-25-10z" horiz-adv-x="1000" />
36
+
37
+ <glyph glyph-name="weibo" unicode="&#xe80e;" d="M0 178q0 161 184 347 117 116 236 162 56 23 97 23 45 0 72-27 26-26 26-72 0-31-12-72-4-14 3-17t16-1l10 4q96 40 170 40t106-42q15-22 15-52 0-31-16-71-7-10-2-17t8-9 14-5q62-19 106-62t44-107q0-59-41-120t-111-113-178-84-229-33q-131 0-247 38t-194 116-77 174z m125-48q10-101 125-161 92-49 209-49 29 0 60 3 153 15 255 97 92 75 92 165 0 9-1 18-10 100-125 160-93 49-210 49-29 0-59-3-101-10-183-51t-126-101q-38-53-38-109 0-9 1-18z m160-62q-13 29-13 59 0 35 18 70 31 64 104 96 45 20 91 20 27 0 54-7 76-20 109-82 17-32 17-66 0-32-15-65-31-71-109-104-44-19-88-19-34 0-67 11-73 23-101 87z m56 19q6-25 30-35 13-6 27-6 12 0 24 4 28 9 43 33 10 16 10 32 0 7-3 15-6 24-30 34-13 5-26 5-12 0-25-4-27-9-41-32-11-16-11-33 0-7 2-13z m141 79q3-9 13-13 5-2 10-2t9 2q11 4 16 13t2 18-12 13q-9 3-19 0t-16-13q-3-6-3-12l0-6z m321 621q-1 5-1 10 0 13 8 25 10 16 29 21 34 7 68 7 51 0 100-15 83-27 143-93t78-153q7-35 7-68 0-51-16-98l0-1q-6-18-23-27-11-5-22-5-7 0-15 2-19 6-27 23-5 11-5 21 0 8 2 15l0 1q11 34 11 70 0 23-4 48-13 62-56 109t-102 66q-35 10-70 10-24 0-49-5-5-1-10-1-14 0-26 8-16 11-20 30z m40-157q-1 5-1 10 0 10 6 21 9 14 26 18 19 4 37 4 67 0 115-53 29-33 38-75 3-17 3-33 0-24-8-48-5-16-20-23-9-5-18-5-7 0-13 2-16 5-24 20-4 9-4 18 0 7 2 13 4 14 4 26 0 28-21 50-22 26-54 26-10 0-20-2-5-1-9-1-11 0-21 7-14 9-18 25z" horiz-adv-x="1235" />
38
+
39
+ <glyph glyph-name="pocket" unicode="&#xe80f;" d="M2 520q-7 215 12 270 4 9 9 16t14 12 14 10 17 10 17 8q136 0 386 2t329 2l94 0t55 0 56-3 45-6 33-10q16-9 27-24t16-29 8-40 2-42-1-50 0-50q0-207-23-327t-96-213q-70-88-165-140t-193-62-200 11-186 73-151 134-96 181q-15 52-23 267z m232 2q-26-28 15-89t104-124q2-2 39-40t54-52 47-35 57-29q11-3 22-3t20 1 19 7 16 7 16 12 12 10 12 11l3 3q9 9 60 56t86 81 68 79 35 75q-15 40-38 56t-51 9-56-26-59-48-56-56-49-51-37-33q-27 16-73 60t-82 82-73 64-55 14q-25-15-56-41z" horiz-adv-x="1136" />
40
+
41
+ <glyph glyph-name="xing" unicode="&#xe810;" d="M0 152l219 0 173 286-130 229-219 0 130-229z m362 90l346 608 232 0-345-608 222-392-232 0z" horiz-adv-x="940" />
42
+
43
+ <glyph glyph-name="flattr" unicode="&#xe811;" d="M0-37l0 514q0 179 85 278t259 99l548 0q-5-5-52-53t-100-101-109-109-95-93-42-37q-15 0-15 16l0 156-48 0q-59 0-94-6t-63-26-39-57-12-96l0-262z m67-117q5 5 53 53t100 101 109 110 95 93 41 36q15 0 15-16l0-156 48 0q116 0 162 36t45 149l0 262 224 223 0-514q0-179-84-278t-260-99l-548 0z" horiz-adv-x="959" />
44
+
45
+ <glyph glyph-name="odnoklassniki" unicode="&#xe812;" d="M1000 761v-824q0-36-26-62t-62-26h-824q-36 0-62 26t-26 62v824q0 36 26 62t62 26h824q36 0 62-26t26-62z m-295-216q0 87-59 150t-146 63-146-63-59-150 59-150 146-63 146 63 59 150z m22-279q0 26-17 45t-43 18q-15 0-28-8-70-36-140-36-69 0-138 36-16 7-28 7-25 0-42-18t-18-45q0-68 147-97l-117-121q-18-18-18-44t18-45 42-18 43 18l112 116 112-116q18-18 43-18t43 18 17 45-18 44l-117 121q147 30 147 98z m-142 279q0-36-24-62t-61-26-60 26-25 62 25 62 60 26 61-26 24-62z" horiz-adv-x="1000" />
46
+
47
+ <glyph glyph-name="tumblr" unicode="&#xe813;" d="M0 440l0 142q60 20 101 55 41 33 67 86 26 51 35 127l143 0 0-253 237 0 0-157-237 0 0-256q0-86 9-112 9-24 34-39 34-20 76-20 77 0 151 49l0-157q-63-31-116-43-52-12-112-12-68 0-122 17-55 19-89 50-36 31-52 68-14 34-14 105l0 350-111 0z" horiz-adv-x="616" />
48
+
49
+ <glyph glyph-name="whatsapp" unicode="&#xe814;" d="M952 362c0-244-198-441-444-441-78 0-151 20-214 55l-246-78 80 236c-41 67-64 144-64 228 0 243 199 440 444 440 246 0 444-197 444-440z m-444 370c-206 0-373-166-373-370 0-81 26-156 71-217l-47-138 144 45c59-38 129-61 205-61 206 0 374 166 374 371 0 204-168 370-374 370z m225-472c-3 5-10 7-21 13-11 5-65 31-75 35-10 4-17 5-24-5-7-11-28-36-35-43-6-7-12-8-23-3-11 6-46 17-88 54-32 29-54 64-60 75-7 11-1 17 4 22 5 5 11 13 17 19 5 6 7 11 11 18 3 7 1 13-1 19-3 5-25 58-34 80-9 22-18 18-24 18-7 0-14 1-21 1-7 0-19-3-29-14-10-10-38-37-38-90 0-53 39-104 44-111 6-8 75-120 186-163 111-44 111-29 131-27 20 1 64 26 73 51 9 25 9 47 7 51z" horiz-adv-x="1000" />
50
+
51
+ <glyph glyph-name="meneame" unicode="&#xe815;" d="M508 378c-21-13-41-20-63-24-32-7-64-7-96-1-28 5-50 20-68 41-37 41-63 87-70 142-11 76 15 137 73 185 42 34 91 51 144 60 82 15 159-1 235-34 38-16 76-36 115-50 9-3 18-6 27-7 17-2 31 3 42 16 14 16 19 36 19 57 4 0 5-3 6-5 13-23 9-60-7-79-18-20-41-23-66-20-28 3-54 11-80 23-48 23-96 44-148 56-66 15-130 12-194-9-92-31-140-122-115-216 14-54 45-97 93-127 20-13 43-18 67-17 24 0 48 5 71 9 5 1 9 2 15 0z m97-462c-5 1-13-4-14 3-1 6 7 8 12 10 31 12 62 25 92 37 19 8 38 17 55 29 6 4 11 8 16 14 7 8 9 17 5 28-23 58-49 115-70 175-16 48-29 96-33 147-4 60 17 107 69 139 24 15 51 27 77 38 32 14 64 28 93 50 43 33 57 76 53 128-2 23-6 46-11 68 0 3-4 7 1 9 4 1 6-2 8-5 14-25 25-52 28-81 6-55-18-98-57-135-24-23-54-38-84-53-27-13-55-26-80-42-28-18-51-40-58-74-7-28-2-55 4-81 12-59 36-114 59-169 13-29 26-57 35-86 16-47 3-84-39-111-30-19-64-27-99-33-20-3-41-4-62-5z m-408 567c0-5-3-8-6-12-45-64-83-132-112-205-21-51-25-103-12-156 16-66 60-106 122-130 45-18 91-26 139-32 65-7 131-13 197-19 7-1 13-2 19-4 3-1 7-2 7-6-1-5-5-3-8-4-43-3-86-5-128-6-61-1-121-1-180 9-97 16-172 64-208 159-19 51-17 104-1 156 23 77 59 148 117 207 15 15 32 28 48 41 2 1 3 3 6 2z m165-353c68 12 137 18 205 10 33-4 39-11 40-44 1-52-6-104-21-154-3-8-6-16-11-23-2-3-4-7-8-5-4 1-3 5-4 8-1 23 3 45 5 67 3 31 8 63 5 95-1 10-5 16-14 21-27 12-55 16-84 19-35 4-71 3-106 6-2 0-5 0-7 0z" horiz-adv-x="1000" />
52
+
53
+ <glyph glyph-name="managewp" unicode="&#xe816;" d="M779 604c0 0-12-237-175-199-111 32-92 160-92 160s-127-55-143-173c-3 95-127 159-127 159 29-35 51-121 23-186-41-96-121-118-121-118 55-149 187-256 356-256 215 0 356 164 356 380 0 87-29 168-77 233m-279 198c-250 0-452-202-452-452 0-250 202-452 452-452 250 0 452 202 452 452 0 250-202 452-452 452m0-863c-227 0-411 184-411 411 0 227 184 411 411 411 227 0 411-184 411-411 0-227-184-411-411-411" horiz-adv-x="1000" />
54
+
55
+ <glyph glyph-name="thumbs-up" unicode="&#xe817;" d="M143 100q0 15-11 25t-25 11-25-11-11-25 11-25 25-11 25 11 11 25z m643 321q0 29-22 50t-50 22h-196q0 32 27 89t26 89q0 55-17 81t-72 27q-14-15-21-48t-17-70-33-61q-13-13-43-51-2-3-13-16t-18-23-19-24-22-25-22-19-22-15-20-6h-18v-357h18q7 0 18-1t18-4 21-6 20-7 20-6 16-6q118-41 191-41h67q107 0 107 93 0 15-2 31 16 9 26 30t10 41-10 38q29 28 29 67 0 14-5 31t-14 26q18 1 30 26t12 45z m71 1q0-50-27-91 5-18 5-38 0-43-21-81 1-12 1-24 0-56-33-99 0-78-48-123t-126-45h-72q-54 0-106 13t-121 36q-65 23-77 23h-161q-29 0-50 21t-21 50v357q0 30 21 51t50 21h153q20 13 77 86 32 42 60 72 13 14 19 48t17 70 35 60q22 21 50 21 47 0 84-18t57-57 20-104q0-51-27-107h98q58 0 101-42t42-100z" horiz-adv-x="857.1" />
56
+
57
+ <glyph glyph-name="facebook-squared" unicode="&#xe818;" d="M696 779q67 0 114-48t47-113v-536q0-66-47-113t-114-48h-104v333h111l16 129h-127v83q0 31 13 46t51 16l68 1v115q-35 5-100 5-75 0-121-44t-45-127v-95h-112v-129h112v-333h-297q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535z" horiz-adv-x="857.1" />
58
+
59
+ <glyph glyph-name="mailru" unicode="&#xe819;" d="M542 418q0 60-29 94t-83 34q-35 0-69-17t-61-47-45-77-17-100q0-63 30-97t84-34q54 0 98 37t69 93 23 114z m315-68q0-62-20-110t-55-75-74-42-81-15q-3 0-8 0t-10-1q-53 0-79 30-15 18-18 46-29-37-74-61t-96-25q-90 0-140 54t-49 150q0 88 37 162t100 117 137 43q48 0 86-19t60-56l1 11 6 31q0 3 3 7t5 3h66q3 0 7-6 3-3 2-9l-67-343q-3-13-3-26 0-22 7-29t25-8q16 1 32 3t41 14 43 28 31 50 14 76q0 163-97 260t-260 97q-73 0-139-28t-114-76-76-114-29-139 29-139 76-113 114-77 139-28q127 0 226 80 6 5 13 5t12-7l23-27q4-7 4-14-2-7-7-12-57-46-127-72t-144-25q-87 0-167 34t-136 92-92 137-34 166 34 166 92 137 136 92 167 34q192 0 310-119t118-310z" horiz-adv-x="857.1" />
60
+
61
+ <glyph glyph-name="line" unicode="&#xe81a;" d="M0 850h1000v-1000h-1000z m875-447c0 168-168 304-375 304s-375-136-375-304c0-150 133-276 314-300 12-3 28-8 33-19 4-9 2-24 1-34l-5-32c-2-9-8-37 32-20s216 127 295 218c54 59 80 120 80 187z m-522-100h-74c-11 0-20 9-20 20v149c0 11 9 20 20 20 11 0 19-9 19-20v-130h55c11 0 20-8 20-19 0-11-9-20-20-20z m77 20c0-11-9-20-19-20-11 0-20 9-20 20v149c0 11 9 20 20 20 10 0 19-9 19-20v-149z m180 0c0-9-6-16-14-19-2 0-4-1-6-1-6 0-12 3-16 8l-76 104v-92c0-11-9-20-20-20-11 0-19 9-19 20v149c0 8 5 16 13 19 2 0 4 1 6 1 6 0 12-3 16-8l76-104v92c0 11 9 20 20 20 11 0 20-9 20-20v-149z m120 94c11 0 20-9 20-20 0-10-9-19-20-19h-55v-35h55c11 0 20-9 20-20 0-11-9-20-20-20h-74c-11 0-20 9-20 20v149c0 11 9 20 20 20h74c11 0 20-9 20-20 0-11-9-20-20-20h-55v-35h55z" horiz-adv-x="1000" />
62
+
63
+ <glyph glyph-name="yummly" unicode="&#xe81b;" d="M791 265c12-1 23 2 33 6 6 3 9 7 7 14-2 6-4 13-2 20 8 49 16 98 25 147 0 3 1 6 3 8 11 7 23 14 37 13 9-1 14-6 15-15 1-6 1-12 0-18-6-31-11-61-16-91-3-15-5-31-7-46-3-21 5-34 24-37 15-3 30-2 44 4 7 3 10 8 8 15-3 10-3 19-1 29 7 44 15 88 23 133 3 19 7 38 4 58-4 20-16 33-36 38-14 3-27 3-40-1-19-4-36-12-52-21-5-3-7-2-10 2-6 11-16 17-27 20-14 3-28 3-42-1-15-3-29-9-43-16-5-3-8-2-10 2-4 7-11 10-18 12-16 4-32 1-47-5-7-3-9-7-7-14 3-9 3-19 1-28-8-47-17-94-25-140-3-20-8-38-8-58 0-17 8-27 25-30 15-2 29-1 43 5 8 4 10 7 8 16-1 8-3 15-1 23 8 48 16 95 24 143 1 3 2 6 5 8 9 6 18 11 29 12 15 2 22-4 22-19 0-4 0-8-1-12-5-30-10-60-15-90-3-18-8-36-8-55-1-19 10-30 30-31 2 0 5 0 6 0z m-418 69c0-2 0-4 0-6 1-42 30-65 71-58 19 3 36 9 53 16 5 2 7 2 9-3 4-11 13-16 24-18 15-2 30 0 44 6 7 2 9 7 7 13-3 11-3 22-1 33 8 45 16 90 24 135 3 20 9 40 8 61 0 14-8 23-22 27-16 3-31 1-46-5-7-3-9-7-8-14 2-8 4-15 2-23-8-46-16-93-24-139-1-3-2-6-5-8-11-5-21-10-33-10-16-1-24 7-24 22 0 4 0 8 1 13 4 26 9 52 13 78 4 20 9 39 9 59-1 15-9 24-23 27-15 4-30 2-44-3-10-4-11-7-9-17 2-8 3-15 1-23-5-29-10-58-15-87-4-25-10-50-12-76z m601-100c-4 4-8 5-14 2-10-7-21-12-33-17-52-21-106-29-165-28-32-1-67 3-102 7-65 8-130 21-195 32-47 8-93 16-141 19-12 1-12 1-10 13 17 96 34 192 50 288 5 25 10 50 13 74 2 21-7 33-27 36-15 3-29 1-42-5-8-3-10-6-8-15 2-9 3-17 1-26-13-73-26-146-39-220-1-4-3-8-7-10-22-12-46-21-70-26-11-2-22-4-33-1-11 2-15 6-17 17-1 8 0 16 2 23 11 43 22 87 33 130 6 23 13 47 12 72-2 35-21 59-56 63-44 5-83-10-116-39-8-6-8-16-6-25 5-14 13-26 25-36 4-4 9-4 13 1 2 2 4 4 6 5 11 9 23 17 38 18 11 1 17-4 18-15 1-7-1-13-3-20-9-35-18-69-27-104-8-30-18-60-23-92-5-38 12-81 69-83 42-1 82 8 119 30 2 1 4 3 6 2 1-1 0-4 0-5-2-13-5-25-6-37-1-9-6-12-13-13-31-4-60-12-87-27-44-22-71-59-78-108-6-36 10-68 41-85 19-10 40-12 61-10 46 4 79 29 102 67 18 29 29 61 35 95 2 11 3 12 14 11 47-4 93-12 138-22 86-17 170-38 257-50 55-7 110-10 165-2 39 6 75 18 107 40 10 7 16 16 16 29-1 19-9 34-23 47z m-756-56c-6-23-13-46-27-66-7-10-16-16-27-19-17-4-28 6-29 23 1 16 8 30 20 40 16 16 36 23 58 28 4 1 6-1 5-6z" horiz-adv-x="1000" />
64
+
65
+ <glyph glyph-name="frype" unicode="&#xe81c;" d="M420 188c3-18 7-29 14-35 8-8 18-10 31-12 16 2 27 5 34 16 4 7 7 17 9 31 1 13 2 35 5 60v1l-1 9-2 9-1 9-1 8-1 9-2 9-1 9-1 8-2 8-1 8-1 8v1l-1 7-1 7-2 7-1 6-1 6-2 6-2 8-2 9-2 9-3 10-2 10-3 11-2 10-3 11-2 11-1 11-2 11-1 12-1 11-1 11v11l1 11 1 11 1 11 3 11 3 10 5 10 5 10 3 4c-10 2-22 4-36 4-5 0-11 0-16-1-120-10-71-147-50-222 14-52 30-173 36-210z m14 448c5-1 10-1 15-1 25 0 41 13 50 33 6 14 8 31 8 50-1 15-3 30-8 42-10 24-28 41-55 41-3 0-7 0-10-1-34-5-49-40-48-82 1-40 17-74 48-82z m65-198c4-18 9-35 12-50 15-60 29-199 35-241 5-43 20-51 50-54 30 3 45 11 50 54 5 42 19 181 34 241 3 15 8 32 12 50 13 55 24 119 0 161-15 26-45 44-96 44-52 0-82-18-97-44-24-42-13-106 0-161z m96 221h1c46 0 68 43 68 95 0 53-22 96-68 96h-1c-47 0-69-43-69-96 0-52 22-95 69-95z m146-38c-14 0-26-2-36-4l3-4 5-10 5-10 3-10 3-11 2-11 1-11 0-11v-11l-1-11 0-11-2-12-1-11-2-11-3-11-2-11-2-10-2-11-3-10-2-10-3-9-2-9-2-8-1-6-2-6-1-6-1-7-2-7-1-6v-2l-1-8-2-8-1-8-1-8-1-9-2-9-1-9-1-8-1-9-1-9-1-9v0c2-26 4-48 5-61 1-14 4-24 8-31 7-11 18-14 34-16 13 2 23 4 31 12 7 6 11 17 14 35 6 37 22 158 37 210 20 75 69 212-51 222-5 1-10 1-16 1z m1 14c5 0 10 0 15 1 31 8 47 42 48 82 2 42-13 77-48 82-3 1-6 1-10 1-27 0-45-17-55-41-4-12-7-27-8-42 0-19 2-36 8-50 9-20 25-33 50-33z m144-62c223-3 353-139 205-326-67-86-182-171-334-226-7-3-15-5-22-8-14-4-29-9-43-13-33-9-65-17-96-24-34-6-66-11-97-15-22-2-44-4-65-4-141-4-248 35-283 118-42 100 43 238 213 343-126-50-354-169-364-340v-22c1-17 4-34 10-53 36-115 207-169 424-149 22 2 43 4 65 7 32 5 64 11 97 19 31 8 64 16 96 27 7 2 15 4 22 7 14 4 29 9 43 15 188 68 328 159 410 264 46 60 70 116 75 165v38c-13 124-158 197-356 177" horiz-adv-x="1242" />
66
+
67
+ <glyph glyph-name="skype" unicode="&#xe81d;" d="M655 257q0 28-11 51t-27 38-41 27-46 19-49 13l-58 14q-17 4-25 6t-19 6-17 9-9 12-4 16q0 43 80 43 24 0 43-6t30-16 21-19 23-16 27-7q26 0 42 18t16 43q0 31-32 55t-79 38-101 13q-38 0-74-9t-67-26-49-48-19-72q0-34 10-60t32-42 44-27 58-18l81-20q51-12 63-20 18-11 18-34 0-21-23-36t-58-14q-29 0-51 9t-37 22-25 25-26 21-30 9q-28 0-42-17t-14-41q0-52 68-88t162-37q41 0 78 10t69 30 49 52 19 74z m202-121q0-89-63-152t-151-63q-73 0-131 45-43-9-83-9-80 0-153 31t-126 84-83 125-31 153q0 41 9 84-45 58-45 130 0 89 63 152t151 63q73 0 131-45 43 9 84 9 79 0 152-31t126-84 84-125 30-153q0-41-8-84 44-58 44-130z" horiz-adv-x="857.1" />
68
+
69
+ <glyph glyph-name="share" unicode="&#xe81e;" d="M679 279q74 0 126-53t52-126-52-126-126-53-127 53-52 126q0 7 1 19l-201 100q-51-48-121-48-75 0-127 53t-52 126 52 126 127 53q70 0 121-48l201 100q-1 12-1 19 0 74 52 126t127 53 126-53 52-126-52-126-126-53q-71 0-122 48l-201-100q1-12 1-19t-1-19l201-100q51 48 122 48z" horiz-adv-x="857.1" />
70
+
71
+ <glyph glyph-name="telegram" unicode="&#xe81f;" d="M364-1c-24 0-20 9-29 31l-72 225 557 313m-456-569c19 0 28 8 38 18l102 93-127 72m0 0l307-214c35-18 60-9 68 31l125 555c13 49-19 71-53 56l-732-267c-50-18-50-45-9-57l188-55 435 259c20 12 39 6 24-7" horiz-adv-x="1000" />
72
+
73
+ <glyph glyph-name="hackernews" unicode="&#xe820;" d="M0 850l161 0 197-301q49-75 102-170 48 85 109 177l194 294 154 0-399-576 0-424-133 0 0 424z" horiz-adv-x="917" />
74
+
75
+ <glyph glyph-name="flipboard" unicode="&#xe821;" d="M10 350v-490h163 163v163 163l163 1 163 1 1 163 1 163 163 1 163 1v162 162h-490-490v-490z" horiz-adv-x="1000" />
76
+ </font>
77
+ </defs>
78
  </svg>
assets/js/chosen.jquery.js CHANGED
@@ -1,1284 +1,1284 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.5.1
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2016 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */
12
-
13
- (function() {
14
- var $, AbstractChosen, Chosen, SelectParser, _ref,
15
- __hasProp = {}.hasOwnProperty,
16
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
17
-
18
- SelectParser = (function() {
19
- function SelectParser() {
20
- this.options_index = 0;
21
- this.parsed = [];
22
- }
23
-
24
- SelectParser.prototype.add_node = function(child) {
25
- if (child.nodeName.toUpperCase() === "OPTGROUP") {
26
- return this.add_group(child);
27
- } else {
28
- return this.add_option(child);
29
- }
30
- };
31
-
32
- SelectParser.prototype.add_group = function(group) {
33
- var group_position, option, _i, _len, _ref, _results;
34
- group_position = this.parsed.length;
35
- this.parsed.push({
36
- array_index: group_position,
37
- group: true,
38
- label: this.escapeExpression(group.label),
39
- title: group.title ? group.title : void 0,
40
- children: 0,
41
- disabled: group.disabled,
42
- classes: group.className
43
- });
44
- _ref = group.childNodes;
45
- _results = [];
46
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
47
- option = _ref[_i];
48
- _results.push(this.add_option(option, group_position, group.disabled));
49
- }
50
- return _results;
51
- };
52
-
53
- SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
54
- if (option.nodeName.toUpperCase() === "OPTION") {
55
- if (option.text !== "") {
56
- if (group_position != null) {
57
- this.parsed[group_position].children += 1;
58
- }
59
- this.parsed.push({
60
- array_index: this.parsed.length,
61
- options_index: this.options_index,
62
- value: option.value,
63
- text: option.text,
64
- html: option.innerHTML,
65
- title: option.title ? option.title : void 0,
66
- selected: option.selected,
67
- disabled: group_disabled === true ? group_disabled : option.disabled,
68
- group_array_index: group_position,
69
- group_label: group_position != null ? this.parsed[group_position].label : null,
70
- classes: option.className,
71
- style: option.style.cssText
72
- });
73
- } else {
74
- this.parsed.push({
75
- array_index: this.parsed.length,
76
- options_index: this.options_index,
77
- empty: true
78
- });
79
- }
80
- return this.options_index += 1;
81
- }
82
- };
83
-
84
- SelectParser.prototype.escapeExpression = function(text) {
85
- var map, unsafe_chars;
86
- if ((text == null) || text === false) {
87
- return "";
88
- }
89
- if (!/[\&\<\>\"\'\`]/.test(text)) {
90
- return text;
91
- }
92
- map = {
93
- "<": "&lt;",
94
- ">": "&gt;",
95
- '"': "&quot;",
96
- "'": "&#x27;",
97
- "`": "&#x60;"
98
- };
99
- unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
100
- return text.replace(unsafe_chars, function(chr) {
101
- return map[chr] || "&amp;";
102
- });
103
- };
104
-
105
- return SelectParser;
106
-
107
- })();
108
-
109
- SelectParser.select_to_array = function(select) {
110
- var child, parser, _i, _len, _ref;
111
- parser = new SelectParser();
112
- _ref = select.childNodes;
113
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
114
- child = _ref[_i];
115
- parser.add_node(child);
116
- }
117
- return parser.parsed;
118
- };
119
-
120
- AbstractChosen = (function() {
121
- function AbstractChosen(form_field, options) {
122
- this.form_field = form_field;
123
- this.options = options != null ? options : {};
124
- if (!AbstractChosen.browser_is_supported()) {
125
- return;
126
- }
127
- this.is_multiple = this.form_field.multiple;
128
- this.set_default_text();
129
- this.set_default_values();
130
- this.setup();
131
- this.set_up_html();
132
- this.register_observers();
133
- this.on_ready();
134
- }
135
-
136
- AbstractChosen.prototype.set_default_values = function() {
137
- var _this = this;
138
- this.click_test_action = function(evt) {
139
- return _this.test_active_click(evt);
140
- };
141
- this.activate_action = function(evt) {
142
- return _this.activate_field(evt);
143
- };
144
- this.active_field = false;
145
- this.mouse_on_container = false;
146
- this.results_showing = false;
147
- this.result_highlighted = null;
148
- this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
149
- this.disable_search_threshold = this.options.disable_search_threshold || 0;
150
- this.disable_search = this.options.disable_search || false;
151
- this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
152
- this.group_search = this.options.group_search != null ? this.options.group_search : true;
153
- this.search_contains = this.options.search_contains || false;
154
- this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
155
- this.max_selected_options = this.options.max_selected_options || Infinity;
156
- this.inherit_select_classes = this.options.inherit_select_classes || false;
157
- this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
158
- this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
159
- this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
160
- return this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
161
- };
162
-
163
- AbstractChosen.prototype.set_default_text = function() {
164
- if (this.form_field.getAttribute("data-placeholder")) {
165
- this.default_text = this.form_field.getAttribute("data-placeholder");
166
- } else if (this.is_multiple) {
167
- this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
168
- } else {
169
- this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
170
- }
171
- return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
172
- };
173
-
174
- AbstractChosen.prototype.choice_label = function(item) {
175
- if (this.include_group_label_in_selected && (item.group_label != null)) {
176
- return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
177
- } else {
178
- return item.html;
179
- }
180
- };
181
-
182
- AbstractChosen.prototype.mouse_enter = function() {
183
- return this.mouse_on_container = true;
184
- };
185
-
186
- AbstractChosen.prototype.mouse_leave = function() {
187
- return this.mouse_on_container = false;
188
- };
189
-
190
- AbstractChosen.prototype.input_focus = function(evt) {
191
- var _this = this;
192
- if (this.is_multiple) {
193
- if (!this.active_field) {
194
- return setTimeout((function() {
195
- return _this.container_mousedown();
196
- }), 50);
197
- }
198
- } else {
199
- if (!this.active_field) {
200
- return this.activate_field();
201
- }
202
- }
203
- };
204
-
205
- AbstractChosen.prototype.input_blur = function(evt) {
206
- var _this = this;
207
- if (!this.mouse_on_container) {
208
- this.active_field = false;
209
- return setTimeout((function() {
210
- return _this.blur_test();
211
- }), 100);
212
- }
213
- };
214
-
215
- AbstractChosen.prototype.results_option_build = function(options) {
216
- var content, data, data_content, shown_results, _i, _len, _ref;
217
- content = '';
218
- shown_results = 0;
219
- _ref = this.results_data;
220
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
221
- data = _ref[_i];
222
- data_content = '';
223
- if (data.group) {
224
- data_content = this.result_add_group(data);
225
- } else {
226
- data_content = this.result_add_option(data);
227
- }
228
- if (data_content !== '') {
229
- shown_results++;
230
- content += data_content;
231
- }
232
- if (options != null ? options.first : void 0) {
233
- if (data.selected && this.is_multiple) {
234
- this.choice_build(data);
235
- } else if (data.selected && !this.is_multiple) {
236
- this.single_set_selected_text(this.choice_label(data));
237
- }
238
- }
239
- if (shown_results >= this.max_shown_results) {
240
- break;
241
- }
242
- }
243
- return content;
244
- };
245
-
246
- AbstractChosen.prototype.result_add_option = function(option) {
247
- var classes, option_el;
248
- if (!option.search_match) {
249
- return '';
250
- }
251
- if (!this.include_option_in_results(option)) {
252
- return '';
253
- }
254
- classes = [];
255
- if (!option.disabled && !(option.selected && this.is_multiple)) {
256
- classes.push("active-result");
257
- }
258
- if (option.disabled && !(option.selected && this.is_multiple)) {
259
- classes.push("disabled-result");
260
- }
261
- if (option.selected) {
262
- classes.push("result-selected");
263
- }
264
- if (option.group_array_index != null) {
265
- classes.push("group-option");
266
- }
267
- if (option.classes !== "") {
268
- classes.push(option.classes);
269
- }
270
- option_el = document.createElement("li");
271
- option_el.className = classes.join(" ");
272
- option_el.style.cssText = option.style;
273
- option_el.setAttribute("data-option-array-index", option.array_index);
274
- option_el.innerHTML = option.search_text;
275
- if (option.title) {
276
- option_el.title = option.title;
277
- }
278
- return this.outerHTML(option_el);
279
- };
280
-
281
- AbstractChosen.prototype.result_add_group = function(group) {
282
- var classes, group_el;
283
- if (!(group.search_match || group.group_match)) {
284
- return '';
285
- }
286
- if (!(group.active_options > 0)) {
287
- return '';
288
- }
289
- classes = [];
290
- classes.push("group-result");
291
- if (group.classes) {
292
- classes.push(group.classes);
293
- }
294
- group_el = document.createElement("li");
295
- group_el.className = classes.join(" ");
296
- group_el.innerHTML = group.search_text;
297
- if (group.title) {
298
- group_el.title = group.title;
299
- }
300
- return this.outerHTML(group_el);
301
- };
302
-
303
- AbstractChosen.prototype.results_update_field = function() {
304
- this.set_default_text();
305
- if (!this.is_multiple) {
306
- this.results_reset_cleanup();
307
- }
308
- this.result_clear_highlight();
309
- this.results_build();
310
- if (this.results_showing) {
311
- return this.winnow_results();
312
- }
313
- };
314
-
315
- AbstractChosen.prototype.reset_single_select_options = function() {
316
- var result, _i, _len, _ref, _results;
317
- _ref = this.results_data;
318
- _results = [];
319
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
320
- result = _ref[_i];
321
- if (result.selected) {
322
- _results.push(result.selected = false);
323
- } else {
324
- _results.push(void 0);
325
- }
326
- }
327
- return _results;
328
- };
329
-
330
- AbstractChosen.prototype.results_toggle = function() {
331
- if (this.results_showing) {
332
- return this.results_hide();
333
- } else {
334
- return this.results_show();
335
- }
336
- };
337
-
338
- AbstractChosen.prototype.results_search = function(evt) {
339
- if (this.results_showing) {
340
- return this.winnow_results();
341
- } else {
342
- return this.results_show();
343
- }
344
- };
345
-
346
- AbstractChosen.prototype.winnow_results = function() {
347
- var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
348
- this.no_results_clear();
349
- results = 0;
350
- searchText = this.get_search_text();
351
- escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
352
- zregex = new RegExp(escapedSearchText, 'i');
353
- regex = this.get_search_regex(escapedSearchText);
354
- _ref = this.results_data;
355
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
356
- option = _ref[_i];
357
- option.search_match = false;
358
- results_group = null;
359
- if (this.include_option_in_results(option)) {
360
- if (option.group) {
361
- option.group_match = false;
362
- option.active_options = 0;
363
- }
364
- if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
365
- results_group = this.results_data[option.group_array_index];
366
- if (results_group.active_options === 0 && results_group.search_match) {
367
- results += 1;
368
- }
369
- results_group.active_options += 1;
370
- }
371
- option.search_text = option.group ? option.label : option.html;
372
- if (!(option.group && !this.group_search)) {
373
- option.search_match = this.search_string_match(option.search_text, regex);
374
- if (option.search_match && !option.group) {
375
- results += 1;
376
- }
377
- if (option.search_match) {
378
- if (searchText.length) {
379
- startpos = option.search_text.search(zregex);
380
- text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
381
- option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
382
- }
383
- if (results_group != null) {
384
- results_group.group_match = true;
385
- }
386
- } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
387
- option.search_match = true;
388
- }
389
- }
390
- }
391
- }
392
- this.result_clear_highlight();
393
- if (results < 1 && searchText.length) {
394
- this.update_results_content("");
395
- return this.no_results(searchText);
396
- } else {
397
- this.update_results_content(this.results_option_build());
398
- return this.winnow_results_set_highlight();
399
- }
400
- };
401
-
402
- AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
403
- var regex_anchor;
404
- regex_anchor = this.search_contains ? "" : "^";
405
- return new RegExp(regex_anchor + escaped_search_string, 'i');
406
- };
407
-
408
- AbstractChosen.prototype.search_string_match = function(search_string, regex) {
409
- var part, parts, _i, _len;
410
- if (regex.test(search_string)) {
411
- return true;
412
- } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
413
- parts = search_string.replace(/\[|\]/g, "").split(" ");
414
- if (parts.length) {
415
- for (_i = 0, _len = parts.length; _i < _len; _i++) {
416
- part = parts[_i];
417
- if (regex.test(part)) {
418
- return true;
419
- }
420
- }
421
- }
422
- }
423
- };
424
-
425
- AbstractChosen.prototype.choices_count = function() {
426
- var option, _i, _len, _ref;
427
- if (this.selected_option_count != null) {
428
- return this.selected_option_count;
429
- }
430
- this.selected_option_count = 0;
431
- _ref = this.form_field.options;
432
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
433
- option = _ref[_i];
434
- if (option.selected) {
435
- this.selected_option_count += 1;
436
- }
437
- }
438
- return this.selected_option_count;
439
- };
440
-
441
- AbstractChosen.prototype.choices_click = function(evt) {
442
- evt.preventDefault();
443
- if (!(this.results_showing || this.is_disabled)) {
444
- return this.results_show();
445
- }
446
- };
447
-
448
- AbstractChosen.prototype.keyup_checker = function(evt) {
449
- var stroke, _ref;
450
- stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
451
- this.search_field_scale();
452
- switch (stroke) {
453
- case 8:
454
- if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
455
- return this.keydown_backstroke();
456
- } else if (!this.pending_backstroke) {
457
- this.result_clear_highlight();
458
- return this.results_search();
459
- }
460
- break;
461
- case 13:
462
- evt.preventDefault();
463
- if (this.results_showing) {
464
- return this.result_select(evt);
465
- }
466
- break;
467
- case 27:
468
- if (this.results_showing) {
469
- this.results_hide();
470
- }
471
- return true;
472
- case 9:
473
- case 38:
474
- case 40:
475
- case 16:
476
- case 91:
477
- case 17:
478
- case 18:
479
- break;
480
- default:
481
- return this.results_search();
482
- }
483
- };
484
-
485
- AbstractChosen.prototype.clipboard_event_checker = function(evt) {
486
- var _this = this;
487
- return setTimeout((function() {
488
- return _this.results_search();
489
- }), 50);
490
- };
491
-
492
- AbstractChosen.prototype.container_width = function() {
493
- if (this.options.width != null) {
494
- return this.options.width;
495
- } else {
496
- return "" + this.form_field.offsetWidth + "px";
497
- }
498
- };
499
-
500
- AbstractChosen.prototype.include_option_in_results = function(option) {
501
- if (this.is_multiple && (!this.display_selected_options && option.selected)) {
502
- return false;
503
- }
504
- if (!this.display_disabled_options && option.disabled) {
505
- return false;
506
- }
507
- if (option.empty) {
508
- return false;
509
- }
510
- return true;
511
- };
512
-
513
- AbstractChosen.prototype.search_results_touchstart = function(evt) {
514
- this.touch_started = true;
515
- return this.search_results_mouseover(evt);
516
- };
517
-
518
- AbstractChosen.prototype.search_results_touchmove = function(evt) {
519
- this.touch_started = false;
520
- return this.search_results_mouseout(evt);
521
- };
522
-
523
- AbstractChosen.prototype.search_results_touchend = function(evt) {
524
- if (this.touch_started) {
525
- return this.search_results_mouseup(evt);
526
- }
527
- };
528
-
529
- AbstractChosen.prototype.outerHTML = function(element) {
530
- var tmp;
531
- if (element.outerHTML) {
532
- return element.outerHTML;
533
- }
534
- tmp = document.createElement("div");
535
- tmp.appendChild(element);
536
- return tmp.innerHTML;
537
- };
538
-
539
- AbstractChosen.browser_is_supported = function() {
540
- if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
541
- return false;
542
- }
543
- if (/Android/i.test(window.navigator.userAgent)) {
544
- if (/Mobile/i.test(window.navigator.userAgent)) {
545
- return false;
546
- }
547
- }
548
- if (/IEMobile/i.test(window.navigator.userAgent)) {
549
- return false;
550
- }
551
- if (/Windows Phone/i.test(window.navigator.userAgent)) {
552
- return false;
553
- }
554
- if (/BlackBerry/i.test(window.navigator.userAgent)) {
555
- return false;
556
- }
557
- if (/BB10/i.test(window.navigator.userAgent)) {
558
- return false;
559
- }
560
- if (window.navigator.appName === "Microsoft Internet Explorer") {
561
- return document.documentMode >= 8;
562
- }
563
- return true;
564
- };
565
-
566
- AbstractChosen.default_multiple_text = "Select Some Options";
567
-
568
- AbstractChosen.default_single_text = "Select an Option";
569
-
570
- AbstractChosen.default_no_result_text = "No results match";
571
-
572
- return AbstractChosen;
573
-
574
- })();
575
-
576
- $ = jQuery;
577
-
578
- $.fn.extend({
579
- chosen: function(options) {
580
- if (!AbstractChosen.browser_is_supported()) {
581
- return this;
582
- }
583
- return this.each(function(input_field) {
584
- var $this, chosen;
585
- $this = $(this);
586
- chosen = $this.data('chosen');
587
- if (options === 'destroy') {
588
- if (chosen instanceof Chosen) {
589
- chosen.destroy();
590
- }
591
- return;
592
- }
593
- if (!(chosen instanceof Chosen)) {
594
- $this.data('chosen', new Chosen(this, options));
595
- }
596
- });
597
- }
598
- });
599
-
600
- Chosen = (function(_super) {
601
- __extends(Chosen, _super);
602
-
603
- function Chosen() {
604
- _ref = Chosen.__super__.constructor.apply(this, arguments);
605
- return _ref;
606
- }
607
-
608
- Chosen.prototype.setup = function() {
609
- this.form_field_jq = $(this.form_field);
610
- this.current_selectedIndex = this.form_field.selectedIndex;
611
- return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
612
- };
613
-
614
- Chosen.prototype.set_up_html = function() {
615
- var container_classes, container_props;
616
- container_classes = ["chosen-container"];
617
- container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
618
- if (this.inherit_select_classes && this.form_field.className) {
619
- container_classes.push(this.form_field.className);
620
- }
621
- if (this.is_rtl) {
622
- container_classes.push("chosen-rtl");
623
- }
624
- container_props = {
625
- 'class': container_classes.join(' '),
626
- 'style': "width: " + (this.container_width()) + ";",
627
- 'title': this.form_field.title
628
- };
629
- if (this.form_field.id.length) {
630
- container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
631
- }
632
- this.container = $("<div />", container_props);
633
- if (this.is_multiple) {
634
- this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
635
- } else {
636
- this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
637
- }
638
- this.form_field_jq.hide().after(this.container);
639
- this.dropdown = this.container.find('div.chosen-drop').first();
640
- this.search_field = this.container.find('input').first();
641
- this.search_results = this.container.find('ul.chosen-results').first();
642
- this.search_field_scale();
643
- this.search_no_results = this.container.find('li.no-results').first();
644
- if (this.is_multiple) {
645
- this.search_choices = this.container.find('ul.chosen-choices').first();
646
- this.search_container = this.container.find('li.search-field').first();
647
- } else {
648
- this.search_container = this.container.find('div.chosen-search').first();
649
- this.selected_item = this.container.find('.chosen-single').first();
650
- }
651
- this.results_build();
652
- this.set_tab_index();
653
- return this.set_label_behavior();
654
- };
655
-
656
- Chosen.prototype.on_ready = function() {
657
- return this.form_field_jq.trigger("chosen:ready", {
658
- chosen: this
659
- });
660
- };
661
-
662
- Chosen.prototype.register_observers = function() {
663
- var _this = this;
664
- this.container.bind('touchstart.chosen', function(evt) {
665
- _this.container_mousedown(evt);
666
- return evt.preventDefault();
667
- });
668
- this.container.bind('touchend.chosen', function(evt) {
669
- _this.container_mouseup(evt);
670
- return evt.preventDefault();
671
- });
672
- this.container.bind('mousedown.chosen', function(evt) {
673
- _this.container_mousedown(evt);
674
- });
675
- this.container.bind('mouseup.chosen', function(evt) {
676
- _this.container_mouseup(evt);
677
- });
678
- this.container.bind('mouseenter.chosen', function(evt) {
679
- _this.mouse_enter(evt);
680
- });
681
- this.container.bind('mouseleave.chosen', function(evt) {
682
- _this.mouse_leave(evt);
683
- });
684
- this.search_results.bind('mouseup.chosen', function(evt) {
685
- _this.search_results_mouseup(evt);
686
- });
687
- this.search_results.bind('mouseover.chosen', function(evt) {
688
- _this.search_results_mouseover(evt);
689
- });
690
- this.search_results.bind('mouseout.chosen', function(evt) {
691
- _this.search_results_mouseout(evt);
692
- });
693
- this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
694
- _this.search_results_mousewheel(evt);
695
- });
696
- this.search_results.bind('touchstart.chosen', function(evt) {
697
- _this.search_results_touchstart(evt);
698
- });
699
- this.search_results.bind('touchmove.chosen', function(evt) {
700
- _this.search_results_touchmove(evt);
701
- });
702
- this.search_results.bind('touchend.chosen', function(evt) {
703
- _this.search_results_touchend(evt);
704
- });
705
- this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
706
- _this.results_update_field(evt);
707
- });
708
- this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
709
- _this.activate_field(evt);
710
- });
711
- this.form_field_jq.bind("chosen:open.chosen", function(evt) {
712
- _this.container_mousedown(evt);
713
- });
714
- this.form_field_jq.bind("chosen:close.chosen", function(evt) {
715
- _this.input_blur(evt);
716
- });
717
- this.search_field.bind('blur.chosen', function(evt) {
718
- _this.input_blur(evt);
719
- });
720
- this.search_field.bind('keyup.chosen', function(evt) {
721
- _this.keyup_checker(evt);
722
- });
723
- this.search_field.bind('keydown.chosen', function(evt) {
724
- _this.keydown_checker(evt);
725
- });
726
- this.search_field.bind('focus.chosen', function(evt) {
727
- _this.input_focus(evt);
728
- });
729
- this.search_field.bind('cut.chosen', function(evt) {
730
- _this.clipboard_event_checker(evt);
731
- });
732
- this.search_field.bind('paste.chosen', function(evt) {
733
- _this.clipboard_event_checker(evt);
734
- });
735
- if (this.is_multiple) {
736
- return this.search_choices.bind('click.chosen', function(evt) {
737
- _this.choices_click(evt);
738
- });
739
- } else {
740
- return this.container.bind('click.chosen', function(evt) {
741
- evt.preventDefault();
742
- });
743
- }
744
- };
745
-
746
- Chosen.prototype.destroy = function() {
747
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
748
- if (this.search_field[0].tabIndex) {
749
- this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
750
- }
751
- this.container.remove();
752
- this.form_field_jq.removeData('chosen');
753
- return this.form_field_jq.show();
754
- };
755
-
756
- Chosen.prototype.search_field_disabled = function() {
757
- this.is_disabled = this.form_field_jq[0].disabled;
758
- if (this.is_disabled) {
759
- this.container.addClass('chosen-disabled');
760
- this.search_field[0].disabled = true;
761
- if (!this.is_multiple) {
762
- this.selected_item.unbind("focus.chosen", this.activate_action);
763
- }
764
- return this.close_field();
765
- } else {
766
- this.container.removeClass('chosen-disabled');
767
- this.search_field[0].disabled = false;
768
- if (!this.is_multiple) {
769
- return this.selected_item.bind("focus.chosen", this.activate_action);
770
- }
771
- }
772
- };
773
-
774
- Chosen.prototype.container_mousedown = function(evt) {
775
- if (!this.is_disabled) {
776
- if (evt && evt.type === "mousedown" && !this.results_showing) {
777
- evt.preventDefault();
778
- }
779
- if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
780
- if (!this.active_field) {
781
- if (this.is_multiple) {
782
- this.search_field.val("");
783
- }
784
- $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
785
- this.results_show();
786
- } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
787
- evt.preventDefault();
788
- this.results_toggle();
789
- }
790
- return this.activate_field();
791
- }
792
- }
793
- };
794
-
795
- Chosen.prototype.container_mouseup = function(evt) {
796
- if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
797
- return this.results_reset(evt);
798
- }
799
- };
800
-
801
- Chosen.prototype.search_results_mousewheel = function(evt) {
802
- var delta;
803
- if (evt.originalEvent) {
804
- delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
805
- }
806
- if (delta != null) {
807
- evt.preventDefault();
808
- if (evt.type === 'DOMMouseScroll') {
809
- delta = delta * 40;
810
- }
811
- return this.search_results.scrollTop(delta + this.search_results.scrollTop());
812
- }
813
- };
814
-
815
- Chosen.prototype.blur_test = function(evt) {
816
- if (!this.active_field && this.container.hasClass("chosen-container-active")) {
817
- return this.close_field();
818
- }
819
- };
820
-
821
- Chosen.prototype.close_field = function() {
822
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
823
- this.active_field = false;
824
- this.results_hide();
825
- this.container.removeClass("chosen-container-active");
826
- this.clear_backstroke();
827
- this.show_search_field_default();
828
- return this.search_field_scale();
829
- };
830
-
831
- Chosen.prototype.activate_field = function() {
832
- this.container.addClass("chosen-container-active");
833
- this.active_field = true;
834
- this.search_field.val(this.search_field.val());
835
- return this.search_field.focus();
836
- };
837
-
838
- Chosen.prototype.test_active_click = function(evt) {
839
- var active_container;
840
- active_container = $(evt.target).closest('.chosen-container');
841
- if (active_container.length && this.container[0] === active_container[0]) {
842
- return this.active_field = true;
843
- } else {
844
- return this.close_field();
845
- }
846
- };
847
-
848
- Chosen.prototype.results_build = function() {
849
- this.parsing = true;
850
- this.selected_option_count = null;
851
- this.results_data = SelectParser.select_to_array(this.form_field);
852
- if (this.is_multiple) {
853
- this.search_choices.find("li.search-choice").remove();
854
- } else if (!this.is_multiple) {
855
- this.single_set_selected_text();
856
- if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
857
- this.search_field[0].readOnly = true;
858
- this.container.addClass("chosen-container-single-nosearch");
859
- } else {
860
- this.search_field[0].readOnly = false;
861
- this.container.removeClass("chosen-container-single-nosearch");
862
- }
863
- }
864
- this.update_results_content(this.results_option_build({
865
- first: true
866
- }));
867
- this.search_field_disabled();
868
- this.show_search_field_default();
869
- this.search_field_scale();
870
- return this.parsing = false;
871
- };
872
-
873
- Chosen.prototype.result_do_highlight = function(el) {
874
- var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
875
- if (el.length) {
876
- this.result_clear_highlight();
877
- this.result_highlight = el;
878
- this.result_highlight.addClass("highlighted");
879
- maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
880
- visible_top = this.search_results.scrollTop();
881
- visible_bottom = maxHeight + visible_top;
882
- high_top = this.result_highlight.position().top + this.search_results.scrollTop();
883
- high_bottom = high_top + this.result_highlight.outerHeight();
884
- if (high_bottom >= visible_bottom) {
885
- return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
886
- } else if (high_top < visible_top) {
887
- return this.search_results.scrollTop(high_top);
888
- }
889
- }
890
- };
891
-
892
- Chosen.prototype.result_clear_highlight = function() {
893
- if (this.result_highlight) {
894
- this.result_highlight.removeClass("highlighted");
895
- }
896
- return this.result_highlight = null;
897
- };
898
-
899
- Chosen.prototype.results_show = function() {
900
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
901
- this.form_field_jq.trigger("chosen:maxselected", {
902
- chosen: this
903
- });
904
- return false;
905
- }
906
- this.container.addClass("chosen-with-drop");
907
- this.results_showing = true;
908
- this.search_field.focus();
909
- this.search_field.val(this.search_field.val());
910
- this.winnow_results();
911
- return this.form_field_jq.trigger("chosen:showing_dropdown", {
912
- chosen: this
913
- });
914
- };
915
-
916
- Chosen.prototype.update_results_content = function(content) {
917
- return this.search_results.html(content);
918
- };
919
-
920
- Chosen.prototype.results_hide = function() {
921
- if (this.results_showing) {
922
- this.result_clear_highlight();
923
- this.container.removeClass("chosen-with-drop");
924
- this.form_field_jq.trigger("chosen:hiding_dropdown", {
925
- chosen: this
926
- });
927
- }
928
- return this.results_showing = false;
929
- };
930
-
931
- Chosen.prototype.set_tab_index = function(el) {
932
- var ti;
933
- if (this.form_field.tabIndex) {
934
- ti = this.form_field.tabIndex;
935
- this.form_field.tabIndex = -1;
936
- return this.search_field[0].tabIndex = ti;
937
- }
938
- };
939
-
940
- Chosen.prototype.set_label_behavior = function() {
941
- var _this = this;
942
- this.form_field_label = this.form_field_jq.parents("label");
943
- if (!this.form_field_label.length && this.form_field.id.length) {
944
- this.form_field_label = $("label[for='" + this.form_field.id + "']");
945
- }
946
- if (this.form_field_label.length > 0) {
947
- return this.form_field_label.bind('click.chosen', function(evt) {
948
- if (_this.is_multiple) {
949
- return _this.container_mousedown(evt);
950
- } else {
951
- return _this.activate_field();
952
- }
953
- });
954
- }
955
- };
956
-
957
- Chosen.prototype.show_search_field_default = function() {
958
- if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
959
- this.search_field.val(this.default_text);
960
- return this.search_field.addClass("default");
961
- } else {
962
- this.search_field.val("");
963
- return this.search_field.removeClass("default");
964
- }
965
- };
966
-
967
- Chosen.prototype.search_results_mouseup = function(evt) {
968
- var target;
969
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
970
- if (target.length) {
971
- this.result_highlight = target;
972
- this.result_select(evt);
973
- return this.search_field.focus();
974
- }
975
- };
976
-
977
- Chosen.prototype.search_results_mouseover = function(evt) {
978
- var target;
979
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
980
- if (target) {
981
- return this.result_do_highlight(target);
982
- }
983
- };
984
-
985
- Chosen.prototype.search_results_mouseout = function(evt) {
986
- if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
987
- return this.result_clear_highlight();
988
- }
989
- };
990
-
991
- Chosen.prototype.choice_build = function(item) {
992
- var choice, close_link,
993
- _this = this;
994
- choice = $('<li />', {
995
- "class": "search-choice"
996
- }).html("<span>" + (this.choice_label(item)) + "</span>");
997
- if (item.disabled) {
998
- choice.addClass('search-choice-disabled');
999
- } else {
1000
- close_link = $('<a />', {
1001
- "class": 'search-choice-close',
1002
- 'data-option-array-index': item.array_index
1003
- });
1004
- close_link.bind('click.chosen', function(evt) {
1005
- return _this.choice_destroy_link_click(evt);
1006
- });
1007
- choice.append(close_link);
1008
- }
1009
- return this.search_container.before(choice);
1010
- };
1011
-
1012
- Chosen.prototype.choice_destroy_link_click = function(evt) {
1013
- evt.preventDefault();
1014
- evt.stopPropagation();
1015
- if (!this.is_disabled) {
1016
- return this.choice_destroy($(evt.target));
1017
- }
1018
- };
1019
-
1020
- Chosen.prototype.choice_destroy = function(link) {
1021
- if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1022
- this.show_search_field_default();
1023
- if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
1024
- this.results_hide();
1025
- }
1026
- link.parents('li').first().remove();
1027
- return this.search_field_scale();
1028
- }
1029
- };
1030
-
1031
- Chosen.prototype.results_reset = function() {
1032
- this.reset_single_select_options();
1033
- this.form_field.options[0].selected = true;
1034
- this.single_set_selected_text();
1035
- this.show_search_field_default();
1036
- this.results_reset_cleanup();
1037
- this.form_field_jq.trigger("change");
1038
- if (this.active_field) {
1039
- return this.results_hide();
1040
- }
1041
- };
1042
-
1043
- Chosen.prototype.results_reset_cleanup = function() {
1044
- this.current_selectedIndex = this.form_field.selectedIndex;
1045
- return this.selected_item.find("abbr").remove();
1046
- };
1047
-
1048
- Chosen.prototype.result_select = function(evt) {
1049
- var high, item;
1050
- if (this.result_highlight) {
1051
- high = this.result_highlight;
1052
- this.result_clear_highlight();
1053
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1054
- this.form_field_jq.trigger("chosen:maxselected", {
1055
- chosen: this
1056
- });
1057
- return false;
1058
- }
1059
- if (this.is_multiple) {
1060
- high.removeClass("active-result");
1061
- } else {
1062
- this.reset_single_select_options();
1063
- }
1064
- high.addClass("result-selected");
1065
- item = this.results_data[high[0].getAttribute("data-option-array-index")];
1066
- item.selected = true;
1067
- this.form_field.options[item.options_index].selected = true;
1068
- this.selected_option_count = null;
1069
- if (this.is_multiple) {
1070
- this.choice_build(item);
1071
- } else {
1072
- this.single_set_selected_text(this.choice_label(item));
1073
- }
1074
- if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1075
- this.results_hide();
1076
- }
1077
- this.show_search_field_default();
1078
- if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1079
- this.form_field_jq.trigger("change", {
1080
- 'selected': this.form_field.options[item.options_index].value
1081
- });
1082
- }
1083
- this.current_selectedIndex = this.form_field.selectedIndex;
1084
- evt.preventDefault();
1085
- return this.search_field_scale();
1086
- }
1087
- };
1088
-
1089
- Chosen.prototype.single_set_selected_text = function(text) {
1090
- if (text == null) {
1091
- text = this.default_text;
1092
- }
1093
- if (text === this.default_text) {
1094
- this.selected_item.addClass("chosen-default");
1095
- } else {
1096
- this.single_deselect_control_build();
1097
- this.selected_item.removeClass("chosen-default");
1098
- }
1099
- return this.selected_item.find("span").html(text);
1100
- };
1101
-
1102
- Chosen.prototype.result_deselect = function(pos) {
1103
- var result_data;
1104
- result_data = this.results_data[pos];
1105
- if (!this.form_field.options[result_data.options_index].disabled) {
1106
- result_data.selected = false;
1107
- this.form_field.options[result_data.options_index].selected = false;
1108
- this.selected_option_count = null;
1109
- this.result_clear_highlight();
1110
- if (this.results_showing) {
1111
- this.winnow_results();
1112
- }
1113
- this.form_field_jq.trigger("change", {
1114
- deselected: this.form_field.options[result_data.options_index].value
1115
- });
1116
- this.search_field_scale();
1117
- return true;
1118
- } else {
1119
- return false;
1120
- }
1121
- };
1122
-
1123
- Chosen.prototype.single_deselect_control_build = function() {
1124
- if (!this.allow_single_deselect) {
1125
- return;
1126
- }
1127
- if (!this.selected_item.find("abbr").length) {
1128
- this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1129
- }
1130
- return this.selected_item.addClass("chosen-single-with-deselect");
1131
- };
1132
-
1133
- Chosen.prototype.get_search_text = function() {
1134
- return $('<div/>').text($.trim(this.search_field.val())).html();
1135
- };
1136
-
1137
- Chosen.prototype.winnow_results_set_highlight = function() {
1138
- var do_high, selected_results;
1139
- selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1140
- do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1141
- if (do_high != null) {
1142
- return this.result_do_highlight(do_high);
1143
- }
1144
- };
1145
-
1146
- Chosen.prototype.no_results = function(terms) {
1147
- var no_results_html;
1148
- no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1149
- no_results_html.find("span").first().html(terms);
1150
- this.search_results.append(no_results_html);
1151
- return this.form_field_jq.trigger("chosen:no_results", {
1152
- chosen: this
1153
- });
1154
- };
1155
-
1156
- Chosen.prototype.no_results_clear = function() {
1157
- return this.search_results.find(".no-results").remove();
1158
- };
1159
-
1160
- Chosen.prototype.keydown_arrow = function() {
1161
- var next_sib;
1162
- if (this.results_showing && this.result_highlight) {
1163
- next_sib = this.result_highlight.nextAll("li.active-result").first();
1164
- if (next_sib) {
1165
- return this.result_do_highlight(next_sib);
1166
- }
1167
- } else {
1168
- return this.results_show();
1169
- }
1170
- };
1171
-
1172
- Chosen.prototype.keyup_arrow = function() {
1173
- var prev_sibs;
1174
- if (!this.results_showing && !this.is_multiple) {
1175
- return this.results_show();
1176
- } else if (this.result_highlight) {
1177
- prev_sibs = this.result_highlight.prevAll("li.active-result");
1178
- if (prev_sibs.length) {
1179
- return this.result_do_highlight(prev_sibs.first());
1180
- } else {
1181
- if (this.choices_count() > 0) {
1182
- this.results_hide();
1183
- }
1184
- return this.result_clear_highlight();
1185
- }
1186
- }
1187
- };
1188
-
1189
- Chosen.prototype.keydown_backstroke = function() {
1190
- var next_available_destroy;
1191
- if (this.pending_backstroke) {
1192
- this.choice_destroy(this.pending_backstroke.find("a").first());
1193
- return this.clear_backstroke();
1194
- } else {
1195
- next_available_destroy = this.search_container.siblings("li.search-choice").last();
1196
- if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1197
- this.pending_backstroke = next_available_destroy;
1198
- if (this.single_backstroke_delete) {
1199
- return this.keydown_backstroke();
1200
- } else {
1201
- return this.pending_backstroke.addClass("search-choice-focus");
1202
- }
1203
- }
1204
- }
1205
- };
1206
-
1207
- Chosen.prototype.clear_backstroke = function() {
1208
- if (this.pending_backstroke) {
1209
- this.pending_backstroke.removeClass("search-choice-focus");
1210
- }
1211
- return this.pending_backstroke = null;
1212
- };
1213
-
1214
- Chosen.prototype.keydown_checker = function(evt) {
1215
- var stroke, _ref1;
1216
- stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1217
- this.search_field_scale();
1218
- if (stroke !== 8 && this.pending_backstroke) {
1219
- this.clear_backstroke();
1220
- }
1221
- switch (stroke) {
1222
- case 8:
1223
- this.backstroke_length = this.search_field.val().length;
1224
- break;
1225
- case 9:
1226
- if (this.results_showing && !this.is_multiple) {
1227
- this.result_select(evt);
1228
- }
1229
- this.mouse_on_container = false;
1230
- break;
1231
- case 13:
1232
- if (this.results_showing) {
1233
- evt.preventDefault();
1234
- }
1235
- break;
1236
- case 32:
1237
- if (this.disable_search) {
1238
- evt.preventDefault();
1239
- }
1240
- break;
1241
- case 38:
1242
- evt.preventDefault();
1243
- this.keyup_arrow();
1244
- break;
1245
- case 40:
1246
- evt.preventDefault();
1247
- this.keydown_arrow();
1248
- break;
1249
- }
1250
- };
1251
-
1252
- Chosen.prototype.search_field_scale = function() {
1253
- var div, f_width, h, style, style_block, styles, w, _i, _len;
1254
- if (this.is_multiple) {
1255
- h = 0;
1256
- w = 0;
1257
- style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1258
- styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1259
- for (_i = 0, _len = styles.length; _i < _len; _i++) {
1260
- style = styles[_i];
1261
- style_block += style + ":" + this.search_field.css(style) + ";";
1262
- }
1263
- div = $('<div />', {
1264
- 'style': style_block
1265
- });
1266
- div.text(this.search_field.val());
1267
- $('body').append(div);
1268
- w = div.width() + 25;
1269
- div.remove();
1270
- f_width = this.container.outerWidth();
1271
- if (w > f_width - 10) {
1272
- w = f_width - 10;
1273
- }
1274
- return this.search_field.css({
1275
- 'width': w + 'px'
1276
- });
1277
- }
1278
- };
1279
-
1280
- return Chosen;
1281
-
1282
- })(AbstractChosen);
1283
-
1284
- }).call(this);
1
+ /*!
2
+ Chosen, a Select Box Enhancer for jQuery and Prototype
3
+ by Patrick Filler for Harvest, http://getharvest.com
4
+
5
+ Version 1.5.1
6
+ Full source at https://github.com/harvesthq/chosen
7
+ Copyright (c) 2011-2016 Harvest http://getharvest.com
8
+
9
+ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
+ This file is generated by `grunt build`, do not edit it by hand.
11
+ */
12
+
13
+ (function() {
14
+ var $, AbstractChosen, Chosen, SelectParser, _ref,
15
+ __hasProp = {}.hasOwnProperty,
16
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
17
+
18
+ SelectParser = (function() {
19
+ function SelectParser() {
20
+ this.options_index = 0;
21
+ this.parsed = [];
22
+ }
23
+
24
+ SelectParser.prototype.add_node = function(child) {
25
+ if (child.nodeName.toUpperCase() === "OPTGROUP") {
26
+ return this.add_group(child);
27
+ } else {
28
+ return this.add_option(child);
29
+ }
30
+ };
31
+
32
+ SelectParser.prototype.add_group = function(group) {
33
+ var group_position, option, _i, _len, _ref, _results;
34
+ group_position = this.parsed.length;
35
+ this.parsed.push({
36
+ array_index: group_position,
37
+ group: true,
38
+ label: this.escapeExpression(group.label),
39
+ title: group.title ? group.title : void 0,
40
+ children: 0,
41
+ disabled: group.disabled,
42
+ classes: group.className
43
+ });
44
+ _ref = group.childNodes;
45
+ _results = [];
46
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
47
+ option = _ref[_i];
48
+ _results.push(this.add_option(option, group_position, group.disabled));
49
+ }
50
+ return _results;
51
+ };
52
+
53
+ SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
54
+ if (option.nodeName.toUpperCase() === "OPTION") {
55
+ if (option.text !== "") {
56
+ if (group_position != null) {
57
+ this.parsed[group_position].children += 1;
58
+ }
59
+ this.parsed.push({
60
+ array_index: this.parsed.length,
61
+ options_index: this.options_index,
62
+ value: option.value,
63
+ text: option.text,
64
+ html: option.innerHTML,
65
+ title: option.title ? option.title : void 0,
66
+ selected: option.selected,
67
+ disabled: group_disabled === true ? group_disabled : option.disabled,
68
+ group_array_index: group_position,
69
+ group_label: group_position != null ? this.parsed[group_position].label : null,
70
+ classes: option.className,
71
+ style: option.style.cssText
72
+ });
73
+ } else {
74
+ this.parsed.push({
75
+ array_index: this.parsed.length,
76
+ options_index: this.options_index,
77
+ empty: true
78
+ });
79
+ }
80
+ return this.options_index += 1;
81
+ }
82
+ };
83
+
84
+ SelectParser.prototype.escapeExpression = function(text) {
85
+ var map, unsafe_chars;
86
+ if ((text == null) || text === false) {
87
+ return "";
88
+ }
89
+ if (!/[\&\<\>\"\'\`]/.test(text)) {
90
+ return text;
91
+ }
92
+ map = {
93
+ "<": "&lt;",
94
+ ">": "&gt;",
95
+ '"': "&quot;",
96
+ "'": "&#x27;",
97
+ "`": "&#x60;"
98
+ };
99
+ unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
100
+ return text.replace(unsafe_chars, function(chr) {
101
+ return map[chr] || "&amp;";
102
+ });
103
+ };
104
+
105
+ return SelectParser;
106
+
107
+ })();
108
+
109
+ SelectParser.select_to_array = function(select) {
110
+ var child, parser, _i, _len, _ref;
111
+ parser = new SelectParser();
112
+ _ref = select.childNodes;
113
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
114
+ child = _ref[_i];
115
+ parser.add_node(child);
116
+ }
117
+ return parser.parsed;
118
+ };
119
+
120
+ AbstractChosen = (function() {
121
+ function AbstractChosen(form_field, options) {
122
+ this.form_field = form_field;
123
+ this.options = options != null ? options : {};
124
+ if (!AbstractChosen.browser_is_supported()) {
125
+ return;
126
+ }
127
+ this.is_multiple = this.form_field.multiple;
128
+ this.set_default_text();
129
+ this.set_default_values();
130
+ this.setup();
131
+ this.set_up_html();
132
+ this.register_observers();
133
+ this.on_ready();
134
+ }
135
+
136
+ AbstractChosen.prototype.set_default_values = function() {
137
+ var _this = this;
138
+ this.click_test_action = function(evt) {
139
+ return _this.test_active_click(evt);
140
+ };
141
+ this.activate_action = function(evt) {
142
+ return _this.activate_field(evt);
143
+ };
144
+ this.active_field = false;
145
+ this.mouse_on_container = false;
146
+ this.results_showing = false;
147
+ this.result_highlighted = null;
148
+ this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
149
+ this.disable_search_threshold = this.options.disable_search_threshold || 0;
150
+ this.disable_search = this.options.disable_search || false;
151
+ this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
152
+ this.group_search = this.options.group_search != null ? this.options.group_search : true;
153
+ this.search_contains = this.options.search_contains || false;
154
+ this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
155
+ this.max_selected_options = this.options.max_selected_options || Infinity;
156
+ this.inherit_select_classes = this.options.inherit_select_classes || false;
157
+ this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
158
+ this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
159
+ this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
160
+ return this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
161
+ };
162
+
163
+ AbstractChosen.prototype.set_default_text = function() {
164
+ if (this.form_field.getAttribute("data-placeholder")) {
165
+ this.default_text = this.form_field.getAttribute("data-placeholder");
166
+ } else if (this.is_multiple) {
167
+ this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
168
+ } else {
169
+ this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
170
+ }
171
+ return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
172
+ };
173
+
174
+ AbstractChosen.prototype.choice_label = function(item) {
175
+ if (this.include_group_label_in_selected && (item.group_label != null)) {
176
+ return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
177
+ } else {
178
+ return item.html;
179
+ }
180
+ };
181
+
182
+ AbstractChosen.prototype.mouse_enter = function() {
183
+ return this.mouse_on_container = true;
184
+ };
185
+
186
+ AbstractChosen.prototype.mouse_leave = function() {
187
+ return this.mouse_on_container = false;
188
+ };
189
+
190
+ AbstractChosen.prototype.input_focus = function(evt) {
191
+ var _this = this;
192
+ if (this.is_multiple) {
193
+ if (!this.active_field) {
194
+ return setTimeout((function() {
195
+ return _this.container_mousedown();
196
+ }), 50);
197
+ }
198
+ } else {
199
+ if (!this.active_field) {
200
+ return this.activate_field();
201
+ }
202
+ }
203
+ };
204
+
205
+ AbstractChosen.prototype.input_blur = function(evt) {
206
+ var _this = this;
207
+ if (!this.mouse_on_container) {
208
+ this.active_field = false;
209
+ return setTimeout((function() {
210
+ return _this.blur_test();
211
+ }), 100);
212
+ }
213
+ };
214
+
215
+ AbstractChosen.prototype.results_option_build = function(options) {
216
+ var content, data, data_content, shown_results, _i, _len, _ref;
217
+ content = '';
218
+ shown_results = 0;
219
+ _ref = this.results_data;
220
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
221
+ data = _ref[_i];
222
+ data_content = '';
223
+ if (data.group) {
224
+ data_content = this.result_add_group(data);
225
+ } else {
226
+ data_content = this.result_add_option(data);
227
+ }
228
+ if (data_content !== '') {
229
+ shown_results++;
230
+ content += data_content;
231
+ }
232
+ if (options != null ? options.first : void 0) {
233
+ if (data.selected && this.is_multiple) {
234
+ this.choice_build(data);
235
+ } else if (data.selected && !this.is_multiple) {
236
+ this.single_set_selected_text(this.choice_label(data));
237
+ }
238
+ }
239
+ if (shown_results >= this.max_shown_results) {
240
+ break;
241
+ }
242
+ }
243
+ return content;
244
+ };
245
+
246
+ AbstractChosen.prototype.result_add_option = function(option) {
247
+ var classes, option_el;
248
+ if (!option.search_match) {
249
+ return '';
250
+ }
251
+ if (!this.include_option_in_results(option)) {
252
+ return '';
253
+ }
254
+ classes = [];
255
+ if (!option.disabled && !(option.selected && this.is_multiple)) {
256
+ classes.push("active-result");
257
+ }
258
+ if (option.disabled && !(option.selected && this.is_multiple)) {
259
+ classes.push("disabled-result");
260
+ }
261
+ if (option.selected) {
262
+ classes.push("result-selected");
263
+ }
264
+ if (option.group_array_index != null) {
265
+ classes.push("group-option");
266
+ }
267
+ if (option.classes !== "") {
268
+ classes.push(option.classes);
269
+ }
270
+ option_el = document.createElement("li");
271
+ option_el.className = classes.join(" ");
272
+ option_el.style.cssText = option.style;
273
+ option_el.setAttribute("data-option-array-index", option.array_index);
274
+ option_el.innerHTML = option.search_text;
275
+ if (option.title) {
276
+ option_el.title = option.title;
277
+ }
278
+ return this.outerHTML(option_el);
279
+ };
280
+
281
+ AbstractChosen.prototype.result_add_group = function(group) {
282
+ var classes, group_el;
283
+ if (!(group.search_match || group.group_match)) {
284
+ return '';
285
+ }
286
+ if (!(group.active_options > 0)) {
287
+ return '';
288
+ }
289
+ classes = [];
290
+ classes.push("group-result");
291
+ if (group.classes) {
292
+ classes.push(group.classes);
293
+ }
294
+ group_el = document.createElement("li");
295
+ group_el.className = classes.join(" ");
296
+ group_el.innerHTML = group.search_text;
297
+ if (group.title) {
298
+ group_el.title = group.title;
299
+ }
300
+ return this.outerHTML(group_el);
301
+ };
302
+
303
+ AbstractChosen.prototype.results_update_field = function() {
304
+ this.set_default_text();
305
+ if (!this.is_multiple) {
306
+ this.results_reset_cleanup();
307
+ }
308
+ this.result_clear_highlight();
309
+ this.results_build();
310
+ if (this.results_showing) {
311
+ return this.winnow_results();
312
+ }
313
+ };
314
+
315
+ AbstractChosen.prototype.reset_single_select_options = function() {
316
+ var result, _i, _len, _ref, _results;
317
+ _ref = this.results_data;
318
+ _results = [];
319
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
320
+ result = _ref[_i];
321
+ if (result.selected) {
322
+ _results.push(result.selected = false);
323
+ } else {
324
+ _results.push(void 0);
325
+ }
326
+ }
327
+ return _results;
328
+ };
329
+
330
+ AbstractChosen.prototype.results_toggle = function() {
331
+ if (this.results_showing) {
332
+ return this.results_hide();
333
+ } else {
334
+ return this.results_show();
335
+ }
336
+ };
337
+
338
+ AbstractChosen.prototype.results_search = function(evt) {
339
+ if (this.results_showing) {
340
+ return this.winnow_results();
341
+ } else {
342
+ return this.results_show();
343
+ }
344
+ };
345
+
346
+ AbstractChosen.prototype.winnow_results = function() {
347
+ var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
348
+ this.no_results_clear();
349
+ results = 0;
350
+ searchText = this.get_search_text();
351
+ escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
352
+ zregex = new RegExp(escapedSearchText, 'i');
353
+ regex = this.get_search_regex(escapedSearchText);
354
+ _ref = this.results_data;
355
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
356
+ option = _ref[_i];
357
+ option.search_match = false;
358
+ results_group = null;
359
+ if (this.include_option_in_results(option)) {
360
+ if (option.group) {
361
+ option.group_match = false;
362
+ option.active_options = 0;
363
+ }
364
+ if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
365
+ results_group = this.results_data[option.group_array_index];
366
+ if (results_group.active_options === 0 && results_group.search_match) {
367
+ results += 1;
368
+ }
369
+ results_group.active_options += 1;
370
+ }
371
+ option.search_text = option.group ? option.label : option.html;
372
+ if (!(option.group && !this.group_search)) {
373
+ option.search_match = this.search_string_match(option.search_text, regex);
374
+ if (option.search_match && !option.group) {
375
+ results += 1;
376
+ }
377
+ if (option.search_match) {
378
+ if (searchText.length) {
379
+ startpos = option.search_text.search(zregex);
380
+ text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
381
+ option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
382
+ }
383
+ if (results_group != null) {
384
+ results_group.group_match = true;
385
+ }
386
+ } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
387
+ option.search_match = true;
388
+ }
389
+ }
390
+ }
391
+ }
392
+ this.result_clear_highlight();
393
+ if (results < 1 && searchText.length) {
394
+ this.update_results_content("");
395
+ return this.no_results(searchText);
396
+ } else {
397
+ this.update_results_content(this.results_option_build());
398
+ return this.winnow_results_set_highlight();
399
+ }
400
+ };
401
+
402
+ AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
403
+ var regex_anchor;
404
+ regex_anchor = this.search_contains ? "" : "^";
405
+ return new RegExp(regex_anchor + escaped_search_string, 'i');
406
+ };
407
+
408
+ AbstractChosen.prototype.search_string_match = function(search_string, regex) {
409
+ var part, parts, _i, _len;
410
+ if (regex.test(search_string)) {
411
+ return true;
412
+ } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
413
+ parts = search_string.replace(/\[|\]/g, "").split(" ");
414
+ if (parts.length) {
415
+ for (_i = 0, _len = parts.length; _i < _len; _i++) {
416
+ part = parts[_i];
417
+ if (regex.test(part)) {
418
+ return true;
419
+ }
420
+ }
421
+ }
422
+ }
423
+ };
424
+
425
+ AbstractChosen.prototype.choices_count = function() {
426
+ var option, _i, _len, _ref;
427
+ if (this.selected_option_count != null) {
428
+ return this.selected_option_count;
429
+ }
430
+ this.selected_option_count = 0;
431
+ _ref = this.form_field.options;
432
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
433
+ option = _ref[_i];
434
+ if (option.selected) {
435
+ this.selected_option_count += 1;
436
+ }
437
+ }
438
+ return this.selected_option_count;
439
+ };
440
+
441
+ AbstractChosen.prototype.choices_click = function(evt) {
442
+ evt.preventDefault();
443
+ if (!(this.results_showing || this.is_disabled)) {
444
+ return this.results_show();
445
+ }
446
+ };
447
+
448
+ AbstractChosen.prototype.keyup_checker = function(evt) {
449
+ var stroke, _ref;
450
+ stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
451
+ this.search_field_scale();
452
+ switch (stroke) {
453
+ case 8:
454
+ if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
455
+ return this.keydown_backstroke();
456
+ } else if (!this.pending_backstroke) {
457
+ this.result_clear_highlight();
458
+ return this.results_search();
459
+ }
460
+ break;
461
+ case 13:
462
+ evt.preventDefault();
463
+ if (this.results_showing) {
464
+ return this.result_select(evt);
465
+ }
466
+ break;
467
+ case 27:
468
+ if (this.results_showing) {
469
+ this.results_hide();
470
+ }
471
+ return true;
472
+ case 9:
473
+ case 38:
474
+ case 40:
475
+ case 16:
476
+ case 91:
477
+ case 17:
478
+ case 18:
479
+ break;
480
+ default:
481
+ return this.results_search();
482
+ }
483
+ };
484
+
485
+ AbstractChosen.prototype.clipboard_event_checker = function(evt) {
486
+ var _this = this;
487
+ return setTimeout((function() {
488
+ return _this.results_search();
489
+ }), 50);
490
+ };
491
+
492
+ AbstractChosen.prototype.container_width = function() {
493
+ if (this.options.width != null) {
494
+ return this.options.width;
495
+ } else {
496
+ return "" + this.form_field.offsetWidth + "px";
497
+ }
498
+ };
499
+
500
+ AbstractChosen.prototype.include_option_in_results = function(option) {
501
+ if (this.is_multiple && (!this.display_selected_options && option.selected)) {
502
+ return false;
503
+ }
504
+ if (!this.display_disabled_options && option.disabled) {
505
+ return false;
506
+ }
507
+ if (option.empty) {
508
+ return false;
509
+ }
510
+ return true;
511
+ };
512
+
513
+ AbstractChosen.prototype.search_results_touchstart = function(evt) {
514
+ this.touch_started = true;
515
+ return this.search_results_mouseover(evt);
516
+ };
517
+
518
+ AbstractChosen.prototype.search_results_touchmove = function(evt) {
519
+ this.touch_started = false;
520
+ return this.search_results_mouseout(evt);
521
+ };
522
+
523
+ AbstractChosen.prototype.search_results_touchend = function(evt) {
524
+ if (this.touch_started) {
525
+ return this.search_results_mouseup(evt);
526
+ }
527
+ };
528
+
529
+ AbstractChosen.prototype.outerHTML = function(element) {
530
+ var tmp;
531
+ if (element.outerHTML) {
532
+ return element.outerHTML;
533
+ }
534
+ tmp = document.createElement("div");
535
+ tmp.appendChild(element);
536
+ return tmp.innerHTML;
537
+ };
538
+
539
+ AbstractChosen.browser_is_supported = function() {
540
+ if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
541
+ return false;
542
+ }
543
+ if (/Android/i.test(window.navigator.userAgent)) {
544
+ if (/Mobile/i.test(window.navigator.userAgent)) {
545
+ return false;
546
+ }
547
+ }
548
+ if (/IEMobile/i.test(window.navigator.userAgent)) {
549
+ return false;
550
+ }
551
+ if (/Windows Phone/i.test(window.navigator.userAgent)) {
552
+ return false;
553
+ }
554
+ if (/BlackBerry/i.test(window.navigator.userAgent)) {
555
+ return false;
556
+ }
557
+ if (/BB10/i.test(window.navigator.userAgent)) {
558
+ return false;
559
+ }
560
+ if (window.navigator.appName === "Microsoft Internet Explorer") {
561
+ return document.documentMode >= 8;
562
+ }
563
+ return true;
564
+ };
565
+
566
+ AbstractChosen.default_multiple_text = "Select Some Options";
567
+
568
+ AbstractChosen.default_single_text = "Select an Option";
569
+
570
+ AbstractChosen.default_no_result_text = "No results match";
571
+
572
+ return AbstractChosen;
573
+
574
+ })();
575
+
576
+ $ = jQuery;
577
+
578
+ $.fn.extend({
579
+ chosen: function(options) {
580
+ if (!AbstractChosen.browser_is_supported()) {
581
+ return this;
582
+ }
583
+ return this.each(function(input_field) {
584
+ var $this, chosen;
585
+ $this = $(this);
586
+ chosen = $this.data('chosen');
587
+ if (options === 'destroy') {
588
+ if (chosen instanceof Chosen) {
589
+ chosen.destroy();
590
+ }
591
+ return;
592
+ }
593
+ if (!(chosen instanceof Chosen)) {
594
+ $this.data('chosen', new Chosen(this, options));
595
+ }
596
+ });
597
+ }
598
+ });
599
+
600
+ Chosen = (function(_super) {
601
+ __extends(Chosen, _super);
602
+
603
+ function Chosen() {
604
+ _ref = Chosen.__super__.constructor.apply(this, arguments);
605
+ return _ref;
606
+ }
607
+
608
+ Chosen.prototype.setup = function() {
609
+ this.form_field_jq = $(this.form_field);
610
+ this.current_selectedIndex = this.form_field.selectedIndex;
611
+ return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
612
+ };
613
+
614
+ Chosen.prototype.set_up_html = function() {
615
+ var container_classes, container_props;
616
+ container_classes = ["chosen-container"];
617
+ container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
618
+ if (this.inherit_select_classes && this.form_field.className) {
619
+ container_classes.push(this.form_field.className);
620
+ }
621
+ if (this.is_rtl) {
622
+ container_classes.push("chosen-rtl");
623
+ }
624
+ container_props = {
625
+ 'class': container_classes.join(' '),
626
+ 'style': "width: " + (this.container_width()) + ";",
627
+ 'title': this.form_field.title
628
+ };
629
+ if (this.form_field.id.length) {
630
+ container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
631
+ }
632
+ this.container = $("<div />", container_props);
633
+ if (this.is_multiple) {
634
+ this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
635
+ } else {
636
+ this.container.html('<a class="chosen-single chosen-default"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
637
+ }
638
+ this.form_field_jq.hide().after(this.container);
639
+ this.dropdown = this.container.find('div.chosen-drop').first();
640
+ this.search_field = this.container.find('input').first();
641
+ this.search_results = this.container.find('ul.chosen-results').first();
642
+ this.search_field_scale();
643
+ this.search_no_results = this.container.find('li.no-results').first();
644
+ if (this.is_multiple) {
645
+ this.search_choices = this.container.find('ul.chosen-choices').first();
646
+ this.search_container = this.container.find('li.search-field').first();
647
+ } else {
648
+ this.search_container = this.container.find('div.chosen-search').first();
649
+ this.selected_item = this.container.find('.chosen-single').first();
650
+ }
651
+ this.results_build();
652
+ this.set_tab_index();
653
+ return this.set_label_behavior();
654
+ };
655
+
656
+ Chosen.prototype.on_ready = function() {
657
+ return this.form_field_jq.trigger("chosen:ready", {
658
+ chosen: this
659
+ });
660
+ };
661
+
662
+ Chosen.prototype.register_observers = function() {
663
+ var _this = this;
664
+ this.container.bind('touchstart.chosen', function(evt) {
665
+ _this.container_mousedown(evt);
666
+ return evt.preventDefault();
667
+ });
668
+ this.container.bind('touchend.chosen', function(evt) {
669
+ _this.container_mouseup(evt);
670
+ return evt.preventDefault();
671
+ });
672
+ this.container.bind('mousedown.chosen', function(evt) {
673
+ _this.container_mousedown(evt);
674
+ });
675
+ this.container.bind('mouseup.chosen', function(evt) {
676
+ _this.container_mouseup(evt);
677
+ });
678
+ this.container.bind('mouseenter.chosen', function(evt) {
679
+ _this.mouse_enter(evt);
680
+ });
681
+ this.container.bind('mouseleave.chosen', function(evt) {
682
+ _this.mouse_leave(evt);
683
+ });
684
+ this.search_results.bind('mouseup.chosen', function(evt) {
685
+ _this.search_results_mouseup(evt);
686
+ });
687
+ this.search_results.bind('mouseover.chosen', function(evt) {
688
+ _this.search_results_mouseover(evt);
689
+ });
690
+ this.search_results.bind('mouseout.chosen', function(evt) {
691
+ _this.search_results_mouseout(evt);
692
+ });
693
+ this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
694
+ _this.search_results_mousewheel(evt);
695
+ });
696
+ this.search_results.bind('touchstart.chosen', function(evt) {
697
+ _this.search_results_touchstart(evt);
698
+ });
699
+ this.search_results.bind('touchmove.chosen', function(evt) {
700
+ _this.search_results_touchmove(evt);
701
+ });
702
+ this.search_results.bind('touchend.chosen', function(evt) {
703
+ _this.search_results_touchend(evt);
704
+ });
705
+ this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
706
+ _this.results_update_field(evt);
707
+ });
708
+ this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
709
+ _this.activate_field(evt);
710
+ });
711
+ this.form_field_jq.bind("chosen:open.chosen", function(evt) {
712
+ _this.container_mousedown(evt);
713
+ });
714
+ this.form_field_jq.bind("chosen:close.chosen", function(evt) {
715
+ _this.input_blur(evt);
716
+ });
717
+ this.search_field.bind('blur.chosen', function(evt) {
718
+ _this.input_blur(evt);
719
+ });
720
+ this.search_field.bind('keyup.chosen', function(evt) {
721
+ _this.keyup_checker(evt);
722
+ });
723
+ this.search_field.bind('keydown.chosen', function(evt) {
724
+ _this.keydown_checker(evt);
725
+ });
726
+ this.search_field.bind('focus.chosen', function(evt) {
727
+ _this.input_focus(evt);
728
+ });
729
+ this.search_field.bind('cut.chosen', function(evt) {
730
+ _this.clipboard_event_checker(evt);
731
+ });
732
+ this.search_field.bind('paste.chosen', function(evt) {
733
+ _this.clipboard_event_checker(evt);
734
+ });
735
+ if (this.is_multiple) {
736
+ return this.search_choices.bind('click.chosen', function(evt) {
737
+ _this.choices_click(evt);
738
+ });
739
+ } else {
740
+ return this.container.bind('click.chosen', function(evt) {
741
+ evt.preventDefault();
742
+ });
743
+ }
744
+ };
745
+
746
+ Chosen.prototype.destroy = function() {
747
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
748
+ if (this.search_field[0].tabIndex) {
749
+ this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
750
+ }
751
+ this.container.remove();
752
+ this.form_field_jq.removeData('chosen');
753
+ return this.form_field_jq.show();
754
+ };
755
+
756
+ Chosen.prototype.search_field_disabled = function() {
757
+ this.is_disabled = this.form_field_jq[0].disabled;
758
+ if (this.is_disabled) {
759
+ this.container.addClass('chosen-disabled');
760
+ this.search_field[0].disabled = true;
761
+ if (!this.is_multiple) {
762
+ this.selected_item.unbind("focus.chosen", this.activate_action);
763
+ }
764
+ return this.close_field();
765
+ } else {
766
+ this.container.removeClass('chosen-disabled');
767
+ this.search_field[0].disabled = false;
768
+ if (!this.is_multiple) {
769
+ return this.selected_item.bind("focus.chosen", this.activate_action);
770
+ }
771
+ }
772
+ };
773
+
774
+ Chosen.prototype.container_mousedown = function(evt) {
775
+ if (!this.is_disabled) {
776
+ if (evt && evt.type === "mousedown" && !this.results_showing) {
777
+ evt.preventDefault();
778
+ }
779
+ if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
780
+ if (!this.active_field) {
781
+ if (this.is_multiple) {
782
+ this.search_field.val("");
783
+ }
784
+ $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
785
+ this.results_show();
786
+ } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
787
+ evt.preventDefault();
788
+ this.results_toggle();
789
+ }
790
+ return this.activate_field();
791
+ }
792
+ }
793
+ };
794
+
795
+ Chosen.prototype.container_mouseup = function(evt) {
796
+ if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
797
+ return this.results_reset(evt);
798
+ }
799
+ };
800
+
801
+ Chosen.prototype.search_results_mousewheel = function(evt) {
802
+ var delta;
803
+ if (evt.originalEvent) {
804
+ delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
805
+ }
806
+ if (delta != null) {
807
+ evt.preventDefault();
808
+ if (evt.type === 'DOMMouseScroll') {
809
+ delta = delta * 40;
810
+ }
811
+ return this.search_results.scrollTop(delta + this.search_results.scrollTop());
812
+ }
813
+ };
814
+
815
+ Chosen.prototype.blur_test = function(evt) {
816
+ if (!this.active_field && this.container.hasClass("chosen-container-active")) {
817
+ return this.close_field();
818
+ }
819
+ };
820
+
821
+ Chosen.prototype.close_field = function() {
822
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
823
+ this.active_field = false;
824
+ this.results_hide();
825
+ this.container.removeClass("chosen-container-active");
826
+ this.clear_backstroke();
827
+ this.show_search_field_default();
828
+ return this.search_field_scale();
829
+ };
830
+
831
+ Chosen.prototype.activate_field = function() {
832
+ this.container.addClass("chosen-container-active");
833
+ this.active_field = true;
834
+ this.search_field.val(this.search_field.val());
835
+ return this.search_field.focus();
836
+ };
837
+
838
+ Chosen.prototype.test_active_click = function(evt) {
839
+ var active_container;
840
+ active_container = $(evt.target).closest('.chosen-container');
841
+ if (active_container.length && this.container[0] === active_container[0]) {
842
+ return this.active_field = true;
843
+ } else {
844
+ return this.close_field();
845
+ }
846
+ };
847
+
848
+ Chosen.prototype.results_build = function() {
849
+ this.parsing = true;
850
+ this.selected_option_count = null;
851
+ this.results_data = SelectParser.select_to_array(this.form_field);
852
+ if (this.is_multiple) {
853
+ this.search_choices.find("li.search-choice").remove();
854
+ } else if (!this.is_multiple) {
855
+ this.single_set_selected_text();
856
+ if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
857
+ this.search_field[0].readOnly = true;
858
+ this.container.addClass("chosen-container-single-nosearch");
859
+ } else {
860
+ this.search_field[0].readOnly = false;
861
+ this.container.removeClass("chosen-container-single-nosearch");
862
+ }
863
+ }
864
+ this.update_results_content(this.results_option_build({
865
+ first: true
866
+ }));
867
+ this.search_field_disabled();
868
+ this.show_search_field_default();
869
+ this.search_field_scale();
870
+ return this.parsing = false;
871
+ };
872
+
873
+ Chosen.prototype.result_do_highlight = function(el) {
874
+ var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
875
+ if (el.length) {
876
+ this.result_clear_highlight();
877
+ this.result_highlight = el;
878
+ this.result_highlight.addClass("highlighted");
879
+ maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
880
+ visible_top = this.search_results.scrollTop();
881
+ visible_bottom = maxHeight + visible_top;
882
+ high_top = this.result_highlight.position().top + this.search_results.scrollTop();
883
+ high_bottom = high_top + this.result_highlight.outerHeight();
884
+ if (high_bottom >= visible_bottom) {
885
+ return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
886
+ } else if (high_top < visible_top) {
887
+ return this.search_results.scrollTop(high_top);
888
+ }
889
+ }
890
+ };
891
+
892
+ Chosen.prototype.result_clear_highlight = function() {
893
+ if (this.result_highlight) {
894
+ this.result_highlight.removeClass("highlighted");
895
+ }
896
+ return this.result_highlight = null;
897
+ };
898
+
899
+ Chosen.prototype.results_show = function() {
900
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
901
+ this.form_field_jq.trigger("chosen:maxselected", {
902
+ chosen: this
903
+ });
904
+ return false;
905
+ }
906
+ this.container.addClass("chosen-with-drop");
907
+ this.results_showing = true;
908
+ this.search_field.focus();
909
+ this.search_field.val(this.search_field.val());
910
+ this.winnow_results();
911
+ return this.form_field_jq.trigger("chosen:showing_dropdown", {
912
+ chosen: this
913
+ });
914
+ };
915
+
916
+ Chosen.prototype.update_results_content = function(content) {
917
+ return this.search_results.html(content);
918
+ };
919
+
920
+ Chosen.prototype.results_hide = function() {
921
+ if (this.results_showing) {
922
+ this.result_clear_highlight();
923
+ this.container.removeClass("chosen-with-drop");
924
+ this.form_field_jq.trigger("chosen:hiding_dropdown", {
925
+ chosen: this
926
+ });
927
+ }
928
+ return this.results_showing = false;
929
+ };
930
+
931
+ Chosen.prototype.set_tab_index = function(el) {
932
+ var ti;
933
+ if (this.form_field.tabIndex) {
934
+ ti = this.form_field.tabIndex;
935
+ this.form_field.tabIndex = -1;
936
+ return this.search_field[0].tabIndex = ti;
937
+ }
938
+ };
939
+
940
+ Chosen.prototype.set_label_behavior = function() {
941
+ var _this = this;
942
+ this.form_field_label = this.form_field_jq.parents("label");
943
+ if (!this.form_field_label.length && this.form_field.id.length) {
944
+ this.form_field_label = $("label[for='" + this.form_field.id + "']");
945
+ }
946
+ if (this.form_field_label.length > 0) {
947
+ return this.form_field_label.bind('click.chosen', function(evt) {
948
+ if (_this.is_multiple) {
949
+ return _this.container_mousedown(evt);
950
+ } else {
951
+ return _this.activate_field();
952
+ }
953
+ });
954
+ }
955
+ };
956
+
957
+ Chosen.prototype.show_search_field_default = function() {
958
+ if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
959
+ this.search_field.val(this.default_text);
960
+ return this.search_field.addClass("default");
961
+ } else {
962
+ this.search_field.val("");
963
+ return this.search_field.removeClass("default");
964
+ }
965
+ };
966
+
967
+ Chosen.prototype.search_results_mouseup = function(evt) {
968
+ var target;
969
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
970
+ if (target.length) {
971
+ this.result_highlight = target;
972
+ this.result_select(evt);
973
+ return this.search_field.focus();
974
+ }
975
+ };
976
+
977
+ Chosen.prototype.search_results_mouseover = function(evt) {
978
+ var target;
979
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
980
+ if (target) {
981
+ return this.result_do_highlight(target);
982
+ }
983
+ };
984
+
985
+ Chosen.prototype.search_results_mouseout = function(evt) {
986
+ if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
987
+ return this.result_clear_highlight();
988
+ }
989
+ };
990
+
991
+ Chosen.prototype.choice_build = function(item) {
992
+ var choice, close_link,
993
+ _this = this;
994
+ choice = $('<li />', {
995
+ "class": "search-choice"
996
+ }).html("<span>" + (this.choice_label(item)) + "</span>");
997
+ if (item.disabled) {
998
+ choice.addClass('search-choice-disabled');
999
+ } else {
1000
+ close_link = $('<a />', {
1001
+ "class": 'search-choice-close',
1002
+ 'data-option-array-index': item.array_index
1003
+ });
1004
+ close_link.bind('click.chosen', function(evt) {
1005
+ return _this.choice_destroy_link_click(evt);
1006
+ });
1007
+ choice.append(close_link);
1008
+ }
1009
+ return this.search_container.before(choice);
1010
+ };
1011
+
1012
+ Chosen.prototype.choice_destroy_link_click = function(evt) {
1013
+ evt.preventDefault();
1014
+ evt.stopPropagation();
1015
+ if (!this.is_disabled) {
1016
+ return this.choice_destroy($(evt.target));
1017
+ }
1018
+ };
1019
+
1020
+ Chosen.prototype.choice_destroy = function(link) {
1021
+ if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1022
+ this.show_search_field_default();
1023
+ if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
1024
+ this.results_hide();
1025
+ }
1026
+ link.parents('li').first().remove();
1027
+ return this.search_field_scale();
1028
+ }
1029
+ };
1030
+
1031
+ Chosen.prototype.results_reset = function() {
1032
+ this.reset_single_select_options();
1033
+ this.form_field.options[0].selected = true;
1034
+ this.single_set_selected_text();
1035
+ this.show_search_field_default();
1036
+ this.results_reset_cleanup();
1037
+ this.form_field_jq.trigger("change");
1038
+ if (this.active_field) {
1039
+ return this.results_hide();
1040
+ }
1041
+ };
1042
+
1043
+ Chosen.prototype.results_reset_cleanup = function() {
1044
+ this.current_selectedIndex = this.form_field.selectedIndex;
1045
+ return this.selected_item.find("abbr").remove();
1046
+ };
1047
+
1048
+ Chosen.prototype.result_select = function(evt) {
1049
+ var high, item;
1050
+ if (this.result_highlight) {
1051
+ high = this.result_highlight;
1052
+ this.result_clear_highlight();
1053
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1054
+ this.form_field_jq.trigger("chosen:maxselected", {
1055
+ chosen: this
1056
+ });
1057
+ return false;
1058
+ }
1059
+ if (this.is_multiple) {
1060
+ high.removeClass("active-result");
1061
+ } else {
1062
+ this.reset_single_select_options();
1063
+ }
1064
+ high.addClass("result-selected");
1065
+ item = this.results_data[high[0].getAttribute("data-option-array-index")];
1066
+ item.selected = true;
1067
+ this.form_field.options[item.options_index].selected = true;
1068
+ this.selected_option_count = null;
1069
+ if (this.is_multiple) {
1070
+ this.choice_build(item);
1071
+ } else {
1072
+ this.single_set_selected_text(this.choice_label(item));
1073
+ }
1074
+ if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1075
+ this.results_hide();
1076
+ }
1077
+ this.show_search_field_default();
1078
+ if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1079
+ this.form_field_jq.trigger("change", {
1080
+ 'selected': this.form_field.options[item.options_index].value
1081
+ });
1082
+ }
1083
+ this.current_selectedIndex = this.form_field.selectedIndex;
1084
+ evt.preventDefault();
1085
+ return this.search_field_scale();
1086
+ }
1087
+ };
1088
+
1089
+ Chosen.prototype.single_set_selected_text = function(text) {
1090
+ if (text == null) {
1091
+ text = this.default_text;
1092
+ }
1093
+ if (text === this.default_text) {
1094
+ this.selected_item.addClass("chosen-default");
1095
+ } else {
1096
+ this.single_deselect_control_build();
1097
+ this.selected_item.removeClass("chosen-default");
1098
+ }
1099
+ return this.selected_item.find("span").html(text);
1100
+ };
1101
+
1102
+ Chosen.prototype.result_deselect = function(pos) {
1103
+ var result_data;
1104
+ result_data = this.results_data[pos];
1105
+ if (!this.form_field.options[result_data.options_index].disabled) {
1106
+ result_data.selected = false;
1107
+ this.form_field.options[result_data.options_index].selected = false;
1108
+ this.selected_option_count = null;
1109
+ this.result_clear_highlight();
1110
+ if (this.results_showing) {
1111
+ this.winnow_results();
1112
+ }
1113
+ this.form_field_jq.trigger("change", {
1114
+ deselected: this.form_field.options[result_data.options_index].value
1115
+ });
1116
+ this.search_field_scale();
1117
+ return true;
1118
+ } else {
1119
+ return false;
1120
+ }
1121
+ };
1122
+
1123
+ Chosen.prototype.single_deselect_control_build = function() {
1124
+ if (!this.allow_single_deselect) {
1125
+ return;
1126
+ }
1127
+ if (!this.selected_item.find("abbr").length) {
1128
+ this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1129
+ }
1130
+ return this.selected_item.addClass("chosen-single-with-deselect");
1131
+ };
1132
+
1133
+ Chosen.prototype.get_search_text = function() {
1134
+ return $('<div/>').text($.trim(this.search_field.val())).html();
1135
+ };
1136
+
1137
+ Chosen.prototype.winnow_results_set_highlight = function() {
1138
+ var do_high, selected_results;
1139
+ selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1140
+ do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1141
+ if (do_high != null) {
1142
+ return this.result_do_highlight(do_high);
1143
+ }
1144
+ };
1145
+
1146
+ Chosen.prototype.no_results = function(terms) {
1147
+ var no_results_html;
1148
+ no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1149
+ no_results_html.find("span").first().html(terms);
1150
+ this.search_results.append(no_results_html);
1151
+ return this.form_field_jq.trigger("chosen:no_results", {
1152
+ chosen: this
1153
+ });
1154
+ };
1155
+
1156
+ Chosen.prototype.no_results_clear = function() {
1157
+ return this.search_results.find(".no-results").remove();
1158
+ };
1159
+
1160
+ Chosen.prototype.keydown_arrow = function() {
1161
+ var next_sib;
1162
+ if (this.results_showing && this.result_highlight) {
1163
+ next_sib = this.result_highlight.nextAll("li.active-result").first();
1164
+ if (next_sib) {
1165
+ return this.result_do_highlight(next_sib);
1166
+ }
1167
+ } else {
1168
+ return this.results_show();
1169
+ }
1170
+ };
1171
+
1172
+ Chosen.prototype.keyup_arrow = function() {
1173
+ var prev_sibs;
1174
+ if (!this.results_showing && !this.is_multiple) {
1175
+ return this.results_show();
1176
+ } else if (this.result_highlight) {
1177
+ prev_sibs = this.result_highlight.prevAll("li.active-result");
1178
+ if (prev_sibs.length) {
1179
+ return this.result_do_highlight(prev_sibs.first());
1180
+ } else {
1181
+ if (this.choices_count() > 0) {
1182
+ this.results_hide();
1183
+ }
1184
+ return this.result_clear_highlight();
1185
+ }
1186
+ }
1187
+ };
1188
+
1189
+ Chosen.prototype.keydown_backstroke = function() {
1190
+ var next_available_destroy;
1191
+ if (this.pending_backstroke) {
1192
+ this.choice_destroy(this.pending_backstroke.find("a").first());
1193
+ return this.clear_backstroke();
1194
+ } else {
1195
+ next_available_destroy = this.search_container.siblings("li.search-choice").last();
1196
+ if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1197
+ this.pending_backstroke = next_available_destroy;
1198
+ if (this.single_backstroke_delete) {
1199
+ return this.keydown_backstroke();
1200
+ } else {
1201
+ return this.pending_backstroke.addClass("search-choice-focus");
1202
+ }
1203
+ }
1204
+ }
1205
+ };
1206
+
1207
+ Chosen.prototype.clear_backstroke = function() {
1208
+ if (this.pending_backstroke) {
1209
+ this.pending_backstroke.removeClass("search-choice-focus");
1210
+ }
1211
+ return this.pending_backstroke = null;
1212
+ };
1213
+
1214
+ Chosen.prototype.keydown_checker = function(evt) {
1215
+ var stroke, _ref1;
1216
+ stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1217
+ this.search_field_scale();
1218
+ if (stroke !== 8 && this.pending_backstroke) {
1219
+ this.clear_backstroke();
1220
+ }
1221
+ switch (stroke) {
1222
+ case 8:
1223
+ this.backstroke_length = this.search_field.val().length;
1224
+ break;
1225
+ case 9:
1226
+ if (this.results_showing && !this.is_multiple) {
1227
+ this.result_select(evt);
1228
+ }
1229
+ this.mouse_on_container = false;
1230
+ break;
1231
+ case 13:
1232
+ if (this.results_showing) {
1233
+ evt.preventDefault();
1234
+ }
1235
+ break;
1236
+ case 32:
1237
+ if (this.disable_search) {
1238
+ evt.preventDefault();
1239
+ }
1240
+ break;
1241
+ case 38:
1242
+ evt.preventDefault();
1243
+ this.keyup_arrow();
1244
+ break;
1245
+ case 40:
1246
+ evt.preventDefault();
1247
+ this.keydown_arrow();
1248
+ break;
1249
+ }
1250
+ };
1251
+
1252
+ Chosen.prototype.search_field_scale = function() {
1253
+ var div, f_width, h, style, style_block, styles, w, _i, _len;
1254
+ if (this.is_multiple) {
1255
+ h = 0;
1256
+ w = 0;
1257
+ style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1258
+ styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1259
+ for (_i = 0, _len = styles.length; _i < _len; _i++) {
1260
+ style = styles[_i];
1261
+ style_block += style + ":" + this.search_field.css(style) + ";";
1262
+ }
1263
+ div = $('<div />', {
1264
+ 'style': style_block
1265
+ });
1266
+ div.text(this.search_field.val());
1267
+ $('body').append(div);
1268
+ w = div.width() + 25;
1269
+ div.remove();
1270
+ f_width = this.container.outerWidth();
1271
+ if (w > f_width - 10) {
1272
+ w = f_width - 10;
1273
+ }
1274
+ return this.search_field.css({
1275
+ 'width': w + 'px'
1276
+ });
1277
+ }
1278
+ };
1279
+
1280
+ return Chosen;
1281
+
1282
+ })(AbstractChosen);
1283
+
1284
+ }).call(this);
assets/js/chosen.jquery.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /* Chosen v1.5.1 | (c) 2011-2016 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
  (function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&amp;"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},AbstractChosen.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(a){var b=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return b.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(a){var b=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return b.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f,g,h;for(b="",e=0,h=this.results_data,f=0,g=h.length;g>f&&(c=h[f],d="",d=c.group?this.result_add_group(c):this.result_add_option(c),""!==d&&(e++,b+=d),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c))),!(e>=this.max_shown_results));f++);return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match&&this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.result_add_group=function(a){var b,c;return(a.search_match||a.group_match)&&a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+"</em>"+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+"<em>"+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(a){var b=this;return setTimeout(function(){return b.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(c){var d,e;return d=a(this),e=d.data("chosen"),"destroy"===b?void(e instanceof Chosen&&e.destroy()):void(e instanceof Chosen||d.data("chosen",new Chosen(this,b)))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(a){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(a){var b;return this.form_field.tabIndex?(b=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=b):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}).call(this);
1
+ /* Chosen v1.5.1 | (c) 2011-2016 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
  (function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&amp;"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},AbstractChosen.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(a){var b=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return b.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(a){var b=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return b.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f,g,h;for(b="",e=0,h=this.results_data,f=0,g=h.length;g>f&&(c=h[f],d="",d=c.group?this.result_add_group(c):this.result_add_option(c),""!==d&&(e++,b+=d),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c))),!(e>=this.max_shown_results));f++);return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match&&this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.result_add_group=function(a){var b,c;return(a.search_match||a.group_match)&&a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+"</em>"+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+"<em>"+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(a){var b=this;return setTimeout(function(){return b.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(c){var d,e;return d=a(this),e=d.data("chosen"),"destroy"===b?void(e instanceof Chosen&&e.destroy()):void(e instanceof Chosen||d.data("chosen",new Chosen(this,b)))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(a){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(a){var b;return this.form_field.tabIndex?(b=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=b):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}).call(this);
includes/admin/admin-notices.php CHANGED
@@ -444,12 +444,12 @@ function mashsb_show_update_notice_gdpr() {
444
 
445
 
446
  $message = sprintf(__( '<h2 style="color:white;">MashShare GDPR Compliance</h2>'
447
- . 'MashShare share count should be disabled due to european GDPR requirements. <br>If you still like to enable share count beside share buttons go to <a href="'.admin_url().'admin.php?page=mashsb-settings" style="color:white;">MashShare > Settings > Disable Sharecount</a><br><br>Enabling the share count aggregation is not GDPR compliant and is not recommended if your website must be GDPR conform.'
448
  , 'mashsb' ),
449
  admin_url() . 'admin.php?page=mashsb-settings'
450
  );
451
 
452
- if( get_option( 'mashsb_show_update_notice_gdpr' ) === 'no' ) {
453
  return false;
454
  }
455
 
@@ -469,6 +469,6 @@ function mashsb_show_update_notice_gdpr() {
469
  function mashsb_hide_gdpr_notice(){
470
  global $mashsb_options;
471
  // Get all settings
472
- update_option( 'mashsb_show_update_notice_gdpr', 'no' );
473
  }
474
  add_action ('mashsb_hide_gdpr_notice', 'mashsb_hide_gdpr_notice');
444
 
445
 
446
  $message = sprintf(__( '<h2 style="color:white;">MashShare GDPR Compliance</h2>'
447
+ . 'MashShare uses new sharedcount.com integration to be GDPR compliant. <br>Register for sharedcount.com at <a href="'.admin_url().'admin.php?page=mashsb-settings" style="color:white;">MashShare > Settings > Share Count</a><br><br>For collecting Twitter shares get the <a href="https://mashshare.net/downloads/mashshare-social-networks-addon/?utm_source=wp-admin&utm_medium=gdpr-notice&utm_campaign=gdpr-notice" target="_blank">Social Network Add-On</a>'
448
  , 'mashsb' ),
449
  admin_url() . 'admin.php?page=mashsb-settings'
450
  );
451
 
452
+ if( get_option( 'mashsb_show_update_notice_gdpr1' ) === 'no' ) {
453
  return false;
454
  }
455
 
469
  function mashsb_hide_gdpr_notice(){
470
  global $mashsb_options;
471
  // Get all settings
472
+ update_option( 'mashsb_show_update_notice_gdpr1', 'no' );
473
  }
474
  add_action ('mashsb_hide_gdpr_notice', 'mashsb_hide_gdpr_notice');
includes/admin/meta-box/css/autocomplete.css CHANGED
@@ -1,14 +1,14 @@
1
- .mashsb-rwmb-autocomplete-result {
2
- border-bottom: 1px solid #ccc;
3
- padding: 1em 0;
4
- overflow: hidden;
5
- }
6
- .mashsb-rwmb-autocomplete-result .label {
7
- float: left;
8
- width: 90%;
9
- }
10
- .mashsb-rwmb-autocomplete-result .actions {
11
- width: 10%;
12
- float: right;
13
- cursor: pointer;
14
  }
1
+ .mashsb-rwmb-autocomplete-result {
2
+ border-bottom: 1px solid #ccc;
3
+ padding: 1em 0;
4
+ overflow: hidden;
5
+ }
6
+ .mashsb-rwmb-autocomplete-result .label {
7
+ float: left;
8
+ width: 90%;
9
+ }
10
+ .mashsb-rwmb-autocomplete-result .actions {
11
+ width: 10%;
12
+ float: right;
13
+ cursor: pointer;
14
  }
includes/admin/meta-box/css/checkbox.css CHANGED
@@ -1,4 +1,4 @@
1
- .mashsb-rwmb-checkbox-wrapper .description {
2
- display: inline;
3
- font-style: normal;
4
- }
1
+ .mashsb-rwmb-checkbox-wrapper .description {
2
+ display: inline;
3
+ font-style: normal;
4
+ }
includes/admin/meta-box/css/color.css CHANGED
@@ -1,7 +1,7 @@
1
- .mashsb-rwmb-color-wrapper .wp-picker-container {
2
- position: relative;
3
- }
4
- .mashsb-rwmb-color-wrapper .wp-picker-holder {
5
- position: absolute;
6
- z-index: 9;
7
- }
1
+ .mashsb-rwmb-color-wrapper .wp-picker-container {
2
+ position: relative;
3
+ }
4
+ .mashsb-rwmb-color-wrapper .wp-picker-holder {
5
+ position: absolute;
6
+ z-index: 9;
7
+ }
includes/admin/meta-box/css/datepicker.css CHANGED
@@ -1,231 +1,231 @@
1
- /* Fix empty block below admin footer (issue #24) */
2
- #ui-datepicker-div {
3
- display: none;
4
- z-index: 9 !important;
5
- }
6
-
7
- /* Style for multiple months */
8
- .ui-datepicker-multi .ui-datepicker-group {
9
- padding: 0 .5%;
10
- box-sizing: border-box;
11
- }
12
- .ui-datepicker-multi .ui-datepicker-group .ui-datepicker-calendar {
13
- width: 100%;
14
- }
15
-
16
- /* Date Picker Default Styles */
17
- .ui-datepicker {
18
- padding: 0;
19
- border: 1px solid #ddd;
20
- -webkit-border-radius: 0;
21
- -moz-border-radius: 0;
22
- border-radius: 0;
23
- }
24
- .ui-datepicker * {
25
- padding: 0;
26
- font-family: "Open Sans", sans-serif;
27
- -webkit-border-radius: 0;
28
- -moz-border-radius: 0;
29
- border-radius: 0;
30
- }
31
- .ui-datepicker table {
32
- font-size: 13px;
33
- margin: 0;
34
- }
35
- .ui-datepicker .ui-datepicker-header,
36
- .ui-timepicker-div .ui-widget-header{
37
- border: none;
38
- background: #23282d;
39
- color: #fff;
40
- font-weight: normal;
41
- }
42
- .ui-datepicker .ui-datepicker-header .ui-state-hover {
43
- background: #23282d;
44
- border-color: transparent;
45
- cursor: pointer;
46
- -webkit-border-radius: 0;
47
- -moz-border-radius: 0;
48
- border-radius: 0;
49
- }
50
- .ui-datepicker thead {
51
- background: #23282d;
52
- color: #fff;
53
- }
54
- .ui-datepicker .ui-datepicker-title {
55
- margin-top: .4em;
56
- margin-bottom: .3em;
57
- color: #fff;
58
- font-size: 14px;
59
- }
60
- .ui-datepicker .ui-datepicker-prev-hover,
61
- .ui-datepicker .ui-datepicker-next-hover,
62
- .ui-datepicker .ui-datepicker-next,
63
- .ui-datepicker .ui-datepicker-prev {
64
- height: 1em;
65
- top: .9em;
66
- border: none;
67
- }
68
- .ui-datepicker .ui-datepicker-prev-hover {
69
- left: 2px;
70
- }
71
- .ui-datepicker .ui-datepicker-next-hover {
72
- right: 2px;
73
- }
74
- .ui-datepicker .ui-datepicker-next span,
75
- .ui-datepicker .ui-datepicker-prev span {
76
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAQAAABFnnJAAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAAEgAAABIAEbJaz4AABe4SURBVHja7V1diCXHdf56vbZmVl6nxwKFO2yyq1mM4qAwM7oDsR6C7iYIKesH3V1QHgyBu5YYJwHjrB9NQCuByIthHbAga6TZxeBgHMJKISZ+SDIb1oQgRtoVgtjGyD8PmSGQMIpfJmCLk4f+q6o+daq6+965P1VfM3Pv7VN16ud8Vd1dp6o6IUSEjBPTzkDEdBEJEDgiAXT0QOhNOxPHiUgAFT3sA9gPiQLjJsD0208Pbe9rM/OvwkaBQvP0yzhG6ASQO0AqDwmu9mOPT3nqPWsYV9qFEduVIDP/QU4BSfMC9REqAcbRAa520FDELdphc3SJCyRIcADgAAkSQXOXMs4ckrIxFEUs2oENBNSqR0WmJ2kVv2hltvRdaVPHvPtqdpVxjlD1AHIH6AupDbovH1nqkgllLd3apnQJUjV362dmDEnjOya5FUltsEqqbdtxa5Dbppx3uQ+sNLv6mblCcwLIoKlXTQ/7rQkmX4IKzdMv4xgxbgLMO3rYXyTzuhEJEDjiSGDgiAQIHJEAgSMSIHBEAgSOSIDAEQkQOOJ8ADPutPN/zGgyH8BvRoDLGdMT5wPIKbjN02U+gNsdnuV9oUjSbD6AnwdMrkK7gVYt3311u8zv0r5vfNq1L8xsgPp8gAz20fAilORvs8tdsX3mA0i5k1N3x5dBue7icyGgzwfgvus48OoF+DDu9ukzH0Bqf355s9OHnLMNmqQ0F2jjDJIcrrM+H0Ail6v/KUoe3cECpl85XecDTDv/x4zoDg4ccSAocEQCBI5IgMARCRA4IgECRyRA4IgECBwnp52BmQNNcZS/+1hp4/yf7BZ9IpUwzRyQMwftXUHumFMouX4JIED09fvsD0AtJE3RNg1X/jPTJ6IWNznaxvYrgU+oBnFPaAFcxU88CmCPn3hUkE8RSHD2+OQvEWT6Z7M0Com7BuQSygQiR2zA1Yi1/KuXAN/i22bruCspGUMHT6In0nUV7ZIDKmMnrFRNnUulaF72PJAgl3VXpZObgZrLBGh6E0gerccVyoed7dq4n3ETD+2SgXz0tq0BqQn66HbXQU3e5DGw6uJ8QvEyuQt0M1jW4epi/bpoVwtype5zE9kWboq75VoOTHdw6E8B851+i8fIOB8gcMSRwMARCRA4IgECRyRA4IgECByRAIEjEiBw6ItDi81Spwf3fuCThE8N+HhE28VzrY32TaURKgIUC6N8tntvVwHjQztdrpz71YC01Wzljes1jp35KYvDXoZe6xogI5cA+MWh8hJOH492jzk3PgrYdPltDWHPv18N2NLoGctre41iVyVw9UDdlqbXFujqQ8E+26m7lmDbFoj6zaRx58Cmx72FuzvnfhvS8z63umkTQ+5aWF4Zh1ufSJpm2WFsc1gn9TBNCeBfAUmDuH45kKvQJ3332n57+q7YLgK460A2oJsAMoEsBGj2FFBVQBuPVaLo4LWT9iml3wZVvtveQ0ipr+bS4grO7yAgpV/E5O8BXJqrvRuk9c1mLhvOB5AqQL+BkYovZ04qoqRDLZp72hdnAjcBpRIcGBtIHDTW4AfJvAfla2/8commlwA/XzU5t4iQr4JdYvtVL18Ov2tw9yltkp72L7Vx3wOwiPMBVPScb0xaOEQCBI44FBw4IgECRyRA4IgECByRAIEjEmDcmLPHKnM+gAuSv8qn6L2O/u5Jo3vuEsdg94yVvT4fQILkMfcZJSw8dqseC0zt6Lq4Sl4enjiXv7oNbIsvaZ8SqoEgNVvu3X7rg43q0sh2b//2HWgGJI+dK3ZiDaeetXk7pcWj5CX1L+mxgL8HsE06kP1V1aWhzaSFrOW4p03Z9zAg+Pr6kgZnuXS59N0rm2cS5vsCqips+gZu8xKSNIhbSP2WQLsXb7ffQkIyo6uH8Ncs7RFwzKh6ANVR2CZrrjcJuJ2tXa+OidKD8D2E/smFGE8r5lLQe48ZMb9+CTgoM8V14FkHn0334nEgzgfw8fa7t4eQUc0F4KdUyFVfXYTsu4sUIZOGUjVE2wk1EwHvDSRrB+7jLLXdBI7D2eo3a7HtjabPTSQAB0Fnxrg+iO5gHTPTNR8XIgECRxwKDhyRAIEjEiBwRAIEjkiAwDF7BEhny1u26DAJ4OfLllw25CW1hUhxeCxP4tPeB2Fm0Gy7eJ/tpBOsdMjPIQqSpGK4tlvWV1igN4B3gU4AeZRaHu0uWnWKQ5YCVA6U8mv3sq5/pQxxaIlffGu3qbra+/i9an7BURFA3+69jsofbtsyPUGSm/8DNi25a8+6/g+wIqydLVLn09dnFJha/LaPCA7FULDf6nYJxVwbm/nNuThmL+L6LZ2tS8xw5vYR0lvOg4I6JSxB3Uwm7FMZ/CZE2CeVmQSyTcngc+jaPkEn+IK9Ar4LqhdGqFVm32DE/dYL39dK2OQZBah2H1E4gvld+fX8+Lw2IgIAtz+A38r1ul/evUONJM1uHuUQurbE61wB9w5CgcL/hRH6rNjq+7hhv4voBv/tI4LCrM0HmJT5IyyYNQJEHDNmzxcQcayIBAgckQCBIxIgcCwSAfqlJ6A/Ef0nsZQfzd63OtPICDDMK24Xw9aaXnZ4+l0g3NBmCzQ1Yh975fc9Nna/Ez1O4ld4FEc4wqP4FUuBvjP3a7l0zZKGXe6KCTxnHHIKxtwOoqs0oAENSUUVtjo/JFgOKj+3tbhqCF57doyor8lHmrRPJvqN5HoOudytGfHXDPkSrRPREi0R0TotCTXAp1GHVEP+EjXEtncZyxAFk+8BAO5YJnPcxpdxD0CK2+W5O7hgZeMXLCOKy+W3o5rsJr4htL89ZBtLZNgHYU9LYQ9bSg8AbBlyN95Xcpfl0Ix/H8t4EEAf942wej6BLUbim5suL5+XsYb3y++lpoIA9/NPdRqGmuV7AH6EI3G2z1L+ecMa4qNC7Ct4D9uC/JLmSr6kUDHD2woFtvC2ISWoizP5FYYfxS/K759g8/AgPoEEp4RcXhRkpkeSl/MvoE4YLc0IXpj/D/DP6unqWnboUPAjHNXC6FnICLAiaLO1G8DVAwBvlRQgXMJbTIiCAnXzZ0iNz3rufl3M6Qb+G38I4B+xwcZ/GygpxOdgK++p9N7qOFCY/4+wrFPA936WM3+9AgG5o8razk9ZmasHKCgAi/mRpw7rTd5549PEEn6efzvLSB/Eu9jAfQAbeBcP4f8MuTkLqe0yU3dH7wrxOfxN7Vxm/i/gQQD/AADFBdz/MbBufrOAp3AKp7CMU9ZO8gE8gAcAcC3spsP8QA9v4RIu4S3LdM4+DjDEEAct7/OX8Vv5sVzLXw9nQPgFNrCBEyCcEaeUblmMf075s2EJLrhCfIs5l5H+Bj6G7wAALuBOJmj/RFsv4rIzzg+FkK4eoIcDIG/7B0z19zU5R4HfMD7NKspayQayOyK9n3gY9wH8pPx9HxvCjKIuHfxRxxD8hNmf5OXL7s9K86N8DEwdj1HuR5iXNfnL1scV+2PMjQk+BhYPSdWnLRd95hGQe4hzPeg1fQwGjayl9wmhlpDXXzwEDtSzs+MO7gP4HeX3e5YbqcmCAJxXWvr4tWeYztSUNbyvtX7E+QDBY5F8AREtEAkQOCIBAkckQOCIBFgsvIJXmkXQCZCC4FqYbQeVjoyujxZ9cB71LeXxte5vGxqPvUNDvm3IuUEn1Vu+NgE5APylo34GGLSut9P4Cr6C045QI4wwKn8pdZISUZ/6RJTWBhF2aSkfRrhG6zRkh0Fu5AMR23TDkMuebPPos+G3FE82EdEWOxBSHPX47oGcLMw6rdP6hORFmGxQx5QMqBiQS83hmtw6RNuEvHQpo/suERHdFWu3GEwa0TkCQU+gn4+h1dUT9RqNg3FyENGf5X9XrRXUp2wCSt+iH5YUXAYmAv07ge4R6N+InzJBtJ5L1gU5RPlpWqLTFnlR/SMaNa7BAtusfLsWe5tNf0hEI0qrkUTVHVw4Kfew1WqjFnWuAO85fAL7+DF+gJ/jPYtPsI89XMIbVpduF/wTfhffwwa+hyfwL9ZQ2Vj6hijXxyx1/LLmJ6wwwk0AyP/X6+9Q+8WDn21x1uMMAHwJwEp+eUzxAcoe4IYxmt6nG417ALWDs/UAV4noL4joFbaF9InY1j+uHuBvCfRdAn2Llpj0H3X0AIUcotzeA4y03JmXgIGS6wyDRuX7qib7KlOD5+hcPXUziX5OhHr1j4MAn6HfpM/R+fyvifn1WXE2AqRElFKaXy9N+XeI6Nv539/V5EX5bNfwSv64Q87Hr6692XG+IQFMd10q1JDsatLOmwrUT122RENCyaEBE0ImQN1f18T8ZvFkAvDys/Rdeph26WH6e/q0IV+t5W5trPLK/LAeuolTUW6T3s1vBE35iIpr/25bAsBxUJ6N1DM8b+C+Vb5lVDD3FJCWRecJYidghsccuesih8P8Pi73ggIpI3uKPsxv/LbpQ3qKIcBVGtXj+ibvNqh+H8rfg0qTlmXzmxTYqkld07plORFRz2GcLvKR0/yux8CKAqkl9nPl9+dqsa09kK87eB3v+gWM6IgBoHvsx4QRAOCWeTrOBwgc0RcQOCIBAkckQOCIBAgc4REgcxsPGMmgfDZ61EOPbTfFOburVgmwXlbAemt9NLUqSEHYyb/vwDar4Vq+qHS3RoHfxy4u4zI+hU/hh/h0LWZWO1fzX9mepeq+55v4LAhP4AkQPovNWnx5+4ph7cF+6JC7QgxraRgjQObZdSLapSEN6ZAqpwc34CENZpAzRPtjlOdrnR1UybBDoB1rLorhkHPsUNep8vgYOxa6Q8M8B5meAZO+fRyv8FKklmEw+UwVO7XoycYa+7k3B0z51BjrxXc1QDZKvENEh1YjTpMAxVgWn0Zh9uqzruGaONZ5gj5CCSX0ETrBGmRIIKJB6dPncicTQPWHmCuXMm9Iv6zjOgGgzaKoEyDTul2OyXIEOEOr+cEQYJhX4w4748dFAHJWgdu4cvx1Rcb1UDuKnDN/KuonSspjjUn9eh5rlx9SpWz3kOLgCWBPn8oZV7wGKn2cQwKdYwkAhQB8n7JOm7RZ+isZAuzkVcdP+XIxXA7RTMoTyOVTk1p/NeMpw8CQf5uI1vKD6DqjYVC6bLn0iU53IsBD+dmHyv9m7KL/GhLROUsPYK+/PhGdoTO0Smdok4iuZefV9wV8gBQ38fn8FknecR9OubSbuFvKpbBe7mOSrdE38U38cfn9+/g9TZYqM56AK/UxcazjS8qvl/EzIfWslszyrwD4EADwS2aDGcKKNs/KfMHFI9p5ws8MuT5f6Ca+bMzayrbwzybL7jHb+RMeB/BfAID/VGpX62APaUhD2qXZvAksWh+fxjfL1p/hrhG3n7f71Kp/s2w759jUd+gqUd4Odxh59vmQ5UbPnGhjtt/H6DHjv9x/NL8HGFKfNmmTNolos34JUK+xNvPP/lPAXSrmxnLVM3CksEPbtM1Op0IeO6MQRwESfpln12ohhrUOfGjEPFc7mt0DEA3Lw0IA31Y4LQLIR6q0+rtkes2z1uFTOlv+s57lkFIqbieTWtzP02eoJ9QSEZT7DF22lD8FZP/NbejqBDEpMhSlaum0MkZ3sIqH8BKAF/E/rHSEFdzM32aQ4n/xa9qbDVz3SIC+meUk5j23QCRA4AjPFxChIRIgcEQCBA6TAEPrfuEXcau8obwlbokaMU/QHhRuExHRbeYB5ou1h5AvTuVhLx5jPtQfz5TGfcYIdlF7eixwkVG4R0R71uR+6jkgA48Qx3/sKfTfm3puJkCA21T4nMw+4DWWAK8xCuWBoNowhNX8HEncy6tcIVxyor1yuGiPlfvlf46O6uszmoH1PsCGpgQAgV24WTd/vZ9Q19byBnSFGBHR07RET1s1+JVuQQmQXf8Lr7PeB+gFl6phm2zLwlTz7zKSQfnJXyZcxkFu+DQnAid/Ov/2tKBhT0hjgQkwIBOqAfwJwHfeuqZ7jEeuiGczvy8BUrL3MVSOsNf99RXsBOgT0R7t0R75+BXm5DArwPzelACuozBS3fyZ2W3mn4UeYIFvAqv2nyp+58oMX2cJ8HVGoasHsB1qD8THn/49gJuCc3hwRasX8ilW+hSj0FU5dqnU+nUDj1qH6PoUkIWZutHGT4A91sBqFTxfkz5vNeNASFCiR9ve43iPBSOAvzv4SQzx5/n3r+EN/Ou0xzCnhLbvAppRxPkAgSN6AwNHJEDgiAQIHJEAgSMSIHBEApgYgFpL5xAqAYjZNkEHYVyvhJgWbgjvNgeAAXZbS+cTxigd0a4wGqd6A0xJES+1ahjQbu4IGtCuoAGEfHmTLt/WNLVx1w4cg80Dj9hFDdi1zNXBV5/NhBIB1Hj1ah6UcQb5CntZg50Atvg+BJCksqOnLl2QIWFbIflpHS4CZCasfutSEErjuTTYCGCP7yZAUxPbpfwGDHN58DeBd3AB32hxPbmDC7iAbJ3cBWXMPFHOXhB3wi002OCKfzxYJG9AjeWLfA/gOgK8B1CdQYQ7eElsX5Szv/icL6hPLrbcZ/f57aRziegNNDHArmBiWTqHiAQIHHEkMHBEAgSOSIDAEQkQOCIBAodJAFJeLB4RACoCpPlWqWdx1rLXfjZ0dM0ijZhLFARIcVhuDvMIDlkjb+ACvoYXcejxQglzeGHbGIHcPmZ5hA15je0Q0V8RiOhFyvbFtY0ep+JewtWovOt3/1jl8bAchVGJ7hEI9CINCHSPbG+n3qFzlDllU6tSfqfapXw79dP5n7nT7WmSNlwv5CTKl8q/pdYOocCOkwCA8wDeBAC8BAB4Exs4X9vKdAObuIkreASXcIgruN6oq/mk0ukkqI9Afzz/S8Avvzqd/30S/ObyHwewkstXFmu8fpLIfAEpDnFfedHRPWxgRdsJt0CKQ9zBBezgClvJlO9UX9+t/re13/9h7JU7aXmEDXlXsEvVoukR8Zu4ZL7w7H0VtpfK2ObL6O8Wr883mrQ8Hpaj8AZm78O4jzfxLDbAv5Gjmg1wAWDcomrrX7A1tIuLyh28jmv5g+AbuBZfFh8K4nyAwBF9AYEjEiBwRAIEjkiAwFERwPU+gK7yJ3G9lF/Hk8cun3T5pi1vi1yn630AXeWubeYmLZ90+aYtb31kHxeJQ/U+gK5y10aTk5ZPunzTlnc4skvA5bJDSJQRvMvMNxWm/IU8boIXDPmzin4wZ5/l1FvkSYv4l9n4XPlc5Vfz3zz+20iUELb4klzNBW+VhsgGgqrRoKT2S5dzGSnkCYDnAbyunRmffp/4bv1qiKbxE/ALzKjBb1K01OV/AgD4a2v9FWc38Q7GskhNJYD+Lup6Blxy4AW8DuB5vCZWsK2C3PoTVpuvAdz6ZQJ0r5+kPN9O/jjeUcw/FgKc7K5CwYfK/+YgZ48gQ12O3kZDony2iU8ecV1usj8VZI/jnmb+sWDcl4ARgFtofwno3sXb81fX0K4Ll/T79SCuHsqW/uO4p5l/DD1AdhP4Kit7lfkmyZ8HcBM382+q/HUlFjFnX1ekLjlEOVi5nn+qnX1Vk7jkbeunKB+1lr+jmZ9PtSmCeAyb9mPopOWdxwEWfyBm2gNRk5Z3JgDoSbpeKr9OT9aCdpVfpFul/BYziDFp+aTLN215yyNOCAkc0RsYOCIBAkckQOCIBAgckQCBIxIgcKjOoLrTUcesyyNaQPcGLpffjtjQXeURM4f6JaCb6Y6cGrq13KSzhggNJgFcBjzCkShfxpHSD9ThMqA6JYoDtfT1R1hgEmAZEA24jGVRfoRlkSAEecJE7qGwIq47HjPql4DlFlr02LKGbu3XRaCIhtDfF6BJamFnXR7RAtEbGDjiQFDgiAQIHJEAgSMSIHBEAgSOSIDAMb8E6MUBoXFAJ0D3cTZCH4T+xPPdwz5WJ55KANAJsJr/TRuu1p2Z/2Da2VwE6ATYz/+mC1frjuYfI3x7AEKv9tcMzKokFpl57TQszB/vAcYCfUbQPhLss26WhPlrhi2vUIX5V0X5QbwHGBd0Akg9wGppmuKvWSe8VztTJ1FP0c9RTDd/vAiMAbPUA0TzTwG+PUB3uN/f0cz8PUu4iEbw7QGOA1Lvwpk/3gOMAfqEkB4O0JvJzpXyTt/8jOiIOCMocMyvLyBiLPh/gj9Qphd3t8gAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTMtMDItMDFUMDU6MzM6MTAtMDg6MDApYMCSAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDEzLTAyLTAxVDA1OjMzOjEwLTA4OjAwWD14LgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAASUVORK5CYII=');
77
- background-position: -32px 0;
78
- margin-top: 0;
79
- top: 0;
80
- font-weight: normal;
81
- }
82
- .ui-datepicker .ui-datepicker-prev span {
83
- background-position: -96px 0;
84
- }
85
- .ui-datepicker th {
86
- padding: 0.75em 0;
87
- color: #fff;
88
- font-weight: normal;
89
- border: none;
90
- border-top: 1px solid #32373c;
91
- }
92
- .ui-datepicker td {
93
- background: #f1f1f1;
94
- border: none;
95
- padding: 0;
96
- }
97
- .ui-datepicker td .ui-state-default {
98
- background: transparent;
99
- border: none;
100
- text-align: center;
101
- padding: .5em;
102
- margin: 0;
103
- font-weight: normal;
104
- color: #32373c;
105
- }
106
- .ui-datepicker td .ui-state-active,
107
- .ui-datepicker td .ui-state-hover {
108
- background: #0073aa;
109
- color: #fff;
110
- }
111
- .ui-datepicker td.ui-state-disabled,
112
- .ui-datepicker td.ui-state-disabled .ui-state-default {
113
- opacity: 1;
114
- color: #999;
115
- }
116
- /* Other Datepicker Color Schemes */
117
- /* Blue */
118
- .admin-color-blue .ui-datepicker .ui-datepicker-header,
119
- .admin-color-blue .ui-timepicker-div .ui-widget-header,
120
- .admin-color-blue .ui-datepicker .ui-datepicker-header .ui-state-hover,
121
- .admin-color-blue .ui-datepicker thead {
122
- background: #4796b3;
123
- }
124
- .admin-color-blue .ui-datepicker th {
125
- border-color: #52accc;
126
- }
127
- .admin-color-blue .ui-datepicker td .ui-state-active,
128
- .admin-color-blue .ui-datepicker td .ui-state-hover {
129
- background: #096484;
130
- }
131
- /* Coffee */
132
- .admin-color-coffee .ui-datepicker .ui-datepicker-header,
133
- .admin-color-cofee .ui-timepicker-div .ui-widget-header,
134
- .admin-color-coffee .ui-datepicker .ui-datepicker-header .ui-state-hover,
135
- .admin-color-coffee .ui-datepicker thead {
136
- background: #46403c;
137
- }
138
- .admin-color-coffee .ui-datepicker th {
139
- border-color: #59524c;
140
- }
141
- .admin-color-coffee .ui-datepicker td .ui-state-active,
142
- .admin-color-coffee .ui-datepicker td .ui-state-hover {
143
- background: #c7a589;
144
- }
145
- /* Ectoplasm */
146
- .admin-color-ectoplasm .ui-datepicker .ui-datepicker-header,
147
- .admin-color-ectoplasm .ui-timepicker-div .ui-widget-header,
148
- .admin-color-ectoplasm .ui-datepicker .ui-datepicker-header .ui-state-hover,
149
- .admin-color-ectoplasm .ui-datepicker thead {
150
- background: #413256;
151
- }
152
- .admin-color-ectoplasm .ui-datepicker th {
153
- border-color: #523f6d;
154
- }
155
- .admin-color-ectoplasm .ui-datepicker td .ui-state-active,
156
- .admin-color-ectoplasm .ui-datepicker td .ui-state-hover {
157
- background: #a3b745;
158
- }
159
- /* Midnight */
160
- .admin-color-midnight .ui-datepicker .ui-datepicker-header,
161
- .admin-color-midnight .ui-timepicker-div .ui-widget-header,
162
- .admin-color-midnight .ui-datepicker .ui-datepicker-header .ui-state-hover,
163
- .admin-color-midnight .ui-datepicker thead {
164
- background: #26292c;
165
- }
166
- .admin-color-midnight .ui-datepicker th {
167
- border-color: #363b3f;
168
- }
169
- .admin-color-midnight .ui-datepicker td .ui-state-active,
170
- .admin-color-midnight .ui-datepicker td .ui-state-hover {
171
- background: #e14d43;
172
- }
173
- /* Ocean */
174
- .admin-color-ocean .ui-datepicker .ui-datepicker-header,
175
- .admin-color-ocean .ui-timepicker-div .ui-widget-header,
176
- .admin-color-ocean .ui-datepicker .ui-datepicker-header .ui-state-hover,
177
- .admin-color-ocean .ui-datepicker thead {
178
- background: #627c83;
179
- }
180
- .admin-color-ocean .ui-datepicker th {
181
- border-color: #738e96;
182
- }
183
- .admin-color-ocean .ui-datepicker td .ui-state-active,
184
- .admin-color-ocean .ui-datepicker td .ui-state-hover {
185
- background: #9ebaa0;
186
- }
187
- /* Sunrise */
188
- .admin-color-sunrise .ui-datepicker .ui-datepicker-header,
189
- .admin-color-sunrise .ui-timepicker-div .ui-widget-header,
190
- .admin-color-sunrise .ui-datepicker .ui-datepicker-header .ui-state-hover,
191
- .admin-color-sunrise .ui-datepicker thead {
192
- background: #be3631;
193
- }
194
- .admin-color-sunrise .ui-datepicker th {
195
- border-color: #cf4944;
196
- }
197
- .admin-color-sunrise .ui-datepicker td .ui-state-active,
198
- .admin-color-sunrise .ui-datepicker td .ui-state-hover {
199
- background: #dd823b;
200
- }
201
- /* Light */
202
- .admin-color-light .ui-datepicker .ui-datepicker-header,
203
- .admin-color-light .ui-timepicker-div .ui-widget-header,
204
- .admin-color-light .ui-datepicker .ui-datepicker-header .ui-state-hover,
205
- .admin-color-light .ui-datepicker thead {
206
- background: #e5e5e5;
207
- }
208
- .admin-color-light .ui-datepicker td {
209
- background: #fff;
210
- }
211
- .admin-color-light .ui-datepicker .ui-datepicker-next span,
212
- .admin-color-light .ui-datepicker .ui-datepicker-prev span {
213
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAYAAADvl7rLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMUIxRjI2RjhCODYxMUUzQTEyNERCMDU1QzdBQ0EyMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMUIxRjI3MDhCODYxMUUzQTEyNERCMDU1QzdBQ0EyMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjExQjFGMjZEOEI4NjExRTNBMTI0REIwNTVDN0FDQTIwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjExQjFGMjZFOEI4NjExRTNBMTI0REIwNTVDN0FDQTIwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+kKfR4AAAHcRJREFUeNrsXWuMXsdZnuMu4CUN2S0t0a6o4sQqAaooTncrKGrUNbe2qSC2uQqpqtexbCqI0xaQEBclKUL8qts6stqNkuwWiYqbajtqS9oAuyEISrubrLmUFnBSfmRXFa12KT+cKk2GM9mZ7ng858w7l3PmnO88jzQ633e+8565vs+8M9+8MwXnnAEAMEzsQREAAAgAAIABYkx9OHXqFEoDMDFVho0yTJdhE8UxOjhz5gwsAICk/Exep1AkGAK0DY6G93L+eUblnw4gATPNqMceEsBURMVxSwhFbO8TEj838j4V8B6eQHF1RWyzDnTl3zRIIDTNsCJ6RABdMf+mM6XBjNfsDXP1wm2hkEGN+ze1eyFpngYJ9IcAYs0/vQEVkenz7X1SwRZv2xNhqeJNVRcxac5Vj0AAAcSYf13pBVMMPfS8xyhhaFpy9pqhQ6CqNOe0ZgBPAgg1/7rcC8aQQJEx7lzkGzoEqkpz7noEPOcAmhhPxjTGzcA42zR/m0jDZkSPGZPvmCFQVZqh/B3EWMfTV6CKvm2F5LJAQhYCmWlGPYIAAJAPMMQhAAAAIAAAAEAAAACAAAAAAAEAAAACAAAABAAAAAhAA/zI8+wHoMcL772BEkBsA0i1J0CsM0yIAvGa0CZ55doPIIU7uF7uIJKeEUCKBpDS6yumEW4kTPt0S+mOVf7YtG84voekHXsB9IQAUlXeZgMk0JYC2dIe6swS2vBTK79P2mMdmTZayBPQEAGkrLyUJDDdkvLb0h7ryRZCAtOZlD/F8G264TwBDRJAURNYJhLwbcSpepqU+wFs9KDcqhR1OkHa4Q7cQbTlDRjjVRa6H0BuFInKbTqQ0IpE8YYqrl7n8CgcOAHkVKK+I+d+ACj/AQ4BAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAeg1sCw64IJYBFwPNt4li1Mp/DJUPBSAoQUwZ8AwKlCLOQdT5HmLlh1ZCikM6eUsyOXqUJvMRW/660hcRaUlBHDyjEqdsuzxTW+O+BJCi8lOdyRcSf5GoAaWqhJAelCcsvyKB8sQocmzeU7SBWAuorbabmjxqy3+spcrnERkPbUhFR8z3UAVIMQ7NVQbcEneRIO/UvBSW/PuWAw+U54naQJFgCFZVlgV1DiDH2LlI/K5UzNlmL55ScYtEaQ9VoFTpbbsNhHaCqdKdoh045fe0pPxFBiKJnXtIwcAx6SgSpD+VCR3bA8XmPdUkZB+sv9TzGLV135QFUHTgXTl7z5Tx5yzH0PynznvRkTJscx4lZvhHjnesw4XXFRTIP/I/qvFiJSAADBggAAAAAQAAAAIAAAAEAAAACAAAABAAAABDIwB1suvQT3WNXU3YZ6RqA6m8QtuML/Zk6N60P8rhoBs9bABdJZO2G05omadsA0Vg/DZvuKkW4lZyKY7GM9Ocwx14inm6A28Q7zVdCSGVzztKAr7pmkqYh5DyT9kGeIDy1x1QO9Vg3E1YQDmPRXceklt3OGjV91w9H6Ugiw5aAr6706Q42Ti2/FO1gZCdeTYqLBkfIoptBzEWUGia60z/UEvOVZaNTwKGNIC6sVdo5fNMSp9SAXwbQS4yrMt7G+vbiwTtILUV7Itp4r1G5gCaVP62HCtiG38KBs6xFx5FCbpo9VQ1dNv4e7qFdhBjAcWmWcA8Xj3FMe/WuYw9HWwAdZMvoZWfk4FTKUCKrb24R/2lMEFD0rtZU9Z9PCo+9nj1IlDeVZaNEkATPb5vQcb0eKkYOCQdmyy9uedbH6kIkEeUv82nfbPFNKQq981Ew+DQ4V/tMe9jDTJnFzazYJEkkGszkk2WvucqPOOf1sa9PgTYtf0D+riZSGvx4mAQoE0SAjoGLAUGABAAAAAgAAAAQAAAAIAAAAAAAQBAVnAUQfsEkMobLdSjKlWl6/GjIYUpX+6yCz0hCfUeSACpvNFCPapSnYmnxy/eN83SHFLat14s9njwgsUf8JpCgXlLaR88AVR5o/n6NKf2KQ+NX5GJz8KWlCfqhnok8kRxhypwEdgTV3kDxigwi6w7kECCOQDfjQ1iPKpsCt/WxgrcQn4pThj2aYS2k3lTmNJNPEvNrw+BxJ7KDEQQQJ0LYRs+0dNaXLEbK8QoSpHAjCwSKVauHoxnym/Kd6QYjgyKAKq80dpi4VhvuBSurLlNxqLCAuEtNvqu9cQ8sO5SHfM+qCGAbbzssyXSlFFpIRsihO4HkMqVNbbx8wQkEDoOjm30tmGQ7xCCB86rxMjWkQCD8l8NH2/AjcAKjPGlZwHviXFlTWmG6uWQwowtAuOPSXusK23oxjAxsk0ORwZNAG1MIqV6X1dcWYvM70mhwLn86aGwGYcAAAAlBAEAAAACAAAABAAAAAgAAAAQAAAAIIDRxwTD8lFgoASQ0g871LGGJ5T1fYdQ/i02On+HxZ50CwyIAGIP1kzpCDOZqXy2LEQyEamAOWR1bIAEAAoBxKyfjlnPbfbUqhee9FAUcxmpz9l6usk/aXnHlmf85r0YQk1lPW2g6QNVBMAjeyCbPzj3JBSlbLryb0dYH769vpLflnGHnCxr5t0n/3V7ErjSkmo7N2AAGCOY/TygF09hRTCL8ucYi2+zdA41VOWvKjdX+ZvbsBUV9TuNpg/YCMBstFWffUzQWK+0WMSOu32tj7q8u8qhqpenluFGTb4LTfk30fQBGwHUKV0R0fCLSDLIRSCFQQKcMBfBa4ZCrrzUlU8XdtcBBjAH4OqNQhXWd0+8mP34YuQnLbJbWh62CUpW1NwriKQTgqrt3KD4gDcBxI7fQ7elKioCi5APGfPrsqn+hiwSP2cidjs1AEOA6IZYJG7UOREzB5ALmww9PpCIAIYOKBIw2CEAAAAgAAAAQAAAAIAAAAAAAQDNYoZdvZZhpkfpF5PLe42ACeeOE8Aho8Ety3tt4/0szoc/FiKuBVa9l8BMC8q/arm/6hH3TEbyEIr+rTLcXIbLMtws740Fpj8kHzcZsjd55iNEPjZOgV9whJg8XKVLeoWcK8P7yvC0/D4h79lg+3vskOX5w2U475no32dXH8t1kvktB64jDNc75svwL2U4UfH7LWVY81ReHbMR8qsOef250KPNRKO5VPP7/jI84yCA15dhvQzj8p4ggQNl+LIkAuaZfp98VNX9JY82wCxlcIkgFyJj4s/l9aTsiFLWY1FHAExTfoEV5rcCjkog4r0HA5jRlwTGLfcuE+QWy/BgYO+3qhW0uSJPnXa8WpMHpeCrNeSxyppdn3Cpouz0MnTFr5T/Go3Y1h3vrStPlXcKmjiVqm+Hy1aROLextVlxOrY8C1kp/5dlQwldQrvX+L4Q8I7vCIzbZQG4cLiCqLj87ZxDfq2CBCg9P69ogL7nFIqy+4bl/vd4lMM18nkR33cHluUdEcO4GIIIdYcviGkpWlT+nyjD39SZa4yo9FQo5Xe9pyASwGRg2sYD0x9jAQh83kICSvk/T3yHSQIU5dcx4fhOKbvrI8pUmPtfK8Pb5fe/kveYR/6ZhYR8ymDWsKhmCcOzvsNU/l+UdVZJAqlnZqnK76O8oeaU3us826IFYJIA81R+G0n6TuLtd3ynWGD/bdy7waPnvygVfl0jBHHve8vwPLH3rduZqs0l2inM+dh3/EoZPu45b3FSG4J9Urt/xfC7ib8Btzwadp3yqjCuffbBd2nBpwdbjFR+gSmNBJTy+2zEKRReOPUckmGTtTuTL8rpB40wTig/kcfvl439G1LxD8h2xuVvoRuSznoq/r6Ka+xwNMc7/iSA+MWw+TvZ7qSiUv6VJi2AVJM04wni+VLgO2MtgCm2u+OO3utvEhv/TI08lQRe6/juakSXDHNenx+qsya+T3vO9k/BunxfyI5Eucz3y5nf4bMvxzNG/S3UKX8oAcxGmDkU5f8DqYBVv6UimSbmACjjzNkG5XVFrPvuakT63MWYTJPr7z+dJFzPuCbSeIK6/cuKK7UTWKy43+Y7QvCMhcStyv9yYXK+U9anTp1iwBXj7VsqfhfktDaQsuBar/9MT9OeqmPoG9SEoFX5z5w5k20I0HWsGdcho0Dae4tnKGUAXwAAGDBAAAAAAgAAAAQAAAAIAACATuAPZchCAOqU3NgjsUNg+i23vSeADcpHnbIYZ5bZ/bAp/+EfYtV7EXDm3qPhhEOeusCpypf8pp7IK/xRZPuZk6FtXFuG35Hh2sh3HdXCFRirUf4trcFST+gVm4gIBxB95dP9bMcD7kZ5pfhzi4U4a1qlndQUsKiRUygaUH61QMfljivK7AtGWlTaxP03svrFPue0PJtYIJShy3NygdEWOqmFJLoTzzqj+7jnllf4baNNCCVYIij9smzzy/LepNSDykU1hu6oOnxQku6C9h7KOROfNj7fHqH85oIkkf6vvFwoloVAuvLr3mirhMSLlwk/+Lrz50M3dPCRV0r3a2U4q13FfgWnPRvQjCQjteGJyzOv6mBPah4oPVVByP/nyvCjbMdF+7Yy/EMZfozRnWk423XiUTK3MvdKPpu8Qoi8+D/7BbbjonyTh7zZ+NUKvMWG26Ape9JCykWN9eYi8JOMvlJVtVmR9/NSr8XnpbqFQKbyq15vVv7WxgKLqn0EfLwM3ySJ6D/L8O9sx7tNrOJ71lP5Rd7Vzka+brm58Ndl+JEyPCaV6DFZHn8bOBzTFTJUXuCWAHmh/M8HyJk936Jn+9vybJuhFpmOGxI9o3CPluZDhpWybZsDWGDV69EVCSy00IC3ZdiSYZv5H8/1j2X4uTJ8VjaGT0r2PBeg/Oc0S6AP+Em2s/b9bdJ8FFfhTkrdYONmS2/lQ/ymvAqvCJAXPf9e5rfBy9EahXetxZ8zlN88X3KrwTmB3y3DB2p+/4B8xoV9Mqh0npblMS+HP9tVcwAnLeNZphHCWsXYtItQFsBXy/BP0pQU138LUP6Ynp+zMH/wSW3uxdcCEi6gP1+GP5VKL66/xGhuqcJj8UvamFu59CrzPUReKP6LEfL6HICv8psK/2QL1utWgHWr8Jtl+I2a30LIr5K8Xb4AIY1+SzOZ9xkm98EWFH+WoGwfb0n5Y0nAtIqo+C22sxmEmNi5Xl7Ffgq/V4YjNXJi/uY5456pdPs7LG9T/iXPcl4xlJhbFHjbUU9VJECZANT/cft7eX2zabo78q+P+VfqImvCGeh5trsT8Fci5wxC9hRci4xTWTuhyi9m+b9QMxZ+Y8PKr8qdSetHv/6MQ+45Y7z+r57x5pZf1Ig2RPkplhZlHsxGAtTZf9E+XirDu9nuZJ+YHPyI/O1xot6oMf9hXwKo2hBR78maxMmantJn+GGm1TftoT3/ag0JuP4CVD3cJa3xbHn0gLp83e8uiJ54M6IOc8nPJ1B+ZakuG0qs/w1IJW19GEclcTHp+ctl+Avt3oPyPS8Q33FaK4/aeFPvByDGiRcZAIwO5rShQR9wVPtcSYJN7QcA5QdGDSs9S6+X5QNfAAAYMEAAAAACAAAABAAAAAgAGCno7sVzRJk5drUb7s2J0uPzV2wX3MAHSQC3WhrArRnSxwfYCNQ+DI8Y9x9h/nsz3Meu9H1YJpDAj8vnjsjwOhnE8twfIsSpt533Vih/YQQdwnPxHVL+TTJwee82QvwzlrZLPVDFtReDaz8GinzsOw556g2v0yPbOgC15nulDB+W9xZlwzPdOykJ8WV9m3zMO3LgqCwzVV6qTCkLVPQ8i3cck8o/71kWKg0KYj+GZwnyIv5rLPe/VYZvMporrYj3UUk+qgz09NT51KdwBzdXkFK9WDmju5tT47Zhy/EOtZpR30BmVbtfEPJvi+Pb7thqHYDNAlDKLypJLOn9Wba7BnmdARQsamV5VCu3RQ9ZJpXeVH6qW+s+47uPG/TzUtkvy/BNSQBUPMp2l4NPsqv98ldaqIP9bNeblHlaA+buT75W6LbMp+7J6uPRyo20zBDJ0YQ4i3FaC/9DHQJ8WDM71RFH8y0pT5W50sZwgBODCwcqFJbiT3+MVXuzKYuAMoy4N7IcXtK+v8Toh2t+SPb8qpzuNZR/ifCO8Yrgg1XP+wp72ZW7P+3V4qce8inK/7Rm0jPmdzhpETF/UkjiEW3tNWzHGew1WrgCdSsBdeU/Rhx7VLFUm6Z8ivMJY3GRXX023LzH8OlYpPLbNnVhmvldhz+TCm/6DFySyu2CGPdfsMw5+KzPF77/L7A8uMby/Wvy86uJ73iP9lmQofIsvZFoBfAKsqJ0Pspa+LpG3nuk8j/Fdrboq50D4DKRE0ajU5XZxpZeLOIdvEFZah6qfOepcyh/XIZ3Wu4L99DbA5WfqoAi7fdU/PZ+tutp6Jt3KoHp4+gXtfsvyOEIdQ6gapztGsPfWPM8Z/UernrcVcO797UwB/AG+fmr2v3n9LZbNwdwQBvzPyp7fqX8B4jKYc7uVs34UuV93lE4QowsNQ/rFSb8eoDy61aE8At/0jG5pCv/QdkgC4/eVxDUAzLdeqAov8qjauhM63HUfAZ1DC3C/7GdM+5f4WF+zzK/reNMvFKGZ+X1WuNzDKjD6Ng5gBukbl+vBSaJgbuGABeloq+zK/9C8v0HYMhQ5r8qs6fZ7r8ALrzT6PFFr/k6trspxJuJY1/X7rV1eFqm/3Py+w8QlV8nsRU5Dl6RQ4ctLf/HPN71dc+0rzH75itiQ1HXCcfCVNePprd9PkwYgt3o+J3SCXKP+za8lmTKNnw8+FD/BoyBMuNNc/9Jqfx1vuVc6wXXEtWdb/nr/1psa+NefbvsPTUNWd2/qwxfZDubuW4GtCVlKt9kmcsoHJOAr2e7e2Ay7bPYTq5ug9JDjLbnpNoxK+QddbKUoewVQ4CmjwcvMsv3EdsV+b695fJ6tWa++/yjIHr3v5NEtaiRldog43/LcB1hMuzhyPRXbQ3nOpzleXb1rlLUcj2foA7Ot6k3YwwAqk3vXw+UXaohN+ZQ/lQktsaG2YF4Ab4AAAACAAAABAAAAAhAwyFGXwGocIccA5rLZ5cY/WQaAAAyE8A5I1Bwdxk+VYZ3WX57l/ztbhQ7AHSbAN5m9PyH5D1Xz3/GuGdbOXfGwxJYldbDakDenjUskLkE5TWHJuNVb2ZYRdH0gwDUARyTbHddtutQjiMe8VKfnTGuPthnfF9OoPzLRBI4ajT8owHxxb4jVl4p7IxFuV2Y9bwPdIgA9N5f92F2WQF3VTQiTnw2NZT1MZngXXMagbhIQCia6bO/6KmAse9Q8qK+xuV1MYAEZiy9+QzUZrQJQO/pJ9iVa5dPBiphKE4GxqunXy0/XQk08+cM68G1xn7R837ds/OSwOY936GU/zNsZ2XbZzQS8MUa1GQ4BDBnjP31HVWUFdDmOPg/jKsvVNqFI85hovLrPbyv8qfGeWmBnQ+QfcLxndVYbLGbrsxo5LGmkQish44TwDKhB19uMX0rMv5YpTvI3GvPbWZ+TuVXhDvB/P+KFXiL43udxRa7hHZBU3jdnXUBKtddApirMKEnCGaywFmPeKnPzrG4GXzVmCm7sKywK3fLCVX+ec/7dc8uSitm0fMd4rnHyvBWtuPd9lb5PWRbt5mEMrAAOkwAyxUmtG1zBduzF2pMSsqzrCaeUKvD15w1SSCk51+yKJrvcdWx71jSSOCypvxLnuUnTPdZwzKgzAmYlkQqywJokADWPBuGicfLcJwge1w+SzXdGaOfyZ5q2HEw0uxfMhr9UoZ3xMoXzL6vAP7KGyGMJa5Y4cP9X3LM+h7jN7ErjJjMesJTGWN6jSKCBNBbAYMigFR4Qob3ongBEGl/hgAAAIAAAAAAAQAAAAIAAAAEAAAACAAYIOZYuG9AjCyQkQBEpVF931nNO3jNd6B5LLC49fdzLHwVZows0AELQFVgLBH4koYZ30RAGlTaJyz3eEAaFE4Q5U/UpIl7lIXvseRmfCdkmOuI8nOGXZV6NwRomwjM+IQjz0FNeeYIJucy2/UADEl/yjznIFJmKKCPInOtDEOtvirZAlZBf+cAVEM+0eLYc1lrMIXWmHlNz20+G6N4ZhpClLBtxWc15ZMTGP71nABWZK/6YEtpU/EdNBrQQWZfXlpUPBvjx2+mwRex8Y8SsCS4pwSw0nJDNuOb0Ex61+YgKxoRqDmAkPSnzPNKBiIoKoKP7MGIeA/WWAEHoXYdYuWK48G5bKz3RzRa8zjn2KPCgXhz27fs5yzDqjZkgYbhOh48RYUVMAF7b26vaNZUm7JAB+cAgGFihWFfBRAAAAAgAAAAQAAAAIAAAAAAAQAAMJoEEHqyLQAAPSUAsXruHu37DTJMeLxX92C7z1MWAIBMBKBO0zXPortR3qcq8gG2swhEnAVwr5S9NUF6XQ4lJ5jdjVaFEyMuDwBeMFcCnpbXfzbur2i/HyO896ImJ5YTn2M7J/Qe0H5rAmLzi8JBIPpptaMmDwDBFoDo3eeloqohgDDf1Uk+6/J3ihWgeqxH5PPKEWY9cDjg40oqDsO8Vl71z+I6XoZVh/y1Mj79HSr4yvMI+b2WK0UeAIIsgP3yqh/ceb/2+YLswfcTeiDx3G1s51TbeTmEOCyHAuL7BxvM06sqCKQgEskrjWthvIMRFFi/vsqTxFS8k4b8JMOyWqBBC+CSvN5Z8eydxnOuIcCS1ogFEWzL6+mGen6F6yxhQl43mPsMRPHsD7Pdo9H1dzxHkL9OyutXJe8bv/4eavwAEGQBbEszfY7t/PW3pP12VPbqK/I5quIWsucXcwD7yvAoCzujnoqTZfii4/e1EZYHAC+Y+wHcKsfpasx/Qfb8BzTT/qInAajvaiOIZYIpq5vstisAABGo2g/golTy+9jOX4FK8c/Le9QZ/Lq9AAoP+aorAACJhwA6CRxG0QDA6AO+AAAAAgAAAAQAAAAIAACA4RLAHWxnDYDpiLIkf3Mht/xb2M5KQ1P+g/K3UZfve/0NXb5VmOsA7i7DGYeMePCBit9yy99Vhocc8sfL8PCIyve9/oYu3xrUOgCdAAQ7fYoo/44yfNrCfDnlf6oMnyXK/3QZHh8x+b7X39DlsxCAPgQ4YrMQmH3xzRHivSq45I+zqxcPHXfI31mRfkZ89k6P9PvIFy3Ff8Qjfmr9FQnkWab411j1sWi+8RcJ2n8RqCutDQF4TaI5oXJ9HXfq5AvNJGaaycs948+V/lTxp0h/1Tuajr8gposFps8n/iKg/Yjff1X7/tGA9mc+Kzxkn3KQY6sWAPVosMJTSaoyR5XnxliXMjZ2pYdHKHcIScRWcJE4/b7vSJl2lqD9hKSfW0jABx8xCMAHb5DKblP+zmCMdRcvVnxuAzyBhZBKgXIrcEgHkKL8U8Qb60D27kA5ofxPd1356wggtgJ4ogZ4VF6X2O5fKzENKpQEeCISaav8eKTyxhIgz0AaLgskxIL6aGD+n9JIoLPKL6BPAp71kDtLvBcqr8b+izLo96rkH/ZQpoeJ93gCeRYhzzzkz3oQCqX+eEL5ttuPWX88g/xTNcp/tosEcMFDAS4Q71XBJf+QpQE+5JD/hIcCfoJ4jyWQ5y3Ff8Ejfmr98QTyLEP83EFATcvrJMAidaU1AhD/Kx8nyBxnV/8H3QV58b/qKYL8KWb/D7bv8n2vv6HLZycAZVrOsZ39/E18SP72sMM0zSkvVliJRRYfs/z2MfnbAyMs3/f6G7p8+5MlxlJgAAAGANtKQAAABgYQAACAAAAAAAEAAAACAAAABAAAwIjD5QtgA2V9O+Tj5AEgKwEIjFvuXfZ4d255AAASDAFyKt3lBGnI2ePiSDOg1wQQq4CXtRCCcSk7nkkBq7aEokI/1BQAekcA4zXmOFWBxyPkL2skEKqAjMXtI8BZvg0pACD7EGA8Y/rGE6QhZ+/LO5AGAKjEWINj/9zyAAAEEkDKDS0hDwA9HgIAAAACAAAABAAAAAgAAAAQAAAAIAAAAEAAAAVTDAuDgB4QQBdWsYm4Z7TrKCj/Rhmm0fSArhPAtHFFzx1Hhrryb6I4ga4TwIZxHbryx/TcUH5gEBYA13rKumvTwwZXCFXejQTKjzkAoDMYc1gAhXaloCBem8RsQz1/iAVgU37MAQC9IIBQC2DaojTmtUkzeNWDqHyV34cM65QfwwAAFkCHLQAoPwALIMAC6ALWEryjSeWf8nwfAPTGAhgVhFouVOXHHAAACyBAEbsO08x3fQeAvD0d5/hHCgCGCvgCAMCA8f8CDABatG6NN+gY2wAAAABJRU5ErkJggg==');
214
- }
215
- .admin-color-light .ui-datepicker th {
216
- border-color: #fff;
217
- }
218
- .admin-color-light .ui-datepicker .ui-datepicker-title,
219
- .admin-color-light .ui-datepicker td .ui-state-default,
220
- .admin-color-light .ui-datepicker th {
221
- color: #555;
222
- }
223
- .admin-color-light .ui-datepicker td .ui-state-active,
224
- .admin-color-light .ui-datepicker td .ui-state-hover {
225
- color: #fff;
226
- background: #888;
227
- }
228
- .admin-color-light .ui-datepicker td.ui-state-disabled,
229
- .admin-color-light .ui-datepicker td.ui-state-disabled .ui-state-default {
230
- color: #ccc;
231
- }
1
+ /* Fix empty block below admin footer (issue #24) */
2
+ #ui-datepicker-div {
3
+ display: none;
4
+ z-index: 9 !important;
5
+ }
6
+
7
+ /* Style for multiple months */
8
+ .ui-datepicker-multi .ui-datepicker-group {
9
+ padding: 0 .5%;
10
+ box-sizing: border-box;
11
+ }
12
+ .ui-datepicker-multi .ui-datepicker-group .ui-datepicker-calendar {
13
+ width: 100%;
14
+ }
15
+
16
+ /* Date Picker Default Styles */
17
+ .ui-datepicker {
18
+ padding: 0;
19
+ border: 1px solid #ddd;
20
+ -webkit-border-radius: 0;
21
+ -moz-border-radius: 0;
22
+ border-radius: 0;
23
+ }
24
+ .ui-datepicker * {
25
+ padding: 0;
26
+ font-family: "Open Sans", sans-serif;
27
+ -webkit-border-radius: 0;
28
+ -moz-border-radius: 0;
29
+ border-radius: 0;
30
+ }
31
+ .ui-datepicker table {
32
+ font-size: 13px;
33
+ margin: 0;
34
+ }
35
+ .ui-datepicker .ui-datepicker-header,
36
+ .ui-timepicker-div .ui-widget-header{
37
+ border: none;
38
+ background: #23282d;
39
+ color: #fff;
40
+ font-weight: normal;
41
+ }
42
+ .ui-datepicker .ui-datepicker-header .ui-state-hover {
43
+ background: #23282d;
44
+ border-color: transparent;
45
+ cursor: pointer;
46
+ -webkit-border-radius: 0;
47
+ -moz-border-radius: 0;
48
+ border-radius: 0;
49
+ }
50
+ .ui-datepicker thead {
51
+ background: #23282d;
52
+ color: #fff;
53
+ }
54
+ .ui-datepicker .ui-datepicker-title {
55
+ margin-top: .4em;
56
+ margin-bottom: .3em;
57
+ color: #fff;
58
+ font-size: 14px;
59
+ }
60
+ .ui-datepicker .ui-datepicker-prev-hover,
61
+ .ui-datepicker .ui-datepicker-next-hover,
62
+ .ui-datepicker .ui-datepicker-next,
63
+ .ui-datepicker .ui-datepicker-prev {
64
+ height: 1em;
65
+ top: .9em;
66
+ border: none;
67
+ }
68
+ .ui-datepicker .ui-datepicker-prev-hover {
69
+ left: 2px;
70
+ }
71
+ .ui-datepicker .ui-datepicker-next-hover {
72
+ right: 2px;
73
+ }
74
+ .ui-datepicker .ui-datepicker-next span,
75
+ .ui-datepicker .ui-datepicker-prev span {
76
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAQAAABFnnJAAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAAEgAAABIAEbJaz4AABe4SURBVHja7V1diCXHdf56vbZmVl6nxwKFO2yyq1mM4qAwM7oDsR6C7iYIKesH3V1QHgyBu5YYJwHjrB9NQCuByIthHbAga6TZxeBgHMJKISZ+SDIb1oQgRtoVgtjGyD8PmSGQMIpfJmCLk4f+q6o+daq6+965P1VfM3Pv7VN16ud8Vd1dp6o6IUSEjBPTzkDEdBEJEDgiAXT0QOhNOxPHiUgAFT3sA9gPiQLjJsD0208Pbe9rM/OvwkaBQvP0yzhG6ASQO0AqDwmu9mOPT3nqPWsYV9qFEduVIDP/QU4BSfMC9REqAcbRAa520FDELdphc3SJCyRIcADgAAkSQXOXMs4ckrIxFEUs2oENBNSqR0WmJ2kVv2hltvRdaVPHvPtqdpVxjlD1AHIH6AupDbovH1nqkgllLd3apnQJUjV362dmDEnjOya5FUltsEqqbdtxa5Dbppx3uQ+sNLv6mblCcwLIoKlXTQ/7rQkmX4IKzdMv4xgxbgLMO3rYXyTzuhEJEDjiSGDgiAQIHJEAgSMSIHBEAgSOSIDAEQkQOOJ8ADPutPN/zGgyH8BvRoDLGdMT5wPIKbjN02U+gNsdnuV9oUjSbD6AnwdMrkK7gVYt3311u8zv0r5vfNq1L8xsgPp8gAz20fAilORvs8tdsX3mA0i5k1N3x5dBue7icyGgzwfgvus48OoF+DDu9ukzH0Bqf355s9OHnLMNmqQ0F2jjDJIcrrM+H0Ail6v/KUoe3cECpl85XecDTDv/x4zoDg4ccSAocEQCBI5IgMARCRA4IgECRyRA4IgECBwnp52BmQNNcZS/+1hp4/yf7BZ9IpUwzRyQMwftXUHumFMouX4JIED09fvsD0AtJE3RNg1X/jPTJ6IWNznaxvYrgU+oBnFPaAFcxU88CmCPn3hUkE8RSHD2+OQvEWT6Z7M0Com7BuQSygQiR2zA1Yi1/KuXAN/i22bruCspGUMHT6In0nUV7ZIDKmMnrFRNnUulaF72PJAgl3VXpZObgZrLBGh6E0gerccVyoed7dq4n3ETD+2SgXz0tq0BqQn66HbXQU3e5DGw6uJ8QvEyuQt0M1jW4epi/bpoVwtype5zE9kWboq75VoOTHdw6E8B851+i8fIOB8gcMSRwMARCRA4IgECRyRA4IgECByRAIEjEiBw6ItDi81Spwf3fuCThE8N+HhE28VzrY32TaURKgIUC6N8tntvVwHjQztdrpz71YC01Wzljes1jp35KYvDXoZe6xogI5cA+MWh8hJOH492jzk3PgrYdPltDWHPv18N2NLoGctre41iVyVw9UDdlqbXFujqQ8E+26m7lmDbFoj6zaRx58Cmx72FuzvnfhvS8z63umkTQ+5aWF4Zh1ufSJpm2WFsc1gn9TBNCeBfAUmDuH45kKvQJ3332n57+q7YLgK460A2oJsAMoEsBGj2FFBVQBuPVaLo4LWT9iml3wZVvtveQ0ipr+bS4grO7yAgpV/E5O8BXJqrvRuk9c1mLhvOB5AqQL+BkYovZ04qoqRDLZp72hdnAjcBpRIcGBtIHDTW4AfJvAfla2/8commlwA/XzU5t4iQr4JdYvtVL18Ov2tw9yltkp72L7Vx3wOwiPMBVPScb0xaOEQCBI44FBw4IgECRyRA4IgECByRAIEjEmDcmLPHKnM+gAuSv8qn6L2O/u5Jo3vuEsdg94yVvT4fQILkMfcZJSw8dqseC0zt6Lq4Sl4enjiXv7oNbIsvaZ8SqoEgNVvu3X7rg43q0sh2b//2HWgGJI+dK3ZiDaeetXk7pcWj5CX1L+mxgL8HsE06kP1V1aWhzaSFrOW4p03Z9zAg+Pr6kgZnuXS59N0rm2cS5vsCqips+gZu8xKSNIhbSP2WQLsXb7ffQkIyo6uH8Ncs7RFwzKh6ANVR2CZrrjcJuJ2tXa+OidKD8D2E/smFGE8r5lLQe48ZMb9+CTgoM8V14FkHn0334nEgzgfw8fa7t4eQUc0F4KdUyFVfXYTsu4sUIZOGUjVE2wk1EwHvDSRrB+7jLLXdBI7D2eo3a7HtjabPTSQAB0Fnxrg+iO5gHTPTNR8XIgECRxwKDhyRAIEjEiBwRAIEjkiAwDF7BEhny1u26DAJ4OfLllw25CW1hUhxeCxP4tPeB2Fm0Gy7eJ/tpBOsdMjPIQqSpGK4tlvWV1igN4B3gU4AeZRaHu0uWnWKQ5YCVA6U8mv3sq5/pQxxaIlffGu3qbra+/i9an7BURFA3+69jsofbtsyPUGSm/8DNi25a8+6/g+wIqydLVLn09dnFJha/LaPCA7FULDf6nYJxVwbm/nNuThmL+L6LZ2tS8xw5vYR0lvOg4I6JSxB3Uwm7FMZ/CZE2CeVmQSyTcngc+jaPkEn+IK9Ar4LqhdGqFVm32DE/dYL39dK2OQZBah2H1E4gvld+fX8+Lw2IgIAtz+A38r1ul/evUONJM1uHuUQurbE61wB9w5CgcL/hRH6rNjq+7hhv4voBv/tI4LCrM0HmJT5IyyYNQJEHDNmzxcQcayIBAgckQCBIxIgcCwSAfqlJ6A/Ef0nsZQfzd63OtPICDDMK24Xw9aaXnZ4+l0g3NBmCzQ1Yh975fc9Nna/Ez1O4ld4FEc4wqP4FUuBvjP3a7l0zZKGXe6KCTxnHHIKxtwOoqs0oAENSUUVtjo/JFgOKj+3tbhqCF57doyor8lHmrRPJvqN5HoOudytGfHXDPkSrRPREi0R0TotCTXAp1GHVEP+EjXEtncZyxAFk+8BAO5YJnPcxpdxD0CK2+W5O7hgZeMXLCOKy+W3o5rsJr4htL89ZBtLZNgHYU9LYQ9bSg8AbBlyN95Xcpfl0Ix/H8t4EEAf942wej6BLUbim5suL5+XsYb3y++lpoIA9/NPdRqGmuV7AH6EI3G2z1L+ecMa4qNC7Ct4D9uC/JLmSr6kUDHD2woFtvC2ISWoizP5FYYfxS/K759g8/AgPoEEp4RcXhRkpkeSl/MvoE4YLc0IXpj/D/DP6unqWnboUPAjHNXC6FnICLAiaLO1G8DVAwBvlRQgXMJbTIiCAnXzZ0iNz3rufl3M6Qb+G38I4B+xwcZ/GygpxOdgK++p9N7qOFCY/4+wrFPA936WM3+9AgG5o8razk9ZmasHKCgAi/mRpw7rTd5549PEEn6efzvLSB/Eu9jAfQAbeBcP4f8MuTkLqe0yU3dH7wrxOfxN7Vxm/i/gQQD/AADFBdz/MbBufrOAp3AKp7CMU9ZO8gE8gAcAcC3spsP8QA9v4RIu4S3LdM4+DjDEEAct7/OX8Vv5sVzLXw9nQPgFNrCBEyCcEaeUblmMf075s2EJLrhCfIs5l5H+Bj6G7wAALuBOJmj/RFsv4rIzzg+FkK4eoIcDIG/7B0z19zU5R4HfMD7NKspayQayOyK9n3gY9wH8pPx9HxvCjKIuHfxRxxD8hNmf5OXL7s9K86N8DEwdj1HuR5iXNfnL1scV+2PMjQk+BhYPSdWnLRd95hGQe4hzPeg1fQwGjayl9wmhlpDXXzwEDtSzs+MO7gP4HeX3e5YbqcmCAJxXWvr4tWeYztSUNbyvtX7E+QDBY5F8AREtEAkQOCIBAkckQOCIBFgsvIJXmkXQCZCC4FqYbQeVjoyujxZ9cB71LeXxte5vGxqPvUNDvm3IuUEn1Vu+NgE5APylo34GGLSut9P4Cr6C045QI4wwKn8pdZISUZ/6RJTWBhF2aSkfRrhG6zRkh0Fu5AMR23TDkMuebPPos+G3FE82EdEWOxBSHPX47oGcLMw6rdP6hORFmGxQx5QMqBiQS83hmtw6RNuEvHQpo/suERHdFWu3GEwa0TkCQU+gn4+h1dUT9RqNg3FyENGf5X9XrRXUp2wCSt+iH5YUXAYmAv07ge4R6N+InzJBtJ5L1gU5RPlpWqLTFnlR/SMaNa7BAtusfLsWe5tNf0hEI0qrkUTVHVw4Kfew1WqjFnWuAO85fAL7+DF+gJ/jPYtPsI89XMIbVpduF/wTfhffwwa+hyfwL9ZQ2Vj6hijXxyx1/LLmJ6wwwk0AyP/X6+9Q+8WDn21x1uMMAHwJwEp+eUzxAcoe4IYxmt6nG417ALWDs/UAV4noL4joFbaF9InY1j+uHuBvCfRdAn2Llpj0H3X0AIUcotzeA4y03JmXgIGS6wyDRuX7qib7KlOD5+hcPXUziX5OhHr1j4MAn6HfpM/R+fyvifn1WXE2AqRElFKaXy9N+XeI6Nv539/V5EX5bNfwSv64Q87Hr6692XG+IQFMd10q1JDsatLOmwrUT122RENCyaEBE0ImQN1f18T8ZvFkAvDys/Rdeph26WH6e/q0IV+t5W5trPLK/LAeuolTUW6T3s1vBE35iIpr/25bAsBxUJ6N1DM8b+C+Vb5lVDD3FJCWRecJYidghsccuesih8P8Pi73ggIpI3uKPsxv/LbpQ3qKIcBVGtXj+ibvNqh+H8rfg0qTlmXzmxTYqkld07plORFRz2GcLvKR0/yux8CKAqkl9nPl9+dqsa09kK87eB3v+gWM6IgBoHvsx4QRAOCWeTrOBwgc0RcQOCIBAkckQOCIBAgc4REgcxsPGMmgfDZ61EOPbTfFOburVgmwXlbAemt9NLUqSEHYyb/vwDar4Vq+qHS3RoHfxy4u4zI+hU/hh/h0LWZWO1fzX9mepeq+55v4LAhP4AkQPovNWnx5+4ph7cF+6JC7QgxraRgjQObZdSLapSEN6ZAqpwc34CENZpAzRPtjlOdrnR1UybBDoB1rLorhkHPsUNep8vgYOxa6Q8M8B5meAZO+fRyv8FKklmEw+UwVO7XoycYa+7k3B0z51BjrxXc1QDZKvENEh1YjTpMAxVgWn0Zh9uqzruGaONZ5gj5CCSX0ETrBGmRIIKJB6dPncicTQPWHmCuXMm9Iv6zjOgGgzaKoEyDTul2OyXIEOEOr+cEQYJhX4w4748dFAHJWgdu4cvx1Rcb1UDuKnDN/KuonSspjjUn9eh5rlx9SpWz3kOLgCWBPn8oZV7wGKn2cQwKdYwkAhQB8n7JOm7RZ+isZAuzkVcdP+XIxXA7RTMoTyOVTk1p/NeMpw8CQf5uI1vKD6DqjYVC6bLn0iU53IsBD+dmHyv9m7KL/GhLROUsPYK+/PhGdoTO0Smdok4iuZefV9wV8gBQ38fn8FknecR9OubSbuFvKpbBe7mOSrdE38U38cfn9+/g9TZYqM56AK/UxcazjS8qvl/EzIfWslszyrwD4EADwS2aDGcKKNs/KfMHFI9p5ws8MuT5f6Ca+bMzayrbwzybL7jHb+RMeB/BfAID/VGpX62APaUhD2qXZvAksWh+fxjfL1p/hrhG3n7f71Kp/s2w759jUd+gqUd4Odxh59vmQ5UbPnGhjtt/H6DHjv9x/NL8HGFKfNmmTNolos34JUK+xNvPP/lPAXSrmxnLVM3CksEPbtM1Op0IeO6MQRwESfpln12ohhrUOfGjEPFc7mt0DEA3Lw0IA31Y4LQLIR6q0+rtkes2z1uFTOlv+s57lkFIqbieTWtzP02eoJ9QSEZT7DF22lD8FZP/NbejqBDEpMhSlaum0MkZ3sIqH8BKAF/E/rHSEFdzM32aQ4n/xa9qbDVz3SIC+meUk5j23QCRA4AjPFxChIRIgcEQCBA6TAEPrfuEXcau8obwlbokaMU/QHhRuExHRbeYB5ou1h5AvTuVhLx5jPtQfz5TGfcYIdlF7eixwkVG4R0R71uR+6jkgA48Qx3/sKfTfm3puJkCA21T4nMw+4DWWAK8xCuWBoNowhNX8HEncy6tcIVxyor1yuGiPlfvlf46O6uszmoH1PsCGpgQAgV24WTd/vZ9Q19byBnSFGBHR07RET1s1+JVuQQmQXf8Lr7PeB+gFl6phm2zLwlTz7zKSQfnJXyZcxkFu+DQnAid/Ov/2tKBhT0hjgQkwIBOqAfwJwHfeuqZ7jEeuiGczvy8BUrL3MVSOsNf99RXsBOgT0R7t0R75+BXm5DArwPzelACuozBS3fyZ2W3mn4UeYIFvAqv2nyp+58oMX2cJ8HVGoasHsB1qD8THn/49gJuCc3hwRasX8ilW+hSj0FU5dqnU+nUDj1qH6PoUkIWZutHGT4A91sBqFTxfkz5vNeNASFCiR9ve43iPBSOAvzv4SQzx5/n3r+EN/Ou0xzCnhLbvAppRxPkAgSN6AwNHJEDgiAQIHJEAgSMSIHBEApgYgFpL5xAqAYjZNkEHYVyvhJgWbgjvNgeAAXZbS+cTxigd0a4wGqd6A0xJES+1ahjQbu4IGtCuoAGEfHmTLt/WNLVx1w4cg80Dj9hFDdi1zNXBV5/NhBIB1Hj1ah6UcQb5CntZg50Atvg+BJCksqOnLl2QIWFbIflpHS4CZCasfutSEErjuTTYCGCP7yZAUxPbpfwGDHN58DeBd3AB32hxPbmDC7iAbJ3cBWXMPFHOXhB3wi002OCKfzxYJG9AjeWLfA/gOgK8B1CdQYQ7eElsX5Szv/icL6hPLrbcZ/f57aRziegNNDHArmBiWTqHiAQIHHEkMHBEAgSOSIDAEQkQOCIBAodJAFJeLB4RACoCpPlWqWdx1rLXfjZ0dM0ijZhLFARIcVhuDvMIDlkjb+ACvoYXcejxQglzeGHbGIHcPmZ5hA15je0Q0V8RiOhFyvbFtY0ep+JewtWovOt3/1jl8bAchVGJ7hEI9CINCHSPbG+n3qFzlDllU6tSfqfapXw79dP5n7nT7WmSNlwv5CTKl8q/pdYOocCOkwCA8wDeBAC8BAB4Exs4X9vKdAObuIkreASXcIgruN6oq/mk0ukkqI9Afzz/S8Avvzqd/30S/ObyHwewkstXFmu8fpLIfAEpDnFfedHRPWxgRdsJt0CKQ9zBBezgClvJlO9UX9+t/re13/9h7JU7aXmEDXlXsEvVoukR8Zu4ZL7w7H0VtpfK2ObL6O8Wr883mrQ8Hpaj8AZm78O4jzfxLDbAv5Gjmg1wAWDcomrrX7A1tIuLyh28jmv5g+AbuBZfFh8K4nyAwBF9AYEjEiBwRAIEjkiAwFERwPU+gK7yJ3G9lF/Hk8cun3T5pi1vi1yn630AXeWubeYmLZ90+aYtb31kHxeJQ/U+gK5y10aTk5ZPunzTlnc4skvA5bJDSJQRvMvMNxWm/IU8boIXDPmzin4wZ5/l1FvkSYv4l9n4XPlc5Vfz3zz+20iUELb4klzNBW+VhsgGgqrRoKT2S5dzGSnkCYDnAbyunRmffp/4bv1qiKbxE/ALzKjBb1K01OV/AgD4a2v9FWc38Q7GskhNJYD+Lup6Blxy4AW8DuB5vCZWsK2C3PoTVpuvAdz6ZQJ0r5+kPN9O/jjeUcw/FgKc7K5CwYfK/+YgZ48gQ12O3kZDony2iU8ecV1usj8VZI/jnmb+sWDcl4ARgFtofwno3sXb81fX0K4Ll/T79SCuHsqW/uO4p5l/DD1AdhP4Kit7lfkmyZ8HcBM382+q/HUlFjFnX1ekLjlEOVi5nn+qnX1Vk7jkbeunKB+1lr+jmZ9PtSmCeAyb9mPopOWdxwEWfyBm2gNRk5Z3JgDoSbpeKr9OT9aCdpVfpFul/BYziDFp+aTLN215yyNOCAkc0RsYOCIBAkckQOCIBAgckQCBIxIgcKjOoLrTUcesyyNaQPcGLpffjtjQXeURM4f6JaCb6Y6cGrq13KSzhggNJgFcBjzCkShfxpHSD9ThMqA6JYoDtfT1R1hgEmAZEA24jGVRfoRlkSAEecJE7qGwIq47HjPql4DlFlr02LKGbu3XRaCIhtDfF6BJamFnXR7RAtEbGDjiQFDgiAQIHJEAgSMSIHBEAgSOSIDAMb8E6MUBoXFAJ0D3cTZCH4T+xPPdwz5WJ55KANAJsJr/TRuu1p2Z/2Da2VwE6ATYz/+mC1frjuYfI3x7AEKv9tcMzKokFpl57TQszB/vAcYCfUbQPhLss26WhPlrhi2vUIX5V0X5QbwHGBd0Akg9wGppmuKvWSe8VztTJ1FP0c9RTDd/vAiMAbPUA0TzTwG+PUB3uN/f0cz8PUu4iEbw7QGOA1Lvwpk/3gOMAfqEkB4O0JvJzpXyTt/8jOiIOCMocMyvLyBiLPh/gj9Qphd3t8gAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTMtMDItMDFUMDU6MzM6MTAtMDg6MDApYMCSAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDEzLTAyLTAxVDA1OjMzOjEwLTA4OjAwWD14LgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAASUVORK5CYII=');
77
+ background-position: -32px 0;
78
+ margin-top: 0;
79
+ top: 0;
80
+ font-weight: normal;
81
+ }
82
+ .ui-datepicker .ui-datepicker-prev span {
83
+ background-position: -96px 0;
84
+ }
85
+ .ui-datepicker th {
86
+ padding: 0.75em 0;
87
+ color: #fff;
88
+ font-weight: normal;
89
+ border: none;
90
+ border-top: 1px solid #32373c;
91
+ }
92
+ .ui-datepicker td {
93
+ background: #f1f1f1;
94
+ border: none;
95
+ padding: 0;
96
+ }
97
+ .ui-datepicker td .ui-state-default {
98
+ background: transparent;
99
+ border: none;
100
+ text-align: center;
101
+ padding: .5em;
102
+ margin: 0;
103
+ font-weight: normal;
104
+ color: #32373c;
105
+ }
106
+ .ui-datepicker td .ui-state-active,
107
+ .ui-datepicker td .ui-state-hover {
108
+ background: #0073aa;
109
+ color: #fff;
110
+ }
111
+ .ui-datepicker td.ui-state-disabled,
112
+ .ui-datepicker td.ui-state-disabled .ui-state-default {
113
+ opacity: 1;
114
+ color: #999;
115
+ }
116
+ /* Other Datepicker Color Schemes */
117
+ /* Blue */
118
+ .admin-color-blue .ui-datepicker .ui-datepicker-header,
119
+ .admin-color-blue .ui-timepicker-div .ui-widget-header,
120
+ .admin-color-blue .ui-datepicker .ui-datepicker-header .ui-state-hover,
121
+ .admin-color-blue .ui-datepicker thead {
122
+ background: #4796b3;
123
+ }
124
+ .admin-color-blue .ui-datepicker th {
125
+ border-color: #52accc;
126
+ }
127
+ .admin-color-blue .ui-datepicker td .ui-state-active,
128
+ .admin-color-blue .ui-datepicker td .ui-state-hover {
129
+ background: #096484;
130
+ }
131
+ /* Coffee */
132
+ .admin-color-coffee .ui-datepicker .ui-datepicker-header,
133
+ .admin-color-cofee .ui-timepicker-div .ui-widget-header,
134
+ .admin-color-coffee .ui-datepicker .ui-datepicker-header .ui-state-hover,
135
+ .admin-color-coffee .ui-datepicker thead {
136
+ background: #46403c;
137
+ }
138
+ .admin-color-coffee .ui-datepicker th {
139
+ border-color: #59524c;
140
+ }
141
+ .admin-color-coffee .ui-datepicker td .ui-state-active,
142
+ .admin-color-coffee .ui-datepicker td .ui-state-hover {
143
+ background: #c7a589;
144
+ }
145
+ /* Ectoplasm */
146
+ .admin-color-ectoplasm .ui-datepicker .ui-datepicker-header,
147
+ .admin-color-ectoplasm .ui-timepicker-div .ui-widget-header,
148
+ .admin-color-ectoplasm .ui-datepicker .ui-datepicker-header .ui-state-hover,
149
+ .admin-color-ectoplasm .ui-datepicker thead {
150
+ background: #413256;
151
+ }
152
+ .admin-color-ectoplasm .ui-datepicker th {
153
+ border-color: #523f6d;
154
+ }
155
+ .admin-color-ectoplasm .ui-datepicker td .ui-state-active,
156
+ .admin-color-ectoplasm .ui-datepicker td .ui-state-hover {
157
+ background: #a3b745;
158
+ }
159
+ /* Midnight */
160
+ .admin-color-midnight .ui-datepicker .ui-datepicker-header,
161
+ .admin-color-midnight .ui-timepicker-div .ui-widget-header,
162
+ .admin-color-midnight .ui-datepicker .ui-datepicker-header .ui-state-hover,
163
+ .admin-color-midnight .ui-datepicker thead {
164
+ background: #26292c;
165
+ }
166
+ .admin-color-midnight .ui-datepicker th {
167
+ border-color: #363b3f;
168
+ }
169
+ .admin-color-midnight .ui-datepicker td .ui-state-active,
170
+ .admin-color-midnight .ui-datepicker td .ui-state-hover {
171
+ background: #e14d43;
172
+ }
173
+ /* Ocean */
174
+ .admin-color-ocean .ui-datepicker .ui-datepicker-header,
175
+ .admin-color-ocean .ui-timepicker-div .ui-widget-header,
176
+ .admin-color-ocean .ui-datepicker .ui-datepicker-header .ui-state-hover,
177
+ .admin-color-ocean .ui-datepicker thead {
178
+ background: #627c83;
179
+ }
180
+ .admin-color-ocean .ui-datepicker th {
181
+ border-color: #738e96;
182
+ }
183
+ .admin-color-ocean .ui-datepicker td .ui-state-active,
184
+ .admin-color-ocean .ui-datepicker td .ui-state-hover {
185
+ background: #9ebaa0;
186
+ }
187
+ /* Sunrise */
188
+ .admin-color-sunrise .ui-datepicker .ui-datepicker-header,
189
+ .admin-color-sunrise .ui-timepicker-div .ui-widget-header,
190
+ .admin-color-sunrise .ui-datepicker .ui-datepicker-header .ui-state-hover,
191
+ .admin-color-sunrise .ui-datepicker thead {
192
+ background: #be3631;
193
+ }
194
+ .admin-color-sunrise .ui-datepicker th {
195
+ border-color: #cf4944;
196
+ }
197
+ .admin-color-sunrise .ui-datepicker td .ui-state-active,
198
+ .admin-color-sunrise .ui-datepicker td .ui-state-hover {
199
+ background: #dd823b;
200
+ }
201
+ /* Light */
202
+ .admin-color-light .ui-datepicker .ui-datepicker-header,
203
+ .admin-color-light .ui-timepicker-div .ui-widget-header,
204
+ .admin-color-light .ui-datepicker .ui-datepicker-header .ui-state-hover,
205
+ .admin-color-light .ui-datepicker thead {
206
+ background: #e5e5e5;
207
+ }
208
+ .admin-color-light .ui-datepicker td {
209
+ background: #fff;
210
+ }
211
+ .admin-color-light .ui-datepicker .ui-datepicker-next span,
212
+ .admin-color-light .ui-datepicker .ui-datepicker-prev span {
213
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAYAAADvl7rLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMUIxRjI2RjhCODYxMUUzQTEyNERCMDU1QzdBQ0EyMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMUIxRjI3MDhCODYxMUUzQTEyNERCMDU1QzdBQ0EyMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjExQjFGMjZEOEI4NjExRTNBMTI0REIwNTVDN0FDQTIwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjExQjFGMjZFOEI4NjExRTNBMTI0REIwNTVDN0FDQTIwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+kKfR4AAAHcRJREFUeNrsXWuMXsdZnuMu4CUN2S0t0a6o4sQqAaooTncrKGrUNbe2qSC2uQqpqtexbCqI0xaQEBclKUL8qts6stqNkuwWiYqbajtqS9oAuyEISrubrLmUFnBSfmRXFa12KT+cKk2GM9mZ7ng858w7l3PmnO88jzQ633e+8565vs+8M9+8MwXnnAEAMEzsQREAAAgAAIABYkx9OHXqFEoDMDFVho0yTJdhE8UxOjhz5gwsAICk/Exep1AkGAK0DY6G93L+eUblnw4gATPNqMceEsBURMVxSwhFbO8TEj838j4V8B6eQHF1RWyzDnTl3zRIIDTNsCJ6RABdMf+mM6XBjNfsDXP1wm2hkEGN+ze1eyFpngYJ9IcAYs0/vQEVkenz7X1SwRZv2xNhqeJNVRcxac5Vj0AAAcSYf13pBVMMPfS8xyhhaFpy9pqhQ6CqNOe0ZgBPAgg1/7rcC8aQQJEx7lzkGzoEqkpz7noEPOcAmhhPxjTGzcA42zR/m0jDZkSPGZPvmCFQVZqh/B3EWMfTV6CKvm2F5LJAQhYCmWlGPYIAAJAPMMQhAAAAIAAAAEAAAACAAAAAAAEAAAACAAAABAAAAAhAA/zI8+wHoMcL772BEkBsA0i1J0CsM0yIAvGa0CZ55doPIIU7uF7uIJKeEUCKBpDS6yumEW4kTPt0S+mOVf7YtG84voekHXsB9IQAUlXeZgMk0JYC2dIe6swS2vBTK79P2mMdmTZayBPQEAGkrLyUJDDdkvLb0h7ryRZCAtOZlD/F8G264TwBDRJAURNYJhLwbcSpepqU+wFs9KDcqhR1OkHa4Q7cQbTlDRjjVRa6H0BuFInKbTqQ0IpE8YYqrl7n8CgcOAHkVKK+I+d+ACj/AQ4BAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAeg1sCw64IJYBFwPNt4li1Mp/DJUPBSAoQUwZ8AwKlCLOQdT5HmLlh1ZCikM6eUsyOXqUJvMRW/660hcRaUlBHDyjEqdsuzxTW+O+BJCi8lOdyRcSf5GoAaWqhJAelCcsvyKB8sQocmzeU7SBWAuorbabmjxqy3+spcrnERkPbUhFR8z3UAVIMQ7NVQbcEneRIO/UvBSW/PuWAw+U54naQJFgCFZVlgV1DiDH2LlI/K5UzNlmL55ScYtEaQ9VoFTpbbsNhHaCqdKdoh045fe0pPxFBiKJnXtIwcAx6SgSpD+VCR3bA8XmPdUkZB+sv9TzGLV135QFUHTgXTl7z5Tx5yzH0PynznvRkTJscx4lZvhHjnesw4XXFRTIP/I/qvFiJSAADBggAAAAAQAAAAIAAAAEAAAACAAAABAAAABDIwB1suvQT3WNXU3YZ6RqA6m8QtuML/Zk6N60P8rhoBs9bABdJZO2G05omadsA0Vg/DZvuKkW4lZyKY7GM9Ocwx14inm6A28Q7zVdCSGVzztKAr7pmkqYh5DyT9kGeIDy1x1QO9Vg3E1YQDmPRXceklt3OGjV91w9H6Ugiw5aAr6706Q42Ti2/FO1gZCdeTYqLBkfIoptBzEWUGia60z/UEvOVZaNTwKGNIC6sVdo5fNMSp9SAXwbQS4yrMt7G+vbiwTtILUV7Itp4r1G5gCaVP62HCtiG38KBs6xFx5FCbpo9VQ1dNv4e7qFdhBjAcWmWcA8Xj3FMe/WuYw9HWwAdZMvoZWfk4FTKUCKrb24R/2lMEFD0rtZU9Z9PCo+9nj1IlDeVZaNEkATPb5vQcb0eKkYOCQdmyy9uedbH6kIkEeUv82nfbPFNKQq981Ew+DQ4V/tMe9jDTJnFzazYJEkkGszkk2WvucqPOOf1sa9PgTYtf0D+riZSGvx4mAQoE0SAjoGLAUGABAAAAAgAAAAQAAAAIAAAAAAAQBAVnAUQfsEkMobLdSjKlWl6/GjIYUpX+6yCz0hCfUeSACpvNFCPapSnYmnxy/eN83SHFLat14s9njwgsUf8JpCgXlLaR88AVR5o/n6NKf2KQ+NX5GJz8KWlCfqhnok8kRxhypwEdgTV3kDxigwi6w7kECCOQDfjQ1iPKpsCt/WxgrcQn4pThj2aYS2k3lTmNJNPEvNrw+BxJ7KDEQQQJ0LYRs+0dNaXLEbK8QoSpHAjCwSKVauHoxnym/Kd6QYjgyKAKq80dpi4VhvuBSurLlNxqLCAuEtNvqu9cQ8sO5SHfM+qCGAbbzssyXSlFFpIRsihO4HkMqVNbbx8wQkEDoOjm30tmGQ7xCCB86rxMjWkQCD8l8NH2/AjcAKjPGlZwHviXFlTWmG6uWQwowtAuOPSXusK23oxjAxsk0ORwZNAG1MIqV6X1dcWYvM70mhwLn86aGwGYcAAAAlBAEAAAACAAAABAAAAAgAAAAQAAAAIIDRxwTD8lFgoASQ0g871LGGJ5T1fYdQ/i02On+HxZ50CwyIAGIP1kzpCDOZqXy2LEQyEamAOWR1bIAEAAoBxKyfjlnPbfbUqhee9FAUcxmpz9l6usk/aXnHlmf85r0YQk1lPW2g6QNVBMAjeyCbPzj3JBSlbLryb0dYH769vpLflnGHnCxr5t0n/3V7ErjSkmo7N2AAGCOY/TygF09hRTCL8ucYi2+zdA41VOWvKjdX+ZvbsBUV9TuNpg/YCMBstFWffUzQWK+0WMSOu32tj7q8u8qhqpenluFGTb4LTfk30fQBGwHUKV0R0fCLSDLIRSCFQQKcMBfBa4ZCrrzUlU8XdtcBBjAH4OqNQhXWd0+8mP34YuQnLbJbWh62CUpW1NwriKQTgqrt3KD4gDcBxI7fQ7elKioCi5APGfPrsqn+hiwSP2cidjs1AEOA6IZYJG7UOREzB5ALmww9PpCIAIYOKBIw2CEAAAAgAAAAQAAAAIAAAAAAAQDNYoZdvZZhpkfpF5PLe42ACeeOE8Aho8Ety3tt4/0szoc/FiKuBVa9l8BMC8q/arm/6hH3TEbyEIr+rTLcXIbLMtws740Fpj8kHzcZsjd55iNEPjZOgV9whJg8XKVLeoWcK8P7yvC0/D4h79lg+3vskOX5w2U475no32dXH8t1kvktB64jDNc75svwL2U4UfH7LWVY81ReHbMR8qsOef250KPNRKO5VPP7/jI84yCA15dhvQzj8p4ggQNl+LIkAuaZfp98VNX9JY82wCxlcIkgFyJj4s/l9aTsiFLWY1FHAExTfoEV5rcCjkog4r0HA5jRlwTGLfcuE+QWy/BgYO+3qhW0uSJPnXa8WpMHpeCrNeSxyppdn3Cpouz0MnTFr5T/Go3Y1h3vrStPlXcKmjiVqm+Hy1aROLextVlxOrY8C1kp/5dlQwldQrvX+L4Q8I7vCIzbZQG4cLiCqLj87ZxDfq2CBCg9P69ogL7nFIqy+4bl/vd4lMM18nkR33cHluUdEcO4GIIIdYcviGkpWlT+nyjD39SZa4yo9FQo5Xe9pyASwGRg2sYD0x9jAQh83kICSvk/T3yHSQIU5dcx4fhOKbvrI8pUmPtfK8Pb5fe/kveYR/6ZhYR8ymDWsKhmCcOzvsNU/l+UdVZJAqlnZqnK76O8oeaU3us826IFYJIA81R+G0n6TuLtd3ynWGD/bdy7waPnvygVfl0jBHHve8vwPLH3rduZqs0l2inM+dh3/EoZPu45b3FSG4J9Urt/xfC7ib8Btzwadp3yqjCuffbBd2nBpwdbjFR+gSmNBJTy+2zEKRReOPUckmGTtTuTL8rpB40wTig/kcfvl439G1LxD8h2xuVvoRuSznoq/r6Ka+xwNMc7/iSA+MWw+TvZ7qSiUv6VJi2AVJM04wni+VLgO2MtgCm2u+OO3utvEhv/TI08lQRe6/juakSXDHNenx+qsya+T3vO9k/BunxfyI5Eucz3y5nf4bMvxzNG/S3UKX8oAcxGmDkU5f8DqYBVv6UimSbmACjjzNkG5XVFrPvuakT63MWYTJPr7z+dJFzPuCbSeIK6/cuKK7UTWKy43+Y7QvCMhcStyv9yYXK+U9anTp1iwBXj7VsqfhfktDaQsuBar/9MT9OeqmPoG9SEoFX5z5w5k20I0HWsGdcho0Dae4tnKGUAXwAAGDBAAAAAAgAAAAQAAAAIAACATuAPZchCAOqU3NgjsUNg+i23vSeADcpHnbIYZ5bZ/bAp/+EfYtV7EXDm3qPhhEOeusCpypf8pp7IK/xRZPuZk6FtXFuG35Hh2sh3HdXCFRirUf4trcFST+gVm4gIBxB95dP9bMcD7kZ5pfhzi4U4a1qlndQUsKiRUygaUH61QMfljivK7AtGWlTaxP03svrFPue0PJtYIJShy3NygdEWOqmFJLoTzzqj+7jnllf4baNNCCVYIij9smzzy/LepNSDykU1hu6oOnxQku6C9h7KOROfNj7fHqH85oIkkf6vvFwoloVAuvLr3mirhMSLlwk/+Lrz50M3dPCRV0r3a2U4q13FfgWnPRvQjCQjteGJyzOv6mBPah4oPVVByP/nyvCjbMdF+7Yy/EMZfozRnWk423XiUTK3MvdKPpu8Qoi8+D/7BbbjonyTh7zZ+NUKvMWG26Ape9JCykWN9eYi8JOMvlJVtVmR9/NSr8XnpbqFQKbyq15vVv7WxgKLqn0EfLwM3ySJ6D/L8O9sx7tNrOJ71lP5Rd7Vzka+brm58Ndl+JEyPCaV6DFZHn8bOBzTFTJUXuCWAHmh/M8HyJk936Jn+9vybJuhFpmOGxI9o3CPluZDhpWybZsDWGDV69EVCSy00IC3ZdiSYZv5H8/1j2X4uTJ8VjaGT0r2PBeg/Oc0S6AP+Em2s/b9bdJ8FFfhTkrdYONmS2/lQ/ymvAqvCJAXPf9e5rfBy9EahXetxZ8zlN88X3KrwTmB3y3DB2p+/4B8xoV9Mqh0npblMS+HP9tVcwAnLeNZphHCWsXYtItQFsBXy/BP0pQU138LUP6Ynp+zMH/wSW3uxdcCEi6gP1+GP5VKL66/xGhuqcJj8UvamFu59CrzPUReKP6LEfL6HICv8psK/2QL1utWgHWr8Jtl+I2a30LIr5K8Xb4AIY1+SzOZ9xkm98EWFH+WoGwfb0n5Y0nAtIqo+C22sxmEmNi5Xl7Ffgq/V4YjNXJi/uY5456pdPs7LG9T/iXPcl4xlJhbFHjbUU9VJECZANT/cft7eX2zabo78q+P+VfqImvCGeh5trsT8Fci5wxC9hRci4xTWTuhyi9m+b9QMxZ+Y8PKr8qdSetHv/6MQ+45Y7z+r57x5pZf1Ig2RPkplhZlHsxGAtTZf9E+XirDu9nuZJ+YHPyI/O1xot6oMf9hXwKo2hBR78maxMmantJn+GGm1TftoT3/ag0JuP4CVD3cJa3xbHn0gLp83e8uiJ54M6IOc8nPJ1B+ZakuG0qs/w1IJW19GEclcTHp+ctl+Avt3oPyPS8Q33FaK4/aeFPvByDGiRcZAIwO5rShQR9wVPtcSYJN7QcA5QdGDSs9S6+X5QNfAAAYMEAAAAACAAAABAAAAAgAGCno7sVzRJk5drUb7s2J0uPzV2wX3MAHSQC3WhrArRnSxwfYCNQ+DI8Y9x9h/nsz3Meu9H1YJpDAj8vnjsjwOhnE8twfIsSpt533Vih/YQQdwnPxHVL+TTJwee82QvwzlrZLPVDFtReDaz8GinzsOw556g2v0yPbOgC15nulDB+W9xZlwzPdOykJ8WV9m3zMO3LgqCwzVV6qTCkLVPQ8i3cck8o/71kWKg0KYj+GZwnyIv5rLPe/VYZvMporrYj3UUk+qgz09NT51KdwBzdXkFK9WDmju5tT47Zhy/EOtZpR30BmVbtfEPJvi+Pb7thqHYDNAlDKLypJLOn9Wba7BnmdARQsamV5VCu3RQ9ZJpXeVH6qW+s+47uPG/TzUtkvy/BNSQBUPMp2l4NPsqv98ldaqIP9bNeblHlaA+buT75W6LbMp+7J6uPRyo20zBDJ0YQ4i3FaC/9DHQJ8WDM71RFH8y0pT5W50sZwgBODCwcqFJbiT3+MVXuzKYuAMoy4N7IcXtK+v8Toh2t+SPb8qpzuNZR/ifCO8Yrgg1XP+wp72ZW7P+3V4qce8inK/7Rm0jPmdzhpETF/UkjiEW3tNWzHGew1WrgCdSsBdeU/Rhx7VLFUm6Z8ivMJY3GRXX023LzH8OlYpPLbNnVhmvldhz+TCm/6DFySyu2CGPdfsMw5+KzPF77/L7A8uMby/Wvy86uJ73iP9lmQofIsvZFoBfAKsqJ0Pspa+LpG3nuk8j/Fdrboq50D4DKRE0ajU5XZxpZeLOIdvEFZah6qfOepcyh/XIZ3Wu4L99DbA5WfqoAi7fdU/PZ+tutp6Jt3KoHp4+gXtfsvyOEIdQ6gapztGsPfWPM8Z/UernrcVcO797UwB/AG+fmr2v3n9LZbNwdwQBvzPyp7fqX8B4jKYc7uVs34UuV93lE4QowsNQ/rFSb8eoDy61aE8At/0jG5pCv/QdkgC4/eVxDUAzLdeqAov8qjauhM63HUfAZ1DC3C/7GdM+5f4WF+zzK/reNMvFKGZ+X1WuNzDKjD6Ng5gBukbl+vBSaJgbuGABeloq+zK/9C8v0HYMhQ5r8qs6fZ7r8ALrzT6PFFr/k6trspxJuJY1/X7rV1eFqm/3Py+w8QlV8nsRU5Dl6RQ4ctLf/HPN71dc+0rzH75itiQ1HXCcfCVNePprd9PkwYgt3o+J3SCXKP+za8lmTKNnw8+FD/BoyBMuNNc/9Jqfx1vuVc6wXXEtWdb/nr/1psa+NefbvsPTUNWd2/qwxfZDubuW4GtCVlKt9kmcsoHJOAr2e7e2Ay7bPYTq5ug9JDjLbnpNoxK+QddbKUoewVQ4CmjwcvMsv3EdsV+b695fJ6tWa++/yjIHr3v5NEtaiRldog43/LcB1hMuzhyPRXbQ3nOpzleXb1rlLUcj2foA7Ot6k3YwwAqk3vXw+UXaohN+ZQ/lQktsaG2YF4Ab4AAAACAAAABAAAAAhAwyFGXwGocIccA5rLZ5cY/WQaAAAyE8A5I1Bwdxk+VYZ3WX57l/ztbhQ7AHSbAN5m9PyH5D1Xz3/GuGdbOXfGwxJYldbDakDenjUskLkE5TWHJuNVb2ZYRdH0gwDUARyTbHddtutQjiMe8VKfnTGuPthnfF9OoPzLRBI4ajT8owHxxb4jVl4p7IxFuV2Y9bwPdIgA9N5f92F2WQF3VTQiTnw2NZT1MZngXXMagbhIQCia6bO/6KmAse9Q8qK+xuV1MYAEZiy9+QzUZrQJQO/pJ9iVa5dPBiphKE4GxqunXy0/XQk08+cM68G1xn7R837ds/OSwOY936GU/zNsZ2XbZzQS8MUa1GQ4BDBnjP31HVWUFdDmOPg/jKsvVNqFI85hovLrPbyv8qfGeWmBnQ+QfcLxndVYbLGbrsxo5LGmkQish44TwDKhB19uMX0rMv5YpTvI3GvPbWZ+TuVXhDvB/P+KFXiL43udxRa7hHZBU3jdnXUBKtddApirMKEnCGaywFmPeKnPzrG4GXzVmCm7sKywK3fLCVX+ec/7dc8uSitm0fMd4rnHyvBWtuPd9lb5PWRbt5mEMrAAOkwAyxUmtG1zBduzF2pMSsqzrCaeUKvD15w1SSCk51+yKJrvcdWx71jSSOCypvxLnuUnTPdZwzKgzAmYlkQqywJokADWPBuGicfLcJwge1w+SzXdGaOfyZ5q2HEw0uxfMhr9UoZ3xMoXzL6vAP7KGyGMJa5Y4cP9X3LM+h7jN7ErjJjMesJTGWN6jSKCBNBbAYMigFR4Qob3ongBEGl/hgAAAIAAAAAAAQAAAAIAAAAEAAAACAAYIOZYuG9AjCyQkQBEpVF931nNO3jNd6B5LLC49fdzLHwVZows0AELQFVgLBH4koYZ30RAGlTaJyz3eEAaFE4Q5U/UpIl7lIXvseRmfCdkmOuI8nOGXZV6NwRomwjM+IQjz0FNeeYIJucy2/UADEl/yjznIFJmKKCPInOtDEOtvirZAlZBf+cAVEM+0eLYc1lrMIXWmHlNz20+G6N4ZhpClLBtxWc15ZMTGP71nABWZK/6YEtpU/EdNBrQQWZfXlpUPBvjx2+mwRex8Y8SsCS4pwSw0nJDNuOb0Ex61+YgKxoRqDmAkPSnzPNKBiIoKoKP7MGIeA/WWAEHoXYdYuWK48G5bKz3RzRa8zjn2KPCgXhz27fs5yzDqjZkgYbhOh48RYUVMAF7b26vaNZUm7JAB+cAgGFihWFfBRAAAAAgAAAAQAAAAIAAAAAAAQAAMJoEEHqyLQAAPSUAsXruHu37DTJMeLxX92C7z1MWAIBMBKBO0zXPortR3qcq8gG2swhEnAVwr5S9NUF6XQ4lJ5jdjVaFEyMuDwBeMFcCnpbXfzbur2i/HyO896ImJ5YTn2M7J/Qe0H5rAmLzi8JBIPpptaMmDwDBFoDo3eeloqohgDDf1Uk+6/J3ihWgeqxH5PPKEWY9cDjg40oqDsO8Vl71z+I6XoZVh/y1Mj79HSr4yvMI+b2WK0UeAIIsgP3yqh/ceb/2+YLswfcTeiDx3G1s51TbeTmEOCyHAuL7BxvM06sqCKQgEskrjWthvIMRFFi/vsqTxFS8k4b8JMOyWqBBC+CSvN5Z8eydxnOuIcCS1ogFEWzL6+mGen6F6yxhQl43mPsMRPHsD7Pdo9H1dzxHkL9OyutXJe8bv/4eavwAEGQBbEszfY7t/PW3pP12VPbqK/I5quIWsucXcwD7yvAoCzujnoqTZfii4/e1EZYHAC+Y+wHcKsfpasx/Qfb8BzTT/qInAajvaiOIZYIpq5vstisAABGo2g/golTy+9jOX4FK8c/Le9QZ/Lq9AAoP+aorAACJhwA6CRxG0QDA6AO+AAAAAgAAAAQAAAAIAACA4RLAHWxnDYDpiLIkf3Mht/xb2M5KQ1P+g/K3UZfve/0NXb5VmOsA7i7DGYeMePCBit9yy99Vhocc8sfL8PCIyve9/oYu3xrUOgCdAAQ7fYoo/44yfNrCfDnlf6oMnyXK/3QZHh8x+b7X39DlsxCAPgQ4YrMQmH3xzRHivSq45I+zqxcPHXfI31mRfkZ89k6P9PvIFy3Ff8Qjfmr9FQnkWab411j1sWi+8RcJ2n8RqCutDQF4TaI5oXJ9HXfq5AvNJGaaycs948+V/lTxp0h/1Tuajr8gposFps8n/iKg/Yjff1X7/tGA9mc+Kzxkn3KQY6sWAPVosMJTSaoyR5XnxliXMjZ2pYdHKHcIScRWcJE4/b7vSJl2lqD9hKSfW0jABx8xCMAHb5DKblP+zmCMdRcvVnxuAzyBhZBKgXIrcEgHkKL8U8Qb60D27kA5ofxPd1356wggtgJ4ogZ4VF6X2O5fKzENKpQEeCISaav8eKTyxhIgz0AaLgskxIL6aGD+n9JIoLPKL6BPAp71kDtLvBcqr8b+izLo96rkH/ZQpoeJ93gCeRYhzzzkz3oQCqX+eEL5ttuPWX88g/xTNcp/tosEcMFDAS4Q71XBJf+QpQE+5JD/hIcCfoJ4jyWQ5y3Ff8Ejfmr98QTyLEP83EFATcvrJMAidaU1AhD/Kx8nyBxnV/8H3QV58b/qKYL8KWb/D7bv8n2vv6HLZycAZVrOsZ39/E18SP72sMM0zSkvVliJRRYfs/z2MfnbAyMs3/f6G7p8+5MlxlJgAAAGANtKQAAABgYQAACAAAAAAAEAAAACAAAABAAAwIjD5QtgA2V9O+Tj5AEgKwEIjFvuXfZ4d255AAASDAFyKt3lBGnI2ePiSDOg1wQQq4CXtRCCcSk7nkkBq7aEokI/1BQAekcA4zXmOFWBxyPkL2skEKqAjMXtI8BZvg0pACD7EGA8Y/rGE6QhZ+/LO5AGAKjEWINj/9zyAAAEEkDKDS0hDwA9HgIAAAACAAAABAAAAAgAAAAQAAAAIAAAAEAAAAVTDAuDgB4QQBdWsYm4Z7TrKCj/Rhmm0fSArhPAtHFFzx1Hhrryb6I4ga4TwIZxHbryx/TcUH5gEBYA13rKumvTwwZXCFXejQTKjzkAoDMYc1gAhXaloCBem8RsQz1/iAVgU37MAQC9IIBQC2DaojTmtUkzeNWDqHyV34cM65QfwwAAFkCHLQAoPwALIMAC6ALWEryjSeWf8nwfAPTGAhgVhFouVOXHHAAACyBAEbsO08x3fQeAvD0d5/hHCgCGCvgCAMCA8f8CDABatG6NN+gY2wAAAABJRU5ErkJggg==');
214
+ }
215
+ .admin-color-light .ui-datepicker th {
216
+ border-color: #fff;
217
+ }
218
+ .admin-color-light .ui-datepicker .ui-datepicker-title,
219
+ .admin-color-light .ui-datepicker td .ui-state-default,
220
+ .admin-color-light .ui-datepicker th {
221
+ color: #555;
222
+ }
223
+ .admin-color-light .ui-datepicker td .ui-state-active,
224
+ .admin-color-light .ui-datepicker td .ui-state-hover {
225
+ color: #fff;
226
+ background: #888;
227
+ }
228
+ .admin-color-light .ui-datepicker td.ui-state-disabled,
229
+ .admin-color-light .ui-datepicker td.ui-state-disabled .ui-state-default {
230
+ color: #ccc;
231
+ }
includes/admin/meta-box/css/divider.css CHANGED
@@ -1,7 +1,7 @@
1
- /* =Styles for 'divider' field
2
- -------------------------------------------------------------- */
3
-
4
- .mashsb-rwmb-divider-wrapper hr {
5
- border: none;
6
- border-top: 1px solid #e6e6e6;
7
  }
1
+ /* =Styles for 'divider' field
2
+ -------------------------------------------------------------- */
3
+
4
+ .mashsb-rwmb-divider-wrapper hr {
5
+ border: none;
6
+ border-top: 1px solid #e6e6e6;
7
  }
includes/admin/meta-box/css/file.css CHANGED
@@ -1,58 +1,58 @@
1
- .mashsb-rwmb-file li {
2
- width: 250px;
3
- margin: 0 10px 10px 0;
4
- -webkit-transition: width .25s, opacity .25s, -webkit-opacity .25s;
5
- transition: width .25s, opacity .25s;
6
- }
7
- .mashsb-rwmb-file .mashsb-rwmb-icon {
8
- width: 60px;
9
- text-align: center;
10
- vertical-align: middle;
11
- overflow: hidden;
12
- }
13
- .mashsb-rwmb-file .mashsb-rwmb-icon img {
14
- max-height: 60px;
15
- max-width: 60px;
16
- }
17
- .mashsb-rwmb-file .mashsb-rwmb-info {
18
- width: 180px;
19
- vertical-align: top;
20
- overflow: hidden;
21
- }
22
- .mashsb-rwmb-file .mashsb-rwmb-info p {
23
- margin: .1em 0;
24
- }
25
- .mashsb-rwmb-file .mashsb-rwmb-info a {
26
- font-weight: bold;
27
- text-decoration: none;
28
- }
29
- .mashsb-rwmb-file li,
30
- .mashsb-rwmb-file .mashsb-rwmb-icon,
31
- .mashsb-rwmb-file .mashsb-rwmb-info {
32
- display: inline-block;
33
- }
34
- .mashsb-rwmb-file .mashsb-rwmb-icon,
35
- .mashsb-rwmb-file .mashsb-rwmb-info {
36
- margin: 0 0 2px 2px;
37
- }
38
-
39
- .mashsb-rwmb-file li.removed {
40
- width: 0;
41
- margin: 0;
42
- opacity: 0;
43
- -webkit-opacity: 0;
44
- -moz-opacity: 0;
45
- -o-opacity: 0;
46
- }
47
-
48
- .mashsb-rwmb-file li.removed:after {
49
- content: ' ';
50
- position: absolute;
51
- top: 0;
52
- left: 0;
53
- right: 0;
54
- bottom: 0;
55
- z-index: 2;
56
- opacity: .4;
57
- background-color: #f00;
58
  }
1
+ .mashsb-rwmb-file li {
2
+ width: 250px;
3
+ margin: 0 10px 10px 0;
4
+ -webkit-transition: width .25s, opacity .25s, -webkit-opacity .25s;
5
+ transition: width .25s, opacity .25s;
6
+ }
7
+ .mashsb-rwmb-file .mashsb-rwmb-icon {
8
+ width: 60px;
9
+ text-align: center;
10
+ vertical-align: middle;
11
+ overflow: hidden;
12
+ }
13
+ .mashsb-rwmb-file .mashsb-rwmb-icon img {
14
+ max-height: 60px;
15
+ max-width: 60px;
16
+ }
17
+ .mashsb-rwmb-file .mashsb-rwmb-info {
18
+ width: 180px;
19
+ vertical-align: top;
20
+ overflow: hidden;
21
+ }
22
+ .mashsb-rwmb-file .mashsb-rwmb-info p {
23
+ margin: .1em 0;
24
+ }
25
+ .mashsb-rwmb-file .mashsb-rwmb-info a {
26
+ font-weight: bold;
27
+ text-decoration: none;
28
+ }
29
+ .mashsb-rwmb-file li,
30
+ .mashsb-rwmb-file .mashsb-rwmb-icon,
31
+ .mashsb-rwmb-file .mashsb-rwmb-info {
32
+ display: inline-block;
33
+ }
34
+ .mashsb-rwmb-file .mashsb-rwmb-icon,
35
+ .mashsb-rwmb-file .mashsb-rwmb-info {
36
+ margin: 0 0 2px 2px;
37
+ }
38
+
39
+ .mashsb-rwmb-file li.removed {
40
+ width: 0;
41
+ margin: 0;
42
+ opacity: 0;
43
+ -webkit-opacity: 0;
44
+ -moz-opacity: 0;
45
+ -o-opacity: 0;
46
+ }
47
+
48
+ .mashsb-rwmb-file li.removed:after {
49
+ content: ' ';
50
+ position: absolute;
51
+ top: 0;
52
+ left: 0;
53
+ right: 0;
54
+ bottom: 0;
55
+ z-index: 2;
56
+ opacity: .4;
57
+ background-color: #f00;
58
  }
includes/admin/meta-box/css/heading.css CHANGED
@@ -1,12 +1,12 @@
1
- /* =Styles for 'heading' field
2
- -------------------------------------------------------------- */
3
-
4
- .mashsb-rwmb-heading-wrapper h4 {
5
- display: block;
6
- font-size: .75rem;
7
- line-height: 1.4;
8
- border-bottom: 1px solid rgb(230, 230, 230);
9
- text-transform: uppercase;
10
- padding: .75rem 0 .375rem;
11
- margin: 0 0 6px;
12
  }
1
+ /* =Styles for 'heading' field
2
+ -------------------------------------------------------------- */
3
+
4
+ .mashsb-rwmb-heading-wrapper h4 {
5
+ display: block;
6
+ font-size: .75rem;
7
+ line-height: 1.4;
8
+ border-bottom: 1px solid rgb(230, 230, 230);
9
+ text-transform: uppercase;
10
+ padding: .75rem 0 .375rem;
11
+ margin: 0 0 6px;
12
  }
includes/admin/meta-box/css/image-advanced.css CHANGED
@@ -1,43 +1,43 @@
1
- /* Image */
2
- .mashsb-rwmb-image-item {
3
- position: relative;
4
- float: left;
5
- padding: 0;
6
- margin: 0 5px 5px 0;
7
- box-sizing: border-box;
8
- width: 150px;
9
- }
10
- .mashsb-rwmb-image-item .mashsb-rwmb-media-preview {
11
- width: 150px;
12
- }
13
- .mashsb-rwmb-image-item .dashicons {
14
- font-size: 20px;
15
- width: 20px;
16
- height: 20px;
17
- }
18
- .mashsb-rwmb-media-bar {
19
- position: absolute;
20
- z-index: 10;
21
- display: none;
22
- right: 5px;
23
- top: 5px;
24
- color: #fff;
25
- }
26
- .mashsb-rwmb-media-bar a {
27
- text-decoration: none;
28
- color: inherit;
29
- }
30
- .mashsb-rwmb-overlay {
31
- position: absolute;
32
- top: 0;
33
- bottom: 0;
34
- left: 0;
35
- right: 0;
36
- background: rgba(0, 0, 0, .6);
37
- display: none;
38
- }
39
- .mashsb-rwmb-image-item:hover .mashsb-rwmb-media-bar,
40
- .mashsb-rwmb-image-item:hover .mashsb-rwmb-overlay {
41
- display: block;
42
- cursor: move;
43
- }
1
+ /* Image */
2
+ .mashsb-rwmb-image-item {
3
+ position: relative;
4
+ float: left;
5
+ padding: 0;
6
+ margin: 0 5px 5px 0;
7
+ box-sizing: border-box;
8
+ width: 150px;
9
+ }
10
+ .mashsb-rwmb-image-item .mashsb-rwmb-media-preview {
11
+ width: 150px;
12
+ }
13
+ .mashsb-rwmb-image-item .dashicons {
14
+ font-size: 20px;
15
+ width: 20px;
16
+ height: 20px;
17
+ }
18
+ .mashsb-rwmb-media-bar {
19
+ position: absolute;
20
+ z-index: 10;
21
+ display: none;
22
+ right: 5px;
23
+ top: 5px;
24
+ color: #fff;
25
+ }
26
+ .mashsb-rwmb-media-bar a {
27
+ text-decoration: none;
28
+ color: inherit;
29
+ }
30
+ .mashsb-rwmb-overlay {
31
+ position: absolute;
32
+ top: 0;
33
+ bottom: 0;
34
+ left: 0;
35
+ right: 0;
36
+ background: rgba(0, 0, 0, .6);
37
+ display: none;
38
+ }
39
+ .mashsb-rwmb-image-item:hover .mashsb-rwmb-media-bar,
40
+ .mashsb-rwmb-image-item:hover .mashsb-rwmb-overlay {
41
+ display: block;
42
+ cursor: move;
43
+ }
includes/admin/meta-box/css/image-select.css CHANGED
@@ -1,21 +1,21 @@
1
- .mashsb-rwmb-image-select {
2
- display: inline-block;
3
- width: 80px;
4
- height: 80px;
5
- float: left;
6
- margin: 0 10px 10px 0;
7
- border: 3px solid #d8d8d8;
8
- border-radius: 3px;
9
- padding: 1px;
10
- }
11
- .mashsb-rwmb-image-select img {
12
- width: 100%;
13
- height: 100%;
14
- }
15
- .mashsb-rwmb-image-select:hover,
16
- .mashsb-rwmb-image-select.mashsb-rwmb-active {
17
- border-color: #0074a2;
18
- }
19
- .mashsb-rwmb-image-select input {
20
- display: none;
21
  }
1
+ .mashsb-rwmb-image-select {
2
+ display: inline-block;
3
+ width: 80px;
4
+ height: 80px;
5
+ float: left;
6
+ margin: 0 10px 10px 0;
7
+ border: 3px solid #d8d8d8;
8
+ border-radius: 3px;
9
+ padding: 1px;
10
+ }
11
+ .mashsb-rwmb-image-select img {
12
+ width: 100%;
13
+ height: 100%;
14
+ }
15
+ .mashsb-rwmb-image-select:hover,
16
+ .mashsb-rwmb-image-select.mashsb-rwmb-active {
17
+ border-color: #0074a2;
18
+ }
19
+ .mashsb-rwmb-image-select input {
20
+ display: none;
21
  }
includes/admin/meta-box/css/image.css CHANGED
@@ -1,67 +1,67 @@
1
- /* Uploaded image */
2
- .mashsb-rwmb-images {
3
- overflow: hidden;
4
- }
5
- .mashsb-rwmb-images li {
6
- margin: 0 10px 10px 0;
7
- float: left;
8
- width: 150px;
9
- height: 150px;
10
- text-align: center;
11
- cursor: move;
12
- position: relative;
13
- -webkit-transition: width .25s, opacity .25s, -webkit-opacity .25s;
14
- transition: width .25s, opacity .25s;
15
- }
16
- .mashsb-rwmb-images img {
17
- width: 150px;
18
- height: 150px;
19
- }
20
- .mashsb-rwmb-image-bar {
21
- color: #fff;
22
- font-weight: bold;
23
- background: #000;
24
- background: rgba(0, 0, 0, .5);
25
- position: absolute;
26
- top: 0;
27
- right: 0;
28
- padding: 5px;
29
- display: none;
30
- text-align: center;
31
- }
32
- li:hover .mashsb-rwmb-image-bar {
33
- display: block;
34
- }
35
- .mashsb-rwmb-image-bar a {
36
- color: #fff;
37
- font-weight: bold;
38
- text-decoration: none;
39
- vertical-align: middle;
40
- }
41
- .mashsb-rwmb-image-bar a.mashsb-rwmb-delete-file {
42
- font-size: 23px;
43
- width: 18px;
44
- font-weight: normal;
45
- }
46
- .mashsb-rwmb-images li.removed {
47
- width: 0;
48
- margin: 0;
49
- opacity: 0;
50
- -webkit-opacity: 0;
51
- -moz-opacity: 0;
52
- -o-opacity: 0;
53
- }
54
- .mashsb-rwmb-images li.removed:after {
55
- content: ' ';
56
- position: absolute;
57
- top: 0;
58
- left: 0;
59
- right: 0;
60
- bottom: 0;
61
- z-index: 2;
62
- opacity: .4;
63
- background-color: #f00;
64
- }
65
- .mashsb-rwmb-images li.ui-state-highlight {
66
- background: #ddd;
67
  }
1
+ /* Uploaded image */
2
+ .mashsb-rwmb-images {
3
+ overflow: hidden;
4
+ }
5
+ .mashsb-rwmb-images li {
6
+ margin: 0 10px 10px 0;
7
+ float: left;
8
+ width: 150px;
9
+ height: 150px;
10
+ text-align: center;
11
+ cursor: move;
12
+ position: relative;
13
+ -webkit-transition: width .25s, opacity .25s, -webkit-opacity .25s;
14
+ transition: width .25s, opacity .25s;
15
+ }
16
+ .mashsb-rwmb-images img {
17
+ width: 150px;
18
+ height: 150px;
19
+ }
20
+ .mashsb-rwmb-image-bar {
21
+ color: #fff;
22
+ font-weight: bold;
23
+ background: #000;
24
+ background: rgba(0, 0, 0, .5);
25
+ position: absolute;
26
+ top: 0;
27
+ right: 0;
28
+ padding: 5px;
29
+ display: none;
30
+ text-align: center;
31
+ }
32
+ li:hover .mashsb-rwmb-image-bar {
33
+ display: block;
34
+ }
35
+ .mashsb-rwmb-image-bar a {
36
+ color: #fff;
37
+ font-weight: bold;
38
+ text-decoration: none;
39
+ vertical-align: middle;
40
+ }
41
+ .mashsb-rwmb-image-bar a.mashsb-rwmb-delete-file {
42
+ font-size: 23px;
43
+ width: 18px;
44
+ font-weight: normal;
45
+ }
46
+ .mashsb-rwmb-images li.removed {
47
+ width: 0;
48
+ margin: 0;
49
+ opacity: 0;
50
+ -webkit-opacity: 0;
51
+ -moz-opacity: 0;
52
+ -o-opacity: 0;
53
+ }
54
+ .mashsb-rwmb-images li.removed:after {
55
+ content: ' ';
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ z-index: 2;
62
+ opacity: .4;
63
+ background-color: #f00;
64
+ }
65
+ .mashsb-rwmb-images li.ui-state-highlight {
66
+ background: #ddd;
67
  }
includes/admin/meta-box/css/input-list.css CHANGED
@@ -1,7 +1,7 @@
1
- .mashsb-rwmb-input-list li{
2
- line-height: 22px;
3
- }
4
-
5
- li .mashsb-rwmb-input-list {
6
- margin-left: 15px;
7
- }
1
+ .mashsb-rwmb-input-list li{
2
+ line-height: 22px;
3
+ }
4
+
5
+ li .mashsb-rwmb-input-list {
6
+ margin-left: 15px;
7
+ }
includes/admin/meta-box/css/jqueryui/jquery-ui-timepicker-addon.min.css CHANGED
@@ -1,5 +1,5 @@
1
- /*! jQuery Timepicker Addon - v1.5.0 - 2014-09-01
2
- * http://trentrichardson.com/examples/timepicker
3
- * Copyright (c) 2014 Trent Richardson; Licensed MIT */
4
-
5
  .ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:0 0;border:0;margin:0;padding:0}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px}
1
+ /*! jQuery Timepicker Addon - v1.5.0 - 2014-09-01
2
+ * http://trentrichardson.com/examples/timepicker
3
+ * Copyright (c) 2014 Trent Richardson; Licensed MIT */
4
+
5
  .ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:0 0;border:0;margin:0;padding:0}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px}
includes/admin/meta-box/css/jqueryui/jquery.ui.core.css CHANGED
@@ -1,38 +1,38 @@
1
- /*
2
- * jQuery UI CSS Framework 1.8.17
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/Theming/API
9
- */
10
-
11
- /* Layout helpers
12
- ----------------------------------*/
13
- .ui-helper-hidden { display: none; }
14
- .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
- .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
- .ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
17
- .ui-helper-clearfix:after { clear: both; }
18
- .ui-helper-clearfix { zoom: 1; }
19
- .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
20
-
21
-
22
- /* Interaction Cues
23
- ----------------------------------*/
24
- .ui-state-disabled { cursor: default !important; }
25
-
26
-
27
- /* Icons
28
- ----------------------------------*/
29
-
30
- /* states and images */
31
- .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
32
-
33
-
34
- /* Misc visuals
35
- ----------------------------------*/
36
-
37
- /* Overlays */
38
- .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
1
+ /*
2
+ * jQuery UI CSS Framework 1.8.17
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/Theming/API
9
+ */
10
+
11
+ /* Layout helpers
12
+ ----------------------------------*/
13
+ .ui-helper-hidden { display: none; }
14
+ .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
+ .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
+ .ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
17
+ .ui-helper-clearfix:after { clear: both; }
18
+ .ui-helper-clearfix { zoom: 1; }
19
+ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
20
+
21
+
22
+ /* Interaction Cues
23
+ ----------------------------------*/
24
+ .ui-state-disabled { cursor: default !important; }
25
+
26
+
27
+ /* Icons
28
+ ----------------------------------*/
29
+
30
+ /* states and images */
31
+ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
32
+
33
+
34
+ /* Misc visuals
35
+ ----------------------------------*/
36
+
37
+ /* Overlays */
38
+ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
includes/admin/meta-box/css/jqueryui/jquery.ui.datepicker.css CHANGED
@@ -1,68 +1,68 @@
1
- /*
2
- * jQuery UI Datepicker 1.8.17
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#theming
9
- */
10
- .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
11
- .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
12
- .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
13
- .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
14
- .ui-datepicker .ui-datepicker-prev { left:2px; }
15
- .ui-datepicker .ui-datepicker-next { right:2px; }
16
- .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
17
- .ui-datepicker .ui-datepicker-next-hover { right:1px; }
18
- .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
19
- .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
20
- .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
21
- .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
22
- .ui-datepicker select.ui-datepicker-month,
23
- .ui-datepicker select.ui-datepicker-year { width: 49%;}
24
- .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
25
- .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
26
- .ui-datepicker td { border: 0; padding: 1px; }
27
- .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
28
- .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
29
- .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
30
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
31
-
32
- /* with multiple calendars */
33
- .ui-datepicker.ui-datepicker-multi { width:auto; }
34
- .ui-datepicker-multi .ui-datepicker-group { float:left; }
35
- .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
36
- .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
37
- .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
38
- .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
39
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
40
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
41
- .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
42
- .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
43
-
44
- /* RTL support */
45
- .ui-datepicker-rtl { direction: rtl; }
46
- .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
47
- .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
48
- .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
49
- .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
50
- .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
51
- .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
52
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
53
- .ui-datepicker-rtl .ui-datepicker-group { float:right; }
54
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
55
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
56
-
57
- /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
58
- .ui-datepicker-cover {
59
- display: none; /*sorry for IE5*/
60
- display/**/: block; /*sorry for IE5*/
61
- position: absolute; /*must have*/
62
- z-index: -1; /*must have*/
63
- filter: mask(); /*must have*/
64
- top: -4px; /*must have*/
65
- left: -4px; /*must have*/
66
- width: 200px; /*must have*/
67
- height: 200px; /*must have*/
68
  }
1
+ /*
2
+ * jQuery UI Datepicker 1.8.17
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#theming
9
+ */
10
+ .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
11
+ .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
12
+ .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
13
+ .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
14
+ .ui-datepicker .ui-datepicker-prev { left:2px; }
15
+ .ui-datepicker .ui-datepicker-next { right:2px; }
16
+ .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
17
+ .ui-datepicker .ui-datepicker-next-hover { right:1px; }
18
+ .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
19
+ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
20
+ .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
21
+ .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
22
+ .ui-datepicker select.ui-datepicker-month,
23
+ .ui-datepicker select.ui-datepicker-year { width: 49%;}
24
+ .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
25
+ .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
26
+ .ui-datepicker td { border: 0; padding: 1px; }
27
+ .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
28
+ .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
29
+ .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
30
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
31
+
32
+ /* with multiple calendars */
33
+ .ui-datepicker.ui-datepicker-multi { width:auto; }
34
+ .ui-datepicker-multi .ui-datepicker-group { float:left; }
35
+ .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
36
+ .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
37
+ .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
38
+ .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
39
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
40
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
41
+ .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
42
+ .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
43
+
44
+ /* RTL support */
45
+ .ui-datepicker-rtl { direction: rtl; }
46
+ .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
47
+ .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
48
+ .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
49
+ .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
50
+ .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
51
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
52
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
53
+ .ui-datepicker-rtl .ui-datepicker-group { float:right; }
54
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
55
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
56
+
57
+ /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
58
+ .ui-datepicker-cover {
59
+ display: none; /*sorry for IE5*/
60
+ display/**/: block; /*sorry for IE5*/
61
+ position: absolute; /*must have*/
62
+ z-index: -1; /*must have*/
63
+ filter: mask(); /*must have*/
64
+ top: -4px; /*must have*/
65
+ left: -4px; /*must have*/
66
+ width: 200px; /*must have*/
67
+ height: 200px; /*must have*/
68
  }
includes/admin/meta-box/css/jqueryui/jquery.ui.slider.css CHANGED
@@ -1,24 +1,24 @@
1
- /*
2
- * jQuery UI Slider 1.8.17
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/Slider#theming
9
- */
10
- .ui-slider { position: relative; text-align: left; }
11
- .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
12
- .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
13
-
14
- .ui-slider-horizontal { height: .8em; }
15
- .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
16
- .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
17
- .ui-slider-horizontal .ui-slider-range-min { left: 0; }
18
- .ui-slider-horizontal .ui-slider-range-max { right: 0; }
19
-
20
- .ui-slider-vertical { width: .8em; height: 100px; }
21
- .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
22
- .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
23
- .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
24
  .ui-slider-vertical .ui-slider-range-max { top: 0; }
1
+ /*
2
+ * jQuery UI Slider 1.8.17
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/Slider#theming
9
+ */
10
+ .ui-slider { position: relative; text-align: left; }
11
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
12
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
13
+
14
+ .ui-slider-horizontal { height: .8em; }
15
+ .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
16
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
17
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
18
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
19
+
20
+ .ui-slider-vertical { width: .8em; height: 100px; }
21
+ .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
22
+ .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
23
+ .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
24
  .ui-slider-vertical .ui-slider-range-max { top: 0; }
includes/admin/meta-box/css/jqueryui/jquery.ui.theme.css CHANGED
@@ -1,249 +1,249 @@
1
-
2
-
3
- /*
4
- * jQuery UI CSS Framework 1.8.17
5
- *
6
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
- * Dual licensed under the MIT or GPL Version 2 licenses.
8
- * http://jquery.org/license
9
- *
10
- * http://docs.jquery.com/UI/Theming/API
11
- *
12
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
13
- */
14
-
15
-
16
- /* Component containers
17
- ----------------------------------*/
18
- .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
19
- .ui-widget .ui-widget { font-size: 1em; }
20
- .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
21
- .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(../../img/jqueryui/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
22
- .ui-widget-content a { color: #222222; }
23
- .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(../../img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
24
- .ui-widget-header a { color: #222222; }
25
-
26
- /* Interaction states
27
- ----------------------------------*/
28
- .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(../../img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
29
- .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
30
- .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(../../img/jqueryui/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
31
- .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
32
- .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(../../img/jqueryui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
33
- .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
34
- .ui-widget :active { outline: none; }
35
-
36
- /* Interaction Cues
37
- ----------------------------------*/
38
- .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(../../img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
39
- .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
40
- .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(../../img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
41
- .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
42
- .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
43
- .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
44
- .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
45
- .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
46
-
47
- /* Icons
48
- ----------------------------------*/
49
-
50
- /* states and images */
51
- .ui-icon { width: 16px; height: 16px; background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
52
- .ui-widget-content .ui-icon {background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
53
- .ui-widget-header .ui-icon {background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
54
- .ui-state-default .ui-icon { background-image: url(../../img/jqueryui/ui-icons_888888_256x240.png); }
55
- .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../../img/jqueryui/ui-icons_454545_256x240.png); }
56
- .ui-state-active .ui-icon {background-image: url(../../img/jqueryui/ui-icons_454545_256x240.png); }
57
- .ui-state-highlight .ui-icon {background-image: url(../../img/jqueryui/ui-icons_2e83ff_256x240.png); }
58
- .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../../img/jqueryui/ui-icons_cd0a0a_256x240.png); }
59
-
60
- /* positioning */
61
- .ui-icon-carat-1-n { background-position: 0 0; }
62
- .ui-icon-carat-1-ne { background-position: -16px 0; }
63
- .ui-icon-carat-1-e { background-position: -32px 0; }
64
- .ui-icon-carat-1-se { background-position: -48px 0; }
65
- .ui-icon-carat-1-s { background-position: -64px 0; }
66
- .ui-icon-carat-1-sw { background-position: -80px 0; }
67
- .ui-icon-carat-1-w { background-position: -96px 0; }
68
- .ui-icon-carat-1-nw { background-position: -112px 0; }
69
- .ui-icon-carat-2-n-s { background-position: -128px 0; }
70
- .ui-icon-carat-2-e-w { background-position: -144px 0; }
71
- .ui-icon-triangle-1-n { background-position: 0 -16px; }
72
- .ui-icon-triangle-1-ne { background-position: -16px -16px; }
73
- .ui-icon-triangle-1-e { background-position: -32px -16px; }
74
- .ui-icon-triangle-1-se { background-position: -48px -16px; }
75
- .ui-icon-triangle-1-s { background-position: -64px -16px; }
76
- .ui-icon-triangle-1-sw { background-position: -80px -16px; }
77
- .ui-icon-triangle-1-w { background-position: -96px -16px; }
78
- .ui-icon-triangle-1-nw { background-position: -112px -16px; }
79
- .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
80
- .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
81
- .ui-icon-arrow-1-n { background-position: 0 -32px; }
82
- .ui-icon-arrow-1-ne { background-position: -16px -32px; }
83
- .ui-icon-arrow-1-e { background-position: -32px -32px; }
84
- .ui-icon-arrow-1-se { background-position: -48px -32px; }
85
- .ui-icon-arrow-1-s { background-position: -64px -32px; }
86
- .ui-icon-arrow-1-sw { background-position: -80px -32px; }
87
- .ui-icon-arrow-1-w { background-position: -96px -32px; }
88
- .ui-icon-arrow-1-nw { background-position: -112px -32px; }
89
- .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
90
- .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
91
- .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
92
- .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
93
- .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
94
- .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
95
- .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
96
- .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
97
- .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
98
- .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
99
- .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
100
- .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
101
- .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
102
- .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
103
- .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
104
- .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
105
- .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
106
- .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
107
- .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
108
- .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
109
- .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
110
- .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
111
- .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
112
- .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
113
- .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
114
- .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
115
- .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
116
- .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
117
- .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
118
- .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
119
- .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
120
- .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
121
- .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
122
- .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
123
- .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
124
- .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
125
- .ui-icon-arrow-4 { background-position: 0 -80px; }
126
- .ui-icon-arrow-4-diag { background-position: -16px -80px; }
127
- .ui-icon-extlink { background-position: -32px -80px; }
128
- .ui-icon-newwin { background-position: -48px -80px; }
129
- .ui-icon-refresh { background-position: -64px -80px; }
130
- .ui-icon-shuffle { background-position: -80px -80px; }
131
- .ui-icon-transfer-e-w { background-position: -96px -80px; }
132
- .ui-icon-transferthick-e-w { background-position: -112px -80px; }
133
- .ui-icon-folder-collapsed { background-position: 0 -96px; }
134
- .ui-icon-folder-open { background-position: -16px -96px; }
135
- .ui-icon-document { background-position: -32px -96px; }
136
- .ui-icon-document-b { background-position: -48px -96px; }
137
- .ui-icon-note { background-position: -64px -96px; }
138
- .ui-icon-mail-closed { background-position: -80px -96px; }
139
- .ui-icon-mail-open { background-position: -96px -96px; }
140
- .ui-icon-suitcase { background-position: -112px -96px; }
141
- .ui-icon-comment { background-position: -128px -96px; }
142
- .ui-icon-person { background-position: -144px -96px; }
143
- .ui-icon-print { background-position: -160px -96px; }
144
- .ui-icon-trash { background-position: -176px -96px; }
145
- .ui-icon-locked { background-position: -192px -96px; }
146
- .ui-icon-unlocked { background-position: -208px -96px; }
147
- .ui-icon-bookmark { background-position: -224px -96px; }
148
- .ui-icon-tag { background-position: -240px -96px; }
149
- .ui-icon-home { background-position: 0 -112px; }
150
- .ui-icon-flag { background-position: -16px -112px; }
151
- .ui-icon-calendar { background-position: -32px -112px; }
152
- .ui-icon-cart { background-position: -48px -112px; }
153
- .ui-icon-pencil { background-position: -64px -112px; }
154
- .ui-icon-clock { background-position: -80px -112px; }
155
- .ui-icon-disk { background-position: -96px -112px; }
156
- .ui-icon-calculator { background-position: -112px -112px; }
157
- .ui-icon-zoomin { background-position: -128px -112px; }
158
- .ui-icon-zoomout { background-position: -144px -112px; }
159
- .ui-icon-search { background-position: -160px -112px; }
160
- .ui-icon-wrench { background-position: -176px -112px; }
161
- .ui-icon-gear { background-position: -192px -112px; }
162
- .ui-icon-heart { background-position: -208px -112px; }
163
- .ui-icon-star { background-position: -224px -112px; }
164
- .ui-icon-link { background-position: -240px -112px; }
165
- .ui-icon-cancel { background-position: 0 -128px; }
166
- .ui-icon-plus { background-position: -16px -128px; }
167
- .ui-icon-plusthick { background-position: -32px -128px; }
168
- .ui-icon-minus { background-position: -48px -128px; }
169
- .ui-icon-minusthick { background-position: -64px -128px; }
170
- .ui-icon-close { background-position: -80px -128px; }
171
- .ui-icon-closethick { background-position: -96px -128px; }
172
- .ui-icon-key { background-position: -112px -128px; }
173
- .ui-icon-lightbulb { background-position: -128px -128px; }
174
- .ui-icon-scissors { background-position: -144px -128px; }
175
- .ui-icon-clipboard { background-position: -160px -128px; }
176
- .ui-icon-copy { background-position: -176px -128px; }
177
- .ui-icon-contact { background-position: -192px -128px; }
178
- .ui-icon-image { background-position: -208px -128px; }
179
- .ui-icon-video { background-position: -224px -128px; }
180
- .ui-icon-script { background-position: -240px -128px; }
181
- .ui-icon-alert { background-position: 0 -144px; }
182
- .ui-icon-info { background-position: -16px -144px; }
183
- .ui-icon-notice { background-position: -32px -144px; }
184
- .ui-icon-help { background-position: -48px -144px; }
185
- .ui-icon-check { background-position: -64px -144px; }
186
- .ui-icon-bullet { background-position: -80px -144px; }
187
- .ui-icon-radio-off { background-position: -96px -144px; }
188
- .ui-icon-radio-on { background-position: -112px -144px; }
189
- .ui-icon-pin-w { background-position: -128px -144px; }
190
- .ui-icon-pin-s { background-position: -144px -144px; }
191
- .ui-icon-play { background-position: 0 -160px; }
192
- .ui-icon-pause { background-position: -16px -160px; }
193
- .ui-icon-seek-next { background-position: -32px -160px; }
194
- .ui-icon-seek-prev { background-position: -48px -160px; }
195
- .ui-icon-seek-end { background-position: -64px -160px; }
196
- .ui-icon-seek-start { background-position: -80px -160px; }
197
- /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
198
- .ui-icon-seek-first { background-position: -80px -160px; }
199
- .ui-icon-stop { background-position: -96px -160px; }
200
- .ui-icon-eject { background-position: -112px -160px; }
201
- .ui-icon-volume-off { background-position: -128px -160px; }
202
- .ui-icon-volume-on { background-position: -144px -160px; }
203
- .ui-icon-power { background-position: 0 -176px; }
204
- .ui-icon-signal-diag { background-position: -16px -176px; }
205
- .ui-icon-signal { background-position: -32px -176px; }
206
- .ui-icon-battery-0 { background-position: -48px -176px; }
207
- .ui-icon-battery-1 { background-position: -64px -176px; }
208
- .ui-icon-battery-2 { background-position: -80px -176px; }
209
- .ui-icon-battery-3 { background-position: -96px -176px; }
210
- .ui-icon-circle-plus { background-position: 0 -192px; }
211
- .ui-icon-circle-minus { background-position: -16px -192px; }
212
- .ui-icon-circle-close { background-position: -32px -192px; }
213
- .ui-icon-circle-triangle-e { background-position: -48px -192px; }
214
- .ui-icon-circle-triangle-s { background-position: -64px -192px; }
215
- .ui-icon-circle-triangle-w { background-position: -80px -192px; }
216
- .ui-icon-circle-triangle-n { background-position: -96px -192px; }
217
- .ui-icon-circle-arrow-e { background-position: -112px -192px; }
218
- .ui-icon-circle-arrow-s { background-position: -128px -192px; }
219
- .ui-icon-circle-arrow-w { background-position: -144px -192px; }
220
- .ui-icon-circle-arrow-n { background-position: -160px -192px; }
221
- .ui-icon-circle-zoomin { background-position: -176px -192px; }
222
- .ui-icon-circle-zoomout { background-position: -192px -192px; }
223
- .ui-icon-circle-check { background-position: -208px -192px; }
224
- .ui-icon-circlesmall-plus { background-position: 0 -208px; }
225
- .ui-icon-circlesmall-minus { background-position: -16px -208px; }
226
- .ui-icon-circlesmall-close { background-position: -32px -208px; }
227
- .ui-icon-squaresmall-plus { background-position: -48px -208px; }
228
- .ui-icon-squaresmall-minus { background-position: -64px -208px; }
229
- .ui-icon-squaresmall-close { background-position: -80px -208px; }
230
- .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
231
- .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
232
- .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
233
- .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
234
- .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
235
- .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
236
-
237
-
238
- /* Misc visuals
239
- ----------------------------------*/
240
-
241
- /* Corner radius */
242
- .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
243
- .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
244
- .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
245
- .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
246
-
247
- /* Overlays */
248
- .ui-widget-overlay { background: #aaaaaa url(../../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
249
  .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(../../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
1
+
2
+
3
+ /*
4
+ * jQuery UI CSS Framework 1.8.17
5
+ *
6
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
7
+ * Dual licensed under the MIT or GPL Version 2 licenses.
8
+ * http://jquery.org/license
9
+ *
10
+ * http://docs.jquery.com/UI/Theming/API
11
+ *
12
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
13
+ */
14
+
15
+
16
+ /* Component containers
17
+ ----------------------------------*/
18
+ .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
19
+ .ui-widget .ui-widget { font-size: 1em; }
20
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
21
+ .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(../../img/jqueryui/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
22
+ .ui-widget-content a { color: #222222; }
23
+ .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(../../img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
24
+ .ui-widget-header a { color: #222222; }
25
+
26
+ /* Interaction states
27
+ ----------------------------------*/
28
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(../../img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
29
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
30
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(../../img/jqueryui/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
31
+ .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
32
+ .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(../../img/jqueryui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
33
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
34
+ .ui-widget :active { outline: none; }
35
+
36
+ /* Interaction Cues
37
+ ----------------------------------*/
38
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(../../img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
39
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
40
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(../../img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
41
+ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
42
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
43
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
44
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
45
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
46
+
47
+ /* Icons
48
+ ----------------------------------*/
49
+
50
+ /* states and images */
51
+ .ui-icon { width: 16px; height: 16px; background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
52
+ .ui-widget-content .ui-icon {background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
53
+ .ui-widget-header .ui-icon {background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
54
+ .ui-state-default .ui-icon { background-image: url(../../img/jqueryui/ui-icons_888888_256x240.png); }
55
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../../img/jqueryui/ui-icons_454545_256x240.png); }
56
+ .ui-state-active .ui-icon {background-image: url(../../img/jqueryui/ui-icons_454545_256x240.png); }
57
+ .ui-state-highlight .ui-icon {background-image: url(../../img/jqueryui/ui-icons_2e83ff_256x240.png); }
58
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../../img/jqueryui/ui-icons_cd0a0a_256x240.png); }
59
+
60
+ /* positioning */
61
+ .ui-icon-carat-1-n { background-position: 0 0; }
62
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
63
+ .ui-icon-carat-1-e { background-position: -32px 0; }
64
+ .ui-icon-carat-1-se { background-position: -48px 0; }
65
+ .ui-icon-carat-1-s { background-position: -64px 0; }
66
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
67
+ .ui-icon-carat-1-w { background-position: -96px 0; }
68
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
69
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
70
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
71
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
72
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
73
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
74
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
75
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
76
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
77
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
78
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
79
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
80
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
81
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
82
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
83
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
84
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
85
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
86
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
87
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
88
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
89
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
90
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
91
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
92
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
93
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
94
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
95
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
96
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
97
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
98
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
99
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
100
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
101
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
102
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
103
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
104
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
105
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
106
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
107
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
108
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
109
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
110
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
111
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
112
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
113
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
114
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
115
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
116
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
117
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
118
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
119
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
120
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
121
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
122
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
123
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
124
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
125
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
126
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
127
+ .ui-icon-extlink { background-position: -32px -80px; }
128
+ .ui-icon-newwin { background-position: -48px -80px; }
129
+ .ui-icon-refresh { background-position: -64px -80px; }
130
+ .ui-icon-shuffle { background-position: -80px -80px; }
131
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
132
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
133
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
134
+ .ui-icon-folder-open { background-position: -16px -96px; }
135
+ .ui-icon-document { background-position: -32px -96px; }
136
+ .ui-icon-document-b { background-position: -48px -96px; }
137
+ .ui-icon-note { background-position: -64px -96px; }
138
+ .ui-icon-mail-closed { background-position: -80px -96px; }
139
+ .ui-icon-mail-open { background-position: -96px -96px; }
140
+ .ui-icon-suitcase { background-position: -112px -96px; }
141
+ .ui-icon-comment { background-position: -128px -96px; }
142
+ .ui-icon-person { background-position: -144px -96px; }
143
+ .ui-icon-print { background-position: -160px -96px; }
144
+ .ui-icon-trash { background-position: -176px -96px; }
145
+ .ui-icon-locked { background-position: -192px -96px; }
146
+ .ui-icon-unlocked { background-position: -208px -96px; }
147
+ .ui-icon-bookmark { background-position: -224px -96px; }
148
+ .ui-icon-tag { background-position: -240px -96px; }
149
+ .ui-icon-home { background-position: 0 -112px; }
150
+ .ui-icon-flag { background-position: -16px -112px; }
151
+ .ui-icon-calendar { background-position: -32px -112px; }
152
+ .ui-icon-cart { background-position: -48px -112px; }
153
+ .ui-icon-pencil { background-position: -64px -112px; }
154
+ .ui-icon-clock { background-position: -80px -112px; }
155
+ .ui-icon-disk { background-position: -96px -112px; }
156
+ .ui-icon-calculator { background-position: -112px -112px; }
157
+ .ui-icon-zoomin { background-position: -128px -112px; }
158
+ .ui-icon-zoomout { background-position: -144px -112px; }
159
+ .ui-icon-search { background-position: -160px -112px; }
160
+ .ui-icon-wrench { background-position: -176px -112px; }
161
+ .ui-icon-gear { background-position: -192px -112px; }
162
+ .ui-icon-heart { background-position: -208px -112px; }
163
+ .ui-icon-star { background-position: -224px -112px; }
164
+ .ui-icon-link { background-position: -240px -112px; }
165
+ .ui-icon-cancel { background-position: 0 -128px; }
166
+ .ui-icon-plus { background-position: -16px -128px; }
167
+ .ui-icon-plusthick { background-position: -32px -128px; }
168
+ .ui-icon-minus { background-position: -48px -128px; }
169
+ .ui-icon-minusthick { background-position: -64px -128px; }
170
+ .ui-icon-close { background-position: -80px -128px; }
171
+ .ui-icon-closethick { background-position: -96px -128px; }
172
+ .ui-icon-key { background-position: -112px -128px; }
173
+ .ui-icon-lightbulb { background-position: -128px -128px; }
174
+ .ui-icon-scissors { background-position: -144px -128px; }
175
+ .ui-icon-clipboard { background-position: -160px -128px; }
176
+ .ui-icon-copy { background-position: -176px -128px; }
177
+ .ui-icon-contact { background-position: -192px -128px; }
178
+ .ui-icon-image { background-position: -208px -128px; }
179
+ .ui-icon-video { background-position: -224px -128px; }
180
+ .ui-icon-script { background-position: -240px -128px; }
181
+ .ui-icon-alert { background-position: 0 -144px; }
182
+ .ui-icon-info { background-position: -16px -144px; }
183
+ .ui-icon-notice { background-position: -32px -144px; }
184
+ .ui-icon-help { background-position: -48px -144px; }
185
+ .ui-icon-check { background-position: -64px -144px; }
186
+ .ui-icon-bullet { background-position: -80px -144px; }
187
+ .ui-icon-radio-off { background-position: -96px -144px; }
188
+ .ui-icon-radio-on { background-position: -112px -144px; }
189
+ .ui-icon-pin-w { background-position: -128px -144px; }
190
+ .ui-icon-pin-s { background-position: -144px -144px; }
191
+ .ui-icon-play { background-position: 0 -160px; }
192
+ .ui-icon-pause { background-position: -16px -160px; }
193
+ .ui-icon-seek-next { background-position: -32px -160px; }
194
+ .ui-icon-seek-prev { background-position: -48px -160px; }
195
+ .ui-icon-seek-end { background-position: -64px -160px; }
196
+ .ui-icon-seek-start { background-position: -80px -160px; }
197
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
198
+ .ui-icon-seek-first { background-position: -80px -160px; }
199
+ .ui-icon-stop { background-position: -96px -160px; }
200
+ .ui-icon-eject { background-position: -112px -160px; }
201
+ .ui-icon-volume-off { background-position: -128px -160px; }
202
+ .ui-icon-volume-on { background-position: -144px -160px; }
203
+ .ui-icon-power { background-position: 0 -176px; }
204
+ .ui-icon-signal-diag { background-position: -16px -176px; }
205
+ .ui-icon-signal { background-position: -32px -176px; }
206
+ .ui-icon-battery-0 { background-position: -48px -176px; }
207
+ .ui-icon-battery-1 { background-position: -64px -176px; }
208
+ .ui-icon-battery-2 { background-position: -80px -176px; }
209
+ .ui-icon-battery-3 { background-position: -96px -176px; }
210
+ .ui-icon-circle-plus { background-position: 0 -192px; }
211
+ .ui-icon-circle-minus { background-position: -16px -192px; }
212
+ .ui-icon-circle-close { background-position: -32px -192px; }
213
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
214
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
215
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
216
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
217
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
218
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
219
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
220
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
221
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
222
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
223
+ .ui-icon-circle-check { background-position: -208px -192px; }
224
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
225
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
226
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
227
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
228
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
229
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
230
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
231
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
232
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
233
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
234
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
235
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
236
+
237
+
238
+ /* Misc visuals
239
+ ----------------------------------*/
240
+
241
+ /* Corner radius */
242
+ .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
243
+ .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
244
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
245
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
246
+
247
+ /* Overlays */
248
+ .ui-widget-overlay { background: #aaaaaa url(../../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
249
  .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(../../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
includes/admin/meta-box/css/map.css CHANGED
@@ -1,4 +1,4 @@
1
- .mashsb-rwmb-map-canvas {
2
- width: 100%;
3
- height: 400px;
4
- }
1
+ .mashsb-rwmb-map-canvas {
2
+ width: 100%;
3
+ height: 400px;
4
+ }
includes/admin/meta-box/css/media.css CHANGED
@@ -1,81 +1,81 @@
1
- .mashsb-rwmb-media-list {
2
- margin: 0 0 5px;
3
- overflow: hidden;
4
- }
5
- .mashsb-rwmb-media-item {
6
- overflow: hidden;
7
- margin-bottom: 10px;
8
- }
9
- .mashsb-rwmb-media-preview {
10
- width: 60px;
11
- float: left;
12
- position: relative;
13
- }
14
- .mashsb-rwmb-media-preview:before {
15
- content: '';
16
- display: block;
17
- padding-top: 100%;
18
- }
19
- .mashsb-rwmb-media-content {
20
- position: absolute;
21
- overflow: hidden;
22
- top: 0;
23
- left: 0;
24
- bottom: 0;
25
- right: 0;
26
- }
27
- .mashsb-rwmb-media-content .centered {
28
- position: absolute;
29
- top: 0;
30
- left: 0;
31
- width: 100%;
32
- height: 100%;
33
- -webkit-transform: translate(50%, 50%);
34
- -ms-transform: translate(50%, 50%);
35
- transform: translate(50%, 50%);
36
- }
37
- .mashsb-rwmb-media-content img {
38
- -webkit-transform: translate(-50%, -50%);
39
- -ms-transform: translate(-50%, -50%);
40
- transform: translate(-50%, -50%);
41
- max-height: 100%;
42
- max-width: 100%;
43
- border-radius: 3px;
44
- }
45
- .mashsb-rwmb-media-info {
46
- margin-left: 65px;
47
- }
48
- .mashsb-rwmb-media-info a {
49
- text-decoration: none;
50
- }
51
- .mashsb-rwmb-media-info p,
52
- .mashsb-rwmb-media-info h4 {
53
- margin: 0 0 2px;
54
- }
55
- .mashsb-rwmb-edit-media,
56
- .mashsb-rwmb-remove-media {
57
- font-size: 11px;
58
- color: inherit;
59
- }
60
- .mashsb-rwmb-edit-media .dashicons,
61
- .mashsb-rwmb-remove-media .dashicons {
62
- font-size: 12px;
63
- width: 12px;
64
- height: 12px;
65
- vertical-align: middle;
66
- }
67
-
68
- /* Add more button */
69
- .mashsb-rwmb-media-view .mashsb-rwmb-add-media {
70
- padding-left: 5px;
71
- margin-right: 5px;
72
- }
73
-
74
- /* Status */
75
- .mashsb-rwmb-media-status {
76
- display: inline-block;
77
- text-decoration: none;
78
- font-size: 13px;
79
- line-height: 26px;
80
- height: 28px;
81
- }
1
+ .mashsb-rwmb-media-list {
2
+ margin: 0 0 5px;
3
+ overflow: hidden;
4
+ }
5
+ .mashsb-rwmb-media-item {
6
+ overflow: hidden;
7
+ margin-bottom: 10px;
8
+ }
9
+ .mashsb-rwmb-media-preview {
10
+ width: 60px;
11
+ float: left;
12
+ position: relative;
13
+ }
14
+ .mashsb-rwmb-media-preview:before {
15
+ content: '';
16
+ display: block;
17
+ padding-top: 100%;
18
+ }
19
+ .mashsb-rwmb-media-content {
20
+ position: absolute;
21
+ overflow: hidden;
22
+ top: 0;
23
+ left: 0;
24
+ bottom: 0;
25
+ right: 0;
26
+ }
27
+ .mashsb-rwmb-media-content .centered {
28
+ position: absolute;
29
+ top: 0;
30
+ left: 0;
31
+ width: 100%;
32
+ height: 100%;
33
+ -webkit-transform: translate(50%, 50%);
34
+ -ms-transform: translate(50%, 50%);
35
+ transform: translate(50%, 50%);
36
+ }
37
+ .mashsb-rwmb-media-content img {
38
+ -webkit-transform: translate(-50%, -50%);
39
+ -ms-transform: translate(-50%, -50%);
40
+ transform: translate(-50%, -50%);
41
+ max-height: 100%;
42
+ max-width: 100%;
43
+ border-radius: 3px;
44
+ }
45
+ .mashsb-rwmb-media-info {
46
+ margin-left: 65px;
47
+ }
48
+ .mashsb-rwmb-media-info a {
49
+ text-decoration: none;
50
+ }
51
+ .mashsb-rwmb-media-info p,
52
+ .mashsb-rwmb-media-info h4 {
53
+ margin: 0 0 2px;
54
+ }
55
+ .mashsb-rwmb-edit-media,
56
+ .mashsb-rwmb-remove-media {
57
+ font-size: 11px;
58
+ color: inherit;
59
+ }
60
+ .mashsb-rwmb-edit-media .dashicons,
61
+ .mashsb-rwmb-remove-media .dashicons {
62
+ font-size: 12px;
63
+ width: 12px;
64
+ height: 12px;
65
+ vertical-align: middle;
66
+ }
67
+
68
+ /* Add more button */
69
+ .mashsb-rwmb-media-view .mashsb-rwmb-add-media {
70
+ padding-left: 5px;
71
+ margin-right: 5px;
72
+ }
73
+
74
+ /* Status */
75
+ .mashsb-rwmb-media-status {
76
+ display: inline-block;
77
+ text-decoration: none;
78
+ font-size: 13px;
79
+ line-height: 26px;
80
+ height: 28px;
81
+ }
includes/admin/meta-box/css/oembed.css CHANGED
@@ -1,11 +1,11 @@
1
- .mashsb-rwmb-oembed-wrapper .spinner {
2
- float: none;
3
- vertical-align: top;
4
- display: inline-block;
5
- }
6
- .mashsb-rwmb-oembed-wrapper .embed-code {
7
- margin-top: 1em;
8
- }
9
- .mashsb-rwmb-oembed-wrapper .embed-code iframe {
10
- max-width: 100%;
11
  }
1
+ .mashsb-rwmb-oembed-wrapper .spinner {
2
+ float: none;
3
+ vertical-align: top;
4
+ display: inline-block;
5
+ }
6
+ .mashsb-rwmb-oembed-wrapper .embed-code {
7
+ margin-top: 1em;
8
+ }
9
+ .mashsb-rwmb-oembed-wrapper .embed-code iframe {
10
+ max-width: 100%;
11
  }
includes/admin/meta-box/css/plupload-image.css CHANGED
@@ -1,25 +1,25 @@
1
- div.mashsb-rwmb-drag-drop {
2
- border: 4px dashed #ddd;
3
- height: 200px;
4
- }
5
-
6
- div.mashsb-rwmb-image-uploading-bar {
7
- position: absolute;
8
- width: 100%;
9
- height: 0;
10
- bottom: 0;
11
- }
12
- div.mashsb-rwmb-image-uploading-status {
13
- position: absolute;
14
- }
15
- li.mashsb-rwmb-image-error {
16
- border: 3px solid #c00;
17
- background: #903838;
18
- }
19
- .mashsb-rwmb-image-uploading-status .mashsb-rwmb-loader {
20
- width: 64px;
21
- height: 64px;
22
- top: 43px;
23
- left: 43px;
24
- position: relative;
25
  }
1
+ div.mashsb-rwmb-drag-drop {
2
+ border: 4px dashed #ddd;
3
+ height: 200px;
4
+ }
5
+
6
+ div.mashsb-rwmb-image-uploading-bar {
7
+ position: absolute;
8
+ width: 100%;
9
+ height: 0;
10
+ bottom: 0;
11
+ }
12
+ div.mashsb-rwmb-image-uploading-status {
13
+ position: absolute;
14
+ }
15
+ li.mashsb-rwmb-image-error {
16
+ border: 3px solid #c00;
17
+ background: #903838;
18
+ }
19
+ .mashsb-rwmb-image-uploading-status .mashsb-rwmb-loader {
20
+ width: 64px;
21
+ height: 64px;
22
+ top: 43px;
23
+ left: 43px;
24
+ position: relative;
25
  }
includes/admin/meta-box/css/range.css CHANGED
@@ -1,13 +1,13 @@
1
- input[type='range'] {
2
- vertical-align: middle;
3
- border-radius: 2px;
4
- border: 1px solid #dfdfdf;
5
- }
6
-
7
- .mashsb-rwmb-output {
8
-
9
- display: inline-block;
10
- position: relative;
11
- padding: 5px 10px;
12
- line-height: 20px;
13
- }
1
+ input[type='range'] {
2
+ vertical-align: middle;
3
+ border-radius: 2px;
4
+ border: 1px solid #dfdfdf;
5
+ }
6
+
7
+ .mashsb-rwmb-output {
8
+
9
+ display: inline-block;
10
+ position: relative;
11
+ padding: 5px 10px;
12
+ line-height: 20px;
13
+ }
includes/admin/meta-box/css/select-advanced.css CHANGED
@@ -1,8 +1,8 @@
1
- .mashsb-rwmb-field .select2-container {
2
- height: auto;
3
- min-width: 200px;
4
- }
5
-
6
- #post-body .mashsb-rwmb-select-all {
7
- margin-top: 5px;
8
  }
1
+ .mashsb-rwmb-field .select2-container {
2
+ height: auto;
3
+ min-width: 200px;
4
+ }
5
+
6
+ #post-body .mashsb-rwmb-select-all {
7
+ margin-top: 5px;
8
  }
includes/admin/meta-box/css/select-tree.css CHANGED
@@ -1,7 +1,7 @@
1
- .mashsb-rwmb-select-tree {
2
- display: inline-block;
3
- }
4
-
5
- .mashsb-rwmb-select-tree.hidden {
6
- display: none;
7
- }
1
+ .mashsb-rwmb-select-tree {
2
+ display: inline-block;
3
+ }
4
+
5
+ .mashsb-rwmb-select-tree.hidden {
6
+ display: none;
7
+ }
includes/admin/meta-box/css/select.css CHANGED
@@ -1,4 +1,4 @@
1
- .mashsb-rwmb-select-all-none {
2
- display: block;
3
- margin-top: 5px;
4
- }
1
+ .mashsb-rwmb-select-all-none {
2
+ display: block;
3
+ margin-top: 5px;
4
+ }
includes/admin/meta-box/css/select2/select2.css CHANGED
@@ -1,483 +1,483 @@
1
- .select2-container {
2
- box-sizing: border-box;
3
- display: inline-block;
4
- margin: 0;
5
- position: relative;
6
- vertical-align: middle;
7
- }
8
- .select2-container .select2-selection--single {
9
- box-sizing: border-box;
10
- cursor: pointer;
11
- display: block;
12
- height: 28px;
13
- user-select: none;
14
- -webkit-user-select: none; }
15
- .select2-container .select2-selection--single .select2-selection__rendered {
16
- display: block;
17
- padding-left: 8px;
18
- padding-right: 20px;
19
- overflow: hidden;
20
- text-overflow: ellipsis;
21
- white-space: nowrap; }
22
- .select2-container .select2-selection--single .select2-selection__clear {
23
- position: relative; }
24
- .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
25
- padding-right: 8px;
26
- padding-left: 20px; }
27
- .select2-container .select2-selection--multiple {
28
- box-sizing: border-box;
29
- cursor: pointer;
30
- display: block;
31
- min-height: 32px;
32
- user-select: none;
33
- -webkit-user-select: none; }
34
- .select2-container .select2-selection--multiple .select2-selection__rendered {
35
- /*display: inline-block;*/
36
- overflow: hidden;
37
- padding-left: 8px;
38
- text-overflow: ellipsis;
39
- white-space: nowrap; }
40
- .select2-container .select2-search--inline {
41
- float: left; }
42
- .select2-container .select2-search--inline .select2-search__field {
43
- box-sizing: border-box;
44
- border: none;
45
- font-size: 100%;
46
- margin-top: 5px;
47
- padding: 0; }
48
- .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
49
- -webkit-appearance: none; }
50
-
51
- .select2-dropdown {
52
- background-color: white;
53
- border: 1px solid #aaa;
54
- border-radius: 4px;
55
- box-sizing: border-box;
56
- display: block;
57
- position: absolute;
58
- left: -100000px;
59
- width: 100%;
60
- z-index: 1051; }
61
-
62
- .select2-results {
63
- display: block; }
64
-
65
- .select2-results__options {
66
- list-style: none;
67
- margin: 0;
68
- padding: 0; }
69
-
70
- .select2-results__option {
71
- padding: 6px;
72
- user-select: none;
73
- -webkit-user-select: none; }
74
- .select2-results__option[aria-selected] {
75
- cursor: pointer; }
76
-
77
- .select2-container--open .select2-dropdown {
78
- left: 0; }
79
-
80
- .select2-container--open .select2-dropdown--above {
81
- border-bottom: none;
82
- border-bottom-left-radius: 0;
83
- border-bottom-right-radius: 0; }
84
-
85
- .select2-container--open .select2-dropdown--below {
86
- border-top: none;
87
- border-top-left-radius: 0;
88
- border-top-right-radius: 0; }
89
-
90
- .select2-search--dropdown {
91
- display: block;
92
- padding: 4px; }
93
- .select2-search--dropdown .select2-search__field {
94
- padding: 4px;
95
- width: 100%;
96
- box-sizing: border-box; }
97
- .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
98
- -webkit-appearance: none; }
99
- .select2-search--dropdown.select2-search--hide {
100
- display: none; }
101
-
102
- .select2-close-mask {
103
- border: 0;
104
- margin: 0;
105
- padding: 0;
106
- display: block;
107
- position: fixed;
108
- left: 0;
109
- top: 0;
110
- min-height: 100%;
111
- min-width: 100%;
112
- height: auto;
113
- width: auto;
114
- opacity: 0;
115
- z-index: 99;
116
- background-color: #fff;
117
- filter: alpha(opacity=0); }
118
-
119
- .select2-hidden-accessible {
120
- border: 0 !important;
121
- clip: rect(0 0 0 0) !important;
122
- height: 1px !important;
123
- margin: -1px !important;
124
- overflow: hidden !important;
125
- padding: 0 !important;
126
- position: absolute !important;
127
- width: 1px !important; }
128
-
129
- .select2-container--default .select2-selection--single {
130
- background-color: #fff;
131
- border: 1px solid #aaa;
132
- border-radius: 4px; }
133
- .select2-container--default .select2-selection--single .select2-selection__rendered {
134
- color: #444;
135
- line-height: 28px; }
136
- .select2-container--default .select2-selection--single .select2-selection__clear {
137
- cursor: pointer;
138
- float: right;
139
- font-weight: bold; }
140
- .select2-container--default .select2-selection--single .select2-selection__placeholder {
141
- color: #999; }
142
- .select2-container--default .select2-selection--single .select2-selection__arrow {
143
- height: 26px;
144
- position: absolute;
145
- top: 1px;
146
- right: 1px;
147
- width: 20px; }
148
- .select2-container--default .select2-selection--single .select2-selection__arrow b {
149
- border-color: #888 transparent transparent transparent;
150
- border-style: solid;
151
- border-width: 5px 4px 0 4px;
152
- height: 0;
153
- left: 50%;
154
- margin-left: -4px;
155
- margin-top: -2px;
156
- position: absolute;
157
- top: 50%;
158
- width: 0; }
159
-
160
- .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
161
- float: left; }
162
-
163
- .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
164
- left: 1px;
165
- right: auto; }
166
-
167
- .select2-container--default.select2-container--disabled .select2-selection--single {
168
- background-color: #eee;
169
- cursor: default; }
170
- .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
171
- display: none; }
172
-
173
- .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
174
- border-color: transparent transparent #888 transparent;
175
- border-width: 0 4px 5px 4px; }
176
-
177
- .select2-container--default .select2-selection--multiple {
178
- background-color: white;
179
- border: 1px solid #aaa;
180
- border-radius: 4px;
181
- cursor: text; }
182
- .select2-container--default .select2-selection--multiple .select2-selection__rendered {
183
- box-sizing: border-box;
184
- list-style: none;
185
- margin: 0;
186
- padding: 0 5px;
187
- width: 100%; }
188
- .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
189
- color: #999;
190
- margin-top: 5px;
191
- float: left; }
192
- .select2-container--default .select2-selection--multiple .select2-selection__clear {
193
- cursor: pointer;
194
- float: right;
195
- font-weight: bold;
196
- margin-top: 5px;
197
- margin-right: 10px; }
198
- .select2-container--default .select2-selection--multiple .select2-selection__choice {
199
- background-color: #e4e4e4;
200
- border: 1px solid #aaa;
201
- border-radius: 4px;
202
- cursor: default;
203
- float: left;
204
- margin-right: 5px;
205
- margin-top: 5px;
206
- padding: 0 5px; }
207
- .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
208
- color: #999;
209
- cursor: pointer;
210
- display: inline-block;
211
- font-weight: bold;
212
- margin-right: 2px; }
213
- .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
214
- color: #333; }
215
-
216
- .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
217
- float: right; }
218
-
219
- .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
220
- margin-left: 5px;
221
- margin-right: auto; }
222
-
223
- .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
224
- margin-left: 2px;
225
- margin-right: auto; }
226
-
227
- .select2-container--default.select2-container--focus .select2-selection--multiple {
228
- border: solid black 1px;
229
- outline: 0; }
230
-
231
- .select2-container--default.select2-container--disabled .select2-selection--multiple {
232
- background-color: #eee;
233
- cursor: default; }
234
-
235
- .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
236
- display: none; }
237
-
238
- .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
239
- border-top-left-radius: 0;
240
- border-top-right-radius: 0; }
241
-
242
- .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
243
- border-bottom-left-radius: 0;
244
- border-bottom-right-radius: 0; }
245
-
246
- .select2-container--default .select2-search--dropdown .select2-search__field {
247
- border: 1px solid #aaa; }
248
-
249
- .select2-container--default .select2-search--inline .select2-search__field {
250
- background: transparent;
251
- border: none;
252
- outline: 0;
253
- box-shadow: none;
254
- -webkit-appearance: textfield; }
255
-
256
- .select2-container--default .select2-results > .select2-results__options {
257
- max-height: 200px;
258
- overflow-y: auto; }
259
-
260
- .select2-container--default .select2-results__option[role=group] {
261
- padding: 0; }
262
-
263
- .select2-container--default .select2-results__option[aria-disabled=true] {
264
- color: #999; }
265
-
266
- .select2-container--default .select2-results__option[aria-selected=true] {
267
- background-color: #ddd; }
268
-
269
- .select2-container--default .select2-results__option .select2-results__option {
270
- padding-left: 1em; }
271
- .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
272
- padding-left: 0; }
273
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
274
- margin-left: -1em;
275
- padding-left: 2em; }
276
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
277
- margin-left: -2em;
278
- padding-left: 3em; }
279
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
280
- margin-left: -3em;
281
- padding-left: 4em; }
282
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
283
- margin-left: -4em;
284
- padding-left: 5em; }
285
- .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
286
- margin-left: -5em;
287
- padding-left: 6em; }
288
-
289
- .select2-container--default .select2-results__option--highlighted[aria-selected] {
290
- background-color: #5897fb;
291
- color: white; }
292
-
293
- .select2-container--default .select2-results__group {
294
- cursor: default;
295
- display: block;
296
- padding: 6px; }
297
-
298
- .select2-container--classic .select2-selection--single {
299
- background-color: #f7f7f7;
300
- border: 1px solid #aaa;
301
- border-radius: 4px;
302
- outline: 0;
303
- background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
304
- background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
305
- background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
306
- background-repeat: repeat-x;
307
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
308
- .select2-container--classic .select2-selection--single:focus {
309
- border: 1px solid #5897fb; }
310
- .select2-container--classic .select2-selection--single .select2-selection__rendered {
311
- color: #444;
312
- line-height: 28px; }
313
- .select2-container--classic .select2-selection--single .select2-selection__clear {
314
- cursor: pointer;
315
- float: right;
316
- font-weight: bold;
317
- margin-right: 10px; }
318
- .select2-container--classic .select2-selection--single .select2-selection__placeholder {
319
- color: #999; }
320
- .select2-container--classic .select2-selection--single .select2-selection__arrow {
321
- background-color: #ddd;
322
- border: none;
323
- border-left: 1px solid #aaa;
324
- border-top-right-radius: 4px;
325
- border-bottom-right-radius: 4px;
326
- height: 26px;
327
- position: absolute;
328
- top: 1px;
329
- right: 1px;
330
- width: 20px;
331
- background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
332
- background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
333
- background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
334
- background-repeat: repeat-x;
335
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
336
- .select2-container--classic .select2-selection--single .select2-selection__arrow b {
337
- border-color: #888 transparent transparent transparent;
338
- border-style: solid;
339
- border-width: 5px 4px 0 4px;
340
- height: 0;
341
- left: 50%;
342
- margin-left: -4px;
343
- margin-top: -2px;
344
- position: absolute;
345
- top: 50%;
346
- width: 0; }
347
-
348
- .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
349
- float: left; }
350
-
351
- .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
352
- border: none;
353
- border-right: 1px solid #aaa;
354
- border-radius: 0;
355
- border-top-left-radius: 4px;
356
- border-bottom-left-radius: 4px;
357
- left: 1px;
358
- right: auto; }
359
-
360
- .select2-container--classic.select2-container--open .select2-selection--single {
361
- border: 1px solid #5897fb; }
362
- .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
363
- background: transparent;
364
- border: none; }
365
- .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
366
- border-color: transparent transparent #888 transparent;
367
- border-width: 0 4px 5px 4px; }
368
-
369
- .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
370
- border-top: none;
371
- border-top-left-radius: 0;
372
- border-top-right-radius: 0;
373
- background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
374
- background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
375
- background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
376
- background-repeat: repeat-x;
377
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
378
-
379
- .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
380
- border-bottom: none;
381
- border-bottom-left-radius: 0;
382
- border-bottom-right-radius: 0;
383
- background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
384
- background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
385
- background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
386
- background-repeat: repeat-x;
387
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
388
-
389
- .select2-container--classic .select2-selection--multiple {
390
- background-color: white;
391
- border: 1px solid #aaa;
392
- border-radius: 4px;
393
- cursor: text;
394
- outline: 0; }
395
- .select2-container--classic .select2-selection--multiple:focus {
396
- border: 1px solid #5897fb; }
397
- .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
398
- list-style: none;
399
- margin: 0;
400
- padding: 0 5px; }
401
- .select2-container--classic .select2-selection--multiple .select2-selection__clear {
402
- display: none; }
403
- .select2-container--classic .select2-selection--multiple .select2-selection__choice {
404
- background-color: #e4e4e4;
405
- border: 1px solid #aaa;
406
- border-radius: 4px;
407
- cursor: default;
408
- float: left;
409
- margin-right: 5px;
410
- margin-top: 5px;
411
- padding: 0 5px; }
412
- .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
413
- color: #888;
414
- cursor: pointer;
415
- display: inline-block;
416
- font-weight: bold;
417
- margin-right: 2px; }
418
- .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
419
- color: #555; }
420
-
421
- .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
422
- float: right; }
423
-
424
- .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
425
- margin-left: 5px;
426
- margin-right: auto; }
427
-
428
- .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
429
- margin-left: 2px;
430
- margin-right: auto; }
431
-
432
- .select2-container--classic.select2-container--open .select2-selection--multiple {
433
- border: 1px solid #5897fb; }
434
-
435
- .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
436
- border-top: none;
437
- border-top-left-radius: 0;
438
- border-top-right-radius: 0; }
439
-
440
- .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
441
- border-bottom: none;
442
- border-bottom-left-radius: 0;
443
- border-bottom-right-radius: 0; }
444
-
445
- .select2-container--classic .select2-search--dropdown .select2-search__field {
446
- border: 1px solid #aaa;
447
- outline: 0; }
448
-
449
- .select2-container--classic .select2-search--inline .select2-search__field {
450
- outline: 0;
451
- box-shadow: none; }
452
-
453
- .select2-container--classic .select2-dropdown {
454
- background-color: white;
455
- border: 1px solid transparent; }
456
-
457
- .select2-container--classic .select2-dropdown--above {
458
- border-bottom: none; }
459
-
460
- .select2-container--classic .select2-dropdown--below {
461
- border-top: none; }
462
-
463
- .select2-container--classic .select2-results > .select2-results__options {
464
- max-height: 200px;
465
- overflow-y: auto; }
466
-
467
- .select2-container--classic .select2-results__option[role=group] {
468
- padding: 0; }
469
-
470
- .select2-container--classic .select2-results__option[aria-disabled=true] {
471
- color: grey; }
472
-
473
- .select2-container--classic .select2-results__option--highlighted[aria-selected] {
474
- background-color: #3875d7;
475
- color: white; }
476
-
477
- .select2-container--classic .select2-results__group {
478
- cursor: default;
479
- display: block;
480
- padding: 6px; }
481
-
482
- .select2-container--classic.select2-container--open .select2-dropdown {
483
- border-color: #5897fb; }
1
+ .select2-container {
2
+ box-sizing: border-box;
3
+ display: inline-block;
4
+ margin: 0;
5
+ position: relative;
6
+ vertical-align: middle;
7
+ }
8
+ .select2-container .select2-selection--single {
9
+ box-sizing: border-box;
10
+ cursor: pointer;
11
+ display: block;
12
+ height: 28px;
13
+ user-select: none;
14
+ -webkit-user-select: none; }
15
+ .select2-container .select2-selection--single .select2-selection__rendered {
16
+ display: block;
17
+ padding-left: 8px;
18
+ padding-right: 20px;
19
+ overflow: hidden;
20
+ text-overflow: ellipsis;
21
+ white-space: nowrap; }
22
+ .select2-container .select2-selection--single .select2-selection__clear {
23
+ position: relative; }
24
+ .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
25
+ padding-right: 8px;
26
+ padding-left: 20px; }
27
+ .select2-container .select2-selection--multiple {
28
+ box-sizing: border-box;
29
+ cursor: pointer;
30
+ display: block;
31
+ min-height: 32px;
32
+ user-select: none;
33
+ -webkit-user-select: none; }
34
+ .select2-container .select2-selection--multiple .select2-selection__rendered {
35
+ /*display: inline-block;*/
36
+ overflow: hidden;
37
+ padding-left: 8px;
38
+ text-overflow: ellipsis;
39
+ white-space: nowrap; }
40
+ .select2-container .select2-search--inline {
41
+ float: left; }
42
+ .select2-container .select2-search--inline .select2-search__field {
43
+ box-sizing: border-box;
44
+ border: none;
45
+ font-size: 100%;
46
+ margin-top: 5px;
47
+ padding: 0; }
48
+ .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
49
+ -webkit-appearance: none; }
50
+
51
+ .select2-dropdown {
52
+ background-color: white;
53
+ border: 1px solid #aaa;
54
+ border-radius: 4px;
55
+ box-sizing: border-box;
56
+ display: block;
57
+ position: absolute;
58
+ left: -100000px;
59
+ width: 100%;
60
+ z-index: 1051; }
61
+
62
+ .select2-results {
63
+ display: block; }
64
+
65
+ .select2-results__options {
66
+ list-style: none;
67
+ margin: 0;
68
+ padding: 0; }
69
+
70
+ .select2-results__option {
71
+ padding: 6px;
72
+ user-select: none;
73
+ -webkit-user-select: none; }
74
+ .select2-results__option[aria-selected] {
75
+ cursor: pointer; }
76
+
77
+ .select2-container--open .select2-dropdown {
78
+ left: 0; }
79
+
80
+ .select2-container--open .select2-dropdown--above {
81
+ border-bottom: none;
82
+ border-bottom-left-radius: 0;
83
+ border-bottom-right-radius: 0; }
84
+
85
+ .select2-container--open .select2-dropdown--below {
86
+ border-top: none;
87
+ border-top-left-radius: 0;
88
+ border-top-right-radius: 0; }
89
+
90
+ .select2-search--dropdown {
91
+ display: block;
92
+ padding: 4px; }
93
+ .select2-search--dropdown .select2-search__field {
94
+ padding: 4px;
95
+ width: 100%;
96
+ box-sizing: border-box; }
97
+ .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
98
+ -webkit-appearance: none; }
99
+ .select2-search--dropdown.select2-search--hide {
100
+ display: none; }
101
+
102
+ .select2-close-mask {
103
+ border: 0;
104
+ margin: 0;
105
+ padding: 0;
106
+ display: block;
107
+ position: fixed;
108
+ left: 0;
109
+ top: 0;
110
+ min-height: 100%;
111
+ min-width: 100%;
112
+ height: auto;
113
+ width: auto;
114
+ opacity: 0;
115
+ z-index: 99;
116
+ background-color: #fff;
117
+ filter: alpha(opacity=0); }
118
+
119
+ .select2-hidden-accessible {
120
+ border: 0 !important;
121
+ clip: rect(0 0 0 0) !important;
122
+ height: 1px !important;
123
+ margin: -1px !important;
124
+ overflow: hidden !important;
125
+ padding: 0 !important;
126
+ position: absolute !important;
127
+ width: 1px !important; }
128
+
129
+ .select2-container--default .select2-selection--single {
130
+ background-color: #fff;
131
+ border: 1px solid #aaa;
132
+ border-radius: 4px; }
133
+ .select2-container--default .select2-selection--single .select2-selection__rendered {
134
+ color: #444;
135
+ line-height: 28px; }
136
+ .select2-container--default .select2-selection--single .select2-selection__clear {
137
+ cursor: pointer;
138
+ float: right;
139
+ font-weight: bold; }
140
+ .select2-container--default .select2-selection--single .select2-selection__placeholder {
141
+ color: #999; }
142
+ .select2-container--default .select2-selection--single .select2-selection__arrow {
143
+ height: 26px;
144
+ position: absolute;
145
+ top: 1px;
146
+ right: 1px;
147
+ width: 20px; }
148
+ .select2-container--default .select2-selection--single .select2-selection__arrow b {
149
+ border-color: #888 transparent transparent transparent;
150
+ border-style: solid;
151
+ border-width: 5px 4px 0 4px;
152
+ height: 0;
153
+ left: 50%;
154
+ margin-left: -4px;
155
+ margin-top: -2px;
156
+ position: absolute;
157
+ top: 50%;
158
+ width: 0; }
159
+
160
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
161
+ float: left; }
162
+
163
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
164
+ left: 1px;
165
+ right: auto; }
166
+
167
+ .select2-container--default.select2-container--disabled .select2-selection--single {
168
+ background-color: #eee;
169
+ cursor: default; }
170
+ .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
171
+ display: none; }
172
+
173
+ .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
174
+ border-color: transparent transparent #888 transparent;
175
+ border-width: 0 4px 5px 4px; }
176
+
177
+ .select2-container--default .select2-selection--multiple {
178
+ background-color: white;
179
+ border: 1px solid #aaa;
180
+ border-radius: 4px;
181
+ cursor: text; }
182
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered {
183
+ box-sizing: border-box;
184
+ list-style: none;
185
+ margin: 0;
186
+ padding: 0 5px;
187
+ width: 100%; }
188
+ .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
189
+ color: #999;
190
+ margin-top: 5px;
191
+ float: left; }
192
+ .select2-container--default .select2-selection--multiple .select2-selection__clear {
193
+ cursor: pointer;
194
+ float: right;
195
+ font-weight: bold;
196
+ margin-top: 5px;
197
+ margin-right: 10px; }
198
+ .select2-container--default .select2-selection--multiple .select2-selection__choice {
199
+ background-color: #e4e4e4;
200
+ border: 1px solid #aaa;
201
+ border-radius: 4px;
202
+ cursor: default;
203
+ float: left;
204
+ margin-right: 5px;
205
+ margin-top: 5px;
206
+ padding: 0 5px; }
207
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
208
+ color: #999;
209
+ cursor: pointer;
210
+ display: inline-block;
211
+ font-weight: bold;
212
+ margin-right: 2px; }
213
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
214
+ color: #333; }
215
+
216
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
217
+ float: right; }
218
+
219
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
220
+ margin-left: 5px;
221
+ margin-right: auto; }
222
+
223
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
224
+ margin-left: 2px;
225
+ margin-right: auto; }
226
+
227
+ .select2-container--default.select2-container--focus .select2-selection--multiple {
228
+ border: solid black 1px;
229
+ outline: 0; }
230
+
231
+ .select2-container--default.select2-container--disabled .select2-selection--multiple {
232
+ background-color: #eee;
233
+ cursor: default; }
234
+
235
+ .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
236
+ display: none; }
237
+
238
+ .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
239
+ border-top-left-radius: 0;
240
+ border-top-right-radius: 0; }
241
+
242
+ .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
243
+ border-bottom-left-radius: 0;
244
+ border-bottom-right-radius: 0; }
245
+
246
+ .select2-container--default .select2-search--dropdown .select2-search__field {
247
+ border: 1px solid #aaa; }
248
+
249
+ .select2-container--default .select2-search--inline .select2-search__field {
250
+ background: transparent;
251
+ border: none;
252
+ outline: 0;
253
+ box-shadow: none;
254
+ -webkit-appearance: textfield; }
255
+
256
+ .select2-container--default .select2-results > .select2-results__options {
257
+ max-height: 200px;
258
+ overflow-y: auto; }
259
+
260
+ .select2-container--default .select2-results__option[role=group] {
261
+ padding: 0; }
262
+
263
+ .select2-container--default .select2-results__option[aria-disabled=true] {
264
+ color: #999; }
265
+
266
+ .select2-container--default .select2-results__option[aria-selected=true] {
267
+ background-color: #ddd; }
268
+
269
+ .select2-container--default .select2-results__option .select2-results__option {
270
+ padding-left: 1em; }
271
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
272
+ padding-left: 0; }
273
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
274
+ margin-left: -1em;
275
+ padding-left: 2em; }
276
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
277
+ margin-left: -2em;
278
+ padding-left: 3em; }
279
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
280
+ margin-left: -3em;
281
+ padding-left: 4em; }
282
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
283
+ margin-left: -4em;
284
+ padding-left: 5em; }
285
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
286
+ margin-left: -5em;
287
+ padding-left: 6em; }
288
+
289
+ .select2-container--default .select2-results__option--highlighted[aria-selected] {
290
+ background-color: #5897fb;
291
+ color: white; }
292
+
293
+ .select2-container--default .select2-results__group {
294
+ cursor: default;
295
+ display: block;
296
+ padding: 6px; }
297
+
298
+ .select2-container--classic .select2-selection--single {
299
+ background-color: #f7f7f7;
300
+ border: 1px solid #aaa;
301
+ border-radius: 4px;
302
+ outline: 0;
303
+ background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
304
+ background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
305
+ background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
306
+ background-repeat: repeat-x;
307
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
308
+ .select2-container--classic .select2-selection--single:focus {
309
+ border: 1px solid #5897fb; }
310
+ .select2-container--classic .select2-selection--single .select2-selection__rendered {
311
+ color: #444;
312
+ line-height: 28px; }
313
+ .select2-container--classic .select2-selection--single .select2-selection__clear {
314
+ cursor: pointer;
315
+ float: right;
316
+ font-weight: bold;
317
+ margin-right: 10px; }
318
+ .select2-container--classic .select2-selection--single .select2-selection__placeholder {
319
+ color: #999; }
320
+ .select2-container--classic .select2-selection--single .select2-selection__arrow {
321
+ background-color: #ddd;
322
+ border: none;
323
+ border-left: 1px solid #aaa;
324
+ border-top-right-radius: 4px;
325
+ border-bottom-right-radius: 4px;
326
+ height: 26px;
327
+ position: absolute;
328
+ top: 1px;
329
+ right: 1px;
330
+ width: 20px;
331
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
332
+ background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
333
+ background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
334
+ background-repeat: repeat-x;
335
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
336
+ .select2-container--classic .select2-selection--single .select2-selection__arrow b {
337
+ border-color: #888 transparent transparent transparent;
338
+ border-style: solid;
339
+ border-width: 5px 4px 0 4px;
340
+ height: 0;
341
+ left: 50%;
342
+ margin-left: -4px;
343
+ margin-top: -2px;
344
+ position: absolute;
345
+ top: 50%;
346
+ width: 0; }
347
+
348
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
349
+ float: left; }
350
+
351
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
352
+ border: none;
353
+ border-right: 1px solid #aaa;
354
+ border-radius: 0;
355
+ border-top-left-radius: 4px;
356
+ border-bottom-left-radius: 4px;
357
+ left: 1px;
358
+ right: auto; }
359
+
360
+ .select2-container--classic.select2-container--open .select2-selection--single {
361
+ border: 1px solid #5897fb; }
362
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
363
+ background: transparent;
364
+ border: none; }
365
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
366
+ border-color: transparent transparent #888 transparent;
367
+ border-width: 0 4px 5px 4px; }
368
+
369
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
370
+ border-top: none;
371
+ border-top-left-radius: 0;
372
+ border-top-right-radius: 0;
373
+ background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
374
+ background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
375
+ background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
376
+ background-repeat: repeat-x;
377
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
378
+
379
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
380
+ border-bottom: none;
381
+ border-bottom-left-radius: 0;
382
+ border-bottom-right-radius: 0;
383
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
384
+ background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
385
+ background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
386
+ background-repeat: repeat-x;
387
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
388
+
389
+ .select2-container--classic .select2-selection--multiple {
390
+ background-color: white;
391
+ border: 1px solid #aaa;
392
+ border-radius: 4px;
393
+ cursor: text;
394
+ outline: 0; }
395
+ .select2-container--classic .select2-selection--multiple:focus {
396
+ border: 1px solid #5897fb; }
397
+ .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
398
+ list-style: none;
399
+ margin: 0;
400
+ padding: 0 5px; }
401
+ .select2-container--classic .select2-selection--multiple .select2-selection__clear {
402
+ display: none; }
403
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice {
404
+ background-color: #e4e4e4;
405
+ border: 1px solid #aaa;
406
+ border-radius: 4px;
407
+ cursor: default;
408
+ float: left;
409
+ margin-right: 5px;
410
+ margin-top: 5px;
411
+ padding: 0 5px; }
412
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
413
+ color: #888;
414
+ cursor: pointer;
415
+ display: inline-block;
416
+ font-weight: bold;
417
+ margin-right: 2px; }
418
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
419
+ color: #555; }
420
+
421
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
422
+ float: right; }
423
+
424
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
425
+ margin-left: 5px;
426
+ margin-right: auto; }
427
+
428
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
429
+ margin-left: 2px;
430
+ margin-right: auto; }
431
+
432
+ .select2-container--classic.select2-container--open .select2-selection--multiple {
433
+ border: 1px solid #5897fb; }
434
+
435
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
436
+ border-top: none;
437
+ border-top-left-radius: 0;
438
+ border-top-right-radius: 0; }
439
+
440
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
441
+ border-bottom: none;
442
+ border-bottom-left-radius: 0;
443
+ border-bottom-right-radius: 0; }
444
+
445
+ .select2-container--classic .select2-search--dropdown .select2-search__field {
446
+ border: 1px solid #aaa;
447
+ outline: 0; }
448
+
449
+ .select2-container--classic .select2-search--inline .select2-search__field {
450
+ outline: 0;
451
+ box-shadow: none; }
452
+
453
+ .select2-container--classic .select2-dropdown {
454
+ background-color: white;
455
+ border: 1px solid transparent; }
456
+
457
+ .select2-container--classic .select2-dropdown--above {
458
+ border-bottom: none; }
459
+
460
+ .select2-container--classic .select2-dropdown--below {
461
+ border-top: none; }
462
+
463
+ .select2-container--classic .select2-results > .select2-results__options {
464
+ max-height: 200px;
465
+ overflow-y: auto; }
466
+
467
+ .select2-container--classic .select2-results__option[role=group] {
468
+ padding: 0; }
469
+
470
+ .select2-container--classic .select2-results__option[aria-disabled=true] {
471
+ color: grey; }
472
+
473
+ .select2-container--classic .select2-results__option--highlighted[aria-selected] {
474
+ background-color: #3875d7;
475
+ color: white; }
476
+
477
+ .select2-container--classic .select2-results__group {
478
+ cursor: default;
479
+ display: block;
480
+ padding: 6px; }
481
+
482
+ .select2-container--classic.select2-container--open .select2-dropdown {
483
+ border-color: #5897fb; }
includes/admin/meta-box/css/slider.css CHANGED
@@ -1,13 +1,13 @@
1
- .mashsb-rwmb-slider {
2
- display: inline-block;
3
- vertical-align: middle;
4
- width: 50%;
5
- }
6
- .mashsb-rwmb-slider-value-label {
7
- margin-left: 10px;
8
- vertical-align: middle;
9
- }
10
- /* Fix slider handle being visible through jQuery panel */
11
- .ui-slider .ui-slider-handle {
12
- z-index: 1;
13
  }
1
+ .mashsb-rwmb-slider {
2
+ display: inline-block;
3
+ vertical-align: middle;
4
+ width: 50%;
5
+ }
6
+ .mashsb-rwmb-slider-value-label {
7
+ margin-left: 10px;
8
+ vertical-align: middle;
9
+ }
10
+ /* Fix slider handle being visible through jQuery panel */
11
+ .ui-slider .ui-slider-handle {
12
+ z-index: 1;
13
  }
includes/admin/meta-box/css/style-rtl.css CHANGED
@@ -1,7 +1,7 @@
1
- .mashsb-rwmb-label, .mashsb-rwmb-input{
2
- float: right;
3
- }
4
- label.error{
5
- padding-left: auto;
6
- padding-right: 3px;
7
  }
1
+ .mashsb-rwmb-label, .mashsb-rwmb-input{
2
+ float: right;
3
+ }
4
+ label.error{
5
+ padding-left: auto;
6
+ padding-right: 3px;
7
  }
includes/admin/meta-box/css/upload.css CHANGED
@@ -1,30 +1,30 @@
1
- .mashsb-rwmb-upload-area {
2
- position: relative;
3
- padding-top: 0;
4
- margin-top: 0;
5
- height: 200px;
6
- border: 4px dashed #ddd;
7
- }
8
-
9
- .mashsb-rwmb-upload-inside {
10
- text-align: center;
11
- position: absolute;
12
- left: 0;
13
- right:0;
14
- top: 50%;
15
- transform: translateY(-50%);
16
- -webkit-transform: translateY(-50%);
17
- -moz-transform: translateY(-50%);
18
- -ms-transform: translateY(-50%);
19
- }
20
-
21
- .mashsb-rwmb-upload-inside p, .mashsb-rwmb-upload-inside h3 {
22
- text-align: center;
23
- }
24
-
25
- .mashsb-rwmb-upload-inside h3 {
26
- font-size: 20px;
27
- line-height: 28px;
28
- font-weight: 400;
29
- margin: 0;
30
- }
1
+ .mashsb-rwmb-upload-area {
2
+ position: relative;
3
+ padding-top: 0;
4
+ margin-top: 0;
5
+ height: 200px;
6
+ border: 4px dashed #ddd;
7
+ }
8
+
9
+ .mashsb-rwmb-upload-inside {
10
+ text-align: center;
11
+ position: absolute;
12
+ left: 0;
13
+ right:0;
14
+ top: 50%;
15
+ transform: translateY(-50%);
16
+ -webkit-transform: translateY(-50%);
17
+ -moz-transform: translateY(-50%);
18
+ -ms-transform: translateY(-50%);
19
+ }
20
+
21
+ .mashsb-rwmb-upload-inside p, .mashsb-rwmb-upload-inside h3 {
22
+ text-align: center;
23
+ }
24
+
25
+ .mashsb-rwmb-upload-inside h3 {
26
+ font-size: 20px;
27
+ line-height: 28px;
28
+ font-weight: 400;
29
+ margin: 0;
30
+ }
includes/admin/meta-box/css/wysiwyg.css CHANGED
@@ -1,6 +1,6 @@
1
- .mashsb-rwmb-field .mceIframeContainer {
2
- background: #fff;
3
- }
4
- .mashsb-rwmb-wysiwyg-clone {
5
- padding-top: 20px;
6
- }
1
+ .mashsb-rwmb-field .mceIframeContainer {
2
+ background: #fff;
3
+ }
4
+ .mashsb-rwmb-wysiwyg-clone {
5
+ padding-top: 20px;
6
+ }
includes/admin/meta-box/inc/core.php CHANGED
@@ -1,142 +1,142 @@
1
- <?php
2
- /**
3
- * The plugin core class which initialize plugin's code.
4
- * @package Meta Box
5
- */
6
-
7
- /**
8
- * The Meta Box core class.
9
- * @package Meta Box
10
- */
11
- class MASHSB_RWMB_Core
12
- {
13
- /**
14
- * Stores all registered meta boxes
15
- * @var array
16
- */
17
- private static $meta_boxes = null;
18
-
19
- /**
20
- * Register hooks.
21
- */
22
- public function __construct()
23
- {
24
- $plugin = 'meta-box/meta-box.php';
25
- add_filter( "plugin_action_links_$plugin", array( $this, 'plugin_links' ) );
26
- add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
27
- add_action( 'admin_init', array( $this, 'register_meta_boxes' ) );
28
- add_action( 'edit_page_form', array( $this, 'fix_page_template' ) );
29
- }
30
-
31
- /**
32
- * Add links to Documentation and Extensions in plugin's list of action links.
33
- *
34
- * @since 4.3.11
35
- * @param array $links Array of action links
36
- * @return array
37
- */
38
- public function plugin_links( $links )
39
- {
40
- $links[] = '<a href="https://metabox.io/docs/">' . __( 'Documentation', 'meta-box' ) . '</a>';
41
- $links[] = '<a href="https://metabox.io/plugins/">' . __( 'Extensions', 'meta-box' ) . '</a>';
42
- return $links;
43
- }
44
-
45
- /**
46
- * Load plugin translation.
47
- */
48
- public function load_textdomain()
49
- {
50
- load_plugin_textdomain( 'meta-box', false, plugin_basename( MASHSB_RWMB_DIR ) . '/lang/' );
51
- }
52
-
53
- /**
54
- * Register meta boxes.
55
- * Advantages:
56
- * - prevents incorrect hook.
57
- * - no need to check for class existences.
58
- */
59
- public function register_meta_boxes()
60
- {
61
- $meta_boxes = self::get_meta_boxes();
62
- foreach ( $meta_boxes as $meta_box )
63
- {
64
- new MASHSB_RW_Meta_Box( $meta_box );
65
- }
66
- }
67
-
68
- /**
69
- * Get registered meta boxes via a filter.
70
- * Advantages:
71
- * - prevents duplicated global variables.
72
- * - allows users to remove/hide registered meta boxes.
73
- */
74
- public static function get_meta_boxes()
75
- {
76
- if ( null === self::$meta_boxes )
77
- {
78
- self::$meta_boxes = apply_filters( 'mashsb_rwmb_meta_boxes', array() );
79
- self::$meta_boxes = empty( self::$meta_boxes ) || ! is_array( self::$meta_boxes ) ? array() : self::$meta_boxes;
80
- }
81
- return self::$meta_boxes;
82
- }
83
-
84
- /**
85
- * WordPress will prevent post data saving if a page template has been selected that does not exist
86
- * This is especially a problem when switching to our theme, and old page templates are in the post data
87
- * Unset the page template if the page does not exist to allow the post to save
88
- *
89
- * @param WP_Post $post
90
- * @since 4.3.10
91
- */
92
- public function fix_page_template( WP_Post $post )
93
- {
94
- $template = get_post_meta( $post->ID, '_wp_page_template', true );
95
- $page_templates = wp_get_theme()->get_page_templates();
96
-
97
- // If the template doesn't exists, remove the data to allow WordPress to save
98
- if ( ! isset( $page_templates[$template] ) )
99
- {
100
- delete_post_meta( $post->ID, '_wp_page_template' );
101
- }
102
- }
103
-
104
- /**
105
- * Apply various filters based on field type, id.
106
- * Filters:
107
- * - rwmb_{$name}
108
- * - rwmb_{$field['type']}_{$name}
109
- * - rwmb_{$field['id']}_{$name}
110
- * @return mixed
111
- */
112
- public static function filter()
113
- {
114
- $args = func_get_args();
115
-
116
- // 3 first params must be: filter name, value, field. Other params will be used for filters.
117
- $name = array_shift( $args );
118
- $value = array_shift( $args );
119
- $field = array_shift( $args );
120
-
121
- // List of filters
122
- $filters = array(
123
- 'rwmb_' . $name,
124
- 'rwmb_' . $field['type'] . '_' . $name,
125
- );
126
- if ( isset( $field['id'] ) )
127
- {
128
- $filters[] = 'rwmb_' . $field['id'] . '_' . $name;
129
- }
130
-
131
- // Filter params: value, field, other params. Note: value is changed after each run.
132
- array_unshift( $args, $field );
133
- foreach ( $filters as $filter )
134
- {
135
- $filter_args = $args;
136
- array_unshift( $filter_args, $value );
137
- $value = apply_filters_ref_array( $filter, $filter_args );
138
- }
139
-
140
- return $value;
141
- }
142
- }
1
+ <?php
2
+ /**
3
+ * The plugin core class which initialize plugin's code.
4
+ * @package Meta Box
5
+ */
6
+
7
+ /**
8
+ * The Meta Box core class.
9
+ * @package Meta Box
10
+ */
11
+ class MASHSB_RWMB_Core
12
+ {
13
+ /**
14
+ * Stores all registered meta boxes
15
+ * @var array
16
+ */
17
+ private static $meta_boxes = null;
18
+
19
+ /**
20
+ * Register hooks.
21
+ */
22
+ public function __construct()
23
+ {
24
+ $plugin = 'meta-box/meta-box.php';
25
+ add_filter( "plugin_action_links_$plugin", array( $this, 'plugin_links' ) );
26
+ add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
27
+ add_action( 'admin_init', array( $this, 'register_meta_boxes' ) );
28
+ add_action( 'edit_page_form', array( $this, 'fix_page_template' ) );
29
+ }
30
+
31
+ /**
32
+ * Add links to Documentation and Extensions in plugin's list of action links.
33
+ *
34
+ * @since 4.3.11
35
+ * @param array $links Array of action links
36
+ * @return array
37
+ */
38
+ public function plugin_links( $links )
39
+ {
40
+ $links[] = '<a href="https://metabox.io/docs/">' . __( 'Documentation', 'meta-box' ) . '</a>';
41
+ $links[] = '<a href="https://metabox.io/plugins/">' . __( 'Extensions', 'meta-box' ) . '</a>';
42
+ return $links;
43
+ }
44
+
45
+ /**
46
+ * Load plugin translation.
47
+ */
48
+ public function load_textdomain()
49
+ {
50
+ load_plugin_textdomain( 'meta-box', false, plugin_basename( MASHSB_RWMB_DIR ) . '/lang/' );
51
+ }
52
+
53
+ /**
54
+ * Register meta boxes.
55
+ * Advantages:
56
+ * - prevents incorrect hook.
57
+ * - no need to check for class existences.
58
+ */
59
+ public function register_meta_boxes()
60
+ {
61
+ $meta_boxes = self::get_meta_boxes();
62
+ foreach ( $meta_boxes as $meta_box )
63
+ {
64
+ new MASHSB_RW_Meta_Box( $meta_box );
65
+ }
66
+ }
67
+
68
+ /**
69
+ * Get registered meta boxes via a filter.
70
+ * Advantages:
71
+ * - prevents duplicated global variables.
72
+ * - allows users to remove/hide registered meta boxes.
73
+ */
74
+ public static function get_meta_boxes()
75
+ {
76
+ if ( null === self::$meta_boxes )
77
+ {
78
+ self::$meta_boxes = apply_filters( 'mashsb_rwmb_meta_boxes', array() );
79
+ self::$meta_boxes = empty( self::$meta_boxes ) || ! is_array( self::$meta_boxes ) ? array() : self::$meta_boxes;
80
+ }
81
+ return self::$meta_boxes;
82
+ }
83
+
84
+ /**
85
+ * WordPress will prevent post data saving if a page template has been selected that does not exist
86
+ * This is especially a problem when switching to our theme, and old page templates are in the post data
87
+ * Unset the page template if the page does not exist to allow the post to save
88
+ *
89
+ * @param WP_Post $post
90
+ * @since 4.3.10
91
+ */
92
+ public function fix_page_template( WP_Post $post )
93
+ {
94
+ $template = get_post_meta( $post->ID, '_wp_page_template', true );
95
+ $page_templates = wp_get_theme()->get_page_templates();
96
+
97
+ // If the template doesn't exists, remove the data to allow WordPress to save
98
+ if ( ! isset( $page_templates[$template] ) )
99
+ {
100
+ delete_post_meta( $post->ID, '_wp_page_template' );
101
+ }
102
+ }
103
+
104
+ /**
105
+ * Apply various filters based on field type, id.
106
+ * Filters:
107
+ * - rwmb_{$name}
108
+ * - rwmb_{$field['type']}_{$name}
109
+ * - rwmb_{$field['id']}_{$name}
110
+ * @return mixed
111
+ */
112
+ public static function filter()
113
+ {
114
+ $args = func_get_args();
115
+
116
+ // 3 first params must be: filter name, value, field. Other params will be used for filters.
117
+ $name = array_shift( $args );
118
+ $value = array_shift( $args );
119
+ $field = array_shift( $args );
120
+
121
+ // List of filters
122
+ $filters = array(
123
+ 'rwmb_' . $name,
124
+ 'rwmb_' . $field['type'] . '_' . $name,
125
+ );
126
+ if ( isset( $field['id'] ) )
127
+ {
128
+ $filters[] = 'rwmb_' . $field['id'] . '_' . $name;
129
+ }
130
+
131
+ // Filter params: value, field, other params. Note: value is changed after each run.
132
+ array_unshift( $args, $field );
133
+ foreach ( $filters as $filter )
134
+ {
135
+ $filter_args = $args;
136
+ array_unshift( $filter_args, $value );
137
+ $value = apply_filters_ref_array( $filter, $filter_args );
138
+ }
139
+
140
+ return $value;
141
+ }
142
+ }
includes/admin/meta-box/inc/field.php CHANGED
@@ -1,495 +1,495 @@
1
- <?php
2
- /**
3
- * Base field class which defines all necessary methods.
4
- * Fields must inherit this class and overwrite methods with its own.
5
- */
6
- abstract class MASHSB_RWMB_Field
7
- {
8
- /**
9
- * Add actions
10
- *
11
- * @return void
12
- */
13
- static function add_actions()
14
- {
15
- }
16
-
17
- /**
18
- * Enqueue scripts and styles
19
- *
20
- * @return void
21
- */
22
- static function admin_enqueue_scripts()
23
- {
24
- }
25
-
26
- /**
27
- * Show field HTML
28
- * Filters are put inside this method, not inside methods such as "meta", "html", "begin_html", etc.
29
- * That ensures the returned value are always been applied filters
30
- * This method is not meant to be overwritten in specific fields
31
- *
32
- * @param array $field
33
- * @param bool $saved
34
- *
35
- * @return string
36
- */
37
- static function show( $field, $saved )
38
- {
39
- $post = get_post();
40
- $post_id = isset( $post->ID ) ? $post->ID : 0;
41
-
42
- $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
43
- $meta = call_user_func( array( $field_class, 'meta' ), $post_id, $saved, $field );
44
- $meta = MASHSB_RWMB_Core::filter( 'field_meta', $meta, $field, $saved );
45
-
46
- $begin = call_user_func( array( $field_class, 'begin_html' ), $meta, $field );
47
- $begin = MASHSB_RWMB_Core::filter( 'begin_html', $begin, $field, $meta );
48
-
49
- // Separate code for cloneable and non-cloneable fields to make easy to maintain
50
-
51
- // Cloneable fields
52
- if ( $field['clone'] )
53
- {
54
- $field_html = '';
55
-
56
- /**
57
- * Note: $meta must contain value so that the foreach loop runs!
58
- * @see meta()
59
- */
60
- foreach ( $meta as $index => $sub_meta )
61
- {
62
- $sub_field = $field;
63
- $sub_field['field_name'] = $field['field_name'] . "[{$index}]";
64
- if ( $index > 0 )
65
- {
66
- if ( isset( $sub_field['address_field'] ) )
67
- $sub_field['address_field'] = $field['address_field'] . "_{$index}";
68
- $sub_field['id'] = $field['id'] . "_{$index}";
69
- }
70
- if ( $field['multiple'] )
71
- $sub_field['field_name'] .= '[]';
72
-
73
- // Wrap field HTML in a div with class="mashsb-rwmb-clone" if needed
74
- $class = "mashsb-rwmb-clone mashsb-rwmb-{$field['type']}-clone";
75
- $sort_icon = '';
76
- if ( $field['sort_clone'] )
77
- {
78
- $class .= ' mashsb-rwmb-sort-clone';
79
- $sort_icon = "<a href='javascript:;' class='mashsb-rwmb-clone-icon'></a>";
80
- }
81
- $input_html = "<div class='$class'>" . $sort_icon;
82
-
83
- // Call separated methods for displaying each type of field
84
- $input_html .= call_user_func( array( $field_class, 'html' ), $sub_meta, $sub_field );
85
- $input_html = MASHSB_RWMB_Core::filter( 'html', $input_html, $sub_field, $sub_meta );
86
-
87
- // Remove clone button
88
- $input_html .= call_user_func( array( $field_class, 'remove_clone_button' ), $sub_field );
89
-
90
- $input_html .= '</div>';
91
-
92
- $field_html .= $input_html;
93
- }
94
- }
95
- // Non-cloneable fields
96
- else
97
- {
98
- // Call separated methods for displaying each type of field
99
- $field_html = call_user_func( array( $field_class, 'html' ), $meta, $field );
100
- $field_html = MASHSB_RWMB_Core::filter( 'html', $field_html, $field, $meta );
101
- }
102
-
103
- $end = call_user_func( array( $field_class, 'end_html' ), $meta, $field );
104
- $end = MASHSB_RWMB_Core::filter( 'end_html', $end, $field, $meta );
105
-
106
- $html = MASHSB_RWMB_Core::filter( 'wrapper_html', "$begin$field_html$end", $field, $meta );
107
-
108
- // Display label and input in DIV and allow user-defined classes to be appended
109
- $classes = "mashsb-rwmb-field mashsb-rwmb-{$field['type']}-wrapper " . $field['class'] ;
110
- if ( 'hidden' === $field['type'] )
111
- $classes .= ' hidden';
112
- if ( ! empty( $field['required'] ) )
113
- $classes .= ' required';
114
-
115
- $outer_html = sprintf(
116
- $field['before'] . '<div class="%s">%s</div>' . $field['after'],
117
- trim( $classes ),
118
- $html
119
- );
120
- $outer_html = MASHSB_RWMB_Core::filter( 'outer_html', $outer_html, $field, $meta );
121
-
122
- echo $outer_html;
123
- }
124
-
125
- /**
126
- * Get field HTML
127
- *
128
- * @param mixed $meta
129
- * @param array $field
130
- *
131
- * @return string
132
- */
133
- static function html( $meta, $field )
134
- {
135
- return '';
136
- }
137
-
138
- /**
139
- * Show begin HTML markup for fields
140
- *
141
- * @param mixed $meta
142
- * @param array $field
143
- *
144
- * @return string
145
- */
146
- static function begin_html( $meta, $field )
147
- {
148
- $field_label = '';
149
- if ( $field['name'] )
150
- {
151
- $field_label = sprintf(
152
- '<div class="mashsb-rwmb-label"><label for="%s">%s</label></div>',
153
- $field['id'],
154
- $field['name']
155
- );
156
- }
157
-
158
- $data_max_clone = is_numeric( $field['max_clone'] ) && $field['max_clone'] > 1 ? ' data-max-clone=' . $field['max_clone'] : '';
159
-
160
- $input_open = sprintf(
161
- '<div class="mashsb-rwmb-input"%s>',
162
- $data_max_clone
163
- );
164
-
165
- return $field_label . $input_open;
166
- }
167
-
168
- /**
169
- * Show end HTML markup for fields
170
- *
171
- * @param mixed $meta
172
- * @param array $field
173
- *
174
- * @return string
175
- */
176
- static function end_html( $meta, $field )
177
- {
178
- $button = $field['clone'] ? call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'add_clone_button' ), $field ) : '';
179
- $desc = $field['desc'] ? "<p id='{$field['id']}_description' class='description'>{$field['desc']}</p>" : '';
180
-
181
- // Closes the container
182
- $html = "{$button}{$desc}</div>";
183
-
184
- return $html;
185
- }
186
-
187
- /**
188
- * Add clone button
189
- *
190
- * @param array $field Field parameter
191
- *
192
- * @return string $html
193
- */
194
- static function add_clone_button( $field )
195
- {
196
- $text = apply_filters( 'rwmb_add_clone_button_text', __( '+ Add more', 'meta-box' ), $field );
197
- return "<a href='#' class='mashsb-rwmb-button button-primary add-clone'>$text</a>";
198
- }
199
-
200
- /**
201
- * Remove clone button
202
- *
203
- * @param array $field Field parameter
204
- *
205
- * @return string $html
206
- */
207
- static function remove_clone_button( $field )
208
- {
209
- $icon = '<i class="dashicons dashicons-minus"></i>';
210
- $text = apply_filters( 'rwmb_remove_clone_button_text', $icon, $field );
211
- return "<a href='#' class='mashsb-rwmb-button remove-clone'>$text</a>";
212
- }
213
-
214
- /**
215
- * Get meta value
216
- *
217
- * @param int $post_id
218
- * @param bool $saved
219
- * @param array $field
220
- *
221
- * @return mixed
222
- */
223
- static function meta( $post_id, $saved, $field )
224
- {
225
- /**
226
- * For special fields like 'divider', 'heading' which don't have ID, just return empty string
227
- * to prevent notice error when displaying fields
228
- */
229
- if ( empty( $field['id'] ) )
230
- return '';
231
-
232
- $single = $field['clone'] || ! $field['multiple'];
233
- $meta = get_post_meta( $post_id, $field['id'], $single );
234
-
235
- // Use $field['std'] only when the meta box hasn't been saved (i.e. the first time we run)
236
- $meta = ( ! $saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
237
-
238
- // Escape attributes
239
- $meta = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'esc_meta' ), $meta );
240
-
241
- // Make sure meta value is an array for clonable and multiple fields
242
- if ( $field['clone'] || $field['multiple'] )
243
- {
244
- if ( empty( $meta ) || ! is_array( $meta ) )
245
- {
246
- /**
247
- * Note: if field is clonable, $meta must be an array with values
248
- * so that the foreach loop in self::show() runs properly
249
- * @see self::show()
250
- */
251
- $meta = $field['clone'] ? array( '' ) : array();
252
- }
253
- }
254
-
255
- return $meta;
256
- }
257
-
258
- /**
259
- * Escape meta for field output
260
- *
261
- * @param mixed $meta
262
- *
263
- * @return mixed
264
- */
265
- static function esc_meta( $meta )
266
- {
267
- return is_array( $meta ) ? array_map( __METHOD__, $meta ) : esc_attr( $meta );
268
- }
269
-
270
- /**
271
- * Set value of meta before saving into database
272
- *
273
- * @param mixed $new
274
- * @param mixed $old
275
- * @param int $post_id
276
- * @param array $field
277
- *
278
- * @return int
279
- */
280
- static function value( $new, $old, $post_id, $field )
281
- {
282
- return $new;
283
- }
284
-
285
- /**
286
- * Save meta value
287
- *
288
- * @param $new
289
- * @param $old
290
- * @param $post_id
291
- * @param $field
292
- */
293
- static function save( $new, $old, $post_id, $field )
294
- {
295
- $name = $field['id'];
296
-
297
- // Remove post meta if it's empty
298
- if ( '' === $new || array() === $new )
299
- {
300
- delete_post_meta( $post_id, $name );
301
- return;
302
- }
303
-
304
- // If field is cloneable, value is saved as a single entry in the database
305
- if ( $field['clone'] )
306
- {
307
- // Reset indexes
308
- $new = array_values( (array) $new );
309
- foreach ( $new as $k => $v )
310
- {
311
- if ( '' === $v )
312
- unset( $new[$k] );
313
- }
314
- update_post_meta( $post_id, $name, $new );
315
- return;
316
- }
317
-
318
- // If field is multiple, value is saved as multiple entries in the database (WordPress behaviour)
319
- if ( $field['multiple'] )
320
- {
321
- $new_values = array_diff( $new, $old );
322
- foreach ( $new_values as $new_value )
323
- {
324
- add_post_meta( $post_id, $name, $new_value, false );
325
- }
326
- $old_values = array_diff( $old, $new );
327
- foreach ( $old_values as $old_value )
328
- {
329
- delete_post_meta( $post_id, $name, $old_value );
330
- }
331
- return;
332
- }
333
-
334
- // Default: just update post meta
335
- update_post_meta( $post_id, $name, $new );
336
- }
337
-
338
- /**
339
- * Normalize parameters for field
340
- *
341
- * @param array $field
342
- *
343
- * @return array
344
- */
345
- static function normalize( $field )
346
- {
347
- $field = wp_parse_args( $field, array(
348
- 'id' => '',
349
- 'name' => '',
350
- 'multiple' => false,
351
- 'std' => '',
352
- 'desc' => '',
353
- 'format' => '',
354
- 'before' => '',
355
- 'after' => '',
356
- 'field_name' => isset( $field['id'] ) ? $field['id'] : '',
357
- 'placeholder' => '',
358
-
359
- 'clone' => false,
360
- 'max_clone' => 0,
361
- 'sort_clone' => false,
362
-
363
- 'class' => '',
364
- 'disabled' => false,
365
- 'required' => false,
366
- 'attributes' => array(),
367
- ) );
368
-
369
- return $field;
370
- }
371
-
372
- /**
373
- * Get the attributes for a field
374
- *
375
- * @param array $field
376
- * @param mixed $value
377
- *
378
- * @return array
379
- */
380
- static function get_attributes( $field, $value = null )
381
- {
382
- $attributes = wp_parse_args( $field['attributes'], array(
383
- 'disabled' => $field['disabled'],
384
- 'required' => $field['required'],
385
- 'class' => "mashsb-rwmb-{$field['type']}",
386
- 'id' => $field['id'],
387
- 'name' => $field['field_name'],
388
- ) );
389
-
390
- return $attributes;
391
- }
392
-
393
- /**
394
- * Renders an attribute array into an html attributes string
395
- *
396
- * @param array $attributes
397
- *
398
- * @return string
399
- */
400
- static function render_attributes( $attributes )
401
- {
402
- $output = '';
403
- foreach ( $attributes as $key => $value )
404
- {
405
- if ( false === $value || '' === $value )
406
- {
407
- continue;
408
- }
409
- $output .= sprintf( true === $value ? ' %s' : ' %s="%s"', $key, esc_attr( $value ) );
410
- }
411
- return $output;
412
- }
413
-
414
- /**
415
- * Get the field value
416
- * The difference between this function and 'meta' function is 'meta' function always returns the escaped value
417
- * of the field saved in the database, while this function returns more meaningful value of the field, for ex.:
418
- * for file/image: return array of file/image information instead of file/image IDs
419
- *
420
- * Each field can extend this function and add more data to the returned value.
421
- * See specific field classes for details.
422
- *
423
- * @param array $field Field parameters
424
- * @param array $args Additional arguments. Rarely used. See specific fields for details
425
- * @param int|null $post_id Post ID. null for current post. Optional.
426
- *
427
- * @return mixed Field value
428
- */
429
- static function get_value( $field, $args = array(), $post_id = null )
430
- {
431
- if ( ! $post_id )
432
- $post_id = get_the_ID();
433
-
434
- /**
435
- * Get raw meta value in the database, no escape
436
- * Very similar to self::meta() function
437
- */
438
-
439
- /**
440
- * For special fields like 'divider', 'heading' which don't have ID, just return empty string
441
- * to prevent notice error when display in fields
442
- */
443
- $value = '';
444
- if ( ! empty( $field['id'] ) )
445
- {
446
- $single = $field['clone'] || ! $field['multiple'];
447
- $value = get_post_meta( $post_id, $field['id'], $single );
448
-
449
- // Make sure meta value is an array for clonable and multiple fields
450
- if ( $field['clone'] || $field['multiple'] )
451
- {
452
- $value = is_array( $value ) && $value ? $value : array();
453
- }
454
- }
455
-
456
- /**
457
- * Return the meta value by default.
458
- * For specific fields, the returned value might be different. See each field class for details
459
- */
460
- return $value;
461
- }
462
-
463
- /**
464
- * Output the field value
465
- * Depends on field value and field types, each field can extend this method to output its value in its own way
466
- * See specific field classes for details.
467
- *
468
- * Note: we don't echo the field value directly. We return the output HTML of field, which will be used in
469
- * rwmb_the_field function later.
470
- *
471
- * @use self::get_value()
472
- * @see rwmb_the_value()
473
- *
474
- * @param array $field Field parameters
475
- * @param array $args Additional arguments. Rarely used. See specific fields for details
476
- * @param int|null $post_id Post ID. null for current post. Optional.
477
- *
478
- * @return string HTML output of the field
479
- */
480
- static function the_value( $field, $args = array(), $post_id = null )
481
- {
482
- $value = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_value' ), $field, $args, $post_id );
483
- $output = $value;
484
- if ( is_array( $value ) )
485
- {
486
- $output = '<ul>';
487
- foreach ( $value as $subvalue )
488
- {
489
- $output .= '<li>' . $subvalue . '</li>';
490
- }
491
- $output .= '</ul>';
492
- }
493
- return $output;
494
- }
495
- }
1
+ <?php
2
+ /**
3
+ * Base field class which defines all necessary methods.
4
+ * Fields must inherit this class and overwrite methods with its own.
5
+ */
6
+ abstract class MASHSB_RWMB_Field
7
+ {
8
+ /**
9
+ * Add actions
10
+ *
11
+ * @return void
12
+ */
13
+ static function add_actions()
14
+ {
15
+ }
16
+
17
+ /**
18
+ * Enqueue scripts and styles
19
+ *
20
+ * @return void
21
+ */
22
+ static function admin_enqueue_scripts()
23
+ {
24
+ }
25
+
26
+ /**
27
+ * Show field HTML
28
+ * Filters are put inside this method, not inside methods such as "meta", "html", "begin_html", etc.
29
+ * That ensures the returned value are always been applied filters
30
+ * This method is not meant to be overwritten in specific fields
31
+ *
32
+ * @param array $field
33
+ * @param bool $saved
34
+ *
35
+ * @return string
36
+ */
37
+ static function show( $field, $saved )
38
+ {
39
+ $post = get_post();
40
+ $post_id = isset( $post->ID ) ? $post->ID : 0;
41
+
42
+ $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
43
+ $meta = call_user_func( array( $field_class, 'meta' ), $post_id, $saved, $field );
44
+ $meta = MASHSB_RWMB_Core::filter( 'field_meta', $meta, $field, $saved );
45
+
46
+ $begin = call_user_func( array( $field_class, 'begin_html' ), $meta, $field );
47
+ $begin = MASHSB_RWMB_Core::filter( 'begin_html', $begin, $field, $meta );
48
+
49
+ // Separate code for cloneable and non-cloneable fields to make easy to maintain
50
+
51
+ // Cloneable fields
52
+ if ( $field['clone'] )
53
+ {
54
+ $field_html = '';
55
+
56
+ /**
57
+ * Note: $meta must contain value so that the foreach loop runs!
58
+ * @see meta()
59
+ */
60
+ foreach ( $meta as $index => $sub_meta )
61
+ {
62
+ $sub_field = $field;
63
+ $sub_field['field_name'] = $field['field_name'] . "[{$index}]";
64
+ if ( $index > 0 )
65
+ {
66
+ if ( isset( $sub_field['address_field'] ) )
67
+ $sub_field['address_field'] = $field['address_field'] . "_{$index}";
68
+ $sub_field['id'] = $field['id'] . "_{$index}";
69
+ }
70
+ if ( $field['multiple'] )
71
+ $sub_field['field_name'] .= '[]';
72
+
73
+ // Wrap field HTML in a div with class="mashsb-rwmb-clone" if needed
74
+ $class = "mashsb-rwmb-clone mashsb-rwmb-{$field['type']}-clone";
75
+ $sort_icon = '';
76
+ if ( $field['sort_clone'] )
77
+ {
78
+ $class .= ' mashsb-rwmb-sort-clone';
79
+ $sort_icon = "<a href='javascript:;' class='mashsb-rwmb-clone-icon'></a>";
80
+ }
81
+ $input_html = "<div class='$class'>" . $sort_icon;
82
+
83
+ // Call separated methods for displaying each type of field
84
+ $input_html .= call_user_func( array( $field_class, 'html' ), $sub_meta, $sub_field );
85
+ $input_html = MASHSB_RWMB_Core::filter( 'html', $input_html, $sub_field, $sub_meta );
86
+
87
+ // Remove clone button
88
+ $input_html .= call_user_func( array( $field_class, 'remove_clone_button' ), $sub_field );
89
+
90
+ $input_html .= '</div>';
91
+
92
+ $field_html .= $input_html;
93
+ }
94
+ }
95
+ // Non-cloneable fields
96
+ else
97
+ {
98
+ // Call separated methods for displaying each type of field
99
+ $field_html = call_user_func( array( $field_class, 'html' ), $meta, $field );
100
+ $field_html = MASHSB_RWMB_Core::filter( 'html', $field_html, $field, $meta );
101
+ }
102
+
103
+ $end = call_user_func( array( $field_class, 'end_html' ), $meta, $field );
104
+ $end = MASHSB_RWMB_Core::filter( 'end_html', $end, $field, $meta );
105
+
106
+ $html = MASHSB_RWMB_Core::filter( 'wrapper_html', "$begin$field_html$end", $field, $meta );
107
+
108
+ // Display label and input in DIV and allow user-defined classes to be appended
109
+ $classes = "mashsb-rwmb-field mashsb-rwmb-{$field['type']}-wrapper " . $field['class'] ;
110
+ if ( 'hidden' === $field['type'] )
111
+ $classes .= ' hidden';
112
+ if ( ! empty( $field['required'] ) )
113
+ $classes .= ' required';
114
+
115
+ $outer_html = sprintf(
116
+ $field['before'] . '<div class="%s">%s</div>' . $field['after'],
117
+ trim( $classes ),
118
+ $html
119
+ );
120
+ $outer_html = MASHSB_RWMB_Core::filter( 'outer_html', $outer_html, $field, $meta );
121
+
122
+ echo $outer_html;
123
+ }
124
+
125
+ /**
126
+ * Get field HTML
127
+ *
128
+ * @param mixed $meta
129
+ * @param array $field
130
+ *
131
+ * @return string
132
+ */
133
+ static function html( $meta, $field )
134
+ {
135
+ return '';
136
+ }
137
+
138
+ /**
139
+ * Show begin HTML markup for fields
140
+ *
141
+ * @param mixed $meta
142
+ * @param array $field
143
+ *
144
+ * @return string
145
+ */
146
+ static function begin_html( $meta, $field )
147
+ {
148
+ $field_label = '';
149
+ if ( $field['name'] )
150
+ {
151
+ $field_label = sprintf(
152
+ '<div class="mashsb-rwmb-label"><label for="%s">%s</label></div>',
153
+ $field['id'],
154
+ $field['name']
155
+ );
156
+ }
157
+
158
+ $data_max_clone = is_numeric( $field['max_clone'] ) && $field['max_clone'] > 1 ? ' data-max-clone=' . $field['max_clone'] : '';
159
+
160
+ $input_open = sprintf(
161
+ '<div class="mashsb-rwmb-input"%s>',
162
+ $data_max_clone
163
+ );
164
+
165
+ return $field_label . $input_open;
166
+ }
167
+
168
+ /**
169
+ * Show end HTML markup for fields
170
+ *
171
+ * @param mixed $meta
172
+ * @param array $field
173
+ *
174
+ * @return string
175
+ */
176
+ static function end_html( $meta, $field )
177
+ {
178
+ $button = $field['clone'] ? call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'add_clone_button' ), $field ) : '';
179
+ $desc = $field['desc'] ? "<p id='{$field['id']}_description' class='description'>{$field['desc']}</p>" : '';
180
+
181
+ // Closes the container
182
+ $html = "{$button}{$desc}</div>";
183
+
184
+ return $html;
185
+ }
186
+
187
+ /**
188
+ * Add clone button
189
+ *
190
+ * @param array $field Field parameter
191
+ *
192
+ * @return string $html
193
+ */
194
+ static function add_clone_button( $field )
195
+ {
196
+ $text = apply_filters( 'rwmb_add_clone_button_text', __( '+ Add more', 'meta-box' ), $field );
197
+ return "<a href='#' class='mashsb-rwmb-button button-primary add-clone'>$text</a>";
198
+ }
199
+
200
+ /**
201
+ * Remove clone button
202
+ *
203
+ * @param array $field Field parameter
204
+ *
205
+ * @return string $html
206
+ */
207
+ static function remove_clone_button( $field )
208
+ {
209
+ $icon = '<i class="dashicons dashicons-minus"></i>';
210
+ $text = apply_filters( 'rwmb_remove_clone_button_text', $icon, $field );
211
+ return "<a href='#' class='mashsb-rwmb-button remove-clone'>$text</a>";
212
+ }
213
+
214
+ /**
215
+ * Get meta value
216
+ *
217
+ * @param int $post_id
218
+ * @param bool $saved
219
+ * @param array $field
220
+ *
221
+ * @return mixed
222
+ */
223
+ static function meta( $post_id, $saved, $field )
224
+ {
225
+ /**
226
+ * For special fields like 'divider', 'heading' which don't have ID, just return empty string
227
+ * to prevent notice error when displaying fields
228
+ */
229
+ if ( empty( $field['id'] ) )
230
+ return '';
231
+
232
+ $single = $field['clone'] || ! $field['multiple'];
233
+ $meta = get_post_meta( $post_id, $field['id'], $single );
234
+
235
+ // Use $field['std'] only when the meta box hasn't been saved (i.e. the first time we run)
236
+ $meta = ( ! $saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
237
+
238
+ // Escape attributes
239
+ $meta = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'esc_meta' ), $meta );
240
+
241
+ // Make sure meta value is an array for clonable and multiple fields
242
+ if ( $field['clone'] || $field['multiple'] )
243
+ {
244
+ if ( empty( $meta ) || ! is_array( $meta ) )
245
+ {
246
+ /**
247
+ * Note: if field is clonable, $meta must be an array with values
248
+ * so that the foreach loop in self::show() runs properly
249
+ * @see self::show()
250
+ */
251
+ $meta = $field['clone'] ? array( '' ) : array();
252
+ }
253
+ }
254
+
255
+ return $meta;
256
+ }
257
+
258
+ /**
259
+ * Escape meta for field output
260
+ *
261
+ * @param mixed $meta
262
+ *
263
+ * @return mixed
264
+ */
265
+ static function esc_meta( $meta )
266
+ {
267
+ return is_array( $meta ) ? array_map( __METHOD__, $meta ) : esc_attr( $meta );
268
+ }
269
+
270
+ /**
271
+ * Set value of meta before saving into database
272
+ *
273
+ * @param mixed $new
274
+ * @param mixed $old
275
+ * @param int $post_id
276
+ * @param array $field
277
+ *
278
+ * @return int
279
+ */
280
+ static function value( $new, $old, $post_id, $field )
281
+ {
282
+ return $new;
283
+ }
284
+
285
+ /**
286
+ * Save meta value
287
+ *
288
+ * @param $new
289
+ * @param $old
290
+ * @param $post_id
291
+ * @param $field
292
+ */
293
+ static function save( $new, $old, $post_id, $field )
294
+ {
295
+ $name = $field['id'];
296
+
297
+ // Remove post meta if it's empty
298
+ if ( '' === $new || array() === $new )
299
+ {
300
+ delete_post_meta( $post_id, $name );
301
+ return;
302
+ }
303
+
304
+ // If field is cloneable, value is saved as a single entry in the database
305
+ if ( $field['clone'] )
306
+ {
307
+ // Reset indexes
308
+ $new = array_values( (array) $new );
309
+ foreach ( $new as $k => $v )
310
+ {
311
+ if ( '' === $v )
312
+ unset( $new[$k] );
313
+ }
314
+ update_post_meta( $post_id, $name, $new );
315
+ return;
316
+ }
317
+
318
+ // If field is multiple, value is saved as multiple entries in the database (WordPress behaviour)
319
+ if ( $field['multiple'] )
320
+ {
321
+ $new_values = array_diff( $new, $old );
322
+ foreach ( $new_values as $new_value )
323
+ {
324
+ add_post_meta( $post_id, $name, $new_value, false );
325
+ }
326
+ $old_values = array_diff( $old, $new );
327
+ foreach ( $old_values as $old_value )
328
+ {
329
+ delete_post_meta( $post_id, $name, $old_value );
330
+ }
331
+ return;
332
+ }
333
+
334
+ // Default: just update post meta
335
+ update_post_meta( $post_id, $name, $new );
336
+ }
337
+
338
+ /**
339
+ * Normalize parameters for field
340
+ *
341
+ * @param array $field
342
+ *
343
+ * @return array
344
+ */
345
+ static function normalize( $field )
346
+ {
347
+ $field = wp_parse_args( $field, array(
348
+ 'id' => '',
349
+ 'name' => '',
350
+ 'multiple' => false,
351
+ 'std' => '',
352
+ 'desc' => '',
353
+ 'format' => '',
354
+ 'before' => '',
355
+ 'after' => '',
356
+ 'field_name' => isset( $field['id'] ) ? $field['id'] : '',
357
+ 'placeholder' => '',
358
+
359
+ 'clone' => false,
360
+ 'max_clone' => 0,
361
+ 'sort_clone' => false,
362
+
363
+ 'class' => '',
364
+ 'disabled' => false,
365
+ 'required' => false,
366
+ 'attributes' => array(),
367
+ ) );
368
+
369
+ return $field;
370
+ }
371
+
372
+ /**
373
+ * Get the attributes for a field
374
+ *
375
+ * @param array $field
376
+ * @param mixed $value
377
+ *
378
+ * @return array
379
+ */
380
+ static function get_attributes( $field, $value = null )
381
+ {
382
+ $attributes = wp_parse_args( $field['attributes'], array(
383
+ 'disabled' => $field['disabled'],
384
+ 'required' => $field['required'],
385
+ 'class' => "mashsb-rwmb-{$field['type']}",
386
+ 'id' => $field['id'],
387
+ 'name' => $field['field_name'],
388
+ ) );
389
+
390
+ return $attributes;
391
+ }
392
+
393
+ /**
394
+ * Renders an attribute array into an html attributes string
395
+ *
396
+ * @param array $attributes
397
+ *
398
+ * @return string
399
+ */
400
+ static function render_attributes( $attributes )
401
+ {
402
+ $output = '';
403
+ foreach ( $attributes as $key => $value )
404
+ {
405
+ if ( false === $value || '' === $value )
406
+ {
407
+ continue;
408
+ }
409
+ $output .= sprintf( true === $value ? ' %s' : ' %s="%s"', $key, esc_attr( $value ) );
410
+ }
411
+ return $output;
412
+ }
413
+
414
+ /**
415
+ * Get the field value
416
+ * The difference between this function and 'meta' function is 'meta' function always returns the escaped value
417
+ * of the field saved in the database, while this function returns more meaningful value of the field, for ex.:
418
+ * for file/image: return array of file/image information instead of file/image IDs
419
+ *
420
+ * Each field can extend this function and add more data to the returned value.
421
+ * See specific field classes for details.
422
+ *
423
+ * @param array $field Field parameters
424
+ * @param array $args Additional arguments. Rarely used. See specific fields for details
425
+ * @param int|null $post_id Post ID. null for current post. Optional.
426
+ *
427
+ * @return mixed Field value
428
+ */
429
+ static function get_value( $field, $args = array(), $post_id = null )
430
+ {
431
+ if ( ! $post_id )
432
+ $post_id = get_the_ID();
433
+
434
+ /**
435
+ * Get raw meta value in the database, no escape
436
+ * Very similar to self::meta() function
437
+ */
438
+
439
+ /**
440
+ * For special fields like 'divider', 'heading' which don't have ID, just return empty string
441
+ * to prevent notice error when display in fields
442
+ */
443
+ $value = '';
444
+ if ( ! empty( $field['id'] ) )
445
+ {
446
+ $single = $field['clone'] || ! $field['multiple'];
447
+ $value = get_post_meta( $post_id, $field['id'], $single );
448
+
449
+ // Make sure meta value is an array for clonable and multiple fields
450
+ if ( $field['clone'] || $field['multiple'] )
451
+ {
452
+ $value = is_array( $value ) && $value ? $value : array();
453
+ }
454
+ }
455
+
456
+ /**
457
+ * Return the meta value by default.
458
+ * For specific fields, the returned value might be different. See each field class for details
459
+ */
460
+ return $value;
461
+ }
462
+
463
+ /**
464
+ * Output the field value
465
+ * Depends on field value and field types, each field can extend this method to output its value in its own way
466
+ * See specific field classes for details.
467
+ *
468
+ * Note: we don't echo the field value directly. We return the output HTML of field, which will be used in
469
+ * rwmb_the_field function later.
470
+ *
471
+ * @use self::get_value()
472
+ * @see rwmb_the_value()
473
+ *
474
+ * @param array $field Field parameters
475
+ * @param array $args Additional arguments. Rarely used. See specific fields for details
476
+ * @param int|null $post_id Post ID. null for current post. Optional.
477
+ *
478
+ * @return string HTML output of the field
479
+ */
480
+ static function the_value( $field, $args = array(), $post_id = null )
481
+ {
482
+ $value = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_value' ), $field, $args, $post_id );
483
+ $output = $value;
484
+ if ( is_array( $value ) )
485
+ {
486
+ $output = '<ul>';
487
+ foreach ( $value as $subvalue )
488
+ {
489
+ $output .= '<li>' . $subvalue . '</li>';
490
+ }
491
+ $output .= '</ul>';
492
+ }
493
+ return $output;
494
+ }
495
+ }
includes/admin/meta-box/inc/fields/autocomplete.php CHANGED
@@ -1,120 +1,120 @@
1
- <?php
2
- /**
3
- * Autocomplete field class.
4
- */
5
- class MASHSB_RWMB_Autocomplete_Field extends MASHSB_RWMB_Multiple_Values_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles.
9
- */
10
- static function admin_enqueue_scripts()
11
- {
12
- wp_enqueue_style( 'mashsb-rwmb-autocomplete', MASHSB_RWMB_CSS_URL . 'autocomplete.css', array( 'wp-admin' ), MASHSB_RWMB_VER );
13
- wp_enqueue_script( 'mashsb-rwmb-autocomplete', MASHSB_RWMB_JS_URL . 'autocomplete.js', array( 'jquery-ui-autocomplete' ), MASHSB_RWMB_VER, true );
14
- wp_localize_script( 'mashsb-rwmb-autocomplete', 'MASHSB_RWMB_Autocomplete', array( 'delete' => __( 'Delete', 'meta-box' ) ) );
15
- }
16
-
17
- /**
18
- * Get field HTML
19
- *
20
- * @param mixed $meta
21
- * @param array $field
22
- * @return string
23
- */
24
- static function html( $meta, $field )
25
- {
26
- if ( ! is_array( $meta ) )
27
- $meta = array( $meta );
28
-
29
- $field = apply_filters( 'mashsb_rwmb_autocomplete_field', $field, $meta );
30
- $options = $field['options'];
31
-
32
- if ( ! is_string( $field['options'] ) )
33
- {
34
- $options = array();
35
- foreach ( (array) $field['options'] as $value => $label )
36
- {
37
- $options[] = array(
38
- 'value' => $value,
39
- 'label' => $label,
40
- );
41
- }
42
- $options = wp_json_encode( $options );
43
- }
44
-
45
- // Input field that triggers autocomplete.
46
- // This field doesn't store field values, so it doesn't have "name" attribute.
47
- // The value(s) of the field is store in hidden input(s). See below.
48
- $html = sprintf(
49
- '<input type="text" class="mashsb-rwmb-autocomplete-search" size="%s">
50
- <input type="hidden" name="%s" class="mashsb-rwmb-autocomplete" data-options="%s" disabled>',
51
- $field['size'],
52
- $field['field_name'],
53
- esc_attr( $options )
54
- );
55
-
56
- $html .= '<div class="mashsb-rwmb-autocomplete-results">';
57
-
58
- // Each value is displayed with label and 'Delete' option
59
- // The hidden input has to have ".mashsb-rwmb-*" class to make clone work
60
- $tpl = '
61
- <div class="mashsb-rwmb-autocomplete-result">
62
- <div class="label">%s</div>
63
- <div class="actions">%s</div>
64
- <input type="hidden" class="mashsb-rwmb-autocomplete-value" name="%s" value="%s">
65
- </div>
66
- ';
67
-
68
- if ( is_array( $field['options'] ) )
69
- {
70
- foreach ( $field['options'] as $value => $label )
71
- {
72
- if ( in_array( $value, $meta ) )
73
- {
74
- $html .= sprintf(
75
- $tpl,
76
- $label,
77
- __( 'Delete', 'meta-box' ),
78
- $field['field_name'],
79
- $value
80
- );
81
- }
82
- }
83
- }
84
- else
85
- {
86
- foreach ( $meta as $value )
87
- {
88
- if ( empty( $value ) )
89
- continue;
90
- $label = apply_filters( 'mashsb_rwmb_autocomplete_result_label', $value, $field );
91
- $html .= sprintf(
92
- $tpl,
93
- $label,
94
- __( 'Delete', 'meta-box' ),
95
- $field['field_name'],
96
- $value
97
- );
98
- }
99
- }
100
-
101
- $html .= '</div>'; // .mashsb-rwmb-autocomplete-results
102
-
103
- return $html;
104
- }
105
-
106
- /**
107
- * Normalize parameters for field
108
- *
109
- * @param array $field
110
- * @return array
111
- */
112
- static function normalize( $field )
113
- {
114
- $field = parent::normalize( $field );
115
- $field = wp_parse_args( $field, array(
116
- 'size' => 30,
117
- ) );
118
- return $field;
119
- }
120
- }
1
+ <?php
2
+ /**
3
+ * Autocomplete field class.
4
+ */
5
+ class MASHSB_RWMB_Autocomplete_Field extends MASHSB_RWMB_Multiple_Values_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles.
9
+ */
10
+ static function admin_enqueue_scripts()
11
+ {
12
+ wp_enqueue_style( 'mashsb-rwmb-autocomplete', MASHSB_RWMB_CSS_URL . 'autocomplete.css', array( 'wp-admin' ), MASHSB_RWMB_VER );
13
+ wp_enqueue_script( 'mashsb-rwmb-autocomplete', MASHSB_RWMB_JS_URL . 'autocomplete.js', array( 'jquery-ui-autocomplete' ), MASHSB_RWMB_VER, true );
14
+ wp_localize_script( 'mashsb-rwmb-autocomplete', 'MASHSB_RWMB_Autocomplete', array( 'delete' => __( 'Delete', 'meta-box' ) ) );
15
+ }
16
+
17
+ /**
18
+ * Get field HTML
19
+ *
20
+ * @param mixed $meta
21
+ * @param array $field
22
+ * @return string
23
+ */
24
+ static function html( $meta, $field )
25
+ {
26
+ if ( ! is_array( $meta ) )
27
+ $meta = array( $meta );
28
+
29
+ $field = apply_filters( 'mashsb_rwmb_autocomplete_field', $field, $meta );
30
+ $options = $field['options'];
31
+
32
+ if ( ! is_string( $field['options'] ) )
33
+ {
34
+ $options = array();
35
+ foreach ( (array) $field['options'] as $value => $label )
36
+ {
37
+ $options[] = array(
38
+ 'value' => $value,
39
+ 'label' => $label,
40
+ );
41
+ }
42
+ $options = wp_json_encode( $options );
43
+ }
44
+
45
+ // Input field that triggers autocomplete.
46
+ // This field doesn't store field values, so it doesn't have "name" attribute.
47
+ // The value(s) of the field is store in hidden input(s). See below.
48
+ $html = sprintf(
49
+ '<input type="text" class="mashsb-rwmb-autocomplete-search" size="%s">
50
+ <input type="hidden" name="%s" class="mashsb-rwmb-autocomplete" data-options="%s" disabled>',
51
+ $field['size'],
52
+ $field['field_name'],
53
+ esc_attr( $options )
54
+ );
55
+
56
+ $html .= '<div class="mashsb-rwmb-autocomplete-results">';
57
+
58
+ // Each value is displayed with label and 'Delete' option
59
+ // The hidden input has to have ".mashsb-rwmb-*" class to make clone work
60
+ $tpl = '
61
+ <div class="mashsb-rwmb-autocomplete-result">
62
+ <div class="label">%s</div>
63
+ <div class="actions">%s</div>
64
+ <input type="hidden" class="mashsb-rwmb-autocomplete-value" name="%s" value="%s">
65
+ </div>
66
+ ';
67
+
68
+ if ( is_array( $field['options'] ) )
69
+ {
70
+ foreach ( $field['options'] as $value => $label )
71
+ {
72
+ if ( in_array( $value, $meta ) )
73
+ {
74
+ $html .= sprintf(
75
+ $tpl,
76
+ $label,
77
+ __( 'Delete', 'meta-box' ),
78
+ $field['field_name'],
79
+ $value
80
+ );
81
+ }
82
+ }
83
+ }
84
+ else
85
+ {
86
+ foreach ( $meta as $value )
87
+ {
88
+ if ( empty( $value ) )
89
+ continue;
90
+ $label = apply_filters( 'mashsb_rwmb_autocomplete_result_label', $value, $field );
91
+ $html .= sprintf(
92
+ $tpl,
93
+ $label,
94
+ __( 'Delete', 'meta-box' ),
95
+ $field['field_name'],
96
+ $value
97
+ );
98
+ }
99
+ }
100
+
101
+ $html .= '</div>'; // .mashsb-rwmb-autocomplete-results
102
+
103
+ return $html;
104
+ }
105
+
106
+ /**
107
+ * Normalize parameters for field
108
+ *
109
+ * @param array $field
110
+ * @return array
111
+ */
112
+ static function normalize( $field )
113
+ {
114
+ $field = parent::normalize( $field );
115
+ $field = wp_parse_args( $field, array(
116
+ 'size' => 30,
117
+ ) );
118
+ return $field;
119
+ }
120
+ }
includes/admin/meta-box/inc/fields/button.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
- /**
3
- * Button field class.
4
- */
5
- class MASHSB_RWMB_Button_Field extends MASHSB_RWMB_Field
6
- {
7
- /**
8
- * Get field HTML
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- * @return string
13
- */
14
- static function html( $meta, $field )
15
- {
16
- $attributes = self::get_attributes( $field );
17
- return sprintf( '<a href="#" %s>%s</a>', self::render_attributes( $attributes ), $field['std'] );
18
- }
19
-
20
- /**
21
- * Normalize parameters for field
22
- *
23
- * @param array $field
24
- * @return array
25
- */
26
- static function normalize( $field )
27
- {
28
- $field = parent::normalize( $field );
29
- $field['std'] = $field['std'] ? $field['std'] : __( 'Click me', 'meta-box' );
30
- return $field;
31
- }
32
-
33
- /**
34
- * Get the attributes for a field
35
- *
36
- * @param array $field
37
- * @param mixed $value
38
- * @return array
39
- */
40
- static function get_attributes( $field, $value = null )
41
- {
42
- $attributes = parent::get_attributes( $field, $value );
43
- $attributes['class'] .= ' button hide-if-no-js';
44
-
45
- return $attributes;
46
- }
47
- }
1
+ <?php
2
+ /**
3
+ * Button field class.
4
+ */
5
+ class MASHSB_RWMB_Button_Field extends MASHSB_RWMB_Field
6
+ {
7
+ /**
8
+ * Get field HTML
9
+ *
10
+ * @param mixed $meta
11
+ * @param array $field
12
+ * @return string
13
+ */
14
+ static function html( $meta, $field )
15
+ {
16
+ $attributes = self::get_attributes( $field );
17
+ return sprintf( '<a href="#" %s>%s</a>', self::render_attributes( $attributes ), $field['std'] );
18
+ }
19
+
20
+ /**
21
+ * Normalize parameters for field
22
+ *
23
+ * @param array $field
24
+ * @return array
25
+ */
26
+ static function normalize( $field )
27
+ {
28
+ $field = parent::normalize( $field );
29
+ $field['std'] = $field['std'] ? $field['std'] : __( 'Click me', 'meta-box' );
30
+ return $field;
31
+ }
32
+
33
+ /**
34
+ * Get the attributes for a field
35
+ *
36
+ * @param array $field
37
+ * @param mixed $value
38
+ * @return array
39
+ */
40
+ static function get_attributes( $field, $value = null )
41
+ {
42
+ $attributes = parent::get_attributes( $field, $value );
43
+ $attributes['class'] .= ' button hide-if-no-js';
44
+
45
+ return $attributes;
46
+ }
47
+ }
includes/admin/meta-box/inc/fields/checkbox-list.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
- /**
3
- * Checkbox list field class.
4
- */
5
- class MASHSB_RWMB_Checkbox_List_Field extends MASHSB_RWMB_Input_List_Field
6
- {
7
- /**
8
- * Normalize parameters for field
9
- * @param array $field
10
- * @return array
11
- */
12
- static function normalize( $field )
13
- {
14
- $field['multiple'] = true;
15
- $field = parent::normalize( $field );
16
-
17
- return $field;
18
- }
19
- }
1
+ <?php
2
+ /**
3
+ * Checkbox list field class.
4
+ */
5
+ class MASHSB_RWMB_Checkbox_List_Field extends MASHSB_RWMB_Input_List_Field
6
+ {
7
+ /**
8
+ * Normalize parameters for field
9
+ * @param array $field
10
+ * @return array
11
+ */
12
+ static function normalize( $field )
13
+ {
14
+ $field['multiple'] = true;
15
+ $field = parent::normalize( $field );
16
+
17
+ return $field;
18
+ }
19
+ }
includes/admin/meta-box/inc/fields/checkbox.php CHANGED
@@ -1,87 +1,87 @@
1
- <?php
2
- /**
3
- * Checkbox field class.
4
- */
5
- class MASHSB_RWMB_Checkbox_Field extends MASHSB_RWMB_Input_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles.
9
- */
10
- static function admin_enqueue_scripts()
11
- {
12
- wp_enqueue_style( 'mashsb-rwmb-checkbox', MASHSB_RWMB_CSS_URL . 'checkbox.css', array(), MASHSB_RWMB_VER );
13
- }
14
-
15
- /**
16
- * Get field HTML
17
- *
18
- * @param mixed $meta
19
- * @param array $field
20
- * @return string
21
- */
22
- static function html( $meta, $field )
23
- {
24
- $attributes = self::get_attributes( $field, 1 );
25
- return sprintf(
26
- '<input %s %s>',
27
- self::render_attributes( $attributes ),
28
- checked( ! empty( $meta ), 1, false )
29
- );
30
- }
31
-
32
- /**
33
- * Get the attributes for a field.
34
- *
35
- * @param array $field
36
- * @param mixed $value
37
- * @return array
38
- */
39
- static function get_attributes( $field, $value = null )
40
- {
41
- $attributes = parent::get_attributes( $field, $value );
42
- $attributes['type'] = 'checkbox';
43
- $attributes['list'] = false;
44
-
45
- return $attributes;
46
- }
47
-
48
- /**
49
- * Set the value of checkbox to 1 or 0 instead of 'checked' and empty string
50
- * This prevents using default value once the checkbox has been unchecked
51
- *
52
- * @link https://github.com/rilwis/meta-box/issues/6
53
- *
54
- * @param mixed $new
55
- * @param mixed $old
56
- * @param int $post_id
57
- * @param array $field
58
- *
59
- * @return int
60
- */
61
- static function value( $new, $old, $post_id, $field )
62
- {
63
- return empty( $new ) ? 0 : 1;
64
- }
65
-
66
- /**
67
- * Output the field value
68
- * Display 'Yes' or 'No' instead of '1' and '0'
69
- *
70
- * Note: we don't echo the field value directly. We return the output HTML of field, which will be used in
71
- * rwmb_the_field function later.
72
- *
73
- * @use self::get_value()
74
- * @see rwmb_the_value()
75
- *
76
- * @param array $field Field parameters
77
- * @param array $args Additional arguments. Rarely used. See specific fields for details
78
- * @param int|null $post_id Post ID. null for current post. Optional.
79
- *
80
- * @return string HTML output of the field
81
- */
82
- static function the_value( $field, $args = array(), $post_id = null )
83
- {
84
- $value = self::get_value( $field, $args, $post_id );
85
- return $value ? __( 'Yes', 'meta-box' ) : __( 'No', 'meta-box' );
86
- }
87
- }
1
+ <?php
2
+ /**
3
+ * Checkbox field class.
4
+ */
5
+ class MASHSB_RWMB_Checkbox_Field extends MASHSB_RWMB_Input_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles.
9
+ */
10
+ static function admin_enqueue_scripts()
11
+ {
12
+ wp_enqueue_style( 'mashsb-rwmb-checkbox', MASHSB_RWMB_CSS_URL . 'checkbox.css', array(), MASHSB_RWMB_VER );
13
+ }
14
+
15
+ /**
16
+ * Get field HTML
17
+ *
18
+ * @param mixed $meta
19
+ * @param array $field
20
+ * @return string
21
+ */
22
+ static function html( $meta, $field )
23
+ {
24
+ $attributes = self::get_attributes( $field, 1 );
25
+ return sprintf(
26
+ '<input %s %s>',
27
+ self::render_attributes( $attributes ),
28
+ checked( ! empty( $meta ), 1, false )
29
+ );
30
+ }
31
+
32
+ /**
33
+ * Get the attributes for a field.
34
+ *
35
+ * @param array $field
36
+ * @param mixed $value
37
+ * @return array
38
+ */
39
+ static function get_attributes( $field, $value = null )
40
+ {
41
+ $attributes = parent::get_attributes( $field, $value );
42
+ $attributes['type'] = 'checkbox';
43
+ $attributes['list'] = false;
44
+
45
+ return $attributes;
46
+ }
47
+
48
+ /**
49
+ * Set the value of checkbox to 1 or 0 instead of 'checked' and empty string
50
+ * This prevents using default value once the checkbox has been unchecked
51
+ *
52
+ * @link https://github.com/rilwis/meta-box/issues/6
53
+ *
54
+ * @param mixed $new
55
+ * @param mixed $old
56
+ * @param int $post_id
57
+ * @param array $field
58
+ *
59
+ * @return int
60
+ */
61
+ static function value( $new, $old, $post_id, $field )
62
+ {
63
+ return empty( $new ) ? 0 : 1;
64
+ }
65
+
66
+ /**
67
+ * Output the field value
68
+ * Display 'Yes' or 'No' instead of '1' and '0'
69
+ *
70
+ * Note: we don't echo the field value directly. We return the output HTML of field, which will be used in
71
+ * rwmb_the_field function later.
72
+ *
73
+ * @use self::get_value()
74
+ * @see rwmb_the_value()
75
+ *
76
+ * @param array $field Field parameters
77
+ * @param array $args Additional arguments. Rarely used. See specific fields for details
78
+ * @param int|null $post_id Post ID. null for current post. Optional.
79
+ *
80
+ * @return string HTML output of the field
81
+ */
82
+ static function the_value( $field, $args = array(), $post_id = null )
83
+ {
84
+ $value = self::get_value( $field, $args, $post_id );
85
+ return $value ? __( 'Yes', 'meta-box' ) : __( 'No', 'meta-box' );
86
+ }
87
+ }
includes/admin/meta-box/inc/fields/choice.php CHANGED
@@ -1,160 +1,160 @@
1
- <?php
2
- /**
3
- * Abstract class for any kind of choice field.
4
- */
5
- abstract class MASHSB_RWMB_Choice_Field extends MASHSB_RWMB_Field
6
- {
7
- /**
8
- * Walk options
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- * @param mixed $options
13
- * @param mixed $db_fields
14
- * @return string
15
- */
16
- public static function walk( $options, $db_fields, $meta, $field )
17
- {
18
- return '';
19
- }
20
-
21
- /**
22
- * Get field HTML
23
- *
24
- * @param mixed $meta
25
- * @param array $field
26
- * @return string
27
- */
28
- public static function html( $meta, $field )
29
- {
30
- $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
31
- $meta = (array) $meta;
32
- $options = call_user_func( array( $field_class, 'get_options' ), $field );
33
- $db_fields = call_user_func( array( $field_class, 'get_db_fields' ), $field );
34
-
35
- return call_user_func( array( $field_class, 'walk' ), $options, $db_fields, $meta, $field );
36
- }
37
-
38
- /**
39
- * Normalize parameters for field
40
- *
41
- * @param array $field
42
- * @return array
43
- */
44
- public static function normalize( $field )
45
- {
46
- $field = parent::normalize( $field );
47
- $field = wp_parse_args( $field, array(
48
- 'flatten' => true,
49
- 'options' => array(),
50
- ) );
51
-
52
- return $field;
53
- }
54
-
55
- /**
56
- * Get field names of object to be used by walker
57
- *
58
- * @return array
59
- */
60
- public static function get_db_fields()
61
- {
62
- return array(
63
- 'parent' => 'parent',
64
- 'id' => 'value',
65
- 'label' => 'label',
66
- );
67
- }
68
-
69
- /**
70
- * Get options for walker
71
- *
72
- * @param array $field
73
- *
74
- * @return array
75
- */
76
- public static function get_options( $field )
77
- {
78
- $options = array();
79
- foreach ( (array) $field['options'] as $value => $label )
80
- {
81
- $option = is_array( $label ) ? $label : array( 'label' => (string) $label, 'value' => (string) $value );
82
- if ( isset( $option['label'] ) && isset( $option['value'] ) )
83
- $options[$option['value']] = (object) $option;
84
- }
85
- return $options;
86
- }
87
-
88
- /**
89
- * Output the field value
90
- * Display unordered list of option labels, not option values
91
- *
92
- * @param array $field Field parameters
93
- * @param array $args Additional arguments. Not used for these fields.
94
- * @param int|null $post_id Post ID. null for current post. Optional.
95
- *
96
- * @return string Link(s) to post
97
- */
98
- public static function the_value( $field, $args = array(), $post_id = null )
99
- {
100
- $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
101
- $value = call_user_func( array( $field_class, 'get_value' ), $field, $args, $post_id );
102
-
103
- if ( ! $value )
104
- return '';
105
-
106
- if ( $field['clone'] && $field['multiple'] )
107
- {
108
- $output = '<ul>';
109
- foreach ( $value as $subvalue )
110
- {
111
- $output .= '<li>';
112
- $output .= call_user_func( array( $field_class, 'list_option_labels' ), $subvalue, $field );
113
- $output .= '</li>';
114
- }
115
- $output .= '</ul>';
116
- }
117
- elseif ( $field['clone'] || $field['multiple'] )
118
- {
119
- $output = call_user_func( array( $field_class, 'list_option_labels' ), $value, $field );
120
- }
121
- else
122
- {
123
- $output = $field['options'][$value]['label'];
124
- }
125
- return $output;
126
- }
127
-
128
- /**
129
- * List option labels
130
- *
131
- * @param array $meta
132
- * @param array $field Field parameter
133
- * @return string
134
- */
135
- public static function list_option_labels( $meta, $field )
136
- {
137
- $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
138
- $output = '<ul>';
139
- foreach ( $meta as $m )
140
- {
141
- $output .= sprintf( '<li>%s</li>', call_user_func( array( $field_class, 'get_option_label' ), $m, $field ) );
142
- }
143
-
144
- return $output . '</ul>';
145
- }
146
-
147
- /**
148
- * Get option label
149
- *
150
- * @param string $value Option value
151
- * @param array $field Field parameter
152
- *
153
- * @return string
154
- */
155
- public static function get_option_label( $value, $field )
156
- {
157
- $options = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_options' ), $field );
158
- return $options[$value]->label;
159
- }
160
- }
1
+ <?php
2
+ /**
3
+ * Abstract class for any kind of choice field.
4
+ */
5
+ abstract class MASHSB_RWMB_Choice_Field extends MASHSB_RWMB_Field
6
+ {
7
+ /**
8
+ * Walk options
9
+ *
10
+ * @param mixed $meta
11
+ * @param array $field
12
+ * @param mixed $options
13
+ * @param mixed $db_fields
14
+ * @return string
15
+ */
16
+ public static function walk( $options, $db_fields, $meta, $field )
17
+ {
18
+ return '';
19
+ }
20
+
21
+ /**
22
+ * Get field HTML
23
+ *
24
+ * @param mixed $meta
25
+ * @param array $field
26
+ * @return string
27
+ */
28
+ public static function html( $meta, $field )
29
+ {
30
+ $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
31
+ $meta = (array) $meta;
32
+ $options = call_user_func( array( $field_class, 'get_options' ), $field );
33
+ $db_fields = call_user_func( array( $field_class, 'get_db_fields' ), $field );
34
+
35
+ return call_user_func( array( $field_class, 'walk' ), $options, $db_fields, $meta, $field );
36
+ }
37
+
38
+ /**
39
+ * Normalize parameters for field
40
+ *
41
+ * @param array $field
42
+ * @return array
43
+ */
44
+ public static function normalize( $field )
45
+ {
46
+ $field = parent::normalize( $field );
47
+ $field = wp_parse_args( $field, array(
48
+ 'flatten' => true,
49
+ 'options' => array(),
50
+ ) );
51
+
52
+ return $field;
53
+ }
54
+
55
+ /**
56
+ * Get field names of object to be used by walker
57
+ *
58
+ * @return array
59
+ */
60
+ public static function get_db_fields()
61
+ {
62
+ return array(
63
+ 'parent' => 'parent',
64
+ 'id' => 'value',
65
+ 'label' => 'label',
66
+ );
67
+ }
68
+
69
+ /**
70
+ * Get options for walker
71
+ *
72
+ * @param array $field
73
+ *
74
+ * @return array
75
+ */
76
+ public static function get_options( $field )
77
+ {
78
+ $options = array();
79
+ foreach ( (array) $field['options'] as $value => $label )
80
+ {
81
+ $option = is_array( $label ) ? $label : array( 'label' => (string) $label, 'value' => (string) $value );
82
+ if ( isset( $option['label'] ) && isset( $option['value'] ) )
83
+ $options[$option['value']] = (object) $option;
84
+ }
85
+ return $options;
86
+ }
87
+
88
+ /**
89
+ * Output the field value
90
+ * Display unordered list of option labels, not option values
91
+ *
92
+ * @param array $field Field parameters
93
+ * @param array $args Additional arguments. Not used for these fields.
94
+ * @param int|null $post_id Post ID. null for current post. Optional.
95
+ *
96
+ * @return string Link(s) to post
97
+ */
98
+ public static function the_value( $field, $args = array(), $post_id = null )
99
+ {
100
+ $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
101
+ $value = call_user_func( array( $field_class, 'get_value' ), $field, $args, $post_id );
102
+
103
+ if ( ! $value )
104
+ return '';
105
+
106
+ if ( $field['clone'] && $field['multiple'] )
107
+ {
108
+ $output = '<ul>';
109
+ foreach ( $value as $subvalue )
110
+ {
111
+ $output .= '<li>';
112
+ $output .= call_user_func( array( $field_class, 'list_option_labels' ), $subvalue, $field );
113
+ $output .= '</li>';
114
+ }
115
+ $output .= '</ul>';
116
+ }
117
+ elseif ( $field['clone'] || $field['multiple'] )
118
+ {
119
+ $output = call_user_func( array( $field_class, 'list_option_labels' ), $value, $field );
120
+ }
121
+ else
122
+ {
123
+ $output = $field['options'][$value]['label'];
124
+ }
125
+ return $output;
126
+ }
127
+
128
+ /**
129
+ * List option labels
130
+ *
131
+ * @param array $meta
132
+ * @param array $field Field parameter
133
+ * @return string
134
+ */
135
+ public static function list_option_labels( $meta, $field )
136
+ {
137
+ $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
138
+ $output = '<ul>';
139
+ foreach ( $meta as $m )
140
+ {
141
+ $output .= sprintf( '<li>%s</li>', call_user_func( array( $field_class, 'get_option_label' ), $m, $field ) );
142
+ }
143
+
144
+ return $output . '</ul>';
145
+ }
146
+
147
+ /**
148
+ * Get option label
149
+ *
150
+ * @param string $value Option value
151
+ * @param array $field Field parameter
152
+ *
153
+ * @return string
154
+ */
155
+ public static function get_option_label( $value, $field )
156
+ {
157
+ $options = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_options' ), $field );
158
+ return $options[$value]->label;
159
+ }
160
+ }
includes/admin/meta-box/inc/fields/color.php CHANGED
@@ -1,85 +1,85 @@
1
- <?php
2
- /**
3
- * Color field class.
4
- */
5
- class MASHSB_RWMB_Color_Field extends MASHSB_RWMB_Text_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- */
10
- static function admin_enqueue_scripts()
11
- {
12
- wp_enqueue_style( 'mashsb-rwmb-color', MASHSB_RWMB_CSS_URL . 'color.css', array( 'wp-color-picker' ), MASHSB_RWMB_VER );
13
- wp_enqueue_script( 'mashsb-rwmb-color', MASHSB_RWMB_JS_URL . 'color.js', array( 'wp-color-picker' ), MASHSB_RWMB_VER, true );
14
- }
15
-
16
- /**
17
- * Normalize parameters for field.
18
- *
19
- * @param array $field
20
- * @return array
21
- */
22
- static function normalize( $field )
23
- {
24
- $field = wp_parse_args( $field, array(
25
- 'size' => 7,
26
- 'maxlength' => 7,
27
- 'pattern' => '^#+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$',
28
- 'js_options' => array(),
29
- ) );
30
-
31
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
32
- 'defaultColor' => false,
33
- 'hide' => true,
34
- 'palettes' => true,
35
- ) );
36
-
37
- $field = parent::normalize( $field );
38
-
39
- return $field;
40
- }
41
-
42
- /**
43
- * Get the attributes for a field
44
- *
45
- * @param array $field
46
- * @param mixed $value
47
- * @return array
48
- */
49
- static function get_attributes( $field, $value = null )
50
- {
51
- $attributes = parent::get_attributes( $field, $value );
52
- $attributes = wp_parse_args( $attributes, array(
53
- 'data-options' => wp_json_encode( $field['js_options'] ),
54
- ) );
55
-
56
- return $attributes;
57
- }
58
-
59
- /**
60
- * Output color field as a dot.
61
- * @param array $field
62
- * @param array $args
63
- * @param null $post_id
64
- * @return string
65
- */
66
- static function the_value( $field, $args = array(), $post_id = null )
67
- {
68
- $value = self::get_value( $field, $args, $post_id );
69
- $template = "<span style='display:inline-block;width:20px;height:20px;border-radius:50%%;background:%s;'></span>";
70
- if ( is_array( $value ) )
71
- {
72
- $output = '<ul>';
73
- foreach ( $value as $subvalue )
74
- {
75
- $output .= '<li>' . sprintf( $template, $subvalue ) . '</li>';
76
- }
77
- $output .= '</ul>';
78
- }
79
- else
80
- {
81
- $output = sprintf( $template, $value );
82
- }
83
- return $output;
84
- }
85
- }
1
+ <?php
2
+ /**
3
+ * Color field class.
4
+ */
5
+ class MASHSB_RWMB_Color_Field extends MASHSB_RWMB_Text_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ */
10
+ static function admin_enqueue_scripts()
11
+ {
12
+ wp_enqueue_style( 'mashsb-rwmb-color', MASHSB_RWMB_CSS_URL . 'color.css', array( 'wp-color-picker' ), MASHSB_RWMB_VER );
13
+ wp_enqueue_script( 'mashsb-rwmb-color', MASHSB_RWMB_JS_URL . 'color.js', array( 'wp-color-picker' ), MASHSB_RWMB_VER, true );
14
+ }
15
+
16
+ /**
17
+ * Normalize parameters for field.
18
+ *
19
+ * @param array $field
20
+ * @return array
21
+ */
22
+ static function normalize( $field )
23
+ {
24
+ $field = wp_parse_args( $field, array(
25
+ 'size' => 7,
26
+ 'maxlength' => 7,
27
+ 'pattern' => '^#+([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$',
28
+ 'js_options' => array(),
29
+ ) );
30
+
31
+ $field['js_options'] = wp_parse_args( $field['js_options'], array(
32
+ 'defaultColor' => false,
33
+ 'hide' => true,
34
+ 'palettes' => true,
35
+ ) );
36
+
37
+ $field = parent::normalize( $field );
38
+
39
+ return $field;
40
+ }
41
+
42
+ /**
43
+ * Get the attributes for a field
44
+ *
45
+ * @param array $field
46
+ * @param mixed $value
47
+ * @return array
48
+ */
49
+ static function get_attributes( $field, $value = null )
50
+ {
51
+ $attributes = parent::get_attributes( $field, $value );
52
+ $attributes = wp_parse_args( $attributes, array(
53
+ 'data-options' => wp_json_encode( $field['js_options'] ),
54
+ ) );
55
+
56
+ return $attributes;
57
+ }
58
+
59
+ /**
60
+ * Output color field as a dot.
61
+ * @param array $field
62
+ * @param array $args
63
+ * @param null $post_id
64
+ * @return string
65
+ */
66
+ static function the_value( $field, $args = array(), $post_id = null )
67
+ {
68
+ $value = self::get_value( $field, $args, $post_id );
69
+ $template = "<span style='display:inline-block;width:20px;height:20px;border-radius:50%%;background:%s;'></span>";
70
+ if ( is_array( $value ) )
71
+ {
72
+ $output = '<ul>';
73
+ foreach ( $value as $subvalue )
74
+ {
75
+ $output .= '<li>' . sprintf( $template, $subvalue ) . '</li>';
76
+ }
77
+ $output .= '</ul>';
78
+ }
79
+ else
80
+ {
81
+ $output = sprintf( $template, $value );
82
+ }
83
+ return $output;
84
+ }
85
+ }
includes/admin/meta-box/inc/fields/date.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
- /**
3
- * Date field class.
4
- */
5
- class MASHSB_RWMB_Date_Field extends MASHSB_RWMB_Datetime_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- public static function admin_enqueue_scripts()
13
- {
14
- parent::admin_register_scripts();
15
- wp_enqueue_style( 'jquery-ui-datepicker' );
16
- wp_enqueue_script( 'mashsb-rwmb-date' );
17
- }
18
-
19
- /**
20
- * Returns a date() compatible format string from the JavaScript format
21
- *
22
- * @link http://www.php.net/manual/en/function.date.php
23
- * @param array $field
24
- *
25
- * @return string
26
- */
27
- public static function translate_format( $field )
28
- {
29
- return strtr( $field['js_options']['dateFormat'], self::$date_formats );
30
- }
31
- }
1
+ <?php
2
+ /**
3
+ * Date field class.
4
+ */
5
+ class MASHSB_RWMB_Date_Field extends MASHSB_RWMB_Datetime_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ *
10
+ * @return void
11
+ */
12
+ public static function admin_enqueue_scripts()
13
+ {
14
+ parent::admin_register_scripts();
15
+ wp_enqueue_style( 'jquery-ui-datepicker' );
16
+ wp_enqueue_script( 'mashsb-rwmb-date' );
17
+ }
18
+
19
+ /**
20
+ * Returns a date() compatible format string from the JavaScript format
21
+ *
22
+ * @link http://www.php.net/manual/en/function.date.php
23
+ * @param array $field
24
+ *
25
+ * @return string
26
+ */
27
+ public static function translate_format( $field )
28
+ {
29
+ return strtr( $field['js_options']['dateFormat'], self::$date_formats );
30
+ }
31
+ }
includes/admin/meta-box/inc/fields/datetime.php CHANGED
@@ -1,264 +1,264 @@
1
- <?php
2
-
3
- /**
4
- * Datetime field class.
5
- */
6
- class MASHSB_RWMB_Datetime_Field extends MASHSB_RWMB_Text_Field
7
- {
8
- /**
9
- * Translate date format from jQuery UI date picker to PHP date()
10
- * It's used to store timestamp value of the field
11
- * Missing: '!' => '', 'oo' => '', '@' => '', "''" => "'"
12
- * @var array
13
- */
14
- protected static $date_formats = array(
15
- 'd' => 'j', 'dd' => 'd', 'oo' => 'z', 'D' => 'D', 'DD' => 'l',
16
- 'm' => 'n', 'mm' => 'm', 'M' => 'M', 'MM' => 'F', 'y' => 'y', 'yy' => 'Y', 'o' => 'z',
17
- );
18
-
19
- /**
20
- * Translate time format from jQuery UI time picker to PHP date()
21
- * It's used to store timestamp value of the field
22
- * Missing: 't' => '', T' => '', 'm' => '', 's' => ''
23
- * @var array
24
- */
25
- protected static $time_formats = array(
26
- 'H' => 'G', 'HH' => 'H', 'h' => 'g', 'hh' => 'h',
27
- 'mm' => 'i', 'ss' => 's', 'l' => 'u', 'tt' => 'a', 'TT' => 'A',
28
- );
29
-
30
- /**
31
- * Register scripts and styles
32
- */
33
- public static function admin_register_scripts()
34
- {
35
- $url = MASHSB_RWMB_CSS_URL . 'jqueryui';
36
- wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
37
- wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
38
- wp_register_style( 'wp-datepicker', MASHSB_RWMB_CSS_URL . 'datepicker.css', array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
39
- wp_register_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'wp-datepicker' ), '1.8.17' );
40
- wp_register_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
41
- wp_register_style( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.min.css", array( 'jquery-ui-datepicker', 'jquery-ui-slider', 'wp-datepicker' ), '1.5.0' );
42
-
43
- $url = MASHSB_RWMB_JS_URL . 'jqueryui';
44
- wp_register_script( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.min.js", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '1.5.0', true );
45
- wp_register_script( 'jquery-ui-timepicker-i18n', "{$url}/jquery-ui-timepicker-addon-i18n.min.js", array( 'jquery-ui-timepicker' ), '1.5.0', true );
46
-
47
- /**
48
- * Localization
49
- * Use 1 minified JS file for timepicker which contains all languages for simplicity (in version < 4.4.2 we use separated JS files).
50
- * The language is set in Javascript
51
- *
52
- * Note: we use full locale (de-DE) and fallback to short locale (de)
53
- */
54
- $locale = str_replace( '_', '-', get_locale() );
55
- $locale_short = substr( $locale, 0, 2 );
56
-
57
- $date_paths = array( 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . $locale . '.js' );
58
- if ( strlen( $locale ) > 2 )
59
- {
60
- // Also check alternate i18n filenames
61
- // (e.g. jquery.ui.datepicker-de.js instead of jquery.ui.datepicker-de-DE.js)
62
- $date_paths[] = 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . substr( $locale, 0, 2 ) . '.js';
63
- }
64
- $deps = array( 'jquery-ui-timepicker-i18n' );
65
- foreach ( $date_paths as $date_path )
66
- {
67
- if ( file_exists( MASHSB_RWMB_DIR . 'js/' . $date_path ) )
68
- {
69
- wp_register_script( 'jquery-ui-datepicker-i18n', MASHSB_RWMB_JS_URL . $date_path, array( 'jquery-ui-datepicker' ), '1.8.17', true );
70
- $deps[] = 'jquery-ui-datepicker-i18n';
71
- break;
72
- }
73
- }
74
-
75
- wp_register_script( 'mashsb-rwmb-datetime', MASHSB_RWMB_JS_URL . 'datetime.js', $deps, MASHSB_RWMB_VER, true );
76
- wp_register_script( 'mashsb-rwmb-date', MASHSB_RWMB_JS_URL . 'date.js', $deps, MASHSB_RWMB_VER, true );
77
- wp_register_script( 'mashsb-rwmb-time', MASHSB_RWMB_JS_URL . 'time.js', array( 'jquery-ui-timepicker-i18n' ), MASHSB_RWMB_VER, true );
78
- wp_localize_script( 'mashsb-rwmb-datetime', 'MASHSB_RWMB_Datetimepicker', array(
79
- 'locale' => $locale,
80
- 'localeShort' => $locale_short,
81
- ) );
82
- wp_localize_script( 'mashsb-rwmb-time', 'MASHSB_RWMB_Timepicker', array(
83
- 'locale' => $locale,
84
- 'localeShort' => $locale_short,
85
- ) );
86
- }
87
-
88
- /**
89
- * Enqueue scripts and styles
90
- */
91
- public static function admin_enqueue_scripts()
92
- {
93
- self::admin_register_scripts();
94
- wp_enqueue_style( 'jquery-ui-timepicker' );
95
- wp_enqueue_script( 'mashsb-rwmb-datetime' );
96
- }
97
-
98
- /**
99
- * Get field HTML
100
- *
101
- * @param mixed $meta
102
- * @param array $field
103
- *
104
- * @return string
105
- */
106
- public static function html( $meta, $field )
107
- {
108
- $output = '';
109
-
110
- if ( $field['timestamp'] )
111
- {
112
- $name = $field['field_name'];
113
- $field = wp_parse_args( array( 'field_name' => $name . '[formatted]' ), $field );
114
- $output .= sprintf(
115
- '<input type="hidden" name="%s" class="mashsb-rwmb-datetime-timestamp" value="%s">',
116
- esc_attr( $name . '[timestamp]' ),
117
- isset( $meta['timestamp'] ) ? intval( $meta['timestamp'] ) : ''
118
- );
119
- $meta = isset( $meta['formatted'] ) ? $meta['formatted'] : '';
120
- }
121
-
122
- $output .= parent::html( $meta, $field );
123
-
124
- if ( $field['inline'] )
125
- {
126
- $output .= '<div class="mashsb-rwmb-datetime-inline"></div>';
127
- }
128
-
129
- return $output;
130
- }
131
-
132
- /**
133
- * Calculates the timestamp from the datetime string and returns it
134
- * if $field['timestamp'] is set or the datetime string if not
135
- *
136
- * @param mixed $new
137
- * @param mixed $old
138
- * @param int $post_id
139
- * @param array $field
140
- *
141
- * @return string|int
142
- */
143
- public static function value( $new, $old, $post_id, $field )
144
- {
145
- if ( ! $field['timestamp'] )
146
- return $new;
147
-
148
- if ( $field['clone'] )
149
- {
150
- foreach ( $new as $key => $value )
151
- {
152
- $new[$key] = isset( $value['timestamp'] ) ? $value['timestamp'] : 0;
153
- }
154
- return $new;
155
- }
156
-
157
- return isset( $new['timestamp'] ) ? $new['timestamp'] : 0;
158
- }
159
-
160
- /**
161
- * Get meta value
162
- *
163
- * @param int $post_id
164
- * @param bool $saved
165
- * @param array $field
166
- *
167
- * @return mixed
168
- */
169
- public static function meta( $post_id, $saved, $field )
170
- {
171
- $meta = parent::meta( $post_id, $saved, $field );
172
- if ( ! $field['timestamp'] )
173
- {
174
- return $meta;
175
- }
176
- $method = array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'translate_format' );
177
- if ( is_array( $meta ) )
178
- {
179
- foreach ( $meta as $key => $value )
180
- {
181
- $meta[$key] = array(
182
- 'timestamp' => $value,
183
- 'formatted' => date( call_user_func( $method, $field ), intval( $value ) ),
184
- );
185
- }
186
- }
187
- else
188
- {
189
- $meta = array(
190
- 'timestamp' => $meta,
191
- 'formatted' => date( call_user_func( $method, $field ), intval( $meta ) ),
192
- );
193
- }
194
- return $meta;
195
- }
196
-
197
- /**
198
- * Normalize parameters for field
199
- *
200
- * @param array $field
201
- * @return array
202
- */
203
- public static function normalize( $field )
204
- {
205
- $field = wp_parse_args( $field, array(
206
- 'timestamp' => false,
207
- 'inline' => false,
208
- 'js_options' => array(),
209
- ) );
210
-
211
- // Deprecate 'format', but keep it for backward compatible
212
- // Use 'js_options' instead
213
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
214
- 'timeFormat' => 'HH:mm',
215
- 'separator' => ' ',
216
- 'dateFormat' => empty( $field['format'] ) ? 'yy-mm-dd' : $field['format'],
217
- 'showButtonPanel' => true,
218
- ) );
219
-
220
- if ( $field['inline'] )
221
- {
222
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
223
- 'altFieldTimeOnly' => false,
224
- ) );
225
- }
226
-
227
- $field = MASHSB_RWMB_Text_Field::normalize( $field );
228
-
229
- return $field;
230
- }
231
-
232
- /**
233
- * Get the attributes for a field
234
- *
235
- * @param array $field
236
- * @param mixed $value
237
- *
238
- * @return array
239
- */
240
- public static function get_attributes( $field, $value = null )
241
- {
242
- $attributes = parent::get_attributes( $field, $value );
243
- $attributes = wp_parse_args( $attributes, array(
244
- 'data-options' => wp_json_encode( $field['js_options'] ),
245
- ) );
246
-
247
- return $attributes;
248
- }
249
-
250
- /**
251
- * Returns a date() compatible format string from the JavaScript format
252
- *
253
- * @link http://www.php.net/manual/en/function.date.php
254
- * @param array $field
255
- *
256
- * @return string
257
- */
258
- public static function translate_format( $field )
259
- {
260
- return strtr( $field['js_options']['dateFormat'], self::$date_formats )
261
- . $field['js_options']['separator']
262
- . strtr( $field['js_options']['timeFormat'], self::$time_formats );
263
- }
264
- }
1
+ <?php
2
+
3
+ /**
4
+ * Datetime field class.
5
+ */
6
+ class MASHSB_RWMB_Datetime_Field extends MASHSB_RWMB_Text_Field
7
+ {
8
+ /**
9
+ * Translate date format from jQuery UI date picker to PHP date()
10
+ * It's used to store timestamp value of the field
11
+ * Missing: '!' => '', 'oo' => '', '@' => '', "''" => "'"
12
+ * @var array
13
+ */
14
+ protected static $date_formats = array(
15
+ 'd' => 'j', 'dd' => 'd', 'oo' => 'z', 'D' => 'D', 'DD' => 'l',
16
+ 'm' => 'n', 'mm' => 'm', 'M' => 'M', 'MM' => 'F', 'y' => 'y', 'yy' => 'Y', 'o' => 'z',
17
+ );
18
+
19
+ /**
20
+ * Translate time format from jQuery UI time picker to PHP date()
21
+ * It's used to store timestamp value of the field
22
+ * Missing: 't' => '', T' => '', 'm' => '', 's' => ''
23
+ * @var array
24
+ */
25
+ protected static $time_formats = array(
26
+ 'H' => 'G', 'HH' => 'H', 'h' => 'g', 'hh' => 'h',
27
+ 'mm' => 'i', 'ss' => 's', 'l' => 'u', 'tt' => 'a', 'TT' => 'A',
28
+ );
29
+
30
+ /**
31
+ * Register scripts and styles
32
+ */
33
+ public static function admin_register_scripts()
34
+ {
35
+ $url = MASHSB_RWMB_CSS_URL . 'jqueryui';
36
+ wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
37
+ wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
38
+ wp_register_style( 'wp-datepicker', MASHSB_RWMB_CSS_URL . 'datepicker.css', array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
39
+ wp_register_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'wp-datepicker' ), '1.8.17' );
40
+ wp_register_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
41
+ wp_register_style( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.min.css", array( 'jquery-ui-datepicker', 'jquery-ui-slider', 'wp-datepicker' ), '1.5.0' );
42
+
43
+ $url = MASHSB_RWMB_JS_URL . 'jqueryui';
44
+ wp_register_script( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.min.js", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '1.5.0', true );
45
+ wp_register_script( 'jquery-ui-timepicker-i18n', "{$url}/jquery-ui-timepicker-addon-i18n.min.js", array( 'jquery-ui-timepicker' ), '1.5.0', true );
46
+
47
+ /**
48
+ * Localization
49
+ * Use 1 minified JS file for timepicker which contains all languages for simplicity (in version < 4.4.2 we use separated JS files).
50
+ * The language is set in Javascript
51
+ *
52
+ * Note: we use full locale (de-DE) and fallback to short locale (de)
53
+ */
54
+ $locale = str_replace( '_', '-', get_locale() );
55
+ $locale_short = substr( $locale, 0, 2 );
56
+
57
+ $date_paths = array( 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . $locale . '.js' );
58
+ if ( strlen( $locale ) > 2 )
59
+ {
60
+ // Also check alternate i18n filenames
61
+ // (e.g. jquery.ui.datepicker-de.js instead of jquery.ui.datepicker-de-DE.js)
62
+ $date_paths[] = 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . substr( $locale, 0, 2 ) . '.js';
63
+ }
64
+ $deps = array( 'jquery-ui-timepicker-i18n' );
65
+ foreach ( $date_paths as $date_path )
66
+ {
67
+ if ( file_exists( MASHSB_RWMB_DIR . 'js/' . $date_path ) )
68
+ {
69
+ wp_register_script( 'jquery-ui-datepicker-i18n', MASHSB_RWMB_JS_URL . $date_path, array( 'jquery-ui-datepicker' ), '1.8.17', true );
70
+ $deps[] = 'jquery-ui-datepicker-i18n';
71
+ break;
72
+ }
73
+ }
74
+
75
+ wp_register_script( 'mashsb-rwmb-datetime', MASHSB_RWMB_JS_URL . 'datetime.js', $deps, MASHSB_RWMB_VER, true );
76
+ wp_register_script( 'mashsb-rwmb-date', MASHSB_RWMB_JS_URL . 'date.js', $deps, MASHSB_RWMB_VER, true );
77
+ wp_register_script( 'mashsb-rwmb-time', MASHSB_RWMB_JS_URL . 'time.js', array( 'jquery-ui-timepicker-i18n' ), MASHSB_RWMB_VER, true );
78
+ wp_localize_script( 'mashsb-rwmb-datetime', 'MASHSB_RWMB_Datetimepicker', array(
79
+ 'locale' => $locale,
80
+ 'localeShort' => $locale_short,
81
+ ) );
82
+ wp_localize_script( 'mashsb-rwmb-time', 'MASHSB_RWMB_Timepicker', array(
83
+ 'locale' => $locale,
84
+ 'localeShort' => $locale_short,
85
+ ) );
86
+ }
87
+
88
+ /**
89
+ * Enqueue scripts and styles
90
+ */
91
+ public static function admin_enqueue_scripts()
92
+ {
93
+ self::admin_register_scripts();
94
+ wp_enqueue_style( 'jquery-ui-timepicker' );
95
+ wp_enqueue_script( 'mashsb-rwmb-datetime' );
96
+ }
97
+
98
+ /**
99
+ * Get field HTML
100
+ *
101
+ * @param mixed $meta
102
+ * @param array $field
103
+ *
104
+ * @return string
105
+ */
106
+ public static function html( $meta, $field )
107
+ {
108
+ $output = '';
109
+
110
+ if ( $field['timestamp'] )
111
+ {
112
+ $name = $field['field_name'];
113
+ $field = wp_parse_args( array( 'field_name' => $name . '[formatted]' ), $field );
114
+ $output .= sprintf(
115
+ '<input type="hidden" name="%s" class="mashsb-rwmb-datetime-timestamp" value="%s">',
116
+ esc_attr( $name . '[timestamp]' ),
117
+ isset( $meta['timestamp'] ) ? intval( $meta['timestamp'] ) : ''
118
+ );
119
+ $meta = isset( $meta['formatted'] ) ? $meta['formatted'] : '';
120
+ }
121
+
122
+ $output .= parent::html( $meta, $field );
123
+
124
+ if ( $field['inline'] )
125
+ {
126
+ $output .= '<div class="mashsb-rwmb-datetime-inline"></div>';
127
+ }
128
+
129
+ return $output;
130
+ }
131
+
132
+ /**
133
+ * Calculates the timestamp from the datetime string and returns it
134
+ * if $field['timestamp'] is set or the datetime string if not
135
+ *
136
+ * @param mixed $new
137
+ * @param mixed $old
138
+ * @param int $post_id
139
+ * @param array $field
140
+ *
141
+ * @return string|int
142
+ */
143
+ public static function value( $new, $old, $post_id, $field )
144
+ {
145
+ if ( ! $field['timestamp'] )
146
+ return $new;
147
+
148
+ if ( $field['clone'] )
149
+ {
150
+ foreach ( $new as $key => $value )
151
+ {
152
+ $new[$key] = isset( $value['timestamp'] ) ? $value['timestamp'] : 0;
153
+ }
154
+ return $new;
155
+ }
156
+
157
+ return isset( $new['timestamp'] ) ? $new['timestamp'] : 0;
158
+ }
159
+
160
+ /**
161
+ * Get meta value
162
+ *
163
+ * @param int $post_id
164
+ * @param bool $saved
165
+ * @param array $field
166
+ *
167
+ * @return mixed
168
+ */
169
+ public static function meta( $post_id, $saved, $field )
170
+ {
171
+ $meta = parent::meta( $post_id, $saved, $field );
172
+ if ( ! $field['timestamp'] )
173
+ {
174
+ return $meta;
175
+ }
176
+ $method = array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'translate_format' );
177
+ if ( is_array( $meta ) )
178
+ {
179
+ foreach ( $meta as $key => $value )
180
+ {
181
+ $meta[$key] = array(
182
+ 'timestamp' => $value,
183
+ 'formatted' => date( call_user_func( $method, $field ), intval( $value ) ),
184
+ );
185
+ }
186
+ }
187
+ else
188
+ {
189
+ $meta = array(
190
+ 'timestamp' => $meta,
191
+ 'formatted' => date( call_user_func( $method, $field ), intval( $meta ) ),
192
+ );
193
+ }
194
+ return $meta;
195
+ }
196
+
197
+ /**
198
+ * Normalize parameters for field
199
+ *
200
+ * @param array $field
201
+ * @return array
202
+ */
203
+ public static function normalize( $field )
204
+ {
205
+ $field = wp_parse_args( $field, array(
206
+ 'timestamp' => false,
207
+ 'inline' => false,
208
+ 'js_options' => array(),
209
+ ) );
210
+
211
+ // Deprecate 'format', but keep it for backward compatible
212
+ // Use 'js_options' instead
213
+ $field['js_options'] = wp_parse_args( $field['js_options'], array(
214
+ 'timeFormat' => 'HH:mm',
215
+ 'separator' => ' ',
216
+ 'dateFormat' => empty( $field['format'] ) ? 'yy-mm-dd' : $field['format'],
217
+ 'showButtonPanel' => true,
218
+ ) );
219
+
220
+ if ( $field['inline'] )
221
+ {
222
+ $field['js_options'] = wp_parse_args( $field['js_options'], array(
223
+ 'altFieldTimeOnly' => false,
224
+ ) );
225
+ }
226
+
227
+ $field = MASHSB_RWMB_Text_Field::normalize( $field );
228
+
229
+ return $field;
230
+ }
231
+
232
+ /**
233
+ * Get the attributes for a field
234
+ *
235
+ * @param array $field
236
+ * @param mixed $value
237
+ *
238
+ * @return array
239
+ */
240
+ public static function get_attributes( $field, $value = null )
241
+ {
242
+ $attributes = parent::get_attributes( $field, $value );
243
+ $attributes = wp_parse_args( $attributes, array(
244
+ 'data-options' => wp_json_encode( $field['js_options'] ),
245
+ ) );
246
+
247
+ return $attributes;
248
+ }
249
+
250
+ /**
251
+ * Returns a date() compatible format string from the JavaScript format
252
+ *
253
+ * @link http://www.php.net/manual/en/function.date.php
254
+ * @param array $field
255
+ *
256
+ * @return string
257
+ */
258
+ public static function translate_format( $field )
259
+ {
260
+ return strtr( $field['js_options']['dateFormat'], self::$date_formats )
261
+ . $field['js_options']['separator']
262
+ . strtr( $field['js_options']['timeFormat'], self::$time_formats );
263
+ }
264
+ }
includes/admin/meta-box/inc/fields/divider.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
- /**
3
- * Divider field class.
4
- */
5
- class MASHSB_RWMB_Divider_Field extends MASHSB_RWMB_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- static function admin_enqueue_scripts()
13
- {
14
- wp_enqueue_style( 'mashsb-rwmb-divider', MASHSB_RWMB_CSS_URL . 'divider.css', array(), MASHSB_RWMB_VER );
15
- }
16
-
17
- /**
18
- * Show begin HTML markup for fields
19
- *
20
- * @param mixed $meta
21
- * @param array $field
22
- *
23
- * @return string
24
- */
25
- static function begin_html( $meta, $field )
26
- {
27
- $attributes = empty( $field['id'] ) ? '' : " id='{$field['id']}'";
28
- return "<hr$attributes>";
29
- }
30
-
31
- /**
32
- * Show end HTML markup for fields
33
- *
34
- * @param mixed $meta
35
- * @param array $field
36
- *
37
- * @return string
38
- */
39
- static function end_html( $meta, $field )
40
- {
41
- return '';
42
- }
43
- }
1
+ <?php
2
+ /**
3
+ * Divider field class.
4
+ */
5
+ class MASHSB_RWMB_Divider_Field extends MASHSB_RWMB_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ *
10
+ * @return void
11
+ */
12
+ static function admin_enqueue_scripts()
13
+ {
14
+ wp_enqueue_style( 'mashsb-rwmb-divider', MASHSB_RWMB_CSS_URL . 'divider.css', array(), MASHSB_RWMB_VER );
15
+ }
16
+
17
+ /**
18
+ * Show begin HTML markup for fields
19
+ *
20
+ * @param mixed $meta
21
+ * @param array $field
22
+ *
23
+ * @return string
24
+ */
25
+ static function begin_html( $meta, $field )
26
+ {
27
+ $attributes = empty( $field['id'] ) ? '' : " id='{$field['id']}'";
28
+ return "<hr$attributes>";
29
+ }
30
+
31
+ /**
32
+ * Show end HTML markup for fields
33
+ *
34
+ * @param mixed $meta
35
+ * @param array $field
36
+ *
37
+ * @return string
38
+ */
39
+ static function end_html( $meta, $field )
40
+ {
41
+ return '';
42
+ }
43
+ }
includes/admin/meta-box/inc/fields/email.php CHANGED
@@ -1,50 +1,50 @@
1
- <?php
2
- /**
3
- * Email field class.
4
- */
5
- class MASHSB_RWMB_Email_Field extends MASHSB_RWMB_Text_Field
6
- {
7
- /**
8
- * Normalize parameters for field
9
- *
10
- * @param array $field
11
- *
12
- * @return array
13
- */
14
- static function normalize( $field )
15
- {
16
- $field = parent::normalize( $field );
17
-
18
- return $field;
19
- }
20
-
21
- /**
22
- * Get the attributes for a field
23
- *
24
- * @param array $field
25
- * @param mixed $value
26
- *
27
- * @return array
28
- */
29
- static function get_attributes( $field, $value = null )
30
- {
31
- $attributes = parent::get_attributes( $field, $value );
32
- $attributes['type'] = 'email';
33
- return $attributes;
34
- }
35
-
36
- /**
37
- * Sanitize email
38
- *
39
- * @param mixed $new
40
- * @param mixed $old
41
- * @param int $post_id
42
- * @param array $field
43
- *
44
- * @return string
45
- */
46
- static function value( $new, $old, $post_id, $field )
47
- {
48
- return $field['clone'] ? array_map( 'sanitize_email', (array) $new ) : sanitize_email( $new );
49
- }
50
- }
1
+ <?php
2
+ /**
3
+ * Email field class.
4
+ */
5
+ class MASHSB_RWMB_Email_Field extends MASHSB_RWMB_Text_Field
6
+ {
7
+ /**
8
+ * Normalize parameters for field
9
+ *
10
+ * @param array $field
11
+ *
12
+ * @return array
13
+ */
14
+ static function normalize( $field )
15
+ {
16
+ $field = parent::normalize( $field );
17
+
18
+ return $field;
19
+ }
20
+
21
+ /**
22
+ * Get the attributes for a field
23
+ *
24
+ * @param array $field
25
+ * @param mixed $value
26
+ *
27
+ * @return array
28
+ */
29
+ static function get_attributes( $field, $value = null )
30
+ {
31
+ $attributes = parent::get_attributes( $field, $value );
32
+ $attributes['type'] = 'email';
33
+ return $attributes;
34
+ }
35
+
36
+ /**
37
+ * Sanitize email
38
+ *
39
+ * @param mixed $new
40
+ * @param mixed $old
41
+ * @param int $post_id
42
+ * @param array $field
43
+ *
44
+ * @return string
45
+ */
46
+ static function value( $new, $old, $post_id, $field )
47
+ {
48
+ return $field['clone'] ? array_map( 'sanitize_email', (array) $new ) : sanitize_email( $new );
49
+ }
50
+ }
includes/admin/meta-box/inc/fields/fieldset-text.php CHANGED
@@ -1,84 +1,84 @@
1
- <?php
2
- /**
3
- * Fieldset text class.
4
- */
5
- class MASHSB_RWMB_Fieldset_Text_Field extends MASHSB_RWMB_Text_Field
6
- {
7
- /**
8
- * Get field HTML
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- *
13
- * @return string
14
- */
15
- static function html( $meta, $field )
16
- {
17
- $html = array();
18
- $tpl = '<label>%s %s</label>';
19
-
20
- foreach ( $field['options'] as $key => $label )
21
- {
22
- $value = isset( $meta[$key] ) ? $meta[$key] : '';
23
- $field['attributes']['name'] = $field['field_name'] . "[{$key}]";
24
- $html[] = sprintf( $tpl, $label, parent::html( $value, $field ) );
25
- }
26
-
27
- $out = '<fieldset><legend>' . $field['desc'] . '</legend>' . implode( ' ', $html ) . '</fieldset>';
28
-
29
- return $out;
30
- }
31
-
32
- /**
33
- * Normalize parameters for field
34
- *
35
- * @param array $field
36
- *
37
- * @return array
38
- */
39
- static function normalize( $field )
40
- {
41
- $field = parent::normalize( $field );
42
- $field['multiple'] = false;
43
- $field['attributes']['id'] = false;
44
- return $field;
45
- }
46
-
47
- /**
48
- * Output the field value
49
- * Display options in format Label: value in unordered list
50
- *
51
- * @param array $field Field parameters
52
- * @param array $args Additional arguments. Not used for these fields.
53
- * @param int|null $post_id Post ID. null for current post. Optional.
54
- *
55
- * @return mixed Field value
56
- */
57
- static function the_value( $field, $args = array(), $post_id = null )
58
- {
59
- $value = self::get_value( $field, $args, $post_id );
60
- if ( ! $value )
61
- return '';
62
-
63
- $output = '<table>';
64
- $output .= '<thead><tr>';
65
- foreach ( $field['options'] as $label )
66
- {
67
- $output .= "<th>$label</th>";
68
- }
69
- $output .= '</tr></thead><tbody>';
70
-
71
- foreach ( $value as $subvalue )
72
- {
73
- $output .= '<tr>';
74
- foreach ( $subvalue as $value )
75
- {
76
- $output .= "<td>$value</td>";
77
- }
78
- $output .= '</tr>';
79
- }
80
- $output .= '</tbody></table>';
81
-
82
- return $output;
83
- }
84
- }
1
+ <?php
2
+ /**
3
+ * Fieldset text class.
4
+ */
5
+ class MASHSB_RWMB_Fieldset_Text_Field extends MASHSB_RWMB_Text_Field
6
+ {
7
+ /**
8
+ * Get field HTML
9
+ *
10
+ * @param mixed $meta
11
+ * @param array $field
12
+ *
13
+ * @return string
14
+ */
15
+ static function html( $meta, $field )
16
+ {
17
+ $html = array();
18
+ $tpl = '<label>%s %s</label>';
19
+
20
+ foreach ( $field['options'] as $key => $label )
21
+ {
22
+ $value = isset( $meta[$key] ) ? $meta[$key] : '';
23
+ $field['attributes']['name'] = $field['field_name'] . "[{$key}]";
24
+ $html[] = sprintf( $tpl, $label, parent::html( $value, $field ) );
25
+ }
26
+
27
+ $out = '<fieldset><legend>' . $field['desc'] . '</legend>' . implode( ' ', $html ) . '</fieldset>';
28
+
29
+ return $out;
30
+ }
31
+
32
+ /**
33
+ * Normalize parameters for field
34
+ *
35
+ * @param array $field
36
+ *
37
+ * @return array
38
+ */
39
+ static function normalize( $field )
40
+ {
41
+ $field = parent::normalize( $field );
42
+ $field['multiple'] = false;
43
+ $field['attributes']['id'] = false;
44
+ return $field;
45
+ }
46
+
47
+ /**
48
+ * Output the field value
49
+ * Display options in format Label: value in unordered list
50
+ *
51
+ * @param array $field Field parameters
52
+ * @param array $args Additional arguments. Not used for these fields.
53
+ * @param int|null $post_id Post ID. null for current post. Optional.
54
+ *
55
+ * @return mixed Field value
56
+ */
57
+ static function the_value( $field, $args = array(), $post_id = null )
58
+ {
59
+ $value = self::get_value( $field, $args, $post_id );
60
+ if ( ! $value )
61
+ return '';
62
+
63
+ $output = '<table>';
64
+ $output .= '<thead><tr>';
65
+ foreach ( $field['options'] as $label )
66
+ {
67
+ $output .= "<th>$label</th>";
68
+ }
69
+ $output .= '</tr></thead><tbody>';
70
+
71
+ foreach ( $value as $subvalue )
72
+ {
73
+ $output .= '<tr>';
74
+ foreach ( $subvalue as $value )
75
+ {
76
+ $output .= "<td>$value</td>";
77
+ }
78
+ $output .= '</tr>';
79
+ }
80
+ $output .= '</tbody></table>';
81
+
82
+ return $output;
83
+ }
84
+ }
includes/admin/meta-box/inc/fields/file-advanced.php CHANGED
@@ -1,43 +1,43 @@
1
- <?php
2
- /**
3
- * File advanced field class which users WordPress media popup to upload and select files.
4
- */
5
- class MASHSB_RWMB_File_Advanced_Field extends MASHSB_RWMB_Media_Field
6
- {
7
- /**
8
- * Get the field value.
9
- * @param array $field
10
- * @param array $args
11
- * @param null $post_id
12
- * @return mixed
13
- */
14
- static function get_value( $field, $args = array(), $post_id = null )
15
- {
16
- return MASHSB_RWMB_File_Field::get_value( $field, $args, $post_id );
17
- }
18
-
19
- /**
20
- * Output the field value.
21
- * @param array $field
22
- * @param array $args
23
- * @param null $post_id
24
- * @return mixed
25
- */
26
- static function the_value( $field, $args = array(), $post_id = null )
27
- {
28
- return MASHSB_RWMB_File_Field::the_value( $field, $args, $post_id );
29
- }
30
-
31
- /**
32
- * Get uploaded file information.
33
- *
34
- * @param int $file_id Attachment image ID (post ID). Required.
35
- * @param array $args Array of arguments (for size).
36
- * @return array|bool False if file not found. Array of image info on success
37
- */
38
- static function file_info( $file_id, $args = array() )
39
- {
40
- return MASHSB_RWMB_File_Field::file_info( $file_id, $args );
41
- }
42
-
43
- }
1
+ <?php
2
+ /**
3
+ * File advanced field class which users WordPress media popup to upload and select files.
4
+ */
5
+ class MASHSB_RWMB_File_Advanced_Field extends MASHSB_RWMB_Media_Field
6
+ {
7
+ /**
8
+ * Get the field value.
9
+ * @param array $field
10
+ * @param array $args
11
+ * @param null $post_id
12
+ * @return mixed
13
+ */
14
+ static function get_value( $field, $args = array(), $post_id = null )
15
+ {
16
+ return MASHSB_RWMB_File_Field::get_value( $field, $args, $post_id );
17
+ }
18
+
19
+ /**
20
+ * Output the field value.
21
+ * @param array $field
22
+ * @param array $args
23
+ * @param null $post_id
24
+ * @return mixed
25
+ */
26
+ static function the_value( $field, $args = array(), $post_id = null )
27
+ {
28
+ return MASHSB_RWMB_File_Field::the_value( $field, $args, $post_id );
29
+ }
30
+
31
+ /**
32
+ * Get uploaded file information.
33
+ *
34
+ * @param int $file_id Attachment image ID (post ID). Required.
35
+ * @param array $args Array of arguments (for size).
36
+ * @return array|bool False if file not found. Array of image info on success
37
+ */
38
+ static function file_info( $file_id, $args = array() )
39
+ {
40
+ return MASHSB_RWMB_File_Field::file_info( $file_id, $args );
41
+ }
42
+
43
+ }
includes/admin/meta-box/inc/fields/file-input.php CHANGED
@@ -1,64 +1,64 @@
1
- <?php
2
- /**
3
- * File input field class which uses an input for file URL.
4
- */
5
- class MASHSB_RWMB_File_Input_Field extends MASHSB_RWMB_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- static function admin_enqueue_scripts()
13
- {
14
- // Make sure scripts for new media uploader in WordPress 3.5 is enqueued
15
- wp_enqueue_media();
16
- wp_enqueue_script( 'mashsb-rwmb-file-input', MASHSB_RWMB_JS_URL . 'file-input.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
17
- wp_localize_script( 'mashsb-rwmb-file-input', 'rwmbFileInput', array(
18
- 'frameTitle' => __( 'Select File', 'meta-box' ),
19
- ) );
20
- }
21
-
22
- /**
23
- * Get field HTML
24
- *
25
- * @param mixed $meta
26
- * @param array $field
27
- *
28
- * @return string
29
- */
30
- static function html( $meta, $field )
31
- {
32
- return sprintf(
33
- '<input type="text" class="mashsb-rwmb-file-input" name="%s" id="%s" value="%s" placeholder="%s" size="%s">
34
- <a href="#" class="mashsb-rwmb-file-input-select button-primary">%s</a>
35
- <a href="#" class="mashsb-rwmb-file-input-remove button %s">%s</a>',
36
- $field['field_name'],
37
- $field['id'],
38
- $meta,
39
- $field['placeholder'],
40
- $field['size'],
41
- __( 'Select', 'meta-box' ),
42
- $meta ? '' : 'hidden',
43
- __( 'Remove', 'meta-box' )
44
- );
45
- }
46
-
47
- /**
48
- * Normalize parameters for field
49
- *
50
- * @param array $field
51
- *
52
- * @return array
53
- */
54
- static function normalize( $field )
55
- {
56
- $field = parent::normalize( $field );
57
- $field = wp_parse_args( $field, array(
58
- 'size' => 30,
59
- 'placeholder' => '',
60
- ) );
61
-
62
- return $field;
63
- }
64
- }
1
+ <?php
2
+ /**
3
+ * File input field class which uses an input for file URL.
4
+ */
5
+ class MASHSB_RWMB_File_Input_Field extends MASHSB_RWMB_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ *
10
+ * @return void
11
+ */
12
+ static function admin_enqueue_scripts()
13
+ {
14
+ // Make sure scripts for new media uploader in WordPress 3.5 is enqueued
15
+ wp_enqueue_media();
16
+ wp_enqueue_script( 'mashsb-rwmb-file-input', MASHSB_RWMB_JS_URL . 'file-input.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
17
+ wp_localize_script( 'mashsb-rwmb-file-input', 'rwmbFileInput', array(
18
+ 'frameTitle' => __( 'Select File', 'meta-box' ),
19
+ ) );
20
+ }
21
+
22
+ /**
23
+ * Get field HTML
24
+ *
25
+ * @param mixed $meta
26
+ * @param array $field
27
+ *
28
+ * @return string
29
+ */
30
+ static function html( $meta, $field )
31
+ {
32
+ return sprintf(
33
+ '<input type="text" class="mashsb-rwmb-file-input" name="%s" id="%s" value="%s" placeholder="%s" size="%s">
34
+ <a href="#" class="mashsb-rwmb-file-input-select button-primary">%s</a>
35
+ <a href="#" class="mashsb-rwmb-file-input-remove button %s">%s</a>',
36
+ $field['field_name'],
37
+ $field['id'],
38
+ $meta,
39
+ $field['placeholder'],
40
+ $field['size'],
41
+ __( 'Select', 'meta-box' ),
42
+ $meta ? '' : 'hidden',
43
+ __( 'Remove', 'meta-box' )
44
+ );
45
+ }
46
+
47
+ /**
48
+ * Normalize parameters for field
49
+ *
50
+ * @param array $field
51
+ *
52
+ * @return array
53
+ */
54
+ static function normalize( $field )
55
+ {
56
+ $field = parent::normalize( $field );
57
+ $field = wp_parse_args( $field, array(
58
+ 'size' => 30,
59
+ 'placeholder' => '',
60
+ ) );
61
+
62
+ return $field;
63
+ }
64
+ }
includes/admin/meta-box/inc/fields/file-upload.php CHANGED
@@ -1,39 +1,39 @@
1
- <?php
2
- /**
3
- * File advanced field class which users WordPress media popup to upload and select files.
4
- */
5
- class MASHSB_RWMB_File_Upload_Field extends MASHSB_RWMB_File_Advanced_Field
6
- {
7
- /**
8
- * Add actions
9
- *
10
- * @return void
11
- */
12
- static function add_actions()
13
- {
14
- parent::add_actions();
15
- // Print attachment templates
16
- add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
17
- }
18
-
19
- /**
20
- * Enqueue scripts and styles
21
- *
22
- * @return void
23
- */
24
- static function admin_enqueue_scripts()
25
- {
26
- parent::admin_enqueue_scripts();
27
- wp_enqueue_style( 'mashsb-rwmb-upload', MASHSB_RWMB_CSS_URL . 'upload.css', array( 'mashsb-rwmb-media' ), MASHSB_RWMB_VER );
28
- wp_enqueue_script( 'mashsb-rwmb-file-upload', MASHSB_RWMB_JS_URL . 'file-upload.js', array( 'mashsb-rwmb-media' ), MASHSB_RWMB_VER, true );
29
- }
30
-
31
- /**
32
- * Template for media item
33
- * @return void
34
- */
35
- static function print_templates()
36
- {
37
- require_once( MASHSB_RWMB_INC_DIR . 'templates/upload.php' );
38
- }
39
- }
1
+ <?php
2
+ /**
3
+ * File advanced field class which users WordPress media popup to upload and select files.
4
+ */
5
+ class MASHSB_RWMB_File_Upload_Field extends MASHSB_RWMB_File_Advanced_Field
6
+ {
7
+ /**
8
+ * Add actions
9
+ *
10
+ * @return void
11
+ */
12
+ static function add_actions()
13
+ {
14
+ parent::add_actions();
15
+ // Print attachment templates
16
+ add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
17
+ }
18
+
19
+ /**
20
+ * Enqueue scripts and styles
21
+ *
22
+ * @return void
23
+ */
24
+ static function admin_enqueue_scripts()
25
+ {
26
+ parent::admin_enqueue_scripts();
27
+ wp_enqueue_style( 'mashsb-rwmb-upload', MASHSB_RWMB_CSS_URL . 'upload.css', array( 'mashsb-rwmb-media' ), MASHSB_RWMB_VER );
28
+ wp_enqueue_script( 'mashsb-rwmb-file-upload', MASHSB_RWMB_JS_URL . 'file-upload.js', array( 'mashsb-rwmb-media' ), MASHSB_RWMB_VER, true );
29
+ }
30
+
31
+ /**
32
+ * Template for media item
33
+ * @return void
34
+ */
35
+ static function print_templates()
36
+ {
37
+ require_once( MASHSB_RWMB_INC_DIR . 'templates/upload.php' );
38
+ }
39
+ }
includes/admin/meta-box/inc/fields/heading.php CHANGED
@@ -1,45 +1,45 @@
1
- <?php
2
- /**
3
- * Heading field class.
4
- */
5
- class MASHSB_RWMB_Heading_Field extends MASHSB_RWMB_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- static function admin_enqueue_scripts()
13
- {
14
- wp_enqueue_style( 'mashsb-rwmb-heading', MASHSB_RWMB_CSS_URL . 'heading.css', array(), MASHSB_RWMB_VER );
15
- }
16
-
17
- /**
18
- * Show begin HTML markup for fields
19
- *
20
- * @param mixed $meta
21
- * @param array $field
22
- *
23
- * @return string
24
- */
25
- static function begin_html( $meta, $field )
26
- {
27
- $attributes = empty( $field['id'] ) ? '' : " id='{$field['id']}'";
28
- return sprintf( '<h4%s>%s</h4>', $attributes, $field['name'] );
29
- }
30
-
31
- /**
32
- * Show end HTML markup for fields
33
- *
34
- * @param mixed $meta
35
- * @param array $field
36
- *
37
- * @return string
38
- */
39
- static function end_html( $meta, $field )
40
- {
41
- $id = $field['id'] ? " id='{$field['id']}-description'" : '';
42
-
43
- return $field['desc'] ? "<p{$id} class='description'>{$field['desc']}</p>" : '';
44
- }
45
- }
1
+ <?php
2
+ /**
3
+ * Heading field class.
4
+ */
5
+ class MASHSB_RWMB_Heading_Field extends MASHSB_RWMB_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ *
10
+ * @return void
11
+ */
12
+ static function admin_enqueue_scripts()
13
+ {
14
+ wp_enqueue_style( 'mashsb-rwmb-heading', MASHSB_RWMB_CSS_URL . 'heading.css', array(), MASHSB_RWMB_VER );
15
+ }
16
+
17
+ /**
18
+ * Show begin HTML markup for fields
19
+ *
20
+ * @param mixed $meta
21
+ * @param array $field
22
+ *
23
+ * @return string
24
+ */
25
+ static function begin_html( $meta, $field )
26
+ {
27
+ $attributes = empty( $field['id'] ) ? '' : " id='{$field['id']}'";
28
+ return sprintf( '<h4%s>%s</h4>', $attributes, $field['name'] );
29
+ }
30
+
31
+ /**
32
+ * Show end HTML markup for fields
33
+ *
34
+ * @param mixed $meta
35
+ * @param array $field
36
+ *
37
+ * @return string
38
+ */
39
+ static function end_html( $meta, $field )
40
+ {
41
+ $id = $field['id'] ? " id='{$field['id']}-description'" : '';
42
+
43
+ return $field['desc'] ? "<p{$id} class='description'>{$field['desc']}</p>" : '';
44
+ }
45
+ }
includes/admin/meta-box/inc/fields/hidden-data.php CHANGED
@@ -1,28 +1,28 @@
1
- <?php
2
-
3
- /**
4
- * Custom HTML field class.
5
- */
6
- class MASHSB_RWMB_Hidden_Data_Field extends MASHSB_RWMB_Field {
7
-
8
- /**
9
- * Get field HTML
10
- *
11
- * @param mixed $meta
12
- * @param array $field
13
- *
14
- * @return string
15
- */
16
- static function html( $meta, $field )
17
- {
18
- return sprintf(
19
- '<input type="hidden" class="rwmb-hidden" name="%s" id="%s" value="%s">',
20
- $field['field_name'],
21
- $field['id'],
22
- $field['std']
23
- );
24
- }
25
-
26
-
27
-
28
- }
1
+ <?php
2
+
3
+ /**
4
+ * Custom HTML field class.
5
+ */
6
+ class MASHSB_RWMB_Hidden_Data_Field extends MASHSB_RWMB_Field {
7
+
8
+ /**
9
+ * Get field HTML
10
+ *
11
+ * @param mixed $meta
12
+ * @param array $field
13
+ *
14
+ * @return string
15
+ */
16
+ static function html( $meta, $field )
17
+ {
18
+ return sprintf(
19
+ '<input type="hidden" class="rwmb-hidden" name="%s" id="%s" value="%s">',
20
+ $field['field_name'],
21
+ $field['id'],
22
+ $field['std']
23
+ );
24
+ }
25
+
26
+
27
+
28
+ }
includes/admin/meta-box/inc/fields/hidden.php CHANGED
@@ -1,22 +1,22 @@
1
- <?php
2
- /**
3
- * Hidden field class.
4
- */
5
- class MASHSB_RWMB_Hidden_Field extends MASHSB_RWMB_Input_Field
6
- {
7
- /**
8
- * Get the attributes for a field
9
- *
10
- * @param array $field
11
- * @param mixed $value
12
- *
13
- * @return array
14
- */
15
- static function get_attributes( $field, $value = null )
16
- {
17
- $attributes = parent::get_attributes( $field, $value );
18
- $attributes['type'] = 'hidden';
19
-
20
- return $attributes;
21
- }
22
- }
1
+ <?php
2
+ /**
3
+ * Hidden field class.
4
+ */
5
+ class MASHSB_RWMB_Hidden_Field extends MASHSB_RWMB_Input_Field
6
+ {
7
+ /**
8
+ * Get the attributes for a field
9
+ *
10
+ * @param array $field
11
+ * @param mixed $value
12
+ *
13
+ * @return array
14
+ */
15
+ static function get_attributes( $field, $value = null )
16
+ {
17
+ $attributes = parent::get_attributes( $field, $value );
18
+ $attributes['type'] = 'hidden';
19
+
20
+ return $attributes;
21
+ }
22
+ }
includes/admin/meta-box/inc/fields/image-advanced.php CHANGED
@@ -1,90 +1,90 @@
1
- <?php
2
- /**
3
- * Image advanced field class which users WordPress media popup to upload and select images.
4
- */
5
- class MASHSB_RWMB_Image_Advanced_Field extends MASHSB_RWMB_Media_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- static function admin_enqueue_scripts()
13
- {
14
- parent::admin_enqueue_scripts();
15
- wp_enqueue_style( 'mashsb-rwmb-image-advanced', MASHSB_RWMB_CSS_URL . 'image-advanced.css', array( 'mashsb-rwmb-media' ), MASHSB_RWMB_VER );
16
- wp_enqueue_script( 'mashsb-rwmb-image-advanced', MASHSB_RWMB_JS_URL . 'image-advanced.js', array( 'mashsb-rwmb-media' ), MASHSB_RWMB_VER, true );
17
- }
18
-
19
- /**
20
- * Add actions
21
- *
22
- * @return void
23
- */
24
- static function add_actions()
25
- {
26
- parent::add_actions();
27
- // Print attachment templates
28
- add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
29
- }
30
-
31
- /**
32
- * Normalize parameters for field
33
- *
34
- * @param array $field
35
- *
36
- * @return array
37
- */
38
- static function normalize( $field )
39
- {
40
- $field = parent::normalize( $field );
41
- $field['mime_type'] = 'image';
42
-
43
- return $field;
44
- }
45
-
46
- /**
47
- * Get the field value.
48
- * @param array $field
49
- * @param array $args
50
- * @param null $post_id
51
- * @return mixed
52
- */
53
- static function get_value( $field, $args = array(), $post_id = null )
54
- {
55
- return MASHSB_RWMB_Image_Field::get_value( $field, $args, $post_id );
56
- }
57
-
58
- /**
59
- * Output the field value.
60
- * @param array $field
61
- * @param array $args
62
- * @param null $post_id
63
- * @return mixed
64
- */
65
- static function the_value( $field, $args = array(), $post_id = null )
66
- {
67
- return MASHSB_RWMB_Image_Field::the_value( $field, $args, $post_id );
68
- }
69
-
70
- /**
71
- * Get uploaded file information.
72
- *
73
- * @param int $file_id Attachment image ID (post ID). Required.
74
- * @param array $args Array of arguments (for size).
75
- * @return array|bool False if file not found. Array of image info on success
76
- */
77
- static function file_info( $file_id, $args = array() )
78
- {
79
- return MASHSB_RWMB_Image_Field::file_info( $file_id, $args );
80
- }
81
-
82
- /**
83
- * Template for media item
84
- * @return void
85
- */
86
- static function print_templates()
87
- {
88
- require_once( MASHSB_RWMB_INC_DIR . 'templates/image-advanced.php' );
89
- }
90
- }
1
+ <?php
2
+ /**
3
+ * Image advanced field class which users WordPress media popup to upload and select images.
4
+ */
5
+ class MASHSB_RWMB_Image_Advanced_Field extends MASHSB_RWMB_Media_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ *
10
+ * @return void
11
+ */
12
+ static function admin_enqueue_scripts()
13
+ {
14
+ parent::admin_enqueue_scripts();
15
+ wp_enqueue_style( 'mashsb-rwmb-image-advanced', MASHSB_RWMB_CSS_URL . 'image-advanced.css', array( 'mashsb-rwmb-media' ), MASHSB_RWMB_VER );
16
+ wp_enqueue_script( 'mashsb-rwmb-image-advanced', MASHSB_RWMB_JS_URL . 'image-advanced.js', array( 'mashsb-rwmb-media' ), MASHSB_RWMB_VER, true );
17
+ }
18
+
19
+ /**
20
+ * Add actions
21
+ *
22
+ * @return void
23
+ */
24
+ static function add_actions()
25
+ {
26
+ parent::add_actions();
27
+ // Print attachment templates
28
+ add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
29
+ }
30
+
31
+ /**
32
+ * Normalize parameters for field
33
+ *
34
+ * @param array $field
35
+ *
36
+ * @return array
37
+ */
38
+ static function normalize( $field )
39
+ {
40
+ $field = parent::normalize( $field );
41
+ $field['mime_type'] = 'image';
42
+
43
+ return $field;
44
+ }
45
+
46
+ /**
47
+ * Get the field value.
48
+ * @param array $field
49
+ * @param array $args
50
+ * @param null $post_id
51
+ * @return mixed
52
+ */
53
+ static function get_value( $field, $args = array(), $post_id = null )
54
+ {
55
+ return MASHSB_RWMB_Image_Field::get_value( $field, $args, $post_id );
56
+ }
57
+
58
+ /**
59
+ * Output the field value.
60
+ * @param array $field
61
+ * @param array $args
62
+ * @param null $post_id
63
+ * @return mixed
64
+ */
65
+ static function the_value( $field, $args = array(), $post_id = null )
66
+ {
67
+ return MASHSB_RWMB_Image_Field::the_value( $field, $args, $post_id );
68
+ }
69
+
70
+ /**
71
+ * Get uploaded file information.
72
+ *
73
+ * @param int $file_id Attachment image ID (post ID). Required.
74
+ * @param array $args Array of arguments (for size).
75
+ * @return array|bool False if file not found. Array of image info on success
76
+ */
77
+ static function file_info( $file_id, $args = array() )
78
+ {
79
+ return MASHSB_RWMB_Image_Field::file_info( $file_id, $args );
80
+ }
81
+
82
+ /**
83
+ * Template for media item
84
+ * @return void
85
+ */
86
+ static function print_templates()
87
+ {
88
+ require_once( MASHSB_RWMB_INC_DIR . 'templates/image-advanced.php' );
89
+ }
90
+ }
includes/admin/meta-box/inc/fields/image-select.php CHANGED
@@ -1,116 +1,116 @@
1
- <?php
2
- /**
3
- * Image select field class which uses images as radio options.
4
- */
5
- class MASHSB_RWMB_Image_Select_Field extends MASHSB_RWMB_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- */
10
- static function admin_enqueue_scripts()
11
- {
12
- wp_enqueue_style( 'mashsb-rwmb-image-select', MASHSB_RWMB_CSS_URL . 'image-select.css', array(), MASHSB_RWMB_VER );
13
- wp_enqueue_script( 'mashsb-rwmb-image-select', MASHSB_RWMB_JS_URL . 'image-select.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
14
- }
15
-
16
- /**
17
- * Get field HTML
18
- *
19
- * @param mixed $meta
20
- * @param array $field
21
- * @return string
22
- */
23
- static function html( $meta, $field )
24
- {
25
- $html = array();
26
- $tpl = '<label class="mashsb-rwmb-image-select"><img src="%s"><input type="%s" class="hidden" name="%s" value="%s"%s></label>';
27
-
28
- $meta = (array) $meta;
29
- foreach ( $field['options'] as $value => $image )
30
- {
31
- $html[] = sprintf(
32
- $tpl,
33
- $image,
34
- $field['multiple'] ? 'checkbox' : 'radio',
35
- $field['field_name'],
36
- $value,
37
- checked( in_array( $value, $meta ), true, false )
38
- );
39
- }
40
-
41
- return implode( ' ', $html );
42
- }
43
-
44
- /**
45
- * Normalize parameters for field
46
- *
47
- * @param array $field
48
- * @return array
49
- */
50
- static function normalize( $field )
51
- {
52
- $field = parent::normalize( $field );
53
- $field['field_name'] .= $field['multiple'] ? '[]' : '';
54
-
55
- return $field;
56
- }
57
-
58
- /**
59
- * Output the field value
60
- * Display unordered list of images with option for size and link to full size
61
- *
62
- * @param array $field Field parameters
63
- * @param array $args Additional arguments. Not used for these fields.
64
- * @param int|null $post_id Post ID. null for current post. Optional.
65
- * @return mixed Field value
66
- */
67
- static function the_value( $field, $args = array(), $post_id = null )
68
- {
69
- $value = self::get_value( $field, $args, $post_id );
70
- if ( ! $value )
71
- return '';
72
-
73
- if ( $field['clone'] )
74
- {
75
- $output = '<ul>';
76
- if ( $field['multiple'] )
77
- {
78
- foreach ( $value as $subvalue )
79
- {
80
- $output .= '<li><ul>';
81
- foreach ( $subvalue as $option )
82
- {
83
- $output .= sprintf( '<li><img src="%s"></li>', esc_url( $field['options'][$option] ) );
84
- }
85
- $output .= '</ul></li>';
86
- }
87
- }
88
- else
89
- {
90
- foreach ( $value as $subvalue )
91
- {
92
- $output .= sprintf( '<li><img src="%s"></li>', esc_url( $field['options'][$subvalue] ) );
93
- }
94
- }
95
- $output .= '</ul>';
96
- }
97
- else
98
- {
99
- if ( $field['multiple'] )
100
- {
101
- $output = '<ul>';
102
- foreach ( $value as $subvalue )
103
- {
104
- $output .= sprintf( '<li><img src="%s"></li>', esc_url( $field['options'][$subvalue] ) );
105
- }
106
- $output .= '</ul>';
107
- }
108
- else
109
- {
110
- $output = sprintf( '<img src="%s">', esc_url( $field['options'][$value] ) );
111
- }
112
- }
113
-
114
- return $output;
115
- }
116
- }
1
+ <?php
2
+ /**
3
+ * Image select field class which uses images as radio options.
4
+ */
5
+ class MASHSB_RWMB_Image_Select_Field extends MASHSB_RWMB_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ */
10
+ static function admin_enqueue_scripts()
11
+ {
12
+ wp_enqueue_style( 'mashsb-rwmb-image-select', MASHSB_RWMB_CSS_URL . 'image-select.css', array(), MASHSB_RWMB_VER );
13
+ wp_enqueue_script( 'mashsb-rwmb-image-select', MASHSB_RWMB_JS_URL . 'image-select.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
14
+ }
15
+
16
+ /**
17
+ * Get field HTML
18
+ *
19
+ * @param mixed $meta
20
+ * @param array $field
21
+ * @return string
22
+ */
23
+ static function html( $meta, $field )
24
+ {
25
+ $html = array();
26
+ $tpl = '<label class="mashsb-rwmb-image-select"><img src="%s"><input type="%s" class="hidden" name="%s" value="%s"%s></label>';
27
+
28
+ $meta = (array) $meta;
29
+ foreach ( $field['options'] as $value => $image )
30
+ {
31
+ $html[] = sprintf(
32
+ $tpl,
33
+ $image,
34
+ $field['multiple'] ? 'checkbox' : 'radio',
35
+ $field['field_name'],
36
+ $value,
37
+ checked( in_array( $value, $meta ), true, false )
38
+ );
39
+ }
40
+
41
+ return implode( ' ', $html );
42
+ }
43
+
44
+ /**
45
+ * Normalize parameters for field
46
+ *
47
+ * @param array $field
48
+ * @return array
49
+ */
50
+ static function normalize( $field )
51
+ {
52
+ $field = parent::normalize( $field );
53
+ $field['field_name'] .= $field['multiple'] ? '[]' : '';
54
+
55
+ return $field;
56
+ }
57
+
58
+ /**
59
+ * Output the field value
60
+ * Display unordered list of images with option for size and link to full size
61
+ *
62
+ * @param array $field Field parameters
63
+ * @param array $args Additional arguments. Not used for these fields.
64
+ * @param int|null $post_id Post ID. null for current post. Optional.
65
+ * @return mixed Field value
66
+ */
67
+ static function the_value( $field, $args = array(), $post_id = null )
68
+ {
69
+ $value = self::get_value( $field, $args, $post_id );
70
+ if ( ! $value )
71
+ return '';
72
+
73
+ if ( $field['clone'] )
74
+ {
75
+ $output = '<ul>';
76
+ if ( $field['multiple'] )
77
+ {
78
+ foreach ( $value as $subvalue )
79
+ {
80
+ $output .= '<li><ul>';
81
+ foreach ( $subvalue as $option )
82
+ {
83
+ $output .= sprintf( '<li><img src="%s"></li>', esc_url( $field['options'][$option] ) );
84
+ }
85
+ $output .= '</ul></li>';
86
+ }
87
+ }
88
+ else
89
+ {
90
+ foreach ( $value as $subvalue )
91
+ {
92
+ $output .= sprintf( '<li><img src="%s"></li>', esc_url( $field['options'][$subvalue] ) );
93
+ }
94
+ }
95
+ $output .= '</ul>';
96
+ }
97
+ else
98
+ {
99
+ if ( $field['multiple'] )
100
+ {
101
+ $output = '<ul>';
102
+ foreach ( $value as $subvalue )
103
+ {
104
+ $output .= sprintf( '<li><img src="%s"></li>', esc_url( $field['options'][$subvalue] ) );
105
+ }
106
+ $output .= '</ul>';
107
+ }
108
+ else
109
+ {
110
+ $output = sprintf( '<img src="%s">', esc_url( $field['options'][$value] ) );
111
+ }
112
+ }
113
+
114
+ return $output;
115
+ }
116
+ }
includes/admin/meta-box/inc/fields/image-upload.php CHANGED
@@ -1,30 +1,30 @@
1
- <?php
2
- /**
3
- * File advanced field class which users WordPress media popup to upload and select files.
4
- */
5
- class MASHSB_RWMB_Image_Upload_Field extends MASHSB_RWMB_Image_Advanced_Field
6
- {
7
- /**
8
- * Add actions
9
- *
10
- * @return void
11
- */
12
- static function add_actions()
13
- {
14
- parent::add_actions();
15
- // Print attachment templates
16
- add_action( 'print_media_templates', array( 'MASHSB_RWMB_File_Upload_Field', 'print_templates' ) );
17
- }
18
-
19
- /**
20
- * Enqueue scripts and styles
21
- *
22
- * @return void
23
- */
24
- static function admin_enqueue_scripts()
25
- {
26
- parent::admin_enqueue_scripts();
27
- MASHSB_RWMB_File_Upload_Field::admin_enqueue_scripts();
28
- wp_enqueue_script( 'mashsb-rwmb-image-upload', MASHSB_RWMB_JS_URL . 'image-upload.js', array( 'mashsb-rwmb-file-upload', 'mashsb-rwmb-image-advanced' ), MASHSB_RWMB_VER, true );
29
- }
30
- }
1
+ <?php
2
+ /**
3
+ * File advanced field class which users WordPress media popup to upload and select files.
4
+ */
5
+ class MASHSB_RWMB_Image_Upload_Field extends MASHSB_RWMB_Image_Advanced_Field
6
+ {
7
+ /**
8
+ * Add actions
9
+ *
10
+ * @return void
11
+ */
12
+ static function add_actions()
13
+ {
14
+ parent::add_actions();
15
+ // Print attachment templates
16
+ add_action( 'print_media_templates', array( 'MASHSB_RWMB_File_Upload_Field', 'print_templates' ) );
17
+ }
18
+
19
+ /**
20
+ * Enqueue scripts and styles
21
+ *
22
+ * @return void
23
+ */
24
+ static function admin_enqueue_scripts()
25
+ {
26
+ parent::admin_enqueue_scripts();
27
+ MASHSB_RWMB_File_Upload_Field::admin_enqueue_scripts();
28
+ wp_enqueue_script( 'mashsb-rwmb-image-upload', MASHSB_RWMB_JS_URL . 'image-upload.js', array( 'mashsb-rwmb-file-upload', 'mashsb-rwmb-image-advanced' ), MASHSB_RWMB_VER, true );
29
+ }
30
+ }
includes/admin/meta-box/inc/fields/input-list.php CHANGED
@@ -1,91 +1,91 @@
1
- <?php
2
- /**
3
- * Input list field.
4
- */
5
- class MASHSB_RWMB_Input_List_Field extends MASHSB_RWMB_Choice_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- */
10
- public static function admin_enqueue_scripts()
11
- {
12
- wp_enqueue_style( 'mashsb-rwmb-input-list', MASHSB_RWMB_CSS_URL . 'input-list.css', array(), MASHSB_RWMB_VER );
13
- wp_enqueue_script( 'mashsb-rwmb-input-list', MASHSB_RWMB_JS_URL . 'input-list.js', array(), MASHSB_RWMB_VER, true );
14
- }
15
-
16
- /**
17
- * Walk options
18
- *
19
- * @param mixed $meta
20
- * @param array $field
21
- * @param mixed $options
22
- * @param mixed $db_fields
23
- *
24
- * @return string
25
- */
26
- public static function walk( $options, $db_fields, $meta, $field )
27
- {
28
- $walker = new MASHSB_RWMB_Input_List_Walker( $db_fields, $field, $meta );
29
- $output = sprintf( '<ul class="mashsb-rwmb-input-list %s">', $field['collapse'] ? 'collapse' : '' );
30
- $output .= $walker->walk( $options, $field['flatten'] ? - 1 : 0 );
31
- $output .= '</ul>';
32
-
33
- return $output;
34
- }
35
-
36
- /**
37
- * Normalize parameters for field
38
- *
39
- * @param array $field
40
- * @return array
41
- */
42
- public static function normalize( $field )
43
- {
44
- $field = $field['multiple'] ? MASHSB_RWMB_Multiple_Values_Field::normalize( $field ) : $field;
45
- $field = MASHSB_RWMB_Input_Field::normalize( $field );
46
- $field = parent::normalize( $field );
47
- $field = wp_parse_args( $field, array(
48
- 'collapse' => true,
49
- ) );
50
-
51
- $field['flatten'] = $field['multiple'] ? $field['flatten'] : true;
52
-
53
- return $field;
54
- }
55
-
56
- /**
57
- * Get the attributes for a field
58
- *
59
- * @param array $field
60
- * @param mixed $value
61
- *
62
- * @return array
63
- */
64
- public static function get_attributes( $field, $value = null )
65
- {
66
- $attributes = MASHSB_RWMB_Input_Field::get_attributes( $field, $value );
67
- $attributes['id'] = false;
68
- $attributes['type'] = $field['multiple'] ? 'checkbox' : 'radio';
69
- $attributes['value'] = $value;
70
-
71
- return $attributes;
72
- }
73
-
74
- /**
75
- * Output the field value
76
- * Display option name instead of option value
77
- *
78
- * @use self::meta()
79
- *
80
- * @param array $field Field parameters
81
- * @param array $args Additional arguments. Rarely used. See specific fields for details
82
- * @param int|null $post_id Post ID. null for current post. Optional.
83
- *
84
- * @return mixed Field value
85
- */
86
- public static function the_value( $field, $args = array(), $post_id = null )
87
- {
88
- $value = parent::get_value( $field, $args, $post_id );
89
- return empty( $value ) ? '' : $field['options'][$value];
90
- }
91
- }
1
+ <?php
2
+ /**
3
+ * Input list field.
4
+ */
5
+ class MASHSB_RWMB_Input_List_Field extends MASHSB_RWMB_Choice_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ */
10
+ public static function admin_enqueue_scripts()
11
+ {
12
+ wp_enqueue_style( 'mashsb-rwmb-input-list', MASHSB_RWMB_CSS_URL . 'input-list.css', array(), MASHSB_RWMB_VER );
13
+ wp_enqueue_script( 'mashsb-rwmb-input-list', MASHSB_RWMB_JS_URL . 'input-list.js', array(), MASHSB_RWMB_VER, true );
14
+ }
15
+
16
+ /**
17
+ * Walk options
18
+ *
19
+ * @param mixed $meta
20
+ * @param array $field
21
+ * @param mixed $options
22
+ * @param mixed $db_fields
23
+ *
24
+ * @return string
25
+ */
26
+ public static function walk( $options, $db_fields, $meta, $field )
27
+ {
28
+ $walker = new MASHSB_RWMB_Input_List_Walker( $db_fields, $field, $meta );
29
+ $output = sprintf( '<ul class="mashsb-rwmb-input-list %s">', $field['collapse'] ? 'collapse' : '' );
30
+ $output .= $walker->walk( $options, $field['flatten'] ? - 1 : 0 );
31
+ $output .= '</ul>';
32
+
33
+ return $output;
34
+ }
35
+
36
+ /**
37
+ * Normalize parameters for field
38
+ *
39
+ * @param array $field
40
+ * @return array
41
+ */
42
+ public static function normalize( $field )
43
+ {
44
+ $field = $field['multiple'] ? MASHSB_RWMB_Multiple_Values_Field::normalize( $field ) : $field;
45
+ $field = MASHSB_RWMB_Input_Field::normalize( $field );
46
+ $field = parent::normalize( $field );
47
+ $field = wp_parse_args( $field, array(
48
+ 'collapse' => true,
49
+ ) );
50
+
51
+ $field['flatten'] = $field['multiple'] ? $field['flatten'] : true;
52
+
53
+ return $field;
54
+ }
55
+
56
+ /**
57
+ * Get the attributes for a field
58
+ *
59
+ * @param array $field
60
+ * @param mixed $value
61
+ *
62
+ * @return array
63
+ */
64
+ public static function get_attributes( $field, $value = null )
65
+ {
66
+ $attributes = MASHSB_RWMB_Input_Field::get_attributes( $field, $value );
67
+ $attributes['id'] = false;
68
+ $attributes['type'] = $field['multiple'] ? 'checkbox' : 'radio';
69
+ $attributes['value'] = $value;
70
+
71
+ return $attributes;
72
+ }
73
+
74
+ /**
75
+ * Output the field value
76
+ * Display option name instead of option value
77
+ *
78
+ * @use self::meta()
79
+ *
80
+ * @param array $field Field parameters
81
+ * @param array $args Additional arguments. Rarely used. See specific fields for details
82
+ * @param int|null $post_id Post ID. null for current post. Optional.
83
+ *
84
+ * @return mixed Field value
85
+ */
86
+ public static function the_value( $field, $args = array(), $post_id = null )
87
+ {
88
+ $value = parent::get_value( $field, $args, $post_id );
89
+ return empty( $value ) ? '' : $field['options'][$value];
90
+ }
91
+ }
includes/admin/meta-box/inc/fields/input.php CHANGED
@@ -1,83 +1,83 @@
1
- <?php
2
- /**
3
- * Abstract input field class which is used for all <input> fields.
4
- */
5
- abstract class MASHSB_RWMB_Input_Field extends MASHSB_RWMB_Field
6
- {
7
- /**
8
- * Get field HTML
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- * @return string
13
- */
14
- static function html( $meta, $field )
15
- {
16
- $attributes = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_attributes' ), $field, $meta );
17
- return sprintf( '<input %s>%s', self::render_attributes( $attributes ), self::datalist_html( $field ) );
18
- }
19
-
20
- /**
21
- * Normalize parameters for field
22
- *
23
- * @param array $field
24
- * @return array
25
- */
26
- static function normalize( $field )
27
- {
28
- $field = parent::normalize( $field );
29
- $field = wp_parse_args( $field, array(
30
- 'datalist' => false,
31
- 'readonly' => false,
32
- ) );
33
- if ( $field['datalist'] )
34
- {
35
- $field['datalist'] = wp_parse_args( $field['datalist'], array(
36
- 'id' => $field['id'] . '_list',
37
- 'options' => array(),
38
- ) );
39
- }
40
- return $field;
41
- }
42
-
43
- /**
44
- * Get the attributes for a field
45
- *
46
- * @param array $field
47
- * @param mixed $value
48
- * @return array
49
- */
50
- static function get_attributes( $field, $value = null )
51
- {
52
- $attributes = parent::get_attributes( $field, $value );
53
- $attributes = wp_parse_args( $attributes, array(
54
- 'list' => $field['datalist'] ? $field['datalist']['id'] : false,
55
- 'readonly' => $field['readonly'],
56
- 'value' => $value,
57
- 'placeholder' => $field['placeholder'],
58
- ) );
59
-
60
- return $attributes;
61
- }
62
-
63
- /**
64
- * Create datalist, if any
65
- *
66
- * @param array $field
67
- * @return array
68
- */
69
- static function datalist_html( $field )
70
- {
71
- if ( empty( $field['datalist'] ) )
72
- return '';
73
-
74
- $datalist = $field['datalist'];
75
- $html = sprintf( '<datalist id="%s">', $datalist['id'] );
76
- foreach ( $datalist['options'] as $option )
77
- {
78
- $html .= sprintf( '<option value="%s"></option>', $option );
79
- }
80
- $html .= '</datalist>';
81
- return $html;
82
- }
83
- }
1
+ <?php
2
+ /**
3
+ * Abstract input field class which is used for all <input> fields.
4
+ */
5
+ abstract class MASHSB_RWMB_Input_Field extends MASHSB_RWMB_Field
6
+ {
7
+ /**
8
+ * Get field HTML
9
+ *
10
+ * @param mixed $meta
11
+ * @param array $field
12
+ * @return string
13
+ */
14
+ static function html( $meta, $field )
15
+ {
16
+ $attributes = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_attributes' ), $field, $meta );
17
+ return sprintf( '<input %s>%s', self::render_attributes( $attributes ), self::datalist_html( $field ) );
18
+ }
19
+
20
+ /**
21
+ * Normalize parameters for field
22
+ *
23
+ * @param array $field
24
+ * @return array
25
+ */
26
+ static function normalize( $field )
27
+ {
28
+ $field = parent::normalize( $field );
29
+ $field = wp_parse_args( $field, array(
30
+ 'datalist' => false,
31
+ 'readonly' => false,
32
+ ) );
33
+ if ( $field['datalist'] )
34
+ {
35
+ $field['datalist'] = wp_parse_args( $field['datalist'], array(
36
+ 'id' => $field['id'] . '_list',
37
+ 'options' => array(),
38
+ ) );
39
+ }
40
+ return $field;
41
+ }
42
+
43
+ /**
44
+ * Get the attributes for a field
45
+ *
46
+ * @param array $field
47
+ * @param mixed $value
48
+ * @return array
49
+ */
50
+ static function get_attributes( $field, $value = null )
51
+ {
52
+ $attributes = parent::get_attributes( $field, $value );
53
+ $attributes = wp_parse_args( $attributes, array(
54
+ 'list' => $field['datalist'] ? $field['datalist']['id'] : false,
55
+ 'readonly' => $field['readonly'],
56
+ 'value' => $value,
57
+ 'placeholder' => $field['placeholder'],
58
+ ) );
59
+
60
+ return $attributes;
61
+ }
62
+
63
+ /**
64
+ * Create datalist, if any
65
+ *
66
+ * @param array $field
67
+ * @return array
68
+ */
69
+ static function datalist_html( $field )
70
+ {
71
+ if ( empty( $field['datalist'] ) )
72
+ return '';
73
+
74
+ $datalist = $field['datalist'];
75
+ $html = sprintf( '<datalist id="%s">', $datalist['id'] );
76
+ foreach ( $datalist['options'] as $option )
77
+ {
78
+ $html .= sprintf( '<option value="%s"></option>', $option );
79
+ }
80
+ $html .= '</datalist>';
81
+ return $html;
82
+ }
83
+ }
includes/admin/meta-box/inc/fields/key-value.php CHANGED
@@ -1,149 +1,149 @@
1
- <?php
2
- /**
3
- * Key-value field class.
4
- */
5
- abstract class MASHSB_RWMB_Key_Value_Field extends MASHSB_RWMB_Text_Field
6
- {
7
- /**
8
- * Get field HTML
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- * @return string
13
- */
14
- static function html( $meta, $field )
15
- {
16
- // Key
17
- $key = isset( $meta[0] ) ? $meta[0] : '';
18
- $attributes = self::get_attributes( $field, $key );
19
- $attributes['placeholder'] = esc_attr__( 'Key', 'meta-box' );
20
- $html = sprintf( '<input %s>', self::render_attributes( $attributes ) );
21
-
22
- // Value
23
- $val = isset( $meta[1] ) ? $meta[1] : '';
24
- $attributes = self::get_attributes( $field, $val );
25
- $attributes['placeholder'] = esc_attr__( 'Value', 'meta-box' );
26
- $html .= sprintf( '<input %s>', self::render_attributes( $attributes ) );
27
-
28
- return $html;
29
- }
30
-
31
- /**
32
- * Show begin HTML markup for fields
33
- *
34
- * @param mixed $meta
35
- * @param array $field
36
- * @return string
37
- */
38
- static function begin_html( $meta, $field )
39
- {
40
- $desc = $field['desc'] ? "<p id='{$field['id']}_description' class='description'>{$field['desc']}</p>" : '';
41
-
42
- if ( empty( $field['name'] ) )
43
- return '<div class="mashsb-rwmb-input">' . $desc;
44
-
45
- return sprintf(
46
- '<div class="mashsb-rwmb-label">
47
- <label for="%s">%s</label>
48
- </div>
49
- <div class="mashsb-rwmb-input">
50
- %s',
51
- $field['id'],
52
- $field['name'],
53
- $desc
54
- );
55
- }
56
-
57
- /**
58
- * Show end HTML markup for fields
59
- * Do not show field description. Field description is shown before list of fields
60
- *
61
- * @param mixed $meta
62
- * @param array $field
63
- * @return string
64
- */
65
- static function end_html( $meta, $field )
66
- {
67
- $button = $field['clone'] ? self::add_clone_button( $field ) : '';
68
- $html = "$button</div>";
69
- return $html;
70
- }
71
-
72
- /**
73
- * Escape meta for field output
74
- *
75
- * @param mixed $meta
76
- * @return mixed
77
- */
78
- static function esc_meta( $meta )
79
- {
80
- foreach ( (array) $meta as $k => $pairs )
81
- {
82
- $meta[$k] = array_map( 'esc_attr', (array) $pairs );
83
- }
84
- return $meta;
85
- }
86
-
87
- /**
88
- * Sanitize field value.
89
- *
90
- * @param mixed $new
91
- * @param mixed $old
92
- * @param int $post_id
93
- * @param array $field
94
- *
95
- * @return string
96
- */
97
- static function value( $new, $old, $post_id, $field )
98
- {
99
- foreach ( $new as &$arr )
100
- {
101
- if ( empty( $arr[0] ) && empty( $arr[1] ) )
102
- $arr = false;
103
- }
104
- $new = array_filter( $new );
105
- return $new;
106
- }
107
-
108
- /**
109
- * Normalize parameters for field
110
- *
111
- * @param array $field
112
- * @return array
113
- */
114
- static function normalize( $field )
115
- {
116
- $field = parent::normalize( $field );
117
- $field['clone'] = true;
118
- $field['multiple'] = true;
119
- return $field;
120
- }
121
-
122
- /**
123
- * Output the field value
124
- * Display unordered list of key - value pairs
125
- *
126
- * @use self::get_value()
127
- * @see rwmb_the_value()
128
- *
129
- * @param array $field Field parameters
130
- * @param array $args Additional arguments. Rarely used. See specific fields for details
131
- * @param int|null $post_id Post ID. null for current post. Optional.
132
- *
133
- * @return string HTML output of the field
134
- */
135
- static function the_value( $field, $args = array(), $post_id = null )
136
- {
137
- $value = self::get_value( $field, $args, $post_id );
138
- if ( ! is_array( $value ) )
139
- return '';
140
-
141
- $output = '<ul>';
142
- foreach ( $value as $subvalue )
143
- {
144
- $output .= sprintf( '<li><label>%s</label>: %s</li>', $subvalue[0], $subvalue[1] );
145
- }
146
- $output .= '</ul>';
147
- return $output;
148
- }
149
- }
1
+ <?php
2
+ /**
3
+ * Key-value field class.
4
+ */
5
+ abstract class MASHSB_RWMB_Key_Value_Field extends MASHSB_RWMB_Text_Field
6
+ {
7
+ /**
8
+ * Get field HTML
9
+ *
10
+ * @param mixed $meta
11
+ * @param array $field
12
+ * @return string
13
+ */
14
+ static function html( $meta, $field )
15
+ {
16
+ // Key
17
+ $key = isset( $meta[0] ) ? $meta[0] : '';
18
+ $attributes = self::get_attributes( $field, $key );
19
+ $attributes['placeholder'] = esc_attr__( 'Key', 'meta-box' );
20
+ $html = sprintf( '<input %s>', self::render_attributes( $attributes ) );
21
+
22
+ // Value
23
+ $val = isset( $meta[1] ) ? $meta[1] : '';
24
+ $attributes = self::get_attributes( $field, $val );
25
+ $attributes['placeholder'] = esc_attr__( 'Value', 'meta-box' );
26
+ $html .= sprintf( '<input %s>', self::render_attributes( $attributes ) );
27
+
28
+ return $html;
29
+ }
30
+
31
+ /**
32
+ * Show begin HTML markup for fields
33
+ *
34
+ * @param mixed $meta
35
+ * @param array $field
36
+ * @return string
37
+ */
38
+ static function begin_html( $meta, $field )
39
+ {
40
+ $desc = $field['desc'] ? "<p id='{$field['id']}_description' class='description'>{$field['desc']}</p>" : '';
41
+
42
+ if ( empty( $field['name'] ) )
43
+ return '<div class="mashsb-rwmb-input">' . $desc;
44
+
45
+ return sprintf(
46
+ '<div class="mashsb-rwmb-label">
47
+ <label for="%s">%s</label>
48
+ </div>
49
+ <div class="mashsb-rwmb-input">
50
+ %s',
51
+ $field['id'],
52
+ $field['name'],
53
+ $desc
54
+ );
55
+ }
56
+
57
+ /**
58
+ * Show end HTML markup for fields
59
+ * Do not show field description. Field description is shown before list of fields
60
+ *
61
+ * @param mixed $meta
62
+ * @param array $field
63
+ * @return string
64
+ */
65
+ static function end_html( $meta, $field )
66
+ {
67
+ $button = $field['clone'] ? self::add_clone_button( $field ) : '';
68
+ $html = "$button</div>";
69
+ return $html;
70
+ }
71
+
72
+ /**
73
+ * Escape meta for field output
74
+ *
75
+ * @param mixed $meta
76
+ * @return mixed
77
+ */
78
+ static function esc_meta( $meta )
79
+ {
80
+ foreach ( (array) $meta as $k => $pairs )
81
+ {
82
+ $meta[$k] = array_map( 'esc_attr', (array) $pairs );
83
+ }
84
+ return $meta;
85
+ }
86
+
87
+ /**
88
+ * Sanitize field value.
89
+ *
90
+ * @param mixed $new
91
+ * @param mixed $old
92
+ * @param int $post_id
93
+ * @param array $field
94
+ *
95
+ * @return string
96
+ */
97
+ static function value( $new, $old, $post_id, $field )
98
+ {
99
+ foreach ( $new as &$arr )
100
+ {
101
+ if ( empty( $arr[0] ) && empty( $arr[1] ) )
102
+ $arr = false;
103
+ }
104
+ $new = array_filter( $new );
105
+ return $new;
106
+ }
107
+
108
+ /**
109
+ * Normalize parameters for field
110
+ *
111
+ * @param array $field
112
+ * @return array
113
+ */
114
+ static function normalize( $field )
115
+ {
116
+ $field = parent::normalize( $field );
117
+ $field['clone'] = true;
118
+ $field['multiple'] = true;
119
+ return $field;
120
+ }
121
+
122
+ /**
123
+ * Output the field value
124
+ * Display unordered list of key - value pairs
125
+ *
126
+ * @use self::get_value()
127
+ * @see rwmb_the_value()
128
+ *
129
+ * @param array $field Field parameters
130
+ * @param array $args Additional arguments. Rarely used. See specific fields for details
131
+ * @param int|null $post_id Post ID. null for current post. Optional.
132
+ *
133
+ * @return string HTML output of the field
134
+ */
135
+ static function the_value( $field, $args = array(), $post_id = null )
136
+ {
137
+ $value = self::get_value( $field, $args, $post_id );
138
+ if ( ! is_array( $value ) )
139
+ return '';
140
+
141
+ $output = '<ul>';
142
+ foreach ( $value as $subvalue )
143
+ {
144
+ $output .= sprintf( '<li><label>%s</label>: %s</li>', $subvalue[0], $subvalue[1] );
145
+ }
146
+ $output .= '</ul>';
147
+ return $output;
148
+ }
149
+ }
includes/admin/meta-box/inc/fields/map.php CHANGED
@@ -1,162 +1,162 @@
1
- <?php
2
- /**
3
- * Map field class.
4
- */
5
- class MASHSB_RWMB_Map_Field extends MASHSB_RWMB_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- static function admin_enqueue_scripts()
13
- {
14
- /**
15
- * Allows developers load more libraries via a filter.
16
- * @link https://developers.google.com/maps/documentation/javascript/libraries
17
- */
18
- $google_maps_url = apply_filters( 'rwmb_google_maps_url', 'https://maps.google.com/maps/api/js?sensor=false' );
19
- wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), '', true );
20
- wp_enqueue_style( 'mashsb-rwmb-map', MASHSB_RWMB_CSS_URL . 'map.css' );
21
- wp_enqueue_script( 'mashsb-rwmb-map', MASHSB_RWMB_JS_URL . 'map.js', array( 'jquery-ui-autocomplete', 'google-maps' ), MASHSB_RWMB_VER, true );
22
- }
23
-
24
- /**
25
- * Get field HTML
26
- *
27
- * @param mixed $meta
28
- * @param array $field
29
- *
30
- * @return string
31
- */
32
- static function html( $meta, $field )
33
- {
34
- $html = '<div class="mashsb-rwmb-map-field">';
35
-
36
- $html .= sprintf(
37
- '<div class="mashsb-rwmb-map-canvas" data-default-loc="%s"></div>
38
- <input type="hidden" name="%s" class="mashsb-rwmb-map-coordinate" value="%s">',
39
- esc_attr( $field['std'] ),
40
- esc_attr( $field['field_name'] ),
41
- esc_attr( $meta )
42
- );
43
-
44
- if ( $address = $field['address_field'] )
45
- {
46
- $html .= sprintf(
47
- '<button class="button mashsb-rwmb-map-goto-address-button" value="%s">%s</button>',
48
- is_array( $address ) ? implode( ',', $address ) : $address,
49
- __( 'Find Address', 'meta-box' )
50
- );
51
- }
52
-
53
- $html .= '</div>';
54
-
55
- return $html;
56
- }
57
-
58
- /**
59
- * Normalize parameters for field
60
- *
61
- * @param array $field
62
- *
63
- * @return array
64
- */
65
- static function normalize( $field )
66
- {
67
- $field = parent::normalize( $field );
68
- $field = wp_parse_args( $field, array(
69
- 'std' => '',
70
- 'address_field' => '',
71
- ) );
72
-
73
- return $field;
74
- }
75
-
76
- /**
77
- * Get the field value
78
- * The difference between this function and 'meta' function is 'meta' function always returns the escaped value
79
- * of the field saved in the database, while this function returns more meaningful value of the field
80
- *
81
- * @param array $field Field parameters
82
- * @param array $args Not used for this field
83
- * @param int|null $post_id Post ID. null for current post. Optional.
84
- *
85
- * @return mixed Array(latitude, longitude, zoom)
86
- */
87
- static function get_value( $field, $args = array(), $post_id = null )
88
- {
89
- $value = parent::get_value( $field, $args, $post_id );
90
- list( $latitude, $longitude, $zoom ) = explode( ',', $value . ',,' );
91
- return compact( 'latitude', 'longitude', 'zoom' );
92
- }
93
-
94
- /**
95
- * Output the field value
96
- * Display Google maps
97
- *
98
- * @param array $field Field parameters
99
- * @param array $args Additional arguments. Not used for these fields.
100
- * @param int|null $post_id Post ID. null for current post. Optional.
101
- *
102
- * @return mixed Field value
103
- */
104
- static function the_value( $field, $args = array(), $post_id = null )
105
- {
106
- $value = self::get_value( $field, $args, $post_id );
107
- if ( ! $value['latitude'] || ! $value['longitude'] )
108
- {
109
- return '';
110
- }
111
- if ( ! $value['zoom'] )
112
- {
113
- $value['zoom'] = 14;
114
- }
115
-
116
- /**
117
- * Enqueue scripts
118
- * Note: We still can enqueue script which outputs in the footer
119
- */
120
- /**
121
- * Allows developers load more libraries via a filter.
122
- * @link https://developers.google.com/maps/documentation/javascript/libraries
123
- */
124
- $google_maps_url = apply_filters( 'rwmb_google_maps_url', 'https://maps.google.com/maps/api/js?sensor=false' );
125
- wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), '', true );
126
- wp_enqueue_script( 'mashsb-rwmb-map-frontend', MASHSB_RWMB_JS_URL . 'map-frontend.js', array( 'google-maps' ), '', true );
127
-
128
- // Map parameters
129
- $args = wp_parse_args( $args, array(
130
- 'latitude' => $value['latitude'],
131
- 'longitude' => $value['longitude'],
132
- 'width' => '100%',
133
- 'height' => '480px',
134
- 'marker' => true, // Display marker?
135
- 'marker_title' => '', // Marker title, when hover
136
- 'info_window' => '', // Content of info window (when click on marker). HTML allowed
137
- 'js_options' => array(),
138
- ) );
139
-
140
- /**
141
- * Google Maps options
142
- * Option name is the same as specified in Google Maps documentation
143
- * This array will be convert to Javascript Object and pass as map options
144
- * @link https://developers.google.com/maps/documentation/javascript/reference
145
- */
146
- $args['js_options'] = wp_parse_args( $args['js_options'], array(
147
- // Default to 'zoom' level set in admin, but can be overwritten
148
- 'zoom' => $value['zoom'],
149
-
150
- // Map type, see https://developers.google.com/maps/documentation/javascript/reference#MapTypeId
151
- 'mapTypeId' => 'ROADMAP',
152
- ) );
153
-
154
- $output = sprintf(
155
- '<div class="mashsb-rwmb-map-canvas" data-map_options="%s" style="width:%s;height:%s"></div>',
156
- esc_attr( wp_json_encode( $args ) ),
157
- esc_attr( $args['width'] ),
158
- esc_attr( $args['height'] )
159
- );
160
- return $output;
161
- }
162
- }
1
+ <?php
2
+ /**
3
+ * Map field class.
4
+ */
5
+ class MASHSB_RWMB_Map_Field extends MASHSB_RWMB_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ *
10
+ * @return void
11
+ */
12
+ static function admin_enqueue_scripts()
13
+ {
14
+ /**
15
+ * Allows developers load more libraries via a filter.
16
+ * @link https://developers.google.com/maps/documentation/javascript/libraries
17
+ */
18
+ $google_maps_url = apply_filters( 'rwmb_google_maps_url', 'https://maps.google.com/maps/api/js?sensor=false' );
19
+ wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), '', true );
20
+ wp_enqueue_style( 'mashsb-rwmb-map', MASHSB_RWMB_CSS_URL . 'map.css' );
21
+ wp_enqueue_script( 'mashsb-rwmb-map', MASHSB_RWMB_JS_URL . 'map.js', array( 'jquery-ui-autocomplete', 'google-maps' ), MASHSB_RWMB_VER, true );
22
+ }
23
+
24
+ /**
25
+ * Get field HTML
26
+ *
27
+ * @param mixed $meta
28
+ * @param array $field
29
+ *
30
+ * @return string
31
+ */
32
+ static function html( $meta, $field )
33
+ {
34
+ $html = '<div class="mashsb-rwmb-map-field">';
35
+
36
+ $html .= sprintf(
37
+ '<div class="mashsb-rwmb-map-canvas" data-default-loc="%s"></div>
38
+ <input type="hidden" name="%s" class="mashsb-rwmb-map-coordinate" value="%s">',
39
+ esc_attr( $field['std'] ),
40
+ esc_attr( $field['field_name'] ),
41
+ esc_attr( $meta )
42
+ );
43
+
44
+ if ( $address = $field['address_field'] )
45
+ {
46
+ $html .= sprintf(
47
+ '<button class="button mashsb-rwmb-map-goto-address-button" value="%s">%s</button>',
48
+ is_array( $address ) ? implode( ',', $address ) : $address,
49
+ __( 'Find Address', 'meta-box' )
50
+ );
51
+ }
52
+
53
+ $html .= '</div>';
54
+
55
+ return $html;
56
+ }
57
+
58
+ /**
59
+ * Normalize parameters for field
60
+ *
61
+ * @param array $field
62
+ *
63
+ * @return array
64
+ */
65
+ static function normalize( $field )
66
+ {
67
+ $field = parent::normalize( $field );
68
+ $field = wp_parse_args( $field, array(
69
+ 'std' => '',
70
+ 'address_field' => '',
71
+ ) );
72
+
73
+ return $field;
74
+ }
75
+
76
+ /**
77
+ * Get the field value
78
+ * The difference between this function and 'meta' function is 'meta' function always returns the escaped value
79
+ * of the field saved in the database, while this function returns more meaningful value of the field
80
+ *
81
+ * @param array $field Field parameters
82
+ * @param array $args Not used for this field
83
+ * @param int|null $post_id Post ID. null for current post. Optional.
84
+ *
85
+ * @return mixed Array(latitude, longitude, zoom)
86
+ */
87
+ static function get_value( $field, $args = array(), $post_id = null )
88
+ {
89
+ $value = parent::get_value( $field, $args, $post_id );
90
+ list( $latitude, $longitude, $zoom ) = explode( ',', $value . ',,' );
91
+ return compact( 'latitude', 'longitude', 'zoom' );
92
+ }
93
+
94
+ /**
95
+ * Output the field value
96
+ * Display Google maps
97
+ *
98
+ * @param array $field Field parameters
99
+ * @param array $args Additional arguments. Not used for these fields.
100
+ * @param int|null $post_id Post ID. null for current post. Optional.
101
+ *
102
+ * @return mixed Field value
103
+ */
104
+ static function the_value( $field, $args = array(), $post_id = null )
105
+ {
106
+ $value = self::get_value( $field, $args, $post_id );
107
+ if ( ! $value['latitude'] || ! $value['longitude'] )
108
+ {
109
+ return '';
110
+ }
111
+ if ( ! $value['zoom'] )
112
+ {
113
+ $value['zoom'] = 14;
114
+ }
115
+
116
+ /**
117
+ * Enqueue scripts
118
+ * Note: We still can enqueue script which outputs in the footer
119
+ */
120
+ /**
121
+ * Allows developers load more libraries via a filter.
122
+ * @link https://developers.google.com/maps/documentation/javascript/libraries
123
+ */
124
+ $google_maps_url = apply_filters( 'rwmb_google_maps_url', 'https://maps.google.com/maps/api/js?sensor=false' );
125
+ wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), '', true );
126
+ wp_enqueue_script( 'mashsb-rwmb-map-frontend', MASHSB_RWMB_JS_URL . 'map-frontend.js', array( 'google-maps' ), '', true );
127
+
128
+ // Map parameters
129
+ $args = wp_parse_args( $args, array(
130
+ 'latitude' => $value['latitude'],
131
+ 'longitude' => $value['longitude'],
132
+ 'width' => '100%',
133
+ 'height' => '480px',
134
+ 'marker' => true, // Display marker?
135
+ 'marker_title' => '', // Marker title, when hover
136
+ 'info_window' => '', // Content of info window (when click on marker). HTML allowed
137
+ 'js_options' => array(),
138
+ ) );
139
+
140
+ /**
141
+ * Google Maps options
142
+ * Option name is the same as specified in Google Maps documentation
143
+ * This array will be convert to Javascript Object and pass as map options
144
+ * @link https://developers.google.com/maps/documentation/javascript/reference
145
+ */
146
+ $args['js_options'] = wp_parse_args( $args['js_options'], array(
147
+ // Default to 'zoom' level set in admin, but can be overwritten
148
+ 'zoom' => $value['zoom'],
149
+
150
+ // Map type, see https://developers.google.com/maps/documentation/javascript/reference#MapTypeId
151
+ 'mapTypeId' => 'ROADMAP',
152
+ ) );
153
+
154
+ $output = sprintf(
155
+ '<div class="mashsb-rwmb-map-canvas" data-map_options="%s" style="width:%s;height:%s"></div>',
156
+ esc_attr( wp_json_encode( $args ) ),
157
+ esc_attr( $args['width'] ),
158
+ esc_attr( $args['height'] )
159
+ );
160
+ return $output;
161
+ }
162
+ }
includes/admin/meta-box/inc/fields/media.php CHANGED
@@ -1,152 +1,152 @@
1
- <?php
2
- /**
3
- * Media field class which users WordPress media popup to upload and select files.
4
- */
5
- class MASHSB_RWMB_Media_Field extends MASHSB_RWMB_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- static function admin_enqueue_scripts()
13
- {
14
- wp_enqueue_media();
15
- wp_enqueue_style( 'mashsb-rwmb-media', MASHSB_RWMB_CSS_URL . 'media.css', array(), MASHSB_RWMB_VER );
16
- wp_enqueue_script( 'mashsb-rwmb-media', MASHSB_RWMB_JS_URL . 'media.js', array( 'jquery-ui-sortable', 'underscore', 'backbone' ), MASHSB_RWMB_VER, true );
17
- wp_localize_script( 'mashsb-rwmb-media', 'i18nRwmbMedia', array(
18
- 'add' => apply_filters( 'rwmb_media_add_string', _x( 'Add Image', 'media', 'meta-box' ) ),
19
- 'single' => apply_filters( 'rwmb_media_single_files_string', _x( ' file', 'media', 'meta-box' ) ),
20
- 'multiple' => apply_filters( 'rwmb_media_multiple_files_string', _x( ' files', 'media', 'meta-box' ) ),
21
- 'remove' => apply_filters( 'rwmb_media_remove_string', _x( 'Remove', 'media', 'meta-box' ) ),
22
- 'edit' => apply_filters( 'rwmb_media_edit_string', _x( 'Edit', 'media', 'meta-box' ) ),
23
- 'view' => apply_filters( 'rwmb_media_view_string', _x( 'View', 'media', 'meta-box' ) ),
24
- 'noTitle' => _x( 'No Title', 'media', 'meta-box' ),
25
- 'loadingUrl' => MASHSB_RWMB_URL . 'img/loader.gif',
26
- 'extensions' => self::get_mime_extensions(),
27
- 'select' => _x( 'Select Files', 'media', 'meta-box' ),
28
- 'uploadInstructions' => _x( 'Drop files here to upload', 'media', 'meta-box' )
29
- ) );
30
- }
31
-
32
- /**
33
- * Add actions
34
- *
35
- * @return void
36
- */
37
- static function add_actions()
38
- {
39
- // Print attachment templates
40
- add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
41
- }
42
-
43
- /**
44
- * Get field HTML
45
- *
46
- * @param mixed $meta
47
- * @param array $field
48
- *
49
- * @return string
50
- */
51
- static function html( $meta, $field )
52
- {
53
- $meta = (array) $meta;
54
- $meta = implode( ',', $meta );
55
- $attributes = self::get_attributes( $field, $meta );
56
-
57
- $html = sprintf(
58
- '<input %s>
59
- <div class="mashsb-rwmb-media-view" data-mime-type="%s" data-max-files="%s" data-force-delete="%s"></div>',
60
- self::render_attributes( $attributes ),
61
- $field['mime_type'],
62
- $field['max_file_uploads'],
63
- $field['force_delete'] ? 'true' : 'false'
64
- );
65
-
66
- return $html;
67
- }
68
-
69
- /**
70
- * Normalize parameters for field
71
- *
72
- * @param array $field
73
- *
74
- * @return array
75
- */
76
- static function normalize( $field )
77
- {
78
- $field = parent::normalize( $field );
79
- $field = wp_parse_args( $field, array(
80
- 'std' => array(),
81
- 'mime_type' => '',
82
- 'max_file_uploads' => 0,
83
- 'force_delete' => false,
84
- ) );
85
-
86
- $field['multiple'] = true;
87
-
88
- return $field;
89
- }
90
-
91
- /**
92
- * Get the attributes for a field
93
- *
94
- * @param array $field
95
- * @param mixed $value
96
- *
97
- * @return array
98
- */
99
- static function get_attributes( $field, $value = null )
100
- {
101
- $attributes = parent::get_attributes( $field, $value );
102
- $attributes['type'] = 'hidden';
103
- $attributes['name'] .= ! $field['clone'] && $field['multiple'] ? '[]' : '';
104
- $attributes['disabled'] = true;
105
- $attributes['id'] = false;
106
- $attributes['value'] = $value;
107
-
108
- return $attributes;
109
- }
110
-
111
- static function get_mime_extensions()
112
- {
113
- $mime_types = wp_get_mime_types();
114
- $extensions = array();
115
- foreach( $mime_types as $ext => $mime )
116
- {
117
- $ext = explode( '|', $ext );
118
- $extensions[ $mime ] = $ext;
119
-
120
- $mime_parts = explode( '/', $mime );
121
- if( empty( $extensions[ $mime_parts[0] ] ) )
122
- $extensions[ $mime_parts[0] ] = array();
123
- $extensions[ $mime_parts[0] ] = $extensions[ $mime_parts[0] . '/*' ] = array_merge( $extensions[ $mime_parts[0] ], $ext );
124
-
125
- }
126
-
127
- return $extensions;
128
- }
129
-
130
- /**
131
- * Save meta value
132
- *
133
- * @param $new
134
- * @param $old
135
- * @param $post_id
136
- * @param $field
137
- */
138
- static function save( $new, $old, $post_id, $field )
139
- {
140
- delete_post_meta( $post_id, $field['id'] );
141
- parent::save( $new, array(), $post_id, $field );
142
- }
143
-
144
- /**
145
- * Template for media item
146
- * @return void
147
- */
148
- static function print_templates()
149
- {
150
- require_once( MASHSB_RWMB_INC_DIR . 'templates/media.php' );
151
- }
152
- }
1
+ <?php
2
+ /**
3
+ * Media field class which users WordPress media popup to upload and select files.
4
+ */
5
+ class MASHSB_RWMB_Media_Field extends MASHSB_RWMB_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ *
10
+ * @return void
11
+ */
12
+ static function admin_enqueue_scripts()
13
+ {
14
+ wp_enqueue_media();
15
+ wp_enqueue_style( 'mashsb-rwmb-media', MASHSB_RWMB_CSS_URL . 'media.css', array(), MASHSB_RWMB_VER );
16
+ wp_enqueue_script( 'mashsb-rwmb-media', MASHSB_RWMB_JS_URL . 'media.js', array( 'jquery-ui-sortable', 'underscore', 'backbone' ), MASHSB_RWMB_VER, true );
17
+ wp_localize_script( 'mashsb-rwmb-media', 'i18nRwmbMedia', array(
18
+ 'add' => apply_filters( 'rwmb_media_add_string', _x( 'Add Image', 'media', 'meta-box' ) ),
19
+ 'single' => apply_filters( 'rwmb_media_single_files_string', _x( ' file', 'media', 'meta-box' ) ),
20
+ 'multiple' => apply_filters( 'rwmb_media_multiple_files_string', _x( ' files', 'media', 'meta-box' ) ),
21
+ 'remove' => apply_filters( 'rwmb_media_remove_string', _x( 'Remove', 'media', 'meta-box' ) ),
22
+ 'edit' => apply_filters( 'rwmb_media_edit_string', _x( 'Edit', 'media', 'meta-box' ) ),
23
+ 'view' => apply_filters( 'rwmb_media_view_string', _x( 'View', 'media', 'meta-box' ) ),
24
+ 'noTitle' => _x( 'No Title', 'media', 'meta-box' ),
25
+ 'loadingUrl' => MASHSB_RWMB_URL . 'img/loader.gif',
26
+ 'extensions' => self::get_mime_extensions(),
27
+ 'select' => _x( 'Select Files', 'media', 'meta-box' ),
28
+ 'uploadInstructions' => _x( 'Drop files here to upload', 'media', 'meta-box' )
29
+ ) );
30
+ }
31
+
32
+ /**
33
+ * Add actions
34
+ *
35
+ * @return void
36
+ */
37
+ static function add_actions()
38
+ {
39
+ // Print attachment templates
40
+ add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
41
+ }
42
+
43
+ /**
44
+ * Get field HTML
45
+ *
46
+ * @param mixed $meta
47
+ * @param array $field
48
+ *
49
+ * @return string
50
+ */
51
+ static function html( $meta, $field )
52
+ {
53
+ $meta = (array) $meta;
54
+ $meta = implode( ',', $meta );
55
+ $attributes = self::get_attributes( $field, $meta );
56
+
57
+ $html = sprintf(
58
+ '<input %s>
59
+ <div class="mashsb-rwmb-media-view" data-mime-type="%s" data-max-files="%s" data-force-delete="%s"></div>',
60
+ self::render_attributes( $attributes ),
61
+ $field['mime_type'],
62
+ $field['max_file_uploads'],
63
+ $field['force_delete'] ? 'true' : 'false'
64
+ );
65
+
66
+ return $html;
67
+ }
68
+
69
+ /**
70
+ * Normalize parameters for field
71
+ *
72
+ * @param array $field
73
+ *
74
+ * @return array
75
+ */
76
+ static function normalize( $field )
77
+ {
78
+ $field = parent::normalize( $field );
79
+ $field = wp_parse_args( $field, array(
80
+ 'std' => array(),
81
+ 'mime_type' => '',
82
+ 'max_file_uploads' => 0,
83
+ 'force_delete' => false,
84
+ ) );
85
+
86
+ $field['multiple'] = true;
87
+
88
+ return $field;
89
+ }
90
+
91
+ /**
92
+ * Get the attributes for a field
93
+ *
94
+ * @param array $field
95
+ * @param mixed $value
96
+ *
97
+ * @return array
98
+ */
99
+ static function get_attributes( $field, $value = null )
100
+ {
101
+ $attributes = parent::get_attributes( $field, $value );
102
+ $attributes['type'] = 'hidden';
103
+ $attributes['name'] .= ! $field['clone'] && $field['multiple'] ? '[]' : '';
104
+ $attributes['disabled'] = true;
105
+ $attributes['id'] = false;
106
+ $attributes['value'] = $value;
107
+
108
+ return $attributes;
109
+ }
110
+
111
+ static function get_mime_extensions()
112
+ {
113
+ $mime_types = wp_get_mime_types();
114
+ $extensions = array();
115
+ foreach( $mime_types as $ext => $mime )
116
+ {
117
+ $ext = explode( '|', $ext );
118
+ $extensions[ $mime ] = $ext;
119
+
120
+ $mime_parts = explode( '/', $mime );
121
+ if( empty( $extensions[ $mime_parts[0] ] ) )
122
+ $extensions[ $mime_parts[0] ] = array();
123
+ $extensions[ $mime_parts[0] ] = $extensions[ $mime_parts[0] . '/*' ] = array_merge( $extensions[ $mime_parts[0] ], $ext );
124
+
125
+ }
126
+
127
+ return $extensions;
128
+ }
129
+
130
+ /**
131
+ * Save meta value
132
+ *
133
+ * @param $new
134
+ * @param $old
135
+ * @param $post_id
136
+ * @param $field
137
+ */
138
+ static function save( $new, $old, $post_id, $field )
139
+ {
140
+ delete_post_meta( $post_id, $field['id'] );
141
+ parent::save( $new, array(), $post_id, $field );
142
+ }
143
+
144
+ /**
145
+ * Template for media item
146
+ * @return void
147
+ */
148
+ static function print_templates()
149
+ {
150
+ require_once( MASHSB_RWMB_INC_DIR . 'templates/media.php' );
151
+ }
152
+ }
includes/admin/meta-box/inc/fields/multiple-values.php CHANGED
@@ -1,73 +1,73 @@
1
- <?php
2
- /**
3
- * This class implements common methods used in fields which have multiple values
4
- * like checkbox list, autocomplete, etc.
5
- *
6
- * The difference when handling actions for these fields are the way they get/set
7
- * meta value. Briefly:
8
- * - If field is cloneable, value is saved as a single entry in the database
9
- * - Otherwise value is saved as multiple entries
10
- */
11
- abstract class MASHSB_RWMB_Multiple_Values_Field extends MASHSB_RWMB_Field
12
- {
13
- /**
14
- * Normalize parameters for field
15
- *
16
- * @param array $field
17
- *
18
- * @return array
19
- */
20
- static function normalize( $field )
21
- {
22
- $field = parent::normalize( $field );
23
- $field['multiple'] = true;
24
- $field['field_name'] = $field['id'];
25
- if ( ! $field['clone'] )
26
- $field['field_name'] .= '[]';
27
-
28
- return $field;
29
- }
30
-
31
- /**
32
- * Output the field value
33
- * Display option name instead of option value
34
- *
35
- * @param array $field Field parameters
36
- * @param array $args Additional arguments. Not used for these fields.
37
- * @param int|null $post_id Post ID. null for current post. Optional.
38
- *
39
- * @return mixed Field value
40
- */
41
- static function the_value( $field, $args = array(), $post_id = null )
42
- {
43
- $value = self::get_value( $field, $args, $post_id );
44
- if ( ! $value )
45
- return '';
46
-
47
- $output = '<ul>';
48
- if ( $field['clone'] )
49
- {
50
- foreach ( $value as $subvalue )
51
- {
52
- $output .= '<li>';
53
- $output .= '<ul>';
54
- foreach ( $subvalue as $option )
55
- {
56
- $output .= '<li>' . $field['options'][$option] . '</li>';
57
- }
58
- $output .= '</ul>';
59
- $output .= '</li>';
60
- }
61
- }
62
- else
63
- {
64
- foreach ( $value as $option )
65
- {
66
- $output .= '<li>' . $field['options'][$option] . '</li>';
67
- }
68
- }
69
- $output .= '</ul>';
70
-
71
- return $output;
72
- }
73
- }
1
+ <?php
2
+ /**
3
+ * This class implements common methods used in fields which have multiple values
4
+ * like checkbox list, autocomplete, etc.
5
+ *
6
+ * The difference when handling actions for these fields are the way they get/set
7
+ * meta value. Briefly:
8
+ * - If field is cloneable, value is saved as a single entry in the database
9
+ * - Otherwise value is saved as multiple entries
10
+ */
11
+ abstract class MASHSB_RWMB_Multiple_Values_Field extends MASHSB_RWMB_Field
12
+ {
13
+ /**
14
+ * Normalize parameters for field
15
+ *
16
+ * @param array $field
17
+ *
18
+ * @return array
19
+ */
20
+ static function normalize( $field )
21
+ {
22
+ $field = parent::normalize( $field );
23
+ $field['multiple'] = true;
24
+ $field['field_name'] = $field['id'];
25
+ if ( ! $field['clone'] )
26
+ $field['field_name'] .= '[]';
27
+
28
+ return $field;
29
+ }
30
+
31
+ /**
32
+ * Output the field value
33
+ * Display option name instead of option value
34
+ *
35
+ * @param array $field Field parameters
36
+ * @param array $args Additional arguments. Not used for these fields.
37
+ * @param int|null $post_id Post ID. null for current post. Optional.
38
+ *
39
+ * @return mixed Field value
40
+ */
41
+ static function the_value( $field, $args = array(), $post_id = null )
42
+ {
43
+ $value = self::get_value( $field, $args, $post_id );
44
+ if ( ! $value )
45
+ return '';
46
+
47
+ $output = '<ul>';
48
+ if ( $field['clone'] )
49
+ {
50
+ foreach ( $value as $subvalue )
51
+ {
52
+ $output .= '<li>';
53
+ $output .= '<ul>';
54
+ foreach ( $subvalue as $option )
55
+ {
56
+ $output .= '<li>' . $field['options'][$option] . '</li>';
57
+ }
58
+ $output .= '</ul>';
59
+ $output .= '</li>';
60
+ }
61
+ }
62
+ else
63
+ {
64
+ foreach ( $value as $option )
65
+ {
66
+ $output .= '<li>' . $field['options'][$option] . '</li>';
67
+ }
68
+ }
69
+ $output .= '</ul>';
70
+
71
+ return $output;
72
+ }
73
+ }
includes/admin/meta-box/inc/fields/number.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
- /**
3
- * Number field class.
4
- */
5
- class MASHSB_RWMB_Number_Field extends MASHSB_RWMB_Input_Field
6
- {
7
- /**
8
- * Normalize parameters for field
9
- *
10
- * @param array $field
11
- *
12
- * @return array
13
- */
14
- static function normalize( $field )
15
- {
16
- $field = parent::normalize( $field );
17
-
18
- $field = wp_parse_args( $field, array(
19
- 'step' => 1,
20
- 'min' => 0,
21
- 'max' => false,
22
- ) );
23
-
24
- return $field;
25
- }
26
-
27
- /**
28
- * Get the attributes for a field
29
- *
30
- * @param array $field
31
- * @param mixed $value
32
- *
33
- * @return array
34
- */
35
- static function get_attributes( $field, $value = null )
36
- {
37
- $attributes = parent::get_attributes( $field, $value );
38
- $attributes = wp_parse_args( $attributes, array(
39
- 'step' => $field['step'],
40
- 'max' => $field['max'],
41
- 'min' => $field['min'],
42
- ) );
43
- $attributes['type'] = 'number';
44
-
45
- return $attributes;
46
- }
47
- }
1
+ <?php
2
+ /**
3
+ * Number field class.
4
+ */
5
+ class MASHSB_RWMB_Number_Field extends MASHSB_RWMB_Input_Field
6
+ {
7
+ /**
8
+ * Normalize parameters for field
9
+ *
10
+ * @param array $field
11
+ *
12
+ * @return array
13
+ */
14
+ static function normalize( $field )
15
+ {
16
+ $field = parent::normalize( $field );
17
+
18
+ $field = wp_parse_args( $field, array(
19
+ 'step' => 1,
20
+ 'min' => 0,
21
+ 'max' => false,
22
+ ) );
23
+
24
+ return $field;
25
+ }
26
+
27
+ /**
28
+ * Get the attributes for a field
29
+ *
30
+ * @param array $field
31
+ * @param mixed $value
32
+ *
33
+ * @return array
34
+ */
35
+ static function get_attributes( $field, $value = null )
36
+ {
37
+ $attributes = parent::get_attributes( $field, $value );
38
+ $attributes = wp_parse_args( $attributes, array(
39
+ 'step' => $field['step'],
40
+ 'max' => $field['max'],
41
+ 'min' => $field['min'],
42
+ ) );
43
+ $attributes['type'] = 'number';
44
+
45
+ return $attributes;
46
+ }
47
+ }
includes/admin/meta-box/inc/fields/object-choice.php CHANGED
@@ -1,145 +1,145 @@
1
- <?php
2
- /**
3
- * Abstract field to select an object: post, user, taxonomy, etc.
4
- */
5
- abstract class MASHSB_RWMB_Object_Choice_Field extends MASHSB_RWMB_Choice_Field
6
- {
7
- /**
8
- * Get field HTML
9
- *
10
- * @param mixed $options
11
- * @param mixed $db_fields
12
- * @param mixed $meta
13
- * @param array $field
14
- * @return string
15
- */
16
- public static function walk( $options, $db_fields, $meta, $field )
17
- {
18
- switch ( $field['field_type'] )
19
- {
20
- case 'checkbox_list':
21
- case 'radio_list':
22
- return MASHSB_RWMB_Input_List_Field::walk( $options, $db_fields, $meta, $field );
23
- break;
24
- case 'select_tree':
25
- return MASHSB_RWMB_Select_Tree_Field::walk( $options, $db_fields, $meta, $field );
26
- break;
27
- case 'select_advanced':
28
- return MASHSB_RWMB_Select_Advanced_Field::walk( $options, $db_fields, $meta, $field );
29
- break;
30
- case 'select':
31
- default:
32
- return MASHSB_RWMB_Select_Field::walk( $options, $db_fields, $meta, $field );
33
- break;
34
- }
35
- }
36
-
37
- /**
38
- * Normalize parameters for field
39
- *
40
- * @param array $field
41
- *
42
- * @return array
43
- */
44
- public static function normalize( $field )
45
- {
46
- $field = parent::normalize( $field );
47
- $field = wp_parse_args( $field, array(
48
- 'flatten' => true,
49
- 'query_args' => array(),
50
- 'field_type' => 'select_advanced',
51
- ) );
52
-
53
- if ( 'checkbox_tree' === $field['field_type'] )
54
- {
55
- $field['field_type'] = 'checkbox_list';
56
- $field['flatten'] = false;
57
- }
58
-
59
- switch ( $field['field_type'] )
60
- {
61
- case 'checkbox_list':
62
- case 'radio_list':
63
- $field['multiple'] = 'radio_list' === $field['field_type'] ? false : true;
64
- return MASHSB_RWMB_Input_List_Field::normalize( $field );
65
- break;
66
- case 'select_advanced':
67
- return MASHSB_RWMB_Select_Advanced_Field::normalize( $field );
68
- break;
69
- case 'select_tree':
70
- return MASHSB_RWMB_Select_Tree_Field::normalize( $field );
71
- break;
72
- case 'select':
73
- default:
74
- return MASHSB_RWMB_Select_Field::normalize( $field );
75
- break;
76
- }
77
- }
78
-
79
- /**
80
- * Get the attributes for a field
81
- *
82
- * @param array $field
83
- * @param mixed $value
84
- *
85
- * @return array
86
- */
87
- public static function get_attributes( $field, $value = null )
88
- {
89
- switch ( $field['field_type'] )
90
- {
91
- case 'checkbox_list':
92
- case 'radio_list':
93
- return MASHSB_RWMB_Input_List_Field::get_attributes( $field, $value );
94
- break;
95
- case 'select_advanced':
96
- $attributes = MASHSB_RWMB_Select_Advanced_Field::get_attributes( $field, $value );
97
- $attributes['class'] .= ' mashsb-rwmb-select_advanced';
98
- return $attributes;
99
- break;
100
- case 'select_tree':
101
- return MASHSB_RWMB_Select_Tree_Field::get_attributes( $field, $value );
102
- break;
103
- case 'select':
104
- default:
105
- return MASHSB_RWMB_Select_Field::get_attributes( $field, $value );
106
- break;
107
- }
108
- }
109
-
110
- /**
111
- * Get field names of object to be used by walker
112
- * @return array
113
- */
114
- public static function get_db_fields()
115
- {
116
- return array(
117
- 'parent' => '',
118
- 'id' => '',
119
- 'label' => '',
120
- );
121
- }
122
-
123
- /**
124
- * Enqueue scripts and styles
125
- */
126
- public static function admin_enqueue_scripts()
127
- {
128
- MASHSB_RWMB_Input_List_Field::admin_enqueue_scripts();
129
- MASHSB_RWMB_Select_Field::admin_enqueue_scripts();
130
- MASHSB_RWMB_Select_Tree_Field::admin_enqueue_scripts();
131
- MASHSB_RWMB_Select_Advanced_Field::admin_enqueue_scripts();
132
- }
133
-
134
- /**
135
- * Get options for walker
136
- *
137
- * @param array $field
138
- *
139
- * @return array
140
- */
141
- public static function get_options( $field )
142
- {
143
- return array();
144
- }
145
- }
1
+ <?php
2
+ /**
3
+ * Abstract field to select an object: post, user, taxonomy, etc.
4
+ */
5
+ abstract class MASHSB_RWMB_Object_Choice_Field extends MASHSB_RWMB_Choice_Field
6
+ {
7
+ /**
8
+ * Get field HTML
9
+ *
10
+ * @param mixed $options
11
+ * @param mixed $db_fields
12
+ * @param mixed $meta
13
+ * @param array $field
14
+ * @return string
15
+ */
16
+ public static function walk( $options, $db_fields, $meta, $field )
17
+ {
18
+ switch ( $field['field_type'] )
19
+ {
20
+ case 'checkbox_list':
21
+ case 'radio_list':
22
+ return MASHSB_RWMB_Input_List_Field::walk( $options, $db_fields, $meta, $field );
23
+ break;
24
+ case 'select_tree':
25
+ return MASHSB_RWMB_Select_Tree_Field::walk( $options, $db_fields, $meta, $field );
26
+ break;
27
+ case 'select_advanced':
28
+ return MASHSB_RWMB_Select_Advanced_Field::walk( $options, $db_fields, $meta, $field );
29
+ break;
30
+ case 'select':
31
+ default:
32
+ return MASHSB_RWMB_Select_Field::walk( $options, $db_fields, $meta, $field );
33
+ break;
34
+ }
35
+ }
36
+
37
+ /**
38
+ * Normalize parameters for field
39
+ *
40
+ * @param array $field
41
+ *
42
+ * @return array
43
+ */
44
+ public static function normalize( $field )
45
+ {
46
+ $field = parent::normalize( $field );
47
+ $field = wp_parse_args( $field, array(
48
+ 'flatten' => true,
49
+ 'query_args' => array(),
50
+ 'field_type' => 'select_advanced',
51
+ ) );
52
+
53
+ if ( 'checkbox_tree' === $field['field_type'] )
54
+ {
55
+ $field['field_type'] = 'checkbox_list';
56
+ $field['flatten'] = false;
57
+ }
58
+
59
+ switch ( $field['field_type'] )
60
+ {
61
+ case 'checkbox_list':
62
+ case 'radio_list':
63
+ $field['multiple'] = 'radio_list' === $field['field_type'] ? false : true;
64
+ return MASHSB_RWMB_Input_List_Field::normalize( $field );
65
+ break;
66
+ case 'select_advanced':
67
+ return MASHSB_RWMB_Select_Advanced_Field::normalize( $field );
68
+ break;
69
+ case 'select_tree':
70
+ return MASHSB_RWMB_Select_Tree_Field::normalize( $field );
71
+ break;
72
+ case 'select':
73
+ default:
74
+ return MASHSB_RWMB_Select_Field::normalize( $field );
75
+ break;
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Get the attributes for a field
81
+ *
82
+ * @param array $field
83
+ * @param mixed $value
84
+ *
85
+ * @return array
86
+ */
87
+ public static function get_attributes( $field, $value = null )
88
+ {
89
+ switch ( $field['field_type'] )
90
+ {
91
+ case 'checkbox_list':
92
+ case 'radio_list':
93
+ return MASHSB_RWMB_Input_List_Field::get_attributes( $field, $value );
94
+ break;
95
+ case 'select_advanced':
96
+ $attributes = MASHSB_RWMB_Select_Advanced_Field::get_attributes( $field, $value );
97
+ $attributes['class'] .= ' mashsb-rwmb-select_advanced';
98
+ return $attributes;
99
+ break;
100
+ case 'select_tree':
101
+ return MASHSB_RWMB_Select_Tree_Field::get_attributes( $field, $value );
102
+ break;
103
+ case 'select':
104
+ default:
105
+ return MASHSB_RWMB_Select_Field::get_attributes( $field, $value );
106
+ break;
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Get field names of object to be used by walker
112
+ * @return array
113
+ */
114
+ public static function get_db_fields()
115
+ {
116
+ return array(
117
+ 'parent' => '',
118
+ 'id' => '',
119
+ 'label' => '',
120
+ );
121
+ }
122
+
123
+ /**
124
+ * Enqueue scripts and styles
125
+ */
126
+ public static function admin_enqueue_scripts()
127
+ {
128
+ MASHSB_RWMB_Input_List_Field::admin_enqueue_scripts();
129
+ MASHSB_RWMB_Select_Field::admin_enqueue_scripts();
130
+ MASHSB_RWMB_Select_Tree_Field::admin_enqueue_scripts();
131
+ MASHSB_RWMB_Select_Advanced_Field::admin_enqueue_scripts();
132
+ }
133
+
134
+ /**
135
+ * Get options for walker
136
+ *
137
+ * @param array $field
138
+ *
139
+ * @return array
140
+ */
141
+ public static function get_options( $field )
142
+ {
143
+ return array();
144
+ }
145
+ }
includes/admin/meta-box/inc/fields/oembed.php CHANGED
@@ -1,122 +1,122 @@
1
- <?php
2
-
3
- /**
4
- * oEmbed field class.
5
- */
6
- class MASHSB_RWMB_OEmbed_Field extends MASHSB_RWMB_URL_Field
7
- {
8
- /**
9
- * Enqueue scripts and styles
10
- */
11
- public static function admin_enqueue_scripts()
12
- {
13
- wp_enqueue_style( 'mashsb-rwmb-oembed', MASHSB_RWMB_CSS_URL . 'oembed.css' );
14
- wp_enqueue_script( 'mashsb-rwmb-oembed', MASHSB_RWMB_JS_URL . 'oembed.js', array(), MASHSB_RWMB_VER, true );
15
- }
16
-
17
- /**
18
- * Add actions
19
- */
20
- public static function add_actions()
21
- {
22
- add_action( 'wp_ajax_rwmb_get_embed', array( __CLASS__, 'wp_ajax_get_embed' ) );
23
- }
24
-
25
- /**
26
- * Ajax callback for returning oEmbed HTML
27
- */
28
- public static function wp_ajax_get_embed()
29
- {
30
- $url = (string) filter_input( INPUT_POST, 'url', FILTER_SANITIZE_URL );
31
- wp_send_json_success( self::get_embed( $url ) );
32
- }
33
-
34
- /**
35
- * Get embed html from url
36
- *
37
- * @param string $url
38
- * @return string
39
- */
40
- public static function get_embed( $url )
41
- {
42
- /**
43
- * Set arguments for getting embeded HTML.
44
- * Without arguments, default width will be taken from global $content_width, which can break UI in the admin
45
- * @link https://github.com/rilwis/meta-box/issues/801
46
- * @see WP_oEmbed::fetch()
47
- * @see WP_Embed::shortcode()
48
- * @see wp_embed_defaults()
49
- */
50
- $args = array();
51
- if ( is_admin() )
52
- {
53
- $args['width'] = 360;
54
- }
55
-
56
- // Try oembed first
57
- $embed = wp_oembed_get( $url, $args );
58
-
59
- // If no oembed provides found, try WordPress auto embed
60
- if ( ! $embed )
61
- {
62
- $embed = $GLOBALS['wp_embed']->shortcode( $args, $url );
63
- }
64
-
65
- return $embed ? $embed : __( 'Embed HTML not available.', 'meta-box' );
66
- }
67
-
68
- /**
69
- * Get field HTML
70
- *
71
- * @param mixed $meta
72
- * @param array $field
73
- * @return string
74
- */
75
- public static function html( $meta, $field )
76
- {
77
- $attributes = self::get_attributes( $field, $meta );
78
- return sprintf(
79
- '<input %s>
80
- <a href="#" class="show-embed button">%s</a>
81
- <span class="spinner"></span>
82
- <div class="embed-code">%s</div>',
83
- self::render_attributes( $attributes ),
84
- __( 'Preview', 'meta-box' ),
85
- $meta ? self::get_embed( $meta ) : ''
86
- );
87
- }
88
-
89
- /**
90
- * Output the field value
91
- * Display embed media
92
- *
93
- * @param array $field Field parameters
94
- * @param array $args Additional arguments. Not used for these fields.
95
- * @param int|null $post_id Post ID. null for current post. Optional.
96
- *
97
- * @return mixed Field value
98
- */
99
- public static function the_value( $field, $args = array(), $post_id = null )
100
- {
101
- $value = self::get_value( $field, $args, $post_id );
102
- $output = '';
103
- if ( empty( $value ) )
104
- {
105
- return $output;
106
- }
107
- if ( $field['clone'] )
108
- {
109
- $output = '<ul>';
110
- foreach ( $value as $subvalue )
111
- {
112
- $output .= '<li>' . self::get_embed( $subvalue ) . '</li>';
113
- }
114
- $output .= '</ul>';
115
- }
116
- else
117
- {
118
- $output = self::get_embed( $value );
119
- }
120
- return $output;
121
- }
122
- }
1
+ <?php
2
+
3
+ /**
4
+ * oEmbed field class.
5
+ */
6
+ class MASHSB_RWMB_OEmbed_Field extends MASHSB_RWMB_URL_Field
7
+ {
8
+ /**
9
+ * Enqueue scripts and styles
10
+ */
11
+ public static function admin_enqueue_scripts()
12
+ {
13
+ wp_enqueue_style( 'mashsb-rwmb-oembed', MASHSB_RWMB_CSS_URL . 'oembed.css' );
14
+ wp_enqueue_script( 'mashsb-rwmb-oembed', MASHSB_RWMB_JS_URL . 'oembed.js', array(), MASHSB_RWMB_VER, true );
15
+ }
16
+
17
+ /**
18
+ * Add actions
19
+ */
20
+ public static function add_actions()
21
+ {
22
+ add_action( 'wp_ajax_rwmb_get_embed', array( __CLASS__, 'wp_ajax_get_embed' ) );
23
+ }
24
+
25
+ /**
26
+ * Ajax callback for returning oEmbed HTML
27
+ */
28
+ public static function wp_ajax_get_embed()
29
+ {
30
+ $url = (string) filter_input( INPUT_POST, 'url', FILTER_SANITIZE_URL );
31
+ wp_send_json_success( self::get_embed( $url ) );
32
+ }
33
+
34
+ /**
35
+ * Get embed html from url
36
+ *
37
+ * @param string $url
38
+ * @return string
39
+ */
40
+ public static function get_embed( $url )
41
+ {
42
+ /**
43
+ * Set arguments for getting embeded HTML.
44
+ * Without arguments, default width will be taken from global $content_width, which can break UI in the admin
45
+ * @link https://github.com/rilwis/meta-box/issues/801
46
+ * @see WP_oEmbed::fetch()
47
+ * @see WP_Embed::shortcode()
48
+ * @see wp_embed_defaults()
49
+ */
50
+ $args = array();
51
+ if ( is_admin() )
52
+ {
53
+ $args['width'] = 360;
54
+ }
55
+
56
+ // Try oembed first
57
+ $embed = wp_oembed_get( $url, $args );
58
+
59
+ // If no oembed provides found, try WordPress auto embed
60
+ if ( ! $embed )
61
+ {
62
+ $embed = $GLOBALS['wp_embed']->shortcode( $args, $url );
63
+ }
64
+
65
+ return $embed ? $embed : __( 'Embed HTML not available.', 'meta-box' );
66
+ }
67
+
68
+ /**
69
+ * Get field HTML
70
+ *
71
+ * @param mixed $meta
72
+ * @param array $field
73
+ * @return string
74
+ */
75
+ public static function html( $meta, $field )
76
+ {
77
+ $attributes = self::get_attributes( $field, $meta );
78
+ return sprintf(
79
+ '<input %s>
80
+ <a href="#" class="show-embed button">%s</a>
81
+ <span class="spinner"></span>
82
+ <div class="embed-code">%s</div>',
83
+ self::render_attributes( $attributes ),
84
+ __( 'Preview', 'meta-box' ),
85
+ $meta ? self::get_embed( $meta ) : ''
86
+ );
87
+ }
88
+
89
+ /**
90
+ * Output the field value
91
+ * Display embed media
92
+ *
93
+ * @param array $field Field parameters
94
+ * @param array $args Additional arguments. Not used for these fields.
95
+ * @param int|null $post_id Post ID. null for current post. Optional.
96
+ *
97
+ * @return mixed Field value
98
+ */
99
+ public static function the_value( $field, $args = array(), $post_id = null )
100
+ {
101
+ $value = self::get_value( $field, $args, $post_id );
102
+ $output = '';
103
+ if ( empty( $value ) )
104
+ {
105
+ return $output;
106
+ }
107
+ if ( $field['clone'] )
108
+ {
109
+ $output = '<ul>';
110
+ foreach ( $value as $subvalue )
111
+ {
112
+ $output .= '<li>' . self::get_embed( $subvalue ) . '</li>';
113
+ }
114
+ $output .= '</ul>';
115
+ }
116
+ else
117
+ {
118
+ $output = self::get_embed( $value );
119
+ }
120
+ return $output;
121
+ }
122
+ }
includes/admin/meta-box/inc/fields/password.php CHANGED
@@ -1,34 +1,34 @@
1
- <?php
2
- /**
3
- * Password field class.
4
- */
5
- class MASHSB_RWMB_Password_Field extends MASHSB_RWMB_Text_Field
6
- {
7
- /**
8
- * Get the attributes for a field
9
- *
10
- * @param array $field
11
- * @param mixed $value
12
- * @return array
13
- */
14
- static function get_attributes( $field, $value = null )
15
- {
16
- $attributes = parent::get_attributes( $field, $value );
17
- $attributes['type'] = 'password';
18
- return $attributes;
19
- }
20
-
21
- /**
22
- * Store secured password in the database.
23
- * @param mixed $new
24
- * @param mixed $old
25
- * @param int $post_id
26
- * @param array $field
27
- * @return string
28
- */
29
- static function value( $new, $old, $post_id, $field )
30
- {
31
- $new = $new != $old ? wp_hash_password( $new ) : $new;
32
- return $new;
33
- }
34
- }
1
+ <?php
2
+ /**
3
+ * Password field class.
4
+ */
5
+ class MASHSB_RWMB_Password_Field extends MASHSB_RWMB_Text_Field
6
+ {
7
+ /**
8
+ * Get the attributes for a field
9
+ *
10
+ * @param array $field
11
+ * @param mixed $value
12
+ * @return array
13
+ */
14
+ static function get_attributes( $field, $value = null )
15
+ {
16
+ $attributes = parent::get_attributes( $field, $value );
17
+ $attributes['type'] = 'password';
18
+ return $attributes;
19
+ }
20
+
21
+ /**
22
+ * Store secured password in the database.
23
+ * @param mixed $new
24
+ * @param mixed $old
25
+ * @param int $post_id
26
+ * @param array $field
27
+ * @return string
28
+ */
29
+ static function value( $new, $old, $post_id, $field )
30
+ {
31
+ $new = $new != $old ? wp_hash_password( $new ) : $new;
32
+ return $new;
33
+ }
34
+ }
includes/admin/meta-box/inc/fields/plupload-image.php CHANGED
@@ -1,5 +1,5 @@
1
- <?php
2
- /**
3
- * Image upload field which uses plupload library to drag and drop files to upload.
4
- */
5
- class MASHSB_RWMB_Plupload_Image_Field extends MASHSB_RWMB_Image_Upload_Field {}
1
+ <?php
2
+ /**
3
+ * Image upload field which uses plupload library to drag and drop files to upload.
4
+ */
5
+ class MASHSB_RWMB_Plupload_Image_Field extends MASHSB_RWMB_Image_Upload_Field {}
includes/admin/meta-box/inc/fields/post.php CHANGED
@@ -1,132 +1,132 @@
1
- <?php
2
- /**
3
- * Post field class.
4
- */
5
- class MASHSB_RWMB_Post_Field extends MASHSB_RWMB_Object_Choice_Field
6
- {
7
- /**
8
- * Normalize parameters for field
9
- *
10
- * @param array $field
11
- * @return array
12
- */
13
- public static function normalize( $field )
14
- {
15
- /**
16
- * Set default field args
17
- */
18
- $field = parent::normalize( $field );
19
- $field = wp_parse_args( $field, array(
20
- 'post_type' => 'post',
21
- 'parent' => false,
22
- ) );
23
-
24
- if ( ! isset( $field['query_args']['post_type'] ) )
25
- $field['query_args']['post_type'] = $field['post_type'];
26
-
27
- /**
28
- * Set default placeholder
29
- * - If multiple post types: show 'Select a post'
30
- * - If single post type: show 'Select a %post_type_name%'
31
- */
32
- if ( empty( $field['placeholder'] ) )
33
- {
34
- $field['placeholder'] = __( 'Select a post', 'meta-box' );
35
- if ( is_string( $field['query_args']['post_type'] ) && post_type_exists( $field['query_args']['post_type'] ) )
36
- {
37
- $post_type_object = get_post_type_object( $field['query_args']['post_type'] );
38
- $field['placeholder'] = sprintf( __( 'Select a %s', 'meta-box' ), $post_type_object->labels->singular_name );
39
- }
40
- }
41
-
42
- /**
43
- * Set parent option, which will change field name to `parent_id` to save as post parent
44
- */
45
- if ( $field['parent'] )
46
- {
47
- $field['multiple'] = false;
48
- $field['field_name'] = 'parent_id';
49
- }
50
-
51
- /**
52
- * Set default query args
53
- */
54
- $field['query_args'] = wp_parse_args( $field['query_args'], array(
55
- 'post_status' => 'publish',
56
- 'posts_per_page' => - 1,
57
- ) );
58
-
59
- return $field;
60
- }
61
-
62
- /**
63
- * Get field names of object to be used by walker
64
- *
65
- * @return array
66
- */
67
- public static function get_db_fields()
68
- {
69
- return array(
70
- 'parent' => 'post_parent',
71
- 'id' => 'ID',
72
- 'label' => 'post_title',
73
- );
74
- }
75
-
76
- /**
77
- * Get meta value
78
- * If field is cloneable, value is saved as a single entry in DB
79
- * Otherwise value is saved as multiple entries (for backward compatibility)
80
- *
81
- * @see "save" method for better understanding
82
- *
83
- * @param $post_id
84
- * @param $saved
85
- * @param $field
86
- *
87
- * @return array
88
- */
89
- public static function meta( $post_id, $saved, $field )
90
- {
91
- if ( isset( $field['parent'] ) && $field['parent'] )
92
- {
93
- $post = get_post( $post_id );
94
- return $post->post_parent;
95
- }
96
-
97
- return parent::meta( $post_id, $saved, $field );
98
- }
99
-
100
- /**
101
- * Get options for walker
102
- *
103
- * @param array $field
104
- * @return array
105
- */
106
- public static function get_options( $field )
107
- {
108
- $query = new WP_Query( $field['query_args'] );
109
- return $query->have_posts() ? $query->posts : array();
110
- }
111
-
112
- /**
113
- * Get option label
114
- *
115
- * @param string $value Option value
116
- * @param array $field Field parameter
117
- *
118
- * @return string
119
- */
120
- public static function get_option_label( $value, $field )
121
- {
122
- return sprintf(
123
- '<a href="%s" title="%s">%s</a>',
124
- esc_url( get_permalink( $value ) ),
125
- the_title_attribute( array(
126
- 'post' => $value,
127
- 'echo' => false,
128
- ) ),
129
- get_the_title( $value )
130
- );
131
- }
132
- }
1
+ <?php
2
+ /**
3
+ * Post field class.
4
+ */
5
+ class MASHSB_RWMB_Post_Field extends MASHSB_RWMB_Object_Choice_Field
6
+ {
7
+ /**
8
+ * Normalize parameters for field
9
+ *
10
+ * @param array $field
11
+ * @return array
12
+ */
13
+ public static function normalize( $field )
14
+ {
15
+ /**
16
+ * Set default field args
17
+ */
18
+ $field = parent::normalize( $field );
19
+ $field = wp_parse_args( $field, array(
20
+ 'post_type' => 'post',
21
+ 'parent' => false,
22
+ ) );
23
+
24
+ if ( ! isset( $field['query_args']['post_type'] ) )
25
+ $field['query_args']['post_type'] = $field['post_type'];
26
+
27
+ /**
28
+ * Set default placeholder
29
+ * - If multiple post types: show 'Select a post'
30
+ * - If single post type: show 'Select a %post_type_name%'
31
+ */
32
+ if ( empty( $field['placeholder'] ) )
33
+ {
34
+ $field['placeholder'] = __( 'Select a post', 'meta-box' );
35
+ if ( is_string( $field['query_args']['post_type'] ) && post_type_exists( $field['query_args']['post_type'] ) )
36
+ {
37
+ $post_type_object = get_post_type_object( $field['query_args']['post_type'] );
38
+ $field['placeholder'] = sprintf( __( 'Select a %s', 'meta-box' ), $post_type_object->labels->singular_name );
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Set parent option, which will change field name to `parent_id` to save as post parent
44
+ */
45
+ if ( $field['parent'] )
46
+ {
47
+ $field['multiple'] = false;
48
+ $field['field_name'] = 'parent_id';
49
+ }
50
+
51
+ /**
52
+ * Set default query args
53
+ */
54
+ $field['query_args'] = wp_parse_args( $field['query_args'], array(
55
+ 'post_status' => 'publish',
56
+ 'posts_per_page' => - 1,
57
+ ) );
58
+
59
+ return $field;
60
+ }
61
+
62
+ /**
63
+ * Get field names of object to be used by walker
64
+ *
65
+ * @return array
66
+ */
67
+ public static function get_db_fields()
68
+ {
69
+ return array(
70
+ 'parent' => 'post_parent',
71
+ 'id' => 'ID',
72
+ 'label' => 'post_title',
73
+ );
74
+ }
75
+
76
+ /**
77
+ * Get meta value
78
+ * If field is cloneable, value is saved as a single entry in DB
79
+ * Otherwise value is saved as multiple entries (for backward compatibility)
80
+ *
81
+ * @see "save" method for better understanding
82
+ *
83
+ * @param $post_id
84
+ * @param $saved
85
+ * @param $field
86
+ *
87
+ * @return array
88
+ */
89
+ public static function meta( $post_id, $saved, $field )
90
+ {
91
+ if ( isset( $field['parent'] ) && $field['parent'] )
92
+ {
93
+ $post = get_post( $post_id );
94
+ return $post->post_parent;
95
+ }
96
+
97
+ return parent::meta( $post_id, $saved, $field );
98
+ }
99
+
100
+ /**
101
+ * Get options for walker
102
+ *
103
+ * @param array $field
104
+ * @return array
105
+ */
106
+ public static function get_options( $field )
107
+ {
108
+ $query = new WP_Query( $field['query_args'] );
109
+ return $query->have_posts() ? $query->posts : array();
110
+ }
111
+
112
+ /**
113
+ * Get option label
114
+ *
115
+ * @param string $value Option value
116
+ * @param array $field Field parameter
117
+ *
118
+ * @return string
119
+ */
120
+ public static function get_option_label( $value, $field )
121
+ {
122
+ return sprintf(
123
+ '<a href="%s" title="%s">%s</a>',
124
+ esc_url( get_permalink( $value ) ),
125
+ the_title_attribute( array(
126
+ 'post' => $value,
127
+ 'echo' => false,
128
+ ) ),
129
+ get_the_title( $value )
130
+ );
131
+ }
132
+ }
includes/admin/meta-box/inc/fields/radio.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
- /**
3
- * Radio field class.
4
- */
5
- class MASHSB_RWMB_Radio_Field extends MASHSB_RWMB_Input_List_Field
6
- {
7
- /**
8
- * Normalize parameters for field
9
- * @param array $field
10
- * @return array
11
- */
12
- static function normalize( $field )
13
- {
14
- $field['multiple'] = false;
15
- $field = parent::normalize( $field );
16
-
17
- return $field;
18
- }
19
- }
1
+ <?php
2
+ /**
3
+ * Radio field class.
4
+ */
5
+ class MASHSB_RWMB_Radio_Field extends MASHSB_RWMB_Input_List_Field
6
+ {
7
+ /**
8
+ * Normalize parameters for field
9
+ * @param array $field
10
+ * @return array
11
+ */
12
+ static function normalize( $field )
13
+ {
14
+ $field['multiple'] = false;
15
+ $field = parent::normalize( $field );
16
+
17
+ return $field;
18
+ }
19
+ }
includes/admin/meta-box/inc/fields/range.php CHANGED
@@ -1,93 +1,93 @@
1
- <?php
2
- /**
3
- * HTML5 range field class.
4
- */
5
- class MASHSB_RWMB_Range_Field extends MASHSB_RWMB_Number_Field
6
- {
7
- /**
8
- * Get field HTML
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- * @return string
13
- */
14
- static function html( $meta, $field )
15
- {
16
- $output = parent::html( $meta, $field );
17
- $output .= sprintf( '<span class="mashsb-rwmb-output">%s</span>', $meta );
18
- return $output;
19
- }
20
-
21
- /**
22
- * Enqueue styles
23
- */
24
- static function admin_enqueue_scripts()
25
- {
26
- wp_enqueue_style( 'mashsb-rwmb-range', MASHSB_RWMB_CSS_URL . 'range.css', array(), MASHSB_RWMB_VER );
27
- wp_enqueue_script( 'mashsb-rwmb-range', MASHSB_RWMB_JS_URL . 'range.js', array(), MASHSB_RWMB_VER, true );
28
- }
29
-
30
- /**
31
- * Normalize parameters for field.
32
- *
33
- * @param array $field
34
- *
35
- * @return array
36
- */
37
- static function normalize( $field )
38
- {
39
- $field = wp_parse_args( $field, array(
40
- 'min' => 0,
41
- 'max' => 10,
42
- 'step' => 1,
43
- ) );
44
-
45
- $field = parent::normalize( $field );
46
-
47
- return $field;
48
- }
49
-
50
- /**
51
- * Get the attributes for a field
52
- *
53
- * @param array $field
54
- * @param mixed $value
55
- *
56
- * @return array
57
- */
58
- static function get_attributes( $field, $value = null )
59
- {
60
- $attributes = parent::get_attributes( $field, $value );
61
- $attributes['type'] = 'range';
62
-
63
- return $attributes;
64
- }
65
-
66
- /**
67
- * Ensure number in range.
68
- *
69
- * @param mixed $new
70
- * @param mixed $old
71
- * @param int $post_id
72
- * @param array $field
73
- *
74
- * @return int
75
- */
76
- static function value( $new, $old, $post_id, $field )
77
- {
78
- $new = intval( $new );
79
- $min = intval( $field['min'] );
80
- $max = intval( $field['max'] );
81
-
82
- if ( $new < $min )
83
- {
84
- return $min;
85
- }
86
- elseif ( $new > $max )
87
- {
88
- return $max;
89
- }
90
-
91
- return $new;
92
- }
93
- }
1
+ <?php
2
+ /**
3
+ * HTML5 range field class.
4
+ */
5
+ class MASHSB_RWMB_Range_Field extends MASHSB_RWMB_Number_Field
6
+ {
7
+ /**
8
+ * Get field HTML
9
+ *
10
+ * @param mixed $meta
11
+ * @param array $field
12
+ * @return string
13
+ */
14
+ static function html( $meta, $field )
15
+ {
16
+ $output = parent::html( $meta, $field );
17
+ $output .= sprintf( '<span class="mashsb-rwmb-output">%s</span>', $meta );
18
+ return $output;
19
+ }
20
+
21
+ /**
22
+ * Enqueue styles
23
+ */
24
+ static function admin_enqueue_scripts()
25
+ {
26
+ wp_enqueue_style( 'mashsb-rwmb-range', MASHSB_RWMB_CSS_URL . 'range.css', array(), MASHSB_RWMB_VER );
27
+ wp_enqueue_script( 'mashsb-rwmb-range', MASHSB_RWMB_JS_URL . 'range.js', array(), MASHSB_RWMB_VER, true );
28
+ }
29
+
30
+ /**
31
+ * Normalize parameters for field.
32
+ *
33
+ * @param array $field
34
+ *
35
+ * @return array
36
+ */
37
+ static function normalize( $field )
38
+ {
39
+ $field = wp_parse_args( $field, array(
40
+ 'min' => 0,
41
+ 'max' => 10,
42
+ 'step' => 1,
43
+ ) );
44
+
45
+ $field = parent::normalize( $field );
46
+
47
+ return $field;
48
+ }
49
+
50
+ /**
51
+ * Get the attributes for a field
52
+ *
53
+ * @param array $field
54
+ * @param mixed $value
55
+ *
56
+ * @return array
57
+ */
58
+ static function get_attributes( $field, $value = null )
59
+ {
60
+ $attributes = parent::get_attributes( $field, $value );
61
+ $attributes['type'] = 'range';
62
+
63
+ return $attributes;
64
+ }
65
+
66
+ /**
67
+ * Ensure number in range.
68
+ *
69
+ * @param mixed $new
70
+ * @param mixed $old
71
+ * @param int $post_id
72
+ * @param array $field
73
+ *
74
+ * @return int
75
+ */
76
+ static function value( $new, $old, $post_id, $field )
77
+ {
78
+ $new = intval( $new );
79
+ $min = intval( $field['min'] );
80
+ $max = intval( $field['max'] );
81
+
82
+ if ( $new < $min )
83
+ {
84
+ return $min;
85
+ }
86
+ elseif ( $new > $max )
87
+ {
88
+ return $max;
89
+ }
90
+
91
+ return $new;
92
+ }
93
+ }
includes/admin/meta-box/inc/fields/select-advanced.php CHANGED
@@ -1,102 +1,102 @@
1
- <?php
2
- /**
3
- * Select advanced field which uses select2 library.
4
- */
5
- class MASHSB_RWMB_Select_Advanced_Field extends MASHSB_RWMB_Select_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- */
10
- public static function admin_enqueue_scripts()
11
- {
12
- parent::admin_enqueue_scripts();
13
- wp_enqueue_style( 'mashsb-rwmb-select2', MASHSB_RWMB_CSS_URL . 'select2/select2.css', array(), '4.0.1' );
14
- wp_enqueue_style( 'mashsb-rwmb-select-advanced', MASHSB_RWMB_CSS_URL . 'select-advanced.css', array(), MASHSB_RWMB_VER );
15
-
16
- wp_register_script( 'mashsb-rwmb-select2', MASHSB_RWMB_JS_URL . 'select2/select2.min.js', array(), '4.0.2', true );
17
-
18
- //Localize
19
- $deps = array( 'mashsb-rwmb-select2', 'mashsb-rwmb-select' );
20
- $dir = MASHSB_RWMB_JS_URL . 'select2/i18n/';
21
- $file = str_replace( '_', '-', get_locale() );
22
- $parts = explode( '-', $file );
23
- $file = file_exists( MASHSB_RWMB_DIR . 'js/select2/i18n/' . $file . '.js' ) ? $file : $parts[0];
24
-
25
- if ( file_exists( MASHSB_RWMB_DIR . 'js/select2/i18n/' . $file . '.js' ) )
26
- {
27
- wp_register_script( 'mashsb-rwmb-select2-i18n', $dir . $file . '.js', array( 'mashsb-rwmb-select2' ), '4.0.2', true );
28
- $deps[] = 'mashsb-rwmb-select2-i18n';
29
- }
30
-
31
- wp_enqueue_script( 'mashsb-rwmb-select', MASHSB_RWMB_JS_URL . 'select.js', array(), MASHSB_RWMB_VER, true );
32
- wp_enqueue_script( 'mashsb-rwmb-select-advanced', MASHSB_RWMB_JS_URL . 'select-advanced.js', $deps, MASHSB_RWMB_VER, true );
33
-
34
- }
35
-
36
- /**
37
- * Walk options
38
- *
39
- * @param mixed $meta
40
- * @param array $field
41
- * @param mixed $options
42
- * @param mixed $db_fields
43
- *
44
- * @return string
45
- */
46
- public static function walk( $options, $db_fields, $meta, $field )
47
- {
48
- $attributes = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_attributes' ), $field, $meta );
49
- $walker = new MASHSB_RWMB_Select_Walker( $db_fields, $field, $meta );
50
- $output = sprintf(
51
- '<select %s>',
52
- self::render_attributes( $attributes )
53
- );
54
-
55
- $output .= '<option></option>';
56
- $output .= $walker->walk( $options, $field['flatten'] ? - 1 : 0 );
57
- $output .= '</select>';
58
- $output .= self::get_select_all_html( $field );
59
- return $output;
60
- }
61
-
62
- /**
63
- * Normalize parameters for field
64
- *
65
- * @param array $field
66
- * @return array
67
- */
68
- public static function normalize( $field )
69
- {
70
- $field = wp_parse_args( $field, array(
71
- 'js_options' => array(),
72
- 'placeholder' => 'Select an item',
73
- ) );
74
-
75
- $field = parent::normalize( $field );
76
-
77
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
78
- 'allowClear' => true,
79
- 'width' => 'none',
80
- 'placeholder' => $field['placeholder'],
81
- ) );
82
-
83
- return $field;
84
- }
85
-
86
- /**
87
- * Get the attributes for a field
88
- *
89
- * @param array $field
90
- * @param mixed $value
91
- * @return array
92
- */
93
- public static function get_attributes( $field, $value = null )
94
- {
95
- $attributes = parent::get_attributes( $field, $value );
96
- $attributes = wp_parse_args( $attributes, array(
97
- 'data-options' => wp_json_encode( $field['js_options'] ),
98
- ) );
99
-
100
- return $attributes;
101
- }
102
- }
1
+ <?php
2
+ /**
3
+ * Select advanced field which uses select2 library.
4
+ */
5
+ class MASHSB_RWMB_Select_Advanced_Field extends MASHSB_RWMB_Select_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ */
10
+ public static function admin_enqueue_scripts()
11
+ {
12
+ parent::admin_enqueue_scripts();
13
+ wp_enqueue_style( 'mashsb-rwmb-select2', MASHSB_RWMB_CSS_URL . 'select2/select2.css', array(), '4.0.1' );
14
+ wp_enqueue_style( 'mashsb-rwmb-select-advanced', MASHSB_RWMB_CSS_URL . 'select-advanced.css', array(), MASHSB_RWMB_VER );
15
+
16
+ wp_register_script( 'mashsb-rwmb-select2', MASHSB_RWMB_JS_URL . 'select2/select2.min.js', array(), '4.0.2', true );
17
+
18
+ //Localize
19
+ $deps = array( 'mashsb-rwmb-select2', 'mashsb-rwmb-select' );
20
+ $dir = MASHSB_RWMB_JS_URL . 'select2/i18n/';
21
+ $file = str_replace( '_', '-', get_locale() );
22
+ $parts = explode( '-', $file );
23
+ $file = file_exists( MASHSB_RWMB_DIR . 'js/select2/i18n/' . $file . '.js' ) ? $file : $parts[0];
24
+
25
+ if ( file_exists( MASHSB_RWMB_DIR . 'js/select2/i18n/' . $file . '.js' ) )
26
+ {
27
+ wp_register_script( 'mashsb-rwmb-select2-i18n', $dir . $file . '.js', array( 'mashsb-rwmb-select2' ), '4.0.2', true );
28
+ $deps[] = 'mashsb-rwmb-select2-i18n';
29
+ }
30
+
31
+ wp_enqueue_script( 'mashsb-rwmb-select', MASHSB_RWMB_JS_URL . 'select.js', array(), MASHSB_RWMB_VER, true );
32
+ wp_enqueue_script( 'mashsb-rwmb-select-advanced', MASHSB_RWMB_JS_URL . 'select-advanced.js', $deps, MASHSB_RWMB_VER, true );
33
+
34
+ }
35
+
36
+ /**
37
+ * Walk options
38
+ *
39
+ * @param mixed $meta
40
+ * @param array $field
41
+ * @param mixed $options
42
+ * @param mixed $db_fields
43
+ *
44
+ * @return string
45
+ */
46
+ public static function walk( $options, $db_fields, $meta, $field )
47
+ {
48
+ $attributes = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_attributes' ), $field, $meta );
49
+ $walker = new MASHSB_RWMB_Select_Walker( $db_fields, $field, $meta );
50
+ $output = sprintf(
51
+ '<select %s>',
52
+ self::render_attributes( $attributes )
53
+ );
54
+
55
+ $output .= '<option></option>';
56
+ $output .= $walker->walk( $options, $field['flatten'] ? - 1 : 0 );
57
+ $output .= '</select>';
58
+ $output .= self::get_select_all_html( $field );
59
+ return $output;
60
+ }
61
+
62
+ /**
63
+ * Normalize parameters for field
64
+ *
65
+ * @param array $field
66
+ * @return array
67
+ */
68
+ public static function normalize( $field )
69
+ {
70
+ $field = wp_parse_args( $field, array(
71
+ 'js_options' => array(),
72
+ 'placeholder' => 'Select an item',
73
+ ) );
74
+
75
+ $field = parent::normalize( $field );
76
+
77
+ $field['js_options'] = wp_parse_args( $field['js_options'], array(
78
+ 'allowClear' => true,
79
+ 'width' => 'none',
80
+ 'placeholder' => $field['placeholder'],
81
+ ) );
82
+
83
+ return $field;
84
+ }
85
+
86
+ /**
87
+ * Get the attributes for a field
88
+ *
89
+ * @param array $field
90
+ * @param mixed $value
91
+ * @return array
92
+ */
93
+ public static function get_attributes( $field, $value = null )
94
+ {
95
+ $attributes = parent::get_attributes( $field, $value );
96
+ $attributes = wp_parse_args( $attributes, array(
97
+ 'data-options' => wp_json_encode( $field['js_options'] ),
98
+ ) );
99
+
100
+ return $attributes;
101
+ }
102
+ }
includes/admin/meta-box/inc/fields/select-tree.php CHANGED
@@ -1,64 +1,64 @@
1
- <?php
2
- /**
3
- * Select tree field class.
4
- */
5
- class MASHSB_RWMB_Select_Tree_Field extends MASHSB_RWMB_Select_Field
6
- {
7
- /**
8
- * Walk options
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- * @param mixed $options
13
- * @param mixed $db_fields
14
- *
15
- * @return string
16
- */
17
- public static function walk( $options, $db_fields, $meta, $field )
18
- {
19
- $walker = new MASHSB_RWMB_Select_Tree_Walker( $db_fields, $field, $meta );
20
- return $walker->walk( $options );
21
- }
22
-
23
- /**
24
- * Enqueue scripts and styles
25
- */
26
- public static function admin_enqueue_scripts()
27
- {
28
- parent::admin_enqueue_scripts();
29
- wp_enqueue_style( 'mashsb-rwmb-select-tree', MASHSB_RWMB_CSS_URL . 'select-tree.css', array( 'mashsb-rwmb-select' ), MASHSB_RWMB_VER );
30
- wp_enqueue_script( 'mashsb-rwmb-select-tree', MASHSB_RWMB_JS_URL . 'select-tree.js', array( 'mashsb-rwmb-select' ), MASHSB_RWMB_VER, true );
31
- }
32
-
33
- /**
34
- * Normalize parameters for field
35
- *
36
- * @param array $field
37
- * @return array
38
- */
39
- public static function normalize( $field )
40
- {
41
- $field['multiple'] = true;
42
- $field['size'] = 0;
43
- $field = parent::normalize( $field );
44
-
45
- return $field;
46
- }
47
-
48
- /**
49
- * Get the attributes for a field
50
- *
51
- * @param array $field
52
- * @param mixed $value
53
- *
54
- * @return array
55
- */
56
- public static function get_attributes( $field, $value = null )
57
- {
58
- $attributes = parent::get_attributes( $field, $value );
59
- $attributes['multiple'] = false;
60
- $attributes['id'] = false;
61
-
62
- return $attributes;
63
- }
64
- }
1
+ <?php
2
+ /**
3
+ * Select tree field class.
4
+ */
5
+ class MASHSB_RWMB_Select_Tree_Field extends MASHSB_RWMB_Select_Field
6
+ {
7
+ /**
8
+ * Walk options
9
+ *
10
+ * @param mixed $meta
11
+ * @param array $field
12
+ * @param mixed $options
13
+ * @param mixed $db_fields
14
+ *
15
+ * @return string
16
+ */
17
+ public static function walk( $options, $db_fields, $meta, $field )
18
+ {
19
+ $walker = new MASHSB_RWMB_Select_Tree_Walker( $db_fields, $field, $meta );
20
+ return $walker->walk( $options );
21
+ }
22
+
23
+ /**
24
+ * Enqueue scripts and styles
25
+ */
26
+ public static function admin_enqueue_scripts()
27
+ {
28
+ parent::admin_enqueue_scripts();
29
+ wp_enqueue_style( 'mashsb-rwmb-select-tree', MASHSB_RWMB_CSS_URL . 'select-tree.css', array( 'mashsb-rwmb-select' ), MASHSB_RWMB_VER );
30
+ wp_enqueue_script( 'mashsb-rwmb-select-tree', MASHSB_RWMB_JS_URL . 'select-tree.js', array( 'mashsb-rwmb-select' ), MASHSB_RWMB_VER, true );
31
+ }
32
+
33
+ /**
34
+ * Normalize parameters for field
35
+ *
36
+ * @param array $field
37
+ * @return array
38
+ */
39
+ public static function normalize( $field )
40
+ {
41
+ $field['multiple'] = true;
42
+ $field['size'] = 0;
43
+ $field = parent::normalize( $field );
44
+
45
+ return $field;
46
+ }
47
+
48
+ /**
49
+ * Get the attributes for a field
50
+ *
51
+ * @param array $field
52
+ * @param mixed $value
53
+ *
54
+ * @return array
55
+ */
56
+ public static function get_attributes( $field, $value = null )
57
+ {
58
+ $attributes = parent::get_attributes( $field, $value );
59
+ $attributes['multiple'] = false;
60
+ $attributes['id'] = false;
61
+
62
+ return $attributes;
63
+ }
64
+ }
includes/admin/meta-box/inc/fields/select.php CHANGED
@@ -1,95 +1,95 @@
1
- <?php
2
- /**
3
- * Select field class.
4
- */
5
- class MASHSB_RWMB_Select_Field extends MASHSB_RWMB_Choice_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- */
10
- public static function admin_enqueue_scripts()
11
- {
12
- wp_enqueue_style( 'mashsb-rwmb-select', MASHSB_RWMB_CSS_URL . 'select.css', array(), MASHSB_RWMB_VER );
13
- wp_enqueue_script( 'mashsb-rwmb-select', MASHSB_RWMB_JS_URL . 'select.js', array(), MASHSB_RWMB_VER, true );
14
- }
15
-
16
- /**
17
- * Walk options
18
- *
19
- * @param mixed $meta
20
- * @param array $field
21
- * @param mixed $options
22
- * @param mixed $db_fields
23
- *
24
- * @return string
25
- */
26
- public static function walk( $options, $db_fields, $meta, $field )
27
- {
28
- $attributes = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_attributes' ), $field, $meta );
29
- $walker = new MASHSB_RWMB_Select_Walker( $db_fields, $field, $meta );
30
- $output = sprintf(
31
- '<select %s>',
32
- self::render_attributes( $attributes )
33
- );
34
- if ( false === $field['multiple'] )
35
- {
36
- $output .= isset( $field['placeholder'] ) ? "<option value=''>{$field['placeholder']}</option>" : '<option></option>';
37
- }
38
- $output .= $walker->walk( $options, $field['flatten'] ? - 1 : 0 );
39
- $output .= '</select>';
40
- $output .= self::get_select_all_html( $field );
41
- return $output;
42
- }
43
-
44
- /**
45
- * Normalize parameters for field
46
- *
47
- * @param array $field
48
- * @return array
49
- */
50
- public static function normalize( $field )
51
- {
52
- $field = parent::normalize( $field );
53
- $field = $field['multiple'] ? MASHSB_RWMB_Multiple_Values_Field::normalize( $field ) : $field;
54
- $field = wp_parse_args( $field, array(
55
- 'size' => $field['multiple'] ? 5 : 0,
56
- 'select_all_none' => false,
57
- ) );
58
-
59
- return $field;
60
- }
61
-
62
- /**
63
- * Get the attributes for a field
64
- *
65
- * @param array $field
66
- * @param mixed $value
67
- *
68
- * @return array
69
- */
70
- public static function get_attributes( $field, $value = null )
71
- {
72
- $attributes = parent::get_attributes( $field, $value );
73
- $attributes = wp_parse_args( $attributes, array(
74
- 'multiple' => $field['multiple'],
75
- 'size' => $field['size'],
76
- ) );
77
-
78
- return $attributes;
79
- }
80
-
81
- /**
82
- * Get html for select all|none for multiple select
83
- *
84
- * @param array $field
85
- * @return string
86
- */
87
- public static function get_select_all_html( $field )
88
- {
89
- if ( $field['multiple'] && $field['select_all_none'] )
90
- {
91
- return '<div class="mashsb-rwmb-select-all-none">' . __( 'Select', 'meta-box' ) . ': <a data-type="all" href="#">' . __( 'All', 'meta-box' ) . '</a> | <a data-type="none" href="#">' . __( 'None', 'meta-box' ) . '</a></div>';
92
- }
93
- return '';
94
- }
95
- }
1
+ <?php
2
+ /**
3
+ * Select field class.
4
+ */
5
+ class MASHSB_RWMB_Select_Field extends MASHSB_RWMB_Choice_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ */
10
+ public static function admin_enqueue_scripts()
11
+ {
12
+ wp_enqueue_style( 'mashsb-rwmb-select', MASHSB_RWMB_CSS_URL . 'select.css', array(), MASHSB_RWMB_VER );
13
+ wp_enqueue_script( 'mashsb-rwmb-select', MASHSB_RWMB_JS_URL . 'select.js', array(), MASHSB_RWMB_VER, true );
14
+ }
15
+
16
+ /**
17
+ * Walk options
18
+ *
19
+ * @param mixed $meta
20
+ * @param array $field
21
+ * @param mixed $options
22
+ * @param mixed $db_fields
23
+ *
24
+ * @return string
25
+ */
26
+ public static function walk( $options, $db_fields, $meta, $field )
27
+ {
28
+ $attributes = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_attributes' ), $field, $meta );
29
+ $walker = new MASHSB_RWMB_Select_Walker( $db_fields, $field, $meta );
30
+ $output = sprintf(
31
+ '<select %s>',
32
+ self::render_attributes( $attributes )
33
+ );
34
+ if ( false === $field['multiple'] )
35
+ {
36
+ $output .= isset( $field['placeholder'] ) ? "<option value=''>{$field['placeholder']}</option>" : '<option></option>';
37
+ }
38
+ $output .= $walker->walk( $options, $field['flatten'] ? - 1 : 0 );
39
+ $output .= '</select>';
40
+ $output .= self::get_select_all_html( $field );
41
+ return $output;
42
+ }
43
+
44
+ /**
45
+ * Normalize parameters for field
46
+ *
47
+ * @param array $field
48
+ * @return array
49
+ */
50
+ public static function normalize( $field )
51
+ {
52
+ $field = parent::normalize( $field );
53
+ $field = $field['multiple'] ? MASHSB_RWMB_Multiple_Values_Field::normalize( $field ) : $field;
54
+ $field = wp_parse_args( $field, array(
55
+ 'size' => $field['multiple'] ? 5 : 0,
56
+ 'select_all_none' => false,
57
+ ) );
58
+
59
+ return $field;
60
+ }
61
+
62
+ /**
63
+ * Get the attributes for a field
64
+ *
65
+ * @param array $field
66
+ * @param mixed $value
67
+ *
68
+ * @return array
69
+ */
70
+ public static function get_attributes( $field, $value = null )
71
+ {
72
+ $attributes = parent::get_attributes( $field, $value );
73
+ $attributes = wp_parse_args( $attributes, array(
74
+ 'multiple' => $field['multiple'],
75
+ 'size' => $field['size'],
76
+ ) );
77
+
78
+ return $attributes;
79
+ }
80
+
81
+ /**
82
+ * Get html for select all|none for multiple select
83
+ *
84
+ * @param array $field
85
+ * @return string
86
+ */
87
+ public static function get_select_all_html( $field )
88
+ {
89
+ if ( $field['multiple'] && $field['select_all_none'] )
90
+ {
91
+ return '<div class="mashsb-rwmb-select-all-none">' . __( 'Select', 'meta-box' ) . ': <a data-type="all" href="#">' . __( 'All', 'meta-box' ) . '</a> | <a data-type="none" href="#">' . __( 'None', 'meta-box' ) . '</a></div>';
92
+ }
93
+ return '';
94
+ }
95
+ }
includes/admin/meta-box/inc/fields/slider.php CHANGED
@@ -1,66 +1,66 @@
1
- <?php
2
- /**
3
- * jQueryUI slider field class.
4
- */
5
- class MASHSB_RWMB_Slider_Field extends MASHSB_RWMB_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- static function admin_enqueue_scripts()
13
- {
14
- $url = MASHSB_RWMB_CSS_URL . 'jqueryui';
15
- wp_enqueue_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
16
- wp_enqueue_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
17
- wp_enqueue_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array(), '1.8.17' );
18
- wp_enqueue_style( 'mashsb-rwmb-slider', MASHSB_RWMB_CSS_URL . 'slider.css' );
19
-
20
- wp_enqueue_script( 'mashsb-rwmb-slider', MASHSB_RWMB_JS_URL . 'slider.js', array( 'jquery-ui-slider', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-core' ), MASHSB_RWMB_VER, true );
21
- }
22
-
23
- /**
24
- * Get div HTML
25
- *
26
- * @param mixed $meta
27
- * @param array $field
28
- *
29
- * @return string
30
- */
31
- static function html( $meta, $field )
32
- {
33
- return sprintf(
34
- '<div class="clearfix">
35
- <div class="mashsb-rwmb-slider" id="%s" data-options="%s"></div>
36
- <span class="mashsb-rwmb-slider-value-label">%s<span>%s</span>%s</span>
37
- <input type="hidden" name="%s" value="%s" class="mashsb-rwmb-slider-value">
38
- </div>',
39
- $field['id'], esc_attr( wp_json_encode( $field['js_options'] ) ),
40
- $field['prefix'], $meta, $field['suffix'],
41
- $field['field_name'], $meta
42
- );
43
- }
44
-
45
- /**
46
- * Normalize parameters for field
47
- *
48
- * @param array $field
49
- *
50
- * @return array
51
- */
52
- static function normalize( $field )
53
- {
54
- $field = parent::normalize( $field );
55
- $field = wp_parse_args( $field, array(
56
- 'prefix' => '',
57
- 'suffix' => '',
58
- 'js_options' => array(),
59
- ) );
60
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
61
- 'range' => 'min', // range = 'min' will add a dark background to sliding part, better UI
62
- ) );
63
-
64
- return $field;
65
- }
66
- }
1
+ <?php
2
+ /**
3
+ * jQueryUI slider field class.
4
+ */
5
+ class MASHSB_RWMB_Slider_Field extends MASHSB_RWMB_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ *
10
+ * @return void
11
+ */
12
+ static function admin_enqueue_scripts()
13
+ {
14
+ $url = MASHSB_RWMB_CSS_URL . 'jqueryui';
15
+ wp_enqueue_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
16
+ wp_enqueue_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
17
+ wp_enqueue_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array(), '1.8.17' );
18
+ wp_enqueue_style( 'mashsb-rwmb-slider', MASHSB_RWMB_CSS_URL . 'slider.css' );
19
+
20
+ wp_enqueue_script( 'mashsb-rwmb-slider', MASHSB_RWMB_JS_URL . 'slider.js', array( 'jquery-ui-slider', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-core' ), MASHSB_RWMB_VER, true );
21
+ }
22
+
23
+ /**
24
+ * Get div HTML
25
+ *
26
+ * @param mixed $meta
27
+ * @param array $field
28
+ *
29
+ * @return string
30
+ */
31
+ static function html( $meta, $field )
32
+ {
33
+ return sprintf(
34
+ '<div class="clearfix">
35
+ <div class="mashsb-rwmb-slider" id="%s" data-options="%s"></div>
36
+ <span class="mashsb-rwmb-slider-value-label">%s<span>%s</span>%s</span>
37
+ <input type="hidden" name="%s" value="%s" class="mashsb-rwmb-slider-value">
38
+ </div>',
39
+ $field['id'], esc_attr( wp_json_encode( $field['js_options'] ) ),
40
+ $field['prefix'], $meta, $field['suffix'],
41
+ $field['field_name'], $meta
42
+ );
43
+ }
44
+
45
+ /**
46
+ * Normalize parameters for field
47
+ *
48
+ * @param array $field
49
+ *
50
+ * @return array
51
+ */
52
+ static function normalize( $field )
53
+ {
54
+ $field = parent::normalize( $field );
55
+ $field = wp_parse_args( $field, array(
56
+ 'prefix' => '',
57
+ 'suffix' => '',
58
+ 'js_options' => array(),
59
+ ) );
60
+ $field['js_options'] = wp_parse_args( $field['js_options'], array(
61
+ 'range' => 'min', // range = 'min' will add a dark background to sliding part, better UI
62
+ ) );
63
+
64
+ return $field;
65
+ }
66
+ }
includes/admin/meta-box/inc/fields/taxonomy-advanced.php CHANGED
@@ -1,89 +1,89 @@
1
- <?php
2
- /**
3
- * Taxonomy advanced field class which saves terms' IDs in the post meta.
4
- */
5
- class MASHSB_RWMB_Taxonomy_Advanced_Field extends MASHSB_RWMB_Taxonomy_Field
6
- {
7
- /**
8
- * Get meta values to save
9
- * Save terms in custom field, no more by setting post terms
10
- * Save in form of comma-separated IDs
11
- *
12
- * @param mixed $new
13
- * @param mixed $old
14
- * @param int $post_id
15
- * @param array $field
16
- *
17
- * @return string
18
- */
19
- static function value( $new, $old, $post_id, $field )
20
- {
21
- return is_array( $new ) ? implode( ',', array_unique( $new ) ) : null;
22
- }
23
-
24
- /**
25
- * Save meta value
26
- *
27
- * @param mixed $new
28
- * @param mixed $old
29
- * @param int $post_id
30
- * @param array $field
31
- *
32
- * @return string
33
- */
34
- static function save( $new, $old, $post_id, $field )
35
- {
36
- if ( $new )
37
- update_post_meta( $post_id, $field['id'], $new );
38
- else
39
- delete_post_meta( $post_id, $field['id'] );
40
- }
41
-
42
- /**
43
- * Standard meta retrieval
44
- *
45
- * @param int $post_id
46
- * @param bool $saved
47
- * @param array $field
48
- *
49
- * @return array
50
- */
51
- static function meta( $post_id, $saved, $field )
52
- {
53
- $meta = get_post_meta( $post_id, $field['id'], true );
54
- $meta = wp_parse_id_list( $meta );
55
- return $meta;
56
- }
57
-
58
- /**
59
- * Get the field value
60
- * Return list of post term objects
61
- *
62
- * @param array $field Field parameters
63
- * @param array $args Additional arguments. Rarely used. See specific fields for details
64
- * @param int|null $post_id Post ID. null for current post. Optional.
65
- *
66
- * @return array List of post term objects
67
- */
68
- static function get_value( $field, $args = array(), $post_id = null )
69
- {
70
- if ( ! $post_id )
71
- $post_id = get_the_ID();
72
-
73
- $value = self::meta( $post_id, '', $field );
74
-
75
- // Allow to pass more arguments to "get_terms"
76
- $args = wp_parse_args( array(
77
- 'include' => $value,
78
- 'hide_empty' => false,
79
- ), $args );
80
- $value = get_terms( $field['taxonomy'], $args );
81
-
82
- // Get single value if necessary
83
- if ( ! $field['clone'] && ! $field['multiple'] )
84
- {
85
- $value = reset( $value );
86
- }
87
- return $value;
88
- }
89
- }
1
+ <?php
2
+ /**
3
+ * Taxonomy advanced field class which saves terms' IDs in the post meta.
4
+ */
5
+ class MASHSB_RWMB_Taxonomy_Advanced_Field extends MASHSB_RWMB_Taxonomy_Field
6
+ {
7
+ /**
8
+ * Get meta values to save
9
+ * Save terms in custom field, no more by setting post terms
10
+ * Save in form of comma-separated IDs
11
+ *
12
+ * @param mixed $new
13
+ * @param mixed $old
14
+ * @param int $post_id
15
+ * @param array $field
16
+ *
17
+ * @return string
18
+ */
19
+ static function value( $new, $old, $post_id, $field )
20
+ {
21
+ return is_array( $new ) ? implode( ',', array_unique( $new ) ) : null;
22
+ }
23
+
24
+ /**
25
+ * Save meta value
26
+ *
27
+ * @param mixed $new
28
+ * @param mixed $old
29
+ * @param int $post_id
30
+ * @param array $field
31
+ *
32
+ * @return string
33
+ */
34
+ static function save( $new, $old, $post_id, $field )
35
+ {
36
+ if ( $new )
37
+ update_post_meta( $post_id, $field['id'], $new );
38
+ else
39
+ delete_post_meta( $post_id, $field['id'] );
40
+ }
41
+
42
+ /**
43
+ * Standard meta retrieval
44
+ *
45
+ * @param int $post_id
46
+ * @param bool $saved
47
+ * @param array $field
48
+ *
49
+ * @return array
50
+ */
51
+ static function meta( $post_id, $saved, $field )
52
+ {
53
+ $meta = get_post_meta( $post_id, $field['id'], true );
54
+ $meta = wp_parse_id_list( $meta );
55
+ return $meta;
56
+ }
57
+
58
+ /**
59
+ * Get the field value
60
+ * Return list of post term objects
61
+ *
62
+ * @param array $field Field parameters
63
+ * @param array $args Additional arguments. Rarely used. See specific fields for details
64
+ * @param int|null $post_id Post ID. null for current post. Optional.
65
+ *
66
+ * @return array List of post term objects
67
+ */
68
+ static function get_value( $field, $args = array(), $post_id = null )
69
+ {
70
+ if ( ! $post_id )
71
+ $post_id = get_the_ID();
72
+
73
+ $value = self::meta( $post_id, '', $field );
74
+
75
+ // Allow to pass more arguments to "get_terms"
76
+ $args = wp_parse_args( array(
77
+ 'include' => $value,
78
+ 'hide_empty' => false,
79
+ ), $args );
80
+ $value = get_terms( $field['taxonomy'], $args );
81
+
82
+ // Get single value if necessary
83
+ if ( ! $field['clone'] && ! $field['multiple'] )
84
+ {
85
+ $value = reset( $value );
86
+ }
87
+ return $value;
88
+ }
89
+ }
includes/admin/meta-box/inc/fields/taxonomy.php CHANGED
@@ -1,164 +1,164 @@
1
- <?php
2
- /**
3
- * Taxonomy field class which set post terms when saving.
4
- */
5
- class MASHSB_RWMB_Taxonomy_Field extends MASHSB_RWMB_Object_Choice_Field
6
- {
7
- /**
8
- * Add default value for 'taxonomy' field
9
- *
10
- * @param $field
11
- * @return array
12
- */
13
- static function normalize( $field )
14
- {
15
- /**
16
- * Backwards compatibility with field args
17
- */
18
- if ( isset( $field['options']['args'] ) )
19
- $field['query_args'] = $field['options']['args'];
20
- if ( isset( $field['options']['taxonomy'] ) )
21
- $field['taxonomy'] = $field['options']['taxonomy'];
22
- if ( isset( $field['options']['type'] ) )
23
- $field['field_type'] = $field['options']['type'];
24
-
25
- /**
26
- * Set default field args
27
- */
28
- $field = parent::normalize( $field );
29
- $field = wp_parse_args( $field, array(
30
- 'taxonomy' => 'category',
31
- ) );
32
-
33
- /**
34
- * Set default query args
35
- */
36
- $field['query_args'] = wp_parse_args( $field['query_args'], array(
37
- 'hide_empty' => false,
38
- ) );
39
-
40
- /**
41
- * Set default placeholder
42
- * - If multiple taxonomies: show 'Select a term'
43
- * - If single taxonomy: show 'Select a %taxonomy_name%'
44
- */
45
- if ( empty( $field['placeholder'] ) )
46
- {
47
- $field['placeholder'] = __( 'Select a term', 'meta-box' );
48
- if ( is_string( $field['taxonomy'] ) && taxonomy_exists( $field['taxonomy'] ) )
49
- {
50
- $taxonomy_object = get_taxonomy( $field['taxonomy'] );
51
- $field['placeholder'] = sprintf( __( 'Select a %s', 'meta-box' ), $taxonomy_object->labels->singular_name );
52
- }
53
- }
54
-
55
- /**
56
- * Prevent cloning for taxonomy field
57
- */
58
- $field['clone'] = false;
59
-
60
- return $field;
61
- }
62
-
63
- /**
64
- * Get field names of object to be used by walker
65
- *
66
- * @return array
67
- */
68
- static function get_db_fields()
69
- {
70
- return array(
71
- 'parent' => 'parent',
72
- 'id' => 'term_id',
73
- 'label' => 'name',
74
- );
75
- }
76
-
77
- /**
78
- * Get options for selects, checkbox list, etc via the terms
79
- *
80
- * @param array $field Field parameters
81
- *
82
- * @return array
83
- */
84
- static function get_options( $field )
85
- {
86
- $options = get_terms( $field['taxonomy'], $field['query_args'] );
87
- return $options;
88
- }
89
-
90
- /**
91
- * Save meta value
92
- *
93
- * @param mixed $new
94
- * @param mixed $old
95
- * @param int $post_id
96
- * @param array $field
97
- *
98
- * @return string
99
- */
100
- static function save( $new, $old, $post_id, $field )
101
- {
102
- $new = array_unique( array_map( 'intval', (array) $new ) );
103
- $new = empty( $new ) ? null : $new;
104
- wp_set_object_terms( $post_id, $new, $field['taxonomy'] );
105
- }
106
-
107
- /**
108
- * Standard meta retrieval
109
- *
110
- * @param int $post_id
111
- * @param bool $saved
112
- * @param array $field
113
- *
114
- * @return array
115
- */
116
- static function meta( $post_id, $saved, $field )
117
- {
118
- $meta = get_the_terms( $post_id, $field['taxonomy'] );
119
- $meta = (array) $meta;
120
- $meta = wp_list_pluck( $meta, 'term_id' );
121
-
122
- return $meta;
123
- }
124
-
125
- /**
126
- * Get the field value
127
- * Return list of post term objects
128
- *
129
- * @param array $field Field parameters
130
- * @param array $args Additional arguments. Rarely used. See specific fields for details
131
- * @param int|null $post_id Post ID. null for current post. Optional.
132
- *
133
- * @return array List of post term objects
134
- */
135
- static function get_value( $field, $args = array(), $post_id = null )
136
- {
137
- $value = get_the_terms( $post_id, $field['taxonomy'] );
138
-
139
- // Get single value if necessary
140
- if ( ! $field['clone'] && ! $field['multiple'] && is_array( $value ) )
141
- {
142
- $value = reset( $value );
143
- }
144
- return $value;
145
- }
146
-
147
- /**
148
- * Get option label
149
- *
150
- * @param string $value Option value
151
- * @param array $field Field parameter
152
- *
153
- * @return string
154
- */
155
- static function get_option_label( $value, $field )
156
- {
157
- return sprintf(
158
- '<a href="%s" title="%s">%s</a>',
159
- esc_url( get_term_link( $value ) ),
160
- esc_attr( $value->name ),
161
- $value->name
162
- );
163
- }
164
- }
1
+ <?php
2
+ /**
3
+ * Taxonomy field class which set post terms when saving.
4
+ */
5
+ class MASHSB_RWMB_Taxonomy_Field extends MASHSB_RWMB_Object_Choice_Field
6
+ {
7
+ /**
8
+ * Add default value for 'taxonomy' field
9
+ *
10
+ * @param $field
11
+ * @return array
12
+ */
13
+ static function normalize( $field )
14
+ {
15
+ /**
16
+ * Backwards compatibility with field args
17
+ */
18
+ if ( isset( $field['options']['args'] ) )
19
+ $field['query_args'] = $field['options']['args'];
20
+ if ( isset( $field['options']['taxonomy'] ) )
21
+ $field['taxonomy'] = $field['options']['taxonomy'];
22
+ if ( isset( $field['options']['type'] ) )
23
+ $field['field_type'] = $field['options']['type'];
24
+
25
+ /**
26
+ * Set default field args
27
+ */
28
+ $field = parent::normalize( $field );
29
+ $field = wp_parse_args( $field, array(
30
+ 'taxonomy' => 'category',
31
+ ) );
32
+
33
+ /**
34
+ * Set default query args
35
+ */
36
+ $field['query_args'] = wp_parse_args( $field['query_args'], array(
37
+ 'hide_empty' => false,
38
+ ) );
39
+
40
+ /**
41
+ * Set default placeholder
42
+ * - If multiple taxonomies: show 'Select a term'
43
+ * - If single taxonomy: show 'Select a %taxonomy_name%'
44
+ */
45
+ if ( empty( $field['placeholder'] ) )
46
+ {
47
+ $field['placeholder'] = __( 'Select a term', 'meta-box' );
48
+ if ( is_string( $field['taxonomy'] ) && taxonomy_exists( $field['taxonomy'] ) )
49
+ {
50
+ $taxonomy_object = get_taxonomy( $field['taxonomy'] );
51
+ $field['placeholder'] = sprintf( __( 'Select a %s', 'meta-box' ), $taxonomy_object->labels->singular_name );
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Prevent cloning for taxonomy field
57
+ */
58
+ $field['clone'] = false;
59
+
60
+ return $field;
61
+ }
62
+
63
+ /**
64
+ * Get field names of object to be used by walker
65
+ *
66
+ * @return array
67
+ */
68
+ static function get_db_fields()
69
+ {
70
+ return array(
71
+ 'parent' => 'parent',
72
+ 'id' => 'term_id',
73
+ 'label' => 'name',
74
+ );
75
+ }
76
+
77
+ /**
78
+ * Get options for selects, checkbox list, etc via the terms
79
+ *
80
+ * @param array $field Field parameters
81
+ *
82
+ * @return array
83
+ */
84
+ static function get_options( $field )
85
+ {
86
+ $options = get_terms( $field['taxonomy'], $field['query_args'] );
87
+ return $options;
88
+ }
89
+
90
+ /**
91
+ * Save meta value
92
+ *
93
+ * @param mixed $new
94
+ * @param mixed $old
95
+ * @param int $post_id
96
+ * @param array $field
97
+ *
98
+ * @return string
99
+ */
100
+ static function save( $new, $old, $post_id, $field )
101
+ {
102
+ $new = array_unique( array_map( 'intval', (array) $new ) );
103
+ $new = empty( $new ) ? null : $new;
104
+ wp_set_object_terms( $post_id, $new, $field['taxonomy'] );
105
+ }
106
+
107
+ /**
108
+ * Standard meta retrieval
109
+ *
110
+ * @param int $post_id
111
+ * @param bool $saved
112
+ * @param array $field
113
+ *
114
+ * @return array
115
+ */
116
+ static function meta( $post_id, $saved, $field )
117
+ {
118
+ $meta = get_the_terms( $post_id, $field['taxonomy'] );
119
+ $meta = (array) $meta;
120
+ $meta = wp_list_pluck( $meta, 'term_id' );
121
+
122
+ return $meta;
123
+ }
124
+
125
+ /**
126
+ * Get the field value
127
+ * Return list of post term objects
128
+ *
129
+ * @param array $field Field parameters
130
+ * @param array $args Additional arguments. Rarely used. See specific fields for details
131
+ * @param int|null $post_id Post ID. null for current post. Optional.
132
+ *
133
+ * @return array List of post term objects
134
+ */
135
+ static function get_value( $field, $args = array(), $post_id = null )
136
+ {
137
+ $value = get_the_terms( $post_id, $field['taxonomy'] );
138
+
139
+ // Get single value if necessary
140
+ if ( ! $field['clone'] && ! $field['multiple'] && is_array( $value ) )
141
+ {
142
+ $value = reset( $value );
143
+ }
144
+ return $value;
145
+ }
146
+
147
+ /**
148
+ * Get option label
149
+ *
150
+ * @param string $value Option value
151
+ * @param array $field Field parameter
152
+ *
153
+ * @return string
154
+ */
155
+ static function get_option_label( $value, $field )
156
+ {
157
+ return sprintf(
158
+ '<a href="%s" title="%s">%s</a>',
159
+ esc_url( get_term_link( $value ) ),
160
+ esc_attr( $value->name ),
161
+ $value->name
162
+ );
163
+ }
164
+ }
includes/admin/meta-box/inc/fields/text-list.php CHANGED
@@ -1,91 +1,91 @@
1
- <?php
2
- /**
3
- * Text list field class.
4
- */
5
- class MASHSB_RWMB_Text_List_Field extends MASHSB_RWMB_Multiple_Values_Field
6
- {
7
- /**
8
- * Get field HTML
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- *
13
- * @return string
14
- */
15
- static function html( $meta, $field )
16
- {
17
- $html = array();
18
- $input = '<label><input type="text" class="mashsb-rwmb-text-list" name="%s" value="%s" placeholder="%s"> %s</label>';
19
-
20
- $count = 0;
21
- foreach ( $field['options'] as $placeholder => $label )
22
- {
23
- $html[] = sprintf(
24
- $input,
25
- $field['field_name'],
26
- isset( $meta[$count] ) ? esc_attr( $meta[$count] ) : '',
27
- $placeholder,
28
- $label
29
- );
30
- $count ++;
31
- }
32
-
33
- return implode( ' ', $html );
34
- }
35
-
36
- /**
37
- * Output the field value
38
- * Display option name instead of option value
39
- *
40
- * @param array $field Field parameters
41
- * @param array $args Additional arguments. Not used for these fields.
42
- * @param int|null $post_id Post ID. null for current post. Optional.
43
- *
44
- * @return mixed Field value
45
- */
46
- static function the_value( $field, $args = array(), $post_id = null )
47
- {
48
- $value = self::get_value( $field, $args, $post_id );
49
- if ( ! $value )
50
- return '';
51
-
52
- $output = '<ul>';
53
- if ( $field['clone'] )
54
- {
55
- foreach ( $value as $subvalue )
56
- {
57
- $output .= '<li>';
58
- $output .= '<ul>';
59
-
60
- $i = 0;
61
- foreach ( $field['options'] as $placeholder => $label )
62
- {
63
- $output .= sprintf(
64
- '<li><label>%s</label>: %s</li>',
65
- $label,
66
- isset( $subvalue[$i] ) ? $subvalue[$i] : ''
67
- );
68
- $i ++;
69
- }
70
- $output .= '</ul>';
71
- $output .= '</li>';
72
- }
73
- }
74
- else
75
- {
76
- $i = 0;
77
- foreach ( $field['options'] as $placeholder => $label )
78
- {
79
- $output .= sprintf(
80
- '<li><label>%s</label>: %s</li>',
81
- $label,
82
- isset( $value[$i] ) ? $value[$i] : ''
83
- );
84
- $i ++;
85
- }
86
- }
87
- $output .= '</ul>';
88
-
89
- return $output;
90
- }
91
- }
1
+ <?php
2
+ /**
3
+ * Text list field class.
4
+ */
5
+ class MASHSB_RWMB_Text_List_Field extends MASHSB_RWMB_Multiple_Values_Field
6
+ {
7
+ /**
8
+ * Get field HTML
9
+ *
10
+ * @param mixed $meta
11
+ * @param array $field
12
+ *
13
+ * @return string
14
+ */
15
+ static function html( $meta, $field )
16
+ {
17
+ $html = array();
18
+ $input = '<label><input type="text" class="mashsb-rwmb-text-list" name="%s" value="%s" placeholder="%s"> %s</label>';
19
+
20
+ $count = 0;
21
+ foreach ( $field['options'] as $placeholder => $label )
22
+ {
23
+ $html[] = sprintf(
24
+ $input,
25
+ $field['field_name'],
26
+ isset( $meta[$count] ) ? esc_attr( $meta[$count] ) : '',
27
+ $placeholder,
28
+ $label
29
+ );
30
+ $count ++;
31
+ }
32
+
33
+ return implode( ' ', $html );
34
+ }
35
+
36
+ /**
37
+ * Output the field value
38
+ * Display option name instead of option value
39
+ *
40
+ * @param array $field Field parameters
41
+ * @param array $args Additional arguments. Not used for these fields.
42
+ * @param int|null $post_id Post ID. null for current post. Optional.
43
+ *
44
+ * @return mixed Field value
45
+ */
46
+ static function the_value( $field, $args = array(), $post_id = null )
47
+ {
48
+ $value = self::get_value( $field, $args, $post_id );
49
+ if ( ! $value )
50
+ return '';
51
+
52
+ $output = '<ul>';
53
+ if ( $field['clone'] )
54
+ {
55
+ foreach ( $value as $subvalue )
56
+ {
57
+ $output .= '<li>';
58
+ $output .= '<ul>';
59
+
60
+ $i = 0;
61
+ foreach ( $field['options'] as $placeholder => $label )
62
+ {
63
+ $output .= sprintf(
64
+ '<li><label>%s</label>: %s</li>',
65
+ $label,
66
+ isset( $subvalue[$i] ) ? $subvalue[$i] : ''
67
+ );
68
+ $i ++;
69
+ }
70
+ $output .= '</ul>';
71
+ $output .= '</li>';
72
+ }
73
+ }
74
+ else
75
+ {
76
+ $i = 0;
77
+ foreach ( $field['options'] as $placeholder => $label )
78
+ {
79
+ $output .= sprintf(
80
+ '<li><label>%s</label>: %s</li>',
81
+ $label,
82
+ isset( $value[$i] ) ? $value[$i] : ''
83
+ );
84
+ $i ++;
85
+ }
86
+ }
87
+ $output .= '</ul>';
88
+
89
+ return $output;
90
+ }
91
+ }
includes/admin/meta-box/inc/fields/text.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
- /**
3
- * Text field class.
4
- */
5
- class MASHSB_RWMB_Text_Field extends MASHSB_RWMB_Input_Field
6
- {
7
- /**
8
- * Normalize parameters for field
9
- *
10
- * @param array $field
11
- * @return array
12
- */
13
- static function normalize( $field )
14
- {
15
- $field = parent::normalize( $field );
16
-
17
- $field = wp_parse_args( $field, array(
18
- 'size' => 30,
19
- 'maxlength' => false,
20
- 'pattern' => false,
21
- ) );
22
-
23
- return $field;
24
- }
25
-
26
- /**
27
- * Get the attributes for a field
28
- *
29
- * @param array $field
30
- * @param mixed $value
31
- *
32
- * @return array
33
- */
34
- static function get_attributes( $field, $value = null )
35
- {
36
- $attributes = parent::get_attributes( $field, $value );
37
- $attributes = wp_parse_args( $attributes, array(
38
- 'size' => $field['size'],
39
- 'maxlength' => $field['maxlength'],
40
- 'pattern' => $field['pattern'],
41
- 'placeholder' => $field['placeholder'],
42
- ) );
43
-
44
- $attributes['type'] = 'text';
45
-
46
- return $attributes;
47
- }
48
- }
1
+ <?php
2
+ /**
3
+ * Text field class.
4
+ */
5
+ class MASHSB_RWMB_Text_Field extends MASHSB_RWMB_Input_Field
6
+ {
7
+ /**
8
+ * Normalize parameters for field
9
+ *
10
+ * @param array $field
11
+ * @return array
12
+ */
13
+ static function normalize( $field )
14
+ {
15
+ $field = parent::normalize( $field );
16
+
17
+ $field = wp_parse_args( $field, array(
18
+ 'size' => 30,
19
+ 'maxlength' => false,
20
+ 'pattern' => false,
21
+ ) );
22
+
23
+ return $field;
24
+ }
25
+
26
+ /**
27
+ * Get the attributes for a field
28
+ *
29
+ * @param array $field
30
+ * @param mixed $value
31
+ *
32
+ * @return array
33
+ */
34
+ static function get_attributes( $field, $value = null )
35
+ {
36
+ $attributes = parent::get_attributes( $field, $value );
37
+ $attributes = wp_parse_args( $attributes, array(
38
+ 'size' => $field['size'],
39
+ 'maxlength' => $field['maxlength'],
40
+ 'pattern' => $field['pattern'],
41
+ 'placeholder' => $field['placeholder'],
42
+ ) );
43
+
44
+ $attributes['type'] = 'text';
45
+
46
+ return $attributes;
47
+ }
48
+ }
includes/admin/meta-box/inc/fields/textarea.php CHANGED
@@ -1,79 +1,79 @@
1
- <?php
2
- /**
3
- * Textarea field class.
4
- */
5
- class MASHSB_RWMB_Textarea_Field extends MASHSB_RWMB_Field
6
- {
7
- /**
8
- * Get field HTML
9
- *
10
- * @param mixed $meta
11
- * @param array $field
12
- *
13
- * @return string
14
- */
15
- static function html( $meta, $field )
16
- {
17
- $attributes = self::get_attributes( $field, $meta );
18
- return sprintf(
19
- '<textarea %s>%s</textarea>',
20
- self::render_attributes( $attributes ),
21
- $meta
22
- );
23
- }
24
-
25
- /**
26
- * Escape meta for field output
27
- *
28
- * @param mixed $meta
29
- * @return mixed
30
- */
31
- static function esc_meta( $meta )
32
- {
33
- return is_array( $meta ) ? array_map( 'esc_textarea', $meta ) : esc_textarea( $meta );
34
- }
35
-
36
- /**
37
- * Normalize parameters for field
38
- *
39
- * @param array $field
40
- * @return array
41
- */
42
- static function normalize( $field )
43
- {
44
- $field = parent::normalize( $field );
45
- $field = wp_parse_args( $field, array(
46
- 'cols' => 60,
47
- 'rows' => 3,
48
- 'maxlength' => false,
49
- 'wrap' => false,
50
- 'readonly' => false,
51
- ) );
52
-
53
- return $field;
54
- }
55
-
56
- /**
57
- * Get the attributes for a field
58
- *
59
- * @param array $field
60
- * @param mixed $value
61
- *
62
- * @return array
63
- */
64
- static function get_attributes( $field, $value = null )
65
- {
66
- $attributes = parent::get_attributes( $field, $value );
67
- $attributes = wp_parse_args( $attributes, array(
68
- 'cols' => $field['cols'],
69
- 'rows' => $field['rows'],
70
- 'maxlength' => $field['maxlength'],
71
- 'wrap' => $field['wrap'],
72
- 'readonly' => $field['readonly'],
73
- 'placeholder' => $field['placeholder'],
74
- ) );
75
- $attributes['class'] .= ' large-text';
76
-
77
- return $attributes;
78
- }
79
- }
1
+ <?php
2
+ /**
3
+ * Textarea field class.
4
+ */
5
+ class MASHSB_RWMB_Textarea_Field extends MASHSB_RWMB_Field
6
+ {
7
+ /**
8
+ * Get field HTML
9
+ *
10
+ * @param mixed $meta
11
+ * @param array $field
12
+ *
13
+ * @return string
14
+ */
15
+ static function html( $meta, $field )
16
+ {
17
+ $attributes = self::get_attributes( $field, $meta );
18
+ return sprintf(
19
+ '<textarea %s>%s</textarea>',
20
+ self::render_attributes( $attributes ),
21
+ $meta
22
+ );
23
+ }
24
+
25
+ /**
26
+ * Escape meta for field output
27
+ *
28
+ * @param mixed $meta
29
+ * @return mixed
30
+ */
31
+ static function esc_meta( $meta )
32
+ {
33
+ return is_array( $meta ) ? array_map( 'esc_textarea', $meta ) : esc_textarea( $meta );
34
+ }
35
+
36
+ /**
37
+ * Normalize parameters for field
38
+ *
39
+ * @param array $field
40
+ * @return array
41
+ */
42
+ static function normalize( $field )
43
+ {
44
+ $field = parent::normalize( $field );
45
+ $field = wp_parse_args( $field, array(
46
+ 'cols' => 60,
47
+ 'rows' => 3,
48
+ 'maxlength' => false,
49
+ 'wrap' => false,
50
+ 'readonly' => false,
51
+ ) );
52
+
53
+ return $field;
54
+ }
55
+
56
+ /**
57
+ * Get the attributes for a field
58
+ *
59
+ * @param array $field
60
+ * @param mixed $value
61
+ *
62
+ * @return array
63
+ */
64
+ static function get_attributes( $field, $value = null )
65
+ {
66
+ $attributes = parent::get_attributes( $field, $value );
67
+ $attributes = wp_parse_args( $attributes, array(
68
+ 'cols' => $field['cols'],
69
+ 'rows' => $field['rows'],
70
+ 'maxlength' => $field['maxlength'],
71
+ 'wrap' => $field['wrap'],
72
+ 'readonly' => $field['readonly'],
73
+ 'placeholder' => $field['placeholder'],
74
+ ) );
75
+ $attributes['class'] .= ' large-text';
76
+
77
+ return $attributes;
78
+ }
79
+ }
includes/admin/meta-box/inc/fields/thickbox-image.php CHANGED
@@ -1,79 +1,79 @@
1
- <?php
2
- /**
3
- * Image upload field which uses thickbox library to upload.
4
- * @deprecated Use image_advanced instead
5
- */
6
- class MASHSB_RWMB_Thickbox_Image_Field extends MASHSB_RWMB_Image_Field
7
- {
8
- /**
9
- * Add custom actions for the field.
10
- */
11
- public static function add_actions()
12
- {
13
- parent::add_actions();
14
- add_filter( 'get_media_item_args', array( __CLASS__, 'allow_img_insertion' ) );
15
- }
16
-
17
- /**
18
- * Always enable insert to post button in the popup
19
- * @link https://github.com/rilwis/meta-box/issues/809
20
- * @link http://wordpress.stackexchange.com/q/22175/2051
21
- * @param array $vars
22
- * @return array
23
- */
24
- public static function allow_img_insertion( $vars )
25
- {
26
- $vars['send'] = true; // 'send' as in "Send to Editor"
27
- return $vars;
28
- }
29
-
30
- /**
31
- * Enqueue scripts and styles
32
- */
33
- public static function admin_enqueue_scripts()
34
- {
35
- parent::admin_enqueue_scripts();
36
-
37
- add_thickbox();
38
- wp_enqueue_script( 'media-upload' );
39
-
40
- wp_enqueue_script( 'mashsb-rwmb-thickbox-image', MASHSB_RWMB_JS_URL . 'thickbox-image.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
41
- }
42
-
43
- /**
44
- * Get field HTML
45
- *
46
- * @param mixed $meta
47
- * @param array $field
48
- *
49
- * @return string
50
- */
51
- public static function html( $meta, $field )
52
- {
53
- $i18n_title = apply_filters( 'rwmb_thickbox_image_upload_string', _x( 'Upload Images', 'image upload', 'meta-box' ), $field );
54
-
55
- // Uploaded images
56
- $html = parent::get_uploaded_images( $meta, $field );
57
-
58
- // Show form upload
59
- $html .= "<a href='#' class='button mashsb-rwmb-thickbox-upload' data-field_id='{$field['id']}'>{$i18n_title}</a>";
60
-
61
- return $html;
62
- }
63
-
64
- /**
65
- * Get field value
66
- * It's the combination of new (uploaded) images and saved images
67
- *
68
- * @param array $new
69
- * @param array $old
70
- * @param int $post_id
71
- * @param array $field
72
- *
73
- * @return array
74
- */
75
- public static function value( $new, $old, $post_id, $field )
76
- {
77
- return array_unique( array_merge( $old, $new ) );
78
- }
79
- }
1
+ <?php
2
+ /**
3
+ * Image upload field which uses thickbox library to upload.
4
+ * @deprecated Use image_advanced instead
5
+ */
6
+ class MASHSB_RWMB_Thickbox_Image_Field extends MASHSB_RWMB_Image_Field
7
+ {
8
+ /**
9
+ * Add custom actions for the field.
10
+ */
11
+ public static function add_actions()
12
+ {
13
+ parent::add_actions();
14
+ add_filter( 'get_media_item_args', array( __CLASS__, 'allow_img_insertion' ) );
15
+ }
16
+
17
+ /**
18
+ * Always enable insert to post button in the popup
19
+ * @link https://github.com/rilwis/meta-box/issues/809
20
+ * @link http://wordpress.stackexchange.com/q/22175/2051
21
+ * @param array $vars
22
+ * @return array
23
+ */
24
+ public static function allow_img_insertion( $vars )
25
+ {
26
+ $vars['send'] = true; // 'send' as in "Send to Editor"
27
+ return $vars;
28
+ }
29
+
30
+ /**
31
+ * Enqueue scripts and styles
32
+ */
33
+ public static function admin_enqueue_scripts()
34
+ {
35
+ parent::admin_enqueue_scripts();
36
+
37
+ add_thickbox();
38
+ wp_enqueue_script( 'media-upload' );
39
+
40
+ wp_enqueue_script( 'mashsb-rwmb-thickbox-image', MASHSB_RWMB_JS_URL . 'thickbox-image.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
41
+ }
42
+
43
+ /**
44
+ * Get field HTML
45
+ *
46
+ * @param mixed $meta
47
+ * @param array $field
48
+ *
49
+ * @return string
50
+ */
51
+ public static function html( $meta, $field )
52
+ {
53
+ $i18n_title = apply_filters( 'rwmb_thickbox_image_upload_string', _x( 'Upload Images', 'image upload', 'meta-box' ), $field );
54
+
55
+ // Uploaded images
56
+ $html = parent::get_uploaded_images( $meta, $field );
57
+
58
+ // Show form upload
59
+ $html .= "<a href='#' class='button mashsb-rwmb-thickbox-upload' data-field_id='{$field['id']}'>{$i18n_title}</a>";
60
+
61
+ return $html;
62
+ }
63
+
64
+ /**
65
+ * Get field value
66
+ * It's the combination of new (uploaded) images and saved images
67
+ *
68
+ * @param array $new
69
+ * @param array $old
70
+ * @param int $post_id
71
+ * @param array $field
72
+ *
73
+ * @return array
74
+ */
75
+ public static function value( $new, $old, $post_id, $field )
76
+ {
77
+ return array_unique( array_merge( $old, $new ) );
78
+ }
79
+ }
includes/admin/meta-box/inc/fields/time.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
- /**
3
- * Time field class.
4
- */
5
- class MASHSB_RWMB_Time_Field extends MASHSB_RWMB_Datetime_Field
6
- {
7
- /**
8
- * Enqueue scripts and styles
9
- *
10
- * @return void
11
- */
12
- public static function admin_enqueue_scripts()
13
- {
14
- parent::admin_register_scripts();
15
- wp_enqueue_style( 'jquery-ui-timepicker' );
16
- wp_enqueue_script( 'mashsb-rwmb-time' );
17
- }
18
-
19
- /**
20
- * Normalize parameters for field
21
- *
22
- * @param array $field
23
- * @return array
24
- */
25
- public static function normalize( $field )
26
- {
27
- $field = parent::normalize( $field );
28
- $field['js_options']['timeFormat'] = empty( $field['format'] ) ? $field['js_options']['timeFormat'] : $field['format'];
29
- return $field;
30
- }
31
- }
1
+ <?php
2
+ /**
3
+ * Time field class.
4
+ */
5
+ class MASHSB_RWMB_Time_Field extends MASHSB_RWMB_Datetime_Field
6
+ {
7
+ /**
8
+ * Enqueue scripts and styles
9
+ *
10
+ * @return void
11
+ */
12
+ public static function admin_enqueue_scripts()
13
+ {
14
+ parent::admin_register_scripts();
15
+ wp_enqueue_style( 'jquery-ui-timepicker' );
16
+ wp_enqueue_script( 'mashsb-rwmb-time' );
17
+ }
18
+
19
+ /**
20
+ * Normalize parameters for field
21
+ *
22
+ * @param array $field
23
+ * @return array
24
+ */
25
+ public static function normalize( $field )
26
+ {
27
+ $field = parent::normalize( $field );
28
+ $field['js_options']['timeFormat'] = empty( $field['format'] ) ? $field['js_options']['timeFormat'] : $field['format'];
29
+ return $field;
30
+ }
31
+ }
includes/admin/meta-box/inc/fields/url.php CHANGED
@@ -1,37 +1,37 @@
1
- <?php
2
- /**
3
- * HTML5 URL field class.
4
- */
5
- class MASHSB_RWMB_URL_Field extends MASHSB_RWMB_Text_Field
6
- {
7
- /**
8
- * Get the attributes for a field
9
- *
10
- * @param array $field
11
- * @param mixed $value
12
- *
13
- * @return array
14
- */
15
- static function get_attributes( $field, $value = null )
16
- {
17
- $attributes = parent::get_attributes( $field, $value );
18
- $attributes['type'] = 'url';
19
-
20
- return $attributes;
21
- }
22
-
23
- /**
24
- * Sanitize url
25
- *
26
- * @param mixed $new
27
- * @param mixed $old
28
- * @param int $post_id
29
- * @param array $field
30
- *
31
- * @return string
32
- */
33
- static function value( $new, $old, $post_id, $field )
34
- {
35
- return is_array( $new ) ? array_map( 'esc_url_raw', $new ) : esc_url_raw( $new );
36
- }
37
- }
1
+ <?php
2
+ /**
3
+ * HTML5 URL field class.
4
+ */
5
+ class MASHSB_RWMB_URL_Field extends MASHSB_RWMB_Text_Field
6
+ {
7
+ /**
8
+ * Get the attributes for a field
9
+ *
10
+ * @param array $field
11
+ * @param mixed $value
12
+ *
13
+ * @return array
14
+ */
15
+ static function get_attributes( $field, $value = null )
16
+ {
17
+ $attributes = parent::get_attributes( $field, $value );
18
+ $attributes['type'] = 'url';
19
+
20
+ return $attributes;
21
+ }
22
+
23
+ /**
24
+ * Sanitize url
25
+ *
26
+ * @param mixed $new
27
+ * @param mixed $old
28
+ * @param int $post_id
29
+ * @param array $field
30
+ *
31
+ * @return string
32
+ */
33
+ static function value( $new, $old, $post_id, $field )
34
+ {
35
+ return is_array( $new ) ? array_map( 'esc_url_raw', $new ) : esc_url_raw( $new );
36
+ }
37
+ }
includes/admin/meta-box/inc/fields/user.php CHANGED
@@ -1,89 +1,89 @@
1
- <?php
2
- /**
3
- * User field class.
4
- */
5
- class MASHSB_RWMB_User_Field extends MASHSB_RWMB_Object_Choice_Field
6
- {
7
- /**
8
- * Normalize parameters for field
9
- *
10
- * @param array $field
11
- *
12
- * @return array
13
- */
14
- static function normalize( $field )
15
- {
16
- /**
17
- * Set default field args
18
- */
19
- $field = parent::normalize( $field );
20
-
21
- /**
22
- * Prevent select tree for user since it's not hierarchical
23
- */
24
- $field['field_type'] = 'select_tree' === $field['field_type'] ? 'select' : $field['field_type'];
25
-
26
- /**
27
- * Set to always flat
28
- */
29
- $field['flatten'] = true;
30
-
31
- /**
32
- * Set default placeholder
33
- */
34
- $field['placeholder'] = empty( $field['placeholder'] ) ? __( 'Select an user', 'meta-box' ) : $field['placeholder'];
35
-
36
- /**
37
- * Set default query args
38
- */
39
- $field['query_args'] = wp_parse_args( $field['query_args'], array(
40
- 'orderby' => 'display_name',
41
- 'order' => 'asc',
42
- 'role' => '',
43
- 'fields' => 'all',
44
- ) );
45
-
46
- return $field;
47
- }
48
-
49
- /**
50
- * Get users
51
- *
52
- * @param array $field
53
- *
54
- * @return array
55
- */
56
- static function get_options( $field )
57
- {
58
- $options = get_users( $field['query_args'] );
59
- return $options;
60
- }
61
-
62
- /**
63
- * Get field names of object to be used by walker
64
- *
65
- * @return array
66
- */
67
- static function get_db_fields()
68
- {
69
- return array(
70
- 'parent' => 'parent',
71
- 'id' => 'ID',
72
- 'label' => 'display_name',
73
- );
74
- }
75
-
76
- /**
77
- * Get option label
78
- *
79
- * @param string $value Option value
80
- * @param array $field Field parameter
81
- *
82
- * @return string
83
- */
84
- static function get_option_label( $value, $field )
85
- {
86
- $user = get_userdata( $value );
87
- return '<a href="' . get_author_posts_url( $value ) . '">' . $user->display_name . '</a>';
88
- }
89
- }
1
+ <?php
2
+ /**
3
+ * User field class.
4
+ */
5
+ class MASHSB_RWMB_User_Field extends MASHSB_RWMB_Object_Choice_Field
6
+ {
7
+ /**
8
+ * Normalize parameters for field
9
+ *
10
+ * @param array $field
11
+ *
12
+ * @return array
13
+ */
14
+ static function normalize( $field )
15
+ {
16
+ /**
17
+ * Set default field args
18
+ */
19
+ $field = parent::normalize( $field );
20
+
21
+ /**
22
+ * Prevent select tree for user since it's not hierarchical
23
+ */
24
+ $field['field_type'] = 'select_tree' === $field['field_type'] ? 'select' : $field['field_type'];
25
+
26
+ /**
27
+ * Set to always flat
28
+ */
29
+ $field['flatten'] = true;
30
+
31
+ /**
32
+ * Set default placeholder
33
+ */
34
+ $field['placeholder'] = empty( $field['placeholder'] ) ? __( 'Select an user', 'meta-box' ) : $field['placeholder'];
35
+
36
+ /**
37
+ * Set default query args
38
+ */
39
+ $field['query_args'] = wp_parse_args( $field['query_args'], array(
40
+ 'orderby' => 'display_name',
41
+ 'order' => 'asc',
42
+ 'role' => '',
43
+ 'fields' => 'all',
44
+ ) );
45
+
46
+ return $field;
47
+ }
48
+
49
+ /**
50
+ * Get users
51
+ *
52
+ * @param array $field
53
+ *
54
+ * @return array
55
+ */
56
+ static function get_options( $field )
57
+ {
58
+ $options = get_users( $field['query_args'] );
59
+ return $options;
60
+ }
61
+
62
+ /**
63
+ * Get field names of object to be used by walker
64
+ *
65
+ * @return array
66
+ */
67
+ static function get_db_fields()
68
+ {
69
+ return array(
70
+ 'parent' => 'parent',
71
+ 'id' => 'ID',
72
+ 'label' => 'display_name',
73
+ );
74
+ }
75
+
76
+ /**
77
+ * Get option label
78
+ *
79
+ * @param string $value Option value
80
+ * @param array $field Field parameter
81
+ *
82
+ * @return string
83
+ */
84
+ static function get_option_label( $value, $field )
85
+ {
86
+ $user = get_userdata( $value );
87
+ return '<a href="' . get_author_posts_url( $value ) . '">' . $user->display_name . '</a>';
88
+ }
89
+ }
includes/admin/meta-box/inc/fields/wysiwyg.php CHANGED
@@ -1,106 +1,106 @@
1
- <?php
2
-
3
- /**
4
- * WYSIWYG (editor) field class.
5
- */
6
- class MASHSB_RWMB_Wysiwyg_Field extends MASHSB_RWMB_Field
7
- {
8
- /**
9
- * Array of cloneable editors.
10
- * @var array
11
- */
12
- static $cloneable_editors = array();
13
-
14
- /**
15
- * Enqueue scripts and styles.
16
- */
17
- static function admin_enqueue_scripts()
18
- {
19
- wp_enqueue_style( 'mashsb-rwmb-wysiwyg', MASHSB_RWMB_CSS_URL . 'wysiwyg.css', array(), MASHSB_RWMB_VER );
20
- wp_enqueue_script( 'mashsb-rwmb-wysiwyg', MASHSB_RWMB_JS_URL . 'wysiwyg.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
21
- }
22
-
23
- /**
24
- * Change field value on save
25
- *
26
- * @param mixed $new
27
- * @param mixed $old
28
- * @param int $post_id
29
- * @param array $field
30
- * @return string
31
- */
32
- static function value( $new, $old, $post_id, $field )
33
- {
34
- if ( $field['raw'] )
35
- {
36
- $meta = $new;
37
- }
38
- elseif ( $field['clone'] )
39
- {
40
- $meta = array_map( 'wpautop', $new );
41
- }
42
- else
43
- {
44
- $meta = wpautop( $new );
45
- }
46
-
47
- return $meta;
48
- }
49
-
50
- /**
51
- * Get field HTML
52
- *
53
- * @param mixed $meta
54
- * @param array $field
55
- * @return string
56
- */
57
- static function html( $meta, $field )
58
- {
59
- // Using output buffering because wp_editor() echos directly
60
- ob_start();
61
-
62
- $field['options']['textarea_name'] = $field['field_name'];
63
- $attributes = self::get_attributes( $field );
64
-
65
- // Use new wp_editor() since WP 3.3
66
- wp_editor( $meta, $attributes['id'], $field['options'] );
67
-
68
- return ob_get_clean();
69
- }
70
-
71
- /**
72
- * Escape meta for field output
73
- *
74
- * @param mixed $meta
75
- * @return mixed
76
- */
77
- static function esc_meta( $meta )
78
- {
79
- return $meta;
80
- }
81
-
82
- /**
83
- * Normalize parameters for field
84
- *
85
- * @param array $field
86
- * @return array
87
- */
88
- static function normalize( $field )
89
- {
90
- $field = parent::normalize( $field );
91
- $field = wp_parse_args( $field, array(
92
- 'raw' => false,
93
- 'options' => array(),
94
- ) );
95
-
96
- $field['options'] = wp_parse_args( $field['options'], array(
97
- 'editor_class' => 'mashsb-rwmb-wysiwyg',
98
- 'dfw' => true, // Use default WordPress full screen UI
99
- ) );
100
-
101
- // Keep the filter to be compatible with previous versions
102
- $field['options'] = apply_filters( 'rwmb_wysiwyg_settings', $field['options'] );
103
-
104
- return $field;
105
- }
106
- }
1
+ <?php
2
+
3
+ /**
4
+ * WYSIWYG (editor) field class.
5
+ */
6
+ class MASHSB_RWMB_Wysiwyg_Field extends MASHSB_RWMB_Field
7
+ {
8
+ /**
9
+ * Array of cloneable editors.
10
+ * @var array
11
+ */
12
+ static $cloneable_editors = array();
13
+
14
+ /**
15
+ * Enqueue scripts and styles.
16
+ */
17
+ static function admin_enqueue_scripts()
18
+ {
19
+ wp_enqueue_style( 'mashsb-rwmb-wysiwyg', MASHSB_RWMB_CSS_URL . 'wysiwyg.css', array(), MASHSB_RWMB_VER );
20
+ wp_enqueue_script( 'mashsb-rwmb-wysiwyg', MASHSB_RWMB_JS_URL . 'wysiwyg.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
21
+ }
22
+
23
+ /**
24
+ * Change field value on save
25
+ *
26
+ * @param mixed $new
27
+ * @param mixed $old
28
+ * @param int $post_id
29
+ * @param array $field
30
+ * @return string
31
+ */
32
+ static function value( $new, $old, $post_id, $field )
33
+ {
34
+ if ( $field['raw'] )
35
+ {
36
+ $meta = $new;
37
+ }
38
+ elseif ( $field['clone'] )
39
+ {
40
+ $meta = array_map( 'wpautop', $new );
41
+ }
42
+ else
43
+ {
44
+ $meta = wpautop( $new );
45
+ }
46
+
47
+ return $meta;
48
+ }
49
+
50
+ /**
51
+ * Get field HTML
52
+ *
53
+ * @param mixed $meta
54
+ * @param array $field
55
+ * @return string
56
+ */
57
+ static function html( $meta, $field )
58
+ {
59
+ // Using output buffering because wp_editor() echos directly
60
+ ob_start();
61
+
62
+ $field['options']['textarea_name'] = $field['field_name'];
63
+ $attributes = self::get_attributes( $field );
64
+
65
+ // Use new wp_editor() since WP 3.3
66
+ wp_editor( $meta, $attributes['id'], $field['options'] );
67
+
68
+ return ob_get_clean();
69
+ }
70
+
71
+ /**
72
+ * Escape meta for field output
73
+ *
74
+ * @param mixed $meta
75
+ * @return mixed
76
+ */
77
+ static function esc_meta( $meta )
78
+ {
79
+ return $meta;
80
+ }
81
+
82
+ /**
83
+ * Normalize parameters for field
84
+ *
85
+ * @param array $field
86
+ * @return array
87
+ */
88
+ static function normalize( $field )
89
+ {
90
+ $field = parent::normalize( $field );
91
+ $field = wp_parse_args( $field, array(
92
+ 'raw' => false,
93
+ 'options' => array(),
94
+ ) );
95
+
96
+ $field['options'] = wp_parse_args( $field['options'], array(
97
+ 'editor_class' => 'mashsb-rwmb-wysiwyg',
98
+ 'dfw' => true, // Use default WordPress full screen UI
99
+ ) );
100
+
101
+ // Keep the filter to be compatible with previous versions
102
+ $field['options'] = apply_filters( 'rwmb_wysiwyg_settings', $field['options'] );
103
+
104
+ return $field;
105
+ }
106
+ }
includes/admin/meta-box/inc/functions.php CHANGED
@@ -1,136 +1,136 @@
1
- <?php
2
- /**
3
- * Plugin public functions.
4
- */
5
-
6
- if ( ! function_exists( 'mashsb_rwmb_meta' ) )
7
- {
8
- /**
9
- * Get post meta
10
- *
11
- * @param string $key Meta key. Required.
12
- * @param int|null $post_id Post ID. null for current post. Optional
13
- * @param array $args Array of arguments. Optional.
14
- *
15
- * @return mixed
16
- */
17
- function mashsb_rwmb_meta( $key, $args = array(), $post_id = null )
18
- {
19
- /**
20
- * If meta boxes is registered in the backend only, we can't get field's params
21
- * This is for backward compatibility with version < 4.8.0
22
- */
23
- $field = MASHSB_RWMB_Helper::find_field( $key );
24
- if ( false === $field || isset( $args['type'] ) )
25
- {
26
- return apply_filters( 'mashsb_rwmb_meta', MASHSB_RWMB_Helper::meta( $key, $args, $post_id ) );
27
- }
28
- $meta = in_array( $field['type'], array( 'oembed', 'map' ) ) ?
29
- mashsb_rwmb_the_value( $key, $args, $post_id, false ) :
30
- mashsb_rwmb_the_value( $key, $args, $post_id );
31
- return apply_filters( 'mashsb_rwmb_meta', $meta, $key, $args, $post_id );
32
- }
33
- }
34
-
35
- if ( ! function_exists( 'mashsb_rwmb_the_value' ) )
36
- {
37
- /**
38
- * Get value of custom field.
39
- * This is used to replace old version of mashsb_rwmb_meta key.
40
- *
41
- * @param string $field_id Field ID. Required.
42
- * @param array $args Additional arguments. Rarely used. See specific fields for details
43
- * @param int|null $post_id Post ID. null for current post. Optional.
44
- *
45
- * @return mixed false if field doesn't exist. Field value otherwise.
46
- */
47
- function mashsb_rwmb_the_value( $field_id, $args = array(), $post_id = null )
48
- {
49
- $field = MASHSB_RWMB_Helper::find_field( $field_id );
50
-
51
- // Get field value
52
- $value = $field ? call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_value' ), $field, $args, $post_id ) : false;
53
-
54
- /**
55
- * Allow developers to change the returned value of field
56
- * For version < 4.8.2, the filter name was 'rwmb_get_field'
57
- *
58
- * @param mixed $value Field value
59
- * @param array $field Field parameter
60
- * @param array $args Additional arguments. Rarely used. See specific fields for details
61
- * @param int|null $post_id Post ID. null for current post. Optional.
62
- */
63
- $value = apply_filters( 'mashsb_rwmb_the_value', $value, $field, $args, $post_id );
64
-
65
- return $value;
66
- }
67
- }
68
-
69
- if ( ! function_exists( 'mashsb_rwmb_the_value' ) )
70
- {
71
- /**
72
- * Display the value of a field
73
- *
74
- * @param string $field_id Field ID. Required.
75
- * @param array $args Additional arguments. Rarely used. See specific fields for details
76
- * @param int|null $post_id Post ID. null for current post. Optional.
77
- * @param bool $echo Display field meta value? Default `true` which works in almost all cases. We use `false` for the [mashsb_rwmb_meta] shortcode
78
- *
79
- * @return string
80
- */
81
- function mashsb_rwmb_the_value( $field_id, $args = array(), $post_id = null, $echo = true )
82
- {
83
- // Find field
84
- $field = MASHSB_RWMB_Helper::find_field( $field_id );
85
-
86
- if ( ! $field )
87
- return '';
88
-
89
- $output = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'the_value' ), $field, $args, $post_id );
90
-
91
- /**
92
- * Allow developers to change the returned value of field
93
- * For version < 4.8.2, the filter name was 'rwmb_get_field'
94
- *
95
- * @param mixed $value Field HTML output
96
- * @param array $field Field parameter
97
- * @param array $args Additional arguments. Rarely used. See specific fields for details
98
- * @param int|null $post_id Post ID. null for current post. Optional.
99
- */
100
- $output = apply_filters( 'mashsb_rwmb_the_value', $output, $field, $args, $post_id );
101
-
102
- if ( $echo )
103
- echo $output;
104
-
105
- return $output;
106
- }
107
- }
108
-
109
- if ( ! function_exists( 'mashsb_rwmb_meta_shortcode' ) )
110
- {
111
- /**
112
- * Shortcode to display meta value
113
- *
114
- * @param array $atts Shortcode attributes, same as meta() function, but has more "meta_key" parameter
115
- *
116
- * @see meta() function below
117
- *
118
- * @return string
119
- */
120
- function mashsb_rwmb_meta_shortcode( $atts )
121
- {
122
- $atts = wp_parse_args( $atts, array(
123
- 'post_id' => get_the_ID(),
124
- ) );
125
- if ( empty( $atts['meta_key'] ) )
126
- return '';
127
-
128
- $field_id = $atts['meta_key'];
129
- $post_id = $atts['post_id'];
130
- unset( $atts['meta_key'], $atts['post_id'] );
131
-
132
- return mashsb_rwmb_the_value( $field_id, $atts, $post_id, false );
133
- }
134
-
135
- add_shortcode( 'mashsb_rwmb_meta', 'mashsb_rwmb_meta_shortcode' );
136
- }
1
+ <?php
2
+ /**
3
+ * Plugin public functions.
4
+ */
5
+
6
+ if ( ! function_exists( 'mashsb_rwmb_meta' ) )
7
+ {
8
+ /**
9
+ * Get post meta
10
+ *
11
+ * @param string $key Meta key. Required.
12
+ * @param int|null $post_id Post ID. null for current post. Optional
13
+ * @param array $args Array of arguments. Optional.
14
+ *
15
+ * @return mixed
16
+ */
17
+ function mashsb_rwmb_meta( $key, $args = array(), $post_id = null )
18
+ {
19
+ /**
20
+ * If meta boxes is registered in the backend only, we can't get field's params
21
+ * This is for backward compatibility with version < 4.8.0
22
+ */
23
+ $field = MASHSB_RWMB_Helper::find_field( $key );
24
+ if ( false === $field || isset( $args['type'] ) )
25
+ {
26
+ return apply_filters( 'mashsb_rwmb_meta', MASHSB_RWMB_Helper::meta( $key, $args, $post_id ) );
27
+ }
28
+ $meta = in_array( $field['type'], array( 'oembed', 'map' ) ) ?
29
+ mashsb_rwmb_the_value( $key, $args, $post_id, false ) :
30
+ mashsb_rwmb_the_value( $key, $args, $post_id );
31
+ return apply_filters( 'mashsb_rwmb_meta', $meta, $key, $args, $post_id );
32
+ }
33
+ }
34
+
35
+ if ( ! function_exists( 'mashsb_rwmb_the_value' ) )
36
+ {
37
+ /**
38
+ * Get value of custom field.
39
+ * This is used to replace old version of mashsb_rwmb_meta key.
40
+ *
41
+ * @param string $field_id Field ID. Required.
42
+ * @param array $args Additional arguments. Rarely used. See specific fields for details
43
+ * @param int|null $post_id Post ID. null for current post. Optional.
44
+ *
45
+ * @return mixed false if field doesn't exist. Field value otherwise.
46
+ */
47
+ function mashsb_rwmb_the_value( $field_id, $args = array(), $post_id = null )
48
+ {
49
+ $field = MASHSB_RWMB_Helper::find_field( $field_id );
50
+
51
+ // Get field value
52
+ $value = $field ? call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'get_value' ), $field, $args, $post_id ) : false;
53
+
54
+ /**
55
+ * Allow developers to change the returned value of field
56
+ * For version < 4.8.2, the filter name was 'rwmb_get_field'
57
+ *
58
+ * @param mixed $value Field value
59
+ * @param array $field Field parameter
60
+ * @param array $args Additional arguments. Rarely used. See specific fields for details
61
+ * @param int|null $post_id Post ID. null for current post. Optional.
62
+ */
63
+ $value = apply_filters( 'mashsb_rwmb_the_value', $value, $field, $args, $post_id );
64
+
65
+ return $value;
66
+ }
67
+ }
68
+
69
+ if ( ! function_exists( 'mashsb_rwmb_the_value' ) )
70
+ {
71
+ /**
72
+ * Display the value of a field
73
+ *
74
+ * @param string $field_id Field ID. Required.
75
+ * @param array $args Additional arguments. Rarely used. See specific fields for details
76
+ * @param int|null $post_id Post ID. null for current post. Optional.
77
+ * @param bool $echo Display field meta value? Default `true` which works in almost all cases. We use `false` for the [mashsb_rwmb_meta] shortcode
78
+ *
79
+ * @return string
80
+ */
81
+ function mashsb_rwmb_the_value( $field_id, $args = array(), $post_id = null, $echo = true )
82
+ {
83
+ // Find field
84
+ $field = MASHSB_RWMB_Helper::find_field( $field_id );
85
+
86
+ if ( ! $field )
87
+ return '';
88
+
89
+ $output = call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'the_value' ), $field, $args, $post_id );
90
+
91
+ /**
92
+ * Allow developers to change the returned value of field
93
+ * For version < 4.8.2, the filter name was 'rwmb_get_field'
94
+ *
95
+ * @param mixed $value Field HTML output
96
+ * @param array $field Field parameter
97
+ * @param array $args Additional arguments. Rarely used. See specific fields for details
98
+ * @param int|null $post_id Post ID. null for current post. Optional.
99
+ */
100
+ $output = apply_filters( 'mashsb_rwmb_the_value', $output, $field, $args, $post_id );
101
+
102
+ if ( $echo )
103
+ echo $output;
104
+
105
+ return $output;
106
+ }
107
+ }
108
+
109
+ if ( ! function_exists( 'mashsb_rwmb_meta_shortcode' ) )
110
+ {
111
+ /**
112
+ * Shortcode to display meta value
113
+ *
114
+ * @param array $atts Shortcode attributes, same as meta() function, but has more "meta_key" parameter
115
+ *
116
+ * @see meta() function below
117
+ *
118
+ * @return string
119
+ */
120
+ function mashsb_rwmb_meta_shortcode( $atts )
121
+ {
122
+ $atts = wp_parse_args( $atts, array(
123
+ 'post_id' => get_the_ID(),
124
+ ) );
125
+ if ( empty( $atts['meta_key'] ) )
126
+ return '';
127
+
128
+ $field_id = $atts['meta_key'];
129
+ $post_id = $atts['post_id'];
130
+ unset( $atts['meta_key'], $atts['post_id'] );
131
+
132
+ return mashsb_rwmb_the_value( $field_id, $atts, $post_id, false );
133
+ }
134
+
135
+ add_shortcode( 'mashsb_rwmb_meta', 'mashsb_rwmb_meta_shortcode' );
136
+ }
includes/admin/meta-box/inc/helper.php CHANGED
@@ -1,135 +1,135 @@
1
- <?php
2
- /**
3
- * The helper class.
4
- */
5
-
6
- /**
7
- * Wrapper class for helper functions.
8
- */
9
- class MASHSB_RWMB_Helper
10
- {
11
- /**
12
- * Stores all registered fields
13
- * @var array
14
- */
15
- private static $fields = array();
16
-
17
- /**
18
- * Hash all fields into an indexed array for search
19
- * @param string $post_type Post type
20
- */
21
- public static function hash_fields( $post_type )
22
- {
23
- self::$fields[$post_type] = array();
24
-
25
- $meta_boxes = MASHSB_RWMB_Core::get_meta_boxes();
26
- foreach ( $meta_boxes as $meta_box )
27
- {
28
- $meta_box = MASHSB_RW_Meta_Box::normalize( $meta_box );
29
- if ( ! in_array( $post_type, $meta_box['post_types'] ) )
30
- {
31
- continue;
32
- }
33
- foreach ( $meta_box['fields'] as $field )
34
- {
35
- if ( ! empty( $field['id'] ) )
36
- {
37
- self::$fields[$post_type][$field['id']] = $field;
38
- }
39
- }
40
- }
41
- }
42
-
43
- /**
44
- * Find field by field ID.
45
- * This function finds field in meta boxes registered by 'rwmb_meta_boxes' filter.
46
- *
47
- * @param string $field_id Field ID
48
- * @param int $post_id
49
- * @return array|false Field params (array) if success. False otherwise.
50
- */
51
- public static function find_field( $field_id, $post_id = null )
52
- {
53
- $post_type = get_post_type( $post_id );
54
- if ( empty( self::$fields[$post_type] ) )
55
- {
56
- self::hash_fields( $post_type );
57
- }
58
- $fields = self::$fields[$post_type];
59
- if ( ! isset( $fields[$field_id] ) )
60
- {
61
- return false;
62
- }
63
- $field = $fields[$field_id];
64
- return call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'normalize' ), $field );
65
- }
66
-
67
- /**
68
- * Get post meta
69
- *
70
- * @param string $key Meta key. Required.
71
- * @param int|null $post_id Post ID. null for current post. Optional
72
- * @param array $args Array of arguments. Optional.
73
- *
74
- * @return mixed
75
- */
76
- public static function meta( $key, $args = array(), $post_id = null )
77
- {
78
- $post_id = empty( $post_id ) ? get_the_ID() : $post_id;
79
- $args = wp_parse_args( $args, array(
80
- 'type' => 'text',
81
- 'multiple' => false,
82
- 'clone' => false,
83
- ) );
84
- // Always set 'multiple' true for following field types
85
- if ( in_array( $args['type'], array( 'checkbox_list', 'autocomplete', 'file', 'file_advanced', 'image', 'image_advanced', 'plupload_image', 'thickbox_image' ) ) )
86
- {
87
- $args['multiple'] = true;
88
- }
89
-
90
- $field = array(
91
- 'id' => $key,
92
- 'type' => $args['type'],
93
- 'clone' => $args['clone'],
94
- 'multiple' => $args['multiple'],
95
- );
96
- $class = MASHSB_RW_Meta_Box::get_class_name( $field );
97
-
98
- switch ( $args['type'] )
99
- {
100
- case 'taxonomy_advanced':
101
- if ( empty( $args['taxonomy'] ) )
102
- {
103
- break;
104
- }
105
- $meta = get_post_meta( $post_id, $key, ! $args['multiple'] );
106
- $term_ids = wp_parse_id_list( $meta );
107
- // Allow to pass more arguments to "get_terms"
108
- $func_args = wp_parse_args( array(
109
- 'include' => $term_ids,
110
- 'hide_empty' => false,
111
- ), $args );
112
- unset( $func_args['type'], $func_args['taxonomy'], $func_args['multiple'] );
113
- $meta = get_terms( $args['taxonomy'], $func_args );
114
- break;
115
- case 'taxonomy':
116
- $meta = empty( $args['taxonomy'] ) ? array() : get_the_terms( $post_id, $args['taxonomy'] );
117
- break;
118
- case 'map':
119
- $field = array(
120
- 'id' => $key,
121
- 'multiple' => false,
122
- 'clone' => false,
123
- );
124
- $meta = MASHSB_RWMB_Map_Field::the_value( $field, $args, $post_id );
125
- break;
126
- case 'oembed':
127
- $meta = MASHSB_RWMB_OEmbed_Field::the_value( $field, $args, $post_id );
128
- break;
129
- default:
130
- $meta = call_user_func( array( $class, 'get_value' ), $field, $args, $post_id );
131
- break;
132
- }
133
- return apply_filters( 'rwmb_meta', $meta, $key, $args, $post_id );
134
- }
135
- }
1
+ <?php
2
+ /**
3
+ * The helper class.
4
+ */
5
+
6
+ /**
7
+ * Wrapper class for helper functions.
8
+ */
9
+ class MASHSB_RWMB_Helper
10
+ {
11
+ /**
12
+ * Stores all registered fields
13
+ * @var array
14
+ */
15
+ private static $fields = array();
16
+
17
+ /**
18
+ * Hash all fields into an indexed array for search
19
+ * @param string $post_type Post type
20
+ */
21
+ public static function hash_fields( $post_type )
22
+ {
23
+ self::$fields[$post_type] = array();
24
+
25
+ $meta_boxes = MASHSB_RWMB_Core::get_meta_boxes();
26
+ foreach ( $meta_boxes as $meta_box )
27
+ {
28
+ $meta_box = MASHSB_RW_Meta_Box::normalize( $meta_box );
29
+ if ( ! in_array( $post_type, $meta_box['post_types'] ) )
30
+ {
31
+ continue;
32
+ }
33
+ foreach ( $meta_box['fields'] as $field )
34
+ {
35
+ if ( ! empty( $field['id'] ) )
36
+ {
37
+ self::$fields[$post_type][$field['id']] = $field;
38
+ }
39
+ }
40
+ }
41
+ }
42
+
43
+ /**
44
+ * Find field by field ID.
45
+ * This function finds field in meta boxes registered by 'rwmb_meta_boxes' filter.
46
+ *
47
+ * @param string $field_id Field ID
48
+ * @param int $post_id
49
+ * @return array|false Field params (array) if success. False otherwise.
50
+ */
51
+ public static function find_field( $field_id, $post_id = null )
52
+ {
53
+ $post_type = get_post_type( $post_id );
54
+ if ( empty( self::$fields[$post_type] ) )
55
+ {
56
+ self::hash_fields( $post_type );
57
+ }
58
+ $fields = self::$fields[$post_type];
59
+ if ( ! isset( $fields[$field_id] ) )
60
+ {
61
+ return false;
62
+ }
63
+ $field = $fields[$field_id];
64
+ return call_user_func( array( MASHSB_RW_Meta_Box::get_class_name( $field ), 'normalize' ), $field );
65
+ }
66
+
67
+ /**
68
+ * Get post meta
69
+ *
70
+ * @param string $key Meta key. Required.
71
+ * @param int|null $post_id Post ID. null for current post. Optional
72
+ * @param array $args Array of arguments. Optional.
73
+ *
74
+ * @return mixed
75
+ */
76
+ public static function meta( $key, $args = array(), $post_id = null )
77
+ {
78
+ $post_id = empty( $post_id ) ? get_the_ID() : $post_id;
79
+ $args = wp_parse_args( $args, array(
80
+ 'type' => 'text',
81
+ 'multiple' => false,
82
+ 'clone' => false,
83
+ ) );
84
+ // Always set 'multiple' true for following field types
85
+ if ( in_array( $args['type'], array( 'checkbox_list', 'autocomplete', 'file', 'file_advanced', 'image', 'image_advanced', 'plupload_image', 'thickbox_image' ) ) )
86
+ {
87
+ $args['multiple'] = true;
88
+ }
89
+
90
+ $field = array(
91
+ 'id' => $key,
92
+ 'type' => $args['type'],
93
+ 'clone' => $args['clone'],
94
+ 'multiple' => $args['multiple'],
95
+ );
96
+ $class = MASHSB_RW_Meta_Box::get_class_name( $field );
97
+
98
+ switch ( $args['type'] )
99
+ {
100
+ case 'taxonomy_advanced':
101
+ if ( empty( $args['taxonomy'] ) )
102
+ {
103
+ break;
104
+ }
105
+ $meta = get_post_meta( $post_id, $key, ! $args['multiple'] );
106
+ $term_ids = wp_parse_id_list( $meta );
107
+ // Allow to pass more arguments to "get_terms"
108
+ $func_args = wp_parse_args( array(
109
+ 'include' => $term_ids,
110
+ 'hide_empty' => false,
111
+ ), $args );
112
+ unset( $func_args['type'], $func_args['taxonomy'], $func_args['multiple'] );
113
+ $meta = get_terms( $args['taxonomy'], $func_args );
114
+ break;
115
+ case 'taxonomy':
116
+ $meta = empty( $args['taxonomy'] ) ? array() : get_the_terms( $post_id, $args['taxonomy'] );
117
+ break;
118
+ case 'map':
119
+ $field = array(
120
+ 'id' => $key,
121
+ 'multiple' => false,
122
+ 'clone' => false,
123
+ );
124
+ $meta = MASHSB_RWMB_Map_Field::the_value( $field, $args, $post_id );
125
+ break;
126
+ case 'oembed':
127
+ $meta = MASHSB_RWMB_OEmbed_Field::the_value( $field, $args, $post_id );
128
+ break;
129
+ default:
130
+ $meta = call_user_func( array( $class, 'get_value' ), $field, $args, $post_id );
131
+ break;
132
+ }
133
+ return apply_filters( 'rwmb_meta', $meta, $key, $args, $post_id );
134
+ }
135
+ }
includes/admin/meta-box/inc/loader.php CHANGED
@@ -1,132 +1,132 @@
1
- <?php
2
- /**
3
- * Load plugin's files with check for installing it as a standalone plugin or
4
- * a module of a theme / plugin. If standalone plugin is already installed, it
5
- * will take higher priority.
6
- * @package Meta Box
7
- */
8
-
9
- /**
10
- * Plugin loader class.
11
- * @package Meta Box
12
- */
13
- class MASHSB_RWMB_Loader
14
- {
15
- /**
16
- * Class constructor.
17
- */
18
- public function __construct()
19
- {
20
- $this->constants();
21
- spl_autoload_register( array( $this, 'autoload' ) );
22
- $this->init();
23
- }
24
-
25
- /**
26
- * Define plugin constants.
27
- */
28
- public function constants()
29
- {
30
- // Script version, used to add version for scripts and styles
31
- define( 'MASHSB_RWMB_VER', '4.8.4' );
32
-
33
- list( $path, $url ) = self::get_path();
34
-
35
- // Plugin URLs, for fast enqueuing scripts and styles
36
- define( 'MASHSB_RWMB_URL', $url );
37
- define( 'MASHSB_RWMB_JS_URL', trailingslashit( MASHSB_RWMB_URL . 'js' ) );
38
- define( 'MASHSB_RWMB_CSS_URL', trailingslashit( MASHSB_RWMB_URL . 'css' ) );
39
-
40
- // Plugin paths, for including files
41
- define( 'MASHSB_RWMB_DIR', $path );
42
- define( 'MASHSB_RWMB_INC_DIR', trailingslashit( MASHSB_RWMB_DIR . 'inc' ) );
43
- define( 'MASHSB_RWMB_FIELDS_DIR', trailingslashit( MASHSB_RWMB_INC_DIR . 'fields' ) );
44
- }
45
-
46
- /**
47
- * Get plugin base path and URL.
48
- * The method is static and can be used in extensions.
49
- * @link http://www.deluxeblogtips.com/2013/07/get-url-of-php-file-in-wordpress.html
50
- * @param string $base Base folder path
51
- * @return array Path and URL.
52
- */
53
- public static function get_path( $base = '' )
54
- {
55
- // Plugin base path
56
- $path = $base ? $base : dirname( dirname( __FILE__ ) );
57
- $path = wp_normalize_path( untrailingslashit( $path ) );
58
-
59
- // Installed as a plugin?
60
- if ( 0 === strpos( $path, wp_normalize_path( WP_PLUGIN_DIR ) ) || 0 === strpos( $path, wp_normalize_path( WPMU_PLUGIN_DIR ) ) )
61
- {
62
- $url = plugins_url( '', $path . '/' . basename( $path ) );
63
- }
64
- // Included into themes
65
- else
66
- {
67
- // Get plugin base URL
68
- $content_url = untrailingslashit( dirname( dirname( get_stylesheet_directory_uri() ) ) );
69
- $content_dir = untrailingslashit( WP_CONTENT_DIR );
70
- $url = str_replace( wp_normalize_path( $content_dir ), $content_url, $path );
71
- }
72
-
73
- $path = trailingslashit( $path );
74
- $url = trailingslashit( $url );
75
-
76
- return array( $path, $url );
77
- }
78
-
79
- /**
80
- * Autoload fields' classes.
81
- * @param string $class Class name
82
- */
83
- public function autoload( $class )
84
- {
85
- // Only load plugin's classes
86
- if ( 'MASHSB_RW_Meta_Box' != $class && 0 !== strpos( $class, 'MASHSB_RWMB_' ) )
87
- {
88
- return;
89
- }
90
-
91
- // Get file name
92
- $file = 'meta-box';
93
- if ( 'MASHSB_RW_Meta_Box' != $class )
94
- {
95
- // Remove prefix 'MASHSB_RWMB_'
96
- $file = substr( $class, 12 );
97
-
98
- // Optional '_Field'
99
- $file = preg_replace( '/_Field$/', '', $file );
100
- }
101
-
102
- $file = strtolower( str_replace( '_', '-', $file ) ) . '.php';
103
-
104
- $dirs = array( MASHSB_RWMB_INC_DIR, MASHSB_RWMB_FIELDS_DIR, trailingslashit( MASHSB_RWMB_INC_DIR . 'walkers' ) );
105
- foreach ( $dirs as $dir )
106
- {
107
- if ( file_exists( $dir . $file ) )
108
- {
109
- require $dir . $file;
110
- return;
111
- }
112
- }
113
- }
114
-
115
- /**
116
- * Initialize plugin.
117
- */
118
- public function init()
119
- {
120
- // Plugin core
121
- new MASHSB_RWMB_Core;
122
-
123
- if ( is_admin() )
124
- {
125
- // Validation module
126
- new MASHSB_RWMB_Validation;
127
- }
128
-
129
- // Public functions
130
- require MASHSB_RWMB_INC_DIR . 'functions.php';
131
- }
132
- }
1
+ <?php
2
+ /**
3
+ * Load plugin's files with check for installing it as a standalone plugin or
4
+ * a module of a theme / plugin. If standalone plugin is already installed, it
5
+ * will take higher priority.
6
+ * @package Meta Box
7
+ */
8
+
9
+ /**
10
+ * Plugin loader class.
11
+ * @package Meta Box
12
+ */
13
+ class MASHSB_RWMB_Loader
14
+ {
15
+ /**
16
+ * Class constructor.
17
+ */
18
+ public function __construct()
19
+ {
20
+ $this->constants();
21
+ spl_autoload_register( array( $this, 'autoload' ) );
22
+ $this->init();
23
+ }
24
+
25
+ /**
26
+ * Define plugin constants.
27
+ */
28
+ public function constants()
29
+ {
30
+ // Script version, used to add version for scripts and styles
31
+ define( 'MASHSB_RWMB_VER', '4.8.4' );
32
+
33
+ list( $path, $url ) = self::get_path();
34
+
35
+ // Plugin URLs, for fast enqueuing scripts and styles
36
+ define( 'MASHSB_RWMB_URL', $url );
37
+ define( 'MASHSB_RWMB_JS_URL', trailingslashit( MASHSB_RWMB_URL . 'js' ) );
38
+ define( 'MASHSB_RWMB_CSS_URL', trailingslashit( MASHSB_RWMB_URL . 'css' ) );
39
+
40
+ // Plugin paths, for including files
41
+ define( 'MASHSB_RWMB_DIR', $path );
42
+ define( 'MASHSB_RWMB_INC_DIR', trailingslashit( MASHSB_RWMB_DIR . 'inc' ) );
43
+ define( 'MASHSB_RWMB_FIELDS_DIR', trailingslashit( MASHSB_RWMB_INC_DIR . 'fields' ) );
44
+ }
45
+
46
+ /**
47
+ * Get plugin base path and URL.
48
+ * The method is static and can be used in extensions.
49
+ * @link http://www.deluxeblogtips.com/2013/07/get-url-of-php-file-in-wordpress.html
50
+ * @param string $base Base folder path
51
+ * @return array Path and URL.
52
+ */
53
+ public static function get_path( $base = '' )
54
+ {
55
+ // Plugin base path
56
+ $path = $base ? $base : dirname( dirname( __FILE__ ) );
57
+ $path = wp_normalize_path( untrailingslashit( $path ) );
58
+
59
+ // Installed as a plugin?
60
+ if ( 0 === strpos( $path, wp_normalize_path( WP_PLUGIN_DIR ) ) || 0 === strpos( $path, wp_normalize_path( WPMU_PLUGIN_DIR ) ) )
61
+ {
62
+ $url = plugins_url( '', $path . '/' . basename( $path ) );
63
+ }
64
+ // Included into themes
65
+ else
66
+ {
67
+ // Get plugin base URL
68
+ $content_url = untrailingslashit( dirname( dirname( get_stylesheet_directory_uri() ) ) );
69
+ $content_dir = untrailingslashit( WP_CONTENT_DIR );
70
+ $url = str_replace( wp_normalize_path( $content_dir ), $content_url, $path );
71
+ }
72
+
73
+ $path = trailingslashit( $path );
74
+ $url = trailingslashit( $url );
75
+
76
+ return array( $path, $url );
77
+ }
78
+
79
+ /**
80
+ * Autoload fields' classes.
81
+ * @param string $class Class name
82
+ */
83
+ public function autoload( $class )
84
+ {
85
+ // Only load plugin's classes
86
+ if ( 'MASHSB_RW_Meta_Box' != $class && 0 !== strpos( $class, 'MASHSB_RWMB_' ) )
87
+ {
88
+ return;
89
+ }
90
+
91
+ // Get file name
92
+ $file = 'meta-box';
93
+ if ( 'MASHSB_RW_Meta_Box' != $class )
94
+ {
95
+ // Remove prefix 'MASHSB_RWMB_'
96
+ $file = substr( $class, 12 );
97
+
98
+ // Optional '_Field'
99
+ $file = preg_replace( '/_Field$/', '', $file );
100
+ }
101
+
102
+ $file = strtolower( str_replace( '_', '-', $file ) ) . '.php';
103
+
104
+ $dirs = array( MASHSB_RWMB_INC_DIR, MASHSB_RWMB_FIELDS_DIR, trailingslashit( MASHSB_RWMB_INC_DIR . 'walkers' ) );
105
+ foreach ( $dirs as $dir )
106
+ {
107
+ if ( file_exists( $dir . $file ) )
108
+ {
109
+ require $dir . $file;
110
+ return;
111
+ }
112
+ }
113
+ }
114
+
115
+ /**
116
+ * Initialize plugin.
117
+ */
118
+ public function init()
119
+ {
120
+ // Plugin core
121
+ new MASHSB_RWMB_Core;
122
+
123
+ if ( is_admin() )
124
+ {
125
+ // Validation module
126
+ new MASHSB_RWMB_Validation;
127
+ }
128
+
129
+ // Public functions
130
+ require MASHSB_RWMB_INC_DIR . 'functions.php';
131
+ }
132
+ }
includes/admin/meta-box/inc/meta-box.php CHANGED
@@ -1,427 +1,427 @@
1
- <?php
2
-
3
- /**
4
- * A class to rapid develop meta boxes for custom & built in content types
5
- * Piggybacks on WordPress
6
- *
7
- * @author Tran Ngoc Tuan Anh <rilwis@gmail.com>
8
- * @license GNU GPL2+
9
- * @package Meta Box
10
- */
11
- class MASHSB_RW_Meta_Box
12
- {
13
- /**
14
- * @var array Meta box information
15
- */
16
- public $meta_box;
17
-
18
- /**
19
- * @var array Fields information
20
- */
21
- public $fields;
22
-
23
- /**
24
- * @var array Contains all field types of current meta box
25
- */
26
- public $types;
27
-
28
- /**
29
- * @var bool Used to prevent duplicated calls like revisions, manual hook to wp_insert_post, etc.
30
- */
31
- public $saved = false;
32
-
33
- /**
34
- * Create meta box based on given data
35
- * @param array $meta_box Meta box definition
36
- */
37
- function __construct( $meta_box )
38
- {
39
- // Run script only in admin area
40
- if ( ! is_admin() )
41
- return;
42
-
43
- $meta_box = self::normalize( $meta_box );
44
- $meta_box['fields'] = self::normalize_fields( $meta_box['fields'] );
45
-
46
- $this->meta_box = $meta_box;
47
- $this->fields = &$this->meta_box['fields'];
48
-
49
- // Allow users to show/hide meta box
50
- // 1st action applies to all meta boxes
51
- // 2nd action applies to only current meta box
52
- $show = true;
53
- $show = apply_filters( 'rwmb_show', $show, $this->meta_box );
54
- $show = apply_filters( "rwmb_show_{$this->meta_box['id']}", $show, $this->meta_box );
55
- if ( ! $show )
56
- return;
57
-
58
- // Enqueue common styles and scripts
59
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
60
-
61
- // Add additional actions for fields
62
- $fields = self::get_fields( $this->fields );
63
- foreach ( $fields as $field )
64
- {
65
- call_user_func( array( self::get_class_name( $field ), 'add_actions' ) );
66
- }
67
-
68
- // Add meta box
69
- add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
70
-
71
- // Hide meta box if it's set 'default_hidden'
72
- add_filter( 'default_hidden_meta_boxes', array( $this, 'hide' ), 10, 2 );
73
-
74
- // Save post meta
75
- foreach ( $this->meta_box['post_types'] as $post_type )
76
- {
77
- if ( 'attachment' === $post_type )
78
- {
79
- // Attachment uses other hooks
80
- // @see wp_update_post(), wp_insert_attachment()
81
- add_action( 'edit_attachment', array( $this, 'save_post' ) );
82
- add_action( 'add_attachment', array( $this, 'save_post' ) );
83
- }
84
- else
85
- {
86
- add_action( "save_post_{$post_type}", array( $this, 'save_post' ) );
87
- }
88
- }
89
- }
90
-
91
- /**
92
- * Enqueue common styles
93
- *
94
- * @return void
95
- */
96
- function admin_enqueue_scripts()
97
- {
98
- if ( ! $this->is_edit_screen() )
99
- return;
100
-
101
- wp_enqueue_style( 'rwmb', MASHSB_RWMB_CSS_URL . 'style.css', array(), MASHSB_RWMB_VER );
102
- if( is_rtl() )
103
- wp_enqueue_style( 'mashsb-rwmb-rtl', MASHSB_RWMB_CSS_URL . 'style-rtl.css', array(), MASHSB_RWMB_VER );
104
-
105
- // Load clone script conditionally
106
- $fields = self::get_fields( $this->fields );
107
- foreach ( $fields as $field )
108
- {
109
- if ( $field['clone'] )
110
- {
111
- wp_enqueue_script( 'mashsb-rwmb-clone', MASHSB_RWMB_JS_URL . 'clone.js', array( 'jquery-ui-sortable' ), MASHSB_RWMB_VER, true );
112
- break;
113
- }
114
- }
115
-
116
- // Enqueue scripts and styles for fields
117
- foreach ( $fields as $field )
118
- {
119
- call_user_func( array( self::get_class_name( $field ), 'admin_enqueue_scripts' ) );
120
- }
121
-
122
- // Auto save
123
- if ( $this->meta_box['autosave'] )
124
- wp_enqueue_script( 'mashsb-rwmb-autosave', MASHSB_RWMB_JS_URL . 'autosave.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
125
-
126
- /**
127
- * Allow developers to enqueue more scripts and styles
128
- *
129
- * @param MASHSB_RW_Meta_Box $object Meta Box object
130
- */
131
- do_action( 'mashsb_rwmb_enqueue_scripts', $this );
132
- }
133
-
134
- /**
135
- * Get all fields of a meta box, recursively
136
- *
137
- * @param array $fields
138
- *
139
- * @return array
140
- */
141
- static function get_fields( $fields )
142
- {
143
- $all_fields = array();
144
- foreach ( $fields as $field )
145
- {
146
- $all_fields[] = $field;
147
- if ( isset( $field['fields'] ) )
148
- $all_fields = array_merge( $all_fields, self::get_fields( $field['fields'] ) );
149
- }
150
-
151
- return $all_fields;
152
- }
153
-
154
- /**************************************************
155
- * SHOW META BOX
156
- **************************************************/
157
-
158
- /**
159
- * Add meta box for multiple post types
160
- *
161
- * @return void
162
- */
163
- function add_meta_boxes()
164
- {
165
- foreach ( $this->meta_box['post_types'] as $post_type )
166
- {
167
- add_meta_box(
168
- $this->meta_box['id'],
169
- $this->meta_box['title'],
170
- array( $this, 'show' ),
171
- $post_type,
172
- $this->meta_box['context'],
173
- $this->meta_box['priority']
174
- );
175
- }
176
- }
177
-
178
- /**
179
- * Hide meta box if it's set 'default_hidden'
180
- *
181
- * @param array $hidden Array of default hidden meta boxes
182
- * @param object $screen Current screen information
183
- *
184
- * @return array
185
- */
186
- function hide( $hidden, $screen )
187
- {
188
- if ( $this->is_edit_screen( $screen ) && $this->meta_box['default_hidden'] )
189
- {
190
- $hidden[] = $this->meta_box['id'];
191
- }
192
-
193
- return $hidden;
194
- }
195
-
196
- /**
197
- * Callback function to show fields in meta box
198
- *
199
- * @return void
200
- */
201
- function show()
202
- {
203
- $saved = $this->is_saved();
204
-
205
- // Container
206
- printf(
207
- '<div class="mashsb-rwmb-meta-box" data-autosave="%s">',
208
- $this->meta_box['autosave'] ? 'true' : 'false'
209
- );
210
-
211
- wp_nonce_field( "mashsb-rwmb-save-{$this->meta_box['id']}", "nonce_{$this->meta_box['id']}" );
212
-
213
- // Allow users to add custom code before meta box content
214
- // 1st action applies to all meta boxes
215
- // 2nd action applies to only current meta box
216
- do_action( 'rwmb_before', $this );
217
- do_action( "rwmb_before_{$this->meta_box['id']}", $this );
218
-
219
- foreach ( $this->fields as $field )
220
- {
221
- call_user_func( array( self::get_class_name( $field ), 'show' ), $field, $saved );
222
- }
223
-
224
- // Allow users to add custom code after meta box content
225
- // 1st action applies to all meta boxes
226
- // 2nd action applies to only current meta box
227
- do_action( 'mashsb_rwmb_after', $this );
228
- do_action( "mashsb_rwmb_after_{$this->meta_box['id']}", $this );
229
-
230
- // End container
231
- echo '</div>';
232
- }
233
-
234
- /**************************************************
235
- * SAVE META BOX
236
- **************************************************/
237
-
238
- /**
239
- * Save data from meta box
240
- *
241
- * @param int $post_id Post ID
242
- */
243
- function save_post( $post_id )
244
- {
245
- // Check if this function is called to prevent duplicated calls like revisions, manual hook to wp_insert_post, etc.
246
- if ( true === $this->saved )
247
- return;
248
- $this->saved = true;
249
-
250
- // Check whether form is submitted properly
251
- $nonce = (string) filter_input( INPUT_POST, "nonce_{$this->meta_box['id']}" );
252
- if ( ! wp_verify_nonce( $nonce, "mashsb-rwmb-save-{$this->meta_box['id']}" ) )
253
- return;
254
-
255
- // Autosave
256
- if ( defined( 'DOING_AUTOSAVE' ) && ! $this->meta_box['autosave'] )
257
- return;
258
-
259
- // Make sure meta is added to the post, not a revision
260
- if ( $the_post = wp_is_post_revision( $post_id ) )
261
- $post_id = $the_post;
262
-
263
- // Before save action
264
- do_action( 'rwmb_before_save_post', $post_id );
265
- do_action( "rwmb_{$this->meta_box['id']}_before_save_post", $post_id );
266
-
267
- foreach ( $this->fields as $field )
268
- {
269
- $name = $field['id'];
270
- $single = $field['clone'] || ! $field['multiple'];
271
- $old = get_post_meta( $post_id, $name, $single );
272
- $new = isset( $_POST[$name] ) ? $_POST[$name] : ( $single ? '' : array() );
273
-
274
- // Allow field class change the value
275
- $new = call_user_func( array( self::get_class_name( $field ), 'value' ), $new, $old, $post_id, $field );
276
- $new = MASHSB_RWMB_Core::filter( 'value', $new, $field, $old );
277
-
278
- // Call defined method to save meta value, if there's no methods, call common one
279
- call_user_func( array( self::get_class_name( $field ), 'save' ), $new, $old, $post_id, $field );
280
- }
281
-
282
- // After save action
283
- do_action( 'mashsb_rwmb_after_save_post', $post_id );
284
- do_action( "mashsb_rwmb_{$this->meta_box['id']}_after_save_post", $post_id );
285
- }
286
-
287
- /**************************************************
288
- * HELPER FUNCTIONS
289
- **************************************************/
290
-
291
- /**
292
- * Normalize parameters for meta box
293
- *
294
- * @param array $meta_box Meta box definition
295
- *
296
- * @return array $meta_box Normalized meta box
297
- */
298
- static function normalize( $meta_box )
299
- {
300
- // Set default values for meta box
301
- $meta_box = wp_parse_args( $meta_box, array(
302
- 'id' => sanitize_title( $meta_box['title'] ),
303
- 'context' => 'normal',
304
- 'priority' => 'high',
305
- 'post_types' => 'post',
306
- 'autosave' => false,
307
- 'default_hidden' => false,
308
- ) );
309
-
310
- /**
311
- * Use 'post_types' for better understanding and fallback to 'pages' for previous versions
312
- * @since 4.4.1
313
- */
314
- if ( ! empty( $meta_box['pages'] ) )
315
- {
316
- $meta_box['post_types'] = $meta_box['pages'];
317
- }
318
-
319
- // Allow to set 'post_types' param by string
320
- if ( is_string( $meta_box['post_types'] ) )
321
- {
322
- $meta_box['post_types'] = array( $meta_box['post_types'] );
323
- }
324
-
325
- // Allow to add default values for meta box
326
- $meta_box = apply_filters( 'rwmb_normalize_meta_box', $meta_box );
327
- $meta_box = apply_filters( "rwmb_normalize_{$meta_box['id']}_meta_box", $meta_box );
328
-
329
- return $meta_box;
330
- }
331
-
332
- /**
333
- * Normalize an array of fields
334
- *
335
- * @param array $fields Array of fields
336
- *
337
- * @return array $fields Normalized fields
338
- */
339
- static function normalize_fields( $fields )
340
- {
341
- foreach ( $fields as $k => $field )
342
- {
343
- $class = self::get_class_name( $field );
344
-
345
- // Make sure field has correct 'type', ignore warning error when users forget to set field type or set incorrect one
346
- if ( false === $class )
347
- {
348
- unset( $fields[$k] );
349
- continue;
350
- }
351
-
352
- // Allow field class add/change default field values
353
- $field = call_user_func( array( $class, 'normalize' ), $field );
354
-
355
- if ( isset( $field['fields'] ) )
356
- $field['fields'] = self::normalize_fields( $field['fields'] );
357
-
358
- // Allow to add default values for fields
359
- $field = apply_filters( 'rwmb_normalize_field', $field );
360
- $field = apply_filters( "rwmb_normalize_{$field['type']}_field", $field );
361
- $field = apply_filters( "rwmb_normalize_{$field['id']}_field", $field );
362
-
363
- $fields[$k] = $field;
364
- }
365
-
366
- return $fields;
367
- }
368
-
369
- /**
370
- * Get field class name
371
- *
372
- * @param array $field Field array
373
- * @return string Field class name
374
- */
375
- static function get_class_name( $field )
376
- {
377
- $type = str_replace( array( '-', '_' ), ' ', $field['type'] );
378
- $class = 'MASHSB_RWMB_' . ucwords( $type ) . '_Field';
379
- $class = str_replace( ' ', '_', $class );
380
- return $class;
381
- }
382
-
383
- /**
384
- * Check if meta box is saved before.
385
- * This helps saving empty value in meta fields (for text box, check box, etc.) and set the correct default values.
386
- *
387
- * @return bool
388
- */
389
- public function is_saved()
390
- {
391
- $post = get_post();
392
-
393
- foreach ( $this->fields as $field )
394
- {
395
- if ( empty( $field['id'] ) )
396
- {
397
- continue;
398
- }
399
- $value = get_post_meta( $post->ID, $field['id'], ! $field['multiple'] );
400
- if (
401
- ( ! $field['multiple'] && '' !== $value )
402
- || ( $field['multiple'] && array() !== $value )
403
- )
404
- {
405
- return true;
406
- }
407
- }
408
-
409
- return false;
410
- }
411
-
412
- /**
413
- * Check if we're on the right edit screen.
414
- *
415
- * @param WP_Screen $screen Screen object. Optional. Use current screen object by default.
416
- *
417
- * @return bool
418
- */
419
- function is_edit_screen( $screen = null )
420
- {
421
- if ( ! ( $screen instanceof WP_Screen ) )
422
- {
423
- $screen = get_current_screen();
424
- }
425
- return 'post' == $screen->base && in_array( $screen->post_type, $this->meta_box['post_types'] );
426
- }
427
- }
1
+ <?php
2
+
3
+ /**
4
+ * A class to rapid develop meta boxes for custom & built in content types
5
+ * Piggybacks on WordPress
6
+ *
7
+ * @author Tran Ngoc Tuan Anh <rilwis@gmail.com>
8
+ * @license GNU GPL2+
9
+ * @package Meta Box
10
+ */
11
+ class MASHSB_RW_Meta_Box
12
+ {
13
+ /**
14
+ * @var array Meta box information
15
+ */
16
+ public $meta_box;
17
+
18
+ /**
19
+ * @var array Fields information
20
+ */
21
+ public $fields;
22
+
23
+ /**
24
+ * @var array Contains all field types of current meta box
25
+ */
26
+ public $types;
27
+
28
+ /**
29
+ * @var bool Used to prevent duplicated calls like revisions, manual hook to wp_insert_post, etc.
30
+ */
31
+ public $saved = false;
32
+
33
+ /**
34
+ * Create meta box based on given data
35
+ * @param array $meta_box Meta box definition
36
+ */
37
+ function __construct( $meta_box )
38
+ {
39
+ // Run script only in admin area
40
+ if ( ! is_admin() )
41
+ return;
42
+
43
+ $meta_box = self::normalize( $meta_box );
44
+ $meta_box['fields'] = self::normalize_fields( $meta_box['fields'] );
45
+
46
+ $this->meta_box = $meta_box;
47
+ $this->fields = &$this->meta_box['fields'];
48
+
49
+ // Allow users to show/hide meta box
50
+ // 1st action applies to all meta boxes
51
+ // 2nd action applies to only current meta box
52
+ $show = true;
53
+ $show = apply_filters( 'rwmb_show', $show, $this->meta_box );
54
+ $show = apply_filters( "rwmb_show_{$this->meta_box['id']}", $show, $this->meta_box );
55
+ if ( ! $show )
56
+ return;
57
+
58
+ // Enqueue common styles and scripts
59
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
60
+
61
+ // Add additional actions for fields
62
+ $fields = self::get_fields( $this->fields );
63
+ foreach ( $fields as $field )
64
+ {
65
+ call_user_func( array( self::get_class_name( $field ), 'add_actions' ) );
66
+ }
67
+
68
+ // Add meta box
69
+ add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
70
+
71
+ // Hide meta box if it's set 'default_hidden'
72
+ add_filter( 'default_hidden_meta_boxes', array( $this, 'hide' ), 10, 2 );
73
+
74
+ // Save post meta
75
+ foreach ( $this->meta_box['post_types'] as $post_type )
76
+ {
77
+ if ( 'attachment' === $post_type )
78
+ {
79
+ // Attachment uses other hooks
80
+ // @see wp_update_post(), wp_insert_attachment()
81
+ add_action( 'edit_attachment', array( $this, 'save_post' ) );
82
+ add_action( 'add_attachment', array( $this, 'save_post' ) );
83
+ }
84
+ else
85
+ {
86
+ add_action( "save_post_{$post_type}", array( $this, 'save_post' ) );
87
+ }
88
+ }
89
+ }
90
+
91
+ /**
92
+ * Enqueue common styles
93
+ *
94
+ * @return void
95
+ */
96
+ function admin_enqueue_scripts()
97
+ {
98
+ if ( ! $this->is_edit_screen() )
99
+ return;
100
+
101
+ wp_enqueue_style( 'rwmb', MASHSB_RWMB_CSS_URL . 'style.css', array(), MASHSB_RWMB_VER );
102
+ if( is_rtl() )
103
+ wp_enqueue_style( 'mashsb-rwmb-rtl', MASHSB_RWMB_CSS_URL . 'style-rtl.css', array(), MASHSB_RWMB_VER );
104
+
105
+ // Load clone script conditionally
106
+ $fields = self::get_fields( $this->fields );
107
+ foreach ( $fields as $field )
108
+ {
109
+ if ( $field['clone'] )
110
+ {
111
+ wp_enqueue_script( 'mashsb-rwmb-clone', MASHSB_RWMB_JS_URL . 'clone.js', array( 'jquery-ui-sortable' ), MASHSB_RWMB_VER, true );
112
+ break;
113
+ }
114
+ }
115
+
116
+ // Enqueue scripts and styles for fields
117
+ foreach ( $fields as $field )
118
+ {
119
+ call_user_func( array( self::get_class_name( $field ), 'admin_enqueue_scripts' ) );
120
+ }
121
+
122
+ // Auto save
123
+ if ( $this->meta_box['autosave'] )
124
+ wp_enqueue_script( 'mashsb-rwmb-autosave', MASHSB_RWMB_JS_URL . 'autosave.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
125
+
126
+ /**
127
+ * Allow developers to enqueue more scripts and styles
128
+ *
129
+ * @param MASHSB_RW_Meta_Box $object Meta Box object
130
+ */
131
+ do_action( 'mashsb_rwmb_enqueue_scripts', $this );
132
+ }
133
+
134
+ /**
135
+ * Get all fields of a meta box, recursively
136
+ *
137
+ * @param array $fields
138
+ *
139
+ * @return array
140
+ */
141
+ static function get_fields( $fields )
142
+ {
143
+ $all_fields = array();
144
+ foreach ( $fields as $field )
145
+ {
146
+ $all_fields[] = $field;
147
+ if ( isset( $field['fields'] ) )
148
+ $all_fields = array_merge( $all_fields, self::get_fields( $field['fields'] ) );
149
+ }
150
+
151
+ return $all_fields;
152
+ }
153
+
154
+ /**************************************************
155
+ * SHOW META BOX
156
+ **************************************************/
157
+
158
+ /**
159
+ * Add meta box for multiple post types
160
+ *
161
+ * @return void
162
+ */
163
+ function add_meta_boxes()
164
+ {
165
+ foreach ( $this->meta_box['post_types'] as $post_type )
166
+ {
167
+ add_meta_box(
168
+ $this->meta_box['id'],
169
+ $this->meta_box['title'],
170
+ array( $this, 'show' ),
171
+ $post_type,
172
+ $this->meta_box['context'],
173
+ $this->meta_box['priority']
174
+ );
175
+ }
176
+ }
177
+
178
+ /**
179
+ * Hide meta box if it's set 'default_hidden'
180
+ *
181
+ * @param array $hidden Array of default hidden meta boxes
182
+ * @param object $screen Current screen information
183
+ *
184
+ * @return array
185
+ */
186
+ function hide( $hidden, $screen )
187
+ {
188
+ if ( $this->is_edit_screen( $screen ) && $this->meta_box['default_hidden'] )
189
+ {
190
+ $hidden[] = $this->meta_box['id'];
191
+ }
192
+
193
+ return $hidden;
194
+ }
195
+
196
+ /**
197
+ * Callback function to show fields in meta box
198
+ *
199
+ * @return void
200
+ */
201
+ function show()
202
+ {
203
+ $saved = $this->is_saved();
204
+
205
+ // Container
206
+ printf(
207
+ '<div class="mashsb-rwmb-meta-box" data-autosave="%s">',
208
+ $this->meta_box['autosave'] ? 'true' : 'false'
209
+ );
210
+
211
+ wp_nonce_field( "mashsb-rwmb-save-{$this->meta_box['id']}", "nonce_{$this->meta_box['id']}" );
212
+
213
+ // Allow users to add custom code before meta box content
214
+ // 1st action applies to all meta boxes
215
+ // 2nd action applies to only current meta box
216
+ do_action( 'rwmb_before', $this );
217
+ do_action( "rwmb_before_{$this->meta_box['id']}", $this );
218
+
219
+ foreach ( $this->fields as $field )
220
+ {
221
+ call_user_func( array( self::get_class_name( $field ), 'show' ), $field, $saved );
222
+ }
223
+
224
+ // Allow users to add custom code after meta box content
225
+ // 1st action applies to all meta boxes
226
+ // 2nd action applies to only current meta box
227
+ do_action( 'mashsb_rwmb_after', $this );
228
+ do_action( "mashsb_rwmb_after_{$this->meta_box['id']}", $this );
229
+
230
+ // End container
231
+ echo '</div>';
232
+ }
233
+
234
+ /**************************************************
235
+ * SAVE META BOX
236
+ **************************************************/
237
+
238
+ /**
239
+ * Save data from meta box
240
+ *
241
+ * @param int $post_id Post ID
242
+ */
243
+ function save_post( $post_id )
244
+ {
245
+ // Check if this function is called to prevent duplicated calls like revisions, manual hook to wp_insert_post, etc.
246
+ if ( true === $this->saved )
247
+ return;
248
+ $this->saved = true;
249
+
250
+ // Check whether form is submitted properly
251
+ $nonce = (string) filter_input( INPUT_POST, "nonce_{$this->meta_box['id']}" );
252
+ if ( ! wp_verify_nonce( $nonce, "mashsb-rwmb-save-{$this->meta_box['id']}" ) )
253
+ return;
254
+
255
+ // Autosave
256
+ if ( defined( 'DOING_AUTOSAVE' ) && ! $this->meta_box['autosave'] )
257
+ return;
258
+
259
+ // Make sure meta is added to the post, not a revision
260
+ if ( $the_post = wp_is_post_revision( $post_id ) )
261
+ $post_id = $the_post;
262
+
263
+ // Before save action
264
+ do_action( 'rwmb_before_save_post', $post_id );
265
+ do_action( "rwmb_{$this->meta_box['id']}_before_save_post", $post_id );
266
+
267
+ foreach ( $this->fields as $field )
268
+ {
269
+ $name = $field['id'];
270
+ $single = $field['clone'] || ! $field['multiple'];
271
+ $old = get_post_meta( $post_id, $name, $single );
272
+ $new = isset( $_POST[$name] ) ? $_POST[$name] : ( $single ? '' : array() );
273
+
274
+ // Allow field class change the value
275
+ $new = call_user_func( array( self::get_class_name( $field ), 'value' ), $new, $old, $post_id, $field );
276
+ $new = MASHSB_RWMB_Core::filter( 'value', $new, $field, $old );
277
+
278
+ // Call defined method to save meta value, if there's no methods, call common one
279
+ call_user_func( array( self::get_class_name( $field ), 'save' ), $new, $old, $post_id, $field );
280
+ }
281
+
282
+ // After save action
283
+ do_action( 'mashsb_rwmb_after_save_post', $post_id );
284
+ do_action( "mashsb_rwmb_{$this->meta_box['id']}_after_save_post", $post_id );
285
+ }
286
+
287
+ /**************************************************
288
+ * HELPER FUNCTIONS
289
+ **************************************************/
290
+
291
+ /**
292
+ * Normalize parameters for meta box
293
+ *
294
+ * @param array $meta_box Meta box definition
295
+ *
296
+ * @return array $meta_box Normalized meta box
297
+ */
298
+ static function normalize( $meta_box )
299
+ {
300
+ // Set default values for meta box
301
+ $meta_box = wp_parse_args( $meta_box, array(
302
+ 'id' => sanitize_title( $meta_box['title'] ),
303
+ 'context' => 'normal',
304
+ 'priority' => 'high',
305
+ 'post_types' => 'post',
306
+ 'autosave' => false,
307
+ 'default_hidden' => false,
308
+ ) );
309
+
310
+ /**
311
+ * Use 'post_types' for better understanding and fallback to 'pages' for previous versions
312
+ * @since 4.4.1
313
+ */
314
+ if ( ! empty( $meta_box['pages'] ) )
315
+ {
316
+ $meta_box['post_types'] = $meta_box['pages'];
317
+ }
318
+
319
+ // Allow to set 'post_types' param by string
320
+ if ( is_string( $meta_box['post_types'] ) )
321
+ {
322
+ $meta_box['post_types'] = array( $meta_box['post_types'] );
323
+ }
324
+
325
+ // Allow to add default values for meta box
326
+ $meta_box = apply_filters( 'rwmb_normalize_meta_box', $meta_box );
327
+ $meta_box = apply_filters( "rwmb_normalize_{$meta_box['id']}_meta_box", $meta_box );
328
+
329
+ return $meta_box;
330
+ }
331
+
332
+ /**
333
+ * Normalize an array of fields
334
+ *
335
+ * @param array $fields Array of fields
336
+ *
337
+ * @return array $fields Normalized fields
338
+ */
339
+ static function normalize_fields( $fields )
340
+ {
341
+ foreach ( $fields as $k => $field )
342
+ {
343
+ $class = self::get_class_name( $field );
344
+
345
+ // Make sure field has correct 'type', ignore warning error when users forget to set field type or set incorrect one
346
+ if ( false === $class )
347
+ {
348
+ unset( $fields[$k] );
349
+ continue;
350
+ }
351
+
352
+ // Allow field class add/change default field values
353
+ $field = call_user_func( array( $class, 'normalize' ), $field );
354
+
355
+ if ( isset( $field['fields'] ) )
356
+ $field['fields'] = self::normalize_fields( $field['fields'] );
357
+
358
+ // Allow to add default values for fields
359
+ $field = apply_filters( 'rwmb_normalize_field', $field );
360
+ $field = apply_filters( "rwmb_normalize_{$field['type']}_field", $field );
361
+ $field = apply_filters( "rwmb_normalize_{$field['id']}_field", $field );
362
+
363
+ $fields[$k] = $field;
364
+ }
365
+
366
+ return $fields;
367
+ }
368
+
369
+ /**
370
+ * Get field class name
371
+ *
372
+ * @param array $field Field array
373
+ * @return string Field class name
374
+ */
375
+ static function get_class_name( $field )
376
+ {
377
+ $type = str_replace( array( '-', '_' ), ' ', $field['type'] );
378
+ $class = 'MASHSB_RWMB_' . ucwords( $type ) . '_Field';
379
+ $class = str_replace( ' ', '_', $class );
380
+ return $class;
381
+ }
382
+
383
+ /**
384
+ * Check if meta box is saved before.
385
+ * This helps saving empty value in meta fields (for text box, check box, etc.) and set the correct default values.
386
+ *
387
+ * @return bool
388
+ */
389
+ public function is_saved()
390
+ {
391
+ $post = get_post();
392
+
393
+ foreach ( $this->fields as $field )
394
+ {
395
+ if ( empty( $field['id'] ) )
396
+ {
397
+ continue;
398
+ }
399
+ $value = get_post_meta( $post->ID, $field['id'], ! $field['multiple'] );
400
+ if (
401
+ ( ! $field['multiple'] && '' !== $value )
402
+ || ( $field['multiple'] && array() !== $value )
403
+ )
404
+ {
405
+ return true;
406
+ }
407
+ }
408
+
409
+ return false;
410
+ }
411
+
412
+ /**
413
+ * Check if we're on the right edit screen.
414
+ *
415
+ * @param WP_Screen $screen Screen object. Optional. Use current screen object by default.
416
+ *
417
+ * @return bool
418
+ */
419
+ function is_edit_screen( $screen = null )
420
+ {
421
+ if ( ! ( $screen instanceof WP_Screen ) )
422
+ {
423
+ $screen = get_current_screen();
424
+ }
425
+ return 'post' == $screen->base && in_array( $screen->post_type, $this->meta_box['post_types'] );
426
+ }
427
+ }
includes/admin/meta-box/inc/templates/image-advanced.php CHANGED
@@ -1,22 +1,22 @@
1
- <?php
2
- ?>
3
- <script id="tmpl-mashsb-rwmb-image-item" type="text/html">
4
- <input type="hidden" name="{{{ data.fieldName }}}" value="{{{ data.id }}}" class="mashsb-rwmb-media-input">
5
- <!--<div class="mashsb-rwmb-media-preview" style="background-image: url({{{ data.sizes.full.url }}});">-->
6
- <img src="{{{ data.sizes.full.url }}}">
7
- <!--<div class="mashsb-rwmb-media-content">
8
- <div class="centered">
9
- <img src="{{{ data.sizes.full.url }}}">
10
- </div>
11
- </div>//-->
12
- </div>
13
- <div class="mashsb-rwmb-overlay"></div>
14
- <div class="mashsb-rwmb-media-bar">
15
- <a class="mashsb-rwmb-edit-media" title="{{{ i18nRwmbMedia.edit }}}" href="{{{ data.editLink }}}" target="_blank">
16
- <span class="dashicons dashicons-edit"></span>
17
- </a>
18
- <a href="#" class="mashsb-rwmb-remove-media" title="{{{ i18nRwmbMedia.remove }}}">
19
- <span class="dashicons dashicons-no-alt"></span>
20
- </a>
21
- </div>
22
- </script>
1
+ <?php
2
+ ?>
3
+ <script id="tmpl-mashsb-rwmb-image-item" type="text/html">
4
+ <input type="hidden" name="{{{ data.fieldName }}}" value="{{{ data.id }}}" class="mashsb-rwmb-media-input">
5
+ <!--<div class="mashsb-rwmb-media-preview" style="background-image: url({{{ data.sizes.full.url }}});">-->
6
+ <img src="{{{ data.sizes.full.url }}}">
7
+ <!--<div class="mashsb-rwmb-media-content">
8
+ <div class="centered">
9
+ <img src="{{{ data.sizes.full.url }}}">
10
+ </div>
11
+ </div>//-->
12
+ </div>
13
+ <div class="mashsb-rwmb-overlay"></div>
14
+ <div class="mashsb-rwmb-media-bar">
15
+ <a class="mashsb-rwmb-edit-media" title="{{{ i18nRwmbMedia.edit }}}" href="{{{ data.editLink }}}" target="_blank">
16
+ <span class="dashicons dashicons-edit"></span>
17
+ </a>
18
+ <a href="#" class="mashsb-rwmb-remove-media" title="{{{ i18nRwmbMedia.remove }}}">
19
+ <span class="dashicons dashicons-no-alt"></span>
20
+ </a>
21
+ </div>
22
+ </script>
includes/admin/meta-box/inc/templates/image-advanced_1.php CHANGED
@@ -1,33 +1,33 @@
1
- <?php
2
- ?>
3
- <script id="tmpl-mashsb-rwmb-image-item" type="text/html">
4
- <input type="hidden" name="{{{ data.fieldName }}}" value="{{{ data.id }}}" class="mashsb-rwmb-media-input">
5
- <div class="mashsb-rwmb-media-preview">
6
- <div class="mashsb-rwmb-media-content">
7
- <div class="centered">
8
- <# if ( 'image' === data.type && data.sizes ) { #>
9
- <# if ( data.sizes.thumbnail ) { #>
10
- <img src="{{{ data.sizes.thumbnail.url }}}">
11
- <# } else { #>
12
- <img src="{{{ data.sizes.full.url }}}">
13
- <# } #>
14
- <# } else { #>
15
- <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
16
- <img src="{{ data.image.src }}" />
17
- <# } else { #>
18
- <img src="{{ data.icon }}" />
19
- <# } #>
20
- <# } #>
21
- </div>
22
- </div>
23
- </div>
24
- <div class="mashsb-rwmb-overlay"></div>
25
- <div class="mashsb-rwmb-media-bar">
26
- <a class="mashsb-rwmb-edit-media" title="{{{ i18nRwmbMedia.edit }}}" href="{{{ data.editLink }}}" target="_blank">
27
- <span class="dashicons dashicons-edit"></span>
28
- </a>
29
- <a href="#" class="mashsb-rwmb-remove-media" title="{{{ i18nRwmbMedia.remove }}}">
30
- <span class="dashicons dashicons-no-alt"></span>
31
- </a>
32
- </div>
33
- </script>
1
+ <?php
2
+ ?>
3
+ <script id="tmpl-mashsb-rwmb-image-item" type="text/html">
4
+ <input type="hidden" name="{{{ data.fieldName }}}" value="{{{ data.id }}}" class="mashsb-rwmb-media-input">
5
+ <div class="mashsb-rwmb-media-preview">
6
+ <div class="mashsb-rwmb-media-content">
7
+ <div class="centered">
8
+ <# if ( 'image' === data.type && data.sizes ) { #>
9
+ <# if ( data.sizes.thumbnail ) { #>
10
+ <img src="{{{ data.sizes.thumbnail.url }}}">
11
+ <# } else { #>
12
+ <img src="{{{ data.sizes.full.url }}}">
13
+ <# } #>
14
+ <# } else { #>
15
+ <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
16
+ <img src="{{ data.image.src }}" />
17
+ <# } else { #>
18
+ <img src="{{ data.icon }}" />
19
+ <# } #>
20
+ <# } #>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ <div class="mashsb-rwmb-overlay"></div>
25
+ <div class="mashsb-rwmb-media-bar">
26
+ <a class="mashsb-rwmb-edit-media" title="{{{ i18nRwmbMedia.edit }}}" href="{{{ data.editLink }}}" target="_blank">
27
+ <span class="dashicons dashicons-edit"></span>
28
+ </a>
29
+ <a href="#" class="mashsb-rwmb-remove-media" title="{{{ i18nRwmbMedia.remove }}}">
30
+ <span class="dashicons dashicons-no-alt"></span>
31
+ </a>
32
+ </div>
33
+ </script>
includes/admin/meta-box/inc/templates/media.php CHANGED
@@ -1,49 +1,49 @@
1
- <?php
2
- ?>
3
- <script id="tmpl-mashsb-rwmb-media-item" type="text/html">
4
- <input type="hidden" name="{{{ data.fieldName }}}" value="{{{ data.id }}}" class="mashsb-rwmb-media-input">
5
- <div class="mashsb-rwmb-media-preview">
6
- <div class="mashsb-rwmb-media-content">
7
- <div class="centered">
8
- <# if ( 'image' === data.type && data.sizes ) { #>
9
- <# if ( data.sizes.thumbnail ) { #>
10
- <img src="{{{ data.sizes.thumbnail.url }}}">
11
- <# } else { #>
12
- <img src="{{{ data.sizes.full.url }}}">
13
- <# } #>
14
- <# } else { #>
15
- <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
16
- <img src="{{ data.image.src }}" />
17
- <# } else { #>
18
- <img src="{{ data.icon }}" />
19
- <# } #>
20
- <# } #>
21
- </div>
22
- </div>
23
- </div>
24
- <div class="mashsb-rwmb-media-info">
25
- <h4>
26
- <a href="{{{ data.url }}}" target="_blank" title="{{{ i18nRwmbMedia.view }}}">
27
- <# if( data.title ) { #> {{{ data.title }}}
28
- <# } else { #> {{{ i18nRwmbMedia.noTitle }}}
29
- <# } #>
30
- </a>
31
- </h4>
32
- <p>{{{ data.mime }}}</p>
33
- <p>
34
- <a class="mashsb-rwmb-edit-media" title="{{{ i18nRwmbMedia.edit }}}" href="{{{ data.editLink }}}" target="_blank">
35
- <span class="dashicons dashicons-edit"></span>{{{ i18nRwmbMedia.edit }}}
36
- </a>
37
- <a href="#" class="mashsb-rwmb-remove-media" title="{{{ i18nRwmbMedia.remove }}}">
38
- <span class="dashicons dashicons-no-alt"></span>{{{ i18nRwmbMedia.remove }}}
39
- </a>
40
- </p>
41
- </div>
42
- </script>
43
-
44
- <script id="tmpl-mashsb-rwmb-media-status" type="text/html">
45
- <# if ( data.maxFiles > 0 ) { #>
46
- {{{ data.items }}}/{{{ data.maxFiles }}}
47
- <# if ( 1 < data.maxFiles ) { #> {{{ i18nRwmbMedia.multiple }}} <# } else {#> {{{ i18nRwmbMedia.single }}} <# } #>
48
- <# } #>
49
- </script>
1
+ <?php
2
+ ?>
3
+ <script id="tmpl-mashsb-rwmb-media-item" type="text/html">
4
+ <input type="hidden" name="{{{ data.fieldName }}}" value="{{{ data.id }}}" class="mashsb-rwmb-media-input">
5
+ <div class="mashsb-rwmb-media-preview">
6
+ <div class="mashsb-rwmb-media-content">
7
+ <div class="centered">
8
+ <# if ( 'image' === data.type && data.sizes ) { #>
9
+ <# if ( data.sizes.thumbnail ) { #>
10
+ <img src="{{{ data.sizes.thumbnail.url }}}">
11
+ <# } else { #>
12
+ <img src="{{{ data.sizes.full.url }}}">
13
+ <# } #>
14
+ <# } else { #>
15
+ <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
16
+ <img src="{{ data.image.src }}" />
17
+ <# } else { #>
18
+ <img src="{{ data.icon }}" />
19
+ <# } #>
20
+ <# } #>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ <div class="mashsb-rwmb-media-info">
25
+ <h4>
26
+ <a href="{{{ data.url }}}" target="_blank" title="{{{ i18nRwmbMedia.view }}}">
27
+ <# if( data.title ) { #> {{{ data.title }}}
28
+ <# } else { #> {{{ i18nRwmbMedia.noTitle }}}
29
+ <# } #>
30
+ </a>
31
+ </h4>
32
+ <p>{{{ data.mime }}}</p>
33
+ <p>
34
+ <a class="mashsb-rwmb-edit-media" title="{{{ i18nRwmbMedia.edit }}}" href="{{{ data.editLink }}}" target="_blank">
35
+ <span class="dashicons dashicons-edit"></span>{{{ i18nRwmbMedia.edit }}}
36
+ </a>
37
+ <a href="#" class="mashsb-rwmb-remove-media" title="{{{ i18nRwmbMedia.remove }}}">
38
+ <span class="dashicons dashicons-no-alt"></span>{{{ i18nRwmbMedia.remove }}}
39
+ </a>
40
+ </p>
41
+ </div>
42
+ </script>
43
+
44
+ <script id="tmpl-mashsb-rwmb-media-status" type="text/html">
45
+ <# if ( data.maxFiles > 0 ) { #>
46
+ {{{ data.items }}}/{{{ data.maxFiles }}}
47
+ <# if ( 1 < data.maxFiles ) { #> {{{ i18nRwmbMedia.multiple }}} <# } else {#> {{{ i18nRwmbMedia.single }}} <# } #>
48
+ <# } #>
49
+ </script>
includes/admin/meta-box/inc/templates/upload.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
- ?>
3
- <script id="tmpl-mashsb-rwmb-upload-area" type="text/html">
4
- <div class="mashsb-rwmb-upload-inside">
5
- <h3>{{{ i18nRwmbMedia.uploadInstructions }}}</h3>
6
- <p> or</p>
7
- <p><a href="#" class="mashsb-rwmb-browse-button button button-hero" id="{{{ _.uniqueId( 'mashsb-rwmb-upload-browser-') }}}">{{{ i18nRwmbMedia.select }}}</a></p>
8
- </div>
9
- </script>
1
+ <?php
2
+ ?>
3
+ <script id="tmpl-mashsb-rwmb-upload-area" type="text/html">
4
+ <div class="mashsb-rwmb-upload-inside">
5
+ <h3>{{{ i18nRwmbMedia.uploadInstructions }}}</h3>
6
+ <p> or</p>
7
+ <p><a href="#" class="mashsb-rwmb-browse-button button button-hero" id="{{{ _.uniqueId( 'mashsb-rwmb-upload-browser-') }}}">{{{ i18nRwmbMedia.select }}}</a></p>
8
+ </div>
9
+ </script>
includes/admin/meta-box/inc/validation.php CHANGED
@@ -1,45 +1,45 @@
1
- <?php
2
- /**
3
- * Validation module.
4
- * @package Meta Box
5
- */
6
-
7
- /**
8
- * Validation class.
9
- */
10
- class MASHSB_RWMB_Validation
11
- {
12
- /**
13
- * Add hooks when module is loaded.
14
- */
15
- public function __construct()
16
- {
17
- add_action( 'mashsb_rwmb_after', array( $this, 'rules' ) );
18
- add_action( 'mashsb_rwmb_enqueue_scripts', array( $this, 'scripts' ) );
19
- }
20
-
21
- /**
22
- * Output validation rules of each meta box.
23
- * The rules are outputted in [data-rules] attribute of an hidden <script> and will be converted into JSON by JS.
24
- * @param MASHSB_RW_Meta_Box $object Meta Box object
25
- */
26
- public function rules( MASHSB_RW_Meta_Box $object )
27
- {
28
- if ( ! empty( $object->meta_box['validation'] ) )
29
- {
30
- echo '<script type="text/html" class="mashsb-rwmb-validation-rules" data-rules="' . esc_attr( json_encode( $object->meta_box['validation'] ) ) . '"></script>';
31
- }
32
- }
33
-
34
- /**
35
- * Enqueue scripts for validation.
36
- */
37
- public function scripts()
38
- {
39
- wp_enqueue_script( 'jquery-validate', MASHSB_RWMB_JS_URL . 'jquery.validate.min.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
40
- wp_enqueue_script( 'mashsb-rwmb-validate', MASHSB_RWMB_JS_URL . 'validate.js', array( 'jquery-validate' ), MASHSB_RWMB_VER, true );
41
- wp_localize_script( 'mashsb-rwmb-validate', 'rwmbValidate', array(
42
- 'summaryMessage' => __( 'Please correct the errors highlighted below and try again.', 'meta-box' ),
43
- ) );
44
- }
45
- }
1
+ <?php
2
+ /**
3
+ * Validation module.
4
+ * @package Meta Box
5
+ */
6
+
7
+ /**
8
+ * Validation class.
9
+ */
10
+ class MASHSB_RWMB_Validation
11
+ {
12
+ /**
13
+ * Add hooks when module is loaded.
14
+ */
15
+ public function __construct()
16
+ {
17
+ add_action( 'mashsb_rwmb_after', array( $this, 'rules' ) );
18
+ add_action( 'mashsb_rwmb_enqueue_scripts', array( $this, 'scripts' ) );
19
+ }
20
+
21
+ /**
22
+ * Output validation rules of each meta box.
23
+ * The rules are outputted in [data-rules] attribute of an hidden <script> and will be converted into JSON by JS.
24
+ * @param MASHSB_RW_Meta_Box $object Meta Box object
25
+ */
26
+ public function rules( MASHSB_RW_Meta_Box $object )
27
+ {
28
+ if ( ! empty( $object->meta_box['validation'] ) )
29
+ {
30
+ echo '<script type="text/html" class="mashsb-rwmb-validation-rules" data-rules="' . esc_attr( json_encode( $object->meta_box['validation'] ) ) . '"></script>';
31
+ }
32
+ }
33
+
34
+ /**
35
+ * Enqueue scripts for validation.
36
+ */
37
+ public function scripts()
38
+ {
39
+ wp_enqueue_script( 'jquery-validate', MASHSB_RWMB_JS_URL . 'jquery.validate.min.js', array( 'jquery' ), MASHSB_RWMB_VER, true );
40
+ wp_enqueue_script( 'mashsb-rwmb-validate', MASHSB_RWMB_JS_URL . 'validate.js', array( 'jquery-validate' ), MASHSB_RWMB_VER, true );
41
+ wp_localize_script( 'mashsb-rwmb-validate', 'rwmbValidate', array(
42
+ 'summaryMessage' => __( 'Please correct the errors highlighted below and try again.', 'meta-box' ),
43
+ ) );
44
+ }
45
+ }
includes/admin/meta-box/inc/walkers/input-list-walker.php CHANGED
@@ -1,70 +1,70 @@
1
- <?php
2
- /**
3
- * Input List Walker
4
- * For checkbox and radio list fields
5
- */
6
- class MASHSB_RWMB_Input_List_Walker extends MASHSB_RWMB_Walker
7
- {
8
- /**
9
- * @see Walker::start_lvl()
10
- *
11
- * @param string $output Passed by reference. Used to append additional content.
12
- * @param int $depth Depth of item.
13
- * @param array $args
14
- */
15
- public function start_lvl( &$output, $depth = 0, $args = array() )
16
- {
17
- $output .= "<ul class='mashsb-rwmb-input-list'>";
18
- }
19
-
20
- /**
21
- * @see Walker::end_lvl()
22
- *
23
- * @param string $output Passed by reference. Used to append additional content.
24
- * @param int $depth Depth of item.
25
- * @param array $args
26
- */
27
- public function end_lvl( &$output, $depth = 0, $args = array() )
28
- {
29
- $output .= "</ul>";
30
- }
31
-
32
- /**
33
- * @see Walker::start_el()
34
- *
35
- * @param string $output Passed by reference. Used to append additional content.
36
- * @param object $object Item data object.
37
- * @param int $depth Depth of item.
38
- * @param int $current_object_id Item ID.
39
- * @param array $args
40
- */
41
- public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 )
42
- {
43
- $label = $this->db_fields['label'];
44
- $id = $this->db_fields['id'];
45
- $meta = $this->meta;
46
- $field = $this->field;
47
- $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
48
- $attributes = call_user_func( array( $field_class, 'get_attributes' ), $field, $object->$id );
49
-
50
- $output .= sprintf(
51
- '<li><label><input %s %s>%s</label>',
52
- MASHSB_RWMB_Field::render_attributes( $attributes ),
53
- checked( in_array( $object->$id, $meta ), 1, false ),
54
- $object->$label
55
- );
56
- }
57
-
58
- /**
59
- * @see Walker::end_el()
60
- *
61
- * @param string $output Passed by reference. Used to append additional content.
62
- * @param object $page Page data object. Not used.
63
- * @param int $depth Depth of page. Not Used.
64
- * @param array $args
65
- */
66
- public function end_el( &$output, $page, $depth = 0, $args = array() )
67
- {
68
- $output .= "</li>";
69
- }
70
- }
1
+ <?php
2
+ /**
3
+ * Input List Walker
4
+ * For checkbox and radio list fields
5
+ */
6
+ class MASHSB_RWMB_Input_List_Walker extends MASHSB_RWMB_Walker
7
+ {
8
+ /**
9
+ * @see Walker::start_lvl()
10
+ *
11
+ * @param string $output Passed by reference. Used to append additional content.
12
+ * @param int $depth Depth of item.
13
+ * @param array $args
14
+ */
15
+ public function start_lvl( &$output, $depth = 0, $args = array() )
16
+ {
17
+ $output .= "<ul class='mashsb-rwmb-input-list'>";
18
+ }
19
+
20
+ /**
21
+ * @see Walker::end_lvl()
22
+ *
23
+ * @param string $output Passed by reference. Used to append additional content.
24
+ * @param int $depth Depth of item.
25
+ * @param array $args
26
+ */
27
+ public function end_lvl( &$output, $depth = 0, $args = array() )
28
+ {
29
+ $output .= "</ul>";
30
+ }
31
+
32
+ /**
33
+ * @see Walker::start_el()
34
+ *
35
+ * @param string $output Passed by reference. Used to append additional content.
36
+ * @param object $object Item data object.
37
+ * @param int $depth Depth of item.
38
+ * @param int $current_object_id Item ID.
39
+ * @param array $args
40
+ */
41
+ public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 )
42
+ {
43
+ $label = $this->db_fields['label'];
44
+ $id = $this->db_fields['id'];
45
+ $meta = $this->meta;
46
+ $field = $this->field;
47
+ $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
48
+ $attributes = call_user_func( array( $field_class, 'get_attributes' ), $field, $object->$id );
49
+
50
+ $output .= sprintf(
51
+ '<li><label><input %s %s>%s</label>',
52
+ MASHSB_RWMB_Field::render_attributes( $attributes ),
53
+ checked( in_array( $object->$id, $meta ), 1, false ),
54
+ $object->$label
55
+ );
56
+ }
57
+
58
+ /**
59
+ * @see Walker::end_el()
60
+ *
61
+ * @param string $output Passed by reference. Used to append additional content.
62
+ * @param object $page Page data object. Not used.
63
+ * @param int $depth Depth of page. Not Used.
64
+ * @param array $args
65
+ */
66
+ public function end_el( &$output, $page, $depth = 0, $args = array() )
67
+ {
68
+ $output .= "</li>";
69
+ }
70
+ }
includes/admin/meta-box/inc/walkers/select-tree-walker.php CHANGED
@@ -1,75 +1,75 @@
1
- <?php
2
- /**
3
- * Select Tree Walker for cascading select fields.
4
- * @uses MASHSB_RWMB_Select_Walker
5
- */
6
- class MASHSB_RWMB_Select_Tree_Walker
7
- {
8
- /**
9
- * Field data.
10
- * @var string
11
- */
12
- public $field;
13
-
14
- /**
15
- * Field meta value.
16
- * @var array
17
- */
18
- public $meta = array();
19
-
20
- function __construct( $db_fields, $field, $meta )
21
- {
22
- $this->db_fields = wp_parse_args( (array) $db_fields, array(
23
- 'parent' => '',
24
- 'id' => '',
25
- 'label' => '',
26
- ) );
27
- $this->field = $field;
28
- $this->meta = (array) $meta;
29
- }
30
-
31
- function walk( $options )
32
- {
33
- $parent = $this->db_fields['parent'];
34
- $children = array();
35
-
36
- foreach ( $options as $o )
37
- {
38
- $children[$o->$parent][] = $o;
39
- }
40
- $top_level = isset( $children[0] ) ? 0 : $options[0]->$parent;
41
- return $this->display_level( $children, $top_level, true );
42
- }
43
-
44
- function display_level( $options, $parent_id = 0, $active = false )
45
- {
46
- $id = $this->db_fields['id'];
47
- $field = $this->field;
48
- $meta = $this->meta;
49
- $walker = new MASHSB_RWMB_Select_Walker( $this->db_fields, $this->field, $this->meta );
50
- $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
51
- $attributes = call_user_func( array( $field_class, 'get_attributes' ), $field, $meta );
52
-
53
- $children = $options[$parent_id];
54
- $output = sprintf(
55
- '<div class="mashsb-rwmb-select-tree %s" data-parent-id="%s"><select %s>',
56
- $active ? '' : 'hidden',
57
- $parent_id,
58
- MASHSB_RWMB_Field::render_attributes( $attributes )
59
- );
60
- $output .= isset( $field['placeholder'] ) ? "<option value=''>{$field['placeholder']}</option>" : '<option></option>';
61
- $output .= $walker->walk( $children, - 1 );
62
- $output .= '</select>';
63
-
64
- foreach ( $children as $c )
65
- {
66
- if ( isset( $options[$c->$id] ) )
67
- {
68
- $output .= $this->display_level( $options, $c->$id, in_array( $c->$id, $meta ) && $active );
69
- }
70
- }
71
-
72
- $output .= '</div>';
73
- return $output;
74
- }
75
- }
1
+ <?php
2
+ /**
3
+ * Select Tree Walker for cascading select fields.
4
+ * @uses MASHSB_RWMB_Select_Walker
5
+ */
6
+ class MASHSB_RWMB_Select_Tree_Walker
7
+ {
8
+ /**
9
+ * Field data.
10
+ * @var string
11
+ */
12
+ public $field;
13
+
14
+ /**
15
+ * Field meta value.
16
+ * @var array
17
+ */
18
+ public $meta = array();
19
+
20
+ function __construct( $db_fields, $field, $meta )
21
+ {
22
+ $this->db_fields = wp_parse_args( (array) $db_fields, array(
23
+ 'parent' => '',
24
+ 'id' => '',
25
+ 'label' => '',
26
+ ) );
27
+ $this->field = $field;
28
+ $this->meta = (array) $meta;
29
+ }
30
+
31
+ function walk( $options )
32
+ {
33
+ $parent = $this->db_fields['parent'];
34
+ $children = array();
35
+
36
+ foreach ( $options as $o )
37
+ {
38
+ $children[$o->$parent][] = $o;
39
+ }
40
+ $top_level = isset( $children[0] ) ? 0 : $options[0]->$parent;
41
+ return $this->display_level( $children, $top_level, true );
42
+ }
43
+
44
+ function display_level( $options, $parent_id = 0, $active = false )
45
+ {
46
+ $id = $this->db_fields['id'];
47
+ $field = $this->field;
48
+ $meta = $this->meta;
49
+ $walker = new MASHSB_RWMB_Select_Walker( $this->db_fields, $this->field, $this->meta );
50
+ $field_class = MASHSB_RW_Meta_Box::get_class_name( $field );
51
+ $attributes = call_user_func( array( $field_class, 'get_attributes' ), $field, $meta );
52
+
53
+ $children = $options[$parent_id];
54
+ $output = sprintf(
55
+ '<div class="mashsb-rwmb-select-tree %s" data-parent-id="%s"><select %s>',
56
+ $active ? '' : 'hidden',
57
+ $parent_id,
58
+ MASHSB_RWMB_Field::render_attributes( $attributes )
59
+ );
60
+ $output .= isset( $field['placeholder'] ) ? "<option value=''>{$field['placeholder']}</option>" : '<option></option>';
61
+ $output .= $walker->walk( $children, - 1 );
62
+ $output .= '</select>';
63
+
64
+ foreach ( $children as $c )
65
+ {
66
+ if ( isset( $options[$c->$id] ) )
67
+ {
68
+ $output .= $this->display_level( $options, $c->$id, in_array( $c->$id, $meta ) && $active );
69
+ }
70
+ }
71
+
72
+ $output .= '</div>';
73
+ return $output;
74
+ }
75
+ }
includes/admin/meta-box/inc/walkers/select-walker.php CHANGED
@@ -1,32 +1,32 @@
1
- <?php
2
- /**
3
- * Select Walker
4
- * For generating Select fields
5
- */
6
- class MASHSB_RWMB_Select_Walker extends MASHSB_RWMB_Walker
7
- {
8
- /**
9
- * @see Walker::start_el()
10
- *
11
- * @param string $output Passed by reference. Used to append additional content.
12
- * @param object $object Item
13
- * @param int $depth Depth of Item.
14
- * @param int $current_object_id Item id.
15
- * @param array $args
16
- */
17
- public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 )
18
- {
19
- $label = $this->db_fields['label'];
20
- $id = $this->db_fields['id'];
21
- $meta = $this->meta;
22
- $indent = str_repeat( "&nbsp;", $depth * 4 );
23
-
24
- $output .= sprintf(
25
- '<option value="%s" %s>%s%s</option>',
26
- $object->$id,
27
- selected( in_array( $object->$id, $meta ), 1, false ),
28
- $indent,
29
- $object->$label
30
- );
31
- }
32
- }
1
+ <?php
2
+ /**
3
+ * Select Walker
4
+ * For generating Select fields
5
+ */
6
+ class MASHSB_RWMB_Select_Walker extends MASHSB_RWMB_Walker
7
+ {
8
+ /**
9
+ * @see Walker::start_el()
10
+ *
11
+ * @param string $output Passed by reference. Used to append additional content.
12
+ * @param object $object Item
13
+ * @param int $depth Depth of Item.
14
+ * @param int $current_object_id Item id.
15
+ * @param array $args
16
+ */
17
+ public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 )
18
+ {
19
+ $label = $this->db_fields['label'];
20
+ $id = $this->db_fields['id'];
21
+ $meta = $this->meta;
22
+ $indent = str_repeat( "&nbsp;", $depth * 4 );
23
+
24
+ $output .= sprintf(
25
+ '<option value="%s" %s>%s%s</option>',
26
+ $object->$id,
27
+ selected( in_array( $object->$id, $meta ), 1, false ),
28
+ $indent,
29
+ $object->$label
30
+ );
31
+ }
32
+ }
includes/admin/meta-box/inc/walkers/walker.php CHANGED
@@ -1,34 +1,34 @@
1
- <?php
2
- /**
3
- * Base Walker
4
- * Walkers must inherit this class and overwrite methods with its own.
5
- */
6
- abstract class MASHSB_RWMB_Walker extends Walker
7
- {
8
- /**
9
- * Field data.
10
- *
11
- * @access public
12
- * @var array
13
- */
14
- public $field;
15
-
16
- /**
17
- * Meta data.
18
- *
19
- * @access public
20
- * @var array
21
- */
22
- public $meta = array();
23
-
24
- function __construct( $db_fields, $field, $meta )
25
- {
26
- $this->db_fields = wp_parse_args( (array) $db_fields, array(
27
- 'parent' => '',
28
- 'id' => '',
29
- 'label' => '',
30
- ) );
31
- $this->field = $field;
32
- $this->meta = (array) $meta;
33
- }
34
- }
1
+ <?php
2
+ /**
3
+ * Base Walker
4
+ * Walkers must inherit this class and overwrite methods with its own.
5
+ */
6
+ abstract class MASHSB_RWMB_Walker extends Walker
7
+ {
8
+ /**
9
+ * Field data.
10
+ *
11
+ * @access public
12
+ * @var array
13
+ */
14
+ public $field;
15
+
16
+ /**
17
+ * Meta data.
18
+ *
19
+ * @access public
20
+ * @var array
21
+ */
22
+ public $meta = array();
23
+
24
+ function __construct( $db_fields, $field, $meta )
25
+ {
26
+ $this->db_fields = wp_parse_args( (array) $db_fields, array(
27
+ 'parent' => '',
28
+ 'id' => '',
29
+ 'label' => '',
30
+ ) );
31
+ $this->field = $field;
32
+ $this->meta = (array) $meta;
33
+ }
34
+ }
includes/admin/meta-box/js/autocomplete.js CHANGED
@@ -1,55 +1,55 @@
1
- jQuery( function ( $ )
2
- {
3
- 'use strict';
4
-
5
- /**
6
- * Update date picker element
7
- * Used for static & dynamic added elements (when clone)
8
- */
9
- function updateAutocomplete( e )
10
- {
11
- var $this = $( this ),
12
- $search = $this.siblings( '.mashsb-rwmb-autocomplete-search'),
13
- $result = $this.siblings( '.mashsb-rwmb-autocomplete-results' ),
14
- name = $this.attr( 'name' );
15
-
16
- // If the function is called on cloning, then change the field name and clear all results
17
- // @see clone.js
18
- if ( e.hasOwnProperty( 'type' ) && 'clone' == e.type )
19
- {
20
- // Clear all results
21
- $result.html( '' );
22
- }
23
-
24
- $search.removeClass( 'ui-autocomplete-input' )
25
- .autocomplete( {
26
- minLength: 0,
27
- source : $this.data( 'options' ),
28
- select : function ( event, ui )
29
- {
30
- $result.append(
31
- '<div class="mashsb-rwmb-autocomplete-result">' +
32
- '<div class="label">' + ( typeof ui.item.excerpt !== 'undefined' ? ui.item.excerpt : ui.item.label ) + '</div>' +
33
- '<div class="actions">' + MASHSB_RWMB_Autocomplete.delete + '</div>' +
34
- '<input type="hidden" class="mashsb-rwmb-autocomplete-value" name="' + name + '" value="' + ui.item.value + '">' +
35
- '</div>'
36
- );
37
-
38
- // Reinitialize value
39
- $search.val( '' );
40
-
41
- return false;
42
- }
43
- } );
44
- }
45
-
46
- $( '.mashsb-rwmb-autocomplete-wrapper input[type="hidden"]' ).each( updateAutocomplete );
47
- $( '.mashsb-rwmb-input' ).on( 'clone', ':input.mashsb-rwmb-autocomplete', updateAutocomplete );
48
-
49
- // Handle remove action
50
- $( document ).on( 'click', '.mashsb-rwmb-autocomplete-result .actions', function ()
51
- {
52
- // remove result
53
- $( this ).parent().remove();
54
- } );
55
- } );
1
+ jQuery( function ( $ )
2
+ {
3
+ 'use strict';
4
+
5
+ /**
6
+ * Update date picker element
7
+ * Used for static & dynamic added elements (when clone)
8
+ */
9
+ function updateAutocomplete( e )
10
+ {
11
+ var $this = $( this ),
12
+ $search = $this.siblings( '.mashsb-rwmb-autocomplete-search'),
13
+ $result = $this.siblings( '.mashsb-rwmb-autocomplete-results' ),
14
+ name = $this.attr( 'name' );
15
+
16
+ // If the function is called on cloning, then change the field name and clear all results
17
+ // @see clone.js
18
+ if ( e.hasOwnProperty( 'type' ) && 'clone' == e.type )
19
+ {
20
+ // Clear all results
21
+ $result.html( '' );
22
+ }
23
+
24
+ $search.removeClass( 'ui-autocomplete-input' )
25
+ .autocomplete( {
26
+ minLength: 0,
27
+ source : $this.data( 'options' ),
28
+ select : function ( event, ui )
29
+ {
30
+ $result.append(
31
+ '<div class="mashsb-rwmb-autocomplete-result">' +
32
+ '<div class="label">' + ( typeof ui.item.excerpt !== 'undefined' ? ui.item.excerpt : ui.item.label ) + '</div>' +
33
+ '<div class="actions">' + MASHSB_RWMB_Autocomplete.delete + '</div>' +
34
+ '<input type="hidden" class="mashsb-rwmb-autocomplete-value" name="' + name + '" value="' + ui.item.value + '">' +
35
+ '</div>'
36
+ );
37
+
38
+ // Reinitialize value
39
+ $search.val( '' );
40
+
41
+ return false;
42
+ }
43
+ } );
44
+ }
45
+
46
+ $( '.mashsb-rwmb-autocomplete-wrapper input[type="hidden"]' ).each( updateAutocomplete );
47
+ $( '.mashsb-rwmb-input' ).on( 'clone', ':input.mashsb-rwmb-autocomplete', updateAutocomplete );
48
+
49
+ // Handle remove action
50
+ $( document ).on( 'click', '.mashsb-rwmb-autocomplete-result .actions', function ()
51
+ {
52
+ // remove result
53
+ $( this ).parent().remove();
54
+ } );
55
+ } );
includes/admin/meta-box/js/autosave.js CHANGED
@@ -1,19 +1,19 @@
1
- jQuery( function( $ )
2
- {
3
- 'use strict';
4
-
5
- $( document ).ajaxSend( function( e, xhr, s )
6
- {
7
- if ( typeof s.data !== 'undefined' && -1 !== s.data.indexOf( 'action=autosave' ) )
8
- {
9
- $( '.mashsb-rwmb-meta-box').each( function()
10
- {
11
- var $meta_box = $( this );
12
- if ( $meta_box.data( 'autosave' ) === true )
13
- {
14
- s.data += '&' + $meta_box.find( ':input' ).serialize();
15
- }
16
- } );
17
- }
18
- } );
19
- } );
1
+ jQuery( function( $ )
2
+ {
3
+ 'use strict';
4
+
5
+ $( document ).ajaxSend( function( e, xhr, s )
6
+ {
7
+ if ( typeof s.data !== 'undefined' && -1 !== s.data.indexOf( 'action=autosave' ) )
8
+ {
9
+ $( '.mashsb-rwmb-meta-box').each( function()
10
+ {
11
+ var $meta_box = $( this );
12
+ if ( $meta_box.data( 'autosave' ) === true )
13
+ {
14
+ s.data += '&' + $meta_box.find( ':input' ).serialize();
15
+ }
16
+ } );
17
+ }
18
+ } );
19
+ } );
includes/admin/meta-box/js/clone.js CHANGED
@@ -1,211 +1,211 @@
1
- /* global jQuery, rwmb_cloneable_editors */
2
-
3
- jQuery( function ( $ )
4
- {
5
- 'use strict';
6
-
7
- // Object holds all methods related to fields' index when clone
8
- var cloneIndex = {
9
- /**
10
- * Set index for fields in a .mashsb-rwmb-clone
11
- * @param $clone .mashsb-rwmb-clone element
12
- * @param index Index value
13
- */
14
- set: function ( $clone, index )
15
- {
16
- $clone.find( ':input[class|="rwmb"]' ).each( function ()
17
- {
18
- var $field = $( this );
19
-
20
- // Name attribute
21
- var name = $field.attr( 'name' );
22
- if ( name )
23
- {
24
- $field.attr( 'name', cloneIndex.replace( index, name, '[', ']', false ) );
25
- }
26
-
27
- // ID attribute
28
- var id = this.id;
29
- if ( id )
30
- {
31
- $field.attr( 'id', cloneIndex.replace( index, id, '_' ) );
32
- }
33
- } );
34
-
35
- // Address button's value attribute
36
- var $address = $clone.find( '.mashsb-rwmb-map-goto-address-button' );
37
- if ( $address.length )
38
- {
39
- var value = $address.attr( 'value' );
40
- $address.attr( 'value', cloneIndex.replace( index, value, '_' ) );
41
- }
42
- },
43
-
44
- /**
45
- * Replace an attribute of a field with updated index
46
- * @param index New index value
47
- * @param value Attribute value
48
- * @param before String before returned value
49
- * @param after String after returned value
50
- * @param alternative Check if attribute does not contain any integer, will reset the attribute?
51
- * @return string
52
- */
53
- replace: function ( index, value, before, after, alternative )
54
- {
55
- before = before || '';
56
- after = after || '';
57
- alternative = alternative || true;
58
-
59
- var regex = new RegExp( cloneIndex.escapeRegex( before ) + '(\\d+)' + cloneIndex.escapeRegex( after ) ),
60
- newValue = before + index + after;
61
-
62
- return regex.test( value ) ? value.replace( regex, newValue ) : (alternative ? value + newValue : value );
63
- },
64
-
65
- /**
66
- * Helper function to escape string in regular expression
67
- * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
68
- * @param string
69
- * @return string
70
- */
71
- escapeRegex: function ( string )
72
- {
73
- return string.replace( /[.*+?^${}()|[\]\\]/g, "\\$&" );
74
- },
75
-
76
- /**
77
- * Helper function to create next index for clones
78
- * @param $container .mashsb-rwmb-input container
79
- * @return integer
80
- */
81
- nextIndex: function ( $container )
82
- {
83
- var nextIndex = $container.data( 'next-index' );
84
- $container.data( 'next-index', nextIndex + 1 );
85
- return nextIndex;
86
- }
87
- };
88
-
89
- /**
90
- * Clone fields
91
- * @param $container A div container which has all fields
92
- * @return void
93
- */
94
- function clone( $container )
95
- {
96
- var $last = $container.children( '.mashsb-rwmb-clone:last' ),
97
- $clone = $last.clone(),
98
- $input = $clone.find( ':input[class|="rwmb"]' ),
99
- nextIndex = cloneIndex.nextIndex( $container );
100
-
101
- // Reset value for fields
102
- $input.each( function ()
103
- {
104
- var $field = $( this );
105
- if ( $field.is( ':radio' ) || $field.is( ':checkbox' ) )
106
- {
107
- // Reset 'checked' attribute
108
- $field.prop( 'checked', false );
109
- }
110
- else if ( $field.is( 'select' ) )
111
- {
112
- // Reset select to first
113
- $field.prop( 'selectedIndex', 0 )
114
- }
115
- else if ( 'hidden' !== $field.attr( 'type' ) )
116
- {
117
- // Reset value
118
- $field.val( '' );
119
- }
120
- } );
121
-
122
- // Insert Clone
123
- $clone.insertAfter( $last );
124
- // Set fields index. Must run before trigger clone event.
125
- cloneIndex.set( $clone, nextIndex );
126
-
127
- // Trigger custom clone event
128
- $input.trigger( 'clone', nextIndex );
129
- }
130
-
131
- /**
132
- * Hide remove buttons when there's only 1 of them
133
- *
134
- * @param $container .mashsb-rwmb-input container
135
- *
136
- * @return void
137
- */
138
- function toggleRemoveButtons( $container )
139
- {
140
- var $button = $container.find( '.remove-clone' );
141
- $button.toggle( $button.length > 1 );
142
- }
143
-
144
- /**
145
- * Toggle add button
146
- * Used with [data-max-clone] attribute. When max clone is reached, the add button is hid and vice versa
147
- *
148
- * @param $container .mashsb-rwmb-input container
149
- *
150
- * @return void
151
- */
152
- function toggleAddButton( $container )
153
- {
154
- var $button = $container.find( '.add-clone' ),
155
- maxClone = parseInt( $container.data( 'max-clone' ) ),
156
- numClone = $container.find( '.mashsb-rwmb-clone' ).length;
157
-
158
- $button.toggle( isNaN( maxClone ) || ( maxClone && numClone < maxClone ) );
159
- }
160
-
161
- $( '#wpbody-content' )
162
- // Add clones
163
- .on( 'click', '.add-clone', function ( e )
164
- {
165
- e.preventDefault();
166
-
167
- var $container = $( this ).closest( '.mashsb-rwmb-input' );
168
- clone( $container );
169
-
170
- toggleRemoveButtons( $container );
171
- toggleAddButton( $container );
172
- } )
173
- // Remove clones
174
- .on( 'click', '.remove-clone', function ( e )
175
- {
176
- e.preventDefault();
177
-
178
- var $this = $( this ),
179
- $container = $this.closest( '.mashsb-rwmb-input' );
180
-
181
- // Remove clone only if there are 2 or more of them
182
- if ( $container.find( '.mashsb-rwmb-clone' ).length < 2 )
183
- {
184
- return;
185
- }
186
-
187
- $this.parent().trigger( 'remove' ).remove();
188
- toggleRemoveButtons( $container );
189
- toggleAddButton( $container )
190
- } );
191
-
192
- $( '.mashsb-rwmb-input' ).each( function ()
193
- {
194
- var $container = $( this );
195
- toggleRemoveButtons( $container );
196
- toggleAddButton( $container );
197
-
198
- $container
199
- .data( 'next-index', $container.children( '.mashsb-rwmb-clone' ).length )
200
- .sortable( {
201
- handle : '.mashsb-rwmb-clone-icon',
202
- placeholder: ' mashsb-rwmb-clone mashsb-rwmb-clone-placeholder',
203
- items : '.mashsb-rwmb-clone',
204
- start : function ( event, ui )
205
- {
206
- // Make the placeholder has the same height as dragged item
207
- ui.placeholder.height( ui.item.height() );
208
- }
209
- } );
210
- } );
211
- } );
1
+ /* global jQuery, rwmb_cloneable_editors */
2
+
3
+ jQuery( function ( $ )
4
+ {
5
+ 'use strict';
6
+
7
+ // Object holds all methods related to fields' index when clone
8
+ var cloneIndex = {
9
+ /**
10
+ * Set index for fields in a .mashsb-rwmb-clone
11
+ * @param $clone .mashsb-rwmb-clone element
12
+ * @param index Index value
13
+ */
14
+ set: function ( $clone, index )
15
+ {
16
+ $clone.find( ':input[class|="rwmb"]' ).each( function ()
17
+ {
18
+ var $field = $( this );
19
+
20
+ // Name attribute
21
+ var name = $field.attr( 'name' );
22
+ if ( name )
23
+ {
24
+ $field.attr( 'name', cloneIndex.replace( index, name, '[', ']', false ) );
25
+ }
26
+
27
+ // ID attribute
28
+ var id = this.id;
29
+ if ( id )
30
+ {
31
+ $field.attr( 'id', cloneIndex.replace( index, id, '_' ) );
32
+ }
33
+ } );
34
+
35
+ // Address button's value attribute
36
+ var $address = $clone.find( '.mashsb-rwmb-map-goto-address-button' );
37
+ if ( $address.length )
38
+ {
39
+ var value = $address.attr( 'value' );
40
+ $address.attr( 'value', cloneIndex.replace( index, value, '_' ) );
41
+ }
42
+ },
43
+
44
+ /**
45
+ * Replace an attribute of a field with updated index
46
+ * @param index New index value
47
+ * @param value Attribute value
48
+ * @param before String before returned value
49
+ * @param after String after returned value
50
+ * @param alternative Check if attribute does not contain any integer, will reset the attribute?
51
+ * @return string
52
+ */
53
+ replace: function ( index, value, before, after, alternative )
54
+ {
55
+ before = before || '';
56
+ after = after || '';
57
+ alternative = alternative || true;
58
+
59
+ var regex = new RegExp( cloneIndex.escapeRegex( before ) + '(\\d+)' + cloneIndex.escapeRegex( after ) ),
60
+ newValue = before + index + after;
61
+
62
+ return regex.test( value ) ? value.replace( regex, newValue ) : (alternative ? value + newValue : value );
63
+ },
64
+
65
+ /**
66
+ * Helper function to escape string in regular expression
67
+ * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
68
+ * @param string
69
+ * @return string
70
+ */
71
+ escapeRegex: function ( string )
72
+ {
73
+ return string.replace( /[.*+?^${}()|[\]\\]/g, "\\$&" );
74
+ },
75
+
76
+ /**
77
+ * Helper function to create next index for clones
78
+ * @param $container .mashsb-rwmb-input container
79
+ * @return integer
80
+ */
81
+ nextIndex: function ( $container )
82
+ {
83
+ var nextIndex = $container.data( 'next-index' );
84
+ $container.data( 'next-index', nextIndex + 1 );
85
+ return nextIndex;
86
+ }
87
+ };
88
+
89
+ /**
90
+ * Clone fields
91
+ * @param $container A div container which has all fields
92
+ * @return void
93
+ */
94
+ function clone( $container )
95
+ {
96
+ var $last = $container.children( '.mashsb-rwmb-clone:last' ),
97
+ $clone = $last.clone(),
98
+ $input = $clone.find( ':input[class|="rwmb"]' ),
99
+ nextIndex = cloneIndex.nextIndex( $container );
100
+
101
+ // Reset value for fields
102
+ $input.each( function ()
103
+ {
104
+ var $field = $( this );
105
+ if ( $field.is( ':radio' ) || $field.is( ':checkbox' ) )
106
+ {
107
+ // Reset 'checked' attribute
108
+ $field.prop( 'checked', false );
109
+ }
110
+ else if ( $field.is( 'select' ) )
111
+ {
112
+ // Reset select to first
113
+ $field.prop( 'selectedIndex', 0 )
114
+ }
115
+ else if ( 'hidden' !== $field.attr( 'type' ) )
116
+ {
117
+ // Reset value
118
+ $field.val( '' );
119
+ }
120
+ } );
121
+
122
+ // Insert Clone
123
+ $clone.insertAfter( $last );
124
+ // Set fields index. Must run before trigger clone event.
125
+ cloneIndex.set( $clone, nextIndex );
126
+
127
+ // Trigger custom clone event
128
+ $input.trigger( 'clone', nextIndex );
129
+ }
130
+
131
+ /**
132
+ * Hide remove buttons when there's only 1 of them
133
+ *
134
+ * @param $container .mashsb-rwmb-input container
135
+ *
136
+ * @return void
137
+ */
138
+ function toggleRemoveButtons( $container )
139
+ {
140
+ var $button = $container.find( '.remove-clone' );
141
+ $button.toggle( $button.length > 1 );
142
+ }
143
+
144
+ /**
145
+ * Toggle add button
146
+ * Used with [data-max-clone] attribute. When max clone is reached, the add button is hid and vice versa
147
+ *
148
+ * @param $container .mashsb-rwmb-input container
149
+ *
150
+ * @return void
151
+ */
152
+ function toggleAddButton( $container )
153
+ {
154
+ var $button = $container.find( '.add-clone' ),
155
+ maxClone = parseInt( $container.data( 'max-clone' ) ),
156
+ numClone = $container.find( '.mashsb-rwmb-clone' ).length;
157
+
158
+ $button.toggle( isNaN( maxClone ) || ( maxClone && numClone < maxClone ) );
159
+ }
160
+
161
+ $( '#wpbody-content' )
162
+ // Add clones
163
+ .on( 'click', '.add-clone', function ( e )
164
+ {
165
+ e.preventDefault();
166
+
167
+ var $container = $( this ).closest( '.mashsb-rwmb-input' );
168
+ clone( $container );
169
+
170
+ toggleRemoveButtons( $container );
171
+ toggleAddButton( $container );
172
+ } )
173
+ // Remove clones
174
+ .on( 'click', '.remove-clone', function ( e )
175
+ {
176
+ e.preventDefault();
177
+
178
+ var $this = $( this ),
179
+ $container = $this.closest( '.mashsb-rwmb-input' );
180
+
181
+ // Remove clone only if there are 2 or more of them
182
+ if ( $container.find( '.mashsb-rwmb-clone' ).length < 2 )
183
+ {
184
+ return;
185
+ }
186
+
187
+ $this.parent().trigger( 'remove' ).remove();
188
+ toggleRemoveButtons( $container );
189
+ toggleAddButton( $container )
190
+ } );
191
+
192
+ $( '.mashsb-rwmb-input' ).each( function ()
193
+ {
194
+ var $container = $( this );
195
+ toggleRemoveButtons( $container );
196
+ toggleAddButton( $container );
197
+
198
+ $container
199
+ .data( 'next-index', $container.children( '.mashsb-rwmb-clone' ).length )
200
+ .sortable( {
201
+ handle : '.mashsb-rwmb-clone-icon',
202
+ placeholder: ' mashsb-rwmb-clone mashsb-rwmb-clone-placeholder',
203
+ items : '.mashsb-rwmb-clone',
204
+ start : function ( event, ui )
205
+ {
206
+ // Make the placeholder has the same height as dragged item
207
+ ui.placeholder.height( ui.item.height() );
208
+ }
209
+ } );
210
+ } );
211
+ } );
includes/admin/meta-box/js/color.js CHANGED
@@ -1,38 +1,38 @@
1
- jQuery( function ( $ )
2
- {
3
- 'use strict';
4
-
5
- /**
6
- * Update color picker element
7
- * Used for static & dynamic added elements (when clone)
8
- */
9
- function update()
10
- {
11
- var $this = $( this ),
12
- $container = $this.closest( '.mashsb-rwmb-color-clone' ),
13
- data = $.extend(
14
- {
15
- change: function()
16
- {
17
- $( this ).trigger( 'color:change' );
18
- },
19
- clear: function()
20
- {
21
- $( this ).trigger( 'color:clear' );
22
- }
23
- },
24
- $this.data( 'options' ) );
25
-
26
- // Clone doesn't have input for color picker, we have to add the input and remove the color picker container
27
- if ( $container.length > 0 )
28
- {
29
- $this.appendTo( $container ).siblings( '.wp-picker-container' ).remove();
30
- }
31
-
32
- // Show color picker
33
- $this.wpColorPicker( data );
34
- }
35
-
36
- $( ':input.mashsb-rwmb-color' ).each( update );
37
- $( '.mashsb-rwmb-input' ).on( 'clone', 'input.mashsb-rwmb-color', update );
38
- } );
1
+ jQuery( function ( $ )
2
+ {
3
+ 'use strict';
4
+
5
+ /**
6
+ * Update color picker element
7
+ * Used for static & dynamic added elements (when clone)
8
+ */
9
+ function update()
10
+ {
11
+ var $this = $( this ),
12
+ $container = $this.closest( '.mashsb-rwmb-color-clone' ),
13
+ data = $.extend(
14
+ {
15
+ change: function()
16
+ {
17
+ $( this ).trigger( 'color:change' );
18
+ },
19
+ clear: function()
20
+ {
21
+ $( this ).trigger( 'color:clear' );
22
+ }
23
+ },
24
+ $this.data( 'options' ) );
25
+
26
+ // Clone doesn't have input for color picker, we have to add the input and remove the color picker container
27
+ if ( $container.length > 0 )
28
+ {
29
+ $this.appendTo( $container ).siblings( '.wp-picker-container' ).remove();
30
+ }
31
+
32
+ // Show color picker
33
+ $this.wpColorPicker( data );
34
+ }
35
+
36
+ $( ':input.mashsb-rwmb-color' ).each( update );
37
+ $( '.mashsb-rwmb-input' ).on( 'clone', 'input.mashsb-rwmb-color', update );
38
+ } );
includes/admin/meta-box/js/date.js CHANGED
@@ -1,57 +1,57 @@
1
- jQuery( function ( $ )
2
- {
3
- 'use strict';
4
-
5
- /**
6
- * Update date picker element
7
- * Used for static & dynamic added elements (when clone)
8
- */
9
- function update()
10
- {
11
- var $this = $( this ),
12
- options = $this.data( 'options' ),
13
- $inline = $this.siblings( '.mashsb-rwmb-datetime-inline' ),
14
- $timestamp = $this.siblings( '.mashsb-rwmb-datetime-timestamp' ),
15
- current = $this.val();
16
-
17
- $this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
18
- if ( $timestamp.length )
19
- {
20
- var $picker = $inline.length ? $inline : $this;
21
- options.onSelect = function ()
22
- {
23
- $timestamp.val( getTimestamp( $picker.datepicker( 'getDate' ) ) );
24
- };
25
- }
26
-
27
- if ( $inline.length )
28
- {
29
- options.altField = '#' + $this.attr( 'id' );
30
- $inline
31
- .removeClass( 'hasDatepicker' )
32
- .empty()
33
- .prop( 'id', '' )
34
- .datepicker( options )
35
- .datepicker( 'setDate', current );
36
- }
37
- else
38
- {
39
- $this.removeClass( 'hasDatepicker' ).datepicker( options );
40
- }
41
- }
42
-
43
- /**
44
- * Convert date to Unix timestamp in milliseconds
45
- * @link http://stackoverflow.com/a/14006555/556258
46
- * @param date
47
- * @return number
48
- */
49
- function getTimestamp( date )
50
- {
51
- var milliseconds = Date.UTC( date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds() );
52
- return Math.floor( milliseconds / 1000 );
53
- }
54
-
55
- $( ':input.mashsb-rwmb-date' ).each( update );
56
- $( '.mashsb-rwmb-input' ).on( 'clone', ':input.mashsb-rwmb-date', update );
57
- } );
1
+ jQuery( function ( $ )
2
+ {
3
+ 'use strict';
4
+
5
+ /**
6
+ * Update date picker element
7
+ * Used for static & dynamic added elements (when clone)
8
+ */
9
+ function update()
10
+ {
11
+ var $this = $( this ),
12
+ options = $this.data( 'options' ),
13
+ $inline = $this.siblings( '.mashsb-rwmb-datetime-inline' ),
14
+ $timestamp = $this.siblings( '.mashsb-rwmb-datetime-timestamp' ),
15
+ current = $this.val();
16
+
17
+ $this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
18
+ if ( $timestamp.length )
19
+ {
20
+ var $picker = $inline.length ? $inline : $this;
21
+ options.onSelect = function ()
22
+ {
23
+ $timestamp.val( getTimestamp( $picker.datepicker( 'getDate' ) ) );
24
+ };
25
+ }
26
+
27
+ if ( $inline.length )
28
+ {
29
+ options.altField = '#' + $this.attr( 'id' );
30
+ $inline
31
+ .removeClass( 'hasDatepicker' )
32
+ .empty()
33
+ .prop( 'id', '' )
34
+ .datepicker( options )
35
+ .datepicker( 'setDate', current );
36
+ }
37
+ else
38
+ {
39
+ $this.removeClass( 'hasDatepicker' ).datepicker( options );
40
+ }
41
+ }
42
+
43
+ /**
44
+ * Convert date to Unix timestamp in milliseconds
45
+ * @link http://stackoverflow.com/a/14006555/556258
46
+ * @param date
47
+ * @return number
48
+ */
49
+ function getTimestamp( date )
50
+ {
51
+ var milliseconds = Date.UTC( date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds() );
52
+ return Math.floor( milliseconds / 1000 );
53
+ }
54
+
55
+ $( ':input.mashsb-rwmb-date' ).each( update );
56
+ $( '.mashsb-rwmb-input' ).on( 'clone', ':input.mashsb-rwmb-date', update );
57
+ } );
includes/admin/meta-box/js/datetime.js CHANGED
@@ -1,67 +1,67 @@
1
- jQuery( function ( $ )
2
- {
3
- 'use strict';
4
-
5
- /**
6
- * Update datetime picker element
7
- * Used for static & dynamic added elements (when clone)
8
- */
9
- function update()
10
- {
11
- var $this = $( this ),
12
- options = $this.data( 'options' ),
13
- $inline = $this.siblings( '.mashsb-rwmb-datetime-inline' ),
14
- $timestamp = $this.siblings( '.mashsb-rwmb-datetime-timestamp' ),
15
- current = $this.val();
16
-
17
- $this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
18
- if ( $timestamp.length )
19
- {
20
- var $picker = $inline.length ? $inline : $this;
21
- options.onSelect = function ()
22
- {
23
- $timestamp.val( getTimestamp( $picker.datetimepicker( 'getDate' ) ) );
24
- };
25
- }
26
-
27
- if ( $inline.length )
28
- {
29
- options.altField = '#' + $this.attr( 'id' );
30
- $inline
31
- .removeClass( 'hasDatepicker' )
32
- .empty()
33
- .prop( 'id', '' )
34
- .datetimepicker( options )
35
- .datetimepicker( 'setDate', current );
36
- }
37
- else
38
- {
39
- $this.removeClass( 'hasDatepicker' ).datetimepicker( options );
40
- }
41
- }
42
-
43
- /**
44
- * Convert date to Unix timestamp in milliseconds
45
- * @link http://stackoverflow.com/a/14006555/556258
46
- * @param date
47
- * @return number
48
- */
49
- function getTimestamp( date )
50
- {
51
- var milliseconds = Date.UTC( date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds() );
52
- return Math.floor( milliseconds / 1000 );
53
- }
54
-
55
- // Set language if available
56
- if ( $.timepicker.regional.hasOwnProperty( MASHSB_RWMB_Datetimepicker.locale ) )
57
- {
58
- $.timepicker.setDefaults( $.timepicker.regional[MASHSB_RWMB_Datetimepicker.locale] );
59
- }
60
- else if ( $.timepicker.regional.hasOwnProperty( MASHSB_RWMB_Datetimepicker.localeShort ) )
61
- {
62
- $.timepicker.setDefaults( $.timepicker.regional[MASHSB_RWMB_Datetimepicker.localeShort] );
63
- }
64
-
65
- $( ':input.mashsb-rwmb-datetime' ).each( update );
66
- $( '.mashsb-rwmb-input' ).on( 'clone', ':input.mashsb-rwmb-datetime', update );
67
- } );
1
+ jQuery( function ( $ )
2
+ {
3
+ 'use strict';
4
+
5
+ /**
6
+ * Update datetime picker element
7
+ * Used for static & dynamic added elements (when clone)
8
+ */
9
+ function update()
10
+ {
11
+ var $this = $( this ),
12
+ options = $this.data( 'options' ),
13
+ $inline = $this.siblings( '.mashsb-rwmb-datetime-inline' ),
14
+ $timestamp = $this.siblings( '.mashsb-rwmb-datetime-timestamp' ),
15
+ current = $this.val();
16
+
17
+ $this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
18
+ if ( $timestamp.length )
19
+ {
20
+ var $picker = $inline.length ? $inline : $this;
21
+ options.onSelect = function ()
22
+ {
23
+ $timestamp.val( getTimestamp( $picker.datetimepicker( 'getDate' ) ) );
24
+ };
25
+ }
26
+
27
+ if ( $inline.length )
28
+ {
29
+ options.altField = '#' + $this.attr( 'id' );
30
+ $inline
31
+ .removeClass( 'hasDatepicker' )
32
+ .empty()
33
+ .prop( 'id', '' )
34
+ .datetimepicker( options )
35
+ .datetimepicker( 'setDate', current );
36
+ }
37
+ else
38
+ {
39
+ $this.removeClass( 'hasDatepicker' ).datetimepicker( options );
40
+ }
41
+ }
42
+
43
+ /**
44
+ * Convert date to Unix timestamp in milliseconds
45
+ * @link http://stackoverflow.com/a/14006555/556258
46
+ * @param date
47
+ * @return number
48
+ */
49
+ function getTimestamp( date )
50
+ {
51
+ var milliseconds = Date.UTC( date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds() );
52
+ return Math.floor( milliseconds / 1000 );
53
+ }
54
+
55
+ // Set language if available
56
+ if ( $.timepicker.regional.hasOwnProperty( MASHSB_RWMB_Datetimepicker.locale ) )
57
+ {
58
+ $.timepicker.setDefaults( $.timepicker.regional[MASHSB_RWMB_Datetimepicker.locale] );
59
+ }
60
+ else if ( $.timepicker.regional.hasOwnProperty( MASHSB_RWMB_Datetimepicker.localeShort ) )
61
+ {
62
+ $.timepicker.setDefaults( $.timepicker.regional[MASHSB_RWMB_Datetimepicker.localeShort] );
63
+ }
64
+
65
+ $( ':input.mashsb-rwmb-datetime' ).each( update );
66
+ $( '.mashsb-rwmb-input' ).on( 'clone', ':input.mashsb-rwmb-datetime', update );
67
+ } );
includes/admin/meta-box/js/file-input.js CHANGED
@@ -1,42 +1,42 @@
1
- jQuery( function ( $ )
2
- {
3
- 'use strict';
4
-
5
- var frame;
6
-
7
- $( 'body' ).on( 'click', '.mashsb-rwmb-file-input-select', function ( e )
8
- {
9
- e.preventDefault();
10
- var $el = $( this );
11
-
12
- // Create a frame only if needed
13
- if ( !frame )
14
- {
15
- frame = wp.media( {
16
- className: 'media-frame mashsb-rwmb-file-frame',
17
- multiple : false,
18
- title : rwmbFileInput.frameTitle
19
- } );
20
- }
21
-
22
- // Open media uploader
23
- frame.open();
24
-
25
- // Remove all attached 'select' event
26
- frame.off( 'select' );
27
-
28
- // Handle selection
29
- frame.on( 'select', function ()
30
- {
31
- var url = frame.state().get( 'selection' ).first().toJSON().url;
32
- $el.siblings( 'input' ).val( url ).siblings( 'a' ).removeClass( 'hidden' );
33
- } );
34
- } );
35
-
36
- // Clear selected images
37
- $( 'body' ).on( 'click', '.mashsb-rwmb-file-input-remove', function ( e )
38
- {
39
- e.preventDefault();
40
- $( this ).addClass( 'hidden' ).siblings( 'input' ).val( '' );
41
- } );
42
- } );
1
+ jQuery( function ( $ )
2
+ {
3
+ 'use strict';
4
+
5
+ var frame;
6
+
7
+ $( 'body' ).on( 'click', '.mashsb-rwmb-file-input-select', function ( e )
8
+ {
9
+ e.preventDefault();
10
+ var $el = $( this );
11
+
12
+ // Create a frame only if needed
13
+ if ( !frame )
14
+ {
15
+ frame = wp.media( {
16
+ className: 'media-frame mashsb-rwmb-file-frame',
17
+ multiple : false,
18
+ title : rwmbFileInput.frameTitle
19
+ } );
20
+ }
21
+
22
+ // Open media uploader
23
+ frame.open();
24
+
25
+ // Remove all attached 'select' event
26
+ frame.off( 'select' );
27
+
28
+ // Handle selection
29
+ frame.on( 'select', function ()
30
+ {
31
+ var url = frame.state().get( 'selection' ).first().toJSON().url;
32
+ $el.siblings( 'input' ).val( url ).siblings( 'a' ).removeClass( 'hidden' );
33
+ } );
34
+ } );
35
+
36
+ // Clear selected images
37
+ $( 'body' ).on( 'click', '.mashsb-rwmb-file-input-remove', function ( e )
38
+ {
39
+ e.preventDefault();
40
+ $( this ).addClass( 'hidden' ).siblings( 'input' ).val( '' );
41
+ } );
42
+ } );
includes/admin/meta-box/js/file-upload.js CHANGED
@@ -1,199 +1,199 @@
1
- window.rwmb = window.rwmb || {};
2
-
3
- jQuery( function ( $ )
4
- {
5
- 'use strict';
6
-
7
- var views = rwmb.views = rwmb.views || {},
8
- MediaField = views.MediaField,
9
- FileUploadField, UploadButton;
10
-
11
- FileUploadField = views.FileUploadField = MediaField.extend( {
12
- createAddButton: function ()
13
- {
14
- this.addButton = new UploadButton( { collection: this.collection, props: this.props } );
15
- }
16
- } );
17
-
18
- UploadButton = views.UploadButton = Backbone.View.extend( {
19
- className: 'mashsb-rwmb-upload-area',
20
- tagName : 'div',
21
- template: wp.template( 'mashsb-rwmb-upload-area' ),
22
- render : function ()
23
- {
24
- this.$el.html( this.template( {} ) );
25
- return this;
26
- },
27
-
28
- initialize: function ( options )
29
- {
30
- this.props = options.props;
31
- this.el.id = _.uniqueId( 'mashsb-rwmb-upload-area-');
32
- this.render();
33
-
34
- //Areas
35
- this.dropzone = this.el;
36
- this.browser = this.$('.mashsb-rwmb-browse-button')[0];
37
-
38
- this.supports = {
39
- upload: wp.Uploader.browser.supported
40
- };
41
-
42
- this.supported = this.supports.upload;
43
-
44
- if ( this.supported ) {
45
- this.initUploader();
46
- }
47
-
48
- this.listenTo( this.collection, 'add remove reset', function ()
49
- {
50
- var maxFiles = this.props.get( 'maxFiles' );
51
-
52
- if ( maxFiles > 0 )
53
- {
54
- this.$el.toggle( this.collection.length < maxFiles );
55
- }
56
- } );
57
- },
58
-
59
- //Initializes plupload
60
- //Uses code from wp.Uploader
61
- initUploader: function ()
62
- {
63
- var isIE = navigator.userAgent.indexOf('Trident/') != -1 || navigator.userAgent.indexOf('MSIE ') != -1,
64
- self = this,
65
- extensions = this.getExtensions().join( ',' );
66
- this.plupload = $.extend( true, {
67
- multipart_params: {},
68
- multipart: true,
69
- urlstream_upload: true,
70
- drop_element: this.dropzone,
71
- browse_button: this.browser,
72
- filters:{}}, wp.Uploader.defaults );
73
-
74
- if( extensions )
75
- this.plupload.filters.mime_types = [ { title: i18nRwmbMedia.select, extensions: extensions } ];
76
-
77
- // Make sure flash sends cookies (seems in IE it does without switching to urlstream mode)
78
- if ( ! isIE && 'flash' === plupload.predictRuntime( this.plupload ) &&
79
- ( ! this.plupload.required_features || ! this.plupload.required_features.hasOwnProperty( 'send_binary_string' ) ) )
80
- {
81
- this.plupload.required_features = this.plupload.required_features || {};
82
- this.plupload.required_features.send_binary_string = true;
83
- }
84
-
85
- // Initialize the plupload instance.
86
- this.uploader = new plupload.Uploader( this.plupload );
87
- this.uploader.init();
88
-
89
- this.uploader.bind( 'FilesAdded', function( up, files )
90
- {
91
- _.each( files, function( file )
92
- {
93
- var attributes, image;
94
-
95
- // Ignore failed uploads.
96
- if ( plupload.FAILED === file.status )
97
- {
98
- return;
99
- }
100
-
101
- // Generate attributes for a new `Attachment` model.
102
- attributes = _.extend({
103
- file: file,
104
- uploading: true,
105
- date: new Date(),
106
- filename: file.name,
107
- menuOrder: 0,
108
- uploadedTo: wp.media.model.settings.post.id,
109
- icon: i18nRwmbMedia.loadingUrl
110
- }, _.pick( file, 'loaded', 'size', 'percent' ) );
111
-
112
- // Handle early mime type scanning for images.
113
- image = /(?:jpe?g|png|gif)$/i.exec( file.name );
114
-
115
- // For images set the model's type and subtype attributes.
116
- if ( image )
117
- {
118
- attributes.type = 'image';
119
-
120
- // `jpeg`, `png` and `gif` are valid subtypes.
121
- // `jpg` is not, so map it to `jpeg`.
122
- attributes.subtype = ( 'jpg' === image[0] ) ? 'jpeg' : image[0];
123
- }
124
-
125
- // Create a model for the attachment, and add it to the Upload queue collection
126
- // so listeners to the upload queue can track and display upload progress.
127
- file.attachment = wp.media.model.Attachment.create( attributes );
128
- wp.Uploader.queue.add( file.attachment );
129
- self.collection.add( file.attachment );
130
- });
131
-
132
- up.refresh();
133
- up.start();
134
- });
135
-
136
- this.uploader.bind( 'UploadProgress', function( up, file ) {
137
- file.attachment.set( _.pick( file, 'loaded', 'percent' ) );
138
- });
139
-
140
- this.uploader.bind( 'FileUploaded', function( up, file, response ) {
141
- var complete;
142
-
143
- try {
144
- response = JSON.parse( response.response );
145
- } catch ( e ) {
146
- return false;
147
- }
148
-
149
- if ( ! _.isObject( response ) || _.isUndefined( response.success ) || ! response.success )
150
- return false;
151
-
152
- _.each(['file','loaded','size','percent'], function( key ) {
153
- file.attachment.unset( key );
154
- });
155
-
156
- file.attachment.set( _.extend( response.data, { uploading: false }) );
157
- wp.media.model.Attachment.get( response.data.id, file.attachment );
158
-
159
- complete = wp.Uploader.queue.all( function( attachment ) {
160
- return ! attachment.get('uploading');
161
- });
162
-
163
- if ( complete )
164
- wp.Uploader.queue.reset();
165
- });
166
-
167
- this.uploader.bind( 'Error', function ( up, error )
168
- {
169
- if( error.file.attachment )
170
- error.file.attachment.destroy();
171
- } );
172
- },
173
-
174
- getExtensions: function ()
175
- {
176
- var mimeTypes = this.props.get( 'mimeType' ).split(','),
177
- exts = [];
178
-
179
- _.each( mimeTypes, function( current, index )
180
- {
181
- if( i18nRwmbMedia.extensions[ current ] )
182
- exts = exts.concat( i18nRwmbMedia.extensions[ current ] );
183
- });
184
- return exts;
185
- }
186
- } );
187
-
188
- /**
189
- * Initialize fields
190
- * @return void
191
- */
192
- function init()
193
- {
194
- new FileUploadField( { input: this, el: $( this ).siblings( 'div.mashsb-rwmb-media-view' ) } );
195
- }
196
- $( ':input.mashsb-rwmb-file_upload' ).each( init );
197
- $( '.mashsb-rwmb-input' )
198
- .on( 'clone', ':input.mashsb-rwmb-file_upload', init )
199
- } );
1
+ window.rwmb = window.rwmb || {};
2
+
3
+ jQuery( function ( $ )
4
+ {
5
+ 'use strict';
6
+
7
+ var views = rwmb.views = rwmb.views || {},
8
+ MediaField = views.MediaField,
9
+ FileUploadField, UploadButton;
10
+
11
+ FileUploadField = views.FileUploadField = MediaField.extend( {
12
+ createAddButton: function ()
13
+ {
14
+ this.addButton = new UploadButton( { collection: this.collection, props: this.props } );
15
+ }
16
+ } );
17
+
18
+ UploadButton = views.UploadButton = Backbone.View.extend( {
19
+ className: 'mashsb-rwmb-upload-area',
20
+ tagName : 'div',
21
+ template: wp.template( 'mashsb-rwmb-upload-area' ),
22
+ render : function ()
23
+ {
24
+ this.$el.html( this.template( {} ) );
25
+ return this;
26
+ },
27
+
28
+ initialize: function ( options )
29
+ {
30
+ this.props = options.props;
31
+ this.el.id = _.uniqueId( 'mashsb-rwmb-upload-area-');
32
+ this.render();
33
+
34
+ //Areas
35
+ this.dropzone = this.el;
36
+ this.browser = this.$('.mashsb-rwmb-browse-button')[0];
37
+
38
+ this.supports = {
39
+ upload: wp.Uploader.browser.supported
40
+ };
41
+
42
+ this.supported = this.supports.upload;
43
+
44
+ if ( this.supported ) {
45
+ this.initUploader();
46
+ }
47
+
48
+ this.listenTo( this.collection, 'add remove reset', function ()
49
+ {
50
+ var maxFiles = this.props.get( 'maxFiles' );
51
+
52
+ if ( maxFiles > 0 )
53
+ {
54
+ this.$el.toggle( this.collection.length < maxFiles );
55
+ }
56
+ } );
57
+ },
58
+
59
+ //Initializes plupload
60
+ //Uses code from wp.Uploader
61
+ initUploader: function ()
62
+ {
63
+ var isIE = navigator.userAgent.indexOf('Trident/') != -1 || navigator.userAgent.indexOf('MSIE ') != -1,
64
+ self = this,
65
+ extensions = this.getExtensions().join( ',' );
66
+ this.plupload = $.extend( true, {
67
+ multipart_params: {},
68
+ multipart: true,
69
+ urlstream_upload: true,
70
+ drop_element: this.dropzone,
71
+ browse_button: this.browser,
72
+ filters:{}}, wp.Uploader.defaults );
73
+
74
+ if( extensions )
75
+ this.plupload.filters.mime_types = [ { title: i18nRwmbMedia.select, extensions: extensions } ];
76
+
77
+ // Make sure flash sends cookies (seems in IE it does without switching to urlstream mode)
78
+ if ( ! isIE && 'flash' === plupload.predictRuntime( this.plupload ) &&
79
+ ( ! this.plupload.required_features || ! this.plupload.required_features.hasOwnProperty( 'send_binary_string' ) ) )
80
+ {
81
+ this.plupload.required_features = this.plupload.required_features || {};
82
+ this.plupload.required_features.send_binary_string = true;
83
+ }
84
+
85
+ // Initialize the plupload instance.
86
+ this.uploader = new plupload.Uploader( this.plupload );
87
+ this.uploader.init();
88
+
89
+ this.uploader.bind( 'FilesAdded', function( up, files )
90
+ {
91
+ _.each( files, function( file )
92
+ {
93
+ var attributes, image;
94
+
95
+ // Ignore failed uploads.
96
+ if ( plupload.FAILED === file.status )
97
+ {
98
+ return;
99
+ }
100
+
101
+ // Generate attributes for a new `Attachment` model.
102
+ attributes = _.extend({
103
+ file: file,
104
+ uploading: true,
105
+ date: new Date(),
106
+ filename: file.name,
107
+ menuOrder: 0,
108
+ uploadedTo: wp.media.model.settings.post.id,
109
+ icon: i18nRwmbMedia.loadingUrl
110
+ }, _.pick( file, 'loaded', 'size', 'percent' ) );
111
+
112
+ // Handle early mime type scanning for images.
113
+ image = /(?:jpe?g|png|gif)$/i.exec( file.name );
114
+
115
+ // For images set the model's type and subtype attributes.
116
+ if ( image )
117
+ {
118
+ attributes.type = 'image';
119
+
120
+ // `jpeg`, `png` and `gif` are valid subtypes.
121
+ // `jpg` is not, so map it to `jpeg`.
122
+ attributes.subtype = ( 'jpg' === image[0] ) ? 'jpeg' : image[0];
123
+ }
124
+
125
+ // Create a model for the attachment, and add it to the Upload queue collection
126
+ // so listeners to the upload queue can track and display upload progress.
127
+ file.attachment = wp.media.model.Attachment.create( attributes );
128
+ wp.Uploader.queue.add( file.attachment );
129
+ self.collection.add( file.attachment );
130
+ });
131
+
132
+ up.refresh();
133
+ up.start();
134
+ });
135
+
136
+ this.uploader.bind( 'UploadProgress', function( up, file ) {
137
+ file.attachment.set( _.pick( file, 'loaded', 'percent' ) );
138
+ });
139
+
140
+ this.uploader.bind( 'FileUploaded', function( up, file, response ) {
141
+ var complete;
142
+
143
+ try {
144
+ response = JSON.parse( response.response );
145
+ } catch ( e ) {
146
+ return false;
147
+ }
148
+
149
+ if ( ! _.isObject( response ) || _.isUndefined( response.success ) || ! response.success )
150
+ return false;
151
+
152
+ _.each(['file','loaded','size','percent'], function( key ) {
153
+ file.attachment.unset( key );
154
+ });
155
+
156
+ file.attachment.set( _.extend( response.data, { uploading: false }) );
157
+ wp.media.model.Attachment.get( response.data.id, file.attachment );
158
+
159
+ complete = wp.Uploader.queue.all( function( attachment ) {
160
+ return ! attachment.get('uploading');
161
+ });
162
+
163
+ if ( complete )
164
+ wp.Uploader.queue.reset();
165
+ });
166
+
167
+ this.uploader.bind( 'Error', function ( up, error )
168
+ {
169
+ if( error.file.attachment )
170
+ error.file.attachment.destroy();
171
+ } );
172
+ },
173
+
174
+ getExtensions: function ()
175
+ {
176
+ var mimeTypes = this.props.get( 'mimeType' ).split(','),
177
+ exts = [];
178
+
179
+ _.each( mimeTypes, function( current, index )
180
+ {
181
+ if( i18nRwmbMedia.extensions[ current ] )
182
+ exts = exts.concat( i18nRwmbMedia.extensions[ current ] );
183
+ });
184
+ return exts;
185
+ }
186
+ } );
187
+
188
+ /**
189
+ * Initialize fields
190
+ * @return void
191
+ */
192
+ function init()
193
+ {
194
+ new FileUploadField( { input: this, el: $( this ).siblings( 'div.mashsb-rwmb-media-view' ) } );
195
+ }
196
+ $( ':input.mashsb-rwmb-file_upload' ).each( init );
197
+ $( '.mashsb-rwmb-input' )
198
+ .on( 'clone', ':input.mashsb-rwmb-file_upload', init )
199
+ } );
includes/admin/meta-box/js/file.js CHANGED
@@ -1,157 +1,157 @@
1
- jQuery( document ).ready( function ( $ )
2
- {
3
- 'use strict';
4
-
5
- // Add more file
6
- $( '.mashsb-rwmb-add-file' ).each( function ()
7
- {
8
- var $this = $( this ),
9
- $uploads = $this.siblings( '.file-input' ),
10
- $first = $uploads.first(),
11
- uploadCount = $uploads.length,
12
- $fileList = $this.closest( '.mashsb-rwmb-input' ).find( '.mashsb-rwmb-uploaded' ),
13
- fileCount = $fileList.children( 'li' ).length,
14
- maxFileUploads = $fileList.data( 'max_file_uploads' );
15
-
16
- // Hide "Add New File" and input fields when loaded
17
- if ( maxFileUploads > 0 )
18
- {
19
- if ( uploadCount + fileCount >= maxFileUploads )
20
- {
21
- $this.hide();
22
- }
23
- if ( fileCount >= maxFileUploads )
24
- {
25
- $uploads.hide();
26
- }
27
- }
28
-
29
- $this.click( function ()
30
- {
31
- // Clone upload input only when needed
32
- if ( maxFileUploads <= 0 || uploadCount + fileCount < maxFileUploads )
33
- {
34
- $first.clone().insertBefore( $this );
35
- uploadCount++;
36
-
37
- // If there're too many upload inputs, hide "Add New File"
38
- if ( maxFileUploads > 0 && uploadCount + fileCount >= maxFileUploads )
39
- {
40
- $this.hide();
41
- }
42
- }
43
-
44
- return false;
45
- } );
46
- } );
47
-
48
- // Delete file via Ajax
49
- $( '.mashsb-rwmb-uploaded' ).on( 'click', '.mashsb-rwmb-delete-file', function ()
50
- {
51
- var $this = $( this ),
52
- $parent = $this.parents( 'li' ),
53
- $container = $this.closest( '.mashsb-rwmb-uploaded' ),
54
- data = {
55
- action : 'rwmb_delete_file',
56
- _ajax_nonce : $container.data( 'delete_nonce' ),
57
- post_id : $( '#post_ID' ).val(),
58
- field_id : $container.data( 'field_id' ),
59
- attachment_id: $this.data( 'attachment_id' ),
60
- force_delete : $container.data( 'force_delete' )
61
- };
62
-
63
- $.post( ajaxurl, data, function ( r )
64
- {
65
- if ( !r.success )
66
- {
67
- alert( r.data );
68
- return;
69
- }
70
-
71
- $parent.addClass( 'removed' );
72
-
73
- // If transition events not supported
74
- var div = document.createElement( 'div' );
75
- if (
76
- !( 'ontransitionend' in window ) &&
77
- ( 'onwebkittransitionend' in window ) && !( 'onotransitionend' in div || navigator.appName === 'Opera' )
78
- )
79
- {
80
- $parent.remove();
81
- $container.trigger( 'update.rwmbFile' );
82
- }
83
-
84
- $( '.mashsb-rwmb-uploaded' ).on( 'transitionend webkitTransitionEnd otransitionend', 'li.removed', function ()
85
- {
86
- $( this ).remove();
87
- $container.trigger( 'update.rwmbFile' );
88
- } );
89
- }, 'json' );
90
-
91
- return false;
92
- } );
93
-
94
- //Remove deleted file
95
- $( '.mashsb-rwmb-uploaded' ).on( 'transitionend webkitTransitionEnd otransitionend', 'li.removed', function ()
96
- {
97
- $( this ).remove();
98
- } );
99
-
100
- $( 'body' ).on( 'update.rwmbFile', '.mashsb-rwmb-uploaded', function ()
101
- {
102
- var $fileList = $( this ),
103
- maxFileUploads = $fileList.data( 'max_file_uploads' ),
104
- $uploader = $fileList.siblings( '.new-files' ),
105
- numFiles = $fileList.children().length;
106
-
107
- if ( numFiles > 0 )
108
- {
109
- $fileList.removeClass( 'hidden' );
110
- }
111
- else
112
- {
113
- $fileList.addClass( 'hidden' );
114
- }
115
-
116
- // Return if maxFileUpload = 0
117
- if ( maxFileUploads === 0 )
118
- {
119
- return false;
120
- }
121
-
122
- // Hide files button if reach max file uploads
123
- if ( numFiles >= maxFileUploads )
124
- {
125
- $uploader.addClass( 'hidden' );
126
- }
127
- else
128
- {
129
- $uploader.removeClass( 'hidden' );
130
- }
131
-
132
- return false;
133
- } );
134
-
135
- // Reorder images
136
- $( '.mashsb-rwmb-file' ).each( function ()
137
- {
138
- var $this = $( this ),
139
- data = {
140
- action : 'rwmb_reorder_files',
141
- _ajax_nonce: $this.data( 'reorder_nonce' ),
142
- post_id : $( '#post_ID' ).val(),
143
- field_id : $this.data( 'field_id' )
144
- };
145
- $this.sortable( {
146
- placeholder: 'ui-state-highlight',
147
- items : 'li',
148
- update : function ()
149
- {
150
-
151
- data.order = $this.sortable( 'serialize' );
152
-
153
- $.post( ajaxurl, data );
154
- }
155
- } );
156
- } );
157
- } );
1
+ jQuery( document ).ready( function ( $ )
2
+ {
3
+ 'use strict';
4
+
5
+ // Add more file
6
+ $( '.mashsb-rwmb-add-file' ).each( function ()
7
+ {
8
+ var $this = $( this ),
9
+ $uploads = $this.siblings( '.file-input' ),
10
+ $first = $uploads.first(),
11
+ uploadCount = $uploads.length,
12
+ $fileList = $this.closest( '.mashsb-rwmb-input' ).find( '.mashsb-rwmb-uploaded' ),
13
+ fileCount = $fileList.children( 'li' ).length,
14
+ maxFileUploads = $fileList.data( 'max_file_uploads' );
15
+
16
+ // Hide "Add New File" and input fields when loaded
17
+ if ( maxFileUploads > 0 )
18
+ {
19
+ if ( uploadCount + fileCount >= maxFileUploads )
20
+ {
21
+ $this.hide();
22
+ }
23
+ if ( fileCount >= maxFileUploads )
24
+ {
25
+ $uploads.hide();
26
+ }
27
+ }
28
+
29
+ $this.click( function ()
30
+ {
31
+ // Clone upload input only when needed
32
+ if ( maxFileUploads <= 0 || uploadCount + fileCount < maxFileUploads )
33
+ {
34
+ $first.clone().insertBefore( $this );
35
+ uploadCount++;
36
+
37
+ // If there're too many upload inputs, hide "Add New File"
38
+ if ( maxFileUploads > 0 && uploadCount + fileCount >= maxFileUploads )
39
+ {
40
+ $this.hide();
41
+ }
42
+ }
43
+
44
+ return false;
45
+ } );
46
+ } );
47
+
48
+ // Delete file via Ajax
49
+ $( '.mashsb-rwmb-uploaded' ).on( 'click', '.mashsb-rwmb-delete-file', function ()
50
+ {
51
+ var $this = $( this ),
52
+ $parent = $this.parents( 'li' ),
53
+ $container = $this.closest( '.mashsb-rwmb-uploaded' ),
54
+ data = {
55
+ action : 'rwmb_delete_file',
56
+ _ajax_nonce : $container.data( 'delete_nonce' ),
57
+ post_id : $( '#post_ID' ).val(),
58
+ field_id : $container.data( 'field_id' ),
59
+ attachment_id: $this.data( 'attachment_id' ),
60
+ force_delete : $container.data( 'force_delete' )
61
+ };
62
+
63
+ $.post( ajaxurl, data, function ( r )
64
+ {
65
+ if ( !r.success )
66
+ {
67
+ alert( r.data );
68
+ return;
69
+ }
70
+
71
+ $parent.addClass( 'removed' );
72
+
73
+ // If transition events not supported
74
+ var div = document.createElement( 'div' );
75
+ if (
76
+ !( 'ontransitionend' in window ) &&
77
+ ( 'onwebkittransitionend' in window ) && !( 'onotransitionend' in div || navigator.appName === 'Opera' )
78
+ )
79
+ {
80
+ $parent.remove();
81
+ $container.trigger( 'update.rwmbFile' );
82
+ }
83
+
84
+ $( '.mashsb-rwmb-uploaded' ).on( 'transitionend webkitTransitionEnd otransitionend', 'li.removed', function ()
85
+ {
86
+ $( this ).remove();
87
+ $container.trigger( 'update.rwmbFile' );
88
+ } );
89
+ }, 'json' );
90
+
91
+ return false;
92
+ } );
93
+
94
+ //Remove deleted file
95
+ $( '.mashsb-rwmb-uploaded' ).on( 'transitionend webkitTransitionEnd otransitionend', 'li.removed', function ()
96
+ {
97
+ $( this ).remove();
98
+ } );
99
+
100
+ $( 'body' ).on( 'update.rwmbFile', '.mashsb-rwmb-uploaded', function ()
101
+ {
102
+ var $fileList = $( this ),
103
+ maxFileUploads = $fileList.data( 'max_file_uploads' ),
104
+ $uploader = $fileList.siblings( '.new-files' ),
105
+ numFiles = $fileList.children().length;
106
+
107
+ if ( numFiles > 0 )
108
+ {
109
+ $fileList.removeClass( 'hidden' );
110
+ }
111
+ else
112
+ {
113
+ $fileList.addClass( 'hidden' );
114
+ }
115
+
116
+ // Return if maxFileUpload = 0
117
+ if ( maxFileUploads === 0 )
118
+ {
119
+ return false;
120
+ }
121
+
122
+ // Hide files button if reach max file uploads
123
+ if ( numFiles >= maxFileUploads )
124
+ {
125
+ $uploader.addClass( 'hidden' );
126
+ }
127
+ else
128
+ {
129
+ $uploader.removeClass( 'hidden' );
130
+ }
131
+
132
+ return false;
133
+ } );
134
+
135
+ // Reorder images
136
+ $( '.mashsb-rwmb-file' ).each( function ()
137
+ {
138
+ var $this = $( this ),
139
+ data = {
140
+ action : 'rwmb_reorder_files',
141
+ _ajax_nonce: $this.data( 'reorder_nonce' ),
142
+ post_id : $( '#post_ID' ).val(),
143
+ field_id : $this.data( 'field_id' )
144
+ };
145
+ $this.sortable( {
146
+ placeholder: 'ui-state-highlight',
147
+ items : 'li',
148
+ update : function ()
149
+ {
150
+
151
+ data.order = $this.sortable( 'serialize' );
152
+
153
+ $.post( ajaxurl, data );
154
+ }
155
+ } );
156
+ } );
157
+ } );
includes/admin/meta-box/js/image-advanced.js CHANGED
@@ -1,36 +1,36 @@
1
- window.rwmb = window.rwmb || {};
2
-
3
- jQuery( function ( $ )
4
- {
5
- 'use strict';
6
-
7
- var views = rwmb.views = rwmb.views || {},
8
- MediaField = views.MediaField,
9
- MediaItem = views.MediaItem,
10
- MediaList = views.MediaList,
11
- ImageField, ImageList, ImageItem;
12
-
13
- ImageField = views.ImageField = MediaField.extend( {
14
- createList: function ()
15
- {
16
- this.list = new MediaList( { collection: this.collection, props: this.props, itemView: ImageItem } );
17
- }
18
- } );
19
-
20
- ImageItem = views.ImageItem = MediaItem.extend( {
21
- className: 'mashsb-rwmb-image-item',
22
- template : wp.template( 'mashsb-rwmb-image-item' )
23
- } );
24
-
25
- /**
26
- * Initialize image fields
27
- * @return void
28
- */
29
- function initImageField()
30
- {
31
- new ImageField( { input: this, el: $( this ).siblings( 'div.mashsb-rwmb-media-view' ) } );
32
- }
33
- $( ':input.mashsb-rwmb-image_advanced' ).each( initImageField );
34
- $( '.mashsb-rwmb-input' )
35
- .on( 'clone', ':input.mashsb-rwmb-image_advanced', initImageField )
36
- } );
1
+ window.rwmb = window.rwmb || {};
2
+
3
+ jQuery( function ( $ )
4
+ {
5
+ 'use strict';
6
+
7
+ var views = rwmb.views = rwmb.views || {},
8
+ MediaField = views.MediaField,
9
+ MediaItem = views.MediaItem,
10
+ MediaList = views.MediaList,
11
+ ImageField, ImageList, ImageItem;
12
+
13
+ ImageField = views.ImageField = MediaField.extend( {
14
+ createList: function ()
15
+ {
16
+ this.list = new MediaList( { collection: this.collection, props: this.props, itemView: ImageItem } );
17
+ }
18
+ } );
19
+
20
+ ImageItem = views.ImageItem = MediaItem.extend( {
21
+ className: 'mashsb-rwmb-image-item',
22
+ template : wp.template( 'mashsb-rwmb-image-item' )
23
+ } );
24
+
25
+ /**
26
+ * Initialize image fields
27
+ * @return void
28
+ */
29
+ function initImageField()
30
+ {
31
+ new ImageField( { input: this, el: $( this ).siblings( 'div.mashsb-rwmb-media-view' ) } );
32
+ }
33
+ $( ':input.mashsb-rwmb-image_advanced' ).each( initImageField );
34
+ $( '.mashsb-rwmb-input' )
35
+ .on( 'clone', ':input.mashsb-rwmb-image_advanced', initImageField )
36
+ } );
includes/admin/meta-box/js/image-select.js CHANGED
@@ -1,26 +1,26 @@
1
- jQuery( function ( $ )
2
- {
3
- 'use strict';
4
-
5
- $( 'body' ).on( 'change', '.mashsb-rwmb-image-select input', function ()
6
- {
7
- var $this = $( this ),
8
- type = $this.attr( 'type' ),
9
- selected = $this.is( ':checked' ),
10
- $parent = $this.parent(),
11
- $others = $parent.siblings();
12
- if ( selected )
13
- {
14
- $parent.addClass( 'mashsb-rwmb-active' );
15
- if ( type === 'radio' )
16
- {
17
- $others.removeClass( 'mashsb-rwmb-active' );
18
- }
19
- }
20
- else
21
- {
22
- $parent.removeClass( 'mashsb-rwmb-active' );
23
- }
24
- } );
25
- $( '.mashsb-rwmb-image-select input' ).trigger( 'change' );
26
- } );
1
+ jQuery( function ( $ )
2
+ {
3
+ 'use strict';
4
+
5
+ $( 'body' ).on( 'change', '.mashsb-rwmb-image-select input', function ()
6
+ {
7
+ var $this = $( this ),
8
+ type = $this.attr( 'type' ),
9
+ selected = $this.is( ':checked' ),
10
+ $parent = $this.parent(),
11
+ $others = $parent.siblings();
12
+ if ( selected )
13
+ {
14
+ $parent.addClass( 'mashsb-rwmb-active' );
15
+ if ( type === 'radio' )
16
+ {
17
+ $others.removeClass( 'mashsb-rwmb-active' );
18
+ }
19
+ }
20
+ else
21
+ {
22
+ $parent.removeClass( 'mashsb-rwmb-active' );
23
+ }
24
+ } );
25
+ $( '.mashsb-rwmb-image-select input' ).trigger( 'change' );
26
+ } );
includes/admin/meta-box/js/image-upload.js CHANGED
@@ -1,31 +1,31 @@
1
- window.rwmb = window.rwmb || {};
2
-
3
- jQuery( function ( $ )
4
- {
5
- 'use strict';
6
-
7
- var views = rwmb.views = rwmb.views || {},
8
- ImageField = views.ImageField,
9
- ImageUploadField,
10
- UploadButton = views.UploadButton;
11
-
12
- ImageUploadField = views.ImageUploadField = ImageField.extend( {
13
- createAddButton: function ()
14
- {
15
- this.addButton = new UploadButton( { collection: this.collection, props: this.props } );
16
- }
17
- } );
18
-
19
- /**
20
- * Initialize fields
21
- * @return void
22
- */
23
- function init()
24
- {
25
- new ImageUploadField( { input: this, el: $( this ).siblings( 'div.mashsb-rwmb-media-view' ) } );
26
- console.log('win');
27
- }
28
- $( ':input.mashsb-rwmb-image_upload, :input.mashsb-rwmb-plupload_image' ).each( init );
29
- $( '.mashsb-rwmb-input' )
30
- .on( 'clone', ':input.mashsb-rwmb-image_upload, :input.mashsb-rwmb-plupload_image', init )
31
- } );
1
+ window.rwmb = window.rwmb || {};
2
+
3
+ jQuery( function ( $ )
4
+ {
5
+ 'use strict';
6
+
7
+ var views = rwmb.views = rwmb.views || {},
8
+ ImageField = views.ImageField,
9
+ ImageUploadField,
10
+ UploadButton = views.UploadButton;
11
+
12
+ ImageUploadField = views.ImageUploadField = ImageField.extend( {
13
+ createAddButton: function ()
14
+ {
15
+ this.addButton = new UploadButton( { collection: this.collection, props: this.props } );
16
+ }
17
+ } );
18
+
19
+ /**
20
+ * Initialize fields
21
+ * @return void
22
+ */
23
+ function init()
24
+ {
25
+ new ImageUploadField( { input: this, el: $( this ).siblings( 'div.mashsb-rwmb-media-view' ) } );
26
+ console.log('win');
27
+ }
28
+ $( ':input.mashsb-rwmb-image_upload, :input.mashsb-rwmb-plupload_image' ).each( init );
29
+ $( '.mashsb-rwmb-input' )
30
+ .on( 'clone', ':input.mashsb-rwmb-image_upload, :input.mashsb-rwmb-plupload_image', init )
31
+ } );
includes/admin/meta-box/js/image.js CHANGED
@@ -1,25 +1,25 @@
1
- jQuery( function ( $ )
2
- {
3
- 'use strict';
4
-
5
- // Reorder images
6
- $( '.mashsb-rwmb-images' ).each( function ()
7
- {
8
- var $this = $( this ),
9
- data = {
10
- action : 'rwmb_reorder_images',
11
- _ajax_nonce: $this.data( 'reorder_nonce' ),
12
- post_id : $( '#post_ID' ).val(),
13
- field_id : $this.data( 'field_id' )
14
- };
15
- $this.sortable( {
16
- placeholder: 'ui-state-highlight',
17
- items : 'li',
18
- update : function ()
19
- {
20
- data.order = $this.sortable( 'serialize' );
21
- $.post( ajaxurl, data );
22
- }
23
- } );
24
- } );
25
- } );
1
+ jQuery( function ( $ )
2
+ {
3
+ 'use strict';
4
+
5
+ // Reorder images
6
+ $( '.mashsb-rwmb-images' ).each( function ()
7
+ {
8
+ var $this = $( this ),
9
+ data = {
10
+ action : 'rwmb_reorder_images',
11
+ _ajax_nonce: $this.data( 'reorder_nonce' ),
12
+ post_id : $( '#post_ID' ).val(),
13
+ field_id : $this.data( 'field_id' )
14
+ };
15
+ $this.sortable( {
16
+ placeholder: 'ui-state-highlight',
17
+ items : 'li',
18
+ update : function ()
19
+ {
20
+ data.order = $this.sortable( 'serialize' );
21
+ $.post( ajaxurl, data );
22
+ }
23
+ } );
24
+ } );
25
+ } );
includes/admin/meta-box/js/input-list.js CHANGED
@@ -1,25 +1,25 @@
1
- jQuery( function( $ )
2
- {
3
- function update()
4
- {
5
- var $this = $( this ),
6
- $children = $this.closest( 'li' ).children('ul');
7
-
8
- if ( $this.is( ':checked' ) )
9
- {
10
- $children.removeClass( 'hidden' );
11
- }
12
- else
13
- {
14
- $children
15
- .addClass( 'hidden' )
16
- .find( 'input' )
17
- .removeAttr( 'checked' );
18
- }
19
- }
20
-
21
- $( '.mashsb-rwmb-input' )
22
- .on( 'change', '.mashsb-rwmb-input-list.collapse :checkbox', update )
23
- .on( 'clone', '.mashsb-rwmb-input-list.collapse :checkbox', update );
24
- $( '.mashsb-rwmb-input-list.collapse :checkbox' ).each( update );
25
- } );
1
+ jQuery( function( $ )
2
+ {
3
+ function update()
4
+ {
5
+ var $this = $( this ),
6
+ $children = $this.closest( 'li' ).children('ul');
7
+
8
+ if ( $this.is( ':checked' ) )
9
+ {
10
+ $children.removeClass( 'hidden' );
11
+ }
12
+ else
13
+ {
14
+ $children
15
+ .addClass( 'hidden' )
16
+ .find( 'input' )
17
+ .removeAttr( 'checked' );
18
+ }
19
+ }
20
+
21
+ $( '.mashsb-rwmb-input' )
22
+ .on( 'change', '.mashsb-rwmb-input-list.collapse :checkbox', update )
23
+ .on( 'clone', '.mashsb-rwmb-input-list.collapse :checkbox', update );
24
+ $( '.mashsb-rwmb-input-list.collapse :checkbox' ).each( update );
25
+ } );
includes/admin/meta-box/js/jquery.validate.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation
2
  * Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */(function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=t.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(e.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(e){function s(){var s;return i.settings.submitHandler?(i.submitButton&&(s=t("<input type='hidden'/>").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&s.remove(),!1):!0}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)})),i)},valid:function(){if(t(this[0]).is("form"))return this.validate().form();var e=!0,i=t(this[0].form).validate();return this.each(function(){e=e&&i.element(this)}),e},removeAttrs:function(e){var i={},s=this;return t.each(e.split(/\s/),function(t,e){i[e]=s.attr(e),s.removeAttr(e)}),i},rules:function(e,i){var s=this[0];if(e){var r=t.data(s.form,"validator").settings,n=r.rules,a=t.validator.staticRules(s);switch(e){case"add":t.extend(a,t.validator.normalizeRule(i)),delete a.messages,n[s.name]=a,i.messages&&(r.messages[s.name]=t.extend(r.messages[s.name],i.messages));break;case"remove":if(!i)return delete n[s.name],a;var u={};return t.each(i.split(/\s/),function(t,e){u[e]=a[e],delete a[e]}),u}}var o=t.validator.normalizeRules(t.extend({},t.validator.classRules(s),t.validator.attributeRules(s),t.validator.dataRules(s),t.validator.staticRules(s)),s);if(o.required){var l=o.required;delete o.required,o=t.extend({required:l},o)}return o}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this[0].form,"validator"),s="on"+e.type.replace(/^validate/,"");i.settings[s]&&i.settings[s].call(i,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i=this.groups={};t.each(this.settings.groups,function(e,s){"string"==typeof s&&(s=s.split(/\s/)),t.each(s,function(t,s){i[s]=e})});var s=this.settings.rules;t.each(s,function(e,i){s[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){e=this.validationTargetFor(this.clean(e)),this.lastElement=e,this.prepareElement(e),this.currentElements=t(e);var i=this.check(e)!==!1;return i?delete this.invalid[e.name]:this.invalid[e.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var i in e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!e.objectLength(t(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.replace(" ",".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i=t(e).attr("type"),s=t(e).val();return"radio"===i||"checkbox"===i?t("input[name='"+t(e).attr("name")+"']:checked").val():"string"==typeof s?s.replace(/\r/g,""):s},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s=t(e).rules(),r=!1,n=this.elementValue(e);for(var a in s){var u={method:a,parameters:s[a]};try{if(i=t.validator.methods[a].call(this,n,e,u.parameters),"dependency-mismatch"===i){r=!0;continue}if(r=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(e)),void 0;if(!i)return this.formatAndAdd(e,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+u.method+"' method.",o),o}}return r?void 0:(this.objectLength(s)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg-"+i.toLowerCase())||e.attributes&&t(e).attr("data-msg-"+i.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t];return void 0},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"<strong>Warning: No message defined for "+e.name+"</strong>")},formatAndAdd:function(e,i){var s=this.defaultMessage(e,i.method),r=/\$?\{(\d+)\}/g;"function"==typeof s?s=s.call(this,i.parameters,e):r.test(s)&&(s=t.validator.format(s.replace(r,"{$1}"),i.parameters)),this.errorList.push({message:s,element:e}),this.errorMap[e.name]=s,this.submitted[e.name]=s},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var s=this.errorsFor(e);s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(s).length||(this.settings.errorPlacement?this.settings.errorPlacement(s,t(e)):s.insertAfter(e))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var i=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===i})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,i){return!!t(e,i.form).length},"function":function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},attributeRules:function(e){var i={},s=t(e),r=s[0].getAttribute("type");for(var n in t.validator.methods){var a;"required"===n?(a=s.get(0).getAttribute(n),""===a&&(a=!0),a=!!a):a=s.attr(n),/min|max/.test(n)&&(null===r||/number|range|text/.test(r))&&(a=Number(a)),a?i[n]=a:r===n&&"range"!==r&&(i[n]=!0)}return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var i,s,r={},n=t(e);for(i in t.validator.methods)s=n.data("rule-"+i.toLowerCase()),void 0!==s&&(r[i]=s);return r},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(s,r){if(r===!1)return delete e[s],void 0;if(r.param||r.depends){var n=!0;switch(typeof r.depends){case"string":n=!!t(r.depends,i.form).length;break;case"function":n=r.depends.call(i,i)}n?e[s]=void 0!==r.param?r.param:!0:delete e[s]}}),t.each(e,function(s,r){e[s]=t.isFunction(r)?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],3>i.length&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(t))},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i=0,s=0,r=!1;t=t.replace(/\D/g,"");for(var n=t.length-1;n>=0;n--){var a=t.charAt(n);s=parseInt(a,10),r&&(s*=2)>9&&(s-=9),i+=s,r=!r}return 0===i%10},minlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s},maxlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=r},rangelength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s[0]&&s[1]>=r},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&i[1]>=t},equalTo:function(e,i,s){var r=t(s);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,s){if(this.optional(i))return"dependency-mismatch";var r=this.previousValue(i);if(this.settings.messages[i.name]||(this.settings.messages[i.name]={}),r.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=r.message,s="string"==typeof s&&{url:s}||s,r.old===e)return r.valid;r.old=e;var n=this;this.startRequest(i);var a={};return a[i.name]=e,t.ajax(t.extend(!0,{url:s,mode:"abort",port:"validate"+i.name,dataType:"json",data:a,success:function(s){n.settings.messages[i.name].remote=r.originalMessage;var a=s===!0||"true"===s;if(a){var u=n.formSubmitted;n.prepareElement(i),n.formSubmitted=u,n.successList.push(i),delete n.invalid[i.name],n.showErrors()}else{var o={},l=s||n.defaultMessage(i,"remote");o[i.name]=r.message=t.isFunction(l)?l(e):l,n.invalid[i.name]=!0,n.showErrors(o)}r.valid=a,n.stopRequest(i,a)}},s)),"pending"}}}),t.format=t.validator.format})(jQuery),function(t){var e={};if(t.ajaxPrefilter)t.ajaxPrefilter(function(t,i,s){var r=t.port;"abort"===t.mode&&(e[r]&&e[r].abort(),e[r]=s)});else{var i=t.ajax;t.ajax=function(s){var r=("mode"in s?s:t.ajaxSettings).mode,n=("port"in s?s:t.ajaxSettings).port;return"abort"===r?(e[n]&&e[n].abort(),e[n]=i.apply(this,arguments),e[n]):i.apply(this,arguments)}}}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,i,s){return this.bind(i,function(i){var r=t(i.target);return r.is(e)?s.apply(r,arguments):void 0})}})}(jQuery);
1
+ /*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation
2
  * Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */(function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=t.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(e.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(e){function s(){var s;return i.settings.submitHandler?(i.submitButton&&(s=t("<input type='hidden'/>").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&s.remove(),!1):!0}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)})),i)},valid:function(){if(t(this[0]).is("form"))return this.validate().form();var e=!0,i=t(this[0].form).validate();return this.each(function(){e=e&&i.element(this)}),e},removeAttrs:function(e){var i={},s=this;return t.each(e.split(/\s/),function(t,e){i[e]=s.attr(e),s.removeAttr(e)}),i},rules:function(e,i){var s=this[0];if(e){var r=t.data(s.form,"validator").settings,n=r.rules,a=t.validator.staticRules(s);switch(e){case"add":t.extend(a,t.validator.normalizeRule(i)),delete a.messages,n[s.name]=a,i.messages&&(r.messages[s.name]=t.extend(r.messages[s.name],i.messages));break;case"remove":if(!i)return delete n[s.name],a;var u={};return t.each(i.split(/\s/),function(t,e){u[e]=a[e],delete a[e]}),u}}var o=t.validator.normalizeRules(t.extend({},t.validator.classRules(s),t.validator.attributeRules(s),t.validator.dataRules(s),t.validator.staticRules(s)),s);if(o.required){var l=o.required;delete o.required,o=t.extend({required:l},o)}return o}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this[0].form,"validator"),s="on"+e.type.replace(/^validate/,"");i.settings[s]&&i.settings[s].call(i,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i=this.groups={};t.each(this.settings.groups,function(e,s){"string"==typeof s&&(s=s.split(/\s/)),t.each(s,function(t,s){i[s]=e})});var s=this.settings.rules;t.each(s,function(e,i){s[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){e=this.validationTargetFor(this.clean(e)),this.lastElement=e,this.prepareElement(e),this.currentElements=t(e);var i=this.check(e)!==!1;return i?delete this.invalid[e.name]:this.invalid[e.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var i in e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!e.objectLength(t(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.replace(" ",".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i=t(e).attr("type"),s=t(e).val();return"radio"===i||"checkbox"===i?t("input[name='"+t(e).attr("name")+"']:checked").val():"string"==typeof s?s.replace(/\r/g,""):s},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s=t(e).rules(),r=!1,n=this.elementValue(e);for(var a in s){var u={method:a,parameters:s[a]};try{if(i=t.validator.methods[a].call(this,n,e,u.parameters),"dependency-mismatch"===i){r=!0;continue}if(r=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(e)),void 0;if(!i)return this.formatAndAdd(e,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+u.method+"' method.",o),o}}return r?void 0:(this.objectLength(s)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg-"+i.toLowerCase())||e.attributes&&t(e).attr("data-msg-"+i.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t];return void 0},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"<strong>Warning: No message defined for "+e.name+"</strong>")},formatAndAdd:function(e,i){var s=this.defaultMessage(e,i.method),r=/\$?\{(\d+)\}/g;"function"==typeof s?s=s.call(this,i.parameters,e):r.test(s)&&(s=t.validator.format(s.replace(r,"{$1}"),i.parameters)),this.errorList.push({message:s,element:e}),this.errorMap[e.name]=s,this.submitted[e.name]=s},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var s=this.errorsFor(e);s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(s).length||(this.settings.errorPlacement?this.settings.errorPlacement(s,t(e)):s.insertAfter(e))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var i=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===i})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,i){return!!t(e,i.form).length},"function":function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},attributeRules:function(e){var i={},s=t(e),r=s[0].getAttribute("type");for(var n in t.validator.methods){var a;"required"===n?(a=s.get(0).getAttribute(n),""===a&&(a=!0),a=!!a):a=s.attr(n),/min|max/.test(n)&&(null===r||/number|range|text/.test(r))&&(a=Number(a)),a?i[n]=a:r===n&&"range"!==r&&(i[n]=!0)}return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var i,s,r={},n=t(e);for(i in t.validator.methods)s=n.data("rule-"+i.toLowerCase()),void 0!==s&&(r[i]=s);return r},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(s,r){if(r===!1)return delete e[s],void 0;if(r.param||r.depends){var n=!0;switch(typeof r.depends){case"string":n=!!t(r.depends,i.form).length;break;case"function":n=r.depends.call(i,i)}n?e[s]=void 0!==r.param?r.param:!0:delete e[s]}}),t.each(e,function(s,r){e[s]=t.isFunction(r)?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],3>i.length&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(t))},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i=0,s=0,r=!1;t=t.replace(/\D/g,"");for(var n=t.length-1;n>=0;n--){var a=t.charAt(n);s=parseInt(a,10),r&&(s*=2)>9&&(s-=9),i+=s,r=!r}return 0===i%10},minlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s},maxlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=r},rangelength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s[0]&&s[1]>=r},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&i[1]>=t},equalTo:function(e,i,s){var r=t(s);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,s){if(this.optional(i))return"dependency-mismatch";var r=this.previousValue(i);if(this.settings.messages[i.name]||(this.settings.messages[i.name]={}),r.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=r.message,s="string"==typeof s&&{url:s}||s,r.old===e)return r.valid;r.old=e;var n=this;this.startRequest(i);var a={};return a[i.name]=e,t.ajax(t.extend(!0,{url:s,mode:"abort",port:"validate"+i.name,dataType:"json",data:a,success:function(s){n.settings.messages[i.name].remote=r.originalMessage;var a=s===!0||"true"===s;if(a){var u=n.formSubmitted;n.prepareElement(i),n.formSubmitted=u,n.successList.push(i),delete n.invalid[i.name],n.showErrors()}else{var o={},l=s||n.defaultMessage(i,"remote");o[i.name]=r.message=t.isFunction(l)?l(e):l,n.invalid[i.name]=!0,n.showErrors(o)}r.valid=a,n.stopRequest(i,a)}},s)),"pending"}}}),t.format=t.validator.format})(jQuery),function(t){var e={};if(t.ajaxPrefilter)t.ajaxPrefilter(function(t,i,s){var r=t.port;"abort"===t.mode&&(e[r]&&e[r].abort(),e[r]=s)});else{var i=t.ajax;t.ajax=function(s){var r=("mode"in s?s:t.ajaxSettings).mode,n=("port"in s?s:t.ajaxSettings).port;return"abort"===r?(e[n]&&e[n].abort(),e[n]=i.apply(this,arguments),e[n]):i.apply(this,arguments)}}}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,i,s){return this.bind(i,function(i){var r=t(i.target);return r.is(e)?s.apply(r,arguments):void 0})}})}(jQuery);
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-af.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Afrikaans initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Renier Pretorius. */
3
- jQuery(function($){
4
- $.datepicker.regional['af'] = {
5
- closeText: 'Selekteer',
6
- prevText: 'Vorige',
7
- nextText: 'Volgende',
8
- currentText: 'Vandag',
9
- monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
10
- 'Julie','Augustus','September','Oktober','November','Desember'],
11
- monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
12
- 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
13
- dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
14
- dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
15
- dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
16
- weekHeader: 'Wk',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['af']);
23
- });
1
+ /* Afrikaans initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Renier Pretorius. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['af'] = {
5
+ closeText: 'Selekteer',
6
+ prevText: 'Vorige',
7
+ nextText: 'Volgende',
8
+ currentText: 'Vandag',
9
+ monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
10
+ 'Julie','Augustus','September','Oktober','November','Desember'],
11
+ monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
12
+ 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
13
+ dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
14
+ dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
15
+ dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
16
+ weekHeader: 'Wk',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['af']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar-DZ.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
2
- /* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem@yahoo.fr */
3
-
4
- jQuery(function($){
5
- $.datepicker.regional['ar-DZ'] = {
6
- closeText: 'إغلاق',
7
- prevText: '&#x3C;السابق',
8
- nextText: 'التالي&#x3E;',
9
- currentText: 'اليوم',
10
- monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
11
- 'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
12
- monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
13
- dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
14
- dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
15
- dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
16
- weekHeader: 'أسبوع',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 6,
19
- isRTL: true,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
23
- });
1
+ /* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
2
+ /* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem@yahoo.fr */
3
+
4
+ jQuery(function($){
5
+ $.datepicker.regional['ar-DZ'] = {
6
+ closeText: 'إغلاق',
7
+ prevText: '&#x3C;السابق',
8
+ nextText: 'التالي&#x3E;',
9
+ currentText: 'اليوم',
10
+ monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
11
+ 'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
12
+ monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
13
+ dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
14
+ dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
15
+ dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
16
+ weekHeader: 'أسبوع',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 6,
19
+ isRTL: true,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Arabic Translation for jQuery UI date picker plugin. */
2
- /* Khaled Alhourani -- me@khaledalhourani.com */
3
- /* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
4
- jQuery(function($){
5
- $.datepicker.regional['ar'] = {
6
- closeText: 'إغلاق',
7
- prevText: '&#x3C;السابق',
8
- nextText: 'التالي&#x3E;',
9
- currentText: 'اليوم',
10
- monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
11
- 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
12
- monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
13
- dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
14
- dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
15
- dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
16
- weekHeader: 'أسبوع',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 6,
19
- isRTL: true,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['ar']);
23
- });
1
+ /* Arabic Translation for jQuery UI date picker plugin. */
2
+ /* Khaled Alhourani -- me@khaledalhourani.com */
3
+ /* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
4
+ jQuery(function($){
5
+ $.datepicker.regional['ar'] = {
6
+ closeText: 'إغلاق',
7
+ prevText: '&#x3C;السابق',
8
+ nextText: 'التالي&#x3E;',
9
+ currentText: 'اليوم',
10
+ monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
11
+ 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
12
+ monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
13
+ dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
14
+ dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
15
+ dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
16
+ weekHeader: 'أسبوع',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 6,
19
+ isRTL: true,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['ar']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-az.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Jamil Najafov (necefov33@gmail.com). */
3
- jQuery(function($) {
4
- $.datepicker.regional['az'] = {
5
- closeText: 'Bağla',
6
- prevText: '&#x3C;Geri',
7
- nextText: 'İrəli&#x3E;',
8
- currentText: 'Bugün',
9
- monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
10
- 'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
11
- monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun',
12
- 'İyul','Avq','Sen','Okt','Noy','Dek'],
13
- dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'],
14
- dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'],
15
- dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'],
16
- weekHeader: 'Hf',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['az']);
23
- });
1
+ /* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Jamil Najafov (necefov33@gmail.com). */
3
+ jQuery(function($) {
4
+ $.datepicker.regional['az'] = {
5
+ closeText: 'Bağla',
6
+ prevText: '&#x3C;Geri',
7
+ nextText: 'İrəli&#x3E;',
8
+ currentText: 'Bugün',
9
+ monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
10
+ 'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
11
+ monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun',
12
+ 'İyul','Avq','Sen','Okt','Noy','Dek'],
13
+ dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'],
14
+ dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'],
15
+ dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'],
16
+ weekHeader: 'Hf',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['az']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-be.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Belarusian initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Pavel Selitskas <p.selitskas@gmail.com> */
3
- jQuery(function($){
4
- $.datepicker.regional['be'] = {
5
- closeText: 'Зачыніць',
6
- prevText: '&larr;Папяр.',
7
- nextText: 'Наст.&rarr;',
8
- currentText: 'Сёньня',
9
- monthNames: ['Студзень','Люты','Сакавік','Красавік','Травень','Чэрвень',
10
- 'Ліпень','Жнівень','Верасень','Кастрычнік','Лістапад','Сьнежань'],
11
- monthNamesShort: ['Сту','Лют','Сак','Кра','Тра','Чэр',
12
- 'Ліп','Жні','Вер','Кас','Ліс','Сьн'],
13
- dayNames: ['нядзеля','панядзелак','аўторак','серада','чацьвер','пятніца','субота'],
14
- dayNamesShort: ['ндз','пнд','аўт','срд','чцв','птн','сбт'],
15
- dayNamesMin: ['Нд','Пн','Аў','Ср','Чц','Пт','Сб'],
16
- weekHeader: 'Тд',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['be']);
23
- });
1
+ /* Belarusian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Pavel Selitskas <p.selitskas@gmail.com> */
3
+ jQuery(function($){
4
+ $.datepicker.regional['be'] = {
5
+ closeText: 'Зачыніць',
6
+ prevText: '&larr;Папяр.',
7
+ nextText: 'Наст.&rarr;',
8
+ currentText: 'Сёньня',
9
+ monthNames: ['Студзень','Люты','Сакавік','Красавік','Травень','Чэрвень',
10
+ 'Ліпень','Жнівень','Верасень','Кастрычнік','Лістапад','Сьнежань'],
11
+ monthNamesShort: ['Сту','Лют','Сак','Кра','Тра','Чэр',
12
+ 'Ліп','Жні','Вер','Кас','Ліс','Сьн'],
13
+ dayNames: ['нядзеля','панядзелак','аўторак','серада','чацьвер','пятніца','субота'],
14
+ dayNamesShort: ['ндз','пнд','аўт','срд','чцв','птн','сбт'],
15
+ dayNamesMin: ['Нд','Пн','Аў','Ср','Чц','Пт','Сб'],
16
+ weekHeader: 'Тд',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['be']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bg.js CHANGED
@@ -1,24 +1,24 @@
1
- /* Bulgarian initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Stoyan Kyosev (http://svest.org). */
3
- jQuery(function($){
4
- $.datepicker.regional['bg'] = {
5
- closeText: 'затвори',
6
- prevText: '&#x3C;назад',
7
- nextText: 'напред&#x3E;',
8
- nextBigText: '&#x3E;&#x3E;',
9
- currentText: 'днес',
10
- monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
11
- 'Юли','Август','Септември','Октомври','Ноември','Декември'],
12
- monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
13
- 'Юли','Авг','Сеп','Окт','Нов','Дек'],
14
- dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
15
- dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
16
- dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
17
- weekHeader: 'Wk',
18
- dateFormat: 'dd.mm.yy',
19
- firstDay: 1,
20
- isRTL: false,
21
- showMonthAfterYear: false,
22
- yearSuffix: ''};
23
- $.datepicker.setDefaults($.datepicker.regional['bg']);
24
- });
1
+ /* Bulgarian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Stoyan Kyosev (http://svest.org). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['bg'] = {
5
+ closeText: 'затвори',
6
+ prevText: '&#x3C;назад',
7
+ nextText: 'напред&#x3E;',
8
+ nextBigText: '&#x3E;&#x3E;',
9
+ currentText: 'днес',
10
+ monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
11
+ 'Юли','Август','Септември','Октомври','Ноември','Декември'],
12
+ monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
13
+ 'Юли','Авг','Сеп','Окт','Нов','Дек'],
14
+ dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
15
+ dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
16
+ dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
17
+ weekHeader: 'Wk',
18
+ dateFormat: 'dd.mm.yy',
19
+ firstDay: 1,
20
+ isRTL: false,
21
+ showMonthAfterYear: false,
22
+ yearSuffix: ''};
23
+ $.datepicker.setDefaults($.datepicker.regional['bg']);
24
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bs.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Bosnian i18n for the jQuery UI date picker plugin. */
2
- /* Written by Kenan Konjo. */
3
- jQuery(function($){
4
- $.datepicker.regional['bs'] = {
5
- closeText: 'Zatvori',
6
- prevText: '&#x3C;',
7
- nextText: '&#x3E;',
8
- currentText: 'Danas',
9
- monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
10
- 'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
11
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
12
- 'Jul','Aug','Sep','Okt','Nov','Dec'],
13
- dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
14
- dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
15
- dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
16
- weekHeader: 'Wk',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['bs']);
23
- });
1
+ /* Bosnian i18n for the jQuery UI date picker plugin. */
2
+ /* Written by Kenan Konjo. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['bs'] = {
5
+ closeText: 'Zatvori',
6
+ prevText: '&#x3C;',
7
+ nextText: '&#x3E;',
8
+ currentText: 'Danas',
9
+ monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
10
+ 'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
11
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
12
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
13
+ dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
14
+ dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
15
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
16
+ weekHeader: 'Wk',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['bs']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ca.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Inicialització en català per a l'extensió 'UI date picker' per jQuery. */
2
- /* Writers: (joan.leon@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['ca'] = {
5
- closeText: 'Tanca',
6
- prevText: 'Anterior',
7
- nextText: 'Següent',
8
- currentText: 'Avui',
9
- monthNames: ['gener','febrer','març','abril','maig','juny',
10
- 'juliol','agost','setembre','octubre','novembre','desembre'],
11
- monthNamesShort: ['gen','feb','març','abr','maig','juny',
12
- 'jul','ag','set','oct','nov','des'],
13
- dayNames: ['diumenge','dilluns','dimarts','dimecres','dijous','divendres','dissabte'],
14
- dayNamesShort: ['dg','dl','dt','dc','dj','dv','ds'],
15
- dayNamesMin: ['dg','dl','dt','dc','dj','dv','ds'],
16
- weekHeader: 'Set',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['ca']);
23
- });
1
+ /* Inicialització en català per a l'extensió 'UI date picker' per jQuery. */
2
+ /* Writers: (joan.leon@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['ca'] = {
5
+ closeText: 'Tanca',
6
+ prevText: 'Anterior',
7
+ nextText: 'Següent',
8
+ currentText: 'Avui',
9
+ monthNames: ['gener','febrer','març','abril','maig','juny',
10
+ 'juliol','agost','setembre','octubre','novembre','desembre'],
11
+ monthNamesShort: ['gen','feb','març','abr','maig','juny',
12
+ 'jul','ag','set','oct','nov','des'],
13
+ dayNames: ['diumenge','dilluns','dimarts','dimecres','dijous','divendres','dissabte'],
14
+ dayNamesShort: ['dg','dl','dt','dc','dj','dv','ds'],
15
+ dayNamesMin: ['dg','dl','dt','dc','dj','dv','ds'],
16
+ weekHeader: 'Set',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['ca']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cs.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Czech initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Tomas Muller (tomas@tomas-muller.net). */
3
- jQuery(function($){
4
- $.datepicker.regional['cs'] = {
5
- closeText: 'Zavřít',
6
- prevText: '&#x3C;Dříve',
7
- nextText: 'Později&#x3E;',
8
- currentText: 'Nyní',
9
- monthNames: ['leden','únor','březen','duben','květen','červen',
10
- 'červenec','srpen','září','říjen','listopad','prosinec'],
11
- monthNamesShort: ['led','úno','bře','dub','kvě','čer',
12
- 'čvc','srp','zář','říj','lis','pro'],
13
- dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
14
- dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
15
- dayNamesMin: ['ne','po','út','st','čt','pá','so'],
16
- weekHeader: 'Týd',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['cs']);
23
- });
1
+ /* Czech initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Tomas Muller (tomas@tomas-muller.net). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['cs'] = {
5
+ closeText: 'Zavřít',
6
+ prevText: '&#x3C;Dříve',
7
+ nextText: 'Později&#x3E;',
8
+ currentText: 'Nyní',
9
+ monthNames: ['leden','únor','březen','duben','květen','červen',
10
+ 'červenec','srpen','září','říjen','listopad','prosinec'],
11
+ monthNamesShort: ['led','úno','bře','dub','kvě','čer',
12
+ 'čvc','srp','zář','říj','lis','pro'],
13
+ dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
14
+ dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
15
+ dayNamesMin: ['ne','po','út','st','čt','pá','so'],
16
+ weekHeader: 'Týd',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['cs']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cy-GB.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Welsh/UK initialisation for the jQuery UI date picker plugin. */
2
- /* Written by William Griffiths. */
3
- jQuery(function($){
4
- $.datepicker.regional['cy-GB'] = {
5
- closeText: 'Done',
6
- prevText: 'Prev',
7
- nextText: 'Next',
8
- currentText: 'Today',
9
- monthNames: ['Ionawr','Chwefror','Mawrth','Ebrill','Mai','Mehefin',
10
- 'Gorffennaf','Awst','Medi','Hydref','Tachwedd','Rhagfyr'],
11
- monthNamesShort: ['Ion', 'Chw', 'Maw', 'Ebr', 'Mai', 'Meh',
12
- 'Gor', 'Aws', 'Med', 'Hyd', 'Tac', 'Rha'],
13
- dayNames: ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'],
14
- dayNamesShort: ['Sul', 'Llu', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'],
15
- dayNamesMin: ['Su','Ll','Ma','Me','Ia','Gw','Sa'],
16
- weekHeader: 'Wy',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['cy-GB']);
23
- });
1
+ /* Welsh/UK initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by William Griffiths. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['cy-GB'] = {
5
+ closeText: 'Done',
6
+ prevText: 'Prev',
7
+ nextText: 'Next',
8
+ currentText: 'Today',
9
+ monthNames: ['Ionawr','Chwefror','Mawrth','Ebrill','Mai','Mehefin',
10
+ 'Gorffennaf','Awst','Medi','Hydref','Tachwedd','Rhagfyr'],
11
+ monthNamesShort: ['Ion', 'Chw', 'Maw', 'Ebr', 'Mai', 'Meh',
12
+ 'Gor', 'Aws', 'Med', 'Hyd', 'Tac', 'Rha'],
13
+ dayNames: ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'],
14
+ dayNamesShort: ['Sul', 'Llu', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'],
15
+ dayNamesMin: ['Su','Ll','Ma','Me','Ia','Gw','Sa'],
16
+ weekHeader: 'Wy',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['cy-GB']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-da.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Danish initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Jan Christensen ( deletestuff@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['da'] = {
5
- closeText: 'Luk',
6
- prevText: '&#x3C;Forrige',
7
- nextText: 'Næste&#x3E;',
8
- currentText: 'Idag',
9
- monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
10
- 'Juli','August','September','Oktober','November','December'],
11
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
12
- 'Jul','Aug','Sep','Okt','Nov','Dec'],
13
- dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
14
- dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
15
- dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
16
- weekHeader: 'Uge',
17
- dateFormat: 'dd-mm-yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['da']);
23
- });
1
+ /* Danish initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Jan Christensen ( deletestuff@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['da'] = {
5
+ closeText: 'Luk',
6
+ prevText: '&#x3C;Forrige',
7
+ nextText: 'Næste&#x3E;',
8
+ currentText: 'Idag',
9
+ monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
10
+ 'Juli','August','September','Oktober','November','December'],
11
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
12
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
13
+ dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
14
+ dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
15
+ dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
16
+ weekHeader: 'Uge',
17
+ dateFormat: 'dd-mm-yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['da']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-de.js CHANGED
@@ -1,23 +1,23 @@
1
- /* German initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Milian Wolff (mail@milianw.de). */
3
- jQuery(function($){
4
- $.datepicker.regional['de'] = {
5
- closeText: 'Schließen',
6
- prevText: '&#x3C;Zurück',
7
- nextText: 'Vor&#x3E;',
8
- currentText: 'Heute',
9
- monthNames: ['Januar','Februar','März','April','Mai','Juni',
10
- 'Juli','August','September','Oktober','November','Dezember'],
11
- monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
12
- 'Jul','Aug','Sep','Okt','Nov','Dez'],
13
- dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
14
- dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
15
- dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
16
- weekHeader: 'KW',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['de']);
23
- });
1
+ /* German initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Milian Wolff (mail@milianw.de). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['de'] = {
5
+ closeText: 'Schließen',
6
+ prevText: '&#x3C;Zurück',
7
+ nextText: 'Vor&#x3E;',
8
+ currentText: 'Heute',
9
+ monthNames: ['Januar','Februar','März','April','Mai','Juni',
10
+ 'Juli','August','September','Oktober','November','Dezember'],
11
+ monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
12
+ 'Jul','Aug','Sep','Okt','Nov','Dez'],
13
+ dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
14
+ dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
15
+ dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
16
+ weekHeader: 'KW',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['de']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-el.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Greek (el) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Alex Cicovic (http://www.alexcicovic.com) */
3
- jQuery(function($){
4
- $.datepicker.regional['el'] = {
5
- closeText: 'Κλείσιμο',
6
- prevText: 'Προηγούμενος',
7
- nextText: 'Επόμενος',
8
- currentText: 'Τρέχων Μήνας',
9
- monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
10
- 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
11
- monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
12
- 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
13
- dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
14
- dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
15
- dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
16
- weekHeader: 'Εβδ',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['el']);
23
- });
1
+ /* Greek (el) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Alex Cicovic (http://www.alexcicovic.com) */
3
+ jQuery(function($){
4
+ $.datepicker.regional['el'] = {
5
+ closeText: 'Κλείσιμο',
6
+ prevText: 'Προηγούμενος',
7
+ nextText: 'Επόμενος',
8
+ currentText: 'Τρέχων Μήνας',
9
+ monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
10
+ 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
11
+ monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
12
+ 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
13
+ dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
14
+ dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
15
+ dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
16
+ weekHeader: 'Εβδ',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['el']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-AU.js CHANGED
@@ -1,23 +1,23 @@
1
- /* English/Australia initialisation for the jQuery UI date picker plugin. */
2
- /* Based on the en-GB initialisation. */
3
- jQuery(function($){
4
- $.datepicker.regional['en-AU'] = {
5
- closeText: 'Done',
6
- prevText: 'Prev',
7
- nextText: 'Next',
8
- currentText: 'Today',
9
- monthNames: ['January','February','March','April','May','June',
10
- 'July','August','September','October','November','December'],
11
- monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
12
- 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
13
- dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
14
- dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
15
- dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
16
- weekHeader: 'Wk',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['en-AU']);
23
- });
1
+ /* English/Australia initialisation for the jQuery UI date picker plugin. */
2
+ /* Based on the en-GB initialisation. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['en-AU'] = {
5
+ closeText: 'Done',
6
+ prevText: 'Prev',
7
+ nextText: 'Next',
8
+ currentText: 'Today',
9
+ monthNames: ['January','February','March','April','May','June',
10
+ 'July','August','September','October','November','December'],
11
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
12
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
13
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
14
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
15
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
16
+ weekHeader: 'Wk',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['en-AU']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-GB.js CHANGED
@@ -1,23 +1,23 @@
1
- /* English/UK initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Stuart. */
3
- jQuery(function($){
4
- $.datepicker.regional['en-GB'] = {
5
- closeText: 'Done',
6
- prevText: 'Prev',
7
- nextText: 'Next',
8
- currentText: 'Today',
9
- monthNames: ['January','February','March','April','May','June',
10
- 'July','August','September','October','November','December'],
11
- monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
12
- 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
13
- dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
14
- dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
15
- dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
16
- weekHeader: 'Wk',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['en-GB']);
23
- });
1
+ /* English/UK initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Stuart. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['en-GB'] = {
5
+ closeText: 'Done',
6
+ prevText: 'Prev',
7
+ nextText: 'Next',
8
+ currentText: 'Today',
9
+ monthNames: ['January','February','March','April','May','June',
10
+ 'July','August','September','October','November','December'],
11
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
12
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
13
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
14
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
15
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
16
+ weekHeader: 'Wk',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['en-GB']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-NZ.js CHANGED
@@ -1,23 +1,23 @@
1
- /* English/New Zealand initialisation for the jQuery UI date picker plugin. */
2
- /* Based on the en-GB initialisation. */
3
- jQuery(function($){
4
- $.datepicker.regional['en-NZ'] = {
5
- closeText: 'Done',
6
- prevText: 'Prev',
7
- nextText: 'Next',
8
- currentText: 'Today',
9
- monthNames: ['January','February','March','April','May','June',
10
- 'July','August','September','October','November','December'],
11
- monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
12
- 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
13
- dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
14
- dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
15
- dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
16
- weekHeader: 'Wk',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['en-NZ']);
23
- });
1
+ /* English/New Zealand initialisation for the jQuery UI date picker plugin. */
2
+ /* Based on the en-GB initialisation. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['en-NZ'] = {
5
+ closeText: 'Done',
6
+ prevText: 'Prev',
7
+ nextText: 'Next',
8
+ currentText: 'Today',
9
+ monthNames: ['January','February','March','April','May','June',
10
+ 'July','August','September','October','November','December'],
11
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
12
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
13
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
14
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
15
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
16
+ weekHeader: 'Wk',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['en-NZ']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eo.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Esperanto initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Olivier M. (olivierweb@ifrance.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['eo'] = {
5
- closeText: 'Fermi',
6
- prevText: '&#x3C;Anta',
7
- nextText: 'Sekv&#x3E;',
8
- currentText: 'Nuna',
9
- monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
10
- 'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
11
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
12
- 'Jul','Aŭg','Sep','Okt','Nov','Dec'],
13
- dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
14
- dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
15
- dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
16
- weekHeader: 'Sb',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 0,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['eo']);
23
- });
1
+ /* Esperanto initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Olivier M. (olivierweb@ifrance.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['eo'] = {
5
+ closeText: 'Fermi',
6
+ prevText: '&#x3C;Anta',
7
+ nextText: 'Sekv&#x3E;',
8
+ currentText: 'Nuna',
9
+ monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
10
+ 'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
11
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
12
+ 'Jul','Aŭg','Sep','Okt','Nov','Dec'],
13
+ dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
14
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
15
+ dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
16
+ weekHeader: 'Sb',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['eo']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-es.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Inicialización en español para la extensión 'UI date picker' para jQuery. */
2
- /* Traducido por Vester (xvester@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['es'] = {
5
- closeText: 'Cerrar',
6
- prevText: '&#x3C;Ant',
7
- nextText: 'Sig&#x3E;',
8
- currentText: 'Hoy',
9
- monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
10
- 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
11
- monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
12
- 'Jul','Ago','Sep','Oct','Nov','Dic'],
13
- dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
14
- dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
15
- dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
16
- weekHeader: 'Sm',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['es']);
23
- });
1
+ /* Inicialización en español para la extensión 'UI date picker' para jQuery. */
2
+ /* Traducido por Vester (xvester@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['es'] = {
5
+ closeText: 'Cerrar',
6
+ prevText: '&#x3C;Ant',
7
+ nextText: 'Sig&#x3E;',
8
+ currentText: 'Hoy',
9
+ monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
10
+ 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
11
+ monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
12
+ 'Jul','Ago','Sep','Oct','Nov','Dic'],
13
+ dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
14
+ dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
15
+ dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
16
+ weekHeader: 'Sm',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['es']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-et.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Estonian initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
3
- jQuery(function($){
4
- $.datepicker.regional['et'] = {
5
- closeText: 'Sulge',
6
- prevText: 'Eelnev',
7
- nextText: 'Järgnev',
8
- currentText: 'Täna',
9
- monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
10
- 'Juuli','August','September','Oktoober','November','Detsember'],
11
- monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
12
- 'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
13
- dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
14
- dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
15
- dayNamesMin: ['P','E','T','K','N','R','L'],
16
- weekHeader: 'näd',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['et']);
23
- });
1
+ /* Estonian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['et'] = {
5
+ closeText: 'Sulge',
6
+ prevText: 'Eelnev',
7
+ nextText: 'Järgnev',
8
+ currentText: 'Täna',
9
+ monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
10
+ 'Juuli','August','September','Oktoober','November','Detsember'],
11
+ monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
12
+ 'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
13
+ dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
14
+ dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
15
+ dayNamesMin: ['P','E','T','K','N','R','L'],
16
+ weekHeader: 'näd',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['et']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eu.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
2
- /* Karrikas-ek itzulia (karrikas@karrikas.com) */
3
- jQuery(function($){
4
- $.datepicker.regional['eu'] = {
5
- closeText: 'Egina',
6
- prevText: '&#x3C;Aur',
7
- nextText: 'Hur&#x3E;',
8
- currentText: 'Gaur',
9
- monthNames: ['urtarrila','otsaila','martxoa','apirila','maiatza','ekaina',
10
- 'uztaila','abuztua','iraila','urria','azaroa','abendua'],
11
- monthNamesShort: ['urt.','ots.','mar.','api.','mai.','eka.',
12
- 'uzt.','abu.','ira.','urr.','aza.','abe.'],
13
- dayNames: ['igandea','astelehena','asteartea','asteazkena','osteguna','ostirala','larunbata'],
14
- dayNamesShort: ['ig.','al.','ar.','az.','og.','ol.','lr.'],
15
- dayNamesMin: ['ig','al','ar','az','og','ol','lr'],
16
- weekHeader: 'As',
17
- dateFormat: 'yy-mm-dd',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['eu']);
23
- });
1
+ /* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
2
+ /* Karrikas-ek itzulia (karrikas@karrikas.com) */
3
+ jQuery(function($){
4
+ $.datepicker.regional['eu'] = {
5
+ closeText: 'Egina',
6
+ prevText: '&#x3C;Aur',
7
+ nextText: 'Hur&#x3E;',
8
+ currentText: 'Gaur',
9
+ monthNames: ['urtarrila','otsaila','martxoa','apirila','maiatza','ekaina',
10
+ 'uztaila','abuztua','iraila','urria','azaroa','abendua'],
11
+ monthNamesShort: ['urt.','ots.','mar.','api.','mai.','eka.',
12
+ 'uzt.','abu.','ira.','urr.','aza.','abe.'],
13
+ dayNames: ['igandea','astelehena','asteartea','asteazkena','osteguna','ostirala','larunbata'],
14
+ dayNamesShort: ['ig.','al.','ar.','az.','og.','ol.','lr.'],
15
+ dayNamesMin: ['ig','al','ar','az','og','ol','lr'],
16
+ weekHeader: 'As',
17
+ dateFormat: 'yy-mm-dd',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['eu']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fa.js CHANGED
@@ -1,59 +1,59 @@
1
- /* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
2
- /* Javad Mowlanezhad -- jmowla@gmail.com */
3
- /* Jalali calendar should supported soon! (Its implemented but I have to test it) */
4
- jQuery(function($) {
5
- $.datepicker.regional['fa'] = {
6
- closeText: 'بستن',
7
- prevText: '&#x3C;قبلی',
8
- nextText: 'بعدی&#x3E;',
9
- currentText: 'امروز',
10
- monthNames: [
11
- 'فروردين',
12
- 'ارديبهشت',
13
- 'خرداد',
14
- 'تير',
15
- 'مرداد',
16
- 'شهريور',
17
- 'مهر',
18
- 'آبان',
19
- 'آذر',
20
- 'دی',
21
- 'بهمن',
22
- 'اسفند'
23
- ],
24
- monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
25
- dayNames: [
26
- 'يکشنبه',
27
- 'دوشنبه',
28
- 'سه‌شنبه',
29
- 'چهارشنبه',
30
- 'پنجشنبه',
31
- 'جمعه',
32
- 'شنبه'
33
- ],
34
- dayNamesShort: [
35
- 'ی',
36
- 'د',
37
- 'س',
38
- 'چ',
39
- 'پ',
40
- 'ج',
41
- 'ش'
42
- ],
43
- dayNamesMin: [
44
- 'ی',
45
- 'د',
46
- 'س',
47
- 'چ',
48
- 'پ',
49
- 'ج',
50
- 'ش'
51
- ],
52
- weekHeader: 'هف',
53
- dateFormat: 'yy/mm/dd',
54
- firstDay: 6,
55
- isRTL: true,
56
- showMonthAfterYear: false,
57
- yearSuffix: ''};
58
- $.datepicker.setDefaults($.datepicker.regional['fa']);
59
- });
1
+ /* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
2
+ /* Javad Mowlanezhad -- jmowla@gmail.com */
3
+ /* Jalali calendar should supported soon! (Its implemented but I have to test it) */
4
+ jQuery(function($) {
5
+ $.datepicker.regional['fa'] = {
6
+ closeText: 'بستن',
7
+ prevText: '&#x3C;قبلی',
8
+ nextText: 'بعدی&#x3E;',
9
+ currentText: 'امروز',
10
+ monthNames: [
11
+ 'فروردين',
12
+ 'ارديبهشت',
13
+ 'خرداد',
14
+ 'تير',
15
+ 'مرداد',
16
+ 'شهريور',
17
+ 'مهر',
18
+ 'آبان',
19
+ 'آذر',
20
+ 'دی',
21
+ 'بهمن',
22
+ 'اسفند'
23
+ ],
24
+ monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
25
+ dayNames: [
26
+ 'يکشنبه',
27
+ 'دوشنبه',
28
+ 'سه‌شنبه',
29
+ 'چهارشنبه',
30
+ 'پنجشنبه',
31
+ 'جمعه',
32
+ 'شنبه'
33
+ ],
34
+ dayNamesShort: [
35
+ 'ی',
36
+ 'د',
37
+ 'س',
38
+ 'چ',
39
+ 'پ',
40
+ 'ج',
41
+ 'ش'
42
+ ],
43
+ dayNamesMin: [
44
+ 'ی',
45
+ 'د',
46
+ 'س',
47
+ 'چ',
48
+ 'پ',
49
+ 'ج',
50
+ 'ش'
51
+ ],
52
+ weekHeader: 'هف',
53
+ dateFormat: 'yy/mm/dd',
54
+ firstDay: 6,
55
+ isRTL: true,
56
+ showMonthAfterYear: false,
57
+ yearSuffix: ''};
58
+ $.datepicker.setDefaults($.datepicker.regional['fa']);
59
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fi.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Finnish initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Harri Kilpiö (harrikilpio@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['fi'] = {
5
- closeText: 'Sulje',
6
- prevText: '&#xAB;Edellinen',
7
- nextText: 'Seuraava&#xBB;',
8
- currentText: 'Tänään',
9
- monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
10
- 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
11
- monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
12
- 'Heinä','Elo','Syys','Loka','Marras','Joulu'],
13
- dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'],
14
- dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
15
- dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
16
- weekHeader: 'Vk',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['fi']);
23
- });
1
+ /* Finnish initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Harri Kilpiö (harrikilpio@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['fi'] = {
5
+ closeText: 'Sulje',
6
+ prevText: '&#xAB;Edellinen',
7
+ nextText: 'Seuraava&#xBB;',
8
+ currentText: 'Tänään',
9
+ monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
10
+ 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
11
+ monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
12
+ 'Heinä','Elo','Syys','Loka','Marras','Joulu'],
13
+ dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'],
14
+ dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
15
+ dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
16
+ weekHeader: 'Vk',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['fi']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fo.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Faroese initialisation for the jQuery UI date picker plugin */
2
- /* Written by Sverri Mohr Olsen, sverrimo@gmail.com */
3
- jQuery(function($){
4
- $.datepicker.regional['fo'] = {
5
- closeText: 'Lat aftur',
6
- prevText: '&#x3C;Fyrra',
7
- nextText: 'Næsta&#x3E;',
8
- currentText: 'Í dag',
9
- monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
10
- 'Juli','August','September','Oktober','November','Desember'],
11
- monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
12
- 'Jul','Aug','Sep','Okt','Nov','Des'],
13
- dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'],
14
- dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'],
15
- dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
16
- weekHeader: 'Vk',
17
- dateFormat: 'dd-mm-yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['fo']);
23
- });
1
+ /* Faroese initialisation for the jQuery UI date picker plugin */
2
+ /* Written by Sverri Mohr Olsen, sverrimo@gmail.com */
3
+ jQuery(function($){
4
+ $.datepicker.regional['fo'] = {
5
+ closeText: 'Lat aftur',
6
+ prevText: '&#x3C;Fyrra',
7
+ nextText: 'Næsta&#x3E;',
8
+ currentText: 'Í dag',
9
+ monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
10
+ 'Juli','August','September','Oktober','November','Desember'],
11
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
12
+ 'Jul','Aug','Sep','Okt','Nov','Des'],
13
+ dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'],
14
+ dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'],
15
+ dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
16
+ weekHeader: 'Vk',
17
+ dateFormat: 'dd-mm-yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['fo']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CA.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Canadian-French initialisation for the jQuery UI date picker plugin. */
2
- jQuery(function ($) {
3
- $.datepicker.regional['fr-CA'] = {
4
- closeText: 'Fermer',
5
- prevText: 'Précédent',
6
- nextText: 'Suivant',
7
- currentText: 'Aujourd\'hui',
8
- monthNames: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin',
9
- 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
10
- monthNamesShort: ['janv.', 'févr.', 'mars', 'avril', 'mai', 'juin',
11
- 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
12
- dayNames: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
13
- dayNamesShort: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
14
- dayNamesMin: ['D', 'L', 'M', 'M', 'J', 'V', 'S'],
15
- weekHeader: 'Sem.',
16
- dateFormat: 'yy-mm-dd',
17
- firstDay: 0,
18
- isRTL: false,
19
- showMonthAfterYear: false,
20
- yearSuffix: ''
21
- };
22
- $.datepicker.setDefaults($.datepicker.regional['fr-CA']);
23
- });
1
+ /* Canadian-French initialisation for the jQuery UI date picker plugin. */
2
+ jQuery(function ($) {
3
+ $.datepicker.regional['fr-CA'] = {
4
+ closeText: 'Fermer',
5
+ prevText: 'Précédent',
6
+ nextText: 'Suivant',
7
+ currentText: 'Aujourd\'hui',
8
+ monthNames: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin',
9
+ 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
10
+ monthNamesShort: ['janv.', 'févr.', 'mars', 'avril', 'mai', 'juin',
11
+ 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
12
+ dayNames: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
13
+ dayNamesShort: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
14
+ dayNamesMin: ['D', 'L', 'M', 'M', 'J', 'V', 'S'],
15
+ weekHeader: 'Sem.',
16
+ dateFormat: 'yy-mm-dd',
17
+ firstDay: 0,
18
+ isRTL: false,
19
+ showMonthAfterYear: false,
20
+ yearSuffix: ''
21
+ };
22
+ $.datepicker.setDefaults($.datepicker.regional['fr-CA']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CH.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Swiss-French initialisation for the jQuery UI date picker plugin. */
2
- /* Written Martin Voelkle (martin.voelkle@e-tc.ch). */
3
- jQuery(function($){
4
- $.datepicker.regional['fr-CH'] = {
5
- closeText: 'Fermer',
6
- prevText: '&#x3C;Préc',
7
- nextText: 'Suiv&#x3E;',
8
- currentText: 'Courant',
9
- monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
10
- 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
11
- monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
12
- 'Jul','Aoû','Sep','Oct','Nov','Déc'],
13
- dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
14
- dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
15
- dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
16
- weekHeader: 'Sm',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['fr-CH']);
23
- });
1
+ /* Swiss-French initialisation for the jQuery UI date picker plugin. */
2
+ /* Written Martin Voelkle (martin.voelkle@e-tc.ch). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['fr-CH'] = {
5
+ closeText: 'Fermer',
6
+ prevText: '&#x3C;Préc',
7
+ nextText: 'Suiv&#x3E;',
8
+ currentText: 'Courant',
9
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
10
+ 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
11
+ monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
12
+ 'Jul','Aoû','Sep','Oct','Nov','Déc'],
13
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
14
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
15
+ dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
16
+ weekHeader: 'Sm',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['fr-CH']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr.js CHANGED
@@ -1,25 +1,25 @@
1
- /* French initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Keith Wood (kbwood{at}iinet.com.au),
3
- Stéphane Nahmani (sholby@sholby.net),
4
- Stéphane Raimbault <stephane.raimbault@gmail.com> */
5
- jQuery(function($){
6
- $.datepicker.regional['fr'] = {
7
- closeText: 'Fermer',
8
- prevText: 'Précédent',
9
- nextText: 'Suivant',
10
- currentText: 'Aujourd\'hui',
11
- monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
12
- 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
13
- monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
14
- 'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
15
- dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
16
- dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
17
- dayNamesMin: ['D','L','M','M','J','V','S'],
18
- weekHeader: 'Sem.',
19
- dateFormat: 'dd/mm/yy',
20
- firstDay: 1,
21
- isRTL: false,
22
- showMonthAfterYear: false,
23
- yearSuffix: ''};
24
- $.datepicker.setDefaults($.datepicker.regional['fr']);
25
- });
1
+ /* French initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Keith Wood (kbwood{at}iinet.com.au),
3
+ Stéphane Nahmani (sholby@sholby.net),
4
+ Stéphane Raimbault <stephane.raimbault@gmail.com> */
5
+ jQuery(function($){
6
+ $.datepicker.regional['fr'] = {
7
+ closeText: 'Fermer',
8
+ prevText: 'Précédent',
9
+ nextText: 'Suivant',
10
+ currentText: 'Aujourd\'hui',
11
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
12
+ 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
13
+ monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
14
+ 'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
15
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
16
+ dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
17
+ dayNamesMin: ['D','L','M','M','J','V','S'],
18
+ weekHeader: 'Sem.',
19
+ dateFormat: 'dd/mm/yy',
20
+ firstDay: 1,
21
+ isRTL: false,
22
+ showMonthAfterYear: false,
23
+ yearSuffix: ''};
24
+ $.datepicker.setDefaults($.datepicker.regional['fr']);
25
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-gl.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Galician localization for 'UI date picker' jQuery extension. */
2
- /* Translated by Jorge Barreiro <yortx.barry@gmail.com>. */
3
- jQuery(function($){
4
- $.datepicker.regional['gl'] = {
5
- closeText: 'Pechar',
6
- prevText: '&#x3C;Ant',
7
- nextText: 'Seg&#x3E;',
8
- currentText: 'Hoxe',
9
- monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
10
- 'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
11
- monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
12
- 'Xul','Ago','Set','Out','Nov','Dec'],
13
- dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
14
- dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
15
- dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
16
- weekHeader: 'Sm',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['gl']);
23
- });
1
+ /* Galician localization for 'UI date picker' jQuery extension. */
2
+ /* Translated by Jorge Barreiro <yortx.barry@gmail.com>. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['gl'] = {
5
+ closeText: 'Pechar',
6
+ prevText: '&#x3C;Ant',
7
+ nextText: 'Seg&#x3E;',
8
+ currentText: 'Hoxe',
9
+ monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
10
+ 'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
11
+ monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
12
+ 'Xul','Ago','Set','Out','Nov','Dec'],
13
+ dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
14
+ dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
15
+ dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
16
+ weekHeader: 'Sm',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['gl']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-he.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Hebrew initialisation for the UI Datepicker extension. */
2
- /* Written by Amir Hardon (ahardon at gmail dot com). */
3
- jQuery(function($){
4
- $.datepicker.regional['he'] = {
5
- closeText: 'סגור',
6
- prevText: '&#x3C;הקודם',
7
- nextText: 'הבא&#x3E;',
8
- currentText: 'היום',
9
- monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
10
- 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
11
- monthNamesShort: ['ינו','פבר','מרץ','אפר','מאי','יוני',
12
- 'יולי','אוג','ספט','אוק','נוב','דצמ'],
13
- dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
14
- dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
15
- dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
16
- weekHeader: 'Wk',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 0,
19
- isRTL: true,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['he']);
23
- });
1
+ /* Hebrew initialisation for the UI Datepicker extension. */
2
+ /* Written by Amir Hardon (ahardon at gmail dot com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['he'] = {
5
+ closeText: 'סגור',
6
+ prevText: '&#x3C;הקודם',
7
+ nextText: 'הבא&#x3E;',
8
+ currentText: 'היום',
9
+ monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
10
+ 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
11
+ monthNamesShort: ['ינו','פבר','מרץ','אפר','מאי','יוני',
12
+ 'יולי','אוג','ספט','אוק','נוב','דצמ'],
13
+ dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
14
+ dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
15
+ dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
16
+ weekHeader: 'Wk',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 0,
19
+ isRTL: true,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['he']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hi.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Hindi initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Michael Dawart. */
3
- jQuery(function($){
4
- $.datepicker.regional['hi'] = {
5
- closeText: 'बंद',
6
- prevText: 'पिछला',
7
- nextText: 'अगला',
8
- currentText: 'आज',
9
- monthNames: ['जनवरी ','फरवरी','मार्च','अप्रेल','मई','जून',
10
- 'जूलाई','अगस्त ','सितम्बर','अक्टूबर','नवम्बर','दिसम्बर'],
11
- monthNamesShort: ['जन', 'फर', 'मार्च', 'अप्रेल', 'मई', 'जून',
12
- 'जूलाई', 'अग', 'सित', 'अक्ट', 'नव', 'दि'],
13
- dayNames: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'],
14
- dayNamesShort: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
15
- dayNamesMin: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
16
- weekHeader: 'हफ्ता',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['hi']);
23
- });
1
+ /* Hindi initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Michael Dawart. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['hi'] = {
5
+ closeText: 'बंद',
6
+ prevText: 'पिछला',
7
+ nextText: 'अगला',
8
+ currentText: 'आज',
9
+ monthNames: ['जनवरी ','फरवरी','मार्च','अप्रेल','मई','जून',
10
+ 'जूलाई','अगस्त ','सितम्बर','अक्टूबर','नवम्बर','दिसम्बर'],
11
+ monthNamesShort: ['जन', 'फर', 'मार्च', 'अप्रेल', 'मई', 'जून',
12
+ 'जूलाई', 'अग', 'सित', 'अक्ट', 'नव', 'दि'],
13
+ dayNames: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'],
14
+ dayNamesShort: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
15
+ dayNamesMin: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
16
+ weekHeader: 'हफ्ता',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['hi']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hr.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Croatian i18n for the jQuery UI date picker plugin. */
2
- /* Written by Vjekoslav Nesek. */
3
- jQuery(function($){
4
- $.datepicker.regional['hr'] = {
5
- closeText: 'Zatvori',
6
- prevText: '&#x3C;',
7
- nextText: '&#x3E;',
8
- currentText: 'Danas',
9
- monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
10
- 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
11
- monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
12
- 'Srp','Kol','Ruj','Lis','Stu','Pro'],
13
- dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
14
- dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
15
- dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
16
- weekHeader: 'Tje',
17
- dateFormat: 'dd.mm.yy.',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['hr']);
23
- });
1
+ /* Croatian i18n for the jQuery UI date picker plugin. */
2
+ /* Written by Vjekoslav Nesek. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['hr'] = {
5
+ closeText: 'Zatvori',
6
+ prevText: '&#x3C;',
7
+ nextText: '&#x3E;',
8
+ currentText: 'Danas',
9
+ monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
10
+ 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
11
+ monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
12
+ 'Srp','Kol','Ruj','Lis','Stu','Pro'],
13
+ dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
14
+ dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
15
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
16
+ weekHeader: 'Tje',
17
+ dateFormat: 'dd.mm.yy.',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['hr']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hu.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Hungarian initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Istvan Karaszi (jquery@spam.raszi.hu). */
3
- jQuery(function($){
4
- $.datepicker.regional['hu'] = {
5
- closeText: 'bezár',
6
- prevText: 'vissza',
7
- nextText: 'előre',
8
- currentText: 'ma',
9
- monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
10
- 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
11
- monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
12
- 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
13
- dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
14
- dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
15
- dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
16
- weekHeader: 'Hét',
17
- dateFormat: 'yy.mm.dd.',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: true,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['hu']);
23
- });
1
+ /* Hungarian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Istvan Karaszi (jquery@spam.raszi.hu). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['hu'] = {
5
+ closeText: 'bezár',
6
+ prevText: 'vissza',
7
+ nextText: 'előre',
8
+ currentText: 'ma',
9
+ monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
10
+ 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
11
+ monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
12
+ 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
13
+ dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
14
+ dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
15
+ dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
16
+ weekHeader: 'Hét',
17
+ dateFormat: 'yy.mm.dd.',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: true,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['hu']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hy.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/
3
- jQuery(function($){
4
- $.datepicker.regional['hy'] = {
5
- closeText: 'Փակել',
6
- prevText: '&#x3C;Նախ.',
7
- nextText: 'Հաջ.&#x3E;',
8
- currentText: 'Այսօր',
9
- monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
10
- 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
11
- monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
12
- 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
13
- dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
14
- dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
15
- dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
16
- weekHeader: 'ՇԲՏ',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['hy']);
23
- });
1
+ /* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/
3
+ jQuery(function($){
4
+ $.datepicker.regional['hy'] = {
5
+ closeText: 'Փակել',
6
+ prevText: '&#x3C;Նախ.',
7
+ nextText: 'Հաջ.&#x3E;',
8
+ currentText: 'Այսօր',
9
+ monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
10
+ 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
11
+ monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
12
+ 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
13
+ dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
14
+ dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
15
+ dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
16
+ weekHeader: 'ՇԲՏ',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['hy']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-id.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Indonesian initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Deden Fathurahman (dedenf@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['id'] = {
5
- closeText: 'Tutup',
6
- prevText: '&#x3C;mundur',
7
- nextText: 'maju&#x3E;',
8
- currentText: 'hari ini',
9
- monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
10
- 'Juli','Agustus','September','Oktober','Nopember','Desember'],
11
- monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
12
- 'Jul','Agus','Sep','Okt','Nop','Des'],
13
- dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
14
- dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
15
- dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
16
- weekHeader: 'Mg',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 0,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['id']);
23
- });
1
+ /* Indonesian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Deden Fathurahman (dedenf@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['id'] = {
5
+ closeText: 'Tutup',
6
+ prevText: '&#x3C;mundur',
7
+ nextText: 'maju&#x3E;',
8
+ currentText: 'hari ini',
9
+ monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
10
+ 'Juli','Agustus','September','Oktober','Nopember','Desember'],
11
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
12
+ 'Jul','Agus','Sep','Okt','Nop','Des'],
13
+ dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
14
+ dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
15
+ dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
16
+ weekHeader: 'Mg',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['id']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-is.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Icelandic initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Haukur H. Thorsson (haukur@eskill.is). */
3
- jQuery(function($){
4
- $.datepicker.regional['is'] = {
5
- closeText: 'Loka',
6
- prevText: '&#x3C; Fyrri',
7
- nextText: 'Næsti &#x3E;',
8
- currentText: 'Í dag',
9
- monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
10
- 'Júlí','Ágúst','September','Október','Nóvember','Desember'],
11
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
12
- 'Júl','Ágú','Sep','Okt','Nóv','Des'],
13
- dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
14
- dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
15
- dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
16
- weekHeader: 'Vika',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 0,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['is']);
23
- });
1
+ /* Icelandic initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Haukur H. Thorsson (haukur@eskill.is). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['is'] = {
5
+ closeText: 'Loka',
6
+ prevText: '&#x3C; Fyrri',
7
+ nextText: 'Næsti &#x3E;',
8
+ currentText: 'Í dag',
9
+ monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
10
+ 'Júlí','Ágúst','September','Október','Nóvember','Desember'],
11
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
12
+ 'Júl','Ágú','Sep','Okt','Nóv','Des'],
13
+ dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
14
+ dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
15
+ dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
16
+ weekHeader: 'Vika',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['is']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-it.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Italian initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Antonello Pasella (antonello.pasella@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['it'] = {
5
- closeText: 'Chiudi',
6
- prevText: '&#x3C;Prec',
7
- nextText: 'Succ&#x3E;',
8
- currentText: 'Oggi',
9
- monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
10
- 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
11
- monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
12
- 'Lug','Ago','Set','Ott','Nov','Dic'],
13
- dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
14
- dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
15
- dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
16
- weekHeader: 'Sm',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['it']);
23
- });
1
+ /* Italian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Antonello Pasella (antonello.pasella@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['it'] = {
5
+ closeText: 'Chiudi',
6
+ prevText: '&#x3C;Prec',
7
+ nextText: 'Succ&#x3E;',
8
+ currentText: 'Oggi',
9
+ monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
10
+ 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
11
+ monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
12
+ 'Lug','Ago','Set','Ott','Nov','Dic'],
13
+ dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
14
+ dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
15
+ dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
16
+ weekHeader: 'Sm',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['it']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ja.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Japanese initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Kentaro SATO (kentaro@ranvis.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['ja'] = {
5
- closeText: '閉じる',
6
- prevText: '&#x3C;前',
7
- nextText: '次&#x3E;',
8
- currentText: '今日',
9
- monthNames: ['1月','2月','3月','4月','5月','6月',
10
- '7月','8月','9月','10月','11月','12月'],
11
- monthNamesShort: ['1月','2月','3月','4月','5月','6月',
12
- '7月','8月','9月','10月','11月','12月'],
13
- dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
14
- dayNamesShort: ['日','月','火','水','木','金','土'],
15
- dayNamesMin: ['日','月','火','水','木','金','土'],
16
- weekHeader: '週',
17
- dateFormat: 'yy/mm/dd',
18
- firstDay: 0,
19
- isRTL: false,
20
- showMonthAfterYear: true,
21
- yearSuffix: '年'};
22
- $.datepicker.setDefaults($.datepicker.regional['ja']);
23
- });
1
+ /* Japanese initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Kentaro SATO (kentaro@ranvis.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['ja'] = {
5
+ closeText: '閉じる',
6
+ prevText: '&#x3C;前',
7
+ nextText: '次&#x3E;',
8
+ currentText: '今日',
9
+ monthNames: ['1月','2月','3月','4月','5月','6月',
10
+ '7月','8月','9月','10月','11月','12月'],
11
+ monthNamesShort: ['1月','2月','3月','4月','5月','6月',
12
+ '7月','8月','9月','10月','11月','12月'],
13
+ dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
14
+ dayNamesShort: ['日','月','火','水','木','金','土'],
15
+ dayNamesMin: ['日','月','火','水','木','金','土'],
16
+ weekHeader: '週',
17
+ dateFormat: 'yy/mm/dd',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: true,
21
+ yearSuffix: '年'};
22
+ $.datepicker.setDefaults($.datepicker.regional['ja']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ka.js CHANGED
@@ -1,21 +1,21 @@
1
- /* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Lado Lomidze (lado.lomidze@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['ka'] = {
5
- closeText: 'დახურვა',
6
- prevText: '&#x3c; წინა',
7
- nextText: 'შემდეგი &#x3e;',
8
- currentText: 'დღეს',
9
- monthNames: ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი', 'ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'],
10
- monthNamesShort: ['იან','თებ','მარ','აპრ','მაი','ივნ', 'ივლ','აგვ','სექ','ოქტ','ნოე','დეკ'],
11
- dayNames: ['კვირა','ორშაბათი','სამშაბათი','ოთხშაბათი','ხუთშაბათი','პარასკევი','შაბათი'],
12
- dayNamesShort: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
13
- dayNamesMin: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
14
- weekHeader: 'კვირა',
15
- dateFormat: 'dd-mm-yy',
16
- firstDay: 1,
17
- isRTL: false,
18
- showMonthAfterYear: false,
19
- yearSuffix: ''};
20
- $.datepicker.setDefaults($.datepicker.regional['ka']);
21
- });
1
+ /* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Lado Lomidze (lado.lomidze@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['ka'] = {
5
+ closeText: 'დახურვა',
6
+ prevText: '&#x3c; წინა',
7
+ nextText: 'შემდეგი &#x3e;',
8
+ currentText: 'დღეს',
9
+ monthNames: ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი', 'ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'],
10
+ monthNamesShort: ['იან','თებ','მარ','აპრ','მაი','ივნ', 'ივლ','აგვ','სექ','ოქტ','ნოე','დეკ'],
11
+ dayNames: ['კვირა','ორშაბათი','სამშაბათი','ოთხშაბათი','ხუთშაბათი','პარასკევი','შაბათი'],
12
+ dayNamesShort: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
13
+ dayNamesMin: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
14
+ weekHeader: 'კვირა',
15
+ dateFormat: 'dd-mm-yy',
16
+ firstDay: 1,
17
+ isRTL: false,
18
+ showMonthAfterYear: false,
19
+ yearSuffix: ''};
20
+ $.datepicker.setDefaults($.datepicker.regional['ka']);
21
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-kk.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['kk'] = {
5
- closeText: 'Жабу',
6
- prevText: '&#x3C;Алдыңғы',
7
- nextText: 'Келесі&#x3E;',
8
- currentText: 'Бүгін',
9
- monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
10
- 'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
11
- monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
12
- 'Шіл','Там','Қыр','Қаз','Қар','Жел'],
13
- dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
14
- dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
15
- dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
16
- weekHeader: 'Не',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['kk']);
23
- });
1
+ /* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['kk'] = {
5
+ closeText: 'Жабу',
6
+ prevText: '&#x3C;Алдыңғы',
7
+ nextText: 'Келесі&#x3E;',
8
+ currentText: 'Бүгін',
9
+ monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
10
+ 'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
11
+ monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
12
+ 'Шіл','Там','Қыр','Қаз','Қар','Жел'],
13
+ dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
14
+ dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
15
+ dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
16
+ weekHeader: 'Не',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['kk']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-km.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Khmer initialisation for the jQuery calendar extension. */
2
- /* Written by Chandara Om (chandara.teacher@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['km'] = {
5
- closeText: 'ធ្វើ​រួច',
6
- prevText: 'មុន',
7
- nextText: 'បន្ទាប់',
8
- currentText: 'ថ្ងៃ​នេះ',
9
- monthNames: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
10
- 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
11
- monthNamesShort: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
12
- 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
13
- dayNames: ['អាទិត្យ', 'ចន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'],
14
- dayNamesShort: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
15
- dayNamesMin: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
16
- weekHeader: 'សប្ដាហ៍',
17
- dateFormat: 'dd-mm-yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['km']);
23
- });
1
+ /* Khmer initialisation for the jQuery calendar extension. */
2
+ /* Written by Chandara Om (chandara.teacher@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['km'] = {
5
+ closeText: 'ធ្វើ​រួច',
6
+ prevText: 'មុន',
7
+ nextText: 'បន្ទាប់',
8
+ currentText: 'ថ្ងៃ​នេះ',
9
+ monthNames: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
10
+ 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
11
+ monthNamesShort: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
12
+ 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
13
+ dayNames: ['អាទិត្យ', 'ចន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'],
14
+ dayNamesShort: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
15
+ dayNamesMin: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
16
+ weekHeader: 'សប្ដាហ៍',
17
+ dateFormat: 'dd-mm-yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['km']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ko.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Korean initialisation for the jQuery calendar extension. */
2
- /* Written by DaeKwon Kang (ncrash.dk@gmail.com), Edited by Genie. */
3
- jQuery(function($){
4
- $.datepicker.regional['ko'] = {
5
- closeText: '닫기',
6
- prevText: '이전달',
7
- nextText: '다음달',
8
- currentText: '오늘',
9
- monthNames: ['1월','2월','3월','4월','5월','6월',
10
- '7월','8월','9월','10월','11월','12월'],
11
- monthNamesShort: ['1월','2월','3월','4월','5월','6월',
12
- '7월','8월','9월','10월','11월','12월'],
13
- dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
14
- dayNamesShort: ['일','월','화','수','목','금','토'],
15
- dayNamesMin: ['일','월','화','수','목','금','토'],
16
- weekHeader: 'Wk',
17
- dateFormat: 'yy-mm-dd',
18
- firstDay: 0,
19
- isRTL: false,
20
- showMonthAfterYear: true,
21
- yearSuffix: '년'};
22
- $.datepicker.setDefaults($.datepicker.regional['ko']);
23
- });
1
+ /* Korean initialisation for the jQuery calendar extension. */
2
+ /* Written by DaeKwon Kang (ncrash.dk@gmail.com), Edited by Genie. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['ko'] = {
5
+ closeText: '닫기',
6
+ prevText: '이전달',
7
+ nextText: '다음달',
8
+ currentText: '오늘',
9
+ monthNames: ['1월','2월','3월','4월','5월','6월',
10
+ '7월','8월','9월','10월','11월','12월'],
11
+ monthNamesShort: ['1월','2월','3월','4월','5월','6월',
12
+ '7월','8월','9월','10월','11월','12월'],
13
+ dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
14
+ dayNamesShort: ['일','월','화','수','목','금','토'],
15
+ dayNamesMin: ['일','월','화','수','목','금','토'],
16
+ weekHeader: 'Wk',
17
+ dateFormat: 'yy-mm-dd',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: true,
21
+ yearSuffix: '년'};
22
+ $.datepicker.setDefaults($.datepicker.regional['ko']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ky.js CHANGED
@@ -1,24 +1,24 @@
1
- /* Kyrgyz (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Sergey Kartashov (ebishkek@yandex.ru). */
3
- jQuery(function($){
4
- $.datepicker.regional['ky'] = {
5
- closeText: 'Жабуу',
6
- prevText: '&#x3c;Мур',
7
- nextText: 'Кий&#x3e;',
8
- currentText: 'Бүгүн',
9
- monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
10
- 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
11
- monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
12
- 'Июл','Авг','Сен','Окт','Ноя','Дек'],
13
- dayNames: ['жекшемби', 'дүйшөмбү', 'шейшемби', 'шаршемби', 'бейшемби', 'жума', 'ишемби'],
14
- dayNamesShort: ['жек', 'дүй', 'шей', 'шар', 'бей', 'жум', 'ише'],
15
- dayNamesMin: ['Жк','Дш','Шш','Шр','Бш','Жм','Иш'],
16
- weekHeader: 'Жум',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''
22
- };
23
- $.datepicker.setDefaults($.datepicker.regional['ky']);
24
- });
1
+ /* Kyrgyz (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Sergey Kartashov (ebishkek@yandex.ru). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['ky'] = {
5
+ closeText: 'Жабуу',
6
+ prevText: '&#x3c;Мур',
7
+ nextText: 'Кий&#x3e;',
8
+ currentText: 'Бүгүн',
9
+ monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
10
+ 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
11
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
12
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
13
+ dayNames: ['жекшемби', 'дүйшөмбү', 'шейшемби', 'шаршемби', 'бейшемби', 'жума', 'ишемби'],
14
+ dayNamesShort: ['жек', 'дүй', 'шей', 'шар', 'бей', 'жум', 'ише'],
15
+ dayNamesMin: ['Жк','Дш','Шш','Шр','Бш','Жм','Иш'],
16
+ weekHeader: 'Жум',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''
22
+ };
23
+ $.datepicker.setDefaults($.datepicker.regional['ky']);
24
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lb.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Luxembourgish initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Michel Weimerskirch <michel@weimerskirch.net> */
3
- jQuery(function($){
4
- $.datepicker.regional['lb'] = {
5
- closeText: 'Fäerdeg',
6
- prevText: 'Zréck',
7
- nextText: 'Weider',
8
- currentText: 'Haut',
9
- monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni',
10
- 'Juli','August','September','Oktober','November','Dezember'],
11
- monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun',
12
- 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
13
- dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'],
14
- dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'],
15
- dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'],
16
- weekHeader: 'W',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['lb']);
23
- });
1
+ /* Luxembourgish initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Michel Weimerskirch <michel@weimerskirch.net> */
3
+ jQuery(function($){
4
+ $.datepicker.regional['lb'] = {
5
+ closeText: 'Fäerdeg',
6
+ prevText: 'Zréck',
7
+ nextText: 'Weider',
8
+ currentText: 'Haut',
9
+ monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni',
10
+ 'Juli','August','September','Oktober','November','Dezember'],
11
+ monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun',
12
+ 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
13
+ dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'],
14
+ dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'],
15
+ dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'],
16
+ weekHeader: 'W',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['lb']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lt.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* @author Arturas Paleicikas <arturas@avalon.lt> */
3
- jQuery(function($){
4
- $.datepicker.regional['lt'] = {
5
- closeText: 'Uždaryti',
6
- prevText: '&#x3C;Atgal',
7
- nextText: 'Pirmyn&#x3E;',
8
- currentText: 'Šiandien',
9
- monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
10
- 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
11
- monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
12
- 'Lie','Rugp','Rugs','Spa','Lap','Gru'],
13
- dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
14
- dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
15
- dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
16
- weekHeader: 'Wk',
17
- dateFormat: 'yy-mm-dd',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['lt']);
23
- });
1
+ /* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* @author Arturas Paleicikas <arturas@avalon.lt> */
3
+ jQuery(function($){
4
+ $.datepicker.regional['lt'] = {
5
+ closeText: 'Uždaryti',
6
+ prevText: '&#x3C;Atgal',
7
+ nextText: 'Pirmyn&#x3E;',
8
+ currentText: 'Šiandien',
9
+ monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
10
+ 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
11
+ monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
12
+ 'Lie','Rugp','Rugs','Spa','Lap','Gru'],
13
+ dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
14
+ dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
15
+ dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
16
+ weekHeader: 'Wk',
17
+ dateFormat: 'yy-mm-dd',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['lt']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lv.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* @author Arturas Paleicikas <arturas.paleicikas@metasite.net> */
3
- jQuery(function($){
4
- $.datepicker.regional['lv'] = {
5
- closeText: 'Aizvērt',
6
- prevText: 'Iepr',
7
- nextText: 'Nāka',
8
- currentText: 'Šodien',
9
- monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
10
- 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
11
- monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
12
- 'Jūl','Aug','Sep','Okt','Nov','Dec'],
13
- dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
14
- dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
15
- dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
16
- weekHeader: 'Nav',
17
- dateFormat: 'dd-mm-yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['lv']);
23
- });
1
+ /* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* @author Arturas Paleicikas <arturas.paleicikas@metasite.net> */
3
+ jQuery(function($){
4
+ $.datepicker.regional['lv'] = {
5
+ closeText: 'Aizvērt',
6
+ prevText: 'Iepr',
7
+ nextText: 'Nāka',
8
+ currentText: 'Šodien',
9
+ monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
10
+ 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
11
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
12
+ 'Jūl','Aug','Sep','Okt','Nov','Dec'],
13
+ dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
14
+ dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
15
+ dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
16
+ weekHeader: 'Nav',
17
+ dateFormat: 'dd-mm-yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['lv']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-mk.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Macedonian i18n for the jQuery UI date picker plugin. */
2
- /* Written by Stojce Slavkovski. */
3
- jQuery(function($){
4
- $.datepicker.regional['mk'] = {
5
- closeText: 'Затвори',
6
- prevText: '&#x3C;',
7
- nextText: '&#x3E;',
8
- currentText: 'Денес',
9
- monthNames: ['Јануари','Февруари','Март','Април','Мај','Јуни',
10
- 'Јули','Август','Септември','Октомври','Ноември','Декември'],
11
- monthNamesShort: ['Јан','Фев','Мар','Апр','Мај','Јун',
12
- 'Јул','Авг','Сеп','Окт','Ное','Дек'],
13
- dayNames: ['Недела','Понеделник','Вторник','Среда','Четврток','Петок','Сабота'],
14
- dayNamesShort: ['Нед','Пон','Вто','Сре','Чет','Пет','Саб'],
15
- dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Са'],
16
- weekHeader: 'Сед',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['mk']);
23
- });
1
+ /* Macedonian i18n for the jQuery UI date picker plugin. */
2
+ /* Written by Stojce Slavkovski. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['mk'] = {
5
+ closeText: 'Затвори',
6
+ prevText: '&#x3C;',
7
+ nextText: '&#x3E;',
8
+ currentText: 'Денес',
9
+ monthNames: ['Јануари','Февруари','Март','Април','Мај','Јуни',
10
+ 'Јули','Август','Септември','Октомври','Ноември','Декември'],
11
+ monthNamesShort: ['Јан','Фев','Мар','Апр','Мај','Јун',
12
+ 'Јул','Авг','Сеп','Окт','Ное','Дек'],
13
+ dayNames: ['Недела','Понеделник','Вторник','Среда','Четврток','Петок','Сабота'],
14
+ dayNamesShort: ['Нед','Пон','Вто','Сре','Чет','Пет','Саб'],
15
+ dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Са'],
16
+ weekHeader: 'Сед',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['mk']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ml.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Saji Nediyanchath (saji89@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['ml'] = {
5
- closeText: 'ശരി',
6
- prevText: 'മുന്നത്തെ',
7
- nextText: 'അടുത്തത് ',
8
- currentText: 'ഇന്ന്',
9
- monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്‍ച്ച്','ഏപ്രില്‍','മേയ്','ജൂണ്‍',
10
- 'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്‍','ഒക്ടോബര്‍','നവംബര്‍','ഡിസംബര്‍'],
11
- monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്‍', 'ഏപ്രി', 'മേയ്', 'ജൂണ്‍',
12
- 'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
13
- dayNames: ['ഞായര്‍', 'തിങ്കള്‍', 'ചൊവ്വ', 'ബുധന്‍', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
14
- dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
15
- dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
16
- weekHeader: 'ആ',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['ml']);
23
- });
1
+ /* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Saji Nediyanchath (saji89@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['ml'] = {
5
+ closeText: 'ശരി',
6
+ prevText: 'മുന്നത്തെ',
7
+ nextText: 'അടുത്തത് ',
8
+ currentText: 'ഇന്ന്',
9
+ monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്‍ച്ച്','ഏപ്രില്‍','മേയ്','ജൂണ്‍',
10
+ 'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്‍','ഒക്ടോബര്‍','നവംബര്‍','ഡിസംബര്‍'],
11
+ monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്‍', 'ഏപ്രി', 'മേയ്', 'ജൂണ്‍',
12
+ 'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
13
+ dayNames: ['ഞായര്‍', 'തിങ്കള്‍', 'ചൊവ്വ', 'ബുധന്‍', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
14
+ dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
15
+ dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
16
+ weekHeader: 'ആ',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['ml']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ms.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Malaysian initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */
3
- jQuery(function($){
4
- $.datepicker.regional['ms'] = {
5
- closeText: 'Tutup',
6
- prevText: '&#x3C;Sebelum',
7
- nextText: 'Selepas&#x3E;',
8
- currentText: 'hari ini',
9
- monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
10
- 'Julai','Ogos','September','Oktober','November','Disember'],
11
- monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun',
12
- 'Jul','Ogo','Sep','Okt','Nov','Dis'],
13
- dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'],
14
- dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'],
15
- dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'],
16
- weekHeader: 'Mg',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 0,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['ms']);
23
- });
1
+ /* Malaysian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['ms'] = {
5
+ closeText: 'Tutup',
6
+ prevText: '&#x3C;Sebelum',
7
+ nextText: 'Selepas&#x3E;',
8
+ currentText: 'hari ini',
9
+ monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
10
+ 'Julai','Ogos','September','Oktober','November','Disember'],
11
+ monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun',
12
+ 'Jul','Ogo','Sep','Okt','Nov','Dis'],
13
+ dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'],
14
+ dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'],
15
+ dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'],
16
+ weekHeader: 'Mg',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['ms']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nb.js CHANGED
@@ -1,22 +1,22 @@
1
- /* Norwegian Bokmål initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Bjørn Johansen (post@bjornjohansen.no). */
3
- jQuery(function($){
4
- $.datepicker.regional['nb'] = {
5
- closeText: 'Lukk',
6
- prevText: '&#xAB;Forrige',
7
- nextText: 'Neste&#xBB;',
8
- currentText: 'I dag',
9
- monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
10
- monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
11
- dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
12
- dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
13
- dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
14
- weekHeader: 'Uke',
15
- dateFormat: 'dd.mm.yy',
16
- firstDay: 1,
17
- isRTL: false,
18
- showMonthAfterYear: false,
19
- yearSuffix: ''
20
- };
21
- $.datepicker.setDefaults($.datepicker.regional['nb']);
22
- });
1
+ /* Norwegian Bokmål initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Bjørn Johansen (post@bjornjohansen.no). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['nb'] = {
5
+ closeText: 'Lukk',
6
+ prevText: '&#xAB;Forrige',
7
+ nextText: 'Neste&#xBB;',
8
+ currentText: 'I dag',
9
+ monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
10
+ monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
11
+ dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
12
+ dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
13
+ dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
14
+ weekHeader: 'Uke',
15
+ dateFormat: 'dd.mm.yy',
16
+ firstDay: 1,
17
+ isRTL: false,
18
+ showMonthAfterYear: false,
19
+ yearSuffix: ''
20
+ };
21
+ $.datepicker.setDefaults($.datepicker.regional['nb']);
22
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl-BE.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Dutch (Belgium) initialisation for the jQuery UI date picker plugin. */
2
- /* David De Sloovere @DavidDeSloovere */
3
- jQuery(function($){
4
- $.datepicker.regional['nl-BE'] = {
5
- closeText: 'Sluiten',
6
- prevText: '←',
7
- nextText: '→',
8
- currentText: 'Vandaag',
9
- monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
10
- 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
11
- monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
12
- 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
13
- dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
14
- dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
15
- dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
16
- weekHeader: 'Wk',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['nl-BE']);
23
- });
1
+ /* Dutch (Belgium) initialisation for the jQuery UI date picker plugin. */
2
+ /* David De Sloovere @DavidDeSloovere */
3
+ jQuery(function($){
4
+ $.datepicker.regional['nl-BE'] = {
5
+ closeText: 'Sluiten',
6
+ prevText: '←',
7
+ nextText: '→',
8
+ currentText: 'Vandaag',
9
+ monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
10
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
11
+ monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
12
+ 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
13
+ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
14
+ dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
15
+ dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
16
+ weekHeader: 'Wk',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['nl-BE']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Mathias Bynens <http://mathiasbynens.be/> */
3
- jQuery(function($){
4
- $.datepicker.regional.nl = {
5
- closeText: 'Sluiten',
6
- prevText: '←',
7
- nextText: '→',
8
- currentText: 'Vandaag',
9
- monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
10
- 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
11
- monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
12
- 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
13
- dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
14
- dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
15
- dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
16
- weekHeader: 'Wk',
17
- dateFormat: 'dd-mm-yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional.nl);
23
- });
1
+ /* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Mathias Bynens <http://mathiasbynens.be/> */
3
+ jQuery(function($){
4
+ $.datepicker.regional.nl = {
5
+ closeText: 'Sluiten',
6
+ prevText: '←',
7
+ nextText: '→',
8
+ currentText: 'Vandaag',
9
+ monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
10
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
11
+ monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
12
+ 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
13
+ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
14
+ dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
15
+ dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
16
+ weekHeader: 'Wk',
17
+ dateFormat: 'dd-mm-yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional.nl);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nn.js CHANGED
@@ -1,22 +1,22 @@
1
- /* Norwegian Nynorsk initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Bjørn Johansen (post@bjornjohansen.no). */
3
- jQuery(function($){
4
- $.datepicker.regional['nn'] = {
5
- closeText: 'Lukk',
6
- prevText: '&#xAB;Førre',
7
- nextText: 'Neste&#xBB;',
8
- currentText: 'I dag',
9
- monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
10
- monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
11
- dayNamesShort: ['sun','mån','tys','ons','tor','fre','lau'],
12
- dayNames: ['sundag','måndag','tysdag','onsdag','torsdag','fredag','laurdag'],
13
- dayNamesMin: ['su','må','ty','on','to','fr','la'],
14
- weekHeader: 'Veke',
15
- dateFormat: 'dd.mm.yy',
16
- firstDay: 1,
17
- isRTL: false,
18
- showMonthAfterYear: false,
19
- yearSuffix: ''
20
- };
21
- $.datepicker.setDefaults($.datepicker.regional['nn']);
22
- });
1
+ /* Norwegian Nynorsk initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Bjørn Johansen (post@bjornjohansen.no). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['nn'] = {
5
+ closeText: 'Lukk',
6
+ prevText: '&#xAB;Førre',
7
+ nextText: 'Neste&#xBB;',
8
+ currentText: 'I dag',
9
+ monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
10
+ monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
11
+ dayNamesShort: ['sun','mån','tys','ons','tor','fre','lau'],
12
+ dayNames: ['sundag','måndag','tysdag','onsdag','torsdag','fredag','laurdag'],
13
+ dayNamesMin: ['su','må','ty','on','to','fr','la'],
14
+ weekHeader: 'Veke',
15
+ dateFormat: 'dd.mm.yy',
16
+ firstDay: 1,
17
+ isRTL: false,
18
+ showMonthAfterYear: false,
19
+ yearSuffix: ''
20
+ };
21
+ $.datepicker.setDefaults($.datepicker.regional['nn']);
22
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-no.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Norwegian initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
3
-
4
- jQuery(function($){
5
- $.datepicker.regional['no'] = {
6
- closeText: 'Lukk',
7
- prevText: '&#xAB;Forrige',
8
- nextText: 'Neste&#xBB;',
9
- currentText: 'I dag',
10
- monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
11
- monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
12
- dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
13
- dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
14
- dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
15
- weekHeader: 'Uke',
16
- dateFormat: 'dd.mm.yy',
17
- firstDay: 1,
18
- isRTL: false,
19
- showMonthAfterYear: false,
20
- yearSuffix: ''
21
- };
22
- $.datepicker.setDefaults($.datepicker.regional['no']);
23
- });
1
+ /* Norwegian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
3
+
4
+ jQuery(function($){
5
+ $.datepicker.regional['no'] = {
6
+ closeText: 'Lukk',
7
+ prevText: '&#xAB;Forrige',
8
+ nextText: 'Neste&#xBB;',
9
+ currentText: 'I dag',
10
+ monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
11
+ monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
12
+ dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
13
+ dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
14
+ dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
15
+ weekHeader: 'Uke',
16
+ dateFormat: 'dd.mm.yy',
17
+ firstDay: 1,
18
+ isRTL: false,
19
+ showMonthAfterYear: false,
20
+ yearSuffix: ''
21
+ };
22
+ $.datepicker.setDefaults($.datepicker.regional['no']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pl.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Polish initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['pl'] = {
5
- closeText: 'Zamknij',
6
- prevText: '&#x3C;Poprzedni',
7
- nextText: 'Następny&#x3E;',
8
- currentText: 'Dziś',
9
- monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
10
- 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
11
- monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
12
- 'Lip','Sie','Wrz','Pa','Lis','Gru'],
13
- dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
14
- dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
15
- dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
16
- weekHeader: 'Tydz',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['pl']);
23
- });
1
+ /* Polish initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['pl'] = {
5
+ closeText: 'Zamknij',
6
+ prevText: '&#x3C;Poprzedni',
7
+ nextText: 'Następny&#x3E;',
8
+ currentText: 'Dziś',
9
+ monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
10
+ 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
11
+ monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
12
+ 'Lip','Sie','Wrz','Pa','Lis','Gru'],
13
+ dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
14
+ dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
15
+ dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
16
+ weekHeader: 'Tydz',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['pl']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt-BR.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Brazilian initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['pt-BR'] = {
5
- closeText: 'Fechar',
6
- prevText: '&#x3C;Anterior',
7
- nextText: 'Próximo&#x3E;',
8
- currentText: 'Hoje',
9
- monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
10
- 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
11
- monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
12
- 'Jul','Ago','Set','Out','Nov','Dez'],
13
- dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
14
- dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
15
- dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
16
- weekHeader: 'Sm',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 0,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['pt-BR']);
23
- });
1
+ /* Brazilian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['pt-BR'] = {
5
+ closeText: 'Fechar',
6
+ prevText: '&#x3C;Anterior',
7
+ nextText: 'Próximo&#x3E;',
8
+ currentText: 'Hoje',
9
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
10
+ 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
11
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
12
+ 'Jul','Ago','Set','Out','Nov','Dez'],
13
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
14
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
15
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
16
+ weekHeader: 'Sm',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['pt-BR']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt.js CHANGED
@@ -1,22 +1,22 @@
1
- /* Portuguese initialisation for the jQuery UI date picker plugin. */
2
- jQuery(function($){
3
- $.datepicker.regional['pt'] = {
4
- closeText: 'Fechar',
5
- prevText: '&#x3C;Anterior',
6
- nextText: 'Seguinte',
7
- currentText: 'Hoje',
8
- monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
9
- 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
10
- monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
11
- 'Jul','Ago','Set','Out','Nov','Dez'],
12
- dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
13
- dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
14
- dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
15
- weekHeader: 'Sem',
16
- dateFormat: 'dd/mm/yy',
17
- firstDay: 0,
18
- isRTL: false,
19
- showMonthAfterYear: false,
20
- yearSuffix: ''};
21
- $.datepicker.setDefaults($.datepicker.regional['pt']);
22
- });
1
+ /* Portuguese initialisation for the jQuery UI date picker plugin. */
2
+ jQuery(function($){
3
+ $.datepicker.regional['pt'] = {
4
+ closeText: 'Fechar',
5
+ prevText: '&#x3C;Anterior',
6
+ nextText: 'Seguinte',
7
+ currentText: 'Hoje',
8
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
9
+ 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
10
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
11
+ 'Jul','Ago','Set','Out','Nov','Dez'],
12
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
13
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
14
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
15
+ weekHeader: 'Sem',
16
+ dateFormat: 'dd/mm/yy',
17
+ firstDay: 0,
18
+ isRTL: false,
19
+ showMonthAfterYear: false,
20
+ yearSuffix: ''};
21
+ $.datepicker.setDefaults($.datepicker.regional['pt']);
22
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-rm.js CHANGED
@@ -1,21 +1,21 @@
1
- /* Romansh initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Yvonne Gienal (yvonne.gienal@educa.ch). */
3
- jQuery(function($){
4
- $.datepicker.regional['rm'] = {
5
- closeText: 'Serrar',
6
- prevText: '&#x3C;Suandant',
7
- nextText: 'Precedent&#x3E;',
8
- currentText: 'Actual',
9
- monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
10
- monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
11
- dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
12
- dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
13
- dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
14
- weekHeader: 'emna',
15
- dateFormat: 'dd/mm/yy',
16
- firstDay: 1,
17
- isRTL: false,
18
- showMonthAfterYear: false,
19
- yearSuffix: ''};
20
- $.datepicker.setDefaults($.datepicker.regional['rm']);
21
- });
1
+ /* Romansh initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Yvonne Gienal (yvonne.gienal@educa.ch). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['rm'] = {
5
+ closeText: 'Serrar',
6
+ prevText: '&#x3C;Suandant',
7
+ nextText: 'Precedent&#x3E;',
8
+ currentText: 'Actual',
9
+ monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
10
+ monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
11
+ dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
12
+ dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
13
+ dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
14
+ weekHeader: 'emna',
15
+ dateFormat: 'dd/mm/yy',
16
+ firstDay: 1,
17
+ isRTL: false,
18
+ showMonthAfterYear: false,
19
+ yearSuffix: ''};
20
+ $.datepicker.setDefaults($.datepicker.regional['rm']);
21
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ro.js CHANGED
@@ -1,26 +1,26 @@
1
- /* Romanian initialisation for the jQuery UI date picker plugin.
2
- *
3
- * Written by Edmond L. (ll_edmond@walla.com)
4
- * and Ionut G. Stan (ionut.g.stan@gmail.com)
5
- */
6
- jQuery(function($){
7
- $.datepicker.regional['ro'] = {
8
- closeText: 'Închide',
9
- prevText: '&#xAB; Luna precedentă',
10
- nextText: 'Luna următoare &#xBB;',
11
- currentText: 'Azi',
12
- monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
13
- 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
14
- monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
15
- 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
16
- dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
17
- dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
18
- dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
19
- weekHeader: 'Săpt',
20
- dateFormat: 'dd.mm.yy',
21
- firstDay: 1,
22
- isRTL: false,
23
- showMonthAfterYear: false,
24
- yearSuffix: ''};
25
- $.datepicker.setDefaults($.datepicker.regional['ro']);
26
- });
1
+ /* Romanian initialisation for the jQuery UI date picker plugin.
2
+ *
3
+ * Written by Edmond L. (ll_edmond@walla.com)
4
+ * and Ionut G. Stan (ionut.g.stan@gmail.com)
5
+ */
6
+ jQuery(function($){
7
+ $.datepicker.regional['ro'] = {
8
+ closeText: 'Închide',
9
+ prevText: '&#xAB; Luna precedentă',
10
+ nextText: 'Luna următoare &#xBB;',
11
+ currentText: 'Azi',
12
+ monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
13
+ 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
14
+ monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
15
+ 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
16
+ dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
17
+ dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
18
+ dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
19
+ weekHeader: 'Săpt',
20
+ dateFormat: 'dd.mm.yy',
21
+ firstDay: 1,
22
+ isRTL: false,
23
+ showMonthAfterYear: false,
24
+ yearSuffix: ''};
25
+ $.datepicker.setDefaults($.datepicker.regional['ro']);
26
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ru.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Andrew Stromnov (stromnov@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['ru'] = {
5
- closeText: 'Закрыть',
6
- prevText: '&#x3C;Пред',
7
- nextText: 'След&#x3E;',
8
- currentText: 'Сегодня',
9
- monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
10
- 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
11
- monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
12
- 'Июл','Авг','Сен','Окт','Ноя','Дек'],
13
- dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
14
- dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
15
- dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
16
- weekHeader: 'Нед',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['ru']);
23
- });
1
+ /* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Andrew Stromnov (stromnov@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['ru'] = {
5
+ closeText: 'Закрыть',
6
+ prevText: '&#x3C;Пред',
7
+ nextText: 'След&#x3E;',
8
+ currentText: 'Сегодня',
9
+ monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
10
+ 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
11
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
12
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
13
+ dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
14
+ dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
15
+ dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
16
+ weekHeader: 'Нед',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['ru']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sk.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Slovak initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Vojtech Rinik (vojto@hmm.sk). */
3
- jQuery(function($){
4
- $.datepicker.regional['sk'] = {
5
- closeText: 'Zavrieť',
6
- prevText: '&#x3C;Predchádzajúci',
7
- nextText: 'Nasledujúci&#x3E;',
8
- currentText: 'Dnes',
9
- monthNames: ['január','február','marec','apríl','máj','jún',
10
- 'júl','august','september','október','november','december'],
11
- monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
12
- 'Júl','Aug','Sep','Okt','Nov','Dec'],
13
- dayNames: ['nedeľa','pondelok','utorok','streda','štvrtok','piatok','sobota'],
14
- dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
15
- dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
16
- weekHeader: 'Ty',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['sk']);
23
- });
1
+ /* Slovak initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Vojtech Rinik (vojto@hmm.sk). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['sk'] = {
5
+ closeText: 'Zavrieť',
6
+ prevText: '&#x3C;Predchádzajúci',
7
+ nextText: 'Nasledujúci&#x3E;',
8
+ currentText: 'Dnes',
9
+ monthNames: ['január','február','marec','apríl','máj','jún',
10
+ 'júl','august','september','október','november','december'],
11
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
12
+ 'Júl','Aug','Sep','Okt','Nov','Dec'],
13
+ dayNames: ['nedeľa','pondelok','utorok','streda','štvrtok','piatok','sobota'],
14
+ dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
15
+ dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
16
+ weekHeader: 'Ty',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['sk']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sl.js CHANGED
@@ -1,24 +1,24 @@
1
- /* Slovenian initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Jaka Jancar (jaka@kubje.org). */
3
- /* c = č, s = š z = ž C = Č S = Š Z = Ž */
4
- jQuery(function($){
5
- $.datepicker.regional['sl'] = {
6
- closeText: 'Zapri',
7
- prevText: '&#x3C;Prejšnji',
8
- nextText: 'Naslednji&#x3E;',
9
- currentText: 'Trenutni',
10
- monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
11
- 'Julij','Avgust','September','Oktober','November','December'],
12
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
13
- 'Jul','Avg','Sep','Okt','Nov','Dec'],
14
- dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
15
- dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
16
- dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
17
- weekHeader: 'Teden',
18
- dateFormat: 'dd.mm.yy',
19
- firstDay: 1,
20
- isRTL: false,
21
- showMonthAfterYear: false,
22
- yearSuffix: ''};
23
- $.datepicker.setDefaults($.datepicker.regional['sl']);
24
- });
1
+ /* Slovenian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Jaka Jancar (jaka@kubje.org). */
3
+ /* c = č, s = š z = ž C = Č S = Š Z = Ž */
4
+ jQuery(function($){
5
+ $.datepicker.regional['sl'] = {
6
+ closeText: 'Zapri',
7
+ prevText: '&#x3C;Prejšnji',
8
+ nextText: 'Naslednji&#x3E;',
9
+ currentText: 'Trenutni',
10
+ monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
11
+ 'Julij','Avgust','September','Oktober','November','December'],
12
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
13
+ 'Jul','Avg','Sep','Okt','Nov','Dec'],
14
+ dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
15
+ dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
16
+ dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
17
+ weekHeader: 'Teden',
18
+ dateFormat: 'dd.mm.yy',
19
+ firstDay: 1,
20
+ isRTL: false,
21
+ showMonthAfterYear: false,
22
+ yearSuffix: ''};
23
+ $.datepicker.setDefaults($.datepicker.regional['sl']);
24
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sq.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Albanian initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Flakron Bytyqi (flakron@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['sq'] = {
5
- closeText: 'mbylle',
6
- prevText: '&#x3C;mbrapa',
7
- nextText: 'Përpara&#x3E;',
8
- currentText: 'sot',
9
- monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
10
- 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
11
- monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
12
- 'Kor','Gus','Sht','Tet','Nën','Dhj'],
13
- dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
14
- dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
15
- dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
16
- weekHeader: 'Ja',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['sq']);
23
- });
1
+ /* Albanian initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Flakron Bytyqi (flakron@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['sq'] = {
5
+ closeText: 'mbylle',
6
+ prevText: '&#x3C;mbrapa',
7
+ nextText: 'Përpara&#x3E;',
8
+ currentText: 'sot',
9
+ monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
10
+ 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
11
+ monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
12
+ 'Kor','Gus','Sht','Tet','Nën','Dhj'],
13
+ dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
14
+ dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
15
+ dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
16
+ weekHeader: 'Ja',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['sq']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr-SR.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Serbian i18n for the jQuery UI date picker plugin. */
2
- /* Written by Dejan Dimić. */
3
- jQuery(function($){
4
- $.datepicker.regional['sr-SR'] = {
5
- closeText: 'Zatvori',
6
- prevText: '&#x3C;',
7
- nextText: '&#x3E;',
8
- currentText: 'Danas',
9
- monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
10
- 'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
11
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
12
- 'Jul','Avg','Sep','Okt','Nov','Dec'],
13
- dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
14
- dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
15
- dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
16
- weekHeader: 'Sed',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['sr-SR']);
23
- });
1
+ /* Serbian i18n for the jQuery UI date picker plugin. */
2
+ /* Written by Dejan Dimić. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['sr-SR'] = {
5
+ closeText: 'Zatvori',
6
+ prevText: '&#x3C;',
7
+ nextText: '&#x3E;',
8
+ currentText: 'Danas',
9
+ monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
10
+ 'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
11
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
12
+ 'Jul','Avg','Sep','Okt','Nov','Dec'],
13
+ dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
14
+ dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
15
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
16
+ weekHeader: 'Sed',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['sr-SR']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Serbian i18n for the jQuery UI date picker plugin. */
2
- /* Written by Dejan Dimić. */
3
- jQuery(function($){
4
- $.datepicker.regional['sr'] = {
5
- closeText: 'Затвори',
6
- prevText: '&#x3C;',
7
- nextText: '&#x3E;',
8
- currentText: 'Данас',
9
- monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
10
- 'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
11
- monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
12
- 'Јул','Авг','Сеп','Окт','Нов','Дец'],
13
- dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
14
- dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
15
- dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
16
- weekHeader: 'Сед',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['sr']);
23
- });
1
+ /* Serbian i18n for the jQuery UI date picker plugin. */
2
+ /* Written by Dejan Dimić. */
3
+ jQuery(function($){
4
+ $.datepicker.regional['sr'] = {
5
+ closeText: 'Затвори',
6
+ prevText: '&#x3C;',
7
+ nextText: '&#x3E;',
8
+ currentText: 'Данас',
9
+ monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
10
+ 'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
11
+ monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
12
+ 'Јул','Авг','Сеп','Окт','Нов','Дец'],
13
+ dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
14
+ dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
15
+ dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
16
+ weekHeader: 'Сед',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['sr']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sv.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Swedish initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Anders Ekdahl ( anders@nomadiz.se). */
3
- jQuery(function($){
4
- $.datepicker.regional['sv'] = {
5
- closeText: 'Stäng',
6
- prevText: '&#xAB;Förra',
7
- nextText: 'Nästa&#xBB;',
8
- currentText: 'Idag',
9
- monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
10
- 'Juli','Augusti','September','Oktober','November','December'],
11
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
12
- 'Jul','Aug','Sep','Okt','Nov','Dec'],
13
- dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
14
- dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
15
- dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
16
- weekHeader: 'Ve',
17
- dateFormat: 'yy-mm-dd',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['sv']);
23
- });
1
+ /* Swedish initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Anders Ekdahl ( anders@nomadiz.se). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['sv'] = {
5
+ closeText: 'Stäng',
6
+ prevText: '&#xAB;Förra',
7
+ nextText: 'Nästa&#xBB;',
8
+ currentText: 'Idag',
9
+ monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
10
+ 'Juli','Augusti','September','Oktober','November','December'],
11
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
12
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
13
+ dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
14
+ dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
15
+ dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
16
+ weekHeader: 'Ve',
17
+ dateFormat: 'yy-mm-dd',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['sv']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ta.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by S A Sureshkumar (saskumar@live.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['ta'] = {
5
- closeText: 'மூடு',
6
- prevText: 'முன்னையது',
7
- nextText: 'அடுத்தது',
8
- currentText: 'இன்று',
9
- monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
10
- 'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'],
11
- monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
12
- 'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
13
- dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
14
- dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
15
- dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
16
- weekHeader: 'Не',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['ta']);
23
- });
1
+ /* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by S A Sureshkumar (saskumar@live.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['ta'] = {
5
+ closeText: 'மூடு',
6
+ prevText: 'முன்னையது',
7
+ nextText: 'அடுத்தது',
8
+ currentText: 'இன்று',
9
+ monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
10
+ 'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'],
11
+ monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
12
+ 'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
13
+ dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
14
+ dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
15
+ dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
16
+ weekHeader: 'Не',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['ta']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-th.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Thai initialisation for the jQuery UI date picker plugin. */
2
- /* Written by pipo (pipo@sixhead.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['th'] = {
5
- closeText: 'ปิด',
6
- prevText: '&#xAB;&#xA0;ย้อน',
7
- nextText: 'ถัดไป&#xA0;&#xBB;',
8
- currentText: 'วันนี้',
9
- monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
10
- 'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
11
- monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
12
- 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
13
- dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
14
- dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
15
- dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
16
- weekHeader: 'Wk',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 0,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['th']);
23
- });
1
+ /* Thai initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by pipo (pipo@sixhead.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['th'] = {
5
+ closeText: 'ปิด',
6
+ prevText: '&#xAB;&#xA0;ย้อน',
7
+ nextText: 'ถัดไป&#xA0;&#xBB;',
8
+ currentText: 'วันนี้',
9
+ monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
10
+ 'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
11
+ monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
12
+ 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
13
+ dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
14
+ dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
15
+ dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
16
+ weekHeader: 'Wk',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['th']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tj.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Abdurahmon Saidov (saidovab@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['tj'] = {
5
- closeText: 'Идома',
6
- prevText: '&#x3c;Қафо',
7
- nextText: 'Пеш&#x3e;',
8
- currentText: 'Имрӯз',
9
- monthNames: ['Январ','Феврал','Март','Апрел','Май','Июн',
10
- 'Июл','Август','Сентябр','Октябр','Ноябр','Декабр'],
11
- monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
12
- 'Июл','Авг','Сен','Окт','Ноя','Дек'],
13
- dayNames: ['якшанбе','душанбе','сешанбе','чоршанбе','панҷшанбе','ҷумъа','шанбе'],
14
- dayNamesShort: ['якш','душ','сеш','чор','пан','ҷум','шан'],
15
- dayNamesMin: ['Як','Дш','Сш','Чш','Пш','Ҷм','Шн'],
16
- weekHeader: 'Хф',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['tj']);
23
- });
1
+ /* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Abdurahmon Saidov (saidovab@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['tj'] = {
5
+ closeText: 'Идома',
6
+ prevText: '&#x3c;Қафо',
7
+ nextText: 'Пеш&#x3e;',
8
+ currentText: 'Имрӯз',
9
+ monthNames: ['Январ','Феврал','Март','Апрел','Май','Июн',
10
+ 'Июл','Август','Сентябр','Октябр','Ноябр','Декабр'],
11
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
12
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
13
+ dayNames: ['якшанбе','душанбе','сешанбе','чоршанбе','панҷшанбе','ҷумъа','шанбе'],
14
+ dayNamesShort: ['якш','душ','сеш','чор','пан','ҷум','шан'],
15
+ dayNamesMin: ['Як','Дш','Сш','Чш','Пш','Ҷм','Шн'],
16
+ weekHeader: 'Хф',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['tj']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tr.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Turkish initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Izzet Emre Erkan (kara@karalamalar.net). */
3
- jQuery(function($){
4
- $.datepicker.regional['tr'] = {
5
- closeText: 'kapat',
6
- prevText: '&#x3C;geri',
7
- nextText: 'ileri&#x3e',
8
- currentText: 'bugün',
9
- monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
10
- 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
11
- monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
12
- 'Tem','Ağu','Eyl','Eki','Kas','Ara'],
13
- dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
14
- dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
15
- dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
16
- weekHeader: 'Hf',
17
- dateFormat: 'dd.mm.yy',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['tr']);
23
- });
1
+ /* Turkish initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Izzet Emre Erkan (kara@karalamalar.net). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['tr'] = {
5
+ closeText: 'kapat',
6
+ prevText: '&#x3C;geri',
7
+ nextText: 'ileri&#x3e',
8
+ currentText: 'bugün',
9
+ monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
10
+ 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
11
+ monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
12
+ 'Tem','Ağu','Eyl','Eki','Kas','Ara'],
13
+ dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
14
+ dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
15
+ dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
16
+ weekHeader: 'Hf',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['tr']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-uk.js CHANGED
@@ -1,24 +1,24 @@
1
- /* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
3
- /* Corrected by Igor Milla (igor.fsp.milla@gmail.com). */
4
- jQuery(function($){
5
- $.datepicker.regional['uk'] = {
6
- closeText: 'Закрити',
7
- prevText: '&#x3C;',
8
- nextText: '&#x3E;',
9
- currentText: 'Сьогодні',
10
- monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
11
- 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
12
- monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
13
- 'Лип','Сер','Вер','Жов','Лис','Гру'],
14
- dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
15
- dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
16
- dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
17
- weekHeader: 'Тиж',
18
- dateFormat: 'dd/mm/yy',
19
- firstDay: 1,
20
- isRTL: false,
21
- showMonthAfterYear: false,
22
- yearSuffix: ''};
23
- $.datepicker.setDefaults($.datepicker.regional['uk']);
24
- });
1
+ /* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
3
+ /* Corrected by Igor Milla (igor.fsp.milla@gmail.com). */
4
+ jQuery(function($){
5
+ $.datepicker.regional['uk'] = {
6
+ closeText: 'Закрити',
7
+ prevText: '&#x3C;',
8
+ nextText: '&#x3E;',
9
+ currentText: 'Сьогодні',
10
+ monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
11
+ 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
12
+ monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
13
+ 'Лип','Сер','Вер','Жов','Лис','Гру'],
14
+ dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
15
+ dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
16
+ dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
17
+ weekHeader: 'Тиж',
18
+ dateFormat: 'dd/mm/yy',
19
+ firstDay: 1,
20
+ isRTL: false,
21
+ showMonthAfterYear: false,
22
+ yearSuffix: ''};
23
+ $.datepicker.setDefaults($.datepicker.regional['uk']);
24
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-vi.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Vietnamese initialisation for the jQuery UI date picker plugin. */
2
- /* Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */
3
- jQuery(function($){
4
- $.datepicker.regional['vi'] = {
5
- closeText: 'Đóng',
6
- prevText: '&#x3C;Trước',
7
- nextText: 'Tiếp&#x3E;',
8
- currentText: 'Hôm nay',
9
- monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu',
10
- 'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'],
11
- monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6',
12
- 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
13
- dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
14
- dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
15
- dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
16
- weekHeader: 'Tu',
17
- dateFormat: 'dd/mm/yy',
18
- firstDay: 0,
19
- isRTL: false,
20
- showMonthAfterYear: false,
21
- yearSuffix: ''};
22
- $.datepicker.setDefaults($.datepicker.regional['vi']);
23
- });
1
+ /* Vietnamese initialisation for the jQuery UI date picker plugin. */
2
+ /* Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['vi'] = {
5
+ closeText: 'Đóng',
6
+ prevText: '&#x3C;Trước',
7
+ nextText: 'Tiếp&#x3E;',
8
+ currentText: 'Hôm nay',
9
+ monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu',
10
+ 'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'],
11
+ monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6',
12
+ 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
13
+ dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
14
+ dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
15
+ dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
16
+ weekHeader: 'Tu',
17
+ dateFormat: 'dd/mm/yy',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['vi']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-CN.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Chinese initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Cloudream (cloudream@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['zh-CN'] = {
5
- closeText: '关闭',
6
- prevText: '&#x3C;上月',
7
- nextText: '下月&#x3E;',
8
- currentText: '今天',
9
- monthNames: ['一月','二月','三月','四月','五月','六月',
10
- '七月','八月','九月','十月','十一月','十二月'],
11
- monthNamesShort: ['一月','二月','三月','四月','五月','六月',
12
- '七月','八月','九月','十月','十一月','十二月'],
13
- dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
14
- dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
15
- dayNamesMin: ['日','一','二','三','四','五','六'],
16
- weekHeader: '周',
17
- dateFormat: 'yy-mm-dd',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: true,
21
- yearSuffix: '年'};
22
- $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
23
- });
1
+ /* Chinese initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Cloudream (cloudream@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['zh-CN'] = {
5
+ closeText: '关闭',
6
+ prevText: '&#x3C;上月',
7
+ nextText: '下月&#x3E;',
8
+ currentText: '今天',
9
+ monthNames: ['一月','二月','三月','四月','五月','六月',
10
+ '七月','八月','九月','十月','十一月','十二月'],
11
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
12
+ '七月','八月','九月','十月','十一月','十二月'],
13
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
14
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
15
+ dayNamesMin: ['日','一','二','三','四','五','六'],
16
+ weekHeader: '周',
17
+ dateFormat: 'yy-mm-dd',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: true,
21
+ yearSuffix: '年'};
22
+ $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-HK.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Chinese initialisation for the jQuery UI date picker plugin. */
2
- /* Written by SCCY (samuelcychan@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['zh-HK'] = {
5
- closeText: '關閉',
6
- prevText: '&#x3C;上月',
7
- nextText: '下月&#x3E;',
8
- currentText: '今天',
9
- monthNames: ['一月','二月','三月','四月','五月','六月',
10
- '七月','八月','九月','十月','十一月','十二月'],
11
- monthNamesShort: ['一月','二月','三月','四月','五月','六月',
12
- '七月','八月','九月','十月','十一月','十二月'],
13
- dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
14
- dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
15
- dayNamesMin: ['日','一','二','三','四','五','六'],
16
- weekHeader: '周',
17
- dateFormat: 'dd-mm-yy',
18
- firstDay: 0,
19
- isRTL: false,
20
- showMonthAfterYear: true,
21
- yearSuffix: '年'};
22
- $.datepicker.setDefaults($.datepicker.regional['zh-HK']);
23
- });
1
+ /* Chinese initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by SCCY (samuelcychan@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['zh-HK'] = {
5
+ closeText: '關閉',
6
+ prevText: '&#x3C;上月',
7
+ nextText: '下月&#x3E;',
8
+ currentText: '今天',
9
+ monthNames: ['一月','二月','三月','四月','五月','六月',
10
+ '七月','八月','九月','十月','十一月','十二月'],
11
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
12
+ '七月','八月','九月','十月','十一月','十二月'],
13
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
14
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
15
+ dayNamesMin: ['日','一','二','三','四','五','六'],
16
+ weekHeader: '周',
17
+ dateFormat: 'dd-mm-yy',
18
+ firstDay: 0,
19
+ isRTL: false,
20
+ showMonthAfterYear: true,
21
+ yearSuffix: '年'};
22
+ $.datepicker.setDefaults($.datepicker.regional['zh-HK']);
23
+ });
includes/admin/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-TW.js CHANGED
@@ -1,23 +1,23 @@
1
- /* Chinese initialisation for the jQuery UI date picker plugin. */
2
- /* Written by Ressol (ressol@gmail.com). */
3
- jQuery(function($){
4
- $.datepicker.regional['zh-TW'] = {
5
- closeText: '關閉',
6
- prevText: '&#x3C;上月',
7
- nextText: '下月&#x3E;',
8
- currentText: '今天',
9
- monthNames: ['一月','二月','三月','四月','五月','六月',
10
- '七月','八月','九月','十月','十一月','十二月'],
11
- monthNamesShort: ['一月','二月','三月','四月','五月','六月',
12
- '七月','八月','九月','十月','十一月','十二月'],
13
- dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
14
- dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
15
- dayNamesMin: ['日','一','二','三','四','五','六'],
16
- weekHeader: '周',
17
- dateFormat: 'yy/mm/dd',
18
- firstDay: 1,
19
- isRTL: false,
20
- showMonthAfterYear: true,
21
- yearSuffix: '年'};
22
- $.datepicker.setDefaults($.datepicker.regional['zh-TW']);
23
- });
1
+ /* Chinese initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Ressol (ressol@gmail.com). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['zh-TW'] = {
5
+ closeText: '關閉',
6
+ prevText: '&#x3C;上月',
7
+ nextText: '下月&#x3E;',
8
+ currentText: '今天',
9
+ monthNames: ['一月','二月','三月','四月','五月','六月',
10
+ '七月','八月','九月','十月','十一月','十二月'],
11
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
12
+ '七月','八月','九月','十月','十一月','十二月'],
13
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
14
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
15
+ dayNamesMin: ['日','一','二','三','四','五','六'],
16
+ weekHeader: '周',
17
+ dateFormat: 'yy/mm/dd',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: true,
21
+ yearSuffix: '年'};
22
+ $.datepicker.setDefaults($.datepicker.regional['zh-TW']);
23
+ });
includes/admin/meta-box/js/jqueryui/jquery-ui-timepicker-addon-i18n.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! jQuery Timepicker Addon - v1.5.0 - 2014-09-01
2
- * http://trentrichardson.com/examples/timepicker
3
- * Copyright (c) 2014 Trent Richardson; Licensed MIT */
4
- (function(e){e.timepicker.regional.af={timeOnlyTitle:"Kies Tyd",timeText:"Tyd ",hourText:"Ure ",minuteText:"Minute",secondText:"Sekondes",millisecText:"Millisekondes",microsecText:"Mikrosekondes",timezoneText:"Tydsone",currentText:"Huidige Tyd",closeText:"Klaar",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.am={timeOnlyTitle:"Ընտրեք ժամանակը",timeText:"Ժամանակը",hourText:"Ժամ",minuteText:"Րոպե",secondText:"Վարկյան",millisecText:"Միլիվարկյան",microsecText:"Միկրովարկյան",timezoneText:"Ժամային գոտին",currentText:"Այժմ",closeText:"Փակել",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.bg={timeOnlyTitle:"Изберете време",timeText:"Време",hourText:"Час",minuteText:"Минути",secondText:"Секунди",millisecText:"Милисекунди",microsecText:"Микросекунди",timezoneText:"Часови пояс",currentText:"Сега",closeText:"Затвори",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.ca={timeOnlyTitle:"Escollir una hora",timeText:"Hora",hourText:"Hores",minuteText:"Minuts",secondText:"Segons",millisecText:"Milisegons",microsecText:"Microsegons",timezoneText:"Fus horari",currentText:"Ara",closeText:"Tancar",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.cs={timeOnlyTitle:"Vyberte čas",timeText:"Čas",hourText:"Hodiny",minuteText:"Minuty",secondText:"Vteřiny",millisecText:"Milisekundy",microsecText:"Mikrosekundy",timezoneText:"Časové pásmo",currentText:"Nyní",closeText:"Zavřít",timeFormat:"HH:mm",amNames:["dop.","AM","A"],pmNames:["odp.","PM","P"],isRTL:!1},e.timepicker.regional.da={timeOnlyTitle:"Vælg tid",timeText:"Tid",hourText:"Time",minuteText:"Minut",secondText:"Sekund",millisecText:"Millisekund",microsecText:"Mikrosekund",timezoneText:"Tidszone",currentText:"Nu",closeText:"Luk",timeFormat:"HH:mm",amNames:["am","AM","A"],pmNames:["pm","PM","P"],isRTL:!1},e.timepicker.regional.de={timeOnlyTitle:"Zeit wählen",timeText:"Zeit",hourText:"Stunde",minuteText:"Minute",secondText:"Sekunde",millisecText:"Millisekunde",microsecText:"Mikrosekunde",timezoneText:"Zeitzone",currentText:"Jetzt",closeText:"Fertig",timeFormat:"HH:mm",amNames:["vorm.","AM","A"],pmNames:["nachm.","PM","P"],isRTL:!1},e.timepicker.regional.el={timeOnlyTitle:"Επιλογή ώρας",timeText:"Ώρα",hourText:"Ώρες",minuteText:"Λεπτά",secondText:"Δευτερόλεπτα",millisecText:"μιλιδευτερόλεπτο",microsecText:"Microseconds",timezoneText:"Ζώνη ώρας",currentText:"Τώρα",closeText:"Κλείσιμο",timeFormat:"HH:mm",amNames:["π.μ.","AM","A"],pmNames:["μ.μ.","PM","P"],isRTL:!1},e.timepicker.regional.es={timeOnlyTitle:"Elegir una hora",timeText:"Hora",hourText:"Horas",minuteText:"Minutos",secondText:"Segundos",millisecText:"Milisegundos",microsecText:"Microsegundos",timezoneText:"Uso horario",currentText:"Hoy",closeText:"Cerrar",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.et={timeOnlyTitle:"Vali aeg",timeText:"Aeg",hourText:"Tund",minuteText:"Minut",secondText:"Sekund",millisecText:"Millisekundis",microsecText:"Mikrosekundis",timezoneText:"Ajavöönd",currentText:"Praegu",closeText:"Valmis",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.eu={timeOnlyTitle:"Aukeratu ordua",timeText:"Ordua",hourText:"Orduak",minuteText:"Minutuak",secondText:"Segundoak",millisecText:"Milisegundoak",microsecText:"Mikrosegundoak",timezoneText:"Ordu-eremua",currentText:"Orain",closeText:"Itxi",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.fi={timeOnlyTitle:"Valitse aika",timeText:"Aika",hourText:"Tunti",minuteText:"Minuutti",secondText:"Sekunti",millisecText:"Millisekunnin",microsecText:"Mikrosekuntia",timezoneText:"Aikavyöhyke",currentText:"Nyt",closeText:"Sulje",timeFormat:"HH:mm",amNames:["ap.","AM","A"],pmNames:["ip.","PM","P"],isRTL:!1},e.timepicker.regional.fr={timeOnlyTitle:"Choisir une heure",timeText:"Heure",hourText:"Heures",minuteText:"Minutes",secondText:"Secondes",millisecText:"Millisecondes",microsecText:"Microsecondes",timezoneText:"Fuseau horaire",currentText:"Maintenant",closeText:"Terminé",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.gl={timeOnlyTitle:"Elixir unha hora",timeText:"Hora",hourText:"Horas",minuteText:"Minutos",secondText:"Segundos",millisecText:"Milisegundos",microsecText:"Microssegundos",timezoneText:"Fuso horario",currentText:"Agora",closeText:"Pechar",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.he={timeOnlyTitle:"בחירת זמן",timeText:"שעה",hourText:"שעות",minuteText:"דקות",secondText:"שניות",millisecText:"אלפית השנייה",microsecText:"מיקרו",timezoneText:"אזור זמן",currentText:"עכשיו",closeText:"סגור",timeFormat:"HH:mm",amNames:['לפנה"צ',"AM","A"],pmNames:['אחה"צ',"PM","P"],isRTL:!0},e.timepicker.regional.hr={timeOnlyTitle:"Odaberi vrijeme",timeText:"Vrijeme",hourText:"Sati",minuteText:"Minute",secondText:"Sekunde",millisecText:"Milisekunde",microsecText:"Mikrosekunde",timezoneText:"Vremenska zona",currentText:"Sada",closeText:"Gotovo",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.hu={timeOnlyTitle:"Válasszon időpontot",timeText:"Idő",hourText:"Óra",minuteText:"Perc",secondText:"Másodperc",millisecText:"Milliszekundumos",microsecText:"Ezredmásodperc",timezoneText:"Időzóna",currentText:"Most",closeText:"Kész",timeFormat:"HH:mm",amNames:["de.","AM","A"],pmNames:["du.","PM","P"],isRTL:!1},e.timepicker.regional.id={timeOnlyTitle:"Pilih Waktu",timeText:"Waktu",hourText:"Pukul",minuteText:"Menit",secondText:"Detik",millisecText:"Milidetik",microsecText:"Mikrodetik",timezoneText:"Zona Waktu",currentText:"Sekarang",closeText:"OK",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.it={timeOnlyTitle:"Scegli orario",timeText:"Orario",hourText:"Ora",minuteText:"Minuti",secondText:"Secondi",millisecText:"Millisecondi",microsecText:"Microsecondi",timezoneText:"Fuso orario",currentText:"Adesso",closeText:"Chiudi",timeFormat:"HH:mm",amNames:["m.","AM","A"],pmNames:["p.","PM","P"],isRTL:!1},e.timepicker.regional.ja={timeOnlyTitle:"時間を選択",timeText:"時間",hourText:"時",minuteText:"分",secondText:"秒",millisecText:"ミリ秒",microsecText:"マイクロ秒",timezoneText:"タイムゾーン",currentText:"現時刻",closeText:"閉じる",timeFormat:"HH:mm",amNames:["午前","AM","A"],pmNames:["午後","PM","P"],isRTL:!1},e.timepicker.regional.ko={timeOnlyTitle:"시간 선택",timeText:"시간",hourText:"시",minuteText:"분",secondText:"초",millisecText:"밀리초",microsecText:"마이크로",timezoneText:"표준 시간대",currentText:"현재 시각",closeText:"닫기",timeFormat:"tt h:mm",amNames:["오전","AM","A"],pmNames:["오후","PM","P"],isRTL:!1},e.timepicker.regional.lt={timeOnlyTitle:"Pasirinkite laiką",timeText:"Laikas",hourText:"Valandos",minuteText:"Minutės",secondText:"Sekundės",millisecText:"Milisekundės",microsecText:"Mikrosekundės",timezoneText:"Laiko zona",currentText:"Dabar",closeText:"Uždaryti",timeFormat:"HH:mm",amNames:["priešpiet","AM","A"],pmNames:["popiet","PM","P"],isRTL:!1},e.timepicker.regional.nl={timeOnlyTitle:"Tijdstip",timeText:"Tijd",hourText:"Uur",minuteText:"Minuut",secondText:"Seconde",millisecText:"Milliseconde",microsecText:"Microseconde",timezoneText:"Tijdzone",currentText:"Vandaag",closeText:"Sluiten",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.no={timeOnlyTitle:"Velg tid",timeText:"Tid",hourText:"Time",minuteText:"Minutt",secondText:"Sekund",millisecText:"Millisekund",microsecText:"mikrosekund",timezoneText:"Tidssone",currentText:"Nå",closeText:"Lukk",timeFormat:"HH:mm",amNames:["am","AM","A"],pmNames:["pm","PM","P"],isRTL:!1},e.timepicker.regional.pl={timeOnlyTitle:"Wybierz godzinę",timeText:"Czas",hourText:"Godzina",minuteText:"Minuta",secondText:"Sekunda",millisecText:"Milisekunda",microsecText:"Mikrosekunda",timezoneText:"Strefa czasowa",currentText:"Teraz",closeText:"Gotowe",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional["pt-BR"]={timeOnlyTitle:"Escolha o horário",timeText:"Horário",hourText:"Hora",minuteText:"Minutos",secondText:"Segundos",millisecText:"Milissegundos",microsecText:"Microssegundos",timezoneText:"Fuso horário",currentText:"Agora",closeText:"Fechar",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.pt={timeOnlyTitle:"Escolha uma hora",timeText:"Hora",hourText:"Horas",minuteText:"Minutos",secondText:"Segundos",millisecText:"Milissegundos",microsecText:"Microssegundos",timezoneText:"Fuso horário",currentText:"Agora",closeText:"Fechar",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.ro={timeOnlyTitle:"Alegeţi o oră",timeText:"Timp",hourText:"Ore",minuteText:"Minute",secondText:"Secunde",millisecText:"Milisecunde",microsecText:"Microsecunde",timezoneText:"Fus orar",currentText:"Acum",closeText:"Închide",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.ru={timeOnlyTitle:"Выберите время",timeText:"Время",hourText:"Часы",minuteText:"Минуты",secondText:"Секунды",millisecText:"Миллисекунды",microsecText:"Микросекунды",timezoneText:"Часовой пояс",currentText:"Сейчас",closeText:"Закрыть",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.sk={timeOnlyTitle:"Zvoľte čas",timeText:"Čas",hourText:"Hodiny",minuteText:"Minúty",secondText:"Sekundy",millisecText:"Milisekundy",microsecText:"Mikrosekundy",timezoneText:"Časové pásmo",currentText:"Teraz",closeText:"Zavrieť",timeFormat:"H:m",amNames:["dop.","AM","A"],pmNames:["pop.","PM","P"],isRTL:!1},e.timepicker.regional.sl={timeOnlyTitle:"Izberite čas",timeText:"Čas",hourText:"Ura",minuteText:"Minute",secondText:"Sekunde",millisecText:"Milisekunde",microsecText:"Mikrosekunde",timezoneText:"Časovni pas",currentText:"Sedaj",closeText:"Zapri",timeFormat:"HH:mm",amNames:["dop.","AM","A"],pmNames:["pop.","PM","P"],isRTL:!1},e.timepicker.regional["sr-RS"]={timeOnlyTitle:"Одаберите време",timeText:"Време",hourText:"Сати",minuteText:"Минути",secondText:"Секунде",millisecText:"Милисекунде",microsecText:"Микросекунде",timezoneText:"Временска зона",currentText:"Сада",closeText:"Затвори",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional["sr-YU"]={timeOnlyTitle:"Odaberite vreme",timeText:"Vreme",hourText:"Sati",minuteText:"Minuti",secondText:"Sekunde",millisecText:"Milisekunde",microsecText:"Mikrosekunde",timezoneText:"Vremenska zona",currentText:"Sada",closeText:"Zatvori",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.sv={timeOnlyTitle:"Välj en tid",timeText:"Tid",hourText:"Timme",minuteText:"Minut",secondText:"Sekund",millisecText:"Millisekund",microsecText:"Mikrosekund",timezoneText:"Tidszon",currentText:"Nu",closeText:"Stäng",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.th={timeOnlyTitle:"เลือกเวลา",timeText:"เวลา ",hourText:"ชั่วโมง ",minuteText:"นาที",secondText:"วินาที",millisecText:"มิลลิวินาที",microsecText:"ไมโคริวินาที",timezoneText:"เขตเวลา",currentText:"เวลาปัจจุบัน",closeText:"ปิด",timeFormat:"hh:mm tt"},e.timepicker.regional.tr={timeOnlyTitle:"Zaman Seçiniz",timeText:"Zaman",hourText:"Saat",minuteText:"Dakika",secondText:"Saniye",millisecText:"Milisaniye",microsecText:"Mikrosaniye",timezoneText:"Zaman Dilimi",currentText:"Şu an",closeText:"Tamam",timeFormat:"HH:mm",amNames:["ÖÖ","Ö"],pmNames:["ÖS","S"],isRTL:!1},e.timepicker.regional.uk={timeOnlyTitle:"Виберіть час",timeText:"Час",hourText:"Години",minuteText:"Хвилини",secondText:"Секунди",millisecText:"Мілісекунди",microsecText:"Мікросекунди",timezoneText:"Часовий пояс",currentText:"Зараз",closeText:"Закрити",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.vi={timeOnlyTitle:"Chọn giờ",timeText:"Thời gian",hourText:"Giờ",minuteText:"Phút",secondText:"Giây",millisecText:"Mili giây",microsecText:"Micrô giây",timezoneText:"Múi giờ",currentText:"Hiện thời",closeText:"Đóng",timeFormat:"HH:mm",amNames:["SA","S"],pmNames:["CH","C"],isRTL:!1},e.timepicker.regional["zh-CN"]={timeOnlyTitle:"选择时间",timeText:"时间",hourText:"小时",minuteText:"分钟",secondText:"秒钟",millisecText:"毫秒",microsecText:"微秒",timezoneText:"时区",currentText:"现在时间",closeText:"关闭",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional["zh-TW"]={timeOnlyTitle:"選擇時分秒",timeText:"時間",hourText:"時",minuteText:"分",secondText:"秒",millisecText:"毫秒",microsecText:"微秒",timezoneText:"時區",currentText:"現在時間",closeText:"確定",timeFormat:"HH:mm",amNames:["上午","AM","A"],pmNames:["下午","PM","P"],isRTL:!1}})(jQuery);
1
+ /*! jQuery Timepicker Addon - v1.5.0 - 2014-09-01
2
+ * http://trentrichardson.com/examples/timepicker
3
+ * Copyright (c) 2014 Trent Richardson; Licensed MIT */
4
+ (function(e){e.timepicker.regional.af={timeOnlyTitle:"Kies Tyd",timeText:"Tyd ",hourText:"Ure ",minuteText:"Minute",secondText:"Sekondes",millisecText:"Millisekondes",microsecText:"Mikrosekondes",timezoneText:"Tydsone",currentText:"Huidige Tyd",closeText:"Klaar",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.am={timeOnlyTitle:"Ընտրեք ժամանակը",timeText:"Ժամանակը",hourText:"Ժամ",minuteText:"Րոպե",secondText:"Վարկյան",millisecText:"Միլիվարկյան",microsecText:"Միկրովարկյան",timezoneText:"Ժամային գոտին",currentText:"Այժմ",closeText:"Փակել",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.bg={timeOnlyTitle:"Изберете време",timeText:"Време",hourText:"Час",minuteText:"Минути",secondText:"Секунди",millisecText:"Милисекунди",microsecText:"Микросекунди",timezoneText:"Часови пояс",currentText:"Сега",closeText:"Затвори",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.ca={timeOnlyTitle:"Escollir una hora",timeText:"Hora",hourText:"Hores",minuteText:"Minuts",secondText:"Segons",millisecText:"Milisegons",microsecText:"Microsegons",timezoneText:"Fus horari",currentText:"Ara",closeText:"Tancar",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.cs={timeOnlyTitle:"Vyberte čas",timeText:"Čas",hourText:"Hodiny",minuteText:"Minuty",secondText:"Vteřiny",millisecText:"Milisekundy",microsecText:"Mikrosekundy",timezoneText:"Časové pásmo",currentText:"Nyní",closeText:"Zavřít",timeFormat:"HH:mm",amNames:["dop.","AM","A"],pmNames:["odp.","PM","P"],isRTL:!1},e.timepicker.regional.da={timeOnlyTitle:"Vælg tid",timeText:"Tid",hourText:"Time",minuteText:"Minut",secondText:"Sekund",millisecText:"Millisekund",microsecText:"Mikrosekund",timezoneText:"Tidszone",currentText:"Nu",closeText:"Luk",timeFormat:"HH:mm",amNames:["am","AM","A"],pmNames:["pm","PM","P"],isRTL:!1},e.timepicker.regional.de={timeOnlyTitle:"Zeit wählen",timeText:"Zeit",hourText:"Stunde",minuteText:"Minute",secondText:"Sekunde",millisecText:"Millisekunde",microsecText:"Mikrosekunde",timezoneText:"Zeitzone",currentText:"Jetzt",closeText:"Fertig",timeFormat:"HH:mm",amNames:["vorm.","AM","A"],pmNames:["nachm.","PM","P"],isRTL:!1},e.timepicker.regional.el={timeOnlyTitle:"Επιλογή ώρας",timeText:"Ώρα",hourText:"Ώρες",minuteText:"Λεπτά",secondText:"Δευτερόλεπτα",millisecText:"μιλιδευτερόλεπτο",microsecText:"Microseconds",timezoneText:"Ζώνη ώρας",currentText:"Τώρα",closeText:"Κλείσιμο",timeFormat:"HH:mm",amNames:["π.μ.","AM","A"],pmNames:["μ.μ.","PM","P"],isRTL:!1},e.timepicker.regional.es={timeOnlyTitle:"Elegir una hora",timeText:"Hora",hourText:"Horas",minuteText:"Minutos",secondText:"Segundos",millisecText:"Milisegundos",microsecText:"Microsegundos",timezoneText:"Uso horario",currentText:"Hoy",closeText:"Cerrar",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.et={timeOnlyTitle:"Vali aeg",timeText:"Aeg",hourText:"Tund",minuteText:"Minut",secondText:"Sekund",millisecText:"Millisekundis",microsecText:"Mikrosekundis",timezoneText:"Ajavöönd",currentText:"Praegu",closeText:"Valmis",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.eu={timeOnlyTitle:"Aukeratu ordua",timeText:"Ordua",hourText:"Orduak",minuteText:"Minutuak",secondText:"Segundoak",millisecText:"Milisegundoak",microsecText:"Mikrosegundoak",timezoneText:"Ordu-eremua",currentText:"Orain",closeText:"Itxi",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.fi={timeOnlyTitle:"Valitse aika",timeText:"Aika",hourText:"Tunti",minuteText:"Minuutti",secondText:"Sekunti",millisecText:"Millisekunnin",microsecText:"Mikrosekuntia",timezoneText:"Aikavyöhyke",currentText:"Nyt",closeText:"Sulje",timeFormat:"HH:mm",amNames:["ap.","AM","A"],pmNames:["ip.","PM","P"],isRTL:!1},e.timepicker.regional.fr={timeOnlyTitle:"Choisir une heure",timeText:"Heure",hourText:"Heures",minuteText:"Minutes",secondText:"Secondes",millisecText:"Millisecondes",microsecText:"Microsecondes",timezoneText:"Fuseau horaire",currentText:"Maintenant",closeText:"Terminé",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.gl={timeOnlyTitle:"Elixir unha hora",timeText:"Hora",hourText:"Horas",minuteText:"Minutos",secondText:"Segundos",millisecText:"Milisegundos",microsecText:"Microssegundos",timezoneText:"Fuso horario",currentText:"Agora",closeText:"Pechar",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.he={timeOnlyTitle:"בחירת זמן",timeText:"שעה",hourText:"שעות",minuteText:"דקות",secondText:"שניות",millisecText:"אלפית השנייה",microsecText:"מיקרו",timezoneText:"אזור זמן",currentText:"עכשיו",closeText:"סגור",timeFormat:"HH:mm",amNames:['לפנה"צ',"AM","A"],pmNames:['אחה"צ',"PM","P"],isRTL:!0},e.timepicker.regional.hr={timeOnlyTitle:"Odaberi vrijeme",timeText:"Vrijeme",hourText:"Sati",minuteText:"Minute",secondText:"Sekunde",millisecText:"Milisekunde",microsecText:"Mikrosekunde",timezoneText:"Vremenska zona",currentText:"Sada",closeText:"Gotovo",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.hu={timeOnlyTitle:"Válasszon időpontot",timeText:"Idő",hourText:"Óra",minuteText:"Perc",secondText:"Másodperc",millisecText:"Milliszekundumos",microsecText:"Ezredmásodperc",timezoneText:"Időzóna",currentText:"Most",closeText:"Kész",timeFormat:"HH:mm",amNames:["de.","AM","A"],pmNames:["du.","PM","P"],isRTL:!1},e.timepicker.regional.id={timeOnlyTitle:"Pilih Waktu",timeText:"Waktu",hourText:"Pukul",minuteText:"Menit",secondText:"Detik",millisecText:"Milidetik",microsecText:"Mikrodetik",timezoneText:"Zona Waktu",currentText:"Sekarang",closeText:"OK",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.it={timeOnlyTitle:"Scegli orario",timeText:"Orario",hourText:"Ora",minuteText:"Minuti",secondText:"Secondi",millisecText:"Millisecondi",microsecText:"Microsecondi",timezoneText:"Fuso orario",currentText:"Adesso",closeText:"Chiudi",timeFormat:"HH:mm",amNames:["m.","AM","A"],pmNames:["p.","PM","P"],isRTL:!1},e.timepicker.regional.ja={timeOnlyTitle:"時間を選択",timeText:"時間",hourText:"時",minuteText:"分",secondText:"秒",millisecText:"ミリ秒",microsecText:"マイクロ秒",timezoneText:"タイムゾーン",currentText:"現時刻",closeText:"閉じる",timeFormat:"HH:mm",amNames:["午前","AM","A"],pmNames:["午後","PM","P"],isRTL:!1},e.timepicker.regional.ko={timeOnlyTitle:"시간 선택",timeText:"시간",hourText:"시",minuteText:"분",secondText:"초",millisecText:"밀리초",microsecText:"마이크로",timezoneText:"표준 시간대",currentText:"현재 시각",closeText:"닫기",timeFormat:"tt h:mm",amNames:["오전","AM","A"],pmNames:["오후","PM","P"],isRTL:!1},e.timepicker.regional.lt={timeOnlyTitle:"Pasirinkite laiką",timeText:"Laikas",hourText:"Valandos",minuteText:"Minutės",secondText:"Sekundės",millisecText:"Milisekundės",microsecText:"Mikrosekundės",timezoneText:"Laiko zona",currentText:"Dabar",closeText:"Uždaryti",timeFormat:"HH:mm",amNames:["priešpiet","AM","A"],pmNames:["popiet","PM","P"],isRTL:!1},e.timepicker.regional.nl={timeOnlyTitle:"Tijdstip",timeText:"Tijd",hourText:"Uur",minuteText:"Minuut",secondText:"Seconde",millisecText:"Milliseconde",microsecText:"Microseconde",timezoneText:"Tijdzone",currentText:"Vandaag",closeText:"Sluiten",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.no={timeOnlyTitle:"Velg tid",timeText:"Tid",hourText:"Time",minuteText:"Minutt",secondText:"Sekund",millisecText:"Millisekund",microsecText:"mikrosekund",timezoneText:"Tidssone",currentText:"Nå",closeText:"Lukk",timeFormat:"HH:mm",amNames:["am","AM","A"],pmNames:["pm","PM","P"],isRTL:!1},e.timepicker.regional.pl={timeOnlyTitle:"Wybierz godzinę",timeText:"Czas",hourText:"Godzina",minuteText:"Minuta",secondText:"Sekunda",millisecText:"Milisekunda",microsecText:"Mikrosekunda",timezoneText:"Strefa czasowa",currentText:"Teraz",closeText:"Gotowe",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional["pt-BR"]={timeOnlyTitle:"Escolha o horário",timeText:"Horário",hourText:"Hora",minuteText:"Minutos",secondText:"Segundos",millisecText:"Milissegundos",microsecText:"Microssegundos",timezoneText:"Fuso horário",currentText:"Agora",closeText:"Fechar",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.pt={timeOnlyTitle:"Escolha uma hora",timeText:"Hora",hourText:"Horas",minuteText:"Minutos",secondText:"Segundos",millisecText:"Milissegundos",microsecText:"Microssegundos",timezoneText:"Fuso horário",currentText:"Agora",closeText:"Fechar",timeFormat:"HH:mm",amNames:["a.m.","AM","A"],pmNames:["p.m.","PM","P"],isRTL:!1},e.timepicker.regional.ro={timeOnlyTitle:"Alegeţi o oră",timeText:"Timp",hourText:"Ore",minuteText:"Minute",secondText:"Secunde",millisecText:"Milisecunde",microsecText:"Microsecunde",timezoneText:"Fus orar",currentText:"Acum",closeText:"Închide",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.ru={timeOnlyTitle:"Выберите время",timeText:"Время",hourText:"Часы",minuteText:"Минуты",secondText:"Секунды",millisecText:"Миллисекунды",microsecText:"Микросекунды",timezoneText:"Часовой пояс",currentText:"Сейчас",closeText:"Закрыть",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.sk={timeOnlyTitle:"Zvoľte čas",timeText:"Čas",hourText:"Hodiny",minuteText:"Minúty",secondText:"Sekundy",millisecText:"Milisekundy",microsecText:"Mikrosekundy",timezoneText:"Časové pásmo",currentText:"Teraz",closeText:"Zavrieť",timeFormat:"H:m",amNames:["dop.","AM","A"],pmNames:["pop.","PM","P"],isRTL:!1},e.timepicker.regional.sl={timeOnlyTitle:"Izberite čas",timeText:"Čas",hourText:"Ura",minuteText:"Minute",secondText:"Sekunde",millisecText:"Milisekunde",microsecText:"Mikrosekunde",timezoneText:"Časovni pas",currentText:"Sedaj",closeText:"Zapri",timeFormat:"HH:mm",amNames:["dop.","AM","A"],pmNames:["pop.","PM","P"],isRTL:!1},e.timepicker.regional["sr-RS"]={timeOnlyTitle:"Одаберите време",timeText:"Време",hourText:"Сати",minuteText:"Минути",secondText:"Секунде",millisecText:"Милисекунде",microsecText:"Микросекунде",timezoneText:"Временска зона",currentText:"Сада",closeText:"Затвори",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional["sr-YU"]={timeOnlyTitle:"Odaberite vreme",timeText:"Vreme",hourText:"Sati",minuteText:"Minuti",secondText:"Sekunde",millisecText:"Milisekunde",microsecText:"Mikrosekunde",timezoneText:"Vremenska zona",currentText:"Sada",closeText:"Zatvori",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.sv={timeOnlyTitle:"Välj en tid",timeText:"Tid",hourText:"Timme",minuteText:"Minut",secondText:"Sekund",millisecText:"Millisekund",microsecText:"Mikrosekund",timezoneText:"Tidszon",currentText:"Nu",closeText:"Stäng",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.th={timeOnlyTitle:"เลือกเวลา",timeText:"เวลา ",hourText:"ชั่วโมง ",minuteText:"นาที",secondText:"วินาที",millisecText:"มิลลิวินาที",microsecText:"ไมโคริวินาที",timezoneText:"เขตเวลา",currentText:"เวลาปัจจุบัน",closeText:"ปิด",timeFormat:"hh:mm tt"},e.timepicker.regional.tr={timeOnlyTitle:"Zaman Seçiniz",timeText:"Zaman",hourText:"Saat",minuteText:"Dakika",secondText:"Saniye",millisecText:"Milisaniye",microsecText:"Mikrosaniye",timezoneText:"Zaman Dilimi",currentText:"Şu an",closeText:"Tamam",timeFormat:"HH:mm",amNames:["ÖÖ","Ö"],pmNames:["ÖS","S"],isRTL:!1},e.timepicker.regional.uk={timeOnlyTitle:"Виберіть час",timeText:"Час",hourText:"Години",minuteText:"Хвилини",secondText:"Секунди",millisecText:"Мілісекунди",microsecText:"Мікросекунди",timezoneText:"Часовий пояс",currentText:"Зараз",closeText:"Закрити",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional.vi={timeOnlyTitle:"Chọn giờ",timeText:"Thời gian",hourText:"Giờ",minuteText:"Phút",secondText:"Giây",millisecText:"Mili giây",microsecText:"Micrô giây",timezoneText:"Múi giờ",currentText:"Hiện thời",closeText:"Đóng",timeFormat:"HH:mm",amNames:["SA","S"],pmNames:["CH","C"],isRTL:!1},e.timepicker.regional["zh-CN"]={timeOnlyTitle:"选择时间",timeText:"时间",hourText:"小时",minuteText:"分钟",secondText:"秒钟",millisecText:"毫秒",microsecText:"微秒",timezoneText:"时区",currentText:"现在时间",closeText:"关闭",timeFormat:"HH:mm",amNames:["AM","A"],pmNames:["PM","P"],isRTL:!1},e.timepicker.regional["zh-TW"]={timeOnlyTitle:"選擇時分秒",timeText:"時間",hourText:"時",minuteText:"分",secondText:"秒",millisecText:"毫秒",microsecText:"微秒",timezoneText:"時區",currentText:"現在時間",closeText:"確定",timeFormat:"HH:mm",amNames:["上午","AM","A"],pmNames:["下午","PM","P"],isRTL:!1}})(jQuery);
includes/admin/meta-box/js/jqueryui/jquery-ui-timepicker-addon.min.js CHANGED
@@ -1,5 +1,5 @@
1
- /*! jQuery Timepicker Addon - v1.5.0 - 2014-09-01
2
- * http://trentrichardson.com/examples/timepicker
3
- * Copyright (c) 2014 Trent Richardson; Licensed MIT */
4
- (function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.5.0"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",defaultValue:null,parse:"strict"},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}overrides={beforeShow:function(e,t){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],e,t,tp_inst):void 0},onChangeMonthYear:function(e,t,i){tp_inst._updateDateTime(i),$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],e,t,i,tp_inst)},onClose:function(e,t){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(t),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],e,t,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(e){return e.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(e){return e.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&$.ui.slider===void 0&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField),tp_inst._defaults.altRedirectFocus===!0&&tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(0===tp_inst._defaults.minDate||0===tp_inst._defaults.minDateTime)&&(tp_inst._defaults.minDate=new Date),(0===tp_inst._defaults.maxDate||0===tp_inst._defaults.maxDateTime)&&(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(e){var t=this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var s=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!s.timeObj)return!1;$.extend(this,s.timeObj)}catch(a){return $.timepicker.log("Error parsing the date/time string: "+a+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var n=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return n?($.extend(this,n),!0):!1},_injectTimePicker:function(){var e=this.inst.dpDiv,t=this.inst.settings,i=this,s="",a="",n=null,r={},l={},o=null,c=0,u=0;if(0===e.find("div.ui-timepicker-div").length&&t.showTimepicker){var m=' style="display:none;"',d='<div class="ui-timepicker-div'+(t.isRTL?" ui-timepicker-rtl":"")+'"><dl>'+'<dt class="ui_tpicker_time_label"'+(t.showTime?"":m)+">"+t.timeText+"</dt>"+'<dd class="ui_tpicker_time"'+(t.showTime?"":m)+"></dd>";for(c=0,u=this.units.length;u>c;c++){if(s=this.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],r[s]=parseInt(t[s+"Max"]-(t[s+"Max"]-t[s+"Min"])%t["step"+a],10),l[s]=0,d+='<dt class="ui_tpicker_'+s+'_label"'+(n?"":m)+">"+t[s+"Text"]+"</dt>"+'<dd class="ui_tpicker_'+s+'"><div class="ui_tpicker_'+s+'_slider"'+(n?"":m)+"></div>",n&&t[s+"Grid"]>0){if(d+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===s)for(var h=t[s+"Min"];r[s]>=h;h+=parseInt(t[s+"Grid"],10)){l[s]++;var p=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:h},t);d+='<td data-for="'+s+'">'+p+"</td>"}else for(var _=t[s+"Min"];r[s]>=_;_+=parseInt(t[s+"Grid"],10))l[s]++,d+='<td data-for="'+s+'">'+(10>_?"0":"")+_+"</td>";d+="</tr></table></div>"}d+="</dd>"}var f=null!==t.showTimezone?t.showTimezone:this.support.timezone;d+='<dt class="ui_tpicker_timezone_label"'+(f?"":m)+">"+t.timezoneText+"</dt>",d+='<dd class="ui_tpicker_timezone" '+(f?"":m)+"></dd>",d+="</dl></div>";var g=$(d);for(t.timeOnly===!0&&(g.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+t.timeOnlyTitle+"</div>"+"</div>"),e.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),c=0,u=i.units.length;u>c;c++)s=i.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],i[s+"_slider"]=i.control.create(i,g.find(".ui_tpicker_"+s+"_slider"),s,i[s],t[s+"Min"],r[s],t["step"+a]),n&&t[s+"Grid"]>0&&(o=100*l[s]*t[s+"Grid"]/(r[s]-t[s+"Min"]),g.find(".ui_tpicker_"+s+" table").css({width:o+"%",marginLeft:t.isRTL?"0":o/(-2*l[s])+"%",marginRight:t.isRTL?o/(-2*l[s])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(){var e=$(this),t=e.html(),a=parseInt(t.replace(/[^0-9]/g),10),n=t.replace(/[^apm]/gi),r=e.data("for");"hour"===r&&(-1!==n.indexOf("p")&&12>a?a+=12:-1!==n.indexOf("a")&&12===a&&(a=0)),i.control.value(i,i[r+"_slider"],s,a),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/l[s]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=g.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(t.timezoneList,function(e){return $("<option />").val("object"==typeof e?e.value:e).text("object"==typeof e?e.label:e)})),this.timezone!==void 0&&null!==this.timezone&&""!==this.timezone){var M=-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset();M===this.timezone?selectLocalTimezone(i):this.timezone_select.val(this.timezone)}else this.hour!==void 0&&null!==this.hour&&""!==this.hour?this.timezone_select.val(t.timezone):selectLocalTimezone(i);this.timezone_select.change(function(){i._onTimeChange(),i._onSelectHandler()});var v=e.find(".ui-datepicker-buttonpane");if(v.length?v.before(g):e.append(g),this.$timeObj=g.find(".ui_tpicker_time"),null!==this.inst){var k=this.timeDefined;this._onTimeChange(),this.timeDefined=k}if(this._defaults.addSliderAccess){var T=this._defaults.sliderAccessArgs,D=this._defaults.isRTL;T.isRTL=D,setTimeout(function(){if(0===g.find(".ui-slider-access").length){g.find(".ui-slider:visible").sliderAccess(T);var e=g.find(".ui-slider-access:eq(0)").outerWidth(!0);e&&g.find("table:visible").each(function(){var t=$(this),i=t.outerWidth(),s=(""+t.css(D?"marginRight":"marginLeft")).replace("%",""),a=i-e,n=s*a/i+"%",r={width:a,marginRight:0,marginLeft:0};r[D?"marginRight":"marginLeft"]=n,t.css(r)})}},10)}i._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(e,t){var i=this._defaults,s=new Date(e.selectedYear,e.selectedMonth,e.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(e,"minDateTime")&&void 0!==$.datepicker._get(e,"minDateTime")&&s){var a=$.datepicker._get(e,"minDateTime"),n=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);(null===this.hourMinOriginal||null===this.minuteMinOriginal||null===this.secondMinOriginal||null===this.millisecMinOriginal||null===this.microsecMinOriginal)&&(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),e.settings.timeOnly||n.getTime()===s.getTime()?(this._defaults.hourMin=a.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=a.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=a.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=a.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=a.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(e,"maxDateTime")&&void 0!==$.datepicker._get(e,"maxDateTime")&&s){var r=$.datepicker._get(e,"maxDateTime"),l=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0,0);(null===this.hourMaxOriginal||null===this.minuteMaxOriginal||null===this.secondMaxOriginal||null===this.millisecMaxOriginal)&&(this.hourMaxOriginal=i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),e.settings.timeOnly||l.getTime()===s.getTime()?(this._defaults.hourMax=r.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=r.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=r.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=r.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=r.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(null!==e.settings.minTime){var o=new Date("01/01/1970 "+e.settings.minTime);this.hour<o.getHours()?(this.hour=this._defaults.hourMin=o.getHours(),this.minute=this._defaults.minuteMin=o.getMinutes()):this.hour===o.getHours()&&this.minute<o.getMinutes()?this.minute=this._defaults.minuteMin=o.getMinutes():this._defaults.hourMin<o.getHours()?(this._defaults.hourMin=o.getHours(),this._defaults.minuteMin=o.getMinutes()):this._defaults.minuteMin=this._defaults.hourMin===o.getHours()===this.hour&&this._defaults.minuteMin<o.getMinutes()?o.getMinutes():0}if(null!==e.settings.maxTime){var c=new Date("01/01/1970 "+e.settings.maxTime);this.hour>c.getHours()?(this.hour=this._defaults.hourMax=c.getHours(),this.minute=this._defaults.minuteMax=c.getMinutes()):this.hour===c.getHours()&&this.minute>c.getMinutes()?this.minute=this._defaults.minuteMax=c.getMinutes():this._defaults.hourMax>c.getHours()?(this._defaults.hourMax=c.getHours(),this._defaults.minuteMax=c.getMinutes()):this._defaults.minuteMax=this._defaults.hourMax===c.getHours()===this.hour&&this._defaults.minuteMax>c.getMinutes()?c.getMinutes():59}if(void 0!==t&&t===!0){var u=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),m=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),d=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),h=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),p=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:u,step:this._defaults.stepHour}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:m,step:this._defaults.stepMinute}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:d,step:this._defaults.stepSecond}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:h,step:this._defaults.stepMillisec}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:p,step:this._defaults.stepMicrosec}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var e=this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,t=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,i=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,s=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,a=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,n=this.timezone_select?this.timezone_select.val():!1,r=this._defaults,l=r.pickerTimeFormat||r.timeFormat,o=r.pickerTimeSuffix||r.timeSuffix;"object"==typeof e&&(e=!1),"object"==typeof t&&(t=!1),"object"==typeof i&&(i=!1),"object"==typeof s&&(s=!1),"object"==typeof a&&(a=!1),"object"==typeof n&&(n=!1),e!==!1&&(e=parseInt(e,10)),t!==!1&&(t=parseInt(t,10)),i!==!1&&(i=parseInt(i,10)),s!==!1&&(s=parseInt(s,10)),a!==!1&&(a=parseInt(a,10)),n!==!1&&(n=""+n);var c=r[12>e?"amNames":"pmNames"][0],u=e!==parseInt(this.hour,10)||t!==parseInt(this.minute,10)||i!==parseInt(this.second,10)||s!==parseInt(this.millisec,10)||a!==parseInt(this.microsec,10)||this.ampm.length>0&&12>e!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&n!==""+this.timezone;u&&(e!==!1&&(this.hour=e),t!==!1&&(this.minute=t),i!==!1&&(this.second=i),s!==!1&&(this.millisec=s),a!==!1&&(this.microsec=a),n!==!1&&(this.timezone=n),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=c),this.formattedTime=$.datepicker.formatTime(r.timeFormat,this,r),this.$timeObj&&(l===r.timeFormat?this.$timeObj.text(this.formattedTime+o):this.$timeObj.text($.datepicker.formatTime(l,this,r)+o)),this.timeDefined=!0,u&&this._updateDateTime()}},_onSelectHandler:function(){var e=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;e&&t&&e.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(e){e=this.inst||e;var t=e.currentYear>0?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(e.selectedYear,e.selectedMonth,e.selectedDay),i=$.datepicker._daylightSavingAdjust(t),s=$.datepicker._get(e,"dateFormat"),a=$.datepicker._getFormatConfig(e),n=null!==i&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(s,null===i?new Date:i,a);var r=this.formattedDate;if(""===e.lastVal&&(e.currentYear=e.selectedYear,e.currentMonth=e.selectedMonth,e.currentDay=e.selectedDay),this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!1?r=this.formattedTime:(this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||n)||this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!0)&&(r+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=r,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(r);var l="",o=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,c=null!==this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(l=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,a):this.formattedDate,l&&(l+=o)),l+=null!==this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+c:this.formattedTime+c,this.$altInput.val(l)}else this.$input.val(r);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var e=$.datepicker._getInst(this.$input.get(0)),t=$.datepicker._get(e,"timepicker");if(t&&t._defaults.timeOnly&&e.input.val()!==e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(i){$.timepicker.log(i)}}},_controls:{slider:{create:function(e,t,i,s,a,n,r){var l=e._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:l?-1*s:s,min:l?-1*n:a,max:l?-1*a:n,step:r,slide:function(t,s){e.control.value(e,$(this),i,l?-1*s.value:s.value),e._onTimeChange()},stop:function(){e._onSelectHandler()}})},options:function(e,t,i,s,a){if(e._defaults.isRTL){if("string"==typeof s)return"min"===s||"max"===s?void 0!==a?t.slider(s,-1*a):Math.abs(t.slider(s)):t.slider(s);var n=s.min,r=s.max;return s.min=s.max=null,void 0!==n&&(s.max=-1*n),void 0!==r&&(s.min=-1*r),t.slider(s)}return"string"==typeof s&&void 0!==a?t.slider(s,a):t.slider(s)},value:function(e,t,i,s){return e._defaults.isRTL?void 0!==s?t.slider("value",-1*s):Math.abs(t.slider("value")):void 0!==s?t.slider("value",s):t.slider("value")}},select:{create:function(e,t,i,s,a,n,r){for(var l='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+i+'" data-min="'+a+'" data-max="'+n+'" data-step="'+r+'">',o=e._defaults.pickerTimeFormat||e._defaults.timeFormat,c=a;n>=c;c+=r)l+='<option value="'+c+'"'+(c===s?" selected":"")+">",l+="hour"===i?$.datepicker.formatTime($.trim(o.replace(/[^ht ]/gi,"")),{hour:c},e._defaults):"millisec"===i||"microsec"===i||c>=10?c:"0"+(""+c),l+="</option>";return l+="</select>",t.children("select").remove(),$(l).appendTo(t).change(function(){e._onTimeChange(),e._onSelectHandler()}),t},options:function(e,t,i,s,a){var n={},r=t.children("select");if("string"==typeof s){if(void 0===a)return r.data(s);n[s]=a}else n=s;return e.control.create(e,t,r.data("unit"),r.val(),n.min||r.data("min"),n.max||r.data("max"),n.step||r.data("step"))},value:function(e,t,i,s){var a=t.children("select");return void 0!==s?a.val(s):a.val()}}}}),$.fn.extend({timepicker:function(e){e=e||{};var t=Array.prototype.slice.call(arguments);return"object"==typeof e&&(t[0]=$.extend(e,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),t)})},datetimepicker:function(e){e=e||{};var t=arguments;return"string"==typeof e?"getDate"===e||"option"===e&&2===t.length&&"string"==typeof t[1]?$.fn.datepicker.apply($(this[0]),t):this.each(function(){var e=$(this);e.datepicker.apply(e,t)}):this.each(function(){var t=$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(e,t,i,s,a){var n=parseDateTimeInternal(e,t,i,s,a);if(n.timeObj){var r=n.timeObj;n.date.setHours(r.hour,r.minute,r.second,r.millisec),n.date.setMicroseconds(r.microsec)}return n.date},$.datepicker.parseTime=function(e,t,i){var s=extendRemove(extendRemove({},$.timepicker._defaults),i||{});-1!==e.replace(/\'.*?\'/g,"").indexOf("Z");var a=function(e,t,i){var s,a=function(e,t){var i=[];return e&&$.merge(i,e),t&&$.merge(i,t),i=$.map(i,function(e){return e.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+i.join("|")+")?"},n=function(e){var t=e.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(t)for(var s=0;t.length>s;s++)-1===i[(""+t[s]).charAt(0)]&&(i[(""+t[s]).charAt(0)]=s+1);return i},r="^"+(""+e).replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){var t=e.length;switch(e.charAt(0).toLowerCase()){case"h":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"m":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"s":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"l":return"(\\d?\\d?\\d)";case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return a(i.amNames,i.pmNames);default:return"("+e.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(e){return"\\"+e})+")?"}}).replace(/\s/g,"\\s?")+i.timeSuffix+"$",l=n(e),o="";s=t.match(RegExp(r,"i"));var c={hour:0,minute:0,second:0,millisec:0,microsec:0};return s?(-1!==l.t&&(void 0===s[l.t]||0===s[l.t].length?(o="",c.ampm=""):(o=-1!==$.inArray(s[l.t].toUpperCase(),i.amNames)?"AM":"PM",c.ampm=i["AM"===o?"amNames":"pmNames"][0])),-1!==l.h&&(c.hour="AM"===o&&"12"===s[l.h]?0:"PM"===o&&"12"!==s[l.h]?parseInt(s[l.h],10)+12:Number(s[l.h])),-1!==l.m&&(c.minute=Number(s[l.m])),-1!==l.s&&(c.second=Number(s[l.s])),-1!==l.l&&(c.millisec=Number(s[l.l])),-1!==l.c&&(c.microsec=Number(s[l.c])),-1!==l.z&&void 0!==s[l.z]&&(c.timezone=$.timepicker.timezoneOffsetNumber(s[l.z])),c):!1},n=function(e,t,i){try{var s=new Date("2012-01-01 "+t);if(isNaN(s.getTime())&&(s=new Date("2012-01-01T"+t),isNaN(s.getTime())&&(s=new Date("01/01/2012 "+t),isNaN(s.getTime()))))throw"Unable to parse time with native Date: "+t;return{hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),millisec:s.getMilliseconds(),microsec:s.getMicroseconds(),timezone:-1*s.getTimezoneOffset()}}catch(n){try{return a(e,t,i)}catch(r){$.timepicker.log("Unable to parse \ntimeString: "+t+"\ntimeFormat: "+e)}}return!1};return"function"==typeof s.parse?s.parse(e,t,s):"loose"===s.parse?n(e,t,s):a(e,t,s)},$.datepicker.formatTime=function(e,t,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),t=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},t);var s=e,a=i.amNames[0],n=parseInt(t.hour,10);return n>11&&(a=i.pmNames[0]),s=s.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){switch(e){case"HH":return("0"+n).slice(-2);case"H":return n;case"hh":return("0"+convert24to12(n)).slice(-2);case"h":return convert24to12(n);case"mm":return("0"+t.minute).slice(-2);case"m":return t.minute;case"ss":return("0"+t.second).slice(-2);case"s":return t.second;case"l":return("00"+t.millisec).slice(-3);case"c":return("00"+t.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!0);case"T":return a.charAt(0).toUpperCase();case"TT":return a.toUpperCase();case"t":return a.charAt(0).toLowerCase();case"tt":return a.toLowerCase();default:return e.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(e,t){var i,s=this._getInst($(e)[0]),a=this._get(s,"timepicker");a&&s.settings.showTimepicker?(a._limitMinMaxDateTime(s,!0),i=s.inline,s.inline=s.stay_open=!0,this._base_selectDate(e,t),s.inline=i,s.stay_open=!1,this._notifyChange(s),this._updateDatepicker(s)):this._base_selectDate(e,t)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(e){var t=e.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==e&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==t||"boolean"==typeof e.stay_open&&e.stay_open!==!1)){this._base_updateDatepicker(e);var i=this._get(e,"timepicker");i&&i._addTimePicker(e)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&$.datepicker._get(t,"constrainInput")){var s=i.support.ampm,a=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=(""+i._defaults.timeFormat).replace(/[hms]/g,"").replace(/TT/g,s?"APM":"").replace(/Tt/g,s?"AaPpMm":"").replace(/tT/g,s?"AaPpMm":"").replace(/T/g,s?"AP":"").replace(/tt/g,s?"apm":"").replace(/t/g,s?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(a?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+n,l=String.fromCharCode(void 0===e.charCode?e.keyCode:e.charCode);return e.ctrlKey||" ">l||!n||r.indexOf(l)>-1}return $.datepicker._base_doKeyPress(e)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(e){var t=this._get(e,"timepicker");if(t){var i=t._defaults.altField;if(i){var s=(t._defaults.altFormat||t._defaults.dateFormat,this._getDate(e)),a=$.datepicker._getFormatConfig(e),n="",r=t._defaults.altSeparator?t._defaults.altSeparator:t._defaults.separator,l=t._defaults.altTimeSuffix?t._defaults.altTimeSuffix:t._defaults.timeSuffix,o=null!==t._defaults.altTimeFormat?t._defaults.altTimeFormat:t._defaults.timeFormat;n+=$.datepicker.formatTime(o,t,t._defaults)+l,t._defaults.timeOnly||t._defaults.altFieldTimeOnly||null===s||(n=t._defaults.altFormat?$.datepicker.formatDate(t._defaults.altFormat,s,a)+r+n:t.formattedDate+r+n),$(i).val(e.input.val()?n:"")}}else $.datepicker._base_updateAlternate(e)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!==t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(s){$.timepicker.log(s)}return $.datepicker._base_doKeyUp(e)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(e){var t=this._getInst($(e)[0]);t.dpDiv,this._base_gotoToday(e);var i=this._get(t,"timepicker");selectLocalTimezone(i);var s=new Date;this._setTime(t,s),this._setDate(t,s)},$.datepicker._disableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!1,i._defaults.showTimepicker=!1,i._updateDateTime(t))}},$.datepicker._enableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!0,i._defaults.showTimepicker=!0,i._addTimePicker(t),i._updateDateTime(t))}},$.datepicker._setTime=function(e,t){var i=this._get(e,"timepicker");if(i){var s=i._defaults;
5
  i.hour=t?t.getHours():s.hour,i.minute=t?t.getMinutes():s.minute,i.second=t?t.getSeconds():s.second,i.millisec=t?t.getMilliseconds():s.millisec,i.microsec=t?t.getMicroseconds():s.microsec,i._limitMinMaxDateTime(e,!0),i._onTimeChange(),i._updateDateTime(e)}},$.datepicker._setTimeDatepicker=function(e,t,i){var s=this._getInst(e);if(s){var a=this._get(s,"timepicker");if(a){this._setDateFromField(s);var n;t&&("string"==typeof t?(a._parseTime(t,i),n=new Date,n.setHours(a.hour,a.minute,a.second,a.millisec),n.setMicroseconds(a.microsec)):(n=new Date(t.getTime()),n.setMicroseconds(t.getMicroseconds())),"Invalid Date"==""+n&&(n=void 0),this._setTime(s,n))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(e,t){var i=this._getInst(e),s=t;if(i){"string"==typeof t&&(s=new Date(t),s.getTime()||(this._base_setDateDatepicker.apply(this,arguments),s=$(e).datepicker("getDate")));var a,n=this._get(i,"timepicker");s instanceof Date?(a=new Date(s.getTime()),a.setMicroseconds(s.getMicroseconds())):a=s,n&&a&&(n.support.timezone||null!==n._defaults.timezone||(n.timezone=-1*a.getTimezoneOffset()),s=$.timepicker.timezoneAdjust(s,n.timezone),a=$.timepicker.timezoneAdjust(a,n.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(e,a,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(e,t){var i=this._getInst(e);if(i){var s=this._get(i,"timepicker");if(s){void 0===i.lastVal&&this._setDateFromField(i,t);var a=this._getDate(i);return a&&s._parseTime($(e).val(),s.timeOnly)&&(a.setHours(s.hour,s.minute,s.second,s.millisec),a.setMicroseconds(s.microsec),null!=s.timezone&&(s.support.timezone||null!==s._defaults.timezone||(s.timezone=-1*a.getTimezoneOffset()),a=$.timepicker.timezoneAdjust(a,s.timezone))),a}return this._base_getDateDatepicker(e,t)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,t,i){var s;try{s=this._base_parseDate(e,t,i)}catch(a){if(!(a.indexOf(":")>=0))throw a;s=this._base_parseDate(e,t.substring(0,t.length-(a.length-a.indexOf(":")-2)),i),$.timepicker.log("Error parsing the date string: "+a+"\ndate string = "+t+"\ndate format = "+e)}return s},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(e){var t=this._get(e,"timepicker");return t?(t._updateDateTime(e),t.$input.val()):this._base_formatDate(e)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(e,t,i){var s,a=this._getInst(e);if(!a)return null;var n=this._get(a,"timepicker");if(n){var r,l,o,c,u=null,m=null,d=null,h=n._defaults.evnts,p={};if("string"==typeof t){if("minDate"===t||"minDateTime"===t)u=i;else if("maxDate"===t||"maxDateTime"===t)m=i;else if("onSelect"===t)d=i;else if(h.hasOwnProperty(t)){if(i===void 0)return h[t];p[t]=i,s={}}}else if("object"==typeof t){t.minDate?u=t.minDate:t.minDateTime?u=t.minDateTime:t.maxDate?m=t.maxDate:t.maxDateTime&&(m=t.maxDateTime);for(r in h)h.hasOwnProperty(r)&&t[r]&&(p[r]=t[r])}for(r in p)p.hasOwnProperty(r)&&(h[r]=p[r],s||(s=$.extend({},t)),delete s[r]);if(s&&isEmptyObject(s))return;if(u?(u=0===u?new Date:new Date(u),n._defaults.minDate=u,n._defaults.minDateTime=u):m?(m=0===m?new Date:new Date(m),n._defaults.maxDate=m,n._defaults.maxDateTime=m):d&&(n._defaults.onSelect=d),u||m)return c=$(e),o=c.datetimepicker("getDate"),l=this._base_optionDatepicker.call($.datepicker,e,s||t,i),c.datetimepicker("setDate",o),l}return void 0===i?this._base_optionDatepicker.call($.datepicker,e,t):this._base_optionDatepicker.call($.datepicker,e,s||t,i)};var isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0},extendRemove=function(e,t){$.extend(e,t);for(var i in t)(null===t[i]||void 0===t[i])&&(e[i]=t[i]);return e},detectSupport=function(e){var t=e.replace(/'.*?'/g,"").toLowerCase(),i=function(e,t){return-1!==e.indexOf(t)?!0:!1};return{hour:i(t,"h"),minute:i(t,"m"),second:i(t,"s"),millisec:i(t,"l"),microsec:i(t,"c"),timezone:i(t,"z"),ampm:i(t,"t")&&i(e,"h"),iso8601:i(e,"Z")}},convert24to12=function(e){return e%=12,0===e&&(e=12),e+""},computeEffectiveSetting=function(e,t){return e&&e[t]?e[t]:$.timepicker._defaults[t]},splitDateTime=function(e,t){var i=computeEffectiveSetting(t,"separator"),s=computeEffectiveSetting(t,"timeFormat"),a=s.split(i),n=a.length,r=e.split(i),l=r.length;return l>1?{dateString:r.splice(0,l-n).join(i),timeString:r.splice(0,n).join(i)}:{dateString:e,timeString:""}},parseDateTimeInternal=function(e,t,i,s,a){var n,r,l;if(r=splitDateTime(i,a),n=$.datepicker._base_parseDate(e,r.dateString,s),""===r.timeString)return{date:n};if(l=$.datepicker.parseTime(t,r.timeString,a),!l)throw"Wrong time format";return{date:n,timeObj:l}},selectLocalTimezone=function(e,t){if(e&&e.timezone_select){var i=t||new Date;e.timezone_select.val(-i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(e,t){if(isNaN(e)||e>840||-720>e)return e;var i=e,s=i%60,a=(i-s)/60,n=t?":":"",r=(i>=0?"+":"-")+("0"+Math.abs(a)).slice(-2)+n+("0"+Math.abs(s)).slice(-2);return"+00:00"===r?"Z":r},$.timepicker.timezoneOffsetNumber=function(e){var t=(""+e).replace(":","");return"Z"===t.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(t)?("-"===t.substr(0,1)?-1:1)*(60*parseInt(t.substr(1,2),10)+parseInt(t.substr(3,2),10)):e},$.timepicker.timezoneAdjust=function(e,t){var i=$.timepicker.timezoneOffsetNumber(t);return isNaN(i)||e.setMinutes(e.getMinutes()+-e.getTimezoneOffset()-i),e},$.timepicker.timeRange=function(e,t,i){return $.timepicker.handleRange("timepicker",e,t,i)},$.timepicker.datetimeRange=function(e,t,i){$.timepicker.handleRange("datetimepicker",e,t,i)},$.timepicker.dateRange=function(e,t,i){$.timepicker.handleRange("datepicker",e,t,i)},$.timepicker.handleRange=function(e,t,i,s){function a(a,n){var r=t[e]("getDate"),l=i[e]("getDate"),o=a[e]("getDate");if(null!==r){var c=new Date(r.getTime()),u=new Date(r.getTime());c.setMilliseconds(c.getMilliseconds()+s.minInterval),u.setMilliseconds(u.getMilliseconds()+s.maxInterval),s.minInterval>0&&c>l?i[e]("setDate",c):s.maxInterval>0&&l>u?i[e]("setDate",u):r>l&&n[e]("setDate",o)}}function n(t,i,a){if(t.val()){var n=t[e].call(t,"getDate");null!==n&&s.minInterval>0&&("minDate"===a&&n.setMilliseconds(n.getMilliseconds()+s.minInterval),"maxDate"===a&&n.setMilliseconds(n.getMilliseconds()-s.minInterval)),n.getTime&&i[e].call(i,"option",a,n)}}s=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},s);var r=!1;return"timepicker"===e&&(r=!0,e="datetimepicker"),$.fn[e].call(t,$.extend({timeOnly:r,onClose:function(){a($(this),i)},onSelect:function(){n($(this),i,"minDate")}},s,s.start)),$.fn[e].call(i,$.extend({timeOnly:r,onClose:function(){a($(this),t)},onSelect:function(){n($(this),t,"maxDate")}},s,s.end)),a(t,i),n(t,i,"minDate"),n(i,t,"maxDate"),$([t.get(0),i.get(0)])},$.timepicker.log=function(){window.console&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments))},$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal},Date.prototype.getMicroseconds||(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(e){return this.setMilliseconds(this.getMilliseconds()+Math.floor(e/1e3)),this.microseconds=e%1e3,this}),$.timepicker.version="1.5.0"}})(jQuery);
1
+ /*! jQuery Timepicker Addon - v1.5.0 - 2014-09-01
2
+ * http://trentrichardson.com/examples/timepicker
3
+ * Copyright (c) 2014 Trent Richardson; Licensed MIT */
4
+ (function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.5.0"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",defaultValue:null,parse:"strict"},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}overrides={beforeShow:function(e,t){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],e,t,tp_inst):void 0},onChangeMonthYear:function(e,t,i){tp_inst._updateDateTime(i),$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],e,t,i,tp_inst)},onClose:function(e,t){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(t),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],e,t,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(e){return e.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(e){return e.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&$.ui.slider===void 0&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField),tp_inst._defaults.altRedirectFocus===!0&&tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),(0===tp_inst._defaults.minDate||0===tp_inst._defaults.minDateTime)&&(tp_inst._defaults.minDate=new Date),(0===tp_inst._defaults.maxDate||0===tp_inst._defaults.maxDateTime)&&(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(e){var t=this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var s=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!s.timeObj)return!1;$.extend(this,s.timeObj)}catch(a){return $.timepicker.log("Error parsing the date/time string: "+a+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var n=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return n?($.extend(this,n),!0):!1},_injectTimePicker:function(){var e=this.inst.dpDiv,t=this.inst.settings,i=this,s="",a="",n=null,r={},l={},o=null,c=0,u=0;if(0===e.find("div.ui-timepicker-div").length&&t.showTimepicker){var m=' style="display:none;"',d='<div class="ui-timepicker-div'+(t.isRTL?" ui-timepicker-rtl":"")+'"><dl>'+'<dt class="ui_tpicker_time_label"'+(t.showTime?"":m)+">"+t.timeText+"</dt>"+'<dd class="ui_tpicker_time"'+(t.showTime?"":m)+"></dd>";for(c=0,u=this.units.length;u>c;c++){if(s=this.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],r[s]=parseInt(t[s+"Max"]-(t[s+"Max"]-t[s+"Min"])%t["step"+a],10),l[s]=0,d+='<dt class="ui_tpicker_'+s+'_label"'+(n?"":m)+">"+t[s+"Text"]+"</dt>"+'<dd class="ui_tpicker_'+s+'"><div class="ui_tpicker_'+s+'_slider"'+(n?"":m)+"></div>",n&&t[s+"Grid"]>0){if(d+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===s)for(var h=t[s+"Min"];r[s]>=h;h+=parseInt(t[s+"Grid"],10)){l[s]++;var p=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:h},t);d+='<td data-for="'+s+'">'+p+"</td>"}else for(var _=t[s+"Min"];r[s]>=_;_+=parseInt(t[s+"Grid"],10))l[s]++,d+='<td data-for="'+s+'">'+(10>_?"0":"")+_+"</td>";d+="</tr></table></div>"}d+="</dd>"}var f=null!==t.showTimezone?t.showTimezone:this.support.timezone;d+='<dt class="ui_tpicker_timezone_label"'+(f?"":m)+">"+t.timezoneText+"</dt>",d+='<dd class="ui_tpicker_timezone" '+(f?"":m)+"></dd>",d+="</dl></div>";var g=$(d);for(t.timeOnly===!0&&(g.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+t.timeOnlyTitle+"</div>"+"</div>"),e.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),c=0,u=i.units.length;u>c;c++)s=i.units[c],a=s.substr(0,1).toUpperCase()+s.substr(1),n=null!==t["show"+a]?t["show"+a]:this.support[s],i[s+"_slider"]=i.control.create(i,g.find(".ui_tpicker_"+s+"_slider"),s,i[s],t[s+"Min"],r[s],t["step"+a]),n&&t[s+"Grid"]>0&&(o=100*l[s]*t[s+"Grid"]/(r[s]-t[s+"Min"]),g.find(".ui_tpicker_"+s+" table").css({width:o+"%",marginLeft:t.isRTL?"0":o/(-2*l[s])+"%",marginRight:t.isRTL?o/(-2*l[s])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(){var e=$(this),t=e.html(),a=parseInt(t.replace(/[^0-9]/g),10),n=t.replace(/[^apm]/gi),r=e.data("for");"hour"===r&&(-1!==n.indexOf("p")&&12>a?a+=12:-1!==n.indexOf("a")&&12===a&&(a=0)),i.control.value(i,i[r+"_slider"],s,a),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/l[s]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=g.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(t.timezoneList,function(e){return $("<option />").val("object"==typeof e?e.value:e).text("object"==typeof e?e.label:e)})),this.timezone!==void 0&&null!==this.timezone&&""!==this.timezone){var M=-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset();M===this.timezone?selectLocalTimezone(i):this.timezone_select.val(this.timezone)}else this.hour!==void 0&&null!==this.hour&&""!==this.hour?this.timezone_select.val(t.timezone):selectLocalTimezone(i);this.timezone_select.change(function(){i._onTimeChange(),i._onSelectHandler()});var v=e.find(".ui-datepicker-buttonpane");if(v.length?v.before(g):e.append(g),this.$timeObj=g.find(".ui_tpicker_time"),null!==this.inst){var k=this.timeDefined;this._onTimeChange(),this.timeDefined=k}if(this._defaults.addSliderAccess){var T=this._defaults.sliderAccessArgs,D=this._defaults.isRTL;T.isRTL=D,setTimeout(function(){if(0===g.find(".ui-slider-access").length){g.find(".ui-slider:visible").sliderAccess(T);var e=g.find(".ui-slider-access:eq(0)").outerWidth(!0);e&&g.find("table:visible").each(function(){var t=$(this),i=t.outerWidth(),s=(""+t.css(D?"marginRight":"marginLeft")).replace("%",""),a=i-e,n=s*a/i+"%",r={width:a,marginRight:0,marginLeft:0};r[D?"marginRight":"marginLeft"]=n,t.css(r)})}},10)}i._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(e,t){var i=this._defaults,s=new Date(e.selectedYear,e.selectedMonth,e.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(e,"minDateTime")&&void 0!==$.datepicker._get(e,"minDateTime")&&s){var a=$.datepicker._get(e,"minDateTime"),n=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);(null===this.hourMinOriginal||null===this.minuteMinOriginal||null===this.secondMinOriginal||null===this.millisecMinOriginal||null===this.microsecMinOriginal)&&(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),e.settings.timeOnly||n.getTime()===s.getTime()?(this._defaults.hourMin=a.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=a.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=a.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=a.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=a.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(e,"maxDateTime")&&void 0!==$.datepicker._get(e,"maxDateTime")&&s){var r=$.datepicker._get(e,"maxDateTime"),l=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0,0);(null===this.hourMaxOriginal||null===this.minuteMaxOriginal||null===this.secondMaxOriginal||null===this.millisecMaxOriginal)&&(this.hourMaxOriginal=i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),e.settings.timeOnly||l.getTime()===s.getTime()?(this._defaults.hourMax=r.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=r.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=r.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=r.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=r.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(null!==e.settings.minTime){var o=new Date("01/01/1970 "+e.settings.minTime);this.hour<o.getHours()?(this.hour=this._defaults.hourMin=o.getHours(),this.minute=this._defaults.minuteMin=o.getMinutes()):this.hour===o.getHours()&&this.minute<o.getMinutes()?this.minute=this._defaults.minuteMin=o.getMinutes():this._defaults.hourMin<o.getHours()?(this._defaults.hourMin=o.getHours(),this._defaults.minuteMin=o.getMinutes()):this._defaults.minuteMin=this._defaults.hourMin===o.getHours()===this.hour&&this._defaults.minuteMin<o.getMinutes()?o.getMinutes():0}if(null!==e.settings.maxTime){var c=new Date("01/01/1970 "+e.settings.maxTime);this.hour>c.getHours()?(this.hour=this._defaults.hourMax=c.getHours(),this.minute=this._defaults.minuteMax=c.getMinutes()):this.hour===c.getHours()&&this.minute>c.getMinutes()?this.minute=this._defaults.minuteMax=c.getMinutes():this._defaults.hourMax>c.getHours()?(this._defaults.hourMax=c.getHours(),this._defaults.minuteMax=c.getMinutes()):this._defaults.minuteMax=this._defaults.hourMax===c.getHours()===this.hour&&this._defaults.minuteMax>c.getMinutes()?c.getMinutes():59}if(void 0!==t&&t===!0){var u=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),m=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),d=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),h=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),p=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:u,step:this._defaults.stepHour}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:m,step:this._defaults.stepMinute}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:d,step:this._defaults.stepSecond}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:h,step:this._defaults.stepMillisec}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:p,step:this._defaults.stepMicrosec}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var e=this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,t=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,i=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,s=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,a=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,n=this.timezone_select?this.timezone_select.val():!1,r=this._defaults,l=r.pickerTimeFormat||r.timeFormat,o=r.pickerTimeSuffix||r.timeSuffix;"object"==typeof e&&(e=!1),"object"==typeof t&&(t=!1),"object"==typeof i&&(i=!1),"object"==typeof s&&(s=!1),"object"==typeof a&&(a=!1),"object"==typeof n&&(n=!1),e!==!1&&(e=parseInt(e,10)),t!==!1&&(t=parseInt(t,10)),i!==!1&&(i=parseInt(i,10)),s!==!1&&(s=parseInt(s,10)),a!==!1&&(a=parseInt(a,10)),n!==!1&&(n=""+n);var c=r[12>e?"amNames":"pmNames"][0],u=e!==parseInt(this.hour,10)||t!==parseInt(this.minute,10)||i!==parseInt(this.second,10)||s!==parseInt(this.millisec,10)||a!==parseInt(this.microsec,10)||this.ampm.length>0&&12>e!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&n!==""+this.timezone;u&&(e!==!1&&(this.hour=e),t!==!1&&(this.minute=t),i!==!1&&(this.second=i),s!==!1&&(this.millisec=s),a!==!1&&(this.microsec=a),n!==!1&&(this.timezone=n),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=c),this.formattedTime=$.datepicker.formatTime(r.timeFormat,this,r),this.$timeObj&&(l===r.timeFormat?this.$timeObj.text(this.formattedTime+o):this.$timeObj.text($.datepicker.formatTime(l,this,r)+o)),this.timeDefined=!0,u&&this._updateDateTime()}},_onSelectHandler:function(){var e=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;e&&t&&e.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(e){e=this.inst||e;var t=e.currentYear>0?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(e.selectedYear,e.selectedMonth,e.selectedDay),i=$.datepicker._daylightSavingAdjust(t),s=$.datepicker._get(e,"dateFormat"),a=$.datepicker._getFormatConfig(e),n=null!==i&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(s,null===i?new Date:i,a);var r=this.formattedDate;if(""===e.lastVal&&(e.currentYear=e.selectedYear,e.currentMonth=e.selectedMonth,e.currentDay=e.selectedDay),this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!1?r=this.formattedTime:(this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||n)||this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!0)&&(r+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=r,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(r);var l="",o=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,c=null!==this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(l=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,a):this.formattedDate,l&&(l+=o)),l+=null!==this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+c:this.formattedTime+c,this.$altInput.val(l)}else this.$input.val(r);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var e=$.datepicker._getInst(this.$input.get(0)),t=$.datepicker._get(e,"timepicker");if(t&&t._defaults.timeOnly&&e.input.val()!==e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(i){$.timepicker.log(i)}}},_controls:{slider:{create:function(e,t,i,s,a,n,r){var l=e._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:l?-1*s:s,min:l?-1*n:a,max:l?-1*a:n,step:r,slide:function(t,s){e.control.value(e,$(this),i,l?-1*s.value:s.value),e._onTimeChange()},stop:function(){e._onSelectHandler()}})},options:function(e,t,i,s,a){if(e._defaults.isRTL){if("string"==typeof s)return"min"===s||"max"===s?void 0!==a?t.slider(s,-1*a):Math.abs(t.slider(s)):t.slider(s);var n=s.min,r=s.max;return s.min=s.max=null,void 0!==n&&(s.max=-1*n),void 0!==r&&(s.min=-1*r),t.slider(s)}return"string"==typeof s&&void 0!==a?t.slider(s,a):t.slider(s)},value:function(e,t,i,s){return e._defaults.isRTL?void 0!==s?t.slider("value",-1*s):Math.abs(t.slider("value")):void 0!==s?t.slider("value",s):t.slider("value")}},select:{create:function(e,t,i,s,a,n,r){for(var l='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+i+'" data-min="'+a+'" data-max="'+n+'" data-step="'+r+'">',o=e._defaults.pickerTimeFormat||e._defaults.timeFormat,c=a;n>=c;c+=r)l+='<option value="'+c+'"'+(c===s?" selected":"")+">",l+="hour"===i?$.datepicker.formatTime($.trim(o.replace(/[^ht ]/gi,"")),{hour:c},e._defaults):"millisec"===i||"microsec"===i||c>=10?c:"0"+(""+c),l+="</option>";return l+="</select>",t.children("select").remove(),$(l).appendTo(t).change(function(){e._onTimeChange(),e._onSelectHandler()}),t},options:function(e,t,i,s,a){var n={},r=t.children("select");if("string"==typeof s){if(void 0===a)return r.data(s);n[s]=a}else n=s;return e.control.create(e,t,r.data("unit"),r.val(),n.min||r.data("min"),n.max||r.data("max"),n.step||r.data("step"))},value:function(e,t,i,s){var a=t.children("select");return void 0!==s?a.val(s):a.val()}}}}),$.fn.extend({timepicker:function(e){e=e||{};var t=Array.prototype.slice.call(arguments);return"object"==typeof e&&(t[0]=$.extend(e,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),t)})},datetimepicker:function(e){e=e||{};var t=arguments;return"string"==typeof e?"getDate"===e||"option"===e&&2===t.length&&"string"==typeof t[1]?$.fn.datepicker.apply($(this[0]),t):this.each(function(){var e=$(this);e.datepicker.apply(e,t)}):this.each(function(){var t=$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(e,t,i,s,a){var n=parseDateTimeInternal(e,t,i,s,a);if(n.timeObj){var r=n.timeObj;n.date.setHours(r.hour,r.minute,r.second,r.millisec),n.date.setMicroseconds(r.microsec)}return n.date},$.datepicker.parseTime=function(e,t,i){var s=extendRemove(extendRemove({},$.timepicker._defaults),i||{});-1!==e.replace(/\'.*?\'/g,"").indexOf("Z");var a=function(e,t,i){var s,a=function(e,t){var i=[];return e&&$.merge(i,e),t&&$.merge(i,t),i=$.map(i,function(e){return e.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+i.join("|")+")?"},n=function(e){var t=e.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(t)for(var s=0;t.length>s;s++)-1===i[(""+t[s]).charAt(0)]&&(i[(""+t[s]).charAt(0)]=s+1);return i},r="^"+(""+e).replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){var t=e.length;switch(e.charAt(0).toLowerCase()){case"h":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"m":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"s":return 1===t?"(\\d?\\d)":"(\\d{"+t+"})";case"l":return"(\\d?\\d?\\d)";case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return a(i.amNames,i.pmNames);default:return"("+e.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(e){return"\\"+e})+")?"}}).replace(/\s/g,"\\s?")+i.timeSuffix+"$",l=n(e),o="";s=t.match(RegExp(r,"i"));var c={hour:0,minute:0,second:0,millisec:0,microsec:0};return s?(-1!==l.t&&(void 0===s[l.t]||0===s[l.t].length?(o="",c.ampm=""):(o=-1!==$.inArray(s[l.t].toUpperCase(),i.amNames)?"AM":"PM",c.ampm=i["AM"===o?"amNames":"pmNames"][0])),-1!==l.h&&(c.hour="AM"===o&&"12"===s[l.h]?0:"PM"===o&&"12"!==s[l.h]?parseInt(s[l.h],10)+12:Number(s[l.h])),-1!==l.m&&(c.minute=Number(s[l.m])),-1!==l.s&&(c.second=Number(s[l.s])),-1!==l.l&&(c.millisec=Number(s[l.l])),-1!==l.c&&(c.microsec=Number(s[l.c])),-1!==l.z&&void 0!==s[l.z]&&(c.timezone=$.timepicker.timezoneOffsetNumber(s[l.z])),c):!1},n=function(e,t,i){try{var s=new Date("2012-01-01 "+t);if(isNaN(s.getTime())&&(s=new Date("2012-01-01T"+t),isNaN(s.getTime())&&(s=new Date("01/01/2012 "+t),isNaN(s.getTime()))))throw"Unable to parse time with native Date: "+t;return{hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),millisec:s.getMilliseconds(),microsec:s.getMicroseconds(),timezone:-1*s.getTimezoneOffset()}}catch(n){try{return a(e,t,i)}catch(r){$.timepicker.log("Unable to parse \ntimeString: "+t+"\ntimeFormat: "+e)}}return!1};return"function"==typeof s.parse?s.parse(e,t,s):"loose"===s.parse?n(e,t,s):a(e,t,s)},$.datepicker.formatTime=function(e,t,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),t=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},t);var s=e,a=i.amNames[0],n=parseInt(t.hour,10);return n>11&&(a=i.pmNames[0]),s=s.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){switch(e){case"HH":return("0"+n).slice(-2);case"H":return n;case"hh":return("0"+convert24to12(n)).slice(-2);case"h":return convert24to12(n);case"mm":return("0"+t.minute).slice(-2);case"m":return t.minute;case"ss":return("0"+t.second).slice(-2);case"s":return t.second;case"l":return("00"+t.millisec).slice(-3);case"c":return("00"+t.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!0);case"T":return a.charAt(0).toUpperCase();case"TT":return a.toUpperCase();case"t":return a.charAt(0).toLowerCase();case"tt":return a.toLowerCase();default:return e.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(e,t){var i,s=this._getInst($(e)[0]),a=this._get(s,"timepicker");a&&s.settings.showTimepicker?(a._limitMinMaxDateTime(s,!0),i=s.inline,s.inline=s.stay_open=!0,this._base_selectDate(e,t),s.inline=i,s.stay_open=!1,this._notifyChange(s),this._updateDatepicker(s)):this._base_selectDate(e,t)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(e){var t=e.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==e&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==t||"boolean"==typeof e.stay_open&&e.stay_open!==!1)){this._base_updateDatepicker(e);var i=this._get(e,"timepicker");i&&i._addTimePicker(e)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&$.datepicker._get(t,"constrainInput")){var s=i.support.ampm,a=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=(""+i._defaults.timeFormat).replace(/[hms]/g,"").replace(/TT/g,s?"APM":"").replace(/Tt/g,s?"AaPpMm":"").replace(/tT/g,s?"AaPpMm":"").replace(/T/g,s?"AP":"").replace(/tt/g,s?"apm":"").replace(/t/g,s?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(a?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+n,l=String.fromCharCode(void 0===e.charCode?e.keyCode:e.charCode);return e.ctrlKey||" ">l||!n||r.indexOf(l)>-1}return $.datepicker._base_doKeyPress(e)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(e){var t=this._get(e,"timepicker");if(t){var i=t._defaults.altField;if(i){var s=(t._defaults.altFormat||t._defaults.dateFormat,this._getDate(e)),a=$.datepicker._getFormatConfig(e),n="",r=t._defaults.altSeparator?t._defaults.altSeparator:t._defaults.separator,l=t._defaults.altTimeSuffix?t._defaults.altTimeSuffix:t._defaults.timeSuffix,o=null!==t._defaults.altTimeFormat?t._defaults.altTimeFormat:t._defaults.timeFormat;n+=$.datepicker.formatTime(o,t,t._defaults)+l,t._defaults.timeOnly||t._defaults.altFieldTimeOnly||null===s||(n=t._defaults.altFormat?$.datepicker.formatDate(t._defaults.altFormat,s,a)+r+n:t.formattedDate+r+n),$(i).val(e.input.val()?n:"")}}else $.datepicker._base_updateAlternate(e)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!==t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(s){$.timepicker.log(s)}return $.datepicker._base_doKeyUp(e)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(e){var t=this._getInst($(e)[0]);t.dpDiv,this._base_gotoToday(e);var i=this._get(t,"timepicker");selectLocalTimezone(i);var s=new Date;this._setTime(t,s),this._setDate(t,s)},$.datepicker._disableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!1,i._defaults.showTimepicker=!1,i._updateDateTime(t))}},$.datepicker._enableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!0,i._defaults.showTimepicker=!0,i._addTimePicker(t),i._updateDateTime(t))}},$.datepicker._setTime=function(e,t){var i=this._get(e,"timepicker");if(i){var s=i._defaults;
5
  i.hour=t?t.getHours():s.hour,i.minute=t?t.getMinutes():s.minute,i.second=t?t.getSeconds():s.second,i.millisec=t?t.getMilliseconds():s.millisec,i.microsec=t?t.getMicroseconds():s.microsec,i._limitMinMaxDateTime(e,!0),i._onTimeChange(),i._updateDateTime(e)}},$.datepicker._setTimeDatepicker=function(e,t,i){var s=this._getInst(e);if(s){var a=this._get(s,"timepicker");if(a){this._setDateFromField(s);var n;t&&("string"==typeof t?(a._parseTime(t,i),n=new Date,n.setHours(a.hour,a.minute,a.second,a.millisec),n.setMicroseconds(a.microsec)):(n=new Date(t.getTime()),n.setMicroseconds(t.getMicroseconds())),"Invalid Date"==""+n&&(n=void 0),this._setTime(s,n))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(e,t){var i=this._getInst(e),s=t;if(i){"string"==typeof t&&(s=new Date(t),s.getTime()||(this._base_setDateDatepicker.apply(this,arguments),s=$(e).datepicker("getDate")));var a,n=this._get(i,"timepicker");s instanceof Date?(a=new Date(s.getTime()),a.setMicroseconds(s.getMicroseconds())):a=s,n&&a&&(n.support.timezone||null!==n._defaults.timezone||(n.timezone=-1*a.getTimezoneOffset()),s=$.timepicker.timezoneAdjust(s,n.timezone),a=$.timepicker.timezoneAdjust(a,n.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(e,a,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(e,t){var i=this._getInst(e);if(i){var s=this._get(i,"timepicker");if(s){void 0===i.lastVal&&this._setDateFromField(i,t);var a=this._getDate(i);return a&&s._parseTime($(e).val(),s.timeOnly)&&(a.setHours(s.hour,s.minute,s.second,s.millisec),a.setMicroseconds(s.microsec),null!=s.timezone&&(s.support.timezone||null!==s._defaults.timezone||(s.timezone=-1*a.getTimezoneOffset()),a=$.timepicker.timezoneAdjust(a,s.timezone))),a}return this._base_getDateDatepicker(e,t)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,t,i){var s;try{s=this._base_parseDate(e,t,i)}catch(a){if(!(a.indexOf(":")>=0))throw a;s=this._base_parseDate(e,t.substring(0,t.length-(a.length-a.indexOf(":")-2)),i),$.timepicker.log("Error parsing the date string: "+a+"\ndate string = "+t+"\ndate format = "+e)}return s},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(e){var t=this._get(e,"timepicker");return t?(t._updateDateTime(e),t.$input.val()):this._base_formatDate(e)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(e,t,i){var s,a=this._getInst(e);if(!a)return null;var n=this._get(a,"timepicker");if(n){var r,l,o,c,u=null,m=null,d=null,h=n._defaults.evnts,p={};if("string"==typeof t){if("minDate"===t||"minDateTime"===t)u=i;else if("maxDate"===t||"maxDateTime"===t)m=i;else if("onSelect"===t)d=i;else if(h.hasOwnProperty(t)){if(i===void 0)return h[t];p[t]=i,s={}}}else if("object"==typeof t){t.minDate?u=t.minDate:t.minDateTime?u=t.minDateTime:t.maxDate?m=t.maxDate:t.maxDateTime&&(m=t.maxDateTime);for(r in h)h.hasOwnProperty(r)&&t[r]&&(p[r]=t[r])}for(r in p)p.hasOwnProperty(r)&&(h[r]=p[r],s||(s=$.extend({},t)),delete s[r]);if(s&&isEmptyObject(s))return;if(u?(u=0===u?new Date:new Date(u),n._defaults.minDate=u,n._defaults.minDateTime=u):m?(m=0===m?new Date:new Date(m),n._defaults.maxDate=m,n._defaults.maxDateTime=m):d&&(n._defaults.onSelect=d),u||m)return c=$(e),o=c.datetimepicker("getDate"),l=this._base_optionDatepicker.call($.datepicker,e,s||t,i),c.datetimepicker("setDate",o),l}return void 0===i?this._base_optionDatepicker.call($.datepicker,e,t):this._base_optionDatepicker.call($.datepicker,e,s||t,i)};var isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0},extendRemove=function(e,t){$.extend(e,t);for(var i in t)(null===t[i]||void 0===t[i])&&(e[i]=t[i]);return e},detectSupport=function(e){var t=e.replace(/'.*?'/g,"").toLowerCase(),i=function(e,t){return-1!==e.indexOf(t)?!0:!1};return{hour:i(t,"h"),minute:i(t,"m"),second:i(t,"s"),millisec:i(t,"l"),microsec:i(t,"c"),timezone:i(t,"z"),ampm:i(t,"t")&&i(e,"h"),iso8601:i(e,"Z")}},convert24to12=function(e){return e%=12,0===e&&(e=12),e+""},computeEffectiveSetting=function(e,t){return e&&e[t]?e[t]:$.timepicker._defaults[t]},splitDateTime=function(e,t){var i=computeEffectiveSetting(t,"separator"),s=computeEffectiveSetting(t,"timeFormat"),a=s.split(i),n=a.length,r=e.split(i),l=r.length;return l>1?{dateString:r.splice(0,l-n).join(i),timeString:r.splice(0,n).join(i)}:{dateString:e,timeString:""}},parseDateTimeInternal=function(e,t,i,s,a){var n,r,l;if(r=splitDateTime(i,a),n=$.datepicker._base_parseDate(e,r.dateString,s),""===r.timeString)return{date:n};if(l=$.datepicker.parseTime(t,r.timeString,a),!l)throw"Wrong time format";return{date:n,timeObj:l}},selectLocalTimezone=function(e,t){if(e&&e.timezone_select){var i=t||new Date;e.timezone_select.val(-i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(e,t){if(isNaN(e)||e>840||-720>e)return e;var i=e,s=i%60,a=(i-s)/60,n=t?":":"",r=(i>=0?"+":"-")+("0"+Math.abs(a)).slice(-2)+n+("0"+Math.abs(s)).slice(-2);return"+00:00"===r?"Z":r},$.timepicker.timezoneOffsetNumber=function(e){var t=(""+e).replace(":","");return"Z"===t.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(t)?("-"===t.substr(0,1)?-1:1)*(60*parseInt(t.substr(1,2),10)+parseInt(t.substr(3,2),10)):e},$.timepicker.timezoneAdjust=function(e,t){var i=$.timepicker.timezoneOffsetNumber(t);return isNaN(i)||e.setMinutes(e.getMinutes()+-e.getTimezoneOffset()-i),e},$.timepicker.timeRange=function(e,t,i){return $.timepicker.handleRange("timepicker",e,t,i)},$.timepicker.datetimeRange=function(e,t,i){$.timepicker.handleRange("datetimepicker",e,t,i)},$.timepicker.dateRange=function(e,t,i){$.timepicker.handleRange("datepicker",e,t,i)},$.timepicker.handleRange=function(e,t,i,s){function a(a,n){var r=t[e]("getDate"),l=i[e]("getDate"),o=a[e]("getDate");if(null!==r){var c=new Date(r.getTime()),u=new Date(r.getTime());c.setMilliseconds(c.getMilliseconds()+s.minInterval),u.setMilliseconds(u.getMilliseconds()+s.maxInterval),s.minInterval>0&&c>l?i[e]("setDate",c):s.maxInterval>0&&l>u?i[e]("setDate",u):r>l&&n[e]("setDate",o)}}function n(t,i,a){if(t.val()){var n=t[e].call(t,"getDate");null!==n&&s.minInterval>0&&("minDate"===a&&n.setMilliseconds(n.getMilliseconds()+s.minInterval),"maxDate"===a&&n.setMilliseconds(n.getMilliseconds()-s.minInterval)),n.getTime&&i[e].call(i,"option",a,n)}}s=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},s);var r=!1;return"timepicker"===e&&(r=!0,e="datetimepicker"),$.fn[e].call(t,$.extend({timeOnly:r,onClose:function(){a($(this),i)},onSelect:function(){n($(this),i,"minDate")}},s,s.start)),$.fn[e].call(i,$.extend({timeOnly:r,onClose:function(){a($(this),t)},onSelect:function(){n($(this),t,"maxDate")}},s,s.end)),a(t,i),n(t,i,"minDate"),n(i,t,"maxDate"),$([t.get(0),i.get(0)])},$.timepicker.log=function(){window.console&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments))},$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal},Date.prototype.getMicroseconds||(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(e){return this.setMilliseconds(this.getMilliseconds()+Math.floor(e/1e3)),this.microseconds=e%1e3,this}),$.timepicker.version="1.5.0"}})(jQuery);
includes/admin/meta-box/js/map-frontend.js CHANGED
@@ -1,71 +1,71 @@
1
- /* global google, jQuery */
2
-
3
- jQuery( function ( $ )
4
- {
5
- 'use strict';
6
-
7
- /**
8
- * Callback function for Google Maps Lazy Load library to display map
9
- *
10
- * @return void
11
- */
12
- function displayMap()
13
- {
14
- var $container = $( this ),
15
- options = $container.data( 'map_options' );
16
-
17
- var mapOptions = options.js_options,
18
- center = new google.maps.LatLng( options.latitude, options.longitude ),
19
- map;
20
-
21
- switch ( mapOptions.mapTypeId )
22
- {
23
- case 'ROADMAP':
24
- mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP;
25
- break;
26
- case 'SATELLITE':
27
- mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE;
28
- break;
29
- case 'HYBRID':
30
- mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID;
31
- break;
32
- case 'TERRAIN':
33
- mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN;
34
- break;
35
- }
36
- mapOptions.center = center;
37
- map = new google.maps.Map( this, mapOptions );
38
-
39
- // Set marker
40
- if ( options.marker )
41
- {
42
- var marker = new google.maps.Marker( {
43
- position: center,
44
- map : map
45
- } );
46
-
47
- // Set marker title
48
- if ( options.marker_title )
49
- {
50
- marker.setTitle( options.marker_title );
51
- }
52
- }
53
-
54
- // Set info window
55
- if ( options.info_window )
56
- {
57
- var infoWindow = new google.maps.InfoWindow( {
58
- content : options.info_window,
59
- minWidth: 200
60
- } );
61
-
62
- google.maps.event.addListener( marker, 'click', function ()
63
- {
64
- infoWindow.open( map, marker );
65
- } );
66
- }
67
- }
68
-
69
- // Loop through all map instances and display them
70
- $( '.mashsb-rwmb-map-canvas' ).each( displayMap );
71
- } );
1
+ /* global google, jQuery */
2
+
3
+ jQuery( function ( $ )
4
+ {
5
+ 'use strict';
6
+
7
+ /**
8
+ * Callback function for Google Maps Lazy Load library to display map
9
+ *
10
+ * @return void
11
+ */
12
+ function displayMap()
13
+ {
14
+ var $container = $( this ),
15
+ options = $container.data( 'map_options' );
16
+
17
+ var mapOptions = options.js_options,
18
+ center = new google.maps.LatLng( options.latitude, options.longitude ),
19
+ map;
20
+
21
+ switch ( mapOptions.mapTypeId )
22
+ {
23
+ case 'ROADMAP':
24
+ mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP;
25
+ break;
26
+ case 'SATELLITE':
27
+ mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE;
28
+ break;
29
+ case 'HYBRID':
30
+ mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID;
31
+ break;
32
+ case 'TERRAIN':
33
+ mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN;
34
+ break;
35
+ }
36
+ mapOptions.center = center;
37
+ map = new google.maps.Map( this, mapOptions );
38
+
39
+ // Set marker
40
+ if ( options.marker )
41
+ {
42
+ var marker = new google.maps.Marker( {
43
+ position: center,
44
+ map : map
45
+ } );
46
+
47
+ // Set marker title
48
+ if ( options.marker_title )
49
+ {
50
+ marker.setTitle( options.marker_title );
51
+ }
52
+ }
53
+
54
+ // Set info window
55
+ if ( options.info_window )
56
+ {
57
+ var infoWindow = new google.maps.InfoWindow( {
58
+ content : options.info_window,
59
+ minWidth: 200
60
+ } );
61
+
62
+ google.maps.event.addListener( marker, 'click', function ()
63
+ {
64
+ infoWindow.open( map, marker );
65
+ } );
66
+ }
67
+ }
68
+
69
+ // Loop through all map instances and display them
70
+ $( '.mashsb-rwmb-map-canvas' ).each( displayMap );
71
+ } );
includes/admin/meta-box/js/map.js CHANGED
@@ -1,227 +1,227 @@
1
- (function ( $ )
2
- {
3
- 'use strict';
4
-
5
- // Use function construction to store map & DOM elements separately for each instance
6
- var MapField = function ( $container )
7
- {
8
- this.$container = $container;
9
- };
10
-
11
- // Use prototype for better performance
12
- MapField.prototype = {
13
- // Initialize everything
14
- init : function ()
15
- {
16
- this.initDomElements();
17
- this.initMapElements();
18
-
19
- this.initMarkerPosition();
20
- this.addListeners();
21
- this.autocomplete();
22
- },
23
-
24
- // Initialize DOM elements
25
- initDomElements : function ()
26
- {
27
- this.canvas = this.$container.find( '.mashsb-rwmb-map-canvas' )[0];
28
- this.$coordinate = this.$container.find( '.mashsb-rwmb-map-coordinate' );
29
- this.$findButton = this.$container.find( '.mashsb-rwmb-map-goto-address-button' );
30
- this.addressField = this.$findButton.val();
31
- },
32
-
33
- // Initialize map elements
34
- initMapElements : function ()
35
- {
36
- var defaultLoc = $( this.canvas ).data( 'default-loc' ),
37
- latLng;
38
-
39
- defaultLoc = defaultLoc ? defaultLoc.split( ',' ) : [53.346881, -6.258860];
40
- latLng = new google.maps.LatLng( defaultLoc[0], defaultLoc[1] ); // Initial position for map
41
-
42
- this.map = new google.maps.Map( this.canvas, {
43
- center : latLng,
44
- zoom : 14,
45
- streetViewControl: 0,
46
- mapTypeId : google.maps.MapTypeId.ROADMAP
47
- } );
48
- this.marker = new google.maps.Marker( { position: latLng, map: this.map, draggable: true } );
49
- this.geocoder = new google.maps.Geocoder();
50
- },
51
-
52
- // Initialize marker position
53
- initMarkerPosition: function ()
54
- {
55
- var coord = this.$coordinate.val(),
56
- l,
57
- zoom;
58
-
59
- if ( coord )
60
- {
61
- l = coord.split( ',' );
62
- this.marker.setPosition( new google.maps.LatLng( l[0], l[1] ) );
63
-
64
- zoom = l.length > 2 ? parseInt( l[2], 10 ) : 14;
65
-
66
- this.map.setCenter( this.marker.position );
67
- this.map.setZoom( zoom );
68
- }
69
- else if ( this.addressField )
70
- {
71
- this.geocodeAddress();
72
- }
73
- },
74
-
75
- // Add event listeners for 'click' & 'drag'
76
- addListeners : function ()
77
- {
78
- var that = this;
79
- google.maps.event.addListener( this.map, 'click', function ( event )
80
- {
81
- that.marker.setPosition( event.latLng );
82
- that.updateCoordinate( event.latLng );
83
- } );
84
- google.maps.event.addListener( this.marker, 'drag', function ( event )
85
- {
86
- that.updateCoordinate( event.latLng );
87
- } );
88
-
89
- this.$findButton.on( 'click', function ()
90
- {
91
- that.geocodeAddress();
92
- return false;
93
- } );
94
-
95
- /**
96
- * Add a custom event that allows other scripts to refresh the maps when needed
97
- * For example: when maps is in tabs or hidden div (this is known issue of Google Maps)
98
- *
99
- * @see https://developers.google.com/maps/documentation/javascript/reference
100
- * ('resize' Event)
101
- */
102
- $( window ).on( 'rwmb_map_refresh', function()
103
- {
104
- that.refreshMap();
105
- } );
106
-
107
- //Refresh on meta box hide and show
108
- $( document ).on( 'postbox-toggled', function() {
109
- that.refreshMap();
110
- } );
111
- },
112
-
113
- refreshMap: function()
114
- {
115
- var zoom = this.map.getZoom(),
116
- center = this.map.getCenter();
117
-
118
- if ( this.map )
119
- {
120
- google.maps.event.trigger( this.map, 'resize' );
121
- this.map.setZoom( zoom );
122
- this.map.setCenter( center );
123
- }
124
- },
125
-
126
- // Autocomplete address
127
- autocomplete : function ()
128
- {
129
- var that = this;
130
-
131
- // No address field or more than 1 address fields, ignore
132
- if ( !this.addressField || this.addressField.split( ',' ).length > 1 )
133
- {
134
- return;
135
- }
136
-
137
- $( '#' + this.addressField ).autocomplete( {
138
- source: function ( request, response )
139
- {
140
- that.geocoder.geocode( {
141
- 'address': request.term
142
- }, function ( results )
143
- {
144
- response( $.map( results, function ( item )
145
- {
146
- return {
147
- label : item.formatted_address,
148
- value : item.formatted_address,
149
- latitude : item.geometry.location.lat(),
150
- longitude: item.geometry.location.lng()
151
- };
152
- } ) );
153
- } );
154
- },
155
- select: function ( event, ui )
156
- {
157
- var latLng = new google.maps.LatLng( ui.item.latitude, ui.item.longitude );
158
-
159
- that.map.setCenter( latLng );
160
- that.marker.setPosition( latLng );
161
- that.updateCoordinate( latLng );
162
- }
163
- } );
164
- },
165
-
166
- // Update coordinate to input field
167
- updateCoordinate : function ( latLng )
168
- {
169
- this.$coordinate.val( latLng.lat() + ',' + latLng.lng() );
170
- },
171
-
172
- // Find coordinates by address
173
- // Find coordinates by address
174
- geocodeAddress : function ()
175
- {
176
- var address,
177
- addressList = [],
178
- fieldList = this.addressField.split( ',' ),
179
- loop,
180
- that = this;
181
-
182
- for ( loop = 0; loop < fieldList.length; loop++ )
183
- {
184
- addressList[loop] = jQuery( '#' + fieldList[loop] ).val();
185
- }
186
-
187
- address = addressList.join( ',' ).replace( /\n/g, ',' ).replace( /,,/g, ',' );
188
-
189
- if ( address )
190
- {
191
- this.geocoder.geocode( { 'address': address }, function ( results, status )
192
- {
193
- if ( status === google.maps.GeocoderStatus.OK )
194
- {
195
- that.map.setCenter( results[0].geometry.location );
196
- that.marker.setPosition( results[0].geometry.location );
197
- that.updateCoordinate( results[0].geometry.location );
198
- }
199
- } );
200
- }
201
- }
202
- };
203
-
204
- $( function ()
205
- {
206
- $( '.mashsb-rwmb-map-field' ).each( function ()
207
- {
208
- var field = new MapField( $( this ) );
209
- field.init();
210
-
211
- $( this ).data( 'mapController', field );
212
-
213
- } );
214
-
215
- $( '.mashsb-rwmb-input' ).on( 'clone', function ()
216
- {
217
- $( '.mashsb-rwmb-map-field' ).each( function ()
218
- {
219
- var field = new MapField( $( this ) );
220
- field.init();
221
-
222
- $( this ).data( 'mapController', field );
223
- } );
224
- } );
225
- } );
226
-
227
- })( jQuery );
1
+ (function ( $ )
2
+ {
3
+ 'use strict';
4
+
5
+ // Use function construction to store map & DOM elements separately for each instance
6
+ var MapField = function ( $container )
7
+ {
8
+ this.$container = $container;
9
+ };
10
+
11
+ // Use prototype for better performance
12
+ MapField.prototype = {
13
+ // Initialize everything
14
+ init : function ()
15
+ {
16
+ this.initDomElements();
17
+ this.initMapElements();
18
+
19
+ this.initMarkerPosition();
20
+ this.addListeners();
21
+ this.autocomplete();
22
+ },
23
+
24
+ // Initialize DOM elements
25
+ initDomElements : function ()
26
+ {
27
+ this.canvas = this.$container.find( '.mashsb-rwmb-map-canvas' )[0];
28
+ this.$coordinate = this.$container.find( '.mashsb-rwmb-map-coordinate' );
29
+ this.$findButton = this.$container.find( '.mashsb-rwmb-map-goto-address-button' );
30
+ this.addressField = this.$findButton.val();
31
+ },
32
+
33
+ // Initialize map elements
34
+ initMapElements : function ()
35
+ {
36
+ var defaultLoc = $( this.canvas ).data( 'default-loc' ),
37
+ latLng;
38
+
39
+ defaultLoc = defaultLoc ? defaultLoc.split( ',' ) : [53.346881, -6.258860];
40
+ latLng = new google.maps.LatLng( defaultLoc[0], defaultLoc[1] ); // Initial position for map
41
+
42
+ this.map = new google.maps.Map( this.canvas, {
43
+ center : latLng,
44
+ zoom : 14,
45
+ streetViewControl: 0,
46
+ mapTypeId : google.maps.MapTypeId.ROADMAP
47
+ } );
48
+ this.marker = new google.maps.Marker( { position: latLng, map: this.map, draggable: true } );
49
+ this.geocoder = new google.maps.Geocoder();
50
+ },
51
+
52
+ // Initialize marker position
53
+ initMarkerPosition: function ()
54
+ {
55
+ var coord = this.$coordinate.val(),
56
+ l,
57
+ zoom;
58
+
59
+ if ( coord )
60
+ {
61
+ l = coord.split( ',' );
62
+ this.marker.setPosition( new google.maps.LatLng( l[0], l[1] ) );
63
+
64
+ zoom = l.length > 2 ? parseInt( l[2], 10 ) : 14;
65
+
66
+ this.map.setCenter( this.marker.position );
67
+ this.map.setZoom( zoom );
68
+ }
69
+ else if ( this.addressField )
70
+ {
71
+ this.geocodeAddress();
72
+ }
73
+ },
74
+
75
+ // Add event listeners for 'click' & 'drag'
76
+ addListeners : function ()
77
+ {
78
+ var that = this;
79
+ google.maps.event.addListener( this.map, 'click', function ( event )
80
+ {
81
+ that.marker.setPosition( event.latLng );
82
+ that.updateCoordinate( event.latLng );
83
+ } );
84
+ google.maps.event.addListener( this.marker, 'drag', function ( event )
85
+ {
86
+ that.updateCoordinate( event.latLng );
87
+ } );
88
+
89
+ this.$findButton.on( 'click', function ()
90
+ {
91
+ that.geocodeAddress();
92
+ return false;
93
+ } );
94
+
95
+ /**
96
+ * Add a custom event that allows other scripts to refresh the maps when needed
97
+ * For example: when maps is in tabs or hidden div (this is known issue of Google Maps)
98
+ *
99
+ * @see https://developers.google.com/maps/documentation/javascript/reference
100
+ * ('resize' Event)
101
+ */
102
+ $( window ).on( 'rwmb_map_refresh', function()
103
+ {
104
+ that.refreshMap();
105
+ } );
106
+
107
+ //Refresh on meta box hide and show
108
+ $( document ).on( 'postbox-toggled', function() {
109
+ that.refreshMap();
110
+ } );
111
+ },
112
+
113
+ refreshMap: function()
114
+ {
115
+ var zoom = this.map.getZoom(),
116
+ center = this.map.getCenter();
117
+
118
+ if ( this.map )
119
+ {
120
+ google.maps.event.trigger( this.map, 'resize' );
121
+ this.map.setZoom( zoom );
122
+ this.map.setCenter( center );
123
+ }
124
+ },
125
+
126
+ // Autocomplete address
127
+ autocomplete : function ()
128
+ {
129
+ var that = this;
130
+
131
+ // No address field or more than 1 address fields, ignore
132
+ if ( !this.addressField || this.addressField.split( ',' ).length > 1 )
133
+ {
134
+ return;
135
+ }
136
+
137
+ $( '#' + this.addressField ).autocomplete( {
138
+ source: function ( request, response )
139
+ {
140
+ that.geocoder.geocode( {
141
+ 'address': request.term
142
+ }, function ( results )
143
+ {
144
+ response( $.map( results, function ( item )
145
+ {
146
+ return {
147
+ label : item.formatted_address,
148
+ value : item.formatted_address,
149
+ latitude : item.geometry.location.lat(),
150
+ longitude: item.geometry.location.lng()
151
+ };
152
+ } ) );
153
+ } );
154
+ },
155
+ select: function ( event, ui )
156
+ {
157
+ var latLng = new google.maps.LatLng( ui.item.latitude, ui.item.longitude );
158
+
159
+ that.map.setCenter( latLng );
160
+ that.marker.setPosition( latLng );
161
+ that.updateCoordinate( latLng );
162
+ }
163
+ } );
164
+ },
165
+
166
+ // Update coordinate to input field
167
+ updateCoordinate : function ( latLng )
168
+ {
169
+ this.$coordinate.val( latLng.lat() + ',' + latLng.lng() );
170
+ },
171
+
172
+ // Find coordinates by address
173
+ // Find coordinates by address
174
+ geocodeAddress : function ()
175
+ {
176
+ var address,
177
+ addressList = [],
178
+ fieldList = this.addressField.split( ',' ),
179
+ loop,
180
+ that = this;
181
+
182
+ for ( loop = 0; loop < fieldList.length; loop++ )
183
+ {
184
+ addressList[loop] = jQuery( '#' + fieldList[loop] ).val();
185
+ }
186
+
187
+ address = addressList.join( ',' ).replace( /\n/g, ',' ).replace( /,,/g, ',' );
188
+
189
+ if ( address )
190
+ {
191
+ this.geocoder.geocode( { 'address': address }, function ( results, status )
192
+ {
193
+ if ( status === google.maps.GeocoderStatus.OK )
194
+ {
195
+ that.map.setCenter( results[0].geometry.location );
196
+ that.marker.setPosition( results[0].geometry.location );
197
+ that.updateCoordinate( results[0].geometry.location );
198
+ }
199
+ } );
200
+ }
201
+ }
202
+ };
203
+
204
+ $( function ()
205
+ {
206
+ $( '.mashsb-rwmb-map-field' ).each( function ()
207
+ {
208
+ var field = new MapField( $( this ) );
209
+ field.init();
210
+
211
+ $( this ).data( 'mapController', field );
212
+
213
+ } );
214
+
215
+ $( '.mashsb-rwmb-input' ).on( 'clone', function ()
216
+ {
217
+ $( '.mashsb-rwmb-map-field' ).each( function ()
218
+ {
219
+ var field = new MapField( $( this ) );
220
+ field.init();
221
+
222
+ $( this ).data( 'mapController', field );
223
+ } );
224
+ } );
225
+ } );
226
+
227
+ })( jQuery );
includes/admin/meta-box/js/media.js CHANGED
@@ -1,451 +1,451 @@
1
- window.rwmb = window.rwmb || {};
2
-
3
- jQuery(function ($)
4
- {
5
- 'use strict';
6
-
7
- var views = rwmb.views = rwmb.views || {},
8
- MediaField, MediaList, MediaItem, MediaButton, MediaStatus;
9
- rwmb.test = 'spoon';
10
-
11
- MediaList = views.MediaList = Backbone.View.extend({
12
- tagName: 'ul',
13
- className: 'mashsb-rwmb-media-list',
14
- addItemView: function (item)
15
- {
16
- if (!this.itemViews[item.cid])
17
- {
18
- this.itemViews[item.cid] = new this.itemView({
19
- model: item,
20
- collection: this.collection,
21
- props: this.props
22
- });
23
- }
24
- this.$el.append(this.itemViews[item.cid].el);
25
- },
26
- render: function ()
27
- {
28
- this.$el.empty();
29
- this.collection.each(this.addItemView);
30
-
31
- },
32
- initialize: function (options)
33
- {
34
- var that = this;
35
- this.itemViews = {};
36
- this.props = options.props;
37
- this.itemView = options.itemView || MediaItem;
38
-
39
- this.listenTo(this.collection, 'add', this.addItemView);
40
-
41
- this.listenTo(this.collection, 'remove', function (item, collection)
42
- {
43
- if (this.itemViews[item.cid])
44
- {
45
- this.itemViews[item.cid].remove();
46
- delete this.itemViews[item.cid];
47
- }
48
- });
49
-
50
- //Sort media using sortable
51
- this.initSort();
52
-
53
- this.render();
54
- },
55
- initSort: function ()
56
- {
57
- this.$el.sortable({delay: 150});
58
- }
59
- });
60
-
61
- MediaField = views.MediaField = Backbone.View.extend({
62
- initialize: function (options)
63
- {
64
- var that = this;
65
- this.$input = $(options.input);
66
- this.values = this.$input.val().split(',');
67
- this.props = new Backbone.Model(this.$el.data());
68
- this.props.set('fieldName', this.$input.attr('name'));
69
-
70
- //Create collection
71
- this.collection = new wp.media.model.Attachments();
72
-
73
- //Create views
74
- this.createList();
75
- this.createAddButton()
76
- this.createStatus();
77
-
78
-
79
- //Render
80
- this.render();
81
-
82
- //Limit max files
83
- this.listenTo(this.collection, 'add', function (item, collection)
84
- {
85
- var maxFiles = this.props.get('maxFiles');
86
- if (maxFiles > 0 && this.collection.length > maxFiles)
87
- {
88
- this.collection.pop();
89
- }
90
- //Reset some styles
91
- if (this.collection.length === 1) {
92
- mashsb_reset_new(this);
93
- }
94
- });
95
-
96
-
97
- //Load initial media
98
- if (!_.isEmpty(this.values))
99
- {
100
- this.collection.props.set({
101
- query: true,
102
- include: this.values,
103
- orderby: 'post__in',
104
- order: 'ASC',
105
- type: this.props.get('mimeType'),
106
- perPage: this.props.get('maxFiles') || -1
107
- });
108
- this.collection.more();
109
-
110
- //Reset some styles after initial loading images
111
- if (this.collection.length === 1) {
112
- mashsb_reset_new(this);
113
- }
114
- }
115
-
116
- //Listen for destroy event on input
117
- this.$input
118
- .on('remove', function () {
119
- if (that.props.get('forceDelete'))
120
- {
121
- _.each(_.clone(that.collection.models), function (model)
122
- {
123
- model.destroy();
124
- });
125
- }
126
- })
127
- },
128
- createList: function ()
129
- {
130
- this.list = new MediaList({collection: this.collection, props: this.props});
131
- },
132
- createAddButton: function ()
133
- {
134
- this.addButton = new MediaButton({collection: this.collection, props: this.props});
135
- },
136
- createStatus: function ()
137
- {
138
- this.status = new MediaStatus({collection: this.collection, props: this.props});
139
- },
140
- render: function ()
141
- {
142
- //Empty then add parts
143
- this.$el
144
- .empty()
145
- .append(
146
- this.list.el,
147
- this.addButton.el,
148
- this.status.el
149
- );
150
-
151
- }
152
- });
153
-
154
- MediaStatus = views.MediaStatus = Backbone.View.extend({
155
- tagName: 'span',
156
- className: 'mashsb-rwmb-media-status',
157
- template: wp.template('mashsb-rwmb-media-status'),
158
- initialize: function (options)
159
- {
160
- this.props = options.props;
161
- this.listenTo(this.collection, 'add remove reset', this.render);
162
- this.render();
163
- },
164
- render: function ()
165
- {
166
- var data = {
167
- items: this.collection.length,
168
- maxFiles: this.props.get('maxFiles')
169
- };
170
- this.$el.html(this.template(data));
171
-
172
- }
173
- });
174
-
175
- MediaButton = views.MediaButton = Backbone.View.extend({
176
- className: 'mashsb-rwmb-add-media button',
177
- tagName: 'a',
178
- events: {
179
- click: function ()
180
- {
181
- var models = this.collection.models;
182
-
183
- // Destroy the previous collection frame.
184
- if (this._frame)
185
- {
186
- //this.stopListening( this._frame );
187
- this._frame.dispose();
188
- }
189
-
190
- this._frame = wp.media({
191
- className: 'media-frame mashsb-rwmb-media-frame',
192
- multiple: true,
193
- title: 'Select Media',
194
- editing: true,
195
- library: {
196
- type: this.props.get('mimeType')
197
- }
198
- });
199
-
200
- this._frame.on('select', function ()
201
- {
202
- var selection = this._frame.state().get('selection');
203
- this.collection.add(selection.models);
204
- mashsb_reset_remove(this);
205
- }, this);
206
-
207
- this._frame.open();
208
- }
209
- },
210
- render: function ()
211
- {
212
- this.$el.text(i18nRwmbMedia.add);
213
- return this;
214
- },
215
- initialize: function (options)
216
- {
217
- this.props = options.props;
218
- this.listenTo(this.collection, 'add remove reset', function ()
219
- {
220
- var maxFiles = this.props.get('maxFiles');
221
-
222
- if (maxFiles > 0)
223
- {
224
- this.$el.toggle(this.collection.length < maxFiles);
225
- }
226
- });
227
-
228
- this.render();
229
- }
230
- });
231
-
232
- MediaItem = views.MediaItem = Backbone.View.extend({
233
- tagName: 'li',
234
- className: 'mashsb-rwmb-media-item',
235
- template: wp.template('mashsb-rwmb-media-item'),
236
- initialize: function (options)
237
- {
238
- this.props = options.props;
239
- this.render();
240
- this.listenTo(this.model, 'destroy', function (model)
241
- {
242
- this.collection.remove(this.model);
243
- })
244
- .listenTo(this.model, 'change', function ()
245
- {
246
- this.render();
247
- });
248
- },
249
- events: {
250
- 'click .mashsb-rwmb-remove-media': function (e)
251
- {
252
- this.collection.remove(this.model);
253
- if (this.props.get('forceDelete'))
254
- {
255
- this.model.destroy();
256
- }
257
- mashsb_reset_remove(this);
258
- return false;
259
- }
260
- },
261
- render: function ()
262
- {
263
- var attrs = _.clone(this.model.attributes);
264
- attrs.fieldName = this.props.get('fieldName');
265
- this.$el.html(this.template(attrs));
266
- return this;
267
- }
268
- });
269
-
270
-
271
- /**
272
- * Initialize media fields
273
- * @return void
274
- */
275
- function initMediaField()
276
- {
277
- new MediaField({input: this, el: $(this).siblings('div.mashsb-rwmb-media-view')});
278
- }
279
-
280
-
281
- $(':input.mashsb-rwmb-file_advanced').each(initMediaField);
282
- $('.mashsb-rwmb-input')
283
- .on('clone', ':input.mashsb-rwmb-file_advanced', initMediaField);
284
- });
285
-
286
-
287
- function mashsb_reset_remove(elem) {
288
- console.log(elem);
289
- jQuery(elem.el).prev().css({'height': '100%'});
290
- jQuery(elem.el).prev().css({'background-image': 'none'});
291
- jQuery(elem.el).prev().css({'background-color': '#fff'});
292
- }
293
- function mashsb_reset_new(elem) {
294
- selector = jQuery(elem.el).children('ul');
295
-
296
- selector.css({'height': '100%'});
297
- jQuery(elem.el.firstChild).css({'background-image': 'none'});
298
- jQuery(elem.el.firstChild).css({'background-color': '#fff'});
299
- }
300
-
301
- /**
302
- * Remaining og:title characters
303
- *
304
- * @returns jQuery
305
- */
306
- function mashsb_remaining_og_title() {
307
- var og_title = jQuery('#mashsb_meta .mashsb-og-title textarea').val();
308
- var remaining = 95 - og_title.length;
309
- if (og_title.length > 0 && remaining >= 0) {
310
- jQuery('#mashsb_meta .mashsb-og-title .mashsb_counter').removeClass('mashsb_exceeded');
311
- } else if (og_title.length > 0 && remaining < 0) {
312
- jQuery('#mashsb_meta .mashsb-og-title .mashsb_counter').addClass('mashsb_exceeded');
313
- } else {
314
- jQuery('#mashsb_meta .mashsb-og-title .mashsb_counter').removeClass('mashsb_exceeded');
315
- }
316
- jQuery('#mashsb_meta .mashsb-og-title .mashsb_remaining').html(remaining);
317
- }
318
- /**
319
- * Remaining og:description characters
320
- *
321
- * @returns jQuery
322
- */
323
- function mashsb_remaining_og_desc() {
324
- var og_desc = jQuery('#mashsb_meta .mashsb-og-desc textarea').val();
325
- var remaining = 297 - og_desc.length;
326
- if (og_desc.length > 0 && remaining >= 0) {
327
- jQuery('#mashsb_meta .mashsb-og-desc .mashsb_counter').removeClass('mashsb_exceeded');
328
- } else if (og_desc.length > 0 && remaining < 0) {
329
- jQuery('#mashsb_meta .mashsb-og-desc .mashsb_counter').addClass('mashsb_exceeded');
330
- } else {
331
- jQuery('#mashsb_meta .mashsb-og-desc .mashsb_counter').removeClass('mashsb_exceeded');
332
- }
333
- jQuery('#mashsb_meta .mashsb-og-desc .mashsb_remaining').html(remaining);
334
- }
335
-
336
- /**
337
- * Return the length of tweet
338
- * included a 23 character shortened url
339
- *
340
- * @param string input
341
- * @returns int
342
- */
343
- function mashsb_get_tweet_length(input) {
344
- var url = input.replace(/\(?(?:(http|https|ftp):\/\/)?(?:((?:[^\W\s]|\.|-|[:]{1})+)@{1})?((?:www.)?(?:[^\W\s]|\.|-)+[\.][^\W\s]{2,4}|localhost(?=\/)|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::(\d*))?([\/]?[^\s\?]*[\/]{1})*(?:\/?([^\s\n\?\[\]\{\}\#]*(?:(?=\.)){1}|[^\s\n\?\[\]\{\}\.\#]*)?([\.]{1}[^\s\?\#]*)?)?(?:\?{1}([^\s\n\#\[\]]*))?([\#][^\s\n]*)?\)?/gi, '.......................');
345
- return url.length;
346
- }
347
-
348
- jQuery(function ($) {
349
-
350
- /**
351
- * Remaining twitter characters
352
- *
353
- * @returns jQuery
354
- */
355
- function mashsb_remaining_twitter() {
356
- var tweet = $('#mashsb_meta .mashsb-custom-tweet textarea').val();
357
- var handle = $('#mashsb_twitter_handle').val();
358
- var shortened_post_url = 23; // Twitter is shortening all urls to 23 characters
359
-
360
- if (handle !== 'undefined' && handle.length > 0) {
361
- var remaining = 280 - mashsb_get_tweet_length(tweet) - handle.length - shortened_post_url;
362
- } else {
363
- var remaining = 280 - mashsb_get_tweet_length(tweet) - shortened_post_url;
364
- }
365
- if (tweet.length > 0 && remaining >= 0) {
366
- $('#mashsb_meta .mashsb-custom-tweet .mashsb_counter').removeClass('mashsb_exceeded');
367
- }
368
- if (tweet.length > 0 && remaining < 0) {
369
- $('#mashsb_meta .mashsb-custom-tweet .mashsb_counter').addClass('mashsb_exceeded');
370
- } else {
371
- $('#mashsb_meta .mashsb-custom-tweet .mashsb_counter').removeClass('mashsb_exceeded');
372
- }
373
- $('#mashsb_meta .mashsb-custom-tweet .mashsb_remaining').html(remaining);
374
- }
375
-
376
-
377
- if ($('#mashsb_meta.postbox').length) {
378
-
379
- // counter Social Media Title
380
- $('#mashsb_meta #mashsb_og_title').after('<div class="mashsb_counter"><span class="mashsb_remaining">60</span> Characters Remaining</div>');
381
-
382
- // counter Social Media Description
383
- $('#mashsb_meta #mashsb_og_description').after('<div class="mashsb_counter"><span class="mashsb_remaining">150</span> Characters Remaining</div>');
384
-
385
- // counter Twitter Box
386
- $('#mashsb_meta #mashsb_custom_tweet').after('<div class="mashsb_counter"><span class="mashsb_remaining">118</span> Characters Remaining</div>');
387
-
388
-
389
- mashsb_remaining_og_title();
390
- $('#mashsb_meta .mashsb-og-title textarea').on('input', function () {
391
- mashsb_remaining_og_title();
392
- });
393
-
394
- mashsb_remaining_og_desc();
395
- $('#mashsb_meta .mashsb-og-desc textarea').on('input', function () {
396
- mashsb_remaining_og_desc();
397
- });
398
-
399
- mashsb_remaining_twitter();
400
- $('#mashsb_custom_tweet').on('input', function () {
401
- mashsb_remaining_twitter();
402
- });
403
-
404
-
405
- var og_image_width = $('#mashsb_meta .mashsb-rwmb-field.mashsb-rwmb-image_advanced-wrapper.mashsb-og-image .mashsb-rwmb-input').width();
406
- var og_image_height = og_image_width * (1 / 1.91);
407
-
408
- var pinterest_width = $('#mashsb_meta .mashsb-rwmb-field.mashsb-rwmb-image_advanced-wrapper.mashsb-pinterest-image .mashsb-rwmb-input').width();
409
- var pinterest_height = pinterest_width * (3 / 2);
410
-
411
- $('#mashsb_meta').prepend('<style>#mashsb_meta .mashsb-rwmb-field.mashsb-rwmb-image_advanced-wrapper.mashsb-og-image .mashsb-rwmb-input ul{height:' + og_image_height + 'px;}</style>');
412
- $('#mashsb_meta').prepend('<style>#mashsb_meta .mashsb-rwmb-field.mashsb-rwmb-image_advanced-wrapper.mashsb-pinterest-image .mashsb-rwmb-input ul{height:' + pinterest_height + 'px;}</style>');
413
-
414
- }
415
-
416
-
417
- // show / hide helper description
418
- $('.mashsb-helper').click(function (e) {
419
- e.preventDefault();
420
- var icon = $(this),
421
- bubble = $(this).next();
422
-
423
- // Close any that are already open
424
- $('.mashsb-message').not(bubble).hide();
425
-
426
- var position = icon.position();
427
- if (bubble.hasClass('bottom')) {
428
- bubble.css({
429
- 'left': (position.left - bubble.width() / 2) + 'px',
430
- 'top': (position.top + icon.height() + 9) + 'px'
431
- });
432
- } else {
433
- bubble.css({
434
- 'left': (position.left + icon.width() + 9) + 'px',
435
- 'top': (position.top + icon.height() / 2 - 18) + 'px'
436
- });
437
- }
438
-
439
- bubble.toggle();
440
- e.stopPropagation();
441
- });
442
-
443
- $('body').click(function () {
444
- $('.mashsb-message').hide();
445
- });
446
-
447
- $('.mashsb-message').click(function (e) {
448
- e.stopPropagation();
449
- });
450
-
451
- }(jQuery));
1
+ window.rwmb = window.rwmb || {};
2
+
3
+ jQuery(function ($)
4
+ {
5
+ 'use strict';
6
+
7
+ var views = rwmb.views = rwmb.views || {},
8
+ MediaField, MediaList, MediaItem, MediaButton, MediaStatus;
9
+ rwmb.test = 'spoon';
10
+
11
+ MediaList = views.MediaList = Backbone.View.extend({
12
+ tagName: 'ul',
13
+ className: 'mashsb-rwmb-media-list',
14
+ addItemView: function (item)
15
+ {
16
+ if (!this.itemViews[item.cid])
17
+ {
18
+ this.itemViews[item.cid] = new this.itemView({
19
+ model: item,
20
+ collection: this.collection,
21
+ props: this.props
22
+ });
23
+ }
24
+ this.$el.append(this.itemViews[item.cid].el);
25
+ },
26
+ render: function ()
27
+ {
28
+ this.$el.empty();
29
+ this.collection.each(this.addItemView);
30
+
31
+ },
32
+ initialize: function (options)
33
+ {
34
+ var that = this;
35
+ this.itemViews = {};
36
+ this.props = options.props;
37
+ this.itemView = options.itemView || MediaItem;
38
+
39
+ this.listenTo(this.collection, 'add', this.addItemView);
40
+
41
+ this.listenTo(this.collection, 'remove', function (item, collection)
42
+ {
43
+ if (this.itemViews[item.cid])
44
+ {
45
+ this.itemViews[item.cid].remove();
46
+ delete this.itemViews[item.cid];
47
+ }
48
+ });
49
+
50
+ //Sort media using sortable
51
+ this.initSort();
52
+
53
+ this.render();
54
+ },
55
+ initSort: function ()
56
+ {
57
+ this.$el.sortable({delay: 150});
58
+ }
59
+ });
60
+
61
+ MediaField = views.MediaField = Backbone.View.extend({
62
+ initialize: function (options)
63
+ {
64
+ var that = this;
65
+ this.$input = $(options.input);
66
+ this.values = this.$input.val().split(',');
67
+ this.props = new Backbone.Model(this.$el.data());
68
+ this.props.set('fieldName', this.$input.attr('name'));
69
+
70
+ //Create collection
71
+ this.collection = new wp.media.model.Attachments();
72
+
73
+ //Create views
74
+ this.createList();
75
+ this.createAddButton()
76
+ this.createStatus();
77
+
78
+
79
+ //Render
80
+ this.render();
81
+
82
+ //Limit max files
83
+ this.listenTo(this.collection, 'add', function (item, collection)
84
+ {
85
+ var maxFiles = this.props.get('maxFiles');
86
+ if (maxFiles > 0 && this.collection.length > maxFiles)
87
+ {
88
+ this.collection.pop();
89
+ }
90
+ //Reset some styles
91
+ if (this.collection.length === 1) {
92
+ mashsb_reset_new(this);
93
+ }
94
+ });
95
+
96
+
97
+ //Load initial media
98
+ if (!_.isEmpty(this.values))
99
+ {
100
+ this.collection.props.set({
101
+ query: true,
102
+ include: this.values,
103
+ orderby: 'post__in',
104
+ order: 'ASC',
105
+ type: this.props.get('mimeType'),
106
+ perPage: this.props.get('maxFiles') || -1
107
+ });
108
+ this.collection.more();
109
+
110
+ //Reset some styles after initial loading images
111
+ if (this.collection.length === 1) {
112
+ mashsb_reset_new(this);
113
+ }
114
+ }
115
+
116
+ //Listen for destroy event on input
117
+ this.$input
118
+ .on('remove', function () {
119
+ if (that.props.get('forceDelete'))
120
+ {
121
+ _.each(_.clone(that.collection.models), function (model)
122
+ {
123
+ model.destroy();
124
+ });
125
+ }
126
+ })
127
+ },
128
+ createList: function ()
129
+ {
130
+ this.list = new MediaList({collection: this.collection, props: this.props});
131
+ },
132
+ createAddButton: function ()
133
+ {
134
+ this.addButton = new MediaButton({collection: this.collection, props: this.props});
135
+ },
136
+ createStatus: function ()
137
+ {
138
+ this.status = new MediaStatus({collection: this.collection, props: this.props});
139
+ },
140
+ render: function ()
141
+ {
142
+ //Empty then add parts
143
+ this.$el
144
+ .empty()
145
+ .append(
146
+ this.list.el,
147
+ this.addButton.el,
148
+ this.status.el
149
+ );
150
+
151
+ }
152
+ });
153
+
154
+ MediaStatus = views.MediaStatus = Backbone.View.extend({
155
+ tagName: 'span',
156
+ className: 'mashsb-rwmb-media-status',
157
+ template: wp.template('mashsb-rwmb-media-status'),
158
+ initialize: function (options)
159
+ {
160
+ this.props = options.props;
161
+ this.listenTo(this.collection, 'add remove reset', this.render);
162
+ this.render();
163
+ },
164
+ render: function ()
165
+ {
166
+ var data = {
167
+ items: this.collection.length,
168
+ maxFiles: this.props.get('maxFiles')
169
+ };
170
+ this.$el.html(this.template(data));
171
+
172
+ }
173
+ });
174
+
175
+ MediaButton = views.MediaButton = Backbone.View.extend({
176
+ className: 'mashsb-rwmb-add-media button',
177
+ tagName: 'a',
178
+ events: {
179
+ click: function ()
180
+ {
181
+ var models = this.collection.models;
182
+
183
+ // Destroy the previous collection frame.
184
+ if (this._frame)
185
+ {
186
+ //this.stopListening( this._frame );
187
+ this._frame.dispose();
188
+ }
189
+
190
+ this._frame = wp.media({
191
+ className: 'media-frame mashsb-rwmb-media-frame',
192
+ multiple: true,
193
+ title: 'Select Media',
194
+ editing: true,
195
+ library: {
196
+ type: this.props.get('mimeType')
197
+ }
198
+ });
199
+
200
+ this._frame.on('select', function ()
201
+