Meta Box - Version 4.8.7

Version Description

  • Improvement: Refactor the code to reduce the complexity in the fields' inheritance
  • Improvement: All HTML 5 input types (week, month, etc.) are supported
  • Improvement: Optimize the_value function, use recursive call to reduce nested loop. Sub-fields need to define format_single_value only.
  • Improvement: Use 1 single localization file for jQuery date picker for simplicity
  • Improvement: Add support for custom marker for map field (param marker_icon) in rwmb_meta function
  • Improvement: Add limit option for media fields in rwmb_meta function when retrieving meta value.
  • Improvement: Add rwmb_option_label filter for choice fields (user, post, taxonomy) so users can choose which object field is used as label
  • Improvement: Use WP_User_Query for user field which supports more options for querying
  • Improvement: Optimize code for oembed, also use esc_html__ for better security
  • Improvement: Compatibility with Meta Box Geolocation
  • Fix: Fix first option is auto selected in select_advanced field.
  • Fix: Fix clone issue for color in Meta Box Group extension.
  • Fix: Fix clone issue for image advanced in Meta Box Group extension.
  • Fix: Fix not parsing $args to array in helper functions.
Download this release

Release Info

Developer rilwis
Plugin Icon 128x128 Meta Box
Version 4.8.7
Comparing to
See all releases

Code changes from version 4.8.6 to 4.8.7

Files changed (134) hide show
  1. css/file.css +16 -22
  2. css/image.css +9 -13
  3. inc/core.php +0 -39
  4. inc/field.php +167 -70
  5. inc/fields/checkbox.php +7 -33
  6. inc/fields/choice.php +24 -53
  7. inc/fields/color.php +7 -21
  8. inc/fields/datetime.php +58 -77
  9. inc/fields/email.php +1 -30
  10. inc/fields/fieldset-text.php +52 -26
  11. inc/fields/file-advanced.php +0 -43
  12. inc/fields/file-upload.php +5 -19
  13. inc/fields/file.php +168 -156
  14. inc/fields/hidden.php +0 -22
  15. inc/fields/image-advanced.php +27 -31
  16. inc/fields/image-select.php +7 -54
  17. inc/fields/image-upload.php +9 -14
  18. inc/fields/image.php +34 -165
  19. inc/fields/input-list.php +1 -19
  20. inc/fields/input.php +9 -7
  21. inc/fields/key-value.php +10 -19
  22. inc/fields/media.php +21 -22
  23. inc/fields/multiple-values.php +6 -38
  24. inc/fields/number.php +0 -2
  25. inc/fields/object-choice.php +23 -59
  26. inc/fields/oembed.php +22 -33
  27. inc/fields/password.php +0 -14
  28. inc/fields/plupload-image.php +0 -5
  29. inc/fields/post.php +1 -1
  30. inc/fields/range.php +7 -30
  31. inc/fields/select-advanced.php +10 -36
  32. inc/fields/select-tree.php +1 -1
  33. inc/fields/select.php +2 -2
  34. inc/fields/taxonomy.php +1 -1
  35. inc/fields/text-list.php +33 -41
  36. inc/fields/text.php +0 -2
  37. inc/fields/thickbox-image.php +1 -1
  38. inc/fields/url.php +0 -16
  39. inc/fields/user.php +3 -3
  40. inc/functions.php +5 -3
  41. inc/helper.php +2 -4
  42. inc/loader.php +1 -4
  43. inc/meta-box.php +43 -90
  44. inc/templates/image-advanced.php +29 -29
  45. inc/validation.php +2 -2
  46. inc/walkers/input-list-walker.php +8 -10
  47. inc/walkers/select-tree-walker.php +8 -9
  48. js/color.js +9 -7
  49. js/date.js +10 -1
  50. js/datetime.js +13 -5
  51. js/file.js +40 -12
  52. js/image-advanced.js +2 -4
  53. js/image.js +0 -25
  54. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-af.js +0 -23
  55. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar-DZ.js +0 -23
  56. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar.js +0 -23
  57. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-az.js +0 -23
  58. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-be.js +0 -23
  59. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bg.js +0 -24
  60. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bs.js +0 -23
  61. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ca.js +0 -23
  62. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cs.js +0 -23
  63. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cy-GB.js +0 -23
  64. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-da.js +0 -23
  65. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-de.js +0 -23
  66. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-el.js +0 -23
  67. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-AU.js +0 -23
  68. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-GB.js +0 -23
  69. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-NZ.js +0 -23
  70. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eo.js +0 -23
  71. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-es.js +0 -23
  72. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-et.js +0 -23
  73. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eu.js +0 -23
  74. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fa.js +0 -59
  75. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fi.js +0 -23
  76. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fo.js +0 -23
  77. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CA.js +0 -23
  78. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CH.js +0 -23
  79. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr.js +0 -25
  80. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-gl.js +0 -23
  81. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-he.js +0 -23
  82. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hi.js +0 -23
  83. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hr.js +0 -23
  84. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hu.js +0 -23
  85. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hy.js +0 -23
  86. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-id.js +0 -23
  87. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-is.js +0 -23
  88. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-it.js +0 -23
  89. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ja.js +0 -23
  90. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ka.js +0 -21
  91. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-kk.js +0 -23
  92. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-km.js +0 -23
  93. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ko.js +0 -23
  94. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ky.js +0 -24
  95. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lb.js +0 -23
  96. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lt.js +0 -23
  97. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lv.js +0 -23
  98. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-mk.js +0 -23
  99. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ml.js +0 -23
  100. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ms.js +0 -23
  101. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nb.js +0 -22
  102. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl-BE.js +0 -23
  103. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl.js +0 -23
  104. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nn.js +0 -22
  105. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-no.js +0 -23
  106. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pl.js +0 -23
  107. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt-BR.js +0 -23
  108. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt.js +0 -22
  109. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-rm.js +0 -21
  110. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ro.js +0 -26
  111. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ru.js +0 -23
  112. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sk.js +0 -23
  113. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sl.js +0 -24
  114. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sq.js +0 -23
  115. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr-SR.js +0 -23
  116. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr.js +0 -23
  117. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sv.js +0 -23
  118. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ta.js +0 -23
  119. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-th.js +0 -23
  120. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tj.js +0 -23
  121. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tr.js +0 -23
  122. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-uk.js +0 -24
  123. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-vi.js +0 -23
  124. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-CN.js +0 -23
  125. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-HK.js +0 -23
  126. js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-TW.js +0 -23
  127. js/jqueryui/jquery-ui-i18n.min.js +7 -0
  128. js/map-frontend.js +7 -1
  129. js/map.js +10 -0
  130. js/media.js +109 -110
  131. js/time.js +4 -4
  132. lang/meta-box-es_ES.mo +0 -0
  133. meta-box.php +1 -1
  134. readme.txt +17 -1
css/file.css CHANGED
@@ -1,51 +1,45 @@
1
- .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
- .rwmb-file .rwmb-icon {
8
  width: 60px;
9
  text-align: center;
10
  vertical-align: middle;
11
  overflow: hidden;
12
  }
13
- .rwmb-file .rwmb-icon img {
14
  max-height: 60px;
15
  max-width: 60px;
16
  }
17
- .rwmb-file .rwmb-info {
18
  width: 180px;
19
  vertical-align: top;
20
  overflow: hidden;
21
  }
22
- .rwmb-file .rwmb-info p {
23
  margin: .1em 0;
24
  }
25
- .rwmb-file .rwmb-info a {
26
  font-weight: bold;
27
  text-decoration: none;
28
  }
29
- .rwmb-file li,
30
- .rwmb-file .rwmb-icon,
31
- .rwmb-file .rwmb-info {
32
  display: inline-block;
33
  }
34
- .rwmb-file .rwmb-icon,
35
- .rwmb-file .rwmb-info {
36
  margin: 0 0 2px 2px;
37
  }
38
-
39
- .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
- .rwmb-file li.removed:after {
49
  content: ' ';
50
  position: absolute;
51
  top: 0;
@@ -55,4 +49,4 @@
55
  z-index: 2;
56
  opacity: .4;
57
  background-color: #f00;
58
- }
1
+ .rwmb-file-wrapper .rwmb-uploaded li {
2
  width: 250px;
3
  margin: 0 10px 10px 0;
4
+ transition: width .25s, opacity .25s;
 
5
  }
6
+ .rwmb-file-wrapper .rwmb-uploaded .rwmb-icon {
7
  width: 60px;
8
  text-align: center;
9
  vertical-align: middle;
10
  overflow: hidden;
11
  }
12
+ .rwmb-file-wrapper .rwmb-uploaded .rwmb-icon img {
13
  max-height: 60px;
14
  max-width: 60px;
15
  }
16
+ .rwmb-file-wrapper .rwmb-uploaded .rwmb-info {
17
  width: 180px;
18
  vertical-align: top;
19
  overflow: hidden;
20
  }
21
+ .rwmb-file-wrapper .rwmb-uploaded .rwmb-info p {
22
  margin: .1em 0;
23
  }
24
+ .rwmb-file-wrapper .rwmb-uploaded .rwmb-info a {
25
  font-weight: bold;
26
  text-decoration: none;
27
  }
28
+ .rwmb-file-wrapper .rwmb-uploaded li,
29
+ .rwmb-file-wrapper .rwmb-uploaded .rwmb-icon,
30
+ .rwmb-file-wrapper .rwmb-uploaded .rwmb-info {
31
  display: inline-block;
32
  }
33
+ .rwmb-file-wrapper .rwmb-uploaded .rwmb-icon,
34
+ .rwmb-file-wrapper .rwmb-uploaded .rwmb-info {
35
  margin: 0 0 2px 2px;
36
  }
37
+ .rwmb-file-wrapper .rwmb-uploaded li.removed {
 
38
  width: 0;
39
  margin: 0;
40
+ opacity: 0;
 
 
 
41
  }
42
+ .rwmb-file-wrapper .rwmb-uploaded li.removed:after {
 
43
  content: ' ';
44
  position: absolute;
45
  top: 0;
49
  z-index: 2;
50
  opacity: .4;
51
  background-color: #f00;
52
+ }
css/image.css CHANGED
@@ -1,8 +1,8 @@
1
  /* Uploaded image */
2
- .rwmb-images {
3
  overflow: hidden;
4
  }
5
- .rwmb-images li {
6
  margin: 0 10px 10px 0;
7
  float: left;
8
  width: 150px;
@@ -10,10 +10,9 @@
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
- .rwmb-images img {
17
  width: 150px;
18
  height: 150px;
19
  }
@@ -43,15 +42,12 @@ li:hover .rwmb-image-bar {
43
  width: 18px;
44
  font-weight: normal;
45
  }
46
- .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
- .rwmb-images li.removed:after {
55
  content: ' ';
56
  position: absolute;
57
  top: 0;
@@ -62,6 +58,6 @@ li:hover .rwmb-image-bar {
62
  opacity: .4;
63
  background-color: #f00;
64
  }
65
- .rwmb-images li.ui-state-highlight {
66
  background: #ddd;
67
- }
1
  /* Uploaded image */
2
+ .rwmb-image-wrapper .rwmb-uploaded {
3
  overflow: hidden;
4
  }
5
+ .rwmb-image-wrapper .rwmb-uploaded li {
6
  margin: 0 10px 10px 0;
7
  float: left;
8
  width: 150px;
10
  text-align: center;
11
  cursor: move;
12
  position: relative;
13
+ transition: width .25s, opacity .25s;
 
14
  }
15
+ .rwmb-image-wrapper .rwmb-uploaded img {
16
  width: 150px;
17
  height: 150px;
18
  }
42
  width: 18px;
43
  font-weight: normal;
44
  }
45
+ .rwmb-image-wrapper .rwmb-uploaded li.removed {
46
  width: 0;
47
  margin: 0;
48
+ opacity: 0;
 
 
 
49
  }
50
+ .rwmb-image-wrapper .rwmb-uploaded li.removed:after {
51
  content: ' ';
52
  position: absolute;
53
  top: 0;
58
  opacity: .4;
59
  background-color: #f00;
60
  }
61
+ .rwmb-image-wrapper .rwmb-uploaded li.ui-state-highlight {
62
  background: #ddd;
63
+ }
inc/core.php CHANGED
@@ -100,43 +100,4 @@ class RWMB_Core
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
  }
100
  delete_post_meta( $post->ID, '_wp_page_template' );
101
  }
102
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  }
inc/field.php CHANGED
@@ -8,19 +8,15 @@ abstract class RWMB_Field
8
  {
9
  /**
10
  * Add actions
11
- *
12
- * @return void
13
  */
14
- static function add_actions()
15
  {
16
  }
17
 
18
  /**
19
  * Enqueue scripts and styles
20
- *
21
- * @return void
22
  */
23
- static function admin_enqueue_scripts()
24
  {
25
  }
26
 
@@ -35,17 +31,16 @@ abstract class RWMB_Field
35
  *
36
  * @return string
37
  */
38
- static function show( $field, $saved )
39
  {
40
  $post = get_post();
41
  $post_id = isset( $post->ID ) ? $post->ID : 0;
42
 
43
- $field_class = RW_Meta_Box::get_class_name( $field );
44
- $meta = call_user_func( array( $field_class, 'meta' ), $post_id, $saved, $field );
45
- $meta = RWMB_Core::filter( 'field_meta', $meta, $field, $saved );
46
 
47
- $begin = call_user_func( array( $field_class, 'begin_html' ), $meta, $field );
48
- $begin = RWMB_Core::filter( 'begin_html', $begin, $field, $meta );
49
 
50
  // Separate code for cloneable and non-cloneable fields to make easy to maintain
51
 
@@ -82,11 +77,11 @@ abstract class RWMB_Field
82
  $input_html = "<div class='$class'>" . $sort_icon;
83
 
84
  // Call separated methods for displaying each type of field
85
- $input_html .= call_user_func( array( $field_class, 'html' ), $sub_meta, $sub_field );
86
- $input_html = RWMB_Core::filter( 'html', $input_html, $sub_field, $sub_meta );
87
 
88
  // Remove clone button
89
- $input_html .= call_user_func( array( $field_class, 'remove_clone_button' ), $sub_field );
90
 
91
  $input_html .= '</div>';
92
 
@@ -97,14 +92,14 @@ abstract class RWMB_Field
97
  else
98
  {
99
  // Call separated methods for displaying each type of field
100
- $field_html = call_user_func( array( $field_class, 'html' ), $meta, $field );
101
- $field_html = RWMB_Core::filter( 'html', $field_html, $field, $meta );
102
  }
103
 
104
- $end = call_user_func( array( $field_class, 'end_html' ), $meta, $field );
105
- $end = RWMB_Core::filter( 'end_html', $end, $field, $meta );
106
 
107
- $html = RWMB_Core::filter( 'wrapper_html', "$begin$field_html$end", $field, $meta );
108
 
109
  // Display label and input in DIV and allow user-defined classes to be appended
110
  $classes = "rwmb-field rwmb-{$field['type']}-wrapper " . $field['class'];
@@ -118,7 +113,7 @@ abstract class RWMB_Field
118
  trim( $classes ),
119
  $html
120
  );
121
- $outer_html = RWMB_Core::filter( 'outer_html', $outer_html, $field, $meta );
122
 
123
  echo $outer_html;
124
  }
@@ -131,7 +126,7 @@ abstract class RWMB_Field
131
  *
132
  * @return string
133
  */
134
- static function html( $meta, $field )
135
  {
136
  return '';
137
  }
@@ -144,7 +139,7 @@ abstract class RWMB_Field
144
  *
145
  * @return string
146
  */
147
- static function begin_html( $meta, $field )
148
  {
149
  $field_label = '';
150
  if ( $field['name'] )
@@ -174,9 +169,9 @@ abstract class RWMB_Field
174
  *
175
  * @return string
176
  */
177
- static function end_html( $meta, $field )
178
  {
179
- $button = $field['clone'] ? call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'add_clone_button' ), $field ) : '';
180
  $desc = $field['desc'] ? "<p id='{$field['id']}_description' class='description'>{$field['desc']}</p>" : '';
181
 
182
  // Closes the container
@@ -192,7 +187,7 @@ abstract class RWMB_Field
192
  *
193
  * @return string $html
194
  */
