Version Description
- Bug fix: show full size image after upload if thumbnail is not available
- Bug fix: new added file not shown
- Bug fix: issue with color field disappearing
- Bug fix:
max_file_upload
now works for normalfile
&image
as well - Bug fix: problem with uploading with the advanced fields
- Bug fix: file & image advanced not saving
- Bug fix:
select_advanced
cloning issue - Bug fix:
plupload_image
ordering - Improvement: add
divider
,heading
,button
,range
,oembed
,email
,post
fields - Improvement: translation for file & image fields
- Improvement: add option
default_hidden
to hide meta box by default - Improvement: allow to have multiple maps on the same page
- Improvement: file and image advanced now use Underscore.js
- Improvement:
slider
filed now hasprefix
andsuffix
for text labels andjs_options
for more JS options - Improvement: WYSIWYS can bypass the
wpautop
usingraw
parameter - Improvement:
color
field now supports new color picker in WP 3.5 - Improvement: add
ID
to results returned byrwmb_meta
when getting meta value of file & image - Improvement: auto use localized version for date & time fields
- Improvement: add
timestamp
option to save the datetime as unix timestamp internally - Improvement: add
autosave
option for meta box - Improvement: add
force_delete
option for file and image field - And lots of changes and improvements
Download this release
Release Info
Developer | rilwis |
Plugin | Meta Box |
Version | 4.3 |
Comparing to | |
See all releases |
Code changes from version 4.2.4 to 4.3
- css/divider.css +7 -0
- css/file.css +35 -0
- css/heading.css +12 -0
- css/image.css +19 -2
- css/range.css +5 -0
- css/slider.css +13 -0
- css/style.css +2 -5
- demo/all-custom-post-types.php +3 -3
- demo/better-include.php +3 -3
- demo/date-time-js-options.php +8 -8
- demo/demo.php +149 -41
- demo/force-delete.php +5 -5
- demo/include-by-ID-or-page-template.php +2 -2
- demo/map.php +4 -4
- inc/classes/meta-box.php +755 -669
- inc/fields/button.php +40 -0
- inc/fields/color.php +2 -2
- inc/fields/date.php +14 -3
- inc/fields/datetime.php +76 -9
- inc/fields/divider.php +47 -0
- inc/fields/email.php +48 -0
- inc/fields/file-advanced.php +121 -0
- inc/fields/file.php +98 -32
- inc/fields/heading.php +50 -0
- inc/fields/image-advanced.php +129 -0
- inc/fields/image.php +27 -19
- inc/fields/map.php +8 -3
- inc/fields/oembed.php +98 -0
- inc/fields/password.php +4 -17
- inc/fields/plupload-image.php +74 -58
- inc/fields/post.php +152 -0
- inc/fields/range.php +84 -0
- inc/fields/select-advanced.php +79 -88
- inc/fields/select.php +36 -14
- inc/fields/slider.php +31 -8
- inc/fields/taxonomy.php +261 -259
- inc/fields/text-list.php +106 -0
- inc/fields/text.php +31 -2
- inc/fields/thickbox-image.php +2 -2
- inc/fields/time.php +6 -1
- inc/fields/url.php +47 -49
- inc/fields/wysiwyg.php +2 -1
- inc/helpers.php +2 -0
- js/autosave.js +16 -0
- js/clone.js +8 -20
- js/color.js +28 -20
- js/date.js +7 -10
- js/datetime.js +8 -11
- js/file-advanced.js +83 -0
- js/file.js +63 -12
- js/image-advanced.js +83 -0
- js/image.js +5 -5
- js/jquery.validate.min.js +2 -4
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-af.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar-DZ.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-az.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-be.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bg.js +24 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bs.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ca.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cs.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cy-GB.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-da.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-de.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-el.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-AU.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-GB.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-NZ.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eo.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-es.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-et.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eu.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fa.js +59 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fi.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fo.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CA.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CH.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr.js +25 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-gl.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-he.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hi.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hr.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hu.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hy.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-id.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-is.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-it.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ja.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ka.js +21 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-kk.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-km.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ko.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ky.js +24 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lb.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lt.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lv.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-mk.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ml.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ms.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nb.js +22 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl-BE.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nn.js +22 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-no.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pl.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt-BR.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt.js +22 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-rm.js +21 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ro.js +26 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ru.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sk.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sl.js +24 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sq.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr-SR.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sv.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ta.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-th.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tj.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tr.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-uk.js +24 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-vi.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-CN.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-HK.js +23 -0
- js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-TW.js +23 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-af.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-bg.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ca.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-cs.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-de.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-el.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-es.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-et.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-eu.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-fi.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-fr.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-gl.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-he.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-hu.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-id.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-it.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ja.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ko.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-lt.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-nl.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-no.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pl.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pt-BR.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pt.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ro.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ru.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-sk.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-sv.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-th.js +17 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-tr.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-uk.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-vi.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-zh-CN.js +20 -0
- js/jqueryui/timepicker-i18n/jquery-ui-timepicker-zh-TW.js +20 -0
- js/map.js +182 -119
- js/oembed.js +28 -0
- js/plupload-image.js +50 -93
- js/select-advanced.js +9 -12
- js/slider.js +22 -40
- js/time.js +8 -11
- lang/de_DE.mo +0 -0
- lang/de_DE.po +96 -77
- lang/default.mo +0 -0
- lang/default.po +307 -47
- lang/nl.mo +0 -0
- lang/nl.po +130 -0
- lang/vi.mo +0 -0
- lang/vi.po +337 -57
- meta-box.php +2 -2
- readme.txt +36 -2
css/divider.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* =Styles for 'divider' field
|
2 |
+
-------------------------------------------------------------- */
|
3 |
+
|
4 |
+
.rwmb-divider-wrapper hr {
|
5 |
+
border: none;
|
6 |
+
border-top: 1px solid #E6E6E6;
|
7 |
+
}
|
css/file.css
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
/* CSS Document */
|
3 |
+
|
4 |
+
.rwmb-file li{
|
5 |
+
width: 250px;
|
6 |
+
margin:0 10px 10px 0;;
|
7 |
+
}
|
8 |
+
.rwmb-file .rwmb-icon {
|
9 |
+
width: 60px;
|
10 |
+
text-align:center;
|
11 |
+
vertical-align:middle;
|
12 |
+
overflow: hidden;
|
13 |
+
}
|
14 |
+
.rwmb-file .rwmb-icon img{
|
15 |
+
max-height: 60px;
|
16 |
+
max-width: 60px;
|
17 |
+
}
|
18 |
+
.rwmb-file .rwmb-info {
|
19 |
+
width: 180px;
|
20 |
+
vertical-align:top;
|
21 |
+
overflow:hidden;
|
22 |
+
}
|
23 |
+
.rwmb-file .rwmb-info p {
|
24 |
+
margin:.1em 0;
|
25 |
+
}
|
26 |
+
.rwmb-file .rwmb-info a {
|
27 |
+
font-weight:bold;
|
28 |
+
text-decoration:none;
|
29 |
+
}
|
30 |
+
.rwmb-file li, .rwmb-file .rwmb-icon, .rwmb-file .rwmb-info {
|
31 |
+
display:inline-block;
|
32 |
+
}
|
33 |
+
.rwmb-file .rwmb-icon, .rwmb-file .rwmb-info {
|
34 |
+
margin:0 0 2px 2px;
|
35 |
+
}
|
css/heading.css
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* =Styles for 'heading' field
|
2 |
+
-------------------------------------------------------------- */
|
3 |
+
|
4 |
+
.rwmb-heading-wrapper h4 {
|
5 |
+
display: block;
|
6 |
+
font-size: .75rem;
|
7 |
+
line-height: 1.4;
|
8 |
+
border-bottom: 1px solid rgb(230, 230, 230);
|
9 |
+
text-transform: uppercase;
|
10 |
+
padding: .75rem 0 .375rem;
|
11 |
+
margin: 0 0 6px;
|
12 |
+
}
|
css/image.css
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
width: 150px;
|
9 |
height: 150px;
|
10 |
text-align: center;
|
11 |
-
border:
|
12 |
cursor: move;
|
13 |
position: relative;
|
14 |
}
|
@@ -20,12 +20,29 @@
|
|
20 |
color: #fff;
|
21 |
font-weight: bold;
|
22 |
background: #000;
|
|
|
23 |
position: absolute;
|
24 |
-
|
25 |
right: 0;
|
26 |
padding: 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
|
|
28 |
.rwmb-image-bar a {
|
29 |
color: #fff;
|
30 |
font-weight: bold;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
8 |
width: 150px;
|
9 |
height: 150px;
|
10 |
text-align: center;
|
11 |
+
border: 2px solid #ccc;
|
12 |
cursor: move;
|
13 |
position: relative;
|
14 |
}
|
20 |
color: #fff;
|
21 |
font-weight: bold;
|
22 |
background: #000;
|
23 |
+
background: rgba(0, 0, 0, .5);
|
24 |
position: absolute;
|
25 |
+
top: 0;
|
26 |
right: 0;
|
27 |
padding: 5px;
|
28 |
+
display:none;
|
29 |
+
text-align: center;
|
30 |
+
vertical-align:middle;
|
31 |
+
}
|
32 |
+
li:hover .rwmb-image-bar{
|
33 |
+
display:block;
|
34 |
}
|
35 |
+
|
36 |
.rwmb-image-bar a {
|
37 |
color: #fff;
|
38 |
font-weight: bold;
|
39 |
+
text-decoration:none;
|
40 |
+
text-align: center;
|
41 |
+
vertical-align:inherit;
|
42 |
+
}
|
43 |
+
|
44 |
+
.rwmb-image-bar a.rwmb-delete-file {
|
45 |
+
font-weight:lighter;
|
46 |
+
font-size:23px;
|
47 |
+
width:18px;
|
48 |
}
|
css/range.css
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
input[type="range"] {
|
2 |
+
-webkit-border-radius: 2px;
|
3 |
+
border-radius: 2px;
|
4 |
+
border: 1px solid #dfdfdf;
|
5 |
+
}
|
css/slider.css
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rwmb-slider {
|
2 |
+
display: inline-block;
|
3 |
+
vertical-align: middle;
|
4 |
+
width: 50%;
|
5 |
+
}
|
6 |
+
.rwmb-slider-value-label {
|
7 |
+
margin-left: 10px;
|
8 |
+
vertical-align: middle;
|
9 |
+
}
|
10 |
+
/* Fix slider handle being visible through jQuery panel */
|
11 |
+
.ui-slider .ui-slider-handle {
|
12 |
+
z-index: 1;
|
13 |
+
}
|
css/style.css
CHANGED
@@ -12,12 +12,9 @@
|
|
12 |
.rwmb-label {
|
13 |
width: 24%;
|
14 |
}
|
15 |
-
.rwmb-label.required {
|
16 |
-
font-weight: bold;
|
17 |
-
}
|
18 |
-
.rwmb-label.required > span
|
19 |
-
{
|
20 |
color: #c00;
|
|
|
21 |
}
|
22 |
|
23 |
/* 75% if field has label, 100% if no label */
|
12 |
.rwmb-label {
|
13 |
width: 24%;
|
14 |
}
|
15 |
+
.rwmb-label.required > span {
|
|
|
|
|
|
|
|
|
16 |
color: #c00;
|
17 |
+
font-weight: bold;
|
18 |
}
|
19 |
|
20 |
/* 75% if field has label, 100% if no label */
|
demo/all-custom-post-types.php
CHANGED
@@ -17,12 +17,12 @@ function YOUR_PREFIX_register_meta_boxes()
|
|
17 |
// 1st meta box
|
18 |
$meta_boxes[] = array(
|
19 |
'id' => 'personal',
|
20 |
-
'title' => 'Personal Information',
|
21 |
'pages' => $post_types,
|
22 |
|
23 |
'fields' => array(
|
24 |
array(
|
25 |
-
'name' => 'Full name',
|
26 |
'id' => $prefix . 'fname',
|
27 |
'type' => 'text',
|
28 |
),
|
@@ -35,4 +35,4 @@ function YOUR_PREFIX_register_meta_boxes()
|
|
35 |
{
|
36 |
new RW_Meta_Box( $meta_box );
|
37 |
}
|
38 |
-
}
|
17 |
// 1st meta box
|
18 |
$meta_boxes[] = array(
|
19 |
'id' => 'personal',
|
20 |
+
'title' => __( 'Personal Information', 'rwmb' ),
|
21 |
'pages' => $post_types,
|
22 |
|
23 |
'fields' => array(
|
24 |
array(
|
25 |
+
'name' => __( 'Full name', 'rwmb' ),
|
26 |
'id' => $prefix . 'fname',
|
27 |
'type' => 'text',
|
28 |
),
|
35 |
{
|
36 |
new RW_Meta_Box( $meta_box );
|
37 |
}
|
38 |
+
}
|
demo/better-include.php
CHANGED
@@ -13,10 +13,10 @@ global $meta_boxes;
|
|
13 |
$meta_boxes = array();
|
14 |
|
15 |
$meta_boxes[] = array(
|
16 |
-
'title' => 'Meta Box Title',
|
17 |
'fields' => array(
|
18 |
array(
|
19 |
-
'name' => 'Your images',
|
20 |
'id' => "{$prefix}img",
|
21 |
'type' => 'plupload_image',
|
22 |
),
|
@@ -116,4 +116,4 @@ function rw_maybe_include( $conditions ) {
|
|
116 |
|
117 |
// If no condition matched
|
118 |
return false;
|
119 |
-
}
|
13 |
$meta_boxes = array();
|
14 |
|
15 |
$meta_boxes[] = array(
|
16 |
+
'title' => __( 'Meta Box Title', 'rwmb' ),
|
17 |
'fields' => array(
|
18 |
array(
|
19 |
+
'name' => __( 'Your images', 'rwmb' ),
|
20 |
'id' => "{$prefix}img",
|
21 |
'type' => 'plupload_image',
|
22 |
),
|
116 |
|
117 |
// If no condition matched
|
118 |
return false;
|
119 |
+
}
|
demo/date-time-js-options.php
CHANGED
@@ -8,26 +8,26 @@ function YOUR_PREFIX_register_meta_boxes()
|
|
8 |
|
9 |
$prefix = 'YOUR_PREFIX_';
|
10 |
$meta_box = array(
|
11 |
-
'title' => 'Date Time Picker With JS Options',
|
12 |
|
13 |
'fields' => array(
|
14 |
array(
|
15 |
-
'name' => 'Date',
|
16 |
'id' => $prefix . 'date',
|
17 |
'type' => 'date',
|
18 |
|
19 |
// jQuery date picker options. See here http://jqueryui.com/demos/datepicker
|
20 |
'js_options' => array(
|
21 |
-
'appendText' => '(yyyy-mm-dd)',
|
22 |
'autoSize' => true,
|
23 |
-
'buttonText' => 'Select Date',
|
24 |
-
'dateFormat' => 'yy-mm-dd',
|
25 |
'numberOfMonths' => 2,
|
26 |
'showButtonPanel' => true,
|
27 |
),
|
28 |
),
|
29 |
array(
|
30 |
-
'name' => 'Datetime',
|
31 |
'id' => $prefix . 'datetime',
|
32 |
'type' => 'datetime',
|
33 |
|
@@ -38,7 +38,7 @@ function YOUR_PREFIX_register_meta_boxes()
|
|
38 |
),
|
39 |
),
|
40 |
array(
|
41 |
-
'name' => 'Time',
|
42 |
'id' => $prefix . 'time',
|
43 |
'type' => 'time',
|
44 |
|
@@ -53,4 +53,4 @@ function YOUR_PREFIX_register_meta_boxes()
|
|
53 |
);
|
54 |
|
55 |
new RW_Meta_Box( $meta_box );
|
56 |
-
}
|
8 |
|
9 |
$prefix = 'YOUR_PREFIX_';
|
10 |
$meta_box = array(
|
11 |
+
'title' => __( 'Date Time Picker With JS Options', 'rwmb' ),
|
12 |
|
13 |
'fields' => array(
|
14 |
array(
|
15 |
+
'name' => __( 'Date', 'rwmb' ),
|
16 |
'id' => $prefix . 'date',
|
17 |
'type' => 'date',
|
18 |
|
19 |
// jQuery date picker options. See here http://jqueryui.com/demos/datepicker
|
20 |
'js_options' => array(
|
21 |
+
'appendText' => __( '(yyyy-mm-dd)', 'rwmb' ),
|
22 |
'autoSize' => true,
|
23 |
+
'buttonText' => __( 'Select Date', 'rwmb' ),
|
24 |
+
'dateFormat' => __( 'yy-mm-dd', 'rwmb' ),
|
25 |
'numberOfMonths' => 2,
|
26 |
'showButtonPanel' => true,
|
27 |
),
|
28 |
),
|
29 |
array(
|
30 |
+
'name' => __( 'Datetime', 'rwmb' ),
|
31 |
'id' => $prefix . 'datetime',
|
32 |
'type' => 'datetime',
|
33 |
|
38 |
),
|
39 |
),
|
40 |
array(
|
41 |
+
'name' => __( 'Time', 'rwmb' ),
|
42 |
'id' => $prefix . 'time',
|
43 |
'type' => 'time',
|
44 |
|
53 |
);
|
54 |
|
55 |
new RW_Meta_Box( $meta_box );
|
56 |
+
}
|
demo/demo.php
CHANGED
@@ -31,7 +31,7 @@ $meta_boxes[] = array(
|
|
31 |
'id' => 'standard',
|
32 |
|
33 |
// Meta box title - Will appear at the drag and drop handle bar. Required.
|
34 |
-
'title' => 'Standard Fields',
|
35 |
|
36 |
// Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
|
37 |
'pages' => array( 'post', 'page' ),
|
@@ -42,25 +42,28 @@ $meta_boxes[] = array(
|
|
42 |
// Order of meta box: high (default), low. Optional.
|
43 |
'priority' => 'high',
|
44 |
|
|
|
|
|
|
|
45 |
// List of meta fields
|
46 |
'fields' => array(
|
47 |
// TEXT
|
48 |
array(
|
49 |
// Field name - Will be used as label
|
50 |
-
'name' => 'Text',
|
51 |
// Field ID, i.e. the meta key
|
52 |
'id' => "{$prefix}text",
|
53 |
// Field description (optional)
|
54 |
-
'desc' => 'Text description',
|
55 |
'type' => 'text',
|
56 |
// Default value (optional)
|
57 |
-
'std' => 'Default text value',
|
58 |
// CLONES: Add to make the field cloneable (i.e. have multiple value)
|
59 |
'clone' => true,
|
60 |
),
|
61 |
// CHECKBOX
|
62 |
array(
|
63 |
-
'name' => 'Checkbox',
|
64 |
'id' => "{$prefix}checkbox",
|
65 |
'type' => 'checkbox',
|
66 |
// Value can be 0 or 1
|
@@ -68,50 +71,51 @@ $meta_boxes[] = array(
|
|
68 |
),
|
69 |
// RADIO BUTTONS
|
70 |
array(
|
71 |
-
'name' => 'Radio',
|
72 |
'id' => "{$prefix}radio",
|
73 |
'type' => 'radio',
|
74 |
// Array of 'value' => 'Label' pairs for radio options.
|
75 |
// Note: the 'value' is stored in meta field, not the 'Label'
|
76 |
'options' => array(
|
77 |
-
'value1' => 'Label1',
|
78 |
-
'value2' => 'Label2',
|
79 |
),
|
80 |
),
|
81 |
// SELECT BOX
|
82 |
array(
|
83 |
-
'name' => 'Select',
|
84 |
'id' => "{$prefix}select",
|
85 |
'type' => 'select',
|
86 |
// Array of 'value' => 'Label' pairs for select box
|
87 |
'options' => array(
|
88 |
-
'value1' => 'Label1',
|
89 |
-
'value2' => 'Label2',
|
90 |
),
|
91 |
// Select multiple values, optional. Default is false.
|
92 |
'multiple' => false,
|
|
|
93 |
),
|
94 |
// HIDDEN
|
95 |
array(
|
96 |
'id' => "{$prefix}hidden",
|
97 |
'type' => 'hidden',
|
98 |
// Hidden field must have predefined value
|
99 |
-
'std' => 'Hidden value',
|
100 |
),
|
101 |
// PASSWORD
|
102 |
array(
|
103 |
-
'name' => 'Password',
|
104 |
'id' => "{$prefix}password",
|
105 |
'type' => 'password',
|
106 |
),
|
107 |
// TEXTAREA
|
108 |
array(
|
109 |
-
'name' => 'Textarea',
|
110 |
-
'desc' => 'Textarea description',
|
111 |
'id' => "{$prefix}textarea",
|
112 |
'type' => 'textarea',
|
113 |
-
'cols' =>
|
114 |
-
'rows' =>
|
115 |
),
|
116 |
),
|
117 |
'validation' => array(
|
@@ -124,8 +128,8 @@ $meta_boxes[] = array(
|
|
124 |
// optional override of default jquery.validate messages
|
125 |
'messages' => array(
|
126 |
"{$prefix}password" => array(
|
127 |
-
'required' => 'Password is required',
|
128 |
-
'minlength' => 'Password must be at least 7 characters',
|
129 |
),
|
130 |
)
|
131 |
)
|
@@ -133,12 +137,34 @@ $meta_boxes[] = array(
|
|
133 |
|
134 |
// 2nd meta box
|
135 |
$meta_boxes[] = array(
|
136 |
-
'title' => 'Advanced Fields',
|
137 |
|
138 |
'fields' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
// NUMBER
|
140 |
array(
|
141 |
-
'name' => 'Number',
|
142 |
'id' => "{$prefix}number",
|
143 |
'type' => 'number',
|
144 |
|
@@ -147,14 +173,14 @@ $meta_boxes[] = array(
|
|
147 |
),
|
148 |
// DATE
|
149 |
array(
|
150 |
-
'name' => 'Date picker',
|
151 |
'id' => "{$prefix}date",
|
152 |
'type' => 'date',
|
153 |
|
154 |
-
// jQuery date picker options. See here http://jqueryui.com/
|
155 |
'js_options' => array(
|
156 |
-
'appendText' => '(yyyy-mm-dd)',
|
157 |
-
'dateFormat' => 'yy-mm-dd',
|
158 |
'changeMonth' => true,
|
159 |
'changeYear' => true,
|
160 |
'showButtonPanel' => true,
|
@@ -162,11 +188,13 @@ $meta_boxes[] = array(
|
|
162 |
),
|
163 |
// DATETIME
|
164 |
array(
|
165 |
-
'name' => 'Datetime picker',
|
166 |
'id' => $prefix . 'datetime',
|
167 |
'type' => 'datetime',
|
168 |
|
169 |
-
// jQuery datetime picker options.
|
|
|
|
|
170 |
'js_options' => array(
|
171 |
'stepMinute' => 15,
|
172 |
'showTimepicker' => true,
|
@@ -174,11 +202,13 @@ $meta_boxes[] = array(
|
|
174 |
),
|
175 |
// TIME
|
176 |
array(
|
177 |
-
'name' => 'Time picker',
|
178 |
'id' => $prefix . 'time',
|
179 |
'type' => 'time',
|
180 |
|
181 |
-
// jQuery datetime picker options.
|
|
|
|
|
182 |
'js_options' => array(
|
183 |
'stepMinute' => 5,
|
184 |
'showSecond' => true,
|
@@ -187,24 +217,58 @@ $meta_boxes[] = array(
|
|
187 |
),
|
188 |
// COLOR
|
189 |
array(
|
190 |
-
'name' => 'Color picker',
|
191 |
'id' => "{$prefix}color",
|
192 |
'type' => 'color',
|
193 |
),
|
194 |
// CHECKBOX LIST
|
195 |
array(
|
196 |
-
'name' => 'Checkbox list',
|
197 |
'id' => "{$prefix}checkbox_list",
|
198 |
'type' => 'checkbox_list',
|
199 |
// Options of checkboxes, in format 'value' => 'Label'
|
200 |
'options' => array(
|
201 |
-
'value1' => 'Label1',
|
202 |
-
'value2' => 'Label2',
|
203 |
),
|
204 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
// TAXONOMY
|
206 |
array(
|
207 |
-
'name' => 'Taxonomy',
|
208 |
'id' => "{$prefix}taxonomy",
|
209 |
'type' => 'taxonomy',
|
210 |
'options' => array(
|
@@ -216,12 +280,30 @@ $meta_boxes[] = array(
|
|
216 |
'args' => array()
|
217 |
),
|
218 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
// WYSIWYG/RICH TEXT EDITOR
|
220 |
array(
|
221 |
-
'name' => 'WYSIWYG / Rich Text Editor',
|
222 |
'id' => "{$prefix}wysiwyg",
|
223 |
'type' => 'wysiwyg',
|
224 |
-
'
|
|
|
|
|
225 |
|
226 |
// Editor settings, see wp_editor() function: look4wp.com/wp_editor
|
227 |
'options' => array(
|
@@ -230,31 +312,57 @@ $meta_boxes[] = array(
|
|
230 |
'media_buttons' => false,
|
231 |
),
|
232 |
),
|
|
|
|
|
|
|
|
|
233 |
// FILE UPLOAD
|
234 |
array(
|
235 |
-
'name' => 'File Upload',
|
236 |
'id' => "{$prefix}file",
|
237 |
'type' => 'file',
|
238 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
// IMAGE UPLOAD
|
240 |
array(
|
241 |
-
'name' => 'Image Upload',
|
242 |
'id' => "{$prefix}image",
|
243 |
'type' => 'image',
|
244 |
),
|
245 |
// THICKBOX IMAGE UPLOAD (WP 3.3+)
|
246 |
array(
|
247 |
-
'name' => '
|
248 |
'id' => "{$prefix}thickbox",
|
249 |
'type' => 'thickbox_image',
|
250 |
),
|
251 |
// PLUPLOAD IMAGE UPLOAD (WP 3.3+)
|
252 |
array(
|
253 |
-
'name' => 'Plupload Image Upload',
|
254 |
'id' => "{$prefix}plupload",
|
255 |
'type' => 'plupload_image',
|
256 |
'max_file_uploads' => 4,
|
257 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
)
|
259 |
);
|
260 |
|
@@ -280,4 +388,4 @@ function YOUR_PREFIX_register_meta_boxes()
|
|
280 |
// Hook to 'admin_init' to make sure the meta box class is loaded before
|
281 |
// (in case using the meta box class in another plugin)
|
282 |
// This is also helpful for some conditionals like checking page template, categories, etc.
|
283 |
-
add_action( 'admin_init', 'YOUR_PREFIX_register_meta_boxes' );
|
31 |
'id' => 'standard',
|
32 |
|
33 |
// Meta box title - Will appear at the drag and drop handle bar. Required.
|
34 |
+
'title' => __( 'Standard Fields', 'rwmb' ),
|
35 |
|
36 |
// Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
|
37 |
'pages' => array( 'post', 'page' ),
|
42 |
// Order of meta box: high (default), low. Optional.
|
43 |
'priority' => 'high',
|
44 |
|
45 |
+
// Auto save: true, false (default). Optional.
|
46 |
+
'autosave' => true,
|
47 |
+
|
48 |
// List of meta fields
|
49 |
'fields' => array(
|
50 |
// TEXT
|
51 |
array(
|
52 |
// Field name - Will be used as label
|
53 |
+
'name' => __( 'Text', 'rwmb' ),
|
54 |
// Field ID, i.e. the meta key
|
55 |
'id' => "{$prefix}text",
|
56 |
// Field description (optional)
|
57 |
+
'desc' => __( 'Text description', 'rwmb' ),
|
58 |
'type' => 'text',
|
59 |
// Default value (optional)
|
60 |
+
'std' => __( 'Default text value', 'rwmb' ),
|
61 |
// CLONES: Add to make the field cloneable (i.e. have multiple value)
|
62 |
'clone' => true,
|
63 |
),
|
64 |
// CHECKBOX
|
65 |
array(
|
66 |
+
'name' => __( 'Checkbox', 'rwmb' ),
|
67 |
'id' => "{$prefix}checkbox",
|
68 |
'type' => 'checkbox',
|
69 |
// Value can be 0 or 1
|
71 |
),
|
72 |
// RADIO BUTTONS
|
73 |
array(
|
74 |
+
'name' => __( 'Radio', 'rwmb' ),
|
75 |
'id' => "{$prefix}radio",
|
76 |
'type' => 'radio',
|
77 |
// Array of 'value' => 'Label' pairs for radio options.
|
78 |
// Note: the 'value' is stored in meta field, not the 'Label'
|
79 |
'options' => array(
|
80 |
+
'value1' => __( 'Label1', 'rwmb' ),
|
81 |
+
'value2' => __( 'Label2', 'rwmb' ),
|
82 |
),
|
83 |
),
|
84 |
// SELECT BOX
|
85 |
array(
|
86 |
+
'name' => __( 'Select', 'rwmb' ),
|
87 |
'id' => "{$prefix}select",
|
88 |
'type' => 'select',
|
89 |
// Array of 'value' => 'Label' pairs for select box
|
90 |
'options' => array(
|
91 |
+
'value1' => __( 'Label1', 'rwmb' ),
|
92 |
+
'value2' => __( 'Label2', 'rwmb' ),
|
93 |
),
|
94 |
// Select multiple values, optional. Default is false.
|
95 |
'multiple' => false,
|
96 |
+
'std' => __( 'Select an Item', 'rwmb' ),
|
97 |
),
|
98 |
// HIDDEN
|
99 |
array(
|
100 |
'id' => "{$prefix}hidden",
|
101 |
'type' => 'hidden',
|
102 |
// Hidden field must have predefined value
|
103 |
+
'std' => __( 'Hidden value', 'rwmb' ),
|
104 |
),
|
105 |
// PASSWORD
|
106 |
array(
|
107 |
+
'name' => __( 'Password', 'rwmb' ),
|
108 |
'id' => "{$prefix}password",
|
109 |
'type' => 'password',
|
110 |
),
|
111 |
// TEXTAREA
|
112 |
array(
|
113 |
+
'name' => __( 'Textarea', 'rwmb' ),
|
114 |
+
'desc' => __( 'Textarea description', 'rwmb' ),
|
115 |
'id' => "{$prefix}textarea",
|
116 |
'type' => 'textarea',
|
117 |
+
'cols' => 20,
|
118 |
+
'rows' => 3,
|
119 |
),
|
120 |
),
|
121 |
'validation' => array(
|
128 |
// optional override of default jquery.validate messages
|
129 |
'messages' => array(
|
130 |
"{$prefix}password" => array(
|
131 |
+
'required' => __( 'Password is required', 'rwmb' ),
|
132 |
+
'minlength' => __( 'Password must be at least 7 characters', 'rwmb' ),
|
133 |
),
|
134 |
)
|
135 |
)
|
137 |
|
138 |
// 2nd meta box
|
139 |
$meta_boxes[] = array(
|
140 |
+
'title' => __( 'Advanced Fields', 'rwmb' ),
|
141 |
|
142 |
'fields' => array(
|
143 |
+
// HEADING
|
144 |
+
array(
|
145 |
+
'type' => 'heading',
|
146 |
+
'name' => __( 'Heading', 'rwmb' ),
|
147 |
+
),
|
148 |
+
// SLIDER
|
149 |
+
array(
|
150 |
+
'name' => __( 'Slider', 'rwmb' ),
|
151 |
+
'id' => "{$prefix}slider",
|
152 |
+
'type' => 'slider',
|
153 |
+
|
154 |
+
// Text labels displayed before and after value
|
155 |
+
'prefix' => __( '$', 'rwmb' ),
|
156 |
+
'suffix' => __( ' USD', 'rwmb' ),
|
157 |
+
|
158 |
+
// jQuery UI slider options. See here http://api.jqueryui.com/slider/
|
159 |
+
'js_options' => array(
|
160 |
+
'min' => 10,
|
161 |
+
'max' => 255,
|
162 |
+
'step' => 5,
|
163 |
+
),
|
164 |
+
),
|
165 |
// NUMBER
|
166 |
array(
|
167 |
+
'name' => __( 'Number', 'rwmb' ),
|
168 |
'id' => "{$prefix}number",
|
169 |
'type' => 'number',
|
170 |
|
173 |
),
|
174 |
// DATE
|
175 |
array(
|
176 |
+
'name' => __( 'Date picker', 'rwmb' ),
|
177 |
'id' => "{$prefix}date",
|
178 |
'type' => 'date',
|
179 |
|
180 |
+
// jQuery date picker options. See here http://api.jqueryui.com/datepicker
|
181 |
'js_options' => array(
|
182 |
+
'appendText' => __( '(yyyy-mm-dd)', 'rwmb' ),
|
183 |
+
'dateFormat' => __( 'yy-mm-dd', 'rwmb' ),
|
184 |
'changeMonth' => true,
|
185 |
'changeYear' => true,
|
186 |
'showButtonPanel' => true,
|
188 |
),
|
189 |
// DATETIME
|
190 |
array(
|
191 |
+
'name' => __( 'Datetime picker', 'rwmb' ),
|
192 |
'id' => $prefix . 'datetime',
|
193 |
'type' => 'datetime',
|
194 |
|
195 |
+
// jQuery datetime picker options.
|
196 |
+
// For date options, see here http://api.jqueryui.com/datepicker
|
197 |
+
// For time options, see here http://trentrichardson.com/examples/timepicker/
|
198 |
'js_options' => array(
|
199 |
'stepMinute' => 15,
|
200 |
'showTimepicker' => true,
|
202 |
),
|
203 |
// TIME
|
204 |
array(
|
205 |
+
'name' => __( 'Time picker', 'rwmb' ),
|
206 |
'id' => $prefix . 'time',
|
207 |
'type' => 'time',
|
208 |
|
209 |
+
// jQuery datetime picker options.
|
210 |
+
// For date options, see here http://api.jqueryui.com/datepicker
|
211 |
+
// For time options, see here http://trentrichardson.com/examples/timepicker/
|
212 |
'js_options' => array(
|
213 |
'stepMinute' => 5,
|
214 |
'showSecond' => true,
|
217 |
),
|
218 |
// COLOR
|
219 |
array(
|
220 |
+
'name' => __( 'Color picker', 'rwmb' ),
|
221 |
'id' => "{$prefix}color",
|
222 |
'type' => 'color',
|
223 |
),
|
224 |
// CHECKBOX LIST
|
225 |
array(
|
226 |
+
'name' => __( 'Checkbox list', 'rwmb' ),
|
227 |
'id' => "{$prefix}checkbox_list",
|
228 |
'type' => 'checkbox_list',
|
229 |
// Options of checkboxes, in format 'value' => 'Label'
|
230 |
'options' => array(
|
231 |
+
'value1' => __( 'Label1', 'rwmb' ),
|
232 |
+
'value2' => __( 'Label2', 'rwmb' ),
|
233 |
),
|
234 |
),
|
235 |
+
// EMAIL
|
236 |
+
array(
|
237 |
+
'name' => __( 'Email', 'rwmb' ),
|
238 |
+
'id' => "{$prefix}email",
|
239 |
+
'desc' => __( 'Email description', 'rwmb' ),
|
240 |
+
'type' => 'email',
|
241 |
+
'std' => 'name@email.com',
|
242 |
+
),
|
243 |
+
// RANGE
|
244 |
+
array(
|
245 |
+
'name' => __( 'Range', 'rwmb' ),
|
246 |
+
'id' => "{$prefix}range",
|
247 |
+
'desc' => __( 'Range description', 'rwmb' ),
|
248 |
+
'type' => 'range',
|
249 |
+
'min' => 0,
|
250 |
+
'max' => 100,
|
251 |
+
'step' => 5,
|
252 |
+
'std' => 0,
|
253 |
+
),
|
254 |
+
// URL
|
255 |
+
array(
|
256 |
+
'name' => __( 'URL', 'rwmb' ),
|
257 |
+
'id' => "{$prefix}url",
|
258 |
+
'desc' => __( 'URL description', 'rwmb' ),
|
259 |
+
'type' => 'url',
|
260 |
+
'std' => 'http://google.com',
|
261 |
+
),
|
262 |
+
// OEMBED
|
263 |
+
array(
|
264 |
+
'name' => __( 'oEmbed', 'rwmb' ),
|
265 |
+
'id' => "{$prefix}oembed",
|
266 |
+
'desc' => __( 'oEmbed description', 'rwmb' ),
|
267 |
+
'type' => 'oembed',
|
268 |
+
),
|
269 |
// TAXONOMY
|
270 |
array(
|
271 |
+
'name' => __( 'Taxonomy', 'rwmb' ),
|
272 |
'id' => "{$prefix}taxonomy",
|
273 |
'type' => 'taxonomy',
|
274 |
'options' => array(
|
280 |
'args' => array()
|
281 |
),
|
282 |
),
|
283 |
+
// POST
|
284 |
+
array(
|
285 |
+
'name' => __( 'Posts (Pages)', 'rwmb' ),
|
286 |
+
'id' => "{$prefix}pages",
|
287 |
+
'type' => 'post',
|
288 |
+
|
289 |
+
// Post type
|
290 |
+
'post_type' => 'page',
|
291 |
+
// Field type, either 'select' or 'select_advanced' (default)
|
292 |
+
'field_type' => 'select_advanced',
|
293 |
+
// Query arguments (optional). No settings means get all published posts
|
294 |
+
'query_args' => array(
|
295 |
+
'post_status' => 'publish',
|
296 |
+
'posts_per_page' => '-1',
|
297 |
+
)
|
298 |
+
),
|
299 |
// WYSIWYG/RICH TEXT EDITOR
|
300 |
array(
|
301 |
+
'name' => __( 'WYSIWYG / Rich Text Editor', 'rwmb' ),
|
302 |
'id' => "{$prefix}wysiwyg",
|
303 |
'type' => 'wysiwyg',
|
304 |
+
// Set the 'raw' parameter to TRUE to prevent data being passed through wpautop() on save
|
305 |
+
'raw' => false,
|
306 |
+
'std' => __( 'WYSIWYG default value', 'rwmb' ),
|
307 |
|
308 |
// Editor settings, see wp_editor() function: look4wp.com/wp_editor
|
309 |
'options' => array(
|
312 |
'media_buttons' => false,
|
313 |
),
|
314 |
),
|
315 |
+
// DIVIDER
|
316 |
+
array(
|
317 |
+
'type' => 'divider',
|
318 |
+
),
|
319 |
// FILE UPLOAD
|
320 |
array(
|
321 |
+
'name' => __( 'File Upload', 'rwmb' ),
|
322 |
'id' => "{$prefix}file",
|
323 |
'type' => 'file',
|
324 |
),
|
325 |
+
// FILE ADVANCED (WP 3.5+)
|
326 |
+
array(
|
327 |
+
'name' => __( 'File Advanced Upload', 'rwmb' ),
|
328 |
+
'id' => "{$prefix}file_advanced",
|
329 |
+
'type' => 'file_advanced',
|
330 |
+
'max_file_uploads' => 4,
|
331 |
+
'mime_type' => 'application,audio,video', // Leave blank for all file types
|
332 |
+
),
|
333 |
// IMAGE UPLOAD
|
334 |
array(
|
335 |
+
'name' => __( 'Image Upload', 'rwmb' ),
|
336 |
'id' => "{$prefix}image",
|
337 |
'type' => 'image',
|
338 |
),
|
339 |
// THICKBOX IMAGE UPLOAD (WP 3.3+)
|
340 |
array(
|
341 |
+
'name' => __( 'Thickbox Image Upload', 'rwmb' ),
|
342 |
'id' => "{$prefix}thickbox",
|
343 |
'type' => 'thickbox_image',
|
344 |
),
|
345 |
// PLUPLOAD IMAGE UPLOAD (WP 3.3+)
|
346 |
array(
|
347 |
+
'name' => __( 'Plupload Image Upload', 'rwmb' ),
|
348 |
'id' => "{$prefix}plupload",
|
349 |
'type' => 'plupload_image',
|
350 |
'max_file_uploads' => 4,
|
351 |
),
|
352 |
+
// IMAGE ADVANCED (WP 3.5+)
|
353 |
+
array(
|
354 |
+
'name' => __( 'Image Advanced Upload', 'rwmb' ),
|
355 |
+
'id' => "{$prefix}imgadv",
|
356 |
+
'type' => 'image_advanced',
|
357 |
+
'max_file_uploads' => 4,
|
358 |
+
),
|
359 |
+
// BUTTON
|
360 |
+
array(
|
361 |
+
'id' => "{$prefix}button",
|
362 |
+
'type' => 'button',
|
363 |
+
'name' => ' ', // Empty name will "align" the button to all field inputs
|
364 |
+
),
|
365 |
+
|
366 |
)
|
367 |
);
|
368 |
|
388 |
// Hook to 'admin_init' to make sure the meta box class is loaded before
|
389 |
// (in case using the meta box class in another plugin)
|
390 |
// This is also helpful for some conditionals like checking page template, categories, etc.
|
391 |
+
add_action( 'admin_init', 'YOUR_PREFIX_register_meta_boxes' );
|
demo/force-delete.php
CHANGED
@@ -8,31 +8,31 @@ function force_delete_register_meta_boxes()
|
|
8 |
$prefix = '';
|
9 |
|
10 |
$meta_box = array(
|
11 |
-
'title' => 'Test Meta Box',
|
12 |
'fields' => array(
|
13 |
// FILE UPLOAD
|
14 |
array(
|
15 |
-
'name' => 'File Upload',
|
16 |
'id' => "{$prefix}file",
|
17 |
'type' => 'file',
|
18 |
'force_delete' => true,
|
19 |
),
|
20 |
// IMAGE UPLOAD
|
21 |
array(
|
22 |
-
'name' => 'Image Upload',
|
23 |
'id' => "{$prefix}image",
|
24 |
'type' => 'image',
|
25 |
),
|
26 |
// THICKBOX IMAGE UPLOAD (WP 3.3+)
|
27 |
array(
|
28 |
-
'name' => '
|
29 |
'id' => "{$prefix}thickbox",
|
30 |
'type' => 'thickbox_image',
|
31 |
'force_delete' => true,
|
32 |
),
|
33 |
// PLUPLOAD IMAGE UPLOAD (WP 3.3+)
|
34 |
array(
|
35 |
-
'name' => 'Plupload Image Upload',
|
36 |
'id' => "{$prefix}plupload",
|
37 |
'type' => 'plupload_image',
|
38 |
'max_file_uploads' => 4,
|
8 |
$prefix = '';
|
9 |
|
10 |
$meta_box = array(
|
11 |
+
'title' => __( 'Test Meta Box', 'rwmb' ),
|
12 |
'fields' => array(
|
13 |
// FILE UPLOAD
|
14 |
array(
|
15 |
+
'name' => __( 'File Upload', 'rwmb' ),
|
16 |
'id' => "{$prefix}file",
|
17 |
'type' => 'file',
|
18 |
'force_delete' => true,
|
19 |
),
|
20 |
// IMAGE UPLOAD
|
21 |
array(
|
22 |
+
'name' => __( 'Image Upload', 'rwmb' ),
|
23 |
'id' => "{$prefix}image",
|
24 |
'type' => 'image',
|
25 |
),
|
26 |
// THICKBOX IMAGE UPLOAD (WP 3.3+)
|
27 |
array(
|
28 |
+
'name' => __( 'Thickbox Image Upload', 'rwmb' ),
|
29 |
'id' => "{$prefix}thickbox",
|
30 |
'type' => 'thickbox_image',
|
31 |
'force_delete' => true,
|
32 |
),
|
33 |
// PLUPLOAD IMAGE UPLOAD (WP 3.3+)
|
34 |
array(
|
35 |
+
'name' => __( 'Plupload Image Upload', 'rwmb' ),
|
36 |
'id' => "{$prefix}plupload",
|
37 |
'type' => 'plupload_image',
|
38 |
'max_file_uploads' => 4,
|
demo/include-by-ID-or-page-template.php
CHANGED
@@ -5,13 +5,13 @@ global $meta_boxes;
|
|
5 |
$meta_boxes = array();
|
6 |
$meta_boxes[] = array(
|
7 |
'id' => 'any_id',
|
8 |
-
'title' => 'Meta Box Title',
|
9 |
'pages' => array( 'post' ),
|
10 |
'fields' => array(
|
11 |
|
12 |
// IMAGE UPLOAD
|
13 |
array(
|
14 |
-
'name' => 'Your images',
|
15 |
'id' => "{$prefix}img",
|
16 |
'type' => 'plupload_image',
|
17 |
),
|
5 |
$meta_boxes = array();
|
6 |
$meta_boxes[] = array(
|
7 |
'id' => 'any_id',
|
8 |
+
'title' => __( 'Meta Box Title', 'rwmb' ),
|
9 |
'pages' => array( 'post' ),
|
10 |
'fields' => array(
|
11 |
|
12 |
// IMAGE UPLOAD
|
13 |
array(
|
14 |
+
'name' => __( 'Your images', 'rwmb' ),
|
15 |
'id' => "{$prefix}img",
|
16 |
'type' => 'plupload_image',
|
17 |
),
|
demo/map.php
CHANGED
@@ -6,17 +6,17 @@ function test_register_meta_boxes()
|
|
6 |
return;
|
7 |
|
8 |
$meta_box = array(
|
9 |
-
'title' => 'Google Map',
|
10 |
'fields' => array(
|
11 |
array(
|
12 |
'id' => 'address',
|
13 |
-
'name' => 'Address',
|
14 |
'type' => 'text',
|
15 |
-
'std' => 'Hanoi, Vietnam',
|
16 |
),
|
17 |
array(
|
18 |
'id' => 'loc',
|
19 |
-
'name' => 'Location',
|
20 |
'type' => 'map',
|
21 |
'std' => '-6.233406,-35.049906,15', // 'latitude,longitude[,zoom]' (zoom is optional)
|
22 |
'style' => 'width: 500px; height: 500px',
|
6 |
return;
|
7 |
|
8 |
$meta_box = array(
|
9 |
+
'title' => __( 'Google Map', 'rwmb' ),
|
10 |
'fields' => array(
|
11 |
array(
|
12 |
'id' => 'address',
|
13 |
+
'name' => __( 'Address', 'rwmb' ),
|
14 |
'type' => 'text',
|
15 |
+
'std' => __( 'Hanoi, Vietnam', 'rwmb' ),
|
16 |
),
|
17 |
array(
|
18 |
'id' => 'loc',
|
19 |
+
'name' => __( 'Location', 'rwmb' ),
|
20 |
'type' => 'map',
|
21 |
'std' => '-6.233406,-35.049906,15', // 'latitude,longitude[,zoom]' (zoom is optional)
|
22 |
'style' => 'width: 500px; height: 500px',
|
inc/classes/meta-box.php
CHANGED
@@ -1,669 +1,755 @@
|
|
1 |
-
<?php
|
2 |
-
// Prevent loading this file directly
|
3 |
-
defined( 'ABSPATH' ) || exit;
|
4 |
-
|
5 |
-
// Meta Box Class
|
6 |
-
if ( ! class_exists( 'RW_Meta_Box' ) )
|
7 |
-
{
|
8 |
-
/**
|
9 |
-
* A class to rapid develop meta boxes for custom & built in content types
|
10 |
-
* Piggybacks on WordPress
|
11 |
-
*
|
12 |
-
* @author Rilwis
|
13 |
-
* @author Co-Authors @see https://github.com/rilwis/meta-box
|
14 |
-
* @license GNU GPL2+
|
15 |
-
* @package RW Meta Box
|
16 |
-
*/
|
17 |
-
class RW_Meta_Box
|
18 |
-
{
|
19 |
-
/**
|
20 |
-
* Meta box information
|
21 |
-
*/
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Fields information
|
26 |
-
*/
|
27 |
-
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Contains all field types of current meta box
|
31 |
-
*/
|
32 |
-
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Validation information
|
36 |
-
*/
|
37 |
-
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Create meta box based on given data
|
41 |
-
*
|
42 |
-
* @see demo/demo.php file for details
|
43 |
-
*
|
44 |
-
* @param array $meta_box Meta box definition
|
45 |
-
*
|
46 |
-
* @return
|
47 |
-
*/
|
48 |
-
function __construct( $meta_box )
|
49 |
-
{
|
50 |
-
// Run script only in admin area
|
51 |
-
if ( ! is_admin() )
|
52 |
-
return;
|
53 |
-
|
54 |
-
// Assign meta box values to local variables and add it's missed values
|
55 |
-
$this->meta_box = self::normalize( $meta_box );
|
56 |
-
$this->fields = &$this->meta_box['fields'];
|
57 |
-
$this->validation = &$this->meta_box['validation'];
|
58 |
-
|
59 |
-
//
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
{
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
//
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
//
|
97 |
-
$
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
//
|
297 |
-
//
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
if (
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
*
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
//
|
591 |
-
$
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
*
|
608 |
-
*
|
609 |
-
*
|
610 |
-
*
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
$
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Meta Box Class
|
6 |
+
if ( ! class_exists( 'RW_Meta_Box' ) )
|
7 |
+
{
|
8 |
+
/**
|
9 |
+
* A class to rapid develop meta boxes for custom & built in content types
|
10 |
+
* Piggybacks on WordPress
|
11 |
+
*
|
12 |
+
* @author Rilwis
|
13 |
+
* @author Co-Authors @see https://github.com/rilwis/meta-box
|
14 |
+
* @license GNU GPL2+
|
15 |
+
* @package RW Meta Box
|
16 |
+
*/
|
17 |
+
class RW_Meta_Box
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* @var array Meta box information
|
21 |
+
*/
|
22 |
+
public $meta_box;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @var array Fields information
|
26 |
+
*/
|
27 |
+
public $fields;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @var array Contains all field types of current meta box
|
31 |
+
*/
|
32 |
+
public $types;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* @var array Validation information
|
36 |
+
*/
|
37 |
+
public $validation;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Create meta box based on given data
|
41 |
+
*
|
42 |
+
* @see demo/demo.php file for details
|
43 |
+
*
|
44 |
+
* @param array $meta_box Meta box definition
|
45 |
+
*
|
46 |
+
* @return RW_Meta_Box
|
47 |
+
*/
|
48 |
+
function __construct( $meta_box )
|
49 |
+
{
|
50 |
+
// Run script only in admin area
|
51 |
+
if ( ! is_admin() )
|
52 |
+
return;
|
53 |
+
|
54 |
+
// Assign meta box values to local variables and add it's missed values
|
55 |
+
$this->meta_box = self::normalize( $meta_box );
|
56 |
+
$this->fields = &$this->meta_box['fields'];
|
57 |
+
$this->validation = &$this->meta_box['validation'];
|
58 |
+
|
59 |
+
// Allow users to show/hide (e.g. include/exclude) meta boxes
|
60 |
+
// 1st action applies to all meta boxes
|
61 |
+
// 2nd action applies to only current meta box
|
62 |
+
$show = true;
|
63 |
+
$show = apply_filters( 'rwmb_show', $show, $meta_box );
|
64 |
+
$show = apply_filters( "rwmb_show_{$this->meta_box['id']}", $show, $this->meta_box );
|
65 |
+
if ( !$show )
|
66 |
+
return;
|
67 |
+
|
68 |
+
// Enqueue common styles and scripts
|
69 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
70 |
+
|
71 |
+
// All fields
|
72 |
+
$fields = self::get_fields( $this->fields );
|
73 |
+
|
74 |
+
// Add additional actions for fields
|
75 |
+
foreach ( $fields as $field )
|
76 |
+
{
|
77 |
+
$class = self::get_class_name( $field );
|
78 |
+
|
79 |
+
if ( method_exists( $class, 'add_actions' ) )
|
80 |
+
call_user_func( array( $class, 'add_actions' ) );
|
81 |
+
}
|
82 |
+
|
83 |
+
// Add meta box
|
84 |
+
foreach ( $this->meta_box['pages'] as $page )
|
85 |
+
{
|
86 |
+
add_action( "add_meta_boxes_{$page}", array( $this, 'add_meta_boxes' ) );
|
87 |
+
}
|
88 |
+
|
89 |
+
// Hide meta box if it's set 'default_hidden'
|
90 |
+
add_filter( 'default_hidden_meta_boxes', array( $this, 'hide' ), 10, 2 );
|
91 |
+
|
92 |
+
// Save post meta
|
93 |
+
add_action( 'save_post', array( $this, 'save_post' ) );
|
94 |
+
|
95 |
+
// Attachment uses other hooks
|
96 |
+
// @see wp_update_post(), wp_insert_attachment()
|
97 |
+
add_action( 'edit_attachment', array( $this, 'save_post' ) );
|
98 |
+
add_action( 'add_attachment', array( $this, 'save_post' ) );
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Enqueue common styles
|
103 |
+
*
|
104 |
+
* @return void
|
105 |
+
*/
|
106 |
+
function admin_enqueue_scripts()
|
107 |
+
{
|
108 |
+
$screen = get_current_screen();
|
109 |
+
|
110 |
+
// Enqueue scripts and styles for registered pages (post types) only
|
111 |
+
if ( 'post' != $screen->base || ! in_array( $screen->post_type, $this->meta_box['pages'] ) )
|
112 |
+
return;
|
113 |
+
|
114 |
+
wp_enqueue_style( 'rwmb', RWMB_CSS_URL . 'style.css', array(), RWMB_VER );
|
115 |
+
|
116 |
+
// Load clone script conditionally
|
117 |
+
$has_clone = false;
|
118 |
+
$fields = self::get_fields( $this->fields );
|
119 |
+
|
120 |
+
foreach ( $fields as $field )
|
121 |
+
{
|
122 |
+
if ( $field['clone'] )
|
123 |
+
$has_clone = true;
|
124 |
+
|
125 |
+
// Enqueue scripts and styles for fields
|
126 |
+
$class = self::get_class_name( $field );
|
127 |
+
if ( method_exists( $class, 'admin_enqueue_scripts' ) )
|
128 |
+
call_user_func( array( $class, 'admin_enqueue_scripts' ) );
|
129 |
+
}
|
130 |
+
|
131 |
+
if ( $has_clone )
|
132 |
+
wp_enqueue_script( 'rwmb-clone', RWMB_JS_URL . 'clone.js', array( 'jquery' ), RWMB_VER, true );
|
133 |
+
|
134 |
+
if ( $this->validation )
|
135 |
+
{
|
136 |
+
wp_enqueue_script( 'jquery-validate', RWMB_JS_URL . 'jquery.validate.min.js', array( 'jquery' ), RWMB_VER, true );
|
137 |
+
wp_enqueue_script( 'rwmb-validate', RWMB_JS_URL . 'validate.js', array( 'jquery-validate' ), RWMB_VER, true );
|
138 |
+
}
|
139 |
+
|
140 |
+
// Auto save
|
141 |
+
if ( $this->meta_box['autosave'] )
|
142 |
+
wp_enqueue_script( 'rwmb-autosave', RWMB_JS_URL . 'autosave.js', array( 'jquery' ), RWMB_VER, true );
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Get all fields of a meta box, recursively
|
147 |
+
*
|
148 |
+
* @param array $fields
|
149 |
+
*
|
150 |
+
* @return array
|
151 |
+
*/
|
152 |
+
static function get_fields( $fields )
|
153 |
+
{
|
154 |
+
$all_fields = array();
|
155 |
+
foreach ( $fields as $field )
|
156 |
+
{
|
157 |
+
$all_fields[] = $field;
|
158 |
+
if ( isset( $field['fields'] ) )
|
159 |
+
{
|
160 |
+
$all_fields = array_merge( $all_fields, self::get_fields( $field['fields'] ) );
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
return $all_fields;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**************************************************
|
168 |
+
SHOW META BOX
|
169 |
+
**************************************************/
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Add meta box for multiple post types
|
173 |
+
*
|
174 |
+
* @return void
|
175 |
+
*/
|
176 |
+
function add_meta_boxes()
|
177 |
+
{
|
178 |
+
foreach ( $this->meta_box['pages'] as $page )
|
179 |
+
{
|
180 |
+
add_meta_box(
|
181 |
+
$this->meta_box['id'],
|
182 |
+
$this->meta_box['title'],
|
183 |
+
array( $this, 'show' ),
|
184 |
+
$page,
|
185 |
+
$this->meta_box['context'],
|
186 |
+
$this->meta_box['priority']
|
187 |
+
);
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Hide meta box if it's set 'default_hidden'
|
193 |
+
*
|
194 |
+
* @param array $hidden Array of default hidden meta boxes
|
195 |
+
* @param object $screen Current screen information
|
196 |
+
*
|
197 |
+
* @return array
|
198 |
+
*/
|
199 |
+
function hide( $hidden, $screen )
|
200 |
+
{
|
201 |
+
if (
|
202 |
+
'post' === $screen->base
|
203 |
+
&& in_array( $screen->post_type, $this->meta_box['pages'] )
|
204 |
+
&& $this->meta_box['default_hidden']
|
205 |
+
)
|
206 |
+
{
|
207 |
+
$hidden[] = $this->meta_box['id'];
|
208 |
+
}
|
209 |
+
return $hidden;
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Callback function to show fields in meta box
|
214 |
+
*
|
215 |
+
* @return void
|
216 |
+
*/
|
217 |
+
function show()
|
218 |
+
{
|
219 |
+
global $post;
|
220 |
+
|
221 |
+
$saved = self::has_been_saved( $post->ID, $this->fields );
|
222 |
+
|
223 |
+
// Container
|
224 |
+
printf(
|
225 |
+
'<div class="rwmb-meta-box" data-autosave="%s">',
|
226 |
+
$this->meta_box['autosave'] ? 'true' : 'false'
|
227 |
+
);
|
228 |
+
|
229 |
+
wp_nonce_field( "rwmb-save-{$this->meta_box['id']}", "nonce_{$this->meta_box['id']}" );
|
230 |
+
|
231 |
+
// Allow users to add custom code before meta box content
|
232 |
+
// 1st action applies to all meta boxes
|
233 |
+
// 2nd action applies to only current meta box
|
234 |
+
do_action( 'rwmb_before' );
|
235 |
+
do_action( "rwmb_before_{$this->meta_box['id']}" );
|
236 |
+
|
237 |
+
foreach ( $this->fields as $field )
|
238 |
+
{
|
239 |
+
$meta = self::apply_field_class_filters( $field, 'meta', '', $post->ID, $saved );
|
240 |
+
echo self::show_field( $field, $meta );
|
241 |
+
}
|
242 |
+
|
243 |
+
// Include validation settings for this meta-box
|
244 |
+
if ( isset( $this->validation ) && $this->validation )
|
245 |
+
{
|
246 |
+
echo '
|
247 |
+
<script>
|
248 |
+
if ( typeof rwmb == "undefined" )
|
249 |
+
{
|
250 |
+
var rwmb = {
|
251 |
+
validationOptions : jQuery.parseJSON( \'' . json_encode( $this->validation ) . '\' ),
|
252 |
+
summaryMessage : "' . __( 'Please correct the errors highlighted below and try again.', 'rwmb' ) . '"
|
253 |
+
};
|
254 |
+
}
|
255 |
+
else
|
256 |
+
{
|
257 |
+
var tempOptions = jQuery.parseJSON( \'' . json_encode( $this->validation ) . '\' );
|
258 |
+
jQuery.extend( true, rwmb.validationOptions, tempOptions );
|
259 |
+
};
|
260 |
+
</script>
|
261 |
+
';
|
262 |
+
}
|
263 |
+
|
264 |
+
// Allow users to add custom code after meta box content
|
265 |
+
// 1st action applies to all meta boxes
|
266 |
+
// 2nd action applies to only current meta box
|
267 |
+
do_action( 'rwmb_after' );
|
268 |
+
do_action( "rwmb_after_{$this->meta_box['id']}" );
|
269 |
+
|
270 |
+
// End container
|
271 |
+
echo '</div>';
|
272 |
+
}
|
273 |
+
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Callback function to show fields in meta box
|
277 |
+
*
|
278 |
+
* @param array $field
|
279 |
+
* @param string $meta
|
280 |
+
*
|
281 |
+
* @return string
|
282 |
+
*/
|
283 |
+
static function show_field( $field, $meta = '' )
|
284 |
+
{
|
285 |
+
$group = ''; // Empty the clone-group field
|
286 |
+
$type = $field['type'];
|
287 |
+
$id = $field['id'];
|
288 |
+
|
289 |
+
$meta = apply_filters( "rwmb_{$type}_meta", $meta );
|
290 |
+
$meta = apply_filters( "rwmb_{$id}_meta", $meta );
|
291 |
+
|
292 |
+
$begin = self::apply_field_class_filters( $field, 'begin_html', '', $meta );
|
293 |
+
|
294 |
+
// Apply filter to field begin HTML
|
295 |
+
// 1st filter applies to all fields
|
296 |
+
// 2nd filter applies to all fields with the same type
|
297 |
+
// 3rd filter applies to current field only
|
298 |
+
$begin = apply_filters( 'rwmb_begin_html', $begin, $field, $meta );
|
299 |
+
$begin = apply_filters( "rwmb_{$type}_begin_html", $begin, $field, $meta );
|
300 |
+
$begin = apply_filters( "rwmb_{$id}_begin_html", $begin, $field, $meta );
|
301 |
+
|
302 |
+
// Separate code for cloneable and non-cloneable fields to make easy to maintain
|
303 |
+
|
304 |
+
// Cloneable fields
|
305 |
+
if ( $field['clone'] )
|
306 |
+
{
|
307 |
+
if ( isset( $field['clone-group'] ) )
|
308 |
+
$group = " clone-group='{$field['clone-group']}'";
|
309 |
+
|
310 |
+
$meta = (array) $meta;
|
311 |
+
|
312 |
+
$field_html = '';
|
313 |
+
|
314 |
+
foreach ( $meta as $index => $meta_data )
|
315 |
+
{
|
316 |
+
$sub_field = $field;
|
317 |
+
$sub_field['field_name'] = $field['field_name'] . "[{$index}]";
|
318 |
+
if ( $field['multiple'] )
|
319 |
+
$sub_field['field_name'] .= '[]';
|
320 |
+
|
321 |
+
add_filter( "rwmb_{$id}_html", array( __CLASS__, 'add_clone_buttons' ), 10, 3 );
|
322 |
+
|
323 |
+
// Wrap field HTML in a div with class="rwmb-clone" if needed
|
324 |
+
$input_html = '<div class="rwmb-clone">';
|
325 |
+
|
326 |
+
// Call separated methods for displaying each type of field
|
327 |
+
$input_html .= self::apply_field_class_filters( $sub_field, 'html', '', $meta_data );
|
328 |
+
|
329 |
+
// Apply filter to field HTML
|
330 |
+
// 1st filter applies to all fields with the same type
|
331 |
+
// 2nd filter applies to current field only
|
332 |
+
$input_html = apply_filters( "rwmb_{$type}_html", $input_html, $field, $meta_data );
|
333 |
+
$input_html = apply_filters( "rwmb_{$id}_html", $input_html, $field, $meta_data );
|
334 |
+
|
335 |
+
$input_html .= '</div>';
|
336 |
+
|
337 |
+
$field_html .= $input_html;
|
338 |
+
}
|
339 |
+
}
|
340 |
+
// Non-cloneable fields
|
341 |
+
else
|
342 |
+
{
|
343 |
+
// Call separated methods for displaying each type of field
|
344 |
+
$field_html = self::apply_field_class_filters( $field, 'html', '', $meta );
|
345 |
+
|
346 |
+
// Apply filter to field HTML
|
347 |
+
// 1st filter applies to all fields with the same type
|
348 |
+
// 2nd filter applies to current field only
|
349 |
+
$field_html = apply_filters( "rwmb_{$type}_html", $field_html, $field, $meta );
|
350 |
+
$field_html = apply_filters( "rwmb_{$id}_html", $field_html, $field, $meta );
|
351 |
+
}
|
352 |
+
|
353 |
+
$end = self::apply_field_class_filters( $field, 'end_html', '', $meta );
|
354 |
+
|
355 |
+
// Apply filter to field end HTML
|
356 |
+
// 1st filter applies to all fields
|
357 |
+
// 2nd filter applies to all fields with the same type
|
358 |
+
// 3rd filter applies to current field only
|
359 |
+
$end = apply_filters( 'rwmb_end_html', $end, $field, $meta );
|
360 |
+
$end = apply_filters( "rwmb_{$type}_end_html", $end, $field, $meta );
|
361 |
+
$end = apply_filters( "rwmb_{$id}_end_html", $end, $field, $meta );
|
362 |
+
|
363 |
+
// Apply filter to field wrapper
|
364 |
+
// This allow users to change whole HTML markup of the field wrapper (i.e. table row)
|
365 |
+
// 1st filter applies to all fields with the same type
|
366 |
+
// 2nd filter applies to current field only
|
367 |
+
$html = apply_filters( "rwmb_{$type}_wrapper_html", "{$begin}{$field_html}{$end}", $field, $meta );
|
368 |
+
$html = apply_filters( "rwmb_{$id}_wrapper_html", $html, $field, $meta );
|
369 |
+
|
370 |
+
// Display label and input in DIV and allow user-defined classes to be appended
|
371 |
+
$classes = array( 'rwmb-field', "rwmb-{$field['type']}-wrapper" );
|
372 |
+
if ( 'hidden' === $field['type'] )
|
373 |
+
$classes[] = 'hidden';
|
374 |
+
if ( !empty( $field['required'] ) )
|
375 |
+
$classes[] = 'required';
|
376 |
+
if ( !empty( $field['class'] ) )
|
377 |
+
$classes[] = $field['class'];
|
378 |
+
|
379 |
+
return sprintf(
|
380 |
+
$field['before'] . '<div class="%s"%s>%s</div>' . $field['after'],
|
381 |
+
implode( ' ', $classes ),
|
382 |
+
$group,
|
383 |
+
$html
|
384 |
+
);
|
385 |
+
}
|
386 |
+
|
387 |
+
/**
|
388 |
+
* Show begin HTML markup for fields
|
389 |
+
*
|
390 |
+
* @param string $html
|
391 |
+
* @param mixed $meta
|
392 |
+
* @param array $field
|
393 |
+
*
|
394 |
+
* @return string
|
395 |
+
*/
|
396 |
+
static function begin_html( $html, $meta, $field )
|
397 |
+
{
|
398 |
+
if ( empty( $field['name'] ) )
|
399 |
+
return '<div class="rwmb-input">';
|
400 |
+
|
401 |
+
return sprintf(
|
402 |
+
'<div class="rwmb-label">
|
403 |
+
<label for="%s">%s</label>
|
404 |
+
</div>
|
405 |
+
<div class="rwmb-input">',
|
406 |
+
$field['id'],
|
407 |
+
$field['name']
|
408 |
+
);
|
409 |
+
}
|
410 |
+
|
411 |
+
/**
|
412 |
+
* Show end HTML markup for fields
|
413 |
+
*
|
414 |
+
* @param string $html
|
415 |
+
* @param mixed $meta
|
416 |
+
* @param array $field
|
417 |
+
*
|
418 |
+
* @return string
|
419 |
+
*/
|
420 |
+
static function end_html( $html, $meta, $field )
|
421 |
+
{
|
422 |
+
$id = $field['id'];
|
423 |
+
|
424 |
+
$button = '';
|
425 |
+
if ( $field['clone'] )
|
426 |
+
$button = '<a href="#" class="rwmb-button button-primary add-clone">' . __( '+', 'rwmb' ) . '</a>';
|
427 |
+
|
428 |
+
$desc = ! empty( $field['desc'] ) ? "<p id='{$id}_description' class='description'>{$field['desc']}</p>" : '';
|
429 |
+
|
430 |
+
// Closes the container
|
431 |
+
$html = "{$button}{$desc}</div>";
|
432 |
+
|
433 |
+
return $html;
|
434 |
+
}
|
435 |
+
|
436 |
+
/**
|
437 |
+
* Callback function to add clone buttons on demand
|
438 |
+
* Hooks on the flight into the "rwmb_{$field_id}_html" filter before the closing div
|
439 |
+
*
|
440 |
+
* @param string $html
|
441 |
+
* @param array $field
|
442 |
+
* @param mixed $meta_data
|
443 |
+
*
|
444 |
+
* @return string $html
|
445 |
+
*/
|
446 |
+
static function add_clone_buttons( $html, $field, $meta_data )
|
447 |
+
{
|
448 |
+
$button = '<a href="#" class="rwmb-button button remove-clone">' . __( '–', 'rwmb' ) . '</a>';
|
449 |
+
|
450 |
+
return "{$html}{$button}";
|
451 |
+
}
|
452 |
+
|
453 |
+
/**
|
454 |
+
* Standard meta retrieval
|
455 |
+
*
|
456 |
+
* @param mixed $meta
|
457 |
+
* @param int $post_id
|
458 |
+
* @param array $field
|
459 |
+
* @param bool $saved
|
460 |
+
*
|
461 |
+
* @return mixed
|
462 |
+
*/
|
463 |
+
static function meta( $meta, $post_id, $saved, $field )
|
464 |
+
{
|
465 |
+
$meta = get_post_meta( $post_id, $field['id'], !$field['multiple'] );
|
466 |
+
|
467 |
+
// Use $field['std'] only when the meta box hasn't been saved (i.e. the first time we run)
|
468 |
+
$meta = ( !$saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
|
469 |
+
|
470 |
+
// Escape attributes for non-wysiwyg fields
|
471 |
+
if ( 'wysiwyg' !== $field['type'] )
|
472 |
+
$meta = is_array( $meta ) ? array_map( 'esc_attr', $meta ) : esc_attr( $meta );
|
473 |
+
|
474 |
+
return $meta;
|
475 |
+
}
|
476 |
+
|
477 |
+
/**************************************************
|
478 |
+
SAVE META BOX
|
479 |
+
**************************************************/
|
480 |
+
|
481 |
+
/**
|
482 |
+
* Save data from meta box
|
483 |
+
*
|
484 |
+
* @param int $post_id Post ID
|
485 |
+
*
|
486 |
+
* @return void
|
487 |
+
*/
|
488 |
+
function save_post( $post_id )
|
489 |
+
{
|
490 |
+
// Check whether:
|
491 |
+
// - form is submitted properly
|
492 |
+
if (
|
493 |
+
empty( $_POST["nonce_{$this->meta_box['id']}"] )
|
494 |
+
|| !wp_verify_nonce( $_POST["nonce_{$this->meta_box['id']}"], "rwmb-save-{$this->meta_box['id']}" )
|
495 |
+
)
|
496 |
+
{
|
497 |
+
return;
|
498 |
+
}
|
499 |
+
|
500 |
+
// Save post action removed to prevent infinite loops
|
501 |
+
remove_action( 'save_post', array( $this, 'save_post' ) );
|
502 |
+
|
503 |
+
// Before save action
|
504 |
+
do_action( 'rwmb_before_save_post', $post_id );
|
505 |
+
do_action( "rwmb_{$this->meta_box['id']}_before_save_post", $post_id );
|
506 |
+
|
507 |
+
foreach ( $this->fields as $field )
|
508 |
+
{
|
509 |
+
$name = $field['id'];
|
510 |
+
$old = get_post_meta( $post_id, $name, !$field['multiple'] );
|
511 |
+
$new = isset( $_POST[$name] ) ? $_POST[$name] : ( $field['multiple'] ? array() : '' );
|
512 |
+
|
513 |
+
// Allow field class change the value
|
514 |
+
$new = self::apply_field_class_filters( $field, 'value', $new, $old, $post_id );
|
515 |
+
|
516 |
+
// Use filter to change field value
|
517 |
+
// 1st filter applies to all fields with the same type
|
518 |
+
// 2nd filter applies to current field only
|
519 |
+
$new = apply_filters( "rwmb_{$field['type']}_value", $new, $field, $old );
|
520 |
+
$new = apply_filters( "rwmb_{$name}_value", $new, $field, $old );
|
521 |
+
|
522 |
+
// Stops images from being removed as per issue #287
|
523 |
+
if ( empty( $old ) && empty( $new ) )
|
524 |
+
continue;
|
525 |
+
|
526 |
+
// Call defined method to save meta value, if there's no methods, call common one
|
527 |
+
self::do_field_class_actions( $field, 'save', $new, $old, $post_id );
|
528 |
+
}
|
529 |
+
|
530 |
+
// After save action
|
531 |
+
do_action( 'rwmb_after_save_post', $post_id );
|
532 |
+
do_action( "rwmb_{$this->meta_box['id']}_after_save_post", $post_id );
|
533 |
+
|
534 |
+
// Reinstate save_post action
|
535 |
+
add_action( 'save_post', array( $this, 'save_post' ) );
|
536 |
+
}
|
537 |
+
|
538 |
+
/**
|
539 |
+
* Common functions for saving field
|
540 |
+
*
|
541 |
+
* @param mixed $new
|
542 |
+
* @param mixed $old
|
543 |
+
* @param int $post_id
|
544 |
+
* @param array $field
|
545 |
+
*
|
546 |
+
* @return void
|
547 |
+
*/
|
548 |
+
static function save( $new, $old, $post_id, $field )
|
549 |
+
{
|
550 |
+
$name = $field['id'];
|
551 |
+
|
552 |
+
if ( '' === $new || array() === $new )
|
553 |
+
{
|
554 |
+
delete_post_meta( $post_id, $name );
|
555 |
+
return;
|
556 |
+
}
|
557 |
+
|
558 |
+
if ( $field['multiple'] )
|
559 |
+
{
|
560 |
+
foreach ( $new as $new_value )
|
561 |
+
{
|
562 |
+
if ( !in_array( $new_value, $old ) )
|
563 |
+
add_post_meta( $post_id, $name, $new_value, false );
|
564 |
+
}
|
565 |
+
foreach ( $old as $old_value )
|
566 |
+
{
|
567 |
+
if ( !in_array( $old_value, $new ) )
|
568 |
+
delete_post_meta( $post_id, $name, $old_value );
|
569 |
+
}
|
570 |
+
}
|
571 |
+
else
|
572 |
+
{
|
573 |
+
update_post_meta( $post_id, $name, $new );
|
574 |
+
}
|
575 |
+
}
|
576 |
+
|
577 |
+
/**************************************************
|
578 |
+
HELPER FUNCTIONS
|
579 |
+
**************************************************/
|
580 |
+
|
581 |
+
/**
|
582 |
+
* Normalize parameters for meta box
|
583 |
+
*
|
584 |
+
* @param array $meta_box Meta box definition
|
585 |
+
*
|
586 |
+
* @return array $meta_box Normalized meta box
|
587 |
+
*/
|
588 |
+
static function normalize( $meta_box )
|
589 |
+
{
|
590 |
+
// Set default values for meta box
|
591 |
+
$meta_box = wp_parse_args( $meta_box, array(
|
592 |
+
'id' => sanitize_title( $meta_box['title'] ),
|
593 |
+
'context' => 'normal',
|
594 |
+
'priority' => 'high',
|
595 |
+
'pages' => array( 'post' ),
|
596 |
+
'autosave' => false,
|
597 |
+
'default_hidden' => false,
|
598 |
+
) );
|
599 |
+
|
600 |
+
// Set default values for fields
|
601 |
+
$meta_box['fields'] = self::normalize_fields( $meta_box['fields'] );
|
602 |
+
|
603 |
+
return $meta_box;
|
604 |
+
}
|
605 |
+
|
606 |
+
/**
|
607 |
+
* Normalize an array of fields
|
608 |
+
*
|
609 |
+
* @param array $fields Array of fields
|
610 |
+
*
|
611 |
+
* @return array $fields Normalized fields
|
612 |
+
*/
|
613 |
+
static function normalize_fields( $fields )
|
614 |
+
{
|
615 |
+
foreach ( $fields as &$field )
|
616 |
+
{
|
617 |
+
$field = wp_parse_args( $field, array(
|
618 |
+
'multiple' => false,
|
619 |
+
'clone' => false,
|
620 |
+
'std' => '',
|
621 |
+
'desc' => '',
|
622 |
+
'format' => '',
|
623 |
+
'before' => '',
|
624 |
+
'after' => '',
|
625 |
+
'field_name' => isset( $field['id'] ) ? $field['id'] : '',
|
626 |
+
'required' => false
|
627 |
+
) );
|
628 |
+
|
629 |
+
// Allow field class add/change default field values
|
630 |
+
$field = self::apply_field_class_filters( $field, 'normalize_field', $field );
|
631 |
+
|
632 |
+
if( isset( $field['fields'] ) )
|
633 |
+
{
|
634 |
+
$field['fields'] = self::normalize_fields( $field['fields'] );
|
635 |
+
}
|
636 |
+
}
|
637 |
+
|
638 |
+
return $fields;
|
639 |
+
}
|
640 |
+
|
641 |
+
/**
|
642 |
+
* Get field class name
|
643 |
+
*
|
644 |
+
* @param array $field Field array
|
645 |
+
*
|
646 |
+
* @return bool|string Field class name OR false on failure
|
647 |
+
*/
|
648 |
+
static function get_class_name( $field )
|
649 |
+
{
|
650 |
+
$type = ucwords( $field['type'] );
|
651 |
+
$class = "RWMB_{$type}_Field";
|
652 |
+
|
653 |
+
if ( class_exists( $class ) )
|
654 |
+
return $class;
|
655 |
+
|
656 |
+
return false;
|
657 |
+
}
|
658 |
+
|
659 |
+
/**
|
660 |
+
* Apply filters by field class, fallback to RW_Meta_Box method
|
661 |
+
*
|
662 |
+
* @param array $field
|
663 |
+
* @param string $method_name
|
664 |
+
* @param mixed $value
|
665 |
+
*
|
666 |
+
* @return mixed $value
|
667 |
+
*/
|
668 |
+
static function apply_field_class_filters( $field, $method_name, $value )
|
669 |
+
{
|
670 |
+
$args = array_slice( func_get_args(), 2 );
|
671 |
+
$args[] = $field;
|
672 |
+
|
673 |
+
// Call: field class method
|
674 |
+
// Fallback: RW_Meta_Box method
|
675 |
+
$class = self::get_class_name( $field );
|
676 |
+
if ( method_exists( $class, $method_name ) )
|
677 |
+
{
|
678 |
+
$value = call_user_func_array( array( $class, $method_name ), $args );
|
679 |
+
}
|
680 |
+
elseif ( method_exists( __CLASS__, $method_name ) )
|
681 |
+
{
|
682 |
+
$value = call_user_func_array( array( __CLASS__, $method_name ), $args );
|
683 |
+
}
|
684 |
+
|
685 |
+
return $value;
|
686 |
+
}
|
687 |
+
|
688 |
+
/**
|
689 |
+
* Call field class method for actions, fallback to RW_Meta_Box method
|
690 |
+
*
|
691 |
+
* @param array $field
|
692 |
+
* @param string $method_name
|
693 |
+
*
|
694 |
+
* @return mixed
|
695 |
+
*/
|
696 |
+
static function do_field_class_actions( $field, $method_name )
|
697 |
+
{
|
698 |
+
$args = array_slice( func_get_args(), 2 );
|
699 |
+
$args[] = $field;
|
700 |
+
|
701 |
+
// Call: field class method
|
702 |
+
// Fallback: RW_Meta_Box method
|
703 |
+
$class = self::get_class_name( $field );
|
704 |
+
if ( method_exists( $class, $method_name ) )
|
705 |
+
{
|
706 |
+
call_user_func_array( array( $class, $method_name ), $args );
|
707 |
+
}
|
708 |
+
elseif ( method_exists( __CLASS__, $method_name ) )
|
709 |
+
{
|
710 |
+
call_user_func_array( array( __CLASS__, $method_name ), $args );
|
711 |
+
}
|
712 |
+
}
|
713 |
+
|
714 |
+
/**
|
715 |
+
* Format Ajax response
|
716 |
+
*
|
717 |
+
* @param string $message
|
718 |
+
* @param string $status
|
719 |
+
*
|
720 |
+
* @return void
|
721 |
+
*/
|
722 |
+
static function ajax_response( $message, $status )
|
723 |
+
{
|
724 |
+
$response = array( 'what' => 'meta-box' );
|
725 |
+
$response['data'] = 'error' === $status ? new WP_Error( 'error', $message ) : $message;
|
726 |
+
$x = new WP_Ajax_Response( $response );
|
727 |
+
$x->send();
|
728 |
+
}
|
729 |
+
|
730 |
+
/**
|
731 |
+
* Check if meta box has been saved
|
732 |
+
* This helps saving empty value in meta fields (for text box, check box, etc.)
|
733 |
+
*
|
734 |
+
* @param int $post_id
|
735 |
+
* @param array $fields
|
736 |
+
*
|
737 |
+
* @return bool
|
738 |
+
*/
|
739 |
+
static function has_been_saved( $post_id, $fields )
|
740 |
+
{
|
741 |
+
foreach ( $fields as $field )
|
742 |
+
{
|
743 |
+
$value = get_post_meta( $post_id, $field['id'], !$field['multiple'] );
|
744 |
+
if (
|
745 |
+
( !$field['multiple'] && '' !== $value )
|
746 |
+
|| ( $field['multiple'] && array() !== $value )
|
747 |
+
)
|
748 |
+
{
|
749 |
+
return true;
|
750 |
+
}
|
751 |
+
}
|
752 |
+
return false;
|
753 |
+
}
|
754 |
+
}
|
755 |
+
}
|
inc/fields/button.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Button_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Button_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param string $html
|
13 |
+
* @param mixed $meta
|
14 |
+
* @param array $field
|
15 |
+
*
|
16 |
+
* @return string
|
17 |
+
*/
|
18 |
+
static function html( $html, $meta, $field )
|
19 |
+
{
|
20 |
+
return sprintf(
|
21 |
+
'<a href="#" id="%s" class="button hide-if-no-js">%s</a>',
|
22 |
+
$field['id'],
|
23 |
+
$field['std']
|
24 |
+
);
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Normalize parameters for field
|
29 |
+
*
|
30 |
+
* @param array $field
|
31 |
+
*
|
32 |
+
* @return array
|
33 |
+
*/
|
34 |
+
static function normalize_field( $field )
|
35 |
+
{
|
36 |
+
$field['std'] = $field['std'] ? $field['std'] : __( 'Click me', 'rwmb' );
|
37 |
+
return $field;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
inc/fields/color.php
CHANGED
@@ -13,8 +13,8 @@ if ( ! class_exists( 'RWMB_Color_Field' ) )
|
|
13 |
*/
|
14 |
static function admin_enqueue_scripts()
|
15 |
{
|
16 |
-
wp_enqueue_style( 'rwmb-color', RWMB_CSS_URL . 'color.css', array( 'farbtastic' ), RWMB_VER );
|
17 |
-
wp_enqueue_script( 'rwmb-color', RWMB_JS_URL . 'color.js', array( 'farbtastic' ), RWMB_VER, true );
|
18 |
}
|
19 |
|
20 |
/**
|
13 |
*/
|
14 |
static function admin_enqueue_scripts()
|
15 |
{
|
16 |
+
wp_enqueue_style( 'rwmb-color', RWMB_CSS_URL . 'color.css', array( 'farbtastic', 'wp-color-picker' ), RWMB_VER );
|
17 |
+
wp_enqueue_script( 'rwmb-color', RWMB_JS_URL . 'color.js', array( 'farbtastic', 'wp-color-picker' ), RWMB_VER, true );
|
18 |
}
|
19 |
|
20 |
/**
|
inc/fields/date.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
// Prevent loading this file directly
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
5 |
-
if ( !
|
6 |
{
|
7 |
class RWMB_Date_Field
|
8 |
{
|
@@ -18,7 +18,18 @@ if ( ! class_exists( 'RWMB_Date_Field' ) )
|
|
18 |
wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
|
19 |
wp_enqueue_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
20 |
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
}
|
23 |
|
24 |
/**
|
@@ -66,4 +77,4 @@ if ( ! class_exists( 'RWMB_Date_Field' ) )
|
|
66 |
return $field;
|
67 |
}
|
68 |
}
|
69 |
-
}
|
2 |
// Prevent loading this file directly
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
5 |
+
if ( !class_exists( 'RWMB_Date_Field' ) )
|
6 |
{
|
7 |
class RWMB_Date_Field
|
8 |
{
|
18 |
wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
|
19 |
wp_enqueue_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
20 |
|
21 |
+
// Load localized scripts
|
22 |
+
$locale = str_replace( '_', '-', get_locale() );
|
23 |
+
$file_path = 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . $locale . '.js';
|
24 |
+
$deps = array( 'jquery-ui-datepicker' );
|
25 |
+
if ( file_exists( RWMB_DIR . 'js/' . $file_path ) )
|
26 |
+
{
|
27 |
+
wp_register_script( 'jquery-ui-datepicker-i18n', RWMB_JS_URL . $file_path, $deps, '1.8.17', true );
|
28 |
+
$deps[] = 'jquery-ui-datepicker-i18n';
|
29 |
+
}
|
30 |
+
|
31 |
+
wp_enqueue_script( 'rwmb-date', RWMB_JS_URL . 'date.js', $deps, RWMB_VER, true );
|
32 |
+
wp_localize_script( 'rwmb-date', 'RWMB_Datepicker', array( 'lang' => $locale ) );
|
33 |
}
|
34 |
|
35 |
/**
|
77 |
return $field;
|
78 |
}
|
79 |
}
|
80 |
+
}
|
inc/fields/datetime.php
CHANGED
@@ -2,16 +2,16 @@
|
|
2 |
// Prevent loading this file directly
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
5 |
-
if ( !
|
6 |
{
|
7 |
class RWMB_Datetime_Field
|
8 |
{
|
9 |
/**
|
10 |
* Enqueue scripts and styles
|
11 |
*
|
12 |
-
* @return
|
13 |
*/
|
14 |
-
static function admin_enqueue_scripts(
|
15 |
{
|
16 |
$url = RWMB_CSS_URL . 'jqueryui';
|
17 |
wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
|
@@ -20,9 +20,26 @@ if ( ! class_exists( 'RWMB_Datetime_Field' ) )
|
|
20 |
wp_register_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
21 |
wp_enqueue_style( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.css", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '0.9.7' );
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
/**
|
@@ -37,15 +54,35 @@ if ( ! class_exists( 'RWMB_Datetime_Field' ) )
|
|
37 |
static function html( $html, $meta, $field )
|
38 |
{
|
39 |
return sprintf(
|
40 |
-
'<input type="text" class="rwmb-datetime" name="%s" value="%s" id="%s" size="%s" data-options="%s"
|
41 |
$field['field_name'],
|
42 |
-
$meta,
|
43 |
isset( $field['clone'] ) && $field['clone'] ? '' : $field['id'],
|
44 |
$field['size'],
|
45 |
esc_attr( json_encode( $field['js_options'] ) )
|
46 |
);
|
47 |
}
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
/**
|
50 |
* Normalize parameters for field
|
51 |
*
|
@@ -58,6 +95,7 @@ if ( ! class_exists( 'RWMB_Datetime_Field' ) )
|
|
58 |
$field = wp_parse_args( $field, array(
|
59 |
'size' => 30,
|
60 |
'js_options' => array(),
|
|
|
61 |
) );
|
62 |
|
63 |
// Deprecate 'format', but keep it for backward compatible
|
@@ -66,9 +104,38 @@ if ( ! class_exists( 'RWMB_Datetime_Field' ) )
|
|
66 |
'dateFormat' => empty( $field['format'] ) ? 'yy-mm-dd' : $field['format'],
|
67 |
'timeFormat' => 'hh:mm',
|
68 |
'showButtonPanel' => true,
|
|
|
69 |
) );
|
70 |
|
71 |
return $field;
|
72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
-
}
|
2 |
// Prevent loading this file directly
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
5 |
+
if ( !class_exists( 'RWMB_Datetime_Field' ) )
|
6 |
{
|
7 |
class RWMB_Datetime_Field
|
8 |
{
|
9 |
/**
|
10 |
* Enqueue scripts and styles
|
11 |
*
|
12 |
+
* @return void
|
13 |
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
{
|
16 |
$url = RWMB_CSS_URL . 'jqueryui';
|
17 |
wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
|
20 |
wp_register_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
21 |
wp_enqueue_style( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.css", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '0.9.7' );
|
22 |
|
23 |
+
wp_register_script( 'jquery-ui-timepicker', RWMB_JS_URL . 'jqueryui/jquery-ui-timepicker-addon.js', array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '0.9.7', true );
|
24 |
+
|
25 |
+
// Load localized scripts
|
26 |
+
$locale = str_replace( '_', '-', get_locale() );
|
27 |
+
$date_path = 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . $locale . '.js';
|
28 |
+
$time_path = 'jqueryui/timepicker-i18n/jquery-ui-timepicker-' . $locale . '.js';
|
29 |
+
$deps = array( 'jquery-ui-datepicker', 'jquery-ui-timepicker' );
|
30 |
+
if ( file_exists( RWMB_DIR . 'js/' . $date_path ) )
|
31 |
+
{
|
32 |
+
wp_register_script( 'jquery-ui-datepicker-i18n', RWMB_JS_URL . $date_path, array( 'jquery-ui-datepicker' ), '1.8.17', true );
|
33 |
+
$deps[] = 'jquery-ui-datepicker-i18n';
|
34 |
+
}
|
35 |
+
if ( file_exists( RWMB_DIR . 'js/' . $time_path ) )
|
36 |
+
{
|
37 |
+
wp_register_script( 'jquery-ui-timepicker-i18n', RWMB_JS_URL . $time_path, array( 'jquery-ui-timepicker' ), '1.8.17', true );
|
38 |
+
$deps[] = 'jquery-ui-timepicker-i18n';
|
39 |
+
}
|
40 |
+
|
41 |
+
wp_enqueue_script( 'rwmb-datetime', RWMB_JS_URL . 'datetime.js', $deps, RWMB_VER, true );
|
42 |
+
wp_localize_script( 'rwmb-datetime', 'RWMB_Datetimepicker', array( 'lang' => $locale ) );
|
43 |
}
|
44 |
|
45 |
/**
|
54 |
static function html( $html, $meta, $field )
|
55 |
{
|
56 |
return sprintf(
|
57 |
+
'<input type="text" class="rwmb-datetime" name="%s" value="%s" id="%s" size="%s" data-options="%s">',
|
58 |
$field['field_name'],
|
59 |
+
isset( $field['timestamp'] ) && $field['timestamp'] ? date( self::translate_format( $field ), $meta ) : $meta,
|
60 |
isset( $field['clone'] ) && $field['clone'] ? '' : $field['id'],
|
61 |
$field['size'],
|
62 |
esc_attr( json_encode( $field['js_options'] ) )
|
63 |
);
|
64 |
}
|
65 |
|
66 |
+
/**
|
67 |
+
* Calculates the timestamp from the datetime string and returns it
|
68 |
+
* if $field['timestamp'] is set or the datetime string if not
|
69 |
+
*
|
70 |
+
* @param mixed $new
|
71 |
+
* @param mixed $old
|
72 |
+
* @param int $post_id
|
73 |
+
* @param array $field
|
74 |
+
*
|
75 |
+
* @return string|int
|
76 |
+
*/
|
77 |
+
static function value( $new, $old, $post_id, $field )
|
78 |
+
{
|
79 |
+
if ( !$field['timestamp'] )
|
80 |
+
return $new;
|
81 |
+
|
82 |
+
$d = DateTime::createFromFormat( self::translate_format( $field ), $new );
|
83 |
+
return $d ? $d->getTimestamp() : 0;
|
84 |
+
}
|
85 |
+
|
86 |
/**
|
87 |
* Normalize parameters for field
|
88 |
*
|
95 |
$field = wp_parse_args( $field, array(
|
96 |
'size' => 30,
|
97 |
'js_options' => array(),
|
98 |
+
'timestamp' => false,
|
99 |
) );
|
100 |
|
101 |
// Deprecate 'format', but keep it for backward compatible
|
104 |
'dateFormat' => empty( $field['format'] ) ? 'yy-mm-dd' : $field['format'],
|
105 |
'timeFormat' => 'hh:mm',
|
106 |
'showButtonPanel' => true,
|
107 |
+
'separator' => ' ',
|
108 |
) );
|
109 |
|
110 |
return $field;
|
111 |
}
|
112 |
+
|
113 |
+
// Missing: 't' => '', T' => '', 'm' => '', 's' => ''
|
114 |
+
static $time_format_translation = array(
|
115 |
+
'H' => 'H', 'HH' => 'H', 'h' => 'H', 'hh' => 'H',
|
116 |
+
'mm' => 'i', 'ss' => 's', 'l' => 'u', 'tt' => 'a', 'TT' => 'A'
|
117 |
+
);
|
118 |
+
|
119 |
+
// Missing: 'o' => '', '!' => '', 'oo' => '', '@' => '', "''" => "'"
|
120 |
+
static $date_format_translation = array(
|
121 |
+
'd' => 'j', 'dd' => 'd', 'oo' => 'z', 'D' => 'D', 'DD' => 'l',
|
122 |
+
'm' => 'n', 'mm' => 'm', 'M' => 'M', 'MM' => 'F', 'y' => 'y', 'yy' => 'Y'
|
123 |
+
);
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Returns a date() compatible format string from the JavaScript format
|
127 |
+
*
|
128 |
+
* @see http://www.php.net/manual/en/function.date.php
|
129 |
+
*
|
130 |
+
* @param array $field
|
131 |
+
*
|
132 |
+
* @return string
|
133 |
+
*/
|
134 |
+
static function translate_format( $field )
|
135 |
+
{
|
136 |
+
return strtr( $field['js_options']['dateFormat'], self::$date_format_translation )
|
137 |
+
. $field['js_options']['separator']
|
138 |
+
. strtr( $field['js_options']['timeFormat'], self::$time_format_translation );
|
139 |
+
}
|
140 |
}
|
141 |
+
}
|
inc/fields/divider.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Divider_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Divider_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_style( 'rwmb-divider', RWMB_CSS_URL . 'divider.css', array(), RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Show begin HTML markup for fields
|
21 |
+
*
|
22 |
+
* @param string $html
|
23 |
+
* @param mixed $meta
|
24 |
+
* @param array $field
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
static function begin_html( $html, $meta, $field )
|
29 |
+
{
|
30 |
+
return '<hr>';
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Show end HTML markup for fields
|
35 |
+
*
|
36 |
+
* @param string $html
|
37 |
+
* @param mixed $meta
|
38 |
+
* @param array $field
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
static function end_html( $html, $meta, $field )
|
43 |
+
{
|
44 |
+
return '';
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
inc/fields/email.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "text" field is loaded
|
6 |
+
require_once RWMB_FIELDS_DIR . 'text.php';
|
7 |
+
|
8 |
+
if ( !class_exists( 'RWMB_Email_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_Email_Field extends RWMB_Text_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Get field HTML
|
14 |
+
*
|
15 |
+
* @param string $html
|
16 |
+
* @param mixed $meta
|
17 |
+
* @param array $field
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
static function html( $html, $meta, $field )
|
22 |
+
{
|
23 |
+
return sprintf(
|
24 |
+
'<input type="email" class="rwmb-email" name="%s" id="%s" value="%s" size="%s" />',
|
25 |
+
$field['field_name'],
|
26 |
+
$field['id'],
|
27 |
+
$meta,
|
28 |
+
$field['size']
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Sanitize email
|
35 |
+
*
|
36 |
+
* @param mixed $new
|
37 |
+
* @param mixed $old
|
38 |
+
* @param int $post_id
|
39 |
+
* @param array $field
|
40 |
+
*
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
static function value( $new, $old, $post_id, $field )
|
44 |
+
{
|
45 |
+
return sanitize_email( $new );
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
inc/fields/file-advanced.php
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
require_once RWMB_FIELDS_DIR . 'file.php';
|
6 |
+
if ( ! class_exists( 'RWMB_File_Advanced_Field' ) )
|
7 |
+
{
|
8 |
+
class RWMB_File_Advanced_Field extends RWMB_File_Field
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* Enqueue scripts and styles
|
12 |
+
*
|
13 |
+
* @return void
|
14 |
+
*/
|
15 |
+
static function admin_enqueue_scripts()
|
16 |
+
{
|
17 |
+
parent::admin_enqueue_scripts();
|
18 |
+
|
19 |
+
// Make sure scripts for new media uploader in WordPress 3.5 is enqueued
|
20 |
+
wp_enqueue_media();
|
21 |
+
wp_enqueue_script( 'rwmb-file-advanced', RWMB_JS_URL . 'file-advanced.js', array( 'jquery', 'underscore' ), RWMB_VER, true );
|
22 |
+
wp_localize_script( 'rwmb-file-advanced', 'rwmbFileAdvanced', array(
|
23 |
+
'frameTitle' => __( 'Select Files', 'rwmb' ),
|
24 |
+
) );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Add actions
|
29 |
+
*
|
30 |
+
* @return void
|
31 |
+
*/
|
32 |
+
static function add_actions()
|
33 |
+
{
|
34 |
+
parent::add_actions();
|
35 |
+
|
36 |
+
// Attach images via Ajax
|
37 |
+
add_action( 'wp_ajax_rwmb_attach_file', array( __CLASS__, 'wp_ajax_attach_file' ) );
|
38 |
+
add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
static function wp_ajax_attach_file()
|
42 |
+
{
|
43 |
+
$post_id = is_numeric( $_REQUEST['post_id'] ) ? $_REQUEST['post_id'] : 0;
|
44 |
+
$field_id = isset( $_POST['field_id'] ) ? $_POST['field_id'] : 0;
|
45 |
+
$attachment_ids = isset( $_POST['attachment_ids'] ) ? $_POST['attachment_ids'] : array();
|
46 |
+
|
47 |
+
check_ajax_referer( "rwmb-attach-file_{$field_id}" );
|
48 |
+
foreach( $attachment_ids as $attachment_id )
|
49 |
+
add_post_meta( $post_id, $field_id, $attachment_id, false );
|
50 |
+
|
51 |
+
wp_send_json_success();
|
52 |
+
}
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Get field HTML
|
57 |
+
*
|
58 |
+
* @param string $html
|
59 |
+
* @param mixed $meta
|
60 |
+
* @param array $field
|
61 |
+
*
|
62 |
+
* @return string
|
63 |
+
*/
|
64 |
+
static function html( $html, $meta, $field )
|
65 |
+
{
|
66 |
+
$i18n_title = apply_filters( 'rwmb_file_advanced_select_string', _x( 'Select or Upload Files', 'file upload', 'rwmb' ), $field );
|
67 |
+
$attach_nonce = wp_create_nonce( "rwmb-attach-file_{$field['id']}" );
|
68 |
+
|
69 |
+
// Uploaded files
|
70 |
+
$html = self::get_uploaded_files( $meta, $field );
|
71 |
+
|
72 |
+
// Show form upload
|
73 |
+
$classes = array( 'button', 'rwmb-file-advanced-upload', 'hide-if-no-js', 'new-files' );
|
74 |
+
if ( ! empty( $field['max_file_uploads'] ) && count( $meta ) >= (int) $field['max_file_uploads'] )
|
75 |
+
$classes[] = 'hidden';
|
76 |
+
|
77 |
+
$classes = implode( ' ', $classes );
|
78 |
+
$html .= "<a href='#' class='{$classes}' data-attach_file_nonce={$attach_nonce}>{$i18n_title}</a>";
|
79 |
+
|
80 |
+
return $html;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Get field value
|
85 |
+
* It's the combination of new (uploaded) images and saved images
|
86 |
+
*
|
87 |
+
* @param array $new
|
88 |
+
* @param array $old
|
89 |
+
* @param int $post_id
|
90 |
+
* @param array $field
|
91 |
+
*
|
92 |
+
* @return array|mixed
|
93 |
+
*/
|
94 |
+
static function value( $new, $old, $post_id, $field )
|
95 |
+
{
|
96 |
+
$new = (array) $new;
|
97 |
+
return array_unique( array_merge( $old, $new ) );
|
98 |
+
}
|
99 |
+
|
100 |
+
static function print_templates()
|
101 |
+
{
|
102 |
+
$i18n_delete = apply_filters( 'rwmb_file_delete_string', _x( 'Delete', 'file upload', 'rwmb' ) );
|
103 |
+
$i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'rwmb' ) );
|
104 |
+
?>
|
105 |
+
<script id="tmpl-rwmb-file-advanced" type="text/html">
|
106 |
+
<% _.each( attachments, function( attachment ) { %>
|
107 |
+
<li>
|
108 |
+
<div class="rwmb-icon"><img src="<% if ( attachment.type == 'image' ){ %><%= attachment.sizes.thumbnail.url %><% } else { %><%= attachment.icon %><% } %>"></div>
|
109 |
+
<div class="rwmb-info">
|
110 |
+
<a href="<%= attachment.url %>" target="_blank"><%= attachment.title %></a>
|
111 |
+
<p><%= attachment.mime %></p>
|
112 |
+
<a title="<?php echo $i18n_edit; ?>" href="<%= attachment.editLink %>" target="_blank"><?php echo $i18n_edit; ?></a> |
|
113 |
+
<a title="<?php echo $i18n_delete; ?>" class="rwmb-delete-file" href="#" data-attachment_id="<%= attachment.id %>"><?php echo $i18n_delete; ?></a>
|
114 |
+
</div>
|
115 |
+
</li>
|
116 |
+
<% } );%>
|
117 |
+
</script>
|
118 |
+
<?php
|
119 |
+
}
|
120 |
+
}
|
121 |
+
}
|
inc/fields/file.php
CHANGED
@@ -13,7 +13,12 @@ if ( ! class_exists( 'RWMB_File_Field' ) )
|
|
13 |
*/
|
14 |
static function admin_enqueue_scripts()
|
15 |
{
|
|
|
16 |
wp_enqueue_script( 'rwmb-file', RWMB_JS_URL . 'file.js', array( 'jquery', 'wp-ajax-response' ), RWMB_VER, true );
|
|
|
|
|
|
|
|
|
17 |
}
|
18 |
|
19 |
/**
|
@@ -54,7 +59,7 @@ if ( ! class_exists( 'RWMB_File_Field' ) )
|
|
54 |
$attachment_id = isset( $_POST['attachment_id'] ) ? intval( $_POST['attachment_id'] ) : 0;
|
55 |
$force_delete = isset( $_POST['force_delete'] ) ? intval( $_POST['force_delete'] ) : 0;
|
56 |
|
57 |
-
|
58 |
|
59 |
delete_post_meta( $post_id, $field_id, $attachment_id );
|
60 |
$ok = $force_delete ? wp_delete_attachment( $attachment_id ) : true;
|
@@ -76,42 +81,23 @@ if ( ! class_exists( 'RWMB_File_Field' ) )
|
|
76 |
*/
|
77 |
static function html( $html, $meta, $field )
|
78 |
{
|
79 |
-
$
|
80 |
-
$
|
81 |
-
$i18n_more = _x( '+ Add new file', 'file upload', 'rwmb' );
|
82 |
-
|
83 |
-
$html = wp_nonce_field( "rwmb-delete-file_{$field['id']}", "nonce-delete-file_{$field['id']}", false, false );
|
84 |
|
85 |
// Uploaded files
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
$
|
90 |
-
|
91 |
-
foreach ( $meta as $attachment_id )
|
92 |
-
{
|
93 |
-
$attachment = wp_get_attachment_link( $attachment_id );
|
94 |
-
$html .= sprintf(
|
95 |
-
$li,
|
96 |
-
$attachment,
|
97 |
-
$i18n_delete,
|
98 |
-
$field['id'],
|
99 |
-
$attachment_id,
|
100 |
-
$field['force_delete'] ? 1 : 0,
|
101 |
-
$i18n_delete
|
102 |
-
);
|
103 |
-
}
|
104 |
-
|
105 |
-
$html .= '</ol>';
|
106 |
-
}
|
107 |
|
108 |
// Show form upload
|
109 |
$html .= sprintf(
|
110 |
-
'<
|
111 |
-
|
112 |
<div class="file-input"><input type="file" name="%s[]" /></div>
|
113 |
<a class="rwmb-add-file" href="#"><strong>%s</strong></a>
|
114 |
</div>',
|
|
|
115 |
$i18n_title,
|
116 |
$field['id'],
|
117 |
$i18n_more
|
@@ -120,6 +106,64 @@ if ( ! class_exists( 'RWMB_File_Field' ) )
|
|
120 |
return $html;
|
121 |
}
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
/**
|
124 |
* Get meta values to save
|
125 |
*
|
@@ -202,11 +246,33 @@ if ( ! class_exists( 'RWMB_File_Field' ) )
|
|
202 |
static function normalize_field( $field )
|
203 |
{
|
204 |
$field = wp_parse_args( $field, array(
|
205 |
-
'std'
|
206 |
-
'force_delete'
|
|
|
|
|
207 |
) );
|
208 |
$field['multiple'] = true;
|
209 |
return $field;
|
210 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
}
|
212 |
-
}
|
13 |
*/
|
14 |
static function admin_enqueue_scripts()
|
15 |
{
|
16 |
+
wp_enqueue_style( 'rwmb-file', RWMB_CSS_URL . 'file.css', array(), RWMB_VER );
|
17 |
wp_enqueue_script( 'rwmb-file', RWMB_JS_URL . 'file.js', array( 'jquery', 'wp-ajax-response' ), RWMB_VER, true );
|
18 |
+
wp_localize_script( 'rwmb-file', 'rwmbFile', array(
|
19 |
+
'maxFileUploadsSingle' => __( 'You may only upload maximum %d file', 'rwmb' ),
|
20 |
+
'maxFileUploadsPlural' => __( 'You may only upload maximum %d files', 'rwmb' ),
|
21 |
+
) );
|
22 |
}
|
23 |
|
24 |
/**
|
59 |
$attachment_id = isset( $_POST['attachment_id'] ) ? intval( $_POST['attachment_id'] ) : 0;
|
60 |
$force_delete = isset( $_POST['force_delete'] ) ? intval( $_POST['force_delete'] ) : 0;
|
61 |
|
62 |
+
check_ajax_referer( "rwmb-delete-file_{$field_id}" );
|
63 |
|
64 |
delete_post_meta( $post_id, $field_id, $attachment_id );
|
65 |
$ok = $force_delete ? wp_delete_attachment( $attachment_id ) : true;
|
81 |
*/
|
82 |
static function html( $html, $meta, $field )
|
83 |
{
|
84 |
+
$i18n_title = apply_filters( 'rwmb_file_upload_string', _x( 'Upload Files', 'file upload', 'rwmb' ), $field );
|
85 |
+
$i18n_more = apply_filters( 'rwmb_file_add_string', _x( '+ Add new file', 'file upload', 'rwmb' ), $field );
|
|
|
|
|
|
|
86 |
|
87 |
// Uploaded files
|
88 |
+
$html = self::get_uploaded_files( $meta, $field );
|
89 |
+
$new_file_classes = array( 'new-files' );
|
90 |
+
if ( !empty( $field['max_file_uploads'] ) && count( $meta ) >= (int) $field['max_file_uploads'] )
|
91 |
+
$new_file_classes[] = 'hidden';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
// Show form upload
|
94 |
$html .= sprintf(
|
95 |
+
'<div class="%s">
|
96 |
+
<h4>%s</h4>
|
97 |
<div class="file-input"><input type="file" name="%s[]" /></div>
|
98 |
<a class="rwmb-add-file" href="#"><strong>%s</strong></a>
|
99 |
</div>',
|
100 |
+
implode( ' ', $new_file_classes ),
|
101 |
$i18n_title,
|
102 |
$field['id'],
|
103 |
$i18n_more
|
106 |
return $html;
|
107 |
}
|
108 |
|
109 |
+
static function get_uploaded_files( $files, $field )
|
110 |
+
{
|
111 |
+
$delete_nonce = wp_create_nonce( "rwmb-delete-file_{$field['id']}" );
|
112 |
+
$classes = array('rwmb-file', 'rwmb-uploaded');
|
113 |
+
if ( count( $files ) <= 0 )
|
114 |
+
$classes[] = 'hidden';
|
115 |
+
$ol = '<ul class="%s" data-field_id="%s" data-delete_nonce="%s" data-force_delete="%s" data-max_file_uploads="%s" data-mime_type="%s">';
|
116 |
+
$html = sprintf(
|
117 |
+
$ol,
|
118 |
+
implode( ' ', $classes ),
|
119 |
+
$field['id'],
|
120 |
+
$delete_nonce,
|
121 |
+
$field['force_delete'] ? 1 : 0,
|
122 |
+
$field['max_file_uploads'],
|
123 |
+
$field['mime_type']
|
124 |
+
);
|
125 |
+
|
126 |
+
foreach ( $files as $attachment_id )
|
127 |
+
{
|
128 |
+
$html .= self::file_html( $attachment_id );
|
129 |
+
}
|
130 |
+
|
131 |
+
$html .= '</ul>';
|
132 |
+
|
133 |
+
return $html;
|
134 |
+
}
|
135 |
+
|
136 |
+
static function file_html( $attachment_id )
|
137 |
+
{
|
138 |
+
$i18n_delete = apply_filters( 'rwmb_file_delete_string', _x( 'Delete', 'file upload', 'rwmb' ) );
|
139 |
+
$i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'rwmb' ) );
|
140 |
+
$li = '
|
141 |
+
<li>
|
142 |
+
<div class="rwmb-icon">%s</div>
|
143 |
+
<div class="rwmb-info">
|
144 |
+
<a href="%s" target="_blank">%s</a>
|
145 |
+
<p>%s</p>
|
146 |
+
<a title="%s" href="%s" target="_blank">%s</a> |
|
147 |
+
<a title="%s" class="rwmb-delete-file" href="#" data-attachment_id="%s">%s</a>
|
148 |
+
</div>
|
149 |
+
</li>';
|
150 |
+
|
151 |
+
$mime_type = get_post_mime_type( $attachment_id );
|
152 |
+
return sprintf(
|
153 |
+
$li,
|
154 |
+
wp_get_attachment_image( $attachment_id, array(60,60), true ),
|
155 |
+
wp_get_attachment_url($attachment_id),
|
156 |
+
get_the_title( $attachment_id ),
|
157 |
+
$mime_type,
|
158 |
+
$i18n_edit,
|
159 |
+
get_edit_post_link( $attachment_id ),
|
160 |
+
$i18n_edit,
|
161 |
+
$i18n_delete,
|
162 |
+
$attachment_id,
|
163 |
+
$i18n_delete
|
164 |
+
);
|
165 |
+
}
|
166 |
+
|
167 |
/**
|
168 |
* Get meta values to save
|
169 |
*
|
246 |
static function normalize_field( $field )
|
247 |
{
|
248 |
$field = wp_parse_args( $field, array(
|
249 |
+
'std' => array(),
|
250 |
+
'force_delete' => false,
|
251 |
+
'max_file_uploads' => 0,
|
252 |
+
'mime_type' => '',
|
253 |
) );
|
254 |
$field['multiple'] = true;
|
255 |
return $field;
|
256 |
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Standard meta retrieval
|
260 |
+
*
|
261 |
+
* @param mixed $meta
|
262 |
+
* @param int $post_id
|
263 |
+
* @param array $field
|
264 |
+
* @param bool $saved
|
265 |
+
*
|
266 |
+
* @return mixed
|
267 |
+
*/
|
268 |
+
static function meta( $meta, $post_id, $saved, $field )
|
269 |
+
{
|
270 |
+
$meta = RW_Meta_Box::meta( $meta, $post_id, $saved, $field );
|
271 |
+
|
272 |
+
if ( empty( $meta ) )
|
273 |
+
return array();
|
274 |
+
|
275 |
+
return (array) $meta;
|
276 |
+
}
|
277 |
}
|
278 |
+
}
|
inc/fields/heading.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Heading_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Heading_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_style( 'rwmb-heading', RWMB_CSS_URL . 'heading.css', array(), RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Show begin HTML markup for fields
|
21 |
+
*
|
22 |
+
* @param string $html
|
23 |
+
* @param mixed $meta
|
24 |
+
* @param array $field
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
static function begin_html( $html, $meta, $field )
|
29 |
+
{
|
30 |
+
return sprintf(
|
31 |
+
'<h4>%s</h4>',
|
32 |
+
$field['name']
|
33 |
+
);
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Show end HTML markup for fields
|
38 |
+
*
|
39 |
+
* @param string $html
|
40 |
+
* @param mixed $meta
|
41 |
+
* @param array $field
|
42 |
+
*
|
43 |
+
* @return string
|
44 |
+
*/
|
45 |
+
static function end_html( $html, $meta, $field )
|
46 |
+
{
|
47 |
+
return '';
|
48 |
+
}
|
49 |
+
}
|
50 |
+
}
|
inc/fields/image-advanced.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
require_once RWMB_FIELDS_DIR . 'image.php';
|
5 |
+
if ( ! class_exists( 'RWMB_Image_Advanced_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Image_Advanced_Field extends RWMB_Image_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
parent::admin_enqueue_scripts();
|
17 |
+
|
18 |
+
// Make sure scripts for new media uploader in WordPress 3.5 is enqueued
|
19 |
+
wp_enqueue_media();
|
20 |
+
wp_enqueue_script( 'rwmb-image-advanced', RWMB_JS_URL . 'image-advanced.js', array( 'jquery', 'underscore' ), RWMB_VER, true );
|
21 |
+
wp_localize_script( 'rwmb-image-advanced', 'rwmbImageAdvanced', array(
|
22 |
+
'frameTitle' => __( 'Select Images', 'rwmb' ),
|
23 |
+
) );
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Add actions
|
28 |
+
*
|
29 |
+
* @return void
|
30 |
+
*/
|
31 |
+
static function add_actions()
|
32 |
+
{
|
33 |
+
// Do same actions as file field
|
34 |
+
parent::add_actions();
|
35 |
+
|
36 |
+
// Attach images via Ajax
|
37 |
+
add_action( 'wp_ajax_rwmb_attach_media', array( __CLASS__, 'wp_ajax_attach_media' ) );
|
38 |
+
add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Ajax callback for attaching media to field
|
43 |
+
*
|
44 |
+
* @return void
|
45 |
+
*/
|
46 |
+
static function wp_ajax_attach_media()
|
47 |
+
{
|
48 |
+
$post_id = is_numeric( $_REQUEST['post_id'] ) ? $_REQUEST['post_id'] : 0;
|
49 |
+
$field_id = isset( $_POST['field_id'] ) ? $_POST['field_id'] : 0;
|
50 |
+
$attachment_ids = isset( $_POST['attachment_ids'] ) ? $_POST['attachment_ids'] : array();
|
51 |
+
|
52 |
+
check_ajax_referer( "rwmb-attach-media_{$field_id}" );
|
53 |
+
foreach ( $attachment_ids as $attachment_id )
|
54 |
+
{
|
55 |
+
add_post_meta( $post_id, $field_id, $attachment_id, false );
|
56 |
+
}
|
57 |
+
wp_send_json_success();
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get field HTML
|
62 |
+
*
|
63 |
+
* @param string $html
|
64 |
+
* @param mixed $meta
|
65 |
+
* @param array $field
|
66 |
+
*
|
67 |
+
* @return string
|
68 |
+
*/
|
69 |
+
static function html( $html, $meta, $field )
|
70 |
+
{
|
71 |
+
$i18n_title = apply_filters( 'rwmb_image_advanced_select_string', _x( 'Select or Upload Images', 'image upload', 'rwmb' ), $field );
|
72 |
+
$attach_nonce = wp_create_nonce( "rwmb-attach-media_{$field['id']}" );
|
73 |
+
|
74 |
+
// Uploaded images
|
75 |
+
$html .= self::get_uploaded_images( $meta, $field );
|
76 |
+
|
77 |
+
// Show form upload
|
78 |
+
$classes = array( 'button', 'rwmb-image-advanced-upload', 'hide-if-no-js', 'new-files' );
|
79 |
+
if ( ! empty( $field['max_file_uploads'] ) && count( $meta ) >= (int) $field['max_file_uploads'] )
|
80 |
+
$classes[] = 'hidden';
|
81 |
+
|
82 |
+
$classes = implode( ' ', $classes );
|
83 |
+
$html .= "<a href='#' class='{$classes}' data-attach_media_nonce={$attach_nonce}>{$i18n_title}</a>";
|
84 |
+
|
85 |
+
return $html;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Get field value
|
90 |
+
* It's the combination of new (uploaded) images and saved images
|
91 |
+
*
|
92 |
+
* @param array $new
|
93 |
+
* @param array $old
|
94 |
+
* @param int $post_id
|
95 |
+
* @param array $field
|
96 |
+
*
|
97 |
+
* @return array|mixed
|
98 |
+
*/
|
99 |
+
static function value( $new, $old, $post_id, $field )
|
100 |
+
{
|
101 |
+
$new = (array) $new;
|
102 |
+
return array_unique( array_merge( $old, $new ) );
|
103 |
+
}
|
104 |
+
|
105 |
+
static function print_templates()
|
106 |
+
{
|
107 |
+
$i18n_delete = apply_filters( 'rwmb_image_delete_string', _x( 'Delete', 'image upload', 'rwmb' ) );
|
108 |
+
$i18n_edit = apply_filters( 'rwmb_image_edit_string', _x( 'Edit', 'image upload', 'rwmb' ) );
|
109 |
+
?>
|
110 |
+
<script id="tmpl-rwmb-image-advanced" type="text/html">
|
111 |
+
<% _.each( attachments, function( attachment ) { %>
|
112 |
+
<li id="item_<%= attachment.id %>">
|
113 |
+
<% if ( attachment.sizes.hasOwnProperty( 'thumbnail' ) ) { %>
|
114 |
+
<img src="<%= attachment.sizes.thumbnail.url %>">
|
115 |
+
<% } else { %>
|
116 |
+
<img src="<%= attachment.sizes.full.url %>">
|
117 |
+
<% } %>
|
118 |
+
<div class="rwmb-image-bar">
|
119 |
+
<a title="<?php echo $i18n_edit; ?>" class="rwmb-edit-file" href="<%= attachment.editLink %>" target="_blank"><?php echo $i18n_edit; ?></a> |
|
120 |
+
<a title="<?php echo $i18n_delete; ?>" class="rwmb-delete-file" href="#" data-attachment_id="<%= attachment.id %>">×</a>
|
121 |
+
</div>
|
122 |
+
</li>
|
123 |
+
<% } );%>
|
124 |
+
</script>
|
125 |
+
<?php
|
126 |
+
}
|
127 |
+
|
128 |
+
}
|
129 |
+
}
|
inc/fields/image.php
CHANGED
@@ -45,7 +45,7 @@ if ( ! class_exists( 'RWMB_Image_Field' ) )
|
|
45 |
$field_id = isset( $_POST['field_id'] ) ? $_POST['field_id'] : 0;
|
46 |
$order = isset( $_POST['order'] ) ? $_POST['order'] : 0;
|
47 |
|
48 |
-
|
49 |
|
50 |
parse_str( $order, $items );
|
51 |
$items = $items['item'];
|
@@ -75,16 +75,11 @@ if ( ! class_exists( 'RWMB_Image_Field' ) )
|
|
75 |
*/
|
76 |
static function html( $html, $meta, $field )
|
77 |
{
|
78 |
-
$i18n_title = _x( 'Upload
|
79 |
-
$i18n_more = _x( '+ Add new image', 'image upload', 'rwmb' );
|
80 |
-
|
81 |
-
$html = wp_nonce_field( "rwmb-delete-file_{$field['id']}", "nonce-delete-file_{$field['id']}", false, false );
|
82 |
-
$html .= wp_nonce_field( "rwmb-reorder-images_{$field['id']}", "nonce-reorder-images_{$field['id']}", false, false );
|
83 |
-
$html .= "<input type='hidden' class='field-id' value='{$field['id']}' />";
|
84 |
|
85 |
// Uploaded images
|
86 |
-
|
87 |
-
$html .= self::get_uploaded_images( $meta, $field );
|
88 |
|
89 |
// Show form upload
|
90 |
$html .= sprintf(
|
@@ -111,11 +106,25 @@ if ( ! class_exists( 'RWMB_Image_Field' ) )
|
|
111 |
*/
|
112 |
static function get_uploaded_images( $images, $field )
|
113 |
{
|
114 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
foreach ( $images as $image )
|
117 |
{
|
118 |
-
$html .= self::img_html( $image
|
119 |
}
|
120 |
|
121 |
$html .= '</ul>';
|
@@ -127,20 +136,19 @@ if ( ! class_exists( 'RWMB_Image_Field' ) )
|
|
127 |
* Get HTML markup for ONE uploaded image
|
128 |
*
|
129 |
* @param int $image Image ID
|
130 |
-
* @param int $field
|
131 |
*
|
132 |
* @return string
|
133 |
*/
|
134 |
-
static function img_html( $image
|
135 |
{
|
136 |
-
$i18n_delete = _x( 'Delete', 'image upload', 'rwmb' );
|
137 |
-
$i18n_edit = _x( 'Edit', 'image upload', 'rwmb' );
|
138 |
$li = '
|
139 |
<li id="item_%s">
|
140 |
<img src="%s" />
|
141 |
<div class="rwmb-image-bar">
|
142 |
<a title="%s" class="rwmb-edit-file" href="%s" target="_blank">%s</a> |
|
143 |
-
<a title="%s" class="rwmb-delete-file" href="#" data-
|
144 |
</div>
|
145 |
</li>
|
146 |
';
|
@@ -154,7 +162,7 @@ if ( ! class_exists( 'RWMB_Image_Field' ) )
|
|
154 |
$image,
|
155 |
$src,
|
156 |
$i18n_edit, $link, $i18n_edit,
|
157 |
-
$i18n_delete, $
|
158 |
);
|
159 |
}
|
160 |
|
@@ -177,7 +185,7 @@ if ( ! class_exists( 'RWMB_Image_Field' ) )
|
|
177 |
if ( empty( $meta ) )
|
178 |
return array();
|
179 |
|
180 |
-
$meta = implode( ',' , $meta );
|
181 |
|
182 |
// Re-arrange images with 'menu_order'
|
183 |
$meta = $wpdb->get_col( "
|
@@ -190,4 +198,4 @@ if ( ! class_exists( 'RWMB_Image_Field' ) )
|
|
190 |
return (array) $meta;
|
191 |
}
|
192 |
}
|
193 |
-
}
|
45 |
$field_id = isset( $_POST['field_id'] ) ? $_POST['field_id'] : 0;
|
46 |
$order = isset( $_POST['order'] ) ? $_POST['order'] : 0;
|
47 |
|
48 |
+
check_ajax_referer( "rwmb-reorder-images_{$field_id}" );
|
49 |
|
50 |
parse_str( $order, $items );
|
51 |
$items = $items['item'];
|
75 |
*/
|
76 |
static function html( $html, $meta, $field )
|
77 |
{
|
78 |
+
$i18n_title = apply_filters( 'rwmb_image_upload_string', _x( 'Upload Images', 'image upload', 'rwmb' ), $field );
|
79 |
+
$i18n_more = apply_filters( 'rwmb_image_add_string', _x( '+ Add new image', 'image upload', 'rwmb' ), $field );
|
|
|
|
|
|
|
|
|
80 |
|
81 |
// Uploaded images
|
82 |
+
$html .= self::get_uploaded_images( $meta, $field );
|
|
|
83 |
|
84 |
// Show form upload
|
85 |
$html .= sprintf(
|
106 |
*/
|
107 |
static function get_uploaded_images( $images, $field )
|
108 |
{
|
109 |
+
$reorder_nonce = wp_create_nonce( "rwmb-reorder-images_{$field['id']}" );
|
110 |
+
$delete_nonce = wp_create_nonce( "rwmb-delete-file_{$field['id']}" );
|
111 |
+
$classes = array('rwmb-images', 'rwmb-uploaded');
|
112 |
+
if ( count( $images ) <= 0 )
|
113 |
+
$classes[] = 'hidden';
|
114 |
+
$ul = '<ul class="%s" data-field_id="%s" data-delete_nonce="%s" data-reorder_nonce="%s" data-force_delete="%s" data-max_file_uploads="%s">';
|
115 |
+
$html = sprintf(
|
116 |
+
$ul,
|
117 |
+
implode( ' ', $classes ),
|
118 |
+
$field['id'],
|
119 |
+
$delete_nonce,
|
120 |
+
$reorder_nonce,
|
121 |
+
$field['force_delete'] ? 1 : 0,
|
122 |
+
$field['max_file_uploads']
|
123 |
+
);
|
124 |
|
125 |
foreach ( $images as $image )
|
126 |
{
|
127 |
+
$html .= self::img_html( $image );
|
128 |
}
|
129 |
|
130 |
$html .= '</ul>';
|
136 |
* Get HTML markup for ONE uploaded image
|
137 |
*
|
138 |
* @param int $image Image ID
|
|
|
139 |
*
|
140 |
* @return string
|
141 |
*/
|
142 |
+
static function img_html( $image )
|
143 |
{
|
144 |
+
$i18n_delete = apply_filters( 'rwmb_image_delete_string', _x( 'Delete', 'image upload', 'rwmb' ) );
|
145 |
+
$i18n_edit = apply_filters( 'rwmb_image_edit_string', _x( 'Edit', 'image upload', 'rwmb' ) );
|
146 |
$li = '
|
147 |
<li id="item_%s">
|
148 |
<img src="%s" />
|
149 |
<div class="rwmb-image-bar">
|
150 |
<a title="%s" class="rwmb-edit-file" href="%s" target="_blank">%s</a> |
|
151 |
+
<a title="%s" class="rwmb-delete-file" href="#" data-attachment_id="%s">×</a>
|
152 |
</div>
|
153 |
</li>
|
154 |
';
|
162 |
$image,
|
163 |
$src,
|
164 |
$i18n_edit, $link, $i18n_edit,
|
165 |
+
$i18n_delete, $image
|
166 |
);
|
167 |
}
|
168 |
|
185 |
if ( empty( $meta ) )
|
186 |
return array();
|
187 |
|
188 |
+
$meta = implode( ',' , (array) $meta );
|
189 |
|
190 |
// Re-arrange images with 'menu_order'
|
191 |
$meta = $wpdb->get_col( "
|
198 |
return (array) $meta;
|
199 |
}
|
200 |
}
|
201 |
+
}
|
inc/fields/map.php
CHANGED
@@ -30,9 +30,11 @@ if ( !class_exists( 'RWMB_Map_Field' ) )
|
|
30 |
{
|
31 |
$address = isset( $field['address_field'] ) ? $field['address_field'] : false;
|
32 |
|
33 |
-
$html =
|
|
|
|
|
34 |
'<div class="rwmb-map-canvas" style="%s"></div>
|
35 |
-
<input type="hidden" name="%s"
|
36 |
isset( $field['style'] ) ? $field['style'] : '',
|
37 |
$field['field_name'],
|
38 |
$meta
|
@@ -41,11 +43,14 @@ if ( !class_exists( 'RWMB_Map_Field' ) )
|
|
41 |
if ( $address )
|
42 |
{
|
43 |
$html .= sprintf(
|
44 |
-
'<button class="button
|
45 |
is_array( $address ) ? implode( ',', $address ) : $address,
|
46 |
__( 'Find Address', 'rwmb' )
|
47 |
);
|
48 |
}
|
|
|
|
|
|
|
49 |
return $html;
|
50 |
}
|
51 |
}
|
30 |
{
|
31 |
$address = isset( $field['address_field'] ) ? $field['address_field'] : false;
|
32 |
|
33 |
+
$html = '<div class="rwmb-map-field">';
|
34 |
+
|
35 |
+
$html .= sprintf(
|
36 |
'<div class="rwmb-map-canvas" style="%s"></div>
|
37 |
+
<input type="hidden" name="%s" class="rwmb-map-coordinate" value="%s" />',
|
38 |
isset( $field['style'] ) ? $field['style'] : '',
|
39 |
$field['field_name'],
|
40 |
$meta
|
43 |
if ( $address )
|
44 |
{
|
45 |
$html .= sprintf(
|
46 |
+
'<button class="button rwmb-map-goto-address-button" type="button" value="%s">%s</button>',
|
47 |
is_array( $address ) ? implode( ',', $address ) : $address,
|
48 |
__( 'Find Address', 'rwmb' )
|
49 |
);
|
50 |
}
|
51 |
+
|
52 |
+
$html .= '</div>';
|
53 |
+
|
54 |
return $html;
|
55 |
}
|
56 |
}
|
inc/fields/oembed.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "text" field is loaded
|
6 |
+
require_once RWMB_FIELDS_DIR . 'url.php';
|
7 |
+
|
8 |
+
if ( ! class_exists( 'RWMB_OEmbed_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_OEmbed_Field extends RWMB_URL_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
static function admin_enqueue_scripts()
|
18 |
+
{
|
19 |
+
wp_enqueue_script( 'rwmb-oembed', RWMB_JS_URL . 'oembed.js', array( ), RWMB_VER, true );
|
20 |
+
//wp_enqueue_style( 'rwmb-oembed', RWMB_CSS_URL . 'oembed.css', array( ), RWMB_VER );
|
21 |
+
wp_localize_script( 'rwmb-oembed', 'RWMB_OEmbed', array( 'url' => RWMB_URL ) );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Add actions
|
26 |
+
*
|
27 |
+
* @return void
|
28 |
+
*/
|
29 |
+
static function add_actions()
|
30 |
+
{
|
31 |
+
// Attach images via Ajax
|
32 |
+
add_action( 'wp_ajax_rwmb_get_embed', array( __CLASS__, 'wp_ajax_get_embed' ) );
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Ajax callback for returning oEmbed HTML
|
37 |
+
*
|
38 |
+
* @return void
|
39 |
+
*/
|
40 |
+
static function wp_ajax_get_embed()
|
41 |
+
{
|
42 |
+
global $post;
|
43 |
+
$url = isset( $_POST['oembed_url'] ) ? $_POST['oembed_url'] : 0;
|
44 |
+
$post_id = is_numeric( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0;
|
45 |
+
if ( isset( $_REQUEST['post_id'] ) )
|
46 |
+
$post = get_post( $_REQUEST['post_id'] );
|
47 |
+
$embed = self::get_embed( $url );
|
48 |
+
RW_Meta_Box::ajax_response( $embed, 'success' );
|
49 |
+
exit;
|
50 |
+
}
|
51 |
+
|
52 |
+
/***
|
53 |
+
* Get embed html from url
|
54 |
+
* @param string $url
|
55 |
+
* $return string
|
56 |
+
*/
|
57 |
+
|
58 |
+
static function get_embed( $url )
|
59 |
+
{
|
60 |
+
|
61 |
+
$embed = wp_oembed_get( esc_url( $url ) );
|
62 |
+
|
63 |
+
if( $embed )
|
64 |
+
{
|
65 |
+
return $embed;
|
66 |
+
}
|
67 |
+
else
|
68 |
+
{
|
69 |
+
return 'Embed not available.';
|
70 |
+
}
|
71 |
+
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Get field HTML
|
76 |
+
*
|
77 |
+
* @param string $html
|
78 |
+
* @param mixed $meta
|
79 |
+
* @param array $field
|
80 |
+
*
|
81 |
+
* @return string
|
82 |
+
*/
|
83 |
+
static function html( $html, $meta, $field )
|
84 |
+
{
|
85 |
+
return sprintf(
|
86 |
+
'<input type="url" class="rwmb-oembed" name="%s" id="%s" value="%s" size="%s" />
|
87 |
+
<span class="spinner" style="display: none;"></span>
|
88 |
+
<a href="#" class="show-embed button-secondary">Show embed</a>
|
89 |
+
<div class="embed-code"> %s </div>',
|
90 |
+
$field['field_name'],
|
91 |
+
$field['id'],
|
92 |
+
$meta,
|
93 |
+
$field['size'],
|
94 |
+
self::get_embed( $meta )
|
95 |
+
);
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
inc/fields/password.php
CHANGED
@@ -2,9 +2,12 @@
|
|
2 |
// Prevent loading this file directly
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
|
|
|
|
|
|
5 |
if ( ! class_exists( 'RWMB_Password_Field' ) )
|
6 |
{
|
7 |
-
class RWMB_Password_Field
|
8 |
{
|
9 |
/**
|
10 |
* Get field HTML
|
@@ -25,21 +28,5 @@ if ( ! class_exists( 'RWMB_Password_Field' ) )
|
|
25 |
$field['size']
|
26 |
);
|
27 |
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Normalize parameters for field
|
31 |
-
*
|
32 |
-
* @param array $field
|
33 |
-
*
|
34 |
-
* @return array
|
35 |
-
*/
|
36 |
-
static function normalize_field( $field )
|
37 |
-
{
|
38 |
-
$field = wp_parse_args( $field, array(
|
39 |
-
'size' => 30,
|
40 |
-
) );
|
41 |
-
|
42 |
-
return $field;
|
43 |
-
}
|
44 |
}
|
45 |
}
|
2 |
// Prevent loading this file directly
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
5 |
+
// Make sure "text" field is loaded
|
6 |
+
require_once RWMB_FIELDS_DIR . 'text.php';
|
7 |
+
|
8 |
if ( ! class_exists( 'RWMB_Password_Field' ) )
|
9 |
{
|
10 |
+
class RWMB_Password_Field extends RWMB_Text_Field
|
11 |
{
|
12 |
/**
|
13 |
* Get field HTML
|
28 |
$field['size']
|
29 |
);
|
30 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
}
|
inc/fields/plupload-image.php
CHANGED
@@ -25,20 +25,36 @@ if ( ! class_exists( 'RWMB_Plupload_Image_Field' ) )
|
|
25 |
*/
|
26 |
static function handle_upload()
|
27 |
{
|
|
|
28 |
$post_id = is_numeric( $_REQUEST['post_id'] ) ? $_REQUEST['post_id'] : 0;
|
29 |
$field_id = isset( $_REQUEST['field_id'] ) ? $_REQUEST['field_id'] : '';
|
30 |
|
31 |
-
|
32 |
|
33 |
// You can use WP's wp_handle_upload() function:
|
34 |
$file = $_FILES['async-upload'];
|
35 |
$file_attr = wp_handle_upload( $file, array( 'test_form' => false ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
$attachment = array(
|
37 |
-
'guid'
|
38 |
-
'post_mime_type'
|
39 |
-
'post_title'
|
40 |
-
'post_content'
|
41 |
-
'post_status'
|
|
|
42 |
);
|
43 |
|
44 |
// Adds file as attachment to WordPress
|
@@ -50,13 +66,7 @@ if ( ! class_exists( 'RWMB_Plupload_Image_Field' ) )
|
|
50 |
// Save file ID in meta field
|
51 |
add_post_meta( $post_id, $field_id, $id, false );
|
52 |
|
53 |
-
|
54 |
-
$field = array(
|
55 |
-
'id' => $field_id,
|
56 |
-
'force_delete' => isset( $_REQUEST['force_delete'] ) ? intval( $_REQUEST['force_delete'] ) : 0,
|
57 |
-
);
|
58 |
-
|
59 |
-
RW_Meta_Box::ajax_response( self::img_html( $id, $field ), 'success' );
|
60 |
}
|
61 |
|
62 |
exit;
|
@@ -74,23 +84,6 @@ if ( ! class_exists( 'RWMB_Plupload_Image_Field' ) )
|
|
74 |
wp_enqueue_style( 'rwmb-plupload-image', RWMB_CSS_URL . 'plupload-image.css', array( 'wp-admin' ), RWMB_VER );
|
75 |
wp_enqueue_script( 'rwmb-plupload-image', RWMB_JS_URL . 'plupload-image.js', array( 'jquery-ui-sortable', 'wp-ajax-response', 'plupload-all' ), RWMB_VER, true );
|
76 |
wp_localize_script( 'rwmb-plupload-image', 'RWMB', array( 'url' => RWMB_URL ) );
|
77 |
-
wp_localize_script( 'rwmb-plupload-image', 'rwmb_plupload_defaults', array(
|
78 |
-
'runtimes' => 'html5,silverlight,flash,html4',
|
79 |
-
'file_data_name' => 'async-upload',
|
80 |
-
'multiple_queues' => true,
|
81 |
-
'max_file_size' => wp_max_upload_size() . 'b',
|
82 |
-
'url' => admin_url( 'admin-ajax.php' ),
|
83 |
-
'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
|
84 |
-
'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ),
|
85 |
-
'filters' => array(
|
86 |
-
array(
|
87 |
-
'title' => _x( 'Allowed Image Files', 'image upload', 'rwmb' ),
|
88 |
-
'extensions' => 'jpg,jpeg,gif,png',
|
89 |
-
),
|
90 |
-
),
|
91 |
-
'multipart' => true,
|
92 |
-
'urlstream_upload' => true,
|
93 |
-
) );
|
94 |
}
|
95 |
|
96 |
/**
|
@@ -108,54 +101,39 @@ if ( ! class_exists( 'RWMB_Plupload_Image_Field' ) )
|
|
108 |
$meta = ( array ) $meta;
|
109 |
|
110 |
// Filter to change the drag & drop box background string
|
111 |
-
$i18n_drop = apply_filters( '
|
112 |
-
$i18n_or = _x( 'or', 'image upload', 'rwmb' );
|
113 |
-
$i18n_select = _x( 'Select Files', 'image upload', 'rwmb' );
|
114 |
-
$img_prefix = $field['id'];
|
115 |
-
|
116 |
-
$html = wp_nonce_field( "rwmb-delete-file_{$field['id']}", "nonce-delete-file_{$field['id']}", false, false );
|
117 |
-
$html .= wp_nonce_field( "rwmb-reorder-images_{$field['id']}", "nonce-reorder-images_{$field['id']}", false, false );
|
118 |
-
$html .= wp_nonce_field( "rwmb-upload-images_{$field['id']}", "nonce-upload-images_{$field['id']}", false, false );
|
119 |
-
$html .= sprintf(
|
120 |
-
'<input type="hidden" class="field-id rwmb-image-prefix" value="%s" data-force_delete="%s" />',
|
121 |
-
$field['id'],
|
122 |
-
$field['force_delete'] ? 1 : 0
|
123 |
-
);
|
124 |
|
125 |
// Uploaded images
|
126 |
-
$html .= "<div id='{$img_prefix}-container'>";
|
127 |
|
128 |
// Check for max_file_uploads
|
129 |
-
$classes = array( 'rwmb-drag-drop', 'drag-drop', 'hide-if-no-js' );
|
130 |
-
if ( ! empty( $field['max_file_uploads'] ) )
|
131 |
-
|
132 |
-
|
133 |
-
$html .= "<input class='max_file_uploads' type='hidden' value='{$max_file_uploads}' />";
|
134 |
-
if ( count( $meta ) >= $max_file_uploads )
|
135 |
-
$classes[] = 'hidden';
|
136 |
-
}
|
137 |
|
138 |
$html .= self::get_uploaded_images( $meta, $field );
|
139 |
|
140 |
// Show form upload
|
141 |
$html .= sprintf(
|
142 |
-
'<div id="%s-dragdrop" class="%s">
|
143 |
<div class = "drag-drop-inside">
|
144 |
<p class="drag-drop-info">%s</p>
|
145 |
<p>%s</p>
|
146 |
<p class="drag-drop-buttons"><input id="%s-browse-button" type="button" value="%s" class="button" /></p>
|
147 |
</div>
|
148 |
</div>',
|
149 |
-
$
|
150 |
implode( ' ', $classes ),
|
|
|
|
|
151 |
$i18n_drop,
|
152 |
$i18n_or,
|
153 |
-
$
|
154 |
$i18n_select
|
155 |
);
|
156 |
|
157 |
-
$html .= '</div>';
|
158 |
-
|
159 |
return $html;
|
160 |
}
|
161 |
|
@@ -175,5 +153,43 @@ if ( ! class_exists( 'RWMB_Plupload_Image_Field' ) )
|
|
175 |
$new = (array) $new;
|
176 |
return array_unique( array_merge( $old, $new ) );
|
177 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
-
}
|
25 |
*/
|
26 |
static function handle_upload()
|
27 |
{
|
28 |
+
global $wpdb;
|
29 |
$post_id = is_numeric( $_REQUEST['post_id'] ) ? $_REQUEST['post_id'] : 0;
|
30 |
$field_id = isset( $_REQUEST['field_id'] ) ? $_REQUEST['field_id'] : '';
|
31 |
|
32 |
+
check_ajax_referer( "rwmb-upload-images_{$field_id}" );
|
33 |
|
34 |
// You can use WP's wp_handle_upload() function:
|
35 |
$file = $_FILES['async-upload'];
|
36 |
$file_attr = wp_handle_upload( $file, array( 'test_form' => false ) );
|
37 |
+
//Get next menu_order
|
38 |
+
$meta = get_post_meta( $post_id, $field_id, false );
|
39 |
+
if( empty( $meta ) ){
|
40 |
+
$next = 0;
|
41 |
+
} else {
|
42 |
+
$meta = implode( ',' , (array) $meta );
|
43 |
+
$max = $wpdb->get_var( "
|
44 |
+
SELECT MAX(menu_order) FROM {$wpdb->posts}
|
45 |
+
WHERE post_type = 'attachment'
|
46 |
+
AND ID in ({$meta})
|
47 |
+
" );
|
48 |
+
$next = is_numeric($max) ? (int) $max + 1: 0;
|
49 |
+
}
|
50 |
+
|
51 |
$attachment = array(
|
52 |
+
'guid' => $file_attr['url'],
|
53 |
+
'post_mime_type' => $file_attr['type'],
|
54 |
+
'post_title' => preg_replace( '/\.[^.]+$/', '', basename( $file['name'] ) ),
|
55 |
+
'post_content' => '',
|
56 |
+
'post_status' => 'inherit',
|
57 |
+
'menu_order' => $next
|
58 |
);
|
59 |
|
60 |
// Adds file as attachment to WordPress
|
66 |
// Save file ID in meta field
|
67 |
add_post_meta( $post_id, $field_id, $id, false );
|
68 |
|
69 |
+
RW_Meta_Box::ajax_response( self::img_html( $id ), 'success' );
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
|
72 |
exit;
|
84 |
wp_enqueue_style( 'rwmb-plupload-image', RWMB_CSS_URL . 'plupload-image.css', array( 'wp-admin' ), RWMB_VER );
|
85 |
wp_enqueue_script( 'rwmb-plupload-image', RWMB_JS_URL . 'plupload-image.js', array( 'jquery-ui-sortable', 'wp-ajax-response', 'plupload-all' ), RWMB_VER, true );
|
86 |
wp_localize_script( 'rwmb-plupload-image', 'RWMB', array( 'url' => RWMB_URL ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
}
|
88 |
|
89 |
/**
|
101 |
$meta = ( array ) $meta;
|
102 |
|
103 |
// Filter to change the drag & drop box background string
|
104 |
+
$i18n_drop = apply_filters( 'rwmb_plupload_image_drop_string', _x( 'Drop images here', 'image upload', 'rwmb' ), $field );
|
105 |
+
$i18n_or = apply_filters( 'rwmb_plupload_image_or_string', _x( 'or', 'image upload', 'rwmb' ), $field );
|
106 |
+
$i18n_select = apply_filters( 'rwmb_plupload_image_select_string', _x( 'Select Files', 'image upload', 'rwmb' ), $field );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
// Uploaded images
|
|
|
109 |
|
110 |
// Check for max_file_uploads
|
111 |
+
$classes = array( 'rwmb-drag-drop', 'drag-drop', 'hide-if-no-js', 'new-files');
|
112 |
+
if ( ! empty( $field['max_file_uploads'] ) && count( $meta ) >= (int) $field['max_file_uploads'] )
|
113 |
+
$classes[] = 'hidden';
|
114 |
+
|
|
|
|
|
|
|
|
|
115 |
|
116 |
$html .= self::get_uploaded_images( $meta, $field );
|
117 |
|
118 |
// Show form upload
|
119 |
$html .= sprintf(
|
120 |
+
'<div id="%s-dragdrop" class="%s" data-upload_nonce="%s" data-js_options="%s">
|
121 |
<div class = "drag-drop-inside">
|
122 |
<p class="drag-drop-info">%s</p>
|
123 |
<p>%s</p>
|
124 |
<p class="drag-drop-buttons"><input id="%s-browse-button" type="button" value="%s" class="button" /></p>
|
125 |
</div>
|
126 |
</div>',
|
127 |
+
$field['id'],
|
128 |
implode( ' ', $classes ),
|
129 |
+
wp_create_nonce( "rwmb-upload-images_{$field['id']}" ),
|
130 |
+
esc_attr( json_encode( $field['js_options'] ) ),
|
131 |
$i18n_drop,
|
132 |
$i18n_or,
|
133 |
+
$field['id'],
|
134 |
$i18n_select
|
135 |
);
|
136 |
|
|
|
|
|
137 |
return $html;
|
138 |
}
|
139 |
|
153 |
$new = (array) $new;
|
154 |
return array_unique( array_merge( $old, $new ) );
|
155 |
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Normalize parameters for field
|
159 |
+
*
|
160 |
+
* @param array $field
|
161 |
+
*
|
162 |
+
* @return array
|
163 |
+
*/
|
164 |
+
static function normalize_field( $field )
|
165 |
+
{
|
166 |
+
$field['js_options'] = array(
|
167 |
+
'runtimes' => 'html5,silverlight,flash,html4',
|
168 |
+
'file_data_name' => 'async-upload',
|
169 |
+
//'container' => $field['id'] . '-container',
|
170 |
+
'browse_button' => $field['id'] . '-browse-button',
|
171 |
+
'drop_element' => $field['id'] . '-dragdrop',
|
172 |
+
'multiple_queues' => true,
|
173 |
+
'max_file_size' => wp_max_upload_size() . 'b',
|
174 |
+
'url' => admin_url( 'admin-ajax.php' ),
|
175 |
+
'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
|
176 |
+
'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ),
|
177 |
+
'multipart' => true,
|
178 |
+
'urlstream_upload' => true,
|
179 |
+
'filters' => array(
|
180 |
+
array(
|
181 |
+
'title' => _x( 'Allowed Image Files', 'image upload', 'rwmb' ),
|
182 |
+
'extensions' => 'jpg,jpeg,gif,png',
|
183 |
+
),
|
184 |
+
),
|
185 |
+
'multipart_params' => array(
|
186 |
+
'field_id' => $field['id'],
|
187 |
+
'action' => 'rwmb_plupload_image_upload',
|
188 |
+
)
|
189 |
+
);
|
190 |
+
$field = parent::normalize_field( $field );
|
191 |
+
|
192 |
+
return $field;
|
193 |
+
}
|
194 |
}
|
195 |
+
}
|
inc/fields/post.php
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "select" field is loaded
|
6 |
+
require_once RWMB_FIELDS_DIR . 'select-advanced.php';
|
7 |
+
|
8 |
+
if ( !class_exists( 'RWMB_Post_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_Post_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
static function admin_enqueue_scripts()
|
18 |
+
{
|
19 |
+
RWMB_Select_Advanced_Field::admin_enqueue_scripts();
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Get field HTML
|
24 |
+
*
|
25 |
+
* @param string $html
|
26 |
+
* @param mixed $meta
|
27 |
+
* @param array $field
|
28 |
+
*
|
29 |
+
* @return string
|
30 |
+
*/
|
31 |
+
static function html( $html, $meta, $field )
|
32 |
+
{
|
33 |
+
$field['options'] = self::get_options( $field );
|
34 |
+
switch ( $field['field_type'] )
|
35 |
+
{
|
36 |
+
case 'select':
|
37 |
+
return RWMB_Select_Field::html( $html, $meta, $field );
|
38 |
+
break;
|
39 |
+
case 'select_advanced':
|
40 |
+
default:
|
41 |
+
return RWMB_Select_Advanced_Field::html( $html, $meta, $field );
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Normalize parameters for field
|
47 |
+
*
|
48 |
+
* @param array $field
|
49 |
+
*
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
static function normalize_field( $field )
|
53 |
+
{
|
54 |
+
$default_post_type = __( 'Post', 'rwmb' );
|
55 |
+
if ( is_string( $field['post_type'] ) )
|
56 |
+
{
|
57 |
+
$post_type_object = get_post_type_object( $field['post_type'] );
|
58 |
+
$default_post_type = $post_type_object->labels->singular_name;
|
59 |
+
}
|
60 |
+
|
61 |
+
$field = wp_parse_args( $field, array(
|
62 |
+
'post_type' => 'post',
|
63 |
+
'field_type' => 'select_advanced',
|
64 |
+
'parent' => false,
|
65 |
+
'query_args' => array()
|
66 |
+
) );
|
67 |
+
|
68 |
+
$field['std'] = empty( $field['std'] ) ? sprintf( __( 'Select a %s', 'rwmb' ), $default_post_type ) : $field['std'];
|
69 |
+
|
70 |
+
if ( $field['parent'] )
|
71 |
+
{
|
72 |
+
$field['multiple'] = false;
|
73 |
+
$field['field_name'] = 'parent_id';
|
74 |
+
}
|
75 |
+
|
76 |
+
$field['query_args'] = wp_parse_args( $field['query_args'], array(
|
77 |
+
'post_type' => $field['post_type'],
|
78 |
+
'post_status' => 'publish',
|
79 |
+
'posts_per_page' => '-1'
|
80 |
+
) );
|
81 |
+
|
82 |
+
switch ( $field['field_type'] )
|
83 |
+
{
|
84 |
+
case 'select':
|
85 |
+
return RWMB_Select_Field::normalize_field( $field );
|
86 |
+
break;
|
87 |
+
case 'select_advanced':
|
88 |
+
default:
|
89 |
+
return RWMB_Select_Advanced_Field::normalize_field( $field );
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Get meta value
|
95 |
+
* If field is cloneable, value is saved as a single entry in DB
|
96 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
97 |
+
*
|
98 |
+
* @see "save" method for better understanding
|
99 |
+
*
|
100 |
+
* @param $meta
|
101 |
+
* @param $post_id
|
102 |
+
* @param $saved
|
103 |
+
* @param $field
|
104 |
+
*
|
105 |
+
* @return array
|
106 |
+
*/
|
107 |
+
static function meta( $meta, $post_id, $saved, $field )
|
108 |
+
{
|
109 |
+
if ( isset( $field['parent'] ) && $field['parent'] )
|
110 |
+
{
|
111 |
+
$post = get_post( $post_id );
|
112 |
+
return $post->post_parent;
|
113 |
+
}
|
114 |
+
return RWMB_Select_Field::meta( $meta, $post_id, $saved, $field );
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Save meta value
|
119 |
+
* If field is cloneable, value is saved as a single entry in DB
|
120 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
121 |
+
*
|
122 |
+
* TODO: A good way to ALWAYS save values in single entry in DB, while maintaining backward compatibility
|
123 |
+
*
|
124 |
+
* @param $new
|
125 |
+
* @param $old
|
126 |
+
* @param $post_id
|
127 |
+
* @param $field
|
128 |
+
*/
|
129 |
+
static function save( $new, $old, $post_id, $field )
|
130 |
+
{
|
131 |
+
return RWMB_Select_Field::save( $new, $old, $post_id, $field );
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Get posts
|
136 |
+
*
|
137 |
+
* @param array $field
|
138 |
+
*
|
139 |
+
* @return array
|
140 |
+
*/
|
141 |
+
static function get_options( $field )
|
142 |
+
{
|
143 |
+
$results = get_posts( $field['query_args'] );
|
144 |
+
$options = array();
|
145 |
+
foreach ( $results as $result )
|
146 |
+
{
|
147 |
+
$options[$result->ID] = get_the_title( $result->ID );
|
148 |
+
}
|
149 |
+
return $options;
|
150 |
+
}
|
151 |
+
}
|
152 |
+
}
|
inc/fields/range.php
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( !class_exists( 'RWMB_Range_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Range_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_style( 'rwmb-range', RWMB_CSS_URL . 'range.css', array(), RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get field HTML
|
21 |
+
*
|
22 |
+
* @param string $html
|
23 |
+
* @param mixed $meta
|
24 |
+
* @param array $field
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
static function html( $html, $meta, $field )
|
29 |
+
{
|
30 |
+
return sprintf(
|
31 |
+
'<input type="range" class="rwmb-range" name="%s" id="%s" value="%s" min="%s" max="%s" step="%s" />',
|
32 |
+
$field['field_name'],
|
33 |
+
$field['id'],
|
34 |
+
$meta,
|
35 |
+
$field['min'],
|
36 |
+
$field['max'],
|
37 |
+
$field['step']
|
38 |
+
);
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Normalize parameters for field.
|
43 |
+
*
|
44 |
+
* @param array $field
|
45 |
+
*
|
46 |
+
* @return array
|
47 |
+
*/
|
48 |
+
static function normalize_field( $field )
|
49 |
+
{
|
50 |
+
$field = wp_parse_args( $field, array(
|
51 |
+
'min' => 0,
|
52 |
+
'max' => 10,
|
53 |
+
'step' => 1
|
54 |
+
) );
|
55 |
+
return $field;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Ensure number in range.
|
60 |
+
*
|
61 |
+
* @param mixed $new
|
62 |
+
* @param mixed $old
|
63 |
+
* @param int $post_id
|
64 |
+
* @param array $field
|
65 |
+
*
|
66 |
+
* @return int
|
67 |
+
*/
|
68 |
+
static function value( $new, $old, $post_id, $field )
|
69 |
+
{
|
70 |
+
$new = intval($new);
|
71 |
+
$min = intval($field['min']);
|
72 |
+
$max = intval($field['max']);
|
73 |
+
|
74 |
+
if ($new < $min) {
|
75 |
+
return $min;
|
76 |
+
}
|
77 |
+
else if ($new > $max) {
|
78 |
+
return $max;
|
79 |
+
}
|
80 |
+
|
81 |
+
return $new;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
inc/fields/select-advanced.php
CHANGED
@@ -1,88 +1,79 @@
|
|
1 |
-
<?php
|
2 |
-
// Prevent loading this file directly
|
3 |
-
defined( 'ABSPATH' ) || exit;
|
4 |
-
|
5 |
-
// Make sure "select" field is loaded
|
6 |
-
require_once RWMB_FIELDS_DIR . 'select.php';
|
7 |
-
|
8 |
-
if ( !class_exists( 'RWMB_Select_Advanced_Field' ) )
|
9 |
-
{
|
10 |
-
class RWMB_Select_Advanced_Field extends RWMB_Select_Field
|
11 |
-
{
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles
|
14 |
-
*
|
15 |
-
* @return void
|
16 |
-
*/
|
17 |
-
static function admin_enqueue_scripts()
|
18 |
-
{
|
19 |
-
wp_enqueue_style( 'select2', RWMB_CSS_URL . 'select2/select2.css', array(), '3.2' );
|
20 |
-
wp_enqueue_style( 'rwmb-select-advanced', RWMB_CSS_URL . 'select-advanced.css', array(), RWMB_VER );
|
21 |
-
|
22 |
-
wp_register_script( 'select2', RWMB_JS_URL . 'select2/select2.min.js', array(), '3.2', true );
|
23 |
-
wp_enqueue_script( 'rwmb-select-advanced', RWMB_JS_URL . 'select-advanced.js', array( 'select2' ), RWMB_VER, true );
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Get field HTML
|
28 |
-
*
|
29 |
-
* @param string $html
|
30 |
-
* @param mixed $meta
|
31 |
-
* @param array $field
|
32 |
-
*
|
33 |
-
* @return string
|
34 |
-
*/
|
35 |
-
static function html( $html, $meta, $field )
|
36 |
-
{
|
37 |
-
$html = sprintf(
|
38 |
-
'<select class="rwmb-select-advanced" name="%s" id="%s"%s data-options="%s">',
|
39 |
-
$field['field_name'],
|
40 |
-
$field['id'],
|
41 |
-
$field['
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
'allowClear' => true,
|
81 |
-
'width' => 'resolve',
|
82 |
-
'placeholder' => __( 'Select a value', 'rwmb' )
|
83 |
-
) );
|
84 |
-
|
85 |
-
return $field;
|
86 |
-
}
|
87 |
-
}
|
88 |
-
}
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "select" field is loaded
|
6 |
+
require_once RWMB_FIELDS_DIR . 'select.php';
|
7 |
+
|
8 |
+
if ( !class_exists( 'RWMB_Select_Advanced_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_Select_Advanced_Field extends RWMB_Select_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
static function admin_enqueue_scripts()
|
18 |
+
{
|
19 |
+
wp_enqueue_style( 'select2', RWMB_CSS_URL . 'select2/select2.css', array(), '3.2' );
|
20 |
+
wp_enqueue_style( 'rwmb-select-advanced', RWMB_CSS_URL . 'select-advanced.css', array(), RWMB_VER );
|
21 |
+
|
22 |
+
wp_register_script( 'select2', RWMB_JS_URL . 'select2/select2.min.js', array(), '3.2', true );
|
23 |
+
wp_enqueue_script( 'rwmb-select-advanced', RWMB_JS_URL . 'select-advanced.js', array( 'select2' ), RWMB_VER, true );
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Get field HTML
|
28 |
+
*
|
29 |
+
* @param string $html
|
30 |
+
* @param mixed $meta
|
31 |
+
* @param array $field
|
32 |
+
*
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
static function html( $html, $meta, $field )
|
36 |
+
{
|
37 |
+
$html = sprintf(
|
38 |
+
'<select class="rwmb-select-advanced" name="%s" id="%s" size="%s"%s data-options="%s">',
|
39 |
+
$field['field_name'],
|
40 |
+
$field['id'],
|
41 |
+
$field['size'],
|
42 |
+
$field['multiple'] ? ' multiple="multiple"' : '',
|
43 |
+
esc_attr( json_encode( $field['js_options'] ) )
|
44 |
+
);
|
45 |
+
|
46 |
+
$html .= self::options_html( $field, $meta );
|
47 |
+
|
48 |
+
$html .= '</select>';
|
49 |
+
|
50 |
+
return $html;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Normalize parameters for field
|
55 |
+
*
|
56 |
+
* @param array $field
|
57 |
+
*
|
58 |
+
* @return array
|
59 |
+
*/
|
60 |
+
static function normalize_field( $field )
|
61 |
+
{
|
62 |
+
$field = parent::normalize_field( $field );
|
63 |
+
|
64 |
+
$field = wp_parse_args( $field, array(
|
65 |
+
'js_options' => array(),
|
66 |
+
) );
|
67 |
+
|
68 |
+
$field['js_options'] = wp_parse_args( $field['js_options'], array(
|
69 |
+
'allowClear' => true,
|
70 |
+
'width' => 'resolve',
|
71 |
+
'placeholder' => empty( $field['std'] ) ? __( 'Select a value', 'rwmb' ) : $field['std']
|
72 |
+
) );
|
73 |
+
|
74 |
+
$field['std'] = '';
|
75 |
+
|
76 |
+
return $field;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/fields/select.php
CHANGED
@@ -28,23 +28,15 @@ if ( !class_exists( 'RWMB_Select_Field' ) )
|
|
28 |
static function html( $html, $meta, $field )
|
29 |
{
|
30 |
$html = sprintf(
|
31 |
-
'<select class="rwmb-select" name="%s" id="%s"%s>',
|
32 |
$field['field_name'],
|
33 |
$field['id'],
|
|
|
34 |
$field['multiple'] ? ' multiple="multiple"' : ''
|
35 |
);
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
{
|
40 |
-
$html .= sprintf(
|
41 |
-
$option,
|
42 |
-
$value,
|
43 |
-
/* selected( in_array( $value, $meta ), true, false ),*/
|
44 |
-
selected( in_array( $value, (array)$meta ), true, false ),
|
45 |
-
$label
|
46 |
-
);
|
47 |
-
}
|
48 |
$html .= '</select>';
|
49 |
|
50 |
return $html;
|
@@ -112,10 +104,40 @@ if ( !class_exists( 'RWMB_Select_Field' ) )
|
|
112 |
*/
|
113 |
static function normalize_field( $field )
|
114 |
{
|
115 |
-
$field
|
|
|
|
|
|
|
|
|
116 |
if ( !$field['clone'] && $field['multiple'] )
|
117 |
$field['field_name'] .= '[]';
|
118 |
return $field;
|
119 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
}
|
28 |
static function html( $html, $meta, $field )
|
29 |
{
|
30 |
$html = sprintf(
|
31 |
+
'<select class="rwmb-select" name="%s" id="%s" size="%s"%s>',
|
32 |
$field['field_name'],
|
33 |
$field['id'],
|
34 |
+
$field['size'],
|
35 |
$field['multiple'] ? ' multiple="multiple"' : ''
|
36 |
);
|
37 |
+
|
38 |
+
$html .= self::options_html( $field, $meta );
|
39 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
$html .= '</select>';
|
41 |
|
42 |
return $html;
|
104 |
*/
|
105 |
static function normalize_field( $field )
|
106 |
{
|
107 |
+
$field = wp_parse_args( $field, array(
|
108 |
+
'desc'=> '',
|
109 |
+
'name' => $field['id'],
|
110 |
+
'size' => $field['multiple'] ? 5 : 0,
|
111 |
+
) );
|
112 |
if ( !$field['clone'] && $field['multiple'] )
|
113 |
$field['field_name'] .= '[]';
|
114 |
return $field;
|
115 |
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Creates html for options
|
119 |
+
*
|
120 |
+
* @param array $field
|
121 |
+
*
|
122 |
+
* @return array
|
123 |
+
*/
|
124 |
+
static function options_html( $field, $meta )
|
125 |
+
{
|
126 |
+
$html = "<option value=''>{$field['std']}</option>";
|
127 |
+
|
128 |
+
$option = '<option value="%s" %s>%s</option>';
|
129 |
+
|
130 |
+
foreach ( $field['options'] as $value => $label )
|
131 |
+
{
|
132 |
+
$html .= sprintf(
|
133 |
+
$option,
|
134 |
+
$value,
|
135 |
+
selected( in_array( $value, (array)$meta ), true, false ),
|
136 |
+
$label
|
137 |
+
);
|
138 |
+
}
|
139 |
+
|
140 |
+
return $html;
|
141 |
+
}
|
142 |
}
|
143 |
}
|
inc/fields/slider.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
// Prevent loading this file directly
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
5 |
-
if ( !
|
6 |
{
|
7 |
class RWMB_Slider_Field
|
8 |
{
|
@@ -16,8 +16,10 @@ if ( ! class_exists( 'RWMB_Slider_Field' ) )
|
|
16 |
$url = RWMB_CSS_URL . 'jqueryui';
|
17 |
wp_enqueue_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
|
18 |
wp_enqueue_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
|
|
|
|
|
19 |
|
20 |
-
wp_enqueue_script( 'rwmb-slider', RWMB_JS_URL . 'slider.js', array( 'jquery-ui-slider' ), RWMB_VER, true );
|
21 |
}
|
22 |
|
23 |
/**
|
@@ -33,14 +35,35 @@ if ( ! class_exists( 'RWMB_Slider_Field' ) )
|
|
33 |
{
|
34 |
return sprintf(
|
35 |
'<div class="clearfix">
|
36 |
-
<div class="rwmb-slider"
|
|
|
37 |
<input type="hidden" name="%s" value="%s" />
|
38 |
</div>',
|
39 |
-
$field['
|
40 |
-
$field['
|
41 |
-
$field['field_name'],
|
42 |
-
$meta
|
43 |
);
|
44 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
-
}
|
2 |
// Prevent loading this file directly
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
5 |
+
if ( !class_exists( 'RWMB_Slider_Field' ) )
|
6 |
{
|
7 |
class RWMB_Slider_Field
|
8 |
{
|
16 |
$url = RWMB_CSS_URL . 'jqueryui';
|
17 |
wp_enqueue_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
|
18 |
wp_enqueue_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
|
19 |
+
wp_enqueue_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array(), '1.8.17' );
|
20 |
+
wp_enqueue_style( 'rwmb-slider', RWMB_CSS_URL . 'slider.css' );
|
21 |
|
22 |
+
wp_enqueue_script( 'rwmb-slider', RWMB_JS_URL . 'slider.js', array( 'jquery-ui-slider', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-core' ), RWMB_VER, true );
|
23 |
}
|
24 |
|
25 |
/**
|
35 |
{
|
36 |
return sprintf(
|
37 |
'<div class="clearfix">
|
38 |
+
<div class="rwmb-slider" id="%s" data-options="%s"></div>
|
39 |
+
<span class="rwmb-slider-value-label">%s<span>%s</span>%s</span>
|
40 |
<input type="hidden" name="%s" value="%s" />
|
41 |
</div>',
|
42 |
+
$field['id'], esc_attr( json_encode( $field['js_options'] ) ),
|
43 |
+
$field['prefix'], $meta, $field['suffix'],
|
44 |
+
$field['field_name'], $meta
|
|
|
45 |
);
|
46 |
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Normalize parameters for field
|
50 |
+
*
|
51 |
+
* @param array $field
|
52 |
+
*
|
53 |
+
* @return array
|
54 |
+
*/
|
55 |
+
static function normalize_field( $field )
|
56 |
+
{
|
57 |
+
$field = wp_parse_args( $field, array(
|
58 |
+
'prefix' => '',
|
59 |
+
'suffix' => '',
|
60 |
+
'js_options' => array(),
|
61 |
+
) );
|
62 |
+
$field['js_options'] = wp_parse_args( $field['js_options'], array(
|
63 |
+
'range' => 'min', // range = 'min' will add a dark background to sliding part, better UI
|
64 |
+
) );
|
65 |
+
|
66 |
+
return $field;
|
67 |
+
}
|
68 |
}
|
69 |
+
}
|
inc/fields/taxonomy.php
CHANGED
@@ -1,259 +1,261 @@
|
|
1 |
-
<?php
|
2 |
-
// Prevent loading this file directly
|
3 |
-
defined( 'ABSPATH' ) || exit;
|
4 |
-
require_once RWMB_FIELDS_DIR . 'select-advanced.php';
|
5 |
-
require_once RWMB_FIELDS_DIR . 'checkbox-list.php';
|
6 |
-
|
7 |
-
if ( ! class_exists( 'RWMB_Taxonomy_Field' ) )
|
8 |
-
{
|
9 |
-
class RWMB_Taxonomy_Field
|
10 |
-
{
|
11 |
-
/**
|
12 |
-
* Enqueue scripts and styles
|
13 |
-
*
|
14 |
-
* @return void
|
15 |
-
*/
|
16 |
-
static function admin_enqueue_scripts()
|
17 |
-
{
|
18 |
-
RWMB_Select_Advanced_Field::admin_enqueue_scripts();
|
19 |
-
wp_enqueue_style( 'rwmb-taxonomy', RWMB_CSS_URL . 'taxonomy.css', array(), RWMB_VER );
|
20 |
-
wp_enqueue_script( 'rwmb-taxonomy', RWMB_JS_URL . 'taxonomy.js', array( 'jquery', 'rwmb-select-advanced', 'wp-ajax-response' ), RWMB_VER, true );
|
21 |
-
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Add default value for 'taxonomy' field
|
25 |
-
*
|
26 |
-
* @param $field
|
27 |
-
*
|
28 |
-
* @return array
|
29 |
-
*/
|
30 |
-
static function normalize_field( $field )
|
31 |
-
{
|
32 |
-
$default_args = array(
|
33 |
-
'hide_empty' => false,
|
34 |
-
);
|
35 |
-
|
36 |
-
//Set default args
|
37 |
-
$field['options']['args'] = ( ! isset( $field['options']['args'] ) ) ? $default_args : wp_parse_args( $field['options']['args'], $default_args );
|
38 |
-
|
39 |
-
|
40 |
-
$field['
|
41 |
-
|
42 |
-
switch( $field['options']['type'] )
|
43 |
-
{
|
44 |
-
case 'select_advanced':
|
45 |
-
$field = RWMB_Select_Advanced_Field::normalize_field( $field );
|
46 |
-
break;
|
47 |
-
case 'checkbox_list':
|
48 |
-
case 'checkbox_tree':
|
49 |
-
$field = RWMB_Checkbox_List_Field::normalize_field( $field );
|
50 |
-
break;
|
51 |
-
case 'select':
|
52 |
-
case 'select_tree':
|
53 |
-
$field = RWMB_Select_Field::normalize_field( $field );
|
54 |
-
break;
|
55 |
-
default:
|
56 |
-
$field['options']['type'] = 'select';
|
57 |
-
$field = RWMB_Select_Field::normalize_field( $field );
|
58 |
-
}
|
59 |
-
|
60 |
-
if ( in_array( $field['options']['type'], array( 'checkbox_tree', 'select_tree' ) ) )
|
61 |
-
{
|
62 |
-
if ( isset( $field['options']['args']['parent'] ) )
|
63 |
-
{
|
64 |
-
$field['options']['parent'] = $field['options']['args']['parent'];
|
65 |
-
unset( $field['options']['args']['parent'] );
|
66 |
-
}
|
67 |
-
else
|
68 |
-
{
|
69 |
-
$field['options']['parent'] = 0;
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
*
|
80 |
-
*
|
81 |
-
* @param $
|
82 |
-
*
|
83 |
-
* @
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
$
|
92 |
-
|
93 |
-
$
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
*
|
123 |
-
*
|
124 |
-
* @param $
|
125 |
-
* @param
|
126 |
-
* @param
|
127 |
-
*
|
128 |
-
* @
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
$
|
137 |
-
|
138 |
-
$
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
$
|
146 |
-
|
147 |
-
$term->
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
*
|
160 |
-
*
|
161 |
-
* @param $
|
162 |
-
* @param
|
163 |
-
* @param
|
164 |
-
* @param
|
165 |
-
*
|
166 |
-
* @
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
$
|
175 |
-
$
|
176 |
-
$
|
177 |
-
|
178 |
-
$
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
*
|
193 |
-
*
|
194 |
-
* @
|
195 |
-
*
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
*
|
211 |
-
*
|
212 |
-
* @param $
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
*
|
228 |
-
*
|
229 |
-
* @param $
|
230 |
-
*
|
231 |
-
* @param $
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
*
|
242 |
-
*
|
243 |
-
* @param
|
244 |
-
* @param
|
245 |
-
*
|
246 |
-
* @
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
$
|
253 |
-
|
254 |
-
$meta =
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
}
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
require_once RWMB_FIELDS_DIR . 'select-advanced.php';
|
5 |
+
require_once RWMB_FIELDS_DIR . 'checkbox-list.php';
|
6 |
+
|
7 |
+
if ( ! class_exists( 'RWMB_Taxonomy_Field' ) )
|
8 |
+
{
|
9 |
+
class RWMB_Taxonomy_Field
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* Enqueue scripts and styles
|
13 |
+
*
|
14 |
+
* @return void
|
15 |
+
*/
|
16 |
+
static function admin_enqueue_scripts()
|
17 |
+
{
|
18 |
+
RWMB_Select_Advanced_Field::admin_enqueue_scripts();
|
19 |
+
wp_enqueue_style( 'rwmb-taxonomy', RWMB_CSS_URL . 'taxonomy.css', array(), RWMB_VER );
|
20 |
+
wp_enqueue_script( 'rwmb-taxonomy', RWMB_JS_URL . 'taxonomy.js', array( 'jquery', 'rwmb-select-advanced', 'wp-ajax-response' ), RWMB_VER, true );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Add default value for 'taxonomy' field
|
25 |
+
*
|
26 |
+
* @param $field
|
27 |
+
*
|
28 |
+
* @return array
|
29 |
+
*/
|
30 |
+
static function normalize_field( $field )
|
31 |
+
{
|
32 |
+
$default_args = array(
|
33 |
+
'hide_empty' => false,
|
34 |
+
);
|
35 |
+
|
36 |
+
//Set default args
|
37 |
+
$field['options']['args'] = ( ! isset( $field['options']['args'] ) ) ? $default_args : wp_parse_args( $field['options']['args'], $default_args );
|
38 |
+
|
39 |
+
$tax = get_taxonomy( $field['options']['taxonomy'] );
|
40 |
+
$field['std'] = empty( $field['std'] ) ? sprintf( __( 'Select a %s' , 'rwmb' ), $tax->labels->singular_name ) : $field['std'];
|
41 |
+
|
42 |
+
switch( $field['options']['type'] )
|
43 |
+
{
|
44 |
+
case 'select_advanced':
|
45 |
+
$field = RWMB_Select_Advanced_Field::normalize_field( $field );
|
46 |
+
break;
|
47 |
+
case 'checkbox_list':
|
48 |
+
case 'checkbox_tree':
|
49 |
+
$field = RWMB_Checkbox_List_Field::normalize_field( $field );
|
50 |
+
break;
|
51 |
+
case 'select':
|
52 |
+
case 'select_tree':
|
53 |
+
$field = RWMB_Select_Field::normalize_field( $field );
|
54 |
+
break;
|
55 |
+
default:
|
56 |
+
$field['options']['type'] = 'select';
|
57 |
+
$field = RWMB_Select_Field::normalize_field( $field );
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( in_array( $field['options']['type'], array( 'checkbox_tree', 'select_tree' ) ) )
|
61 |
+
{
|
62 |
+
if ( isset( $field['options']['args']['parent'] ) )
|
63 |
+
{
|
64 |
+
$field['options']['parent'] = $field['options']['args']['parent'];
|
65 |
+
unset( $field['options']['args']['parent'] );
|
66 |
+
}
|
67 |
+
else
|
68 |
+
{
|
69 |
+
$field['options']['parent'] = 0;
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
$field['field_name'] = "{$field['id']}[]";
|
74 |
+
|
75 |
+
return $field;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get field HTML
|
80 |
+
*
|
81 |
+
* @param $html
|
82 |
+
* @param $field
|
83 |
+
* @param $meta
|
84 |
+
*
|
85 |
+
* @return string
|
86 |
+
*/
|
87 |
+
static function html( $html, $meta, $field )
|
88 |
+
{
|
89 |
+
|
90 |
+
$options = $field['options'];
|
91 |
+
$terms = get_terms( $options['taxonomy'], $options['args'] );
|
92 |
+
|
93 |
+
$field['options'] = self::get_options( $terms );
|
94 |
+
|
95 |
+
$html = '';
|
96 |
+
|
97 |
+
switch( $options['type'] )
|
98 |
+
{
|
99 |
+
case 'checkbox_list':
|
100 |
+
$html = RWMB_Checkbox_List_Field::html( $html, $meta, $field );
|
101 |
+
break;
|
102 |
+
case 'checkbox_tree':
|
103 |
+
$elements = self::process_terms( $terms );
|
104 |
+
$html .= self::walk_checkbox_tree( $meta, $field, $elements, $options['parent'], true );
|
105 |
+
break;
|
106 |
+
case 'select_tree':
|
107 |
+
$elements = self::process_terms( $terms );
|
108 |
+
$html .= self::walk_select_tree( $meta, $field, $elements, $options['parent'], '', true );
|
109 |
+
break;
|
110 |
+
case 'select_advanced':
|
111 |
+
$html = RWMB_Select_Advanced_Field::html( $html, $meta, $field );
|
112 |
+
break;
|
113 |
+
case 'select':
|
114 |
+
default:
|
115 |
+
$html = RWMB_Select_Field::html( $html, $meta, $field );
|
116 |
+
}
|
117 |
+
|
118 |
+
return $html;
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Walker for displaying checkboxes in treeformat
|
123 |
+
*
|
124 |
+
* @param $meta
|
125 |
+
* @param $field
|
126 |
+
* @param $elements
|
127 |
+
* @param int $parent
|
128 |
+
* @param bool $active
|
129 |
+
*
|
130 |
+
* @return string
|
131 |
+
*/
|
132 |
+
static function walk_checkbox_tree( $meta, $field, $elements, $parent = 0, $active = false )
|
133 |
+
{
|
134 |
+
if ( ! isset( $elements[$parent] ) )
|
135 |
+
return;
|
136 |
+
$terms = $elements[$parent];
|
137 |
+
$field['options'] = self::get_options( $terms );
|
138 |
+
$hidden = ( !$active ? 'hidden' : '' );
|
139 |
+
|
140 |
+
$html = "<ul class = 'rw-taxonomy-tree {$hidden}'>";
|
141 |
+
$li = '<li><label><input type="checkbox" name="%s" value="%s" %s /> %s</label>';
|
142 |
+
foreach ( $terms as $term )
|
143 |
+
{
|
144 |
+
$html .= sprintf(
|
145 |
+
$li,
|
146 |
+
$field['field_name'],
|
147 |
+
$term->slug,
|
148 |
+
checked( in_array( $term->slug, $meta ), true, false ),
|
149 |
+
$term->name
|
150 |
+
);
|
151 |
+
$html .= self::walk_checkbox_tree( $meta, $field, $elements, $term->term_id, ( in_array( $term->slug, $meta ) ) && $active ) . '</li>';
|
152 |
+
}
|
153 |
+
$html .= '</ul>';
|
154 |
+
|
155 |
+
return $html;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Walker for displaying select in treeformat
|
160 |
+
*
|
161 |
+
* @param $meta
|
162 |
+
* @param $field
|
163 |
+
* @param $elements
|
164 |
+
* @param int $parent
|
165 |
+
* @param string $parent_slug
|
166 |
+
* @param bool $active
|
167 |
+
*
|
168 |
+
* @return string
|
169 |
+
*/
|
170 |
+
static function walk_select_tree( $meta, $field, $elements, $parent = 0, $parent_slug = '', $active = false )
|
171 |
+
{
|
172 |
+
if ( ! isset( $elements[$parent] ) )
|
173 |
+
return;
|
174 |
+
$terms = $elements[$parent];
|
175 |
+
$field['options'] = self::get_options( $terms );
|
176 |
+
$hidden = $active ? 'active' : 'disabled';
|
177 |
+
$disabled = disabled( $active, false, false );
|
178 |
+
$id = empty( $parent_slug ) ? '' : " id='rwmb-taxonomy-{$parent_slug}'";
|
179 |
+
|
180 |
+
$html = "<div{$id} class='rw-taxonomy-tree {$hidden}'>";
|
181 |
+
$html .= RWMB_Select_Field::html( $html, $meta, $field );
|
182 |
+
foreach ( $terms as $term )
|
183 |
+
{
|
184 |
+
$html .= self::walk_select_tree( $meta, $field, $elements, $term->term_id, $term->slug, in_array( $term->slug, $meta ) && $active ) . '</li>';
|
185 |
+
}
|
186 |
+
$html .= '</div>';
|
187 |
+
|
188 |
+
return $html;
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Processes terms into indexed array for walker functions
|
193 |
+
*
|
194 |
+
* @param $terms
|
195 |
+
*
|
196 |
+
* @internal param $field
|
197 |
+
* @return array
|
198 |
+
*/
|
199 |
+
static function process_terms( $terms )
|
200 |
+
{
|
201 |
+
$elements = array();
|
202 |
+
foreach ( $terms as $term )
|
203 |
+
{
|
204 |
+
$elements[$term->parent][] = $term;
|
205 |
+
}
|
206 |
+
return $elements;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Get options for selects, checkbox list, etc via the terms
|
211 |
+
*
|
212 |
+
* @param $terms array of term objects
|
213 |
+
*
|
214 |
+
* @param $options array
|
215 |
+
*/
|
216 |
+
static function get_options( $terms = array() )
|
217 |
+
{
|
218 |
+
$options = array();
|
219 |
+
foreach( $terms as $term )
|
220 |
+
{
|
221 |
+
$options[$term->slug] = $term->name;
|
222 |
+
}
|
223 |
+
return $options;
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Save post taxonomy
|
228 |
+
*
|
229 |
+
* @param $post_id
|
230 |
+
* @param $field
|
231 |
+
* @param $old
|
232 |
+
*
|
233 |
+
* @param $new
|
234 |
+
*/
|
235 |
+
static function save( $new, $old, $post_id, $field )
|
236 |
+
{
|
237 |
+
wp_set_object_terms( $post_id, $new, $field['options']['taxonomy'] );
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Standard meta retrieval
|
242 |
+
*
|
243 |
+
* @param mixed $meta
|
244 |
+
* @param int $post_id
|
245 |
+
* @param array $field
|
246 |
+
* @param bool $saved
|
247 |
+
*
|
248 |
+
* @return mixed
|
249 |
+
*/
|
250 |
+
static function meta( $meta, $post_id, $saved, $field )
|
251 |
+
{
|
252 |
+
$options = $field['options'];
|
253 |
+
|
254 |
+
$meta = wp_get_post_terms( $post_id, $options['taxonomy'] );
|
255 |
+
$meta = is_array( $meta ) ? $meta : (array) $meta;
|
256 |
+
$meta = wp_list_pluck( $meta, 'slug' );
|
257 |
+
|
258 |
+
return $meta;
|
259 |
+
}
|
260 |
+
}
|
261 |
+
}
|
inc/fields/text-list.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Text_List_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Text_List_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param string $html
|
13 |
+
* @param mixed $meta
|
14 |
+
* @param array $field
|
15 |
+
*
|
16 |
+
* @return string
|
17 |
+
*/
|
18 |
+
static function html( $html, $meta, $field )
|
19 |
+
{
|
20 |
+
$meta = (array) $meta;
|
21 |
+
$html = array();
|
22 |
+
$tpl = '<label><input type="text" class="rwmb-text-list" name="%s" id="%s" value="%s" /> %s</label>';
|
23 |
+
|
24 |
+
foreach ( $field['options'] as $value => $label )
|
25 |
+
{
|
26 |
+
$html[] = sprintf(
|
27 |
+
$tpl,
|
28 |
+
$field['field_name'],
|
29 |
+
$field['id'],
|
30 |
+
$value,
|
31 |
+
$label
|
32 |
+
);
|
33 |
+
}
|
34 |
+
return implode( ' ', $html );
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Get meta value
|
39 |
+
* If field is cloneable, value is saved as a single entry in DB
|
40 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
41 |
+
*
|
42 |
+
* @see "save" method for better understanding
|
43 |
+
*
|
44 |
+
* TODO: A good way to ALWAYS save values in single entry in DB, while maintaining backward compatibility
|
45 |
+
*
|
46 |
+
* @param $meta
|
47 |
+
* @param $post_id
|
48 |
+
* @param $saved
|
49 |
+
* @param $field
|
50 |
+
*
|
51 |
+
* @return array
|
52 |
+
*/
|
53 |
+
static function meta( $meta, $post_id, $saved, $field )
|
54 |
+
{
|
55 |
+
$meta = get_post_meta( $post_id, $field['id'], $field['clone'] );
|
56 |
+
|
57 |
+
$meta = ( !$saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
|
58 |
+
|
59 |
+
$meta = array_map( 'esc_attr', (array) $meta );
|
60 |
+
|
61 |
+
return $meta;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Save meta value
|
66 |
+
* If field is cloneable, value is saved as a single entry in DB
|
67 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
68 |
+
*
|
69 |
+
* TODO: A good way to ALWAYS save values in single entry in DB, while maintaining backward compatibility
|
70 |
+
*
|
71 |
+
* @param $new
|
72 |
+
* @param $old
|
73 |
+
* @param $post_id
|
74 |
+
* @param $field
|
75 |
+
*/
|
76 |
+
static function save( $new, $old, $post_id, $field )
|
77 |
+
{
|
78 |
+
if ( !$field['clone'] )
|
79 |
+
{
|
80 |
+
RW_Meta_Box::save( $new, $old, $post_id, $field );
|
81 |
+
return;
|
82 |
+
}
|
83 |
+
|
84 |
+
if ( empty( $new ) )
|
85 |
+
delete_post_meta( $post_id, $field['id'] );
|
86 |
+
else
|
87 |
+
update_post_meta( $post_id, $field['id'], $new );
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Normalize parameters for field
|
92 |
+
*
|
93 |
+
* @param array $field
|
94 |
+
*
|
95 |
+
* @return array
|
96 |
+
*/
|
97 |
+
static function normalize_field( $field )
|
98 |
+
{
|
99 |
+
$field['multiple'] = true;
|
100 |
+
$field['field_name'] = $field['id'];
|
101 |
+
if ( !$field['clone'] )
|
102 |
+
$field['field_name'] .= '[]';
|
103 |
+
return $field;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
inc/fields/text.php
CHANGED
@@ -18,11 +18,13 @@ if ( ! class_exists( 'RWMB_Text_Field' ) )
|
|
18 |
static function html( $html, $meta, $field )
|
19 |
{
|
20 |
return sprintf(
|
21 |
-
'<input type="text" class="rwmb-text" name="%s" id="%s" value="%s" size="%s"
|
22 |
$field['field_name'],
|
23 |
$field['id'],
|
24 |
$meta,
|
25 |
-
$field['size']
|
|
|
|
|
26 |
);
|
27 |
}
|
28 |
|
@@ -37,8 +39,35 @@ if ( ! class_exists( 'RWMB_Text_Field' ) )
|
|
37 |
{
|
38 |
$field = wp_parse_args( $field, array(
|
39 |
'size' => 30,
|
|
|
40 |
) );
|
41 |
return $field;
|
42 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
}
|
18 |
static function html( $html, $meta, $field )
|
19 |
{
|
20 |
return sprintf(
|
21 |
+
'<input type="text" class="rwmb-text" name="%s" id="%s" value="%s" size="%s" %s/>%s',
|
22 |
$field['field_name'],
|
23 |
$field['id'],
|
24 |
$meta,
|
25 |
+
$field['size'],
|
26 |
+
!$field['datalist'] ? '' : "list='{$field['datalist']['id']}'",
|
27 |
+
self::datalist_html($field)
|
28 |
);
|
29 |
}
|
30 |
|
39 |
{
|
40 |
$field = wp_parse_args( $field, array(
|
41 |
'size' => 30,
|
42 |
+
'datalist' => false
|
43 |
) );
|
44 |
return $field;
|
45 |
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Create datalist, if any
|
49 |
+
*
|
50 |
+
* @param array $field
|
51 |
+
*
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
static function datalist_html( $field )
|
55 |
+
{
|
56 |
+
if( !$field['datalist'] )
|
57 |
+
return '';
|
58 |
+
$datalist = $field['datalist'];
|
59 |
+
$html = sprintf(
|
60 |
+
'<datalist id="%s">',
|
61 |
+
$datalist['id']
|
62 |
+
);
|
63 |
+
|
64 |
+
foreach( $datalist['options'] as $option ) {
|
65 |
+
$html.= sprintf('<option value="%s"></option>', $option);
|
66 |
+
}
|
67 |
+
|
68 |
+
$html .= '</datalist>';
|
69 |
+
|
70 |
+
return $html;
|
71 |
+
}
|
72 |
}
|
73 |
}
|
inc/fields/thickbox-image.php
CHANGED
@@ -32,7 +32,7 @@ if ( ! class_exists( 'RWMB_Thickbox_Image_Field' ) )
|
|
32 |
*/
|
33 |
static function html( $html, $meta, $field )
|
34 |
{
|
35 |
-
$i18n_title = _x( 'Upload
|
36 |
|
37 |
$html = wp_nonce_field( "rwmb-delete-file_{$field['id']}", "nonce-delete-file_{$field['id']}", false, false );
|
38 |
$html .= wp_nonce_field( "rwmb-reorder-images_{$field['id']}", "nonce-reorder-images_{$field['id']}", false, false );
|
@@ -64,4 +64,4 @@ if ( ! class_exists( 'RWMB_Thickbox_Image_Field' ) )
|
|
64 |
return array_unique( array_merge( $old, $new ) );
|
65 |
}
|
66 |
}
|
67 |
-
}
|
32 |
*/
|
33 |
static function html( $html, $meta, $field )
|
34 |
{
|
35 |
+
$i18n_title = apply_filters( 'rwmb_thickbox_image_upload_string', _x( 'Upload Images', 'image upload', 'rwmb' ), $field );
|
36 |
|
37 |
$html = wp_nonce_field( "rwmb-delete-file_{$field['id']}", "nonce-delete-file_{$field['id']}", false, false );
|
38 |
$html .= wp_nonce_field( "rwmb-reorder-images_{$field['id']}", "nonce-reorder-images_{$field['id']}", false, false );
|
64 |
return array_unique( array_merge( $old, $new ) );
|
65 |
}
|
66 |
}
|
67 |
+
}
|
inc/fields/time.php
CHANGED
@@ -22,7 +22,12 @@ if ( ! class_exists( 'RWMB_Time_Field' ) )
|
|
22 |
|
23 |
$url = RWMB_JS_URL . 'jqueryui';
|
24 |
wp_register_script( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.js", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '0.9.7', true );
|
|
|
|
|
|
|
|
|
25 |
wp_enqueue_script( 'rwmb-time', RWMB_JS_URL.'time.js', array( 'jquery-ui-timepicker' ), RWMB_VER, true );
|
|
|
26 |
}
|
27 |
|
28 |
/**
|
@@ -70,4 +75,4 @@ if ( ! class_exists( 'RWMB_Time_Field' ) )
|
|
70 |
return $field;
|
71 |
}
|
72 |
}
|
73 |
-
}
|
22 |
|
23 |
$url = RWMB_JS_URL . 'jqueryui';
|
24 |
wp_register_script( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.js", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '0.9.7', true );
|
25 |
+
|
26 |
+
$locale = str_replace( '_', '-', get_locale() );
|
27 |
+
wp_register_script( 'jquery-ui-timepicker-i18n', "{$url}/timepicker-i18n/jquery-ui-timepicker-{$locale}.js", array( 'jquery-ui-timepicker' ), '0.9.7', true );
|
28 |
+
|
29 |
wp_enqueue_script( 'rwmb-time', RWMB_JS_URL.'time.js', array( 'jquery-ui-timepicker' ), RWMB_VER, true );
|
30 |
+
wp_localize_script( 'rwmb-time', 'RWMB_Timepicker', array( 'lang' => $locale ) );
|
31 |
}
|
32 |
|
33 |
/**
|
75 |
return $field;
|
76 |
}
|
77 |
}
|
78 |
+
}
|
inc/fields/url.php
CHANGED
@@ -1,49 +1,47 @@
|
|
1 |
-
<?php
|
2 |
-
// Prevent loading this file directly
|
3 |
-
defined( 'ABSPATH' ) || exit;
|
4 |
-
|
5 |
-
// Make sure "text" field is loaded
|
6 |
-
require_once RWMB_FIELDS_DIR . 'text.php';
|
7 |
-
|
8 |
-
if ( ! class_exists( 'RWMB_URL_Field' ) )
|
9 |
-
{
|
10 |
-
class RWMB_URL_Field extends RWMB_Text_Field
|
11 |
-
{
|
12 |
-
/**
|
13 |
-
* Get field HTML
|
14 |
-
*
|
15 |
-
* @param string $html
|
16 |
-
* @param mixed $meta
|
17 |
-
* @param array $field
|
18 |
-
*
|
19 |
-
* @return string
|
20 |
-
*/
|
21 |
-
static function html( $html, $meta, $field )
|
22 |
-
{
|
23 |
-
return sprintf(
|
24 |
-
'<input type="url" class="rwmb-url" name="%s" id="%s" value="%s" size="%s" />',
|
25 |
-
$field['field_name'],
|
26 |
-
$field['id'],
|
27 |
-
$meta,
|
28 |
-
$field['size']
|
29 |
-
);
|
30 |
-
}
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
*
|
35 |
-
*
|
36 |
-
* @param $
|
37 |
-
* @param $
|
38 |
-
* @param $
|
39 |
-
*
|
40 |
-
*
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
}
|
49 |
-
}
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "text" field is loaded
|
6 |
+
require_once RWMB_FIELDS_DIR . 'text.php';
|
7 |
+
|
8 |
+
if ( ! class_exists( 'RWMB_URL_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_URL_Field extends RWMB_Text_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Get field HTML
|
14 |
+
*
|
15 |
+
* @param string $html
|
16 |
+
* @param mixed $meta
|
17 |
+
* @param array $field
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
static function html( $html, $meta, $field )
|
22 |
+
{
|
23 |
+
return sprintf(
|
24 |
+
'<input type="url" class="rwmb-url" name="%s" id="%s" value="%s" size="%s" />',
|
25 |
+
$field['field_name'],
|
26 |
+
$field['id'],
|
27 |
+
$meta,
|
28 |
+
$field['size']
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Sanitize url
|
34 |
+
*
|
35 |
+
* @param mixed $new
|
36 |
+
* @param mixed $old
|
37 |
+
* @param int $post_id
|
38 |
+
* @param array $field
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
static function value( $new, $old, $post_id, $field)
|
43 |
+
{
|
44 |
+
return esc_url( $new );
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
|
|
|
inc/fields/wysiwyg.php
CHANGED
@@ -45,7 +45,7 @@ if ( !class_exists( 'RWMB_Wysiwyg_Field' ) )
|
|
45 |
*/
|
46 |
static function value( $new, $old, $post_id, $field )
|
47 |
{
|
48 |
-
return wpautop( $new );
|
49 |
}
|
50 |
|
51 |
/**
|
@@ -94,6 +94,7 @@ if ( !class_exists( 'RWMB_Wysiwyg_Field' ) )
|
|
94 |
static function normalize_field( $field )
|
95 |
{
|
96 |
$field = wp_parse_args( $field, array(
|
|
|
97 |
'options' => array(),
|
98 |
) );
|
99 |
|
45 |
*/
|
46 |
static function value( $new, $old, $post_id, $field )
|
47 |
{
|
48 |
+
return ( $field['raw'] ? $new : wpautop( $new ) );
|
49 |
}
|
50 |
|
51 |
/**
|
94 |
static function normalize_field( $field )
|
95 |
{
|
96 |
$field = wp_parse_args( $field, array(
|
97 |
+
'raw' => false,
|
98 |
'options' => array(),
|
99 |
) );
|
100 |
|
inc/helpers.php
CHANGED
@@ -187,6 +187,7 @@ function rwmb_file_info( $id )
|
|
187 |
{
|
188 |
$path = get_attached_file( $id );
|
189 |
return array(
|
|
|
190 |
'name' => basename( $path ),
|
191 |
'path' => $path,
|
192 |
'url' => wp_get_attachment_url( $id ),
|
@@ -215,6 +216,7 @@ function rwmb_image_info( $id, $args = array() )
|
|
215 |
$attachment = &get_post( $id );
|
216 |
$path = get_attached_file( $id );
|
217 |
return array(
|
|
|
218 |
'name' => basename( $path ),
|
219 |
'path' => $path,
|
220 |
'url' => $img_src[0],
|
187 |
{
|
188 |
$path = get_attached_file( $id );
|
189 |
return array(
|
190 |
+
'ID' => $id,
|
191 |
'name' => basename( $path ),
|
192 |
'path' => $path,
|
193 |
'url' => wp_get_attachment_url( $id ),
|
216 |
$attachment = &get_post( $id );
|
217 |
$path = get_attached_file( $id );
|
218 |
return array(
|
219 |
+
'ID' => $id,
|
220 |
'name' => basename( $path ),
|
221 |
'path' => $path,
|
222 |
'url' => $img_src[0],
|
js/autosave.js
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function( $ )
|
2 |
+
{
|
3 |
+
$( document ).ajaxSend( function( e, xhr, s )
|
4 |
+
{
|
5 |
+
if ( -1 != s.data.indexOf( 'action=autosave' ) )
|
6 |
+
{
|
7 |
+
$( '.rwmb-meta-box').each(function(){
|
8 |
+
var $meta_box = $( this );
|
9 |
+
if( $meta_box.data( 'autosave' ) == true )
|
10 |
+
{
|
11 |
+
s.data += '&' + $( ':input', $meta_box ).serialize();
|
12 |
+
}
|
13 |
+
} );
|
14 |
+
}
|
15 |
+
} );
|
16 |
+
} );
|
js/clone.js
CHANGED
@@ -7,9 +7,9 @@ jQuery( document ).ready( function( $ )
|
|
7 |
var $clone_last = $input.find( '.rwmb-clone:last' ),
|
8 |
$clone = $clone_last.clone(),
|
9 |
$input, name;
|
10 |
-
|
11 |
$clone.insertAfter( $clone_last );
|
12 |
-
$input = $clone.find( ':input' );
|
13 |
|
14 |
// Reset value
|
15 |
$input.val( '' );
|
@@ -25,27 +25,15 @@ jQuery( document ).ready( function( $ )
|
|
25 |
|
26 |
// Toggle remove buttons
|
27 |
toggle_remove_buttons( $input );
|
28 |
-
|
29 |
-
//
|
30 |
-
|
31 |
-
rwmb_update_color_picker();
|
32 |
-
|
33 |
-
// Fix date picker
|
34 |
-
if ( 'function' === typeof rwmb_update_date_picker )
|
35 |
-
rwmb_update_date_picker();
|
36 |
-
|
37 |
-
// Fix time picker
|
38 |
-
if ( 'function' === typeof rwmb_update_time_picker )
|
39 |
-
rwmb_update_time_picker();
|
40 |
-
|
41 |
-
// Fix datetime picker
|
42 |
-
if ( 'function' === typeof rwmb_update_datetime_picker )
|
43 |
-
rwmb_update_datetime_picker();
|
44 |
}
|
45 |
|
46 |
// Add more clones
|
47 |
-
$( '.add-clone' ).
|
48 |
{
|
|
|
49 |
var $input = $( this ).parents( '.rwmb-input' ),
|
50 |
$clone_group = $( this ).parents( '.rwmb-field' ).attr( "clone-group" );
|
51 |
|
@@ -73,7 +61,7 @@ jQuery( document ).ready( function( $ )
|
|
73 |
} );
|
74 |
|
75 |
// Remove clones
|
76 |
-
$( '.rwmb-input' ).
|
77 |
{
|
78 |
var $this = $( this ),
|
79 |
$input = $this.parents( '.rwmb-input' ),
|
7 |
var $clone_last = $input.find( '.rwmb-clone:last' ),
|
8 |
$clone = $clone_last.clone(),
|
9 |
$input, name;
|
10 |
+
|
11 |
$clone.insertAfter( $clone_last );
|
12 |
+
$input = $clone.find( ':input[class|="rwmb"]' );
|
13 |
|
14 |
// Reset value
|
15 |
$input.val( '' );
|
25 |
|
26 |
// Toggle remove buttons
|
27 |
toggle_remove_buttons( $input );
|
28 |
+
|
29 |
+
//Trigger custom clone event
|
30 |
+
$input.trigger( 'clone' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
|
33 |
// Add more clones
|
34 |
+
$( '.add-clone' ).on( 'click', function( e )
|
35 |
{
|
36 |
+
e.stopPropagation();
|
37 |
var $input = $( this ).parents( '.rwmb-input' ),
|
38 |
$clone_group = $( this ).parents( '.rwmb-field' ).attr( "clone-group" );
|
39 |
|
61 |
} );
|
62 |
|
63 |
// Remove clones
|
64 |
+
$( '.rwmb-input' ).on( 'click', '.remove-clone', function()
|
65 |
{
|
66 |
var $this = $( this ),
|
67 |
$input = $this.parents( '.rwmb-input' ),
|
js/color.js
CHANGED
@@ -2,33 +2,41 @@
|
|
2 |
* Update color picker element
|
3 |
* Used for static & dynamic added elements (when clone)
|
4 |
*/
|
5 |
-
function rwmb_update_color_picker()
|
6 |
-
{
|
7 |
-
var $ = jQuery;
|
8 |
-
$( '.rwmb-color-picker' ).each( function()
|
9 |
-
{
|
10 |
-
var $this = $( this ),
|
11 |
-
$input = $this.siblings( 'input.rwmb-color' );
|
12 |
-
|
13 |
-
// Make sure the value is displayed
|
14 |
-
if ( !$input.val() )
|
15 |
-
$input.val( '#' );
|
16 |
-
|
17 |
-
$this.farbtastic( $input );
|
18 |
-
} );
|
19 |
-
}
|
20 |
-
|
21 |
jQuery( document ).ready( function( $ )
|
22 |
-
{
|
23 |
-
$( '.rwmb-
|
|
|
|
|
24 |
{
|
25 |
$( this ).siblings( '.rwmb-color-picker' ).show();
|
26 |
return false;
|
27 |
-
} ).
|
28 |
{
|
29 |
$( this ).siblings( '.rwmb-color-picker' ).hide();
|
30 |
return false;
|
31 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
-
rwmb_update_color_picker();
|
34 |
} );
|
2 |
* Update color picker element
|
3 |
* Used for static & dynamic added elements (when clone)
|
4 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
jQuery( document ).ready( function( $ )
|
6 |
+
{
|
7 |
+
$( ':input.rwmb-color' ).each( rwmb_update_color_picker );
|
8 |
+
$( '.rwmb-input' ).on( 'clone', ':input.rwmb-color', rwmb_update_color_picker )
|
9 |
+
.on( 'focus', '.rwmb-color', function()
|
10 |
{
|
11 |
$( this ).siblings( '.rwmb-color-picker' ).show();
|
12 |
return false;
|
13 |
+
} ).on( 'blur', '.rwmb-color', function()
|
14 |
{
|
15 |
$( this ).siblings( '.rwmb-color-picker' ).hide();
|
16 |
return false;
|
17 |
} );
|
18 |
+
|
19 |
+
function rwmb_update_color_picker()
|
20 |
+
{
|
21 |
+
var $this = $( this ),
|
22 |
+
$clone_container = $this.closest('.rwmb-clone'),
|
23 |
+
$color_picker = $this.siblings( '.rwmb-color-picker' );
|
24 |
+
|
25 |
+
// Make sure the value is displayed
|
26 |
+
if ( !$this.val() )
|
27 |
+
$this.val( '#' );
|
28 |
+
|
29 |
+
if( typeof jQuery.wp === 'object' && typeof jQuery.wp.wpColorPicker === 'function' ){
|
30 |
+
if( $clone_container.length > 0 )
|
31 |
+
{
|
32 |
+
$this.appendTo( $clone_container ).siblings( 'div.wp-picker-container' ).remove();
|
33 |
+
}
|
34 |
+
$this.wpColorPicker();
|
35 |
+
}
|
36 |
+
else {
|
37 |
+
//We use farbtastic if the WordPress color picker widget doesn't exist
|
38 |
+
$color_picker.farbtastic( $this );
|
39 |
+
}
|
40 |
+
}
|
41 |
|
|
|
42 |
} );
|
js/date.js
CHANGED
@@ -2,21 +2,18 @@
|
|
2 |
* Update date picker element
|
3 |
* Used for static & dynamic added elements (when clone)
|
4 |
*/
|
5 |
-
function
|
6 |
{
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
10 |
{
|
11 |
var $this = $( this ),
|
12 |
options = $this.data( 'options' );
|
13 |
-
|
14 |
$this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
|
15 |
$this.removeClass( 'hasDatepicker' ).attr( 'id', '' ).datepicker( options );
|
16 |
-
}
|
17 |
-
}
|
18 |
|
19 |
-
jQuery( document ).ready( function()
|
20 |
-
{
|
21 |
-
rwmb_update_date_picker();
|
22 |
} );
|
2 |
* Update date picker element
|
3 |
* Used for static & dynamic added elements (when clone)
|
4 |
*/
|
5 |
+
jQuery( document ).ready( function( $ )
|
6 |
{
|
7 |
+
$( ':input.rwmb-date' ).each( rwmb_update_date_picker );
|
8 |
+
$( '.rwmb-input' ).on( 'clone', ':input.rwmb-date', rwmb_update_date_picker );
|
9 |
+
|
10 |
+
function rwmb_update_date_picker()
|
11 |
{
|
12 |
var $this = $( this ),
|
13 |
options = $this.data( 'options' );
|
14 |
+
|
15 |
$this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
|
16 |
$this.removeClass( 'hasDatepicker' ).attr( 'id', '' ).datepicker( options );
|
17 |
+
}
|
|
|
18 |
|
|
|
|
|
|
|
19 |
} );
|
js/datetime.js
CHANGED
@@ -2,21 +2,18 @@
|
|
2 |
* Update datetime picker element
|
3 |
* Used for static & dynamic added elements (when clone)
|
4 |
*/
|
5 |
-
function
|
6 |
{
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
10 |
{
|
11 |
var $this = $( this ),
|
12 |
options = $this.data( 'options' );
|
13 |
-
|
14 |
$this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
|
15 |
$this.removeClass( 'hasDatepicker' ).attr( 'id', '' ).datetimepicker( options );
|
16 |
-
|
17 |
-
}
|
18 |
-
|
19 |
-
jQuery( document ).ready( function()
|
20 |
-
{
|
21 |
-
rwmb_update_datetime_picker();
|
22 |
} );
|
2 |
* Update datetime picker element
|
3 |
* Used for static & dynamic added elements (when clone)
|
4 |
*/
|
5 |
+
jQuery( document ).ready( function( $ )
|
6 |
{
|
7 |
+
$( ':input.rwmb-datetime' ).each( rwmb_update_datetime_picker );
|
8 |
+
$( '.rwmb-input' ).on( 'clone', ':input.rwmb-datetime', rwmb_update_datetime_picker );
|
9 |
+
|
10 |
+
function rwmb_update_datetime_picker()
|
11 |
{
|
12 |
var $this = $( this ),
|
13 |
options = $this.data( 'options' );
|
14 |
+
|
15 |
$this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
|
16 |
$this.removeClass( 'hasDatepicker' ).attr( 'id', '' ).datetimepicker( options );
|
17 |
+
|
18 |
+
}
|
|
|
|
|
|
|
|
|
19 |
} );
|
js/file-advanced.js
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function( $ )
|
2 |
+
{
|
3 |
+
var template = $( '#tmpl-rwmb-file-advanced' ).html();
|
4 |
+
|
5 |
+
$( 'body' ).on( 'click', '.rwmb-file-advanced-upload', function( e )
|
6 |
+
{
|
7 |
+
e.preventDefault();
|
8 |
+
|
9 |
+
var $uploadButton = $( this ),
|
10 |
+
$fileList = $uploadButton.siblings( '.rwmb-uploaded' ),
|
11 |
+
maxFileUploads = $fileList.data( 'max_file_uploads' ),
|
12 |
+
mimeType = $fileList.data( 'mime_type' ),
|
13 |
+
msg = maxFileUploads > 1 ? rwmbFile.maxFileUploadsPlural : rwmbFile.maxFileUploadsSingle,
|
14 |
+
frame,
|
15 |
+
frameOptions = {
|
16 |
+
className: 'media-frame rwmb-file-frame',
|
17 |
+
multiple: true,
|
18 |
+
title: rwmbFileAdvanced.frameTitle
|
19 |
+
};
|
20 |
+
|
21 |
+
msg = msg.replace( '%d', maxFileUploads );
|
22 |
+
|
23 |
+
// Create a media frame
|
24 |
+
if ( mimeType )
|
25 |
+
{
|
26 |
+
frameOptions.library = {
|
27 |
+
type: mimeType
|
28 |
+
};
|
29 |
+
}
|
30 |
+
frame = wp.media( frameOptions );
|
31 |
+
|
32 |
+
// Open media uploader
|
33 |
+
frame.open();
|
34 |
+
|
35 |
+
// Remove all attached 'select' event
|
36 |
+
frame.off( 'select' );
|
37 |
+
|
38 |
+
// Handle selection
|
39 |
+
frame.on( 'select', function()
|
40 |
+
{
|
41 |
+
// Get selections
|
42 |
+
var selection = frame.state().get( 'selection' ).toJSON(),
|
43 |
+
uploaded = $fileList.children().length,
|
44 |
+
ids;
|
45 |
+
|
46 |
+
if ( maxFileUploads > 0 && ( uploaded + selection.length ) > maxFileUploads )
|
47 |
+
{
|
48 |
+
if ( uploaded < maxFileUploads )
|
49 |
+
selection = selection.slice( 0, maxFileUploads - uploaded );
|
50 |
+
alert( msg );
|
51 |
+
}
|
52 |
+
|
53 |
+
// Get only files that haven't been added to the list
|
54 |
+
// Also prevent duplication when send ajax request
|
55 |
+
selection = _.filter( selection, function( attachment )
|
56 |
+
{
|
57 |
+
return $fileList.children( 'li#item_' + attachment.id ).length == 0;
|
58 |
+
} );
|
59 |
+
ids = _.pluck( selection, 'id' );
|
60 |
+
|
61 |
+
if ( ids.length > 0 )
|
62 |
+
{
|
63 |
+
// Attach attachment to field and get HTML
|
64 |
+
var data = {
|
65 |
+
action: 'rwmb_attach_file',
|
66 |
+
post_id: $( '#post_ID' ).val(),
|
67 |
+
field_id: $fileList.data( 'field_id' ),
|
68 |
+
attachment_ids: ids,
|
69 |
+
_ajax_nonce: $uploadButton.data( 'attach_file_nonce' )
|
70 |
+
};
|
71 |
+
$.post( ajaxurl, data, function( r )
|
72 |
+
{
|
73 |
+
if ( r.success )
|
74 |
+
{
|
75 |
+
$fileList
|
76 |
+
.append( _.template( template, { attachments: selection } ) )
|
77 |
+
.trigger( 'update.rwmbFile' );
|
78 |
+
}
|
79 |
+
}, 'json' );
|
80 |
+
}
|
81 |
+
} );
|
82 |
+
} );
|
83 |
+
} );
|
js/file.js
CHANGED
@@ -1,28 +1,55 @@
|
|
1 |
jQuery( document ).ready( function( $ )
|
2 |
{
|
3 |
// Add more file
|
4 |
-
$( '.rwmb-add-file' ).
|
5 |
{
|
6 |
-
var $this = $( this ),
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
} );
|
12 |
|
13 |
// Delete file via Ajax
|
14 |
-
$( '.rwmb-uploaded' ).
|
15 |
{
|
16 |
var $this = $( this ),
|
17 |
$parent = $this.parents( 'li' ),
|
18 |
-
|
19 |
data = {
|
20 |
-
action
|
21 |
-
|
22 |
-
post_id
|
23 |
-
field_id
|
24 |
attachment_id: $this.data( 'attachment_id' ),
|
25 |
-
force_delete
|
26 |
};
|
27 |
|
28 |
$.post( ajaxurl, data, function( r )
|
@@ -30,11 +57,35 @@ jQuery( document ).ready( function( $ )
|
|
30 |
var res = wpAjax.parseAjaxResponse( r, 'ajax-response' );
|
31 |
|
32 |
if ( res.errors )
|
|
|
33 |
alert( res.responses[0].errors[0].message );
|
|
|
34 |
else
|
|
|
35 |
$parent.remove();
|
|
|
|
|
36 |
}, 'xml' );
|
37 |
|
38 |
return false;
|
39 |
} );
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
jQuery( document ).ready( function( $ )
|
2 |
{
|
3 |
// Add more file
|
4 |
+
$( '.rwmb-add-file' ).each( function()
|
5 |
{
|
6 |
+
var $this = $( this ),
|
7 |
+
$uploads = $this.siblings( '.file-input' ),
|
8 |
+
$first = $uploads.first(),
|
9 |
+
uploadCount = $uploads.length,
|
10 |
+
$fileList = $this.closest( '.rwmb-input' ).find( '.rwmb-uploaded' ),
|
11 |
+
fileCount = $fileList.children( 'li' ).length,
|
12 |
+
maxFileUploads = $fileList.data( 'max_file_uploads' );
|
13 |
|
14 |
+
// Hide "Add New File" and input fields when loaded
|
15 |
+
if ( maxFileUploads > 0 )
|
16 |
+
{
|
17 |
+
if ( uploadCount + fileCount >= maxFileUploads )
|
18 |
+
$this.hide();
|
19 |
+
if ( fileCount >= maxFileUploads )
|
20 |
+
$uploads.hide();
|
21 |
+
}
|
22 |
|
23 |
+
$this.click( function()
|
24 |
+
{
|
25 |
+
// Clone upload input only when needed
|
26 |
+
if ( maxFileUploads <= 0 || uploadCount + fileCount < maxFileUploads )
|
27 |
+
{
|
28 |
+
$first.clone().insertBefore( $this );
|
29 |
+
uploadCount++;
|
30 |
+
|
31 |
+
// If there're too many upload inputs, hide "Add New File"
|
32 |
+
if ( maxFileUploads > 0 && uploadCount + fileCount >= maxFileUploads )
|
33 |
+
$this.hide();
|
34 |
+
}
|
35 |
+
|
36 |
+
return false;
|
37 |
+
} );
|
38 |
} );
|
39 |
|
40 |
// Delete file via Ajax
|
41 |
+
$( '.rwmb-uploaded' ).on( 'click', '.rwmb-delete-file', function()
|
42 |
{
|
43 |
var $this = $( this ),
|
44 |
$parent = $this.parents( 'li' ),
|
45 |
+
$container = $this.closest( '.rwmb-uploaded' ),
|
46 |
data = {
|
47 |
+
action: 'rwmb_delete_file',
|
48 |
+
_ajax_nonce: $container.data( 'delete_nonce' ),
|
49 |
+
post_id: $( '#post_ID' ).val(),
|
50 |
+
field_id: $container.data( 'field_id' ),
|
51 |
attachment_id: $this.data( 'attachment_id' ),
|
52 |
+
force_delete: $container.data( 'force_delete' )
|
53 |
};
|
54 |
|
55 |
$.post( ajaxurl, data, function( r )
|
57 |
var res = wpAjax.parseAjaxResponse( r, 'ajax-response' );
|
58 |
|
59 |
if ( res.errors )
|
60 |
+
{
|
61 |
alert( res.responses[0].errors[0].message );
|
62 |
+
}
|
63 |
else
|
64 |
+
{
|
65 |
$parent.remove();
|
66 |
+
$container.trigger( 'update.rwmbFile' );
|
67 |
+
}
|
68 |
}, 'xml' );
|
69 |
|
70 |
return false;
|
71 |
} );
|
72 |
+
|
73 |
+
$( 'body' ).on( 'update.rwmbFile', '.rwmb-uploaded', function()
|
74 |
+
{
|
75 |
+
var $fileList = $( this ),
|
76 |
+
maxFileUploads = $fileList.data( 'max_file_uploads' ),
|
77 |
+
$uploader = $fileList.siblings( '.new-files' ),
|
78 |
+
numFiles = $fileList.children().length;
|
79 |
+
|
80 |
+
numFiles > 0 ? $fileList.removeClass( 'hidden' ) : $fileList.addClass( 'hidden' );
|
81 |
+
|
82 |
+
// Return if maxFileUpload = 0
|
83 |
+
if ( maxFileUploads === 0 )
|
84 |
+
return false;
|
85 |
+
|
86 |
+
// Hide files button if reach max file uploads
|
87 |
+
numFiles >= maxFileUploads ? $uploader.addClass( 'hidden' ) : $uploader.removeClass( 'hidden' );
|
88 |
+
|
89 |
+
return false;
|
90 |
+
} );
|
91 |
+
} );
|
js/image-advanced.js
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function( $ )
|
2 |
+
{
|
3 |
+
// Use only one frame for all upload fields
|
4 |
+
var frame,
|
5 |
+
template = $( '#tmpl-rwmb-image-advanced' ).html();
|
6 |
+
|
7 |
+
$( 'body' ).on( 'click', '.rwmb-image-advanced-upload', function( e )
|
8 |
+
{
|
9 |
+
e.preventDefault();
|
10 |
+
|
11 |
+
var $uploadButton = $( this ),
|
12 |
+
$imageList = $uploadButton.siblings( '.rwmb-images' ),
|
13 |
+
maxFileUploads = $imageList.data( 'max_file_uploads' ),
|
14 |
+
msg = maxFileUploads > 1 ? rwmbFile.maxFileUploadsPlural : rwmbFile.maxFileUploadsSingle;
|
15 |
+
|
16 |
+
msg = msg.replace( '%d', maxFileUploads );
|
17 |
+
|
18 |
+
// Create a frame only if needed
|
19 |
+
if ( !frame )
|
20 |
+
{
|
21 |
+
frame = wp.media( {
|
22 |
+
className: 'media-frame rwmb-media-frame',
|
23 |
+
multiple : true,
|
24 |
+
title : rwmbImageAdvanced.frameTitle,
|
25 |
+
library : {
|
26 |
+
type: 'image'
|
27 |
+
}
|
28 |
+
} );
|
29 |
+
}
|
30 |
+
|
31 |
+
// Open media uploader
|
32 |
+
frame.open();
|
33 |
+
|
34 |
+
// Remove all attached 'select' event
|
35 |
+
frame.off( 'select' );
|
36 |
+
|
37 |
+
// Handle selection
|
38 |
+
frame.on( 'select', function()
|
39 |
+
{
|
40 |
+
// Get selections
|
41 |
+
var selection = frame.state().get( 'selection' ).toJSON(),
|
42 |
+
uploaded = $imageList.children().length,
|
43 |
+
ids;
|
44 |
+
|
45 |
+
if ( maxFileUploads > 0 && ( uploaded + selection.length ) > maxFileUploads )
|
46 |
+
{
|
47 |
+
if ( uploaded < maxFileUploads )
|
48 |
+
selection = selection.slice( 0, maxFileUploads - uploaded );
|
49 |
+
alert( msg );
|
50 |
+
}
|
51 |
+
|
52 |
+
// Get only files that haven't been added to the list
|
53 |
+
// Also prevent duplication when send ajax request
|
54 |
+
selection = _.filter( selection, function( attachment )
|
55 |
+
{
|
56 |
+
return $imageList.children( 'li#item_' + attachment.id ).length == 0;
|
57 |
+
} );
|
58 |
+
ids = _.pluck( selection, 'id' );
|
59 |
+
console.log( selection );
|
60 |
+
|
61 |
+
if( ids.length > 0 )
|
62 |
+
{
|
63 |
+
var data = {
|
64 |
+
action : 'rwmb_attach_media',
|
65 |
+
post_id : $( '#post_ID' ).val(),
|
66 |
+
field_id : $imageList.data( 'field_id' ),
|
67 |
+
attachment_ids : ids,
|
68 |
+
_ajax_nonce : $uploadButton.data( 'attach_media_nonce' )
|
69 |
+
};
|
70 |
+
|
71 |
+
$.post( ajaxurl, data, function( r )
|
72 |
+
{
|
73 |
+
if( r.success )
|
74 |
+
{
|
75 |
+
$imageList
|
76 |
+
.append( _.template( template, { attachments: selection } ) )
|
77 |
+
.trigger('update.rwmbFile');
|
78 |
+
}
|
79 |
+
}, 'json' );
|
80 |
+
}
|
81 |
+
} );
|
82 |
+
} )
|
83 |
+
} );
|
js/image.js
CHANGED
@@ -4,12 +4,12 @@ jQuery( document ).ready( function( $ )
|
|
4 |
$( '.rwmb-images' ).each( function()
|
5 |
{
|
6 |
var $this = $( this ),
|
7 |
-
|
8 |
data = {
|
9 |
-
action
|
10 |
-
|
11 |
-
post_id
|
12 |
-
field_id: field_id
|
13 |
};
|
14 |
$this.sortable( {
|
15 |
placeholder: 'ui-state-highlight',
|
4 |
$( '.rwmb-images' ).each( function()
|
5 |
{
|
6 |
var $this = $( this ),
|
7 |
+
$container = $this.closest('.rwmb-uploaded'),
|
8 |
data = {
|
9 |
+
action : 'rwmb_reorder_images',
|
10 |
+
_ajax_nonce : $container.data('reorder_nonce'),
|
11 |
+
post_id : $( '#post_ID' ).val(),
|
12 |
+
field_id : $container.data('field_id')
|
13 |
};
|
14 |
$this.sortable( {
|
15 |
placeholder: 'ui-state-highlight',
|
js/jquery.validate.min.js
CHANGED
@@ -1,4 +1,2 @@
|
|
1 |
-
/*! jQuery Validation Plugin - v1.
|
2 |
-
* https://github.com/jzaefferer/jquery-validation
|
3 |
-
* Copyright (c) 2012 Jörn Zaefferer; Licensed MIT, GPL */
|
4 |
-
(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.validateDelegate(":submit","click",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(b.target).hasClass("cancel")&&(c.cancelSubmit=!0)}),this.submit(function(b){function d(){var d;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)),c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){if(a(this[0]).is("form"))return this.validate().form();var b=!0,c=a(this[0].form).validate();return this.each(function(){b&=c.element(this)}),b},removeAttrs:function(b){var c={},d=this;return a.each(b.split(/\s/),function(a,b){c[b]=d.attr(b),d.removeAttr(b)}),c},rules:function(b,c){var d=this[0];if(b){var e=a.data(d.form,"validator").settings,f=e.rules,g=a.validator.staticRules(d);switch(b){case"add":a.extend(g,a.validator.normalizeRule(c)),f[d.name]=g,c.messages&&(e.messages[d.name]=a.extend(e.messages[d.name],c.messages));break;case"remove":if(!c)return delete f[d.name],g;var h={};return a.each(c.split(/\s/),function(a,b){h[b]=g[b],delete g[b]}),h}}var i=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(d),a.validator.classRules(d),a.validator.attributeRules(d),a.validator.staticRules(d)),d);if(i.required){var j=i.required;delete i.required,i=a.extend({required:j},i)}return i}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+b.value)},filled:function(b){return!!a.trim(""+b.value)},unchecked:function(a){return!a.checked}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return arguments.length===1?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),c)}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a,b){this.lastActive=a,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(a)).hide())},onfocusout:function(a,b){!this.checkable(a)&&(a.name in this.submitted||!this.optional(a))&&this.element(a)},onkeyup:function(a,b){if(b.which===9&&this.elementValue(a)==="")return;(a.name in this.submitted||a===this.lastActive)&&this.element(a)},onclick:function(a,b){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){b.type==="radio"?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){b.type==="radio"?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function d(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,"");c.settings[d]&&c.settings[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var b=this.groups={};a.each(this.settings.groups,function(c,d){a.each(d.split(/\s/),function(a,d){b[d]=c})});var c=this.settings.rules;a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",d).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",d),this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){b=this.validationTargetFor(this.clean(b)),this.lastElement=b,this.prepareElement(b),this.currentElements=a(b);var c=this.check(b)!==!1;return c?delete this.invalid[b.name]:this.invalid[b.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),c},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b=0;for(var c in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()===0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(a){return a.element.name===b.name}).length===1&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.replace(" ",".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c=a(b).attr("type"),d=a(b).val();return c==="radio"||c==="checkbox"?a('input[name="'+a(b).attr("name")+'"]:checked').val():typeof d=="string"?d.replace(/\r/g,""):d},check:function(b){b=this.validationTargetFor(this.clean(b));var c=a(b).rules(),d=!1,e=this.elementValue(b),f;for(var g in c){var h={method:g,parameters:c[g]};try{f=a.validator.methods[g].call(this,e,b,h.parameters);if(f==="dependency-mismatch"){d=!0;continue}d=!1;if(f==="pending"){this.toHide=this.toHide.not(this.errorsFor(b));return}if(!f)return this.formatAndAdd(b,h),!1}catch(i){throw this.settings.debug&&window.console&&console.log("exception occured when checking element "+b.id+", check the '"+h.method+"' method",i),i}}if(d)return;return this.objectLength(c)&&this.successList.push(b),!0},customMetaMessage:function(b,c){if(!a.metadata)return;var d=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return d&&d.messages&&d.messages[c]},customDataMessage:function(b,c){return a(b).data("msg-"+c.toLowerCase())||b.attributes&&a(b).attr("data-msg-"+c.toLowerCase())},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==undefined)return arguments[a];return undefined},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customDataMessage(b,c),this.customMetaMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;typeof d=="function"?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b;for(a=0;this.errorList[a];a++){var c=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message)}this.errorList.length&&(this.toShow=this.toShow.add(this.containers));if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d=this.errorsFor(b);d.length?(d.removeClass(this.settings.validClass).addClass(this.settings.errorClass),d.attr("generated")&&d.html(c)):(d=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(b),generated:!0}).addClass(this.settings.errorClass).html(c||""),this.settings.wrapper&&(d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b))),!c&&this.settings.success&&(d.text(""),typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d,b)),this.toShow=this.toShow.add(d)},errorsFor:function(b){var c=this.idOrName(b);return this.errors().filter(function(){return a(this).attr("for")===c})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){return this.checkable(a)&&(a=this.findByName(a.name).not(this.settings.ignore)[0]),a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find('[name="'+b+'"]')},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a,b){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&this.pendingRequest===0&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&this.pendingRequest===0&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},attributeRules:function(b){var c={},d=a(b);for(var e in a.validator.methods){var f;e==="required"?(f=d.get(0).getAttribute(e),f===""&&(f=!0),f=!!f):f=d.attr(e),f?c[e]=f:d[0].getAttribute("type")===e&&(c[e]=!0)}return c.maxlength&&/-1|2147483647|524288/.test(c.maxlength)&&delete c.maxlength,c},metadataRules:function(b){if(!a.metadata)return{};var c=a.data(b.form,"validator").settings.meta;return c?a(b).metadata()[c]:a(b).metadata()},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1){delete b[d];return}if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=e.param!==undefined?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength","min","max"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){b[this]&&(b[this]=[Number(b[this][0]),Number(b[this][1])])}),a.validator.autoCreateRanges&&(b.min&&b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),b.minlength&&b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b.messages&&delete b.messages,b},normalizeRule:function(b){if(typeof b=="string"){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=d!==undefined?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if(c.nodeName.toLowerCase()==="select"){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:a.trim(b).length>0},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e=this.previousValue(c);this.settings.messages[c.name]||(this.settings.messages[c.name]={}),e.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=e.message,d=typeof d=="string"&&{url:d}||d;if(this.pending[c.name])return"pending";if(e.old===b)return e.valid;e.old=b;var f=this;this.startRequest(c);var g={};return g[c.name]=b,a.ajax(a.extend(!0,{url:d,mode:"abort",port:"validate"+c.name,dataType:"json",data:g,success:function(d){f.settings.messages[c.name].remote=e.originalMessage;var g=d===!0||d==="true";if(g){var h=f.formSubmitted;f.prepareElement(c),f.formSubmitted=h,f.successList.push(c),delete f.invalid[c.name],f.showErrors()}else{var i={},j=d||f.defaultMessage(c,"remote");i[c.name]=e.message=a.isFunction(j)?j(b):j,f.invalid[c.name]=!0,f.showErrors(i)}e.valid=g,f.stopRequest(c,g)}},d)),"pending"},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(a.trim(b),c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)},url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c=0,d=0,e=!1;a=a.replace(/\D/g,"");for(var f=a.length-1;f>=0;f--){var g=a.charAt(f);d=parseInt(g,10),e&&(d*=2)>9&&(d-=9),c+=d,e=!e}return c%10===0},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()}}}),a.format=a.validator.format})(jQuery),function(a){var b={};if(a.ajaxPrefilter)a.ajaxPrefilter(function(a,c,d){var e=a.port;a.mode==="abort"&&(b[e]&&b[e].abort(),b[e]=d)});else{var c=a.ajax;a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return e==="abort"?(b[f]&&b[f].abort(),b[f]=c.apply(this,arguments)):c.apply(this,arguments)}}}(jQuery),function(a){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&a.each({focus:"focusin",blur:"focusout"},function(b,c){function d(b){return b=a.event.fix(b),b.type=c,a.event.handle.call(this,b)}a.event.special[c]={setup:function(){this.addEventListener(b,d,!0)},teardown:function(){this.removeEventListener(b,d,!0)},handler:function(b){var d=arguments;return d[0]=a.event.fix(b),d[0].type=c,a.event.handle.apply(this,d)}}}),a.extend(a.fn,{validateDelegate:function(b,c,d){return this.bind(c,function(c){var e=a(c.target);if(e.is(b))return d.apply(e,arguments)})}})}(jQuery)
|
1 |
+
/*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation
|
2 |
+
* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */(function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=t.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(e.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(e){function s(){var s;return i.settings.submitHandler?(i.submitButton&&(s=t("<input type='hidden'/>").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&s.remove(),!1):!0}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)})),i)},valid:function(){if(t(this[0]).is("form"))return this.validate().form();var e=!0,i=t(this[0].form).validate();return this.each(function(){e=e&&i.element(this)}),e},removeAttrs:function(e){var i={},s=this;return t.each(e.split(/\s/),function(t,e){i[e]=s.attr(e),s.removeAttr(e)}),i},rules:function(e,i){var s=this[0];if(e){var r=t.data(s.form,"validator").settings,n=r.rules,a=t.validator.staticRules(s);switch(e){case"add":t.extend(a,t.validator.normalizeRule(i)),delete a.messages,n[s.name]=a,i.messages&&(r.messages[s.name]=t.extend(r.messages[s.name],i.messages));break;case"remove":if(!i)return delete n[s.name],a;var u={};return t.each(i.split(/\s/),function(t,e){u[e]=a[e],delete a[e]}),u}}var o=t.validator.normalizeRules(t.extend({},t.validator.classRules(s),t.validator.attributeRules(s),t.validator.dataRules(s),t.validator.staticRules(s)),s);if(o.required){var l=o.required;delete o.required,o=t.extend({required:l},o)}return o}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this[0].form,"validator"),s="on"+e.type.replace(/^validate/,"");i.settings[s]&&i.settings[s].call(i,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i=this.groups={};t.each(this.settings.groups,function(e,s){"string"==typeof s&&(s=s.split(/\s/)),t.each(s,function(t,s){i[s]=e})});var s=this.settings.rules;t.each(s,function(e,i){s[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){e=this.validationTargetFor(this.clean(e)),this.lastElement=e,this.prepareElement(e),this.currentElements=t(e);var i=this.check(e)!==!1;return i?delete this.invalid[e.name]:this.invalid[e.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var i in e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!e.objectLength(t(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.replace(" ",".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i=t(e).attr("type"),s=t(e).val();return"radio"===i||"checkbox"===i?t("input[name='"+t(e).attr("name")+"']:checked").val():"string"==typeof s?s.replace(/\r/g,""):s},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s=t(e).rules(),r=!1,n=this.elementValue(e);for(var a in s){var u={method:a,parameters:s[a]};try{if(i=t.validator.methods[a].call(this,n,e,u.parameters),"dependency-mismatch"===i){r=!0;continue}if(r=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(e)),void 0;if(!i)return this.formatAndAdd(e,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+u.method+"' method.",o),o}}return r?void 0:(this.objectLength(s)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg-"+i.toLowerCase())||e.attributes&&t(e).attr("data-msg-"+i.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t];return void 0},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"<strong>Warning: No message defined for "+e.name+"</strong>")},formatAndAdd:function(e,i){var s=this.defaultMessage(e,i.method),r=/\$?\{(\d+)\}/g;"function"==typeof s?s=s.call(this,i.parameters,e):r.test(s)&&(s=t.validator.format(s.replace(r,"{$1}"),i.parameters)),this.errorList.push({message:s,element:e}),this.errorMap[e.name]=s,this.submitted[e.name]=s},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var s=this.errorsFor(e);s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(s).length||(this.settings.errorPlacement?this.settings.errorPlacement(s,t(e)):s.insertAfter(e))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var i=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===i})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,i){return!!t(e,i.form).length},"function":function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},attributeRules:function(e){var i={},s=t(e),r=s[0].getAttribute("type");for(var n in t.validator.methods){var a;"required"===n?(a=s.get(0).getAttribute(n),""===a&&(a=!0),a=!!a):a=s.attr(n),/min|max/.test(n)&&(null===r||/number|range|text/.test(r))&&(a=Number(a)),a?i[n]=a:r===n&&"range"!==r&&(i[n]=!0)}return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var i,s,r={},n=t(e);for(i in t.validator.methods)s=n.data("rule-"+i.toLowerCase()),void 0!==s&&(r[i]=s);return r},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(s,r){if(r===!1)return delete e[s],void 0;if(r.param||r.depends){var n=!0;switch(typeof r.depends){case"string":n=!!t(r.depends,i.form).length;break;case"function":n=r.depends.call(i,i)}n?e[s]=void 0!==r.param?r.param:!0:delete e[s]}}),t.each(e,function(s,r){e[s]=t.isFunction(r)?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],3>i.length&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(t))},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i=0,s=0,r=!1;t=t.replace(/\D/g,"");for(var n=t.length-1;n>=0;n--){var a=t.charAt(n);s=parseInt(a,10),r&&(s*=2)>9&&(s-=9),i+=s,r=!r}return 0===i%10},minlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s},maxlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=r},rangelength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s[0]&&s[1]>=r},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&i[1]>=t},equalTo:function(e,i,s){var r=t(s);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,s){if(this.optional(i))return"dependency-mismatch";var r=this.previousValue(i);if(this.settings.messages[i.name]||(this.settings.messages[i.name]={}),r.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=r.message,s="string"==typeof s&&{url:s}||s,r.old===e)return r.valid;r.old=e;var n=this;this.startRequest(i);var a={};return a[i.name]=e,t.ajax(t.extend(!0,{url:s,mode:"abort",port:"validate"+i.name,dataType:"json",data:a,success:function(s){n.settings.messages[i.name].remote=r.originalMessage;var a=s===!0||"true"===s;if(a){var u=n.formSubmitted;n.prepareElement(i),n.formSubmitted=u,n.successList.push(i),delete n.invalid[i.name],n.showErrors()}else{var o={},l=s||n.defaultMessage(i,"remote");o[i.name]=r.message=t.isFunction(l)?l(e):l,n.invalid[i.name]=!0,n.showErrors(o)}r.valid=a,n.stopRequest(i,a)}},s)),"pending"}}}),t.format=t.validator.format})(jQuery),function(t){var e={};if(t.ajaxPrefilter)t.ajaxPrefilter(function(t,i,s){var r=t.port;"abort"===t.mode&&(e[r]&&e[r].abort(),e[r]=s)});else{var i=t.ajax;t.ajax=function(s){var r=("mode"in s?s:t.ajaxSettings).mode,n=("port"in s?s:t.ajaxSettings).port;return"abort"===r?(e[n]&&e[n].abort(),e[n]=i.apply(this,arguments),e[n]):i.apply(this,arguments)}}}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,i,s){return this.bind(i,function(i){var r=t(i.target);return r.is(e)?s.apply(r,arguments):void 0})}})}(jQuery);
|
|
|
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-af.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Afrikaans initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Renier Pretorius. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['af'] = {
|
5 |
+
closeText: 'Selekteer',
|
6 |
+
prevText: 'Vorige',
|
7 |
+
nextText: 'Volgende',
|
8 |
+
currentText: 'Vandag',
|
9 |
+
monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
|
10 |
+
'Julie','Augustus','September','Oktober','November','Desember'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
|
13 |
+
dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
|
14 |
+
dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
|
15 |
+
dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['af']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar-DZ.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
|
2 |
+
/* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem@yahoo.fr */
|
3 |
+
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['ar-DZ'] = {
|
6 |
+
closeText: 'إغلاق',
|
7 |
+
prevText: '<السابق',
|
8 |
+
nextText: 'التالي>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Arabic Translation for jQuery UI date picker plugin. */
|
2 |
+
/* Khaled Alhourani -- me@khaledalhourani.com */
|
3 |
+
/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['ar'] = {
|
6 |
+
closeText: 'إغلاق',
|
7 |
+
prevText: '<السابق',
|
8 |
+
nextText: 'التالي>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jamil Najafov (necefov33@gmail.com). */
|
3 |
+
jQuery(function($) {
|
4 |
+
$.datepicker.regional['az'] = {
|
5 |
+
closeText: 'Bağla',
|
6 |
+
prevText: '<Geri',
|
7 |
+
nextText: 'İrəli>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Belarusian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Pavel Selitskas <p.selitskas@gmail.com> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['be'] = {
|
5 |
+
closeText: 'Зачыніць',
|
6 |
+
prevText: '←Папяр.',
|
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['be']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bg.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Bulgarian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Stoyan Kyosev (http://svest.org). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['bg'] = {
|
5 |
+
closeText: 'затвори',
|
6 |
+
prevText: '<назад',
|
7 |
+
nextText: 'напред>',
|
8 |
+
nextBigText: '>>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Bosnian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Kenan Konjo. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['bs'] = {
|
5 |
+
closeText: 'Zatvori',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Inicialització en català per a l'extensió 'UI date picker' per jQuery. */
|
2 |
+
/* Writers: (joan.leon@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ca'] = {
|
5 |
+
closeText: 'Tanca',
|
6 |
+
prevText: 'Anterior',
|
7 |
+
nextText: 'Següent',
|
8 |
+
currentText: 'Avui',
|
9 |
+
monthNames: ['gener','febrer','març','abril','maig','juny',
|
10 |
+
'juliol','agost','setembre','octubre','novembre','desembre'],
|
11 |
+
monthNamesShort: ['gen','feb','març','abr','maig','juny',
|
12 |
+
'jul','ag','set','oct','nov','des'],
|
13 |
+
dayNames: ['diumenge','dilluns','dimarts','dimecres','dijous','divendres','dissabte'],
|
14 |
+
dayNamesShort: ['dg','dl','dt','dc','dj','dv','ds'],
|
15 |
+
dayNamesMin: ['dg','dl','dt','dc','dj','dv','ds'],
|
16 |
+
weekHeader: 'Set',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ca']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cs.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Czech initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Tomas Muller (tomas@tomas-muller.net). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['cs'] = {
|
5 |
+
closeText: 'Zavřít',
|
6 |
+
prevText: '<Dříve',
|
7 |
+
nextText: 'Později>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Welsh/UK initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by William Griffiths. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['cy-GB'] = {
|
5 |
+
closeText: 'Done',
|
6 |
+
prevText: 'Prev',
|
7 |
+
nextText: 'Next',
|
8 |
+
currentText: 'Today',
|
9 |
+
monthNames: ['Ionawr','Chwefror','Mawrth','Ebrill','Mai','Mehefin',
|
10 |
+
'Gorffennaf','Awst','Medi','Hydref','Tachwedd','Rhagfyr'],
|
11 |
+
monthNamesShort: ['Ion', 'Chw', 'Maw', 'Ebr', 'Mai', 'Meh',
|
12 |
+
'Gor', 'Aws', 'Med', 'Hyd', 'Tac', 'Rha'],
|
13 |
+
dayNames: ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'],
|
14 |
+
dayNamesShort: ['Sul', 'Llu', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'],
|
15 |
+
dayNamesMin: ['Su','Ll','Ma','Me','Ia','Gw','Sa'],
|
16 |
+
weekHeader: 'Wy',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['cy-GB']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-da.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Danish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jan Christensen ( deletestuff@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['da'] = {
|
5 |
+
closeText: 'Luk',
|
6 |
+
prevText: '<Forrige',
|
7 |
+
nextText: 'Næste>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* German initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Milian Wolff (mail@milianw.de). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['de'] = {
|
5 |
+
closeText: 'Schließen',
|
6 |
+
prevText: '<Zurück',
|
7 |
+
nextText: 'Vor>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Greek (el) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Alex Cicovic (http://www.alexcicovic.com) */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['el'] = {
|
5 |
+
closeText: 'Κλείσιμο',
|
6 |
+
prevText: 'Προηγούμενος',
|
7 |
+
nextText: 'Επόμενος',
|
8 |
+
currentText: 'Τρέχων Μήνας',
|
9 |
+
monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
|
10 |
+
'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
|
11 |
+
monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
|
12 |
+
'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
|
13 |
+
dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
|
14 |
+
dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
|
15 |
+
dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
|
16 |
+
weekHeader: 'Εβδ',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['el']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-AU.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* English/Australia initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Based on the en-GB initialisation. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['en-AU'] = {
|
5 |
+
closeText: 'Done',
|
6 |
+
prevText: 'Prev',
|
7 |
+
nextText: 'Next',
|
8 |
+
currentText: 'Today',
|
9 |
+
monthNames: ['January','February','March','April','May','June',
|
10 |
+
'July','August','September','October','November','December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
14 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
15 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['en-AU']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-GB.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* English/UK initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Stuart. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['en-GB'] = {
|
5 |
+
closeText: 'Done',
|
6 |
+
prevText: 'Prev',
|
7 |
+
nextText: 'Next',
|
8 |
+
currentText: 'Today',
|
9 |
+
monthNames: ['January','February','March','April','May','June',
|
10 |
+
'July','August','September','October','November','December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
14 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
15 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['en-GB']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-NZ.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Based on the en-GB initialisation. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['en-NZ'] = {
|
5 |
+
closeText: 'Done',
|
6 |
+
prevText: 'Prev',
|
7 |
+
nextText: 'Next',
|
8 |
+
currentText: 'Today',
|
9 |
+
monthNames: ['January','February','March','April','May','June',
|
10 |
+
'July','August','September','October','November','December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
14 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
15 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['en-NZ']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eo.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Esperanto initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Olivier M. (olivierweb@ifrance.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['eo'] = {
|
5 |
+
closeText: 'Fermi',
|
6 |
+
prevText: '<Anta',
|
7 |
+
nextText: 'Sekv>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Inicialización en español para la extensión 'UI date picker' para jQuery. */
|
2 |
+
/* Traducido por Vester (xvester@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['es'] = {
|
5 |
+
closeText: 'Cerrar',
|
6 |
+
prevText: '<Ant',
|
7 |
+
nextText: 'Sig>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Estonian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['et'] = {
|
5 |
+
closeText: 'Sulge',
|
6 |
+
prevText: 'Eelnev',
|
7 |
+
nextText: 'Järgnev',
|
8 |
+
currentText: 'Täna',
|
9 |
+
monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
|
10 |
+
'Juuli','August','September','Oktoober','November','Detsember'],
|
11 |
+
monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
|
12 |
+
'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
|
13 |
+
dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
|
14 |
+
dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
|
15 |
+
dayNamesMin: ['P','E','T','K','N','R','L'],
|
16 |
+
weekHeader: 'näd',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['et']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eu.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
|
2 |
+
/* Karrikas-ek itzulia (karrikas@karrikas.com) */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['eu'] = {
|
5 |
+
closeText: 'Egina',
|
6 |
+
prevText: '<Aur',
|
7 |
+
nextText: 'Hur>',
|
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
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
|
2 |
+
/* Javad Mowlanezhad -- jmowla@gmail.com */
|
3 |
+
/* Jalali calendar should supported soon! (Its implemented but I have to test it) */
|
4 |
+
jQuery(function($) {
|
5 |
+
$.datepicker.regional['fa'] = {
|
6 |
+
closeText: 'بستن',
|
7 |
+
prevText: '<قبلی',
|
8 |
+
nextText: 'بعدی>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Finnish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Harri Kilpiö (harrikilpio@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['fi'] = {
|
5 |
+
closeText: 'Sulje',
|
6 |
+
prevText: '«Edellinen',
|
7 |
+
nextText: 'Seuraava»',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Faroese initialisation for the jQuery UI date picker plugin */
|
2 |
+
/* Written by Sverri Mohr Olsen, sverrimo@gmail.com */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['fo'] = {
|
5 |
+
closeText: 'Lat aftur',
|
6 |
+
prevText: '<Fyrra',
|
7 |
+
nextText: 'Næsta>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Canadian-French initialisation for the jQuery UI date picker plugin. */
|
2 |
+
jQuery(function ($) {
|
3 |
+
$.datepicker.regional['fr-CA'] = {
|
4 |
+
closeText: 'Fermer',
|
5 |
+
prevText: 'Précédent',
|
6 |
+
nextText: 'Suivant',
|
7 |
+
currentText: 'Aujourd\'hui',
|
8 |
+
monthNames: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin',
|
9 |
+
'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
|
10 |
+
monthNamesShort: ['janv.', 'févr.', 'mars', 'avril', 'mai', 'juin',
|
11 |
+
'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
|
12 |
+
dayNames: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
|
13 |
+
dayNamesShort: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
|
14 |
+
dayNamesMin: ['D', 'L', 'M', 'M', 'J', 'V', 'S'],
|
15 |
+
weekHeader: 'Sem.',
|
16 |
+
dateFormat: 'yy-mm-dd',
|
17 |
+
firstDay: 0,
|
18 |
+
isRTL: false,
|
19 |
+
showMonthAfterYear: false,
|
20 |
+
yearSuffix: ''
|
21 |
+
};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['fr-CA']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CH.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Swiss-French initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written Martin Voelkle (martin.voelkle@e-tc.ch). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['fr-CH'] = {
|
5 |
+
closeText: 'Fermer',
|
6 |
+
prevText: '<Préc',
|
7 |
+
nextText: 'Suiv>',
|
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
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* French initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Keith Wood (kbwood{at}iinet.com.au),
|
3 |
+
Stéphane Nahmani (sholby@sholby.net),
|
4 |
+
Stéphane Raimbault <stephane.raimbault@gmail.com> */
|
5 |
+
jQuery(function($){
|
6 |
+
$.datepicker.regional['fr'] = {
|
7 |
+
closeText: 'Fermer',
|
8 |
+
prevText: 'Précédent',
|
9 |
+
nextText: 'Suivant',
|
10 |
+
currentText: 'Aujourd\'hui',
|
11 |
+
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
|
12 |
+
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
|
13 |
+
monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
|
14 |
+
'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
|
15 |
+
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
|
16 |
+
dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
|
17 |
+
dayNamesMin: ['D','L','M','M','J','V','S'],
|
18 |
+
weekHeader: 'Sem.',
|
19 |
+
dateFormat: 'dd/mm/yy',
|
20 |
+
firstDay: 1,
|
21 |
+
isRTL: false,
|
22 |
+
showMonthAfterYear: false,
|
23 |
+
yearSuffix: ''};
|
24 |
+
$.datepicker.setDefaults($.datepicker.regional['fr']);
|
25 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-gl.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Galician localization for 'UI date picker' jQuery extension. */
|
2 |
+
/* Translated by Jorge Barreiro <yortx.barry@gmail.com>. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['gl'] = {
|
5 |
+
closeText: 'Pechar',
|
6 |
+
prevText: '<Ant',
|
7 |
+
nextText: 'Seg>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hebrew initialisation for the UI Datepicker extension. */
|
2 |
+
/* Written by Amir Hardon (ahardon at gmail dot com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['he'] = {
|
5 |
+
closeText: 'סגור',
|
6 |
+
prevText: '<הקודם',
|
7 |
+
nextText: 'הבא>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hindi initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Michael Dawart. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['hi'] = {
|
5 |
+
closeText: 'बंद',
|
6 |
+
prevText: 'पिछला',
|
7 |
+
nextText: 'अगला',
|
8 |
+
currentText: 'आज',
|
9 |
+
monthNames: ['जनवरी ','फरवरी','मार्च','अप्रेल','मई','जून',
|
10 |
+
'जूलाई','अगस्त ','सितम्बर','अक्टूबर','नवम्बर','दिसम्बर'],
|
11 |
+
monthNamesShort: ['जन', 'फर', 'मार्च', 'अप्रेल', 'मई', 'जून',
|
12 |
+
'जूलाई', 'अग', 'सित', 'अक्ट', 'नव', 'दि'],
|
13 |
+
dayNames: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'],
|
14 |
+
dayNamesShort: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
|
15 |
+
dayNamesMin: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
|
16 |
+
weekHeader: 'हफ्ता',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['hi']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hr.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Croatian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Vjekoslav Nesek. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['hr'] = {
|
5 |
+
closeText: 'Zatvori',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hungarian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Istvan Karaszi (jquery@spam.raszi.hu). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['hu'] = {
|
5 |
+
closeText: 'bezár',
|
6 |
+
prevText: 'vissza',
|
7 |
+
nextText: 'előre',
|
8 |
+
currentText: 'ma',
|
9 |
+
monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
|
10 |
+
'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
|
12 |
+
'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
|
14 |
+
dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
|
15 |
+
dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
|
16 |
+
weekHeader: 'Hét',
|
17 |
+
dateFormat: 'yy.mm.dd.',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['hu']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hy.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['hy'] = {
|
5 |
+
closeText: 'Փակել',
|
6 |
+
prevText: '<Նախ.',
|
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['hy']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-id.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Indonesian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Deden Fathurahman (dedenf@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['id'] = {
|
5 |
+
closeText: 'Tutup',
|
6 |
+
prevText: '<mundur',
|
7 |
+
nextText: 'maju>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Icelandic initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Haukur H. Thorsson (haukur@eskill.is). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['is'] = {
|
5 |
+
closeText: 'Loka',
|
6 |
+
prevText: '< Fyrri',
|
7 |
+
nextText: 'Næsti >',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Italian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Antonello Pasella (antonello.pasella@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['it'] = {
|
5 |
+
closeText: 'Chiudi',
|
6 |
+
prevText: '<Prec',
|
7 |
+
nextText: 'Succ>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Japanese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Kentaro SATO (kentaro@ranvis.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ja'] = {
|
5 |
+
closeText: '閉じる',
|
6 |
+
prevText: '<前',
|
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: '週',
|
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
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Lado Lomidze (lado.lomidze@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ka'] = {
|
5 |
+
closeText: 'დახურვა',
|
6 |
+
prevText: '< წინა',
|
7 |
+
nextText: 'შემდეგი >',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['kk'] = {
|
5 |
+
closeText: 'Жабу',
|
6 |
+
prevText: '<Алдыңғы',
|
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['kk']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-km.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Khmer initialisation for the jQuery calendar extension. */
|
2 |
+
/* Written by Chandara Om (chandara.teacher@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['km'] = {
|
5 |
+
closeText: 'ធ្វើរួច',
|
6 |
+
prevText: 'មុន',
|
7 |
+
nextText: 'បន្ទាប់',
|
8 |
+
currentText: 'ថ្ងៃនេះ',
|
9 |
+
monthNames: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
|
10 |
+
'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
|
11 |
+
monthNamesShort: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
|
12 |
+
'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
|
13 |
+
dayNames: ['អាទិត្យ', 'ចន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'],
|
14 |
+
dayNamesShort: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
|
15 |
+
dayNamesMin: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
|
16 |
+
weekHeader: 'សប្ដាហ៍',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['km']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ko.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Korean initialisation for the jQuery calendar extension. */
|
2 |
+
/* Written by DaeKwon Kang (ncrash.dk@gmail.com), Edited by Genie. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ko'] = {
|
5 |
+
closeText: '닫기',
|
6 |
+
prevText: '이전달',
|
7 |
+
nextText: '다음달',
|
8 |
+
currentText: '오늘',
|
9 |
+
monthNames: ['1월','2월','3월','4월','5월','6월',
|
10 |
+
'7월','8월','9월','10월','11월','12월'],
|
11 |
+
monthNamesShort: ['1월','2월','3월','4월','5월','6월',
|
12 |
+
'7월','8월','9월','10월','11월','12월'],
|
13 |
+
dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
|
14 |
+
dayNamesShort: ['일','월','화','수','목','금','토'],
|
15 |
+
dayNamesMin: ['일','월','화','수','목','금','토'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'yy-mm-dd',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: '년'};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ko']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ky.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Kyrgyz (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Sergey Kartashov (ebishkek@yandex.ru). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ky'] = {
|
5 |
+
closeText: 'Жабуу',
|
6 |
+
prevText: '<Мур',
|
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 |
+
};
|
23 |
+
$.datepicker.setDefaults($.datepicker.regional['ky']);
|
24 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lb.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Luxembourgish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Michel Weimerskirch <michel@weimerskirch.net> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['lb'] = {
|
5 |
+
closeText: 'Fäerdeg',
|
6 |
+
prevText: 'Zréck',
|
7 |
+
nextText: 'Weider',
|
8 |
+
currentText: 'Haut',
|
9 |
+
monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni',
|
10 |
+
'Juli','August','September','Oktober','November','Dezember'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
|
13 |
+
dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'],
|
14 |
+
dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'],
|
15 |
+
dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'],
|
16 |
+
weekHeader: 'W',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['lb']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lt.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* @author Arturas Paleicikas <arturas@avalon.lt> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['lt'] = {
|
5 |
+
closeText: 'Uždaryti',
|
6 |
+
prevText: '<Atgal',
|
7 |
+
nextText: 'Pirmyn>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* @author Arturas Paleicikas <arturas.paleicikas@metasite.net> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['lv'] = {
|
5 |
+
closeText: 'Aizvērt',
|
6 |
+
prevText: 'Iepr',
|
7 |
+
nextText: 'Nāka',
|
8 |
+
currentText: 'Šodien',
|
9 |
+
monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
|
10 |
+
'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
|
12 |
+
'Jūl','Aug','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
|
14 |
+
dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
|
15 |
+
dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
|
16 |
+
weekHeader: 'Nav',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['lv']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-mk.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Macedonian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Stojce Slavkovski. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['mk'] = {
|
5 |
+
closeText: 'Затвори',
|
6 |
+
prevText: '<',
|
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['mk']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ml.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Saji Nediyanchath (saji89@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ml'] = {
|
5 |
+
closeText: 'ശരി',
|
6 |
+
prevText: 'മുന്നത്തെ',
|
7 |
+
nextText: 'അടുത്തത് ',
|
8 |
+
currentText: 'ഇന്ന്',
|
9 |
+
monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്ച്ച്','ഏപ്രില്','മേയ്','ജൂണ്',
|
10 |
+
'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്','ഒക്ടോബര്','നവംബര്','ഡിസംബര്'],
|
11 |
+
monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്', 'ഏപ്രി', 'മേയ്', 'ജൂണ്',
|
12 |
+
'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
|
13 |
+
dayNames: ['ഞായര്', 'തിങ്കള്', 'ചൊവ്വ', 'ബുധന്', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
|
14 |
+
dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
|
15 |
+
dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
|
16 |
+
weekHeader: 'ആ',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ml']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ms.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Malaysian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ms'] = {
|
5 |
+
closeText: 'Tutup',
|
6 |
+
prevText: '<Sebelum',
|
7 |
+
nextText: 'Selepas>',
|
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
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Norwegian Bokmål initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Bjørn Johansen (post@bjornjohansen.no). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['nb'] = {
|
5 |
+
closeText: 'Lukk',
|
6 |
+
prevText: '«Forrige',
|
7 |
+
nextText: 'Neste»',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Dutch (Belgium) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* David De Sloovere @DavidDeSloovere */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['nl-BE'] = {
|
5 |
+
closeText: 'Sluiten',
|
6 |
+
prevText: '←',
|
7 |
+
nextText: '→',
|
8 |
+
currentText: 'Vandaag',
|
9 |
+
monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
|
10 |
+
'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
|
11 |
+
monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
|
12 |
+
'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
13 |
+
dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
|
14 |
+
dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
|
15 |
+
dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['nl-BE']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Mathias Bynens <http://mathiasbynens.be/> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional.nl = {
|
5 |
+
closeText: 'Sluiten',
|
6 |
+
prevText: '←',
|
7 |
+
nextText: '→',
|
8 |
+
currentText: 'Vandaag',
|
9 |
+
monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
|
10 |
+
'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
|
11 |
+
monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
|
12 |
+
'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
13 |
+
dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
|
14 |
+
dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
|
15 |
+
dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional.nl);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nn.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Norwegian Nynorsk initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Bjørn Johansen (post@bjornjohansen.no). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['nn'] = {
|
5 |
+
closeText: 'Lukk',
|
6 |
+
prevText: '«Førre',
|
7 |
+
nextText: 'Neste»',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Norwegian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
|
3 |
+
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['no'] = {
|
6 |
+
closeText: 'Lukk',
|
7 |
+
prevText: '«Forrige',
|
8 |
+
nextText: 'Neste»',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Polish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['pl'] = {
|
5 |
+
closeText: 'Zamknij',
|
6 |
+
prevText: '<Poprzedni',
|
7 |
+
nextText: 'Następny>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Brazilian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['pt-BR'] = {
|
5 |
+
closeText: 'Fechar',
|
6 |
+
prevText: '<Anterior',
|
7 |
+
nextText: 'Próximo>',
|
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
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Portuguese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
jQuery(function($){
|
3 |
+
$.datepicker.regional['pt'] = {
|
4 |
+
closeText: 'Fechar',
|
5 |
+
prevText: '<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
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Romansh initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Yvonne Gienal (yvonne.gienal@educa.ch). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['rm'] = {
|
5 |
+
closeText: 'Serrar',
|
6 |
+
prevText: '<Suandant',
|
7 |
+
nextText: 'Precedent>',
|
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
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Romanian initialisation for the jQuery UI date picker plugin.
|
2 |
+
*
|
3 |
+
* Written by Edmond L. (ll_edmond@walla.com)
|
4 |
+
* and Ionut G. Stan (ionut.g.stan@gmail.com)
|
5 |
+
*/
|
6 |
+
jQuery(function($){
|
7 |
+
$.datepicker.regional['ro'] = {
|
8 |
+
closeText: 'Închide',
|
9 |
+
prevText: '« Luna precedentă',
|
10 |
+
nextText: 'Luna următoare »',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Andrew Stromnov (stromnov@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ru'] = {
|
5 |
+
closeText: 'Закрыть',
|
6 |
+
prevText: '<Пред',
|
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['ru']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sk.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Slovak initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Vojtech Rinik (vojto@hmm.sk). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sk'] = {
|
5 |
+
closeText: 'Zavrieť',
|
6 |
+
prevText: '<Predchádzajúci',
|
7 |
+
nextText: 'Nasledujúci>',
|
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
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Slovenian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jaka Jancar (jaka@kubje.org). */
|
3 |
+
/* c = č, s = š z = ž C = Č S = Š Z = Ž */
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['sl'] = {
|
6 |
+
closeText: 'Zapri',
|
7 |
+
prevText: '<Prejšnji',
|
8 |
+
nextText: 'Naslednji>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Albanian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Flakron Bytyqi (flakron@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sq'] = {
|
5 |
+
closeText: 'mbylle',
|
6 |
+
prevText: '<mbrapa',
|
7 |
+
nextText: 'Përpara>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Serbian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Dejan Dimić. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sr-SR'] = {
|
5 |
+
closeText: 'Zatvori',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Serbian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Dejan Dimić. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sr'] = {
|
5 |
+
closeText: 'Затвори',
|
6 |
+
prevText: '<',
|
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['sr']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sv.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Swedish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Anders Ekdahl ( anders@nomadiz.se). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sv'] = {
|
5 |
+
closeText: 'Stäng',
|
6 |
+
prevText: '«Förra',
|
7 |
+
nextText: 'Nästa»',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by S A Sureshkumar (saskumar@live.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ta'] = {
|
5 |
+
closeText: 'மூடு',
|
6 |
+
prevText: 'முன்னையது',
|
7 |
+
nextText: 'அடுத்தது',
|
8 |
+
currentText: 'இன்று',
|
9 |
+
monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
|
10 |
+
'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'],
|
11 |
+
monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
|
12 |
+
'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
|
13 |
+
dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
|
14 |
+
dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
|
15 |
+
dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
|
16 |
+
weekHeader: 'Не',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ta']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-th.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Thai initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by pipo (pipo@sixhead.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['th'] = {
|
5 |
+
closeText: 'ปิด',
|
6 |
+
prevText: '« ย้อน',
|
7 |
+
nextText: 'ถัดไป »',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Abdurahmon Saidov (saidovab@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['tj'] = {
|
5 |
+
closeText: 'Идома',
|
6 |
+
prevText: '<Қафо',
|
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['tj']);
|
23 |
+
});
|
js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tr.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Turkish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Izzet Emre Erkan (kara@karalamalar.net). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['tr'] = {
|
5 |
+
closeText: 'kapat',
|
6 |
+
prevText: '<geri',
|
7 |
+
nextText: 'ileri>',
|
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
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
|
3 |
+
/* Corrected by Igor Milla (igor.fsp.milla@gmail.com). */
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['uk'] = {
|
6 |
+
closeText: 'Закрити',
|
7 |
+
prevText: '<',
|
8 |
+
nextText: '>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Vietnamese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['vi'] = {
|
5 |
+
closeText: 'Đóng',
|
6 |
+
prevText: '<Trước',
|
7 |
+
nextText: 'Tiếp>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Cloudream (cloudream@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['zh-CN'] = {
|
5 |
+
closeText: '关闭',
|
6 |
+
prevText: '<上月',
|
7 |
+
nextText: '下月>',
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by SCCY (samuelcychan@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['zh-HK'] = {
|
5 |
+
closeText: '關閉',
|
6 |
+
prevText: '<上月',
|
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: 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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Ressol (ressol@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['zh-TW'] = {
|
5 |
+
closeText: '關閉',
|
6 |
+
prevText: '<上月',
|
7 |
+
nextText: '下月>',
|
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/timepicker-i18n/jquery-ui-timepicker-af.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Afrikaans translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Deon Heyns */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['af'] = {
|
5 |
+
timeOnlyTitle: 'Kies Tyd',
|
6 |
+
timeText: 'Tyd ',
|
7 |
+
hourText: 'Ure ',
|
8 |
+
minuteText: 'Minute',
|
9 |
+
secondText: 'Sekondes',
|
10 |
+
millisecText: 'Millisekondes',
|
11 |
+
timezoneText: 'Tydsone',
|
12 |
+
currentText: 'Huidige Tyd',
|
13 |
+
closeText: 'Klaar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['af']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-bg.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Bulgarian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Plamen Kovandjiev */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['bg'] = {
|
5 |
+
timeOnlyTitle: 'Изберете време',
|
6 |
+
timeText: 'Време',
|
7 |
+
hourText: 'Час',
|
8 |
+
minuteText: 'Минути',
|
9 |
+
secondText: 'Секунди',
|
10 |
+
millisecText: 'Милисекунди',
|
11 |
+
timezoneText: 'Часови пояс',
|
12 |
+
currentText: 'Сега',
|
13 |
+
closeText: 'Затвори',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['bg']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ca.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Catalan translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Sergi Faber */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ca'] = {
|
5 |
+
timeOnlyTitle: 'Escollir una hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Hores',
|
8 |
+
minuteText: 'Minuts',
|
9 |
+
secondText: 'Segons',
|
10 |
+
millisecText: 'Milisegons',
|
11 |
+
timezoneText: 'Fus horari',
|
12 |
+
currentText: 'Ara',
|
13 |
+
closeText: 'Tancar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['ca']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-cs.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Czech translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Ondřej Vodáček */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['cs'] = {
|
5 |
+
timeOnlyTitle: 'Vyberte čas',
|
6 |
+
timeText: 'Čas',
|
7 |
+
hourText: 'Hodiny',
|
8 |
+
minuteText: 'Minuty',
|
9 |
+
secondText: 'Vteřiny',
|
10 |
+
millisecText: 'Milisekundy',
|
11 |
+
timezoneText: 'Časové pásmo',
|
12 |
+
currentText: 'Nyní',
|
13 |
+
closeText: 'Zavřít',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['dop.', 'AM', 'A'],
|
16 |
+
pmNames: ['odp.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['cs']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-de.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* German translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Marvin */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['de'] = {
|
5 |
+
timeOnlyTitle: 'Zeit Wählen',
|
6 |
+
timeText: 'Zeit',
|
7 |
+
hourText: 'Stunde',
|
8 |
+
minuteText: 'Minute',
|
9 |
+
secondText: 'Sekunde',
|
10 |
+
millisecText: 'Millisekunde',
|
11 |
+
timezoneText: 'Zeitzone',
|
12 |
+
currentText: 'Jetzt',
|
13 |
+
closeText: 'Fertig',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['vorm.', 'AM', 'A'],
|
16 |
+
pmNames: ['nachm.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['de']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-el.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hellenic translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Christos Pontikis */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['el'] = {
|
5 |
+
timeOnlyTitle: 'Επιλογή ώρας',
|
6 |
+
timeText: 'Ώρα',
|
7 |
+
hourText: 'Ώρες',
|
8 |
+
minuteText: 'Λεπτά',
|
9 |
+
secondText: 'Δευτερόλεπτα',
|
10 |
+
millisecText: 'μιλιδευτερόλεπτο',
|
11 |
+
timezoneText: 'Ζώνη ώρας',
|
12 |
+
currentText: 'Τώρα',
|
13 |
+
closeText: 'Κλείσιμο',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['π.μ.', 'AM', 'A'],
|
16 |
+
pmNames: ['μ.μ.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['el']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-es.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Spanish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Ianaré Sévi */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['es'] = {
|
5 |
+
timeOnlyTitle: 'Elegir una hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Horas',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milisegundos',
|
11 |
+
timezoneText: 'Huso horario',
|
12 |
+
currentText: 'Ahora',
|
13 |
+
closeText: 'Cerrar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['a.m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['es']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-et.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Estonian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Karl Sutt (karl@sutt.ee) */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['et'] = {
|
5 |
+
timeOnlyTitle: 'Vali aeg',
|
6 |
+
timeText: 'Aeg',
|
7 |
+
hourText: 'Tund',
|
8 |
+
minuteText: 'Minut',
|
9 |
+
secondText: 'Sekund',
|
10 |
+
millisecText: 'Millisekundis',
|
11 |
+
timezoneText: 'Ajavöönd',
|
12 |
+
currentText: 'Praegu',
|
13 |
+
closeText: 'Valmis',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['et']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-eu.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Basque trannslation for JQuery Timepicker Addon
|
2 |
+
/* Translated by Xabi Fer */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['eu'] = {
|
5 |
+
timeOnlyTitle: 'Aukeratu ordua',
|
6 |
+
timeText: 'Ordua',
|
7 |
+
hourText: 'Orduak',
|
8 |
+
minuteText: 'Minutuak',
|
9 |
+
secondText: 'Segunduak',
|
10 |
+
millisecText: 'Milisegunduak',
|
11 |
+
timezoneText: 'Ordu-eremua',
|
12 |
+
currentText: 'Orain',
|
13 |
+
closeText: 'Itxi',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['a.m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['eu']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-fi.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Finnish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Juga Paazmaya (http://github.com/paazmaya) */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['fi'] = {
|
5 |
+
timeOnlyTitle: 'Valitse aika',
|
6 |
+
timeText: 'Aika',
|
7 |
+
hourText: 'Tunti',
|
8 |
+
minuteText: 'Minuutti',
|
9 |
+
secondText: 'Sekunti',
|
10 |
+
millisecText: 'Millisekunnin',
|
11 |
+
timezoneText: 'Aikavyöhyke',
|
12 |
+
currentText: 'Nyt',
|
13 |
+
closeText: 'Sulje',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['ap.', 'AM', 'A'],
|
16 |
+
pmNames: ['ip.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['fi']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-fr.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* French translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Thomas Lété */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['fr'] = {
|
5 |
+
timeOnlyTitle: 'Choisir une heure',
|
6 |
+
timeText: 'Heure',
|
7 |
+
hourText: 'Heures',
|
8 |
+
minuteText: 'Minutes',
|
9 |
+
secondText: 'Secondes',
|
10 |
+
millisecText: 'Millisecondes',
|
11 |
+
timezoneText: 'Fuseau horaire',
|
12 |
+
currentText: 'Maintenant',
|
13 |
+
closeText: 'Terminé',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['fr']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-gl.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Galician translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by David Barral */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['gl'] = {
|
5 |
+
timeOnlyTitle: 'Elixir unha hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Horas',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milisegundos',
|
11 |
+
timezoneText: 'Fuso horario',
|
12 |
+
currentText: 'Agora',
|
13 |
+
closeText: 'Pechar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['a.m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['gl']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-he.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hebrew translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Lior Lapid */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional["he"] = {
|
5 |
+
timeOnlyTitle: "בחירת זמן",
|
6 |
+
timeText: "שעה",
|
7 |
+
hourText: "שעות",
|
8 |
+
minuteText: "דקות",
|
9 |
+
secondText: "שניות",
|
10 |
+
millisecText: "אלפית השנייה",
|
11 |
+
timezoneText: "אזור זמן",
|
12 |
+
currentText: "עכשיו",
|
13 |
+
closeText:"סגור",
|
14 |
+
timeFormat: "HH:mm",
|
15 |
+
amNames: ['לפנה"צ', 'AM', 'A'],
|
16 |
+
pmNames: ['אחה"צ', 'PM', 'P'],
|
17 |
+
isRTL: true
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional["he"]);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-hu.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hungarian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Vas Gábor */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['hu'] = {
|
5 |
+
timeOnlyTitle: 'Válasszon időpontot',
|
6 |
+
timeText: 'Idő',
|
7 |
+
hourText: 'Óra',
|
8 |
+
minuteText: 'Perc',
|
9 |
+
secondText: 'Másodperc',
|
10 |
+
millisecText: 'Milliszekundumos',
|
11 |
+
timezoneText: 'Időzóna',
|
12 |
+
currentText: 'Most',
|
13 |
+
closeText: 'Kész',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['de.', 'AM', 'A'],
|
16 |
+
pmNames: ['du.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['hu']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-id.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Indonesian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Nia */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['id'] = {
|
5 |
+
timeOnlyTitle: 'Pilih Waktu',
|
6 |
+
timeText: 'Waktu',
|
7 |
+
hourText: 'Pukul',
|
8 |
+
minuteText: 'Menit',
|
9 |
+
secondText: 'Detik',
|
10 |
+
millisecText: 'Milidetik',
|
11 |
+
timezoneText: 'Zona Waktu',
|
12 |
+
currentText: 'Sekarang',
|
13 |
+
closeText: 'OK',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['id']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-it.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Italian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Marco "logicoder" Del Tongo */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['it'] = {
|
5 |
+
timeOnlyTitle: 'Scegli orario',
|
6 |
+
timeText: 'Orario',
|
7 |
+
hourText: 'Ora',
|
8 |
+
minuteText: 'Minuto',
|
9 |
+
secondText: 'Secondo',
|
10 |
+
millisecText: 'Millisecondo',
|
11 |
+
timezoneText: 'Fuso orario',
|
12 |
+
currentText: 'Adesso',
|
13 |
+
closeText: 'Chiudi',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['it']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ja.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Japanese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Jun Omae */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ja'] = {
|
5 |
+
timeOnlyTitle: '時間を選択',
|
6 |
+
timeText: '時間',
|
7 |
+
hourText: '時',
|
8 |
+
minuteText: '分',
|
9 |
+
secondText: '秒',
|
10 |
+
millisecText: 'ミリ秒',
|
11 |
+
timezoneText: 'タイムゾーン',
|
12 |
+
currentText: '現時刻',
|
13 |
+
closeText: '閉じる',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['午前', 'AM', 'A'],
|
16 |
+
pmNames: ['午後', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['ja']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ko.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Korean translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Genie */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ko'] = {
|
5 |
+
timeOnlyTitle: '시간 선택',
|
6 |
+
timeText: '시간',
|
7 |
+
hourText: '시',
|
8 |
+
minuteText: '분',
|
9 |
+
secondText: '초',
|
10 |
+
millisecText: '밀리초',
|
11 |
+
timezoneText: '표준 시간대',
|
12 |
+
currentText: '현재 시각',
|
13 |
+
closeText: '닫기',
|
14 |
+
timeFormat: 'tt h:mm',
|
15 |
+
amNames: ['오전', 'AM', 'A'],
|
16 |
+
pmNames: ['오후', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['ko']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-lt.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Lithuanian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Irmantas Šiupšinskas */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['lt'] = {
|
5 |
+
timeOnlyTitle: 'Pasirinkite laiką',
|
6 |
+
timeText: 'Laikas',
|
7 |
+
hourText: 'Valandos',
|
8 |
+
minuteText: 'Minutės',
|
9 |
+
secondText: 'Sekundės',
|
10 |
+
millisecText: 'Milisekundės',
|
11 |
+
timezoneText: 'Laiko zona',
|
12 |
+
currentText: 'Dabar',
|
13 |
+
closeText: 'Uždaryti',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['priešpiet', 'AM', 'A'],
|
16 |
+
pmNames: ['popiet', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['lt']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-nl.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Dutch translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Martijn van der Lee */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['nl'] = {
|
5 |
+
timeOnlyTitle: 'Tijdstip',
|
6 |
+
timeText: 'Tijd',
|
7 |
+
hourText: 'Uur',
|
8 |
+
minuteText: 'Minuut',
|
9 |
+
secondText: 'Seconde',
|
10 |
+
millisecText: 'Milliseconde',
|
11 |
+
timezoneText: 'Tijdzone',
|
12 |
+
currentText: 'Vandaag',
|
13 |
+
closeText: 'Sluiten',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['nl']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-no.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Norwegian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Morten Hauan (http://hauan.me) */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['no'] = {
|
5 |
+
timeOnlyTitle: 'Velg tid',
|
6 |
+
timeText: 'Tid',
|
7 |
+
hourText: 'Time',
|
8 |
+
minuteText: 'Minutt',
|
9 |
+
secondText: 'Sekund',
|
10 |
+
millisecText: 'Millisekund',
|
11 |
+
timezoneText: 'Tidssone',
|
12 |
+
currentText: 'Nå',
|
13 |
+
closeText: 'Lukk',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['am', 'AM', 'A'],
|
16 |
+
pmNames: ['pm', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['no']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pl.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Polish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Michał Pena */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['pl'] = {
|
5 |
+
timeOnlyTitle: 'Wybierz godzinę',
|
6 |
+
timeText: 'Czas',
|
7 |
+
hourText: 'Godzina',
|
8 |
+
minuteText: 'Minuta',
|
9 |
+
secondText: 'Sekunda',
|
10 |
+
millisecText: 'Milisekunda',
|
11 |
+
timezoneText: 'Strefa czasowa',
|
12 |
+
currentText: 'Teraz',
|
13 |
+
closeText: 'Gotowe',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['pl']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pt-BR.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Brazilian Portuguese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Diogo Damiani (diogodamiani@gmail.com) */
|
3 |
+
(function ($) {
|
4 |
+
$.timepicker.regional['pt-BR'] = {
|
5 |
+
timeOnlyTitle: 'Escolha a horário',
|
6 |
+
timeText: 'Horário',
|
7 |
+
hourText: 'Hora',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milissegundos',
|
11 |
+
timezoneText: 'Fuso horário',
|
12 |
+
currentText: 'Agora',
|
13 |
+
closeText: 'Fechar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['a.m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['pt-BR']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pt.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Portuguese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Luan Almeida */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['pt'] = {
|
5 |
+
timeOnlyTitle: 'Escolha uma hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Horas',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milissegundos',
|
11 |
+
timezoneText: 'Fuso horário',
|
12 |
+
currentText: 'Agora',
|
13 |
+
closeText: 'Fechar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['a.m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['pt']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ro.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Romanian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Romeo Adrian Cioaba */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ro'] = {
|
5 |
+
timeOnlyTitle: 'Alegeţi o oră',
|
6 |
+
timeText: 'Timp',
|
7 |
+
hourText: 'Ore',
|
8 |
+
minuteText: 'Minute',
|
9 |
+
secondText: 'Secunde',
|
10 |
+
millisecText: 'Milisecunde',
|
11 |
+
timezoneText: 'Fus orar',
|
12 |
+
currentText: 'Acum',
|
13 |
+
closeText: 'Închide',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['ro']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ru.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Russian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Trent Richardson */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ru'] = {
|
5 |
+
timeOnlyTitle: 'Выберите время',
|
6 |
+
timeText: 'Время',
|
7 |
+
hourText: 'Часы',
|
8 |
+
minuteText: 'Минуты',
|
9 |
+
secondText: 'Секунды',
|
10 |
+
millisecText: 'Миллисекунды',
|
11 |
+
timezoneText: 'Часовой пояс',
|
12 |
+
currentText: 'Сейчас',
|
13 |
+
closeText: 'Закрыть',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['ru']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-sk.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Slovak translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by David Vallner */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['sk'] = {
|
5 |
+
timeOnlyTitle: 'Zvoľte čas',
|
6 |
+
timeText: 'Čas',
|
7 |
+
hourText: 'Hodiny',
|
8 |
+
minuteText: 'Minúty',
|
9 |
+
secondText: 'Sekundy',
|
10 |
+
millisecText: 'Milisekundy',
|
11 |
+
timezoneText: 'Časové pásmo',
|
12 |
+
currentText: 'Teraz',
|
13 |
+
closeText: 'Zavrieť',
|
14 |
+
timeFormat: 'H:m',
|
15 |
+
amNames: ['dop.', 'AM', 'A'],
|
16 |
+
pmNames: ['pop.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['sk']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-sv.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Swedish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Nevon */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['sv'] = {
|
5 |
+
timeOnlyTitle: 'Välj en tid',
|
6 |
+
timeText: 'Timme',
|
7 |
+
hourText: 'Timmar',
|
8 |
+
minuteText: 'Minuter',
|
9 |
+
secondText: 'Sekunder',
|
10 |
+
millisecText: 'Millisekunder',
|
11 |
+
timezoneText: 'Tidszon',
|
12 |
+
currentText: 'Nu',
|
13 |
+
closeText: 'Stäng',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['sv']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-th.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Thai translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Yote Wachirapornpongsa */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['th'] = {
|
5 |
+
timeOnlyTitle: 'เลือกเวลา',
|
6 |
+
timeText: 'เวลา ',
|
7 |
+
hourText: 'ชั่วโมง ',
|
8 |
+
minuteText: 'นาที',
|
9 |
+
secondText: 'วินาที',
|
10 |
+
millisecText: 'มิลลิวินาที',
|
11 |
+
timezoneText: 'เขตเวลา',
|
12 |
+
currentText: 'เวลาปัจจุบัน',
|
13 |
+
closeText: 'ปิด',
|
14 |
+
timeFormat: 'hh:mm tt'
|
15 |
+
};
|
16 |
+
$.timepicker.setDefaults($.timepicker.regional['th']);
|
17 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-tr.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Turkish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Fehmi Can Saglam, Edited by Goktug Ozturk */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['tr'] = {
|
5 |
+
timeOnlyTitle: 'Zaman Seçiniz',
|
6 |
+
timeText: 'Zaman',
|
7 |
+
hourText: 'Saat',
|
8 |
+
minuteText: 'Dakika',
|
9 |
+
secondText: 'Saniye',
|
10 |
+
millisecText: 'Milisaniye',
|
11 |
+
timezoneText: 'Zaman Dilimi',
|
12 |
+
currentText: 'Şu an',
|
13 |
+
closeText: 'Tamam',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['ÖÖ', 'Ö'],
|
16 |
+
pmNames: ['ÖS', 'S'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['tr']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-uk.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Ukrainian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Sergey Noskov */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['uk'] = {
|
5 |
+
timeOnlyTitle: 'Виберіть час',
|
6 |
+
timeText: 'Час',
|
7 |
+
hourText: 'Години',
|
8 |
+
minuteText: 'Хвилини',
|
9 |
+
secondText: 'Секунди',
|
10 |
+
millisecText: 'Мілісекунди',
|
11 |
+
timezoneText: 'Часовий пояс',
|
12 |
+
currentText: 'Зараз',
|
13 |
+
closeText: 'Закрити',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['uk']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-vi.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Vietnamese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Nguyen Dinh Trung */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['vi'] = {
|
5 |
+
timeOnlyTitle: 'Chọn giờ',
|
6 |
+
timeText: 'Thời gian',
|
7 |
+
hourText: 'Giờ',
|
8 |
+
minuteText: 'Phút',
|
9 |
+
secondText: 'Giây',
|
10 |
+
millisecText: 'Phần nghìn giây',
|
11 |
+
timezoneText: 'Múi giờ',
|
12 |
+
currentText: 'Hiện thời',
|
13 |
+
closeText: 'Đóng',
|
14 |
+
timeFormat: 'H:m',
|
15 |
+
amNames: ['SA', 'AM', 'A'],
|
16 |
+
pmNames: ['CH', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['vi']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-zh-CN.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Simplified Chinese translation for the jQuery Timepicker Addon /
|
2 |
+
/ Written by Will Lu */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['zh-CN'] = {
|
5 |
+
timeOnlyTitle: '选择时间',
|
6 |
+
timeText: '时间',
|
7 |
+
hourText: '小时',
|
8 |
+
minuteText: '分钟',
|
9 |
+
secondText: '秒钟',
|
10 |
+
millisecText: '微秒',
|
11 |
+
timezoneText: '时区',
|
12 |
+
currentText: '现在时间',
|
13 |
+
closeText: '关闭',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['zh-CN']);
|
20 |
+
})(jQuery);
|
js/jqueryui/timepicker-i18n/jquery-ui-timepicker-zh-TW.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Alang.lin */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['zh-TW'] = {
|
5 |
+
timeOnlyTitle: '選擇時分秒',
|
6 |
+
timeText: '時間',
|
7 |
+
hourText: '時',
|
8 |
+
minuteText: '分',
|
9 |
+
secondText: '秒',
|
10 |
+
millisecText: '毫秒',
|
11 |
+
timezoneText: '時區',
|
12 |
+
currentText: '現在時間',
|
13 |
+
closeText: '確定',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['上午', 'AM', 'A'],
|
16 |
+
pmNames: ['下午', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['zh-TW']);
|
20 |
+
})(jQuery);
|
js/map.js
CHANGED
@@ -1,120 +1,183 @@
|
|
1 |
-
|
2 |
-
var marker, map, geocoder;
|
3 |
-
|
4 |
-
jQuery( document ).ready( function ()
|
5 |
{
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($)
|
|
|
|
|
|
|
2 |
{
|
3 |
+
var mapField = {};
|
4 |
+
|
5 |
+
(function()
|
6 |
+
{
|
7 |
+
"use strict";
|
8 |
+
|
9 |
+
var thisMapField = this;
|
10 |
+
|
11 |
+
this.container = null;
|
12 |
+
this.canvas = null;
|
13 |
+
this.latlng = null;
|
14 |
+
this.map = null;
|
15 |
+
this.marker = null;
|
16 |
+
this.geocoder = null;
|
17 |
+
|
18 |
+
this.init = function($container)
|
19 |
+
{
|
20 |
+
this.container = $container;
|
21 |
+
this.canvas = $container.find('.rwmb-map-canvas');
|
22 |
+
this.initLatLng(53.346881, -6.258860);
|
23 |
+
this.initMap();
|
24 |
+
this.initMarker();
|
25 |
+
this.initGeocoder();
|
26 |
+
this.initMarkerPosition();
|
27 |
+
this.initListeners();
|
28 |
+
this.initAutoComplete();
|
29 |
+
this.bindHandlers();
|
30 |
+
}
|
31 |
+
|
32 |
+
this.initLatLng = function($lat, $lng)
|
33 |
+
{
|
34 |
+
this.latlng = new window.google.maps.LatLng($lat, $lng);
|
35 |
+
}
|
36 |
+
|
37 |
+
this.initMap = function()
|
38 |
+
{
|
39 |
+
this.map = new window.google.maps.Map(this.canvas[0], {
|
40 |
+
zoom: 8,
|
41 |
+
center: this.latlng,
|
42 |
+
streetViewControl: 0,
|
43 |
+
mapTypeId: window.google.maps.MapTypeId.ROADMAP
|
44 |
+
});
|
45 |
+
}
|
46 |
+
|
47 |
+
this.initMarker = function()
|
48 |
+
{
|
49 |
+
this.marker = new window.google.maps.Marker({position: this.latlng, map: this.map, draggable: true});
|
50 |
+
}
|
51 |
+
|
52 |
+
this.initMarkerPosition = function()
|
53 |
+
{
|
54 |
+
var coord = this.container.find('.rwmb-map-coordinate').val();
|
55 |
+
var addressField = this.container.find('.rwmb-map-goto-address-button').val();
|
56 |
+
var l;
|
57 |
+
var zoom;
|
58 |
+
|
59 |
+
if (coord)
|
60 |
+
{
|
61 |
+
l = coord.split( ',' );
|
62 |
+
this.marker.setPosition( new window.google.maps.LatLng( l[0], l[1] ) );
|
63 |
+
|
64 |
+
zoom = l.length > 2 ? parseInt( l[2], 10 ) : 15;
|
65 |
+
|
66 |
+
this.map.setCenter(this.marker.position);
|
67 |
+
this.map.setZoom(zoom);
|
68 |
+
}
|
69 |
+
else if (addressField)
|
70 |
+
{
|
71 |
+
this.geocodeAddress(addressField);
|
72 |
+
}
|
73 |
+
|
74 |
+
}
|
75 |
+
|
76 |
+
this.initGeocoder = function()
|
77 |
+
{
|
78 |
+
this.geocoder = new window.google.maps.Geocoder();
|
79 |
+
}
|
80 |
+
|
81 |
+
this.initListeners = function()
|
82 |
+
{
|
83 |
+
var that = thisMapField;
|
84 |
+
window.google.maps.event.addListener(this.map, 'click', function (event)
|
85 |
+
{
|
86 |
+
that.marker.setPosition(event.latLng);
|
87 |
+
that.updatePositionInput(event.latLng);
|
88 |
+
});
|
89 |
+
window.google.maps.event.addListener(this.marker, 'drag', function (event)
|
90 |
+
{
|
91 |
+
that.updatePositionInput(event.latLng);
|
92 |
+
});
|
93 |
+
}
|
94 |
+
|
95 |
+
this.updatePositionInput = function(latLng)
|
96 |
+
{
|
97 |
+
this.container.find('.rwmb-map-coordinate').val(latLng.lat() + ',' + latLng.lng());
|
98 |
+
}
|
99 |
+
|
100 |
+
this.geocodeAddress = function(addressField)
|
101 |
+
{
|
102 |
+
var address = '';
|
103 |
+
var fieldList = addressField.split(',');
|
104 |
+
var loop;
|
105 |
+
|
106 |
+
for (loop = 0; loop < fieldList.length; loop++)
|
107 |
+
{
|
108 |
+
address += jQuery('#' + fieldList[loop] ).val();
|
109 |
+
if(loop+1 < fieldList.length) { address += ', '; }
|
110 |
+
}
|
111 |
+
|
112 |
+
address = address.replace( /\n/g, ',' );
|
113 |
+
address = address.replace( /,,/g, ',' );
|
114 |
+
|
115 |
+
var that = thisMapField;
|
116 |
+
this.geocoder.geocode({'address': address}, function (results, status)
|
117 |
+
{
|
118 |
+
if ( status == window.google.maps.GeocoderStatus.OK )
|
119 |
+
{
|
120 |
+
that.updatePositionInput(results[0].geometry.location);
|
121 |
+
that.marker.setPosition(results[0].geometry.location);
|
122 |
+
that.map.setCenter(that.marker.position);
|
123 |
+
that.map.setZoom(15);
|
124 |
+
}
|
125 |
+
});
|
126 |
+
}
|
127 |
+
|
128 |
+
this.initAutoComplete = function()
|
129 |
+
{
|
130 |
+
var addressField = this.container.find('.rwmb-map-goto-address-button').val();
|
131 |
+
if (!addressField) return null;
|
132 |
+
|
133 |
+
var that = thisMapField;
|
134 |
+
$('#' + addressField).autocomplete({
|
135 |
+
source: function(request, response) {
|
136 |
+
// TODO: add 'region' option, to help bias geocoder.
|
137 |
+
that.geocoder.geocode( {'address': request.term }, function(results, status) {
|
138 |
+
response($.map(results, function(item) {
|
139 |
+
return {
|
140 |
+
label: item.formatted_address,
|
141 |
+
value: item.formatted_address,
|
142 |
+
latitude: item.geometry.location.lat(),
|
143 |
+
longitude: item.geometry.location.lng()
|
144 |
+
};
|
145 |
+
}));
|
146 |
+
});
|
147 |
+
},
|
148 |
+
select: function(event, ui) {
|
149 |
+
that.container.find(".rwmb-map-coordinate").val(ui.item.latitude + ',' + ui.item.longitude );
|
150 |
+
var location = new window.google.maps.LatLng(ui.item.latitude, ui.item.longitude);
|
151 |
+
that.map.setCenter(location);
|
152 |
+
// Drop the Marker
|
153 |
+
setTimeout(function(){
|
154 |
+
that.marker.setValues({
|
155 |
+
position: location,
|
156 |
+
animation: window.google.maps.Animation.DROP
|
157 |
+
});
|
158 |
+
}, 1500);
|
159 |
+
}
|
160 |
+
});
|
161 |
+
}
|
162 |
+
|
163 |
+
this.bindHandlers = function()
|
164 |
+
{
|
165 |
+
var that = thisMapField;
|
166 |
+
this.container.find('.rwmb-map-goto-address-button').bind('click', function() { that.onFindAddressClick($(this)); });
|
167 |
+
}
|
168 |
+
|
169 |
+
this.onFindAddressClick = function($that)
|
170 |
+
{
|
171 |
+
var $this = $that;
|
172 |
+
this.geocodeAddress($this.val());
|
173 |
+
}
|
174 |
+
|
175 |
+
}).apply(mapField);
|
176 |
+
|
177 |
+
$(document).ready(function() {
|
178 |
+
$('.rwmb-map-field').each(function(){
|
179 |
+
mapField.init($(this));
|
180 |
+
});
|
181 |
+
});
|
182 |
+
|
183 |
+
})(jQuery);
|
js/oembed.js
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( document ).ready( function( $ )
|
2 |
+
{
|
3 |
+
$( '.rwmb-input' ).on( 'click', 'a.show-embed', function() {
|
4 |
+
var $this = $( this ),
|
5 |
+
$input = $this.siblings( ':input.rwmb-oembed' );
|
6 |
+
$embed_container = $this.siblings( '.embed-code' ),
|
7 |
+
data = {
|
8 |
+
action : 'rwmb_get_embed',
|
9 |
+
oembed_url: $input.val(),
|
10 |
+
post_id : $( '#post_ID' ).val()
|
11 |
+
};
|
12 |
+
$embed_container.html( "<img class='rwmb-loader' height='64' width='64' src='" + RWMB_OEmbed.url + "img/loader.gif'>" );
|
13 |
+
$.post( ajaxurl, data, function( r )
|
14 |
+
{
|
15 |
+
var res = wpAjax.parseAjaxResponse( r, 'ajax-response' );
|
16 |
+
|
17 |
+
if ( res.errors )
|
18 |
+
alert( res.responses[0].errors[0].message );
|
19 |
+
else
|
20 |
+
$embed_container.html( res.responses[0].data );
|
21 |
+
|
22 |
+
}, 'xml' );
|
23 |
+
|
24 |
+
|
25 |
+
return false;
|
26 |
+
|
27 |
+
});
|
28 |
+
} );
|
js/plupload-image.js
CHANGED
@@ -1,131 +1,89 @@
|
|
1 |
-
jQuery(
|
2 |
{
|
3 |
-
// Object containing all the plupload uploaders
|
4 |
-
var rwmb_image_uploaders = {},
|
5 |
-
max;
|
6 |
-
|
7 |
-
// Hide "Uploaded files" title as long as there are no files uploaded
|
8 |
-
// Note that we can have multiple upload forms in the page, so relative path to current element is important
|
9 |
-
$( '.rwmb-uploaded' ).each( function()
|
10 |
-
{
|
11 |
-
var $this = $( this ),
|
12 |
-
$lis = $this.children(),
|
13 |
-
$title = $this.siblings( '.rwmb-uploaded-title' );
|
14 |
-
if ( 0 == $lis.length )
|
15 |
-
{
|
16 |
-
$title.addClass( 'hidden' );
|
17 |
-
$this.addClass( 'hidden' );
|
18 |
-
}
|
19 |
-
} );
|
20 |
-
|
21 |
// Hide "Uploaded files" title if there are no files uploaded after deleting files
|
22 |
$( '.rwmb-images' ).on( 'click', '.rwmb-delete-file', function()
|
23 |
{
|
24 |
// Check if we need to show drop target
|
25 |
-
var $
|
26 |
-
uploaded = $images.children().length - 1, // -1 for the one we just deleted
|
27 |
-
$dragndrop = $images.siblings( '.rwmb-drag-drop' );
|
28 |
-
|
29 |
-
if ( 0 == uploaded )
|
30 |
-
{
|
31 |
-
$images.siblings( '.rwmb-uploaded-title' ).addClass( 'hidden' );
|
32 |
-
$images.addClass( 'hidden' );
|
33 |
-
}
|
34 |
|
35 |
// After delete files, show the Drag & Drop section
|
36 |
-
$dragndrop.
|
37 |
} );
|
38 |
|
39 |
-
|
40 |
-
$( 'input:hidden.rwmb-image-prefix' ).each( function()
|
41 |
{
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
//
|
62 |
-
|
63 |
-
rwmb_image_uploaders[prefix].init();
|
64 |
-
|
65 |
-
rwmb_image_uploaders[prefix].bind( 'FilesAdded', function( up, files )
|
66 |
{
|
67 |
-
var
|
68 |
-
uploaded = $
|
69 |
-
msg =
|
70 |
|
71 |
-
|
72 |
-
msg += 's';
|
73 |
|
74 |
// Remove files from queue if exceed max file uploads
|
75 |
-
if ( ( uploaded + files.length ) >
|
76 |
{
|
77 |
-
|
78 |
{
|
79 |
-
|
|
|
|
|
80 |
}
|
81 |
alert( msg );
|
82 |
-
return false;
|
83 |
}
|
84 |
|
85 |
// Hide drag & drop section if reach max file uploads
|
86 |
-
if (
|
87 |
-
$
|
88 |
|
89 |
max = parseInt( up.settings.max_file_size, 10 );
|
90 |
|
91 |
// Upload files
|
92 |
plupload.each( files, function( file )
|
93 |
{
|
94 |
-
|
95 |
-
|
96 |
if ( file.size >= max )
|
97 |
-
|
98 |
} );
|
99 |
up.refresh();
|
100 |
up.start();
|
101 |
-
} );
|
102 |
|
103 |
-
rwmb_image_uploaders[prefix].bind( 'Error', function( up, e )
|
104 |
-
{
|
105 |
-
add_loading( up, e.file );
|
106 |
-
remove_error( e.file );
|
107 |
-
up.removeFile( e.file );
|
108 |
} );
|
109 |
|
110 |
-
|
111 |
{
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
// Update the loading div
|
116 |
-
$( 'div.rwmb-image-uploading-bar', 'li#' + file.id ).css( 'height', file.percent + '%' );
|
117 |
-
|
118 |
-
// Show them all
|
119 |
-
$uploaded.removeClass( 'hidden' );
|
120 |
-
$uploaded_title.removeClass( 'hidden' );
|
121 |
} );
|
122 |
|
123 |
-
|
124 |
{
|
125 |
var res = wpAjax.parseAjaxResponse( $.parseXML( response.response ), 'ajax-response' );
|
126 |
-
false === res.errors ? $( 'li#' + file.id ).replaceWith( res.responses[0].data ) :
|
127 |
} );
|
128 |
-
}
|
129 |
|
130 |
/**
|
131 |
* Helper functions
|
@@ -136,7 +94,7 @@ jQuery( document ).ready( function( $ )
|
|
136 |
*
|
137 |
* @return void
|
138 |
*/
|
139 |
-
function
|
140 |
{
|
141 |
$( 'li#' + file.id )
|
142 |
.addClass( 'rwmb-image-error' )
|
@@ -153,10 +111,9 @@ jQuery( document ).ready( function( $ )
|
|
153 |
*
|
154 |
* @return void
|
155 |
*/
|
156 |
-
function
|
157 |
{
|
158 |
-
$
|
159 |
-
$list.append( "<li id='" + file.id + "'><div class='rwmb-image-uploading-bar'></div><div id='" + file.id + "-throbber' class='rwmb-image-uploading-status'></div></li>" );
|
160 |
}
|
161 |
|
162 |
/**
|
@@ -164,7 +121,7 @@ jQuery( document ).ready( function( $ )
|
|
164 |
*
|
165 |
* @return void
|
166 |
*/
|
167 |
-
function
|
168 |
{
|
169 |
$( '#' + file.id + '-throbber' ).html( "<img class='rwmb-loader' height='64' width='64' src='" + RWMB.url + "img/loader.gif'/>" );
|
170 |
}
|
1 |
+
jQuery( function( $ )
|
2 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
// Hide "Uploaded files" title if there are no files uploaded after deleting files
|
4 |
$( '.rwmb-images' ).on( 'click', '.rwmb-delete-file', function()
|
5 |
{
|
6 |
// Check if we need to show drop target
|
7 |
+
var $dragndrop = $( this ).parents( '.rwmb-images' ).siblings( '.rwmb-drag-drop' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
// After delete files, show the Drag & Drop section
|
10 |
+
$dragndrop.removeClass('hidden');
|
11 |
} );
|
12 |
|
13 |
+
$('.rwmb-drag-drop').each(function()
|
|
|
14 |
{
|
15 |
+
// Declare vars
|
16 |
+
var $dropArea = $( this ),
|
17 |
+
$imageList = $dropArea.siblings( '.rwmb-uploaded' ),
|
18 |
+
uploaderData = $dropArea.data( 'js_options' ),
|
19 |
+
rwmbUploader = {};
|
20 |
+
|
21 |
+
// Extend uploaderData
|
22 |
+
uploaderData.multipart_params = $.extend(
|
23 |
+
{
|
24 |
+
_ajax_nonce : $dropArea.data( 'upload_nonce' ),
|
25 |
+
post_id : $( '#post_ID' ).val()
|
26 |
+
},
|
27 |
+
uploaderData.multipart_params
|
28 |
+
);
|
29 |
+
|
30 |
+
// Create uploader
|
31 |
+
rwmbUploader = new plupload.Uploader( uploaderData );
|
32 |
+
rwmbUploader.init();
|
33 |
+
|
34 |
+
// Add files
|
35 |
+
rwmbUploader.bind( 'FilesAdded', function( up, files )
|
|
|
|
|
|
|
36 |
{
|
37 |
+
var maxFileUploads = $imageList.data('max_file_uploads'),
|
38 |
+
uploaded = $imageList.children().length,
|
39 |
+
msg = maxFileUploads > 1 ? rwmbFile.maxFileUploadsPlural : rwmbFile.maxFileUploadsSingle;
|
40 |
|
41 |
+
msg = msg.replace( '%d', maxFileUploads );
|
|
|
42 |
|
43 |
// Remove files from queue if exceed max file uploads
|
44 |
+
if ( maxFileUploads > 0 && ( uploaded + files.length ) > maxFileUploads )
|
45 |
{
|
46 |
+
if ( uploaded < maxFileUploads )
|
47 |
{
|
48 |
+
var diff = maxFileUploads - uploaded;
|
49 |
+
up.splice( diff - 1, files.length - diff );
|
50 |
+
files = up.files;
|
51 |
}
|
52 |
alert( msg );
|
|
|
53 |
}
|
54 |
|
55 |
// Hide drag & drop section if reach max file uploads
|
56 |
+
if ( uploaded + files.length >= maxFileUploads )
|
57 |
+
$dropArea.addClass( 'hidden' );
|
58 |
|
59 |
max = parseInt( up.settings.max_file_size, 10 );
|
60 |
|
61 |
// Upload files
|
62 |
plupload.each( files, function( file )
|
63 |
{
|
64 |
+
addLoading( up, file, $imageList );
|
65 |
+
addThrobber( file );
|
66 |
if ( file.size >= max )
|
67 |
+
removeError( file );
|
68 |
} );
|
69 |
up.refresh();
|
70 |
up.start();
|
|
|
71 |
|
|
|
|
|
|
|
|
|
|
|
72 |
} );
|
73 |
|
74 |
+
rwmbUploader.bind( 'Error', function( up, e )
|
75 |
{
|
76 |
+
addLoading( up, e.file, $imageList );
|
77 |
+
removeError( e.file );
|
78 |
+
up.removeFile( e.file );
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
} );
|
80 |
|
81 |
+
rwmbUploader.bind( 'FileUploaded', function( up, file, response )
|
82 |
{
|
83 |
var res = wpAjax.parseAjaxResponse( $.parseXML( response.response ), 'ajax-response' );
|
84 |
+
false === res.errors ? $( 'li#' + file.id ).replaceWith( res.responses[0].data ) : removeError( file );
|
85 |
} );
|
86 |
+
});
|
87 |
|
88 |
/**
|
89 |
* Helper functions
|
94 |
*
|
95 |
* @return void
|
96 |
*/
|
97 |
+
function removeError( file )
|
98 |
{
|
99 |
$( 'li#' + file.id )
|
100 |
.addClass( 'rwmb-image-error' )
|
111 |
*
|
112 |
* @return void
|
113 |
*/
|
114 |
+
function addLoading( up, file, $ul )
|
115 |
{
|
116 |
+
$ul.removeClass('hidden').append( "<li id='" + file.id + "'><div class='rwmb-image-uploading-bar'></div><div id='" + file.id + "-throbber' class='rwmb-image-uploading-status'></div></li>" );
|
|
|
117 |
}
|
118 |
|
119 |
/**
|
121 |
*
|
122 |
* @return void
|
123 |
*/
|
124 |
+
function addThrobber( file )
|
125 |
{
|
126 |
$( '#' + file.id + '-throbber' ).html( "<img class='rwmb-loader' height='64' width='64' src='" + RWMB.url + "img/loader.gif'/>" );
|
127 |
}
|
js/select-advanced.js
CHANGED
@@ -2,19 +2,16 @@
|
|
2 |
* Update select2
|
3 |
* Used for static & dynamic added elements (when clone)
|
4 |
*/
|
5 |
-
function
|
6 |
-
{
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
10 |
{
|
11 |
var $this = $( this ),
|
12 |
options = $this.data( 'options' );
|
13 |
-
$this.select2(
|
14 |
-
|
15 |
-
}
|
16 |
-
|
17 |
-
jQuery( document ).ready( function ()
|
18 |
-
{
|
19 |
-
rwmb_update_select_advanced();
|
20 |
} );
|
2 |
* Update select2
|
3 |
* Used for static & dynamic added elements (when clone)
|
4 |
*/
|
5 |
+
jQuery( document ).ready( function ( $ )
|
6 |
+
{
|
7 |
+
$( ':input.rwmb-select-advanced' ).each( rwmb_update_select_advanced );
|
8 |
+
$( '.rwmb-input' ).on( 'clone', ':input.rwmb-select-advanced', rwmb_update_select_advanced );
|
9 |
+
|
10 |
+
function rwmb_update_select_advanced()
|
11 |
{
|
12 |
var $this = $( this ),
|
13 |
options = $this.data( 'options' );
|
14 |
+
$this.siblings('.select2-container').remove();
|
15 |
+
$this.select2( options );
|
16 |
+
}
|
|
|
|
|
|
|
|
|
17 |
} );
|
js/slider.js
CHANGED
@@ -1,50 +1,32 @@
|
|
1 |
-
jQuery(
|
2 |
{
|
3 |
-
|
4 |
-
id = null
|
5 |
-
, el = null
|
6 |
-
, input = null
|
7 |
-
, label = null
|
8 |
-
, format = null
|
9 |
-
, value = null
|
10 |
-
, update = null
|
11 |
-
;
|
12 |
-
$( '.rwmb-slider' ).each( function( i, val )
|
13 |
{
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
|
20 |
-
|
21 |
-
update = $( '#' + id + '-label' );
|
22 |
-
|
23 |
-
if (
|
24 |
-
!$( input ).val()
|
25 |
-
|| 'undefined' === $( input ).val()
|
26 |
-
|| null === typeof $( input ).val()
|
27 |
-
)
|
28 |
{
|
29 |
-
|
30 |
-
$
|
|
|
31 |
}
|
32 |
else
|
33 |
{
|
34 |
-
|
35 |
-
$( update ).text( value );
|
36 |
}
|
37 |
-
if ( 0 < format.length )
|
38 |
-
$( update ).append( ' ' + format );
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
} );
|
50 |
-
} );
|
1 |
+
jQuery( function( $ )
|
2 |
{
|
3 |
+
$( '.rwmb-slider' ).each( function()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
+
var $this = $( this ),
|
6 |
+
$input = $this.siblings( 'input' ),
|
7 |
+
$valueLabel = $this.siblings( '.rwmb-slider-value-label' ).find( 'span' ),
|
8 |
+
value = $input.val(),
|
9 |
+
options = $this.data( 'options' );
|
10 |
|
11 |
+
if ( !value )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
{
|
13 |
+
value = 0;
|
14 |
+
$input.val( 0 );
|
15 |
+
$valueLabel.text( '0' );
|
16 |
}
|
17 |
else
|
18 |
{
|
19 |
+
$valueLabel.text( value );
|
|
|
20 |
}
|
|
|
|
|
21 |
|
22 |
+
// Assign field value and callback function when slide
|
23 |
+
options.value = value;
|
24 |
+
options.slide = function( event, ui )
|
25 |
+
{
|
26 |
+
$input.val( ui.value );
|
27 |
+
$valueLabel.text( ui.value );
|
28 |
+
};
|
29 |
+
|
30 |
+
$this.slider( options );
|
31 |
} );
|
32 |
+
} );
|
js/time.js
CHANGED
@@ -2,21 +2,18 @@
|
|
2 |
* Update datetime picker element
|
3 |
* Used for static & dynamic added elements (when clone)
|
4 |
*/
|
5 |
-
function
|
6 |
{
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
10 |
{
|
11 |
var $this = $( this ),
|
12 |
options = $this.data( 'options' );
|
13 |
-
|
14 |
$this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
|
15 |
$this.removeClass( 'hasDatepicker' ).attr( 'id', '' ).timepicker( options );
|
16 |
-
|
17 |
-
}
|
18 |
-
|
19 |
-
jQuery( document ).ready( function()
|
20 |
-
{
|
21 |
-
rwmb_update_time_picker();
|
22 |
} );
|
2 |
* Update datetime picker element
|
3 |
* Used for static & dynamic added elements (when clone)
|
4 |
*/
|
5 |
+
jQuery( document ).ready( function( $ )
|
6 |
{
|
7 |
+
$( ':input.rwmb-time' ).each( rwmb_update_time_picker );
|
8 |
+
$( '.rwmb-input' ).on( 'clone', ':input.rwmb-time', rwmb_update_time_picker );
|
9 |
+
|
10 |
+
function rwmb_update_time_picker()
|
11 |
{
|
12 |
var $this = $( this ),
|
13 |
options = $this.data( 'options' );
|
14 |
+
|
15 |
$this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
|
16 |
$this.removeClass( 'hasDatepicker' ).attr( 'id', '' ).timepicker( options );
|
17 |
+
|
18 |
+
}
|
|
|
|
|
|
|
|
|
19 |
} );
|
lang/de_DE.mo
CHANGED
Binary file
|
lang/de_DE.po
CHANGED
@@ -2,10 +2,10 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date:
|
6 |
-
"PO-Revision-Date:
|
7 |
-
"Last-Translator:
|
8 |
-
"Language-Team:
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -17,125 +17,144 @@ msgstr ""
|
|
17 |
"X-Poedit-SearchPath-0: ..\n"
|
18 |
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
19 |
|
20 |
-
#: ../meta-box.php:
|
|
|
|
|
|
|
|
|
21 |
msgid "+"
|
22 |
-
msgstr ""
|
23 |
|
24 |
-
#: ../meta-box.php:
|
25 |
msgid "–"
|
26 |
-
msgstr ""
|
27 |
|
28 |
-
#: ../
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
#: ../inc/fields/color.php:45
|
33 |
-
msgid "Select a color"
|
34 |
-
msgstr "Farbe wählen"
|
35 |
|
36 |
-
#: ../inc/fields/file.php:
|
37 |
msgid "Error: Cannot delete file"
|
38 |
msgstr "Fehler: Datei kann nicht gelöscht werden"
|
39 |
|
40 |
-
#: ../inc/fields/file.php:
|
41 |
-
#, fuzzy
|
42 |
msgctxt "file upload"
|
43 |
-
msgid "
|
44 |
-
msgstr "Dateien
|
45 |
|
46 |
-
#: ../inc/fields/file.php:
|
47 |
msgctxt "file upload"
|
48 |
-
msgid "
|
49 |
-
msgstr "Datei
|
50 |
|
51 |
-
#: ../inc/fields/file.php:
|
52 |
-
#, fuzzy
|
53 |
msgctxt "file upload"
|
54 |
msgid "Delete"
|
55 |
msgstr "Löschen"
|
56 |
|
57 |
-
#: ../inc/fields/file.php:
|
58 |
msgctxt "file upload"
|
59 |
-
msgid "
|
60 |
-
msgstr "
|
61 |
|
62 |
-
#: ../inc/fields/
|
63 |
-
msgctxt "
|
64 |
-
msgid "
|
65 |
-
msgstr "
|
66 |
|
67 |
-
#: ../inc/fields/image.php:
|
68 |
-
#, fuzzy
|
69 |
msgid "Order saved"
|
70 |
msgstr "Reihenfolge gespeichert"
|
71 |
|
72 |
-
#: ../inc/fields/image.php:
|
73 |
-
#: ../inc/fields/plupload-image.php:178
|
74 |
-
#, fuzzy
|
75 |
msgctxt "image upload"
|
76 |
-
msgid "
|
77 |
-
msgstr "
|
78 |
|
79 |
-
#: ../inc/fields/image.php:
|
80 |
-
#: ../inc/fields/plupload-image.php:140
|
81 |
msgctxt "image upload"
|
82 |
-
msgid "
|
83 |
-
msgstr "
|
84 |
|
85 |
-
#: ../inc/fields/image.php:
|
86 |
-
#: ../inc/fields/plupload-image.php:141
|
87 |
-
#, fuzzy
|
88 |
msgctxt "image upload"
|
89 |
msgid "Delete"
|
90 |
msgstr "Löschen"
|
91 |
|
92 |
-
#: ../inc/fields/image.php:
|
93 |
-
#: ../inc/fields/plupload-image.php:142
|
94 |
msgctxt "image upload"
|
95 |
msgid "Edit"
|
96 |
-
msgstr ""
|
97 |
|
98 |
-
#: ../inc/fields/
|
99 |
-
|
100 |
-
|
101 |
-
msgid "Upload files"
|
102 |
-
msgstr "Dateien hochladen"
|
103 |
|
104 |
-
#: ../inc/fields/image.php:
|
105 |
-
#: ../inc/fields/plupload-image.php:180
|
106 |
msgctxt "image upload"
|
107 |
-
msgid "
|
108 |
-
msgstr "
|
109 |
|
110 |
-
#: ../inc/fields/plupload-image.php:
|
111 |
msgctxt "image upload"
|
112 |
-
msgid "
|
113 |
-
msgstr ""
|
114 |
|
115 |
-
#: ../inc/fields/plupload-image.php:
|
116 |
msgctxt "image upload"
|
117 |
-
msgid "
|
118 |
-
msgstr ""
|
119 |
|
120 |
-
#: ../inc/fields/plupload-image.php:
|
121 |
msgctxt "image upload"
|
122 |
-
msgid "
|
123 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
-
#: ../inc/fields/plupload-image.php:185
|
126 |
#, fuzzy
|
127 |
-
msgctxt "
|
128 |
-
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
#~ msgid "Cannot delete file. Something's wrong."
|
132 |
#~ msgstr "Fehler: Datei kann nicht gelöscht werden."
|
133 |
|
134 |
#~ msgid "Upload new files"
|
135 |
#~ msgstr "Neue Dateien hochladen"
|
136 |
-
|
137 |
-
#~ msgid "Uploaded images"
|
138 |
-
#~ msgstr "Bilder fertig geladen"
|
139 |
-
|
140 |
-
#~ msgid "Upload new images"
|
141 |
-
#~ msgstr "Neue Bilder hochladen"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-03-23 22:08+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-03-23 22:21+0100\n"
|
7 |
+
"Last-Translator: Johann Kratzik <johann@kratzik.com>\n"
|
8 |
+
"Language-Team: Johann Kratzik <info@zoomdrive.at>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
17 |
"X-Poedit-SearchPath-0: ..\n"
|
18 |
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
19 |
|
20 |
+
#: ../inc/classes/meta-box.php:296
|
21 |
+
msgid "Please correct the errors highlighted below and try again."
|
22 |
+
msgstr "Bitte beheben Sie die unten angeführten Fehler und versuchen Sie es erneut."
|
23 |
+
|
24 |
+
#: ../inc/classes/meta-box.php:357
|
25 |
msgid "+"
|
26 |
+
msgstr "+"
|
27 |
|
28 |
+
#: ../inc/classes/meta-box.php:379
|
29 |
msgid "–"
|
30 |
+
msgstr "–"
|
31 |
|
32 |
+
#: ../inc/fields/file-advanced.php:59
|
33 |
+
msgctxt "file upload"
|
34 |
+
msgid "Select Files"
|
35 |
+
msgstr "Dateien auswählen"
|
|
|
|
|
|
|
36 |
|
37 |
+
#: ../inc/fields/file.php:66
|
38 |
msgid "Error: Cannot delete file"
|
39 |
msgstr "Fehler: Datei kann nicht gelöscht werden"
|
40 |
|
41 |
+
#: ../inc/fields/file.php:80
|
|
|
42 |
msgctxt "file upload"
|
43 |
+
msgid "Upload Files"
|
44 |
+
msgstr "Dateien hochladen"
|
45 |
|
46 |
+
#: ../inc/fields/file.php:81
|
47 |
msgctxt "file upload"
|
48 |
+
msgid "+ Add new file"
|
49 |
+
msgstr "+ Neue Datei hinzufügen"
|
50 |
|
51 |
+
#: ../inc/fields/file.php:133
|
|
|
52 |
msgctxt "file upload"
|
53 |
msgid "Delete"
|
54 |
msgstr "Löschen"
|
55 |
|
56 |
+
#: ../inc/fields/file.php:134
|
57 |
msgctxt "file upload"
|
58 |
+
msgid "Edit"
|
59 |
+
msgstr "Bearbeiten"
|
60 |
|
61 |
+
#: ../inc/fields/image-advanced.php:63
|
62 |
+
msgctxt "image upload"
|
63 |
+
msgid "Select or Upload Images"
|
64 |
+
msgstr "Bilder auswählen oder hochladen"
|
65 |
|
66 |
+
#: ../inc/fields/image.php:64
|
|
|
67 |
msgid "Order saved"
|
68 |
msgstr "Reihenfolge gespeichert"
|
69 |
|
70 |
+
#: ../inc/fields/image.php:78
|
|
|
|
|
71 |
msgctxt "image upload"
|
72 |
+
msgid "Upload Images"
|
73 |
+
msgstr "Bilder hochladen"
|
74 |
|
75 |
+
#: ../inc/fields/image.php:79
|
|
|
76 |
msgctxt "image upload"
|
77 |
+
msgid "+ Add new image"
|
78 |
+
msgstr "+ Neues Bild hinzufügen"
|
79 |
|
80 |
+
#: ../inc/fields/image.php:144
|
|
|
|
|
81 |
msgctxt "image upload"
|
82 |
msgid "Delete"
|
83 |
msgstr "Löschen"
|
84 |
|
85 |
+
#: ../inc/fields/image.php:145
|
|
|
86 |
msgctxt "image upload"
|
87 |
msgid "Edit"
|
88 |
+
msgstr "Bearbeiten"
|
89 |
|
90 |
+
#: ../inc/fields/map.php:46
|
91 |
+
msgid "Find Address"
|
92 |
+
msgstr "Adresse finden"
|
|
|
|
|
93 |
|
94 |
+
#: ../inc/fields/plupload-image.php:104
|
|
|
95 |
msgctxt "image upload"
|
96 |
+
msgid "Drop images here"
|
97 |
+
msgstr "Bilder hierher ziehen"
|
98 |
|
99 |
+
#: ../inc/fields/plupload-image.php:105
|
100 |
msgctxt "image upload"
|
101 |
+
msgid "or"
|
102 |
+
msgstr "oder"
|
103 |
|
104 |
+
#: ../inc/fields/plupload-image.php:106
|
105 |
msgctxt "image upload"
|
106 |
+
msgid "Select Files"
|
107 |
+
msgstr "Dateien auswählen"
|
108 |
|
109 |
+
#: ../inc/fields/plupload-image.php:181
|
110 |
msgctxt "image upload"
|
111 |
+
msgid "Allowed Image Files"
|
112 |
+
msgstr "Erlaubte Typen von Bilddateien"
|
113 |
+
|
114 |
+
#: ../inc/fields/posts.php:54
|
115 |
+
msgid "Post"
|
116 |
+
msgstr "Beitrag"
|
117 |
+
|
118 |
+
#: ../inc/fields/posts.php:64
|
119 |
+
#: ../inc/fields/taxonomy.php:42
|
120 |
+
#, php-format
|
121 |
+
msgid "Select a %s"
|
122 |
+
msgstr "%s auswählen"
|
123 |
+
|
124 |
+
#: ../inc/fields/select-advanced.php:69
|
125 |
+
msgid "Select a value"
|
126 |
+
msgstr "Einen Wert wählen"
|
127 |
|
|
|
128 |
#, fuzzy
|
129 |
+
#~ msgctxt "file upload"
|
130 |
+
|
131 |
+
#~ msgid "Uploaded files"
|
132 |
+
#~ msgstr "Dateien fertig geladen"
|
133 |
+
#~ msgctxt "file upload"
|
134 |
+
|
135 |
+
#~ msgid "Delete this file"
|
136 |
+
#~ msgstr "Datei löschen"
|
137 |
+
|
138 |
+
#, fuzzy
|
139 |
+
#~ msgctxt "image upload"
|
140 |
+
|
141 |
+
#~ msgid "Uploaded files"
|
142 |
+
#~ msgstr "Dateien fertig geladen"
|
143 |
+
#~ msgctxt "image upload"
|
144 |
+
|
145 |
+
#~ msgid "Delete this file"
|
146 |
+
#~ msgstr "Datei löschen"
|
147 |
+
#~ msgctxt "image upload"
|
148 |
+
|
149 |
+
#~ msgid "Upload files"
|
150 |
+
#~ msgstr "Dateien hochladen"
|
151 |
+
#~ msgctxt "image upload"
|
152 |
+
|
153 |
+
#~ msgid "Add another file"
|
154 |
+
#~ msgstr "Weitere Datei"
|
155 |
|
156 |
#~ msgid "Cannot delete file. Something's wrong."
|
157 |
#~ msgstr "Fehler: Datei kann nicht gelöscht werden."
|
158 |
|
159 |
#~ msgid "Upload new files"
|
160 |
#~ msgstr "Neue Dateien hochladen"
|
|
|
|
|
|
|
|
|
|
|
|
lang/default.mo
CHANGED
Binary file
|
lang/default.po
CHANGED
@@ -2,123 +2,383 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date:
|
6 |
-
"PO-Revision-Date:
|
7 |
"Last-Translator: Rilwis <rilwis@gmail.com>\n"
|
8 |
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;
|
|
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
-
"X-Poedit-
|
15 |
-
"X-
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
"X-Poedit-SearchPath-0: ..\n"
|
18 |
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
19 |
|
20 |
-
#: ../
|
21 |
-
msgid "
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: ../
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
msgid "+"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: ../inc/classes/meta-box.php:
|
29 |
msgid "–"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: ../inc/fields/file.php:
|
33 |
-
|
|
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: ../inc/fields/file.php:
|
37 |
-
|
38 |
-
msgid "
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: ../inc/fields/file.php:
|
|
|
|
|
|
|
|
|
42 |
msgctxt "file upload"
|
43 |
-
msgid "
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: ../inc/fields/file.php:
|
47 |
msgctxt "file upload"
|
48 |
msgid "Delete"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: ../inc/fields/file.php:
|
52 |
msgctxt "file upload"
|
53 |
-
msgid "
|
|
|
|
|
|
|
|
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: ../inc/fields/file.php:
|
57 |
msgctxt "file upload"
|
58 |
-
msgid "
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: ../inc/fields/
|
62 |
-
|
|
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: ../inc/fields/image.php:
|
66 |
-
|
67 |
-
msgctxt "image upload"
|
68 |
-
msgid "Uploaded files"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: ../inc/fields/image.php:
|
72 |
-
#: ../inc/fields/plupload-image.php:112
|
73 |
msgctxt "image upload"
|
74 |
-
msgid "
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: ../inc/fields/image.php:
|
78 |
-
#: ../inc/fields/plupload-image.php:113
|
79 |
msgctxt "image upload"
|
80 |
msgid "Delete"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: ../inc/fields/image.php:
|
84 |
-
#: ../inc/fields/plupload-image.php:114
|
85 |
msgctxt "image upload"
|
86 |
msgid "Edit"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: ../inc/fields/image.php:
|
90 |
-
|
|
|
|
|
|
|
91 |
msgctxt "image upload"
|
92 |
-
msgid "Upload
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: ../inc/fields/image.php:
|
96 |
msgctxt "image upload"
|
97 |
msgid "+ Add new image"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: ../inc/fields/
|
101 |
-
|
102 |
-
msgid "Allowed Image Files"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: ../inc/fields/plupload-image.php:
|
106 |
msgctxt "image upload"
|
107 |
msgid "Drop images here"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: ../inc/fields/plupload-image.php:
|
111 |
msgctxt "image upload"
|
112 |
msgid "or"
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: ../inc/fields/plupload-image.php:
|
116 |
msgctxt "image upload"
|
117 |
msgid "Select Files"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: ../inc/fields/
|
121 |
msgctxt "image upload"
|
122 |
-
msgid "
|
123 |
msgstr ""
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-06-03 22:19+0700\n"
|
6 |
+
"PO-Revision-Date: 2013-06-03 22:19+0700\n"
|
7 |
"Last-Translator: Rilwis <rilwis@gmail.com>\n"
|
8 |
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
9 |
+
"Language: en_EN\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
|
14 |
+
"_nx_noop:1,2\n"
|
15 |
"X-Poedit-Basepath: .\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Generator: Poedit 1.5.5\n"
|
|
|
18 |
"X-Poedit-SearchPath-0: ..\n"
|
19 |
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
20 |
|
21 |
+
#: ../demo/all-custom-post-types.php:20
|
22 |
+
msgid "Personal Information"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#: ../demo/all-custom-post-types.php:25
|
26 |
+
msgid "Full name"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: ../demo/better-include.php:16 ../demo/include-by-ID-or-page-template.php:8
|
30 |
+
msgid "Meta Box Title"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: ../demo/better-include.php:19 ../demo/include-by-ID-or-page-template.php:14
|
34 |
+
msgid "Your images"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: ../demo/date-time-js-options.php:11
|
38 |
+
msgid "Date Time Picker With JS Options"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: ../demo/date-time-js-options.php:15
|
42 |
+
msgid "Date"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: ../demo/date-time-js-options.php:21 ../demo/demo.php:177
|
46 |
+
msgid "(yyyy-mm-dd)"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: ../demo/date-time-js-options.php:23
|
50 |
+
msgid "Select Date"
|
51 |
+
msgstr ""
|
52 |
+
|
53 |
+
#: ../demo/date-time-js-options.php:24 ../demo/demo.php:178
|
54 |
+
msgid "yy-mm-dd"
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
+
#: ../demo/date-time-js-options.php:30
|
58 |
+
msgid "Datetime"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: ../demo/date-time-js-options.php:41
|
62 |
+
msgid "Time"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: ../demo/demo.php:34
|
66 |
+
msgid "Standard Fields"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: ../demo/demo.php:53
|
70 |
+
msgid "Text"
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
#: ../demo/demo.php:57
|
74 |
+
msgid "Text description"
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: ../demo/demo.php:60
|
78 |
+
msgid "Default text value"
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
+
#: ../demo/demo.php:66
|
82 |
+
msgid "Checkbox"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: ../demo/demo.php:74
|
86 |
+
msgid "Radio"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: ../demo/demo.php:80 ../demo/demo.php:91 ../demo/demo.php:226
|
90 |
+
msgid "Label1"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: ../demo/demo.php:81 ../demo/demo.php:92 ../demo/demo.php:227
|
94 |
+
msgid "Label2"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: ../demo/demo.php:86
|
98 |
+
msgid "Select"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: ../demo/demo.php:96
|
102 |
+
msgid "Select an Item"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: ../demo/demo.php:103
|
106 |
+
msgid "Hidden value"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: ../demo/demo.php:107
|
110 |
+
msgid "Password"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: ../demo/demo.php:113
|
114 |
+
msgid "Textarea"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: ../demo/demo.php:114
|
118 |
+
msgid "Textarea description"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: ../demo/demo.php:131
|
122 |
+
msgid "Password is required"
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: ../demo/demo.php:132
|
126 |
+
msgid "Password must be at least 7 characters"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: ../demo/demo.php:140
|
130 |
+
msgid "Advanced Fields"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: ../demo/demo.php:145
|
134 |
+
msgid "Slider"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: ../demo/demo.php:150
|
138 |
+
msgid "$"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: ../demo/demo.php:151
|
142 |
+
msgid " USD"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: ../demo/demo.php:162
|
146 |
+
msgid "Number"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: ../demo/demo.php:171
|
150 |
+
msgid "Date picker"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: ../demo/demo.php:186
|
154 |
+
msgid "Datetime picker"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: ../demo/demo.php:200
|
158 |
+
msgid "Time picker"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: ../demo/demo.php:215
|
162 |
+
msgid "Color picker"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: ../demo/demo.php:221
|
166 |
+
msgid "Checkbox list"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: ../demo/demo.php:232
|
170 |
+
msgid "Email"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: ../demo/demo.php:234
|
174 |
+
msgid "Email description"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: ../demo/demo.php:240
|
178 |
+
msgid "Range"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: ../demo/demo.php:242
|
182 |
+
msgid "Range description"
|
183 |
+
msgstr ""
|
184 |
+
|
185 |
+
#: ../demo/demo.php:251
|
186 |
+
msgid "URL"
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: ../demo/demo.php:253
|
190 |
+
msgid "URL description"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: ../demo/demo.php:259
|
194 |
+
msgid "oEmbed"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: ../demo/demo.php:261
|
198 |
+
msgid "oEmbed description"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: ../demo/demo.php:266
|
202 |
+
msgid "Taxonomy"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: ../demo/demo.php:280
|
206 |
+
msgid "Posts (Pages)"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: ../demo/demo.php:296
|
210 |
+
msgid "WYSIWYG / Rich Text Editor"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: ../demo/demo.php:301
|
214 |
+
msgid "WYSIWYG default value"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: ../demo/demo.php:312 ../demo/force-delete.php:15
|
218 |
+
msgid "File Upload"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: ../demo/demo.php:318
|
222 |
+
msgid "File Advanced Upload"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: ../demo/demo.php:326 ../demo/force-delete.php:22
|
226 |
+
msgid "Image Upload"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: ../demo/demo.php:332 ../demo/force-delete.php:28
|
230 |
+
msgid "Thickbox Image Upload"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: ../demo/demo.php:338 ../demo/force-delete.php:35
|
234 |
+
msgid "Plupload Image Upload"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: ../demo/demo.php:345
|
238 |
+
msgid "Image Advanced Upload"
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: ../demo/force-delete.php:11
|
242 |
+
msgid "Test Meta Box"
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: ../demo/map.php:9
|
246 |
+
msgid "Google Map"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: ../demo/map.php:13
|
250 |
+
msgid "Address"
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: ../demo/map.php:15
|
254 |
+
msgid "Hanoi, Vietnam"
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: ../demo/map.php:19
|
258 |
+
msgid "Location"
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: ../inc/classes/meta-box.php:220
|
262 |
+
msgid "Please correct the errors highlighted below and try again."
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: ../inc/classes/meta-box.php:394
|
266 |
msgid "+"
|
267 |
msgstr ""
|
268 |
|
269 |
+
#: ../inc/classes/meta-box.php:416
|
270 |
msgid "–"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: ../inc/fields/file-advanced.php:23
|
274 |
+
#, php-format
|
275 |
+
msgid "You may only upload maximum %d file"
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: ../inc/fields/file-advanced.php:24
|
279 |
+
#, php-format
|
280 |
+
msgid "You may only upload maximum %d files"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: ../inc/fields/file-advanced.php:25
|
284 |
+
msgid "Select Files"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: ../inc/fields/file-advanced.php:68
|
288 |
msgctxt "file upload"
|
289 |
+
msgid "Select or Upload Files"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: ../inc/fields/file-advanced.php:104 ../inc/fields/file.php:133
|
293 |
msgctxt "file upload"
|
294 |
msgid "Delete"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: ../inc/fields/file-advanced.php:105 ../inc/fields/file.php:134
|
298 |
msgctxt "file upload"
|
299 |
+
msgid "Edit"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: ../inc/fields/file.php:66
|
303 |
+
msgid "Error: Cannot delete file"
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: ../inc/fields/file.php:80
|
307 |
msgctxt "file upload"
|
308 |
+
msgid "Upload Files"
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: ../inc/fields/file.php:81
|
312 |
+
msgctxt "file upload"
|
313 |
+
msgid "+ Add new file"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: ../inc/fields/image-advanced.php:22
|
317 |
+
msgid "Select Images"
|
|
|
|
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: ../inc/fields/image-advanced.php:71
|
|
|
321 |
msgctxt "image upload"
|
322 |
+
msgid "Select or Upload Images"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: ../inc/fields/image-advanced.php:107 ../inc/fields/image.php:144
|
|
|
326 |
msgctxt "image upload"
|
327 |
msgid "Delete"
|
328 |
msgstr ""
|
329 |
|
330 |
+
#: ../inc/fields/image-advanced.php:108 ../inc/fields/image.php:145
|
|
|
331 |
msgctxt "image upload"
|
332 |
msgid "Edit"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: ../inc/fields/image.php:64
|
336 |
+
msgid "Order saved"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: ../inc/fields/image.php:78 ../inc/fields/thickbox-image.php:35
|
340 |
msgctxt "image upload"
|
341 |
+
msgid "Upload Images"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: ../inc/fields/image.php:79
|
345 |
msgctxt "image upload"
|
346 |
msgid "+ Add new image"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: ../inc/fields/map.php:48
|
350 |
+
msgid "Find Address"
|
|
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: ../inc/fields/plupload-image.php:104
|
354 |
msgctxt "image upload"
|
355 |
msgid "Drop images here"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: ../inc/fields/plupload-image.php:105
|
359 |
msgctxt "image upload"
|
360 |
msgid "or"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: ../inc/fields/plupload-image.php:106
|
364 |
msgctxt "image upload"
|
365 |
msgid "Select Files"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: ../inc/fields/plupload-image.php:181
|
369 |
msgctxt "image upload"
|
370 |
+
msgid "Allowed Image Files"
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: ../inc/fields/post.php:54
|
374 |
+
msgid "Post"
|
375 |
+
msgstr ""
|
376 |
+
|
377 |
+
#: ../inc/fields/post.php:68 ../inc/fields/taxonomy.php:40
|
378 |
+
#, php-format
|
379 |
+
msgid "Select a %s"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: ../inc/fields/select-advanced.php:71
|
383 |
+
msgid "Select a value"
|
384 |
+
msgstr ""
|
lang/nl.mo
ADDED
Binary file
|
lang/nl.po
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-04-21 01:56+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-04-21 01:56+0100\n"
|
7 |
+
"Last-Translator: Cor van Noorloos <info@webvorm.nl>\n"
|
8 |
+
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
9 |
+
"Language: nl_NL\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
|
14 |
+
"_nx_noop:1,2\n"
|
15 |
+
"X-Poedit-Basepath: .\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Generator: Poedit 1.5.5\n"
|
18 |
+
"X-Poedit-SearchPath-0: ..\n"
|
19 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
20 |
+
|
21 |
+
#: ../inc/classes/meta-box.php:299
|
22 |
+
msgid "Please correct the errors highlighted below and try again."
|
23 |
+
msgstr "Corrigeer de fouten hieronder gemarkeerd en probeer opnieuw."
|
24 |
+
|
25 |
+
#: ../inc/classes/meta-box.php:360
|
26 |
+
msgid "+"
|
27 |
+
msgstr "+"
|
28 |
+
|
29 |
+
#: ../inc/classes/meta-box.php:382
|
30 |
+
msgid "–"
|
31 |
+
msgstr "–"
|
32 |
+
|
33 |
+
#: ../inc/fields/file-advanced.php:62
|
34 |
+
msgctxt "file upload"
|
35 |
+
msgid "Select or Upload Files"
|
36 |
+
msgstr "Bestanden selecteren of uploaden"
|
37 |
+
|
38 |
+
#: ../inc/fields/file.php:66
|
39 |
+
msgid "Error: Cannot delete file"
|
40 |
+
msgstr "Foutmelding: Kan bestand niet verwijderen"
|
41 |
+
|
42 |
+
#: ../inc/fields/file.php:80
|
43 |
+
msgctxt "file upload"
|
44 |
+
msgid "Upload Files"
|
45 |
+
msgstr "Bestanden uploaden"
|
46 |
+
|
47 |
+
#: ../inc/fields/file.php:81
|
48 |
+
msgctxt "file upload"
|
49 |
+
msgid "+ Add new file"
|
50 |
+
msgstr "+ Nieuw bestand toevoegen"
|
51 |
+
|
52 |
+
#: ../inc/fields/file.php:133
|
53 |
+
msgctxt "file upload"
|
54 |
+
msgid "Delete"
|
55 |
+
msgstr "Verwijderen"
|
56 |
+
|
57 |
+
#: ../inc/fields/file.php:134
|
58 |
+
msgctxt "file upload"
|
59 |
+
msgid "Edit"
|
60 |
+
msgstr "Bewerken"
|
61 |
+
|
62 |
+
#: ../inc/fields/image-advanced.php:68
|
63 |
+
msgctxt "image upload"
|
64 |
+
msgid "Select or Upload Images"
|
65 |
+
msgstr "Afbeeldingen selecteren of uploaden"
|
66 |
+
|
67 |
+
#: ../inc/fields/image.php:64
|
68 |
+
msgid "Order saved"
|
69 |
+
msgstr "Volgorde opgeslagen"
|
70 |
+
|
71 |
+
#: ../inc/fields/image.php:78 ../inc/fields/thickbox-image.php:35
|
72 |
+
msgctxt "image upload"
|
73 |
+
msgid "Upload Images"
|
74 |
+
msgstr "Afbeeldingen uploaden"
|
75 |
+
|
76 |
+
#: ../inc/fields/image.php:79
|
77 |
+
msgctxt "image upload"
|
78 |
+
msgid "+ Add new image"
|
79 |
+
msgstr "+ Nieuwe afbeelding toevoegen"
|
80 |
+
|
81 |
+
#: ../inc/fields/image.php:144
|
82 |
+
msgctxt "image upload"
|
83 |
+
msgid "Delete"
|
84 |
+
msgstr "Verwijderen"
|
85 |
+
|
86 |
+
#: ../inc/fields/image.php:145
|
87 |
+
msgctxt "image upload"
|
88 |
+
msgid "Edit"
|
89 |
+
msgstr "Bewerken"
|
90 |
+
|
91 |
+
#: ../inc/fields/map.php:46
|
92 |
+
msgid "Find Address"
|
93 |
+
msgstr "Adres vinden"
|
94 |
+
|
95 |
+
#: ../inc/fields/plupload-image.php:104
|
96 |
+
msgctxt "image upload"
|
97 |
+
msgid "Drop images here"
|
98 |
+
msgstr "Afbeeldingen naar hier verslepen"
|
99 |
+
|
100 |
+
#: ../inc/fields/plupload-image.php:105
|
101 |
+
msgctxt "image upload"
|
102 |
+
msgid "or"
|
103 |
+
msgstr "of"
|
104 |
+
|
105 |
+
#: ../inc/fields/plupload-image.php:106
|
106 |
+
msgctxt "image upload"
|
107 |
+
msgid "Select Files"
|
108 |
+
msgstr "Bestanden selecteren"
|
109 |
+
|
110 |
+
#: ../inc/fields/plupload-image.php:181
|
111 |
+
msgctxt "image upload"
|
112 |
+
msgid "Allowed Image Files"
|
113 |
+
msgstr "Toegestane afbeeldingsbestanden"
|
114 |
+
|
115 |
+
#: ../inc/fields/post.php:54
|
116 |
+
msgid "Post"
|
117 |
+
msgstr "Bericht"
|
118 |
+
|
119 |
+
#: ../inc/fields/post.php:68 ../inc/fields/taxonomy.php:40
|
120 |
+
#, php-format
|
121 |
+
msgid "Select a %s"
|
122 |
+
msgstr "Een %s selecteren"
|
123 |
+
|
124 |
+
#: ../inc/fields/select-advanced.php:71
|
125 |
+
msgid "Select a value"
|
126 |
+
msgstr "Een waarde selecteren"
|
127 |
+
|
128 |
+
#~ msgctxt "file upload"
|
129 |
+
#~ msgid "Select Files"
|
130 |
+
#~ msgstr "Bestanden selecteren"
|
lang/vi.mo
CHANGED
Binary file
|
lang/vi.po
CHANGED
@@ -2,130 +2,410 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date:
|
6 |
-
"PO-Revision-Date:
|
7 |
"Last-Translator: Rilwis <rilwis@gmail.com>\n"
|
8 |
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;
|
|
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
-
"X-Poedit-Language: English\n"
|
15 |
-
"X-Poedit-Country: VIET NAM\n"
|
16 |
"X-Poedit-SourceCharset: utf-8\n"
|
|
|
17 |
"X-Poedit-SearchPath-0: ..\n"
|
18 |
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
19 |
|
20 |
-
#: ../
|
21 |
-
msgid "
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: ../
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
msgid "+"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: ../inc/classes/meta-box.php:
|
29 |
msgid "–"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: ../inc/fields/file.php:
|
33 |
-
|
34 |
-
|
|
|
35 |
|
36 |
-
#: ../inc/fields/file.php:
|
37 |
-
|
38 |
-
msgid "
|
39 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
-
#: ../inc/fields/file.php:
|
|
|
42 |
msgctxt "file upload"
|
43 |
-
msgid "
|
44 |
-
msgstr "
|
45 |
|
46 |
-
#: ../inc/fields/file.php:
|
47 |
msgctxt "file upload"
|
48 |
msgid "Delete"
|
49 |
msgstr "Xóa"
|
50 |
|
51 |
-
#: ../inc/fields/file.php:
|
52 |
msgctxt "file upload"
|
53 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
msgstr "Tải file"
|
55 |
|
56 |
-
#: ../inc/fields/file.php:
|
57 |
msgctxt "file upload"
|
58 |
msgid "+ Add new file"
|
59 |
msgstr "+ Thêm file mới"
|
60 |
|
61 |
-
#: ../inc/fields/image.php:
|
62 |
-
msgid "
|
63 |
-
msgstr "
|
64 |
-
|
65 |
-
#: ../inc/fields/image.php:91
|
66 |
-
#: ../inc/fields/plupload-image.php:156
|
67 |
-
msgctxt "image upload"
|
68 |
-
msgid "Uploaded files"
|
69 |
-
msgstr "Các file đã tải lên"
|
70 |
|
71 |
-
#: ../inc/fields/image.php:
|
72 |
-
#: ../inc/fields/plupload-image.php:112
|
73 |
msgctxt "image upload"
|
74 |
-
msgid "
|
75 |
-
msgstr "
|
76 |
|
77 |
-
#: ../inc/fields/image.php:
|
78 |
-
#: ../inc/fields/plupload-image.php:113
|
79 |
msgctxt "image upload"
|
80 |
msgid "Delete"
|
81 |
msgstr "Xóa"
|
82 |
|
83 |
-
#: ../inc/fields/image.php:
|
84 |
-
#: ../inc/fields/plupload-image.php:114
|
85 |
msgctxt "image upload"
|
86 |
msgid "Edit"
|
87 |
msgstr "Sửa"
|
88 |
|
89 |
-
#: ../inc/fields/image.php:
|
90 |
-
|
|
|
|
|
|
|
91 |
msgctxt "image upload"
|
92 |
-
msgid "Upload
|
93 |
msgstr "Tải file"
|
94 |
|
95 |
-
#: ../inc/fields/image.php:
|
96 |
msgctxt "image upload"
|
97 |
msgid "+ Add new image"
|
98 |
msgstr "+ Thêm hình mới"
|
99 |
|
100 |
-
#: ../inc/fields/
|
101 |
-
|
102 |
-
|
103 |
-
msgstr "Các file hình ảnh được cho phép"
|
104 |
|
105 |
-
#: ../inc/fields/plupload-image.php:
|
106 |
msgctxt "image upload"
|
107 |
msgid "Drop images here"
|
108 |
msgstr "Kéo thả hình ảnh vào đây"
|
109 |
|
110 |
-
#: ../inc/fields/plupload-image.php:
|
111 |
msgctxt "image upload"
|
112 |
msgid "or"
|
113 |
msgstr "hoặc"
|
114 |
|
115 |
-
#: ../inc/fields/plupload-image.php:
|
116 |
msgctxt "image upload"
|
117 |
msgid "Select Files"
|
118 |
msgstr "Chọn file"
|
119 |
|
120 |
-
#: ../inc/fields/
|
121 |
-
#, fuzzy
|
122 |
msgctxt "image upload"
|
123 |
-
msgid "
|
124 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
-
#~ msgid "Select a color"
|
127 |
-
#~ msgstr "Chọn một màu"
|
128 |
#~ msgctxt "image upload"
|
|
|
|
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
#~ msgid "Add another file"
|
131 |
#~ msgstr "Thêm file mới"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-06-03 22:18+0700\n"
|
6 |
+
"PO-Revision-Date: 2013-06-03 22:19+0700\n"
|
7 |
"Last-Translator: Rilwis <rilwis@gmail.com>\n"
|
8 |
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
9 |
+
"Language: en_VN\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
|
14 |
+
"_nx_noop:1,2\n"
|
15 |
"X-Poedit-Basepath: .\n"
|
|
|
|
|
16 |
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Generator: Poedit 1.5.5\n"
|
18 |
"X-Poedit-SearchPath-0: ..\n"
|
19 |
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
20 |
|
21 |
+
#: ../demo/all-custom-post-types.php:20
|
22 |
+
msgid "Personal Information"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#: ../demo/all-custom-post-types.php:25
|
26 |
+
msgid "Full name"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: ../demo/better-include.php:16 ../demo/include-by-ID-or-page-template.php:8
|
30 |
+
msgid "Meta Box Title"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: ../demo/better-include.php:19 ../demo/include-by-ID-or-page-template.php:14
|
34 |
+
msgid "Your images"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: ../demo/date-time-js-options.php:11
|
38 |
+
msgid "Date Time Picker With JS Options"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: ../demo/date-time-js-options.php:15
|
42 |
+
msgid "Date"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: ../demo/date-time-js-options.php:21 ../demo/demo.php:177
|
46 |
+
msgid "(yyyy-mm-dd)"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: ../demo/date-time-js-options.php:23
|
50 |
+
msgid "Select Date"
|
51 |
+
msgstr "Chọn ngày"
|
52 |
+
|
53 |
+
#: ../demo/date-time-js-options.php:24 ../demo/demo.php:178
|
54 |
+
msgid "yy-mm-dd"
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
+
#: ../demo/date-time-js-options.php:30
|
58 |
+
msgid "Datetime"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: ../demo/date-time-js-options.php:41
|
62 |
+
msgid "Time"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: ../demo/demo.php:34
|
66 |
+
msgid "Standard Fields"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: ../demo/demo.php:53
|
70 |
+
msgid "Text"
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
#: ../demo/demo.php:57
|
74 |
+
msgid "Text description"
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: ../demo/demo.php:60
|
78 |
+
msgid "Default text value"
|
79 |
+
msgstr "Giá trị text mặc định"
|
80 |
+
|
81 |
+
#: ../demo/demo.php:66
|
82 |
+
msgid "Checkbox"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: ../demo/demo.php:74
|
86 |
+
msgid "Radio"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: ../demo/demo.php:80 ../demo/demo.php:91 ../demo/demo.php:226
|
90 |
+
msgid "Label1"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: ../demo/demo.php:81 ../demo/demo.php:92 ../demo/demo.php:227
|
94 |
+
msgid "Label2"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: ../demo/demo.php:86
|
98 |
+
msgid "Select"
|
99 |
+
msgstr "Chọn"
|
100 |
+
|
101 |
+
#: ../demo/demo.php:96
|
102 |
+
msgid "Select an Item"
|
103 |
+
msgstr "Chọn một giá trị"
|
104 |
+
|
105 |
+
#: ../demo/demo.php:103
|
106 |
+
msgid "Hidden value"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: ../demo/demo.php:107
|
110 |
+
msgid "Password"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: ../demo/demo.php:113
|
114 |
+
msgid "Textarea"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: ../demo/demo.php:114
|
118 |
+
msgid "Textarea description"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: ../demo/demo.php:131
|
122 |
+
msgid "Password is required"
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: ../demo/demo.php:132
|
126 |
+
msgid "Password must be at least 7 characters"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: ../demo/demo.php:140
|
130 |
+
msgid "Advanced Fields"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: ../demo/demo.php:145
|
134 |
+
msgid "Slider"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: ../demo/demo.php:150
|
138 |
+
msgid "$"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: ../demo/demo.php:151
|
142 |
+
msgid " USD"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: ../demo/demo.php:162
|
146 |
+
msgid "Number"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: ../demo/demo.php:171
|
150 |
+
msgid "Date picker"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: ../demo/demo.php:186
|
154 |
+
msgid "Datetime picker"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: ../demo/demo.php:200
|
158 |
+
msgid "Time picker"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: ../demo/demo.php:215
|
162 |
+
msgid "Color picker"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: ../demo/demo.php:221
|
166 |
+
msgid "Checkbox list"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: ../demo/demo.php:232
|
170 |
+
msgid "Email"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: ../demo/demo.php:234
|
174 |
+
msgid "Email description"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: ../demo/demo.php:240
|
178 |
+
msgid "Range"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: ../demo/demo.php:242
|
182 |
+
msgid "Range description"
|
183 |
+
msgstr ""
|
184 |
+
|
185 |
+
#: ../demo/demo.php:251
|
186 |
+
msgid "URL"
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: ../demo/demo.php:253
|
190 |
+
msgid "URL description"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: ../demo/demo.php:259
|
194 |
+
msgid "oEmbed"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: ../demo/demo.php:261
|
198 |
+
msgid "oEmbed description"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: ../demo/demo.php:266
|
202 |
+
msgid "Taxonomy"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: ../demo/demo.php:280
|
206 |
+
msgid "Posts (Pages)"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: ../demo/demo.php:296
|
210 |
+
msgid "WYSIWYG / Rich Text Editor"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: ../demo/demo.php:301
|
214 |
+
msgid "WYSIWYG default value"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: ../demo/demo.php:312 ../demo/force-delete.php:15
|
218 |
+
msgid "File Upload"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: ../demo/demo.php:318
|
222 |
+
msgid "File Advanced Upload"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: ../demo/demo.php:326 ../demo/force-delete.php:22
|
226 |
+
msgid "Image Upload"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: ../demo/demo.php:332 ../demo/force-delete.php:28
|
230 |
+
msgid "Thickbox Image Upload"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: ../demo/demo.php:338 ../demo/force-delete.php:35
|
234 |
+
#, fuzzy
|
235 |
+
msgid "Plupload Image Upload"
|
236 |
+
msgstr "Tải file"
|
237 |
+
|
238 |
+
#: ../demo/demo.php:345
|
239 |
+
msgid "Image Advanced Upload"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: ../demo/force-delete.php:11
|
243 |
+
msgid "Test Meta Box"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: ../demo/map.php:9
|
247 |
+
msgid "Google Map"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: ../demo/map.php:13
|
251 |
+
msgid "Address"
|
252 |
+
msgstr "Địa chỉ"
|
253 |
+
|
254 |
+
#: ../demo/map.php:15
|
255 |
+
msgid "Hanoi, Vietnam"
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: ../demo/map.php:19
|
259 |
+
msgid "Location"
|
260 |
+
msgstr "Địa điểm"
|
261 |
+
|
262 |
+
#: ../inc/classes/meta-box.php:220
|
263 |
+
msgid "Please correct the errors highlighted below and try again."
|
264 |
+
msgstr "Vui lòng sửa các lỗi dưới đây và thử lại"
|
265 |
+
|
266 |
+
#: ../inc/classes/meta-box.php:394
|
267 |
msgid "+"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: ../inc/classes/meta-box.php:416
|
271 |
msgid "–"
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: ../inc/fields/file-advanced.php:23
|
275 |
+
#, php-format
|
276 |
+
msgid "You may only upload maximum %d file"
|
277 |
+
msgstr "Bạn chỉ được phép upload tối đa %d file"
|
278 |
|
279 |
+
#: ../inc/fields/file-advanced.php:24
|
280 |
+
#, php-format
|
281 |
+
msgid "You may only upload maximum %d files"
|
282 |
+
msgstr "Bạn chỉ được phép upload tối đa %d file"
|
283 |
+
|
284 |
+
#: ../inc/fields/file-advanced.php:25
|
285 |
+
#, fuzzy
|
286 |
+
msgid "Select Files"
|
287 |
+
msgstr "Chọn file"
|
288 |
|
289 |
+
#: ../inc/fields/file-advanced.php:68
|
290 |
+
#, fuzzy
|
291 |
msgctxt "file upload"
|
292 |
+
msgid "Select or Upload Files"
|
293 |
+
msgstr "Chọn hoặc tải file"
|
294 |
|
295 |
+
#: ../inc/fields/file-advanced.php:104 ../inc/fields/file.php:133
|
296 |
msgctxt "file upload"
|
297 |
msgid "Delete"
|
298 |
msgstr "Xóa"
|
299 |
|
300 |
+
#: ../inc/fields/file-advanced.php:105 ../inc/fields/file.php:134
|
301 |
msgctxt "file upload"
|
302 |
+
msgid "Edit"
|
303 |
+
msgstr "Sửa"
|
304 |
+
|
305 |
+
#: ../inc/fields/file.php:66
|
306 |
+
msgid "Error: Cannot delete file"
|
307 |
+
msgstr "Lỗi: Không xóa được file"
|
308 |
+
|
309 |
+
#: ../inc/fields/file.php:80
|
310 |
+
msgctxt "file upload"
|
311 |
+
msgid "Upload Files"
|
312 |
msgstr "Tải file"
|
313 |
|
314 |
+
#: ../inc/fields/file.php:81
|
315 |
msgctxt "file upload"
|
316 |
msgid "+ Add new file"
|
317 |
msgstr "+ Thêm file mới"
|
318 |
|
319 |
+
#: ../inc/fields/image-advanced.php:22
|
320 |
+
msgid "Select Images"
|
321 |
+
msgstr "Chọn hình ảnh"
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
|
323 |
+
#: ../inc/fields/image-advanced.php:71
|
|
|
324 |
msgctxt "image upload"
|
325 |
+
msgid "Select or Upload Images"
|
326 |
+
msgstr "Chọn hoặc tải file"
|
327 |
|
328 |
+
#: ../inc/fields/image-advanced.php:107 ../inc/fields/image.php:144
|
|
|
329 |
msgctxt "image upload"
|
330 |
msgid "Delete"
|
331 |
msgstr "Xóa"
|
332 |
|
333 |
+
#: ../inc/fields/image-advanced.php:108 ../inc/fields/image.php:145
|
|
|
334 |
msgctxt "image upload"
|
335 |
msgid "Edit"
|
336 |
msgstr "Sửa"
|
337 |
|
338 |
+
#: ../inc/fields/image.php:64
|
339 |
+
msgid "Order saved"
|
340 |
+
msgstr "Đã lưu thứ tự"
|
341 |
+
|
342 |
+
#: ../inc/fields/image.php:78 ../inc/fields/thickbox-image.php:35
|
343 |
msgctxt "image upload"
|
344 |
+
msgid "Upload Images"
|
345 |
msgstr "Tải file"
|
346 |
|
347 |
+
#: ../inc/fields/image.php:79
|
348 |
msgctxt "image upload"
|
349 |
msgid "+ Add new image"
|
350 |
msgstr "+ Thêm hình mới"
|
351 |
|
352 |
+
#: ../inc/fields/map.php:48
|
353 |
+
msgid "Find Address"
|
354 |
+
msgstr "Tìm địa chỉ"
|
|
|
355 |
|
356 |
+
#: ../inc/fields/plupload-image.php:104
|
357 |
msgctxt "image upload"
|
358 |
msgid "Drop images here"
|
359 |
msgstr "Kéo thả hình ảnh vào đây"
|
360 |
|
361 |
+
#: ../inc/fields/plupload-image.php:105
|
362 |
msgctxt "image upload"
|
363 |
msgid "or"
|
364 |
msgstr "hoặc"
|
365 |
|
366 |
+
#: ../inc/fields/plupload-image.php:106
|
367 |
msgctxt "image upload"
|
368 |
msgid "Select Files"
|
369 |
msgstr "Chọn file"
|
370 |
|
371 |
+
#: ../inc/fields/plupload-image.php:181
|
|
|
372 |
msgctxt "image upload"
|
373 |
+
msgid "Allowed Image Files"
|
374 |
+
msgstr "Các file hình ảnh được cho phép"
|
375 |
+
|
376 |
+
#: ../inc/fields/post.php:54
|
377 |
+
msgid "Post"
|
378 |
+
msgstr "Bài viết"
|
379 |
+
|
380 |
+
#: ../inc/fields/post.php:68 ../inc/fields/taxonomy.php:40
|
381 |
+
#, php-format
|
382 |
+
msgid "Select a %s"
|
383 |
+
msgstr "Chọn %s"
|
384 |
+
|
385 |
+
#: ../inc/fields/select-advanced.php:71
|
386 |
+
msgid "Select a value"
|
387 |
+
msgstr "Chọn một màu"
|
388 |
+
|
389 |
+
#~ msgctxt "file upload"
|
390 |
+
#~ msgid "Uploaded files"
|
391 |
+
#~ msgstr "Các file đã tải lên"
|
392 |
+
|
393 |
+
#~ msgctxt "file upload"
|
394 |
+
#~ msgid "Delete this file"
|
395 |
+
#~ msgstr "Xóa file"
|
396 |
|
|
|
|
|
397 |
#~ msgctxt "image upload"
|
398 |
+
#~ msgid "Uploaded files"
|
399 |
+
#~ msgstr "Các file đã tải lên"
|
400 |
|
401 |
+
#~ msgctxt "image upload"
|
402 |
+
#~ msgid "Delete this file"
|
403 |
+
#~ msgstr "Xóa file"
|
404 |
+
|
405 |
+
#~ msgctxt "image upload"
|
406 |
+
#~ msgid "Upload files"
|
407 |
+
#~ msgstr "Tải file"
|
408 |
+
|
409 |
+
#~ msgctxt "image upload"
|
410 |
#~ msgid "Add another file"
|
411 |
#~ msgstr "Thêm file mới"
|
meta-box.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Meta Box
|
4 |
Plugin URI: http://www.deluxeblogtips.com/meta-box
|
5 |
Description: Create meta box for editing pages in WordPress. Compatible with custom post types since WP 3.0
|
6 |
-
Version: 4.
|
7 |
Author: Rilwis
|
8 |
Author URI: http://www.deluxeblogtips.com
|
9 |
License: GPL2+
|
@@ -13,7 +13,7 @@ License: GPL2+
|
|
13 |
defined( 'ABSPATH' ) || exit;
|
14 |
|
15 |
// Script version, used to add version for scripts and styles
|
16 |
-
define( 'RWMB_VER', '4.
|
17 |
|
18 |
// Define plugin URLs, for fast enqueuing scripts and styles
|
19 |
if ( ! defined( 'RWMB_URL' ) )
|
3 |
Plugin Name: Meta Box
|
4 |
Plugin URI: http://www.deluxeblogtips.com/meta-box
|
5 |
Description: Create meta box for editing pages in WordPress. Compatible with custom post types since WP 3.0
|
6 |
+
Version: 4.3
|
7 |
Author: Rilwis
|
8 |
Author URI: http://www.deluxeblogtips.com
|
9 |
License: GPL2+
|
13 |
defined( 'ABSPATH' ) || exit;
|
14 |
|
15 |
// Script version, used to add version for scripts and styles
|
16 |
+
define( 'RWMB_VER', '4.3' );
|
17 |
|
18 |
// Define plugin URLs, for fast enqueuing scripts and styles
|
19 |
if ( ! defined( 'RWMB_URL' ) )
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: rilwis, franz-josef-kaiser, Omnicia, funkedgeek, PerWiklander, ruanmer
|
3 |
Donate link: http://www.deluxeblogtips.com/donate
|
4 |
Tags: meta-box, custom-fields, custom-field, meta, meta-boxes
|
5 |
-
Requires at least: 3.
|
6 |
Tested up to: 3.5.1
|
7 |
-
Stable tag: 4.
|
8 |
|
9 |
Meta Box plugin helps you easily implement multiple meta boxes in editing pages in WordPress. Works with custom post types and various field types.
|
10 |
|
@@ -20,19 +20,28 @@ Meta Box plugin provides an API to easily implement custom meta boxes in editing
|
|
20 |
|
21 |
**Supported fields**
|
22 |
|
|
|
23 |
- checkbox_list
|
24 |
- checkbox
|
25 |
- color
|
26 |
- date
|
27 |
- datetime
|
|
|
|
|
28 |
- file
|
|
|
|
|
29 |
- hidden
|
30 |
- image
|
|
|
31 |
- map
|
32 |
- number
|
|
|
33 |
- password
|
34 |
- plupload_image
|
|
|
35 |
- radio
|
|
|
36 |
- select
|
37 |
- select_advanced (uses [select2](http://ivaynberg.github.com/select2/))
|
38 |
- slider
|
@@ -62,6 +71,31 @@ To getting started with the plugin API, please read [this tutorial](http://www.d
|
|
62 |
|
63 |
== Changelog ==
|
64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
= 4.2.4 =
|
66 |
* Bug fix: path to Select2 JS and CSS. [Link](http://wordpress.org/support/topic/missing-files-5)
|
67 |
* Bug fix: `taxonomy.js` loading
|
2 |
Contributors: rilwis, franz-josef-kaiser, Omnicia, funkedgeek, PerWiklander, ruanmer
|
3 |
Donate link: http://www.deluxeblogtips.com/donate
|
4 |
Tags: meta-box, custom-fields, custom-field, meta, meta-boxes
|
5 |
+
Requires at least: 3.3
|
6 |
Tested up to: 3.5.1
|
7 |
+
Stable tag: 4.3
|
8 |
|
9 |
Meta Box plugin helps you easily implement multiple meta boxes in editing pages in WordPress. Works with custom post types and various field types.
|
10 |
|
20 |
|
21 |
**Supported fields**
|
22 |
|
23 |
+
- button
|
24 |
- checkbox_list
|
25 |
- checkbox
|
26 |
- color
|
27 |
- date
|
28 |
- datetime
|
29 |
+
- divider
|
30 |
+
- email
|
31 |
- file
|
32 |
+
- file_advanced
|
33 |
+
- heading
|
34 |
- hidden
|
35 |
- image
|
36 |
+
- image_advanced
|
37 |
- map
|
38 |
- number
|
39 |
+
- oembed
|
40 |
- password
|
41 |
- plupload_image
|
42 |
+
- post
|
43 |
- radio
|
44 |
+
- range
|
45 |
- select
|
46 |
- select_advanced (uses [select2](http://ivaynberg.github.com/select2/))
|
47 |
- slider
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 4.3 =
|
75 |
+
* Bug fix: show full size image after upload if thumbnail is not available
|
76 |
+
* Bug fix: new added file not shown
|
77 |
+
* Bug fix: issue with color field disappearing
|
78 |
+
* Bug fix: `max_file_upload` now works for normal `file` & `image` as well
|
79 |
+
* Bug fix: problem with uploading with the advanced fields
|
80 |
+
* Bug fix: file & image advanced not saving
|
81 |
+
* Bug fix: `select_advanced` cloning issue
|
82 |
+
* Bug fix: `plupload_image` ordering
|
83 |
+
* Improvement: add `divider`, `heading`, `button`, `range`, `oembed`, `email`, `post` fields
|
84 |
+
* Improvement: translation for file & image fields
|
85 |
+
* Improvement: add option `default_hidden` to hide meta box by default
|
86 |
+
* Improvement: allow to have multiple maps on the same page
|
87 |
+
* Improvement: file and image advanced now use Underscore.js
|
88 |
+
* Improvement: `slider` filed now has `prefix` and `suffix` for text labels and `js_options` for more JS options
|
89 |
+
* Improvement: WYSIWYS can bypass the `wpautop` using `raw` parameter
|
90 |
+
* Improvement: `color` field now supports new color picker in WP 3.5
|
91 |
+
* Improvement: add `ID` to results returned by `rwmb_meta` when getting meta value of file & image
|
92 |
+
* Improvement: auto use localized version for date & time fields
|
93 |
+
* Improvement: add `timestamp` option to save the datetime as unix timestamp internally
|
94 |
+
* Improvement: add `autosave` option for meta box
|
95 |
+
* Improvement: add `force_delete` option for file and image field
|
96 |
+
* And lots of changes and improvements
|
97 |
+
|
98 |
+
|
99 |
= 4.2.4 =
|
100 |
* Bug fix: path to Select2 JS and CSS. [Link](http://wordpress.org/support/topic/missing-files-5)
|
101 |
* Bug fix: `taxonomy.js` loading
|