195
- static function add_clone_button( $field )
196
  {
197
  $text = apply_filters( 'rwmb_add_clone_button_text', __( '+ Add more', 'meta-box' ), $field );
198
  return "<a href='#' class='rwmb-button button-primary add-clone'>$text</a>";
@@ -205,7 +200,7 @@ abstract class RWMB_Field
205
  *
206
  * @return string $html
207
  */
208
- static function remove_clone_button( $field )
209
  {
210
  $icon = '<i class="dashicons dashicons-minus"></i>';
211
  $text = apply_filters( 'rwmb_remove_clone_button_text', $icon, $field );
@@ -221,7 +216,7 @@ abstract class RWMB_Field
221
  *
222
  * @return mixed
223
  */
224
- static function meta( $post_id, $saved, $field )
225
  {
226
  /**
227
  * For special fields like 'divider', 'heading' which don't have ID, just return empty string
@@ -237,7 +232,7 @@ abstract class RWMB_Field
237
  $meta = ( ! $saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
238
 
239
  // Escape attributes
240
- $meta = call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'esc_meta' ), $meta );
241
 
242
  // Make sure meta value is an array for clonable and multiple fields
243
  if ( $field['clone'] || $field['multiple'] )
@@ -263,7 +258,7 @@ abstract class RWMB_Field
263
  *
264
  * @return mixed
265
  */
266
- static function esc_meta( $meta )
267
  {
268
  return is_array( $meta ) ? array_map( __METHOD__, $meta ) : esc_attr( $meta );
269
  }
@@ -278,7 +273,7 @@ abstract class RWMB_Field
278
  *
279
  * @return int
280
  */
281
- static function value( $new, $old, $post_id, $field )
282
  {
283
  return $new;
284
  }
@@ -291,7 +286,7 @@ abstract class RWMB_Field
291
  * @param $post_id
292
  * @param $field
293
  */
294
- static function save( $new, $old, $post_id, $field )
295
  {
296
  $name = $field['id'];
297
 
@@ -345,7 +340,7 @@ abstract class RWMB_Field
345
  *
346
  * @return array
347
  */
348
- static function normalize( $field )
349
  {
350
  $field = wp_parse_args( $field, array(
351
  'id' => '',
@@ -380,7 +375,7 @@ abstract class RWMB_Field
380
  *
381
  * @return array
382
  */
383
- static function get_attributes( $field, $value = null )
384
  {
385
  $attributes = wp_parse_args( $field['attributes'], array(
386
  'disabled' => $field['disabled'],
@@ -400,15 +395,15 @@ abstract class RWMB_Field
400
  *
401
  * @return string
402
  */
403
- static function render_attributes( $attributes )
404
  {
405
  $output = '';
406
-
407
  foreach ( $attributes as $key => $value )
408
  {
409
  if ( false === $value || '' === $value )
410
  continue;
411
-
412
  if ( is_array( $value ) )
413
  $value = json_encode( $value );
414
 
@@ -433,37 +428,27 @@ abstract class RWMB_Field
433
  *
434
  * @return mixed Field value
435
  */
436
- static function get_value( $field, $args = array(), $post_id = null )
437
  {
 
 
 
 
 
 
438
  if ( ! $post_id )
439
  $post_id = get_the_ID();
440
 
441
- /**
442
- * Get raw meta value in the database, no escape
443
- * Very similar to self::meta() function
444
- */
445
 
446
- /**
447
- * For special fields like 'divider', 'heading' which don't have ID, just return empty string
448
- * to prevent notice error when display in fields
449
- */
450
- $value = '';
451
- if ( ! empty( $field['id'] ) )
452
  {
453
- $single = $field['clone'] || ! $field['multiple'];
454
- $value = get_post_meta( $post_id, $field['id'], $single );
455
-
456
- // Make sure meta value is an array for clonable and multiple fields
457
- if ( $field['clone'] || $field['multiple'] )
458
- {
459
- $value = is_array( $value ) && $value ? $value : array();
460
- }
461
  }
462
 
463
- /**
464
- * Return the meta value by default.
465
- * For specific fields, the returned value might be different. See each field class for details
466
- */
467
  return $value;
468
  }
469
 
@@ -484,19 +469,131 @@ abstract class RWMB_Field
484
  *
485
  * @return string HTML output of the field
486
  */
487
- static function the_value( $field, $args = array(), $post_id = null )
 
 
 
 
 
 
 
 
 
 
 
 
488
  {
489
- $value = call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'get_value' ), $field, $args, $post_id );
490
- $output = $value;
491
- if ( is_array( $value ) )
492
  {
493
- $output = '<ul>';
494
- foreach ( $value as $subvalue )
495
- {
496
- $output .= '<li>' . $subvalue . '</li>';
497
- }
498
- $output .= '</ul>';
499
  }
 
 
 
 
 
 
500
  return $output;
501
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
502
  }
8
  {
9
  /**
10
  * Add actions
 
 
11
  */
12
+ public static function add_actions()
13
  {
14
  }
15
 
16
  /**
17
  * Enqueue scripts and styles
 
 
18
  */
19
+ public static function admin_enqueue_scripts()
20
  {
21
  }
22
 
31
  *
32
  * @return string
33
  */
34
+ public static function show( $field, $saved )
35
  {
36
  $post = get_post();
37
  $post_id = isset( $post->ID ) ? $post->ID : 0;
38
 
39
+ $meta = self::call( $field, 'meta', $post_id, $saved );
40
+ $meta = self::filter( 'field_meta', $meta, $field, $saved );
 
41
 
42
+ $begin = self::call( $field, 'begin_html', $meta );
43
+ $begin = self::filter( 'begin_html', $begin, $field, $meta );
44
 
45
  // Separate code for cloneable and non-cloneable fields to make easy to maintain
46
 
77
  $input_html = "<div class='$class'>" . $sort_icon;
78
 
79
  // Call separated methods for displaying each type of field
80
+ $input_html .= self::call( $sub_field, 'html', $sub_meta );
81
+ $input_html = self::filter( 'html', $input_html, $sub_field, $sub_meta );
82
 
83
  // Remove clone button
84
+ $input_html .= self::call( 'remove_clone_button', $sub_field );
85
 
86
  $input_html .= '</div>';
87
 
92
  else
93
  {
94
  // Call separated methods for displaying each type of field
95
+ $field_html = self::call( $field, 'html', $meta );
96
+ $field_html = self::filter( 'html', $field_html, $field, $meta );
97
  }
98
 
99
+ $end = self::call( $field, 'end_html', $meta );
100
+ $end = self::filter( 'end_html', $end, $field, $meta );
101
 
102
+ $html = self::filter( 'wrapper_html', "$begin$field_html$end", $field, $meta );
103
 
104
  // Display label and input in DIV and allow user-defined classes to be appended
105
  $classes = "rwmb-field rwmb-{$field['type']}-wrapper " . $field['class'];
113
  trim( $classes ),
114
  $html
115
  );
116
+ $outer_html = self::filter( 'outer_html', $outer_html, $field, $meta );
117
 
118
  echo $outer_html;
119
  }
126
  *
127
  * @return string
128
  */
129
+ public static function html( $meta, $field )
130
  {
131
  return '';
132
  }
139
  *
140
  * @return string
141
  */
142
+ public static function begin_html( $meta, $field )
143
  {
144
  $field_label = '';
145
  if ( $field['name'] )
169
  *
170
  * @return string
171
  */
172
+ public static function end_html( $meta, $field )
173
  {
174
+ $button = $field['clone'] ? self::call( 'add_clone_button', $field ) : '';
175
  $desc = $field['desc'] ? "<p id='{$field['id']}_description' class='description'>{$field['desc']}</p>" : '';
176
 
177
  // Closes the container
187
  *
188
  * @return string $html
189
  */
190
+ public static function add_clone_button( $field )
191
  {
192
  $text = apply_filters( 'rwmb_add_clone_button_text', __( '+ Add more', 'meta-box' ), $field );
193
  return "<a href='#' class='rwmb-button button-primary add-clone'>$text</a>";
200
  *
201
  * @return string $html
202
  */
203
+ public static function remove_clone_button( $field )
204
  {
205
  $icon = '<i class="dashicons dashicons-minus"></i>';
206
  $text = apply_filters( 'rwmb_remove_clone_button_text', $icon, $field );
216
  *
217
  * @return mixed
218
  */
219
+ public static function meta( $post_id, $saved, $field )
220
  {
221
  /**
222
  * For special fields like 'divider', 'heading' which don't have ID, just return empty string
232
  $meta = ( ! $saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
233
 
234
  // Escape attributes
235
+ $meta = self::call( $field, 'esc_meta', $meta );
236
 
237
  // Make sure meta value is an array for clonable and multiple fields
238
  if ( $field['clone'] || $field['multiple'] )
258
  *
259
  * @return mixed
260
  */
261
+ public static function esc_meta( $meta )
262
  {
263
  return is_array( $meta ) ? array_map( __METHOD__, $meta ) : esc_attr( $meta );
264
  }
273
  *
274
  * @return int
275
  */
276
+ public static function value( $new, $old, $post_id, $field )
277
  {
278
  return $new;
279
  }
286
  * @param $post_id
287
  * @param $field
288
  */
289
+ public static function save( $new, $old, $post_id, $field )
290
  {
291
  $name = $field['id'];
292
 
340
  *
341
  * @return array
342
  */
343
+ public static function normalize( $field )
344
  {
345
  $field = wp_parse_args( $field, array(
346
  'id' => '',
375
  *
376
  * @return array
377
  */
378
+ public static function get_attributes( $field, $value = null )
379
  {
380
  $attributes = wp_parse_args( $field['attributes'], array(
381
  'disabled' => $field['disabled'],
395
  *
396
  * @return string
397
  */
398
+ public static function render_attributes( $attributes )
399
  {
400
  $output = '';
401
+
402
  foreach ( $attributes as $key => $value )
403
  {
404
  if ( false === $value || '' === $value )
405
  continue;
406
+
407
  if ( is_array( $value ) )
408
  $value = json_encode( $value );
409
 
428
  *
429
  * @return mixed Field value
430
  */
431
+ public static function get_value( $field, $args = array(), $post_id = null )
432
  {
433
+ // Some fields does not have ID like heading, custom HTML, etc.
434
+ if ( empty( $field['id'] ) )
435
+ {
436
+ return '';
437
+ }
438
+
439
  if ( ! $post_id )
440
  $post_id = get_the_ID();
441
 
442
+ // Get raw meta value in the database, no escape
443
+ $single = $field['clone'] || ! $field['multiple'];
444
+ $value = get_post_meta( $post_id, $field['id'], $single );
 
445
 
446
+ // Make sure meta value is an array for cloneable and multiple fields
447
+ if ( $field['clone'] || $field['multiple'] )
 
 
 
 
448
  {
449
+ $value = is_array( $value ) && $value ? $value : array();
 
 
 
 
 
 
 
450
  }
451
 
 
 
 
 
452
  return $value;
453
  }
454
 
469
  *
470
  * @return string HTML output of the field
471
  */
472
+ public static function the_value( $field, $args = array(), $post_id = null )
473
+ {
474
+ $value = self::call( 'get_value', $field, $args, $post_id );
475
+ return self::call( 'format_value', $field, $value );
476
+ }
477
+
478
+ /**
479
+ * Format value for the helper functions.
480
+ * @param array $field Field parameter
481
+ * @param string|array $value The field meta value
482
+ * @return string
483
+ */
484
+ public static function format_value( $field, $value )
485
  {
486
+ if ( ! is_array( $value ) )
 
 
487
  {
488
+ return self::call( 'format_single_value', $field, $value );
 
 
 
 
 
489
  }
490
+ $output = '<ul>';
491
+ foreach ( $value as $subvalue )
492
+ {
493
+ $output .= '<li>' . self::call( 'format_value', $field, $subvalue ) . '</li>';
494
+ }
495
+ $output .= '</ul>';
496
  return $output;
497
  }
498
+
499
+ /**
500
+ * Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
501
+ * @param array $field Field parameter
502
+ * @param string $value The value
503
+ * @return string
504
+ */
505
+ public static function format_single_value( $field, $value )
506
+ {
507
+ return $value;
508
+ }
509
+
510
+ /**
511
+ * Call a method of a field.
512
+ * This should be replaced by static::$method( $args ) in PHP 5.3.
513
+ * @return mixed
514
+ */
515
+ public static function call()
516
+ {
517
+ $args = func_get_args();
518
+
519
+ $check = reset( $args );
520
+
521
+ // Params: method name, field, other params.
522
+ if ( is_string( $check ) )
523
+ {
524
+ $method = array_shift( $args );
525
+ $field = reset( $args ); // Keep field as 1st param
526
+ }
527
+ // Params: field, method name, other params.
528
+ else
529
+ {
530
+ $field = array_shift( $args );
531
+ $method = array_shift( $args );
532
+ $args[] = $field; // Add field as last param
533
+ }
534
+
535
+ return call_user_func_array( array( self::get_class_name( $field ), $method ), $args );
536
+ }
537
+
538
+ /**
539
+ * Get field class name
540
+ *
541
+ * @param array $field Field array
542
+ * @return string Field class name
543
+ */
544
+ public static function get_class_name( $field )
545
+ {
546
+ $type = $field['type'];
547
+ if ( 'file_advanced' == $field['type'] )
548
+ {
549
+ $type = 'media';
550
+ }
551
+ if ( 'plupload_image' == $field['type'] )
552
+ {
553
+ $type = 'image_upload';
554
+ }
555
+ $type = str_replace( array( '-', '_' ), ' ', $type );
556
+ $class = 'RWMB_' . ucwords( $type ) . '_Field';
557
+ $class = str_replace( ' ', '_', $class );
558
+ return class_exists( $class ) ? $class : 'RWMB_Input_Field';
559
+ }
560
+
561
+ /**
562
+ * Apply various filters based on field type, id.
563
+ * Filters:
564
+ * - rwmb_{$name}
565
+ * - rwmb_{$field['type']}_{$name}
566
+ * - rwmb_{$field['id']}_{$name}
567
+ * @return mixed
568
+ */
569
+ public static function filter()
570
+ {
571
+ $args = func_get_args();
572
+
573
+ // 3 first params must be: filter name, value, field. Other params will be used for filters.
574
+ $name = array_shift( $args );
575
+ $value = array_shift( $args );
576
+ $field = array_shift( $args );
577
+
578
+ // List of filters
579
+ $filters = array(
580
+ 'rwmb_' . $name,
581
+ 'rwmb_' . $field['type'] . '_' . $name,
582
+ );
583
+ if ( isset( $field['id'] ) )
584
+ {
585
+ $filters[] = 'rwmb_' . $field['id'] . '_' . $name;
586
+ }
587
+
588
+ // Filter params: value, field, other params. Note: value is changed after each run.
589
+ array_unshift( $args, $field );
590
+ foreach ( $filters as $filter )
591
+ {
592
+ $filter_args = $args;
593
+ array_unshift( $filter_args, $value );
594
+ $value = apply_filters_ref_array( $filter, $filter_args );
595
+ }
596
+
597
+ return $value;
598
+ }
599
  }
inc/fields/checkbox.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Checkbox field class.
4
  */
@@ -44,7 +45,7 @@ class RWMB_Checkbox_Field extends RWMB_Input_Field
44
  */
45
  public static function end_html( $meta, $field )
46
  {
47
- $button = $field['clone'] ? call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'add_clone_button' ), $field ) : '';
48
 
49
  // Closes the container
50
  $html = "{$button}</div>";
@@ -52,22 +53,6 @@ class RWMB_Checkbox_Field extends RWMB_Input_Field
52
  return $html;
53
  }
54
 
55
- /**
56
- * Get the attributes for a field.
57
- *
58
- * @param array $field
59
- * @param mixed $value
60
- * @return array
61
- */
62
- public static function get_attributes( $field, $value = null )
63
- {
64
- $attributes = parent::get_attributes( $field, $value );
65
- $attributes['type'] = 'checkbox';
66
- $attributes['list'] = false;
67
-
68
- return $attributes;
69
- }
70
-
71
  /**
72
  * Set the value of checkbox to 1 or 0 instead of 'checked' and empty string
73
  * This prevents using default value once the checkbox has been unchecked
@@ -87,24 +72,13 @@ class RWMB_Checkbox_Field extends RWMB_Input_Field
87
  }
88
 
89
  /**
90
- * Output the field value
91
- * Display 'Yes' or 'No' instead of '1' and '0'
92
- *
93
- * Note: we don't echo the field value directly. We return the output HTML of field, which will be used in
94
- * rwmb_the_field function later.
95
- *
96
- * @use self::get_value()
97
- * @see rwmb_the_value()
98
- *
99
- * @param array $field Field parameters
100
- * @param array $args Additional arguments. Rarely used. See specific fields for details
101
- * @param int|null $post_id Post ID. null for current post. Optional.
102
- *
103
- * @return string HTML output of the field
104
  */
105
- public static function the_value( $field, $args = array(), $post_id = null )
106
  {
107
- $value = self::get_value( $field, $args, $post_id );
108
  return $value ? __( 'Yes', 'meta-box' ) : __( 'No', 'meta-box' );
109
  }
110
  }
1
  <?php
2
+
3
  /**
4
  * Checkbox field class.
5
  */
45
  */
46
  public static function end_html( $meta, $field )
47
  {
48
+ $button = $field['clone'] ? self::add_clone_button( $field ) : '';
49
 
50
  // Closes the container
51
  $html = "{$button}</div>";
53
  return $html;
54
  }
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  /**
57
  * Set the value of checkbox to 1 or 0 instead of 'checked' and empty string
58
  * This prevents using default value once the checkbox has been unchecked
72
  }
73
 
74
  /**
75
+ * Format a single value for the helper functions.
76
+ * @param array $field Field parameter
77
+ * @param string $value The value
78
+ * @return string
 
 
 
 
 
 
 
 
 
 
79
  */
80
+ public static function format_single_value( $field, $value )
81
  {
 
82
  return $value ? __( 'Yes', 'meta-box' ) : __( 'No', 'meta-box' );
83
  }
84
  }
inc/fields/choice.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Abstract class for any kind of choice field.
4
  */
@@ -13,7 +14,7 @@ abstract class RWMB_Choice_Field extends RWMB_Field
13
  * @param mixed $db_fields
14
  * @return string
15
  */
16
- public static function walk( $options, $db_fields, $meta, $field )
17
  {
18
  return '';
19
  }
@@ -27,12 +28,11 @@ abstract class RWMB_Choice_Field extends RWMB_Field
27
  */
28
  public static function html( $meta, $field )
29
  {
30
- $field_class = 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
  /**
@@ -86,62 +86,33 @@ abstract class RWMB_Choice_Field extends RWMB_Field
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 = 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 = call_user_func( array( $field_class, 'get_option_label' ), $value, $field );
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 = 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
  /**
@@ -152,9 +123,9 @@ abstract class RWMB_Choice_Field extends RWMB_Field
152
  *
153
  * @return string
154
  */
155
- public static function get_option_label( $value, $field )
156
  {
157
- $options = call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'get_options' ), $field );
158
  return $options[$value]->label;
159
  }
160
  }
1
  <?php
2
+
3
  /**
4
  * Abstract class for any kind of choice field.
5
  */
14
  * @param mixed $db_fields
15
  * @return string
16
  */
17
+ public static function walk( $field, $options, $db_fields, $meta )
18
  {
19
  return '';
20
  }
28
  */
29
  public static function html( $meta, $field )
30
  {
31
+ $meta = (array) $meta;
32
+ $options = self::call( 'get_options', $field );
33
+ $options = self::call( 'filter_options', $field, $options );
34
+ $db_fields = self::call( 'get_db_fields', $field );
35
+ return self::call( 'walk', $field, $options, $db_fields, $meta );
 
36
  }
37
 
38
  /**
86
  }
87
 
88
  /**
89
+ * Filter options for walker
 
90
  *
91
+ * @param array $field
 
 
92
  *
93
+ * @return array
94
  */
95
+ public static function filter_options( $field, $options )
96
  {
97
+ $db_fields = self::call( 'get_db_fields', $field );
98
+ $label = $db_fields['label'];
99
+ foreach ( $options as &$option )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  {
101
+ $option = apply_filters( 'rwmb_option', $option, $field );
102
+ $option->$label = apply_filters( 'rwmb_option_label', $option->$label, $option, $field );
103
  }
104
+ return $options;
 
 
 
 
105
  }
106
 
107
  /**
108
+ * Format a single value for the helper functions.
109
+ * @param array $field Field parameter
110
+ * @param string $value The value
 
111
  * @return string
112
  */
113
+ public static function format_single_value( $field, $value )
114
  {
115
+ return self::call( 'get_option_label', $field, $value );
 
 
 
 
 
 
 
116
  }
117
 
118
  /**
123
  *
124
  * @return string
125
  */
126
+ public static function get_option_label( $field, $value )
127
  {
128
+ $options = self::call( 'get_options', $field );
129
  return $options[$value]->label;
130
  }
131
  }
inc/fields/color.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Color field class.
4
  */
@@ -52,34 +53,19 @@ class RWMB_Color_Field extends RWMB_Text_Field
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
  /**
4
  * Color field class.
5
  */
53
  $attributes = wp_parse_args( $attributes, array(
54
  'data-options' => wp_json_encode( $field['js_options'] ),
55
  ) );
56
+ $attributes['type'] = 'text';
57
 
58
  return $attributes;
59
  }
60
 
61
  /**
62
+ * Format a single value for the helper functions.
63
+ * @param array $field Field parameter
64
+ * @param string $value The value
 
65
  * @return string
66
  */
67
+ static function format_single_value( $field, $value )
68
  {
69
+ return sprintf( "<span style='display:inline-block;width:20px;height:20px;border-radius:50%%;background:%s;'></span>", $value );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
71
  }
inc/fields/datetime.php CHANGED
@@ -33,68 +33,41 @@ class RWMB_Datetime_Field extends RWMB_Text_Field
33
  public static function admin_register_scripts()
34
  {
35
  $url = 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', 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 = 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( RWMB_DIR . 'js/' . $date_path ) )
68
  {
69
- wp_register_script( 'jquery-ui-datepicker-i18n', 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( 'rwmb-datetime', RWMB_JS_URL . 'datetime.js', $deps, RWMB_VER, true );
76
- wp_register_script( 'rwmb-date', RWMB_JS_URL . 'date.js', $deps, RWMB_VER, true );
77
- wp_register_script( 'rwmb-time', RWMB_JS_URL . 'time.js', array( 'jquery-ui-timepicker-i18n' ), RWMB_VER, true );
78
-
79
- /**
80
- * Prevent loading localized string twice.
81
- * @link https://github.com/rilwis/meta-box/issues/850
82
- */
83
- $wp_scripts = wp_scripts();
84
- if ( ! $wp_scripts->get_data( 'rwmb-datetime', 'data' ) )
85
- {
86
- wp_localize_script( 'rwmb-datetime', 'RWMB_Datetimepicker', array(
87
- 'locale' => $locale,
88
- 'localeShort' => $locale_short,
89
- ) );
90
- }
91
- if ( ! $wp_scripts->get_data( 'rwmb-time', 'data' ) )
92
- {
93
- wp_localize_script( 'rwmb-time', 'RWMB_Timepicker', array(
94
- 'locale' => $locale,
95
- 'localeShort' => $locale_short,
96
- ) );
97
- }
98
  }
99
 
100
  /**
@@ -154,19 +127,26 @@ class RWMB_Datetime_Field extends RWMB_Text_Field
154
  */
155
  public static function value( $new, $old, $post_id, $field )
156
  {
157
- if ( ! $field['timestamp'] )
158
- return $new;
 
 
 
 
159
 
 
 
 
 
 
 
 
 
160
  if ( $field['clone'] )
161
  {
162
- foreach ( $new as $key => $value )
163
- {
164
- $new[$key] = isset( $value['timestamp'] ) ? $value['timestamp'] : null;
165
- }
166
- return $new;
167
  }
168
-
169
- return isset( $new['timestamp'] ) ? $new['timestamp'] : null;
170
  }
171
 
172
  /**
@@ -181,29 +161,29 @@ class RWMB_Datetime_Field extends RWMB_Text_Field
181
  public static function meta( $post_id, $saved, $field )
182
  {
183
  $meta = parent::meta( $post_id, $saved, $field );
184
- if ( ! $field['timestamp'] )
185
  {
186
- return $meta;
187
  }
188
- $method = array( RW_Meta_Box::get_class_name( $field ), 'translate_format' );
 
 
 
 
 
 
 
 
 
 
189
  if ( is_array( $meta ) )
190
  {
191
- foreach ( $meta as $key => $value )
192
- {
193
- $meta[$key] = array(
194
- 'timestamp' => ( $value != "" ) ? $value : null,
195
- 'formatted' => ( $value != "" ) ? date( call_user_func( $method, $field ), intval( $value ) ) : "",
196
- );
197
- }
198
- }
199
- else
200
- {
201
- $meta = array(
202
- 'timestamp' => ( $meta != "" ) ? $meta : null,
203
- 'formatted' => ( $meta != "" ) ? date( call_user_func( $method, $field ), intval( $meta ) ) : "",
204
- );
205
  }
206
- return $meta;
 
 
 
207
  }
208
 
209
  /**
@@ -255,6 +235,7 @@ class RWMB_Datetime_Field extends RWMB_Text_Field
255
  $attributes = wp_parse_args( $attributes, array(
256
  'data-options' => wp_json_encode( $field['js_options'] ),
257
  ) );
 
258
 
259
  return $attributes;
260
  }
33
  public static function admin_register_scripts()
34
  {
35
  $url = 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', 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 = RWMB_JS_URL . 'jqueryui';
44
+ wp_register_script( 'jquery-ui-datepicker-i18n', "$url/jquery-ui-i18n.min.js", array( 'jquery-ui-datepicker' ), '1.11.4', true );
45
+ wp_register_script( 'jquery-ui-timepicker', "$url/jquery-ui-timepicker-addon.min.js", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '1.5.0', true );
46
+ wp_register_script( 'jquery-ui-timepicker-i18n', "$url/jquery-ui-timepicker-addon-i18n.min.js", array( 'jquery-ui-timepicker' ), '1.5.0', true );
47
+
48
+ wp_register_script( 'rwmb-datetime', RWMB_JS_URL . 'datetime.js', array( 'jquery-ui-datepicker-i18n', 'jquery-ui-timepicker-i18n' ), RWMB_VER, true );
49
+ wp_register_script( 'rwmb-date', RWMB_JS_URL . 'date.js', array( 'jquery-ui-datepicker-i18n', 'jquery-ui-timepicker-i18n' ), RWMB_VER, true );
50
+ wp_register_script( 'rwmb-time', RWMB_JS_URL . 'time.js', array( 'jquery-ui-timepicker-i18n' ), RWMB_VER, true );
51
 
52
  /**
53
+ * Add data to scripts. Prevent loading localized string twice.
54
+ * @link https://github.com/rilwis/meta-box/issues/850
 
 
 
55
  */
56
+ $wp_scripts = wp_scripts();
57
+ $handles = array( 'datetime', 'date', 'time' );
58
  $locale = str_replace( '_', '-', get_locale() );
59
  $locale_short = substr( $locale, 0, 2 );
60
+ $data = array(
61
+ 'locale' => $locale,
62
+ 'localeShort' => $locale_short,
63
+ );
64
+ foreach ( $handles as $handle )
 
 
 
 
 
65
  {
66
+ if ( ! $wp_scripts->get_data( "rwmb-$handle", 'data' ) )
67
  {
68
+ wp_localize_script( "rwmb-$handle", 'RWMB_' . ucfirst( $handle ), $data );
 
 
69
  }
70
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  }
72
 
73
  /**
127
  */
128
  public static function value( $new, $old, $post_id, $field )
129
  {
130
+ if ( $field['timestamp'] )
131
+ {
132
+ $new = self::prepare_value( $new, $field );
133
+ }
134
+ return $new;
135
+ }
136
 
137
+ /**
138
+ * Prepare value before saving if set 'timestamp'
139
+ * @param array|string $value The submitted value
140
+ * @param array $field Field parameter
141
+ * @return array
142
+ */
143
+ protected static function prepare_value( $value, $field )
144
+ {
145
  if ( $field['clone'] )
146
  {
147
+ return array_map( __METHOD__, $value );
 
 
 
 
148
  }
149
+ return isset( $value['timestamp'] ) ? $value['timestamp'] : null;
 
150
  }
151
 
152
  /**
161
  public static function meta( $post_id, $saved, $field )
162
  {
163
  $meta = parent::meta( $post_id, $saved, $field );
164
+ if ( $field['timestamp'] )
165
  {
166
+ $meta = self::prepare_meta( $meta, $field );
167
  }
168
+ return $meta;
169
+ }
170
+
171
+ /**
172
+ * Format meta value if set 'timestamp'
173
+ * @param array|string $meta The meta value
174
+ * @param array $field Field parameter
175
+ * @return array
176
+ */
177
+ protected static function prepare_meta( $meta, $field )
178
+ {
179
  if ( is_array( $meta ) )
180
  {
181
+ return array_map( __METHOD__, $meta );
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  }
183
+ return array(
184
+ 'timestamp' => $meta ? $meta : null,
185
+ 'formatted' => $meta ? date( self::call( 'translate_format', $field ), intval( $meta ) ) : '',
186
+ );
187
  }
188
 
189
  /**
235
  $attributes = wp_parse_args( $attributes, array(
236
  'data-options' => wp_json_encode( $field['js_options'] ),
237
  ) );
238
+ $attributes['type'] = 'text';
239
 
240
  return $attributes;
241
  }
inc/fields/email.php CHANGED
@@ -4,35 +4,6 @@
4
  */
5
  class RWMB_Email_Field extends 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
  *
@@ -43,7 +14,7 @@ class RWMB_Email_Field extends RWMB_Text_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
  }
4
  */
5
  class RWMB_Email_Field extends RWMB_Text_Field
6
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  /**
8
  * Sanitize email
9
  *
14
  *
15
  * @return string
16
  */
17
+ public static function value( $new, $old, $post_id, $field )
18
  {
19
  return $field['clone'] ? array_map( 'sanitize_email', (array) $new ) : sanitize_email( $new );
20
  }
inc/fields/fieldset-text.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Fieldset text class.
4
  */
@@ -19,9 +20,9 @@ class RWMB_Fieldset_Text_Field extends RWMB_Text_Field
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>';
@@ -29,6 +30,21 @@ class RWMB_Fieldset_Text_Field extends RWMB_Text_Field
29
  return $out;
30
  }
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  /**
33
  * Normalize parameters for field
34
  *
@@ -38,47 +54,57 @@ class RWMB_Fieldset_Text_Field extends RWMB_Text_Field
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
  /**
4
  * Fieldset text class.
5
  */
20
 
21
  foreach ( $field['options'] as $key => $label )
22
  {
23
+ $value = isset( $meta[$key] ) ? $meta[$key] : '';
24
  $field['attributes']['name'] = $field['field_name'] . "[{$key}]";
25
+ $html[] = sprintf( $tpl, $label, parent::html( $value, $field ) );
26
  }
27
 
28
  $out = '<fieldset><legend>' . $field['desc'] . '</legend>' . implode( ' ', $html ) . '</fieldset>';
30
  return $out;
31
  }
32
 
33
+ /**
34
+ * Show end HTML markup for fields
35
+ * Do not show field description. Field description is shown before list of fields
36
+ *
37
+ * @param mixed $meta
38
+ * @param array $field
39
+ * @return string
40
+ */
41
+ static function end_html( $meta, $field )
42
+ {
43
+ $button = $field['clone'] ? self::add_clone_button( $field ) : '';
44
+ $html = "$button</div>";
45
+ return $html;
46
+ }
47
+
48
  /**
49
  * Normalize parameters for field
50
  *
54
  */
55
  static function normalize( $field )
56
  {
57
+ $field = parent::normalize( $field );
58
+ $field['multiple'] = false;
59
+ $field['attributes']['id'] = false;
60
+ $field['attributes']['type'] = 'text';
61
  return $field;
62
  }
63
 
64
  /**
65
+ * Format value for the helper functions.
66
+ * @param array $field Field parameter
67
+ * @param string|array $value The field meta value
68
+ * @return string
 
 
 
 
69
  */
70
+ public static function format_value( $field, $value )
71
  {
72
+ $output = '<table><thead><tr>';
 
 
 
 
 
73
  foreach ( $field['options'] as $label )
74
  {
75
  $output .= "<th>$label</th>";
76
  }
77
+ $output .= '<tr>';
78
 
79
+ if ( ! $field['clone'] )
80
+ {
81
+ $output .= self::format_single_value( $field, $value );
82
+ }
83
+ else
84
  {
85
+ foreach ( $value as $subvalue )
 
86
  {
87
+ $output .= self::format_single_value( $field, $subvalue );
88
  }
 
89
  }
90
  $output .= '</tbody></table>';
91
+ return $output;
92
+ }
93
 
94
+ /**
95
+ * Format a single value for the helper functions.
96
+ * @param array $field Field parameter
97
+ * @param array $value The value
98
+ * @return string
99
+ */
100
+ public static function format_single_value( $field, $value )
101
+ {
102
+ $output = '<tr>';
103
+ foreach ( $value as $subvalue )
104
+ {
105
+ $output .= "<td>$subvalue</td>";
106
+ }
107
+ $output .= '</tr>';
108
  return $output;
109
  }
110
  }
inc/fields/file-advanced.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
- /**
3
- * File advanced field class which users WordPress media popup to upload and select files.
4
- */
5
- class RWMB_File_Advanced_Field extends 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 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 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 RWMB_File_Field::file_info( $file_id, $args );
41
- }
42
-
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/fields/file-upload.php CHANGED
@@ -2,26 +2,12 @@
2
  /**
3
  * File advanced field class which users WordPress media popup to upload and select files.
4
  */
5
- class RWMB_File_Upload_Field extends 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( 'rwmb-upload', RWMB_CSS_URL . 'upload.css', array( 'rwmb-media' ), RWMB_VER );
@@ -30,10 +16,10 @@ class RWMB_File_Upload_Field extends RWMB_File_Advanced_Field
30
 
31
  /**
32
  * Template for media item
33
- * @return void
34
  */
35
- static function print_templates()
36
  {
37
- require_once( RWMB_INC_DIR . 'templates/upload.php' );
 
38
  }
39
  }
2
  /**
3
  * File advanced field class which users WordPress media popup to upload and select files.
4
  */
5
+ class RWMB_File_Upload_Field extends RWMB_Media_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( 'rwmb-upload', RWMB_CSS_URL . 'upload.css', array( 'rwmb-media' ), RWMB_VER );
16
 
17
  /**
18
  * Template for media item
 
19
  */
20
+ public static function print_templates()
21
  {
22
+ parent::print_templates();
23
+ require_once RWMB_INC_DIR . 'templates/upload.php';
24
  }
25
  }
inc/fields/file.php CHANGED
@@ -8,7 +8,7 @@ class RWMB_File_Field extends RWMB_Field
8
  /**
9
  * Enqueue scripts and styles
10
  */
11
- static function admin_enqueue_scripts()
12
  {
13
  wp_enqueue_style( 'rwmb-file', RWMB_CSS_URL . 'file.css', array(), RWMB_VER );
14
  wp_enqueue_script( 'rwmb-file', RWMB_JS_URL . 'file.js', array( 'jquery' ), RWMB_VER, true );
@@ -30,22 +30,25 @@ class RWMB_File_Field extends RWMB_Field
30
  /**
31
  * Add custom actions
32
  */
33
- static function add_actions()
34
  {
35
- // Add data encoding type for file uploading
36
  add_action( 'post_edit_form_tag', array( __CLASS__, 'post_edit_form_tag' ) );
37
-
38
- // Delete file via Ajax
39
  add_action( 'wp_ajax_rwmb_delete_file', array( __CLASS__, 'wp_ajax_delete_file' ) );
40
-
41
- // Allow reordering files
42
  add_action( 'wp_ajax_rwmb_reorder_files', array( __CLASS__, 'wp_ajax_reorder_files' ) );
43
  }
44
 
 
 
 
 
 
 
 
 
45
  /**
46
  * Ajax callback for reordering images
47
  */
48
- static function wp_ajax_reorder_files()
49
  {
50
  $post_id = (int) filter_input( INPUT_POST, 'post_id', FILTER_SANITIZE_NUMBER_INT );
51
  $field_id = (string) filter_input( INPUT_POST, 'field_id' );
@@ -61,22 +64,12 @@ class RWMB_File_Field extends RWMB_Field
61
  wp_send_json_success();
62
  }
63
 
64
- /**
65
- * Add data encoding type for file uploading
66
- *
67
- * @return void
68
- */
69
- static function post_edit_form_tag()
70
- {
71
- echo ' enctype="multipart/form-data"';
72
- }
73
-
74
  /**
75
  * Ajax callback for deleting files.
76
  * Modified from a function used by "Verve Meta Boxes" plugin
77
  * @link http://goo.gl/LzYSq
78
  */
79
- static function wp_ajax_delete_file()
80
  {
81
  $post_id = (int) filter_input( INPUT_POST, 'post_id', FILTER_SANITIZE_NUMBER_INT );
82
  $field_id = (string) filter_input( INPUT_POST, 'field_id' );
@@ -89,8 +82,7 @@ class RWMB_File_Field extends RWMB_Field
89
 
90
  if ( $success )
91
  wp_send_json_success();
92
- else
93
- wp_send_json_error( __( 'Error: Cannot delete file', 'meta-box' ) );
94
  }
95
 
96
  /**
@@ -101,16 +93,16 @@ class RWMB_File_Field extends RWMB_Field
101
  *
102
  * @return string
103
  */
104
- static function html( $meta, $field )
105
  {
106
  $i18n_title = apply_filters( 'rwmb_file_upload_string', _x( 'Upload Files', 'file upload', 'meta-box' ), $field );
107
  $i18n_more = apply_filters( 'rwmb_file_add_string', _x( '+ Add new file', 'file upload', 'meta-box' ), $field );
108
 
109
  // Uploaded files
110
- $html = self::get_uploaded_files( $meta, $field );
111
- $new_file_classes = array( 'new-files' );
112
  if ( ! empty( $field['max_file_uploads'] ) && count( $meta ) >= (int) $field['max_file_uploads'] )
113
- $new_file_classes[] = 'hidden';
114
 
115
  // Show form upload
116
  $html .= sprintf(
@@ -119,7 +111,7 @@ class RWMB_File_Field extends RWMB_Field
119
  <div class="file-input"><input type="file" name="%s[]" /></div>
120
  <a class="rwmb-add-file" href="#"><strong>%s</strong></a>
121
  </div>',
122
- implode( ' ', $new_file_classes ),
123
  $i18n_title,
124
  $field['id'],
125
  $i18n_more
@@ -128,65 +120,67 @@ class RWMB_File_Field extends RWMB_Field
128
  return $html;
129
  }
130
 
131
- static function get_uploaded_files( $files, $field )
 
 
 
 
 
 
132
  {
133
  $reorder_nonce = wp_create_nonce( "rwmb-reorder-files_{$field['id']}" );
134
  $delete_nonce = wp_create_nonce( "rwmb-delete-file_{$field['id']}" );
135
 
136
- $classes = array( 'rwmb-file', 'rwmb-uploaded' );
137
  if ( count( $files ) <= 0 )
138
- $classes[] = 'hidden';
139
- $list = '<ul class="%s" data-field_id="%s" data-delete_nonce="%s" data-reorder_nonce="%s" data-force_delete="%s" data-max_file_uploads="%s" data-mime_type="%s">';
140
- $html = sprintf(
141
- $list,
142
- implode( ' ', $classes ),
 
 
 
 
143
  $field['id'],
144
  $delete_nonce,
145
  $reorder_nonce,
146
  $field['force_delete'] ? 1 : 0,
147
  $field['max_file_uploads'],
148
- $field['mime_type']
 
149
  );
150
-
151
- foreach ( (array) $files as $attachment_id )
152
- {
153
- $html .= self::file_html( $attachment_id );
154
- }
155
-
156
- $html .= '</ul>';
157
-
158
- return $html;
159
  }
160
 
161
- static function file_html( $attachment_id )
 
 
 
 
 
162
  {
163
  $i18n_delete = apply_filters( 'rwmb_file_delete_string', _x( 'Delete', 'file upload', 'meta-box' ) );
164
  $i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'meta-box' ) );
165
- $item = '
166
- <li id="item_%s">
167
- <div class="rwmb-icon">%s</div>
168
- <div class="rwmb-info">
169
- <a href="%s" target="_blank">%s</a>
170
- <p>%s</p>
171
- <a title="%s" href="%s" target="_blank">%s</a> |
172
- <a title="%s" class="rwmb-delete-file" href="#" data-attachment_id="%s">%s</a>
173
- </div>
174
- </li>';
175
-
176
- $mime_type = get_post_mime_type( $attachment_id );
177
 
178
  return sprintf(
179
- $item,
180
- $attachment_id,
181
- wp_get_attachment_image( $attachment_id, array( 60, 60 ), true ),
182
- wp_get_attachment_url( $attachment_id ),
183
- get_the_title( $attachment_id ),
 
 
 
 
 
 
 
 
184
  $mime_type,
 
185
  $i18n_edit,
186
- get_edit_post_link( $attachment_id ),
187
- $i18n_edit,
188
- $i18n_delete,
189
- $attachment_id,
190
  $i18n_delete
191
  );
192
  }
@@ -201,56 +195,54 @@ class RWMB_File_Field extends RWMB_Field
201
  *
202
  * @return array|mixed
203
  */
204
- static function value( $new, $old, $post_id, $field )
205
  {
206
- $name = $field['id'];
207
- if ( empty( $_FILES[$name] ) )
208
  return $new;
209
 
210
  $new = array();
211
- $files = self::fix_file_array( $_FILES[$name] );
212
-
213
- foreach ( $files as $file_item )
214
  {
215
- $file = wp_handle_upload( $file_item, array( 'test_form' => false ) );
216
-
217
- if ( ! isset( $file['file'] ) )
218
- continue;
219
-
220
- $file_name = $file['file'];
221
 
222
- $attachment = array(
223
- 'post_mime_type' => $file['type'],
224
- 'guid' => $file['url'],
225
- 'post_parent' => $post_id,
226
- 'post_title' => preg_replace( '/\.[^.]+$/', '', basename( $file_name ) ),
227
- 'post_content' => '',
228
- );
229
- $id = wp_insert_attachment( $attachment, $file_name, $post_id );
230
 
231
- if ( ! is_wp_error( $id ) )
232
- {
233
- wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file_name ) );
 
 
 
 
 
 
 
 
234
 
235
- // Save file ID in meta field
236
- $new[] = $id;
237
- }
 
 
 
 
 
 
 
238
  }
239
-
240
- return array_unique( array_merge( $old, $new ) );
241
  }
242
 
243
  /**
244
- * Fixes the odd indexing of multiple file uploads from the format:
245
- * $_FILES['field']['key']['index']
246
- * To the more standard and appropriate:
247
- * $_FILES['field']['index']['key']
248
- *
249
  * @param array $files
250
- *
251
  * @return array
252
  */
253
- static function fix_file_array( $files )
254
  {
255
  $output = array();
256
  foreach ( $files as $key => $list )
@@ -266,12 +258,10 @@ class RWMB_File_Field extends RWMB_Field
266
 
267
  /**
268
  * Normalize parameters for field
269
- *
270
  * @param array $field
271
- *
272
  * @return array
273
  */
274
- static function normalize( $field )
275
  {
276
  $field = parent::normalize( $field );
277
  $field = wp_parse_args( $field, array(
@@ -286,9 +276,7 @@ class RWMB_File_Field extends RWMB_Field
286
  }
287
 
288
  /**
289
- * Get the field value
290
- * The difference between this function and 'meta' function is 'meta' function always returns the escaped value
291
- * of the field saved in the database, while this function returns more meaningful value of the field
292
  *
293
  * @param array $field Field parameters
294
  * @param array $args Not used for this field
@@ -296,84 +284,108 @@ class RWMB_File_Field extends RWMB_Field
296
  *
297
  * @return mixed Full info of uploaded files
298
  */
299
- static function get_value( $field, $args = array(), $post_id = null )
300
  {
301
- if ( ! $post_id )
302
- $post_id = get_the_ID();
303
-
304
- /**
305
- * Get raw meta value in the database, no escape
306
- * Very similar to self::meta() function
307
- */
308
- $file_ids = get_post_meta( $post_id, $field['id'], false );
309
-
310
- // For each file, get full file info
311
- $value = array();
312
- foreach ( (array) $file_ids as $file_id )
313
  {
314
- if ( $file_info = call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'file_info' ), $file_id, $args ) )
 
 
 
 
 
315
  {
316
- $value[$file_id] = $file_info;
317
  }
 
 
 
 
 
318
  }
319
-
320
  return $value;
321
  }
322
 
323
  /**
324
- * Output the field value
325
- * Display unordered list of files
326
- *
327
- * @param array $field Field parameters
328
- * @param array $args Additional arguments. Not used for these fields.
329
- * @param int|null $post_id Post ID. null for current post. Optional.
330
- *
331
- * @return mixed Field value
332
  */
333
- static function the_value( $field, $args = array(), $post_id = null )
334
  {
335
- $value = self::get_value( $field, $args, $post_id );
336
- if ( ! $value )
337
- return '';
338
-
339
- $output = '<ul>';
340
- foreach ( $value as $file_id => $file_info )
341
  {
342
- $output .= sprintf(
343
- '<li><a href="%s" target="_blank">%s</a></li>',
344
- wp_get_attachment_url( $file_id ),
345
- get_the_title( $file_id )
346
- );
347
  }
348
- $output .= '</ul>';
349
-
350
- return $output;
351
  }
352
 
353
  /**
354
  * Get uploaded file information
355
  *
356
- * @param int $file_id Attachment file ID (post ID). Required.
357
- * @param array $args Array of arguments (for size).
358
  *
359
  * @return array|bool False if file not found. Array of (id, name, path, url) on success
360
  */
361
- static function file_info( $file_id, $args = array() )
362
  {
363
- $path = get_attached_file( $file_id );
364
- if ( ! $path )
365
  {
366
  return false;
367
  }
368
 
369
- $info = array(
370
- 'ID' => $file_id,
371
  'name' => basename( $path ),
372
  'path' => $path,
373
- 'url' => wp_get_attachment_url( $file_id ),
374
- 'title' => get_the_title( $file_id ),
375
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
376
 
377
- return wp_parse_args( $info, wp_get_attachment_metadata( $file_id ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378
  }
379
  }
8
  /**
9
  * Enqueue scripts and styles
10
  */
11
+ public static function admin_enqueue_scripts()
12
  {
13
  wp_enqueue_style( 'rwmb-file', RWMB_CSS_URL . 'file.css', array(), RWMB_VER );
14
  wp_enqueue_script( 'rwmb-file', RWMB_JS_URL . 'file.js', array( 'jquery' ), RWMB_VER, true );
30
  /**
31
  * Add custom actions
32
  */
33
+ public static function add_actions()
34
  {
 
35
  add_action( 'post_edit_form_tag', array( __CLASS__, 'post_edit_form_tag' ) );
 
 
36
  add_action( 'wp_ajax_rwmb_delete_file', array( __CLASS__, 'wp_ajax_delete_file' ) );
 
 
37
  add_action( 'wp_ajax_rwmb_reorder_files', array( __CLASS__, 'wp_ajax_reorder_files' ) );
38
  }
39
 
40
+ /**
41
+ * Add data encoding type for file uploading
42
+ */
43
+ public static function post_edit_form_tag()
44
+ {
45
+ echo ' enctype="multipart/form-data"';
46
+ }
47
+
48
  /**
49
  * Ajax callback for reordering images
50
  */
51
+ public static function wp_ajax_reorder_files()
52
  {
53
  $post_id = (int) filter_input( INPUT_POST, 'post_id', FILTER_SANITIZE_NUMBER_INT );
54
  $field_id = (string) filter_input( INPUT_POST, 'field_id' );
64
  wp_send_json_success();
65
  }
66
 
 
 
 
 
 
 
 
 
 
 
67
  /**
68
  * Ajax callback for deleting files.
69
  * Modified from a function used by "Verve Meta Boxes" plugin
70
  * @link http://goo.gl/LzYSq
71
  */
72
+ public static function wp_ajax_delete_file()
73
  {
74
  $post_id = (int) filter_input( INPUT_POST, 'post_id', FILTER_SANITIZE_NUMBER_INT );
75
  $field_id = (string) filter_input( INPUT_POST, 'field_id' );
82
 
83
  if ( $success )
84
  wp_send_json_success();
85
+ wp_send_json_error( __( 'Error: Cannot delete file', 'meta-box' ) );
 
86
  }
87
 
88
  /**
93
  *
94
  * @return string
95
  */
96
+ public static function html( $meta, $field )
97
  {
98
  $i18n_title = apply_filters( 'rwmb_file_upload_string', _x( 'Upload Files', 'file upload', 'meta-box' ), $field );
99
  $i18n_more = apply_filters( 'rwmb_file_add_string', _x( '+ Add new file', 'file upload', 'meta-box' ), $field );
100
 
101
  // Uploaded files
102
+ $html = self::get_uploaded_files( $meta, $field );
103
+ $classes = 'new-files';
104
  if ( ! empty( $field['max_file_uploads'] ) && count( $meta ) >= (int) $field['max_file_uploads'] )
105
+ $classes .= ' hidden';
106
 
107
  // Show form upload
108
  $html .= sprintf(
111
  <div class="file-input"><input type="file" name="%s[]" /></div>
112
  <a class="rwmb-add-file" href="#"><strong>%s</strong></a>
113
  </div>',
114
+ $classes,
115
  $i18n_title,
116
  $field['id'],
117
  $i18n_more
120
  return $html;
121
  }
122
 
123
+ /**
124
+ * Get HTML for uploaded files.
125
+ * @param array $files List of uploaded files
126
+ * @param array $field Field parameters
127
+ * @return string
128
+ */
129
+ protected static function get_uploaded_files( $files, $field )
130
  {
131
  $reorder_nonce = wp_create_nonce( "rwmb-reorder-files_{$field['id']}" );
132
  $delete_nonce = wp_create_nonce( "rwmb-delete-file_{$field['id']}" );
133
 
134
+ $classes = 'rwmb-uploaded';
135
  if ( count( $files ) <= 0 )
136
+ $classes .= ' hidden';
137
+
138
+ foreach ( (array) $files as $k => $file )
139
+ {
140
+ $files[$k] = self::call( $field, 'file_html', $file );
141
+ }
142
+ return sprintf(
143
+ '<ul class="%s" data-field_id="%s" data-delete_nonce="%s" data-reorder_nonce="%s" data-force_delete="%s" data-max_file_uploads="%s" data-mime_type="%s">%s</ul>',
144
+ $classes,
145
  $field['id'],
146
  $delete_nonce,
147
  $reorder_nonce,
148
  $field['force_delete'] ? 1 : 0,
149
  $field['max_file_uploads'],
150
+ $field['mime_type'],
151
+ implode( '', $files )
152
  );
 
 
 
 
 
 
 
 
 
153
  }
154
 
155
+ /**
156
+ * Get HTML for uploaded file.
157
+ * @param int $file Attachment (file) ID
158
+ * @return string
159
+ */
160
+ protected static function file_html( $file )
161
  {
162
  $i18n_delete = apply_filters( 'rwmb_file_delete_string', _x( 'Delete', 'file upload', 'meta-box' ) );
163
  $i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'meta-box' ) );
164
+ $mime_type = get_post_mime_type( $file );
 
 
 
 
 
 
 
 
 
 
 
165
 
166
  return sprintf(
167
+ '<li id="item_%s">
168
+ <div class="rwmb-icon">%s</div>
169
+ <div class="rwmb-info">
170
+ <a href="%s" target="_blank">%s</a>
171
+ <p>%s</p>
172
+ <a href="%s" target="_blank">%s</a> |
173
+ <a class="rwmb-delete-file" href="#" data-attachment_id="%s">%s</a>
174
+ </div>
175
+ </li>',
176
+ $file,
177
+ wp_get_attachment_image( $file, array( 60, 60 ), true ),
178
+ wp_get_attachment_url( $file ),
179
+ get_the_title( $file ),
180
  $mime_type,
181
+ get_edit_post_link( $file ),
182
  $i18n_edit,
183
+ $file,
 
 
 
184
  $i18n_delete
185
  );
186
  }
195
  *
196
  * @return array|mixed
197
  */
198
+ public static function value( $new, $old, $post_id, $field )
199
  {
200
+ if ( empty( $_FILES[$field['id']] ) )
 
201
  return $new;
202
 
203
  $new = array();
204
+ $files = self::transform( $_FILES[$field['id']] );
205
+ foreach ( $files as $file )
 
206
  {
207
+ $new[] = self::upload( $file, $post_id );
208
+ }
 
 
 
 
209
 
210
+ return array_unique( array_merge( $old, array_filter( $new ) ) );
211
+ }
 
 
 
 
 
 
212
 
213
+ /**
214
+ * Handle upload file.
215
+ * @param array $file
216
+ * @param int $post Post parent ID
217
+ * @return int Attachment ID on success, false on failure.
218
+ */
219
+ protected static function upload( $file, $post )
220
+ {
221
+ $file = wp_handle_upload( $file, array( 'test_form' => false ) );
222
+ if ( ! isset( $file['file'] ) )
223
+ return false;
224
 
225
+ $attachment = wp_insert_attachment( array(
226
+ 'post_mime_type' => $file['type'],
227
+ 'guid' => $file['url'],
228
+ 'post_parent' => $post,
229
+ 'post_title' => preg_replace( '/\.[^.]+$/', '', basename( $file['file'] ) ),
230
+ 'post_content' => '',
231
+ ), $file['file'], $post );
232
+ if ( is_wp_error( $attachment ) || ! $attachment )
233
+ {
234
+ return false;
235
  }
236
+ wp_update_attachment_metadata( $attachment, wp_generate_attachment_metadata( $attachment, $file['file'] ) );
237
+ return $attachment;
238
  }
239
 
240
  /**
241
+ * Transform $_FILES from $_FILES['field']['key']['index'] to $_FILES['field']['index']['key']
 
 
 
 
242
  * @param array $files
 
243
  * @return array
244
  */
245
+ protected static function transform( $files )
246
  {
247
  $output = array();
248
  foreach ( $files as $key => $list )
258
 
259
  /**
260
  * Normalize parameters for field
 
261
  * @param array $field
 
262
  * @return array
263
  */
264
+ public static function normalize( $field )
265
  {
266
  $field = parent::normalize( $field );
267
  $field = wp_parse_args( $field, array(
276
  }
277
 
278
  /**
279
+ * Get the field value. Return meaningful info of the files.
 
 
280
  *
281
  * @param array $field Field parameters
282
  * @param array $args Not used for this field
284
  *
285
  * @return mixed Full info of uploaded files
286
  */
287
+ public static function get_value( $field, $args = array(), $post_id = null )
288
  {
289
+ $value = parent::get_value( $field, $args, $post_id );
290
+ if ( ! $field['clone'] )
 
 
 
 
 
 
 
 
 
 
291
  {
292
+ $value = self::call( 'files_info', $field, $value, $args );
293
+ }
294
+ else
295
+ {
296
+ $return = array();
297
+ foreach ( $value as $subvalue )
298
  {
299
+ $return[] = self::call( 'files_info', $field, $subvalue, $args );
300
  }
301
+ $value = $return;
302
+ }
303
+ if ( isset( $args['limit'] ) )
304
+ {
305
+ $value = array_slice( $value, 0, intval( $args['limit'] ) );
306
  }
 
307
  return $value;
308
  }
309
 
310
  /**
311
+ * Get uploaded files information
312
+ * @param array $field Field parameter
313
+ * @param array $files Files IDs
314
+ * @param array $args Additional arguments (for image size)
315
+ * @return array
 
 
 
316
  */
317
+ public static function files_info( $field, $files, $args )
318
  {
319
+ $return = array();
320
+ foreach ( (array) $files as $file )
 
 
 
 
321
  {
322
+ if ( $info = self::call( $field, 'file_info', $file, $args ) )
323
+ {
324
+ $return[$file] = $info;
325
+ }
 
326
  }
327
+ return $return;
 
 
328
  }
329
 
330
  /**
331
  * Get uploaded file information
332
  *
333
+ * @param int $file Attachment file ID (post ID). Required.
334
+ * @param array $args Array of arguments (for size).
335
  *
336
  * @return array|bool False if file not found. Array of (id, name, path, url) on success
337
  */
338
+ public static function file_info( $file, $args = array() )
339
  {
340
+ if ( ! $path = get_attached_file( $file ) )
 
341
  {
342
  return false;
343
  }
344
 
345
+ return wp_parse_args( array(
346
+ 'ID' => $file,
347
  'name' => basename( $path ),
348
  'path' => $path,
349
+ 'url' => wp_get_attachment_url( $file ),
350
+ 'title' => get_the_title( $file ),
351
+ ), wp_get_attachment_metadata( $file ) );
352
+ }
353
+
354
+ /**
355
+ * Format value for the helper functions.
356
+ * @param array $field Field parameter
357
+ * @param string|array $value The field meta value
358
+ * @return string
359
+ */
360
+ public static function format_value( $field, $value )
361
+ {
362
+ if ( ! $field['clone'] )
363
+ {
364
+ return self::call( 'format_single_value', $field, $value );
365
+ }
366
+ $output = '<ul>';
367
+ foreach ( $value as $subvalue )
368
+ {
369
+ $output .= '<li>' . self::call( 'format_single_value', $field, $subvalue ) . '</li>';
370
+ }
371
+ $output .= '</ul>';
372
+ return $output;
373
+ }
374
 
375
+ /**
376
+ * Format a single value for the helper functions.
377
+ * @param array $field Field parameter
378
+ * @param array $value The value
379
+ * @return string
380
+ */
381
+ public static function format_single_value( $field, $value )
382
+ {
383
+ $output = '<ul>';
384
+ foreach ( $value as $file )
385
+ {
386
+ $output .= sprintf( '<li><a href="%s" target="_blank">%s</a></li>', $file['url'], $file['title'] );
387
+ }
388
+ $output .= '</ul>';
389
+ return $output;
390
  }
391
  }
inc/fields/hidden.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
- /**
3
- * Hidden field class.
4
- */
5
- class RWMB_Hidden_Field extends 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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/fields/image-advanced.php CHANGED
@@ -6,8 +6,6 @@ class RWMB_Image_Advanced_Field extends RWMB_Media_Field
6
  {
7
  /**
8
  * Enqueue scripts and styles
9
- *
10
- * @return void
11
  */
12
  static function admin_enqueue_scripts()
13
  {
@@ -16,18 +14,6 @@ class RWMB_Image_Advanced_Field extends RWMB_Media_Field
16
  wp_enqueue_script( 'rwmb-image-advanced', RWMB_JS_URL . 'image-advanced.js', array( 'rwmb-media' ), 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
  *
@@ -39,7 +25,6 @@ class RWMB_Image_Advanced_Field extends RWMB_Media_Field
39
  {
40
  $field = parent::normalize( $field );
41
  $field['mime_type'] = 'image';
42
-
43
  return $field;
44
  }
45
 
@@ -56,35 +41,46 @@ class RWMB_Image_Advanced_Field extends RWMB_Media_Field
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 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 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( RWMB_INC_DIR . 'templates/image-advanced.php' );
 
89
  }
90
  }
6
  {
7
  /**
8
  * Enqueue scripts and styles
 
 
9
  */
10
  static function admin_enqueue_scripts()
11
  {
14
  wp_enqueue_script( 'rwmb-image-advanced', RWMB_JS_URL . 'image-advanced.js', array( 'rwmb-media' ), RWMB_VER, true );
15
  }
16
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  /**
18
  * Normalize parameters for field
19
  *
25
  {
26
  $field = parent::normalize( $field );
27
  $field['mime_type'] = 'image';
 
28
  return $field;
29
  }
30
 
41
  }
42
 
43
  /**
44
+ * Get uploaded file information.
45
+ *
46
+ * @param int $file Attachment image ID (post ID). Required.
47
+ * @param array $args Array of arguments (for size).
48
+ * @return array|bool False if file not found. Array of image info on success
49
  */
50
+ static function file_info( $file, $args = array() )
51
  {
52
+ return RWMB_Image_Field::file_info( $file, $args );
53
  }
54
 
55
  /**
56
+ * Format value for the helper functions.
57
+ * @param array $field Field parameter
58
+ * @param string|array $value The field meta value
59
+ * @return string
60
+ */
61
+ public static function format_value( $field, $value )
62
+ {
63
+ return RWMB_Image_Field::format_value( $field, $value );
64
+ }
65
+
66
+ /**
67
+ * Format a single value for the helper functions.
68
+ * @param array $field Field parameter
69
+ * @param array $value The value
70
+ * @return string
71
  */
72
+ public static function format_single_value( $field, $value )
73
  {
74
+ return RWMB_Image_Field::format_single_value( $field, $value );
75
  }
76
 
77
  /**
78
  * Template for media item
79
  * @return void
80
  */
81
+ public static function print_templates()
82
  {
83
+ parent::print_templates();
84
+ require_once RWMB_INC_DIR . 'templates/image-advanced.php';
85
  }
86
  }
inc/fields/image-select.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Image select field class which uses images as radio options.
4
  */
@@ -56,61 +57,13 @@ class RWMB_Image_Select_Field extends RWMB_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
  /**
4
  * Image select field class which uses images as radio options.
5
  */
57
  }
58
 
59
  /**
60
+ * Format a single value for the helper functions.
61
+ * @param array $field Field parameter
62
+ * @param string $value The value
63
+ * @return string
 
 
 
64
  */
65
+ static function format_single_value( $field, $value )
66
  {
67
+ return sprintf( '<img src="%s">', esc_url( $field['options'][$value] ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
69
  }
inc/fields/image-upload.php CHANGED
@@ -5,26 +5,21 @@
5
  class RWMB_Image_Upload_Field extends 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( '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
- RWMB_File_Upload_Field::admin_enqueue_scripts();
28
- wp_enqueue_script( 'rwmb-image-upload', RWMB_JS_URL . 'image-upload.js', array( 'rwmb-file-upload', 'rwmb-image-advanced' ), RWMB_VER, true );
29
  }
30
  }
5
  class RWMB_Image_Upload_Field extends RWMB_Image_Advanced_Field
6
  {
7
  /**
8
+ * Enqueue scripts and styles
 
 
9
  */
10
+ public static function admin_enqueue_scripts()
11
  {
12
+ parent::admin_enqueue_scripts();
13
+ RWMB_File_Upload_Field::admin_enqueue_scripts();
14
+ wp_enqueue_script( 'rwmb-image-upload', RWMB_JS_URL . 'image-upload.js', array( 'rwmb-file-upload', 'rwmb-image-advanced' ), RWMB_VER, true );
15
  }
16
 
17
  /**
18
+ * Template for media item
 
 
19
  */
20
+ public static function print_templates()
21
  {
22
+ parent::print_templates();
23
+ RWMB_File_Upload_Field::print_templates();
 
24
  }
25
  }
inc/fields/image.php CHANGED
@@ -8,109 +8,10 @@ class RWMB_Image_Field extends RWMB_File_Field
8
  /**
9
  * Enqueue scripts and styles.
10
  */
11
- static function admin_enqueue_scripts()
12
  {
13
- // Enqueue same scripts and styles as for file field
14
  parent::admin_enqueue_scripts();
15
-
16
  wp_enqueue_style( 'rwmb-image', RWMB_CSS_URL . 'image.css', array(), RWMB_VER );
17
- wp_enqueue_script( 'rwmb-image', RWMB_JS_URL . 'image.js', array( 'jquery-ui-sortable' ), RWMB_VER, true );
18
- }
19
-
20
- /**
21
- * Add custom actions.
22
- */
23
- static function add_actions()
24
- {
25
- // Do same actions as file field
26
- parent::add_actions();
27
-
28
- // Reorder images via Ajax
29
- add_action( 'wp_ajax_rwmb_reorder_images', array( __CLASS__, 'wp_ajax_reorder_images' ) );
30
- }
31
-
32
- /**
33
- * Ajax callback for reordering images.
34
- */
35
- static function wp_ajax_reorder_images()
36
- {
37
- $post_id = (int) filter_input( INPUT_POST, 'post_id', FILTER_SANITIZE_NUMBER_INT );
38
- $field_id = (string) filter_input( INPUT_POST, 'field_id' );
39
- $order = (string) filter_input( INPUT_POST, 'order' );
40
-
41
- check_ajax_referer( "rwmb-reorder-images_{$field_id}" );
42
- parse_str( $order, $items );
43
- delete_post_meta( $post_id, $field_id );
44
- foreach ( $items['item'] as $item )
45
- {
46
- add_post_meta( $post_id, $field_id, $item, false );
47
- }
48
- wp_send_json_success();
49
- }
50
-
51
- /**
52
- * Get field HTML
53
- *
54
- * @param mixed $meta
55
- * @param array $field
56
- *
57
- * @return string
58
- */
59
- static function html( $meta, $field )
60
- {
61
- $i18n_title = apply_filters( 'rwmb_image_upload_string', _x( 'Upload Images', 'image upload', 'meta-box' ), $field );
62
- $i18n_more = apply_filters( 'rwmb_image_add_string', _x( '+ Add new image', 'image upload', 'meta-box' ), $field );
63
-
64
- // Uploaded images
65
- $html = self::get_uploaded_images( $meta, $field );
66
-
67
- // Show form upload
68
- $html .= sprintf(
69
- '<h4>%s</h4>
70
- <div class="new-files">
71
- <div class="file-input"><input type="file" name="%s[]" /></div>
72
- <a class="rwmb-add-file" href="#"><strong>%s</strong></a>
73
- </div>',
74
- $i18n_title,
75
- $field['id'],
76
- $i18n_more
77
- );
78
-
79
- return $html;
80
- }
81
-
82
- /**
83
- * Get HTML markup for uploaded images
84
- *
85
- * @param array $images
86
- * @param array $field
87
- *
88
- * @return string
89
- */
90
- static function get_uploaded_images( $images, $field )
91
- {
92
- $reorder_nonce = wp_create_nonce( "rwmb-reorder-images_{$field['id']}" );
93
- $delete_nonce = wp_create_nonce( "rwmb-delete-file_{$field['id']}" );
94
- $classes = array( 'rwmb-images', 'rwmb-uploaded' );
95
- if ( count( $images ) <= 0 )
96
- $classes[] = 'hidden';
97
- $list = '<ul class="%s" data-field_id="%s" data-delete_nonce="%s" data-reorder_nonce="%s" data-force_delete="%s" data-max_file_uploads="%s">';
98
- $html = sprintf(
99
- $list,
100
- implode( ' ', $classes ),
101
- $field['id'],
102
- $delete_nonce,
103
- $reorder_nonce,
104
- $field['force_delete'] ? 1 : 0,
105
- $field['max_file_uploads']
106
- );
107
-
108
- foreach ( $images as $image )
109
- {
110
- $html .= self::img_html( $image );
111
- }
112
- $html .= '</ul>';
113
- return $html;
114
  }
115
 
116
  /**
@@ -119,116 +20,84 @@ class RWMB_Image_Field extends RWMB_File_Field
119
  * @param int $image Image ID
120
  * @return string
121
  */
122
- static function img_html( $image )
123
  {
124
- $i18n_delete = apply_filters( 'rwmb_image_delete_string', _x( 'Delete', 'image upload', 'meta-box' ) );
125
- $i18n_edit = apply_filters( 'rwmb_image_edit_string', _x( 'Edit', 'image upload', 'meta-box' ) );
126
- $item = '
127
- <li id="item_%s">
128
- <img src="%s" />
129
  <div class="rwmb-image-bar">
130
- <a title="%s" class="rwmb-edit-file" href="%s" target="_blank">%s</a> |
131
- <a title="%s" class="rwmb-delete-file" href="#" data-attachment_id="%s">&times;</a>
132
  </div>
133
- </li>
134
- ';
135
-
136
- $src = wp_get_attachment_image_src( $image, 'thumbnail' );
137
- $src = $src[0];
138
- $link = get_edit_post_link( $image );
139
-
140
- return sprintf(
141
- $item,
142
  $image,
143
  $src,
144
- $i18n_edit, $link, $i18n_edit,
145
- $i18n_delete, $image
146
  );
147
  }
148
 
149
  /**
150
- * Output the field value
151
- * Display unordered list of images with option for size and link to full size
152
- *
153
- * @param array $field Field parameters
154
- * @param array $args Additional arguments. Not used for these fields.
155
- * @param int|null $post_id Post ID. null for current post. Optional.
156
- *
157
- * @return mixed Field value
158
  */
159
- static function the_value( $field, $args = array(), $post_id = null )
160
  {
161
- $value = self::get_value( $field, $args, $post_id );
162
- if ( ! $value )
163
- return '';
164
-
165
  $output = '<ul>';
166
- foreach ( $value as $file_info )
167
  {
168
- $img = sprintf(
169
- '<img src="%s" alt="%s" title="%s">',
170
- esc_url( $file_info['url'] ),
171
- esc_attr( $file_info['alt'] ),
172
- esc_attr( $file_info['title'] )
173
- );
174
 
175
  // Link thumbnail to full size image?
176
  if ( isset( $args['link'] ) && $args['link'] )
177
  {
178
- $img = sprintf(
179
- '<a href="%s" title="%s">%s</a>',
180
- esc_url( $file_info['full_url'] ),
181
- esc_attr( $file_info['title'] ),
182
- $img
183
- );
184
  }
185
-
186
  $output .= "<li>$img</li>";
187
  }
188
  $output .= '</ul>';
189
-
190
  return $output;
191
  }
192
 
193
  /**
194
  * Get uploaded file information
195
  *
196
- * @param int $file_id Attachment image ID (post ID). Required.
197
- * @param array $args Array of arguments (for size).
198
  *
199
  * @return array|bool False if file not found. Array of image info on success
200
  */
201
- static function file_info( $file_id, $args = array() )
202
  {
203
- $args = wp_parse_args( $args, array(
204
- 'size' => 'thumbnail',
205
- ) );
206
-
207
- $img_src = wp_get_attachment_image_src( $file_id, $args['size'] );
208
- if ( ! $img_src )
209
  {
210
  return false;
211
  }
212
 
213
- $attachment = get_post( $file_id );
214
- $path = get_attached_file( $file_id );
 
 
 
215
  $info = array(
216
- 'ID' => $file_id,
217
  'name' => basename( $path ),
218
  'path' => $path,
219
- 'url' => $img_src[0],
220
- 'full_url' => wp_get_attachment_url( $file_id ),
221
  'title' => $attachment->post_title,
222
  'caption' => $attachment->post_excerpt,
223
  'description' => $attachment->post_content,
224
- 'alt' => get_post_meta( $file_id, '_wp_attachment_image_alt', true ),
225
  );
226
  if ( function_exists( 'wp_get_attachment_image_srcset' ) )
227
  {
228
- $info['srcset'] = wp_get_attachment_image_srcset( $file_id );
229
  }
230
 
231
- $info = wp_parse_args( $info, wp_get_attachment_metadata( $file_id ) );
232
- return $info;
233
  }
234
  }
8
  /**
9
  * Enqueue scripts and styles.
10
  */
11
+ public static function admin_enqueue_scripts()
12
  {
 
13
  parent::admin_enqueue_scripts();
 
14
  wp_enqueue_style( 'rwmb-image', RWMB_CSS_URL . 'image.css', array(), RWMB_VER );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
16
 
17
  /**
20
  * @param int $image Image ID
21
  * @return string
22
  */
23
+ public static function file_html( $image )
24
  {
25
+ list( $src ) = wp_get_attachment_image_src( $image, 'thumbnail' );
26
+ return sprintf(
27
+ '<li id="item_%s">
28
+ <img src="%s">
 
29
  <div class="rwmb-image-bar">
30
+ <a href="%s" target="_blank"><span class="dashicons dashicons-edit"></span></a> |
31
+ <a class="rwmb-delete-file" href="#" data-attachment_id="%s">&times;</a>
32
  </div>
33
+ </li>',
 
 
 
 
 
 
 
 
34
  $image,
35
  $src,
36
+ get_edit_post_link( $image ),
37
+ $image
38
  );
39
  }
40
 
41
  /**
42
+ * Format a single value for the helper functions.
43
+ * @param array $field Field parameter
44
+ * @param array $value The value
45
+ * @return string
 
 
 
 
46
  */
47
+ public static function format_single_value( $field, $value )
48
  {
 
 
 
 
49
  $output = '<ul>';
50
+ foreach ( $value as $file )
51
  {
52
+ $img = sprintf( '<img src="%s" alt="%s">', esc_url( $file['url'] ), esc_attr( $file['alt'] ) );
 
 
 
 
 
53
 
54
  // Link thumbnail to full size image?
55
  if ( isset( $args['link'] ) && $args['link'] )
56
  {
57
+ $img = sprintf( '<a href="%s" title="%s">%s</a>', esc_url( $file['full_url'] ), esc_attr( $file['title'] ), $img );
 
 
 
 
 
58
  }
 
59
  $output .= "<li>$img</li>";
60
  }
61
  $output .= '</ul>';
 
62
  return $output;
63
  }
64
 
65
  /**
66
  * Get uploaded file information
67
  *
68
+ * @param int $file Attachment image ID (post ID). Required.
69
+ * @param array $args Array of arguments (for size).
70
  *
71
  * @return array|bool False if file not found. Array of image info on success
72
  */
73
+ public static function file_info( $file, $args = array() )
74
  {
75
+ if ( ! $path = get_attached_file( $file ) )
 
 
 
 
 
76
  {
77
  return false;
78
  }
79
 
80
+ $args = wp_parse_args( $args, array(
81
+ 'size' => 'thumbnail',
82
+ ) );
83
+ list( $src ) = wp_get_attachment_image_src( $file, $args['size'] );
84
+ $attachment = get_post( $file );
85
  $info = array(
86
+ 'ID' => $file,
87
  'name' => basename( $path ),
88
  'path' => $path,
89
+ 'url' => $src,
90
+ 'full_url' => wp_get_attachment_url( $file ),
91
  'title' => $attachment->post_title,
92
  'caption' => $attachment->post_excerpt,
93
  'description' => $attachment->post_content,
94
+ 'alt' => get_post_meta( $file, '_wp_attachment_image_alt', true ),
95
  );
96
  if ( function_exists( 'wp_get_attachment_image_srcset' ) )
97
  {
98
+ $info['srcset'] = wp_get_attachment_image_srcset( $file );
99
  }
100
 
101
+ return wp_parse_args( $info, wp_get_attachment_metadata( $file ) );
 
102
  }
103
  }
inc/fields/input-list.php CHANGED
@@ -23,7 +23,7 @@ class RWMB_Input_List_Field extends RWMB_Choice_Field
23
  *
24
  * @return string
25
  */
26
- public static function walk( $options, $db_fields, $meta, $field )
27
  {
28
  $walker = new RWMB_Input_List_Walker( $db_fields, $field, $meta );
29
  $output = sprintf( '<ul class="rwmb-input-list %s %s">',
@@ -75,22 +75,4 @@ class RWMB_Input_List_Field extends RWMB_Choice_Field
75
 
76
  return $attributes;
77
  }
78
-
79
- /**
80
- * Output the field value
81
- * Display option name instead of option value
82
- *
83
- * @use self::meta()
84
- *
85
- * @param array $field Field parameters
86
- * @param array $args Additional arguments. Rarely used. See specific fields for details
87
- * @param int|null $post_id Post ID. null for current post. Optional.
88
- *
89
- * @return mixed Field value
90
- */
91
- public static function the_value( $field, $args = array(), $post_id = null )
92
- {
93
- $value = parent::get_value( $field, $args, $post_id );
94
- return empty( $value ) ? '' : $field['options'][$value];
95
- }
96
  }
23
  *
24
  * @return string
25
  */
26
+ public static function walk( $field, $options, $db_fields, $meta )
27
  {
28
  $walker = new RWMB_Input_List_Walker( $db_fields, $field, $meta );
29
  $output = sprintf( '<ul class="rwmb-input-list %s %s">',
75
 
76
  return $attributes;
77
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
inc/fields/input.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Abstract input field class which is used for all <input> fields.
4
  */
@@ -11,10 +12,10 @@ abstract class RWMB_Input_Field extends RWMB_Field
11
  * @param array $field
12
  * @return string
13
  */
14
- static function html( $meta, $field )
15
  {
16
- $attributes = call_user_func( array( 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
  /**
@@ -23,7 +24,7 @@ abstract class RWMB_Input_Field extends RWMB_Field
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(
@@ -47,7 +48,7 @@ abstract class RWMB_Input_Field extends RWMB_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(
@@ -55,18 +56,19 @@ abstract class RWMB_Input_Field extends RWMB_Field
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 '';
1
  <?php
2
+
3
  /**
4
  * Abstract input field class which is used for all <input> fields.
5
  */
12
  * @param array $field
13
  * @return string
14
  */
15
+ public static function html( $meta, $field )
16
  {
17
+ $attributes = self::call( 'get_attributes', $field, $meta );
18
+ return sprintf( '<input %s>%s', self::render_attributes( $attributes ), self::datalist( $field ) );
19
  }
20
 
21
  /**
24
  * @param array $field
25
  * @return array
26
  */
27
+ public static function normalize( $field )
28
  {
29
  $field = parent::normalize( $field );
30
  $field = wp_parse_args( $field, array(
48
  * @param mixed $value
49
  * @return array
50
  */
51
+ public static function get_attributes( $field, $value = null )
52
  {
53
  $attributes = parent::get_attributes( $field, $value );
54
  $attributes = wp_parse_args( $attributes, array(
56
  'readonly' => $field['readonly'],
57
  'value' => $value,
58
  'placeholder' => $field['placeholder'],
59
+ 'type' => $field['type'],
60
  ) );
61
 
62
  return $attributes;
63
  }
64
 
65
  /**
66
+ * Create datalist, if any.
67
  *
68
  * @param array $field
69
  * @return array
70
  */
71
+ protected static function datalist( $field )
72
  {
73
  if ( empty( $field['datalist'] ) )
74
  return '';
inc/fields/key-value.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Key-value field class.
4
  */
@@ -113,31 +114,21 @@ abstract class RWMB_Key_Value_Field extends RWMB_Text_Field
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
  {
1
  <?php
2
+
3
  /**
4
  * Key-value field class.
5
  */
114
  */
115
  static function normalize( $field )
116
  {
117
+ $field = parent::normalize( $field );
118
+ $field['clone'] = true;
119
+ $field['multiple'] = true;
120
+ $field['attributes']['type'] = 'text';
121
  return $field;
122
  }
123
 
124
  /**
125
+ * Format value for the helper functions.
126
+ * @param array $field Field parameter
127
+ * @param string|array $value The field meta value
128
+ * @return string
 
 
 
 
 
 
 
129
  */
130
+ public static function format_value( $field, $value )
131
  {
 
 
 
 
132
  $output = '<ul>';
133
  foreach ( $value as $subvalue )
134
  {
inc/fields/media.php CHANGED
@@ -1,16 +1,13 @@
1
  <?php
2
-
3
  /**
4
  * Media field class which users WordPress media popup to upload and select files.
5
  */
6
- class RWMB_Media_Field extends RWMB_Field
7
  {
8
  /**
9
  * Enqueue scripts and styles
10
- *
11
- * @return void
12
  */
13
- static function admin_enqueue_scripts()
14
  {
15
  wp_enqueue_media();
16
  wp_enqueue_style( 'rwmb-media', RWMB_CSS_URL . 'media.css', array(), RWMB_VER );
@@ -41,13 +38,12 @@ class RWMB_Media_Field extends RWMB_Field
41
 
42
  /**
43
  * Add actions
44
- *
45
- * @return void
46
  */
47
- static function add_actions()
48
  {
49
- // Print attachment templates
50
- add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
 
51
  }
52
 
53
  /**
@@ -58,11 +54,11 @@ class RWMB_Media_Field extends RWMB_Field
58
  *
59
  * @return string
60
  */
61
- static function html( $meta, $field )
62
  {
63
- $meta = (array) $meta;
64
- $meta = implode( ',', $meta );
65
- $attributes = $load_test_attr = self::get_attributes( $field, $meta );
66
 
67
  $html = sprintf(
68
  '<input %s>
@@ -84,7 +80,7 @@ class RWMB_Media_Field extends RWMB_Field
84
  *
85
  * @return array
86
  */
87
- static function normalize( $field )
88
  {
89
  $field = parent::normalize( $field );
90
  $field = wp_parse_args( $field, array(
@@ -108,7 +104,7 @@ class RWMB_Media_Field extends RWMB_Field
108
  *
109
  * @return array
110
  */
111
- static function get_attributes( $field, $value = null )
112
  {
113
  $attributes = parent::get_attributes( $field, $value );
114
  $attributes['type'] = 'hidden';
@@ -120,7 +116,11 @@ class RWMB_Media_Field extends RWMB_Field
120
  return $attributes;
121
  }
122
 
123
- static function get_mime_extensions()
 
 
 
 
124
  {
125
  $mime_types = wp_get_mime_types();
126
  $extensions = array();
@@ -147,7 +147,7 @@ class RWMB_Media_Field extends RWMB_Field
147
  * @param $post_id
148
  * @param $field
149
  */
150
- static function save( $new, $old, $post_id, $field )
151
  {
152
  delete_post_meta( $post_id, $field['id'] );
153
  parent::save( $new, array(), $post_id, $field );
@@ -163,7 +163,7 @@ class RWMB_Media_Field extends RWMB_Field
163
  *
164
  * @return array|mixed
165
  */
166
- static function value( $new, $old, $post_id, $field )
167
  {
168
  if ( $field['clone'] )
169
  {
@@ -182,10 +182,9 @@ class RWMB_Media_Field extends RWMB_Field
182
 
183
  /**
184
  * Template for media item
185
- * @return void
186
  */
187
- static function print_templates()
188
  {
189
- require_once( RWMB_INC_DIR . 'templates/media.php' );
190
  }
191
  }
1
  <?php
 
2
  /**
3
  * Media field class which users WordPress media popup to upload and select files.
4
  */
5
+ class RWMB_Media_Field extends RWMB_File_Field
6
  {
7
  /**
8
  * Enqueue scripts and styles
 
 
9
  */
10
+ public static function admin_enqueue_scripts()
11
  {
12
  wp_enqueue_media();
13
  wp_enqueue_style( 'rwmb-media', RWMB_CSS_URL . 'media.css', array(), RWMB_VER );
38
 
39
  /**
40
  * Add actions
 
 
41
  */
42
+ public static function add_actions()
43
  {
44
+ $args = func_get_args();
45
+ $field = reset( $args );
46
+ add_action( 'print_media_templates', array( self::get_class_name( $field ), 'print_templates' ) );
47
  }
48
 
49
  /**
54
  *
55
  * @return string
56
  */
57
+ public static function html( $meta, $field )
58
  {
59
+ $meta = (array) $meta;
60
+ $meta = implode( ',', $meta );
61
+ $attributes = $load_test_attr = self::get_attributes( $field, $meta );
62
 
63
  $html = sprintf(
64
  '<input %s>
80
  *
81
  * @return array
82
  */
83
+ public static function normalize( $field )
84
  {
85
  $field = parent::normalize( $field );
86
  $field = wp_parse_args( $field, array(
104
  *
105
  * @return array
106
  */
107
+ public static function get_attributes( $field, $value = null )
108
  {
109
  $attributes = parent::get_attributes( $field, $value );
110
  $attributes['type'] = 'hidden';
116
  return $attributes;
117
  }
118
 
119
+ /**
120
+ * Get supported mime extensions.
121
+ * @return array
122
+ */
123
+ protected static function get_mime_extensions()
124
  {
125
  $mime_types = wp_get_mime_types();
126
  $extensions = array();
147
  * @param $post_id
148
  * @param $field
149
  */
150
+ public static function save( $new, $old, $post_id, $field )
151
  {
152
  delete_post_meta( $post_id, $field['id'] );
153
  parent::save( $new, array(), $post_id, $field );
163
  *
164
  * @return array|mixed
165
  */
166
+ public static function value( $new, $old, $post_id, $field )
167
  {
168
  if ( $field['clone'] )
169
  {
182
 
183
  /**
184
  * Template for media item
 
185
  */
186
+ public static function print_templates()
187
  {
188
+ require_once RWMB_INC_DIR . 'templates/media.php';
189
  }
190
  }
inc/fields/multiple-values.php CHANGED
@@ -29,45 +29,13 @@ abstract class RWMB_Multiple_Values_Field extends RWMB_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
  }
29
  }
30
 
31
  /**
32
+ * Format a single value for the helper functions.
33
+ * @param array $field Field parameter
34
+ * @param string $value The value
35
+ * @return string
 
 
 
 
36
  */
37
+ static function format_single_value( $field, $value )
38
  {
39
+ return $field['options'][$value];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  }
41
  }
inc/fields/number.php CHANGED
@@ -40,8 +40,6 @@ class RWMB_Number_Field extends RWMB_Input_Field
40
  'max' => $field['max'],
41
  'min' => $field['min'],
42
  ) );
43
- $attributes['type'] = 'number';
44
-
45
  return $attributes;
46
  }
47
  }
40
  'max' => $field['max'],
41
  'min' => $field['min'],
42
  ) );
 
 
43
  return $attributes;
44
  }
45
  }
inc/fields/object-choice.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Abstract field to select an object: post, user, taxonomy, etc.
4
  */
@@ -13,25 +14,9 @@ abstract class RWMB_Object_Choice_Field extends RWMB_Choice_Field
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 RWMB_Input_List_Field::walk( $options, $db_fields, $meta, $field );
23
- break;
24
- case 'select_tree':
25
- return RWMB_Select_Tree_Field::walk( $options, $db_fields, $meta, $field );
26
- break;
27
- case 'select_advanced':
28
- return RWMB_Select_Advanced_Field::walk( $options, $db_fields, $meta, $field );
29
- break;
30
- case 'select':
31
- default:
32
- return RWMB_Select_Field::walk( $options, $db_fields, $meta, $field );
33
- break;
34
- }
35
  }
36
 
37
  /**
@@ -55,25 +40,15 @@ abstract class RWMB_Object_Choice_Field extends RWMB_Choice_Field
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 RWMB_Input_List_Field::normalize( $field );
65
- break;
66
- case 'select_advanced':
67
- return RWMB_Select_Advanced_Field::normalize( $field );
68
- break;
69
- case 'select_tree':
70
- return RWMB_Select_Tree_Field::normalize( $field );
71
- break;
72
- case 'select':
73
- default:
74
- return RWMB_Select_Field::normalize( $field );
75
- break;
76
  }
 
 
 
 
 
77
  }
78
 
79
  /**
@@ -86,25 +61,12 @@ abstract class RWMB_Object_Choice_Field extends RWMB_Choice_Field
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 RWMB_Input_List_Field::get_attributes( $field, $value );
94
- break;
95
- case 'select_advanced':
96
- $attributes = RWMB_Select_Advanced_Field::get_attributes( $field, $value );
97
- $attributes['class'] .= ' rwmb-select_advanced';
98
- return $attributes;
99
- break;
100
- case 'select_tree':
101
- return RWMB_Select_Tree_Field::get_attributes( $field, $value );
102
- break;
103
- case 'select':
104
- default:
105
- return RWMB_Select_Field::get_attributes( $field, $value );
106
- break;
107
  }
 
108
  }
109
 
110
  /**
@@ -146,14 +108,16 @@ abstract class RWMB_Object_Choice_Field extends RWMB_Choice_Field
146
  }
147
 
148
  /**
149
- * Get options for walker
150
- *
151
- * @param array $field
152
- *
153
- * @return array
154
  */
155
- public static function get_options( $field )
156
  {
157
- return array();
 
 
 
 
158
  }
159
  }
1
  <?php
2
+
3
  /**
4
  * Abstract field to select an object: post, user, taxonomy, etc.
5
  */
14
  * @param array $field
15
  * @return string
16
  */
17
+ public static function walk( $field, $options, $db_fields, $meta )
18
  {
19
+ return call_user_func( array( self::get_type_class( $field ), 'walk' ), $field, $options, $db_fields, $meta );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
21
 
22
  /**
40
  $field['field_type'] = 'checkbox_list';
41
  $field['flatten'] = false;
42
  }
43
+ if ( 'radio_list' == $field['field_type'] )
 
44
  {
45
+ $field['multiple'] = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
47
+ if ( 'checkbox_list' == $field['field_type'] )
48
+ {
49
+ $field['multiple'] = true;
50
+ }
51
+ return call_user_func( array( self::get_type_class( $field ), 'normalize' ), $field );
52
  }
53
 
54
  /**
61
  */
62
  public static function get_attributes( $field, $value = null )
63
  {
64
+ $attributes = call_user_func( array( self::get_type_class( $field ), 'get_attributes' ), $field, $value );
65
+ if ( 'select_advanced' == $field['field_type'] )
66
  {
67
+ $attributes['class'] .= ' rwmb-select_advanced';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
69
+ return $attributes;
70
  }
71
 
72
  /**
108
  }
109
 
110
  /**
111
+ * Get correct rendering class for the field.
112
+ * @param array $field Field parameter
113
+ * @return string
 
 
114
  */
115
+ protected static function get_type_class( $field )
116
  {
117
+ if ( in_array( $field['field_type'], array( 'checkbox_list', 'radio_list' ) ) )
118
+ {
119
+ return 'RWMB_Input_List_Field';
120
+ }
121
+ return self::get_class_name( array( 'type' => $field['field_type'] ) );
122
  }
123
  }
inc/fields/oembed.php CHANGED
@@ -74,49 +74,38 @@ class RWMB_OEmbed_Field extends RWMB_URL_Field
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
  }
74
  */
75
  public static function html( $meta, $field )
76
  {
77
+ return parent::html( $meta, $field ) . sprintf(
78
+ '<a href="#" class="show-embed button">%s</a>
 
 
79
  <span class="spinner"></span>
80
  <div class="embed-code">%s</div>',
81
+ esc_html__( 'Preview', 'meta-box' ),
 
82
  $meta ? self::get_embed( $meta ) : ''
83
  );
84
  }
85
 
86
  /**
87
+ * Get the attributes for a field
 
88
  *
89
+ * @param array $field
90
+ * @param mixed $value
 
91
  *
92
+ * @return array
93
  */
94
+ public static function get_attributes( $field, $value = null )
95
  {
96
+ $attributes = parent::get_attributes( $field, $value );
97
+ $attributes['type'] = 'url';
98
+ return $attributes;
99
+ }
100
+
101
+ /**
102
+ * Format a single value for the helper functions.
103
+ * @param array $field Field parameter
104
+ * @param string $value The value
105
+ * @return string
106
+ */
107
+ public static function format_single_value( $field, $value )
108
+ {
109
+ return self::get_embed( $value );
 
 
 
 
 
 
110
  }
111
  }
inc/fields/password.php CHANGED
@@ -4,20 +4,6 @@
4
  */
5
  class RWMB_Password_Field extends 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
4
  */
5
  class RWMB_Password_Field extends RWMB_Text_Field
6
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  /**
8
  * Store secured password in the database.
9
  * @param mixed $new
inc/fields/plupload-image.php DELETED
@@ -1,5 +0,0 @@
1
- <?php
2
- /**
3
- * Image upload field which uses plupload library to drag and drop files to upload.
4
- */
5
- class RWMB_Plupload_Image_Field extends RWMB_Image_Upload_Field {}
 
 
 
 
 
inc/fields/post.php CHANGED
@@ -117,7 +117,7 @@ class RWMB_Post_Field extends RWMB_Object_Choice_Field
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>',
117
  *
118
  * @return string
119
  */
120
+ public static function get_option_label( $field, $value )
121
  {
122
  return sprintf(
123
  '<a href="%s" title="%s">%s</a>',
inc/fields/range.php CHANGED
@@ -11,9 +11,9 @@ class RWMB_Range_Field extends RWMB_Number_Field
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="rwmb-output">%s</span>', $meta );
18
  return $output;
19
  }
@@ -21,7 +21,7 @@ class RWMB_Range_Field extends RWMB_Number_Field
21
  /**
22
  * Enqueue styles
23
  */
24
- static function admin_enqueue_scripts()
25
  {
26
  wp_enqueue_style( 'rwmb-range', RWMB_CSS_URL . 'range.css', array(), RWMB_VER );
27
  wp_enqueue_script( 'rwmb-range', RWMB_JS_URL . 'range.js', array(), RWMB_VER, true );
@@ -29,40 +29,18 @@ class RWMB_Range_Field extends RWMB_Number_Field
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
  *
@@ -73,7 +51,7 @@ class RWMB_Range_Field extends RWMB_Number_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'] );
@@ -83,11 +61,10 @@ class RWMB_Range_Field extends RWMB_Number_Field
83
  {
84
  return $min;
85
  }
86
- elseif ( $new > $max )
87
  {
88
  return $max;
89
  }
90
-
91
  return $new;
92
  }
93
  }
11
  * @param array $field
12
  * @return string
13
  */
14
+ public static function html( $meta, $field )
15
  {
16
+ $output = parent::html( $meta, $field );
17
  $output .= sprintf( '<span class="rwmb-output">%s</span>', $meta );
18
  return $output;
19
  }
21
  /**
22
  * Enqueue styles
23
  */
24
+ public static function admin_enqueue_scripts()
25
  {
26
  wp_enqueue_style( 'rwmb-range', RWMB_CSS_URL . 'range.css', array(), RWMB_VER );
27
  wp_enqueue_script( 'rwmb-range', RWMB_JS_URL . 'range.js', array(), RWMB_VER, true );
29
 
30
  /**
31
  * Normalize parameters for field.
 
32
  * @param array $field
 
33
  * @return array
34
  */
35
+ public static function normalize( $field )
36
  {
37
  $field = wp_parse_args( $field, array(
38
+ 'max' => 10,
 
 
39
  ) );
 
40
  $field = parent::normalize( $field );
 
41
  return $field;
42
  }
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  /**
45
  * Ensure number in range.
46
  *
51
  *
52
  * @return int
53
  */
54
+ public static function value( $new, $old, $post_id, $field )
55
  {
56
  $new = intval( $new );
57
  $min = intval( $field['min'] );
61
  {
62
  return $min;
63
  }
64
+ if ( $new > $max )
65
  {
66
  return $max;
67
  }
 
68
  return $new;
69
  }
70
  }
inc/fields/select-advanced.php CHANGED
@@ -13,48 +13,22 @@ class RWMB_Select_Advanced_Field extends RWMB_Select_Field
13
  wp_enqueue_style( 'rwmb-select2', RWMB_CSS_URL . 'select2/select2.css', array(), '4.0.1' );
14
  wp_enqueue_style( 'rwmb-select-advanced', RWMB_CSS_URL . 'select-advanced.css', array(), RWMB_VER );
15
 
16
- wp_register_script( 'rwmb-select2', RWMB_JS_URL . 'select2/select2.min.js', array(), '4.0.2', true );
17
 
18
  // Localize
19
- $deps = array( 'rwmb-select2', 'rwmb-select' );
20
- $dir = RWMB_JS_URL . 'select2/i18n/';
21
- $file = str_replace( '_', '-', get_locale() );
22
- $parts = explode( '-', $file );
23
- $file = file_exists( RWMB_DIR . 'js/select2/i18n/' . $file . '.js' ) ? $file : $parts[0];
24
 
25
- if ( file_exists( RWMB_DIR . 'js/select2/i18n/' . $file . '.js' ) )
26
  {
27
- wp_register_script( 'rwmb-select2-i18n', $dir . $file . '.js', array( 'rwmb-select2' ), '4.0.2', true );
28
- $deps[] = 'rwmb-select2-i18n';
29
  }
30
 
31
- wp_enqueue_script( 'rwmb-select', RWMB_JS_URL . 'select.js', array(), RWMB_VER, true );
32
- wp_enqueue_script( 'rwmb-select-advanced', RWMB_JS_URL . 'select-advanced.js', $deps, RWMB_VER, true );
33
- }
34
-
35
- /**
36
- * Walk options
37
- *
38
- * @param mixed $meta
39
- * @param array $field
40
- * @param mixed $options
41
- * @param mixed $db_fields
42
- *
43
- * @return string
44
- */
45
- public static function walk( $options, $db_fields, $meta, $field )
46
- {
47
- $attributes = call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'get_attributes' ), $field, $meta );
48
- $walker = new RWMB_Select_Walker( $db_fields, $field, $meta );
49
- $output = sprintf(
50
- '<select %s>',
51
- self::render_attributes( $attributes )
52
- );
53
-
54
- $output .= $walker->walk( $options, $field['flatten'] ? - 1 : 0 );
55
- $output .= '</select>';
56
- $output .= self::get_select_all_html( $field );
57
- return $output;
58
  }
59
 
60
  /**
13
  wp_enqueue_style( 'rwmb-select2', RWMB_CSS_URL . 'select2/select2.css', array(), '4.0.1' );
14
  wp_enqueue_style( 'rwmb-select-advanced', RWMB_CSS_URL . 'select-advanced.css', array(), RWMB_VER );
15
 
16
+ wp_register_script( 'rwmb-select2', RWMB_JS_URL . 'select2/select2.min.js', array( 'jquery' ), '4.0.2', true );
17
 
18
  // Localize
19
+ $dependencies = array( 'rwmb-select2', 'rwmb-select' );
20
+ $locale = str_replace( '_', '-', get_locale() );
21
+ $locale_short = substr( $locale, 0, 2 );
22
+ $locale = file_exists( RWMB_DIR . "js/select2/i18n/$locale.js" ) ? $locale : $locale_short;
 
23
 
24
+ if ( file_exists( RWMB_DIR . "js/select2/i18n/$locale.js" ) )
25
  {
26
+ wp_register_script( 'rwmb-select2-i18n', RWMB_JS_URL . "select2/i18n/$locale.js", array( 'rwmb-select2' ), '4.0.2', true );
27
+ $dependencies[] = 'rwmb-select2-i18n';
28
  }
29
 
30
+ wp_enqueue_script( 'rwmb-select', RWMB_JS_URL . 'select.js', array( 'jquery' ), RWMB_VER, true );
31
+ wp_enqueue_script( 'rwmb-select-advanced', RWMB_JS_URL . 'select-advanced.js', $dependencies, RWMB_VER, true );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
 
34
  /**
inc/fields/select-tree.php CHANGED
@@ -14,7 +14,7 @@ class RWMB_Select_Tree_Field extends RWMB_Select_Field
14
  *
15
  * @return string
16
  */
17
- public static function walk( $options, $db_fields, $meta, $field )
18
  {
19
  $walker = new RWMB_Select_Tree_Walker( $db_fields, $field, $meta );
20
  return $walker->walk( $options );
14
  *
15
  * @return string
16
  */
17
+ public static function walk( $field, $options, $db_fields, $meta )
18
  {
19
  $walker = new RWMB_Select_Tree_Walker( $db_fields, $field, $meta );
20
  return $walker->walk( $options );
inc/fields/select.php CHANGED
@@ -23,9 +23,9 @@ class RWMB_Select_Field extends RWMB_Choice_Field
23
  *
24
  * @return string
25
  */
26
- public static function walk( $options, $db_fields, $meta, $field )
27
  {
28
- $attributes = call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'get_attributes' ), $field, $meta );
29
  $walker = new RWMB_Select_Walker( $db_fields, $field, $meta );
30
  $output = sprintf(
31
  '<select %s>',
23
  *
24
  * @return string
25
  */
26
+ public static function walk( $field, $options, $db_fields, $meta )
27
  {
28
+ $attributes = self::call( 'get_attributes', $field, $meta );
29
  $walker = new RWMB_Select_Walker( $db_fields, $field, $meta );
30
  $output = sprintf(
31
  '<select %s>',
inc/fields/taxonomy.php CHANGED
@@ -152,7 +152,7 @@ class RWMB_Taxonomy_Field extends RWMB_Object_Choice_Field
152
  *
153
  * @return string
154
  */
155
- public static function get_option_label( $value, $field )
156
  {
157
  return sprintf(
158
  '<a href="%s" title="%s">%s</a>',
152
  *
153
  * @return string
154
  */
155
+ public static function get_option_label( $field, $value )
156
  {
157
  return sprintf(
158
  '<a href="%s" title="%s">%s</a>',
inc/fields/text-list.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Text list field class.
4
  */
@@ -34,58 +35,49 @@ class RWMB_Text_List_Field extends RWMB_Multiple_Values_Field
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
  /**
4
  * Text list field class.
5
  */
35
  }
36
 
37
  /**
38
+ * Format value for the helper functions.
39
+ * @param array $field Field parameter
40
+ * @param string|array $value The field meta value
41
+ * @return string
 
 
 
 
42
  */
43
+ public static function format_value( $field, $value )
44
  {
45
+ $output = '<table><thead><tr>';
46
+ foreach ( $field['options'] as $label )
 
 
 
 
47
  {
48
+ $output .= "<th>$label</th>";
49
+ }
50
+ $output .= '<tr>';
 
51
 
52
+ if ( ! $field['clone'] )
53
+ {
54
+ $output .= self::format_single_value( $field, $value );
 
 
 
 
 
 
 
 
 
 
55
  }
56
  else
57
  {
58
+ foreach ( $value as $subvalue )
 
59
  {
60
+ $output .= self::format_single_value( $field, $subvalue );
 
 
 
 
 
61
  }
62
  }
63
+ $output .= '</tbody></table>';
64
+ return $output;
65
+ }
66
 
67
+ /**
68
+ * Format a single value for the helper functions.
69
+ * @param array $field Field parameter
70
+ * @param array $value The value
71
+ * @return string
72
+ */
73
+ public static function format_single_value( $field, $value )
74
+ {
75
+ $output = '<tr>';
76
+ foreach ( $value as $subvalue )
77
+ {
78
+ $output .= "<td>$subvalue</td>";
79
+ }
80
+ $output .= '</tr>';
81
  return $output;
82
  }
83
  }
inc/fields/text.php CHANGED
@@ -41,8 +41,6 @@ class RWMB_Text_Field extends RWMB_Input_Field
41
  'placeholder' => $field['placeholder'],
42
  ) );
43
 
44
- $attributes['type'] = 'text';
45
-
46
  return $attributes;
47
  }
48
  }
41
  'placeholder' => $field['placeholder'],
42
  ) );
43
 
 
 
44
  return $attributes;
45
  }
46
  }
inc/fields/thickbox-image.php CHANGED
@@ -53,7 +53,7 @@ class RWMB_Thickbox_Image_Field extends RWMB_Image_Field
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 rwmb-thickbox-upload' data-field_id='{$field['id']}'>{$i18n_title}</a>";
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_files( $meta, $field );
57
 
58
  // Show form upload
59
  $html .= "<a href='#' class='button rwmb-thickbox-upload' data-field_id='{$field['id']}'>{$i18n_title}</a>";
inc/fields/url.php CHANGED
@@ -4,22 +4,6 @@
4
  */
5
  class RWMB_URL_Field extends 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
  *
4
  */
5
  class RWMB_URL_Field extends RWMB_Text_Field
6
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  /**
8
  * Sanitize url
9
  *
inc/fields/user.php CHANGED
@@ -55,8 +55,8 @@ class RWMB_User_Field extends RWMB_Object_Choice_Field
55
  */
56
  public static function get_options( $field )
57
  {
58
- $options = get_users( $field['query_args'] );
59
- return $options;
60
  }
61
 
62
  /**
@@ -81,7 +81,7 @@ class RWMB_User_Field extends RWMB_Object_Choice_Field
81
  *
82
  * @return string
83
  */
84
- public 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>';
55
  */
56
  public static function get_options( $field )
57
  {
58
+ $query = new WP_User_Query( $field['query_args'] );
59
+ return $query->get_results();
60
  }
61
 
62
  /**
81
  *
82
  * @return string
83
  */
84
+ public static function get_option_label( $field, $value )
85
  {
86
  $user = get_userdata( $value );
87
  return '<a href="' . get_author_posts_url( $value ) . '">' . $user->display_name . '</a>';
inc/functions.php CHANGED
@@ -16,6 +16,7 @@ if ( ! function_exists( 'rwmb_meta' ) )
16
  */
17
  function 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
@@ -46,10 +47,11 @@ if ( ! function_exists( 'rwmb_get_value' ) )
46
  */
47
  function rwmb_get_value( $field_id, $args = array(), $post_id = null )
48
  {
 
49
  $field = RWMB_Helper::find_field( $field_id, $post_id );
50
 
51
  // Get field value
52
- $value = $field ? call_user_func( array( 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
@@ -80,13 +82,13 @@ if ( ! function_exists( 'rwmb_the_value' ) )
80
  */
81
  function rwmb_the_value( $field_id, $args = array(), $post_id = null, $echo = true )
82
  {
83
- // Find field
84
  $field = RWMB_Helper::find_field( $field_id, $post_id );
85
 
86
  if ( ! $field )
87
  return '';
88
 
89
- $output = call_user_func( array( 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
16
  */
17
  function rwmb_meta( $key, $args = array(), $post_id = null )
18
  {
19
+ $args = wp_parse_args( $args );
20
  /**
21
  * If meta boxes is registered in the backend only, we can't get field's params
22
  * This is for backward compatibility with version < 4.8.0
47
  */
48
  function rwmb_get_value( $field_id, $args = array(), $post_id = null )
49
  {
50
+ $args = wp_parse_args( $args );
51
  $field = RWMB_Helper::find_field( $field_id, $post_id );
52
 
53
  // Get field value
54
+ $value = $field ? RWMB_Field::call( 'get_value', $field, $args, $post_id ) : false;
55
 
56
  /**
57
  * Allow developers to change the returned value of field
82
  */
83
  function rwmb_the_value( $field_id, $args = array(), $post_id = null, $echo = true )
84
  {
85
+ $args = wp_parse_args( $args );
86
  $field = RWMB_Helper::find_field( $field_id, $post_id );
87
 
88
  if ( ! $field )
89
  return '';
90
 
91
+ $output = RWMB_Field::call( 'the_value', $field, $args, $post_id );
92
 
93
  /**
94
  * Allow developers to change the returned value of field
inc/helper.php CHANGED
@@ -61,7 +61,7 @@ class RWMB_Helper
61
  return false;
62
  }
63
  $field = $fields[$field_id];
64
- return call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'normalize' ), $field );
65
  }
66
 
67
  /**
@@ -93,7 +93,6 @@ class RWMB_Helper
93
  'clone' => $args['clone'],
94
  'multiple' => $args['multiple'],
95
  );
96
- $class = RW_Meta_Box::get_class_name( $field );
97
 
98
  switch ( $args['type'] )
99
  {
@@ -127,8 +126,7 @@ class RWMB_Helper
127
  $meta = 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
  }
61
  return false;
62
  }
63
  $field = $fields[$field_id];
64
+ return RWMB_Field::call( 'normalize', $field );
65
  }
66
 
67
  /**
93
  'clone' => $args['clone'],
94
  'multiple' => $args['multiple'],
95
  );
 
96
 
97
  switch ( $args['type'] )
98
  {
126
  $meta = RWMB_OEmbed_Field::the_value( $field, $args, $post_id );
127
  break;
128
  default:
129
+ $meta = RWMB_Field::call( 'get_value', $field, $args, $post_id );
 
130
  }
131
  return apply_filters( 'rwmb_meta', $meta, $key, $args, $post_id );
132
  }
inc/loader.php CHANGED
@@ -41,7 +41,7 @@ class RWMB_Loader
41
  public function constants()
42
  {
43
  // Script version, used to add version for scripts and styles
44
- define( 'RWMB_VER', '4.8.6' );
45
 
46
  list( $path, $url ) = self::get_path();
47
 
@@ -170,7 +170,6 @@ class RWMB_Loader
170
  'fields/input',
171
 
172
  'fields/checkbox',
173
- 'fields/hidden',
174
  'fields/number',
175
  'fields/range',
176
 
@@ -187,11 +186,9 @@ class RWMB_Loader
187
  'fields/password',
188
 
189
  'fields/media',
190
- 'fields/file-advanced',
191
  'fields/file-upload',
192
  'fields/image-advanced',
193
  'fields/image-upload',
194
- 'fields/plupload-image',
195
 
196
  'fields/file-input',
197
  'fields/file',
41
  public function constants()
42
  {
43
  // Script version, used to add version for scripts and styles
44
+ define( 'RWMB_VER', '4.8.7' );
45
 
46
  list( $path, $url ) = self::get_path();
47
 
170
  'fields/input',
171
 
172
  'fields/checkbox',
 
173
  'fields/number',
174
  'fields/range',
175
 
186
  'fields/password',
187
 
188
  'fields/media',
 
189
  'fields/file-upload',
190
  'fields/image-advanced',
191
  'fields/image-upload',
 
192
 
193
  'fields/file-input',
194
  'fields/file',
inc/meta-box.php CHANGED
@@ -20,11 +20,6 @@ class RW_Meta_Box
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
  */
@@ -34,12 +29,8 @@ class RW_Meta_Box
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
 
@@ -49,20 +40,19 @@ class RW_Meta_Box
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
@@ -89,17 +79,15 @@ class RW_Meta_Box
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', RWMB_CSS_URL . 'style.css', array(), RWMB_VER );
102
- if( is_rtl() )
103
  wp_enqueue_style( 'rwmb-rtl', RWMB_CSS_URL . 'style-rtl.css', array(), RWMB_VER );
104
 
105
  // Load clone script conditionally
@@ -116,7 +104,7 @@ class RW_Meta_Box
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
@@ -125,7 +113,6 @@ class RW_Meta_Box
125
 
126
  /**
127
  * Allow developers to enqueue more scripts and styles
128
- *
129
  * @param RW_Meta_Box $object Meta Box object
130
  */
131
  do_action( 'rwmb_enqueue_scripts', $this );
@@ -133,12 +120,10 @@ class RW_Meta_Box
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 )
@@ -151,16 +136,10 @@ class RW_Meta_Box
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
  {
@@ -183,7 +162,7 @@ class RW_Meta_Box
183
  *
184
  * @return array
185
  */
186
- function hide( $hidden, $screen )
187
  {
188
  if ( $this->is_edit_screen( $screen ) && $this->meta_box['default_hidden'] )
189
  {
@@ -195,10 +174,8 @@ class RW_Meta_Box
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
 
@@ -218,7 +195,7 @@ class RW_Meta_Box
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
@@ -231,31 +208,16 @@ class RW_Meta_Box
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, "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;
@@ -266,17 +228,16 @@ class RW_Meta_Box
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 = 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
@@ -284,18 +245,28 @@ class RW_Meta_Box
284
  do_action( "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(
@@ -331,26 +302,14 @@ class RW_Meta_Box
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'] );
@@ -367,23 +326,18 @@ class RW_Meta_Box
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 = '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()
@@ -413,10 +367,9 @@ class RW_Meta_Box
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
  {
20
  */
21
  public $fields;
22
 
 
 
 
 
 
23
  /**
24
  * @var bool Used to prevent duplicated calls like revisions, manual hook to wp_insert_post, etc.
25
  */
29
  * Create meta box based on given data
30
  * @param array $meta_box Meta box definition
31
  */
32
+ public function __construct( $meta_box )
33
  {
 
 
 
 
34
  $meta_box = self::normalize( $meta_box );
35
  $meta_box['fields'] = self::normalize_fields( $meta_box['fields'] );
36
 
40
  // Allow users to show/hide meta box
41
  // 1st action applies to all meta boxes
42
  // 2nd action applies to only current meta box
43
+ $show = apply_filters( 'rwmb_show', true, $this->meta_box );
 
44
  $show = apply_filters( "rwmb_show_{$this->meta_box['id']}", $show, $this->meta_box );
45
  if ( ! $show )
46
  return;
47
 
48
  // Enqueue common styles and scripts
49
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
50
 
51
  // Add additional actions for fields
52
  $fields = self::get_fields( $this->fields );
53
  foreach ( $fields as $field )
54
  {
55
+ RWMB_Field::call( $field, 'add_actions' );
56
  }
57
 
58
  // Add meta box
79
  }
80
 
81
  /**
82
+ * Enqueue common scripts and styles.
 
 
83
  */
84
+ public function enqueue()
85
  {
86
  if ( ! $this->is_edit_screen() )
87
  return;
88
 
89
  wp_enqueue_style( 'rwmb', RWMB_CSS_URL . 'style.css', array(), RWMB_VER );
90
+ if ( is_rtl() )
91
  wp_enqueue_style( 'rwmb-rtl', RWMB_CSS_URL . 'style-rtl.css', array(), RWMB_VER );
92
 
93
  // Load clone script conditionally
104
  // Enqueue scripts and styles for fields
105
  foreach ( $fields as $field )
106
  {
107
+ RWMB_Field::call( $field, 'admin_enqueue_scripts' );
108
  }
109
 
110
  // Auto save
113
 
114
  /**
115
  * Allow developers to enqueue more scripts and styles
 
116
  * @param RW_Meta_Box $object Meta Box object
117
  */
118
  do_action( 'rwmb_enqueue_scripts', $this );
120
 
121
  /**
122
  * Get all fields of a meta box, recursively
 
123
  * @param array $fields
 
124
  * @return array
125
  */
126
+ public static function get_fields( $fields )
127
  {
128
  $all_fields = array();
129
  foreach ( $fields as $field )
136
  return $all_fields;
137
  }
138
 
 
 
 
 
139
  /**
140
  * Add meta box for multiple post types
 
 
141
  */
142
+ public function add_meta_boxes()
143
  {
144
  foreach ( $this->meta_box['post_types'] as $post_type )
145
  {
162
  *
163
  * @return array
164
  */
165
+ public function hide( $hidden, $screen )
166
  {
167
  if ( $this->is_edit_screen( $screen ) && $this->meta_box['default_hidden'] )
168
  {
174
 
175
  /**
176
  * Callback function to show fields in meta box
 
 
177
  */
178
+ public function show()
179
  {
180
  $saved = $this->is_saved();
181
 
195
 
196
  foreach ( $this->fields as $field )
197
  {
198
+ RWMB_Field::call( 'show', $field, $saved );
199
  }
200
 
201
  // Allow users to add custom code after meta box content
208
  echo '</div>';
209
  }
210
 
 
 
 
 
211
  /**
212
  * Save data from meta box
 
213
  * @param int $post_id Post ID
214
  */
215
+ public function save_post( $post_id )
216
  {
217
+ if ( ! $this->validate() )
 
218
  return;
219
  $this->saved = true;
220
 
 
 
 
 
 
 
 
 
 
221
  // Make sure meta is added to the post, not a revision
222
  if ( $the_post = wp_is_post_revision( $post_id ) )
223
  $post_id = $the_post;
228
 
229
  foreach ( $this->fields as $field )
230
  {
 
231
  $single = $field['clone'] || ! $field['multiple'];
232
+ $old = get_post_meta( $post_id, $field['id'], $single );
233
+ $new = isset( $_POST[$field['id']] ) ? $_POST[$field['id']] : ( $single ? '' : array() );
234
 
235
  // Allow field class change the value
236
+ $new = RWMB_Field::call( $field, 'value', $new, $old, $post_id );
237
+ $new = RWMB_Field::filter( 'value', $new, $field, $old );
238
 
239
  // Call defined method to save meta value, if there's no methods, call common one
240
+ RWMB_Field::call( $field, 'save', $new, $old, $post_id );
241
  }
242
 
243
  // After save action
245
  do_action( "rwmb_{$this->meta_box['id']}_after_save_post", $post_id );
246
  }
247
 
248
+ /**
249
+ * Validate form when submit. Check:
250
+ * - If this function is called to prevent duplicated calls like revisions, manual hook to wp_insert_post, etc.
251
+ * - Autosave
252
+ * - If form is submitted properly
253
+ * @return bool
254
+ */
255
+ protected function validate()
256
+ {
257
+ $nonce = (string) filter_input( INPUT_POST, "nonce_{$this->meta_box['id']}" );
258
+ return
259
+ true !== $this->saved
260
+ && ( ! defined( 'DOING_AUTOSAVE' ) || $this->meta_box['autosave'] )
261
+ && wp_verify_nonce( $nonce, "rwmb-save-{$this->meta_box['id']}" );
262
+ }
263
 
264
  /**
265
  * Normalize parameters for meta box
 
266
  * @param array $meta_box Meta box definition
 
267
  * @return array $meta_box Normalized meta box
268
  */
269
+ public static function normalize( $meta_box )
270
  {
271
  // Set default values for meta box
272
  $meta_box = wp_parse_args( $meta_box, array(
302
 
303
  /**
304
  * Normalize an array of fields
 
305
  * @param array $fields Array of fields
 
306
  * @return array $fields Normalized fields
307
  */
308
+ public static function normalize_fields( $fields )
309
  {
310
  foreach ( $fields as $k => $field )
311
  {
312
+ $field = RWMB_Field::call( 'normalize', $field );
 
 
 
 
 
 
 
 
 
 
313
 
314
  if ( isset( $field['fields'] ) )
315
  $field['fields'] = self::normalize_fields( $field['fields'] );
326
  }
327
 
328
  /**
329
+ * Get field class name. Only for backward compatibility.
 
330
  * @param array $field Field array
331
  * @return string Field class name
332
  */
333
+ public static function get_class_name( $field )
334
  {
335
+ return RWMB_Field::get_class_name( $field );
 
 
 
336
  }
337
 
338
  /**
339
  * Check if meta box is saved before.
340
+ * This helps saving empty value in meta fields (text, check box, etc.) and set the correct default values.
 
341
  * @return bool
342
  */
343
  public function is_saved()
367
  * Check if we're on the right edit screen.
368
  *
369
  * @param WP_Screen $screen Screen object. Optional. Use current screen object by default.
 
370
  * @return bool
371
  */
372
+ public function is_edit_screen( $screen = null )
373
  {
374
  if ( ! ( $screen instanceof WP_Screen ) )
375
  {
inc/templates/image-advanced.php CHANGED
@@ -1,31 +1,31 @@
1
  <script id="tmpl-rwmb-image-item" type="text/html">
2
- <input type="hidden" name="{{{ data.fieldName }}}" value="{{{ data.id }}}" class="rwmb-media-input">
3
- <div class="rwmb-media-preview">
4
- <div class="rwmb-media-content">
5
- <div class="centered">
6
- <# if ( 'image' === data.type && data.sizes ) { #>
7
- <# if ( data.sizes.thumbnail ) { #>
8
- <img src="{{{ data.sizes.thumbnail.url }}}">
9
- <# } else { #>
10
- <img src="{{{ data.sizes.full.url }}}">
11
- <# } #>
12
- <# } else { #>
13
- <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
14
- <img src="{{ data.image.src }}" />
15
- <# } else { #>
16
- <img src="{{ data.icon }}" />
17
- <# } #>
18
- <# } #>
19
- </div>
20
- </div>
21
- </div>
22
- <div class="rwmb-overlay"></div>
23
- <div class="rwmb-media-bar">
24
- <a class="rwmb-edit-media" title="{{{ i18nRwmbMedia.edit }}}" href="{{{ data.editLink }}}" target="_blank">
25
- <span class="dashicons dashicons-edit"></span>
26
- </a>
27
- <a href="#" class="rwmb-remove-media" title="{{{ i18nRwmbMedia.remove }}}">
28
- <span class="dashicons dashicons-no-alt"></span>
29
- </a>
30
- </div>
31
  </script>
1
  <script id="tmpl-rwmb-image-item" type="text/html">
2
+ <input type="hidden" name="{{{ data.fieldName }}}" value="{{{ data.id }}}" class="rwmb-media-input">
3
+ <div class="rwmb-media-preview">
4
+ <div class="rwmb-media-content">
5
+ <div class="centered">
6
+ <# if ( 'image' === data.type && data.sizes ) { #>
7
+ <# if ( data.sizes.thumbnail ) { #>
8
+ <img src="{{{ data.sizes.thumbnail.url }}}">
9
+ <# } else { #>
10
+ <img src="{{{ data.sizes.full.url }}}">
11
+ <# } #>
12
+ <# } else { #>
13
+ <# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
14
+ <img src="{{ data.image.src }}" />
15
+ <# } else { #>
16
+ <img src="{{ data.icon }}" />
17
+ <# } #>
18
+ <# } #>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ <div class="rwmb-overlay"></div>
23
+ <div class="rwmb-media-bar">
24
+ <a class="rwmb-edit-media" title="{{{ i18nRwmbMedia.edit }}}" href="{{{ data.editLink }}}" target="_blank">
25
+ <span class="dashicons dashicons-edit"></span>
26
+ </a>
27
+ <a href="#" class="rwmb-remove-media" title="{{{ i18nRwmbMedia.remove }}}">
28
+ <span class="dashicons dashicons-no-alt"></span>
29
+ </a>
30
+ </div>
31
  </script>
inc/validation.php CHANGED
@@ -15,7 +15,7 @@ class RWMB_Validation
15
  public function __construct()
16
  {
17
  add_action( 'rwmb_after', array( $this, 'rules' ) );
18
- add_action( 'rwmb_enqueue_scripts', array( $this, 'scripts' ) );
19
  }
20
 
21
  /**
@@ -34,7 +34,7 @@ class RWMB_Validation
34
  /**
35
  * Enqueue scripts for validation.
36
  */
37
- public function scripts()
38
  {
39
  wp_enqueue_script( 'jquery-validate', RWMB_JS_URL . 'jquery.validate.min.js', array( 'jquery' ), RWMB_VER, true );
40
  wp_enqueue_script( 'rwmb-validate', RWMB_JS_URL . 'validate.js', array( 'jquery-validate' ), RWMB_VER, true );
15
  public function __construct()
16
  {
17
  add_action( 'rwmb_after', array( $this, 'rules' ) );
18
+ add_action( 'rwmb_enqueue_scripts', array( $this, 'enqueue' ) );
19
  }
20
 
21
  /**
34
  /**
35
  * Enqueue scripts for validation.
36
  */
37
+ public function enqueue()
38
  {
39
  wp_enqueue_script( 'jquery-validate', RWMB_JS_URL . 'jquery.validate.min.js', array( 'jquery' ), RWMB_VER, true );
40
  wp_enqueue_script( 'rwmb-validate', RWMB_JS_URL . 'validate.js', array( 'jquery-validate' ), RWMB_VER, true );
inc/walkers/input-list-walker.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Input List Walker
4
  * For checkbox and radio list fields
@@ -14,7 +15,7 @@ class RWMB_Input_List_Walker extends RWMB_Walker
14
  */
15
  public function start_lvl( &$output, $depth = 0, $args = array() )
16
  {
17
- $output .= "<ul class='rwmb-input-list'>";
18
  }
19
 
20
  /**
@@ -26,7 +27,7 @@ class RWMB_Input_List_Walker extends RWMB_Walker
26
  */
27
  public function end_lvl( &$output, $depth = 0, $args = array() )
28
  {
29
- $output .= "</ul>";
30
  }
31
 
32
  /**
@@ -40,17 +41,14 @@ class RWMB_Input_List_Walker extends RWMB_Walker
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 = 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
  RWMB_Field::render_attributes( $attributes ),
53
- checked( in_array( $object->$id, $meta ), 1, false ),
54
  $object->$label
55
  );
56
  }
@@ -65,6 +63,6 @@ class RWMB_Input_List_Walker extends RWMB_Walker
65
  */
66
  public function end_el( &$output, $page, $depth = 0, $args = array() )
67
  {
68
- $output .= "</li>";
69
  }
70
  }
1
  <?php
2
+
3
  /**
4
  * Input List Walker
5
  * For checkbox and radio list fields
15
  */
16
  public function start_lvl( &$output, $depth = 0, $args = array() )
17
  {
18
+ $output .= '<ul class="rwmb-input-list">';
19
  }
20
 
21
  /**
27
  */
28
  public function end_lvl( &$output, $depth = 0, $args = array() )
29
  {
30
+ $output .= '</ul>';
31
  }
32
 
33
  /**
41
  */
42
  public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 )
43
  {
44
+ $label = $this->db_fields['label'];
45
+ $id = $this->db_fields['id'];
46
+ $attributes = RWMB_Field::call( 'get_attributes', $this->field, $object->$id );
 
 
 
47
 
48
  $output .= sprintf(
49
  '<li><label><input %s %s>%s</label>',
50
  RWMB_Field::render_attributes( $attributes ),
51
+ checked( in_array( $object->$id, $this->meta ), 1, false ),
52
  $object->$label
53
  );
54
  }
63
  */
64
  public function end_el( &$output, $page, $depth = 0, $args = array() )
65
  {
66
+ $output .= '</li>';
67
  }
68
  }
inc/walkers/select-tree-walker.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Select Tree Walker for cascading select fields.
4
  * @uses RWMB_Select_Walker
@@ -33,9 +34,9 @@ class RWMB_Select_Tree_Walker
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 );
@@ -43,12 +44,10 @@ class RWMB_Select_Tree_Walker
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 RWMB_Select_Walker( $this->db_fields, $this->field, $this->meta );
50
- $field_class = 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(
@@ -65,7 +64,7 @@ class RWMB_Select_Tree_Walker
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
 
1
  <?php
2
+
3
  /**
4
  * Select Tree Walker for cascading select fields.
5
  * @uses RWMB_Select_Walker
34
  $parent = $this->db_fields['parent'];
35
  $children = array();
36
 
37
+ foreach ( $options as $option )
38
  {
39
+ $children[$option->$parent][] = $option;
40
  }
41
  $top_level = isset( $children[0] ) ? 0 : $options[0]->$parent;
42
  return $this->display_level( $children, $top_level, true );
44
 
45
  function display_level( $options, $parent_id = 0, $active = false )
46
  {
47
+ $id = $this->db_fields['id'];
48
+ $field = $this->field;
49
+ $walker = new RWMB_Select_Walker( $this->db_fields, $field, $this->meta );
50
+ $attributes = RWMB_Field::call( 'get_attributes', $field, $this->meta );
 
 
51
 
52
  $children = $options[$parent_id];
53
  $output = sprintf(
64
  {
65
  if ( isset( $options[$c->$id] ) )
66
  {
67
+ $output .= $this->display_level( $options, $c->$id, in_array( $c->$id, $this->meta ) && $active );
68
  }
69
  }
70
 
js/color.js CHANGED
@@ -9,30 +9,32 @@ jQuery( function ( $ )
9
  function update()
10
  {
11
  var $this = $( this ),
12
- $container = $this.closest( '.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.rwmb-color' ).each( update );
37
- $( '.rwmb-input' ).on( 'clone', 'input.rwmb-color', update );
38
  } );
9
  function update()
10
  {
11
  var $this = $( this ),
12
+ $container = $this.closest( '.wp-picker-container' ),
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
 
27
  // Clone doesn't have input for color picker, we have to add the input and remove the color picker container
28
  if ( $container.length > 0 )
29
  {
30
+ $this.insertBefore( $container );
31
+ $container.remove();
32
  }
33
 
34
  // Show color picker
35
  $this.wpColorPicker( data );
36
  }
37
 
38
+ $( '.rwmb-color' ).each( update );
39
+ $( '#wpbody' ).on( 'clone', '.rwmb-color', update );
40
  } );
js/date.js CHANGED
@@ -48,12 +48,21 @@ jQuery( function ( $ )
48
  */
49
  function getTimestamp( date )
50
  {
51
- if(date===null)
52
  return "";
53
  var milliseconds = Date.UTC( date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds() );
54
  return Math.floor( milliseconds / 1000 );
55
  }
56
 
 
 
 
 
 
 
 
 
 
57
  $( ':input.rwmb-date' ).each( update );
58
  $( '.rwmb-input' ).on( 'clone', ':input.rwmb-date', update );
59
  } );
48
  */
49
  function getTimestamp( date )
50
  {
51
+ if ( date === null )
52
  return "";
53
  var milliseconds = Date.UTC( date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds() );
54
  return Math.floor( milliseconds / 1000 );
55
  }
56
 
57
+ if ( $.datepicker.regional.hasOwnProperty( RWMB_Date.locale ) )
58
+ {
59
+ $.datepicker.setDefaults( $.datepicker.regional[RWMB_Date.locale] );
60
+ }
61
+ else if ( $.datepicker.regional.hasOwnProperty( RWMB_Date.localeShort ) )
62
+ {
63
+ $.datepicker.setDefaults( $.datepicker.regional[RWMB_Date.localeShort] );
64
+ }
65
+
66
  $( ':input.rwmb-date' ).each( update );
67
  $( '.rwmb-input' ).on( 'clone', ':input.rwmb-date', update );
68
  } );
js/datetime.js CHANGED
@@ -48,20 +48,28 @@ jQuery( function ( $ )
48
  */
49
  function getTimestamp( date )
50
  {
51
- if(date===null)
52
  return "";
53
  var milliseconds = Date.UTC( date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds() );
54
  return Math.floor( milliseconds / 1000 );
55
  }
56
 
57
  // Set language if available
58
- if ( $.timepicker.regional.hasOwnProperty( RWMB_Datetimepicker.locale ) )
59
  {
60
- $.timepicker.setDefaults( $.timepicker.regional[RWMB_Datetimepicker.locale] );
61
  }
62
- else if ( $.timepicker.regional.hasOwnProperty( RWMB_Datetimepicker.localeShort ) )
63
  {
64
- $.timepicker.setDefaults( $.timepicker.regional[RWMB_Datetimepicker.localeShort] );
 
 
 
 
 
 
 
 
65
  }
66
 
67
  $( ':input.rwmb-datetime' ).each( update );
48
  */
49
  function getTimestamp( date )
50
  {
51
+ if ( date === null )
52
  return "";
53
  var milliseconds = Date.UTC( date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds() );
54
  return Math.floor( milliseconds / 1000 );
55
  }
56
 
57
  // Set language if available
58
+ if ( $.datepicker.regional.hasOwnProperty( RWMB_Datetime.locale ) )
59
  {
60
+ $.datepicker.setDefaults( $.datepicker.regional[RWMB_Datetime.locale] );
61
  }
62
+ else if ( $.datepicker.regional.hasOwnProperty( RWMB_Datetime.localeShort ) )
63
  {
64
+ $.datepicker.setDefaults( $.datepicker.regional[RWMB_Datetime.localeShort] );
65
+ }
66
+ if ( $.timepicker.regional.hasOwnProperty( RWMB_Datetime.locale ) )
67
+ {
68
+ $.timepicker.setDefaults( $.timepicker.regional[RWMB_Datetime.locale] );
69
+ }
70
+ else if ( $.timepicker.regional.hasOwnProperty( RWMB_Datetime.localeShort ) )
71
+ {
72
+ $.timepicker.setDefaults( $.timepicker.regional[RWMB_Datetime.localeShort] );
73
  }
74
 
75
  $( ':input.rwmb-datetime' ).each( update );
js/file.js CHANGED
@@ -2,6 +2,37 @@ jQuery( document ).ready( function ( $ )
2
  {
3
  'use strict';
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  // Add more file
6
  $( '.rwmb-add-file' ).each( function ()
7
  {
@@ -46,7 +77,7 @@ jQuery( document ).ready( function ( $ )
46
  } );
47
 
48
  // Delete file via Ajax
49
- $( '.rwmb-uploaded' ).on( 'click', '.rwmb-delete-file', function ()
50
  {
51
  var $this = $( this ),
52
  $parent = $this.parents( 'li' ),
@@ -70,18 +101,15 @@ jQuery( document ).ready( function ( $ )
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
- $( '.rwmb-uploaded' ).on( 'transitionend webkitTransitionEnd otransitionend', 'li.removed', function ()
 
85
  {
86
  $( this ).remove();
87
  $container.trigger( 'update.rwmbFile' );
@@ -91,8 +119,8 @@ jQuery( document ).ready( function ( $ )
91
  return false;
92
  } );
93
 
94
- //Remove deleted file
95
- $( '.rwmb-uploaded' ).on( 'transitionend webkitTransitionEnd otransitionend', 'li.removed', function ()
96
  {
97
  $( this ).remove();
98
  } );
@@ -132,8 +160,8 @@ jQuery( document ).ready( function ( $ )
132
  return false;
133
  } );
134
 
135
- // Reorder images
136
- $( '.rwmb-file' ).each( function ()
137
  {
138
  var $this = $( this ),
139
  data = {
2
  {
3
  'use strict';
4
 
5
+ /**
6
+ * Detecting CSS Animation Completion event
7
+ * @link https://davidwalsh.name/css-animation-callback
8
+ * @returns string
9
+ */
10
+ function whichTransitionEvent()
11
+ {
12
+ var t,
13
+ el = document.createElement( 'fakeelement' ),
14
+ transitions = {
15
+ 'transition' : 'transitionend',
16
+ 'OTransition' : 'oTransitionEnd',
17
+ 'MozTransition' : 'transitionend',
18
+ 'WebkitTransition': 'webkitTransitionEnd'
19
+ };
20
+
21
+ for ( t in transitions )
22
+ {
23
+ if ( el.style[t] !== undefined )
24
+ {
25
+ return transitions[t];
26
+ }
27
+ }
28
+ return '';
29
+ }
30
+
31
+
32
+ var $uploaded = $( '.rwmb-uploaded' ),
33
+ event = whichTransitionEvent();
34
+
35
+
36
  // Add more file
37
  $( '.rwmb-add-file' ).each( function ()
38
  {
77
  } );
78
 
79
  // Delete file via Ajax
80
+ $uploaded.on( 'click', '.rwmb-delete-file', function ()
81
  {
82
  var $this = $( this ),
83
  $parent = $this.parents( 'li' ),
101
 
102
  $parent.addClass( 'removed' );
103
 
104
+ // If transition event is not supported
105
+ if ( !event )
 
 
 
 
106
  {
107
  $parent.remove();
108
  $container.trigger( 'update.rwmbFile' );
109
  }
110
 
111
+ // If transition is supported
112
+ $( '.rwmb-uploaded' ).on( event, 'li.removed', function ()
113
  {
114
  $( this ).remove();
115
  $container.trigger( 'update.rwmbFile' );
119
  return false;
120
  } );
121
 
122
+ // Remove deleted file
123
+ $uploaded.on( event, 'li.removed', function ()
124
  {
125
  $( this ).remove();
126
  } );
160
  return false;
161
  } );
162
 
163
+ // Reorder files
164
+ $uploaded.each( function ()
165
  {
166
  var $this = $( this ),
167
  data = {
js/image-advanced.js CHANGED
@@ -25,13 +25,11 @@ jQuery( function ( $ )
25
 
26
  /**
27
  * Initialize image fields
28
- * @return void
29
  */
30
  function initImageField()
31
  {
32
  new ImageField( { input: this, el: $( this ).siblings( 'div.rwmb-media-view' ) } );
33
  }
34
- $( ':input.rwmb-image_advanced' ).each( initImageField );
35
- $( '.rwmb-input' )
36
- .on( 'clone', ':input.rwmb-image_advanced', initImageField )
37
  } );
25
 
26
  /**
27
  * Initialize image fields
 
28
  */
29
  function initImageField()
30
  {
31
  new ImageField( { input: this, el: $( this ).siblings( 'div.rwmb-media-view' ) } );
32
  }
33
+ $( 'input.rwmb-image_advanced' ).each( initImageField );
34
+ $( '#wpbody' ).on( 'clone', 'input.rwmb-image_advanced', initImageField )
 
35
  } );
js/image.js DELETED
@@ -1,25 +0,0 @@
1
- jQuery( function ( $ )
2
- {
3
- 'use strict';
4
-
5
- // Reorder images
6
- $( '.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
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-af.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar-DZ.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-az.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-be.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bg.js DELETED
@@ -1,24 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bs.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ca.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cs.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cy-GB.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-da.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-de.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-el.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-AU.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-GB.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-NZ.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eo.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-es.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-et.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eu.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fa.js DELETED
@@ -1,59 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fi.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fo.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CA.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CH.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr.js DELETED
@@ -1,25 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-gl.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-he.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hi.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hr.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hu.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hy.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-id.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-is.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-it.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ja.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ka.js DELETED
@@ -1,21 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-kk.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-km.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ko.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ky.js DELETED
@@ -1,24 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lb.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lt.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lv.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-mk.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ml.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ms.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nb.js DELETED
@@ -1,22 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl-BE.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nn.js DELETED
@@ -1,22 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-no.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pl.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt-BR.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt.js DELETED
@@ -1,22 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-rm.js DELETED
@@ -1,21 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ro.js DELETED
@@ -1,26 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ru.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sk.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sl.js DELETED
@@ -1,24 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sq.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr-SR.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sv.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ta.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-th.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tj.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tr.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-uk.js DELETED
@@ -1,24 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-vi.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-CN.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-HK.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-TW.js DELETED
@@ -1,23 +0,0 @@
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
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jqueryui/jquery-ui-i18n.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.11.4 - 2015-03-11
2
+ * http://jqueryui.com
3
+ * Includes: datepicker-af.js, datepicker-ar-DZ.js, datepicker-ar.js, datepicker-az.js, datepicker-be.js, datepicker-bg.js, datepicker-bs.js, datepicker-ca.js, datepicker-cs.js, datepicker-cy-GB.js, datepicker-da.js, datepicker-de.js, datepicker-el.js, datepicker-en-AU.js, datepicker-en-GB.js, datepicker-en-NZ.js, datepicker-eo.js, datepicker-es.js, datepicker-et.js, datepicker-eu.js, datepicker-fa.js, datepicker-fi.js, datepicker-fo.js, datepicker-fr-CA.js, datepicker-fr-CH.js, datepicker-fr.js, datepicker-gl.js, datepicker-he.js, datepicker-hi.js, datepicker-hr.js, datepicker-hu.js, datepicker-hy.js, datepicker-id.js, datepicker-is.js, datepicker-it-CH.js, datepicker-it.js, datepicker-ja.js, datepicker-ka.js, datepicker-kk.js, datepicker-km.js, datepicker-ko.js, datepicker-ky.js, datepicker-lb.js, datepicker-lt.js, datepicker-lv.js, datepicker-mk.js, datepicker-ml.js, datepicker-ms.js, datepicker-nb.js, datepicker-nl-BE.js, datepicker-nl.js, datepicker-nn.js, datepicker-no.js, datepicker-pl.js, datepicker-pt-BR.js, datepicker-pt.js, datepicker-rm.js, datepicker-ro.js, datepicker-ru.js, datepicker-sk.js, datepicker-sl.js, datepicker-sq.js, datepicker-sr-SR.js, datepicker-sr.js, datepicker-sv.js, datepicker-ta.js, datepicker-th.js, datepicker-tj.js, datepicker-tr.js, datepicker-uk.js, datepicker-vi.js, datepicker-zh-CN.js, datepicker-zh-HK.js, datepicker-zh-TW.js
4
+ * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
5
+
6
+ (function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){var t=e.datepicker;t.regional.af={closeText:"Selekteer",prevText:"Vorige",nextText:"Volgende",currentText:"Vandag",monthNames:["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember"],monthNamesShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des"],dayNames:["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"],dayNamesShort:["Son","Maa","Din","Woe","Don","Vry","Sat"],dayNamesMin:["So","Ma","Di","Wo","Do","Vr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.af),t.regional.af,t.regional["ar-DZ"]={closeText:"إغلاق",prevText:"&#x3C;السابق",nextText:"التالي&#x3E;",currentText:"اليوم",monthNames:["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesMin:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],weekHeader:"أسبوع",dateFormat:"dd/mm/yy",firstDay:6,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional["ar-DZ"]),t.regional["ar-DZ"],t.regional.ar={closeText:"إغلاق",prevText:"&#x3C;السابق",nextText:"التالي&#x3E;",currentText:"اليوم",monthNames:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],dayNamesMin:["ح","ن","ث","ر","خ","ج","س"],weekHeader:"أسبوع",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.ar),t.regional.ar,t.regional.az={closeText:"Bağla",prevText:"&#x3C;Geri",nextText:"İrəli&#x3E;",currentText:"Bugün",monthNames:["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],monthNamesShort:["Yan","Fev","Mar","Apr","May","İyun","İyul","Avq","Sen","Okt","Noy","Dek"],dayNames:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],dayNamesShort:["B","Be","Ça","Ç","Ca","C","Ş"],dayNamesMin:["B","B","Ç","С","Ç","C","Ş"],weekHeader:"Hf",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.az),t.regional.az,t.regional.be={closeText:"Зачыніць",prevText:"&larr;Папяр.",nextText:"Наст.&rarr;",currentText:"Сёньня",monthNames:["Студзень","Люты","Сакавік","Красавік","Травень","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Сьнежань"],monthNamesShort:["Сту","Лют","Сак","Кра","Тра","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сьн"],dayNames:["нядзеля","панядзелак","аўторак","серада","чацьвер","пятніца","субота"],dayNamesShort:["ндз","пнд","аўт","срд","чцв","птн","сбт"],dayNamesMin:["Нд","Пн","Аў","Ср","Чц","Пт","Сб"],weekHeader:"Тд",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.be),t.regional.be,t.regional.bg={closeText:"затвори",prevText:"&#x3C;назад",nextText:"напред&#x3E;",nextBigText:"&#x3E;&#x3E;",currentText:"днес",monthNames:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthNamesShort:["Яну","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Нов","Дек"],dayNames:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"],dayNamesShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб"],dayNamesMin:["Не","По","Вт","Ср","Че","Пе","Съ"],weekHeader:"Wk",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.bg),t.regional.bg,t.regional.bs={closeText:"Zatvori",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Danas",monthNames:["Januar","Februar","Mart","April","Maj","Juni","Juli","August","Septembar","Oktobar","Novembar","Decembar"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNames:["Nedelja","Ponedeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"],dayNamesShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayNamesMin:["Ne","Po","Ut","Sr","Če","Pe","Su"],weekHeader:"Wk",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.bs),t.regional.bs,t.regional.ca={closeText:"Tanca",prevText:"Anterior",nextText:"Següent",currentText:"Avui",monthNames:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],monthNamesShort:["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des"],dayNames:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],dayNamesShort:["dg","dl","dt","dc","dj","dv","ds"],dayNamesMin:["dg","dl","dt","dc","dj","dv","ds"],weekHeader:"Set",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.ca),t.regional.ca,t.regional.cs={closeText:"Zavřít",prevText:"&#x3C;Dříve",nextText:"Později&#x3E;",currentText:"Nyní",monthNames:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],monthNamesShort:["led","úno","bře","dub","kvě","čer","čvc","srp","zář","říj","lis","pro"],dayNames:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],dayNamesShort:["ne","po","út","st","čt","pá","so"],dayNamesMin:["ne","po","út","st","čt","pá","so"],weekHeader:"Týd",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.cs),t.regional.cs,t.regional["cy-GB"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"],monthNamesShort:["Ion","Chw","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tac","Rha"],dayNames:["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"],dayNamesShort:["Sul","Llu","Maw","Mer","Iau","Gwe","Sad"],dayNamesMin:["Su","Ll","Ma","Me","Ia","Gw","Sa"],weekHeader:"Wy",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional["cy-GB"]),t.regional["cy-GB"],t.regional.da={closeText:"Luk",prevText:"&#x3C;Forrige",nextText:"Næste&#x3E;",currentText:"Idag",monthNames:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNames:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],dayNamesShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayNamesMin:["Sø","Ma","Ti","On","To","Fr","Lø"],weekHeader:"Uge",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.da),t.regional.da,t.regional.de={closeText:"Schließen",prevText:"&#x3C;Zurück",nextText:"Vor&#x3E;",currentText:"Heute",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.de),t.regional.de,t.regional.el={closeText:"Κλείσιμο",prevText:"Προηγούμενος",nextText:"Επόμενος",currentText:"Σήμερα",monthNames:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],monthNamesShort:["Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],dayNames:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],dayNamesShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dayNamesMin:["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],weekHeader:"Εβδ",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.el),t.regional.el,t.regional["en-AU"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional["en-AU"]),t.regional["en-AU"],t.regional["en-GB"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional["en-GB"]),t.regional["en-GB"],t.regional["en-NZ"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional["en-NZ"]),t.regional["en-NZ"],t.regional.eo={closeText:"Fermi",prevText:"&#x3C;Anta",nextText:"Sekv&#x3E;",currentText:"Nuna",monthNames:["Januaro","Februaro","Marto","Aprilo","Majo","Junio","Julio","Aŭgusto","Septembro","Oktobro","Novembro","Decembro"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aŭg","Sep","Okt","Nov","Dec"],dayNames:["Dimanĉo","Lundo","Mardo","Merkredo","Ĵaŭdo","Vendredo","Sabato"],dayNamesShort:["Dim","Lun","Mar","Mer","Ĵaŭ","Ven","Sab"],dayNamesMin:["Di","Lu","Ma","Me","Ĵa","Ve","Sa"],weekHeader:"Sb",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.eo),t.regional.eo,t.regional.es={closeText:"Cerrar",prevText:"&#x3C;Ant",nextText:"Sig&#x3E;",currentText:"Hoy",monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],monthNamesShort:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],dayNamesShort:["dom","lun","mar","mié","jue","vie","sáb"],dayNamesMin:["D","L","M","X","J","V","S"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.es),t.regional.es,t.regional.et={closeText:"Sulge",prevText:"Eelnev",nextText:"Järgnev",currentText:"Täna",monthNames:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],monthNamesShort:["Jaan","Veebr","Märts","Apr","Mai","Juuni","Juuli","Aug","Sept","Okt","Nov","Dets"],dayNames:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"],dayNamesShort:["Pühap","Esmasp","Teisip","Kolmap","Neljap","Reede","Laup"],dayNamesMin:["P","E","T","K","N","R","L"],weekHeader:"näd",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.et),t.regional.et,t.regional.eu={closeText:"Egina",prevText:"&#x3C;Aur",nextText:"Hur&#x3E;",currentText:"Gaur",monthNames:["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua"],monthNamesShort:["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe."],dayNames:["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],dayNamesShort:["ig.","al.","ar.","az.","og.","ol.","lr."],dayNamesMin:["ig","al","ar","az","og","ol","lr"],weekHeader:"As",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.eu),t.regional.eu,t.regional.fa={closeText:"بستن",prevText:"&#x3C;قبلی",nextText:"بعدی&#x3E;",currentText:"امروز",monthNames:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["يکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayNamesShort:["ی","د","س","چ","پ","ج","ش"],dayNamesMin:["ی","د","س","چ","پ","ج","ش"],weekHeader:"هف",dateFormat:"yy/mm/dd",firstDay:6,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.fa),t.regional.fa,t.regional.fi={closeText:"Sulje",prevText:"&#xAB;Edellinen",nextText:"Seuraava&#xBB;",currentText:"Tänään",monthNames:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],monthNamesShort:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"],dayNamesShort:["Su","Ma","Ti","Ke","To","Pe","La"],dayNames:["Sunnuntai","Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai"],dayNamesMin:["Su","Ma","Ti","Ke","To","Pe","La"],weekHeader:"Vk",dateFormat:"d.m.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.fi),t.regional.fi,t.regional.fo={closeText:"Lat aftur",prevText:"&#x3C;Fyrra",nextText:"Næsta&#x3E;",currentText:"Í dag",monthNames:["Januar","Februar","Mars","Apríl","Mei","Juni","Juli","August","September","Oktober","November","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des"],dayNames:["Sunnudagur","Mánadagur","Týsdagur","Mikudagur","Hósdagur","Fríggjadagur","Leyardagur"],dayNamesShort:["Sun","Mán","Týs","Mik","Hós","Frí","Ley"],dayNamesMin:["Su","Má","Tý","Mi","Hó","Fr","Le"],weekHeader:"Vk",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.fo),t.regional.fo,t.regional["fr-CA"]={closeText:"Fermer",prevText:"Précédent",nextText:"Suivant",currentText:"Aujourd'hui",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sem.",dateFormat:"yy-mm-dd",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional["fr-CA"]),t.regional["fr-CA"],t.regional["fr-CH"]={closeText:"Fermer",prevText:"&#x3C;Préc",nextText:"Suiv&#x3E;",currentText:"Courant",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sm",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional["fr-CH"]),t.regional["fr-CH"],t.regional.fr={closeText:"Fermer",prevText:"Précédent",nextText:"Suivant",currentText:"Aujourd'hui",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sem.",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.fr),t.regional.fr,t.regional.gl={closeText:"Pechar",prevText:"&#x3C;Ant",nextText:"Seg&#x3E;",currentText:"Hoxe",monthNames:["Xaneiro","Febreiro","Marzo","Abril","Maio","Xuño","Xullo","Agosto","Setembro","Outubro","Novembro","Decembro"],monthNamesShort:["Xan","Feb","Mar","Abr","Mai","Xuñ","Xul","Ago","Set","Out","Nov","Dec"],dayNames:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"],dayNamesShort:["Dom","Lun","Mar","Mér","Xov","Ven","Sáb"],dayNamesMin:["Do","Lu","Ma","Mé","Xo","Ve","Sá"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.gl),t.regional.gl,t.regional.he={closeText:"סגור",prevText:"&#x3C;הקודם",nextText:"הבא&#x3E;",currentText:"היום",monthNames:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],monthNamesShort:["ינו","פבר","מרץ","אפר","מאי","יוני","יולי","אוג","ספט","אוק","נוב","דצמ"],dayNames:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],dayNamesShort:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],dayNamesMin:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.he),t.regional.he,t.regional.hi={closeText:"बंद",prevText:"पिछला",nextText:"अगला",currentText:"आज",monthNames:["जनवरी ","फरवरी","मार्च","अप्रेल","मई","जून","जूलाई","अगस्त ","सितम्बर","अक्टूबर","नवम्बर","दिसम्बर"],monthNamesShort:["जन","फर","मार्च","अप्रेल","मई","जून","जूलाई","अग","सित","अक्ट","नव","दि"],dayNames:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],dayNamesShort:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],dayNamesMin:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],weekHeader:"हफ्ता",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.hi),t.regional.hi,t.regional.hr={closeText:"Zatvori",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Danas",monthNames:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],monthNamesShort:["Sij","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro"],dayNames:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"],dayNamesShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayNamesMin:["Ne","Po","Ut","Sr","Če","Pe","Su"],weekHeader:"Tje",dateFormat:"dd.mm.yy.",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.hr),t.regional.hr,t.regional.hu={closeText:"bezár",prevText:"vissza",nextText:"előre",currentText:"ma",monthNames:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],monthNamesShort:["Jan","Feb","Már","Ápr","Máj","Jún","Júl","Aug","Szep","Okt","Nov","Dec"],dayNames:["Vasárnap","Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat"],dayNamesShort:["Vas","Hét","Ked","Sze","Csü","Pén","Szo"],dayNamesMin:["V","H","K","Sze","Cs","P","Szo"],weekHeader:"Hét",dateFormat:"yy.mm.dd.",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:""},t.setDefaults(t.regional.hu),t.regional.hu,t.regional.hy={closeText:"Փակել",prevText:"&#x3C;Նախ.",nextText:"Հաջ.&#x3E;",currentText:"Այսօր",monthNames:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"],monthNamesShort:["Հունվ","Փետր","Մարտ","Ապր","Մայիս","Հունիս","Հուլ","Օգս","Սեպ","Հոկ","Նոյ","Դեկ"],dayNames:["կիրակի","եկուշաբթի","երեքշաբթի","չորեքշաբթի","հինգշաբթի","ուրբաթ","շաբաթ"],dayNamesShort:["կիր","երկ","երք","չրք","հնգ","ուրբ","շբթ"],dayNamesMin:["կիր","երկ","երք","չրք","հնգ","ուրբ","շբթ"],weekHeader:"ՇԲՏ",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.hy),t.regional.hy,t.regional.id={closeText:"Tutup",prevText:"&#x3C;mundur",nextText:"maju&#x3E;",currentText:"hari ini",monthNames:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agus","Sep","Okt","Nop","Des"],dayNames:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],dayNamesShort:["Min","Sen","Sel","Rab","kam","Jum","Sab"],dayNamesMin:["Mg","Sn","Sl","Rb","Km","jm","Sb"],weekHeader:"Mg",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.id),t.regional.id,t.regional.is={closeText:"Loka",prevText:"&#x3C; Fyrri",nextText:"Næsti &#x3E;",currentText:"Í dag",monthNames:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],dayNames:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"],dayNamesShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau"],dayNamesMin:["Su","Má","Þr","Mi","Fi","Fö","La"],weekHeader:"Vika",dateFormat:"dd.mm.yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.is),t.regional.is,t.regional["it-CH"]={closeText:"Chiudi",prevText:"&#x3C;Prec",nextText:"Succ&#x3E;",currentText:"Oggi",monthNames:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthNamesShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],dayNames:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],dayNamesShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayNamesMin:["Do","Lu","Ma","Me","Gi","Ve","Sa"],weekHeader:"Sm",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional["it-CH"]),t.regional["it-CH"],t.regional.it={closeText:"Chiudi",prevText:"&#x3C;Prec",nextText:"Succ&#x3E;",currentText:"Oggi",monthNames:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthNamesShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],dayNames:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],dayNamesShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayNamesMin:["Do","Lu","Ma","Me","Gi","Ve","Sa"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.it),t.regional.it,t.regional.ja={closeText:"閉じる",prevText:"&#x3C;前",nextText:"次&#x3E;",currentText:"今日",monthNames:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthNamesShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayNames:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],dayNamesShort:["日","月","火","水","木","金","土"],dayNamesMin:["日","月","火","水","木","金","土"],weekHeader:"週",dateFormat:"yy/mm/dd",firstDay:0,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"},t.setDefaults(t.regional.ja),t.regional.ja,t.regional.ka={closeText:"დახურვა",prevText:"&#x3c; წინა",nextText:"შემდეგი &#x3e;",currentText:"დღეს",monthNames:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"],monthNamesShort:["იან","თებ","მარ","აპრ","მაი","ივნ","ივლ","აგვ","სექ","ოქტ","ნოე","დეკ"],dayNames:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],dayNamesShort:["კვ","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],dayNamesMin:["კვ","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],weekHeader:"კვირა",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.ka),t.regional.ka,t.regional.kk={closeText:"Жабу",prevText:"&#x3C;Алдыңғы",nextText:"Келесі&#x3E;",currentText:"Бүгін",monthNames:["Қаңтар","Ақпан","Наурыз","Сәуір","Мамыр","Маусым","Шілде","Тамыз","Қыркүйек","Қазан","Қараша","Желтоқсан"],monthNamesShort:["Қаң","Ақп","Нау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел"],dayNames:["Жексенбі","Дүйсенбі","Сейсенбі","Сәрсенбі","Бейсенбі","Жұма","Сенбі"],dayNamesShort:["жкс","дсн","ссн","срс","бсн","жма","снб"],dayNamesMin:["Жк","Дс","Сс","Ср","Бс","Жм","Сн"],weekHeader:"Не",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.kk),t.regional.kk,t.regional.km={closeText:"ធ្វើ​រួច",prevText:"មុន",nextText:"បន្ទាប់",currentText:"ថ្ងៃ​នេះ",monthNames:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],monthNamesShort:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],dayNames:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស្បតិ៍","សុក្រ","សៅរ៍"],dayNamesShort:["អា","ច","អ","ពុ","ព្រហ","សុ","សៅ"],dayNamesMin:["អា","ច","អ","ពុ","ព្រហ","សុ","សៅ"],weekHeader:"សប្ដាហ៍",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.km),t.regional.km,t.regional.ko={closeText:"닫기",prevText:"이전달",nextText:"다음달",currentText:"오늘",monthNames:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthNamesShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayNames:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],dayNamesShort:["일","월","화","수","목","금","토"],dayNamesMin:["일","월","화","수","목","금","토"],weekHeader:"Wk",dateFormat:"yy-mm-dd",firstDay:0,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"년"},t.setDefaults(t.regional.ko),t.regional.ko,t.regional.ky={closeText:"Жабуу",prevText:"&#x3c;Мур",nextText:"Кий&#x3e;",currentText:"Бүгүн",monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["жекшемби","дүйшөмбү","шейшемби","шаршемби","бейшемби","жума","ишемби"],dayNamesShort:["жек","дүй","шей","шар","бей","жум","ише"],dayNamesMin:["Жк","Дш","Шш","Шр","Бш","Жм","Иш"],weekHeader:"Жум",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.ky),t.regional.ky,t.regional.lb={closeText:"Fäerdeg",prevText:"Zréck",nextText:"Weider",currentText:"Haut",monthNames:["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"],dayNamesShort:["Son","Méi","Dën","Mët","Don","Fre","Sam"],dayNamesMin:["So","Mé","Dë","Më","Do","Fr","Sa"],weekHeader:"W",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.lb),t.regional.lb,t.regional.lt={closeText:"Uždaryti",prevText:"&#x3C;Atgal",nextText:"Pirmyn&#x3E;",currentText:"Šiandien",monthNames:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthNamesShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],dayNames:["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"],dayNamesShort:["sek","pir","ant","tre","ket","pen","šeš"],dayNamesMin:["Se","Pr","An","Tr","Ke","Pe","Še"],weekHeader:"SAV",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:""},t.setDefaults(t.regional.lt),t.regional.lt,t.regional.lv={closeText:"Aizvērt",prevText:"Iepr.",nextText:"Nāk.",currentText:"Šodien",monthNames:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthNamesShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],dayNames:["svētdiena","pirmdiena","otrdiena","trešdiena","ceturtdiena","piektdiena","sestdiena"],dayNamesShort:["svt","prm","otr","tre","ctr","pkt","sst"],dayNamesMin:["Sv","Pr","Ot","Tr","Ct","Pk","Ss"],weekHeader:"Ned.",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.lv),t.regional.lv,t.regional.mk={closeText:"Затвори",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Денес",monthNames:["Јануари","Февруари","Март","Април","Мај","Јуни","Јули","Август","Септември","Октомври","Ноември","Декември"],monthNamesShort:["Јан","Фев","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Ное","Дек"],dayNames:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"],dayNamesShort:["Нед","Пон","Вто","Сре","Чет","Пет","Саб"],dayNamesMin:["Не","По","Вт","Ср","Че","Пе","Са"],weekHeader:"Сед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.mk),t.regional.mk,t.regional.ml={closeText:"ശരി",prevText:"മുന്നത്തെ",nextText:"അടുത്തത് ",currentText:"ഇന്ന്",monthNames:["ജനുവരി","ഫെബ്രുവരി","മാര്‍ച്ച്","ഏപ്രില്‍","മേയ്","ജൂണ്‍","ജൂലൈ","ആഗസ്റ്റ്","സെപ്റ്റംബര്‍","ഒക്ടോബര്‍","നവംബര്‍","ഡിസംബര്‍"],monthNamesShort:["ജനു","ഫെബ്","മാര്‍","ഏപ്രി","മേയ്","ജൂണ്‍","ജൂലാ","ആഗ","സെപ്","ഒക്ടോ","നവം","ഡിസ"],dayNames:["ഞായര്‍","തിങ്കള്‍","ചൊവ്വ","ബുധന്‍","വ്യാഴം","വെള്ളി","ശനി"],dayNamesShort:["ഞായ","തിങ്ക","ചൊവ്വ","ബുധ","വ്യാഴം","വെള്ളി","ശനി"],dayNamesMin:["ഞാ","തി","ചൊ","ബു","വ്യാ","വെ","ശ"],weekHeader:"ആ",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.ml),t.regional.ml,t.regional.ms={closeText:"Tutup",prevText:"&#x3C;Sebelum",nextText:"Selepas&#x3E;",currentText:"hari ini",monthNames:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthNamesShort:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],dayNames:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],dayNamesShort:["Aha","Isn","Sel","Rab","kha","Jum","Sab"],dayNamesMin:["Ah","Is","Se","Ra","Kh","Ju","Sa"],weekHeader:"Mg",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.ms),t.regional.ms,t.regional.nb={closeText:"Lukk",prevText:"&#xAB;Forrige",nextText:"Neste&#xBB;",currentText:"I dag",monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],dayNamesShort:["søn","man","tir","ons","tor","fre","lør"],dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],dayNamesMin:["sø","ma","ti","on","to","fr","lø"],weekHeader:"Uke",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.nb),t.regional.nb,t.regional["nl-BE"]={closeText:"Sluiten",prevText:"←",nextText:"→",currentText:"Vandaag",monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthNamesShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],dayNamesShort:["zon","maa","din","woe","don","vri","zat"],dayNamesMin:["zo","ma","di","wo","do","vr","za"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional["nl-BE"]),t.regional["nl-BE"],t.regional.nl={closeText:"Sluiten",prevText:"←",nextText:"→",currentText:"Vandaag",monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthNamesShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],dayNamesShort:["zon","maa","din","woe","don","vri","zat"],dayNamesMin:["zo","ma","di","wo","do","vr","za"],weekHeader:"Wk",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.nl),t.regional.nl,t.regional.nn={closeText:"Lukk",prevText:"&#xAB;Førre",nextText:"Neste&#xBB;",currentText:"I dag",monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],dayNamesShort:["sun","mån","tys","ons","tor","fre","lau"],dayNames:["sundag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],dayNamesMin:["su","må","ty","on","to","fr","la"],weekHeader:"Veke",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.nn),t.regional.nn,t.regional.no={closeText:"Lukk",prevText:"&#xAB;Forrige",nextText:"Neste&#xBB;",currentText:"I dag",monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],dayNamesShort:["søn","man","tir","ons","tor","fre","lør"],dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],dayNamesMin:["sø","ma","ti","on","to","fr","lø"],weekHeader:"Uke",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.no),t.regional.no,t.regional.pl={closeText:"Zamknij",prevText:"&#x3C;Poprzedni",nextText:"Następny&#x3E;",currentText:"Dziś",monthNames:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthNamesShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],dayNames:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],dayNamesShort:["Nie","Pn","Wt","Śr","Czw","Pt","So"],dayNamesMin:["N","Pn","Wt","Śr","Cz","Pt","So"],weekHeader:"Tydz",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.pl),t.regional.pl,t.regional["pt-BR"]={closeText:"Fechar",prevText:"&#x3C;Anterior",nextText:"Próximo&#x3E;",currentText:"Hoje",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional["pt-BR"]),t.regional["pt-BR"],t.regional.pt={closeText:"Fechar",prevText:"Anterior",nextText:"Seguinte",currentText:"Hoje",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],weekHeader:"Sem",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.pt),t.regional.pt,t.regional.rm={closeText:"Serrar",prevText:"&#x3C;Suandant",nextText:"Precedent&#x3E;",currentText:"Actual",monthNames:["Schaner","Favrer","Mars","Avrigl","Matg","Zercladur","Fanadur","Avust","Settember","October","November","December"],monthNamesShort:["Scha","Fev","Mar","Avr","Matg","Zer","Fan","Avu","Sett","Oct","Nov","Dec"],dayNames:["Dumengia","Glindesdi","Mardi","Mesemna","Gievgia","Venderdi","Sonda"],dayNamesShort:["Dum","Gli","Mar","Mes","Gie","Ven","Som"],dayNamesMin:["Du","Gl","Ma","Me","Gi","Ve","So"],weekHeader:"emna",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.rm),t.regional.rm,t.regional.ro={closeText:"Închide",prevText:"&#xAB; Luna precedentă",nextText:"Luna următoare &#xBB;",currentText:"Azi",monthNames:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],monthNamesShort:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"],dayNamesShort:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm"],dayNamesMin:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],weekHeader:"Săpt",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.ro),t.regional.ro,t.regional.ru={closeText:"Закрыть",prevText:"&#x3C;Пред",nextText:"След&#x3E;",currentText:"Сегодня",monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],dayNamesShort:["вск","пнд","втр","срд","чтв","птн","сбт"],dayNamesMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],weekHeader:"Нед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.ru),t.regional.ru,t.regional.sk={closeText:"Zavrieť",prevText:"&#x3C;Predchádzajúci",nextText:"Nasledujúci&#x3E;",currentText:"Dnes",monthNames:["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december"],monthNamesShort:["Jan","Feb","Mar","Apr","Máj","Jún","Júl","Aug","Sep","Okt","Nov","Dec"],dayNames:["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],dayNamesShort:["Ned","Pon","Uto","Str","Štv","Pia","Sob"],dayNamesMin:["Ne","Po","Ut","St","Št","Pia","So"],weekHeader:"Ty",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.sk),t.regional.sk,t.regional.sl={closeText:"Zapri",prevText:"&#x3C;Prejšnji",nextText:"Naslednji&#x3E;",currentText:"Trenutni",monthNames:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],dayNames:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"],dayNamesShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],dayNamesMin:["Ne","Po","To","Sr","Če","Pe","So"],weekHeader:"Teden",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.sl),t.regional.sl,t.regional.sq={closeText:"mbylle",prevText:"&#x3C;mbrapa",nextText:"Përpara&#x3E;",currentText:"sot",monthNames:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"],monthNamesShort:["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gus","Sht","Tet","Nën","Dhj"],dayNames:["E Diel","E Hënë","E Martë","E Mërkurë","E Enjte","E Premte","E Shtune"],dayNamesShort:["Di","Hë","Ma","Më","En","Pr","Sh"],dayNamesMin:["Di","Hë","Ma","Më","En","Pr","Sh"],weekHeader:"Ja",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.sq),t.regional.sq,t.regional["sr-SR"]={closeText:"Zatvori",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Danas",monthNames:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],dayNames:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"],dayNamesShort:["Ned","Pon","Uto","Sre","Čet","Pet","Sub"],dayNamesMin:["Ne","Po","Ut","Sr","Če","Pe","Su"],weekHeader:"Sed",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional["sr-SR"]),t.regional["sr-SR"],t.regional.sr={closeText:"Затвори",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Данас",monthNames:["Јануар","Фебруар","Март","Април","Мај","Јун","Јул","Август","Септембар","Октобар","Новембар","Децембар"],monthNamesShort:["Јан","Феб","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Нов","Дец"],dayNames:["Недеља","Понедељак","Уторак","Среда","Четвртак","Петак","Субота"],dayNamesShort:["Нед","Пон","Уто","Сре","Чет","Пет","Суб"],dayNamesMin:["Не","По","Ут","Ср","Че","Пе","Су"],weekHeader:"Сед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.sr),t.regional.sr,t.regional.sv={closeText:"Stäng",prevText:"&#xAB;Förra",nextText:"Nästa&#xBB;",currentText:"Idag",monthNames:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNamesShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],dayNames:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],dayNamesMin:["Sö","Må","Ti","On","To","Fr","Lö"],weekHeader:"Ve",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.sv),t.regional.sv,t.regional.ta={closeText:"மூடு",prevText:"முன்னையது",nextText:"அடுத்தது",currentText:"இன்று",monthNames:["தை","மாசி","பங்குனி","சித்திரை","வைகாசி","ஆனி","ஆடி","ஆவணி","புரட்டாசி","ஐப்பசி","கார்த்திகை","மார்கழி"],monthNamesShort:["தை","மாசி","பங்","சித்","வைகா","ஆனி","ஆடி","ஆவ","புர","ஐப்","கார்","மார்"],dayNames:["ஞாயிற்றுக்கிழமை","திங்கட்கிழமை","செவ்வாய்க்கிழமை","புதன்கிழமை","வியாழக்கிழமை","வெள்ளிக்கிழமை","சனிக்கிழமை"],dayNamesShort:["ஞாயிறு","திங்கள்","செவ்வாய்","புதன்","வியாழன்","வெள்ளி","சனி"],dayNamesMin:["ஞா","தி","செ","பு","வி","வெ","ச"],weekHeader:"Не",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.ta),t.regional.ta,t.regional.th={closeText:"ปิด",prevText:"&#xAB;&#xA0;ย้อน",nextText:"ถัดไป&#xA0;&#xBB;",currentText:"วันนี้",monthNames:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthNamesShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],dayNames:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],dayNamesShort:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],dayNamesMin:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.th),t.regional.th,t.regional.tj={closeText:"Идома",prevText:"&#x3c;Қафо",nextText:"Пеш&#x3e;",currentText:"Имрӯз",monthNames:["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["якшанбе","душанбе","сешанбе","чоршанбе","панҷшанбе","ҷумъа","шанбе"],dayNamesShort:["якш","душ","сеш","чор","пан","ҷум","шан"],dayNamesMin:["Як","Дш","Сш","Чш","Пш","Ҷм","Шн"],weekHeader:"Хф",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.tj),t.regional.tj,t.regional.tr={closeText:"kapat",prevText:"&#x3C;geri",nextText:"ileri&#x3e",currentText:"bugün",monthNames:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthNamesShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],dayNames:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],dayNamesShort:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],dayNamesMin:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],weekHeader:"Hf",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.tr),t.regional.tr,t.regional.uk={closeText:"Закрити",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Сьогодні",monthNames:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],monthNamesShort:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],dayNames:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"],dayNamesShort:["нед","пнд","вів","срд","чтв","птн","сбт"],dayNamesMin:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],weekHeader:"Тиж",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.uk),t.regional.uk,t.regional.vi={closeText:"Đóng",prevText:"&#x3C;Trước",nextText:"Tiếp&#x3E;",currentText:"Hôm nay",monthNames:["Tháng Một","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","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"],monthNamesShort:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayNames:["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"],dayNamesShort:["CN","T2","T3","T4","T5","T6","T7"],dayNamesMin:["CN","T2","T3","T4","T5","T6","T7"],weekHeader:"Tu",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.setDefaults(t.regional.vi),t.regional.vi,t.regional["zh-CN"]={closeText:"关闭",prevText:"&#x3C;上月",nextText:"下月&#x3E;",currentText:"今天",monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayNamesShort:["周日","周一","周二","周三","周四","周五","周六"],dayNamesMin:["日","一","二","三","四","五","六"],weekHeader:"周",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"},t.setDefaults(t.regional["zh-CN"]),t.regional["zh-CN"],t.regional["zh-HK"]={closeText:"關閉",prevText:"&#x3C;上月",nextText:"下月&#x3E;",currentText:"今天",monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayNamesShort:["周日","周一","周二","周三","周四","周五","周六"],dayNamesMin:["日","一","二","三","四","五","六"],weekHeader:"周",dateFormat:"dd-mm-yy",firstDay:0,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"},t.setDefaults(t.regional["zh-HK"]),t.regional["zh-HK"],t.regional["zh-TW"]={closeText:"關閉",prevText:"&#x3C;上月",nextText:"下月&#x3E;",currentText:"今天",monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayNamesShort:["周日","周一","周二","周三","周四","周五","周六"],dayNamesMin:["日","一","二","三","四","五","六"],weekHeader:"周",dateFormat:"yy/mm/dd",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"},t.setDefaults(t.regional["zh-TW"]),t.regional["zh-TW"]
7
+ });
js/map-frontend.js CHANGED
@@ -34,7 +34,7 @@ jQuery( function ( $ )
34
  break;
35
  }
36
  mapOptions.center = center;
37
-
38
  // Typcast zoom to a number
39
  mapOptions.zoom *= 1;
40
  map = new google.maps.Map( this, mapOptions );
@@ -52,6 +52,12 @@ jQuery( function ( $ )
52
  {
53
  marker.setTitle( options.marker_title );
54
  }
 
 
 
 
 
 
55
  }
56
 
57
  // Set info window
34
  break;
35
  }
36
  mapOptions.center = center;
37
+
38
  // Typcast zoom to a number
39
  mapOptions.zoom *= 1;
40
  map = new google.maps.Map( this, mapOptions );
52
  {
53
  marker.setTitle( options.marker_title );
54
  }
55
+
56
+ // Set marker icon
57
+ if ( options.marker_icon )
58
+ {
59
+ marker.setIcon( options.marker_icon );
60
+ }
61
  }
62
 
63
  // Set info window
js/map.js CHANGED
@@ -146,6 +146,16 @@
146
  return;
147
  }
148
 
 
 
 
 
 
 
 
 
 
 
149
  $( '#' + this.addressField ).autocomplete( {
150
  source: function ( request, response )
151
  {
146
  return;
147
  }
148
 
149
+ // If Meta Box Geo Location installed. Do not run auto complete.
150
+ if ( $('.rwmb-geo-binding').length )
151
+ {
152
+ $( '#' + this.addressField).on( 'selected_address', function() {
153
+ that.$findButton.trigger('click');
154
+ });
155
+
156
+ return false;
157
+ }
158
+
159
  $( '#' + this.addressField ).autocomplete( {
160
  source: function ( request, response )
161
  {
js/media.js CHANGED
@@ -15,12 +15,12 @@ jQuery( function ( $ )
15
  Controller = models.Controller = Backbone.Model.extend( {
16
  //Default options
17
  defaults: {
18
- maxFiles: 0,
19
- ids: [],
20
- mimeType: '',
21
- forceDelete: false,
22
- showStatus: true,
23
- length: 0
24
  },
25
 
26
  //Initialize Controller model
@@ -33,20 +33,20 @@ jQuery( function ( $ )
33
  // Create items collection
34
  this.set( 'items', new wp.media.model.Attachments() );
35
 
36
- this.listenTo( this.get( 'items' ), 'add remove reset', function()
37
  {
38
  var items = this.get( 'items' ),
39
  length = items.length,
40
  max = this.get( 'maxFiles' );
41
 
42
  this.set( 'length', length );
43
- this.set( 'full', max > 0 && length >= max );
44
  } );
45
 
46
  // Listen for destroy event on controller, delete all models when triggered
47
  this.on( 'destroy', function ( e )
48
  {
49
- if( this.get( 'forceDelete' ) )
50
  {
51
  this.get( 'items' ).each( function ( item )
52
  {
@@ -75,28 +75,23 @@ jQuery( function ( $ )
75
  // Get more then trigger ready
76
  this.get( 'items' ).more();
77
  }
78
- else
79
- {
80
- // No initial media so ready
81
- that.trigger( 'ready' );
82
- }
83
  },
84
 
85
  // Method to remove media items
86
- removeItem: function( item )
87
  {
88
  this.get( 'items' ).remove( item );
89
- if( this.get( 'forceDelete' ) )
90
  item.destroy();
91
  },
92
 
93
  // Method to add items
94
  addItems: function ( items )
95
  {
96
- if( this.get( 'maxFiles' ) )
97
  {
98
  var left = this.get( 'maxFiles' ) - this.get( 'items' ).length;
99
- if( left <= 0 )
100
  return this;
101
 
102
  items = _.difference( items, this.get( 'items' ).models );
@@ -106,13 +101,78 @@ jQuery( function ( $ )
106
  }
107
  } );
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  /***
110
  * Media List
111
  * lists media
112
  */
113
  MediaList = views.MediaList = Backbone.View.extend( {
114
- tagName : 'ul',
115
- className : 'rwmb-media-list',
116
 
117
  //Add item view
118
  addItemView: function ( item )
@@ -147,7 +207,7 @@ jQuery( function ( $ )
147
  this.initSortable();
148
  },
149
 
150
- setEvents: function()
151
  {
152
  this.listenTo( this.controller.get( 'items' ), 'add', this.addItemView );
153
  this.listenTo( this.controller.get( 'items' ), 'remove', this.removeItemView );
@@ -162,23 +222,25 @@ jQuery( function ( $ )
162
  tolerance: 'pointer',
163
 
164
  // Record the initial `index` of the dragged model.
165
- start: function( event, ui ) {
166
- ui.item.data('sortableIndexStart', ui.item.index());
 
167
  },
168
 
169
  // Update the model's index in the collection.
170
  // Do so silently, as the view is already accurate.
171
- update: function( event, ui ) {
172
- var model = collection.at( ui.item.data('sortableIndexStart') );
 
173
 
174
  // Silently shift the model to its new index.
175
  collection.remove( model, {
176
  silent: true
177
- });
178
  collection.add( model, {
179
  silent: true,
180
- at: ui.item.index()
181
- });
182
 
183
  // Fire the `reset` event to ensure other collections sync.
184
  collection.trigger( 'reset', collection );
@@ -187,79 +249,14 @@ jQuery( function ( $ )
187
  }
188
  } );
189
 
190
- /***
191
- * MediaField
192
- * Sets up media field view and subviews
193
- */
194
- MediaField = views.MediaField = Backbone.View.extend( {
195
- initialize: function ( options )
196
- {
197
- var that = this;
198
- this.$input = $( options.input );
199
- this.controller = new Controller( _.extend(
200
- {
201
- fieldName: this.$input.attr( 'name' ) ,
202
- ids: this.$input.val().split( ',' )
203
- },
204
- this.$el.data()
205
- ) );
206
-
207
- // Create views
208
- this.createList();
209
- this.createAddButton()
210
- this.createStatus();
211
-
212
- // Render
213
- this.render();
214
-
215
- // Load media
216
- this.controller.load();
217
-
218
- // Listen for destroy event on input
219
- this.$input.on( 'remove', function()
220
- {
221
- this.controller.destroy();
222
- } )
223
- },
224
-
225
- // Creates media list
226
- createList: function ()
227
- {
228
- this.list = new MediaList( { controller: this.controller } );
229
- },
230
-
231
- // Creates button that adds media
232
- createAddButton: function ()
233
- {
234
- this.addButton = new MediaButton( { controller: this.controller } );
235
- },
236
-
237
- // Creates status
238
- createStatus: function ()
239
- {
240
- this.status = new MediaStatus( { controller: this.controller } );
241
- },
242
-
243
- // Render field and adds sub fields
244
- render: function ()
245
- {
246
- // Empty then add parts
247
- this.$el.empty().append(
248
- this.list.el,
249
- this.addButton.el,
250
- this.status.el
251
- );
252
- }
253
- } );
254
-
255
  /***
256
  * MediaStatus
257
  * Tracks status of media field if maxStatus is greater than 0
258
  */
259
  MediaStatus = views.MediaStatus = Backbone.View.extend( {
260
- tagName : 'span',
261
- className : 'rwmb-media-status',
262
- template : wp.template( 'rwmb-media-status' ),
263
 
264
  //Initialize
265
  initialize: function ( options )
@@ -267,7 +264,7 @@ jQuery( function ( $ )
267
  this.controller = options.controller;
268
 
269
  //Auto hide if showStatus is false
270
- if( ! this.controller.get( 'showStatus' ) )
271
  this.$el.hide();
272
 
273
  //Rerender if changes happen in controller
@@ -320,7 +317,7 @@ jQuery( function ( $ )
320
  this._frame.open();
321
  }
322
  },
323
- render : function ()
324
  {
325
  this.$el.text( i18nRwmbMedia.add );
326
  return this;
@@ -333,7 +330,7 @@ jQuery( function ( $ )
333
  // Auto hide if you reach the max number of media
334
  this.listenTo( this.controller, 'change:full', function ()
335
  {
336
- this.$el.toggle( ! this.controller.get( 'full' ) );
337
  } );
338
 
339
  this.render();
@@ -352,16 +349,15 @@ jQuery( function ( $ )
352
  {
353
  this.controller = options.controller;
354
  this.render();
355
- this.listenTo( this.model, 'change', function()
356
  {
357
  this.render();
358
  } );
359
 
360
- this.$el.data( 'id', this.model.cid);
361
  },
362
 
363
 
364
-
365
  events: {
366
  // Event when remove button clicked
367
  'click .rwmb-remove-media': function ( e )
@@ -370,7 +366,7 @@ jQuery( function ( $ )
370
  return false;
371
  },
372
 
373
- 'click .rwmb-edit-media': function( e )
374
  {
375
  // Destroy the previous collection frame.
376
  if ( this._frame )
@@ -381,17 +377,20 @@ jQuery( function ( $ )
381
 
382
  // Trigger the media frame to open the correct item
383
  this._frame = wp.media( {
384
- frame: 'edit-attachments',
385
- controller:
386
- {
387
  // Needed to trick Edit modal to think there is a gridRouter
388
  gridRouter: {
389
- navigate: function( destination) {},
390
- baseUrl: function( url ) {}
 
 
 
 
391
  }
392
  },
393
- library: this.controller.get( 'items' ),
394
- model: this.model
395
  } );
396
 
397
  this._frame.open();
15
  Controller = models.Controller = Backbone.Model.extend( {
16
  //Default options
17
  defaults: {
18
+ maxFiles : 0,
19
+ ids : [],
20
+ mimeType : '',
21
+ forceDelete: false,
22
+ showStatus : true,
23
+ length : 0
24
  },
25
 
26
  //Initialize Controller model
33
  // Create items collection
34
  this.set( 'items', new wp.media.model.Attachments() );
35
 
36
+ this.listenTo( this.get( 'items' ), 'add remove reset', function ()
37
  {
38
  var items = this.get( 'items' ),
39
  length = items.length,
40
  max = this.get( 'maxFiles' );
41
 
42
  this.set( 'length', length );
43
+ this.set( 'full', max > 0 && length >= max );
44
  } );
45
 
46
  // Listen for destroy event on controller, delete all models when triggered
47
  this.on( 'destroy', function ( e )
48
  {
49
+ if ( this.get( 'forceDelete' ) )
50
  {
51
  this.get( 'items' ).each( function ( item )
52
  {
75
  // Get more then trigger ready
76
  this.get( 'items' ).more();
77
  }
 
 
 
 
 
78
  },
79
 
80
  // Method to remove media items
81
+ removeItem: function ( item )
82
  {
83
  this.get( 'items' ).remove( item );
84
+ if ( this.get( 'forceDelete' ) )
85
  item.destroy();
86
  },
87
 
88
  // Method to add items
89
  addItems: function ( items )
90
  {
91
+ if ( this.get( 'maxFiles' ) )
92
  {
93
  var left = this.get( 'maxFiles' ) - this.get( 'items' ).length;
94
+ if ( left <= 0 )
95
  return this;
96
 
97
  items = _.difference( items, this.get( 'items' ).models );
101
  }
102
  } );
103
 
104
+ /***
105
+ * MediaField
106
+ * Sets up media field view and subviews
107
+ */
108
+ MediaField = views.MediaField = Backbone.View.extend( {
109
+ initialize: function ( options )
110
+ {
111
+ var that = this;
112
+ this.$input = $( options.input );
113
+ this.controller = new Controller( _.extend(
114
+ {
115
+ fieldName: this.$input.attr( 'name' ),
116
+ ids : this.$input.val().split( ',' )
117
+ },
118
+ this.$el.data()
119
+ ) );
120
+
121
+ // Create views
122
+ this.createList();
123
+ this.createAddButton();
124
+ this.createStatus();
125
+
126
+ // Render
127
+ this.render();
128
+
129
+ // Load media
130
+ this.controller.load();
131
+
132
+ // Listen for destroy event on input
133
+ this.$input.on( 'remove', function ()
134
+ {
135
+ this.controller.destroy();
136
+ } )
137
+ },
138
+
139
+ // Creates media list
140
+ createList: function ()
141
+ {
142
+ this.list = new MediaList( { controller: this.controller } );
143
+ },
144
+
145
+ // Creates button that adds media
146
+ createAddButton: function ()
147
+ {
148
+ this.addButton = new MediaButton( { controller: this.controller } );
149
+ },
150
+
151
+ // Creates status
152
+ createStatus: function ()
153
+ {
154
+ this.status = new MediaStatus( { controller: this.controller } );
155
+ },
156
+
157
+ // Render field and adds sub fields
158
+ render: function ()
159
+ {
160
+ // Empty then add parts
161
+ this.$el.empty().append(
162
+ this.list.el,
163
+ this.addButton.el,
164
+ this.status.el
165
+ );
166
+ }
167
+ } );
168
+
169
  /***
170
  * Media List
171
  * lists media
172
  */
173
  MediaList = views.MediaList = Backbone.View.extend( {
174
+ tagName : 'ul',
175
+ className: 'rwmb-media-list',
176
 
177
  //Add item view
178
  addItemView: function ( item )
207
  this.initSortable();
208
  },
209
 
210
+ setEvents: function ()
211
  {
212
  this.listenTo( this.controller.get( 'items' ), 'add', this.addItemView );
213
  this.listenTo( this.controller.get( 'items' ), 'remove', this.removeItemView );
222
  tolerance: 'pointer',
223
 
224
  // Record the initial `index` of the dragged model.
225
+ start: function ( event, ui )
226
+ {
227
+ ui.item.data( 'sortableIndexStart', ui.item.index() );
228
  },
229
 
230
  // Update the model's index in the collection.
231
  // Do so silently, as the view is already accurate.
232
+ update: function ( event, ui )
233
+ {
234
+ var model = collection.at( ui.item.data( 'sortableIndexStart' ) );
235
 
236
  // Silently shift the model to its new index.
237
  collection.remove( model, {
238
  silent: true
239
+ } );
240
  collection.add( model, {
241
  silent: true,
242
+ at : ui.item.index()
243
+ } );
244
 
245
  // Fire the `reset` event to ensure other collections sync.
246
  collection.trigger( 'reset', collection );
249
  }
250
  } );
251
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  /***
253
  * MediaStatus
254
  * Tracks status of media field if maxStatus is greater than 0
255
  */
256
  MediaStatus = views.MediaStatus = Backbone.View.extend( {
257
+ tagName : 'span',
258
+ className: 'rwmb-media-status',
259
+ template : wp.template( 'rwmb-media-status' ),
260
 
261
  //Initialize
262
  initialize: function ( options )
264
  this.controller = options.controller;
265
 
266
  //Auto hide if showStatus is false
267
+ if ( !this.controller.get( 'showStatus' ) )
268
  this.$el.hide();
269
 
270
  //Rerender if changes happen in controller
317
  this._frame.open();
318
  }
319
  },
320
+ render : function ()
321
  {
322
  this.$el.text( i18nRwmbMedia.add );
323
  return this;
330
  // Auto hide if you reach the max number of media
331
  this.listenTo( this.controller, 'change:full', function ()
332
  {
333
+ this.$el.toggle( !this.controller.get( 'full' ) );
334
  } );
335
 
336
  this.render();
349
  {
350
  this.controller = options.controller;
351
  this.render();
352
+ this.listenTo( this.model, 'change', function ()
353
  {
354
  this.render();
355
  } );
356
 
357
+ this.$el.data( 'id', this.model.cid );
358
  },
359
 
360
 
 
361
  events: {
362
  // Event when remove button clicked
363
  'click .rwmb-remove-media': function ( e )
366
  return false;
367
  },
368
 
369
+ 'click .rwmb-edit-media': function ( e )
370
  {
371
  // Destroy the previous collection frame.
372
  if ( this._frame )
377
 
378
  // Trigger the media frame to open the correct item
379
  this._frame = wp.media( {
380
+ frame : 'edit-attachments',
381
+ controller: {
 
382
  // Needed to trick Edit modal to think there is a gridRouter
383
  gridRouter: {
384
+ navigate: function ( destination )
385
+ {
386
+ },
387
+ baseUrl : function ( url )
388
+ {
389
+ }
390
  }
391
  },
392
+ library : this.controller.get( 'items' ),
393
+ model : this.model
394
  } );
395
 
396
  this._frame.open();
js/time.js CHANGED
@@ -32,13 +32,13 @@ jQuery( function ( $ )
32
  }
33
 
34
  // Set language if available
35
- if ( $.timepicker.regional.hasOwnProperty( RWMB_Timepicker.locale ) )
36
  {
37
- $.timepicker.setDefaults( $.timepicker.regional[RWMB_Timepicker.locale] );
38
  }
39
- else if ( $.timepicker.regional.hasOwnProperty( RWMB_Timepicker.localeShort ) )
40
  {
41
- $.timepicker.setDefaults( $.timepicker.regional[RWMB_Timepicker.localeShort] );
42
  }
43
 
44
  $( '.rwmb-time' ).each( update );
32
  }
33
 
34
  // Set language if available
35
+ if ( $.timepicker.regional.hasOwnProperty( RWMB_Time.locale ) )
36
  {
37
+ $.timepicker.setDefaults( $.timepicker.regional[RWMB_Time.locale] );
38
  }
39
+ else if ( $.timepicker.regional.hasOwnProperty( RWMB_Time.localeShort ) )
40
  {
41
+ $.timepicker.setDefaults( $.timepicker.regional[RWMB_Time.localeShort] );
42
  }
43
 
44
  $( '.rwmb-time' ).each( update );
lang/meta-box-es_ES.mo DELETED
Binary file
meta-box.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Meta Box
4
  * Plugin URI: https://metabox.io
5
  * Description: Create custom meta boxes and custom fields for any post type in WordPress.
6
- * Version: 4.8.6
7
  * Author: Rilwis
8
  * Author URI: http://www.deluxeblogtips.com
9
  * License: GPL2+
3
  * Plugin Name: Meta Box
4
  * Plugin URI: https://metabox.io
5
  * Description: Create custom meta boxes and custom fields for any post type in WordPress.
6
+ * Version: 4.8.7
7
  * Author: Rilwis
8
  * Author URI: http://www.deluxeblogtips.com
9
  * License: GPL2+
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.deluxeblogtips.com/donate
4
  Tags: meta-box, custom fields, custom field, meta, meta-boxes, admin, advanced, custom, edit, field, file, image, magic fields, matrix, more fields, Post, repeater, simple fields, text, textarea, type, cms, fields post
5
  Requires at least: 4.1
6
  Tested up to: 4.5.2
7
- Stable tag: 4.8.6
8
  License: GPLv2 or later
9
 
10
  Meta Box plugin is a powerful, professional solution to create custom meta boxes and custom fields for WordPress websites.
@@ -79,6 +79,22 @@ To getting started with the plugin API, please read [this tutorial](https://meta
79
 
80
  == Changelog ==
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  = 4.8.6 =
83
  * Improvement: Edit link on media items now opens edit modal
84
  * Improvement: Refresh map when sorting meta boxes.
4
  Tags: meta-box, custom fields, custom field, meta, meta-boxes, admin, advanced, custom, edit, field, file, image, magic fields, matrix, more fields, Post, repeater, simple fields, text, textarea, type, cms, fields post
5
  Requires at least: 4.1
6
  Tested up to: 4.5.2
7
+ Stable tag: 4.8.7
8
  License: GPLv2 or later
9
 
10
  Meta Box plugin is a powerful, professional solution to create custom meta boxes and custom fields for WordPress websites.
79
 
80
  == Changelog ==
81
 
82
+ = 4.8.7 =
83
+ * Improvement: Refactor the code to reduce the complexity in the fields' inheritance
84
+ * Improvement: All HTML 5 input types (week, month, etc.) are supported
85
+ * Improvement: Optimize the_value function, use recursive call to reduce nested loop. Sub-fields need to define format_single_value only.
86
+ * Improvement: Use 1 single localization file for jQuery date picker for simplicity
87
+ * Improvement: Add support for custom marker for map field (param `marker_icon`) in rwmb_meta function
88
+ * Improvement: Add `limit` option for media fields in `rwmb_meta` function when retrieving meta value.
89
+ * Improvement: Add `rwmb_option_label` filter for choice fields (user, post, taxonomy) so users can choose which object field is used as label
90
+ * Improvement: Use `WP_User_Query` for user field which supports more options for querying
91
+ * Improvement: Optimize code for oembed, also use esc_html__ for better security
92
+ * Improvement: Compatibility with Meta Box Geolocation
93
+ * Fix: Fix first option is auto selected in select_advanced field.
94
+ * Fix: Fix clone issue for color in Meta Box Group extension.
95
+ * Fix: Fix clone issue for image advanced in Meta Box Group extension.
96
+ * Fix: Fix not parsing $args to array in helper functions.
97
+
98
  = 4.8.6 =
99
  * Improvement: Edit link on media items now opens edit modal
100
  * Improvement: Refresh map when sorting meta boxes.