Version Description
- February 5th, 2016 =
- Upgraded font awesome library from 4.3.0 to 4.5.0.
- Added a fallback for the font awesome library - when the CDN is not accessible for whatever reason.
- Added CDN responses to transient to decrease page load times.
- Included a new filter allowing users to specify a font awesome version number to load from the CDN (
timeline_express_font_awesome_version
- see other notes.).
Download this release
Release Info
Developer | eherman24 |
Plugin | Timeline Express |
Version | 1.1.7.8 |
Comparing to | |
See all releases |
Code changes from version 1.1.7.7 to 1.1.7.8
- README.md +0 -480
- classes/class.timeline-express.php +29 -14
- lib/cmb_metaboxes/helpers/cmb_Meta_Box_Sanitize.php +0 -346
- lib/cmb_metaboxes/helpers/cmb_Meta_Box_Show_Filters.php +0 -105
- lib/cmb_metaboxes/helpers/cmb_Meta_Box_ajax.php +0 -203
- lib/cmb_metaboxes/helpers/cmb_Meta_Box_field.php +0 -497
- lib/cmb_metaboxes/helpers/cmb_Meta_Box_types.php +0 -794
- lib/cmb_metaboxes/images/ico-delete.png +0 -0
- lib/cmb_metaboxes/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- lib/cmb_metaboxes/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- lib/cmb_metaboxes/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- lib/cmb_metaboxes/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- lib/cmb_metaboxes/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- lib/cmb_metaboxes/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- lib/cmb_metaboxes/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- lib/cmb_metaboxes/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- lib/cmb_metaboxes/images/ui-icons_222222_256x240.png +0 -0
- lib/cmb_metaboxes/images/ui-icons_2e83ff_256x240.png +0 -0
- lib/cmb_metaboxes/images/ui-icons_454545_256x240.png +0 -0
- lib/cmb_metaboxes/images/ui-icons_888888_256x240.png +0 -0
- lib/cmb_metaboxes/images/ui-icons_cd0a0a_256x240.png +0 -0
- lib/cmb_metaboxes/init.php +0 -1185
- lib/cmb_metaboxes/js/cmb.js +0 -797
- lib/cmb_metaboxes/js/cmb.min.js +0 -1
- lib/cmb_metaboxes/js/jquery.datePicker.min.js +0 -2038
- lib/cmb_metaboxes/js/jquery.timePicker.min.js +0 -13
- lib/cmb_metaboxes/readme.md +0 -296
- lib/cmb_metaboxes/style.css +0 -621
- lib/cmb_metaboxes/style.min.css +0 -1
- lib/icons/css/font-awesome.css +2086 -0
- lib/icons/css/font-awesome.min.css +4 -0
- readme.txt +29 -4
- timeline-express.php +2 -2
README.md
DELETED
@@ -1,480 +0,0 @@
|
|
1 |
-
Timeline Express v1.1.7.6
|
2 |
-
================
|
3 |
-
|
4 |
-
Timeline express allows you to create a vertical animated and responsive timeline of posts , without writing a single line of code. Sweet!
|
5 |
-
|
6 |
-
**Features**
|
7 |
-
|
8 |
-
* Load a custom template for single announcements
|
9 |
-
* Localized date formatting for international users
|
10 |
-
* Hundreds of Font awesome icons included. Specify a different icon for each announcement
|
11 |
-
* CSS3 animations on scroll
|
12 |
-
* Set the color of the announcement
|
13 |
-
* Specify the length to trim each announcemnt, or randomize it!
|
14 |
-
* Hide the date of the announcement
|
15 |
-
* Hide the 'read more' button for each announcement
|
16 |
-
* Specify an image to display for each announcement
|
17 |
-
* Delete announcements on uninstallation (so no orphan posts are hanging around in your database)
|
18 |
-
* Easy to use shortcode to place the timeline wherever your heart desires ( `[timeline-express]` )
|
19 |
-
* TinyMCE button to generate the shortcode
|
20 |
-
* Specify Ascending vs Descending display order
|
21 |
-
* Highly extensible
|
22 |
-
* Translatable
|
23 |
-
|
24 |
-
**Translated**
|
25 |
-
|
26 |
-
Timeline express comes ready for translation. I would love to get things translated into as many languages as possible. At the moment the following translations are available for Timeline Express :
|
27 |
-
|
28 |
-
* English
|
29 |
-
* Chinese (zh_CN) - thanks goes to <a href="http://www.vahichen.com" target="_blank">Vahi Chen</a>
|
30 |
-
* Portuguese (pt_BR) - thanks goes to <a href="http://toborino.com" target="_blank">Gustavo Magalhães</a>
|
31 |
-
* Polish (pl_PL) - thanks goes to Kanios
|
32 |
-
* Dutch (nl_NL) - thanks goes to <a href="http://www.kasteelschaesberg.info/wpress/" target="_blank">Kees Hessels</a>
|
33 |
-
* German (de_DE) - thanks goes to <a href="http://www.fairsoft.koeln" target="_blank">Martin Gerlach</a>
|
34 |
-
* French (fr_FR) - thanks goes to Julien Lambert
|
35 |
-
* Hungarian (hu_HU) - thanks goes to <a href="http://www.keszites.com/" target="_blank">Zsolt</a>
|
36 |
-
|
37 |
-
<em>We're always looking for polyglots to help with the translations. If you enjoy this plugin, speak multiple languages and want to contribute please <a href="http://www.evan-herman.com/contact/" target="_blank">contact me</a> about how you can help translate things so users around the world can benefit from this plugin.</em>
|
38 |
-
|
39 |
-
<em>This plugin was originally inspired by the great folks at <a href="http://codyhouse.co/gem/vertical-timeline/">CodyHouse.io</a>.</em>
|
40 |
-
|
41 |
-
**Hooks + Filters**
|
42 |
-
|
43 |
-
**Use Custom Images Instead of Font Awesome Icons (New v1.1.6.7)**
|
44 |
-
|
45 |
-
Users can now use the custom announcement image in place of the font awesome icons by using the following filter. Props to Pete Nelson for the pull request in making this possible
|
46 |
-
|
47 |
-
timeline-express-custom-icon-html
|
48 |
-
|
49 |
-
Example: https://gist.github.com/EvanHerman/6bbc8de82f34b4cb3c5c
|
50 |
-
|
51 |
-
**Use Alternate Image Size For Announcements (New v1.1.5.5)**
|
52 |
-
|
53 |
-
By default Timeline Express generates a custom image size to use within the timeline. If you would like to use another image size, you can use the following filter.
|
54 |
-
|
55 |
-
Example:
|
56 |
-
```<php>
|
57 |
-
function change_timeline_express_announcement_image_size( $image_size ) {
|
58 |
-
$image_size = 'full';
|
59 |
-
return $image_size;
|
60 |
-
}
|
61 |
-
add_filter( 'timeline-express-announcement-img-size' , 'change_timeline_express_announcement_image_size' );
|
62 |
-
```
|
63 |
-
|
64 |
-
**Define your own custom fields to use in Announcement posts (New v1.1.5)**
|
65 |
-
|
66 |
-
Users can now add custom fields to Timeline Express announcement posts. This allows for greater control over the announcements and the front end display. Using this hook in conjunction with a custom single announcement template will give you the greatest control.
|
67 |
-
|
68 |
-
Example:
|
69 |
-
```<php>
|
70 |
-
function add_custom_timeline_express_field( $custom_fields ) {
|
71 |
-
$custom_fields = array(
|
72 |
-
array(
|
73 |
-
'name' => __( 'Example Text Field', 'timeline-express' ),
|
74 |
-
'desc' => __( 'this is an example user defined text field.', 'timeline-express' ),
|
75 |
-
'id' => 'announcement_user_defined_text',
|
76 |
-
'type' => 'text_medium',
|
77 |
-
),
|
78 |
-
array(
|
79 |
-
'name' => __( 'Example WYSIWYG', 'timeline-express' ),
|
80 |
-
'desc' => __( 'this is an example wysiwyg field.', 'timeline-express' ),
|
81 |
-
'id' => 'announcement_user_defined_wysiwyg',
|
82 |
-
'type' => 'wysiwyg',
|
83 |
-
),
|
84 |
-
array(
|
85 |
-
'name' => __( 'Example Email Field', 'timeline-express' ),
|
86 |
-
'desc' => __( 'this is an example user defined email field.', 'timeline-express' ),
|
87 |
-
'id' => 'announcement_user_defined_money',
|
88 |
-
'type' => 'text_email',
|
89 |
-
)
|
90 |
-
);
|
91 |
-
return $custom_fields;
|
92 |
-
}
|
93 |
-
add_filter( 'timeline_express_custom_fields' , 'add_custom_timeline_express_field' );
|
94 |
-
```
|
95 |
-
|
96 |
-
This example would add 3 new fields below the 'Announcement Image' field on the announcement post.
|
97 |
-
|
98 |
-
The first field is a simple text field. The second field is an example WYSIWYG, and the third is an email field.
|
99 |
-
|
100 |
-
Note: You can add as many fields as you would like, and display them on the front end using the <a href="http://codex.wordpress.org/Function_Reference/get_post_meta" target="_blank" title="WordPress Codex: get_post_meta()">get_post_meta()</a> function.
|
101 |
-
|
102 |
-
**Customize the 'announcement' slug (New v1.1.4)**
|
103 |
-
|
104 |
-
Users can now define their own slug for announcement posts using the provided filter `'timeline-express-slug'`. This alters the URL structure of the announcement, possibly for SEO purposes. You would enter the following code into your active themes functions.php file.
|
105 |
-
|
106 |
-
After you enter the code into the functions.php file, you'll want to refresh your permalinks. You can do so by going to 'Settings > Permalinks' and simply clicking save. That will prevent the 404 page you may see upon altering the slug.
|
107 |
-
|
108 |
-
Example:
|
109 |
-
```<php>
|
110 |
-
// alter '/announcement/' to be '/event/'
|
111 |
-
function timeline_express_change_announcement_slug( $slug ) {
|
112 |
-
$slug = 'event';
|
113 |
-
return $slug;
|
114 |
-
}
|
115 |
-
add_filter('timeline-express-slug', 'timeline_express_change_announcement_slug' );
|
116 |
-
```
|
117 |
-
|
118 |
-
This example would change the default `/announcement/` slug, to `/event/`.
|
119 |
-
|
120 |
-
*Alter the 'Read More' button text (New v1.1.3.2)**
|
121 |
-
|
122 |
-
Users can now alter the 'Read More' button text using the provided gettext filter and the 'timeline-express' text domain.
|
123 |
-
|
124 |
-
Example:
|
125 |
-
```<php>
|
126 |
-
// alter 'Read more' to say 'View Announcement'
|
127 |
-
function timeline_express_change_readmore_text( $translated_text, $untranslated_text, $domain ) {
|
128 |
-
switch( $untranslated_text ) {
|
129 |
-
case 'Read more':
|
130 |
-
$translated_text = __( 'View Announcement','timeline-express' );
|
131 |
-
break;
|
132 |
-
}
|
133 |
-
return $translated_text;
|
134 |
-
}
|
135 |
-
add_filter('gettext', 'timeline_express_change_readmore_text', 20, 3);
|
136 |
-
```
|
137 |
-
|
138 |
-
This example would alter 'Read more' to say 'View Announcement'.
|
139 |
-
|
140 |
-
**Add custom classes to the 'Read More' button (New v1.1.3.1)**
|
141 |
-
|
142 |
-
Users can now add custom classes to the 'Read More' announcement button. This allows for greater control in fitting the Timeline into your currently active theme.
|
143 |
-
|
144 |
-
Parameters :
|
145 |
-
|
146 |
-
$button_classes = default button classes assigned to the 'Read More' button
|
147 |
-
|
148 |
-
Example:
|
149 |
-
```<php>
|
150 |
-
// add a custom class to the timeline express readmore link
|
151 |
-
function timeline_express_custom_readmore_class( $button_classes ) {
|
152 |
-
return $button_classes . 'custom-class-name';
|
153 |
-
}
|
154 |
-
add_filter( 'timeline-express-read-more-class' , 'timeline_express_custom_readmore_class' );
|
155 |
-
```
|
156 |
-
|
157 |
-
This example would print the following 'Read More' button HTML onto the page :
|
158 |
-
|
159 |
-
`<a href="http://site.com/link-to-announcement" class="cd-read-more btn btn-primary custom-class-name">Read more</a>`
|
160 |
-
|
161 |
-
**Setup a custom date format for front end display (New v1.0.9)**
|
162 |
-
|
163 |
-
New in version 1.0.9 is the localization of dates on the front end. The date format is now controlled by your date settings inside of 'General > Settings'.
|
164 |
-
|
165 |
-
If, for one reason or another, you'd like to specify a different date format than provided by WordPress core you can use the provided filter `timeline_express_custom_date_format`.
|
166 |
-
|
167 |
-
The one parameter you need to pass into your function is $date_format, which is (as it sounds) the format of the date.
|
168 |
-
|
169 |
-
Some formatting examples:
|
170 |
-
|
171 |
-
* `m.d.Y` - 11.19.2014
|
172 |
-
* `d-m-y` - 11-19-14
|
173 |
-
* `d M y` - 19 Nov 2014
|
174 |
-
* `D j/n/Y` - Wed 11/19/2014
|
175 |
-
* `l jS \of\ F` - Wednesday 19th of November
|
176 |
-
|
177 |
-
Example:
|
178 |
-
```<php>
|
179 |
-
function custom_te_date_format( $date_format ) {
|
180 |
-
$date_format = "M d , Y"; // will print the date as Nov 19 , 2014
|
181 |
-
return $date_format;
|
182 |
-
}
|
183 |
-
add_filter( 'timeline_express_custom_date_format' , 'custom_te_date_format' , 10 );
|
184 |
-
```
|
185 |
-
|
186 |
-
* d - Numeric representation of a day, with leading zeros 01 through 31.
|
187 |
-
* m - Numeric representation of a month, with leading zeros 01 through 12.
|
188 |
-
* y - Numeric representation of a year, two digits.
|
189 |
-
|
190 |
-
* D - Textual representation of a day, three letters Mon through Sun.
|
191 |
-
* j - Numeric representation of a day, without leading zeros 1 through 31.
|
192 |
-
* n - Numeric representation of a month, without leading zeros 1 through 12.
|
193 |
-
* Y - Numeric representation of a year, four digits.
|
194 |
-
|
195 |
-
* S - English ordinal suffix for the day of the month. Consist of 2 characters st, nd, rd or th.
|
196 |
-
* F - Textual representation of a month, January through December.
|
197 |
-
|
198 |
-
* M - Textual representation of a month, three letters Jan through Dec.
|
199 |
-
|
200 |
-
|
201 |
-
<em>[view more date formatting parameters](http://php.net/manual/en/function.date.php)</em>
|
202 |
-
|
203 |
-
|
204 |
-
**Load Your Own Single Announcement Template File (New v1.0.8)**
|
205 |
-
|
206 |
-
By default all single announcements will try and load a single.php template file. If that can't be found, we've done our best to implement a template for you. If your unhappy with the template file we've provided you have two options. Your first option is to copy over the single-announcement-template directory contained within the plugin into your active themes root. This will trigger the plugin to load that file instead. You can then customize this file to your hearts content without fear of losing any of your changes in the next update.
|
207 |
-
|
208 |
-
Your next option is to use our new filter for loading your own custom template file. If for whatever reason you've designed or developed your own single.php file which you would rather use, or you just want to use your themes page.php template instead, you can use the provided filter to change the loaded template. Here is an example ( you want to drop this code into your active theme's functions.php file ) :
|
209 |
-
|
210 |
-
Example:
|
211 |
-
```<php>
|
212 |
-
// By default Timeline Express uses single.php for announcements
|
213 |
-
// you can load page.php instead
|
214 |
-
// just change page.php to whatever your template file is named
|
215 |
-
// keep in mind, this is looking in your active themes root for the template
|
216 |
-
function custom_timeline_express_template_file( $template_file ) {
|
217 |
-
$template_file = 'page.php';
|
218 |
-
return $template_file;
|
219 |
-
}
|
220 |
-
add_filter( 'timeline_express_custom_template' , 'custom_timeline_express_template_file' , 10 );
|
221 |
-
```
|
222 |
-
|
223 |
-
<br />
|
224 |
-
<br />
|
225 |
-
<strong>While the plugins I develop are free, maintaining and supporting them is hard work. If you find this plugin useful, or it helps in anyway, please consider making a <a href="http://www.evan-herman.com/contact/?contact-reason=I%20want%20to%20make%20a%20donation%20for%20all%20your%20hard%20work">donation</a> for its continued development.</strong>
|
226 |
-
|
227 |
-
|
228 |
-
### Installation
|
229 |
-
|
230 |
-
1. Download the plugin .zip file
|
231 |
-
2. Log in to yourdomain.com/wp-admin
|
232 |
-
3. Click Plugins -> Add New -> Upload
|
233 |
-
4. Activate the plugin
|
234 |
-
6. On the left hand menu, hover over 'Timeline Express' and click 'New Announcement'
|
235 |
-
7. Begin populating the timeline with events. (Note: Events will appear in chronological order according to the <strong>announcement date</strong>)
|
236 |
-
8. Once you have populated the timeline, head over to the settings page (Settings > Timeline Express) to customize your timeline.
|
237 |
-
9. Create a new page, and enter the shortcode [timeline-express] to display the vertical timeline (Note: Timeline Express displays best on full width pages)
|
238 |
-
|
239 |
-
### Frequently Asked Questions
|
240 |
-
|
241 |
-
###### How do I use this plugin?
|
242 |
-
Begin by simply installing the plugin. Once the plugin has been installed, go ahead and begin creating announcement posts. You'll find a new menu item just below 'Posts'.
|
243 |
-
After you have a substantial number of announcements set up, you're ready to display the timeline on the front end of your site.
|
244 |
-
|
245 |
-
Timeline express displays best on full width pages, but is not limited to them. Create a new page, and drop the shortcode into the page - `[timeline-express]`.
|
246 |
-
Publish your page, and view it on the front end the see your new super sweet timeline! (scroll for animation effects!)
|
247 |
-
|
248 |
-
###### What template is the single announcement post using? Can I customize it at all? I want to do x, y or z.
|
249 |
-
The single announcement post is using a custom template file that comes pre-bundled with the plugin. If you want to customize the template for whatever reason
|
250 |
-
you can do so, by creating a directory in your active theme called 'timeline-express'. Once the directory is created, simply copy the file titled 'single-timeline-express-announcement.php' into
|
251 |
-
the newly created 'timeline-express' directory in your theme. Timeline express will then automagically pull in the newly created template in your theme root. You can go ahead and customize
|
252 |
-
it to your hearts desire without fear of losing any changes in future updates!
|
253 |
-
|
254 |
-
###### Can I create more than one timeline?
|
255 |
-
At the moment no, but I will consider adding that into a futre update if people show enough interest.
|
256 |
-
|
257 |
-
###### At what width are the breakpoints set?
|
258 |
-
Breakpoints are set at 822px. The timeline will shift/re-adjust automatically using masonry based on the height of each announcement container.
|
259 |
-
|
260 |
-
###### How can I translate this plugin?
|
261 |
-
The text-domain for all gettext functions is `timeline-express`.
|
262 |
-
|
263 |
-
If you enjoy this plugin and want to contribute, I'm always looking for people to help translate the plugin into any of the following languages, credit will be given where credit is due :
|
264 |
-
|
265 |
-
* Arabic
|
266 |
-
* English
|
267 |
-
* Greek
|
268 |
-
* Hebrew
|
269 |
-
* Hindi
|
270 |
-
* Hong Kong
|
271 |
-
* Italian
|
272 |
-
* Japanese
|
273 |
-
* Korean
|
274 |
-
* Persian
|
275 |
-
* Portuguese (European)
|
276 |
-
* Romanian
|
277 |
-
* Russian
|
278 |
-
* Spanish
|
279 |
-
* Swedish
|
280 |
-
* Taiwanese
|
281 |
-
* Tamil
|
282 |
-
* Urdu
|
283 |
-
* Vietnamese
|
284 |
-
* Welsh
|
285 |
-
|
286 |
-
Read the Codex article "[I18n for WordPress Developers]"(http://codex.wordpress.org/I18n_for_WordPress_Developers) for more information.
|
287 |
-
|
288 |
-
### Future Ideas
|
289 |
-
|
290 |
-
Have an idea for a future release feature? I love hearing about new ideas! You can get in contact with me through the contact form on my website, <a href="http://www.evan-herman.com/contact/" target="_blank">Evan-Herman.com</a>.
|
291 |
-
|
292 |
-
|
293 |
-
### Changelog
|
294 |
-
|
295 |
-
###### 1.1.7.6 - October 2nd, 2015
|
296 |
-
* Fixed issue with timeline icons not saving properly, and returning empty on the front end.
|
297 |
-
|
298 |
-
###### 1.1.7.5 - September 28th, 2015
|
299 |
-
* Fixed incorrect name for default icon dropdown.
|
300 |
-
|
301 |
-
###### 1.1.7.4 - September 18th, 2015
|
302 |
-
* Fixed adding custom fields and using an image as an icon (https://gist.github.com/EvanHerman/6bbc8de82f34b4cb3c5c#comments)
|
303 |
-
|
304 |
-
###### 1.1.7.3 - July 15th, 2015
|
305 |
-
* Remove duplicate date picker fields on announcements
|
306 |
-
|
307 |
-
###### 1.1.7.2 - July 14th, 2015
|
308 |
-
* Repair date picker field not being initialized properly
|
309 |
-
|
310 |
-
###### 1.1.7.1 - July 11th, 2015
|
311 |
-
* Update to CMB2
|
312 |
-
* Fix default settings on fresh install
|
313 |
-
* Removed max length on the announcement excerpts
|
314 |
-
* Altered query to query comparison to reflect current date, not date+time (announcements save dates, not date+time)
|
315 |
-
|
316 |
-
###### 1.1.7 - July 10th, 2015
|
317 |
-
* Included hungarian translation - props <a href="http://www.keszites.com/" target="_blank">Zsolt</a>
|
318 |
-
|
319 |
-
######1.1.6.9 - June 22nd, 2015
|
320 |
-
* Remove !important declarations on frontend
|
321 |
-
* Adjusted announcement images to be 100% width
|
322 |
-
|
323 |
-
###### 1.1.6.8 - May 5th, 2015
|
324 |
-
* Fixed incorrect version of font awesome enqueued on front end
|
325 |
-
|
326 |
-
###### 1.1.6.9 - June 22nd, 2015
|
327 |
-
* Remove !important declarations on frontend
|
328 |
-
* Adjusted announcement images to be 100% width
|
329 |
-
* Included hungarian translation - props <a href="" target="_blank">Zsolt</a>
|
330 |
-
|
331 |
-
###### 1.1.6.8 - May 5th, 2015
|
332 |
-
* Fixed incorrect version of font awesome enqueued on front end
|
333 |
-
|
334 |
-
###### 1.1.6.7 - May 4th, 2015
|
335 |
-
* Added new filter to allow for custom images to be used in place of font awesome icons (Props Pete Nelson)
|
336 |
-
|
337 |
-
######1.1.6.6 - April 1st, 2015
|
338 |
-
* Enhancement: reverted to older styles (v1.1.6.4 stylesheet)
|
339 |
-
|
340 |
-
###### 1.1.6.5 - March 31st, 2015
|
341 |
-
* Enhancement: re-wrote part of the CSS file, to allow for native masonry layouts (uniform spacing between containers)
|
342 |
-
* Enhancement: Added `is_ssl()` check to determine if font awesome should be loaded over https or not.
|
343 |
-
* Fixed: Fixed WP_Response error when font-awesome icons are unavailable using `wp_remote_get();`
|
344 |
-
|
345 |
-
###### 1.1.6.4 - March 23rd, 2015
|
346 |
-
* Enhancement: Packaged French translation - thanks goes to Julien Lambert
|
347 |
-
* Enhancement: Fixed a few typos in the plugin
|
348 |
-
|
349 |
-
###### 1.1.6.3 - March 22nd, 2015
|
350 |
-
* Enhancement: Added wp_error class to catch errors thrown by `wp_remote_get()` when building the bootstrap dropdown.
|
351 |
-
|
352 |
-
###### 1.1.6.2 - March 18th, 2015
|
353 |
-
* Enhancement: Removed `add_option();` call which was breaking previously stored options on activation
|
354 |
-
|
355 |
-
###### 1.1.6.1 - March 10th, 2015
|
356 |
-
* Enhancement: Altered new option label to be 'Exclude Announcements from Site Searches' (settings were reversed (true excluded while false included) )
|
357 |
-
|
358 |
-
###### 1.1.6 - March 9th, 2015
|
359 |
-
* Enhancement: Fixed 404 issue on announcement posts when 'Include Announcement in Site Searches' was set to 'false'.
|
360 |
-
|
361 |
-
###### 1.1.5.9 - March 6th, 2015
|
362 |
-
* Enhancement: Added a priority to the metabox initialization, which caused conflicts with other plugins using the same class
|
363 |
-
|
364 |
-
###### 1.1.5.8 - March 5th, 2015
|
365 |
-
* Enhancement: Upgraded font-awesome to 4.3.0
|
366 |
-
* Enhancement: Added icon select dropdown on the settings page, to better mirror the post/page edit screens
|
367 |
-
* Enhancement: Added new setting to toggle Timeline posts from appearing in search queries on the front end (defaults to true)
|
368 |
-
* Enhancement: Packaged German translation - thanks to <a href="http://www.fairsoft.koeln" target="_blank">Martin Gerlach</a>
|
369 |
-
|
370 |
-
###### 1.1.5.7 - February 5th, 2015
|
371 |
-
* Message From The Author: Sorry for multiple updates on the same day. I was feeling ambitious and rolled out one patch to fix an issue and another with some new features. Enjoy :)
|
372 |
-
* Enhancement: Added a dropdown to select the font awesome icon
|
373 |
-
* Enhancement: Fadded in the timeline after everything has initialized, to prevent seeing a messed up Timeline layout
|
374 |
-
|
375 |
-
###### 1.1.5.6 - February 5th, 2015
|
376 |
-
* Fixed: Issue with the excerpt being truncated and throwing off entire timeline layout (issue occured when truncate happened mid html tag , which left a tag open)
|
377 |
-
* Fixed: Wrapped missing text in text domain
|
378 |
-
|
379 |
-
###### 1.1.5.5 - February 1st, 2015
|
380 |
-
* Fixed: Wrapped admin column headers in get text filter
|
381 |
-
* Fixed: Sort orders by announcement date
|
382 |
-
* Enhancement: Added filter to define custom image size for announcement image
|
383 |
-
|
384 |
-
###### 1.1.5.4 - January 19th, 2015
|
385 |
-
* Fixed: Remove unnecessary filter in the main class file
|
386 |
-
|
387 |
-
###### 1.1.5.3 - January 16th, 2015
|
388 |
-
* Fixed: Fixed incorrect date save format
|
389 |
-
|
390 |
-
###### 1.1.5.2 - January 10th, 2015
|
391 |
-
Fixed: Errors thrown from new user fields hook, when no custom fields are defined by the user
|
392 |
-
Fixed: Incorrect date format for new announcements
|
393 |
-
|
394 |
-
###### 1.1.5.1 - January 10th, 2015
|
395 |
-
* Fixed: Data saving incorrectly to the database, causing errors to be thrown on front and back end
|
396 |
-
|
397 |
-
###### 1.1.5 - January 10th, 2015
|
398 |
-
* Enhancement: Added new filter ( `timeline_express_custom_fields` ) which allows users to define their own custom fields to use on Timeline Announcement posts (see readme for example).
|
399 |
-
* Fixed: CMB class file causing conflicts with other plugins, and removed the old version
|
400 |
-
* Fixed: Adjusted a few styles on the announcement post page
|
401 |
-
|
402 |
-
###### 1.1.4.1 - January 2nd, 2015
|
403 |
-
* Fixed: Issue with date storing different on backend vs front end
|
404 |
-
* Fixed: Settings link on the Timeline Express welcome page
|
405 |
-
|
406 |
-
###### 1.1.4 - December 24th, 2014
|
407 |
-
* Enhancement: Implemented premium support licensing. Any issues that require immediate response, or custom code should purchase a support license.
|
408 |
-
* Enhancement: Moved settings/support below Timeline Express parent menu item
|
409 |
-
* Fixed: Errors thrown when announcement images aren't set
|
410 |
-
* Fixed: Display error where announcements displayed a different date on the backend vs frontend
|
411 |
-
* Enhancement: Added a new filter to customize the announcement slug (possibly for SEO purposes) (timeline-express-slug , check documentation for examples)
|
412 |
-
|
413 |
-
###### 1.1.3.2 - December 11th, 2014
|
414 |
-
* Enhancement: Added Dutch language translation (nl_NL) - thanks goes to <a href="http://www.kasteelschaesberg.info/wpress/" target="_blank">Kees Hessels</a>
|
415 |
-
* Fixed: A few typos throughout the plugin
|
416 |
-
|
417 |
-
###### 1.1.3.1 - December 10th, 2014
|
418 |
-
* Enhancement: Added new filter `timeline-express-read-more-class` which allows users to add custom classes to the 'Read More' button
|
419 |
-
* Enhancement: Wrapped 'Read More' in gettext filter, to allow for text to be altered
|
420 |
-
|
421 |
-
###### 1.1.3 - December 6th, 2014
|
422 |
-
* Fixed: Weird query issue with timeline announcements not displaying at proper times
|
423 |
-
* Fixed: Styling issue with announcement date picker calendar arrow
|
424 |
-
* Fixed: Removed all line-breaks and hyphens from the timeline titles
|
425 |
-
|
426 |
-
###### 1.1.2 - December 5th, 2014
|
427 |
-
* Fixed: Minor styling issues with announcement images extending outside the announcement container (added new class to the image .announcement-banner-image)
|
428 |
-
|
429 |
-
###### 1.1.1 - December 4th, 2014
|
430 |
-
* Fixed: Minor styling issues with the mobile timeline icon size/margins
|
431 |
-
* Fixed: Minor styling issues with the mobile timeline announcement arrow appearing 1px to soon
|
432 |
-
* Fixed: Typo of 'Timeline Express' in the admin settings menu
|
433 |
-
|
434 |
-
###### 1.1 - December 3rd, 2014
|
435 |
-
* Fixed: Fixed styles when timeline is inside posts (fixed icon size, duplicate images)
|
436 |
-
* Fixed: Fixed a few enqueue functions
|
437 |
-
* Enhancement: Polish language translation now included (pl_PL) - thanks goes to Kanios
|
438 |
-
* Enhancement: Enqueued new styles on single announcement posts to style the announcement pages a bit better
|
439 |
-
* Enhancement: Added new custom image size, to unify announcement images on the timeline ('timeline-express')
|
440 |
-
* Enhancement: Added new function `timeline_express_get_image_id()` to get attachment image IDs by URL
|
441 |
-
* Enhancement: Stripped out a lot of un-needed code
|
442 |
-
|
443 |
-
###### 1.0.9 - November 19th, 2014
|
444 |
-
* Updated: Localized date format displayed on the front end as requested by our international users ( format now takes on what you have in 'General > Settings' )
|
445 |
-
* Updated: Fixed styling issue on date picker arrows
|
446 |
-
* Feature: Added new filter to allow users to specify a custom date format (`timeline_express_custom_date_format`)
|
447 |
-
|
448 |
-
###### 1.0.8 - November 17th, 2014
|
449 |
-
* Feature: Added a new filter to allow users to load custom template files
|
450 |
-
* Feature: Added auto update feature for Timeline Express
|
451 |
-
* Updated: Single announcement template file, which was causing issues for some users on specific themes
|
452 |
-
* Fixed: Issue where links in the excerpt and 'read more' links couldn't be clicked due to overlapping masonry elements
|
453 |
-
* Fixed: Missing image on welcome page
|
454 |
-
* Fixed: Minor issues on welcome page including some links
|
455 |
-
|
456 |
-
###### 1.0.7 - November 13th, 2014
|
457 |
-
* Enhancement: Portuguese language translation now included (pt_BR) - thanks goes to <a href="http://toborino.com" target="_blank">Gustavo Magalhães</a>
|
458 |
-
|
459 |
-
###### 1.0.6
|
460 |
-
* Repaired fatal error thrown on activation for sites running older versions of PHP
|
461 |
-
|
462 |
-
###### 1.0.5
|
463 |
-
* Change priority argument on register post type function, which caused conflicts with other custom post types on certain sites
|
464 |
-
|
465 |
-
###### 1.0.4
|
466 |
-
* Chinese language translation now included (zh_CN) - thanks goes to <a href="http://www.vahichen.com" target="_blank">Vahi Chen</a>
|
467 |
-
* Removed title and content style declarations for font-size and font-family styles
|
468 |
-
|
469 |
-
###### 1.0.3
|
470 |
-
* Included new function to retain formatting in the announcement excerpt in the timeline (te_wp_trim_words_retain_formatting())
|
471 |
-
|
472 |
-
###### 1.0.2
|
473 |
-
* Add display order setting to specify ascending or descending order of announcements in the timeline
|
474 |
-
* Fixed "cannot access settings page" when clicking on the settings tab when on the settings page already
|
475 |
-
|
476 |
-
###### 1.0.1
|
477 |
-
* Update masonry function to include .imagesLoaded(); to prevent overlapping containers in the timeline
|
478 |
-
|
479 |
-
###### 1.0
|
480 |
-
* Initial Release to the WordPress repository
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/class.timeline-express.php
CHANGED
@@ -896,12 +896,19 @@ if(!class_exists("timelineExpressBase"))
|
|
896 |
|
897 |
$screen = get_current_screen();
|
898 |
$print_styles_on_screen_array = array( 'te_announcements_page_timeline-express-settings' , 'admin_page_timeline-express-welcome' , 'te_announcements_page_timeline-express-support' );
|
899 |
-
|
|
|
|
|
900 |
if ( in_array( $screen->base , $print_styles_on_screen_array ) || $screen->post_type == 'te_announcements' ) {
|
901 |
// Register Styles
|
902 |
wp_enqueue_style( 'timeline-express-css-base', TIMELINE_EXPRESS_URL . 'css/timeline-express-settings.min.css' , array(), '1.0.0', 'all');
|
903 |
-
// enqueue font awesome
|
904 |
-
|
|
|
|
|
|
|
|
|
|
|
905 |
// enqueue bootstrap select/styles
|
906 |
wp_enqueue_script( 'bootstrap-select' , TIMELINE_EXPRESS_URL . 'js/bootstrap-select.js' , array( 'jquery' ) , 'all' );
|
907 |
wp_enqueue_script( 'bootstrap-min' , '//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js' );
|
@@ -1291,18 +1298,24 @@ if(!class_exists("timelineExpressBase"))
|
|
1291 |
public function timeline_express_build_bootstrap_dropdown( $field, $meta ) {
|
1292 |
$screen = get_current_screen();
|
1293 |
$screen_base = $screen->base;
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
|
|
|
|
|
|
|
|
|
|
1305 |
}
|
|
|
1306 |
|
1307 |
// splot the response body, and store the icon classes in a variable
|
1308 |
$split_dat_response = explode( 'icons */' , $response['body'] );
|
@@ -1330,6 +1343,8 @@ if(!class_exists("timelineExpressBase"))
|
|
1330 |
}
|
1331 |
}
|
1332 |
|
|
|
|
|
1333 |
?>
|
1334 |
<script>
|
1335 |
jQuery( document ).ready( function() {
|
896 |
|
897 |
$screen = get_current_screen();
|
898 |
$print_styles_on_screen_array = array( 'te_announcements_page_timeline-express-settings' , 'admin_page_timeline-express-welcome' , 'te_announcements_page_timeline-express-support' );
|
899 |
+
$http = ( is_ssl() ) ? 'https:' : 'http:';
|
900 |
+
$font_awesome_version = apply_filters( 'timeline_express_font_awesome_version', '4.5.0' );
|
901 |
+
|
902 |
if ( in_array( $screen->base , $print_styles_on_screen_array ) || $screen->post_type == 'te_announcements' ) {
|
903 |
// Register Styles
|
904 |
wp_enqueue_style( 'timeline-express-css-base', TIMELINE_EXPRESS_URL . 'css/timeline-express-settings.min.css' , array(), '1.0.0', 'all');
|
905 |
+
// check that we can enqueue font awesome from the CDN before we do so
|
906 |
+
if( wp_remote_get( $http . '//netdna.bootstrapcdn.com/font-awesome/' . $font_awesome_version . '/css/font-awesome.css' ) ) {
|
907 |
+
// enqueue font awesome for use in column display
|
908 |
+
wp_enqueue_style( 'prefix-font-awesome' , $http . '//netdna.bootstrapcdn.com/font-awesome/' . $font_awesome_version . '/css/font-awesome.min.css' , array() , $font_awesome_version );
|
909 |
+
} else {
|
910 |
+
wp_enqueue_style( 'prefix-font-awesome', TIMELINE_EXPRESS_URL . 'lib/icons/css/font-awesome.css', array() , $font_awesome_version );
|
911 |
+
}
|
912 |
// enqueue bootstrap select/styles
|
913 |
wp_enqueue_script( 'bootstrap-select' , TIMELINE_EXPRESS_URL . 'js/bootstrap-select.js' , array( 'jquery' ) , 'all' );
|
914 |
wp_enqueue_script( 'bootstrap-min' , '//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js' );
|
1298 |
public function timeline_express_build_bootstrap_dropdown( $field, $meta ) {
|
1299 |
$screen = get_current_screen();
|
1300 |
$screen_base = $screen->base;
|
1301 |
+
$http = ( is_ssl() ) ? 'http:' : 'https:';
|
1302 |
+
$font_awesome_version = apply_filters( 'timeline_express_font_awesome_version', '4.5.0' );
|
1303 |
+
|
1304 |
+
// Store our response in a transient for faster page loading
|
1305 |
+
if ( false === ( $response = get_transient( 'te_font_awesome_transient' ) ) ) {
|
1306 |
+
// get the icons out of the css file
|
1307 |
+
// based on https or http...
|
1308 |
+
$response = wp_remote_get( $http . '//netdna.bootstrapcdn.com/font-awesome/' . $font_awesome_version . '/css/font-awesome.css' );
|
1309 |
+
|
1310 |
+
if( is_wp_error( $response ) ) {
|
1311 |
+
// load font awesome locally
|
1312 |
+
$response = wp_remote_get( TIMELINE_EXPRESS_URL . 'lib/icons/css/font-awesome.css' );
|
1313 |
+
}
|
1314 |
+
|
1315 |
+
// It wasn't there, so regenerate the data and save the transient
|
1316 |
+
set_transient( 'te_font_awesome_transient', $response );
|
1317 |
}
|
1318 |
+
|
1319 |
|
1320 |
// splot the response body, and store the icon classes in a variable
|
1321 |
$split_dat_response = explode( 'icons */' , $response['body'] );
|
1343 |
}
|
1344 |
}
|
1345 |
|
1346 |
+
|
1347 |
+
|
1348 |
?>
|
1349 |
<script>
|
1350 |
jQuery( document ).ready( function() {
|
lib/cmb_metaboxes/helpers/cmb_Meta_Box_Sanitize.php
DELETED
@@ -1,346 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* CMB field validation
|
5 |
-
* @since 0.0.4
|
6 |
-
*/
|
7 |
-
class cmb_Meta_Box_Sanitize {
|
8 |
-
|
9 |
-
/**
|
10 |
-
* A CMB field object
|
11 |
-
* @var cmb_Meta_Box_field object
|
12 |
-
*/
|
13 |
-
public $field;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Field's $_POST value
|
17 |
-
* @var mixed
|
18 |
-
*/
|
19 |
-
public $value;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Setup our class vars
|
23 |
-
* @since 1.1.0
|
24 |
-
* @param object $field A CMB field object
|
25 |
-
* @param mixed $value Field value
|
26 |
-
*/
|
27 |
-
public function __construct( $field, $value ) {
|
28 |
-
$this->field = $field;
|
29 |
-
$this->value = $value;
|
30 |
-
$this->object_id = cmb_Meta_Box::get_object_id();
|
31 |
-
$this->object_type = cmb_Meta_Box::get_object_type();
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Catchall method if field's 'sanitization_cb' is NOT defined, or field type does not have a corresponding validation method
|
36 |
-
* @since 1.0.0
|
37 |
-
* @param string $name Non-existent method name
|
38 |
-
* @param array $arguments All arguments passed to the method
|
39 |
-
*/
|
40 |
-
public function __call( $name, $arguments ) {
|
41 |
-
list( $value ) = $arguments;
|
42 |
-
return $this->default_sanitization( $value );
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Default fallback sanitization method. Applies filters.
|
47 |
-
* @since 1.0.2
|
48 |
-
* @param mixed $value Meta value
|
49 |
-
*/
|
50 |
-
public function default_sanitization( $value ) {
|
51 |
-
|
52 |
-
// Allow field type validation via filter
|
53 |
-
$updated = apply_filters( 'cmb_validate_'. $this->field->type(), null, $value, $this->object_id, $this->field->args(), $this );
|
54 |
-
|
55 |
-
if ( null !== $updated )
|
56 |
-
return $updated;
|
57 |
-
|
58 |
-
switch ( $this->field->type() ) {
|
59 |
-
case 'wysiwyg':
|
60 |
-
// $value = wp_kses( $value );
|
61 |
-
// break;
|
62 |
-
case 'textarea_small':
|
63 |
-
return $this->textarea( $value );
|
64 |
-
case 'taxonomy_select':
|
65 |
-
case 'taxonomy_radio':
|
66 |
-
case 'taxonomy_multicheck':
|
67 |
-
if ( $this->field->args( 'taxonomy' ) ) {
|
68 |
-
return wp_set_object_terms( $this->object_id, $value, $this->field->args( 'taxonomy' ) );
|
69 |
-
}
|
70 |
-
case 'multicheck':
|
71 |
-
case 'file_list':
|
72 |
-
case 'oembed':
|
73 |
-
// no filtering
|
74 |
-
return $value;
|
75 |
-
default:
|
76 |
-
// Handle repeatable fields array
|
77 |
-
// We'll fallback to 'sanitize_text_field'
|
78 |
-
return is_array( $value ) ? array_map( 'sanitize_text_field', $value ) : call_user_func( 'sanitize_text_field', $value );
|
79 |
-
}
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Simple checkbox validation
|
84 |
-
* @since 1.0.1
|
85 |
-
* @param mixed $val 'on' or false
|
86 |
-
* @return mixed 'on' or false
|
87 |
-
*/
|
88 |
-
public function checkbox( $value ) {
|
89 |
-
return $value === 'on' ? 'on' : false;
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Validate url in a meta value
|
94 |
-
* @since 1.0.1
|
95 |
-
* @param string $value Meta value
|
96 |
-
* @return string Empty string or escaped url
|
97 |
-
*/
|
98 |
-
public function text_url( $value ) {
|
99 |
-
$protocols = $this->field->args( 'protocols' );
|
100 |
-
// for repeatable
|
101 |
-
if ( is_array( $value ) ) {
|
102 |
-
foreach ( $value as $key => $val ) {
|
103 |
-
$value[ $key ] = $val ? esc_url_raw( $val, $protocols ) : $this->field->args( 'default' );
|
104 |
-
}
|
105 |
-
} else {
|
106 |
-
$value = $value ? esc_url_raw( $value, $protocols ) : $this->field->args( 'default' );
|
107 |
-
}
|
108 |
-
|
109 |
-
return $value;
|
110 |
-
}
|
111 |
-
|
112 |
-
public function colorpicker( $value ) {
|
113 |
-
// for repeatable
|
114 |
-
if ( is_array( $value ) ) {
|
115 |
-
$check = $value;
|
116 |
-
$value = array();
|
117 |
-
foreach ( $check as $key => $val ) {
|
118 |
-
if ( $val && '#' != $val ) {
|
119 |
-
$value[ $key ] = esc_attr( $val );
|
120 |
-
}
|
121 |
-
}
|
122 |
-
} else {
|
123 |
-
$value = ! $value || '#' == $value ? '' : esc_attr( $value );
|
124 |
-
}
|
125 |
-
return $value;
|
126 |
-
}
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Validate email in a meta value
|
130 |
-
* @since 1.0.1
|
131 |
-
* @param string $value Meta value
|
132 |
-
* @return string Empty string or validated email
|
133 |
-
*/
|
134 |
-
public function text_email( $value ) {
|
135 |
-
// for repeatable
|
136 |
-
if ( is_array( $value ) ) {
|
137 |
-
foreach ( $value as $key => $val ) {
|
138 |
-
$val = trim( $val );
|
139 |
-
$value[ $key ] = is_email( $val ) ? $val : '';
|
140 |
-
}
|
141 |
-
} else {
|
142 |
-
$value = trim( $value );
|
143 |
-
$value = is_email( $value ) ? $value : '';
|
144 |
-
}
|
145 |
-
|
146 |
-
return $value;
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Validate money in a meta value
|
151 |
-
* @since 1.0.1
|
152 |
-
* @param string $value Meta value
|
153 |
-
* @return string Empty string or validated money value
|
154 |
-
*/
|
155 |
-
public function text_money( $value ) {
|
156 |
-
|
157 |
-
global $wp_locale;
|
158 |
-
|
159 |
-
$search = array( $wp_locale->number_format['thousands_sep'], $wp_locale->number_format['decimal_point'] );
|
160 |
-
$replace = array( '', '.' );
|
161 |
-
|
162 |
-
// for repeatable
|
163 |
-
if ( is_array( $value ) ) {
|
164 |
-
foreach ( $value as $key => $val ) {
|
165 |
-
$value[ $key ] = number_format_i18n( (float) str_ireplace( $search, $replace, $val ), 2 );
|
166 |
-
}
|
167 |
-
} else {
|
168 |
-
$value = number_format_i18n( (float) str_ireplace( $search, $replace, $value ), 2 );
|
169 |
-
}
|
170 |
-
|
171 |
-
return $value;
|
172 |
-
}
|
173 |
-
|
174 |
-
/**
|
175 |
-
* Converts text date to timestamp
|
176 |
-
* @since 1.0.2
|
177 |
-
* @param string $value Meta value
|
178 |
-
* @return string Timestring
|
179 |
-
*/
|
180 |
-
public function text_date_timestamp( $value ) {
|
181 |
-
return is_array( $value ) ? array_map( 'strtotime', $value ) : strtotime( $value );
|
182 |
-
}
|
183 |
-
|
184 |
-
/**
|
185 |
-
* Datetime to timestamp
|
186 |
-
* @since 1.0.1
|
187 |
-
* @param string $value Meta value
|
188 |
-
* @return string Timestring
|
189 |
-
*/
|
190 |
-
public function text_datetime_timestamp( $value, $repeat = false ) {
|
191 |
-
|
192 |
-
$test = is_array( $value ) ? array_filter( $value ) : '';
|
193 |
-
if ( empty( $test ) )
|
194 |
-
return '';
|
195 |
-
|
196 |
-
if ( $repeat_value = $this->_check_repeat( $value, __FUNCTION__, $repeat ) )
|
197 |
-
return $repeat_value;
|
198 |
-
|
199 |
-
$value = strtotime( $value['date'] .' '. $value['time'] );
|
200 |
-
|
201 |
-
if ( $tz_offset = $this->field->field_timezone_offset() )
|
202 |
-
$value += $tz_offset;
|
203 |
-
|
204 |
-
return $value;
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Datetime to imestamp with timezone
|
209 |
-
* @since 1.0.1
|
210 |
-
* @param string $value Meta value
|
211 |
-
* @return string Timestring
|
212 |
-
*/
|
213 |
-
public function text_datetime_timestamp_timezone( $value, $repeat = false ) {
|
214 |
-
|
215 |
-
$test = is_array( $value ) ? array_filter( $value ) : '';
|
216 |
-
if ( empty( $test ) )
|
217 |
-
return '';
|
218 |
-
|
219 |
-
if ( $repeat_value = $this->_check_repeat( $value, __FUNCTION__, $repeat ) )
|
220 |
-
return $repeat_value;
|
221 |
-
|
222 |
-
$tzstring = null;
|
223 |
-
|
224 |
-
if ( is_array( $value ) && array_key_exists( 'timezone', $value ) )
|
225 |
-
$tzstring = $value['timezone'];
|
226 |
-
|
227 |
-
if ( empty( $tzstring ) )
|
228 |
-
$tzstring = cmb_Meta_Box::timezone_string();
|
229 |
-
|
230 |
-
$offset = cmb_Meta_Box::timezone_offset( $tzstring, true );
|
231 |
-
|
232 |
-
if ( substr( $tzstring, 0, 3 ) === 'UTC' )
|
233 |
-
$tzstring = timezone_name_from_abbr( '', $offset, 0 );
|
234 |
-
|
235 |
-
$value = new DateTime( $value['date'] .' '. $value['time'], new DateTimeZone( $tzstring ) );
|
236 |
-
$value = serialize( $value );
|
237 |
-
|
238 |
-
return $value;
|
239 |
-
}
|
240 |
-
|
241 |
-
/**
|
242 |
-
* Sanitize textareas and wysiwyg fields
|
243 |
-
* @since 1.0.1
|
244 |
-
* @param string $value Meta value
|
245 |
-
* @return string Sanitized data
|
246 |
-
*/
|
247 |
-
public function textarea( $value ) {
|
248 |
-
return is_array( $value ) ? array_map( 'wp_kses_post', $value ) : wp_kses_post( $value );
|
249 |
-
}
|
250 |
-
|
251 |
-
/**
|
252 |
-
* Sanitize code textareas
|
253 |
-
* @since 1.0.2
|
254 |
-
* @param string $value Meta value
|
255 |
-
* @return string Sanitized data
|
256 |
-
*/
|
257 |
-
public function textarea_code( $value, $repeat = false ) {
|
258 |
-
if ( $repeat_value = $this->_check_repeat( $value, __FUNCTION__, $repeat ) )
|
259 |
-
return $repeat_value;
|
260 |
-
|
261 |
-
return htmlspecialchars_decode( stripslashes( $value ) );
|
262 |
-
}
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Peforms saving of `file` attachement's ID
|
266 |
-
* @since 1.1.0
|
267 |
-
* @param string $value File url
|
268 |
-
*/
|
269 |
-
public function _save_file_id( $value ) {
|
270 |
-
$group = $this->field->group;
|
271 |
-
$args = $this->field->args();
|
272 |
-
$args['id'] = $args['_id'] . '_id';
|
273 |
-
|
274 |
-
unset( $args['_id'], $args['_name'] );
|
275 |
-
// And get new field object
|
276 |
-
$field = new cmb_Meta_Box_field( $args, $group );
|
277 |
-
$id_key = $field->_id();
|
278 |
-
$id_val_old = $field->escaped_value( 'absint' );
|
279 |
-
|
280 |
-
if ( $group ) {
|
281 |
-
// Check group $_POST data
|
282 |
-
$i = $group->index;
|
283 |
-
$base_id = $group->_id();
|
284 |
-
$id_val = isset( $_POST[ $base_id ][ $i ][ $id_key ] ) ? absint( $_POST[ $base_id ][ $i ][ $id_key ] ) : 0;
|
285 |
-
|
286 |
-
} else {
|
287 |
-
// Check standard $_POST data
|
288 |
-
$id_val = isset( $_POST[ $field->id() ] ) ? $_POST[ $field->id() ] : null;
|
289 |
-
|
290 |
-
}
|
291 |
-
|
292 |
-
// If there is no ID saved yet, try to get it from the url
|
293 |
-
if ( $value && ! $id_val ) {
|
294 |
-
$id_val = cmb_Meta_Box::image_id_from_url( $value );
|
295 |
-
}
|
296 |
-
|
297 |
-
if ( $group ) {
|
298 |
-
return array(
|
299 |
-
'attach_id' => $id_val,
|
300 |
-
'field_id' => $id_key
|
301 |
-
);
|
302 |
-
}
|
303 |
-
|
304 |
-
if ( $id_val && $id_val != $id_val_old ) {
|
305 |
-
return $field->update_data( $id_val );
|
306 |
-
} elseif ( empty( $id_val ) && $id_val_old ) {
|
307 |
-
return $field->remove_data( $old );
|
308 |
-
}
|
309 |
-
}
|
310 |
-
|
311 |
-
/**
|
312 |
-
* Handles saving of attachment post ID and sanitizing file url
|
313 |
-
* @since 1.1.0
|
314 |
-
* @param string $value File url
|
315 |
-
* @return string Sanitized url
|
316 |
-
*/
|
317 |
-
public function file( $value ) {
|
318 |
-
// If NOT specified to NOT save the file ID
|
319 |
-
if ( $this->field->args( 'save_id' ) ) {
|
320 |
-
$id_value = $this->_save_file_id( $value );
|
321 |
-
}
|
322 |
-
$clean = $this->text_url( $value );
|
323 |
-
|
324 |
-
// Return an array with url/id if saving a group field
|
325 |
-
return $this->field->group ? array_merge( array( 'url' => $clean), $id_value ) : $clean;
|
326 |
-
}
|
327 |
-
|
328 |
-
/**
|
329 |
-
* If repeating, loop through and re-apply sanitization method
|
330 |
-
* @since 1.1.0
|
331 |
-
* @param mixed $value Meta value
|
332 |
-
* @param string $method Class method
|
333 |
-
* @param bool $repeat Whether repeating or not
|
334 |
-
* @return mixed Sanitized value
|
335 |
-
*/
|
336 |
-
public function _check_repeat( $value, $method, $repeat ) {
|
337 |
-
if ( $repeat || ! $this->field->args( 'repeatable' ) )
|
338 |
-
return;
|
339 |
-
$new_value = array();
|
340 |
-
foreach ( $value as $iterator => $val ) {
|
341 |
-
$new_value[] = $this->$method( $val, true );
|
342 |
-
}
|
343 |
-
return $new_value;
|
344 |
-
}
|
345 |
-
|
346 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/cmb_metaboxes/helpers/cmb_Meta_Box_Show_Filters.php
DELETED
@@ -1,105 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Show On Filters
|
5 |
-
* Use the 'cmb_show_on' filter to further refine the conditions under which a metabox is displayed.
|
6 |
-
* Below you can limit it by ID and page template
|
7 |
-
*
|
8 |
-
* All methods in this class are automatically filtered
|
9 |
-
*
|
10 |
-
* @since 1.0.0
|
11 |
-
*/
|
12 |
-
class cmb_Meta_Box_Show_Filters {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Add metaboxes for an specific ID
|
16 |
-
* @since 1.0.0
|
17 |
-
* @param bool $display To display or not
|
18 |
-
* @param array $meta_box Metabox config array
|
19 |
-
* @return bool Whether to display this metabox on the current page.
|
20 |
-
*/
|
21 |
-
public static function check_id( $display, $meta_box ) {
|
22 |
-
|
23 |
-
if ( ! isset( $meta_box['show_on']['key'] ) || 'id' !== $meta_box['show_on']['key'] )
|
24 |
-
return $display;
|
25 |
-
|
26 |
-
$object_id = is_admin() ? cmb_Meta_Box::get_object_id() : @get_the_id();
|
27 |
-
|
28 |
-
if ( ! $object_id )
|
29 |
-
return false;
|
30 |
-
|
31 |
-
// If current page id is in the included array, display the metabox
|
32 |
-
return in_array( $object_id, (array) $meta_box['show_on']['value'] );
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Add metaboxes for an specific Page Template
|
37 |
-
* @since 1.0.0
|
38 |
-
* @param bool $display To display or not
|
39 |
-
* @param array $meta_box Metabox config array
|
40 |
-
* @return bool Whether to display this metabox on the current page.
|
41 |
-
*/
|
42 |
-
public static function check_page_template( $display, $meta_box ) {
|
43 |
-
|
44 |
-
if ( ! isset( $meta_box['show_on']['key'] ) || 'page-template' !== $meta_box['show_on']['key'] )
|
45 |
-
return $display;
|
46 |
-
|
47 |
-
$object_id = cmb_Meta_Box::get_object_id();
|
48 |
-
|
49 |
-
if ( ! $object_id || cmb_Meta_Box::get_object_type() !== 'post' )
|
50 |
-
return false;
|
51 |
-
|
52 |
-
// Get current template
|
53 |
-
$current_template = get_post_meta( $object_id, '_wp_page_template', true );
|
54 |
-
|
55 |
-
// See if there's a match
|
56 |
-
if ( $current_template && in_array( $current_template, (array) $meta_box['show_on']['value'] ) )
|
57 |
-
return true;
|
58 |
-
|
59 |
-
return false;
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Only show options-page metaboxes on their options page (but only enforce on the admin side)
|
64 |
-
* @since 1.0.0
|
65 |
-
* @param bool $display To display or not
|
66 |
-
* @param array $meta_box Metabox config array
|
67 |
-
* @return bool Whether to display this metabox on the current page.
|
68 |
-
*/
|
69 |
-
public static function check_admin_page( $display, $meta_box ) {
|
70 |
-
|
71 |
-
// check if this is a 'options-page' metabox
|
72 |
-
if ( ! isset( $meta_box['show_on']['key'] ) || 'options-page' !== $meta_box['show_on']['key'] )
|
73 |
-
return $display;
|
74 |
-
|
75 |
-
// Enforce 'show_on' filter in the admin
|
76 |
-
if ( is_admin() ) {
|
77 |
-
|
78 |
-
// If there is no 'page' query var, our filter isn't applicable
|
79 |
-
if ( ! isset( $_GET['page'] ) )
|
80 |
-
return $display;
|
81 |
-
|
82 |
-
if ( ! isset( $meta_box['show_on']['value'] ) )
|
83 |
-
return false;
|
84 |
-
|
85 |
-
$pages = $meta_box['show_on']['value'];
|
86 |
-
|
87 |
-
if ( is_array( $pages ) ) {
|
88 |
-
foreach ( $pages as $page ) {
|
89 |
-
if ( $_GET['page'] == $page )
|
90 |
-
return true;
|
91 |
-
}
|
92 |
-
} else {
|
93 |
-
if ( $_GET['page'] == $pages )
|
94 |
-
return true;
|
95 |
-
}
|
96 |
-
|
97 |
-
return false;
|
98 |
-
|
99 |
-
}
|
100 |
-
|
101 |
-
// Allow options-page metaboxes to be displayed anywhere on the front-end
|
102 |
-
return true;
|
103 |
-
}
|
104 |
-
|
105 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/cmb_metaboxes/helpers/cmb_Meta_Box_ajax.php
DELETED
@@ -1,203 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* CMB ajax methods
|
5 |
-
* (i.e. a lot of work to get oEmbeds to work with non-post objects)
|
6 |
-
*
|
7 |
-
* @since 0.9.5
|
8 |
-
*/
|
9 |
-
class cmb_Meta_Box_ajax {
|
10 |
-
|
11 |
-
// A single instance of this class.
|
12 |
-
public static $instance = null;
|
13 |
-
// Whether to hijack the oembed cache system
|
14 |
-
public static $hijack = false;
|
15 |
-
public static $object_id = 0;
|
16 |
-
public static $embed_args = array();
|
17 |
-
public static $object_type = 'post';
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Creates or returns an instance of this class.
|
21 |
-
* @since 0.1.0
|
22 |
-
* @return cmb_Meta_Box_ajax A single instance of this class.
|
23 |
-
*/
|
24 |
-
public static function get() {
|
25 |
-
if ( self::$instance === null )
|
26 |
-
self::$instance = new self();
|
27 |
-
|
28 |
-
return self::$instance;
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Handles our oEmbed ajax request
|
33 |
-
* @since 0.9.5
|
34 |
-
* @return object oEmbed embed code | fallback | error message
|
35 |
-
*/
|
36 |
-
public function oembed_handler() {
|
37 |
-
|
38 |
-
// verify our nonce
|
39 |
-
if ( ! ( isset( $_REQUEST['cmb_ajax_nonce'], $_REQUEST['oembed_url'] ) && wp_verify_nonce( $_REQUEST['cmb_ajax_nonce'], 'ajax_nonce' ) ) )
|
40 |
-
die();
|
41 |
-
|
42 |
-
// sanitize our search string
|
43 |
-
$oembed_string = sanitize_text_field( $_REQUEST['oembed_url'] );
|
44 |
-
|
45 |
-
// send back error if empty
|
46 |
-
if ( empty( $oembed_string ) )
|
47 |
-
self::send_result( '<p class="ui-state-error-text">'. __( 'Please Try Again', 'cmb' ) .'</p>', false );
|
48 |
-
|
49 |
-
// Set width of embed
|
50 |
-
$embed_width = isset( $_REQUEST['oembed_width'] ) && intval( $_REQUEST['oembed_width'] ) < 640 ? intval( $_REQUEST['oembed_width'] ) : '640';
|
51 |
-
|
52 |
-
// set url
|
53 |
-
$oembed_url = esc_url( $oembed_string );
|
54 |
-
// set args
|
55 |
-
$embed_args = array( 'width' => $embed_width );
|
56 |
-
|
57 |
-
// Get embed code (or fallback link)
|
58 |
-
$html = self::get_oembed( $oembed_url, $_REQUEST['object_id'], array(
|
59 |
-
'object_type' => isset( $_REQUEST['object_type'] ) ? $_REQUEST['object_type'] : 'post',
|
60 |
-
'oembed_args' => $embed_args,
|
61 |
-
'field_id' => $_REQUEST['field_id'],
|
62 |
-
) );
|
63 |
-
|
64 |
-
self::send_result( $html );
|
65 |
-
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Retrieves oEmbed from url/object ID
|
70 |
-
* @since 0.9.5
|
71 |
-
* @param string $url URL to retrieve oEmbed
|
72 |
-
* @param int $object_id Object ID
|
73 |
-
* @param array $args Arguments for method
|
74 |
-
* @return string html markup with embed or fallback
|
75 |
-
*/
|
76 |
-
public static function get_oembed( $url, $object_id, $args = array() ) {
|
77 |
-
global $wp_embed;
|
78 |
-
|
79 |
-
$oembed_url = esc_url( $url );
|
80 |
-
|
81 |
-
// Sanitize object_id
|
82 |
-
self::$object_id = is_numeric( $object_id ) ? absint( $object_id ) : sanitize_text_field( $object_id );
|
83 |
-
|
84 |
-
$args = wp_parse_args( $args, array(
|
85 |
-
'object_type' => 'post',
|
86 |
-
'oembed_args' => self::$embed_args,
|
87 |
-
'field_id' => false,
|
88 |
-
'cache_key' => false,
|
89 |
-
) );
|
90 |
-
|
91 |
-
self::$embed_args =& $args;
|
92 |
-
|
93 |
-
// set the post_ID so oEmbed won't fail
|
94 |
-
// wp-includes/class-wp-embed.php, WP_Embed::shortcode(), line 162
|
95 |
-
$wp_embed->post_ID = self::$object_id;
|
96 |
-
|
97 |
-
// Special scenario if NOT a post object
|
98 |
-
if ( isset( $args['object_type'] ) && $args['object_type'] != 'post' ) {
|
99 |
-
|
100 |
-
if ( 'options-page' == $args['object_type'] ) {
|
101 |
-
// bogus id to pass some numeric checks
|
102 |
-
// Issue with a VERY large WP install?
|
103 |
-
$wp_embed->post_ID = 1987645321;
|
104 |
-
// Use our own cache key to correspond to this field (vs one cache key per url)
|
105 |
-
$args['cache_key'] = $args['field_id'] .'_cache';
|
106 |
-
}
|
107 |
-
// Ok, we need to hijack the oembed cache system
|
108 |
-
self::$hijack = true;
|
109 |
-
self::$object_type = $args['object_type'];
|
110 |
-
|
111 |
-
// Gets ombed cache from our object's meta (vs postmeta)
|
112 |
-
add_filter( 'get_post_metadata', array( 'cmb_Meta_Box_ajax', 'hijack_oembed_cache_get' ), 10, 3 );
|
113 |
-
// Sets ombed cache in our object's meta (vs postmeta)
|
114 |
-
add_filter( 'update_post_metadata', array( 'cmb_Meta_Box_ajax', 'hijack_oembed_cache_set' ), 10, 4 );
|
115 |
-
|
116 |
-
}
|
117 |
-
|
118 |
-
$embed_args = '';
|
119 |
-
foreach ( $args['oembed_args'] as $key => $val ) {
|
120 |
-
$embed_args .= " $key=\"$val\"";
|
121 |
-
}
|
122 |
-
|
123 |
-
// ping WordPress for an embed
|
124 |
-
$check_embed = $wp_embed->run_shortcode( '[embed'. $embed_args .']'. $oembed_url .'[/embed]' );
|
125 |
-
|
126 |
-
// fallback that WordPress creates when no oEmbed was found
|
127 |
-
$fallback = $wp_embed->maybe_make_link( $oembed_url );
|
128 |
-
|
129 |
-
// Send back our embed
|
130 |
-
if ( $check_embed && $check_embed != $fallback )
|
131 |
-
return '<div class="embed_status">'. $check_embed .'<p class="cmb_remove_wrapper"><a href="#" class="cmb_remove_file_button" rel="'. $args['field_id'] .'">'. __( 'Remove Embed', 'cmb' ) .'</a></p></div>';
|
132 |
-
|
133 |
-
// Otherwise, send back error info that no oEmbeds were found
|
134 |
-
return '<p class="ui-state-error-text">'. sprintf( __( 'No oEmbed Results Found for %s. View more info at', 'cmb' ), $fallback ) .' <a href="http://codex.wordpress.org/Embeds" target="_blank">codex.wordpress.org/Embeds</a>.</p>';
|
135 |
-
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Hijacks retrieving of cached oEmbed.
|
140 |
-
* Returns cached data from relevant object metadata (vs postmeta)
|
141 |
-
*
|
142 |
-
* @since 0.9.5
|
143 |
-
* @param boolean $check Whether to retrieve postmeta or override
|
144 |
-
* @param int $object_id Object ID
|
145 |
-
* @param string $meta_key Object metakey
|
146 |
-
* @return mixed Object's oEmbed cached data
|
147 |
-
*/
|
148 |
-
public static function hijack_oembed_cache_get( $check, $object_id, $meta_key ) {
|
149 |
-
|
150 |
-
if ( ! self::$hijack || ( self::$object_id != $object_id && 1987645321 !== $object_id ) )
|
151 |
-
return $check;
|
152 |
-
|
153 |
-
// get cached data
|
154 |
-
$data = 'options-page' === self::$object_type
|
155 |
-
? cmb_Meta_Box::get_option( self::$object_id, self::$embed_args['cache_key'] )
|
156 |
-
: get_metadata( self::$object_type, self::$object_id, $meta_key, true );
|
157 |
-
|
158 |
-
return $data;
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Hijacks saving of cached oEmbed.
|
163 |
-
* Saves cached data to relevant object metadata (vs postmeta)
|
164 |
-
*
|
165 |
-
* @since 0.9.5
|
166 |
-
* @param boolean $check Whether to continue setting postmeta
|
167 |
-
* @param int $object_id Object ID to get postmeta from
|
168 |
-
* @param string $meta_key Postmeta's key
|
169 |
-
* @param mixed $meta_value Value of the postmeta to be saved
|
170 |
-
* @return boolean Whether to continue setting
|
171 |
-
*/
|
172 |
-
public static function hijack_oembed_cache_set( $check, $object_id, $meta_key, $meta_value ) {
|
173 |
-
if ( ! self::$hijack || ( self::$object_id != $object_id && 1987645321 !== $object_id ) )
|
174 |
-
return $check;
|
175 |
-
|
176 |
-
// Cache the result to our metadata
|
177 |
-
if ( 'options-page' === self::$object_type ) {
|
178 |
-
// Set the option
|
179 |
-
cmb_Meta_Box::update_option( self::$object_id, self::$embed_args['cache_key'], $meta_value, array( 'type' => 'oembed' ) );
|
180 |
-
// Save the option
|
181 |
-
cmb_Meta_Box::save_option( self::$object_id );
|
182 |
-
} else {
|
183 |
-
update_metadata( self::$object_type, self::$object_id, $meta_key, $meta_value );
|
184 |
-
}
|
185 |
-
|
186 |
-
// Anything other than `null` to cancel saving to postmeta
|
187 |
-
return true;
|
188 |
-
}
|
189 |
-
|
190 |
-
/**
|
191 |
-
* Helper to send json encoded response to ajax
|
192 |
-
* @since 0.9.5
|
193 |
-
* @param string $data Data to be shown via ajax
|
194 |
-
* @param boolean $success Success or fail
|
195 |
-
*/
|
196 |
-
public static function send_result( $data, $success = true ) {
|
197 |
-
$found = $success ? 'found' : 'not found';
|
198 |
-
// send back our encoded data
|
199 |
-
echo json_encode( array( 'result' => $data, 'id' => $found ) );
|
200 |
-
die();
|
201 |
-
}
|
202 |
-
|
203 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/cmb_metaboxes/helpers/cmb_Meta_Box_field.php
DELETED
@@ -1,497 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* CMB field class
|
5 |
-
* @since 1.1.0
|
6 |
-
*/
|
7 |
-
class cmb_Meta_Box_field {
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Metabox object id
|
11 |
-
* @var mixed
|
12 |
-
* @since 1.1.0
|
13 |
-
*/
|
14 |
-
public $object_id;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Metabox object type
|
18 |
-
* @var mixed
|
19 |
-
* @since 1.1.0
|
20 |
-
*/
|
21 |
-
public $object_type;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Field arguments
|
25 |
-
* @var mixed
|
26 |
-
* @since 1.1.0
|
27 |
-
*/
|
28 |
-
public $args;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Field group object
|
32 |
-
* @var mixed
|
33 |
-
* @since 1.1.0
|
34 |
-
*/
|
35 |
-
public $group;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Field meta value
|
39 |
-
* @var mixed
|
40 |
-
* @since 1.1.0
|
41 |
-
*/
|
42 |
-
public $value;
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Constructs our field object
|
46 |
-
* @since 1.1.0
|
47 |
-
* @param array $field_args Field arguments
|
48 |
-
* @param array $group_field (optional) Group field object
|
49 |
-
*/
|
50 |
-
public function __construct( $field_args, $group_field = null ) {
|
51 |
-
$this->object_id = cmb_Meta_Box::get_object_id();
|
52 |
-
$this->object_type = cmb_Meta_Box::get_object_type();
|
53 |
-
$this->group = ! empty( $group_field ) ? $group_field : false;
|
54 |
-
$this->args = $this->_set_field_defaults( $field_args );
|
55 |
-
|
56 |
-
// Allow an override for the field's value
|
57 |
-
// (assuming no one would want to save 'cmb_no_override_val' as a value)
|
58 |
-
$this->value = apply_filters( 'cmb_override_meta_value', 'cmb_no_override_val', $this->object_id, $this->args(), $this->object_type, $this );
|
59 |
-
|
60 |
-
// If no override, get our meta
|
61 |
-
$this->value = 'cmb_no_override_val' === $this->value
|
62 |
-
? $this->get_data()
|
63 |
-
: $this->value;
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Non-existent methods fallback to checking for field arguments of the same name
|
68 |
-
* @since 1.1.0
|
69 |
-
* @param string $name Method name
|
70 |
-
* @param array $arguments Array of passed-in arguments
|
71 |
-
* @return mixed Value of field argument
|
72 |
-
*/
|
73 |
-
public function __call( $name, $arguments ) {
|
74 |
-
$key = isset( $arguments[0] ) ? $arguments[0] : false;
|
75 |
-
return $this->args( $name, $key );
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Retrieves the field id
|
80 |
-
* @since 1.1.0
|
81 |
-
* @param boolean $raw Whether to retrieve pre-modidifed id
|
82 |
-
* @return string Field id
|
83 |
-
*/
|
84 |
-
public function id( $raw = false ) {
|
85 |
-
$id = $raw ? '_id' : 'id';
|
86 |
-
return $this->args( $id );
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Get a field argument
|
91 |
-
* @since 1.1.0
|
92 |
-
* @param string $key Argument to check
|
93 |
-
* @param string $key Sub argument to check
|
94 |
-
* @return mixed Argument value or false if non-existent
|
95 |
-
*/
|
96 |
-
public function args( $key = '', $_key = '' ) {
|
97 |
-
$vars = $this->_data( 'args', $key );
|
98 |
-
if ( $_key ) {
|
99 |
-
return isset( $vars[ $_key ] ) ? $vars[ $_key ] : false;
|
100 |
-
}
|
101 |
-
return $vars;
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Get Field's value
|
106 |
-
* @since 1.1.0
|
107 |
-
* @param string $key If value is an array, is used to get array key->value
|
108 |
-
* @return mixed Field value or false if non-existent
|
109 |
-
*/
|
110 |
-
public function value( $key = '' ) {
|
111 |
-
return $this->_data( 'value', $key );
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Retrieve a portion of a field property
|
116 |
-
* @since 1.1.0
|
117 |
-
* @param string $var Field property to check
|
118 |
-
* @param string $key Field property array key to check
|
119 |
-
* @return mixed Queried property value or false
|
120 |
-
*/
|
121 |
-
public function _data( $var, $key = '' ) {
|
122 |
-
$vars = $this->$var;
|
123 |
-
if ( $key ) {
|
124 |
-
return isset( $vars[ $key ] ) ? $vars[ $key ] : false;
|
125 |
-
}
|
126 |
-
return $vars;
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Retrieves metadata/option data
|
131 |
-
* @since 1.0.1
|
132 |
-
* @param string $field_id Meta key/Option array key
|
133 |
-
* @return mixed Meta/Option value
|
134 |
-
*/
|
135 |
-
public function get_data( $field_id = '', $args = array() ) {
|
136 |
-
if ( $field_id ) {
|
137 |
-
$args['field_id'] = $field_id;
|
138 |
-
} else if ( $this->group ) {
|
139 |
-
$args['field_id'] = $this->group->id();
|
140 |
-
}
|
141 |
-
extract( $this->data_args( $args ) );
|
142 |
-
|
143 |
-
$data = 'options-page' === $type
|
144 |
-
? cmb_Meta_Box::get_option( $id, $field_id )
|
145 |
-
: get_metadata( $type, $id, $field_id, ( $single || $repeat ) /* If multicheck this can be multiple values */ );
|
146 |
-
|
147 |
-
if ( $this->group && $data ) {
|
148 |
-
$data = isset( $data[ $this->group->args( 'count' ) ][ $this->args( '_id' ) ] )
|
149 |
-
? $data[ $this->group->args( 'count' ) ][ $this->args( '_id' ) ]
|
150 |
-
: false;
|
151 |
-
}
|
152 |
-
return $data;
|
153 |
-
}
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Updates metadata/option data
|
157 |
-
* @since 1.0.1
|
158 |
-
* @param mixed $value Value to update data with
|
159 |
-
* @param bool $single Whether data is an array (add_metadata)
|
160 |
-
*/
|
161 |
-
public function update_data( $new_value, $single = true ) {
|
162 |
-
extract( $this->data_args( array( 'new_value' => $new_value, 'single' => $single ) ) );
|
163 |
-
|
164 |
-
$new_value = $repeat ? array_values( $new_value ) : $new_value;
|
165 |
-
|
166 |
-
if ( 'options-page' === $type )
|
167 |
-
return cmb_Meta_Box::update_option( $id, $field_id, $new_value, $single );
|
168 |
-
|
169 |
-
if ( ! $single )
|
170 |
-
return add_metadata( $type, $id, $field_id, $new_value, false );
|
171 |
-
|
172 |
-
return update_metadata( $type, $id, $field_id, $new_value );
|
173 |
-
}
|
174 |
-
|
175 |
-
/**
|
176 |
-
* Removes/updates metadata/option data
|
177 |
-
* @since 1.0.1
|
178 |
-
* @param string $old Old value
|
179 |
-
*/
|
180 |
-
public function remove_data( $old = '' ) {
|
181 |
-
extract( $this->data_args() );
|
182 |
-
|
183 |
-
return 'options-page' === $type
|
184 |
-
? cmb_Meta_Box::remove_option( $id, $field_id )
|
185 |
-
: delete_metadata( $type, $id, $field_id, $old );
|
186 |
-
}
|
187 |
-
|
188 |
-
/**
|
189 |
-
* data variables for get/set data methods
|
190 |
-
* @since 1.1.0
|
191 |
-
* @param array $args Override arguments
|
192 |
-
* @return array Updated arguments
|
193 |
-
*/
|
194 |
-
public function data_args( $args = array() ) {
|
195 |
-
$args = wp_parse_args( $args, array(
|
196 |
-
'type' => $this->object_type,
|
197 |
-
'id' => $this->object_id,
|
198 |
-
'field_id' => $this->id( true ),
|
199 |
-
'repeat' => $this->args( 'repeatable' ),
|
200 |
-
'single' => ! $this->args( 'multiple' ),
|
201 |
-
) );
|
202 |
-
return $args;
|
203 |
-
}
|
204 |
-
|
205 |
-
/**
|
206 |
-
* Checks if field has a registered validation callback
|
207 |
-
* @since 1.0.1
|
208 |
-
* @param mixed $meta_value Meta value
|
209 |
-
* @return mixed Possibly validated meta value
|
210 |
-
*/
|
211 |
-
public function sanitization_cb( $meta_value ) {
|
212 |
-
if ( empty( $meta_value ) )
|
213 |
-
return $meta_value;
|
214 |
-
|
215 |
-
// Check if the field has a registered validation callback
|
216 |
-
$cb = $this->maybe_callback( 'sanitization_cb' );
|
217 |
-
if ( false === $cb ) {
|
218 |
-
// If requestion NO validation, return meta value
|
219 |
-
return $meta_value;
|
220 |
-
} elseif ( $cb ) {
|
221 |
-
// Ok, callback is good, let's run it.
|
222 |
-
return call_user_func( $cb, $meta_value, $this->args(), $this );
|
223 |
-
}
|
224 |
-
|
225 |
-
$clean = new cmb_Meta_Box_Sanitize( $this, $meta_value );
|
226 |
-
// Validation via 'cmb_Meta_Box_Sanitize' (with fallback filter)
|
227 |
-
return $clean->{$this->type()}( $meta_value );
|
228 |
-
}
|
229 |
-
|
230 |
-
/**
|
231 |
-
* Checks if field has a callback value
|
232 |
-
* @since 1.0.1
|
233 |
-
* @param string $cb Callback string
|
234 |
-
* @return mixed NULL, false for NO validation, or $cb string if it exists.
|
235 |
-
*/
|
236 |
-
public function maybe_callback( $cb ) {
|
237 |
-
$field_args = $this->args();
|
238 |
-
if ( ! isset( $field_args[ $cb ] ) )
|
239 |
-
return;
|
240 |
-
|
241 |
-
// Check if metabox is requesting NO validation
|
242 |
-
$cb = false !== $field_args[ $cb ] && 'false' !== $field_args[ $cb ] ? $field_args[ $cb ] : false;
|
243 |
-
|
244 |
-
// If requestion NO validation, return false
|
245 |
-
if ( ! $cb )
|
246 |
-
return false;
|
247 |
-
|
248 |
-
if ( is_callable( $cb ) )
|
249 |
-
return $cb;
|
250 |
-
}
|
251 |
-
|
252 |
-
/**
|
253 |
-
* Determine if current type is excempt from escaping
|
254 |
-
* @since 1.1.0
|
255 |
-
* @return bool True if exempt
|
256 |
-
*/
|
257 |
-
public function escaping_exception() {
|
258 |
-
// These types cannot be escaped
|
259 |
-
return in_array( $this->type(), array(
|
260 |
-
'file_list',
|
261 |
-
'multicheck',
|
262 |
-
'text_datetime_timestamp_timezone',
|
263 |
-
) );
|
264 |
-
}
|
265 |
-
|
266 |
-
/**
|
267 |
-
* Determine if current type cannot be repeatable
|
268 |
-
* @since 1.1.0
|
269 |
-
* @param string $type Field type to check
|
270 |
-
* @return bool True if type cannot be repeatable
|
271 |
-
*/
|
272 |
-
public function repeatable_exception( $type ) {
|
273 |
-
// These types cannot be escaped
|
274 |
-
return in_array( $type, array(
|
275 |
-
'file', // Use file_list
|
276 |
-
'radio',
|
277 |
-
'title',
|
278 |
-
'group',
|
279 |
-
// @todo Ajax load wp_editor: http://wordpress.stackexchange.com/questions/51776/how-to-load-wp-editor-through-ajax-jquery
|
280 |
-
'wysiwyg',
|
281 |
-
'checkbox',
|
282 |
-
'radio_inline',
|
283 |
-
'taxonomy_radio',
|
284 |
-
'taxonomy_select',
|
285 |
-
'taxonomy_multicheck',
|
286 |
-
) );
|
287 |
-
}
|
288 |
-
|
289 |
-
/**
|
290 |
-
* Escape the value before output. Defaults to 'esc_attr()'
|
291 |
-
* @since 1.0.1
|
292 |
-
* @param mixed $meta_value Meta value
|
293 |
-
* @param mixed $func Escaping function (if not esc_attr())
|
294 |
-
* @return mixed Final value
|
295 |
-
*/
|
296 |
-
public function escaped_value( $func = 'esc_attr', $meta_value = '' ) {
|
297 |
-
|
298 |
-
if ( isset( $this->escaped_value ) )
|
299 |
-
return $this->escaped_value;
|
300 |
-
|
301 |
-
$meta_value = $meta_value ? $meta_value : $this->value();
|
302 |
-
// Check if the field has a registered escaping callback
|
303 |
-
$cb = $this->maybe_callback( 'escape_cb' );
|
304 |
-
if ( false === $cb || $this->escaping_exception() ) {
|
305 |
-
// If requesting NO escaping, return meta value
|
306 |
-
return ! empty( $meta_value ) ? $meta_value : $this->args( 'default' );
|
307 |
-
} elseif ( $cb ) {
|
308 |
-
// Ok, callback is good, let's run it.
|
309 |
-
return call_user_func( $cb, $meta_value, $this->args(), $this );
|
310 |
-
}
|
311 |
-
|
312 |
-
// Or custom escaping filter can be used
|
313 |
-
$esc = apply_filters( 'cmb_types_esc_'. $this->type(), null, $meta_value, $this->args(), $this );
|
314 |
-
if ( null !== $esc ) {
|
315 |
-
return $esc;
|
316 |
-
}
|
317 |
-
|
318 |
-
// escaping function passed in?
|
319 |
-
$func = $func ? $func : 'esc_attr';
|
320 |
-
$meta_value = ! empty( $meta_value ) ? $meta_value : $this->args( 'default' );
|
321 |
-
|
322 |
-
if ( is_array( $meta_value ) ) {
|
323 |
-
foreach ( $meta_value as $key => $value ) {
|
324 |
-
$meta_value[ $key ] = call_user_func( $func, $value );
|
325 |
-
}
|
326 |
-
} else {
|
327 |
-
$meta_value = call_user_func( $func, $meta_value );
|
328 |
-
}
|
329 |
-
|
330 |
-
$this->escaped_value = $meta_value;
|
331 |
-
return $this->escaped_value;
|
332 |
-
}
|
333 |
-
|
334 |
-
/**
|
335 |
-
* Offset a time value based on timezone
|
336 |
-
* @since 1.0.0
|
337 |
-
* @return string Offset time string
|
338 |
-
*/
|
339 |
-
public function field_timezone_offset() {
|
340 |
-
return cmb_Meta_Box::timezone_offset( $this->field_timezone() );
|
341 |
-
}
|
342 |
-
|
343 |
-
/**
|
344 |
-
* Return timezone string
|
345 |
-
* @since 1.0.0
|
346 |
-
* @return string Timezone string
|
347 |
-
*/
|
348 |
-
public function field_timezone() {
|
349 |
-
|
350 |
-
// Is timezone arg set?
|
351 |
-
if ( $this->args( 'timezone' ) ) {
|
352 |
-
return $this->args( 'timezone' ) ;
|
353 |
-
}
|
354 |
-
// Is there another meta key with a timezone stored as its value we should use?
|
355 |
-
else if ( $this->args( 'timezone_meta_key' ) ) {
|
356 |
-
return $this->get_data( $this->args( 'timezone_meta_key' ) );
|
357 |
-
}
|
358 |
-
|
359 |
-
return false;
|
360 |
-
}
|
361 |
-
|
362 |
-
/**
|
363 |
-
* Render a field row
|
364 |
-
* @since 1.0.0
|
365 |
-
*/
|
366 |
-
public function render_field() {
|
367 |
-
|
368 |
-
// If field is requesting to not be shown on the front-end
|
369 |
-
if ( ! is_admin() && ! $this->args( 'on_front' ) )
|
370 |
-
return;
|
371 |
-
|
372 |
-
// If field is requesting to be conditionally shown
|
373 |
-
if ( is_callable( $this->args( 'show_on_cb' ) ) && ! call_user_func( $this->args( 'show_on_cb' ), $this ) )
|
374 |
-
return;
|
375 |
-
|
376 |
-
$classes = 'cmb-type-'. sanitize_html_class( $this->type() );
|
377 |
-
$classes .= ' cmb_id_'. sanitize_html_class( $this->id() );
|
378 |
-
$classes .= $this->args( 'repeatable' ) ? ' cmb-repeat' : '';
|
379 |
-
// 'inline' flag, or _inline in the field type, set to true
|
380 |
-
$classes .= $this->args( 'inline' ) ? ' cmb-inline' : '';
|
381 |
-
$is_side = 'side' === $this->args( 'context' );
|
382 |
-
|
383 |
-
printf( "<tr class=\"%s\">\n", $classes );
|
384 |
-
|
385 |
-
if ( 'title' == $this->type() || ! $this->args( 'show_names' ) || $is_side ) {
|
386 |
-
echo "\t<td colspan=\"2\">\n";
|
387 |
-
|
388 |
-
if ( ! $this->args( 'show_names' ) || $is_side ) {
|
389 |
-
$style = ! $is_side || 'title' == $this->type() ? ' style="display:none;"' : '';
|
390 |
-
printf( "\n<label%s for=\"%s\">%s</label>\n", $style, $this->id(), $this->args( 'name' ) );
|
391 |
-
}
|
392 |
-
} else {
|
393 |
-
|
394 |
-
$style = 'post' == $this->object_type ? ' style="width:18%"' : '';
|
395 |
-
// $tag = 'side' !== $this->args( 'context' ) ? 'th' : 'p';
|
396 |
-
$tag = 'th';
|
397 |
-
printf( '<%1$s%2$s><label for="%3$s">%4$s</label></%1$s>', $tag, $style, $this->id(), $this->args( 'name' ) );
|
398 |
-
|
399 |
-
echo "\n\t<td>\n";
|
400 |
-
}
|
401 |
-
|
402 |
-
echo $this->args( 'before' );
|
403 |
-
|
404 |
-
$this_type = new cmb_Meta_Box_types( $this );
|
405 |
-
$this_type->render();
|
406 |
-
|
407 |
-
echo $this->args( 'after' );
|
408 |
-
|
409 |
-
echo "\n\t</td>\n</tr>";
|
410 |
-
}
|
411 |
-
|
412 |
-
/**
|
413 |
-
* Replaces a hash key - {#} - with the repeatable count
|
414 |
-
* @since 1.2.0
|
415 |
-
* @param string $value Value to update
|
416 |
-
* @return string Updated value
|
417 |
-
*/
|
418 |
-
public function replace_hash( $value ) {
|
419 |
-
// Replace hash with 1 based count
|
420 |
-
return str_ireplace( '{#}', ( $this->count() + 1 ), $value );
|
421 |
-
}
|
422 |
-
|
423 |
-
/**
|
424 |
-
* Fills in empty field parameters with defaults
|
425 |
-
* @since 1.1.0
|
426 |
-
* @param array $args Metabox field config array
|
427 |
-
*/
|
428 |
-
public function _set_field_defaults( $args ) {
|
429 |
-
|
430 |
-
// Set up blank or default values for empty ones
|
431 |
-
if ( ! isset( $args['name'] ) ) $args['name'] = '';
|
432 |
-
if ( ! isset( $args['desc'] ) ) $args['desc'] = '';
|
433 |
-
if ( ! isset( $args['before'] ) ) $args['before'] = '';
|
434 |
-
if ( ! isset( $args['after'] ) ) $args['after'] = '';
|
435 |
-
if ( ! isset( $args['protocols'] ) ) $args['protocols'] = null;
|
436 |
-
if ( ! isset( $args['description'] ) ) {
|
437 |
-
$args['description'] = isset( $args['desc'] ) ? $args['desc'] : '';
|
438 |
-
}
|
439 |
-
if ( ! isset( $args['default'] ) ) {
|
440 |
-
// Phase out 'std', and use 'default' instead
|
441 |
-
$args['default'] = isset( $args['std'] ) ? $args['std'] : '';
|
442 |
-
}
|
443 |
-
if ( ! isset( $args['preview_size'] ) ) $args['preview_size'] = array( 50, 50 );
|
444 |
-
if ( ! isset( $args['date_format'] ) ) $args['date_format'] = 'm\/d\/Y';
|
445 |
-
if ( ! isset( $args['time_format'] ) ) $args['time_format'] = 'h:i A';
|
446 |
-
// Allow a filter override of the default value
|
447 |
-
$args['default'] = apply_filters( 'cmb_default_filter', $args['default'], $args, $this->object_type, $this->object_type );
|
448 |
-
$args['allow'] = 'file' == $args['type'] && ! isset( $args['allow'] ) ? array( 'url', 'attachment' ) : array();
|
449 |
-
$args['save_id'] = 'file' == $args['type'] && ! ( isset( $args['save_id'] ) && ! $args['save_id'] );
|
450 |
-
// $args['multiple'] = isset( $args['multiple'] ) ? $args['multiple'] : ( 'multicheck' == $args['type'] ? true : false );
|
451 |
-
$args['multiple'] = isset( $args['multiple'] ) ? $args['multiple'] : false;
|
452 |
-
$args['repeatable'] = isset( $args['repeatable'] ) && $args['repeatable'] && ! $this->repeatable_exception( $args['type'] );
|
453 |
-
$args['inline'] = isset( $args['inline'] ) && $args['inline'] || false !== stripos( $args['type'], '_inline' );
|
454 |
-
$args['on_front'] = ! ( isset( $args['on_front'] ) && ! $args['on_front'] );
|
455 |
-
$args['attributes'] = isset( $args['attributes'] ) && is_array( $args['attributes'] ) ? $args['attributes'] : array();
|
456 |
-
$args['options'] = isset( $args['options'] ) && is_array( $args['options'] ) ? $args['options'] : array();
|
457 |
-
|
458 |
-
$args['options'] = 'group' == $args['type'] ? wp_parse_args( $args['options'], array(
|
459 |
-
'add_button' => __( 'Add Group', 'cmb' ),
|
460 |
-
'remove_button' => __( 'Remove Group', 'cmb' ),
|
461 |
-
) ) : $args['options'];
|
462 |
-
|
463 |
-
$args['_id'] = $args['id'];
|
464 |
-
$args['_name'] = $args['id'];
|
465 |
-
|
466 |
-
if ( $this->group ) {
|
467 |
-
$args['id'] = $this->group->args( 'id' ) .'_'. $this->group->args( 'count' ) .'_'. $args['id'];
|
468 |
-
$args['_name'] = $this->group->args( 'id' ) .'['. $this->group->args( 'count' ) .']['. $args['_name'] .']';
|
469 |
-
}
|
470 |
-
|
471 |
-
if ( 'wysiwyg' == $args['type'] ) {
|
472 |
-
$args['id'] = strtolower( str_ireplace( '-', '_', $args['id'] ) );
|
473 |
-
$args['options']['textarea_name'] = $args['_name'];
|
474 |
-
}
|
475 |
-
|
476 |
-
$option_types = array( 'taxonomy_select', 'taxonomy_radio', 'taxonomy_radio_inline' );
|
477 |
-
if ( in_array( $args['type'], $option_types, true ) ) {
|
478 |
-
|
479 |
-
// @todo implemention
|
480 |
-
$args['show_option_all'] = isset( $args['show_option_all'] ) && ! $args['show_option_all'] ? false : true;
|
481 |
-
$args['show_option_none'] = isset( $args['show_option_none'] ) && ! $args['show_option_none'] ? false : true;
|
482 |
-
|
483 |
-
}
|
484 |
-
|
485 |
-
return $args;
|
486 |
-
}
|
487 |
-
|
488 |
-
/**
|
489 |
-
* Updates attributes array values unless they exist from the field config array
|
490 |
-
* @since 1.1.0
|
491 |
-
* @param array $attrs Array of attributes to update
|
492 |
-
*/
|
493 |
-
public function maybe_set_attributes( $attrs = array() ) {
|
494 |
-
return wp_parse_args( $this->args['attributes'], $attrs );
|
495 |
-
}
|
496 |
-
|
497 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/cmb_metaboxes/helpers/cmb_Meta_Box_types.php
DELETED
@@ -1,794 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* CMB field types
|
5 |
-
*
|
6 |
-
* @todo test taxonomy methods with non-post objects
|
7 |
-
* @todo test all methods with non-post objects
|
8 |
-
* @todo Date/Time fields should store date format as data attribute for JS
|
9 |
-
*
|
10 |
-
* @since 1.0.0
|
11 |
-
*/
|
12 |
-
class cmb_Meta_Box_types {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* An iterator value for repeatable fields
|
16 |
-
* @var integer
|
17 |
-
* @since 1.0.0
|
18 |
-
*/
|
19 |
-
public $iterator = 0;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Current field
|
23 |
-
* @var array
|
24 |
-
* @since 1.0.0
|
25 |
-
*/
|
26 |
-
public $field;
|
27 |
-
|
28 |
-
public function __construct( $field ) {
|
29 |
-
$this->field = $field;
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Default fallback. Allows rendering fields via "cmb_render_$name" hook
|
34 |
-
* @since 1.0.0
|
35 |
-
* @param string $name Non-existent method name
|
36 |
-
* @param array $arguments All arguments passed to the method
|
37 |
-
*/
|
38 |
-
public function __call( $name, $arguments ) {
|
39 |
-
// When a non-registered field is called, send it through an action.
|
40 |
-
do_action( "cmb_render_$name", $this->field->args(), $this->field->escaped_value(), $this->field->object_id, $this->field->object_type, $this );
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Render a field (and handle repeatable)
|
45 |
-
* @since 1.1.0
|
46 |
-
*/
|
47 |
-
public function render() {
|
48 |
-
if ( $this->field->args( 'repeatable' ) ) {
|
49 |
-
$this->render_repeatable_field();
|
50 |
-
} else {
|
51 |
-
$this->_render();
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Render a field type
|
57 |
-
* @since 1.1.0
|
58 |
-
*/
|
59 |
-
protected function _render() {
|
60 |
-
echo $this->{$this->field->type()}();
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Checks if we can get a post object, and if so, uses `get_the_terms` which utilizes caching
|
65 |
-
* @since 1.0.2
|
66 |
-
* @return mixed Array of terms on success
|
67 |
-
*/
|
68 |
-
public function get_object_terms() {
|
69 |
-
$object_id = $this->field->object_id;
|
70 |
-
$taxonomy = $this->field->args( 'taxonomy' );
|
71 |
-
|
72 |
-
if ( ! $post = get_post( $object_id ) ) {
|
73 |
-
|
74 |
-
$cache_key = 'cmb-cache-'. $taxonomy .'-'. $object_id;
|
75 |
-
|
76 |
-
// Check cache
|
77 |
-
$cached = $test = get_transient( $cache_key );
|
78 |
-
if ( $cached )
|
79 |
-
return $cached;
|
80 |
-
|
81 |
-
$cached = wp_get_object_terms( $object_id, $taxonomy );
|
82 |
-
// Do our own (minimal) caching. Long enough for a page-load.
|
83 |
-
$set = set_transient( $cache_key, $cached, 60 );
|
84 |
-
return $cached;
|
85 |
-
}
|
86 |
-
|
87 |
-
// WP caches internally so it's better to use
|
88 |
-
return get_the_terms( $post, $taxonomy );
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Determine a file's extension
|
94 |
-
* @since 1.0.0
|
95 |
-
* @param string $file File url
|
96 |
-
* @return string|false File extension or false
|
97 |
-
*/
|
98 |
-
public function get_file_ext( $file ) {
|
99 |
-
$parsed = @parse_url( $file, PHP_URL_PATH );
|
100 |
-
return $parsed ? strtolower( pathinfo( $parsed, PATHINFO_EXTENSION ) ) : false;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Determines if a file has a valid image extension
|
105 |
-
* @since 1.0.0
|
106 |
-
* @param string $file File url
|
107 |
-
* @return bool Whether file has a valid image extension
|
108 |
-
*/
|
109 |
-
public function is_valid_img_ext( $file ) {
|
110 |
-
$file_ext = $this->get_file_ext( $file );
|
111 |
-
|
112 |
-
$this->valid = empty( $this->valid )
|
113 |
-
? (array) apply_filters( 'cmb_valid_img_types', array( 'jpg', 'jpeg', 'png', 'gif', 'ico', 'icon' ) )
|
114 |
-
: $this->valid;
|
115 |
-
|
116 |
-
return ( $file_ext && in_array( $file_ext, $this->valid ) );
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Handles parsing and filtering attributes while preserving any passed in via field config.
|
121 |
-
* @since 1.1.0
|
122 |
-
* @param array $args Override arguments
|
123 |
-
* @param string $element Element for filter
|
124 |
-
* @param array $defaults Default arguments
|
125 |
-
* @return array Parsed and filtered arguments
|
126 |
-
*/
|
127 |
-
public function parse_args( $args, $element, $defaults ) {
|
128 |
-
return wp_parse_args( apply_filters( "cmb_{$element}_attributes", $this->field->maybe_set_attributes( $args ), $this->field, $this ), $defaults );
|
129 |
-
}
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Combines attributes into a string for a form element
|
133 |
-
* @since 1.1.0
|
134 |
-
* @param array $attrs Attributes to concatenate
|
135 |
-
* @param array $attr_exclude Attributes that should NOT be concatenated
|
136 |
-
* @return string String of attributes for form element
|
137 |
-
*/
|
138 |
-
public function concat_attrs( $attrs, $attr_exclude = array() ) {
|
139 |
-
$attributes = '';
|
140 |
-
foreach ( $attrs as $attr => $val ) {
|
141 |
-
if ( ! in_array( $attr, (array) $attr_exclude, true ) )
|
142 |
-
$attributes .= sprintf( ' %s="%s"', $attr, $val );
|
143 |
-
}
|
144 |
-
return $attributes;
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Generates html for an option element
|
149 |
-
* @since 1.1.0
|
150 |
-
* @param string $opt_label Option label
|
151 |
-
* @param string $opt_value Option value
|
152 |
-
* @param mixed $selected Selected attribute if option is selected
|
153 |
-
* @return string Generated option element html
|
154 |
-
*/
|
155 |
-
public function option( $opt_label, $opt_value, $selected ) {
|
156 |
-
return sprintf( "\t".'<option value="%s" %s>%s</option>', $opt_value, selected( $selected, true, false ), $opt_label )."\n";
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Generates options html
|
161 |
-
* @since 1.1.0
|
162 |
-
* @param array $args Optional arguments
|
163 |
-
* @param string $method Method to generate individual option item
|
164 |
-
* @return string Concatenated html options
|
165 |
-
*/
|
166 |
-
public function concat_options( $args = array(), $method = 'list_input' ) {
|
167 |
-
|
168 |
-
$options = (array) $this->field->args( 'options' );
|
169 |
-
$saved_value = $this->field->escaped_value();
|
170 |
-
$value = $saved_value ? $saved_value : $this->field->args( 'default' );
|
171 |
-
|
172 |
-
$_options = ''; $i = 1;
|
173 |
-
foreach ( $options as $option_key => $option ) {
|
174 |
-
|
175 |
-
// Check for the "old" way
|
176 |
-
$opt_label = is_array( $option ) && array_key_exists( 'name', $option ) ? $option['name'] : $option;
|
177 |
-
$opt_value = is_array( $option ) && array_key_exists( 'value', $option ) ? $option['value'] : $option_key;
|
178 |
-
// Check if this option is the value of the input
|
179 |
-
$is_current = $value == $opt_value;
|
180 |
-
|
181 |
-
if ( ! empty( $args ) ) {
|
182 |
-
// Clone args & modify for just this item
|
183 |
-
$this_args = $args;
|
184 |
-
$this_args['value'] = $opt_value;
|
185 |
-
$this_args['label'] = $opt_label;
|
186 |
-
if ( $is_current )
|
187 |
-
$this_args['checked'] = 'checked';
|
188 |
-
|
189 |
-
$_options .= $this->$method( $this_args, $i );
|
190 |
-
} else {
|
191 |
-
$_options .= $this->option( $opt_label, $opt_value, $is_current );
|
192 |
-
}
|
193 |
-
$i++;
|
194 |
-
}
|
195 |
-
return $_options;
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Generates html for list item with input
|
200 |
-
* @since 1.1.0
|
201 |
-
* @param array $args Override arguments
|
202 |
-
* @param int $i Iterator value
|
203 |
-
* @return string Gnerated list item html
|
204 |
-
*/
|
205 |
-
public function list_input( $args = array(), $i ) {
|
206 |
-
$args = $this->parse_args( $args, 'list_input', array(
|
207 |
-
'type' => 'radio',
|
208 |
-
'class' => 'cmb_option',
|
209 |
-
'name' => $this->_name(),
|
210 |
-
'id' => $this->_id( $i ),
|
211 |
-
'value' => $this->field->escaped_value(),
|
212 |
-
'label' => '',
|
213 |
-
) );
|
214 |
-
|
215 |
-
return sprintf( "\t".'<li><input%s/> <label for="%s">%s</label></li>'."\n", $this->concat_attrs( $args, 'label' ), $args['id'], $args['label'] );
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Generates html for list item with checkbox input
|
220 |
-
* @since 1.1.0
|
221 |
-
* @param array $args Override arguments
|
222 |
-
* @param int $i Iterator value
|
223 |
-
* @return string Gnerated list item html
|
224 |
-
*/
|
225 |
-
public function list_input_checkbox( $args, $i ) {
|
226 |
-
unset( $args['selected'] );
|
227 |
-
$saved_value = $this->field->escaped_value();
|
228 |
-
if ( is_array( $saved_value ) && in_array( $args['value'], $saved_value ) ) {
|
229 |
-
$args['checked'] = 'checked';
|
230 |
-
}
|
231 |
-
return $this->list_input( $args, $i );
|
232 |
-
}
|
233 |
-
|
234 |
-
/**
|
235 |
-
* Generates repeatable field table markup
|
236 |
-
* @since 1.0.0
|
237 |
-
*/
|
238 |
-
public function render_repeatable_field() {
|
239 |
-
$table_id = $this->field->id() .'_repeat';
|
240 |
-
|
241 |
-
$this->_desc( true, true );
|
242 |
-
?>
|
243 |
-
|
244 |
-
<table id="<?php echo $table_id; ?>" class="cmb-repeat-table">
|
245 |
-
<tbody>
|
246 |
-
<?php $this->repeatable_rows(); ?>
|
247 |
-
</tbody>
|
248 |
-
</table>
|
249 |
-
<p class="add-row">
|
250 |
-
<a data-selector="<?php echo $table_id; ?>" class="add-row-button button" href="#"><?php _e( 'Add Row', 'cmb' ); ?></a>
|
251 |
-
</p>
|
252 |
-
|
253 |
-
<?php
|
254 |
-
// reset iterator
|
255 |
-
$this->iterator = 0;
|
256 |
-
}
|
257 |
-
|
258 |
-
/**
|
259 |
-
* Generates repeatable field rows
|
260 |
-
* @since 1.1.0
|
261 |
-
*/
|
262 |
-
public function repeatable_rows() {
|
263 |
-
$meta_value = $this->field->escaped_value();
|
264 |
-
// check for default content
|
265 |
-
$default = $this->field->args( 'default' );
|
266 |
-
|
267 |
-
// check for saved data
|
268 |
-
if ( ! empty( $meta_value ) ) {
|
269 |
-
$meta_value = is_array( $meta_value ) ? array_filter( $meta_value ) : $meta_value;
|
270 |
-
$meta_value = ! empty( $meta_value ) ? $meta_value : $default;
|
271 |
-
} else {
|
272 |
-
$meta_value = $default;
|
273 |
-
}
|
274 |
-
|
275 |
-
// Loop value array and add a row
|
276 |
-
if ( ! empty( $meta_value ) ) {
|
277 |
-
foreach ( (array) $meta_value as $val ) {
|
278 |
-
$this->field->escaped_value = $val;
|
279 |
-
$this->repeat_row();
|
280 |
-
$this->iterator++;
|
281 |
-
}
|
282 |
-
} else {
|
283 |
-
// Otherwise add one row
|
284 |
-
$this->repeat_row();
|
285 |
-
}
|
286 |
-
|
287 |
-
// Then add an empty row
|
288 |
-
$this->field->escaped_value = '';
|
289 |
-
$this->iterator = $this->iterator ? $this->iterator : 1;
|
290 |
-
$this->repeat_row( 'empty-row' );
|
291 |
-
}
|
292 |
-
|
293 |
-
/**
|
294 |
-
* Generates a repeatable row's markup
|
295 |
-
* @since 1.1.0
|
296 |
-
* @param string $class Repeatable table row's class
|
297 |
-
*/
|
298 |
-
protected function repeat_row( $class = 'repeat-row' ) {
|
299 |
-
?>
|
300 |
-
|
301 |
-
<tr class="<?php echo $class; ?>">
|
302 |
-
<td>
|
303 |
-
<?php $this->_render(); ?>
|
304 |
-
</td>
|
305 |
-
<td class="remove-row">
|
306 |
-
<a class="button remove-row-button" href="#"><?php _e( 'Remove', 'cmb' ); ?></a>
|
307 |
-
</td>
|
308 |
-
</tr>
|
309 |
-
|
310 |
-
<?php
|
311 |
-
}
|
312 |
-
|
313 |
-
/**
|
314 |
-
* Generates description markup
|
315 |
-
* @since 1.0.0
|
316 |
-
* @param boolean $paragraph Paragraph tag or span
|
317 |
-
* @param boolean $echo Whether to echo description or only return it
|
318 |
-
* @return string Field's description markup
|
319 |
-
*/
|
320 |
-
public function _desc( $paragraph = false, $echo = false ) {
|
321 |
-
// Prevent description from printing multiple times for repeatable fields
|
322 |
-
if ( $this->field->args( 'repeatable' ) || $this->iterator > 0 ) {
|
323 |
-
return '';
|
324 |
-
}
|
325 |
-
$tag = $paragraph ? 'p' : 'span';
|
326 |
-
$desc = "\n<$tag class=\"cmb_metabox_description\">{$this->field->args( 'description' )}</$tag>\n";
|
327 |
-
if ( $echo )
|
328 |
-
echo $desc;
|
329 |
-
return $desc;
|
330 |
-
}
|
331 |
-
|
332 |
-
/**
|
333 |
-
* Generate field name attribute
|
334 |
-
* @since 1.1.0
|
335 |
-
* @param string $suffix For multi-part fields
|
336 |
-
* @return string Name attribute
|
337 |
-
*/
|
338 |
-
public function _name( $suffix = '' ) {
|
339 |
-
return $this->field->args( '_name' ) . ( $this->field->args( 'repeatable' ) ? '['. $this->iterator .']' : '' ) . $suffix;
|
340 |
-
}
|
341 |
-
|
342 |
-
/**
|
343 |
-
* Generate field id attribute
|
344 |
-
* @since 1.1.0
|
345 |
-
* @param string $suffix For multi-part fields
|
346 |
-
* @return string Id attribute
|
347 |
-
*/
|
348 |
-
public function _id( $suffix = '' ) {
|
349 |
-
return $this->field->id() . $suffix . ( $this->field->args( 'repeatable' ) ? '_'. $this->iterator .'" data-iterator="'. $this->iterator : '' );
|
350 |
-
}
|
351 |
-
|
352 |
-
/**
|
353 |
-
* Handles outputting an 'input' element
|
354 |
-
* @since 1.1.0
|
355 |
-
* @param array $args Override arguments
|
356 |
-
* @return string Form input element
|
357 |
-
*/
|
358 |
-
public function input( $args = array() ) {
|
359 |
-
$args = $this->parse_args( $args, 'input', array(
|
360 |
-
'type' => 'text',
|
361 |
-
'class' => 'regular-text',
|
362 |
-
'name' => $this->_name(),
|
363 |
-
'id' => $this->_id(),
|
364 |
-
'value' => $this->field->escaped_value(),
|
365 |
-
'desc' => $this->_desc( true ),
|
366 |
-
) );
|
367 |
-
|
368 |
-
return sprintf( '<input%s/>%s', $this->concat_attrs( $args, 'desc' ), $args['desc'] );
|
369 |
-
}
|
370 |
-
|
371 |
-
/**
|
372 |
-
* Handles outputting an 'textarea' element
|
373 |
-
* @since 1.1.0
|
374 |
-
* @param array $args Override arguments
|
375 |
-
* @return string Form textarea element
|
376 |
-
*/
|
377 |
-
public function textarea( $args = array() ) {
|
378 |
-
$args = $this->parse_args( $args, 'textarea', array(
|
379 |
-
'class' => 'cmb_textarea',
|
380 |
-
'name' => $this->_name(),
|
381 |
-
'id' => $this->_id(),
|
382 |
-
'cols' => 60,
|
383 |
-
'rows' => 10,
|
384 |
-
'value' => $this->field->escaped_value( 'esc_textarea' ),
|
385 |
-
'desc' => $this->_desc( true ),
|
386 |
-
) );
|
387 |
-
return sprintf( '<textarea%s>%s</textarea>%s', $this->concat_attrs( $args, array( 'desc', 'value' ) ), $args['value'], $args['desc'] );
|
388 |
-
}
|
389 |
-
|
390 |
-
/**
|
391 |
-
* Begin Field Types
|
392 |
-
*/
|
393 |
-
|
394 |
-
public function text() {
|
395 |
-
return $this->input();
|
396 |
-
}
|
397 |
-
|
398 |
-
public function text_small() {
|
399 |
-
return $this->input( array( 'class' => 'cmb_text_small', 'desc' => $this->_desc() ) );
|
400 |
-
}
|
401 |
-
|
402 |
-
public function text_medium() {
|
403 |
-
return $this->input( array( 'class' => 'cmb_text_medium', 'desc' => $this->_desc() ) );
|
404 |
-
}
|
405 |
-
|
406 |
-
public function text_email() {
|
407 |
-
return $this->input( array( 'class' => 'cmb_text_email cmb_text_medium', 'type' => 'email' ) );
|
408 |
-
}
|
409 |
-
|
410 |
-
public function text_url() {
|
411 |
-
return $this->input( array( 'class' => 'cmb_text_url cmb_text_medium regular-text', 'value' => $this->field->escaped_value( 'esc_url' ) ) );
|
412 |
-
}
|
413 |
-
|
414 |
-
public function text_date() {
|
415 |
-
return $this->input( array( 'class' => 'cmb_text_small cmb_datepicker', 'desc' => $this->_desc() ) );
|
416 |
-
}
|
417 |
-
|
418 |
-
public function text_time() {
|
419 |
-
return $this->input( array( 'class' => 'cmb_timepicker text_time', 'desc' => $this->_desc() ) );
|
420 |
-
}
|
421 |
-
|
422 |
-
public function text_money() {
|
423 |
-
return ( ! $this->field->args( 'before' ) ? '$ ' : ' ' ) . $this->input( array( 'class' => 'cmb_text_money', 'desc' => $this->_desc() ) );
|
424 |
-
}
|
425 |
-
|
426 |
-
public function textarea_small() {
|
427 |
-
return $this->textarea( array( 'class' => 'cmb_textarea_small', 'rows' => 4 ) );
|
428 |
-
}
|
429 |
-
|
430 |
-
public function textarea_code() {
|
431 |
-
return sprintf( '<pre>%s</pre>', $this->textarea( array( 'class' => 'cmb_textarea_code' ) ) );
|
432 |
-
}
|
433 |
-
|
434 |
-
public function wysiwyg( $args = array() ) {
|
435 |
-
extract( $this->parse_args( $args, 'input', array(
|
436 |
-
'id' => $this->_id(),
|
437 |
-
'value' => $this->field->escaped_value( 'stripslashes' ),
|
438 |
-
'desc' => $this->_desc( true ),
|
439 |
-
'options' => $this->field->args( 'options' ),
|
440 |
-
) ) );
|
441 |
-
|
442 |
-
wp_editor( $value, $id, $options );
|
443 |
-
echo $desc;
|
444 |
-
}
|
445 |
-
|
446 |
-
public function text_date_timestamp() {
|
447 |
-
$meta_value = $this->field->escaped_value();
|
448 |
-
$value = ! empty( $meta_value ) ? date( $this->field->args( 'date_format' ), $meta_value ) : '';
|
449 |
-
return $this->input( array( 'class' => 'cmb_text_small cmb_datepicker', 'value' => $value ) );
|
450 |
-
}
|
451 |
-
|
452 |
-
public function text_datetime_timestamp( $meta_value = '' ) {
|
453 |
-
$desc = '';
|
454 |
-
if ( ! $meta_value ) {
|
455 |
-
$meta_value = $this->field->escaped_value();
|
456 |
-
// This will be used if there is a select_timezone set for this field
|
457 |
-
$tz_offset = $this->field->field_timezone_offset();
|
458 |
-
if ( ! empty( $tz_offset ) ) {
|
459 |
-
$meta_value -= $tz_offset;
|
460 |
-
}
|
461 |
-
$desc = $this->_desc();
|
462 |
-
}
|
463 |
-
|
464 |
-
$inputs = array(
|
465 |
-
$this->input( array(
|
466 |
-
'class' => 'cmb_text_small cmb_datepicker',
|
467 |
-
'name' => $this->_name( '[date]' ),
|
468 |
-
'id' => $this->_id( '_date' ),
|
469 |
-
'value' => ! empty( $meta_value ) ? date( $this->field->args( 'date_format' ), $meta_value ) : '',
|
470 |
-
'desc' => '',
|
471 |
-
) ),
|
472 |
-
$this->input( array(
|
473 |
-
'class' => 'cmb_timepicker text_time',
|
474 |
-
'name' => $this->_name( '[time]' ),
|
475 |
-
'id' => $this->_id( '_time' ),
|
476 |
-
'value' => ! empty( $meta_value ) ? date( $this->field->args( 'time_format' ), $meta_value ) : '',
|
477 |
-
'desc' => $desc,
|
478 |
-
) )
|
479 |
-
);
|
480 |
-
|
481 |
-
return implode( "\n", $inputs );
|
482 |
-
}
|
483 |
-
|
484 |
-
public function text_datetime_timestamp_timezone() {
|
485 |
-
$meta_value = $this->field->escaped_value();
|
486 |
-
$datetime = unserialize( $meta_value );
|
487 |
-
$meta_value = $tzstring = false;
|
488 |
-
|
489 |
-
if ( $datetime && $datetime instanceof DateTime ) {
|
490 |
-
$tz = $datetime->getTimezone();
|
491 |
-
$tzstring = $tz->getName();
|
492 |
-
$meta_value = $datetime->getTimestamp() + $tz->getOffset( new DateTime( 'NOW' ) );
|
493 |
-
}
|
494 |
-
|
495 |
-
$inputs = $this->text_datetime_timestamp( $meta_value );
|
496 |
-
$inputs .= '<select name="'. $this->_name( '[timezone]' ) .'" id="'. $this->_id( '_timezone' ) .'">';
|
497 |
-
$inputs .= wp_timezone_choice( $tzstring );
|
498 |
-
$inputs .= '</select>'. $this->_desc();
|
499 |
-
|
500 |
-
return $inputs;
|
501 |
-
}
|
502 |
-
|
503 |
-
public function select_timezone() {
|
504 |
-
$this->field->args['default'] = $this->field->args( 'default' )
|
505 |
-
? $this->field->args( 'default' )
|
506 |
-
: cmb_Meta_Box::timezone_string();
|
507 |
-
|
508 |
-
$meta_value = $this->field->escaped_value();
|
509 |
-
|
510 |
-
return '<select name="'. $this->_name() .'" id="'. $this->_id() .'">'. wp_timezone_choice( $meta_value ) .'</select>';
|
511 |
-
}
|
512 |
-
|
513 |
-
public function colorpicker() {
|
514 |
-
$meta_value = $this->field->escaped_value();
|
515 |
-
$hex_color = '(([a-fA-F0-9]){3}){1,2}$';
|
516 |
-
if ( preg_match( '/^' . $hex_color . '/i', $meta_value ) ) // Value is just 123abc, so prepend #.
|
517 |
-
$meta_value = '#' . $meta_value;
|
518 |
-
elseif ( ! preg_match( '/^#' . $hex_color . '/i', $meta_value ) ) // Value doesn't match #123abc, so sanitize to just #.
|
519 |
-
$meta_value = "#";
|
520 |
-
|
521 |
-
return $this->input( array( 'class' => 'cmb_colorpicker cmb_text_small', 'value' => $meta_value ) );
|
522 |
-
}
|
523 |
-
|
524 |
-
public function title() {
|
525 |
-
extract( $this->parse_args( array(), 'title', array(
|
526 |
-
'tag' => $this->field->object_type == 'post' ? 'h5' : 'h3',
|
527 |
-
'class' => 'cmb_metabox_title',
|
528 |
-
'name' => $this->field->args( 'name' ),
|
529 |
-
'desc' => $this->_desc( true ),
|
530 |
-
) ) );
|
531 |
-
|
532 |
-
return sprintf( '<%1$s class="%2$s">%3$s</%1$s>%4$s', $tag, $class, $name, $desc );
|
533 |
-
}
|
534 |
-
|
535 |
-
public function select( $args = array() ) {
|
536 |
-
$args = $this->parse_args( $args, 'select', array(
|
537 |
-
'class' => 'cmb_select',
|
538 |
-
'name' => $this->_name(),
|
539 |
-
'id' => $this->_id(),
|
540 |
-
'desc' => $this->_desc( true ),
|
541 |
-
'options' => $this->concat_options(),
|
542 |
-
) );
|
543 |
-
|
544 |
-
$attrs = $this->concat_attrs( $args, array( 'desc', 'options' ) );
|
545 |
-
return sprintf( '<select%s>%s</select>%s', $attrs, $args['options'], $args['desc'] );
|
546 |
-
}
|
547 |
-
|
548 |
-
public function taxonomy_select() {
|
549 |
-
|
550 |
-
$names = $this->get_object_terms();
|
551 |
-
$saved_term = is_wp_error( $names ) || empty( $names ) ? $this->field->args( 'default' ) : $names[0]->slug;
|
552 |
-
$terms = get_terms( $this->field->args( 'taxonomy' ), 'hide_empty=0' );
|
553 |
-
$options = '';
|
554 |
-
|
555 |
-
foreach ( $terms as $term ) {
|
556 |
-
$selected = $saved_term == $term->slug;
|
557 |
-
$options .= $this->option( $term->name, $term->slug, $selected );
|
558 |
-
}
|
559 |
-
|
560 |
-
return $this->select( array( 'options' => $options ) );
|
561 |
-
}
|
562 |
-
|
563 |
-
public function radio( $args = array(), $type = 'radio' ) {
|
564 |
-
extract( $this->parse_args( $args, $type, array(
|
565 |
-
'class' => 'cmb_radio_list cmb_list',
|
566 |
-
'options' => $this->concat_options( array( 'label' => 'test' ) ),
|
567 |
-
'desc' => $this->_desc( true ),
|
568 |
-
) ) );
|
569 |
-
|
570 |
-
return sprintf( '<ul class="%s">%s</ul>%s', $class, $options, $desc );
|
571 |
-
}
|
572 |
-
|
573 |
-
public function radio_inline() {
|
574 |
-
return $this->radio( array(), 'radio_inline' );
|
575 |
-
}
|
576 |
-
|
577 |
-
public function multicheck( $type = 'checkbox' ) {
|
578 |
-
return $this->radio( array( 'class' => 'cmb_checkbox_list cmb_list', 'options' => $this->concat_options( array( 'type' => 'checkbox', 'name' => $this->_name() .'[]' ), 'list_input_checkbox' ) ), $type );
|
579 |
-
}
|
580 |
-
|
581 |
-
public function multicheck_inline() {
|
582 |
-
$this->multicheck( 'multicheck_inline' );
|
583 |
-
}
|
584 |
-
|
585 |
-
public function checkbox() {
|
586 |
-
$meta_value = $this->field->escaped_value();
|
587 |
-
$args = array( 'type' => 'checkbox', 'class' => 'cmb_option cmb_list', 'value' => 'on', 'desc' => '' );
|
588 |
-
if ( ! empty( $meta_value ) ) {
|
589 |
-
$args['checked'] = 'checked';
|
590 |
-
}
|
591 |
-
return sprintf( '%s <label for="%s">%s</label>', $this->input( $args ), $this->_id(), $this->_desc() );
|
592 |
-
}
|
593 |
-
|
594 |
-
public function taxonomy_radio() {
|
595 |
-
$names = $this->get_object_terms();
|
596 |
-
$saved_term = is_wp_error( $names ) || empty( $names ) ? $this->field->args( 'default' ) : $names[0]->slug;
|
597 |
-
$terms = get_terms( $this->field->args( 'taxonomy' ), 'hide_empty=0' );
|
598 |
-
$options = ''; $i = 1;
|
599 |
-
|
600 |
-
if ( ! $terms ) {
|
601 |
-
$options .= '<li><label>'. __( 'No terms', 'cmb' ) .'</label></li>';
|
602 |
-
} else {
|
603 |
-
foreach ( $terms as $term ) {
|
604 |
-
$args = array(
|
605 |
-
'value' => $term->slug,
|
606 |
-
'label' => $term->name,
|
607 |
-
);
|
608 |
-
|
609 |
-
if ( $saved_term == $term->slug ) {
|
610 |
-
$args['checked'] = 'checked';
|
611 |
-
}
|
612 |
-
$options .= $this->list_input( $args, $i );
|
613 |
-
$i++;
|
614 |
-
}
|
615 |
-
}
|
616 |
-
|
617 |
-
return $this->radio( array( 'options' => $options ), 'taxonomy_radio' );
|
618 |
-
}
|
619 |
-
|
620 |
-
public function taxonomy_radio_inline() {
|
621 |
-
$this->taxonomy_radio();
|
622 |
-
}
|
623 |
-
|
624 |
-
public function taxonomy_multicheck() {
|
625 |
-
|
626 |
-
$names = $this->get_object_terms();
|
627 |
-
$saved_terms = is_wp_error( $names ) || empty( $names )
|
628 |
-
? $this->field->args( 'default' )
|
629 |
-
: wp_list_pluck( $names, 'slug' );
|
630 |
-
$terms = get_terms( $this->field->args( 'taxonomy' ), 'hide_empty=0' );
|
631 |
-
$name = $this->_name() .'[]';
|
632 |
-
$options = ''; $i = 1;
|
633 |
-
|
634 |
-
if ( ! $terms ) {
|
635 |
-
$options .= '<li><label>'. __( 'No terms', 'cmb' ) .'</label></li>';
|
636 |
-
} else {
|
637 |
-
|
638 |
-
foreach ( $terms as $term ) {
|
639 |
-
$args = array(
|
640 |
-
'value' => $term->slug,
|
641 |
-
'label' => $term->name,
|
642 |
-
'type' => 'checkbox',
|
643 |
-
'name' => $name,
|
644 |
-
);
|
645 |
-
|
646 |
-
if ( is_array( $saved_terms ) && in_array( $term->slug, $saved_terms ) ) {
|
647 |
-
$args['checked'] = 'checked';
|
648 |
-
}
|
649 |
-
$options .= $this->list_input( $args, $i );
|
650 |
-
$i++;
|
651 |
-
}
|
652 |
-
}
|
653 |
-
|
654 |
-
return $this->radio( array( 'class' => 'cmb_checkbox_list cmb_list', 'options' => $options ), 'taxonomy_multicheck' );
|
655 |
-
}
|
656 |
-
|
657 |
-
public function taxonomy_multicheck_inline() {
|
658 |
-
$this->taxonomy_multicheck();
|
659 |
-
}
|
660 |
-
|
661 |
-
public function file_list() {
|
662 |
-
$meta_value = $this->field->escaped_value();
|
663 |
-
|
664 |
-
$name = $this->_name();
|
665 |
-
|
666 |
-
echo $this->input( array(
|
667 |
-
'type' => 'hidden',
|
668 |
-
'class' => 'cmb_upload_file cmb_upload_list',
|
669 |
-
'size' => 45, 'desc' => '', 'value' => '',
|
670 |
-
) ),
|
671 |
-
$this->input( array(
|
672 |
-
'type' => 'button',
|
673 |
-
'class' => 'cmb_upload_button button cmb_upload_list',
|
674 |
-
'value' => __( 'Add or Upload File', 'cmb' ),
|
675 |
-
'name' => '', 'id' => '',
|
676 |
-
) );
|
677 |
-
|
678 |
-
echo '<ul id="', $this->_id( '_status' ) ,'" class="cmb_media_status attach_list">';
|
679 |
-
|
680 |
-
if ( $meta_value && is_array( $meta_value ) ) {
|
681 |
-
|
682 |
-
foreach ( $meta_value as $id => $fullurl ) {
|
683 |
-
$id_input = $this->input( array(
|
684 |
-
'type' => 'hidden',
|
685 |
-
'value' => $fullurl,
|
686 |
-
'name' => $name .'['. $id .']',
|
687 |
-
'id' => 'filelist-'. $id,
|
688 |
-
'desc' => '', 'class' => '',
|
689 |
-
) );
|
690 |
-
|
691 |
-
if ( $this->is_valid_img_ext( $fullurl ) ) {
|
692 |
-
echo
|
693 |
-
'<li class="img_status">',
|
694 |
-
wp_get_attachment_image( $id, $this->field->args( 'preview_size' ) ),
|
695 |
-
'<p class="cmb_remove_wrapper"><a href="#" class="cmb_remove_file_button">'. __( 'Remove Image', 'cmb' ) .'</a></p>
|
696 |
-
'. $id_input .'
|
697 |
-
</li>';
|
698 |
-
|
699 |
-
} else {
|
700 |
-
$parts = explode( '/', $fullurl );
|
701 |
-
for ( $i = 0; $i < count( $parts ); ++$i ) {
|
702 |
-
$title = $parts[$i];
|
703 |
-
}
|
704 |
-
echo
|
705 |
-
'<li>',
|
706 |
-
__( 'File:', 'cmb' ), ' <strong>', $title, '</strong> (<a href="', $fullurl, '" target="_blank" rel="external">'. __( 'Download', 'cmb' ) .'</a> / <a href="#" class="cmb_remove_file_button">'. __( 'Remove', 'cmb' ) .'</a>)
|
707 |
-
'. $id_input .'
|
708 |
-
</li>';
|
709 |
-
}
|
710 |
-
}
|
711 |
-
}
|
712 |
-
|
713 |
-
echo '</ul>';
|
714 |
-
}
|
715 |
-
|
716 |
-
public function file() {
|
717 |
-
$meta_value = $this->field->escaped_value();
|
718 |
-
$allow = $this->field->args( 'allow' );
|
719 |
-
$input_type = ( 'url' == $allow || ( is_array( $allow ) && in_array( 'url', $allow ) ) )
|
720 |
-
? 'text' : 'hidden';
|
721 |
-
|
722 |
-
echo $this->input( array(
|
723 |
-
'type' => $input_type,
|
724 |
-
'class' => 'cmb_upload_file',
|
725 |
-
'size' => 45,
|
726 |
-
'desc' => '',
|
727 |
-
) ),
|
728 |
-
'<input class="cmb_upload_button button" type="button" value="'. __( 'Add or Upload File', 'cmb' ) .'" />',
|
729 |
-
$this->_desc( true );
|
730 |
-
|
731 |
-
$cached_id = $this->_id();
|
732 |
-
// Reset field args for attachment ID
|
733 |
-
$args = $this->field->args();
|
734 |
-
$args['id'] = $args['_id'] . '_id';
|
735 |
-
unset( $args['_id'], $args['_name'] );
|
736 |
-
|
737 |
-
// And get new field object
|
738 |
-
$this->field = new cmb_Meta_Box_field( $args, $this->field->group );
|
739 |
-
|
740 |
-
// Get ID value
|
741 |
-
$_id_value = $this->field->escaped_value( 'absint' );
|
742 |
-
|
743 |
-
// If there is no ID saved yet, try to get it from the url
|
744 |
-
if ( $meta_value && ! $_id_value ) {
|
745 |
-
$_id_value = cmb_Meta_Box::image_id_from_url( esc_url_raw( $meta_value ) );
|
746 |
-
}
|
747 |
-
|
748 |
-
echo $this->input( array(
|
749 |
-
'type' => 'hidden',
|
750 |
-
'class' => 'cmb_upload_file_id',
|
751 |
-
'value' => $_id_value,
|
752 |
-
'desc' => '',
|
753 |
-
) ),
|
754 |
-
'<div id="', $this->_id( '_status' ) ,'" class="cmb_media_status">';
|
755 |
-
if ( ! empty( $meta_value ) ) {
|
756 |
-
|
757 |
-
if ( $this->is_valid_img_ext( $meta_value ) ) {
|
758 |
-
echo '<div class="img_status">';
|
759 |
-
echo '<img style="max-width: 350px; width: 100%; height: auto;" src="', $meta_value, '" alt="" />';
|
760 |
-
echo '<p class="cmb_remove_wrapper"><a href="#" class="cmb_remove_file_button" rel="', $cached_id, '">'. __( 'Remove Image', 'cmb' ) .'</a></p>';
|
761 |
-
echo '</div>';
|
762 |
-
} else {
|
763 |
-
// $file_ext = $this->get_file_ext( $meta_value );
|
764 |
-
$parts = explode( '/', $meta_value );
|
765 |
-
for ( $i = 0; $i < count( $parts ); ++$i ) {
|
766 |
-
$title = $parts[$i];
|
767 |
-
}
|
768 |
-
echo __( 'File:', 'cmb' ), ' <strong>', $title, '</strong> (<a href="', $meta_value, '" target="_blank" rel="external">'. __( 'Download', 'cmb' ) .'</a> / <a href="#" class="cmb_remove_file_button" rel="', $cached_id, '">'. __( 'Remove', 'cmb' ) .'</a>)';
|
769 |
-
}
|
770 |
-
}
|
771 |
-
echo '</div>';
|
772 |
-
}
|
773 |
-
|
774 |
-
public function oembed() {
|
775 |
-
echo $this->input( array(
|
776 |
-
'class' => 'cmb_oembed regular-text',
|
777 |
-
'data-objectid' => $this->field->object_id,
|
778 |
-
'data-objecttype' => $this->field->object_type
|
779 |
-
) ),
|
780 |
-
'<p class="cmb-spinner spinner" style="display:none;"><img src="'. admin_url( '/images/wpspin_light.gif' ) .'" alt="spinner"/></p>',
|
781 |
-
'<div id="',$this->_id( '_status' ) ,'" class="cmb_media_status ui-helper-clearfix embed_wrap">';
|
782 |
-
|
783 |
-
if ( $meta_value = $this->field->escaped_value() ) {
|
784 |
-
echo cmb_Meta_Box_ajax::get_oembed( $meta_value, $this->field->object_id, array(
|
785 |
-
'object_type' => $this->field->object_type,
|
786 |
-
'oembed_args' => array( 'width' => '640' ),
|
787 |
-
'field_id' => $this->_id(),
|
788 |
-
) );
|
789 |
-
}
|
790 |
-
|
791 |
-
echo '</div>';
|
792 |
-
}
|
793 |
-
|
794 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/cmb_metaboxes/images/ico-delete.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-bg_flat_0_aaaaaa_40x100.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-bg_flat_75_ffffff_40x100.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-bg_glass_55_fbf9ee_1x400.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-bg_glass_65_ffffff_1x400.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-bg_glass_75_dadada_1x400.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-bg_glass_75_e6e6e6_1x400.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-bg_glass_95_fef1ec_1x400.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-bg_highlight-soft_75_cccccc_1x100.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-icons_222222_256x240.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-icons_2e83ff_256x240.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-icons_454545_256x240.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-icons_888888_256x240.png
DELETED
Binary file
|
lib/cmb_metaboxes/images/ui-icons_cd0a0a_256x240.png
DELETED
Binary file
|
lib/cmb_metaboxes/init.php
DELETED
@@ -1,1185 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Script Name: Custom Metaboxes and Fields
|
4 |
-
Contributors: WebDevStudios (@webdevstudios / webdevstudios.com)
|
5 |
-
Justin Sternberg (@jtsternberg / dsgnwrks.pro)
|
6 |
-
Jared Atchison (@jaredatch / jaredatchison.com)
|
7 |
-
Bill Erickson (@billerickson / billerickson.net)
|
8 |
-
Andrew Norcross (@norcross / andrewnorcross.com)
|
9 |
-
Description: This will create metaboxes with custom fields that will blow your mind.
|
10 |
-
Version: 1.2.0
|
11 |
-
*/
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Released under the GPL license
|
15 |
-
* http://www.opensource.org/licenses/gpl-license.php
|
16 |
-
*
|
17 |
-
* This is an add-on for WordPress
|
18 |
-
* http://wordpress.org/
|
19 |
-
*
|
20 |
-
* **********************************************************************
|
21 |
-
* This program is free software; you can redistribute it and/or modify
|
22 |
-
* it under the terms of the GNU General Public License as published by
|
23 |
-
* the Free Software Foundation; either version 2 of the License, or
|
24 |
-
* (at your option) any later version.
|
25 |
-
*
|
26 |
-
* This program is distributed in the hope that it will be useful,
|
27 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
28 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
29 |
-
* GNU General Public License for more details.
|
30 |
-
* **********************************************************************
|
31 |
-
*/
|
32 |
-
|
33 |
-
/************************************************************************
|
34 |
-
You should not edit the code below or things might explode!
|
35 |
-
*************************************************************************/
|
36 |
-
|
37 |
-
// Autoload helper classes
|
38 |
-
spl_autoload_register('cmb_Meta_Box::autoload_helpers');
|
39 |
-
|
40 |
-
$meta_boxes = array();
|
41 |
-
$meta_boxes = apply_filters( 'cmb_meta_boxes', $meta_boxes );
|
42 |
-
foreach ( $meta_boxes as $meta_box ) {
|
43 |
-
$my_box = new cmb_Meta_Box( $meta_box );
|
44 |
-
}
|
45 |
-
|
46 |
-
define( 'CMB_META_BOX_URL', cmb_Meta_Box::get_meta_box_url() );
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Create meta boxes
|
50 |
-
*/
|
51 |
-
class cmb_Meta_Box {
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Current version number
|
55 |
-
* @var string
|
56 |
-
* @since 1.0.0
|
57 |
-
*/
|
58 |
-
const CMB_VERSION = '1.2.0';
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Metabox Config array
|
62 |
-
* @var array
|
63 |
-
* @since 0.9.0
|
64 |
-
*/
|
65 |
-
protected $_meta_box;
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Metabox Defaults
|
69 |
-
* @var array
|
70 |
-
* @since 1.0.1
|
71 |
-
*/
|
72 |
-
protected static $mb_defaults = array(
|
73 |
-
'id' => '',
|
74 |
-
'title' => '',
|
75 |
-
'type' => '',
|
76 |
-
'pages' => array(), // Post type
|
77 |
-
'context' => 'normal',
|
78 |
-
'priority' => 'high',
|
79 |
-
'show_names' => true, // Show field names on the left
|
80 |
-
'show_on' => array( 'key' => false, 'value' => false ), // Specific post IDs or page templates to display this metabox
|
81 |
-
'cmb_styles' => true, // Include cmb bundled stylesheet
|
82 |
-
'fields' => array(),
|
83 |
-
);
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Metabox Form ID
|
87 |
-
* @var string
|
88 |
-
* @since 0.9.4
|
89 |
-
*/
|
90 |
-
protected $form_id = 'post';
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Current field config array
|
94 |
-
* @var array
|
95 |
-
* @since 1.0.0
|
96 |
-
*/
|
97 |
-
public static $field = array();
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Object ID for metabox meta retrieving/saving
|
101 |
-
* @var int
|
102 |
-
* @since 1.0.0
|
103 |
-
*/
|
104 |
-
protected static $object_id = 0;
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Type of object being saved. (e.g., post, user, or comment)
|
108 |
-
* @var string
|
109 |
-
* @since 1.0.0
|
110 |
-
*/
|
111 |
-
protected static $object_type = '';
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Whether scripts/styles have been enqueued yet
|
115 |
-
* @var bool
|
116 |
-
* @since 1.0.0
|
117 |
-
*/
|
118 |
-
protected static $is_enqueued = false;
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Whether CMB nonce has been added to the page. (oly add once)
|
122 |
-
* @var bool
|
123 |
-
* @since 1.2.0
|
124 |
-
*/
|
125 |
-
protected static $nonce_added = false;
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Type of object specified by the metabox Config
|
129 |
-
* @var string
|
130 |
-
* @since 1.0.0
|
131 |
-
*/
|
132 |
-
protected static $mb_object_type = 'post';
|
133 |
-
|
134 |
-
/**
|
135 |
-
* Array of all options from manage-options metaboxes
|
136 |
-
* @var array
|
137 |
-
* @since 1.0.0
|
138 |
-
*/
|
139 |
-
protected static $options = array();
|
140 |
-
|
141 |
-
/**
|
142 |
-
* List of fields that are changed/updated on save
|
143 |
-
* @var array
|
144 |
-
* @since 1.1.0
|
145 |
-
*/
|
146 |
-
protected static $updated = array();
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Get started
|
150 |
-
*/
|
151 |
-
function __construct( $meta_box ) {
|
152 |
-
|
153 |
-
$meta_box = self::set_mb_defaults( $meta_box );
|
154 |
-
|
155 |
-
$allow_frontend = apply_filters( 'cmb_allow_frontend', true, $meta_box );
|
156 |
-
|
157 |
-
if ( ! is_admin() && ! $allow_frontend )
|
158 |
-
return;
|
159 |
-
|
160 |
-
$this->_meta_box = $meta_box;
|
161 |
-
|
162 |
-
self::set_mb_type( $meta_box );
|
163 |
-
|
164 |
-
$types = wp_list_pluck( $meta_box['fields'], 'type' );
|
165 |
-
$upload = in_array( 'file', $types ) || in_array( 'file_list', $types );
|
166 |
-
|
167 |
-
global $pagenow;
|
168 |
-
|
169 |
-
$show_filters = 'cmb_Meta_Box_Show_Filters';
|
170 |
-
foreach ( get_class_methods( $show_filters ) as $filter ) {
|
171 |
-
add_filter( 'cmb_show_on', array( $show_filters, $filter ), 10, 2 );
|
172 |
-
}
|
173 |
-
|
174 |
-
// register our scripts and styles for cmb
|
175 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'register_scripts' ), 8 );
|
176 |
-
|
177 |
-
if ( self::get_object_type() == 'post' ) {
|
178 |
-
add_action( 'admin_menu', array( $this, 'add_metaboxes' ) );
|
179 |
-
add_action( 'add_attachment', array( $this, 'save_post' ) );
|
180 |
-
add_action( 'edit_attachment', array( $this, 'save_post' ) );
|
181 |
-
add_action( 'save_post', array( $this, 'save_post' ), 10, 2 );
|
182 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'do_scripts' ) );
|
183 |
-
|
184 |
-
if ( $upload && in_array( $pagenow, array( 'page.php', 'page-new.php', 'post.php', 'post-new.php' ) ) ) {
|
185 |
-
add_action( 'admin_head', array( $this, 'add_post_enctype' ) );
|
186 |
-
}
|
187 |
-
|
188 |
-
}
|
189 |
-
if ( self::get_object_type() == 'user' ) {
|
190 |
-
|
191 |
-
$priority = 10;
|
192 |
-
if ( isset( $meta_box['priority'] ) ) {
|
193 |
-
if ( is_numeric( $meta_box['priority'] ) )
|
194 |
-
$priority = $meta_box['priority'];
|
195 |
-
elseif ( $meta_box['priority'] == 'high' )
|
196 |
-
$priority = 5;
|
197 |
-
elseif ( $meta_box['priority'] == 'low' )
|
198 |
-
$priority = 20;
|
199 |
-
}
|
200 |
-
add_action( 'show_user_profile', array( $this, 'user_metabox' ), $priority );
|
201 |
-
add_action( 'edit_user_profile', array( $this, 'user_metabox' ), $priority );
|
202 |
-
|
203 |
-
add_action( 'personal_options_update', array( $this, 'save_user' ) );
|
204 |
-
add_action( 'edit_user_profile_update', array( $this, 'save_user' ) );
|
205 |
-
if ( $upload && in_array( $pagenow, array( 'profile.php', 'user-edit.php' ) ) ) {
|
206 |
-
$this->form_id = 'your-profile';
|
207 |
-
add_action( 'admin_head', array( $this, 'add_post_enctype' ) );
|
208 |
-
}
|
209 |
-
}
|
210 |
-
|
211 |
-
}
|
212 |
-
|
213 |
-
/**
|
214 |
-
* Autoloads files with classes when needed
|
215 |
-
* @since 1.0.0
|
216 |
-
* @param string $class_name Name of the class being requested
|
217 |
-
*/
|
218 |
-
public static function autoload_helpers( $class_name ) {
|
219 |
-
if ( class_exists( $class_name, false ) )
|
220 |
-
return;
|
221 |
-
|
222 |
-
// for PHP versions < 5.3
|
223 |
-
$dir = dirname( __FILE__ );
|
224 |
-
|
225 |
-
$file = "$dir/helpers/$class_name.php";
|
226 |
-
if ( file_exists( $file ) )
|
227 |
-
@include( $file );
|
228 |
-
}
|
229 |
-
|
230 |
-
/**
|
231 |
-
* Registers scripts and styles for CMB
|
232 |
-
* @since 1.0.0
|
233 |
-
*/
|
234 |
-
public function register_scripts() {
|
235 |
-
|
236 |
-
// Should only be run once
|
237 |
-
if ( self::$is_enqueued )
|
238 |
-
return;
|
239 |
-
|
240 |
-
global $wp_version;
|
241 |
-
// Only use minified files if SCRIPT_DEBUG is off
|
242 |
-
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
|
243 |
-
|
244 |
-
// scripts required for cmb
|
245 |
-
$scripts = array( 'jquery', 'jquery-ui-core', 'cmb-datepicker', /*'media-upload', */'cmb-timepicker' );
|
246 |
-
// styles required for cmb
|
247 |
-
$styles = array();
|
248 |
-
|
249 |
-
// if we're 3.5 or later, user wp-color-picker
|
250 |
-
if ( 3.5 <= $wp_version ) {
|
251 |
-
$scripts[] = 'wp-color-picker';
|
252 |
-
$styles[] = 'wp-color-picker';
|
253 |
-
if ( ! is_admin() ) {
|
254 |
-
// we need to register colorpicker on the front-end
|
255 |
-
wp_register_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), self::CMB_VERSION );
|
256 |
-
wp_register_script( 'wp-color-picker', admin_url( 'js/color-picker.min.js' ), array( 'iris' ), self::CMB_VERSION );
|
257 |
-
wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', array(
|
258 |
-
'clear' => __( 'Clear' ),
|
259 |
-
'defaultString' => __( 'Default' ),
|
260 |
-
'pick' => __( 'Select Color' ),
|
261 |
-
'current' => __( 'Current Color' ),
|
262 |
-
) );
|
263 |
-
}
|
264 |
-
} else {
|
265 |
-
// otherwise use the older 'farbtastic'
|
266 |
-
$scripts[] = 'farbtastic';
|
267 |
-
$styles[] = 'farbtastic';
|
268 |
-
}
|
269 |
-
wp_register_script( 'cmb-datepicker', CMB_META_BOX_URL . 'js/jquery.datePicker.min.js' );
|
270 |
-
wp_register_script( 'cmb-timepicker', CMB_META_BOX_URL . 'js/jquery.timePicker.min.js' );
|
271 |
-
wp_register_script( 'cmb-scripts', CMB_META_BOX_URL .'js/cmb'. $min .'.js', $scripts, self::CMB_VERSION );
|
272 |
-
|
273 |
-
wp_enqueue_media();
|
274 |
-
|
275 |
-
wp_localize_script( 'cmb-scripts', 'cmb_l10', apply_filters( 'cmb_localized_data', array(
|
276 |
-
'ajax_nonce' => wp_create_nonce( 'ajax_nonce' ),
|
277 |
-
'script_debug' => defined('SCRIPT_DEBUG') && SCRIPT_DEBUG,
|
278 |
-
'new_admin_style' => version_compare( $wp_version, '3.7', '>' ),
|
279 |
-
'object_type' => self::get_object_type(),
|
280 |
-
'upload_file' => 'Use this file',
|
281 |
-
'remove_image' => 'Remove Image',
|
282 |
-
'remove_file' => 'Remove',
|
283 |
-
'file' => 'File:',
|
284 |
-
'download' => 'Download',
|
285 |
-
'ajaxurl' => admin_url( '/admin-ajax.php' ),
|
286 |
-
'up_arrow' => '[ ↑ ] ',
|
287 |
-
'down_arrow' => ' [ ↓ ]',
|
288 |
-
'check_toggle' => __( 'Select / Deselect All', 'cmb' ),
|
289 |
-
) ) );
|
290 |
-
|
291 |
-
wp_register_style( 'cmb-styles', CMB_META_BOX_URL . 'style'. $min .'.css', $styles );
|
292 |
-
|
293 |
-
// Ok, we've enqueued our scripts/styles
|
294 |
-
self::$is_enqueued = true;
|
295 |
-
}
|
296 |
-
|
297 |
-
/**
|
298 |
-
* Enqueues scripts and styles for CMB
|
299 |
-
* @since 1.0.0
|
300 |
-
*/
|
301 |
-
public function do_scripts( $hook ) {
|
302 |
-
// only enqueue our scripts/styles on the proper pages
|
303 |
-
if ( $hook == 'post.php' || $hook == 'post-new.php' || $hook == 'page-new.php' || $hook == 'page.php' ) {
|
304 |
-
wp_enqueue_script( 'cmb-scripts' );
|
305 |
-
|
306 |
-
// default is to show cmb styles on post pages
|
307 |
-
if ( $this->_meta_box['cmb_styles'] )
|
308 |
-
wp_enqueue_style( 'cmb-styles' );
|
309 |
-
}
|
310 |
-
}
|
311 |
-
|
312 |
-
/**
|
313 |
-
* Add encoding attribute
|
314 |
-
*/
|
315 |
-
public function add_post_enctype() {
|
316 |
-
echo '
|
317 |
-
<script type="text/javascript">
|
318 |
-
jQuery(document).ready(function(){
|
319 |
-
jQuery("#'. $this->form_id .'").attr("enctype", "multipart/form-data");
|
320 |
-
jQuery("#'. $this->form_id .'").attr("encoding", "multipart/form-data");
|
321 |
-
});
|
322 |
-
</script>';
|
323 |
-
}
|
324 |
-
|
325 |
-
/**
|
326 |
-
* Add metaboxes (to 'post' object type)
|
327 |
-
*/
|
328 |
-
public function add_metaboxes() {
|
329 |
-
|
330 |
-
foreach ( $this->_meta_box['pages'] as $page ) {
|
331 |
-
if ( apply_filters( 'cmb_show_on', true, $this->_meta_box ) )
|
332 |
-
add_meta_box( $this->_meta_box['id'], $this->_meta_box['title'], array( $this, 'post_metabox' ), $page, $this->_meta_box['context'], $this->_meta_box['priority']) ;
|
333 |
-
}
|
334 |
-
}
|
335 |
-
|
336 |
-
/**
|
337 |
-
* Display metaboxes for a post object
|
338 |
-
* @since 1.0.0
|
339 |
-
*/
|
340 |
-
public function post_metabox() {
|
341 |
-
if ( ! $this->_meta_box )
|
342 |
-
return;
|
343 |
-
|
344 |
-
self::show_form( $this->_meta_box, get_the_ID(), 'post' );
|
345 |
-
|
346 |
-
}
|
347 |
-
|
348 |
-
/**
|
349 |
-
* Display metaboxes for a user object
|
350 |
-
* @since 1.0.0
|
351 |
-
*/
|
352 |
-
public function user_metabox() {
|
353 |
-
if ( ! $this->_meta_box )
|
354 |
-
return;
|
355 |
-
|
356 |
-
if ( 'user' != self::set_mb_type( $this->_meta_box ) )
|
357 |
-
return;
|
358 |
-
|
359 |
-
if ( ! apply_filters( 'cmb_show_on', true, $this->_meta_box ) )
|
360 |
-
return;
|
361 |
-
|
362 |
-
wp_enqueue_script( 'cmb-scripts' );
|
363 |
-
|
364 |
-
// default is to NOT show cmb styles on user profile page
|
365 |
-
if ( $this->_meta_box['cmb_styles'] != false )
|
366 |
-
wp_enqueue_style( 'cmb-styles' );
|
367 |
-
|
368 |
-
self::show_form( $this->_meta_box );
|
369 |
-
|
370 |
-
}
|
371 |
-
|
372 |
-
/**
|
373 |
-
* Loops through and displays fields
|
374 |
-
* @since 1.0.0
|
375 |
-
* @param array $meta_box Metabox config array
|
376 |
-
* @param int $object_id Object ID
|
377 |
-
* @param string $object_type Type of object being saved. (e.g., post, user, or comment)
|
378 |
-
*/
|
379 |
-
public static function show_form( $meta_box, $object_id = 0, $object_type = '' ) {
|
380 |
-
$meta_box = self::set_mb_defaults( $meta_box );
|
381 |
-
// Set/get type
|
382 |
-
$object_type = self::set_object_type( $object_type ? $object_type : self::set_mb_type( $meta_box ) );
|
383 |
-
// Set/get ID
|
384 |
-
$object_id = self::set_object_id( $object_id ? $object_id : self::get_object_id() );
|
385 |
-
|
386 |
-
// Add nonce only once per page.
|
387 |
-
if ( ! self::$nonce_added ) {
|
388 |
-
wp_nonce_field( self::nonce(), 'wp_meta_box_nonce', false, true );
|
389 |
-
self::$nonce_added = true;
|
390 |
-
}
|
391 |
-
|
392 |
-
// Use nonce for verification
|
393 |
-
echo "\n<!-- Begin CMB Fields -->\n";
|
394 |
-
do_action( 'cmb_before_table', $meta_box, $object_id, $object_type );
|
395 |
-
echo '<table class="form-table cmb_metabox">';
|
396 |
-
|
397 |
-
foreach ( $meta_box['fields'] as $field_args ) {
|
398 |
-
|
399 |
-
$field_args['context'] = $meta_box['context'];
|
400 |
-
|
401 |
-
if ( 'group' == $field_args['type'] ) {
|
402 |
-
|
403 |
-
if ( ! isset( $field_args['show_names'] ) ) {
|
404 |
-
$field_args['show_names'] = $meta_box['show_names'];
|
405 |
-
}
|
406 |
-
self::render_group( $field_args );
|
407 |
-
} else {
|
408 |
-
|
409 |
-
$field_args['show_names'] = $meta_box['show_names'];
|
410 |
-
// Render default fields
|
411 |
-
$field = new cmb_Meta_Box_field( $field_args );
|
412 |
-
$field->render_field();
|
413 |
-
}
|
414 |
-
}
|
415 |
-
echo '</table>';
|
416 |
-
do_action( 'cmb_after_table', $meta_box, $object_id, $object_type );
|
417 |
-
echo "\n<!-- End CMB Fields -->\n";
|
418 |
-
|
419 |
-
}
|
420 |
-
|
421 |
-
/**
|
422 |
-
* Render a repeatable group
|
423 |
-
*/
|
424 |
-
public static function render_group( $args ) {
|
425 |
-
if ( ! isset( $args['id'], $args['fields'] ) || ! is_array( $args['fields'] ) )
|
426 |
-
return;
|
427 |
-
|
428 |
-
$args['count'] = 0;
|
429 |
-
$field_group = new cmb_Meta_Box_field( $args );
|
430 |
-
$desc = $field_group->args( 'description' );
|
431 |
-
$label = $field_group->args( 'name' );
|
432 |
-
$sortable = $field_group->options( 'sortable' ) ? ' sortable' : '';
|
433 |
-
$group_val = (array) $field_group->value();
|
434 |
-
$nrows = count( $group_val );
|
435 |
-
$remove_disabled = $nrows <= 1 ? 'disabled="disabled" ' : '';
|
436 |
-
|
437 |
-
echo '<tr><td colspan="2"><table id="', $field_group->id(), '_repeat" class="repeatable-group'. $sortable .'" style="width:100%;">';
|
438 |
-
if ( $desc || $label ) {
|
439 |
-
echo '<tr><th>';
|
440 |
-
if ( $label )
|
441 |
-
echo '<h2 class="cmb-group-name">'. $label .'</h2>';
|
442 |
-
if ( $desc )
|
443 |
-
echo '<p class="cmb_metabox_description">'. $desc .'</p>';
|
444 |
-
echo '</th></tr>';
|
445 |
-
}
|
446 |
-
|
447 |
-
if ( ! empty( $group_val ) ) {
|
448 |
-
|
449 |
-
foreach ( $group_val as $iterator => $field_id ) {
|
450 |
-
self::render_group_row( $field_group, $remove_disabled );
|
451 |
-
}
|
452 |
-
} else {
|
453 |
-
self::render_group_row( $field_group, $remove_disabled );
|
454 |
-
}
|
455 |
-
|
456 |
-
echo '<tr><td><p class="add-row"><button data-selector="', $field_group->id() ,'_repeat" data-grouptitle="', $field_group->options( 'group_title' ) ,'" class="add-group-row button">'. $field_group->options( 'add_button' ) .'</button></p></td></tr>';
|
457 |
-
|
458 |
-
echo '</table></td></tr>';
|
459 |
-
|
460 |
-
}
|
461 |
-
|
462 |
-
public static function render_group_row( $field_group, $remove_disabled ) {
|
463 |
-
|
464 |
-
echo '
|
465 |
-
<tr class="repeatable-grouping" data-iterator="'. $field_group->count() .'">
|
466 |
-
<td>
|
467 |
-
<table class="cmb-nested-table" style="width: 100%;">';
|
468 |
-
if ( $field_group->options( 'group_title' ) ) {
|
469 |
-
echo '
|
470 |
-
<tr class="cmb-group-title">
|
471 |
-
<th colspan="2">
|
472 |
-
', sprintf( '<h4>%1$s</h4>', $field_group->replace_hash( $field_group->options( 'group_title' ) ) ), '
|
473 |
-
<th>
|
474 |
-
</tr>
|
475 |
-
';
|
476 |
-
}
|
477 |
-
// Render repeatable group fields
|
478 |
-
foreach ( array_values( $field_group->args( 'fields' ) ) as $field_args ) {
|
479 |
-
$field_args['show_names'] = $field_group->args( 'show_names' );
|
480 |
-
$field_args['context'] = $field_group->args( 'context' );
|
481 |
-
$field = new cmb_Meta_Box_field( $field_args, $field_group );
|
482 |
-
$field->render_field();
|
483 |
-
}
|
484 |
-
echo '
|
485 |
-
<tr>
|
486 |
-
<td class="remove-row" colspan="2">
|
487 |
-
<button '. $remove_disabled .'data-selector="'. $field_group->id() .'_repeat" class="button remove-group-row alignright">'. $field_group->options( 'remove_button' ) .'</button>
|
488 |
-
</td>
|
489 |
-
</tr>
|
490 |
-
</table>
|
491 |
-
</td>
|
492 |
-
</tr>
|
493 |
-
';
|
494 |
-
|
495 |
-
$field_group->args['count']++;
|
496 |
-
}
|
497 |
-
|
498 |
-
/**
|
499 |
-
* Save data from metabox
|
500 |
-
*/
|
501 |
-
public function save_post( $post_id, $post = false ) {
|
502 |
-
|
503 |
-
$post_type = $post ? $post->post_type : get_post_type( $post_id );
|
504 |
-
|
505 |
-
// check permissions
|
506 |
-
if (
|
507 |
-
// check nonce
|
508 |
-
! isset( $_POST['wp_meta_box_nonce'] )
|
509 |
-
|| ! wp_verify_nonce( $_POST['wp_meta_box_nonce'], self::nonce() )
|
510 |
-
// check if autosave
|
511 |
-
|| defined('DOING_AUTOSAVE' ) && DOING_AUTOSAVE
|
512 |
-
// check user editing permissions
|
513 |
-
|| ( 'page' == $_POST['post_type'] && ! current_user_can( 'edit_page', $post_id ) )
|
514 |
-
|| ! current_user_can( 'edit_post', $post_id )
|
515 |
-
// get the metabox post_types & compare it to this post_type
|
516 |
-
|| ! in_array( $post_type, $this->_meta_box['pages'] )
|
517 |
-
)
|
518 |
-
return $post_id;
|
519 |
-
|
520 |
-
self::save_fields( $this->_meta_box, $post_id, 'post' );
|
521 |
-
}
|
522 |
-
|
523 |
-
/**
|
524 |
-
* Save data from metabox
|
525 |
-
*/
|
526 |
-
public function save_user( $user_id ) {
|
527 |
-
|
528 |
-
// check permissions
|
529 |
-
// @todo more hardening?
|
530 |
-
if (
|
531 |
-
// check nonce
|
532 |
-
! isset( $_POST['wp_meta_box_nonce'] )
|
533 |
-
|| ! wp_verify_nonce( $_POST['wp_meta_box_nonce'], self::nonce() )
|
534 |
-
)
|
535 |
-
return $user_id;
|
536 |
-
|
537 |
-
self::save_fields( $this->_meta_box, $user_id, 'user' );
|
538 |
-
}
|
539 |
-
|
540 |
-
/**
|
541 |
-
* Loops through and saves field data
|
542 |
-
* @since 1.0.0
|
543 |
-
* @param array $meta_box Metabox config array
|
544 |
-
* @param int $object_id Object ID
|
545 |
-
* @param string $object_type Type of object being saved. (e.g., post, user, or comment)
|
546 |
-
*/
|
547 |
-
public static function save_fields( $meta_box, $object_id, $object_type = '' ) {
|
548 |
-
$meta_box = self::set_mb_defaults( $meta_box );
|
549 |
-
|
550 |
-
$meta_box['show_on'] = empty( $meta_box['show_on'] ) ? array( 'key' => false, 'value' => false ) : $meta_box['show_on'];
|
551 |
-
|
552 |
-
self::set_object_id( $object_id );
|
553 |
-
// Set/get type
|
554 |
-
$object_type = self::set_object_type( $object_type ? $object_type : self::set_mb_type( $meta_box ) );
|
555 |
-
|
556 |
-
if ( ! apply_filters( 'cmb_show_on', true, $meta_box ) )
|
557 |
-
return;
|
558 |
-
|
559 |
-
// save field ids of those that are updated
|
560 |
-
self::$updated = array();
|
561 |
-
|
562 |
-
foreach ( $meta_box['fields'] as $field_args ) {
|
563 |
-
|
564 |
-
if ( 'group' == $field_args['type'] ) {
|
565 |
-
self::save_group( $field_args );
|
566 |
-
} else {
|
567 |
-
// Save default fields
|
568 |
-
$field = new cmb_Meta_Box_field( $field_args );
|
569 |
-
self::save_field( self::sanitize_field( $field ), $field );
|
570 |
-
}
|
571 |
-
|
572 |
-
}
|
573 |
-
|
574 |
-
// If options page, save the updated options
|
575 |
-
if ( $object_type == 'options-page' )
|
576 |
-
self::save_option( $object_id );
|
577 |
-
|
578 |
-
do_action( "cmb_save_{$object_type}_fields", $object_id, $meta_box['id'], self::$updated, $meta_box );
|
579 |
-
|
580 |
-
}
|
581 |
-
|
582 |
-
/**
|
583 |
-
* Save a repeatable group
|
584 |
-
*/
|
585 |
-
public static function save_group( $args ) {
|
586 |
-
if ( ! isset( $args['id'], $args['fields'], $_POST[ $args['id'] ] ) || ! is_array( $args['fields'] ) )
|
587 |
-
return;
|
588 |
-
|
589 |
-
$field_group = new cmb_Meta_Box_field( $args );
|
590 |
-
$base_id = $field_group->id();
|
591 |
-
$old = $field_group->get_data();
|
592 |
-
$group_vals = $_POST[ $base_id ];
|
593 |
-
$saved = array();
|
594 |
-
$is_updated = false;
|
595 |
-
$field_group->index = 0;
|
596 |
-
|
597 |
-
// $group_vals[0]['color'] = '333';
|
598 |
-
foreach ( array_values( $field_group->fields() ) as $field_args ) {
|
599 |
-
$field = new cmb_Meta_Box_field( $field_args, $field_group );
|
600 |
-
$sub_id = $field->id( true );
|
601 |
-
|
602 |
-
foreach ( (array) $group_vals as $field_group->index => $post_vals ) {
|
603 |
-
|
604 |
-
// Get value
|
605 |
-
$new_val = isset( $group_vals[ $field_group->index ][ $sub_id ] )
|
606 |
-
? $group_vals[ $field_group->index ][ $sub_id ]
|
607 |
-
: false;
|
608 |
-
|
609 |
-
// Sanitize
|
610 |
-
$new_val = self::sanitize_field( $field, $new_val, $field_group->index );
|
611 |
-
|
612 |
-
if ( 'file' == $field->type() && is_array( $new_val ) ) {
|
613 |
-
// Add image ID to the array stack
|
614 |
-
$saved[ $field_group->index ][ $new_val['field_id'] ] = $new_val['attach_id'];
|
615 |
-
// Reset var to url string
|
616 |
-
$new_val = $new_val['url'];
|
617 |
-
}
|
618 |
-
|
619 |
-
// Get old value
|
620 |
-
$old_val = is_array( $old ) && isset( $old[ $field_group->index ][ $sub_id ] )
|
621 |
-
? $old[ $field_group->index ][ $sub_id ]
|
622 |
-
: false;
|
623 |
-
|
624 |
-
$is_updated = ( ! empty( $new_val ) && $new_val != $old_val );
|
625 |
-
$is_removed = ( empty( $new_val ) && ! empty( $old_val ) );
|
626 |
-
// Compare values and add to `$updated` array
|
627 |
-
if ( $is_updated || $is_removed )
|
628 |
-
self::$updated[] = $base_id .'::'. $field_group->index .'::'. $sub_id;
|
629 |
-
|
630 |
-
// Add to `$saved` array
|
631 |
-
$saved[ $field_group->index ][ $sub_id ] = $new_val;
|
632 |
-
|
633 |
-
}
|
634 |
-
$saved[ $field_group->index ] = array_filter( $saved[ $field_group->index ] );
|
635 |
-
}
|
636 |
-
$saved = array_filter( $saved );
|
637 |
-
|
638 |
-
$field_group->update_data( $saved, true );
|
639 |
-
}
|
640 |
-
|
641 |
-
public static function sanitize_field( $field, $new_value = null ) {
|
642 |
-
|
643 |
-
$new_value = null !== $new_value
|
644 |
-
? $new_value
|
645 |
-
: ( isset( $_POST[ $field->id( true ) ] ) ? $_POST[ $field->id( true ) ] : null );
|
646 |
-
|
647 |
-
if ( $field->args( 'repeatable' ) && is_array( $new_value ) ) {
|
648 |
-
// Remove empties
|
649 |
-
$new_value = array_filter( $new_value );
|
650 |
-
}
|
651 |
-
|
652 |
-
// Check if this metabox field has a registered validation callback, or perform default sanitization
|
653 |
-
return $field->sanitization_cb( $new_value );
|
654 |
-
}
|
655 |
-
|
656 |
-
public static function save_field( $new_value, $field ) {
|
657 |
-
$name = $field->id();
|
658 |
-
$old = $field->get_data();
|
659 |
-
|
660 |
-
// if ( $field->args( 'multiple' ) && ! $field->args( 'repeatable' ) && ! $field->group ) {
|
661 |
-
// $field->remove_data();
|
662 |
-
// if ( ! empty( $new_value ) ) {
|
663 |
-
// foreach ( $new_value as $add_new ) {
|
664 |
-
// self::$updated[] = $name;
|
665 |
-
// $field->update_data( $add_new, $name, false );
|
666 |
-
// }
|
667 |
-
// }
|
668 |
-
// } else
|
669 |
-
if ( ! empty( $new_value ) && $new_value != $old ) {
|
670 |
-
self::$updated[] = $name;
|
671 |
-
return $field->update_data( $new_value );
|
672 |
-
} elseif ( empty( $new_value ) ) {
|
673 |
-
if ( ! empty( $old ) )
|
674 |
-
self::$updated[] = $name;
|
675 |
-
return $field->remove_data();
|
676 |
-
}
|
677 |
-
}
|
678 |
-
|
679 |
-
/**
|
680 |
-
* Get object id from global space if no id is provided
|
681 |
-
* @since 1.0.0
|
682 |
-
* @param integer $object_id Object ID
|
683 |
-
* @return integer $object_id Object ID
|
684 |
-
*/
|
685 |
-
public static function get_object_id( $object_id = 0 ) {
|
686 |
-
|
687 |
-
if ( $object_id )
|
688 |
-
return $object_id;
|
689 |
-
|
690 |
-
if ( self::$object_id )
|
691 |
-
return self::$object_id;
|
692 |
-
|
693 |
-
// Try to get our object ID from the global space
|
694 |
-
switch ( self::get_object_type() ) {
|
695 |
-
case 'user':
|
696 |
-
$object_id = isset( $GLOBALS['user_ID'] ) ? $GLOBALS['user_ID'] : $object_id;
|
697 |
-
$object_id = isset( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : $object_id;
|
698 |
-
break;
|
699 |
-
|
700 |
-
default:
|
701 |
-
$object_id = isset( $GLOBALS['post']->ID ) ? $GLOBALS['post']->ID : $object_id;
|
702 |
-
$object_id = isset( $_REQUEST['post'] ) ? $_REQUEST['post'] : $object_id;
|
703 |
-
break;
|
704 |
-
}
|
705 |
-
|
706 |
-
// reset to id or 0
|
707 |
-
self::set_object_id( $object_id ? $object_id : 0 );
|
708 |
-
|
709 |
-
return self::$object_id;
|
710 |
-
}
|
711 |
-
|
712 |
-
/**
|
713 |
-
* Explicitly Set object id
|
714 |
-
* @since 1.0.0
|
715 |
-
* @param integer $object_id Object ID
|
716 |
-
* @return integer $object_id Object ID
|
717 |
-
*/
|
718 |
-
public static function set_object_id( $object_id ) {
|
719 |
-
return self::$object_id = $object_id;
|
720 |
-
}
|
721 |
-
|
722 |
-
/**
|
723 |
-
* Sets the $object_type based on metabox settings
|
724 |
-
* @since 1.0.0
|
725 |
-
* @param array|string $meta_box Metabox config array or explicit setting
|
726 |
-
* @return string Object type
|
727 |
-
*/
|
728 |
-
public static function set_mb_type( $meta_box ) {
|
729 |
-
|
730 |
-
if ( is_string( $meta_box ) ) {
|
731 |
-
self::$mb_object_type = $meta_box;
|
732 |
-
return self::get_mb_type();
|
733 |
-
}
|
734 |
-
|
735 |
-
if ( ! isset( $meta_box['pages'] ) )
|
736 |
-
return self::get_mb_type();
|
737 |
-
|
738 |
-
$type = false;
|
739 |
-
// check if 'pages' is a string
|
740 |
-
if ( self::is_options_page_mb( $meta_box ) )
|
741 |
-
$type = 'options-page';
|
742 |
-
// check if 'pages' is a string
|
743 |
-
elseif ( is_string( $meta_box['pages'] ) )
|
744 |
-
$type = $meta_box['pages'];
|
745 |
-
// if it's an array of one, extract it
|
746 |
-
elseif ( is_array( $meta_box['pages'] ) && count( $meta_box['pages'] === 1 ) )
|
747 |
-
$type = is_string( end( $meta_box['pages'] ) ) ? end( $meta_box['pages'] ) : false;
|
748 |
-
|
749 |
-
if ( !$type )
|
750 |
-
return self::get_mb_type();
|
751 |
-
|
752 |
-
// Get our object type
|
753 |
-
if ( 'user' == $type )
|
754 |
-
self::$mb_object_type = 'user';
|
755 |
-
elseif ( 'comment' == $type )
|
756 |
-
self::$mb_object_type = 'comment';
|
757 |
-
elseif ( 'options-page' == $type )
|
758 |
-
self::$mb_object_type = 'options-page';
|
759 |
-
else
|
760 |
-
self::$mb_object_type = 'post';
|
761 |
-
|
762 |
-
return self::get_mb_type();
|
763 |
-
}
|
764 |
-
|
765 |
-
/**
|
766 |
-
* Determines if metabox is for an options page
|
767 |
-
* @since 1.0.1
|
768 |
-
* @param array $meta_box Metabox config array
|
769 |
-
* @return boolean True/False
|
770 |
-
*/
|
771 |
-
public static function is_options_page_mb( $meta_box ) {
|
772 |
-
return ( isset( $meta_box['show_on']['key'] ) && 'options-page' === $meta_box['show_on']['key'] );
|
773 |
-
}
|
774 |
-
|
775 |
-
/**
|
776 |
-
* Returns the object type
|
777 |
-
* @since 1.0.0
|
778 |
-
* @return string Object type
|
779 |
-
*/
|
780 |
-
public static function get_object_type() {
|
781 |
-
if ( self::$object_type )
|
782 |
-
return self::$object_type;
|
783 |
-
|
784 |
-
global $pagenow;
|
785 |
-
|
786 |
-
if (
|
787 |
-
$pagenow == 'user-edit.php'
|
788 |
-
|| $pagenow == 'profile.php'
|
789 |
-
)
|
790 |
-
self::set_object_type( 'user' );
|
791 |
-
|
792 |
-
elseif (
|
793 |
-
$pagenow == 'edit-comments.php'
|
794 |
-
|| $pagenow == 'comment.php'
|
795 |
-
)
|
796 |
-
self::set_object_type( 'comment' );
|
797 |
-
else
|
798 |
-
self::set_object_type( 'post' );
|
799 |
-
|
800 |
-
return self::$object_type;
|
801 |
-
}
|
802 |
-
|
803 |
-
/**
|
804 |
-
* Sets the object type
|
805 |
-
* @since 1.0.0
|
806 |
-
* @return string Object type
|
807 |
-
*/
|
808 |
-
public static function set_object_type( $object_type ) {
|
809 |
-
return self::$object_type = $object_type;
|
810 |
-
}
|
811 |
-
|
812 |
-
/**
|
813 |
-
* Returns the object type
|
814 |
-
* @since 1.0.0
|
815 |
-
* @return string Object type
|
816 |
-
*/
|
817 |
-
public static function get_mb_type() {
|
818 |
-
return self::$mb_object_type;
|
819 |
-
}
|
820 |
-
|
821 |
-
/**
|
822 |
-
* Returns the nonce value for wp_meta_box_nonce
|
823 |
-
* @since 1.0.0
|
824 |
-
* @return string Nonce value
|
825 |
-
*/
|
826 |
-
public static function nonce() {
|
827 |
-
return basename( __FILE__ );
|
828 |
-
}
|
829 |
-
|
830 |
-
/**
|
831 |
-
* Defines the url which is used to load local resources.
|
832 |
-
* This may need to be filtered for local Window installations.
|
833 |
-
* If resources do not load, please check the wiki for details.
|
834 |
-
* @since 1.0.1
|
835 |
-
* @return string URL to CMB resources
|
836 |
-
*/
|
837 |
-
public static function get_meta_box_url() {
|
838 |
-
|
839 |
-
if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' ) {
|
840 |
-
// Windows
|
841 |
-
$content_dir = str_replace( '/', DIRECTORY_SEPARATOR, WP_CONTENT_DIR );
|
842 |
-
$content_url = str_replace( $content_dir, WP_CONTENT_URL, dirname(__FILE__) );
|
843 |
-
$cmb_url = str_replace( DIRECTORY_SEPARATOR, '/', $content_url );
|
844 |
-
|
845 |
-
} else {
|
846 |
-
$cmb_url = str_replace(
|
847 |
-
array(WP_CONTENT_DIR, WP_PLUGIN_DIR),
|
848 |
-
array(WP_CONTENT_URL, WP_PLUGIN_URL),
|
849 |
-
dirname( __FILE__ )
|
850 |
-
);
|
851 |
-
}
|
852 |
-
|
853 |
-
return trailingslashit( apply_filters('cmb_meta_box_url', $cmb_url ) );
|
854 |
-
}
|
855 |
-
|
856 |
-
/**
|
857 |
-
* Fills in empty metabox parameters with defaults
|
858 |
-
* @since 1.0.1
|
859 |
-
* @param array $meta_box Metabox config array
|
860 |
-
* @return array Modified Metabox config array
|
861 |
-
*/
|
862 |
-
public static function set_mb_defaults( $meta_box ) {
|
863 |
-
return wp_parse_args( $meta_box, self::$mb_defaults );
|
864 |
-
}
|
865 |
-
|
866 |
-
/**
|
867 |
-
* Removes an option from an option array
|
868 |
-
* @since 1.0.1
|
869 |
-
* @param string $option_key Option key
|
870 |
-
* @param string $field_id Option array field key
|
871 |
-
* @return array Modified options
|
872 |
-
*/
|
873 |
-
public static function remove_option( $option_key, $field_id ) {
|
874 |
-
|
875 |
-
self::$options[ $option_key ] = ! isset( self::$options[ $option_key ] ) || empty( self::$options[ $option_key ] ) ? self::_get_option( $option_key ) : self::$options[ $option_key ];
|
876 |
-
|
877 |
-
if ( isset( self::$options[ $option_key ][ $field_id ] ) )
|
878 |
-
unset( self::$options[ $option_key ][ $field_id ] );
|
879 |
-
|
880 |
-
return self::$options[ $option_key ];
|
881 |
-
}
|
882 |
-
|
883 |
-
/**
|
884 |
-
* Retrieves an option from an option array
|
885 |
-
* @since 1.0.1
|
886 |
-
* @param string $option_key Option key
|
887 |
-
* @param string $field_id Option array field key
|
888 |
-
* @return array Options array or specific field
|
889 |
-
*/
|
890 |
-
public static function get_option( $option_key, $field_id = '' ) {
|
891 |
-
|
892 |
-
self::$options[ $option_key ] = ! isset( self::$options[ $option_key ] ) || empty( self::$options[ $option_key ] ) ? self::_get_option( $option_key ) : self::$options[ $option_key ];
|
893 |
-
|
894 |
-
if ( $field_id ) {
|
895 |
-
return isset( self::$options[ $option_key ][ $field_id ] ) ? self::$options[ $option_key ][ $field_id ] : false;
|
896 |
-
}
|
897 |
-
|
898 |
-
return self::$options[ $option_key ];
|
899 |
-
}
|
900 |
-
|
901 |
-
/**
|
902 |
-
* Updates Option data
|
903 |
-
* @since 1.0.1
|
904 |
-
* @param string $option_key Option key
|
905 |
-
* @param string $field_id Option array field key
|
906 |
-
* @param mixed $value Value to update data with
|
907 |
-
* @param bool $single Whether data should be an array
|
908 |
-
* @return array Modified options
|
909 |
-
*/
|
910 |
-
public static function update_option( $option_key, $field_id, $value, $single = true ) {
|
911 |
-
|
912 |
-
if ( ! $single ) {
|
913 |
-
// If multiple, add to array
|
914 |
-
self::$options[ $option_key ][ $field_id ][] = $value;
|
915 |
-
} else {
|
916 |
-
self::$options[ $option_key ][ $field_id ] = $value;
|
917 |
-
}
|
918 |
-
|
919 |
-
return self::$options[ $option_key ];
|
920 |
-
}
|
921 |
-
|
922 |
-
/**
|
923 |
-
* Retrieve option value based on name of option.
|
924 |
-
* @uses apply_filters() Calls 'cmb_override_option_get_$option_key' hook to allow
|
925 |
-
* overwriting the option value to be retrieved.
|
926 |
-
*
|
927 |
-
* @since 1.0.1
|
928 |
-
* @param string $option Name of option to retrieve. Expected to not be SQL-escaped.
|
929 |
-
* @param mixed $default Optional. Default value to return if the option does not exist.
|
930 |
-
* @return mixed Value set for the option.
|
931 |
-
*/
|
932 |
-
public static function _get_option( $option_key, $default = false ) {
|
933 |
-
|
934 |
-
$test_get = apply_filters( "cmb_override_option_get_$option_key", 'cmb_no_override_option_get', $default );
|
935 |
-
|
936 |
-
if ( $test_get !== 'cmb_no_override_option_get' )
|
937 |
-
return $test_get;
|
938 |
-
|
939 |
-
// If no override, get the option
|
940 |
-
return get_option( $option_key, $default );
|
941 |
-
}
|
942 |
-
|
943 |
-
/**
|
944 |
-
* Saves the option array
|
945 |
-
* Needs to be run after finished using remove/update_option
|
946 |
-
* @uses apply_filters() Calls 'cmb_override_option_save_$option_key' hook to allow
|
947 |
-
* overwriting the option value to be stored.
|
948 |
-
*
|
949 |
-
* @since 1.0.1
|
950 |
-
* @param string $option_key Option key
|
951 |
-
* @return boolean Success/Failure
|
952 |
-
*/
|
953 |
-
public static function save_option( $option_key ) {
|
954 |
-
|
955 |
-
$to_save = self::get_option( $option_key );
|
956 |
-
|
957 |
-
$test_save = apply_filters( "cmb_override_option_save_$option_key", 'cmb_no_override_option_save', $to_save );
|
958 |
-
|
959 |
-
if ( $test_save !== 'cmb_no_override_option_save' )
|
960 |
-
return $test_save;
|
961 |
-
|
962 |
-
// If no override, update the option
|
963 |
-
return update_option( $option_key, $to_save );
|
964 |
-
}
|
965 |
-
|
966 |
-
/**
|
967 |
-
* Utility method that returns a timezone string representing the default timezone for the site.
|
968 |
-
*
|
969 |
-
* Roughly copied from WordPress, as get_option('timezone_string') will return
|
970 |
-
* and empty string if no value has beens set on the options page.
|
971 |
-
* A timezone string is required by the wp_timezone_choice() used by the
|
972 |
-
* select_timezone field.
|
973 |
-
*
|
974 |
-
* @since 1.0.0
|
975 |
-
* @return string Timezone string
|
976 |
-
*/
|
977 |
-
public static function timezone_string() {
|
978 |
-
$current_offset = get_option( 'gmt_offset' );
|
979 |
-
$tzstring = get_option( 'timezone_string' );
|
980 |
-
|
981 |
-
if ( empty( $tzstring ) ) { // Create a UTC+- zone if no timezone string exists
|
982 |
-
if ( 0 == $current_offset )
|
983 |
-
$tzstring = 'UTC+0';
|
984 |
-
elseif ( $current_offset < 0 )
|
985 |
-
$tzstring = 'UTC' . $current_offset;
|
986 |
-
else
|
987 |
-
$tzstring = 'UTC+' . $current_offset;
|
988 |
-
}
|
989 |
-
|
990 |
-
return $tzstring;
|
991 |
-
}
|
992 |
-
|
993 |
-
/**
|
994 |
-
* Utility method that returns time string offset by timezone
|
995 |
-
* @since 1.0.0
|
996 |
-
* @param string $tzstring Time string
|
997 |
-
* @return string Offset time string
|
998 |
-
*/
|
999 |
-
public static function timezone_offset( $tzstring ) {
|
1000 |
-
if ( ! empty( $tzstring ) && is_string( $tzstring ) ) {
|
1001 |
-
if ( substr( $tzstring, 0, 3 ) === 'UTC' ) {
|
1002 |
-
$tzstring = str_replace( array( ':15',':30',':45' ), array( '.25','.5','.75' ), $tzstring );
|
1003 |
-
return intval( floatval( substr( $tzstring, 3 ) ) * HOUR_IN_SECONDS );
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
$date_time_zone_selected = new DateTimeZone( $tzstring );
|
1007 |
-
$tz_offset = timezone_offset_get( $date_time_zone_selected, date_create() );
|
1008 |
-
|
1009 |
-
return $tz_offset;
|
1010 |
-
}
|
1011 |
-
|
1012 |
-
return 0;
|
1013 |
-
}
|
1014 |
-
|
1015 |
-
/**
|
1016 |
-
* Utility method that attempts to get an attachment's ID by it's url
|
1017 |
-
* @since 1.0.0
|
1018 |
-
* @param string $img_url Attachment url
|
1019 |
-
* @return mixed Attachment ID or false
|
1020 |
-
*/
|
1021 |
-
public static function image_id_from_url( $img_url ) {
|
1022 |
-
global $wpdb;
|
1023 |
-
|
1024 |
-
$img_url = esc_url_raw( $img_url );
|
1025 |
-
// Get just the file name
|
1026 |
-
if ( false !== strpos( $img_url, '/' ) ) {
|
1027 |
-
$explode = explode( '/', $img_url );
|
1028 |
-
$img_url = end( $explode );
|
1029 |
-
}
|
1030 |
-
|
1031 |
-
// And search for a fuzzy match of the file name
|
1032 |
-
$attachment = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE guid LIKE '%%%s%%' LIMIT 1;", $img_url ) );
|
1033 |
-
|
1034 |
-
// If we found an attachement ID, return it
|
1035 |
-
if ( !empty( $attachment ) && is_array( $attachment ) )
|
1036 |
-
return $attachment[0];
|
1037 |
-
|
1038 |
-
// No luck
|
1039 |
-
return false;
|
1040 |
-
}
|
1041 |
-
|
1042 |
-
}
|
1043 |
-
|
1044 |
-
// Handle oembed Ajax
|
1045 |
-
add_action( 'wp_ajax_cmb_oembed_handler', array( 'cmb_Meta_Box_ajax', 'oembed_handler' ) );
|
1046 |
-
add_action( 'wp_ajax_nopriv_cmb_oembed_handler', array( 'cmb_Meta_Box_ajax', 'oembed_handler' ) );
|
1047 |
-
|
1048 |
-
/**
|
1049 |
-
* A helper function to get an option from a CMB options array
|
1050 |
-
* @since 1.0.1
|
1051 |
-
* @param string $option_key Option key
|
1052 |
-
* @param string $field_id Option array field key
|
1053 |
-
* @return array Options array or specific field
|
1054 |
-
*/
|
1055 |
-
function cmb_get_option( $option_key, $field_id = '' ) {
|
1056 |
-
return cmb_Meta_Box::get_option( $option_key, $field_id );
|
1057 |
-
}
|
1058 |
-
|
1059 |
-
/**
|
1060 |
-
* Get a CMB field object.
|
1061 |
-
* @since 1.1.0
|
1062 |
-
* @param array $field_args Field arguments
|
1063 |
-
* @param int $object_id Object ID
|
1064 |
-
* @param string $object_type Type of object being saved. (e.g., post, user, or comment)
|
1065 |
-
* @return object cmb_Meta_Box_field object
|
1066 |
-
*/
|
1067 |
-
function cmb_get_field( $field_args, $object_id = 0, $object_type = 'post' ) {
|
1068 |
-
// Default to the loop post ID
|
1069 |
-
$object_id = $object_id ? $object_id : get_the_ID();
|
1070 |
-
cmb_Meta_Box::set_object_id( $object_id );
|
1071 |
-
cmb_Meta_Box::set_object_type( $object_type );
|
1072 |
-
// Send back field object
|
1073 |
-
return new cmb_Meta_Box_field( $field_args );
|
1074 |
-
}
|
1075 |
-
|
1076 |
-
/**
|
1077 |
-
* Get a field's value.
|
1078 |
-
* @since 1.1.0
|
1079 |
-
* @param array $field_args Field arguments
|
1080 |
-
* @param int $object_id Object ID
|
1081 |
-
* @param string $object_type Type of object being saved. (e.g., post, user, comment, or options-page)
|
1082 |
-
* @return mixed Maybe escaped value
|
1083 |
-
*/
|
1084 |
-
function cmb_get_field_value( $field_args, $object_id = 0, $object_type = 'post' ) {
|
1085 |
-
$field = cmb_get_field( $field_args, $object_id, $object_type );
|
1086 |
-
return $field->escaped_value();
|
1087 |
-
}
|
1088 |
-
|
1089 |
-
/**
|
1090 |
-
* Loop and output multiple metaboxes
|
1091 |
-
* @since 1.0.0
|
1092 |
-
* @param array $meta_boxes Metaboxes config array
|
1093 |
-
* @param int $object_id Object ID
|
1094 |
-
*/
|
1095 |
-
function cmb_print_metaboxes( $meta_boxes, $object_id ) {
|
1096 |
-
foreach ( (array) $meta_boxes as $meta_box ) {
|
1097 |
-
cmb_print_metabox( $meta_box, $object_id );
|
1098 |
-
}
|
1099 |
-
}
|
1100 |
-
|
1101 |
-
/**
|
1102 |
-
* Output a metabox
|
1103 |
-
* @since 1.0.0
|
1104 |
-
* @param array $meta_box Metabox config array
|
1105 |
-
* @param int $object_id Object ID
|
1106 |
-
*/
|
1107 |
-
function cmb_print_metabox( $meta_box, $object_id ) {
|
1108 |
-
$cmb = new cmb_Meta_Box( $meta_box );
|
1109 |
-
if ( $cmb ) {
|
1110 |
-
|
1111 |
-
cmb_Meta_Box::set_object_id( $object_id );
|
1112 |
-
|
1113 |
-
if ( ! wp_script_is( 'cmb-scripts', 'registered' ) )
|
1114 |
-
$cmb->register_scripts();
|
1115 |
-
|
1116 |
-
wp_enqueue_script( 'cmb-scripts' );
|
1117 |
-
|
1118 |
-
// default is to show cmb styles
|
1119 |
-
if ( $meta_box['cmb_styles'] != false )
|
1120 |
-
wp_enqueue_style( 'cmb-styles' );
|
1121 |
-
|
1122 |
-
cmb_Meta_Box::show_form( $meta_box );
|
1123 |
-
}
|
1124 |
-
|
1125 |
-
}
|
1126 |
-
|
1127 |
-
/**
|
1128 |
-
* Saves a particular metabox's fields
|
1129 |
-
* @since 1.0.0
|
1130 |
-
* @param array $meta_box Metabox config array
|
1131 |
-
* @param int $object_id Object ID
|
1132 |
-
*/
|
1133 |
-
function cmb_save_metabox_fields( $meta_box, $object_id ) {
|
1134 |
-
cmb_Meta_Box::save_fields( $meta_box, $object_id );
|
1135 |
-
}
|
1136 |
-
|
1137 |
-
/**
|
1138 |
-
* Display a metabox form & save it on submission
|
1139 |
-
* @since 1.0.0
|
1140 |
-
* @param array $meta_box Metabox config array
|
1141 |
-
* @param int $object_id Object ID
|
1142 |
-
* @param boolean $return Whether to return or echo form
|
1143 |
-
* @return string CMB html form markup
|
1144 |
-
*/
|
1145 |
-
function cmb_metabox_form( $meta_box, $object_id, $echo = true ) {
|
1146 |
-
|
1147 |
-
$meta_box = cmb_Meta_Box::set_mb_defaults( $meta_box );
|
1148 |
-
|
1149 |
-
// Make sure form should be shown
|
1150 |
-
if ( ! apply_filters( 'cmb_show_on', true, $meta_box ) )
|
1151 |
-
return '';
|
1152 |
-
|
1153 |
-
// Make sure that our object type is explicitly set by the metabox config
|
1154 |
-
cmb_Meta_Box::set_object_type( cmb_Meta_Box::set_mb_type( $meta_box ) );
|
1155 |
-
|
1156 |
-
// Save the metabox if it's been submitted
|
1157 |
-
// check permissions
|
1158 |
-
// @todo more hardening?
|
1159 |
-
if (
|
1160 |
-
// check nonce
|
1161 |
-
isset( $_POST['submit-cmb'], $_POST['object_id'], $_POST['wp_meta_box_nonce'] )
|
1162 |
-
&& wp_verify_nonce( $_POST['wp_meta_box_nonce'], cmb_Meta_Box::nonce() )
|
1163 |
-
&& $_POST['object_id'] == $object_id
|
1164 |
-
)
|
1165 |
-
cmb_save_metabox_fields( $meta_box, $object_id );
|
1166 |
-
|
1167 |
-
// Show specific metabox form
|
1168 |
-
|
1169 |
-
// Get cmb form
|
1170 |
-
ob_start();
|
1171 |
-
cmb_print_metabox( $meta_box, $object_id );
|
1172 |
-
$form = ob_get_contents();
|
1173 |
-
ob_end_clean();
|
1174 |
-
|
1175 |
-
$form_format = apply_filters( 'cmb_frontend_form_format', '<form class="cmb-form" method="post" id="%s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="object_id" value="%s">%s<input type="submit" name="submit-cmb" value="%s" class="button-primary"></form>', $object_id, $meta_box, $form );
|
1176 |
-
|
1177 |
-
$form = sprintf( $form_format, $meta_box['id'], $object_id, $form, __( 'Save' ) );
|
1178 |
-
|
1179 |
-
if ( $echo )
|
1180 |
-
echo $form;
|
1181 |
-
|
1182 |
-
return $form;
|
1183 |
-
}
|
1184 |
-
|
1185 |
-
// End. That's it, folks! //
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/cmb_metaboxes/js/cmb.js
DELETED
@@ -1,797 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Controls the behaviours of custom metabox fields.
|
3 |
-
*
|
4 |
-
* @author Andrew Norcross
|
5 |
-
* @author Jared Atchison
|
6 |
-
* @author Bill Erickson
|
7 |
-
* @author Justin Sternberg
|
8 |
-
* @see https://github.com/webdevstudios/Custom-Metaboxes-and-Fields-for-WordPress
|
9 |
-
*/
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Custom jQuery for Custom Metaboxes and Fields
|
13 |
-
*/
|
14 |
-
window.CMB = (function(window, document, $, undefined){
|
15 |
-
'use strict';
|
16 |
-
|
17 |
-
// localization strings
|
18 |
-
var l10n = window.cmb_l10;
|
19 |
-
var setTimeout = window.setTimeout;
|
20 |
-
|
21 |
-
// CMB functionality object
|
22 |
-
var cmb = {
|
23 |
-
formfield : '',
|
24 |
-
idNumber : false,
|
25 |
-
file_frames : {},
|
26 |
-
repeatEls : 'input:not([type="button"]),select,textarea,.cmb_media_status'
|
27 |
-
};
|
28 |
-
|
29 |
-
cmb.metabox = function() {
|
30 |
-
if ( cmb.$metabox ) {
|
31 |
-
return cmb.$metabox;
|
32 |
-
}
|
33 |
-
cmb.$metabox = $('table.cmb_metabox');
|
34 |
-
return cmb.$metabox;
|
35 |
-
};
|
36 |
-
|
37 |
-
cmb.init = function() {
|
38 |
-
|
39 |
-
var $metabox = cmb.metabox();
|
40 |
-
var $repeatGroup = $metabox.find('.repeatable-group');
|
41 |
-
|
42 |
-
// hide our spinner gif if we're on a MP6 dashboard
|
43 |
-
if ( l10n.new_admin_style ) {
|
44 |
-
$metabox.find('.cmb-spinner img').hide();
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Initialize time/date/color pickers
|
49 |
-
*/
|
50 |
-
cmb.initPickers( $metabox.find('input:text.cmb_timepicker'), $metabox.find('input:text.cmb_datepicker'), $metabox.find('input:text.cmb_colorpicker') );
|
51 |
-
|
52 |
-
// Wrap date picker in class to narrow the scope of jQuery UI CSS and prevent conflicts
|
53 |
-
$("#ui-datepicker-div").wrap('<div class="cmb_element" />');
|
54 |
-
|
55 |
-
// Insert toggle button into DOM wherever there is multicheck. credit: Genesis Framework
|
56 |
-
$( '<p><span class="button cmb-multicheck-toggle">' + l10n.check_toggle + '</span></p>' ).insertBefore( 'ul.cmb_checkbox_list' );
|
57 |
-
|
58 |
-
$metabox
|
59 |
-
.on( 'change', '.cmb_upload_file', function() {
|
60 |
-
cmb.formfield = $(this).attr('id');
|
61 |
-
$('#' + cmb.formfield + '_id').val('');
|
62 |
-
})
|
63 |
-
// Media/file management
|
64 |
-
.on( 'click', '.cmb-multicheck-toggle', cmb.toggleCheckBoxes )
|
65 |
-
.on( 'click', '.cmb_upload_button', cmb.handleMedia )
|
66 |
-
.on( 'click', '.cmb_remove_file_button', cmb.handleRemoveMedia )
|
67 |
-
// Repeatable content
|
68 |
-
.on( 'click', '.add-group-row', cmb.addGroupRow )
|
69 |
-
.on( 'click', '.add-row-button', cmb.addAjaxRow )
|
70 |
-
.on( 'click', '.remove-group-row', cmb.removeGroupRow )
|
71 |
-
.on( 'click', '.remove-row-button', cmb.removeAjaxRow )
|
72 |
-
// Ajax oEmbed display
|
73 |
-
.on( 'keyup paste focusout', '.cmb_oembed', cmb.maybeOembed )
|
74 |
-
// Reset titles when removing a row
|
75 |
-
.on( 'cmb_remove_row', '.repeatable-group', cmb.resetTitlesAndIterator );
|
76 |
-
|
77 |
-
if ( $repeatGroup.length ) {
|
78 |
-
$repeatGroup
|
79 |
-
.filter('.sortable').each( function() {
|
80 |
-
// Add sorting arrows
|
81 |
-
$(this).find( '.remove-group-row' ).before( '<a class="shift-rows move-up alignleft" href="#">'+ l10n.up_arrow +'</a> <a class="shift-rows move-down alignleft" href="#">'+ l10n.down_arrow +'</a>' );
|
82 |
-
})
|
83 |
-
.on( 'click', '.shift-rows', cmb.shiftRows )
|
84 |
-
.on( 'cmb_add_row', cmb.emptyValue );
|
85 |
-
}
|
86 |
-
|
87 |
-
// on pageload
|
88 |
-
setTimeout( cmb.resizeoEmbeds, 500);
|
89 |
-
// and on window resize
|
90 |
-
$(window).on( 'resize', cmb.resizeoEmbeds );
|
91 |
-
|
92 |
-
};
|
93 |
-
|
94 |
-
cmb.resetTitlesAndIterator = function() {
|
95 |
-
// Loop repeatable group tables
|
96 |
-
$( '.repeatable-group' ).each( function() {
|
97 |
-
var $table = $(this);
|
98 |
-
// Loop repeatable group table rows
|
99 |
-
$table.find( '.repeatable-grouping' ).each( function( rowindex ) {
|
100 |
-
var $row = $(this);
|
101 |
-
// Reset rows iterator
|
102 |
-
$row.data( 'iterator', rowindex );
|
103 |
-
// Reset rows title
|
104 |
-
$row.find( '.cmb-group-title h4' ).text( $table.find( '.add-group-row' ).data( 'grouptitle' ).replace( '{#}', ( rowindex + 1 ) ) );
|
105 |
-
});
|
106 |
-
});
|
107 |
-
};
|
108 |
-
|
109 |
-
cmb.toggleCheckBoxes = function( event ) {
|
110 |
-
event.preventDefault();
|
111 |
-
var $self = $(this);
|
112 |
-
var $multicheck = $self.parents( 'td' ).find( 'input[type=checkbox]' );
|
113 |
-
|
114 |
-
// If the button has already been clicked once...
|
115 |
-
if ( $self.data( 'checked' ) ) {
|
116 |
-
// clear the checkboxes and remove the flag
|
117 |
-
$multicheck.prop( 'checked', false );
|
118 |
-
$self.data( 'checked', false );
|
119 |
-
}
|
120 |
-
// Otherwise mark the checkboxes and add a flag
|
121 |
-
else {
|
122 |
-
$multicheck.prop( 'checked', true );
|
123 |
-
$self.data( 'checked', true );
|
124 |
-
}
|
125 |
-
};
|
126 |
-
|
127 |
-
cmb.handleMedia = function(event) {
|
128 |
-
|
129 |
-
if ( ! wp ) {
|
130 |
-
return;
|
131 |
-
}
|
132 |
-
|
133 |
-
event.preventDefault();
|
134 |
-
|
135 |
-
var $metabox = cmb.metabox();
|
136 |
-
var $self = $(this);
|
137 |
-
cmb.formfield = $self.prev('input').attr('id');
|
138 |
-
var $formfield = $('#'+cmb.formfield);
|
139 |
-
var formName = $formfield.attr('name');
|
140 |
-
var uploadStatus = true;
|
141 |
-
var attachment = true;
|
142 |
-
var isList = $self.hasClass( 'cmb_upload_list' );
|
143 |
-
|
144 |
-
// If this field's media frame already exists, reopen it.
|
145 |
-
if ( cmb.formfield in cmb.file_frames ) {
|
146 |
-
cmb.file_frames[cmb.formfield].open();
|
147 |
-
return;
|
148 |
-
}
|
149 |
-
|
150 |
-
// Create the media frame.
|
151 |
-
cmb.file_frames[cmb.formfield] = wp.media.frames.file_frame = wp.media({
|
152 |
-
title: $metabox.find('label[for=' + cmb.formfield + ']').text(),
|
153 |
-
button: {
|
154 |
-
text: l10n.upload_file
|
155 |
-
},
|
156 |
-
multiple: isList ? true : false
|
157 |
-
});
|
158 |
-
|
159 |
-
var handlers = {
|
160 |
-
list : function( selection ) {
|
161 |
-
// Get all of our selected files
|
162 |
-
attachment = selection.toJSON();
|
163 |
-
|
164 |
-
$formfield.val(attachment.url);
|
165 |
-
$('#'+ cmb.formfield +'_id').val(attachment.id);
|
166 |
-
|
167 |
-
// Setup our fileGroup array
|
168 |
-
var fileGroup = [];
|
169 |
-
|
170 |
-
// Loop through each attachment
|
171 |
-
$( attachment ).each( function() {
|
172 |
-
if ( this.type && this.type === 'image' ) {
|
173 |
-
// image preview
|
174 |
-
uploadStatus = '<li class="img_status">'+
|
175 |
-
'<img width="50" height="50" src="' + this.url + '" class="attachment-50x50" alt="'+ this.filename +'">'+
|
176 |
-
'<p><a href="#" class="cmb_remove_file_button" rel="'+ cmb.formfield +'['+ this.id +']">'+ l10n.remove_image +'</a></p>'+
|
177 |
-
'<input type="hidden" id="filelist-'+ this.id +'" name="'+ formName +'['+ this.id +']" value="' + this.url + '">'+
|
178 |
-
'</li>';
|
179 |
-
|
180 |
-
} else {
|
181 |
-
// Standard generic output if it's not an image.
|
182 |
-
uploadStatus = '<li>'+ l10n.file +' <strong>'+ this.filename +'</strong> (<a href="' + this.url + '" target="_blank" rel="external">'+ l10n.download +'</a> / <a href="#" class="cmb_remove_file_button" rel="'+ cmb.formfield +'['+ this.id +']">'+ l10n.remove_file +'</a>)'+
|
183 |
-
'<input type="hidden" id="filelist-'+ this.id +'" name="'+ formName +'['+ this.id +']" value="' + this.url + '">'+
|
184 |
-
'</li>';
|
185 |
-
|
186 |
-
}
|
187 |
-
|
188 |
-
// Add our file to our fileGroup array
|
189 |
-
fileGroup.push( uploadStatus );
|
190 |
-
});
|
191 |
-
|
192 |
-
// Append each item from our fileGroup array to .cmb_media_status
|
193 |
-
$( fileGroup ).each( function() {
|
194 |
-
$formfield.siblings('.cmb_media_status').slideDown().append(this);
|
195 |
-
});
|
196 |
-
},
|
197 |
-
single : function( selection ) {
|
198 |
-
// Only get one file from the uploader
|
199 |
-
attachment = selection.first().toJSON();
|
200 |
-
|
201 |
-
$formfield.val(attachment.url);
|
202 |
-
$('#'+ cmb.formfield +'_id').val(attachment.id);
|
203 |
-
|
204 |
-
if ( attachment.type && attachment.type === 'image' ) {
|
205 |
-
// image preview
|
206 |
-
uploadStatus = '<div class="img_status"><img style="max-width: 350px; width: 100%; height: auto;" src="' + attachment.url + '" alt="'+ attachment.filename +'" title="'+ attachment.filename +'" /><p><a href="#" class="cmb_remove_file_button" rel="' + cmb.formfield + '">'+ l10n.remove_image +'</a></p></div>';
|
207 |
-
} else {
|
208 |
-
// Standard generic output if it's not an image.
|
209 |
-
uploadStatus = l10n.file +' <strong>'+ attachment.filename +'</strong> (<a href="'+ attachment.url +'" target="_blank" rel="external">'+ l10n.download +'</a> / <a href="#" class="cmb_remove_file_button" rel="'+ cmb.formfield +'">'+ l10n.remove_file +'</a>)';
|
210 |
-
}
|
211 |
-
|
212 |
-
// add/display our output
|
213 |
-
$formfield.siblings('.cmb_media_status').slideDown().html(uploadStatus);
|
214 |
-
}
|
215 |
-
};
|
216 |
-
|
217 |
-
// When an file is selected, run a callback.
|
218 |
-
cmb.file_frames[cmb.formfield].on( 'select', function() {
|
219 |
-
var selection = cmb.file_frames[cmb.formfield].state().get('selection');
|
220 |
-
var type = isList ? 'list' : 'single';
|
221 |
-
handlers[type]( selection );
|
222 |
-
});
|
223 |
-
|
224 |
-
// Finally, open the modal
|
225 |
-
cmb.file_frames[cmb.formfield].open();
|
226 |
-
};
|
227 |
-
|
228 |
-
cmb.handleRemoveMedia = function( event ) {
|
229 |
-
event.preventDefault();
|
230 |
-
var $self = $(this);
|
231 |
-
if ( $self.is( '.attach_list .cmb_remove_file_button' ) ){
|
232 |
-
$self.parents('li').remove();
|
233 |
-
return false;
|
234 |
-
}
|
235 |
-
cmb.formfield = $self.attr('rel');
|
236 |
-
var $container = $self.parents('.img_status');
|
237 |
-
|
238 |
-
cmb.metabox().find('input#' + cmb.formfield).val('');
|
239 |
-
cmb.metabox().find('input#' + cmb.formfield + '_id').val('');
|
240 |
-
if ( ! $container.length ) {
|
241 |
-
$self.parents('.cmb_media_status').html('');
|
242 |
-
} else {
|
243 |
-
$container.html('');
|
244 |
-
}
|
245 |
-
return false;
|
246 |
-
};
|
247 |
-
|
248 |
-
// src: http://www.benalman.com/projects/jquery-replacetext-plugin/
|
249 |
-
$.fn.replaceText = function(b, a, c) {
|
250 |
-
return this.each(function() {
|
251 |
-
var f = this.firstChild, g, e, d = [];
|
252 |
-
if (f) {
|
253 |
-
do {
|
254 |
-
if (f.nodeType === 3) {
|
255 |
-
g = f.nodeValue;
|
256 |
-
e = g.replace(b, a);
|
257 |
-
if (e !== g) {
|
258 |
-
if (!c && /</.test(e)) {
|
259 |
-
$(f).before(e);
|
260 |
-
d.push(f);
|
261 |
-
} else {
|
262 |
-
f.nodeValue = e;
|
263 |
-
}
|
264 |
-
}
|
265 |
-
}
|
266 |
-
} while (f = f.nextSibling);
|
267 |
-
}
|
268 |
-
if ( d.length ) { $(d).remove(); }
|
269 |
-
});
|
270 |
-
};
|
271 |
-
|
272 |
-
$.fn.cleanRow = function( prevNum, group ) {
|
273 |
-
var $self = $(this);
|
274 |
-
var $inputs = $self.find('input:not([type="button"]), select, textarea, label');
|
275 |
-
if ( group ) {
|
276 |
-
// Remove extra ajaxed rows
|
277 |
-
$self.find('.cmb-repeat-table .repeat-row:not(:first-child)').remove();
|
278 |
-
}
|
279 |
-
cmb.$focus = false;
|
280 |
-
cmb.neweditor_id = [];
|
281 |
-
|
282 |
-
$inputs.filter(':checked').removeAttr( 'checked' );
|
283 |
-
$inputs.filter(':selected').removeAttr( 'selected' );
|
284 |
-
|
285 |
-
if ( $self.find('.cmb-group-title') ) {
|
286 |
-
$self.find( '.cmb-group-title h4' ).text( $self.data( 'title' ).replace( '{#}', ( cmb.idNumber + 1 ) ) );
|
287 |
-
}
|
288 |
-
|
289 |
-
$inputs.each( function(){
|
290 |
-
var $newInput = $(this);
|
291 |
-
var isEditor = $newInput.hasClass( 'wp-editor-area' );
|
292 |
-
var oldFor = $newInput.attr( 'for' );
|
293 |
-
// var $next = $newInput.next();
|
294 |
-
var attrs = {};
|
295 |
-
var newID, oldID;
|
296 |
-
if ( oldFor ) {
|
297 |
-
attrs = { 'for' : oldFor.replace( '_'+ prevNum, '_'+ cmb.idNumber ) };
|
298 |
-
} else {
|
299 |
-
var oldName = $newInput.attr( 'name' );
|
300 |
-
// Replace 'name' attribute key
|
301 |
-
var newName = oldName ? oldName.replace( '['+ prevNum +']', '['+ cmb.idNumber +']' ) : '';
|
302 |
-
oldID = $newInput.attr( 'id' );
|
303 |
-
newID = oldID ? oldID.replace( '_'+ prevNum, '_'+ cmb.idNumber ) : '';
|
304 |
-
attrs = {
|
305 |
-
id: newID,
|
306 |
-
name: newName,
|
307 |
-
// value: '',
|
308 |
-
'data-iterator': cmb.idNumber,
|
309 |
-
};
|
310 |
-
}
|
311 |
-
|
312 |
-
$newInput
|
313 |
-
.removeClass( 'hasDatepicker' )
|
314 |
-
.attr( attrs ).val('');
|
315 |
-
|
316 |
-
// wysiwyg field
|
317 |
-
if ( isEditor ) {
|
318 |
-
// Get new wysiwyg ID
|
319 |
-
newID = newID ? oldID.replace( 'zx'+ prevNum, 'zx'+ cmb.idNumber ) : '';
|
320 |
-
// Empty the contents
|
321 |
-
$newInput.html('');
|
322 |
-
// Get wysiwyg field
|
323 |
-
var $wysiwyg = $newInput.parents( '.cmb-type-wysiwyg' );
|
324 |
-
// Remove extra mce divs
|
325 |
-
$wysiwyg.find('.mce-tinymce:not(:first-child)').remove();
|
326 |
-
// Replace id instances
|
327 |
-
var html = $wysiwyg.html().replace( new RegExp( oldID, 'g' ), newID );
|
328 |
-
// Update field html
|
329 |
-
$wysiwyg.html( html );
|
330 |
-
// Save ids for later to re-init tinymce
|
331 |
-
cmb.neweditor_id.push( { 'id': newID, 'old': oldID } );
|
332 |
-
}
|
333 |
-
|
334 |
-
cmb.$focus = cmb.$focus ? cmb.$focus : $newInput;
|
335 |
-
});
|
336 |
-
|
337 |
-
return this;
|
338 |
-
};
|
339 |
-
|
340 |
-
$.fn.newRowHousekeeping = function() {
|
341 |
-
var $row = $(this);
|
342 |
-
var $colorPicker = $row.find( '.wp-picker-container' );
|
343 |
-
var $list = $row.find( '.cmb_media_status' );
|
344 |
-
|
345 |
-
if ( $colorPicker.length ) {
|
346 |
-
// Need to clean-up colorpicker before appending
|
347 |
-
$colorPicker.each( function() {
|
348 |
-
var $td = $(this).parent();
|
349 |
-
$td.html( $td.find( 'input:text.cmb_colorpicker' ).attr('style', '') );
|
350 |
-
});
|
351 |
-
}
|
352 |
-
|
353 |
-
// Need to clean-up colorpicker before appending
|
354 |
-
if ( $list.length ) {
|
355 |
-
$list.empty();
|
356 |
-
}
|
357 |
-
|
358 |
-
return this;
|
359 |
-
};
|
360 |
-
|
361 |
-
cmb.afterRowInsert = function( $row ) {
|
362 |
-
if ( cmb.$focus ) {
|
363 |
-
cmb.$focus.focus();
|
364 |
-
}
|
365 |
-
|
366 |
-
var _prop;
|
367 |
-
|
368 |
-
// Need to re-init wp_editor instances
|
369 |
-
if ( cmb.neweditor_id.length ) {
|
370 |
-
var i;
|
371 |
-
for ( i = cmb.neweditor_id.length - 1; i >= 0; i-- ) {
|
372 |
-
var id = cmb.neweditor_id[i].id;
|
373 |
-
var old = cmb.neweditor_id[i].old;
|
374 |
-
|
375 |
-
if ( typeof( tinyMCEPreInit.mceInit[ id ] ) === 'undefined' ) {
|
376 |
-
var newSettings = jQuery.extend( {}, tinyMCEPreInit.mceInit[ old ] );
|
377 |
-
|
378 |
-
for ( _prop in newSettings ) {
|
379 |
-
if ( 'string' === typeof( newSettings[_prop] ) ) {
|
380 |
-
newSettings[_prop] = newSettings[_prop].replace( new RegExp( old, 'g' ), id );
|
381 |
-
}
|
382 |
-
}
|
383 |
-
tinyMCEPreInit.mceInit[ id ] = newSettings;
|
384 |
-
}
|
385 |
-
if ( typeof( tinyMCEPreInit.qtInit[ id ] ) === 'undefined' ) {
|
386 |
-
var newQTS = jQuery.extend( {}, tinyMCEPreInit.qtInit[ old ] );
|
387 |
-
for ( _prop in newQTS ) {
|
388 |
-
if ( 'string' === typeof( newQTS[_prop] ) ) {
|
389 |
-
newQTS[_prop] = newQTS[_prop].replace( new RegExp( old, 'g' ), id );
|
390 |
-
}
|
391 |
-
}
|
392 |
-
tinyMCEPreInit.qtInit[ id ] = newQTS;
|
393 |
-
}
|
394 |
-
tinyMCE.init({
|
395 |
-
id : tinyMCEPreInit.mceInit[ id ],
|
396 |
-
});
|
397 |
-
|
398 |
-
}
|
399 |
-
}
|
400 |
-
|
401 |
-
// Init pickers from new row
|
402 |
-
cmb.initPickers( $row.find('input:text.cmb_timepicker'), $row.find('input:text.cmb_datepicker'), $row.find('input:text.cmb_colorpicker') );
|
403 |
-
};
|
404 |
-
|
405 |
-
cmb.updateNameAttr = function () {
|
406 |
-
|
407 |
-
var $this = $(this);
|
408 |
-
var name = $this.attr( 'name' ); // get current name
|
409 |
-
|
410 |
-
// No name? bail
|
411 |
-
if ( typeof name === 'undefined' ) {
|
412 |
-
return false;
|
413 |
-
}
|
414 |
-
|
415 |
-
var prevNum = parseInt( $this.parents( '.repeatable-grouping' ).data( 'iterator' ) );
|
416 |
-
var newNum = prevNum - 1; // Subtract 1 to get new iterator number
|
417 |
-
|
418 |
-
// Update field name attributes so data is not orphaned when a row is removed and post is saved
|
419 |
-
var $newName = name.replace( '[' + prevNum + ']', '[' + newNum + ']' );
|
420 |
-
|
421 |
-
// New name with replaced iterator
|
422 |
-
$this.attr( 'name', $newName );
|
423 |
-
|
424 |
-
};
|
425 |
-
|
426 |
-
cmb.emptyValue = function( event, row ) {
|
427 |
-
$('input:not([type="button"]), textarea', row).val('');
|
428 |
-
};
|
429 |
-
|
430 |
-
cmb.addGroupRow = function( event ) {
|
431 |
-
|
432 |
-
event.preventDefault();
|
433 |
-
|
434 |
-
var $self = $(this);
|
435 |
-
var $table = $('#'+ $self.data('selector'));
|
436 |
-
var $oldRow = $table.find('.repeatable-grouping').last();
|
437 |
-
var prevNum = parseInt( $oldRow.data('iterator') );
|
438 |
-
cmb.idNumber = prevNum + 1;
|
439 |
-
var $row = $oldRow.clone();
|
440 |
-
|
441 |
-
$row.data( 'title', $self.data( 'grouptitle' ) ).newRowHousekeeping().cleanRow( prevNum, true );
|
442 |
-
|
443 |
-
// console.log( '$row.html()', $row.html() );
|
444 |
-
var $newRow = $( '<tr class="repeatable-grouping" data-iterator="'+ cmb.idNumber +'">'+ $row.html() +'</tr>' );
|
445 |
-
$oldRow.after( $newRow );
|
446 |
-
// console.log( '$newRow.html()', $row.html() );
|
447 |
-
|
448 |
-
cmb.afterRowInsert( $newRow );
|
449 |
-
|
450 |
-
if ( $table.find('.repeatable-grouping').length <= 1 ) {
|
451 |
-
$table.find('.remove-group-row').prop('disabled', true);
|
452 |
-
} else {
|
453 |
-
$table.find('.remove-group-row').removeAttr( 'disabled' );
|
454 |
-
}
|
455 |
-
|
456 |
-
$table.trigger( 'cmb_add_row', $newRow );
|
457 |
-
};
|
458 |
-
|
459 |
-
cmb.addAjaxRow = function( event ) {
|
460 |
-
|
461 |
-
event.preventDefault();
|
462 |
-
|
463 |
-
var $self = $(this);
|
464 |
-
var tableselector = '#'+ $self.data('selector');
|
465 |
-
var $table = $(tableselector);
|
466 |
-
var $emptyrow = $table.find('.empty-row');
|
467 |
-
var prevNum = parseInt( $emptyrow.find('[data-iterator]').data('iterator') );
|
468 |
-
cmb.idNumber = prevNum + 1;
|
469 |
-
var $row = $emptyrow.clone();
|
470 |
-
|
471 |
-
$row.newRowHousekeeping().cleanRow( prevNum );
|
472 |
-
|
473 |
-
$emptyrow.removeClass('empty-row').addClass('repeat-row');
|
474 |
-
$emptyrow.after( $row );
|
475 |
-
|
476 |
-
cmb.afterRowInsert( $row );
|
477 |
-
$table.trigger( 'cmb_add_row', $row );
|
478 |
-
};
|
479 |
-
|
480 |
-
cmb.removeGroupRow = function( event ) {
|
481 |
-
event.preventDefault();
|
482 |
-
var $self = $(this);
|
483 |
-
var $table = $('#'+ $self.data('selector'));
|
484 |
-
var $parent = $self.parents('.repeatable-grouping');
|
485 |
-
var noRows = $table.find('.repeatable-grouping').length;
|
486 |
-
|
487 |
-
// when a group is removed loop through all next groups and update fields names
|
488 |
-
$parent.nextAll( '.repeatable-grouping' ).find( cmb.repeatEls ).each( cmb.updateNameAttr );
|
489 |
-
|
490 |
-
if ( noRows > 1 ) {
|
491 |
-
$parent.remove();
|
492 |
-
if ( noRows < 3 ) {
|
493 |
-
$table.find('.remove-group-row').prop('disabled', true);
|
494 |
-
} else {
|
495 |
-
$table.find('.remove-group-row').prop('disabled', false);
|
496 |
-
}
|
497 |
-
$table.trigger( 'cmb_remove_row' );
|
498 |
-
}
|
499 |
-
};
|
500 |
-
|
501 |
-
cmb.removeAjaxRow = function( event ) {
|
502 |
-
event.preventDefault();
|
503 |
-
var $self = $(this);
|
504 |
-
var $parent = $self.parents('tr');
|
505 |
-
var $table = $self.parents('.cmb-repeat-table');
|
506 |
-
|
507 |
-
// cmb.log( 'number of tbodys', $table.length );
|
508 |
-
// cmb.log( 'number of trs', $('tr', $table).length );
|
509 |
-
if ( $table.find('tr').length > 1 ) {
|
510 |
-
if ( $parent.hasClass('empty-row') ) {
|
511 |
-
$parent.prev().addClass( 'empty-row' ).removeClass('repeat-row');
|
512 |
-
}
|
513 |
-
$self.parents('.cmb-repeat-table tr').remove();
|
514 |
-
$table.trigger( 'cmb_remove_row' );
|
515 |
-
}
|
516 |
-
};
|
517 |
-
|
518 |
-
cmb.shiftRows = function( event ) {
|
519 |
-
|
520 |
-
event.preventDefault();
|
521 |
-
|
522 |
-
var $self = $(this);
|
523 |
-
var $parent = $self.parents( '.repeatable-grouping' );
|
524 |
-
var $goto = $self.hasClass( 'move-up' ) ? $parent.prev( '.repeatable-grouping' ) : $parent.next( '.repeatable-grouping' );
|
525 |
-
|
526 |
-
if ( ! $goto.length ) {
|
527 |
-
return;
|
528 |
-
}
|
529 |
-
|
530 |
-
var inputVals = [];
|
531 |
-
// Loop this items fields
|
532 |
-
$parent.find( cmb.repeatEls ).each( function() {
|
533 |
-
var $element = $(this);
|
534 |
-
var val;
|
535 |
-
if ( $element.hasClass('cmb_media_status') ) {
|
536 |
-
// special case for image previews
|
537 |
-
val = $element.html();
|
538 |
-
} else if ( 'checkbox' === $element.attr('type') ) {
|
539 |
-
val = $element.is(':checked');
|
540 |
-
cmb.log( 'checked', val );
|
541 |
-
} else if ( 'select' === $element.prop('tagName') ) {
|
542 |
-
val = $element.is(':selected');
|
543 |
-
cmb.log( 'checked', val );
|
544 |
-
} else {
|
545 |
-
val = $element.val();
|
546 |
-
}
|
547 |
-
// Get all the current values per element
|
548 |
-
inputVals.push( { val: val, $: $element } );
|
549 |
-
});
|
550 |
-
// And swap them all
|
551 |
-
$goto.find( cmb.repeatEls ).each( function( index ) {
|
552 |
-
var $element = $(this);
|
553 |
-
var val;
|
554 |
-
|
555 |
-
if ( $element.hasClass('cmb_media_status') ) {
|
556 |
-
// special case for image previews
|
557 |
-
val = $element.html();
|
558 |
-
$element.html( inputVals[ index ]['val'] );
|
559 |
-
inputVals[ index ]['$'].html( val );
|
560 |
-
|
561 |
-
}
|
562 |
-
// handle checkbox swapping
|
563 |
-
else if ( 'checkbox' === $element.attr('type') ) {
|
564 |
-
inputVals[ index ]['$'].prop( 'checked', $element.is(':checked') );
|
565 |
-
$element.prop( 'checked', inputVals[ index ]['val'] );
|
566 |
-
}
|
567 |
-
// handle select swapping
|
568 |
-
else if ( 'select' === $element.prop('tagName') ) {
|
569 |
-
inputVals[ index ]['$'].prop( 'selected', $element.is(':selected') );
|
570 |
-
$element.prop( 'selected', inputVals[ index ]['val'] );
|
571 |
-
}
|
572 |
-
// handle normal input swapping
|
573 |
-
else {
|
574 |
-
inputVals[ index ]['$'].val( $element.val() );
|
575 |
-
$element.val( inputVals[ index ]['val'] );
|
576 |
-
}
|
577 |
-
});
|
578 |
-
};
|
579 |
-
|
580 |
-
/**
|
581 |
-
* @todo make work, always
|
582 |
-
*/
|
583 |
-
cmb.initPickers = function( $timePickers, $datePickers, $colorPickers ) {
|
584 |
-
// Initialize timepicker
|
585 |
-
cmb.initTimePickers( $timePickers );
|
586 |
-
|
587 |
-
// Initialize jQuery UI datepicker
|
588 |
-
cmb.initDatePickers( $datePickers );
|
589 |
-
|
590 |
-
// Initialize color picker
|
591 |
-
cmb.initColorPickers( $colorPickers );
|
592 |
-
};
|
593 |
-
|
594 |
-
cmb.initTimePickers = function( $selector ) {
|
595 |
-
if ( ! $selector.length ) {
|
596 |
-
return;
|
597 |
-
}
|
598 |
-
|
599 |
-
$selector.timePicker({
|
600 |
-
startTime: "00:00",
|
601 |
-
endTime: "23:59",
|
602 |
-
show24Hours: false,
|
603 |
-
separator: ':',
|
604 |
-
step: 30
|
605 |
-
});
|
606 |
-
};
|
607 |
-
|
608 |
-
cmb.initDatePickers = function( $selector ) {
|
609 |
-
if ( ! $selector.length ) {
|
610 |
-
return;
|
611 |
-
}
|
612 |
-
|
613 |
-
$selector.datepicker( "destroy" );
|
614 |
-
$selector.datepicker();
|
615 |
-
};
|
616 |
-
|
617 |
-
cmb.initColorPickers = function( $selector ) {
|
618 |
-
if ( ! $selector.length ) {
|
619 |
-
return;
|
620 |
-
}
|
621 |
-
if (typeof jQuery.wp === 'object' && typeof jQuery.wp.wpColorPicker === 'function') {
|
622 |
-
|
623 |
-
$selector.wpColorPicker();
|
624 |
-
|
625 |
-
} else {
|
626 |
-
$selector.each( function(i) {
|
627 |
-
$(this).after('<div id="picker-' + i + '" style="z-index: 1000; background: #EEE; border: 1px solid #CCC; position: absolute; display: block;"></div>');
|
628 |
-
$('#picker-' + i).hide().farbtastic($(this));
|
629 |
-
})
|
630 |
-
.focus( function() {
|
631 |
-
$(this).next().show();
|
632 |
-
})
|
633 |
-
.blur( function() {
|
634 |
-
$(this).next().hide();
|
635 |
-
});
|
636 |
-
}
|
637 |
-
};
|
638 |
-
|
639 |
-
cmb.maybeOembed = function( evt ) {
|
640 |
-
var $self = $(this);
|
641 |
-
var type = evt.type;
|
642 |
-
|
643 |
-
var m = {
|
644 |
-
focusout : function() {
|
645 |
-
setTimeout( function() {
|
646 |
-
// if it's been 2 seconds, hide our spinner
|
647 |
-
cmb.spinner( '.postbox table.cmb_metabox', true );
|
648 |
-
}, 2000);
|
649 |
-
},
|
650 |
-
keyup : function() {
|
651 |
-
var betw = function( min, max ) {
|
652 |
-
return ( evt.which <= max && evt.which >= min );
|
653 |
-
};
|
654 |
-
// Only Ajax on normal keystrokes
|
655 |
-
if ( betw( 48, 90 ) || betw( 96, 111 ) || betw( 8, 9 ) || evt.which === 187 || evt.which === 190 ) {
|
656 |
-
// fire our ajax function
|
657 |
-
cmb.doAjax( $self, evt);
|
658 |
-
}
|
659 |
-
},
|
660 |
-
paste : function() {
|
661 |
-
// paste event is fired before the value is filled, so wait a bit
|
662 |
-
setTimeout( function() { cmb.doAjax( $self ); }, 100);
|
663 |
-
}
|
664 |
-
};
|
665 |
-
m[type]();
|
666 |
-
|
667 |
-
};
|
668 |
-
|
669 |
-
/**
|
670 |
-
* Resize oEmbed videos to fit in their respective metaboxes
|
671 |
-
*/
|
672 |
-
cmb.resizeoEmbeds = function() {
|
673 |
-
cmb.metabox().each( function() {
|
674 |
-
var $self = $(this);
|
675 |
-
var $tableWrap = $self.parents('.inside');
|
676 |
-
if ( ! $tableWrap.length ) {
|
677 |
-
return true; // continue
|
678 |
-
}
|
679 |
-
|
680 |
-
// Calculate new width
|
681 |
-
var newWidth = Math.round(($tableWrap.width() * 0.82)*0.97) - 30;
|
682 |
-
if ( newWidth > 639 ) {
|
683 |
-
return true; // continue
|
684 |
-
}
|
685 |
-
|
686 |
-
var $embeds = $self.find('.cmb-type-oembed .embed_status');
|
687 |
-
var $children = $embeds.children().not('.cmb_remove_wrapper');
|
688 |
-
if ( ! $children.length ) {
|
689 |
-
return true; // continue
|
690 |
-
}
|
691 |
-
|
692 |
-
$children.each( function() {
|
693 |
-
var $self = $(this);
|
694 |
-
var iwidth = $self.width();
|
695 |
-
var iheight = $self.height();
|
696 |
-
var _newWidth = newWidth;
|
697 |
-
if ( $self.parents( '.repeat-row' ).length ) {
|
698 |
-
// Make room for our repeatable "remove" button column
|
699 |
-
_newWidth = newWidth - 91;
|
700 |
-
}
|
701 |
-
// Calc new height
|
702 |
-
var newHeight = Math.round((_newWidth * iheight)/iwidth);
|
703 |
-
$self.width(_newWidth).height(newHeight);
|
704 |
-
});
|
705 |
-
|
706 |
-
});
|
707 |
-
};
|
708 |
-
|
709 |
-
/**
|
710 |
-
* Safely log things if query var is set
|
711 |
-
* @since 1.0.0
|
712 |
-
*/
|
713 |
-
cmb.log = function() {
|
714 |
-
if ( l10n.script_debug && console && typeof console.log === 'function' ) {
|
715 |
-
console.log.apply(console, arguments);
|
716 |
-
}
|
717 |
-
};
|
718 |
-
|
719 |
-
cmb.spinner = function( $context, hide ) {
|
720 |
-
if ( hide ) {
|
721 |
-
$('.cmb-spinner', $context ).hide();
|
722 |
-
}
|
723 |
-
else {
|
724 |
-
$('.cmb-spinner', $context ).show();
|
725 |
-
}
|
726 |
-
};
|
727 |
-
|
728 |
-
// function for running our ajax
|
729 |
-
cmb.doAjax = function($obj) {
|
730 |
-
// get typed value
|
731 |
-
var oembed_url = $obj.val();
|
732 |
-
// only proceed if the field contains more than 6 characters
|
733 |
-
if ( oembed_url.length < 6 ) {
|
734 |
-
return;
|
735 |
-
}
|
736 |
-
|
737 |
-
// only proceed if the user has pasted, pressed a number, letter, or whitelisted characters
|
738 |
-
|
739 |
-
// get field id
|
740 |
-
var field_id = $obj.attr('id');
|
741 |
-
// get our inputs $context for pinpointing
|
742 |
-
var $context = $obj.parents('.cmb-repeat-table tr td');
|
743 |
-
$context = $context.length ? $context : $obj.parents('.cmb_metabox tr td');
|
744 |
-
|
745 |
-
var embed_container = $('.embed_status', $context);
|
746 |
-
var oembed_width = $obj.width();
|
747 |
-
var child_el = $(':first-child', embed_container);
|
748 |
-
|
749 |
-
// http://www.youtube.com/watch?v=dGG7aru2S6U
|
750 |
-
cmb.log( 'oembed_url', oembed_url, field_id );
|
751 |
-
oembed_width = ( embed_container.length && child_el.length ) ? child_el.width() : $obj.width();
|
752 |
-
|
753 |
-
// show our spinner
|
754 |
-
cmb.spinner( $context );
|
755 |
-
// clear out previous results
|
756 |
-
$('.embed_wrap', $context).html('');
|
757 |
-
// and run our ajax function
|
758 |
-
setTimeout( function() {
|
759 |
-
// if they haven't typed in 500 ms
|
760 |
-
if ( $('.cmb_oembed:focus').val() !== oembed_url ) {
|
761 |
-
return;
|
762 |
-
}
|
763 |
-
$.ajax({
|
764 |
-
type : 'post',
|
765 |
-
dataType : 'json',
|
766 |
-
url : l10n.ajaxurl,
|
767 |
-
data : {
|
768 |
-
'action': 'cmb_oembed_handler',
|
769 |
-
'oembed_url': oembed_url,
|
770 |
-
'oembed_width': oembed_width > 300 ? oembed_width : 300,
|
771 |
-
'field_id': field_id,
|
772 |
-
'object_id': $obj.data('objectid'),
|
773 |
-
'object_type': $obj.data('objecttype'),
|
774 |
-
'cmb_ajax_nonce': l10n.ajax_nonce
|
775 |
-
},
|
776 |
-
success: function(response) {
|
777 |
-
cmb.log( response );
|
778 |
-
// Make sure we have a response id
|
779 |
-
if ( typeof response.id === 'undefined' ) {
|
780 |
-
return;
|
781 |
-
}
|
782 |
-
|
783 |
-
// hide our spinner
|
784 |
-
cmb.spinner( $context, true );
|
785 |
-
// and populate our results from ajax response
|
786 |
-
$('.embed_wrap', $context).html(response.result);
|
787 |
-
}
|
788 |
-
});
|
789 |
-
|
790 |
-
}, 500);
|
791 |
-
};
|
792 |
-
|
793 |
-
$(document).ready(cmb.init);
|
794 |
-
|
795 |
-
return cmb;
|
796 |
-
|
797 |
-
})(window, document, jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/cmb_metaboxes/js/cmb.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
window.CMB=function(window,document,$){"use strict";var l10n=window.cmb_l10,setTimeout=window.setTimeout,cmb={formfield:"",idNumber:!1,file_frames:{},repeatEls:'input:not([type="button"]),select,textarea,.cmb_media_status'};return cmb.metabox=function(){return cmb.$metabox?cmb.$metabox:(cmb.$metabox=$("table.cmb_metabox"),cmb.$metabox)},cmb.init=function(){var $metabox=cmb.metabox(),$repeatGroup=$metabox.find(".repeatable-group");l10n.new_admin_style&&$metabox.find(".cmb-spinner img").hide(),cmb.initPickers($metabox.find("input:text.cmb_timepicker"),$metabox.find("input:text.cmb_datepicker"),$metabox.find("input:text.cmb_colorpicker")),$("#ui-datepicker-div").wrap('<div class="cmb_element" />'),$('<p><span class="button cmb-multicheck-toggle">'+l10n.check_toggle+"</span></p>").insertBefore("ul.cmb_checkbox_list"),$metabox.on("change",".cmb_upload_file",function(){cmb.formfield=$(this).attr("id"),$("#"+cmb.formfield+"_id").val("")}).on("click",".cmb-multicheck-toggle",cmb.toggleCheckBoxes).on("click",".cmb_upload_button",cmb.handleMedia).on("click",".cmb_remove_file_button",cmb.handleRemoveMedia).on("click",".add-group-row",cmb.addGroupRow).on("click",".add-row-button",cmb.addAjaxRow).on("click",".remove-group-row",cmb.removeGroupRow).on("click",".remove-row-button",cmb.removeAjaxRow).on("keyup paste focusout",".cmb_oembed",cmb.maybeOembed).on("cmb_remove_row",".repeatable-group",cmb.resetTitlesAndIterator),$repeatGroup.length&&$repeatGroup.filter(".sortable").each(function(){$(this).find(".remove-group-row").before('<a class="shift-rows move-up alignleft" href="#">'+l10n.up_arrow+'</a> <a class="shift-rows move-down alignleft" href="#">'+l10n.down_arrow+"</a>")}).on("click",".shift-rows",cmb.shiftRows).on("cmb_add_row",cmb.emptyValue),setTimeout(cmb.resizeoEmbeds,500),$(window).on("resize",cmb.resizeoEmbeds)},cmb.resetTitlesAndIterator=function(){$(".repeatable-group").each(function(){var $table=$(this);$table.find(".repeatable-grouping").each(function(rowindex){var $row=$(this);$row.data("iterator",rowindex),$row.find(".cmb-group-title h4").text($table.find(".add-group-row").data("grouptitle").replace("{#}",rowindex+1))})})},cmb.toggleCheckBoxes=function(event){event.preventDefault();var $self=$(this),$multicheck=$self.parents("td").find("input[type=checkbox]");$self.data("checked")?($multicheck.prop("checked",!1),$self.data("checked",!1)):($multicheck.prop("checked",!0),$self.data("checked",!0))},cmb.handleMedia=function(event){if(wp){event.preventDefault();var $metabox=cmb.metabox(),$self=$(this);cmb.formfield=$self.prev("input").attr("id");var $formfield=$("#"+cmb.formfield),formName=$formfield.attr("name"),uploadStatus=!0,attachment=!0,isList=$self.hasClass("cmb_upload_list");if(cmb.formfield in cmb.file_frames)return void cmb.file_frames[cmb.formfield].open();cmb.file_frames[cmb.formfield]=wp.media.frames.file_frame=wp.media({title:$metabox.find("label[for="+cmb.formfield+"]").text(),button:{text:l10n.upload_file},multiple:isList?!0:!1});var handlers={list:function(selection){attachment=selection.toJSON(),$formfield.val(attachment.url),$("#"+cmb.formfield+"_id").val(attachment.id);var fileGroup=[];$(attachment).each(function(){uploadStatus=this.type&&"image"===this.type?'<li class="img_status"><img width="50" height="50" src="'+this.url+'" class="attachment-50x50" alt="'+this.filename+'"><p><a href="#" class="cmb_remove_file_button" rel="'+cmb.formfield+"["+this.id+']">'+l10n.remove_image+'</a></p><input type="hidden" id="filelist-'+this.id+'" name="'+formName+"["+this.id+']" value="'+this.url+'"></li>':"<li>"+l10n.file+" <strong>"+this.filename+'</strong> (<a href="'+this.url+'" target="_blank" rel="external">'+l10n.download+'</a> / <a href="#" class="cmb_remove_file_button" rel="'+cmb.formfield+"["+this.id+']">'+l10n.remove_file+'</a>)<input type="hidden" id="filelist-'+this.id+'" name="'+formName+"["+this.id+']" value="'+this.url+'"></li>',fileGroup.push(uploadStatus)}),$(fileGroup).each(function(){$formfield.siblings(".cmb_media_status").slideDown().append(this)})},single:function(selection){attachment=selection.first().toJSON(),$formfield.val(attachment.url),$("#"+cmb.formfield+"_id").val(attachment.id),uploadStatus=attachment.type&&"image"===attachment.type?'<div class="img_status"><img style="max-width: 350px; width: 100%; height: auto;" src="'+attachment.url+'" alt="'+attachment.filename+'" title="'+attachment.filename+'" /><p><a href="#" class="cmb_remove_file_button" rel="'+cmb.formfield+'">'+l10n.remove_image+"</a></p></div>":l10n.file+" <strong>"+attachment.filename+'</strong> (<a href="'+attachment.url+'" target="_blank" rel="external">'+l10n.download+'</a> / <a href="#" class="cmb_remove_file_button" rel="'+cmb.formfield+'">'+l10n.remove_file+"</a>)",$formfield.siblings(".cmb_media_status").slideDown().html(uploadStatus)}};cmb.file_frames[cmb.formfield].on("select",function(){var selection=cmb.file_frames[cmb.formfield].state().get("selection"),type=isList?"list":"single";handlers[type](selection)}),cmb.file_frames[cmb.formfield].open()}},cmb.handleRemoveMedia=function(event){event.preventDefault();var $self=$(this);if($self.is(".attach_list .cmb_remove_file_button"))return $self.parents("li").remove(),!1;cmb.formfield=$self.attr("rel");var $container=$self.parents(".img_status");return cmb.metabox().find("input#"+cmb.formfield).val(""),cmb.metabox().find("input#"+cmb.formfield+"_id").val(""),$container.length?$container.html(""):$self.parents(".cmb_media_status").html(""),!1},$.fn.replaceText=function(b,a,c){return this.each(function(){var g,e,f=this.firstChild,d=[];if(f)do 3===f.nodeType&&(g=f.nodeValue,e=g.replace(b,a),e!==g&&(!c&&/</.test(e)?($(f).before(e),d.push(f)):f.nodeValue=e));while(f=f.nextSibling);d.length&&$(d).remove()})},$.fn.cleanRow=function(prevNum,group){var $self=$(this),$inputs=$self.find('input:not([type="button"]), select, textarea, label');return group&&$self.find(".cmb-repeat-table .repeat-row:not(:first-child)").remove(),cmb.$focus=!1,cmb.neweditor_id=[],$inputs.filter(":checked").removeAttr("checked"),$inputs.filter(":selected").removeAttr("selected"),$self.find(".cmb-group-title")&&$self.find(".cmb-group-title h4").text($self.data("title").replace("{#}",cmb.idNumber+1)),$inputs.each(function(){var newID,oldID,$newInput=$(this),isEditor=$newInput.hasClass("wp-editor-area"),oldFor=$newInput.attr("for"),attrs={};if(oldFor)attrs={"for":oldFor.replace("_"+prevNum,"_"+cmb.idNumber)};else{var oldName=$newInput.attr("name"),newName=oldName?oldName.replace("["+prevNum+"]","["+cmb.idNumber+"]"):"";oldID=$newInput.attr("id"),newID=oldID?oldID.replace("_"+prevNum,"_"+cmb.idNumber):"",attrs={id:newID,name:newName,"data-iterator":cmb.idNumber}}if($newInput.removeClass("hasDatepicker").attr(attrs).val(""),isEditor){newID=newID?oldID.replace("zx"+prevNum,"zx"+cmb.idNumber):"",$newInput.html("");var $wysiwyg=$newInput.parents(".cmb-type-wysiwyg");$wysiwyg.find(".mce-tinymce:not(:first-child)").remove();var html=$wysiwyg.html().replace(new RegExp(oldID,"g"),newID);$wysiwyg.html(html),cmb.neweditor_id.push({id:newID,old:oldID})}cmb.$focus=cmb.$focus?cmb.$focus:$newInput}),this},$.fn.newRowHousekeeping=function(){var $row=$(this),$colorPicker=$row.find(".wp-picker-container"),$list=$row.find(".cmb_media_status");return $colorPicker.length&&$colorPicker.each(function(){var $td=$(this).parent();$td.html($td.find("input:text.cmb_colorpicker").attr("style",""))}),$list.length&&$list.empty(),this},cmb.afterRowInsert=function($row){cmb.$focus&&cmb.$focus.focus();var _prop;if(cmb.neweditor_id.length){var i;for(i=cmb.neweditor_id.length-1;i>=0;i--){var id=cmb.neweditor_id[i].id,old=cmb.neweditor_id[i].old;if("undefined"==typeof tinyMCEPreInit.mceInit[id]){var newSettings=jQuery.extend({},tinyMCEPreInit.mceInit[old]);for(_prop in newSettings)"string"==typeof newSettings[_prop]&&(newSettings[_prop]=newSettings[_prop].replace(new RegExp(old,"g"),id));tinyMCEPreInit.mceInit[id]=newSettings}if("undefined"==typeof tinyMCEPreInit.qtInit[id]){var newQTS=jQuery.extend({},tinyMCEPreInit.qtInit[old]);for(_prop in newQTS)"string"==typeof newQTS[_prop]&&(newQTS[_prop]=newQTS[_prop].replace(new RegExp(old,"g"),id));tinyMCEPreInit.qtInit[id]=newQTS}tinyMCE.init({id:tinyMCEPreInit.mceInit[id]})}}cmb.initPickers($row.find("input:text.cmb_timepicker"),$row.find("input:text.cmb_datepicker"),$row.find("input:text.cmb_colorpicker"))},cmb.updateNameAttr=function(){var $this=$(this),name=$this.attr("name");if("undefined"==typeof name)return!1;var prevNum=parseInt($this.parents(".repeatable-grouping").data("iterator")),newNum=prevNum-1,$newName=name.replace("["+prevNum+"]","["+newNum+"]");$this.attr("name",$newName)},cmb.emptyValue=function(event,row){$('input:not([type="button"]), textarea',row).val("")},cmb.addGroupRow=function(event){event.preventDefault();var $self=$(this),$table=$("#"+$self.data("selector")),$oldRow=$table.find(".repeatable-grouping").last(),prevNum=parseInt($oldRow.data("iterator"));cmb.idNumber=prevNum+1;var $row=$oldRow.clone();$row.data("title",$self.data("grouptitle")).newRowHousekeeping().cleanRow(prevNum,!0);var $newRow=$('<tr class="repeatable-grouping" data-iterator="'+cmb.idNumber+'">'+$row.html()+"</tr>");$oldRow.after($newRow),cmb.afterRowInsert($newRow),$table.find(".repeatable-grouping").length<=1?$table.find(".remove-group-row").prop("disabled",!0):$table.find(".remove-group-row").removeAttr("disabled"),$table.trigger("cmb_add_row",$newRow)},cmb.addAjaxRow=function(event){event.preventDefault();var $self=$(this),tableselector="#"+$self.data("selector"),$table=$(tableselector),$emptyrow=$table.find(".empty-row"),prevNum=parseInt($emptyrow.find("[data-iterator]").data("iterator"));cmb.idNumber=prevNum+1;var $row=$emptyrow.clone();$row.newRowHousekeeping().cleanRow(prevNum),$emptyrow.removeClass("empty-row").addClass("repeat-row"),$emptyrow.after($row),cmb.afterRowInsert($row),$table.trigger("cmb_add_row",$row)},cmb.removeGroupRow=function(event){event.preventDefault();var $self=$(this),$table=$("#"+$self.data("selector")),$parent=$self.parents(".repeatable-grouping"),noRows=$table.find(".repeatable-grouping").length;$parent.nextAll(".repeatable-grouping").find(cmb.repeatEls).each(cmb.updateNameAttr),noRows>1&&($parent.remove(),3>noRows?$table.find(".remove-group-row").prop("disabled",!0):$table.find(".remove-group-row").prop("disabled",!1),$table.trigger("cmb_remove_row"))},cmb.removeAjaxRow=function(event){event.preventDefault();var $self=$(this),$parent=$self.parents("tr"),$table=$self.parents(".cmb-repeat-table");$table.find("tr").length>1&&($parent.hasClass("empty-row")&&$parent.prev().addClass("empty-row").removeClass("repeat-row"),$self.parents(".cmb-repeat-table tr").remove(),$table.trigger("cmb_remove_row"))},cmb.shiftRows=function(event){event.preventDefault();var $self=$(this),$parent=$self.parents(".repeatable-grouping"),$goto=$self.hasClass("move-up")?$parent.prev(".repeatable-grouping"):$parent.next(".repeatable-grouping");if($goto.length){var inputVals=[];$parent.find(cmb.repeatEls).each(function(){var val,$element=$(this);$element.hasClass("cmb_media_status")?val=$element.html():"checkbox"===$element.attr("type")?(val=$element.is(":checked"),cmb.log("checked",val)):"select"===$element.prop("tagName")?(val=$element.is(":selected"),cmb.log("checked",val)):val=$element.val(),inputVals.push({val:val,$:$element})}),$goto.find(cmb.repeatEls).each(function(index){var val,$element=$(this);$element.hasClass("cmb_media_status")?(val=$element.html(),$element.html(inputVals[index].val),inputVals[index].$.html(val)):"checkbox"===$element.attr("type")?(inputVals[index].$.prop("checked",$element.is(":checked")),$element.prop("checked",inputVals[index].val)):"select"===$element.prop("tagName")?(inputVals[index].$.prop("selected",$element.is(":selected")),$element.prop("selected",inputVals[index].val)):(inputVals[index].$.val($element.val()),$element.val(inputVals[index].val))})}},cmb.initPickers=function($timePickers,$datePickers,$colorPickers){cmb.initTimePickers($timePickers),cmb.initDatePickers($datePickers),cmb.initColorPickers($colorPickers)},cmb.initTimePickers=function($selector){$selector.length&&$selector.timePicker({startTime:"00:00",endTime:"23:59",show24Hours:!1,separator:":",step:30})},cmb.initDatePickers=function($selector){$selector.length&&($selector.datepicker("destroy"),$selector.datepicker())},cmb.initColorPickers=function($selector){$selector.length&&("object"==typeof jQuery.wp&&"function"==typeof jQuery.wp.wpColorPicker?$selector.wpColorPicker():$selector.each(function(i){$(this).after('<div id="picker-'+i+'" style="z-index: 1000; background: #EEE; border: 1px solid #CCC; position: absolute; display: block;"></div>'),$("#picker-"+i).hide().farbtastic($(this))}).focus(function(){$(this).next().show()}).blur(function(){$(this).next().hide()}))},cmb.maybeOembed=function(evt){var $self=$(this),type=evt.type,m={focusout:function(){setTimeout(function(){cmb.spinner(".postbox table.cmb_metabox",!0)},2e3)},keyup:function(){var betw=function(min,max){return evt.which<=max&&evt.which>=min};(betw(48,90)||betw(96,111)||betw(8,9)||187===evt.which||190===evt.which)&&cmb.doAjax($self,evt)},paste:function(){setTimeout(function(){cmb.doAjax($self)},100)}};m[type]()},cmb.resizeoEmbeds=function(){cmb.metabox().each(function(){var $self=$(this),$tableWrap=$self.parents(".inside");if(!$tableWrap.length)return!0;var newWidth=Math.round(.82*$tableWrap.width()*.97)-30;if(newWidth>639)return!0;var $embeds=$self.find(".cmb-type-oembed .embed_status"),$children=$embeds.children().not(".cmb_remove_wrapper");return $children.length?void $children.each(function(){var $self=$(this),iwidth=$self.width(),iheight=$self.height(),_newWidth=newWidth;$self.parents(".repeat-row").length&&(_newWidth=newWidth-91);var newHeight=Math.round(_newWidth*iheight/iwidth);$self.width(_newWidth).height(newHeight)}):!0})},cmb.log=function(){l10n.script_debug&&console&&"function"==typeof console.log&&console.log.apply(console,arguments)},cmb.spinner=function($context,hide){hide?$(".cmb-spinner",$context).hide():$(".cmb-spinner",$context).show()},cmb.doAjax=function($obj){var oembed_url=$obj.val();if(!(oembed_url.length<6)){var field_id=$obj.attr("id"),$context=$obj.parents(".cmb-repeat-table tr td");$context=$context.length?$context:$obj.parents(".cmb_metabox tr td");var embed_container=$(".embed_status",$context),oembed_width=$obj.width(),child_el=$(":first-child",embed_container);cmb.log("oembed_url",oembed_url,field_id),oembed_width=embed_container.length&&child_el.length?child_el.width():$obj.width(),cmb.spinner($context),$(".embed_wrap",$context).html(""),setTimeout(function(){$(".cmb_oembed:focus").val()===oembed_url&&$.ajax({type:"post",dataType:"json",url:l10n.ajaxurl,data:{action:"cmb_oembed_handler",oembed_url:oembed_url,oembed_width:oembed_width>300?oembed_width:300,field_id:field_id,object_id:$obj.data("objectid"),object_type:$obj.data("objecttype"),cmb_ajax_nonce:l10n.ajax_nonce},success:function(response){cmb.log(response),"undefined"!=typeof response.id&&(cmb.spinner($context,!0),$(".embed_wrap",$context).html(response.result))}})},500)}},$(document).ready(cmb.init),cmb}(window,document,jQuery);
|
|
lib/cmb_metaboxes/js/jquery.datePicker.min.js
DELETED
@@ -1,2038 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery UI Datepicker 1.10.4
|
3 |
-
* http://jqueryui.com
|
4 |
-
*
|
5 |
-
* Copyright 2014 jQuery Foundation and other contributors
|
6 |
-
* Released under the MIT license.
|
7 |
-
* http://jquery.org/license
|
8 |
-
*
|
9 |
-
* http://api.jqueryui.com/datepicker/
|
10 |
-
*
|
11 |
-
* Depends:
|
12 |
-
* jquery.ui.core.js
|
13 |
-
*/
|
14 |
-
(function( $, undefined ) {
|
15 |
-
|
16 |
-
$.extend($.ui, { datepicker: { version: "1.10.4" } });
|
17 |
-
|
18 |
-
var PROP_NAME = "datepicker",
|
19 |
-
instActive;
|
20 |
-
|
21 |
-
/* Date picker manager.
|
22 |
-
Use the singleton instance of this class, $.datepicker, to interact with the date picker.
|
23 |
-
Settings for (groups of) date pickers are maintained in an instance object,
|
24 |
-
allowing multiple different settings on the same page. */
|
25 |
-
|
26 |
-
function Datepicker() {
|
27 |
-
this._curInst = null; // The current instance in use
|
28 |
-
this._keyEvent = false; // If the last event was a key event
|
29 |
-
this._disabledInputs = []; // List of date picker inputs that have been disabled
|
30 |
-
this._datepickerShowing = false; // True if the popup picker is showing , false if not
|
31 |
-
this._inDialog = false; // True if showing within a "dialog", false if not
|
32 |
-
this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
|
33 |
-
this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
|
34 |
-
this._appendClass = "ui-datepicker-append"; // The name of the append marker class
|
35 |
-
this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
|
36 |
-
this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
|
37 |
-
this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
|
38 |
-
this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
|
39 |
-
this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
|
40 |
-
this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
|
41 |
-
this.regional = []; // Available regional settings, indexed by language code
|
42 |
-
this.regional[""] = { // Default regional settings
|
43 |
-
closeText: "Done", // Display text for close link
|
44 |
-
prevText: "Prev", // Display text for previous month link
|
45 |
-
nextText: "Next", // Display text for next month link
|
46 |
-
currentText: "Today", // Display text for current month link
|
47 |
-
monthNames: ["January","February","March","April","May","June",
|
48 |
-
"July","August","September","October","November","December"], // Names of months for drop-down and formatting
|
49 |
-
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting
|
50 |
-
dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting
|
51 |
-
dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting
|
52 |
-
dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday
|
53 |
-
weekHeader: "Wk", // Column header for week of the year
|
54 |
-
dateFormat: "mm/dd/yy", // See format options on parseDate
|
55 |
-
firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
|
56 |
-
isRTL: false, // True if right-to-left language, false if left-to-right
|
57 |
-
showMonthAfterYear: false, // True if the year select precedes month, false for month then year
|
58 |
-
yearSuffix: "" // Additional text to append to the year in the month headers
|
59 |
-
};
|
60 |
-
this._defaults = { // Global defaults for all the date picker instances
|
61 |
-
showOn: "focus", // "focus" for popup on focus,
|
62 |
-
// "button" for trigger button, or "both" for either
|
63 |
-
showAnim: "fadeIn", // Name of jQuery animation for popup
|
64 |
-
showOptions: {}, // Options for enhanced animations
|
65 |
-
defaultDate: null, // Used when field is blank: actual date,
|
66 |
-
// +/-number for offset from today, null for today
|
67 |
-
appendText: "", // Display text following the input box, e.g. showing the format
|
68 |
-
buttonText: "...", // Text for trigger button
|
69 |
-
buttonImage: "", // URL for trigger button image
|
70 |
-
buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
|
71 |
-
hideIfNoPrevNext: false, // True to hide next/previous month links
|
72 |
-
// if not applicable, false to just disable them
|
73 |
-
navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
|
74 |
-
gotoCurrent: false, // True if today link goes back to current selection instead
|
75 |
-
changeMonth: false, // True if month can be selected directly, false if only prev/next
|
76 |
-
changeYear: false, // True if year can be selected directly, false if only prev/next
|
77 |
-
yearRange: "c-10:c+10", // Range of years to display in drop-down,
|
78 |
-
// either relative to today's year (-nn:+nn), relative to currently displayed year
|
79 |
-
// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
|
80 |
-
showOtherMonths: false, // True to show dates in other months, false to leave blank
|
81 |
-
selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
|
82 |
-
showWeek: false, // True to show week of the year, false to not show it
|
83 |
-
calculateWeek: this.iso8601Week, // How to calculate the week of the year,
|
84 |
-
// takes a Date and returns the number of the week for it
|
85 |
-
shortYearCutoff: "+10", // Short year values < this are in the current century,
|
86 |
-
// > this are in the previous century,
|
87 |
-
// string value starting with "+" for current year + value
|
88 |
-
minDate: null, // The earliest selectable date, or null for no limit
|
89 |
-
maxDate: null, // The latest selectable date, or null for no limit
|
90 |
-
duration: "fast", // Duration of display/closure
|
91 |
-
beforeShowDay: null, // Function that takes a date and returns an array with
|
92 |
-
// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
|
93 |
-
// [2] = cell title (optional), e.g. $.datepicker.noWeekends
|
94 |
-
beforeShow: null, // Function that takes an input field and
|
95 |
-
// returns a set of custom settings for the date picker
|
96 |
-
onSelect: null, // Define a callback function when a date is selected
|
97 |
-
onChangeMonthYear: null, // Define a callback function when the month or year is changed
|
98 |
-
onClose: null, // Define a callback function when the datepicker is closed
|
99 |
-
numberOfMonths: 1, // Number of months to show at a time
|
100 |
-
showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
|
101 |
-
stepMonths: 1, // Number of months to step back/forward
|
102 |
-
stepBigMonths: 12, // Number of months to step back/forward for the big links
|
103 |
-
altField: "", // Selector for an alternate field to store selected dates into
|
104 |
-
altFormat: "", // The date format to use for the alternate field
|
105 |
-
constrainInput: true, // The input is constrained by the current date format
|
106 |
-
showButtonPanel: false, // True to show button panel, false to not show it
|
107 |
-
autoSize: false, // True to size the input for the date format, false to leave as is
|
108 |
-
disabled: false // The initial disabled state
|
109 |
-
};
|
110 |
-
$.extend(this._defaults, this.regional[""]);
|
111 |
-
this.dpDiv = bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
|
112 |
-
}
|
113 |
-
|
114 |
-
$.extend(Datepicker.prototype, {
|
115 |
-
/* Class name added to elements to indicate already configured with a date picker. */
|
116 |
-
markerClassName: "hasDatepicker",
|
117 |
-
|
118 |
-
//Keep track of the maximum number of rows displayed (see #7043)
|
119 |
-
maxRows: 4,
|
120 |
-
|
121 |
-
// TODO rename to "widget" when switching to widget factory
|
122 |
-
_widgetDatepicker: function() {
|
123 |
-
return this.dpDiv;
|
124 |
-
},
|
125 |
-
|
126 |
-
/* Override the default settings for all instances of the date picker.
|
127 |
-
* @param settings object - the new settings to use as defaults (anonymous object)
|
128 |
-
* @return the manager object
|
129 |
-
*/
|
130 |
-
setDefaults: function(settings) {
|
131 |
-
extendRemove(this._defaults, settings || {});
|
132 |
-
return this;
|
133 |
-
},
|
134 |
-
|
135 |
-
/* Attach the date picker to a jQuery selection.
|
136 |
-
* @param target element - the target input field or division or span
|
137 |
-
* @param settings object - the new settings to use for this date picker instance (anonymous)
|
138 |
-
*/
|
139 |
-
_attachDatepicker: function(target, settings) {
|
140 |
-
var nodeName, inline, inst;
|
141 |
-
nodeName = target.nodeName.toLowerCase();
|
142 |
-
inline = (nodeName === "div" || nodeName === "span");
|
143 |
-
if (!target.id) {
|
144 |
-
this.uuid += 1;
|
145 |
-
target.id = "dp" + this.uuid;
|
146 |
-
}
|
147 |
-
inst = this._newInst($(target), inline);
|
148 |
-
inst.settings = $.extend({}, settings || {});
|
149 |
-
if (nodeName === "input") {
|
150 |
-
this._connectDatepicker(target, inst);
|
151 |
-
} else if (inline) {
|
152 |
-
this._inlineDatepicker(target, inst);
|
153 |
-
}
|
154 |
-
},
|
155 |
-
|
156 |
-
/* Create a new instance object. */
|
157 |
-
_newInst: function(target, inline) {
|
158 |
-
var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars
|
159 |
-
return {id: id, input: target, // associated target
|
160 |
-
selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
|
161 |
-
drawMonth: 0, drawYear: 0, // month being drawn
|
162 |
-
inline: inline, // is datepicker inline or not
|
163 |
-
dpDiv: (!inline ? this.dpDiv : // presentation div
|
164 |
-
bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};
|
165 |
-
},
|
166 |
-
|
167 |
-
/* Attach the date picker to an input field. */
|
168 |
-
_connectDatepicker: function(target, inst) {
|
169 |
-
var input = $(target);
|
170 |
-
inst.append = $([]);
|
171 |
-
inst.trigger = $([]);
|
172 |
-
if (input.hasClass(this.markerClassName)) {
|
173 |
-
return;
|
174 |
-
}
|
175 |
-
this._attachments(input, inst);
|
176 |
-
input.addClass(this.markerClassName).keydown(this._doKeyDown).
|
177 |
-
keypress(this._doKeyPress).keyup(this._doKeyUp);
|
178 |
-
this._autoSize(inst);
|
179 |
-
$.data(target, PROP_NAME, inst);
|
180 |
-
//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
|
181 |
-
if( inst.settings.disabled ) {
|
182 |
-
this._disableDatepicker( target );
|
183 |
-
}
|
184 |
-
},
|
185 |
-
|
186 |
-
/* Make attachments based on settings. */
|
187 |
-
_attachments: function(input, inst) {
|
188 |
-
var showOn, buttonText, buttonImage,
|
189 |
-
appendText = this._get(inst, "appendText"),
|
190 |
-
isRTL = this._get(inst, "isRTL");
|
191 |
-
|
192 |
-
if (inst.append) {
|
193 |
-
inst.append.remove();
|
194 |
-
}
|
195 |
-
if (appendText) {
|
196 |
-
inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>");
|
197 |
-
input[isRTL ? "before" : "after"](inst.append);
|
198 |
-
}
|
199 |
-
|
200 |
-
input.unbind("focus", this._showDatepicker);
|
201 |
-
|
202 |
-
if (inst.trigger) {
|
203 |
-
inst.trigger.remove();
|
204 |
-
}
|
205 |
-
|
206 |
-
showOn = this._get(inst, "showOn");
|
207 |
-
if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field
|
208 |
-
input.focus(this._showDatepicker);
|
209 |
-
}
|
210 |
-
if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked
|
211 |
-
buttonText = this._get(inst, "buttonText");
|
212 |
-
buttonImage = this._get(inst, "buttonImage");
|
213 |
-
inst.trigger = $(this._get(inst, "buttonImageOnly") ?
|
214 |
-
$("<img/>").addClass(this._triggerClass).
|
215 |
-
attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
|
216 |
-
$("<button type='button'></button>").addClass(this._triggerClass).
|
217 |
-
html(!buttonImage ? buttonText : $("<img/>").attr(
|
218 |
-
{ src:buttonImage, alt:buttonText, title:buttonText })));
|
219 |
-
input[isRTL ? "before" : "after"](inst.trigger);
|
220 |
-
inst.trigger.click(function() {
|
221 |
-
if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {
|
222 |
-
$.datepicker._hideDatepicker();
|
223 |
-
} else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {
|
224 |
-
$.datepicker._hideDatepicker();
|
225 |
-
$.datepicker._showDatepicker(input[0]);
|
226 |
-
} else {
|
227 |
-
$.datepicker._showDatepicker(input[0]);
|
228 |
-
}
|
229 |
-
return false;
|
230 |
-
});
|
231 |
-
}
|
232 |
-
},
|
233 |
-
|
234 |
-
/* Apply the maximum length for the date format. */
|
235 |
-
_autoSize: function(inst) {
|
236 |
-
if (this._get(inst, "autoSize") && !inst.inline) {
|
237 |
-
var findMax, max, maxI, i,
|
238 |
-
date = new Date(2009, 12 - 1, 20), // Ensure double digits
|
239 |
-
dateFormat = this._get(inst, "dateFormat");
|
240 |
-
|
241 |
-
if (dateFormat.match(/[DM]/)) {
|
242 |
-
findMax = function(names) {
|
243 |
-
max = 0;
|
244 |
-
maxI = 0;
|
245 |
-
for (i = 0; i < names.length; i++) {
|
246 |
-
if (names[i].length > max) {
|
247 |
-
max = names[i].length;
|
248 |
-
maxI = i;
|
249 |
-
}
|
250 |
-
}
|
251 |
-
return maxI;
|
252 |
-
};
|
253 |
-
date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
|
254 |
-
"monthNames" : "monthNamesShort"))));
|
255 |
-
date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
|
256 |
-
"dayNames" : "dayNamesShort"))) + 20 - date.getDay());
|
257 |
-
}
|
258 |
-
inst.input.attr("size", this._formatDate(inst, date).length);
|
259 |
-
}
|
260 |
-
},
|
261 |
-
|
262 |
-
/* Attach an inline date picker to a div. */
|
263 |
-
_inlineDatepicker: function(target, inst) {
|
264 |
-
var divSpan = $(target);
|
265 |
-
if (divSpan.hasClass(this.markerClassName)) {
|
266 |
-
return;
|
267 |
-
}
|
268 |
-
divSpan.addClass(this.markerClassName).append(inst.dpDiv);
|
269 |
-
$.data(target, PROP_NAME, inst);
|
270 |
-
this._setDate(inst, this._getDefaultDate(inst), true);
|
271 |
-
this._updateDatepicker(inst);
|
272 |
-
this._updateAlternate(inst);
|
273 |
-
//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
|
274 |
-
if( inst.settings.disabled ) {
|
275 |
-
this._disableDatepicker( target );
|
276 |
-
}
|
277 |
-
// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
|
278 |
-
// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
|
279 |
-
inst.dpDiv.css( "display", "block" );
|
280 |
-
},
|
281 |
-
|
282 |
-
/* Pop-up the date picker in a "dialog" box.
|
283 |
-
* @param input element - ignored
|
284 |
-
* @param date string or Date - the initial date to display
|
285 |
-
* @param onSelect function - the function to call when a date is selected
|
286 |
-
* @param settings object - update the dialog date picker instance's settings (anonymous object)
|
287 |
-
* @param pos int[2] - coordinates for the dialog's position within the screen or
|
288 |
-
* event - with x/y coordinates or
|
289 |
-
* leave empty for default (screen centre)
|
290 |
-
* @return the manager object
|
291 |
-
*/
|
292 |
-
_dialogDatepicker: function(input, date, onSelect, settings, pos) {
|
293 |
-
var id, browserWidth, browserHeight, scrollX, scrollY,
|
294 |
-
inst = this._dialogInst; // internal instance
|
295 |
-
|
296 |
-
if (!inst) {
|
297 |
-
this.uuid += 1;
|
298 |
-
id = "dp" + this.uuid;
|
299 |
-
this._dialogInput = $("<input type='text' id='" + id +
|
300 |
-
"' style='position: absolute; top: -100px; width: 0px;'/>");
|
301 |
-
this._dialogInput.keydown(this._doKeyDown);
|
302 |
-
$("body").append(this._dialogInput);
|
303 |
-
inst = this._dialogInst = this._newInst(this._dialogInput, false);
|
304 |
-
inst.settings = {};
|
305 |
-
$.data(this._dialogInput[0], PROP_NAME, inst);
|
306 |
-
}
|
307 |
-
extendRemove(inst.settings, settings || {});
|
308 |
-
date = (date && date.constructor === Date ? this._formatDate(inst, date) : date);
|
309 |
-
this._dialogInput.val(date);
|
310 |
-
|
311 |
-
this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
|
312 |
-
if (!this._pos) {
|
313 |
-
browserWidth = document.documentElement.clientWidth;
|
314 |
-
browserHeight = document.documentElement.clientHeight;
|
315 |
-
scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
316 |
-
scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
317 |
-
this._pos = // should use actual width/height below
|
318 |
-
[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
|
319 |
-
}
|
320 |
-
|
321 |
-
// move input on screen for focus, but hidden behind dialog
|
322 |
-
this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px");
|
323 |
-
inst.settings.onSelect = onSelect;
|
324 |
-
this._inDialog = true;
|
325 |
-
this.dpDiv.addClass(this._dialogClass);
|
326 |
-
this._showDatepicker(this._dialogInput[0]);
|
327 |
-
if ($.blockUI) {
|
328 |
-
$.blockUI(this.dpDiv);
|
329 |
-
}
|
330 |
-
$.data(this._dialogInput[0], PROP_NAME, inst);
|
331 |
-
return this;
|
332 |
-
},
|
333 |
-
|
334 |
-
/* Detach a datepicker from its control.
|
335 |
-
* @param target element - the target input field or division or span
|
336 |
-
*/
|
337 |
-
_destroyDatepicker: function(target) {
|
338 |
-
var nodeName,
|
339 |
-
$target = $(target),
|
340 |
-
inst = $.data(target, PROP_NAME);
|
341 |
-
|
342 |
-
if (!$target.hasClass(this.markerClassName)) {
|
343 |
-
return;
|
344 |
-
}
|
345 |
-
|
346 |
-
nodeName = target.nodeName.toLowerCase();
|
347 |
-
$.removeData(target, PROP_NAME);
|
348 |
-
if (nodeName === "input") {
|
349 |
-
inst.append.remove();
|
350 |
-
inst.trigger.remove();
|
351 |
-
$target.removeClass(this.markerClassName).
|
352 |
-
unbind("focus", this._showDatepicker).
|
353 |
-
unbind("keydown", this._doKeyDown).
|
354 |
-
unbind("keypress", this._doKeyPress).
|
355 |
-
unbind("keyup", this._doKeyUp);
|
356 |
-
} else if (nodeName === "div" || nodeName === "span") {
|
357 |
-
$target.removeClass(this.markerClassName).empty();
|
358 |
-
}
|
359 |
-
},
|
360 |
-
|
361 |
-
/* Enable the date picker to a jQuery selection.
|
362 |
-
* @param target element - the target input field or division or span
|
363 |
-
*/
|
364 |
-
_enableDatepicker: function(target) {
|
365 |
-
var nodeName, inline,
|
366 |
-
$target = $(target),
|
367 |
-
inst = $.data(target, PROP_NAME);
|
368 |
-
|
369 |
-
if (!$target.hasClass(this.markerClassName)) {
|
370 |
-
return;
|
371 |
-
}
|
372 |
-
|
373 |
-
nodeName = target.nodeName.toLowerCase();
|
374 |
-
if (nodeName === "input") {
|
375 |
-
target.disabled = false;
|
376 |
-
inst.trigger.filter("button").
|
377 |
-
each(function() { this.disabled = false; }).end().
|
378 |
-
filter("img").css({opacity: "1.0", cursor: ""});
|
379 |
-
} else if (nodeName === "div" || nodeName === "span") {
|
380 |
-
inline = $target.children("." + this._inlineClass);
|
381 |
-
inline.children().removeClass("ui-state-disabled");
|
382 |
-
inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
|
383 |
-
prop("disabled", false);
|
384 |
-
}
|
385 |
-
this._disabledInputs = $.map(this._disabledInputs,
|
386 |
-
function(value) { return (value === target ? null : value); }); // delete entry
|
387 |
-
},
|
388 |
-
|
389 |
-
/* Disable the date picker to a jQuery selection.
|
390 |
-
* @param target element - the target input field or division or span
|
391 |
-
*/
|
392 |
-
_disableDatepicker: function(target) {
|
393 |
-
var nodeName, inline,
|
394 |
-
$target = $(target),
|
395 |
-
inst = $.data(target, PROP_NAME);
|
396 |
-
|
397 |
-
if (!$target.hasClass(this.markerClassName)) {
|
398 |
-
return;
|
399 |
-
}
|
400 |
-
|
401 |
-
nodeName = target.nodeName.toLowerCase();
|
402 |
-
if (nodeName === "input") {
|
403 |
-
target.disabled = true;
|
404 |
-
inst.trigger.filter("button").
|
405 |
-
each(function() { this.disabled = true; }).end().
|
406 |
-
filter("img").css({opacity: "0.5", cursor: "default"});
|
407 |
-
} else if (nodeName === "div" || nodeName === "span") {
|
408 |
-
inline = $target.children("." + this._inlineClass);
|
409 |
-
inline.children().addClass("ui-state-disabled");
|
410 |
-
inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
|
411 |
-
prop("disabled", true);
|
412 |
-
}
|
413 |
-
this._disabledInputs = $.map(this._disabledInputs,
|
414 |
-
function(value) { return (value === target ? null : value); }); // delete entry
|
415 |
-
this._disabledInputs[this._disabledInputs.length] = target;
|
416 |
-
},
|
417 |
-
|
418 |
-
/* Is the first field in a jQuery collection disabled as a datepicker?
|
419 |
-
* @param target element - the target input field or division or span
|
420 |
-
* @return boolean - true if disabled, false if enabled
|
421 |
-
*/
|
422 |
-
_isDisabledDatepicker: function(target) {
|
423 |
-
if (!target) {
|
424 |
-
return false;
|
425 |
-
}
|
426 |
-
for (var i = 0; i < this._disabledInputs.length; i++) {
|
427 |
-
if (this._disabledInputs[i] === target) {
|
428 |
-
return true;
|
429 |
-
}
|
430 |
-
}
|
431 |
-
return false;
|
432 |
-
},
|
433 |
-
|
434 |
-
/* Retrieve the instance data for the target control.
|
435 |
-
* @param target element - the target input field or division or span
|
436 |
-
* @return object - the associated instance data
|
437 |
-
* @throws error if a jQuery problem getting data
|
438 |
-
*/
|
439 |
-
_getInst: function(target) {
|
440 |
-
try {
|
441 |
-
return $.data(target, PROP_NAME);
|
442 |
-
}
|
443 |
-
catch (err) {
|
444 |
-
throw "Missing instance data for this datepicker";
|
445 |
-
}
|
446 |
-
},
|
447 |
-
|
448 |
-
/* Update or retrieve the settings for a date picker attached to an input field or division.
|
449 |
-
* @param target element - the target input field or division or span
|
450 |
-
* @param name object - the new settings to update or
|
451 |
-
* string - the name of the setting to change or retrieve,
|
452 |
-
* when retrieving also "all" for all instance settings or
|
453 |
-
* "defaults" for all global defaults
|
454 |
-
* @param value any - the new value for the setting
|
455 |
-
* (omit if above is an object or to retrieve a value)
|
456 |
-
*/
|
457 |
-
_optionDatepicker: function(target, name, value) {
|
458 |
-
var settings, date, minDate, maxDate,
|
459 |
-
inst = this._getInst(target);
|
460 |
-
|
461 |
-
if (arguments.length === 2 && typeof name === "string") {
|
462 |
-
return (name === "defaults" ? $.extend({}, $.datepicker._defaults) :
|
463 |
-
(inst ? (name === "all" ? $.extend({}, inst.settings) :
|
464 |
-
this._get(inst, name)) : null));
|
465 |
-
}
|
466 |
-
|
467 |
-
settings = name || {};
|
468 |
-
if (typeof name === "string") {
|
469 |
-
settings = {};
|
470 |
-
settings[name] = value;
|
471 |
-
}
|
472 |
-
|
473 |
-
if (inst) {
|
474 |
-
if (this._curInst === inst) {
|
475 |
-
this._hideDatepicker();
|
476 |
-
}
|
477 |
-
|
478 |
-
date = this._getDateDatepicker(target, true);
|
479 |
-
minDate = this._getMinMaxDate(inst, "min");
|
480 |
-
maxDate = this._getMinMaxDate(inst, "max");
|
481 |
-
extendRemove(inst.settings, settings);
|
482 |
-
// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
|
483 |
-
if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {
|
484 |
-
inst.settings.minDate = this._formatDate(inst, minDate);
|
485 |
-
}
|
486 |
-
if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {
|
487 |
-
inst.settings.maxDate = this._formatDate(inst, maxDate);
|
488 |
-
}
|
489 |
-
if ( "disabled" in settings ) {
|
490 |
-
if ( settings.disabled ) {
|
491 |
-
this._disableDatepicker(target);
|
492 |
-
} else {
|
493 |
-
this._enableDatepicker(target);
|
494 |
-
}
|
495 |
-
}
|
496 |
-
this._attachments($(target), inst);
|
497 |
-
this._autoSize(inst);
|
498 |
-
this._setDate(inst, date);
|
499 |
-
this._updateAlternate(inst);
|
500 |
-
this._updateDatepicker(inst);
|
501 |
-
}
|
502 |
-
},
|
503 |
-
|
504 |
-
// change method deprecated
|
505 |
-
_changeDatepicker: function(target, name, value) {
|
506 |
-
this._optionDatepicker(target, name, value);
|
507 |
-
},
|
508 |
-
|
509 |
-
/* Redraw the date picker attached to an input field or division.
|
510 |
-
* @param target element - the target input field or division or span
|
511 |
-
*/
|
512 |
-
_refreshDatepicker: function(target) {
|
513 |
-
var inst = this._getInst(target);
|
514 |
-
if (inst) {
|
515 |
-
this._updateDatepicker(inst);
|
516 |
-
}
|
517 |
-
},
|
518 |
-
|
519 |
-
/* Set the dates for a jQuery selection.
|
520 |
-
* @param target element - the target input field or division or span
|
521 |
-
* @param date Date - the new date
|
522 |
-
*/
|
523 |
-
_setDateDatepicker: function(target, date) {
|
524 |
-
var inst = this._getInst(target);
|
525 |
-
if (inst) {
|
526 |
-
this._setDate(inst, date);
|
527 |
-
this._updateDatepicker(inst);
|
528 |
-
this._updateAlternate(inst);
|
529 |
-
}
|
530 |
-
},
|
531 |
-
|
532 |
-
/* Get the date(s) for the first entry in a jQuery selection.
|
533 |
-
* @param target element - the target input field or division or span
|
534 |
-
* @param noDefault boolean - true if no default date is to be used
|
535 |
-
* @return Date - the current date
|
536 |
-
*/
|
537 |
-
_getDateDatepicker: function(target, noDefault) {
|
538 |
-
var inst = this._getInst(target);
|
539 |
-
if (inst && !inst.inline) {
|
540 |
-
this._setDateFromField(inst, noDefault);
|
541 |
-
}
|
542 |
-
return (inst ? this._getDate(inst) : null);
|
543 |
-
},
|
544 |
-
|
545 |
-
/* Handle keystrokes. */
|
546 |
-
_doKeyDown: function(event) {
|
547 |
-
var onSelect, dateStr, sel,
|
548 |
-
inst = $.datepicker._getInst(event.target),
|
549 |
-
handled = true,
|
550 |
-
isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
|
551 |
-
|
552 |
-
inst._keyEvent = true;
|
553 |
-
if ($.datepicker._datepickerShowing) {
|
554 |
-
switch (event.keyCode) {
|
555 |
-
case 9: $.datepicker._hideDatepicker();
|
556 |
-
handled = false;
|
557 |
-
break; // hide on tab out
|
558 |
-
case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." +
|
559 |
-
$.datepicker._currentClass + ")", inst.dpDiv);
|
560 |
-
if (sel[0]) {
|
561 |
-
$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
|
562 |
-
}
|
563 |
-
|
564 |
-
onSelect = $.datepicker._get(inst, "onSelect");
|
565 |
-
if (onSelect) {
|
566 |
-
dateStr = $.datepicker._formatDate(inst);
|
567 |
-
|
568 |
-
// trigger custom callback
|
569 |
-
onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
|
570 |
-
} else {
|
571 |
-
$.datepicker._hideDatepicker();
|
572 |
-
}
|
573 |
-
|
574 |
-
return false; // don't submit the form
|
575 |
-
case 27: $.datepicker._hideDatepicker();
|
576 |
-
break; // hide on escape
|
577 |
-
case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
578 |
-
-$.datepicker._get(inst, "stepBigMonths") :
|
579 |
-
-$.datepicker._get(inst, "stepMonths")), "M");
|
580 |
-
break; // previous month/year on page up/+ ctrl
|
581 |
-
case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
582 |
-
+$.datepicker._get(inst, "stepBigMonths") :
|
583 |
-
+$.datepicker._get(inst, "stepMonths")), "M");
|
584 |
-
break; // next month/year on page down/+ ctrl
|
585 |
-
case 35: if (event.ctrlKey || event.metaKey) {
|
586 |
-
$.datepicker._clearDate(event.target);
|
587 |
-
}
|
588 |
-
handled = event.ctrlKey || event.metaKey;
|
589 |
-
break; // clear on ctrl or command +end
|
590 |
-
case 36: if (event.ctrlKey || event.metaKey) {
|
591 |
-
$.datepicker._gotoToday(event.target);
|
592 |
-
}
|
593 |
-
handled = event.ctrlKey || event.metaKey;
|
594 |
-
break; // current on ctrl or command +home
|
595 |
-
case 37: if (event.ctrlKey || event.metaKey) {
|
596 |
-
$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D");
|
597 |
-
}
|
598 |
-
handled = event.ctrlKey || event.metaKey;
|
599 |
-
// -1 day on ctrl or command +left
|
600 |
-
if (event.originalEvent.altKey) {
|
601 |
-
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
602 |
-
-$.datepicker._get(inst, "stepBigMonths") :
|
603 |
-
-$.datepicker._get(inst, "stepMonths")), "M");
|
604 |
-
}
|
605 |
-
// next month/year on alt +left on Mac
|
606 |
-
break;
|
607 |
-
case 38: if (event.ctrlKey || event.metaKey) {
|
608 |
-
$.datepicker._adjustDate(event.target, -7, "D");
|
609 |
-
}
|
610 |
-
handled = event.ctrlKey || event.metaKey;
|
611 |
-
break; // -1 week on ctrl or command +up
|
612 |
-
case 39: if (event.ctrlKey || event.metaKey) {
|
613 |
-
$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D");
|
614 |
-
}
|
615 |
-
handled = event.ctrlKey || event.metaKey;
|
616 |
-
// +1 day on ctrl or command +right
|
617 |
-
if (event.originalEvent.altKey) {
|
618 |
-
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
619 |
-
+$.datepicker._get(inst, "stepBigMonths") :
|
620 |
-
+$.datepicker._get(inst, "stepMonths")), "M");
|
621 |
-
}
|
622 |
-
// next month/year on alt +right
|
623 |
-
break;
|
624 |
-
case 40: if (event.ctrlKey || event.metaKey) {
|
625 |
-
$.datepicker._adjustDate(event.target, +7, "D");
|
626 |
-
}
|
627 |
-
handled = event.ctrlKey || event.metaKey;
|
628 |
-
break; // +1 week on ctrl or command +down
|
629 |
-
default: handled = false;
|
630 |
-
}
|
631 |
-
} else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home
|
632 |
-
$.datepicker._showDatepicker(this);
|
633 |
-
} else {
|
634 |
-
handled = false;
|
635 |
-
}
|
636 |
-
|
637 |
-
if (handled) {
|
638 |
-
event.preventDefault();
|
639 |
-
event.stopPropagation();
|
640 |
-
}
|
641 |
-
},
|
642 |
-
|
643 |
-
/* Filter entered characters - based on date format. */
|
644 |
-
_doKeyPress: function(event) {
|
645 |
-
var chars, chr,
|
646 |
-
inst = $.datepicker._getInst(event.target);
|
647 |
-
|
648 |
-
if ($.datepicker._get(inst, "constrainInput")) {
|
649 |
-
chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat"));
|
650 |
-
chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);
|
651 |
-
return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1);
|
652 |
-
}
|
653 |
-
},
|
654 |
-
|
655 |
-
/* Synchronise manual entry and field/alternate field. */
|
656 |
-
_doKeyUp: function(event) {
|
657 |
-
var date,
|
658 |
-
inst = $.datepicker._getInst(event.target);
|
659 |
-
|
660 |
-
if (inst.input.val() !== inst.lastVal) {
|
661 |
-
try {
|
662 |
-
date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
|
663 |
-
(inst.input ? inst.input.val() : null),
|
664 |
-
$.datepicker._getFormatConfig(inst));
|
665 |
-
|
666 |
-
if (date) { // only if valid
|
667 |
-
$.datepicker._setDateFromField(inst);
|
668 |
-
$.datepicker._updateAlternate(inst);
|
669 |
-
$.datepicker._updateDatepicker(inst);
|
670 |
-
}
|
671 |
-
}
|
672 |
-
catch (err) {
|
673 |
-
}
|
674 |
-
}
|
675 |
-
return true;
|
676 |
-
},
|
677 |
-
|
678 |
-
/* Pop-up the date picker for a given input field.
|
679 |
-
* If false returned from beforeShow event handler do not show.
|
680 |
-
* @param input element - the input field attached to the date picker or
|
681 |
-
* event - if triggered by focus
|
682 |
-
*/
|
683 |
-
_showDatepicker: function(input) {
|
684 |
-
input = input.target || input;
|
685 |
-
if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
|
686 |
-
input = $("input", input.parentNode)[0];
|
687 |
-
}
|
688 |
-
|
689 |
-
if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here
|
690 |
-
return;
|
691 |
-
}
|
692 |
-
|
693 |
-
var inst, beforeShow, beforeShowSettings, isFixed,
|
694 |
-
offset, showAnim, duration;
|
695 |
-
|
696 |
-
inst = $.datepicker._getInst(input);
|
697 |
-
if ($.datepicker._curInst && $.datepicker._curInst !== inst) {
|
698 |
-
$.datepicker._curInst.dpDiv.stop(true, true);
|
699 |
-
if ( inst && $.datepicker._datepickerShowing ) {
|
700 |
-
$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
|
701 |
-
}
|
702 |
-
}
|
703 |
-
|
704 |
-
beforeShow = $.datepicker._get(inst, "beforeShow");
|
705 |
-
beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
|
706 |
-
if(beforeShowSettings === false){
|
707 |
-
return;
|
708 |
-
}
|
709 |
-
extendRemove(inst.settings, beforeShowSettings);
|
710 |
-
|
711 |
-
inst.lastVal = null;
|
712 |
-
$.datepicker._lastInput = input;
|
713 |
-
$.datepicker._setDateFromField(inst);
|
714 |
-
|
715 |
-
if ($.datepicker._inDialog) { // hide cursor
|
716 |
-
input.value = "";
|
717 |
-
}
|
718 |
-
if (!$.datepicker._pos) { // position below input
|
719 |
-
$.datepicker._pos = $.datepicker._findPos(input);
|
720 |
-
$.datepicker._pos[1] += input.offsetHeight; // add the height
|
721 |
-
}
|
722 |
-
|
723 |
-
isFixed = false;
|
724 |
-
$(input).parents().each(function() {
|
725 |
-
isFixed |= $(this).css("position") === "fixed";
|
726 |
-
return !isFixed;
|
727 |
-
});
|
728 |
-
|
729 |
-
offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
|
730 |
-
$.datepicker._pos = null;
|
731 |
-
//to avoid flashes on Firefox
|
732 |
-
inst.dpDiv.empty();
|
733 |
-
// determine sizing offscreen
|
734 |
-
inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"});
|
735 |
-
$.datepicker._updateDatepicker(inst);
|
736 |
-
// fix width for dynamic number of date pickers
|
737 |
-
// and adjust position before showing
|
738 |
-
offset = $.datepicker._checkOffset(inst, offset, isFixed);
|
739 |
-
inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
|
740 |
-
"static" : (isFixed ? "fixed" : "absolute")), display: "none",
|
741 |
-
left: offset.left + "px", top: offset.top + "px"});
|
742 |
-
|
743 |
-
if (!inst.inline) {
|
744 |
-
showAnim = $.datepicker._get(inst, "showAnim");
|
745 |
-
duration = $.datepicker._get(inst, "duration");
|
746 |
-
inst.dpDiv.zIndex($(input).zIndex()+1);
|
747 |
-
$.datepicker._datepickerShowing = true;
|
748 |
-
|
749 |
-
if ( $.effects && $.effects.effect[ showAnim ] ) {
|
750 |
-
inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration);
|
751 |
-
} else {
|
752 |
-
inst.dpDiv[showAnim || "show"](showAnim ? duration : null);
|
753 |
-
}
|
754 |
-
|
755 |
-
if ( $.datepicker._shouldFocusInput( inst ) ) {
|
756 |
-
inst.input.focus();
|
757 |
-
}
|
758 |
-
|
759 |
-
$.datepicker._curInst = inst;
|
760 |
-
}
|
761 |
-
},
|
762 |
-
|
763 |
-
/* Generate the date picker content. */
|
764 |
-
_updateDatepicker: function(inst) {
|
765 |
-
this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
|
766 |
-
instActive = inst; // for delegate hover events
|
767 |
-
inst.dpDiv.empty().append(this._generateHTML(inst));
|
768 |
-
this._attachHandlers(inst);
|
769 |
-
inst.dpDiv.find("." + this._dayOverClass + " a").mouseover();
|
770 |
-
|
771 |
-
var origyearshtml,
|
772 |
-
numMonths = this._getNumberOfMonths(inst),
|
773 |
-
cols = numMonths[1],
|
774 |
-
width = 17;
|
775 |
-
|
776 |
-
inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
|
777 |
-
if (cols > 1) {
|
778 |
-
inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em");
|
779 |
-
}
|
780 |
-
inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") +
|
781 |
-
"Class"]("ui-datepicker-multi");
|
782 |
-
inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") +
|
783 |
-
"Class"]("ui-datepicker-rtl");
|
784 |
-
|
785 |
-
if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
|
786 |
-
inst.input.focus();
|
787 |
-
}
|
788 |
-
|
789 |
-
// deffered render of the years select (to avoid flashes on Firefox)
|
790 |
-
if( inst.yearshtml ){
|
791 |
-
origyearshtml = inst.yearshtml;
|
792 |
-
setTimeout(function(){
|
793 |
-
//assure that inst.yearshtml didn't change.
|
794 |
-
if( origyearshtml === inst.yearshtml && inst.yearshtml ){
|
795 |
-
inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);
|
796 |
-
}
|
797 |
-
origyearshtml = inst.yearshtml = null;
|
798 |
-
}, 0);
|
799 |
-
}
|
800 |
-
},
|
801 |
-
|
802 |
-
// #6694 - don't focus the input if it's already focused
|
803 |
-
// this breaks the change event in IE
|
804 |
-
// Support: IE and jQuery <1.9
|
805 |
-
_shouldFocusInput: function( inst ) {
|
806 |
-
return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
|
807 |
-
},
|
808 |
-
|
809 |
-
/* Check positioning to remain on screen. */
|
810 |
-
_checkOffset: function(inst, offset, isFixed) {
|
811 |
-
var dpWidth = inst.dpDiv.outerWidth(),
|
812 |
-
dpHeight = inst.dpDiv.outerHeight(),
|
813 |
-
inputWidth = inst.input ? inst.input.outerWidth() : 0,
|
814 |
-
inputHeight = inst.input ? inst.input.outerHeight() : 0,
|
815 |
-
viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),
|
816 |
-
viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
|
817 |
-
|
818 |
-
offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0);
|
819 |
-
offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;
|
820 |
-
offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
|
821 |
-
|
822 |
-
// now check if datepicker is showing outside window viewport - move to a better place if so.
|
823 |
-
offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
|
824 |
-
Math.abs(offset.left + dpWidth - viewWidth) : 0);
|
825 |
-
offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
|
826 |
-
Math.abs(dpHeight + inputHeight) : 0);
|
827 |
-
|
828 |
-
return offset;
|
829 |
-
},
|
830 |
-
|
831 |
-
/* Find an object's position on the screen. */
|
832 |
-
_findPos: function(obj) {
|
833 |
-
var position,
|
834 |
-
inst = this._getInst(obj),
|
835 |
-
isRTL = this._get(inst, "isRTL");
|
836 |
-
|
837 |
-
while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {
|
838 |
-
obj = obj[isRTL ? "previousSibling" : "nextSibling"];
|
839 |
-
}
|
840 |
-
|
841 |
-
position = $(obj).offset();
|
842 |
-
return [position.left, position.top];
|
843 |
-
},
|
844 |
-
|
845 |
-
/* Hide the date picker from view.
|
846 |
-
* @param input element - the input field attached to the date picker
|
847 |
-
*/
|
848 |
-
_hideDatepicker: function(input) {
|
849 |
-
var showAnim, duration, postProcess, onClose,
|
850 |
-
inst = this._curInst;
|
851 |
-
|
852 |
-
if (!inst || (input && inst !== $.data(input, PROP_NAME))) {
|
853 |
-
return;
|
854 |
-
}
|
855 |
-
|
856 |
-
if (this._datepickerShowing) {
|
857 |
-
showAnim = this._get(inst, "showAnim");
|
858 |
-
duration = this._get(inst, "duration");
|
859 |
-
postProcess = function() {
|
860 |
-
$.datepicker._tidyDialog(inst);
|
861 |
-
};
|
862 |
-
|
863 |
-
// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
|
864 |
-
if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
|
865 |
-
inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess);
|
866 |
-
} else {
|
867 |
-
inst.dpDiv[(showAnim === "slideDown" ? "slideUp" :
|
868 |
-
(showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess);
|
869 |
-
}
|
870 |
-
|
871 |
-
if (!showAnim) {
|
872 |
-
postProcess();
|
873 |
-
}
|
874 |
-
this._datepickerShowing = false;
|
875 |
-
|
876 |
-
onClose = this._get(inst, "onClose");
|
877 |
-
if (onClose) {
|
878 |
-
onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]);
|
879 |
-
}
|
880 |
-
|
881 |
-
this._lastInput = null;
|
882 |
-
if (this._inDialog) {
|
883 |
-
this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" });
|
884 |
-
if ($.blockUI) {
|
885 |
-
$.unblockUI();
|
886 |
-
$("body").append(this.dpDiv);
|
887 |
-
}
|
888 |
-
}
|
889 |
-
this._inDialog = false;
|
890 |
-
}
|
891 |
-
},
|
892 |
-
|
893 |
-
/* Tidy up after a dialog display. */
|
894 |
-
_tidyDialog: function(inst) {
|
895 |
-
inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");
|
896 |
-
},
|
897 |
-
|
898 |
-
/* Close date picker if clicked elsewhere. */
|
899 |
-
_checkExternalClick: function(event) {
|
900 |
-
if (!$.datepicker._curInst) {
|
901 |
-
return;
|
902 |
-
}
|
903 |
-
|
904 |
-
var $target = $(event.target),
|
905 |
-
inst = $.datepicker._getInst($target[0]);
|
906 |
-
|
907 |
-
if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
|
908 |
-
$target.parents("#" + $.datepicker._mainDivId).length === 0 &&
|
909 |
-
!$target.hasClass($.datepicker.markerClassName) &&
|
910 |
-
!$target.closest("." + $.datepicker._triggerClass).length &&
|
911 |
-
$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
|
912 |
-
( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {
|
913 |
-
$.datepicker._hideDatepicker();
|
914 |
-
}
|
915 |
-
},
|
916 |
-
|
917 |
-
/* Adjust one of the date sub-fields. */
|
918 |
-
_adjustDate: function(id, offset, period) {
|
919 |
-
var target = $(id),
|
920 |
-
inst = this._getInst(target[0]);
|
921 |
-
|
922 |
-
if (this._isDisabledDatepicker(target[0])) {
|
923 |
-
return;
|
924 |
-
}
|
925 |
-
this._adjustInstDate(inst, offset +
|
926 |
-
(period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning
|
927 |
-
period);
|
928 |
-
this._updateDatepicker(inst);
|
929 |
-
},
|
930 |
-
|
931 |
-
/* Action for current link. */
|
932 |
-
_gotoToday: function(id) {
|
933 |
-
var date,
|
934 |
-
target = $(id),
|
935 |
-
inst = this._getInst(target[0]);
|
936 |
-
|
937 |
-
if (this._get(inst, "gotoCurrent") && inst.currentDay) {
|
938 |
-
inst.selectedDay = inst.currentDay;
|
939 |
-
inst.drawMonth = inst.selectedMonth = inst.currentMonth;
|
940 |
-
inst.drawYear = inst.selectedYear = inst.currentYear;
|
941 |
-
} else {
|
942 |
-
date = new Date();
|
943 |
-
inst.selectedDay = date.getDate();
|
944 |
-
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
945 |
-
inst.drawYear = inst.selectedYear = date.getFullYear();
|
946 |
-
}
|
947 |
-
this._notifyChange(inst);
|
948 |
-
this._adjustDate(target);
|
949 |
-
},
|
950 |
-
|
951 |
-
/* Action for selecting a new month/year. */
|
952 |
-
_selectMonthYear: function(id, select, period) {
|
953 |
-
var target = $(id),
|
954 |
-
inst = this._getInst(target[0]);
|
955 |
-
|
956 |
-
inst["selected" + (period === "M" ? "Month" : "Year")] =
|
957 |
-
inst["draw" + (period === "M" ? "Month" : "Year")] =
|
958 |
-
parseInt(select.options[select.selectedIndex].value,10);
|
959 |
-
|
960 |
-
this._notifyChange(inst);
|
961 |
-
this._adjustDate(target);
|
962 |
-
},
|
963 |
-
|
964 |
-
/* Action for selecting a day. */
|
965 |
-
_selectDay: function(id, month, year, td) {
|
966 |
-
var inst,
|
967 |
-
target = $(id);
|
968 |
-
|
969 |
-
if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
|
970 |
-
return;
|
971 |
-
}
|
972 |
-
|
973 |
-
inst = this._getInst(target[0]);
|
974 |
-
inst.selectedDay = inst.currentDay = $("a", td).html();
|
975 |
-
inst.selectedMonth = inst.currentMonth = month;
|
976 |
-
inst.selectedYear = inst.currentYear = year;
|
977 |
-
this._selectDate(id, this._formatDate(inst,
|
978 |
-
inst.currentDay, inst.currentMonth, inst.currentYear));
|
979 |
-
},
|
980 |
-
|
981 |
-
/* Erase the input field and hide the date picker. */
|
982 |
-
_clearDate: function(id) {
|
983 |
-
var target = $(id);
|
984 |
-
this._selectDate(target, "");
|
985 |
-
},
|
986 |
-
|
987 |
-
/* Update the input field with the selected date. */
|
988 |
-
_selectDate: function(id, dateStr) {
|
989 |
-
var onSelect,
|
990 |
-
target = $(id),
|
991 |
-
inst = this._getInst(target[0]);
|
992 |
-
|
993 |
-
dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
|
994 |
-
if (inst.input) {
|
995 |
-
inst.input.val(dateStr);
|
996 |
-
}
|
997 |
-
this._updateAlternate(inst);
|
998 |
-
|
999 |
-
onSelect = this._get(inst, "onSelect");
|
1000 |
-
if (onSelect) {
|
1001 |
-
onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
|
1002 |
-
} else if (inst.input) {
|
1003 |
-
inst.input.trigger("change"); // fire the change event
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
if (inst.inline){
|
1007 |
-
this._updateDatepicker(inst);
|
1008 |
-
} else {
|
1009 |
-
this._hideDatepicker();
|
1010 |
-
this._lastInput = inst.input[0];
|
1011 |
-
if (typeof(inst.input[0]) !== "object") {
|
1012 |
-
inst.input.focus(); // restore focus
|
1013 |
-
}
|
1014 |
-
this._lastInput = null;
|
1015 |
-
}
|
1016 |
-
},
|
1017 |
-
|
1018 |
-
/* Update any alternate field to synchronise with the main field. */
|
1019 |
-
_updateAlternate: function(inst) {
|
1020 |
-
var altFormat, date, dateStr,
|
1021 |
-
altField = this._get(inst, "altField");
|
1022 |
-
|
1023 |
-
if (altField) { // update alternate field too
|
1024 |
-
altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
|
1025 |
-
date = this._getDate(inst);
|
1026 |
-
dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
|
1027 |
-
$(altField).each(function() { $(this).val(dateStr); });
|
1028 |
-
}
|
1029 |
-
},
|
1030 |
-
|
1031 |
-
/* Set as beforeShowDay function to prevent selection of weekends.
|
1032 |
-
* @param date Date - the date to customise
|
1033 |
-
* @return [boolean, string] - is this date selectable?, what is its CSS class?
|
1034 |
-
*/
|
1035 |
-
noWeekends: function(date) {
|
1036 |
-
var day = date.getDay();
|
1037 |
-
return [(day > 0 && day < 6), ""];
|
1038 |
-
},
|
1039 |
-
|
1040 |
-
/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
|
1041 |
-
* @param date Date - the date to get the week for
|
1042 |
-
* @return number - the number of the week within the year that contains this date
|
1043 |
-
*/
|
1044 |
-
iso8601Week: function(date) {
|
1045 |
-
var time,
|
1046 |
-
checkDate = new Date(date.getTime());
|
1047 |
-
|
1048 |
-
// Find Thursday of this week starting on Monday
|
1049 |
-
checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
|
1050 |
-
|
1051 |
-
time = checkDate.getTime();
|
1052 |
-
checkDate.setMonth(0); // Compare with Jan 1
|
1053 |
-
checkDate.setDate(1);
|
1054 |
-
return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
|
1055 |
-
},
|
1056 |
-
|
1057 |
-
/* Parse a string value into a date object.
|
1058 |
-
* See formatDate below for the possible formats.
|
1059 |
-
*
|
1060 |
-
* @param format string - the expected format of the date
|
1061 |
-
* @param value string - the date in the above format
|
1062 |
-
* @param settings Object - attributes include:
|
1063 |
-
* shortYearCutoff number - the cutoff year for determining the century (optional)
|
1064 |
-
* dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
|
1065 |
-
* dayNames string[7] - names of the days from Sunday (optional)
|
1066 |
-
* monthNamesShort string[12] - abbreviated names of the months (optional)
|
1067 |
-
* monthNames string[12] - names of the months (optional)
|
1068 |
-
* @return Date - the extracted date value or null if value is blank
|
1069 |
-
*/
|
1070 |
-
parseDate: function (format, value, settings) {
|
1071 |
-
if (format == null || value == null) {
|
1072 |
-
throw "Invalid arguments";
|
1073 |
-
}
|
1074 |
-
|
1075 |
-
value = (typeof value === "object" ? value.toString() : value + "");
|
1076 |
-
if (value === "") {
|
1077 |
-
return null;
|
1078 |
-
}
|
1079 |
-
|
1080 |
-
var iFormat, dim, extra,
|
1081 |
-
iValue = 0,
|
1082 |
-
shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,
|
1083 |
-
shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
|
1084 |
-
new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),
|
1085 |
-
dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
|
1086 |
-
dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
|
1087 |
-
monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
|
1088 |
-
monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
|
1089 |
-
year = -1,
|
1090 |
-
month = -1,
|
1091 |
-
day = -1,
|
1092 |
-
doy = -1,
|
1093 |
-
literal = false,
|
1094 |
-
date,
|
1095 |
-
// Check whether a format character is doubled
|
1096 |
-
lookAhead = function(match) {
|
1097 |
-
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
|
1098 |
-
if (matches) {
|
1099 |
-
iFormat++;
|
1100 |
-
}
|
1101 |
-
return matches;
|
1102 |
-
},
|
1103 |
-
// Extract a number from the string value
|
1104 |
-
getNumber = function(match) {
|
1105 |
-
var isDoubled = lookAhead(match),
|
1106 |
-
size = (match === "@" ? 14 : (match === "!" ? 20 :
|
1107 |
-
(match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
|
1108 |
-
digits = new RegExp("^\\d{1," + size + "}"),
|
1109 |
-
num = value.substring(iValue).match(digits);
|
1110 |
-
if (!num) {
|
1111 |
-
throw "Missing number at position " + iValue;
|
1112 |
-
}
|
1113 |
-
iValue += num[0].length;
|
1114 |
-
return parseInt(num[0], 10);
|
1115 |
-
},
|
1116 |
-
// Extract a name from the string value and convert to an index
|
1117 |
-
getName = function(match, shortNames, longNames) {
|
1118 |
-
var index = -1,
|
1119 |
-
names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
|
1120 |
-
return [ [k, v] ];
|
1121 |
-
}).sort(function (a, b) {
|
1122 |
-
return -(a[1].length - b[1].length);
|
1123 |
-
});
|
1124 |
-
|
1125 |
-
$.each(names, function (i, pair) {
|
1126 |
-
var name = pair[1];
|
1127 |
-
if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
|
1128 |
-
index = pair[0];
|
1129 |
-
iValue += name.length;
|
1130 |
-
return false;
|
1131 |
-
}
|
1132 |
-
});
|
1133 |
-
if (index !== -1) {
|
1134 |
-
return index + 1;
|
1135 |
-
} else {
|
1136 |
-
throw "Unknown name at position " + iValue;
|
1137 |
-
}
|
1138 |
-
},
|
1139 |
-
// Confirm that a literal character matches the string value
|
1140 |
-
checkLiteral = function() {
|
1141 |
-
if (value.charAt(iValue) !== format.charAt(iFormat)) {
|
1142 |
-
throw "Unexpected literal at position " + iValue;
|
1143 |
-
}
|
1144 |
-
iValue++;
|
1145 |
-
};
|
1146 |
-
|
1147 |
-
for (iFormat = 0; iFormat < format.length; iFormat++) {
|
1148 |
-
if (literal) {
|
1149 |
-
if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
|
1150 |
-
literal = false;
|
1151 |
-
} else {
|
1152 |
-
checkLiteral();
|
1153 |
-
}
|
1154 |
-
} else {
|
1155 |
-
switch (format.charAt(iFormat)) {
|
1156 |
-
case "d":
|
1157 |
-
day = getNumber("d");
|
1158 |
-
break;
|
1159 |
-
case "D":
|
1160 |
-
getName("D", dayNamesShort, dayNames);
|
1161 |
-
break;
|
1162 |
-
case "o":
|
1163 |
-
doy = getNumber("o");
|
1164 |
-
break;
|
1165 |
-
case "m":
|
1166 |
-
month = getNumber("m");
|
1167 |
-
break;
|
1168 |
-
case "M":
|
1169 |
-
month = getName("M", monthNamesShort, monthNames);
|
1170 |
-
break;
|
1171 |
-
case "y":
|
1172 |
-
year = getNumber("y");
|
1173 |
-
break;
|
1174 |
-
case "@":
|
1175 |
-
date = new Date(getNumber("@"));
|
1176 |
-
year = date.getFullYear();
|
1177 |
-
month = date.getMonth() + 1;
|
1178 |
-
day = date.getDate();
|
1179 |
-
break;
|
1180 |
-
case "!":
|
1181 |
-
date = new Date((getNumber("!") - this._ticksTo1970) / 10000);
|
1182 |
-
year = date.getFullYear();
|
1183 |
-
month = date.getMonth() + 1;
|
1184 |
-
day = date.getDate();
|
1185 |
-
break;
|
1186 |
-
case "'":
|
1187 |
-
if (lookAhead("'")){
|
1188 |
-
checkLiteral();
|
1189 |
-
} else {
|
1190 |
-
literal = true;
|
1191 |
-
}
|
1192 |
-
break;
|
1193 |
-
default:
|
1194 |
-
checkLiteral();
|
1195 |
-
}
|
1196 |
-
}
|
1197 |
-
}
|
1198 |
-
|
1199 |
-
if (iValue < value.length){
|
1200 |
-
extra = value.substr(iValue);
|
1201 |
-
if (!/^\s+/.test(extra)) {
|
1202 |
-
throw "Extra/unparsed characters found in date: " + extra;
|
1203 |
-
}
|
1204 |
-
}
|
1205 |
-
|
1206 |
-
if (year === -1) {
|
1207 |
-
year = new Date().getFullYear();
|
1208 |
-
} else if (year < 100) {
|
1209 |
-
year += new Date().getFullYear() - new Date().getFullYear() % 100 +
|
1210 |
-
(year <= shortYearCutoff ? 0 : -100);
|
1211 |
-
}
|
1212 |
-
|
1213 |
-
if (doy > -1) {
|
1214 |
-
month = 1;
|
1215 |
-
day = doy;
|
1216 |
-
do {
|
1217 |
-
dim = this._getDaysInMonth(year, month - 1);
|
1218 |
-
if (day <= dim) {
|
1219 |
-
break;
|
1220 |
-
}
|
1221 |
-
month++;
|
1222 |
-
day -= dim;
|
1223 |
-
} while (true);
|
1224 |
-
}
|
1225 |
-
|
1226 |
-
date = this._daylightSavingAdjust(new Date(year, month - 1, day));
|
1227 |
-
if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
|
1228 |
-
throw "Invalid date"; // E.g. 31/02/00
|
1229 |
-
}
|
1230 |
-
return date;
|
1231 |
-
},
|
1232 |
-
|
1233 |
-
/* Standard date formats. */
|
1234 |
-
ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
|
1235 |
-
COOKIE: "D, dd M yy",
|
1236 |
-
ISO_8601: "yy-mm-dd",
|
1237 |
-
RFC_822: "D, d M y",
|
1238 |
-
RFC_850: "DD, dd-M-y",
|
1239 |
-
RFC_1036: "D, d M y",
|
1240 |
-
RFC_1123: "D, d M yy",
|
1241 |
-
RFC_2822: "D, d M yy",
|
1242 |
-
RSS: "D, d M y", // RFC 822
|
1243 |
-
TICKS: "!",
|
1244 |
-
TIMESTAMP: "@",
|
1245 |
-
W3C: "yy-mm-dd", // ISO 8601
|
1246 |
-
|
1247 |
-
_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
|
1248 |
-
Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
|
1249 |
-
|
1250 |
-
/* Format a date object into a string value.
|
1251 |
-
* The format can be combinations of the following:
|
1252 |
-
* d - day of month (no leading zero)
|
1253 |
-
* dd - day of month (two digit)
|
1254 |
-
* o - day of year (no leading zeros)
|
1255 |
-
* oo - day of year (three digit)
|
1256 |
-
* D - day name short
|
1257 |
-
* DD - day name long
|
1258 |
-
* m - month of year (no leading zero)
|
1259 |
-
* mm - month of year (two digit)
|
1260 |
-
* M - month name short
|
1261 |
-
* MM - month name long
|
1262 |
-
* y - year (two digit)
|
1263 |
-
* yy - year (four digit)
|
1264 |
-
* @ - Unix timestamp (ms since 01/01/1970)
|
1265 |
-
* ! - Windows ticks (100ns since 01/01/0001)
|
1266 |
-
* "..." - literal text
|
1267 |
-
* '' - single quote
|
1268 |
-
*
|
1269 |
-
* @param format string - the desired format of the date
|
1270 |
-
* @param date Date - the date value to format
|
1271 |
-
* @param settings Object - attributes include:
|
1272 |
-
* dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
|
1273 |
-
* dayNames string[7] - names of the days from Sunday (optional)
|
1274 |
-
* monthNamesShort string[12] - abbreviated names of the months (optional)
|
1275 |
-
* monthNames string[12] - names of the months (optional)
|
1276 |
-
* @return string - the date in the above format
|
1277 |
-
*/
|
1278 |
-
formatDate: function (format, date, settings) {
|
1279 |
-
if (!date) {
|
1280 |
-
return "";
|
1281 |
-
}
|
1282 |
-
|
1283 |
-
var iFormat,
|
1284 |
-
dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
|
1285 |
-
dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
|
1286 |
-
monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
|
1287 |
-
monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
|
1288 |
-
// Check whether a format character is doubled
|
1289 |
-
lookAhead = function(match) {
|
1290 |
-
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
|
1291 |
-
if (matches) {
|
1292 |
-
iFormat++;
|
1293 |
-
}
|
1294 |
-
return matches;
|
1295 |
-
},
|
1296 |
-
// Format a number, with leading zero if necessary
|
1297 |
-
formatNumber = function(match, value, len) {
|
1298 |
-
var num = "" + value;
|
1299 |
-
if (lookAhead(match)) {
|
1300 |
-
while (num.length < len) {
|
1301 |
-
num = "0" + num;
|
1302 |
-
}
|
1303 |
-
}
|
1304 |
-
return num;
|
1305 |
-
},
|
1306 |
-
// Format a name, short or long as requested
|
1307 |
-
formatName = function(match, value, shortNames, longNames) {
|
1308 |
-
return (lookAhead(match) ? longNames[value] : shortNames[value]);
|
1309 |
-
},
|
1310 |
-
output = "",
|
1311 |
-
literal = false;
|
1312 |
-
|
1313 |
-
if (date) {
|
1314 |
-
for (iFormat = 0; iFormat < format.length; iFormat++) {
|
1315 |
-
if (literal) {
|
1316 |
-
if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
|
1317 |
-
literal = false;
|
1318 |
-
} else {
|
1319 |
-
output += format.charAt(iFormat);
|
1320 |
-
}
|
1321 |
-
} else {
|
1322 |
-
switch (format.charAt(iFormat)) {
|
1323 |
-
case "d":
|
1324 |
-
output += formatNumber("d", date.getDate(), 2);
|
1325 |
-
break;
|
1326 |
-
case "D":
|
1327 |
-
output += formatName("D", date.getDay(), dayNamesShort, dayNames);
|
1328 |
-
break;
|
1329 |
-
case "o":
|
1330 |
-
output += formatNumber("o",
|
1331 |
-
Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
|
1332 |
-
break;
|
1333 |
-
case "m":
|
1334 |
-
output += formatNumber("m", date.getMonth() + 1, 2);
|
1335 |
-
break;
|
1336 |
-
case "M":
|
1337 |
-
output += formatName("M", date.getMonth(), monthNamesShort, monthNames);
|
1338 |
-
break;
|
1339 |
-
case "y":
|
1340 |
-
output += (lookAhead("y") ? date.getFullYear() :
|
1341 |
-
(date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100);
|
1342 |
-
break;
|
1343 |
-
case "@":
|
1344 |
-
output += date.getTime();
|
1345 |
-
break;
|
1346 |
-
case "!":
|
1347 |
-
output += date.getTime() * 10000 + this._ticksTo1970;
|
1348 |
-
break;
|
1349 |
-
case "'":
|
1350 |
-
if (lookAhead("'")) {
|
1351 |
-
output += "'";
|
1352 |
-
} else {
|
1353 |
-
literal = true;
|
1354 |
-
}
|
1355 |
-
break;
|
1356 |
-
default:
|
1357 |
-
output += format.charAt(iFormat);
|
1358 |
-
}
|
1359 |
-
}
|
1360 |
-
}
|
1361 |
-
}
|
1362 |
-
return output;
|
1363 |
-
},
|
1364 |
-
|
1365 |
-
/* Extract all possible characters from the date format. */
|
1366 |
-
_possibleChars: function (format) {
|
1367 |
-
var iFormat,
|
1368 |
-
chars = "",
|
1369 |
-
literal = false,
|
1370 |
-
// Check whether a format character is doubled
|
1371 |
-
lookAhead = function(match) {
|
1372 |
-
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
|
1373 |
-
if (matches) {
|
1374 |
-
iFormat++;
|
1375 |
-
}
|
1376 |
-
return matches;
|
1377 |
-
};
|
1378 |
-
|
1379 |
-
for (iFormat = 0; iFormat < format.length; iFormat++) {
|
1380 |
-
if (literal) {
|
1381 |
-
if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
|
1382 |
-
literal = false;
|
1383 |
-
} else {
|
1384 |
-
chars += format.charAt(iFormat);
|
1385 |
-
}
|
1386 |
-
} else {
|
1387 |
-
switch (format.charAt(iFormat)) {
|
1388 |
-
case "d": case "m": case "y": case "@":
|
1389 |
-
chars += "0123456789";
|
1390 |
-
break;
|
1391 |
-
case "D": case "M":
|
1392 |
-
return null; // Accept anything
|
1393 |
-
case "'":
|
1394 |
-
if (lookAhead("'")) {
|
1395 |
-
chars += "'";
|
1396 |
-
} else {
|
1397 |
-
literal = true;
|
1398 |
-
}
|
1399 |
-
break;
|
1400 |
-
default:
|
1401 |
-
chars += format.charAt(iFormat);
|
1402 |
-
}
|
1403 |
-
}
|
1404 |
-
}
|
1405 |
-
return chars;
|
1406 |
-
},
|
1407 |
-
|
1408 |
-
/* Get a setting value, defaulting if necessary. */
|
1409 |
-
_get: function(inst, name) {
|
1410 |
-
return inst.settings[name] !== undefined ?
|
1411 |
-
inst.settings[name] : this._defaults[name];
|
1412 |
-
},
|
1413 |
-
|
1414 |
-
/* Parse existing date and initialise date picker. */
|
1415 |
-
_setDateFromField: function(inst, noDefault) {
|
1416 |
-
if (inst.input.val() === inst.lastVal) {
|
1417 |
-
return;
|
1418 |
-
}
|
1419 |
-
|
1420 |
-
var dateFormat = this._get(inst, "dateFormat"),
|
1421 |
-
dates = inst.lastVal = inst.input ? inst.input.val() : null,
|
1422 |
-
defaultDate = this._getDefaultDate(inst),
|
1423 |
-
date = defaultDate,
|
1424 |
-
settings = this._getFormatConfig(inst);
|
1425 |
-
|
1426 |
-
try {
|
1427 |
-
date = this.parseDate(dateFormat, dates, settings) || defaultDate;
|
1428 |
-
} catch (event) {
|
1429 |
-
dates = (noDefault ? "" : dates);
|
1430 |
-
}
|
1431 |
-
inst.selectedDay = date.getDate();
|
1432 |
-
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
1433 |
-
inst.drawYear = inst.selectedYear = date.getFullYear();
|
1434 |
-
inst.currentDay = (dates ? date.getDate() : 0);
|
1435 |
-
inst.currentMonth = (dates ? date.getMonth() : 0);
|
1436 |
-
inst.currentYear = (dates ? date.getFullYear() : 0);
|
1437 |
-
this._adjustInstDate(inst);
|
1438 |
-
},
|
1439 |
-
|
1440 |
-
/* Retrieve the default date shown on opening. */
|
1441 |
-
_getDefaultDate: function(inst) {
|
1442 |
-
return this._restrictMinMax(inst,
|
1443 |
-
this._determineDate(inst, this._get(inst, "defaultDate"), new Date()));
|
1444 |
-
},
|
1445 |
-
|
1446 |
-
/* A date may be specified as an exact value or a relative one. */
|
1447 |
-
_determineDate: function(inst, date, defaultDate) {
|
1448 |
-
var offsetNumeric = function(offset) {
|
1449 |
-
var date = new Date();
|
1450 |
-
date.setDate(date.getDate() + offset);
|
1451 |
-
return date;
|
1452 |
-
},
|
1453 |
-
offsetString = function(offset) {
|
1454 |
-
try {
|
1455 |
-
return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
|
1456 |
-
offset, $.datepicker._getFormatConfig(inst));
|
1457 |
-
}
|
1458 |
-
catch (e) {
|
1459 |
-
// Ignore
|
1460 |
-
}
|
1461 |
-
|
1462 |
-
var date = (offset.toLowerCase().match(/^c/) ?
|
1463 |
-
$.datepicker._getDate(inst) : null) || new Date(),
|
1464 |
-
year = date.getFullYear(),
|
1465 |
-
month = date.getMonth(),
|
1466 |
-
day = date.getDate(),
|
1467 |
-
pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
|
1468 |
-
matches = pattern.exec(offset);
|
1469 |
-
|
1470 |
-
while (matches) {
|
1471 |
-
switch (matches[2] || "d") {
|
1472 |
-
case "d" : case "D" :
|
1473 |
-
day += parseInt(matches[1],10); break;
|
1474 |
-
case "w" : case "W" :
|
1475 |
-
day += parseInt(matches[1],10) * 7; break;
|
1476 |
-
case "m" : case "M" :
|
1477 |
-
month += parseInt(matches[1],10);
|
1478 |
-
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
|
1479 |
-
break;
|
1480 |
-
case "y": case "Y" :
|
1481 |
-
year += parseInt(matches[1],10);
|
1482 |
-
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
|
1483 |
-
break;
|
1484 |
-
}
|
1485 |
-
matches = pattern.exec(offset);
|
1486 |
-
}
|
1487 |
-
return new Date(year, month, day);
|
1488 |
-
},
|
1489 |
-
newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) :
|
1490 |
-
(typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
|
1491 |
-
|
1492 |
-
newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate);
|
1493 |
-
if (newDate) {
|
1494 |
-
newDate.setHours(0);
|
1495 |
-
newDate.setMinutes(0);
|
1496 |
-
newDate.setSeconds(0);
|
1497 |
-
newDate.setMilliseconds(0);
|
1498 |
-
}
|
1499 |
-
return this._daylightSavingAdjust(newDate);
|
1500 |
-
},
|
1501 |
-
|
1502 |
-
/* Handle switch to/from daylight saving.
|
1503 |
-
* Hours may be non-zero on daylight saving cut-over:
|
1504 |
-
* > 12 when midnight changeover, but then cannot generate
|
1505 |
-
* midnight datetime, so jump to 1AM, otherwise reset.
|
1506 |
-
* @param date (Date) the date to check
|
1507 |
-
* @return (Date) the corrected date
|
1508 |
-
*/
|
1509 |
-
_daylightSavingAdjust: function(date) {
|
1510 |
-
if (!date) {
|
1511 |
-
return null;
|
1512 |
-
}
|
1513 |
-
date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
|
1514 |
-
return date;
|
1515 |
-
},
|
1516 |
-
|
1517 |
-
/* Set the date(s) directly. */
|
1518 |
-
_setDate: function(inst, date, noChange) {
|
1519 |
-
var clear = !date,
|
1520 |
-
origMonth = inst.selectedMonth,
|
1521 |
-
origYear = inst.selectedYear,
|
1522 |
-
newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
|
1523 |
-
|
1524 |
-
inst.selectedDay = inst.currentDay = newDate.getDate();
|
1525 |
-
inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
|
1526 |
-
inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
|
1527 |
-
if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {
|
1528 |
-
this._notifyChange(inst);
|
1529 |
-
}
|
1530 |
-
this._adjustInstDate(inst);
|
1531 |
-
if (inst.input) {
|
1532 |
-
inst.input.val(clear ? "" : this._formatDate(inst));
|
1533 |
-
}
|
1534 |
-
},
|
1535 |
-
|
1536 |
-
/* Retrieve the date(s) directly. */
|
1537 |
-
_getDate: function(inst) {
|
1538 |
-
var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null :
|
1539 |
-
this._daylightSavingAdjust(new Date(
|
1540 |
-
inst.currentYear, inst.currentMonth, inst.currentDay)));
|
1541 |
-
return startDate;
|
1542 |
-
},
|
1543 |
-
|
1544 |
-
/* Attach the onxxx handlers. These are declared statically so
|
1545 |
-
* they work with static code transformers like Caja.
|
1546 |
-
*/
|
1547 |
-
_attachHandlers: function(inst) {
|
1548 |
-
var stepMonths = this._get(inst, "stepMonths"),
|
1549 |
-
id = "#" + inst.id.replace( /\\\\/g, "\\" );
|
1550 |
-
inst.dpDiv.find("[data-handler]").map(function () {
|
1551 |
-
var handler = {
|
1552 |
-
prev: function () {
|
1553 |
-
$.datepicker._adjustDate(id, -stepMonths, "M");
|
1554 |
-
},
|
1555 |
-
next: function () {
|
1556 |
-
$.datepicker._adjustDate(id, +stepMonths, "M");
|
1557 |
-
},
|
1558 |
-
hide: function () {
|
1559 |
-
$.datepicker._hideDatepicker();
|
1560 |
-
},
|
1561 |
-
today: function () {
|
1562 |
-
$.datepicker._gotoToday(id);
|
1563 |
-
},
|
1564 |
-
selectDay: function () {
|
1565 |
-
$.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
|
1566 |
-
return false;
|
1567 |
-
},
|
1568 |
-
selectMonth: function () {
|
1569 |
-
$.datepicker._selectMonthYear(id, this, "M");
|
1570 |
-
return false;
|
1571 |
-
},
|
1572 |
-
selectYear: function () {
|
1573 |
-
$.datepicker._selectMonthYear(id, this, "Y");
|
1574 |
-
return false;
|
1575 |
-
}
|
1576 |
-
};
|
1577 |
-
$(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]);
|
1578 |
-
});
|
1579 |
-
},
|
1580 |
-
|
1581 |
-
/* Generate the HTML for the current state of the date picker. */
|
1582 |
-
_generateHTML: function(inst) {
|
1583 |
-
var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
|
1584 |
-
controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
|
1585 |
-
monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
|
1586 |
-
selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
|
1587 |
-
cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
|
1588 |
-
printDate, dRow, tbody, daySettings, otherMonth, unselectable,
|
1589 |
-
tempDate = new Date(),
|
1590 |
-
today = this._daylightSavingAdjust(
|
1591 |
-
new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time
|
1592 |
-
isRTL = this._get(inst, "isRTL"),
|
1593 |
-
showButtonPanel = this._get(inst, "showButtonPanel"),
|
1594 |
-
hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"),
|
1595 |
-
navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"),
|
1596 |
-
numMonths = this._getNumberOfMonths(inst),
|
1597 |
-
showCurrentAtPos = this._get(inst, "showCurrentAtPos"),
|
1598 |
-
stepMonths = this._get(inst, "stepMonths"),
|
1599 |
-
isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),
|
1600 |
-
currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
|
1601 |
-
new Date(inst.currentYear, inst.currentMonth, inst.currentDay))),
|
1602 |
-
minDate = this._getMinMaxDate(inst, "min"),
|
1603 |
-
maxDate = this._getMinMaxDate(inst, "max"),
|
1604 |
-
drawMonth = inst.drawMonth - showCurrentAtPos,
|
1605 |
-
drawYear = inst.drawYear;
|
1606 |
-
|
1607 |
-
if (drawMonth < 0) {
|
1608 |
-
drawMonth += 12;
|
1609 |
-
drawYear--;
|
1610 |
-
}
|
1611 |
-
if (maxDate) {
|
1612 |
-
maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
|
1613 |
-
maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
|
1614 |
-
maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
|
1615 |
-
while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
|
1616 |
-
drawMonth--;
|
1617 |
-
if (drawMonth < 0) {
|
1618 |
-
drawMonth = 11;
|
1619 |
-
drawYear--;
|
1620 |
-
}
|
1621 |
-
}
|
1622 |
-
}
|
1623 |
-
inst.drawMonth = drawMonth;
|
1624 |
-
inst.drawYear = drawYear;
|
1625 |
-
|
1626 |
-
prevText = this._get(inst, "prevText");
|
1627 |
-
prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
|
1628 |
-
this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
|
1629 |
-
this._getFormatConfig(inst)));
|
1630 |
-
|
1631 |
-
prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
|
1632 |
-
"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
|
1633 |
-
" title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" :
|
1634 |
-
(hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>"));
|
1635 |
-
|
1636 |
-
nextText = this._get(inst, "nextText");
|
1637 |
-
nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
|
1638 |
-
this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
|
1639 |
-
this._getFormatConfig(inst)));
|
1640 |
-
|
1641 |
-
next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
|
1642 |
-
"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
|
1643 |
-
" title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" :
|
1644 |
-
(hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>"));
|
1645 |
-
|
1646 |
-
currentText = this._get(inst, "currentText");
|
1647 |
-
gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today);
|
1648 |
-
currentText = (!navigationAsDateFormat ? currentText :
|
1649 |
-
this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
|
1650 |
-
|
1651 |
-
controls = (!inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
|
1652 |
-
this._get(inst, "closeText") + "</button>" : "");
|
1653 |
-
|
1654 |
-
buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") +
|
1655 |
-
(this._isInRange(inst, gotoDate) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
|
1656 |
-
">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : "";
|
1657 |
-
|
1658 |
-
firstDay = parseInt(this._get(inst, "firstDay"),10);
|
1659 |
-
firstDay = (isNaN(firstDay) ? 0 : firstDay);
|
1660 |
-
|
1661 |
-
showWeek = this._get(inst, "showWeek");
|
1662 |
-
dayNames = this._get(inst, "dayNames");
|
1663 |
-
dayNamesMin = this._get(inst, "dayNamesMin");
|
1664 |
-
monthNames = this._get(inst, "monthNames");
|
1665 |
-
monthNamesShort = this._get(inst, "monthNamesShort");
|
1666 |
-
beforeShowDay = this._get(inst, "beforeShowDay");
|
1667 |
-
showOtherMonths = this._get(inst, "showOtherMonths");
|
1668 |
-
selectOtherMonths = this._get(inst, "selectOtherMonths");
|
1669 |
-
defaultDate = this._getDefaultDate(inst);
|
1670 |
-
html = "";
|
1671 |
-
dow;
|
1672 |
-
for (row = 0; row < numMonths[0]; row++) {
|
1673 |
-
group = "";
|
1674 |
-
this.maxRows = 4;
|
1675 |
-
for (col = 0; col < numMonths[1]; col++) {
|
1676 |
-
selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
|
1677 |
-
cornerClass = " ui-corner-all";
|
1678 |
-
calender = "";
|
1679 |
-
if (isMultiMonth) {
|
1680 |
-
calender += "<div class='ui-datepicker-group";
|
1681 |
-
if (numMonths[1] > 1) {
|
1682 |
-
switch (col) {
|
1683 |
-
case 0: calender += " ui-datepicker-group-first";
|
1684 |
-
cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
|
1685 |
-
case numMonths[1]-1: calender += " ui-datepicker-group-last";
|
1686 |
-
cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;
|
1687 |
-
default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
|
1688 |
-
}
|
1689 |
-
}
|
1690 |
-
calender += "'>";
|
1691 |
-
}
|
1692 |
-
calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
|
1693 |
-
(/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") +
|
1694 |
-
(/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") +
|
1695 |
-
this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
|
1696 |
-
row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
|
1697 |
-
"</div><table class='ui-datepicker-calendar'><thead>" +
|
1698 |
-
"<tr>";
|
1699 |
-
thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : "");
|
1700 |
-
for (dow = 0; dow < 7; dow++) { // days of the week
|
1701 |
-
day = (dow + firstDay) % 7;
|
1702 |
-
thead += "<th" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +
|
1703 |
-
"<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>";
|
1704 |
-
}
|
1705 |
-
calender += thead + "</tr></thead><tbody>";
|
1706 |
-
daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
|
1707 |
-
if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {
|
1708 |
-
inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
|
1709 |
-
}
|
1710 |
-
leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
|
1711 |
-
curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
|
1712 |
-
numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
|
1713 |
-
this.maxRows = numRows;
|
1714 |
-
printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
|
1715 |
-
for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
|
1716 |
-
calender += "<tr>";
|
1717 |
-
tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
|
1718 |
-
this._get(inst, "calculateWeek")(printDate) + "</td>");
|
1719 |
-
for (dow = 0; dow < 7; dow++) { // create date picker days
|
1720 |
-
daySettings = (beforeShowDay ?
|
1721 |
-
beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]);
|
1722 |
-
otherMonth = (printDate.getMonth() !== drawMonth);
|
1723 |
-
unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
|
1724 |
-
(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
|
1725 |
-
tbody += "<td class='" +
|
1726 |
-
((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends
|
1727 |
-
(otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months
|
1728 |
-
((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key
|
1729 |
-
(defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?
|
1730 |
-
// or defaultDate is current printedDate and defaultDate is selectedDate
|
1731 |
-
" " + this._dayOverClass : "") + // highlight selected day
|
1732 |
-
(unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days
|
1733 |
-
(otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates
|
1734 |
-
(printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day
|
1735 |
-
(printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different)
|
1736 |
-
((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "'") + "'" : "") + // cell title
|
1737 |
-
(unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions
|
1738 |
-
(otherMonth && !showOtherMonths ? " " : // display for other months
|
1739 |
-
(unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
|
1740 |
-
(printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") +
|
1741 |
-
(printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day
|
1742 |
-
(otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months
|
1743 |
-
"' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date
|
1744 |
-
printDate.setDate(printDate.getDate() + 1);
|
1745 |
-
printDate = this._daylightSavingAdjust(printDate);
|
1746 |
-
}
|
1747 |
-
calender += tbody + "</tr>";
|
1748 |
-
}
|
1749 |
-
drawMonth++;
|
1750 |
-
if (drawMonth > 11) {
|
1751 |
-
drawMonth = 0;
|
1752 |
-
drawYear++;
|
1753 |
-
}
|
1754 |
-
calender += "</tbody></table>" + (isMultiMonth ? "</div>" +
|
1755 |
-
((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : "");
|
1756 |
-
group += calender;
|
1757 |
-
}
|
1758 |
-
html += group;
|
1759 |
-
}
|
1760 |
-
html += buttonPanel;
|
1761 |
-
inst._keyEvent = false;
|
1762 |
-
return html;
|
1763 |
-
},
|
1764 |
-
|
1765 |
-
/* Generate the month and year header. */
|
1766 |
-
_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
|
1767 |
-
secondary, monthNames, monthNamesShort) {
|
1768 |
-
|
1769 |
-
var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
|
1770 |
-
changeMonth = this._get(inst, "changeMonth"),
|
1771 |
-
changeYear = this._get(inst, "changeYear"),
|
1772 |
-
showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
|
1773 |
-
html = "<div class='ui-datepicker-title'>",
|
1774 |
-
monthHtml = "";
|
1775 |
-
|
1776 |
-
// month selection
|
1777 |
-
if (secondary || !changeMonth) {
|
1778 |
-
monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>";
|
1779 |
-
} else {
|
1780 |
-
inMinYear = (minDate && minDate.getFullYear() === drawYear);
|
1781 |
-
inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
|
1782 |
-
monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
|
1783 |
-
for ( month = 0; month < 12; month++) {
|
1784 |
-
if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {
|
1785 |
-
monthHtml += "<option value='" + month + "'" +
|
1786 |
-
(month === drawMonth ? " selected='selected'" : "") +
|
1787 |
-
">" + monthNamesShort[month] + "</option>";
|
1788 |
-
}
|
1789 |
-
}
|
1790 |
-
monthHtml += "</select>";
|
1791 |
-
}
|
1792 |
-
|
1793 |
-
if (!showMonthAfterYear) {
|
1794 |
-
html += monthHtml + (secondary || !(changeMonth && changeYear) ? " " : "");
|
1795 |
-
}
|
1796 |
-
|
1797 |
-
// year selection
|
1798 |
-
if ( !inst.yearshtml ) {
|
1799 |
-
inst.yearshtml = "";
|
1800 |
-
if (secondary || !changeYear) {
|
1801 |
-
html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
|
1802 |
-
} else {
|
1803 |
-
// determine range of years to display
|
1804 |
-
years = this._get(inst, "yearRange").split(":");
|
1805 |
-
thisYear = new Date().getFullYear();
|
1806 |
-
determineYear = function(value) {
|
1807 |
-
var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) :
|
1808 |
-
(value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) :
|
1809 |
-
parseInt(value, 10)));
|
1810 |
-
return (isNaN(year) ? thisYear : year);
|
1811 |
-
};
|
1812 |
-
year = determineYear(years[0]);
|
1813 |
-
endYear = Math.max(year, determineYear(years[1] || ""));
|
1814 |
-
year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
|
1815 |
-
endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
|
1816 |
-
inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
|
1817 |
-
for (; year <= endYear; year++) {
|
1818 |
-
inst.yearshtml += "<option value='" + year + "'" +
|
1819 |
-
(year === drawYear ? " selected='selected'" : "") +
|
1820 |
-
">" + year + "</option>";
|
1821 |
-
}
|
1822 |
-
inst.yearshtml += "</select>";
|
1823 |
-
|
1824 |
-
html += inst.yearshtml;
|
1825 |
-
inst.yearshtml = null;
|
1826 |
-
}
|
1827 |
-
}
|
1828 |
-
|
1829 |
-
html += this._get(inst, "yearSuffix");
|
1830 |
-
if (showMonthAfterYear) {
|
1831 |
-
html += (secondary || !(changeMonth && changeYear) ? " " : "") + monthHtml;
|
1832 |
-
}
|
1833 |
-
html += "</div>"; // Close datepicker_header
|
1834 |
-
return html;
|
1835 |
-
},
|
1836 |
-
|
1837 |
-
/* Adjust one of the date sub-fields. */
|
1838 |
-
_adjustInstDate: function(inst, offset, period) {
|
1839 |
-
var year = inst.drawYear + (period === "Y" ? offset : 0),
|
1840 |
-
month = inst.drawMonth + (period === "M" ? offset : 0),
|
1841 |
-
day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0),
|
1842 |
-
date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));
|
1843 |
-
|
1844 |
-
inst.selectedDay = date.getDate();
|
1845 |
-
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
1846 |
-
inst.drawYear = inst.selectedYear = date.getFullYear();
|
1847 |
-
if (period === "M" || period === "Y") {
|
1848 |
-
this._notifyChange(inst);
|
1849 |
-
}
|
1850 |
-
},
|
1851 |
-
|
1852 |
-
/* Ensure a date is within any min/max bounds. */
|
1853 |
-
_restrictMinMax: function(inst, date) {
|
1854 |
-
var minDate = this._getMinMaxDate(inst, "min"),
|
1855 |
-
maxDate = this._getMinMaxDate(inst, "max"),
|
1856 |
-
newDate = (minDate && date < minDate ? minDate : date);
|
1857 |
-
return (maxDate && newDate > maxDate ? maxDate : newDate);
|
1858 |
-
},
|
1859 |
-
|
1860 |
-
/* Notify change of month/year. */
|
1861 |
-
_notifyChange: function(inst) {
|
1862 |
-
var onChange = this._get(inst, "onChangeMonthYear");
|
1863 |
-
if (onChange) {
|
1864 |
-
onChange.apply((inst.input ? inst.input[0] : null),
|
1865 |
-
[inst.selectedYear, inst.selectedMonth + 1, inst]);
|
1866 |
-
}
|
1867 |
-
},
|
1868 |
-
|
1869 |
-
/* Determine the number of months to show. */
|
1870 |
-
_getNumberOfMonths: function(inst) {
|
1871 |
-
var numMonths = this._get(inst, "numberOfMonths");
|
1872 |
-
return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths));
|
1873 |
-
},
|
1874 |
-
|
1875 |
-
/* Determine the current maximum date - ensure no time components are set. */
|
1876 |
-
_getMinMaxDate: function(inst, minMax) {
|
1877 |
-
return this._determineDate(inst, this._get(inst, minMax + "Date"), null);
|
1878 |
-
},
|
1879 |
-
|
1880 |
-
/* Find the number of days in a given month. */
|
1881 |
-
_getDaysInMonth: function(year, month) {
|
1882 |
-
return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
|
1883 |
-
},
|
1884 |
-
|
1885 |
-
/* Find the day of the week of the first of a month. */
|
1886 |
-
_getFirstDayOfMonth: function(year, month) {
|
1887 |
-
return new Date(year, month, 1).getDay();
|
1888 |
-
},
|
1889 |
-
|
1890 |
-
/* Determines if we should allow a "next/prev" month display change. */
|
1891 |
-
_canAdjustMonth: function(inst, offset, curYear, curMonth) {
|
1892 |
-
var numMonths = this._getNumberOfMonths(inst),
|
1893 |
-
date = this._daylightSavingAdjust(new Date(curYear,
|
1894 |
-
curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
|
1895 |
-
|
1896 |
-
if (offset < 0) {
|
1897 |
-
date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
|
1898 |
-
}
|
1899 |
-
return this._isInRange(inst, date);
|
1900 |
-
},
|
1901 |
-
|
1902 |
-
/* Is the given date in the accepted range? */
|
1903 |
-
_isInRange: function(inst, date) {
|
1904 |
-
var yearSplit, currentYear,
|
1905 |
-
minDate = this._getMinMaxDate(inst, "min"),
|
1906 |
-
maxDate = this._getMinMaxDate(inst, "max"),
|
1907 |
-
minYear = null,
|
1908 |
-
maxYear = null,
|
1909 |
-
years = this._get(inst, "yearRange");
|
1910 |
-
if (years){
|
1911 |
-
yearSplit = years.split(":");
|
1912 |
-
currentYear = new Date().getFullYear();
|
1913 |
-
minYear = parseInt(yearSplit[0], 10);
|
1914 |
-
maxYear = parseInt(yearSplit[1], 10);
|
1915 |
-
if ( yearSplit[0].match(/[+\-].*/) ) {
|
1916 |
-
minYear += currentYear;
|
1917 |
-
}
|
1918 |
-
if ( yearSplit[1].match(/[+\-].*/) ) {
|
1919 |
-
maxYear += currentYear;
|
1920 |
-
}
|
1921 |
-
}
|
1922 |
-
|
1923 |
-
return ((!minDate || date.getTime() >= minDate.getTime()) &&
|
1924 |
-
(!maxDate || date.getTime() <= maxDate.getTime()) &&
|
1925 |
-
(!minYear || date.getFullYear() >= minYear) &&
|
1926 |
-
(!maxYear || date.getFullYear() <= maxYear));
|
1927 |
-
},
|
1928 |
-
|
1929 |
-
/* Provide the configuration settings for formatting/parsing. */
|
1930 |
-
_getFormatConfig: function(inst) {
|
1931 |
-
var shortYearCutoff = this._get(inst, "shortYearCutoff");
|
1932 |
-
shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff :
|
1933 |
-
new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
|
1934 |
-
return {shortYearCutoff: shortYearCutoff,
|
1935 |
-
dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"),
|
1936 |
-
monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")};
|
1937 |
-
},
|
1938 |
-
|
1939 |
-
/* Format the given date for display. */
|
1940 |
-
_formatDate: function(inst, day, month, year) {
|
1941 |
-
if (!day) {
|
1942 |
-
inst.currentDay = inst.selectedDay;
|
1943 |
-
inst.currentMonth = inst.selectedMonth;
|
1944 |
-
inst.currentYear = inst.selectedYear;
|
1945 |
-
}
|
1946 |
-
var date = (day ? (typeof day === "object" ? day :
|
1947 |
-
this._daylightSavingAdjust(new Date(year, month, day))) :
|
1948 |
-
this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
|
1949 |
-
return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst));
|
1950 |
-
}
|
1951 |
-
});
|
1952 |
-
|
1953 |
-
/*
|
1954 |
-
* Bind hover events for datepicker elements.
|
1955 |
-
* Done via delegate so the binding only occurs once in the lifetime of the parent div.
|
1956 |
-
* Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
|
1957 |
-
*/
|
1958 |
-
function bindHover(dpDiv) {
|
1959 |
-
var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
|
1960 |
-
return dpDiv.delegate(selector, "mouseout", function() {
|
1961 |
-
$(this).removeClass("ui-state-hover");
|
1962 |
-
if (this.className.indexOf("ui-datepicker-prev") !== -1) {
|
1963 |
-
$(this).removeClass("ui-datepicker-prev-hover");
|
1964 |
-
}
|
1965 |
-
if (this.className.indexOf("ui-datepicker-next") !== -1) {
|
1966 |
-
$(this).removeClass("ui-datepicker-next-hover");
|
1967 |
-
}
|
1968 |
-
})
|
1969 |
-
.delegate(selector, "mouseover", function(){
|
1970 |
-
if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
|
1971 |
-
$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
|
1972 |
-
$(this).addClass("ui-state-hover");
|
1973 |
-
if (this.className.indexOf("ui-datepicker-prev") !== -1) {
|
1974 |
-
$(this).addClass("ui-datepicker-prev-hover");
|
1975 |
-
}
|
1976 |
-
if (this.className.indexOf("ui-datepicker-next") !== -1) {
|
1977 |
-
$(this).addClass("ui-datepicker-next-hover");
|
1978 |
-
}
|
1979 |
-
}
|
1980 |
-
});
|
1981 |
-
}
|
1982 |
-
|
1983 |
-
/* jQuery extend now ignores nulls! */
|
1984 |
-
function extendRemove(target, props) {
|
1985 |
-
$.extend(target, props);
|
1986 |
-
for (var name in props) {
|
1987 |
-
if (props[name] == null) {
|
1988 |
-
target[name] = props[name];
|
1989 |
-
}
|
1990 |
-
}
|
1991 |
-
return target;
|
1992 |
-
}
|
1993 |
-
|
1994 |
-
/* Invoke the datepicker functionality.
|
1995 |
-
@param options string - a command, optionally followed by additional parameters or
|
1996 |
-
Object - settings for attaching new datepicker functionality
|
1997 |
-
@return jQuery object */
|
1998 |
-
$.fn.datepicker = function(options){
|
1999 |
-
|
2000 |
-
/* Verify an empty collection wasn't passed - Fixes #6976 */
|
2001 |
-
if ( !this.length ) {
|
2002 |
-
return this;
|
2003 |
-
}
|
2004 |
-
|
2005 |
-
/* Initialise the date picker. */
|
2006 |
-
if (!$.datepicker.initialized) {
|
2007 |
-
$(document).mousedown($.datepicker._checkExternalClick);
|
2008 |
-
$.datepicker.initialized = true;
|
2009 |
-
}
|
2010 |
-
|
2011 |
-
/* Append datepicker main container to body if not exist. */
|
2012 |
-
if ($("#"+$.datepicker._mainDivId).length === 0) {
|
2013 |
-
$("body").append($.datepicker.dpDiv);
|
2014 |
-
}
|
2015 |
-
|
2016 |
-
var otherArgs = Array.prototype.slice.call(arguments, 1);
|
2017 |
-
if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) {
|
2018 |
-
return $.datepicker["_" + options + "Datepicker"].
|
2019 |
-
apply($.datepicker, [this[0]].concat(otherArgs));
|
2020 |
-
}
|
2021 |
-
if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") {
|
2022 |
-
return $.datepicker["_" + options + "Datepicker"].
|
2023 |
-
apply($.datepicker, [this[0]].concat(otherArgs));
|
2024 |
-
}
|
2025 |
-
return this.each(function() {
|
2026 |
-
typeof options === "string" ?
|
2027 |
-
$.datepicker["_" + options + "Datepicker"].
|
2028 |
-
apply($.datepicker, [this].concat(otherArgs)) :
|
2029 |
-
$.datepicker._attachDatepicker(this, options);
|
2030 |
-
});
|
2031 |
-
};
|
2032 |
-
|
2033 |
-
$.datepicker = new Datepicker(); // singleton instance
|
2034 |
-
$.datepicker.initialized = false;
|
2035 |
-
$.datepicker.uuid = new Date().getTime();
|
2036 |
-
$.datepicker.version = "1.10.4";
|
2037 |
-
|
2038 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/cmb_metaboxes/js/jquery.timePicker.min.js
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* A time picker for jQuery.
|
3 |
-
*
|
4 |
-
* Dual licensed under the MIT and GPL licenses.
|
5 |
-
* Copyright (c) 2009 Anders Fajerson
|
6 |
-
*
|
7 |
-
* @name timePicker
|
8 |
-
* @author Anders Fajerson (http://perifer.se)
|
9 |
-
* @see http://github.com/perifer/timePicker
|
10 |
-
* @example $("#mytime").timePicker();
|
11 |
-
* @example $("#mytime").timePicker({step:30, startTime:"15:00", endTime:"18:00"});
|
12 |
-
*/
|
13 |
-
(function(a){function g(a){a.setFullYear(2001),a.setMonth(0),a.setDate(0);return a}function f(a,b){if(a){var c=a.split(b.separator),d=parseFloat(c[0]),e=parseFloat(c[1]);b.show24Hours||(d===12&&a.indexOf("AM")!==-1?d=0:d!==12&&a.indexOf("PM")!==-1&&(d+=12));var f=new Date(0,0,0,d,e,0);return g(f)}return null}function e(a,b){return typeof a=="object"?g(a):f(a,b)}function d(a){return(a<10?"0":"")+a}function c(a,b){var c=a.getHours(),e=b.show24Hours?c:(c+11)%12+1,f=a.getMinutes();return d(e)+b.separator+d(f)+(b.show24Hours?"":c<12?" AM":" PM")}function b(b,c,d,e){b.value=a(c).text(),a(b).change(),a.browser.msie||b.focus(),d.hide()}a.fn.timePicker=function(b){var c=a.extend({},a.fn.timePicker.defaults,b);return this.each(function(){a.timePicker(this,c)})},a.timePicker=function(b,c){var d=a(b)[0];return d.timePicker||(d.timePicker=new jQuery._timePicker(d,c))},a.timePicker.version="0.3",a._timePicker=function(d,h){var i=!1,j=!1,k=e(h.startTime,h),l=e(h.endTime,h),m="selected",n="li."+m;a(d).attr("autocomplete","OFF");var o=[],p=new Date(k);while(p<=l)o[o.length]=c(p,h),p=new Date(p.setMinutes(p.getMinutes()+h.step));var q=a('<div class="time-picker'+(h.show24Hours?"":" time-picker-12hours")+'"></div>'),r=a("<ul></ul>");for(var s=0;s<o.length;s++)r.append("<li>"+o[s]+"</li>");q.append(r),q.appendTo("body").hide(),q.mouseover(function(){i=!0}).mouseout(function(){i=!1}),a("li",r).mouseover(function(){j||(a(n,q).removeClass(m),a(this).addClass(m))}).mousedown(function(){i=!0}).click(function(){b(d,this,q,h),i=!1});var t=function(){if(q.is(":visible"))return!1;a("li",q).removeClass(m);var b=a(d).offset();q.css({top:b.top+d.offsetHeight,left:b.left}),q.show();var e=d.value?f(d.value,h):k,i=k.getHours()*60+k.getMinutes(),j=e.getHours()*60+e.getMinutes()-i,n=Math.round(j/h.step),o=g(new Date(0,0,0,0,n*h.step+i,0));o=k<o&&o<=l?o:k;var p=a("li:contains("+c(o,h)+")",q);p.length&&(p.addClass(m),q[0].scrollTop=p[0].offsetTop);return!0};a(d).focus(t).click(t),a(d).blur(function(){i||q.hide()});var u=a.browser.opera||a.browser.mozilla?"keypress":"keydown";a(d)[u](function(c){var e;j=!0;var f=q[0].scrollTop;switch(c.keyCode){case 38:if(t())return!1;e=a(n,r);var g=e.prev().addClass(m)[0];g?(e.removeClass(m),g.offsetTop<f&&(q[0].scrollTop=f-g.offsetHeight)):(e.removeClass(m),g=a("li:last",r).addClass(m)[0],q[0].scrollTop=g.offsetTop-g.offsetHeight);return!1;case 40:if(t())return!1;e=a(n,r);var i=e.next().addClass(m)[0];i?(e.removeClass(m),i.offsetTop+i.offsetHeight>f+q[0].offsetHeight&&(q[0].scrollTop=f+i.offsetHeight)):(e.removeClass(m),i=a("li:first",r).addClass(m)[0],q[0].scrollTop=0);return!1;case 13:if(q.is(":visible")){var k=a(n,r)[0];b(d,k,q,h)}return!1;case 27:q.hide();return!1}return!0}),a(d).keyup(function(a){j=!1}),this.getTime=function(){return f(d.value,h)},this.setTime=function(b){d.value=c(e(b,h),h),a(d).change()}},a.fn.timePicker.defaults={step:30,startTime:new Date(0,0,0,0,0,0),endTime:new Date(0,0,0,23,30,0),separator:":",show24Hours:!0}})(jQuery)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/cmb_metaboxes/readme.md
DELETED
@@ -1,296 +0,0 @@
|
|
1 |
-
# Custom Metaboxes and Fields for WordPress
|
2 |
-
|
3 |
-
**Contributors**:
|
4 |
-
|
5 |
-
* WebDevStudios ( [@webdevstudios](http://twitter.com/webdevstudios ) / [webdevstudios.com](http://webdevstudios.com) )
|
6 |
-
* Justin Sternberg ( [@jtsternberg](http://twitter.com/jtsternberg ) / [webdevstudios.com](http://webdevstudios.com) )
|
7 |
-
* Jared Atchison ( [@jaredatch](http://twitter.com/jaredatch ) / [jaredatchison.com](http://jaredatchison.com/) )
|
8 |
-
* Bill Erickson ( [@billerickson](http://twitter.com/billerickson ) / [billerickson.net](http://billerickson.net/) )
|
9 |
-
* Andrew Norcross ( [@norcross](http://twitter.com/norcross ) / [andrewnorcross.com](http://andrewnorcross.com/) )
|
10 |
-
|
11 |
-
**Version**: 1.2.0
|
12 |
-
**Requires at least**: 3.5
|
13 |
-
**Tested up to**: 3.9
|
14 |
-
**License**: GPLv2
|
15 |
-
|
16 |
-
## Description
|
17 |
-
|
18 |
-
Custom Metaboxes and Fields (CMB for short) will create metaboxes and forms with custom fields that will blow your mind.
|
19 |
-
|
20 |
-
##### Features:
|
21 |
-
|
22 |
-
* Create metaboxes to be used on post edit screens.
|
23 |
-
* Create forms to be used on options pages.
|
24 |
-
* Create forms to handle user meta and display them on user profile add/edit pages.
|
25 |
-
* Flexible API that allows you to use CMB forms almost anywhere, even on the front-end.
|
26 |
-
* Several field types are included and are [listed below](#field-types).
|
27 |
-
* Custom API hook that allows you to create your own field types.
|
28 |
-
* There are numerous hooks and filters, allowing you to modify many aspects of the library (without editing it directly).
|
29 |
-
* Repeatable fields for most field types are supported, as well as repeatable field groups.
|
30 |
-
|
31 |
-
##### Field Types:
|
32 |
-
1. [`title`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#title) An arbitrary title field *
|
33 |
-
1. [`text`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#text)
|
34 |
-
1. [`text_small`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#text_small)
|
35 |
-
1. [`text_medium`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#text_medium)
|
36 |
-
1. [`text_email`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#text_email)
|
37 |
-
1. [`text_url`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#text_url)
|
38 |
-
1. [`text_money`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#text_money)
|
39 |
-
1. [`textarea`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#textarea)
|
40 |
-
1. [`textarea_small`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#textarea_small)
|
41 |
-
1. [`textarea_code`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#textarea_code)
|
42 |
-
1. [`text_date`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#text_date) Date Picker
|
43 |
-
1. [`text_time`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#text_time) Time picker
|
44 |
-
1. [`select_timezone`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#select_timezone) Time zone dropdown
|
45 |
-
1. [`text_date_timestamp`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#text_date_timestamp) Date Picker (UNIX timestamp)
|
46 |
-
1. [`text_datetime_timestamp`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#text_datetime_timestamp) Test Date/Time Picker Combo (UNIX timestamp)
|
47 |
-
1. [`text_datetime_timestamp_timezone`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#text_datetime_timestamp_timezone) Test Date/Time Picker/Time zone Combo (serialized DateTime object)
|
48 |
-
1. [`colorpicker`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#colorpicker) Color picker
|
49 |
-
1. [`radio`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#radio) *
|
50 |
-
1. [`radio_inline`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#radio_inline) *
|
51 |
-
1. [`taxonomy_radio`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#taxonomy_radio) *
|
52 |
-
1. [`taxonomy_radio_inline`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#taxonomy_radio_inline) *
|
53 |
-
1. [`select`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#select)
|
54 |
-
1. [`taxonomy_select`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#taxonomy_select) *
|
55 |
-
1. [`checkbox`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#checkbox) *
|
56 |
-
1. [`multicheck`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#multicheck)
|
57 |
-
1. [`taxonomy_multicheck`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#taxonomy_multicheck) *
|
58 |
-
1. [`taxonomy_multicheck_inline`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#taxonomy_multicheck_inline)
|
59 |
-
1. [`wysiwyg`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#wysiwyg) (TinyMCE) *
|
60 |
-
1. [`file`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#file) Image/File upload *†
|
61 |
-
1. [`file_list`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#file_list) Image/File list upload
|
62 |
-
1. [`oembed`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#oembed) Converts oembed urls (instagram, twitter, youtube, etc. [oEmbed in the Codex](https://codex.wordpress.org/Embeds))
|
63 |
-
1. [`group`](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#group) Hybrid field that supports adding other fields as a repeatable group. *
|
64 |
-
1. [Create your own custom field type](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#Custom)
|
65 |
-
|
66 |
-
\* Not available as a repeatable field
|
67 |
-
† Use `file_list` for repeatable
|
68 |
-
|
69 |
-
[More on field types (GitHub wiki)](https://github.com/webdevstudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types)
|
70 |
-
|
71 |
-
##### 3rd Party Resources
|
72 |
-
* [CMB Attached Posts Field](https://github.com/coreymcollins/cmb-attached-posts) from [coreymcollins](https://github.com/coreymcollins): Custom field type for attaching posts to a page.
|
73 |
-
* [CMB Field Type: Google Maps](https://github.com/mustardBees/cmb_field_map) from [mustardBees](https://github.com/mustardBees): Custom field type for Google Maps.
|
74 |
-
> The `pw_map` field stores the latitude/longitude values which you can then use to display a map in your theme.
|
75 |
-
* [CMB Field Type: Select2](https://github.com/mustardBees/cmb-field-select2) from [mustardBees](https://github.com/mustardBees): Custom field types which use the [Select2](http://ivaynberg.github.io/select2/) script:
|
76 |
-
|
77 |
-
> 1. The `pw_select field` acts much like the default select field. However, it adds typeahead-style search allowing you to quickly make a selection from a large list
|
78 |
-
> 2. The `pw_multiselect` field allows you to select multiple values with typeahead-style search. The values can be dragged and dropped to reorder
|
79 |
-
* [Taxonomy_MetaData](https://github.com/jtsternberg/Taxonomy_MetaData#to-use-taxonomy_metadata-with-custom-metaboxes-and-fields): WordPress Helper Class for saving pseudo-metadata for taxonomy terms. Includes an extended class for using CMB to generate the actual form fields.
|
80 |
-
|
81 |
-
##### Contribution
|
82 |
-
All contributions welcome. If you would like to submit a pull request, please check out the [trunk branch](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/tree/trunk) and pull request against it.
|
83 |
-
|
84 |
-
##### Links
|
85 |
-
* [Github project page](https://github.com/webdevstudios/Custom-Metaboxes-and-Fields-for-WordPress)
|
86 |
-
* [Documentation (GitHub wiki)](https://github.com/webdevstudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki)
|
87 |
-
|
88 |
-
|
89 |
-
## Installation
|
90 |
-
|
91 |
-
1. Place the CMB directory inside of your theme or plugin.
|
92 |
-
2. Copy (and rename if desired) `example-functions.php` into a folder *above* the CMB directory OR copy the entirety of its contents to your theme's `functions.php` file.
|
93 |
-
2. Edit to only include the fields you need and rename the functions (CMB directory should be left unedited in order to easily update the library).
|
94 |
-
4. Profit.
|
95 |
-
|
96 |
-
## Changelog
|
97 |
-
|
98 |
-
### 1.2.0
|
99 |
-
|
100 |
-
**Enhancements**
|
101 |
-
|
102 |
-
* Add support for custom date/time formats. Props [@Scrent](https://github.com/Scrent). ([#506](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/506))
|
103 |
-
* Simplify `wysiwyg` escaping and allow it to be overridden via the `escape_cb` parameter. ([#491](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/491))
|
104 |
-
* Add a 'Select/Deselect all' button for the `multicheck` field type.
|
105 |
-
* Add title option for [repeatable groups](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#group). Title field takes an optional replacement hash, "{#}" that will be replaced by the row number.
|
106 |
-
* New field parameter, `show_on_cb`, allows you to conditionally display a field via a callback. ([#47](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/47))
|
107 |
-
* Unit testing (the beginning). Props [@brichards](https://github.com/brichards) and [@camdensegal](https://github.com/camdensegal).
|
108 |
-
|
109 |
-
**Bug Fixes**
|
110 |
-
|
111 |
-
* Fixed issue where remove file button wouldn't clear the url field. ([#514](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/514))
|
112 |
-
* `wysiwyg` fields now allow underscores. Fixes some wysiwyg display issues in WordPress 3.8. Props [@lswilson](https://github.com/lswilson). ([#491](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/491))
|
113 |
-
* Nonce field should only be added once per page. ([#521](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/521))
|
114 |
-
* Fix `in_array` issue when a post does not have any saved terms for a taxonomy multicheck. ([#527](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/527))
|
115 |
-
* Fixed error: 'Uninitialized string offset: 0 in cmb_Meta_Box_field.php...`. Props [@DevinWalker](https://github.com/DevinWalker). ([#539](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/539), [#549](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/549)))
|
116 |
-
* Fix missing `file` field description. ([#543](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/543), [#547](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/547))
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
### 1.1.3
|
121 |
-
**Bug Fixes**
|
122 |
-
|
123 |
-
* Update `cmb_get_field_value` function as it was passing the parameters to `cmb_get_field` in the wrong order.
|
124 |
-
* Fix repeating fields not working correctly if meta key or prefix contained an integer. ([#503](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/503))
|
125 |
-
|
126 |
-
### 1.1.2
|
127 |
-
|
128 |
-
**Bug Fixes**
|
129 |
-
|
130 |
-
* Fix issue with `cmb_Meta_Box_types.php` calling a missing method, `image_id_from_url`. ([#502](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/502))
|
131 |
-
|
132 |
-
|
133 |
-
### 1.1.1
|
134 |
-
|
135 |
-
**Bug Fixes**
|
136 |
-
|
137 |
-
* Radio button values were not showing saved value. ([#500](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/500))
|
138 |
-
|
139 |
-
### 1.1.0
|
140 |
-
|
141 |
-
**Enhancements**
|
142 |
-
|
143 |
-
* [Repeatable groups](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#group)
|
144 |
-
* Support for more fields to be repeatable, including oEmbed field, and date, time, and color picker fields, etc.
|
145 |
-
* Codebase has been revamped to be more modular and object-oriented.
|
146 |
-
* New filter, `"cmb_{$element}_attributes" ` for modifying an element's attributes.
|
147 |
-
* Every field now supports an `attributes` parameter that takes an array of attributes. [Read more](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#attributes).
|
148 |
-
* Removed `cmb_std_filter` in favor of `cmb_default_filter`. **THIS IS A BREAKING CHANGE**
|
149 |
-
* Better handling of labels in sidebar. They are now placed on top of the input rather than adjacent.
|
150 |
-
* Added i18n compatibility to text_money. props [@ArchCarrier](https://github.com/ArchCarrier), ([#485](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/485))
|
151 |
-
* New helper functions: `cmb_get_field` and `cmb_get_field_value` for getting access to CMB's field object and/or value.
|
152 |
-
* New JavaScript events, `cmb_add_row` and `cmb_remove_row` for hooking in and manipulating the new row's data.
|
153 |
-
* New filter, `cmb_localized_data`, for modifiying localized data passed to the CMB JS.
|
154 |
-
|
155 |
-
**Bug Fixes**
|
156 |
-
* Resolved occasional issue where only the first character of the label/value was diplayed. props [@mustardBees](https://github.com/mustardBees), ([#486](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/486))
|
157 |
-
|
158 |
-
|
159 |
-
### 1.0.2
|
160 |
-
|
161 |
-
**Enhancements**
|
162 |
-
|
163 |
-
* Change the way the `'cmb_validate_{$field['type']}'` filter works.
|
164 |
-
It is now passed a null value vs saved value. If null is returned, default sanitization will follow. **THIS IS A BREAKING CHANGE**. If you're already using this filter, take note.
|
165 |
-
* All field types that take an option array have been simplified to take `key => value` pairs (vs `array( 'name' => 'value', 'value' => 'key', )`). This effects the 'select', 'radio', 'radio_inline' field types. The 'multicheck' field type was already using the `key => value` format. Backwards compatibility has been maintained for those using the older style.
|
166 |
-
* Added default value option for `taxonomy_select` field type. props [@darlantc](https://github.com/darlantc), ([#473](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/473))
|
167 |
-
* Added `preview_size` parameter for `file_list` field type. props [@IgorCode](https://github.com/IgorCode), ([#471](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/471))
|
168 |
-
* Updated `file_list` images to be displayed horizontally instead of vertically. props [@IgorCode](https://github.com/IgorCode), ([#467](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/467))
|
169 |
-
* Use `get_the_terms` where possible since the data is cached.
|
170 |
-
|
171 |
-
**Bug Fixes**
|
172 |
-
|
173 |
-
* Fixed wysiwyg escaping slashes. props [@gregrickaby](https://github.com/gregrickaby), ([#465](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/465))
|
174 |
-
* Replaced `__DIR__`, as `dirname( __FILE__ )` is easier to maintain back-compatibility.
|
175 |
-
* Fixed missing table styling on new posts. props [@mustardBees](https://github.com/mustardBees), ([#438](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/438))
|
176 |
-
* Fix undeclared JS variable. [@veelen](https://github.com/veelen), ([#451](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/451))
|
177 |
-
* Fix `file_list` errors when removing all files and saving.
|
178 |
-
* Set correct `object_id` to be used later in `cmb_show_on` filter. [@lauravaq](https://github.com/lauravaq), ([#445](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/445))
|
179 |
-
* Fix sanitization recursion memeory issues.
|
180 |
-
|
181 |
-
### 1.0.1
|
182 |
-
|
183 |
-
**Enhancements**
|
184 |
-
|
185 |
-
* Now works with option pages and site settings. ([view example in wiki](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Using-CMB-to-create-an-Admin-Theme-Options-Page))
|
186 |
-
* two filters to override the setting and getting of options, `cmb_override_option_get_$option_key` and `cmb_override_option_save_$option_key` respectively. Handy for using plugins like [WP Large Options](https://github.com/voceconnect/wp-large-options/) ([also here](http://vip.wordpress.com/plugins/wp-large-options/)).
|
187 |
-
* Improved styling on taxonomy (\*tease\*) and options pages and for new 3.8 admin UI.
|
188 |
-
* New sanitization class to sanitize data when saved.
|
189 |
-
* New callback field parameter, `sanitization_cb`, for performing your own sanitization.
|
190 |
-
* new `cmb_Meta_Box_types::esc()` method that handles escaping data for display.
|
191 |
-
* New callback field parameter, `escape_cb`, for performing your own data escaping, as well as a new filter, `'cmb_types_esc_'. $field['type']`.
|
192 |
-
|
193 |
-
**Bug Fixes**
|
194 |
-
|
195 |
-
* Fixed wysiwyg editor button padding. props [@corvannoorloos](https://github.com/corvannoorloos), ([#391](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/pull/391))
|
196 |
-
* A few php < 5.3 errors were addressed.
|
197 |
-
* Fields with quotation marks no longer break the input/textarea fields.
|
198 |
-
* metaboxes for Attachment pages now save correctly. Thanks [@nciske](https://github.com/nciske) for reporting. ([#412](https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/issues/412))
|
199 |
-
* Occasionally fields wouldn't save because of the admin show_on filter.
|
200 |
-
* Smaller images loaded to the file field type will no longer be blown up larger than their dimensions.
|
201 |
-
|
202 |
-
### 1.0.0
|
203 |
-
* Added `text_datetime_timestamp_timezone` type, a datetime combo field with an additional timezone drop down, props [@dessibelle](https://github.com/dessibelle)
|
204 |
-
* Added `select_timezone` type, a standalone time zone select dropdown. The time zone select can be used with standalone `text_datetime_timestamp` if desired. Props [@dessibelle](https://github.com/dessibelle)
|
205 |
-
* Added `text_url` type, a basic url field. Props [@dessibelle](https://github.com/dessibelle)
|
206 |
-
* Added `text_email` type, a basic email field. Props [@dessibelle](https://github.com/dessibelle)
|
207 |
-
* Added ability to display metabox fields in frontend. Default is true, but can be overriden using the `cmb_allow_frontend filter`. If set to true, an entire metabox form can be output with the `cmb_metabox_form( $meta_box, $object_id, $echo )` function. Props [@dessibelle](https://github.com/dessibelle), [@messenlehner](https://github.com/messenlehner) & [@jtsternberg](https://github.com/jtsternberg).
|
208 |
-
* Added hook `cmb_after_table` after all metabox output. Props [@wpsmith](https://github.com/wpsmith)
|
209 |
-
* `file_list` now works like a repeatable field. Add as many files as you want. Props [@coreymcollins](https://github.com/coreymcollins)
|
210 |
-
* `text`, `text_small`, `text_medium`, `text_url`, `text_email`, & `text_money` fields now all have the option to be repeatable. Props [@jtsternberg](https://github.com/jtsternberg)
|
211 |
-
* Custom metaboxes can now be added for user meta. Add them on the user add/edit screen, or in a custom user profile edit page on the front-end. Props [@tw2113](https://github.com/tw2113), [@jtsternberg](https://github.com/jtsternberg)
|
212 |
-
|
213 |
-
### 0.9.4
|
214 |
-
* Added field "before" and "after" options for each field. Solves issue with '$' not being the desired text_money monetary symbol, props [@GaryJones](https://github.com/GaryJones)
|
215 |
-
* Added filter for 'std' default fallback value, props [@messenlehner](https://github.com/messenlehner)
|
216 |
-
* Ensure oEmbed videos fit in their respective metaboxes, props [@jtsternberg](https://github.com/jtsternberg)
|
217 |
-
* Fixed issue where an upload field with 'show_names' disabled wouldn't have the correct button label, props [@jtsternberg](https://github.com/jtsternberg)
|
218 |
-
* Better file-extension check for images, props [@GhostToast](https://github.com/GhostToast)
|
219 |
-
* New filter, `cmb_valid_img_types`, for whitelisted image file-extensions, props [@jtsternberg](https://github.com/jtsternberg)
|
220 |
-
|
221 |
-
### 0.9.3
|
222 |
-
* Added field type and field id classes to each cmb table row, props [@jtsternberg](https://github.com/jtsternberg)
|
223 |
-
|
224 |
-
### 0.9.2
|
225 |
-
* Added post type comparison to prevent storing null values for taxonomy selectors, props [@norcross](https://github.com/norcross)
|
226 |
-
|
227 |
-
### 0.9.1
|
228 |
-
* Added `oEmbed` field type with ajax display, props [@jtsternberg](https://github.com/jtsternberg)
|
229 |
-
|
230 |
-
### 0.9
|
231 |
-
* __Note: This release requires WordPress 3.3+__
|
232 |
-
* Cleaned up scripts being queued, props [@jaredatch](https://github.com/jaredatch)
|
233 |
-
* Cleaned up and reorganized jQuery, props [@GaryJones](https://github.com/GaryJones)
|
234 |
-
* Use $pagenow instead of custom $current_page, props [@jaredatch](https://github.com/jaredatch)
|
235 |
-
* Fixed CSS, removed inline styles, now all in style.css, props [@jaredatch](https://github.com/jaredatch)
|
236 |
-
* Fixed multicheck issues (issue #48), props [@jaredatch](https://github.com/jaredatch)
|
237 |
-
* Fixed jQuery UI datepicker CSS conflicting with WordPress UI elements, props [@jaredatch](https://github.com/jaredatch)
|
238 |
-
* Fixed zeros not saving in fields, props [@GaryJones](https://github.com/GaryJones)
|
239 |
-
* Fixed improper labels on radio and multicheck fields, props [@jaredatch](https://github.com/jaredatch)
|
240 |
-
* Fixed fields not rendering properly when in sidebar, props [@jaredatch](https://github.com/jaredatch)
|
241 |
-
* Fixed bug where datepicker triggers extra space after footer in Firefox (issue #14), props [@jaredatch](https://github.com/jaredatch)
|
242 |
-
* Added jQuery UI datepicker packaged with 3.3 core, props [@jaredatch](https://github.com/jaredatch)
|
243 |
-
* Added date time combo picker, props [@jaredatch](https://github.com/jaredatch)
|
244 |
-
* Added color picker, props [@jaredatch](https://github.com/jaredatch)
|
245 |
-
* Added readme.md markdown file, props [@jaredatch](https://github.com/jaredatch)
|
246 |
-
|
247 |
-
### 0.8
|
248 |
-
* Added jQuery timepicker, props [@norcross](https://github.com/norcross)
|
249 |
-
* Added 'raw' textarea to convert special HTML entities back to characters, props [@norcross](https://github.com/norcross)
|
250 |
-
* Added missing examples on example-functions.php, props [@norcross](https://github.com/norcross)
|
251 |
-
|
252 |
-
### 0.7
|
253 |
-
* Added the new wp_editor() function for the WYSIWYG dialog box, props [@jcpry](https://github.com/jcpry)
|
254 |
-
* Created 'cmb_show_on' filter to define your own Show On Filters, props [@billerickson](https://github.com/billerickson)
|
255 |
-
* Added page template show_on filter, props [@billerickson](https://github.com/billerickson)
|
256 |
-
* Improvements to the 'file' field type, props [@randyhoyt](https://github.com/randyhoyt)
|
257 |
-
* Allow for default values on 'radio' and 'radio_inline' field types, props [@billerickson](https://github.com/billerickson)
|
258 |
-
|
259 |
-
### 0.6.1
|
260 |
-
* Enabled the ability to define your own custom field types (issue #28). props [@randyhoyt](https://github.com/randyhoyt)
|
261 |
-
|
262 |
-
### 0.6
|
263 |
-
* Added the ability to limit metaboxes to certain posts by id. props [@billerickson](https://github.com/billerickson)
|
264 |
-
|
265 |
-
### 0.5
|
266 |
-
* Fixed define to prevent notices. props [@destos](https://github.com/destos)
|
267 |
-
* Added text_date_timestap option. props [@andrewyno](https://github.com/andrewyno)
|
268 |
-
* Fixed WYSIWYG paragraph breaking/spacing bug. props [@wpsmith](https://github.com/wpsmith)
|
269 |
-
* Added taxonomy_radio and taxonomies_select options. props [@c3mdigital](https://github.com/c3mdigital)
|
270 |
-
* Fixed script causing the dashboard widgets to not be collapsible.
|
271 |
-
* Fixed various spacing and whitespace inconsistencies
|
272 |
-
|
273 |
-
### 0.4
|
274 |
-
* Think we have a release that is mostly working. We'll say the initial release :)
|
275 |
-
|
276 |
-
## Known Issues
|
277 |
-
|
278 |
-
* Problem inserting file url inside field for image with caption (issue #50) May be fixed, needs testing.
|
279 |
-
* `CMB_META_BOX_URL` does not define properly in WAMP/XAMP (Windows) (issue #31) May be fixed, needs testing.
|
280 |
-
* Metabox containing WYSIWYG editor cannot be moved (this is a TinyMCE issue)
|
281 |
-
|
282 |
-
## To-do
|
283 |
-
**Enhancements**
|
284 |
-
|
285 |
-
* Fix known issues (above)
|
286 |
-
* move timepicker and datepicker jQuery inline
|
287 |
-
* support for multiple configurable timepickers/datepickers
|
288 |
-
* add ability to save fields in a single custom field
|
289 |
-
* add ability to mark fields as required
|
290 |
-
* repeatable fields (halfway there)
|
291 |
-
* look at possiblity of tabs
|
292 |
-
* look at preserving taxonomy hierarchies
|
293 |
-
* Add input attributes filter
|
294 |
-
* Always load newest version of CMB
|
295 |
-
* Helper function to easily get oembed from stored oEmbed field
|
296 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/cmb_metaboxes/style.css
DELETED
@@ -1,621 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* CMB Styling
|
3 |
-
*/
|
4 |
-
|
5 |
-
table.cmb_metabox {
|
6 |
-
clear: both;
|
7 |
-
}
|
8 |
-
|
9 |
-
table.cmb_metabox > tr:first-of-type > td,
|
10 |
-
table.cmb_metabox > tr:first-of-type > th,
|
11 |
-
table.cmb_metabox tbody > tr:first-of-type > td,
|
12 |
-
table.cmb_metabox tbody > tr:first-of-type > th,
|
13 |
-
.post-php table.cmb_metabox .cmb-nested-table td,
|
14 |
-
.post-new-php table.cmb_metabox .cmb-nested-table td,
|
15 |
-
.post-php table.cmb_metabox .repeatable-group th,
|
16 |
-
.post-new-php table.cmb_metabox .repeatable-group th,
|
17 |
-
.post-php table.cmb_metabox .repeatable-group:first-of-type,
|
18 |
-
.post-new-php table.cmb_metabox .repeatable-group:first-of-type {
|
19 |
-
border: 0;
|
20 |
-
}
|
21 |
-
|
22 |
-
.post-php table.cmb_metabox td,
|
23 |
-
.post-new-php table.cmb_metabox td,
|
24 |
-
.post-php table.cmb_metabox th,
|
25 |
-
.post-new-php table.cmb_metabox th,
|
26 |
-
.post-php table.cmb_metabox .repeatable-group,
|
27 |
-
.post-new-php table.cmb_metabox .repeatable-group,
|
28 |
-
.post-php table.cmb_metabox .repeatable-group,
|
29 |
-
.post-new-php table.cmb_metabox .repeatable-group {
|
30 |
-
border-top: 1px solid #E9E9E9;
|
31 |
-
}
|
32 |
-
|
33 |
-
.repeatable-group th {
|
34 |
-
padding: 5px;
|
35 |
-
}
|
36 |
-
|
37 |
-
.repeatable-group .shift-rows {
|
38 |
-
text-decoration: none;
|
39 |
-
margin-right: 5px;
|
40 |
-
font-size: 1.2em;
|
41 |
-
}
|
42 |
-
|
43 |
-
.repeatable-group .cmb_upload_button {
|
44 |
-
float: right;
|
45 |
-
}
|
46 |
-
|
47 |
-
#poststuff .repeatable-group h2 {
|
48 |
-
margin: 0;
|
49 |
-
}
|
50 |
-
|
51 |
-
.cmb-group-title h4 {
|
52 |
-
font-size: 1.2em;
|
53 |
-
font-weight: 500;
|
54 |
-
border-bottom: 1px solid #ddd;
|
55 |
-
}
|
56 |
-
|
57 |
-
.post-php table.cmb_metabox th, .post-new-php table.cmb_metabox th {
|
58 |
-
text-align: right;
|
59 |
-
font-weight:bold;
|
60 |
-
}
|
61 |
-
|
62 |
-
.post-php table.cmb_metabox table th, .post-new-php table.cmb_metabox table th {
|
63 |
-
text-align: left;
|
64 |
-
}
|
65 |
-
|
66 |
-
table.cmb_metabox th label {
|
67 |
-
margin-top:5px;
|
68 |
-
display:block
|
69 |
-
}
|
70 |
-
|
71 |
-
p.cmb_metabox_description {
|
72 |
-
color: #AAA;
|
73 |
-
font-style: italic;
|
74 |
-
margin: 2px 0 !important
|
75 |
-
}
|
76 |
-
|
77 |
-
span.cmb_metabox_description {
|
78 |
-
color: #AAA;
|
79 |
-
font-style: italic
|
80 |
-
}
|
81 |
-
|
82 |
-
table.cmb_metabox input, table.cmb_metabox textarea {
|
83 |
-
font-size:14px;
|
84 |
-
padding: 5px;
|
85 |
-
}
|
86 |
-
|
87 |
-
table.cmb_metabox input[type=text], table.cmb_metabox textarea {
|
88 |
-
width: 97%;
|
89 |
-
}
|
90 |
-
|
91 |
-
table.cmb_metabox textarea.cmb_textarea_code {
|
92 |
-
font-family: Consolas,Monaco,monospace;
|
93 |
-
line-height: 16px;
|
94 |
-
}
|
95 |
-
|
96 |
-
table.cmb_metabox input.cmb_text_small {
|
97 |
-
width: 100px;
|
98 |
-
margin-right: 15px
|
99 |
-
}
|
100 |
-
|
101 |
-
table.cmb_metabox input.cmb_timepicker {
|
102 |
-
width: 100px;
|
103 |
-
margin-right: 15px
|
104 |
-
}
|
105 |
-
|
106 |
-
table.cmb_metabox input.cmb_text_money {
|
107 |
-
width: 90px;
|
108 |
-
margin-right: 15px
|
109 |
-
}
|
110 |
-
|
111 |
-
table.cmb_metabox input.cmb_text_medium {
|
112 |
-
width: 230px;
|
113 |
-
margin-right: 15px
|
114 |
-
}
|
115 |
-
|
116 |
-
table.cmb_metabox input.cmb_upload_file {
|
117 |
-
width: 65%;
|
118 |
-
}
|
119 |
-
|
120 |
-
table.cmb_metabox input.ed_button{
|
121 |
-
padding:2px 4px
|
122 |
-
}
|
123 |
-
|
124 |
-
table.cmb_metabox li {
|
125 |
-
font-size:14px;
|
126 |
-
margin: 1px 0 5px 0;
|
127 |
-
line-height: 16px;
|
128 |
-
}
|
129 |
-
|
130 |
-
table.cmb_metabox ul {
|
131 |
-
padding-top:5px;
|
132 |
-
margin: 0;
|
133 |
-
}
|
134 |
-
|
135 |
-
table.cmb_metabox select {
|
136 |
-
font-size:14px;
|
137 |
-
margin-top: 3px
|
138 |
-
}
|
139 |
-
|
140 |
-
table.cmb_metabox input:focus, table.cmb_metabox textarea:focus {
|
141 |
-
background: #fffff8
|
142 |
-
}
|
143 |
-
|
144 |
-
.cmb_metabox_title {
|
145 |
-
margin: 0 0 5px 0;
|
146 |
-
padding: 5px 0 0 0;
|
147 |
-
}
|
148 |
-
|
149 |
-
.edit-tags-php .cmb_metabox_title, .profile-php .cmb_metabox_title, .user-edit-php .cmb_metabox_title {
|
150 |
-
margin-left: -10px;
|
151 |
-
}
|
152 |
-
|
153 |
-
.cmb-inline ul {
|
154 |
-
padding: 4px 0 0 0
|
155 |
-
}
|
156 |
-
|
157 |
-
.cmb-inline li {display: inline-block;
|
158 |
-
padding-right: 18px
|
159 |
-
}
|
160 |
-
|
161 |
-
table.cmb_metabox input[type="radio"] {
|
162 |
-
margin: 0 5px 0 0;
|
163 |
-
padding: 0
|
164 |
-
}
|
165 |
-
|
166 |
-
table.cmb_metabox input[type="checkbox"] {
|
167 |
-
margin: 0 5px 0 0;
|
168 |
-
padding: 0
|
169 |
-
}
|
170 |
-
|
171 |
-
table.cmb_metabox .mceLayout {
|
172 |
-
border:1px solid #DFDFDF !important
|
173 |
-
}
|
174 |
-
|
175 |
-
table.cmb_metabox .mceIframeContainer {
|
176 |
-
background:#FFF
|
177 |
-
}
|
178 |
-
|
179 |
-
table.cmb_metabox .meta_mce {
|
180 |
-
width:97%
|
181 |
-
}
|
182 |
-
|
183 |
-
table.cmb_metabox .meta_mce textarea {
|
184 |
-
width:100%
|
185 |
-
}
|
186 |
-
|
187 |
-
table.cmb_metabox .cmb_media_status {
|
188 |
-
margin: 10px 0 0 0
|
189 |
-
}
|
190 |
-
|
191 |
-
table.cmb_metabox .cmb_media_status .img_status {
|
192 |
-
clear: none;
|
193 |
-
float: left;
|
194 |
-
display: inline-block;
|
195 |
-
margin-right: 10px;
|
196 |
-
width: auto;
|
197 |
-
}
|
198 |
-
|
199 |
-
table.cmb_metabox .cmb-type-file_list .cmb_media_status .img_status {
|
200 |
-
clear: none;
|
201 |
-
float: left;
|
202 |
-
margin-right: 10px;
|
203 |
-
width: auto;
|
204 |
-
}
|
205 |
-
|
206 |
-
table.cmb_metabox .cmb_media_status .img_status, table.cmb_metabox .cmb_media_status .embed_status {
|
207 |
-
position: relative;
|
208 |
-
}
|
209 |
-
|
210 |
-
table.cmb_metabox .cmb_media_status .img_status img, table.cmb_metabox .cmb_media_status .embed_status {
|
211 |
-
border:1px solid #DFDFDF;
|
212 |
-
background: #FAFAFA;
|
213 |
-
max-width:350px;
|
214 |
-
padding: 5px;
|
215 |
-
-moz-border-radius: 2px;
|
216 |
-
border-radius: 2px
|
217 |
-
}
|
218 |
-
|
219 |
-
table.cmb_metabox .cmb_media_status .embed_status {
|
220 |
-
float: left;
|
221 |
-
max-width:800px
|
222 |
-
}
|
223 |
-
|
224 |
-
table.cmb_metabox .cmb_media_status .img_status .cmb_remove_file_button, table.cmb_metabox .cmb_media_status .embed_status .cmb_remove_file_button {
|
225 |
-
text-indent: -9999px;
|
226 |
-
background: url(images/ico-delete.png);
|
227 |
-
width: 16px;
|
228 |
-
height: 16px;
|
229 |
-
position: absolute;
|
230 |
-
top: -5px;
|
231 |
-
left: -5px
|
232 |
-
}
|
233 |
-
|
234 |
-
table.cmb_metabox .attach_list li {
|
235 |
-
clear: both;
|
236 |
-
display: inline-block;
|
237 |
-
margin-bottom: 25px;
|
238 |
-
width: 100%;
|
239 |
-
}
|
240 |
-
|
241 |
-
table.cmb_metabox .attach_list li img {
|
242 |
-
float: left;
|
243 |
-
margin-right: 10px;
|
244 |
-
}
|
245 |
-
|
246 |
-
/**
|
247 |
-
* Sidebar placement adjustments
|
248 |
-
*/
|
249 |
-
.inner-sidebar table.cmb_metabox input[type=text],
|
250 |
-
#side-sortables table.cmb_metabox input[type=text],
|
251 |
-
table.cmb_metabox textarea {
|
252 |
-
width: 95%;
|
253 |
-
}
|
254 |
-
|
255 |
-
.inner-sidebar table.cmb_metabox .cmb_media_status .img_status img,
|
256 |
-
#side-sortables table.cmb_metabox .cmb_media_status .img_status img,
|
257 |
-
.inner-sidebar table.cmb_metabox .cmb_media_status .embed_status img,
|
258 |
-
#side-sortables table.cmb_metabox .cmb_media_status .embed_status img {
|
259 |
-
width: 90%;
|
260 |
-
}
|
261 |
-
|
262 |
-
.inner-sidebar table.cmb_metabox label,
|
263 |
-
#side-sortables table.cmb_metabox label {
|
264 |
-
display: block;
|
265 |
-
font-weight: bold;
|
266 |
-
padding: 0 0 5px;
|
267 |
-
}
|
268 |
-
|
269 |
-
.inner-sidebar table.cmb_metabox .cmb_list label,
|
270 |
-
#side-sortables table.cmb_metabox .cmb_list label {
|
271 |
-
display: inline;
|
272 |
-
font-weight: normal;
|
273 |
-
}
|
274 |
-
|
275 |
-
.inner-sidebar table.cmb_metabox .cmb_metabox_description,
|
276 |
-
#side-sortables table.cmb_metabox .cmb_metabox_description {
|
277 |
-
display: block;
|
278 |
-
padding: 7px 0 0;
|
279 |
-
}
|
280 |
-
|
281 |
-
.inner-sidebar table.cmb_metabox .cmb_metabox_title,
|
282 |
-
#side-sortables table.cmb_metabox .cmb_metabox_title {
|
283 |
-
font-size: 1.2em;
|
284 |
-
font-style: italic;
|
285 |
-
}
|
286 |
-
|
287 |
-
.postbox table.cmb_metabox .cmb-spinner {
|
288 |
-
float: left;
|
289 |
-
}
|
290 |
-
|
291 |
-
/**
|
292 |
-
* Color picker
|
293 |
-
*/
|
294 |
-
table.cmb_metabox .wp-color-result, table.cmb_metabox .wp-picker-input-wrap {
|
295 |
-
vertical-align: middle;
|
296 |
-
}
|
297 |
-
|
298 |
-
table.cmb_metabox .wp-color-result, table.cmb_metabox .wp-picker-container {
|
299 |
-
margin: 0 10px 0 0;
|
300 |
-
}
|
301 |
-
|
302 |
-
|
303 |
-
/**
|
304 |
-
* Timepicker
|
305 |
-
*/
|
306 |
-
div.time-picker {
|
307 |
-
position: absolute;
|
308 |
-
height: 191px;
|
309 |
-
width:6em;
|
310 |
-
/* needed for IE */overflow: auto;
|
311 |
-
background: #fff;
|
312 |
-
border: 1px solid #aaa;
|
313 |
-
z-index: 99;
|
314 |
-
margin: 0
|
315 |
-
}
|
316 |
-
|
317 |
-
div.time-picker-12hours {
|
318 |
-
width:8em; /* needed for IE */
|
319 |
-
}
|
320 |
-
|
321 |
-
div.time-picker ul {
|
322 |
-
list-style-type: none;
|
323 |
-
margin: 0;
|
324 |
-
padding: 0;
|
325 |
-
}
|
326 |
-
|
327 |
-
div.time-picker li {
|
328 |
-
cursor: pointer;
|
329 |
-
height: 10px;
|
330 |
-
font: 14px/1 Helvetica, Arial, sans-serif;
|
331 |
-
padding: 4px 3px;
|
332 |
-
}
|
333 |
-
|
334 |
-
div.time-picker li.selected {
|
335 |
-
background: #0063CE;
|
336 |
-
color: #fff;
|
337 |
-
}
|
338 |
-
|
339 |
-
/**
|
340 |
-
* jQuery UI CSS Framework 1.8.16
|
341 |
-
*
|
342 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
343 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
344 |
-
* http://jquery.org/license
|
345 |
-
*
|
346 |
-
* http://docs.jquery.com/UI/Theming/API
|
347 |
-
*/
|
348 |
-
.cmb_element .ui-helper-hidden { display: none; }
|
349 |
-
.cmb_element .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
350 |
-
.cmb_element .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
351 |
-
.cmb_element .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
352 |
-
.cmb_element .ui-helper-clearfix { display: inline-block; }
|
353 |
-
* html .ui-helper-clearfix { height:1%; }
|
354 |
-
.cmb_element .ui-helper-clearfix { display:block; }
|
355 |
-
.cmb_element .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
356 |
-
.cmb_element .ui-state-disabled { cursor: default !important; }
|
357 |
-
.cmb_element .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
358 |
-
.cmb_element .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
359 |
-
.cmb_element .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
|
360 |
-
.cmb_element .ui-widget .ui-widget { font-size: 1em; }
|
361 |
-
.cmb_element .ui-widget input, .cmb_element .ui-widget select, .cmb_element .ui-widget textarea, .cmb_element .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
|
362 |
-
.cmb_element .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
|
363 |
-
.cmb_element .ui-widget-content a { color: #222222; }
|
364 |
-
.cmb_element .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
365 |
-
.cmb_element .ui-widget-header a { color: #222222; }
|
366 |
-
.cmb_element .ui-state-default, .cmb_element .ui-widget-content .ui-state-default, .cmb_element .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
|
367 |
-
.cmb_element .ui-state-default a, .cmb_element .ui-state-default a:link, .cmb_element .ui-state-default a:visited { color: #555555; text-decoration: none; }
|
368 |
-
.cmb_element .ui-state-hover, .cmb_element .ui-widget-content .ui-state-hover, .cmb_element .ui-widget-header .ui-state-hover, .cmb_element .ui-state-focus, .cmb_element .ui-widget-content .ui-state-focus, .cmb_element .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
369 |
-
.cmb_element .ui-state-hover a, .cmb_element .ui-state-hover a:hover { color: #212121; text-decoration: none; }
|
370 |
-
.cmb_element .ui-state-active, .cmb_element .ui-widget-content .ui-state-active, .cmb_element .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
371 |
-
.cmb_element .ui-state-active a, .cmb_element .ui-state-active a:link, .cmb_element .ui-state-active a:visited { color: #212121; text-decoration: none; }
|
372 |
-
.cmb_element .ui-widget :active { outline: none; }
|
373 |
-
.cmb_element .ui-state-highlight, .cmb_element .ui-widget-content .ui-state-highlight, .cmb_element .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
|
374 |
-
.cmb_element .ui-state-highlight a, .cmb_element .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
375 |
-
.cmb_element .ui-state-error, .cmb_element .ui-widget-content .ui-state-error, .cmb_element .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
|
376 |
-
.cmb_element .ui-state-error a, .cmb_element .ui-widget-content .ui-state-error a, .cmb_element .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
377 |
-
.cmb_element .ui-state-error-text, .cmb_element .ui-widget-content .ui-state-error-text, .cmb_element .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
378 |
-
.cmb_element .ui-priority-primary, .cmb_element .ui-widget-content .ui-priority-primary, .cmb_element .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
379 |
-
.cmb_element .ui-priority-secondary, .cmb_element .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
380 |
-
.cmb_element .ui-state-disabled, .cmb_element .ui-widget-content .ui-state-disabled, .cmb_element .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
381 |
-
.cmb_element .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
|
382 |
-
.cmb_element .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
383 |
-
.cmb_element .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
384 |
-
.cmb_element .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
|
385 |
-
.cmb_element .ui-state-hover .ui-icon, .cmb_element .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
386 |
-
.cmb_element .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
|
387 |
-
.cmb_element .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
|
388 |
-
.cmb_element .ui-state-error .ui-icon, .cmb_element .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
|
389 |
-
.cmb_element .ui-icon-carat-1-n { background-position: 0 0; }
|
390 |
-
.cmb_element .ui-icon-carat-1-ne { background-position: -16px 0; }
|
391 |
-
.cmb_element .ui-icon-carat-1-e { background-position: -32px 0; }
|
392 |
-
.cmb_element .ui-icon-carat-1-se { background-position: -48px 0; }
|
393 |
-
.cmb_element .ui-icon-carat-1-s { background-position: -64px 0; }
|
394 |
-
.cmb_element .ui-icon-carat-1-sw { background-position: -80px 0; }
|
395 |
-
.cmb_element .ui-icon-carat-1-w { background-position: -96px 0; }
|
396 |
-
.cmb_element .ui-icon-carat-1-nw { background-position: -112px 0; }
|
397 |
-
.cmb_element .ui-icon-carat-2-n-s { background-position: -128px 0; }
|
398 |
-
.cmb_element .ui-icon-carat-2-e-w { background-position: -144px 0; }
|
399 |
-
.cmb_element .ui-icon-triangle-1-n { background-position: 0 -16px; }
|
400 |
-
.cmb_element .ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
401 |
-
.cmb_element .ui-icon-triangle-1-e { background-position: -32px -16px; }
|
402 |
-
.cmb_element .ui-icon-triangle-1-se { background-position: -48px -16px; }
|
403 |
-
.cmb_element .ui-icon-triangle-1-s { background-position: -64px -16px; }
|
404 |
-
.cmb_element .ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
405 |
-
.cmb_element .ui-icon-triangle-1-w { background-position: -96px -16px; }
|
406 |
-
.cmb_element .ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
407 |
-
.cmb_element .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
408 |
-
.cmb_element .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
409 |
-
.cmb_element .ui-icon-arrow-1-n { background-position: 0 -32px; }
|
410 |
-
.cmb_element .ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
411 |
-
.cmb_element .ui-icon-arrow-1-e { background-position: -32px -32px; }
|
412 |
-
.cmb_element .ui-icon-arrow-1-se { background-position: -48px -32px; }
|
413 |
-
.cmb_element .ui-icon-arrow-1-s { background-position: -64px -32px; }
|
414 |
-
.cmb_element .ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
415 |
-
.cmb_element .ui-icon-arrow-1-w { background-position: -96px -32px; }
|
416 |
-
.cmb_element .ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
417 |
-
.cmb_element .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
418 |
-
.cmb_element .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
419 |
-
.cmb_element .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
420 |
-
.cmb_element .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
421 |
-
.cmb_element .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
422 |
-
.cmb_element .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
423 |
-
.cmb_element .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
424 |
-
.cmb_element .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
425 |
-
.cmb_element .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
426 |
-
.cmb_element .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
427 |
-
.cmb_element .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
428 |
-
.cmb_element .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
429 |
-
.cmb_element .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
430 |
-
.cmb_element .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
431 |
-
.cmb_element .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
432 |
-
.cmb_element .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
433 |
-
.cmb_element .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
434 |
-
.cmb_element .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
435 |
-
.cmb_element .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
436 |
-
.cmb_element .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
437 |
-
.cmb_element .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
438 |
-
.cmb_element .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
439 |
-
.cmb_element .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
440 |
-
.cmb_element .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
441 |
-
.cmb_element .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
442 |
-
.cmb_element .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
443 |
-
.cmb_element .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
444 |
-
.cmb_element .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
445 |
-
.cmb_element .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
446 |
-
.cmb_element .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
447 |
-
.cmb_element .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
448 |
-
.cmb_element .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
449 |
-
.cmb_element .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
450 |
-
.cmb_element .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
451 |
-
.cmb_element .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
452 |
-
.cmb_element .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
453 |
-
.cmb_element .ui-icon-arrow-4 { background-position: 0 -80px; }
|
454 |
-
.cmb_element .ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
455 |
-
.cmb_element .ui-icon-extlink { background-position: -32px -80px; }
|
456 |
-
.cmb_element .ui-icon-newwin { background-position: -48px -80px; }
|
457 |
-
.cmb_element .ui-icon-refresh { background-position: -64px -80px; }
|
458 |
-
.cmb_element .ui-icon-shuffle { background-position: -80px -80px; }
|
459 |
-
.cmb_element .ui-icon-transfer-e-w { background-position: -96px -80px; }
|
460 |
-
.cmb_element .ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
461 |
-
.cmb_element .ui-icon-folder-collapsed { background-position: 0 -96px; }
|
462 |
-
.cmb_element .ui-icon-folder-open { background-position: -16px -96px; }
|
463 |
-
.cmb_element .ui-icon-document { background-position: -32px -96px; }
|
464 |
-
.cmb_element .ui-icon-document-b { background-position: -48px -96px; }
|
465 |
-
.cmb_element .ui-icon-note { background-position: -64px -96px; }
|
466 |
-
.cmb_element .ui-icon-mail-closed { background-position: -80px -96px; }
|
467 |
-
.cmb_element .ui-icon-mail-open { background-position: -96px -96px; }
|
468 |
-
.cmb_element .ui-icon-suitcase { background-position: -112px -96px; }
|
469 |
-
.cmb_element .ui-icon-comment { background-position: -128px -96px; }
|
470 |
-
.cmb_element .ui-icon-person { background-position: -144px -96px; }
|
471 |
-
.cmb_element .ui-icon-print { background-position: -160px -96px; }
|
472 |
-
.cmb_element .ui-icon-trash { background-position: -176px -96px; }
|
473 |
-
.cmb_element .ui-icon-locked { background-position: -192px -96px; }
|
474 |
-
.cmb_element .ui-icon-unlocked { background-position: -208px -96px; }
|
475 |
-
.cmb_element .ui-icon-bookmark { background-position: -224px -96px; }
|
476 |
-
.cmb_element .ui-icon-tag { background-position: -240px -96px; }
|
477 |
-
.cmb_element .ui-icon-home { background-position: 0 -112px; }
|
478 |
-
.cmb_element .ui-icon-flag { background-position: -16px -112px; }
|
479 |
-
.cmb_element .ui-icon-calendar { background-position: -32px -112px; }
|
480 |
-
.cmb_element .ui-icon-cart { background-position: -48px -112px; }
|
481 |
-
.cmb_element .ui-icon-pencil { background-position: -64px -112px; }
|
482 |
-
.cmb_element .ui-icon-clock { background-position: -80px -112px; }
|
483 |
-
.cmb_element .ui-icon-disk { background-position: -96px -112px; }
|
484 |
-
.cmb_element .ui-icon-calculator { background-position: -112px -112px; }
|
485 |
-
.cmb_element .ui-icon-zoomin { background-position: -128px -112px; }
|
486 |
-
.cmb_element .ui-icon-zoomout { background-position: -144px -112px; }
|
487 |
-
.cmb_element .ui-icon-search { background-position: -160px -112px; }
|
488 |
-
.cmb_element .ui-icon-wrench { background-position: -176px -112px; }
|
489 |
-
.cmb_element .ui-icon-gear { background-position: -192px -112px; }
|
490 |
-
.cmb_element .ui-icon-heart { background-position: -208px -112px; }
|
491 |
-
.cmb_element .ui-icon-star { background-position: -224px -112px; }
|
492 |
-
.cmb_element .ui-icon-link { background-position: -240px -112px; }
|
493 |
-
.cmb_element .ui-icon-cancel { background-position: 0 -128px; }
|
494 |
-
.cmb_element .ui-icon-plus { background-position: -16px -128px; }
|
495 |
-
.cmb_element .ui-icon-plusthick { background-position: -32px -128px; }
|
496 |
-
.cmb_element .ui-icon-minus { background-position: -48px -128px; }
|
497 |
-
.cmb_element .ui-icon-minusthick { background-position: -64px -128px; }
|
498 |
-
.cmb_element .ui-icon-close { background-position: -80px -128px; }
|
499 |
-
.cmb_element .ui-icon-closethick { background-position: -96px -128px; }
|
500 |
-
.cmb_element .ui-icon-key { background-position: -112px -128px; }
|
501 |
-
.cmb_element .ui-icon-lightbulb { background-position: -128px -128px; }
|
502 |
-
.cmb_element .ui-icon-scissors { background-position: -144px -128px; }
|
503 |
-
.cmb_element .ui-icon-clipboard { background-position: -160px -128px; }
|
504 |
-
.cmb_element .ui-icon-copy { background-position: -176px -128px; }
|
505 |
-
.cmb_element .ui-icon-contact { background-position: -192px -128px; }
|
506 |
-
.cmb_element .ui-icon-image { background-position: -208px -128px; }
|
507 |
-
.cmb_element .ui-icon-video { background-position: -224px -128px; }
|
508 |
-
.cmb_element .ui-icon-script { background-position: -240px -128px; }
|
509 |
-
.cmb_element .ui-icon-alert { background-position: 0 -144px; }
|
510 |
-
.cmb_element .ui-icon-info { background-position: -16px -144px; }
|
511 |
-
.cmb_element .ui-icon-notice { background-position: -32px -144px; }
|
512 |
-
.cmb_element .ui-icon-help { background-position: -48px -144px; }
|
513 |
-
.cmb_element .ui-icon-check { background-position: -64px -144px; }
|
514 |
-
.cmb_element .ui-icon-bullet { background-position: -80px -144px; }
|
515 |
-
.cmb_element .ui-icon-radio-off { background-position: -96px -144px; }
|
516 |
-
.cmb_element .ui-icon-radio-on { background-position: -112px -144px; }
|
517 |
-
.cmb_element .ui-icon-pin-w { background-position: -128px -144px; }
|
518 |
-
.cmb_element .ui-icon-pin-s { background-position: -144px -144px; }
|
519 |
-
.cmb_element .ui-icon-play { background-position: 0 -160px; }
|
520 |
-
.cmb_element .ui-icon-pause { background-position: -16px -160px; }
|
521 |
-
.cmb_element .ui-icon-seek-next { background-position: -32px -160px; }
|
522 |
-
.cmb_element .ui-icon-seek-prev { background-position: -48px -160px; }
|
523 |
-
.cmb_element .ui-icon-seek-end { background-position: -64px -160px; }
|
524 |
-
.cmb_element .ui-icon-seek-start { background-position: -80px -160px; }
|
525 |
-
.cmb_element .ui-icon-seek-first { background-position: -80px -160px; }
|
526 |
-
.cmb_element .ui-icon-stop { background-position: -96px -160px; }
|
527 |
-
.cmb_element .ui-icon-eject { background-position: -112px -160px; }
|
528 |
-
.cmb_element .ui-icon-volume-off { background-position: -128px -160px; }
|
529 |
-
.cmb_element .ui-icon-volume-on { background-position: -144px -160px; }
|
530 |
-
.cmb_element .ui-icon-power { background-position: 0 -176px; }
|
531 |
-
.cmb_element .ui-icon-signal-diag { background-position: -16px -176px; }
|
532 |
-
.cmb_element .ui-icon-signal { background-position: -32px -176px; }
|
533 |
-
.cmb_element .ui-icon-battery-0 { background-position: -48px -176px; }
|
534 |
-
.cmb_element .ui-icon-battery-1 { background-position: -64px -176px; }
|
535 |
-
.cmb_element .ui-icon-battery-2 { background-position: -80px -176px; }
|
536 |
-
.cmb_element .ui-icon-battery-3 { background-position: -96px -176px; }
|
537 |
-
.cmb_element .ui-icon-circle-plus { background-position: 0 -192px; }
|
538 |
-
.cmb_element .ui-icon-circle-minus { background-position: -16px -192px; }
|
539 |
-
.cmb_element .ui-icon-circle-close { background-position: -32px -192px; }
|
540 |
-
.cmb_element .ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
541 |
-
.cmb_element .ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
542 |
-
.cmb_element .ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
543 |
-
.cmb_element .ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
544 |
-
.cmb_element .ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
545 |
-
.cmb_element .ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
546 |
-
.cmb_element .ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
547 |
-
.cmb_element .ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
548 |
-
.cmb_element .ui-icon-circle-zoomin { background-position: -176px -192px; }
|
549 |
-
.cmb_element .ui-icon-circle-zoomout { background-position: -192px -192px; }
|
550 |
-
.cmb_element .ui-icon-circle-check { background-position: -208px -192px; }
|
551 |
-
.cmb_element .ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
552 |
-
.cmb_element .ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
553 |
-
.cmb_element .ui-icon-circlesmall-close { background-position: -32px -208px; }
|
554 |
-
.cmb_element .ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
555 |
-
.cmb_element .ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
556 |
-
.cmb_element .ui-icon-squaresmall-close { background-position: -80px -208px; }
|
557 |
-
.cmb_element .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
558 |
-
.cmb_element .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
559 |
-
.cmb_element .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
560 |
-
.cmb_element .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
561 |
-
.cmb_element .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
562 |
-
.cmb_element .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
563 |
-
.cmb_element .ui-corner-all, .cmb_element .ui-corner-top, .cmb_element .ui-corner-left, .cmb_element .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
564 |
-
.cmb_element .ui-corner-all, .cmb_element .ui-corner-top, .cmb_element .ui-corner-right, .cmb_element .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
565 |
-
.cmb_element .ui-corner-all, .cmb_element .ui-corner-bottom, .cmb_element .ui-corner-left, .cmb_element .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
566 |
-
.cmb_element .ui-corner-all, .cmb_element .ui-corner-bottom, .cmb_element .ui-corner-right, .cmb_element .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
567 |
-
.cmb_element .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
568 |
-
.cmb_element .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
|
569 |
-
.cmb_element .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
570 |
-
.cmb_element .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
571 |
-
.cmb_element .ui-datepicker .ui-datepicker-prev, .cmb_element .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
572 |
-
.cmb_element .ui-datepicker .ui-datepicker-prev-hover, .cmb_element .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
573 |
-
.cmb_element .ui-datepicker .ui-datepicker-prev { left:2px; }
|
574 |
-
.cmb_element .ui-datepicker .ui-datepicker-next { right:2px; }
|
575 |
-
.cmb_element .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
576 |
-
.cmb_element .ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
577 |
-
.cmb_element .ui-datepicker .ui-datepicker-prev span, .cmb_element .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
578 |
-
.cmb_element .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
579 |
-
.cmb_element .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
580 |
-
.cmb_element .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
581 |
-
.cmb_element .ui-datepicker select.ui-datepicker-month,
|
582 |
-
.cmb_element .ui-datepicker select.ui-datepicker-year { width: 49%;}
|
583 |
-
.cmb_element .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
584 |
-
.cmb_element .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
585 |
-
.cmb_element .ui-datepicker td { border: 0; padding: 1px; }
|
586 |
-
.cmb_element .ui-datepicker td span, .cmb_element .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
587 |
-
.cmb_element .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
588 |
-
.cmb_element .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
589 |
-
.cmb_element .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
590 |
-
.cmb_element .ui-datepicker.ui-datepicker-multi { width:auto; }
|
591 |
-
.cmb_element .ui-datepicker-multi .ui-datepicker-group { float:left; }
|
592 |
-
.cmb_element .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
593 |
-
.cmb_element .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
594 |
-
.cmb_element .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
595 |
-
.cmb_element .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
596 |
-
.cmb_element .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
597 |
-
.cmb_element .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
598 |
-
.cmb_element .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
599 |
-
.cmb_element .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
600 |
-
.cmb_element .ui-datepicker-rtl { direction: rtl; }
|
601 |
-
.cmb_element .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
602 |
-
.cmb_element .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
603 |
-
.cmb_element .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
604 |
-
.cmb_element .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
605 |
-
.cmb_element .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
606 |
-
.cmb_element .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
607 |
-
.cmb_element .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
608 |
-
.cmb_element .ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
609 |
-
.cmb_element .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
610 |
-
.cmb_element .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
611 |
-
.cmb_element .ui-datepicker-cover {
|
612 |
-
display: none; /*sorry for IE5*/
|
613 |
-
display/**/: block; /*sorry for IE5*/
|
614 |
-
position: absolute; /*must have*/
|
615 |
-
z-index: -1; /*must have*/
|
616 |
-
filter: mask(); /*must have*/
|
617 |
-
top: -4px; /*must have*/
|
618 |
-
left: -4px; /*must have*/
|
619 |
-
width: 200px; /*must have*/
|
620 |
-
height: 200px; /*must have*/
|
621 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/cmb_metaboxes/style.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
table.cmb_metabox{clear:both}.post-new-php table.cmb_metabox .cmb-nested-table td,.post-new-php table.cmb_metabox .repeatable-group th,.post-new-php table.cmb_metabox .repeatable-group:first-of-type,.post-php table.cmb_metabox .cmb-nested-table td,.post-php table.cmb_metabox .repeatable-group th,.post-php table.cmb_metabox .repeatable-group:first-of-type,table.cmb_metabox tbody>tr:first-of-type>td,table.cmb_metabox tbody>tr:first-of-type>th,table.cmb_metabox>tr:first-of-type>td,table.cmb_metabox>tr:first-of-type>th{border:0}.post-new-php table.cmb_metabox .repeatable-group,.post-new-php table.cmb_metabox td,.post-new-php table.cmb_metabox th,.post-php table.cmb_metabox .repeatable-group,.post-php table.cmb_metabox td,.post-php table.cmb_metabox th{border-top:1px solid #E9E9E9}.repeatable-group th{padding:5px}.repeatable-group .shift-rows{text-decoration:none;margin-right:5px;font-size:1.2em}.repeatable-group .cmb_upload_button{float:right}#poststuff .repeatable-group h2{margin:0}.cmb-group-title h4{font-size:1.2em;font-weight:500;border-bottom:1px solid #ddd}.post-new-php table.cmb_metabox th,.post-php table.cmb_metabox th{text-align:right;font-weight:700}.post-new-php table.cmb_metabox table th,.post-php table.cmb_metabox table th{text-align:left}table.cmb_metabox th label{margin-top:5px;display:block}p.cmb_metabox_description{color:#AAA;font-style:italic;margin:2px 0!important}span.cmb_metabox_description{color:#AAA;font-style:italic}table.cmb_metabox input,table.cmb_metabox textarea{font-size:14px;padding:5px}table.cmb_metabox input[type=text],table.cmb_metabox textarea{width:97%}table.cmb_metabox textarea.cmb_textarea_code{font-family:Consolas,Monaco,monospace;line-height:16px}table.cmb_metabox input.cmb_text_small,table.cmb_metabox input.cmb_timepicker{width:100px;margin-right:15px}table.cmb_metabox input.cmb_text_money{width:90px;margin-right:15px}table.cmb_metabox input.cmb_text_medium{width:230px;margin-right:15px}table.cmb_metabox input.cmb_upload_file{width:65%}table.cmb_metabox input.ed_button{padding:2px 4px}table.cmb_metabox li{font-size:14px;margin:1px 0 5px;line-height:16px}table.cmb_metabox ul{padding-top:5px;margin:0}table.cmb_metabox select{font-size:14px;margin-top:3px}table.cmb_metabox input:focus,table.cmb_metabox textarea:focus{background:#fffff8}.cmb_metabox_title{margin:0 0 5px;padding:5px 0 0}.edit-tags-php .cmb_metabox_title,.profile-php .cmb_metabox_title,.user-edit-php .cmb_metabox_title{margin-left:-10px}.cmb-inline ul{padding:4px 0 0}.cmb-inline li{display:inline-block;padding-right:18px}table.cmb_metabox input[type=checkbox],table.cmb_metabox input[type=radio]{margin:0 5px 0 0;padding:0}table.cmb_metabox .mceLayout{border:1px solid #DFDFDF!important}table.cmb_metabox .mceIframeContainer{background:#FFF}table.cmb_metabox .meta_mce{width:97%}table.cmb_metabox .meta_mce textarea{width:100%}table.cmb_metabox .cmb_media_status{margin:10px 0 0}table.cmb_metabox .cmb_media_status .img_status{clear:none;float:left;display:inline-block;margin-right:10px;width:auto}table.cmb_metabox .cmb-type-file_list .cmb_media_status .img_status{clear:none;float:left;margin-right:10px;width:auto}table.cmb_metabox .cmb_media_status .embed_status,table.cmb_metabox .cmb_media_status .img_status{position:relative}table.cmb_metabox .cmb_media_status .embed_status,table.cmb_metabox .cmb_media_status .img_status img{border:1px solid #DFDFDF;background:#FAFAFA;max-width:350px;padding:5px;-moz-border-radius:2px;border-radius:2px}table.cmb_metabox .cmb_media_status .embed_status{float:left;max-width:800px}table.cmb_metabox .cmb_media_status .embed_status .cmb_remove_file_button,table.cmb_metabox .cmb_media_status .img_status .cmb_remove_file_button{text-indent:-9999px;background:url(images/ico-delete.png);width:16px;height:16px;position:absolute;top:-5px;left:-5px}table.cmb_metabox .attach_list li{clear:both;display:inline-block;margin-bottom:25px;width:100%}table.cmb_metabox .attach_list li img{float:left;margin-right:10px}#side-sortables table.cmb_metabox input[type=text],.inner-sidebar table.cmb_metabox input[type=text],table.cmb_metabox textarea{width:95%}#side-sortables table.cmb_metabox .cmb_media_status .embed_status img,#side-sortables table.cmb_metabox .cmb_media_status .img_status img,.inner-sidebar table.cmb_metabox .cmb_media_status .embed_status img,.inner-sidebar table.cmb_metabox .cmb_media_status .img_status img{width:90%}#side-sortables table.cmb_metabox label,.inner-sidebar table.cmb_metabox label{display:block;font-weight:700;padding:0 0 5px}#side-sortables table.cmb_metabox .cmb_list label,.inner-sidebar table.cmb_metabox .cmb_list label{display:inline;font-weight:400}#side-sortables table.cmb_metabox .cmb_metabox_description,.inner-sidebar table.cmb_metabox .cmb_metabox_description{display:block;padding:7px 0 0}#side-sortables table.cmb_metabox .cmb_metabox_title,.inner-sidebar table.cmb_metabox .cmb_metabox_title{font-size:1.2em;font-style:italic}.postbox table.cmb_metabox .cmb-spinner{float:left}table.cmb_metabox .wp-color-result,table.cmb_metabox .wp-picker-input-wrap{vertical-align:middle}table.cmb_metabox .wp-color-result,table.cmb_metabox .wp-picker-container{margin:0 10px 0 0}div.time-picker{position:absolute;height:191px;width:6em;overflow:auto;background:#fff;border:1px solid #aaa;z-index:99;margin:0}div.time-picker-12hours{width:8em}div.time-picker ul{list-style-type:none;margin:0;padding:0}div.time-picker li{cursor:pointer;height:10px;font:14px/1 Helvetica,Arial,sans-serif;padding:4px 3px}div.time-picker li.selected{background:#0063CE;color:#fff}.cmb_element .ui-helper-hidden{display:none}.cmb_element .ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.cmb_element .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.cmb_element .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}* html .ui-helper-clearfix{height:1%}.cmb_element .ui-helper-clearfix{display:block}.cmb_element .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.cmb_element .ui-state-disabled{cursor:default!important}.cmb_element .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.cmb_element .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.cmb_element .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.cmb_element .ui-widget .ui-widget{font-size:1em}.cmb_element .ui-widget button,.cmb_element .ui-widget input,.cmb_element .ui-widget select,.cmb_element .ui-widget textarea{font-family:Verdana,Arial,sans-serif;font-size:1em}.cmb_element .ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.cmb_element .ui-widget-content a{color:#222}.cmb_element .ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:700}.cmb_element .ui-widget-header a{color:#222}.cmb_element .ui-state-default,.cmb_element .ui-widget-content .ui-state-default,.cmb_element .ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:400;color:#555}.cmb_element .ui-state-default a,.cmb_element .ui-state-default a:link,.cmb_element .ui-state-default a:visited{color:#555;text-decoration:none}.cmb_element .ui-state-focus,.cmb_element .ui-state-hover,.cmb_element .ui-widget-content .ui-state-focus,.cmb_element .ui-widget-content .ui-state-hover,.cmb_element .ui-widget-header .ui-state-focus,.cmb_element .ui-widget-header .ui-state-hover{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.cmb_element .ui-state-hover a,.cmb_element .ui-state-hover a:hover{color:#212121;text-decoration:none}.cmb_element .ui-state-active,.cmb_element .ui-widget-content .ui-state-active,.cmb_element .ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.cmb_element .ui-state-active a,.cmb_element .ui-state-active a:link,.cmb_element .ui-state-active a:visited{color:#212121;text-decoration:none}.cmb_element .ui-widget :active{outline:0}.cmb_element .ui-state-highlight,.cmb_element .ui-widget-content .ui-state-highlight,.cmb_element .ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.cmb_element .ui-state-highlight a,.cmb_element .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.cmb_element .ui-state-error,.cmb_element .ui-widget-content .ui-state-error,.cmb_element .ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.cmb_element .ui-state-error a,.cmb_element .ui-state-error-text,.cmb_element .ui-widget-content .ui-state-error a,.cmb_element .ui-widget-content .ui-state-error-text,.cmb_element .ui-widget-header .ui-state-error a,.cmb_element .ui-widget-header .ui-state-error-text{color:#cd0a0a}.cmb_element .ui-priority-primary,.cmb_element .ui-widget-content .ui-priority-primary,.cmb_element .ui-widget-header .ui-priority-primary{font-weight:700}.cmb_element .ui-priority-secondary,.cmb_element .ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.cmb_element .ui-state-disabled,.cmb_element .ui-widget-content .ui-state-disabled,.cmb_element .ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.cmb_element .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png)}.cmb_element .ui-widget-content .ui-icon,.cmb_element .ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.cmb_element .ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.cmb_element .ui-state-active .ui-icon,.cmb_element .ui-state-focus .ui-icon,.cmb_element .ui-state-hover .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.cmb_element .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.cmb_element .ui-state-error .ui-icon,.cmb_element .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.cmb_element .ui-icon-carat-1-n{background-position:0 0}.cmb_element .ui-icon-carat-1-ne{background-position:-16px 0}.cmb_element .ui-icon-carat-1-e{background-position:-32px 0}.cmb_element .ui-icon-carat-1-se{background-position:-48px 0}.cmb_element .ui-icon-carat-1-s{background-position:-64px 0}.cmb_element .ui-icon-carat-1-sw{background-position:-80px 0}.cmb_element .ui-icon-carat-1-w{background-position:-96px 0}.cmb_element .ui-icon-carat-1-nw{background-position:-112px 0}.cmb_element .ui-icon-carat-2-n-s{background-position:-128px 0}.cmb_element .ui-icon-carat-2-e-w{background-position:-144px 0}.cmb_element .ui-icon-triangle-1-n{background-position:0 -16px}.cmb_element .ui-icon-triangle-1-ne{background-position:-16px -16px}.cmb_element .ui-icon-triangle-1-e{background-position:-32px -16px}.cmb_element .ui-icon-triangle-1-se{background-position:-48px -16px}.cmb_element .ui-icon-triangle-1-s{background-position:-64px -16px}.cmb_element .ui-icon-triangle-1-sw{background-position:-80px -16px}.cmb_element .ui-icon-triangle-1-w{background-position:-96px -16px}.cmb_element .ui-icon-triangle-1-nw{background-position:-112px -16px}.cmb_element .ui-icon-triangle-2-n-s{background-position:-128px -16px}.cmb_element .ui-icon-triangle-2-e-w{background-position:-144px -16px}.cmb_element .ui-icon-arrow-1-n{background-position:0 -32px}.cmb_element .ui-icon-arrow-1-ne{background-position:-16px -32px}.cmb_element .ui-icon-arrow-1-e{background-position:-32px -32px}.cmb_element .ui-icon-arrow-1-se{background-position:-48px -32px}.cmb_element .ui-icon-arrow-1-s{background-position:-64px -32px}.cmb_element .ui-icon-arrow-1-sw{background-position:-80px -32px}.cmb_element .ui-icon-arrow-1-w{background-position:-96px -32px}.cmb_element .ui-icon-arrow-1-nw{background-position:-112px -32px}.cmb_element .ui-icon-arrow-2-n-s{background-position:-128px -32px}.cmb_element .ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.cmb_element .ui-icon-arrow-2-e-w{background-position:-160px -32px}.cmb_element .ui-icon-arrow-2-se-nw{background-position:-176px -32px}.cmb_element .ui-icon-arrowstop-1-n{background-position:-192px -32px}.cmb_element .ui-icon-arrowstop-1-e{background-position:-208px -32px}.cmb_element .ui-icon-arrowstop-1-s{background-position:-224px -32px}.cmb_element .ui-icon-arrowstop-1-w{background-position:-240px -32px}.cmb_element .ui-icon-arrowthick-1-n{background-position:0 -48px}.cmb_element .ui-icon-arrowthick-1-ne{background-position:-16px -48px}.cmb_element .ui-icon-arrowthick-1-e{background-position:-32px -48px}.cmb_element .ui-icon-arrowthick-1-se{background-position:-48px -48px}.cmb_element .ui-icon-arrowthick-1-s{background-position:-64px -48px}.cmb_element .ui-icon-arrowthick-1-sw{background-position:-80px -48px}.cmb_element .ui-icon-arrowthick-1-w{background-position:-96px -48px}.cmb_element .ui-icon-arrowthick-1-nw{background-position:-112px -48px}.cmb_element .ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.cmb_element .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.cmb_element .ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.cmb_element .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.cmb_element .ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.cmb_element .ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.cmb_element .ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.cmb_element .ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.cmb_element .ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.cmb_element .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.cmb_element .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.cmb_element .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.cmb_element .ui-icon-arrowreturn-1-w{background-position:-64px -64px}.cmb_element .ui-icon-arrowreturn-1-n{background-position:-80px -64px}.cmb_element .ui-icon-arrowreturn-1-e{background-position:-96px -64px}.cmb_element .ui-icon-arrowreturn-1-s{background-position:-112px -64px}.cmb_element .ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.cmb_element .ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.cmb_element .ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.cmb_element .ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.cmb_element .ui-icon-arrow-4{background-position:0 -80px}.cmb_element .ui-icon-arrow-4-diag{background-position:-16px -80px}.cmb_element .ui-icon-extlink{background-position:-32px -80px}.cmb_element .ui-icon-newwin{background-position:-48px -80px}.cmb_element .ui-icon-refresh{background-position:-64px -80px}.cmb_element .ui-icon-shuffle{background-position:-80px -80px}.cmb_element .ui-icon-transfer-e-w{background-position:-96px -80px}.cmb_element .ui-icon-transferthick-e-w{background-position:-112px -80px}.cmb_element .ui-icon-folder-collapsed{background-position:0 -96px}.cmb_element .ui-icon-folder-open{background-position:-16px -96px}.cmb_element .ui-icon-document{background-position:-32px -96px}.cmb_element .ui-icon-document-b{background-position:-48px -96px}.cmb_element .ui-icon-note{background-position:-64px -96px}.cmb_element .ui-icon-mail-closed{background-position:-80px -96px}.cmb_element .ui-icon-mail-open{background-position:-96px -96px}.cmb_element .ui-icon-suitcase{background-position:-112px -96px}.cmb_element .ui-icon-comment{background-position:-128px -96px}.cmb_element .ui-icon-person{background-position:-144px -96px}.cmb_element .ui-icon-print{background-position:-160px -96px}.cmb_element .ui-icon-trash{background-position:-176px -96px}.cmb_element .ui-icon-locked{background-position:-192px -96px}.cmb_element .ui-icon-unlocked{background-position:-208px -96px}.cmb_element .ui-icon-bookmark{background-position:-224px -96px}.cmb_element .ui-icon-tag{background-position:-240px -96px}.cmb_element .ui-icon-home{background-position:0 -112px}.cmb_element .ui-icon-flag{background-position:-16px -112px}.cmb_element .ui-icon-calendar{background-position:-32px -112px}.cmb_element .ui-icon-cart{background-position:-48px -112px}.cmb_element .ui-icon-pencil{background-position:-64px -112px}.cmb_element .ui-icon-clock{background-position:-80px -112px}.cmb_element .ui-icon-disk{background-position:-96px -112px}.cmb_element .ui-icon-calculator{background-position:-112px -112px}.cmb_element .ui-icon-zoomin{background-position:-128px -112px}.cmb_element .ui-icon-zoomout{background-position:-144px -112px}.cmb_element .ui-icon-search{background-position:-160px -112px}.cmb_element .ui-icon-wrench{background-position:-176px -112px}.cmb_element .ui-icon-gear{background-position:-192px -112px}.cmb_element .ui-icon-heart{background-position:-208px -112px}.cmb_element .ui-icon-star{background-position:-224px -112px}.cmb_element .ui-icon-link{background-position:-240px -112px}.cmb_element .ui-icon-cancel{background-position:0 -128px}.cmb_element .ui-icon-plus{background-position:-16px -128px}.cmb_element .ui-icon-plusthick{background-position:-32px -128px}.cmb_element .ui-icon-minus{background-position:-48px -128px}.cmb_element .ui-icon-minusthick{background-position:-64px -128px}.cmb_element .ui-icon-close{background-position:-80px -128px}.cmb_element .ui-icon-closethick{background-position:-96px -128px}.cmb_element .ui-icon-key{background-position:-112px -128px}.cmb_element .ui-icon-lightbulb{background-position:-128px -128px}.cmb_element .ui-icon-scissors{background-position:-144px -128px}.cmb_element .ui-icon-clipboard{background-position:-160px -128px}.cmb_element .ui-icon-copy{background-position:-176px -128px}.cmb_element .ui-icon-contact{background-position:-192px -128px}.cmb_element .ui-icon-image{background-position:-208px -128px}.cmb_element .ui-icon-video{background-position:-224px -128px}.cmb_element .ui-icon-script{background-position:-240px -128px}.cmb_element .ui-icon-alert{background-position:0 -144px}.cmb_element .ui-icon-info{background-position:-16px -144px}.cmb_element .ui-icon-notice{background-position:-32px -144px}.cmb_element .ui-icon-help{background-position:-48px -144px}.cmb_element .ui-icon-check{background-position:-64px -144px}.cmb_element .ui-icon-bullet{background-position:-80px -144px}.cmb_element .ui-icon-radio-off{background-position:-96px -144px}.cmb_element .ui-icon-radio-on{background-position:-112px -144px}.cmb_element .ui-icon-pin-w{background-position:-128px -144px}.cmb_element .ui-icon-pin-s{background-position:-144px -144px}.cmb_element .ui-icon-play{background-position:0 -160px}.cmb_element .ui-icon-pause{background-position:-16px -160px}.cmb_element .ui-icon-seek-next{background-position:-32px -160px}.cmb_element .ui-icon-seek-prev{background-position:-48px -160px}.cmb_element .ui-icon-seek-end{background-position:-64px -160px}.cmb_element .ui-icon-seek-first,.cmb_element .ui-icon-seek-start{background-position:-80px -160px}.cmb_element .ui-icon-stop{background-position:-96px -160px}.cmb_element .ui-icon-eject{background-position:-112px -160px}.cmb_element .ui-icon-volume-off{background-position:-128px -160px}.cmb_element .ui-icon-volume-on{background-position:-144px -160px}.cmb_element .ui-icon-power{background-position:0 -176px}.cmb_element .ui-icon-signal-diag{background-position:-16px -176px}.cmb_element .ui-icon-signal{background-position:-32px -176px}.cmb_element .ui-icon-battery-0{background-position:-48px -176px}.cmb_element .ui-icon-battery-1{background-position:-64px -176px}.cmb_element .ui-icon-battery-2{background-position:-80px -176px}.cmb_element .ui-icon-battery-3{background-position:-96px -176px}.cmb_element .ui-icon-circle-plus{background-position:0 -192px}.cmb_element .ui-icon-circle-minus{background-position:-16px -192px}.cmb_element .ui-icon-circle-close{background-position:-32px -192px}.cmb_element .ui-icon-circle-triangle-e{background-position:-48px -192px}.cmb_element .ui-icon-circle-triangle-s{background-position:-64px -192px}.cmb_element .ui-icon-circle-triangle-w{background-position:-80px -192px}.cmb_element .ui-icon-circle-triangle-n{background-position:-96px -192px}.cmb_element .ui-icon-circle-arrow-e{background-position:-112px -192px}.cmb_element .ui-icon-circle-arrow-s{background-position:-128px -192px}.cmb_element .ui-icon-circle-arrow-w{background-position:-144px -192px}.cmb_element .ui-icon-circle-arrow-n{background-position:-160px -192px}.cmb_element .ui-icon-circle-zoomin{background-position:-176px -192px}.cmb_element .ui-icon-circle-zoomout{background-position:-192px -192px}.cmb_element .ui-icon-circle-check{background-position:-208px -192px}.cmb_element .ui-icon-circlesmall-plus{background-position:0 -208px}.cmb_element .ui-icon-circlesmall-minus{background-position:-16px -208px}.cmb_element .ui-icon-circlesmall-close{background-position:-32px -208px}.cmb_element .ui-icon-squaresmall-plus{background-position:-48px -208px}.cmb_element .ui-icon-squaresmall-minus{background-position:-64px -208px}.cmb_element .ui-icon-squaresmall-close{background-position:-80px -208px}.cmb_element .ui-icon-grip-dotted-vertical{background-position:0 -224px}.cmb_element .ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.cmb_element .ui-icon-grip-solid-vertical{background-position:-32px -224px}.cmb_element .ui-icon-grip-solid-horizontal{background-position:-48px -224px}.cmb_element .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.cmb_element .ui-icon-grip-diagonal-se{background-position:-80px -224px}.cmb_element .ui-corner-all,.cmb_element .ui-corner-left,.cmb_element .ui-corner-tl,.cmb_element .ui-corner-top{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px}.cmb_element .ui-corner-all,.cmb_element .ui-corner-right,.cmb_element .ui-corner-top,.cmb_element .ui-corner-tr{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-khtml-border-top-right-radius:4px;border-top-right-radius:4px}.cmb_element .ui-corner-all,.cmb_element .ui-corner-bl,.cmb_element .ui-corner-bottom,.cmb_element .ui-corner-left{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;-khtml-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.cmb_element .ui-corner-all,.cmb_element .ui-corner-bottom,.cmb_element .ui-corner-br,.cmb_element .ui-corner-right{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;-khtml-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.cmb_element .ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.cmb_element .ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);-moz-border-radius:8px;-khtml-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.cmb_element .ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.cmb_element .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.cmb_element .ui-datepicker .ui-datepicker-next,.cmb_element .ui-datepicker .ui-datepicker-prev{position:absolute;top:2px;width:1.8em;height:1.8em}.cmb_element .ui-datepicker .ui-datepicker-next-hover,.cmb_element .ui-datepicker .ui-datepicker-prev-hover{top:1px}.cmb_element .ui-datepicker .ui-datepicker-prev{left:2px}.cmb_element .ui-datepicker .ui-datepicker-next{right:2px}.cmb_element .ui-datepicker .ui-datepicker-prev-hover{left:1px}.cmb_element .ui-datepicker .ui-datepicker-next-hover{right:1px}.cmb_element .ui-datepicker .ui-datepicker-next span,.cmb_element .ui-datepicker .ui-datepicker-prev span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.cmb_element .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.cmb_element .ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.cmb_element .ui-datepicker select.ui-datepicker-month-year{width:100%}.cmb_element .ui-datepicker select.ui-datepicker-month,.cmb_element .ui-datepicker select.ui-datepicker-year{width:49%}.cmb_element .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.cmb_element .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.cmb_element .ui-datepicker td{border:0;padding:1px}.cmb_element .ui-datepicker td a,.cmb_element .ui-datepicker td span{display:block;padding:.2em;text-align:right;text-decoration:none}.cmb_element .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.cmb_element .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.cmb_element .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.cmb_element .ui-datepicker.ui-datepicker-multi{width:auto}.cmb_element .ui-datepicker-multi .ui-datepicker-group{float:left}.cmb_element .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.cmb_element .ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.cmb_element .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.cmb_element .ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.cmb_element .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.cmb_element .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.cmb_element .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.cmb_element .ui-datepicker-row-break{clear:both;width:100%;font-size:0}.cmb_element .ui-datepicker-rtl{direction:rtl}.cmb_element .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.cmb_element .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.cmb_element .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.cmb_element .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.cmb_element .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.cmb_element .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.cmb_element .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.cmb_element .ui-datepicker-rtl .ui-datepicker-group{float:right}.cmb_element .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.cmb_element .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.cmb_element .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px}
|
|
lib/icons/css/font-awesome.css
ADDED
@@ -0,0 +1,2086 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome
|
3 |
+
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
4 |
+
*/
|
5 |
+
/* FONT PATH
|
6 |
+
* -------------------------- */
|
7 |
+
@font-face {
|
8 |
+
font-family: 'FontAwesome';
|
9 |
+
src: url('../fonts/fontawesome-webfont.eot?v=4.5.0');
|
10 |
+
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');
|
11 |
+
font-weight: normal;
|
12 |
+
font-style: normal;
|
13 |
+
}
|
14 |
+
.fa {
|
15 |
+
display: inline-block;
|
16 |
+
font: normal normal normal 14px/1 FontAwesome;
|
17 |
+
font-size: inherit;
|
18 |
+
text-rendering: auto;
|
19 |
+
-webkit-font-smoothing: antialiased;
|
20 |
+
-moz-osx-font-smoothing: grayscale;
|
21 |
+
}
|
22 |
+
/* makes the font 33% larger relative to the icon container */
|
23 |
+
.fa-lg {
|
24 |
+
font-size: 1.33333333em;
|
25 |
+
line-height: 0.75em;
|
26 |
+
vertical-align: -15%;
|
27 |
+
}
|
28 |
+
.fa-2x {
|
29 |
+
font-size: 2em;
|
30 |
+
}
|
31 |
+
.fa-3x {
|
32 |
+
font-size: 3em;
|
33 |
+
}
|
34 |
+
.fa-4x {
|
35 |
+
font-size: 4em;
|
36 |
+
}
|
37 |
+
.fa-5x {
|
38 |
+
font-size: 5em;
|
39 |
+
}
|
40 |
+
.fa-fw {
|
41 |
+
width: 1.28571429em;
|
42 |
+
text-align: center;
|
43 |
+
}
|
44 |
+
.fa-ul {
|
45 |
+
padding-left: 0;
|
46 |
+
margin-left: 2.14285714em;
|
47 |
+
list-style-type: none;
|
48 |
+
}
|
49 |
+
.fa-ul > li {
|
50 |
+
position: relative;
|
51 |
+
}
|
52 |
+
.fa-li {
|
53 |
+
position: absolute;
|
54 |
+
left: -2.14285714em;
|
55 |
+
width: 2.14285714em;
|
56 |
+
top: 0.14285714em;
|
57 |
+
text-align: center;
|
58 |
+
}
|
59 |
+
.fa-li.fa-lg {
|
60 |
+
left: -1.85714286em;
|
61 |
+
}
|
62 |
+
.fa-border {
|
63 |
+
padding: .2em .25em .15em;
|
64 |
+
border: solid 0.08em #eeeeee;
|
65 |
+
border-radius: .1em;
|
66 |
+
}
|
67 |
+
.fa-pull-left {
|
68 |
+
float: left;
|
69 |
+
}
|
70 |
+
.fa-pull-right {
|
71 |
+
float: right;
|
72 |
+
}
|
73 |
+
.fa.fa-pull-left {
|
74 |
+
margin-right: .3em;
|
75 |
+
}
|
76 |
+
.fa.fa-pull-right {
|
77 |
+
margin-left: .3em;
|
78 |
+
}
|
79 |
+
/* Deprecated as of 4.4.0 */
|
80 |
+
.pull-right {
|
81 |
+
float: right;
|
82 |
+
}
|
83 |
+
.pull-left {
|
84 |
+
float: left;
|
85 |
+
}
|
86 |
+
.fa.pull-left {
|
87 |
+
margin-right: .3em;
|
88 |
+
}
|
89 |
+
.fa.pull-right {
|
90 |
+
margin-left: .3em;
|
91 |
+
}
|
92 |
+
.fa-spin {
|
93 |
+
-webkit-animation: fa-spin 2s infinite linear;
|
94 |
+
animation: fa-spin 2s infinite linear;
|
95 |
+
}
|
96 |
+
.fa-pulse {
|
97 |
+
-webkit-animation: fa-spin 1s infinite steps(8);
|
98 |
+
animation: fa-spin 1s infinite steps(8);
|
99 |
+
}
|
100 |
+
@-webkit-keyframes fa-spin {
|
101 |
+
0% {
|
102 |
+
-webkit-transform: rotate(0deg);
|
103 |
+
transform: rotate(0deg);
|
104 |
+
}
|
105 |
+
100% {
|
106 |
+
-webkit-transform: rotate(359deg);
|
107 |
+
transform: rotate(359deg);
|
108 |
+
}
|
109 |
+
}
|
110 |
+
@keyframes fa-spin {
|
111 |
+
0% {
|
112 |
+
-webkit-transform: rotate(0deg);
|
113 |
+
transform: rotate(0deg);
|
114 |
+
}
|
115 |
+
100% {
|
116 |
+
-webkit-transform: rotate(359deg);
|
117 |
+
transform: rotate(359deg);
|
118 |
+
}
|
119 |
+
}
|
120 |
+
.fa-rotate-90 {
|
121 |
+
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
|
122 |
+
-webkit-transform: rotate(90deg);
|
123 |
+
-ms-transform: rotate(90deg);
|
124 |
+
transform: rotate(90deg);
|
125 |
+
}
|
126 |
+
.fa-rotate-180 {
|
127 |
+
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
|
128 |
+
-webkit-transform: rotate(180deg);
|
129 |
+
-ms-transform: rotate(180deg);
|
130 |
+
transform: rotate(180deg);
|
131 |
+
}
|
132 |
+
.fa-rotate-270 {
|
133 |
+
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
134 |
+
-webkit-transform: rotate(270deg);
|
135 |
+
-ms-transform: rotate(270deg);
|
136 |
+
transform: rotate(270deg);
|
137 |
+
}
|
138 |
+
.fa-flip-horizontal {
|
139 |
+
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
|
140 |
+
-webkit-transform: scale(-1, 1);
|
141 |
+
-ms-transform: scale(-1, 1);
|
142 |
+
transform: scale(-1, 1);
|
143 |
+
}
|
144 |
+
.fa-flip-vertical {
|
145 |
+
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
|
146 |
+
-webkit-transform: scale(1, -1);
|
147 |
+
-ms-transform: scale(1, -1);
|
148 |
+
transform: scale(1, -1);
|
149 |
+
}
|
150 |
+
:root .fa-rotate-90,
|
151 |
+
:root .fa-rotate-180,
|
152 |
+
:root .fa-rotate-270,
|
153 |
+
:root .fa-flip-horizontal,
|
154 |
+
:root .fa-flip-vertical {
|
155 |
+
filter: none;
|
156 |
+
}
|
157 |
+
.fa-stack {
|
158 |
+
position: relative;
|
159 |
+
display: inline-block;
|
160 |
+
width: 2em;
|
161 |
+
height: 2em;
|
162 |
+
line-height: 2em;
|
163 |
+
vertical-align: middle;
|
164 |
+
}
|
165 |
+
.fa-stack-1x,
|
166 |
+
.fa-stack-2x {
|
167 |
+
position: absolute;
|
168 |
+
left: 0;
|
169 |
+
width: 100%;
|
170 |
+
text-align: center;
|
171 |
+
}
|
172 |
+
.fa-stack-1x {
|
173 |
+
line-height: inherit;
|
174 |
+
}
|
175 |
+
.fa-stack-2x {
|
176 |
+
font-size: 2em;
|
177 |
+
}
|
178 |
+
.fa-inverse {
|
179 |
+
color: #ffffff;
|
180 |
+
}
|
181 |
+
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
|
182 |
+
readers do not read off random characters that represent icons */
|
183 |
+
.fa-glass:before {
|
184 |
+
content: "\f000";
|
185 |
+
}
|
186 |
+
.fa-music:before {
|
187 |
+
content: "\f001";
|
188 |
+
}
|
189 |
+
.fa-search:before {
|
190 |
+
content: "\f002";
|
191 |
+
}
|
192 |
+
.fa-envelope-o:before {
|
193 |
+
content: "\f003";
|
194 |
+
}
|
195 |
+
.fa-heart:before {
|
196 |
+
content: "\f004";
|
197 |
+
}
|
198 |
+
.fa-star:before {
|
199 |
+
content: "\f005";
|
200 |
+
}
|
201 |
+
.fa-star-o:before {
|
202 |
+
content: "\f006";
|
203 |
+
}
|
204 |
+
.fa-user:before {
|
205 |
+
content: "\f007";
|
206 |
+
}
|
207 |
+
.fa-film:before {
|
208 |
+
content: "\f008";
|
209 |
+
}
|
210 |
+
.fa-th-large:before {
|
211 |
+
content: "\f009";
|
212 |
+
}
|
213 |
+
.fa-th:before {
|
214 |
+
content: "\f00a";
|
215 |
+
}
|
216 |
+
.fa-th-list:before {
|
217 |
+
content: "\f00b";
|
218 |
+
}
|
219 |
+
.fa-check:before {
|
220 |
+
content: "\f00c";
|
221 |
+
}
|
222 |
+
.fa-remove:before,
|
223 |
+
.fa-close:before,
|
224 |
+
.fa-times:before {
|
225 |
+
content: "\f00d";
|
226 |
+
}
|
227 |
+
.fa-search-plus:before {
|
228 |
+
content: "\f00e";
|
229 |
+
}
|
230 |
+
.fa-search-minus:before {
|
231 |
+
content: "\f010";
|
232 |
+
}
|
233 |
+
.fa-power-off:before {
|
234 |
+
content: "\f011";
|
235 |
+
}
|
236 |
+
.fa-signal:before {
|
237 |
+
content: "\f012";
|
238 |
+
}
|
239 |
+
.fa-gear:before,
|
240 |
+
.fa-cog:before {
|
241 |
+
content: "\f013";
|
242 |
+
}
|
243 |
+
.fa-trash-o:before {
|
244 |
+
content: "\f014";
|
245 |
+
}
|
246 |
+
.fa-home:before {
|
247 |
+
content: "\f015";
|
248 |
+
}
|
249 |
+
.fa-file-o:before {
|
250 |
+
content: "\f016";
|
251 |
+
}
|
252 |
+
.fa-clock-o:before {
|
253 |
+
content: "\f017";
|
254 |
+
}
|
255 |
+
.fa-road:before {
|
256 |
+
content: "\f018";
|
257 |
+
}
|
258 |
+
.fa-download:before {
|
259 |
+
content: "\f019";
|
260 |
+
}
|
261 |
+
.fa-arrow-circle-o-down:before {
|
262 |
+
content: "\f01a";
|
263 |
+
}
|
264 |
+
.fa-arrow-circle-o-up:before {
|
265 |
+
content: "\f01b";
|
266 |
+
}
|
267 |
+
.fa-inbox:before {
|
268 |
+
content: "\f01c";
|
269 |
+
}
|
270 |
+
.fa-play-circle-o:before {
|
271 |
+
content: "\f01d";
|
272 |
+
}
|
273 |
+
.fa-rotate-right:before,
|
274 |
+
.fa-repeat:before {
|
275 |
+
content: "\f01e";
|
276 |
+
}
|
277 |
+
.fa-refresh:before {
|
278 |
+
content: "\f021";
|
279 |
+
}
|
280 |
+
.fa-list-alt:before {
|
281 |
+
content: "\f022";
|
282 |
+
}
|
283 |
+
.fa-lock:before {
|
284 |
+
content: "\f023";
|
285 |
+
}
|
286 |
+
.fa-flag:before {
|
287 |
+
content: "\f024";
|
288 |
+
}
|
289 |
+
.fa-headphones:before {
|
290 |
+
content: "\f025";
|
291 |
+
}
|
292 |
+
.fa-volume-off:before {
|
293 |
+
content: "\f026";
|
294 |
+
}
|
295 |
+
.fa-volume-down:before {
|
296 |
+
content: "\f027";
|
297 |
+
}
|
298 |
+
.fa-volume-up:before {
|
299 |
+
content: "\f028";
|
300 |
+
}
|
301 |
+
.fa-qrcode:before {
|
302 |
+
content: "\f029";
|
303 |
+
}
|
304 |
+
.fa-barcode:before {
|
305 |
+
content: "\f02a";
|
306 |
+
}
|
307 |
+
.fa-tag:before {
|
308 |
+
content: "\f02b";
|
309 |
+
}
|
310 |
+
.fa-tags:before {
|
311 |
+
content: "\f02c";
|
312 |
+
}
|
313 |
+
.fa-book:before {
|
314 |
+
content: "\f02d";
|
315 |
+
}
|
316 |
+
.fa-bookmark:before {
|
317 |
+
content: "\f02e";
|
318 |
+
}
|
319 |
+
.fa-print:before {
|
320 |
+
content: "\f02f";
|
321 |
+
}
|
322 |
+
.fa-camera:before {
|
323 |
+
content: "\f030";
|
324 |
+
}
|
325 |
+
.fa-font:before {
|
326 |
+
content: "\f031";
|
327 |
+
}
|
328 |
+
.fa-bold:before {
|
329 |
+
content: "\f032";
|
330 |
+
}
|
331 |
+
.fa-italic:before {
|
332 |
+
content: "\f033";
|
333 |
+
}
|
334 |
+
.fa-text-height:before {
|
335 |
+
content: "\f034";
|
336 |
+
}
|
337 |
+
.fa-text-width:before {
|
338 |
+
content: "\f035";
|
339 |
+
}
|
340 |
+
.fa-align-left:before {
|
341 |
+
content: "\f036";
|
342 |
+
}
|
343 |
+
.fa-align-center:before {
|
344 |
+
content: "\f037";
|
345 |
+
}
|
346 |
+
.fa-align-right:before {
|
347 |
+
content: "\f038";
|
348 |
+
}
|
349 |
+
.fa-align-justify:before {
|
350 |
+
content: "\f039";
|
351 |
+
}
|
352 |
+
.fa-list:before {
|
353 |
+
content: "\f03a";
|
354 |
+
}
|
355 |
+
.fa-dedent:before,
|
356 |
+
.fa-outdent:before {
|
357 |
+
content: "\f03b";
|
358 |
+
}
|
359 |
+
.fa-indent:before {
|
360 |
+
content: "\f03c";
|
361 |
+
}
|
362 |
+
.fa-video-camera:before {
|
363 |
+
content: "\f03d";
|
364 |
+
}
|
365 |
+
.fa-photo:before,
|
366 |
+
.fa-image:before,
|
367 |
+
.fa-picture-o:before {
|
368 |
+
content: "\f03e";
|
369 |
+
}
|
370 |
+
.fa-pencil:before {
|
371 |
+
content: "\f040";
|
372 |
+
}
|
373 |
+
.fa-map-marker:before {
|
374 |
+
content: "\f041";
|
375 |
+
}
|
376 |
+
.fa-adjust:before {
|
377 |
+
content: "\f042";
|
378 |
+
}
|
379 |
+
.fa-tint:before {
|
380 |
+
content: "\f043";
|
381 |
+
}
|
382 |
+
.fa-edit:before,
|
383 |
+
.fa-pencil-square-o:before {
|
384 |
+
content: "\f044";
|
385 |
+
}
|
386 |
+
.fa-share-square-o:before {
|
387 |
+
content: "\f045";
|
388 |
+
}
|
389 |
+
.fa-check-square-o:before {
|
390 |
+
content: "\f046";
|
391 |
+
}
|
392 |
+
.fa-arrows:before {
|
393 |
+
content: "\f047";
|
394 |
+
}
|
395 |
+
.fa-step-backward:before {
|
396 |
+
content: "\f048";
|
397 |
+
}
|
398 |
+
.fa-fast-backward:before {
|
399 |
+
content: "\f049";
|
400 |
+
}
|
401 |
+
.fa-backward:before {
|
402 |
+
content: "\f04a";
|
403 |
+
}
|
404 |
+
.fa-play:before {
|
405 |
+
content: "\f04b";
|
406 |
+
}
|
407 |
+
.fa-pause:before {
|
408 |
+
content: "\f04c";
|
409 |
+
}
|
410 |
+
.fa-stop:before {
|
411 |
+
content: "\f04d";
|
412 |
+
}
|
413 |
+
.fa-forward:before {
|
414 |
+
content: "\f04e";
|
415 |
+
}
|
416 |
+
.fa-fast-forward:before {
|
417 |
+
content: "\f050";
|
418 |
+
}
|
419 |
+
.fa-step-forward:before {
|
420 |
+
content: "\f051";
|
421 |
+
}
|
422 |
+
.fa-eject:before {
|
423 |
+
content: "\f052";
|
424 |
+
}
|
425 |
+
.fa-chevron-left:before {
|
426 |
+
content: "\f053";
|
427 |
+
}
|
428 |
+
.fa-chevron-right:before {
|
429 |
+
content: "\f054";
|
430 |
+
}
|
431 |
+
.fa-plus-circle:before {
|
432 |
+
content: "\f055";
|
433 |
+
}
|
434 |
+
.fa-minus-circle:before {
|
435 |
+
content: "\f056";
|
436 |
+
}
|
437 |
+
.fa-times-circle:before {
|
438 |
+
content: "\f057";
|
439 |
+
}
|
440 |
+
.fa-check-circle:before {
|
441 |
+
content: "\f058";
|
442 |
+
}
|
443 |
+
.fa-question-circle:before {
|
444 |
+
content: "\f059";
|
445 |
+
}
|
446 |
+
.fa-info-circle:before {
|
447 |
+
content: "\f05a";
|
448 |
+
}
|
449 |
+
.fa-crosshairs:before {
|
450 |
+
content: "\f05b";
|
451 |
+
}
|
452 |
+
.fa-times-circle-o:before {
|
453 |
+
content: "\f05c";
|
454 |
+
}
|
455 |
+
.fa-check-circle-o:before {
|
456 |
+
content: "\f05d";
|
457 |
+
}
|
458 |
+
.fa-ban:before {
|
459 |
+
content: "\f05e";
|
460 |
+
}
|
461 |
+
.fa-arrow-left:before {
|
462 |
+
content: "\f060";
|
463 |
+
}
|
464 |
+
.fa-arrow-right:before {
|
465 |
+
content: "\f061";
|
466 |
+
}
|
467 |
+
.fa-arrow-up:before {
|
468 |
+
content: "\f062";
|
469 |
+
}
|
470 |
+
.fa-arrow-down:before {
|
471 |
+
content: "\f063";
|
472 |
+
}
|
473 |
+
.fa-mail-forward:before,
|
474 |
+
.fa-share:before {
|
475 |
+
content: "\f064";
|
476 |
+
}
|
477 |
+
.fa-expand:before {
|
478 |
+
content: "\f065";
|
479 |
+
}
|
480 |
+
.fa-compress:before {
|
481 |
+
content: "\f066";
|
482 |
+
}
|
483 |
+
.fa-plus:before {
|
484 |
+
content: "\f067";
|
485 |
+
}
|
486 |
+
.fa-minus:before {
|
487 |
+
content: "\f068";
|
488 |
+
}
|
489 |
+
.fa-asterisk:before {
|
490 |
+
content: "\f069";
|
491 |
+
}
|
492 |
+
.fa-exclamation-circle:before {
|
493 |
+
content: "\f06a";
|
494 |
+
}
|
495 |
+
.fa-gift:before {
|
496 |
+
content: "\f06b";
|
497 |
+
}
|
498 |
+
.fa-leaf:before {
|
499 |
+
content: "\f06c";
|
500 |
+
}
|
501 |
+
.fa-fire:before {
|
502 |
+
content: "\f06d";
|
503 |
+
}
|
504 |
+
.fa-eye:before {
|
505 |
+
content: "\f06e";
|
506 |
+
}
|
507 |
+
.fa-eye-slash:before {
|
508 |
+
content: "\f070";
|
509 |
+
}
|
510 |
+
.fa-warning:before,
|
511 |
+
.fa-exclamation-triangle:before {
|
512 |
+
content: "\f071";
|
513 |
+
}
|
514 |
+
.fa-plane:before {
|
515 |
+
content: "\f072";
|
516 |
+
}
|
517 |
+
.fa-calendar:before {
|
518 |
+
content: "\f073";
|
519 |
+
}
|
520 |
+
.fa-random:before {
|
521 |
+
content: "\f074";
|
522 |
+
}
|
523 |
+
.fa-comment:before {
|
524 |
+
content: "\f075";
|
525 |
+
}
|
526 |
+
.fa-magnet:before {
|
527 |
+
content: "\f076";
|
528 |
+
}
|
529 |
+
.fa-chevron-up:before {
|
530 |
+
content: "\f077";
|
531 |
+
}
|
532 |
+
.fa-chevron-down:before {
|
533 |
+
content: "\f078";
|
534 |
+
}
|
535 |
+
.fa-retweet:before {
|
536 |
+
content: "\f079";
|
537 |
+
}
|
538 |
+
.fa-shopping-cart:before {
|
539 |
+
content: "\f07a";
|
540 |
+
}
|
541 |
+
.fa-folder:before {
|
542 |
+
content: "\f07b";
|
543 |
+
}
|
544 |
+
.fa-folder-open:before {
|
545 |
+
content: "\f07c";
|
546 |
+
}
|
547 |
+
.fa-arrows-v:before {
|
548 |
+
content: "\f07d";
|
549 |
+
}
|
550 |
+
.fa-arrows-h:before {
|
551 |
+
content: "\f07e";
|
552 |
+
}
|
553 |
+
.fa-bar-chart-o:before,
|
554 |
+
.fa-bar-chart:before {
|
555 |
+
content: "\f080";
|
556 |
+
}
|
557 |
+
.fa-twitter-square:before {
|
558 |
+
content: "\f081";
|
559 |
+
}
|
560 |
+
.fa-facebook-square:before {
|
561 |
+
content: "\f082";
|
562 |
+
}
|
563 |
+
.fa-camera-retro:before {
|
564 |
+
content: "\f083";
|
565 |
+
}
|
566 |
+
.fa-key:before {
|
567 |
+
content: "\f084";
|
568 |
+
}
|
569 |
+
.fa-gears:before,
|
570 |
+
.fa-cogs:before {
|
571 |
+
content: "\f085";
|
572 |
+
}
|
573 |
+
.fa-comments:before {
|
574 |
+
content: "\f086";
|
575 |
+
}
|
576 |
+
.fa-thumbs-o-up:before {
|
577 |
+
content: "\f087";
|
578 |
+
}
|
579 |
+
.fa-thumbs-o-down:before {
|
580 |
+
content: "\f088";
|
581 |
+
}
|
582 |
+
.fa-star-half:before {
|
583 |
+
content: "\f089";
|
584 |
+
}
|
585 |
+
.fa-heart-o:before {
|
586 |
+
content: "\f08a";
|
587 |
+
}
|
588 |
+
.fa-sign-out:before {
|
589 |
+
content: "\f08b";
|
590 |
+
}
|
591 |
+
.fa-linkedin-square:before {
|
592 |
+
content: "\f08c";
|
593 |
+
}
|
594 |
+
.fa-thumb-tack:before {
|
595 |
+
content: "\f08d";
|
596 |
+
}
|
597 |
+
.fa-external-link:before {
|
598 |
+
content: "\f08e";
|
599 |
+
}
|
600 |
+
.fa-sign-in:before {
|
601 |
+
content: "\f090";
|
602 |
+
}
|
603 |
+
.fa-trophy:before {
|
604 |
+
content: "\f091";
|
605 |
+
}
|
606 |
+
.fa-github-square:before {
|
607 |
+
content: "\f092";
|
608 |
+
}
|
609 |
+
.fa-upload:before {
|
610 |
+
content: "\f093";
|
611 |
+
}
|
612 |
+
.fa-lemon-o:before {
|
613 |
+
content: "\f094";
|
614 |
+
}
|
615 |
+
.fa-phone:before {
|
616 |
+
content: "\f095";
|
617 |
+
}
|
618 |
+
.fa-square-o:before {
|
619 |
+
content: "\f096";
|
620 |
+
}
|
621 |
+
.fa-bookmark-o:before {
|
622 |
+
content: "\f097";
|
623 |
+
}
|
624 |
+
.fa-phone-square:before {
|
625 |
+
content: "\f098";
|
626 |
+
}
|
627 |
+
.fa-twitter:before {
|
628 |
+
content: "\f099";
|
629 |
+
}
|
630 |
+
.fa-facebook-f:before,
|
631 |
+
.fa-facebook:before {
|
632 |
+
content: "\f09a";
|
633 |
+
}
|
634 |
+
.fa-github:before {
|
635 |
+
content: "\f09b";
|
636 |
+
}
|
637 |
+
.fa-unlock:before {
|
638 |
+
content: "\f09c";
|
639 |
+
}
|
640 |
+
.fa-credit-card:before {
|
641 |
+
content: "\f09d";
|
642 |
+
}
|
643 |
+
.fa-feed:before,
|
644 |
+
.fa-rss:before {
|
645 |
+
content: "\f09e";
|
646 |
+
}
|
647 |
+
.fa-hdd-o:before {
|
648 |
+
content: "\f0a0";
|
649 |
+
}
|
650 |
+
.fa-bullhorn:before {
|
651 |
+
content: "\f0a1";
|
652 |
+
}
|
653 |
+
.fa-bell:before {
|
654 |
+
content: "\f0f3";
|
655 |
+
}
|
656 |
+
.fa-certificate:before {
|
657 |
+
content: "\f0a3";
|
658 |
+
}
|
659 |
+
.fa-hand-o-right:before {
|
660 |
+
content: "\f0a4";
|
661 |
+
}
|
662 |
+
.fa-hand-o-left:before {
|
663 |
+
content: "\f0a5";
|
664 |
+
}
|
665 |
+
.fa-hand-o-up:before {
|
666 |
+
content: "\f0a6";
|
667 |
+
}
|
668 |
+
.fa-hand-o-down:before {
|
669 |
+
content: "\f0a7";
|
670 |
+
}
|
671 |
+
.fa-arrow-circle-left:before {
|
672 |
+
content: "\f0a8";
|
673 |
+
}
|
674 |
+
.fa-arrow-circle-right:before {
|
675 |
+
content: "\f0a9";
|
676 |
+
}
|
677 |
+
.fa-arrow-circle-up:before {
|
678 |
+
content: "\f0aa";
|
679 |
+
}
|
680 |
+
.fa-arrow-circle-down:before {
|
681 |
+
content: "\f0ab";
|
682 |
+
}
|
683 |
+
.fa-globe:before {
|
684 |
+
content: "\f0ac";
|
685 |
+
}
|
686 |
+
.fa-wrench:before {
|
687 |
+
content: "\f0ad";
|
688 |
+
}
|
689 |
+
.fa-tasks:before {
|
690 |
+
content: "\f0ae";
|
691 |
+
}
|
692 |
+
.fa-filter:before {
|
693 |
+
content: "\f0b0";
|
694 |
+
}
|
695 |
+
.fa-briefcase:before {
|
696 |
+
content: "\f0b1";
|
697 |
+
}
|
698 |
+
.fa-arrows-alt:before {
|
699 |
+
content: "\f0b2";
|
700 |
+
}
|
701 |
+
.fa-group:before,
|
702 |
+
.fa-users:before {
|
703 |
+
content: "\f0c0";
|
704 |
+
}
|
705 |
+
.fa-chain:before,
|
706 |
+
.fa-link:before {
|
707 |
+
content: "\f0c1";
|
708 |
+
}
|
709 |
+
.fa-cloud:before {
|
710 |
+
content: "\f0c2";
|
711 |
+
}
|
712 |
+
.fa-flask:before {
|
713 |
+
content: "\f0c3";
|
714 |
+
}
|
715 |
+
.fa-cut:before,
|
716 |
+
.fa-scissors:before {
|
717 |
+
content: "\f0c4";
|
718 |
+
}
|
719 |
+
.fa-copy:before,
|
720 |
+
.fa-files-o:before {
|
721 |
+
content: "\f0c5";
|
722 |
+
}
|
723 |
+
.fa-paperclip:before {
|
724 |
+
content: "\f0c6";
|
725 |
+
}
|
726 |
+
.fa-save:before,
|
727 |
+
.fa-floppy-o:before {
|
728 |
+
content: "\f0c7";
|
729 |
+
}
|
730 |
+
.fa-square:before {
|
731 |
+
content: "\f0c8";
|
732 |
+
}
|
733 |
+
.fa-navicon:before,
|
734 |
+
.fa-reorder:before,
|
735 |
+
.fa-bars:before {
|
736 |
+
content: "\f0c9";
|
737 |
+
}
|
738 |
+
.fa-list-ul:before {
|
739 |
+
content: "\f0ca";
|
740 |
+
}
|
741 |
+
.fa-list-ol:before {
|
742 |
+
content: "\f0cb";
|
743 |
+
}
|
744 |
+
.fa-strikethrough:before {
|
745 |
+
content: "\f0cc";
|
746 |
+
}
|
747 |
+
.fa-underline:before {
|
748 |
+
content: "\f0cd";
|
749 |
+
}
|
750 |
+
.fa-table:before {
|
751 |
+
content: "\f0ce";
|
752 |
+
}
|
753 |
+
.fa-magic:before {
|
754 |
+
content: "\f0d0";
|
755 |
+
}
|
756 |
+
.fa-truck:before {
|
757 |
+
content: "\f0d1";
|
758 |
+
}
|
759 |
+
.fa-pinterest:before {
|
760 |
+
content: "\f0d2";
|
761 |
+
}
|
762 |
+
.fa-pinterest-square:before {
|
763 |
+
content: "\f0d3";
|
764 |
+
}
|
765 |
+
.fa-google-plus-square:before {
|
766 |
+
content: "\f0d4";
|
767 |
+
}
|
768 |
+
.fa-google-plus:before {
|
769 |
+
content: "\f0d5";
|
770 |
+
}
|
771 |
+
.fa-money:before {
|
772 |
+
content: "\f0d6";
|
773 |
+
}
|
774 |
+
.fa-caret-down:before {
|
775 |
+
content: "\f0d7";
|
776 |
+
}
|
777 |
+
.fa-caret-up:before {
|
778 |
+
content: "\f0d8";
|
779 |
+
}
|
780 |
+
.fa-caret-left:before {
|
781 |
+
content: "\f0d9";
|
782 |
+
}
|
783 |
+
.fa-caret-right:before {
|
784 |
+
content: "\f0da";
|
785 |
+
}
|
786 |
+
.fa-columns:before {
|
787 |
+
content: "\f0db";
|
788 |
+
}
|
789 |
+
.fa-unsorted:before,
|
790 |
+
.fa-sort:before {
|
791 |
+
content: "\f0dc";
|
792 |
+
}
|
793 |
+
.fa-sort-down:before,
|
794 |
+
.fa-sort-desc:before {
|
795 |
+
content: "\f0dd";
|
796 |
+
}
|
797 |
+
.fa-sort-up:before,
|
798 |
+
.fa-sort-asc:before {
|
799 |
+
content: "\f0de";
|
800 |
+
}
|
801 |
+
.fa-envelope:before {
|
802 |
+
content: "\f0e0";
|
803 |
+
}
|
804 |
+
.fa-linkedin:before {
|
805 |
+
content: "\f0e1";
|
806 |
+
}
|
807 |
+
.fa-rotate-left:before,
|
808 |
+
.fa-undo:before {
|
809 |
+
content: "\f0e2";
|
810 |
+
}
|
811 |
+
.fa-legal:before,
|
812 |
+
.fa-gavel:before {
|
813 |
+
content: "\f0e3";
|
814 |
+
}
|
815 |
+
.fa-dashboard:before,
|
816 |
+
.fa-tachometer:before {
|
817 |
+
content: "\f0e4";
|
818 |
+
}
|
819 |
+
.fa-comment-o:before {
|
820 |
+
content: "\f0e5";
|
821 |
+
}
|
822 |
+
.fa-comments-o:before {
|
823 |
+
content: "\f0e6";
|
824 |
+
}
|
825 |
+
.fa-flash:before,
|
826 |
+
.fa-bolt:before {
|
827 |
+
content: "\f0e7";
|
828 |
+
}
|
829 |
+
.fa-sitemap:before {
|
830 |
+
content: "\f0e8";
|
831 |
+
}
|
832 |
+
.fa-umbrella:before {
|
833 |
+
content: "\f0e9";
|
834 |
+
}
|
835 |
+
.fa-paste:before,
|
836 |
+
.fa-clipboard:before {
|
837 |
+
content: "\f0ea";
|
838 |
+
}
|
839 |
+
.fa-lightbulb-o:before {
|
840 |
+
content: "\f0eb";
|
841 |
+
}
|
842 |
+
.fa-exchange:before {
|
843 |
+
content: "\f0ec";
|
844 |
+
}
|
845 |
+
.fa-cloud-download:before {
|
846 |
+
content: "\f0ed";
|
847 |
+
}
|
848 |
+
.fa-cloud-upload:before {
|
849 |
+
content: "\f0ee";
|
850 |
+
}
|
851 |
+
.fa-user-md:before {
|
852 |
+
content: "\f0f0";
|
853 |
+
}
|
854 |
+
.fa-stethoscope:before {
|
855 |
+
content: "\f0f1";
|
856 |
+
}
|
857 |
+
.fa-suitcase:before {
|
858 |
+
content: "\f0f2";
|
859 |
+
}
|
860 |
+
.fa-bell-o:before {
|
861 |
+
content: "\f0a2";
|
862 |
+
}
|
863 |
+
.fa-coffee:before {
|
864 |
+
content: "\f0f4";
|
865 |
+
}
|
866 |
+
.fa-cutlery:before {
|
867 |
+
content: "\f0f5";
|
868 |
+
}
|
869 |
+
.fa-file-text-o:before {
|
870 |
+
content: "\f0f6";
|
871 |
+
}
|
872 |
+
.fa-building-o:before {
|
873 |
+
content: "\f0f7";
|
874 |
+
}
|
875 |
+
.fa-hospital-o:before {
|
876 |
+
content: "\f0f8";
|
877 |
+
}
|
878 |
+
.fa-ambulance:before {
|
879 |
+
content: "\f0f9";
|
880 |
+
}
|
881 |
+
.fa-medkit:before {
|
882 |
+
content: "\f0fa";
|
883 |
+
}
|
884 |
+
.fa-fighter-jet:before {
|
885 |
+
content: "\f0fb";
|
886 |
+
}
|
887 |
+
.fa-beer:before {
|
888 |
+
content: "\f0fc";
|
889 |
+
}
|
890 |
+
.fa-h-square:before {
|
891 |
+
content: "\f0fd";
|
892 |
+
}
|
893 |
+
.fa-plus-square:before {
|
894 |
+
content: "\f0fe";
|
895 |
+
}
|
896 |
+
.fa-angle-double-left:before {
|
897 |
+
content: "\f100";
|
898 |
+
}
|
899 |
+
.fa-angle-double-right:before {
|
900 |
+
content: "\f101";
|
901 |
+
}
|
902 |
+
.fa-angle-double-up:before {
|
903 |
+
content: "\f102";
|
904 |
+
}
|
905 |
+
.fa-angle-double-down:before {
|
906 |
+
content: "\f103";
|
907 |
+
}
|
908 |
+
.fa-angle-left:before {
|
909 |
+
content: "\f104";
|
910 |
+
}
|
911 |
+
.fa-angle-right:before {
|
912 |
+
content: "\f105";
|
913 |
+
}
|
914 |
+
.fa-angle-up:before {
|
915 |
+
content: "\f106";
|
916 |
+
}
|
917 |
+
.fa-angle-down:before {
|
918 |
+
content: "\f107";
|
919 |
+
}
|
920 |
+
.fa-desktop:before {
|
921 |
+
content: "\f108";
|
922 |
+
}
|
923 |
+
.fa-laptop:before {
|
924 |
+
content: "\f109";
|
925 |
+
}
|
926 |
+
.fa-tablet:before {
|
927 |
+
content: "\f10a";
|
928 |
+
}
|
929 |
+
.fa-mobile-phone:before,
|
930 |
+
.fa-mobile:before {
|
931 |
+
content: "\f10b";
|
932 |
+
}
|
933 |
+
.fa-circle-o:before {
|
934 |
+
content: "\f10c";
|
935 |
+
}
|
936 |
+
.fa-quote-left:before {
|
937 |
+
content: "\f10d";
|
938 |
+
}
|
939 |
+
.fa-quote-right:before {
|
940 |
+
content: "\f10e";
|
941 |
+
}
|
942 |
+
.fa-spinner:before {
|
943 |
+
content: "\f110";
|
944 |
+
}
|
945 |
+
.fa-circle:before {
|
946 |
+
content: "\f111";
|
947 |
+
}
|
948 |
+
.fa-mail-reply:before,
|
949 |
+
.fa-reply:before {
|
950 |
+
content: "\f112";
|
951 |
+
}
|
952 |
+
.fa-github-alt:before {
|
953 |
+
content: "\f113";
|
954 |
+
}
|
955 |
+
.fa-folder-o:before {
|
956 |
+
content: "\f114";
|
957 |
+
}
|
958 |
+
.fa-folder-open-o:before {
|
959 |
+
content: "\f115";
|
960 |
+
}
|
961 |
+
.fa-smile-o:before {
|
962 |
+
content: "\f118";
|
963 |
+
}
|
964 |
+
.fa-frown-o:before {
|
965 |
+
content: "\f119";
|
966 |
+
}
|
967 |
+
.fa-meh-o:before {
|
968 |
+
content: "\f11a";
|
969 |
+
}
|
970 |
+
.fa-gamepad:before {
|
971 |
+
content: "\f11b";
|
972 |
+
}
|
973 |
+
.fa-keyboard-o:before {
|
974 |
+
content: "\f11c";
|
975 |
+
}
|
976 |
+
.fa-flag-o:before {
|
977 |
+
content: "\f11d";
|
978 |
+
}
|
979 |
+
.fa-flag-checkered:before {
|
980 |
+
content: "\f11e";
|
981 |
+
}
|
982 |
+
.fa-terminal:before {
|
983 |
+
content: "\f120";
|
984 |
+
}
|
985 |
+
.fa-code:before {
|
986 |
+
content: "\f121";
|
987 |
+
}
|
988 |
+
.fa-mail-reply-all:before,
|
989 |
+
.fa-reply-all:before {
|
990 |
+
content: "\f122";
|
991 |
+
}
|
992 |
+
.fa-star-half-empty:before,
|
993 |
+
.fa-star-half-full:before,
|
994 |
+
.fa-star-half-o:before {
|
995 |
+
content: "\f123";
|
996 |
+
}
|
997 |
+
.fa-location-arrow:before {
|
998 |
+
content: "\f124";
|
999 |
+
}
|
1000 |
+
.fa-crop:before {
|
1001 |
+
content: "\f125";
|
1002 |
+
}
|
1003 |
+
.fa-code-fork:before {
|
1004 |
+
content: "\f126";
|
1005 |
+
}
|
1006 |
+
.fa-unlink:before,
|
1007 |
+
.fa-chain-broken:before {
|
1008 |
+
content: "\f127";
|
1009 |
+
}
|
1010 |
+
.fa-question:before {
|
1011 |
+
content: "\f128";
|
1012 |
+
}
|
1013 |
+
.fa-info:before {
|
1014 |
+
content: "\f129";
|
1015 |
+
}
|
1016 |
+
.fa-exclamation:before {
|
1017 |
+
content: "\f12a";
|
1018 |
+
}
|
1019 |
+
.fa-superscript:before {
|
1020 |
+
content: "\f12b";
|
1021 |
+
}
|
1022 |
+
.fa-subscript:before {
|
1023 |
+
content: "\f12c";
|
1024 |
+
}
|
1025 |
+
.fa-eraser:before {
|
1026 |
+
content: "\f12d";
|
1027 |
+
}
|
1028 |
+
.fa-puzzle-piece:before {
|
1029 |
+
content: "\f12e";
|
1030 |
+
}
|
1031 |
+
.fa-microphone:before {
|
1032 |
+
content: "\f130";
|
1033 |
+
}
|
1034 |
+
.fa-microphone-slash:before {
|
1035 |
+
content: "\f131";
|
1036 |
+
}
|
1037 |
+
.fa-shield:before {
|
1038 |
+
content: "\f132";
|
1039 |
+
}
|
1040 |
+
.fa-calendar-o:before {
|
1041 |
+
content: "\f133";
|
1042 |
+
}
|
1043 |
+
.fa-fire-extinguisher:before {
|
1044 |
+
content: "\f134";
|
1045 |
+
}
|
1046 |
+
.fa-rocket:before {
|
1047 |
+
content: "\f135";
|
1048 |
+
}
|
1049 |
+
.fa-maxcdn:before {
|
1050 |
+
content: "\f136";
|
1051 |
+
}
|
1052 |
+
.fa-chevron-circle-left:before {
|
1053 |
+
content: "\f137";
|
1054 |
+
}
|
1055 |
+
.fa-chevron-circle-right:before {
|
1056 |
+
content: "\f138";
|
1057 |
+
}
|
1058 |
+
.fa-chevron-circle-up:before {
|
1059 |
+
content: "\f139";
|
1060 |
+
}
|
1061 |
+
.fa-chevron-circle-down:before {
|
1062 |
+
content: "\f13a";
|
1063 |
+
}
|
1064 |
+
.fa-html5:before {
|
1065 |
+
content: "\f13b";
|
1066 |
+
}
|
1067 |
+
.fa-css3:before {
|
1068 |
+
content: "\f13c";
|
1069 |
+
}
|
1070 |
+
.fa-anchor:before {
|
1071 |
+
content: "\f13d";
|
1072 |
+
}
|
1073 |
+
.fa-unlock-alt:before {
|
1074 |
+
content: "\f13e";
|
1075 |
+
}
|
1076 |
+
.fa-bullseye:before {
|
1077 |
+
content: "\f140";
|
1078 |
+
}
|
1079 |
+
.fa-ellipsis-h:before {
|
1080 |
+
content: "\f141";
|
1081 |
+
}
|
1082 |
+
.fa-ellipsis-v:before {
|
1083 |
+
content: "\f142";
|
1084 |
+
}
|
1085 |
+
.fa-rss-square:before {
|
1086 |
+
content: "\f143";
|
1087 |
+
}
|
1088 |
+
.fa-play-circle:before {
|
1089 |
+
content: "\f144";
|
1090 |
+
}
|
1091 |
+
.fa-ticket:before {
|
1092 |
+
content: "\f145";
|
1093 |
+
}
|
1094 |
+
.fa-minus-square:before {
|
1095 |
+
content: "\f146";
|
1096 |
+
}
|
1097 |
+
.fa-minus-square-o:before {
|
1098 |
+
content: "\f147";
|
1099 |
+
}
|
1100 |
+
.fa-level-up:before {
|
1101 |
+
content: "\f148";
|
1102 |
+
}
|
1103 |
+
.fa-level-down:before {
|
1104 |
+
content: "\f149";
|
1105 |
+
}
|
1106 |
+
.fa-check-square:before {
|
1107 |
+
content: "\f14a";
|
1108 |
+
}
|
1109 |
+
.fa-pencil-square:before {
|
1110 |
+
content: "\f14b";
|
1111 |
+
}
|
1112 |
+
.fa-external-link-square:before {
|
1113 |
+
content: "\f14c";
|
1114 |
+
}
|
1115 |
+
.fa-share-square:before {
|
1116 |
+
content: "\f14d";
|
1117 |
+
}
|
1118 |
+
.fa-compass:before {
|
1119 |
+
content: "\f14e";
|
1120 |
+
}
|
1121 |
+
.fa-toggle-down:before,
|
1122 |
+
.fa-caret-square-o-down:before {
|
1123 |
+
content: "\f150";
|
1124 |
+
}
|
1125 |
+
.fa-toggle-up:before,
|
1126 |
+
.fa-caret-square-o-up:before {
|
1127 |
+
content: "\f151";
|
1128 |
+
}
|
1129 |
+
.fa-toggle-right:before,
|
1130 |
+
.fa-caret-square-o-right:before {
|
1131 |
+
content: "\f152";
|
1132 |
+
}
|
1133 |
+
.fa-euro:before,
|
1134 |
+
.fa-eur:before {
|
1135 |
+
content: "\f153";
|
1136 |
+
}
|
1137 |
+
.fa-gbp:before {
|
1138 |
+
content: "\f154";
|
1139 |
+
}
|
1140 |
+
.fa-dollar:before,
|
1141 |
+
.fa-usd:before {
|
1142 |
+
content: "\f155";
|
1143 |
+
}
|
1144 |
+
.fa-rupee:before,
|
1145 |
+
.fa-inr:before {
|
1146 |
+
content: "\f156";
|
1147 |
+
}
|
1148 |
+
.fa-cny:before,
|
1149 |
+
.fa-rmb:before,
|
1150 |
+
.fa-yen:before,
|
1151 |
+
.fa-jpy:before {
|
1152 |
+
content: "\f157";
|
1153 |
+
}
|
1154 |
+
.fa-ruble:before,
|
1155 |
+
.fa-rouble:before,
|
1156 |
+
.fa-rub:before {
|
1157 |
+
content: "\f158";
|
1158 |
+
}
|
1159 |
+
.fa-won:before,
|
1160 |
+
.fa-krw:before {
|
1161 |
+
content: "\f159";
|
1162 |
+
}
|
1163 |
+
.fa-bitcoin:before,
|
1164 |
+
.fa-btc:before {
|
1165 |
+
content: "\f15a";
|
1166 |
+
}
|
1167 |
+
.fa-file:before {
|
1168 |
+
content: "\f15b";
|
1169 |
+
}
|
1170 |
+
.fa-file-text:before {
|
1171 |
+
content: "\f15c";
|
1172 |
+
}
|
1173 |
+
.fa-sort-alpha-asc:before {
|
1174 |
+
content: "\f15d";
|
1175 |
+
}
|
1176 |
+
.fa-sort-alpha-desc:before {
|
1177 |
+
content: "\f15e";
|
1178 |
+
}
|
1179 |
+
.fa-sort-amount-asc:before {
|
1180 |
+
content: "\f160";
|
1181 |
+
}
|
1182 |
+
.fa-sort-amount-desc:before {
|
1183 |
+
content: "\f161";
|
1184 |
+
}
|
1185 |
+
.fa-sort-numeric-asc:before {
|
1186 |
+
content: "\f162";
|
1187 |
+
}
|
1188 |
+
.fa-sort-numeric-desc:before {
|
1189 |
+
content: "\f163";
|
1190 |
+
}
|
1191 |
+
.fa-thumbs-up:before {
|
1192 |
+
content: "\f164";
|
1193 |
+
}
|
1194 |
+
.fa-thumbs-down:before {
|
1195 |
+
content: "\f165";
|
1196 |
+
}
|
1197 |
+
.fa-youtube-square:before {
|
1198 |
+
content: "\f166";
|
1199 |
+
}
|
1200 |
+
.fa-youtube:before {
|
1201 |
+
content: "\f167";
|
1202 |
+
}
|
1203 |
+
.fa-xing:before {
|
1204 |
+
content: "\f168";
|
1205 |
+
}
|
1206 |
+
.fa-xing-square:before {
|
1207 |
+
content: "\f169";
|
1208 |
+
}
|
1209 |
+
.fa-youtube-play:before {
|
1210 |
+
content: "\f16a";
|
1211 |
+
}
|
1212 |
+
.fa-dropbox:before {
|
1213 |
+
content: "\f16b";
|
1214 |
+
}
|
1215 |
+
.fa-stack-overflow:before {
|
1216 |
+
content: "\f16c";
|
1217 |
+
}
|
1218 |
+
.fa-instagram:before {
|
1219 |
+
content: "\f16d";
|
1220 |
+
}
|
1221 |
+
.fa-flickr:before {
|
1222 |
+
content: "\f16e";
|
1223 |
+
}
|
1224 |
+
.fa-adn:before {
|
1225 |
+
content: "\f170";
|
1226 |
+
}
|
1227 |
+
.fa-bitbucket:before {
|
1228 |
+
content: "\f171";
|
1229 |
+
}
|
1230 |
+
.fa-bitbucket-square:before {
|
1231 |
+
content: "\f172";
|
1232 |
+
}
|
1233 |
+
.fa-tumblr:before {
|
1234 |
+
content: "\f173";
|
1235 |
+
}
|
1236 |
+
.fa-tumblr-square:before {
|
1237 |
+
content: "\f174";
|
1238 |
+
}
|
1239 |
+
.fa-long-arrow-down:before {
|
1240 |
+
content: "\f175";
|
1241 |
+
}
|
1242 |
+
.fa-long-arrow-up:before {
|
1243 |
+
content: "\f176";
|
1244 |
+
}
|
1245 |
+
.fa-long-arrow-left:before {
|
1246 |
+
content: "\f177";
|
1247 |
+
}
|
1248 |
+
.fa-long-arrow-right:before {
|
1249 |
+
content: "\f178";
|
1250 |
+
}
|
1251 |
+
.fa-apple:before {
|
1252 |
+
content: "\f179";
|
1253 |
+
}
|
1254 |
+
.fa-windows:before {
|
1255 |
+
content: "\f17a";
|
1256 |
+
}
|
1257 |
+
.fa-android:before {
|
1258 |
+
content: "\f17b";
|
1259 |
+
}
|
1260 |
+
.fa-linux:before {
|
1261 |
+
content: "\f17c";
|
1262 |
+
}
|
1263 |
+
.fa-dribbble:before {
|
1264 |
+
content: "\f17d";
|
1265 |
+
}
|
1266 |
+
.fa-skype:before {
|
1267 |
+
content: "\f17e";
|
1268 |
+
}
|
1269 |
+
.fa-foursquare:before {
|
1270 |
+
content: "\f180";
|
1271 |
+
}
|
1272 |
+
.fa-trello:before {
|
1273 |
+
content: "\f181";
|
1274 |
+
}
|
1275 |
+
.fa-female:before {
|
1276 |
+
content: "\f182";
|
1277 |
+
}
|
1278 |
+
.fa-male:before {
|
1279 |
+
content: "\f183";
|
1280 |
+
}
|
1281 |
+
.fa-gittip:before,
|
1282 |
+
.fa-gratipay:before {
|
1283 |
+
content: "\f184";
|
1284 |
+
}
|
1285 |
+
.fa-sun-o:before {
|
1286 |
+
content: "\f185";
|
1287 |
+
}
|
1288 |
+
.fa-moon-o:before {
|
1289 |
+
content: "\f186";
|
1290 |
+
}
|
1291 |
+
.fa-archive:before {
|
1292 |
+
content: "\f187";
|
1293 |
+
}
|
1294 |
+
.fa-bug:before {
|
1295 |
+
content: "\f188";
|
1296 |
+
}
|
1297 |
+
.fa-vk:before {
|
1298 |
+
content: "\f189";
|
1299 |
+
}
|
1300 |
+
.fa-weibo:before {
|
1301 |
+
content: "\f18a";
|
1302 |
+
}
|
1303 |
+
.fa-renren:before {
|
1304 |
+
content: "\f18b";
|
1305 |
+
}
|
1306 |
+
.fa-pagelines:before {
|
1307 |
+
content: "\f18c";
|
1308 |
+
}
|
1309 |
+
.fa-stack-exchange:before {
|
1310 |
+
content: "\f18d";
|
1311 |
+
}
|
1312 |
+
.fa-arrow-circle-o-right:before {
|
1313 |
+
content: "\f18e";
|
1314 |
+
}
|
1315 |
+
.fa-arrow-circle-o-left:before {
|
1316 |
+
content: "\f190";
|
1317 |
+
}
|
1318 |
+
.fa-toggle-left:before,
|
1319 |
+
.fa-caret-square-o-left:before {
|
1320 |
+
content: "\f191";
|
1321 |
+
}
|
1322 |
+
.fa-dot-circle-o:before {
|
1323 |
+
content: "\f192";
|
1324 |
+
}
|
1325 |
+
.fa-wheelchair:before {
|
1326 |
+
content: "\f193";
|
1327 |
+
}
|
1328 |
+
.fa-vimeo-square:before {
|
1329 |
+
content: "\f194";
|
1330 |
+
}
|
1331 |
+
.fa-turkish-lira:before,
|
1332 |
+
.fa-try:before {
|
1333 |
+
content: "\f195";
|
1334 |
+
}
|
1335 |
+
.fa-plus-square-o:before {
|
1336 |
+
content: "\f196";
|
1337 |
+
}
|
1338 |
+
.fa-space-shuttle:before {
|
1339 |
+
content: "\f197";
|
1340 |
+
}
|
1341 |
+
.fa-slack:before {
|
1342 |
+
content: "\f198";
|
1343 |
+
}
|
1344 |
+
.fa-envelope-square:before {
|
1345 |
+
content: "\f199";
|
1346 |
+
}
|
1347 |
+
.fa-wordpress:before {
|
1348 |
+
content: "\f19a";
|
1349 |
+
}
|
1350 |
+
.fa-openid:before {
|
1351 |
+
content: "\f19b";
|
1352 |
+
}
|
1353 |
+
.fa-institution:before,
|
1354 |
+
.fa-bank:before,
|
1355 |
+
.fa-university:before {
|
1356 |
+
content: "\f19c";
|
1357 |
+
}
|
1358 |
+
.fa-mortar-board:before,
|
1359 |
+
.fa-graduation-cap:before {
|
1360 |
+
content: "\f19d";
|
1361 |
+
}
|
1362 |
+
.fa-yahoo:before {
|
1363 |
+
content: "\f19e";
|
1364 |
+
}
|
1365 |
+
.fa-google:before {
|
1366 |
+
content: "\f1a0";
|
1367 |
+
}
|
1368 |
+
.fa-reddit:before {
|
1369 |
+
content: "\f1a1";
|
1370 |
+
}
|
1371 |
+
.fa-reddit-square:before {
|
1372 |
+
content: "\f1a2";
|
1373 |
+
}
|
1374 |
+
.fa-stumbleupon-circle:before {
|
1375 |
+
content: "\f1a3";
|
1376 |
+
}
|
1377 |
+
.fa-stumbleupon:before {
|
1378 |
+
content: "\f1a4";
|
1379 |
+
}
|
1380 |
+
.fa-delicious:before {
|
1381 |
+
content: "\f1a5";
|
1382 |
+
}
|
1383 |
+
.fa-digg:before {
|
1384 |
+
content: "\f1a6";
|
1385 |
+
}
|
1386 |
+
.fa-pied-piper:before {
|
1387 |
+
content: "\f1a7";
|
1388 |
+
}
|
1389 |
+
.fa-pied-piper-alt:before {
|
1390 |
+
content: "\f1a8";
|
1391 |
+
}
|
1392 |
+
.fa-drupal:before {
|
1393 |
+
content: "\f1a9";
|
1394 |
+
}
|
1395 |
+
.fa-joomla:before {
|
1396 |
+
content: "\f1aa";
|
1397 |
+
}
|
1398 |
+
.fa-language:before {
|
1399 |
+
content: "\f1ab";
|
1400 |
+
}
|
1401 |
+
.fa-fax:before {
|
1402 |
+
content: "\f1ac";
|
1403 |
+
}
|
1404 |
+
.fa-building:before {
|
1405 |
+
content: "\f1ad";
|
1406 |
+
}
|
1407 |
+
.fa-child:before {
|
1408 |
+
content: "\f1ae";
|
1409 |
+
}
|
1410 |
+
.fa-paw:before {
|
1411 |
+
content: "\f1b0";
|
1412 |
+
}
|
1413 |
+
.fa-spoon:before {
|
1414 |
+
content: "\f1b1";
|
1415 |
+
}
|
1416 |
+
.fa-cube:before {
|
1417 |
+
content: "\f1b2";
|
1418 |
+
}
|
1419 |
+
.fa-cubes:before {
|
1420 |
+
content: "\f1b3";
|
1421 |
+
}
|
1422 |
+
.fa-behance:before {
|
1423 |
+
content: "\f1b4";
|
1424 |
+
}
|
1425 |
+
.fa-behance-square:before {
|
1426 |
+
content: "\f1b5";
|
1427 |
+
}
|
1428 |
+
.fa-steam:before {
|
1429 |
+
content: "\f1b6";
|
1430 |
+
}
|
1431 |
+
.fa-steam-square:before {
|
1432 |
+
content: "\f1b7";
|
1433 |
+
}
|
1434 |
+
.fa-recycle:before {
|
1435 |
+
content: "\f1b8";
|
1436 |
+
}
|
1437 |
+
.fa-automobile:before,
|
1438 |
+
.fa-car:before {
|
1439 |
+
content: "\f1b9";
|
1440 |
+
}
|
1441 |
+
.fa-cab:before,
|
1442 |
+
.fa-taxi:before {
|
1443 |
+
content: "\f1ba";
|
1444 |
+
}
|
1445 |
+
.fa-tree:before {
|
1446 |
+
content: "\f1bb";
|
1447 |
+
}
|
1448 |
+
.fa-spotify:before {
|
1449 |
+
content: "\f1bc";
|
1450 |
+
}
|
1451 |
+
.fa-deviantart:before {
|
1452 |
+
content: "\f1bd";
|
1453 |
+
}
|
1454 |
+
.fa-soundcloud:before {
|
1455 |
+
content: "\f1be";
|
1456 |
+
}
|
1457 |
+
.fa-database:before {
|
1458 |
+
content: "\f1c0";
|
1459 |
+
}
|
1460 |
+
.fa-file-pdf-o:before {
|
1461 |
+
content: "\f1c1";
|
1462 |
+
}
|
1463 |
+
.fa-file-word-o:before {
|
1464 |
+
content: "\f1c2";
|
1465 |
+
}
|
1466 |
+
.fa-file-excel-o:before {
|
1467 |
+
content: "\f1c3";
|
1468 |
+
}
|
1469 |
+
.fa-file-powerpoint-o:before {
|
1470 |
+
content: "\f1c4";
|
1471 |
+
}
|
1472 |
+
.fa-file-photo-o:before,
|
1473 |
+
.fa-file-picture-o:before,
|
1474 |
+
.fa-file-image-o:before {
|
1475 |
+
content: "\f1c5";
|
1476 |
+
}
|
1477 |
+
.fa-file-zip-o:before,
|
1478 |
+
.fa-file-archive-o:before {
|
1479 |
+
content: "\f1c6";
|
1480 |
+
}
|
1481 |
+
.fa-file-sound-o:before,
|
1482 |
+
.fa-file-audio-o:before {
|
1483 |
+
content: "\f1c7";
|
1484 |
+
}
|
1485 |
+
.fa-file-movie-o:before,
|
1486 |
+
.fa-file-video-o:before {
|
1487 |
+
content: "\f1c8";
|
1488 |
+
}
|
1489 |
+
.fa-file-code-o:before {
|
1490 |
+
content: "\f1c9";
|
1491 |
+
}
|
1492 |
+
.fa-vine:before {
|
1493 |
+
content: "\f1ca";
|
1494 |
+
}
|
1495 |
+
.fa-codepen:before {
|
1496 |
+
content: "\f1cb";
|
1497 |
+
}
|
1498 |
+
.fa-jsfiddle:before {
|
1499 |
+
content: "\f1cc";
|
1500 |
+
}
|
1501 |
+
.fa-life-bouy:before,
|
1502 |
+
.fa-life-buoy:before,
|
1503 |
+
.fa-life-saver:before,
|
1504 |
+
.fa-support:before,
|
1505 |
+
.fa-life-ring:before {
|
1506 |
+
content: "\f1cd";
|
1507 |
+
}
|
1508 |
+
.fa-circle-o-notch:before {
|
1509 |
+
content: "\f1ce";
|
1510 |
+
}
|
1511 |
+
.fa-ra:before,
|
1512 |
+
.fa-rebel:before {
|
1513 |
+
content: "\f1d0";
|
1514 |
+
}
|
1515 |
+
.fa-ge:before,
|
1516 |
+
.fa-empire:before {
|
1517 |
+
content: "\f1d1";
|
1518 |
+
}
|
1519 |
+
.fa-git-square:before {
|
1520 |
+
content: "\f1d2";
|
1521 |
+
}
|
1522 |
+
.fa-git:before {
|
1523 |
+
content: "\f1d3";
|
1524 |
+
}
|
1525 |
+
.fa-y-combinator-square:before,
|
1526 |
+
.fa-yc-square:before,
|
1527 |
+
.fa-hacker-news:before {
|
1528 |
+
content: "\f1d4";
|
1529 |
+
}
|
1530 |
+
.fa-tencent-weibo:before {
|
1531 |
+
content: "\f1d5";
|
1532 |
+
}
|
1533 |
+
.fa-qq:before {
|
1534 |
+
content: "\f1d6";
|
1535 |
+
}
|
1536 |
+
.fa-wechat:before,
|
1537 |
+
.fa-weixin:before {
|
1538 |
+
content: "\f1d7";
|
1539 |
+
}
|
1540 |
+
.fa-send:before,
|
1541 |
+
.fa-paper-plane:before {
|
1542 |
+
content: "\f1d8";
|
1543 |
+
}
|
1544 |
+
.fa-send-o:before,
|
1545 |
+
.fa-paper-plane-o:before {
|
1546 |
+
content: "\f1d9";
|
1547 |
+
}
|
1548 |
+
.fa-history:before {
|
1549 |
+
content: "\f1da";
|
1550 |
+
}
|
1551 |
+
.fa-circle-thin:before {
|
1552 |
+
content: "\f1db";
|
1553 |
+
}
|
1554 |
+
.fa-header:before {
|
1555 |
+
content: "\f1dc";
|
1556 |
+
}
|
1557 |
+
.fa-paragraph:before {
|
1558 |
+
content: "\f1dd";
|
1559 |
+
}
|
1560 |
+
.fa-sliders:before {
|
1561 |
+
content: "\f1de";
|
1562 |
+
}
|
1563 |
+
.fa-share-alt:before {
|
1564 |
+
content: "\f1e0";
|
1565 |
+
}
|
1566 |
+
.fa-share-alt-square:before {
|
1567 |
+
content: "\f1e1";
|
1568 |
+
}
|
1569 |
+
.fa-bomb:before {
|
1570 |
+
content: "\f1e2";
|
1571 |
+
}
|
1572 |
+
.fa-soccer-ball-o:before,
|
1573 |
+
.fa-futbol-o:before {
|
1574 |
+
content: "\f1e3";
|
1575 |
+
}
|
1576 |
+
.fa-tty:before {
|
1577 |
+
content: "\f1e4";
|
1578 |
+
}
|
1579 |
+
.fa-binoculars:before {
|
1580 |
+
content: "\f1e5";
|
1581 |
+
}
|
1582 |
+
.fa-plug:before {
|
1583 |
+
content: "\f1e6";
|
1584 |
+
}
|
1585 |
+
.fa-slideshare:before {
|
1586 |
+
content: "\f1e7";
|
1587 |
+
}
|
1588 |
+
.fa-twitch:before {
|
1589 |
+
content: "\f1e8";
|
1590 |
+
}
|
1591 |
+
.fa-yelp:before {
|
1592 |
+
content: "\f1e9";
|
1593 |
+
}
|
1594 |
+
.fa-newspaper-o:before {
|
1595 |
+
content: "\f1ea";
|
1596 |
+
}
|
1597 |
+
.fa-wifi:before {
|
1598 |
+
content: "\f1eb";
|
1599 |
+
}
|
1600 |
+
.fa-calculator:before {
|
1601 |
+
content: "\f1ec";
|
1602 |
+
}
|
1603 |
+
.fa-paypal:before {
|
1604 |
+
content: "\f1ed";
|
1605 |
+
}
|
1606 |
+
.fa-google-wallet:before {
|
1607 |
+
content: "\f1ee";
|
1608 |
+
}
|
1609 |
+
.fa-cc-visa:before {
|
1610 |
+
content: "\f1f0";
|
1611 |
+
}
|
1612 |
+
.fa-cc-mastercard:before {
|
1613 |
+
content: "\f1f1";
|
1614 |
+
}
|
1615 |
+
.fa-cc-discover:before {
|
1616 |
+
content: "\f1f2";
|
1617 |
+
}
|
1618 |
+
.fa-cc-amex:before {
|
1619 |
+
content: "\f1f3";
|
1620 |
+
}
|
1621 |
+
.fa-cc-paypal:before {
|
1622 |
+
content: "\f1f4";
|
1623 |
+
}
|
1624 |
+
.fa-cc-stripe:before {
|
1625 |
+
content: "\f1f5";
|
1626 |
+
}
|
1627 |
+
.fa-bell-slash:before {
|
1628 |
+
content: "\f1f6";
|
1629 |
+
}
|
1630 |
+
.fa-bell-slash-o:before {
|
1631 |
+
content: "\f1f7";
|
1632 |
+
}
|
1633 |
+
.fa-trash:before {
|
1634 |
+
content: "\f1f8";
|
1635 |
+
}
|
1636 |
+
.fa-copyright:before {
|
1637 |
+
content: "\f1f9";
|
1638 |
+
}
|
1639 |
+
.fa-at:before {
|
1640 |
+
content: "\f1fa";
|
1641 |
+
}
|
1642 |
+
.fa-eyedropper:before {
|
1643 |
+
content: "\f1fb";
|
1644 |
+
}
|
1645 |
+
.fa-paint-brush:before {
|
1646 |
+
content: "\f1fc";
|
1647 |
+
}
|
1648 |
+
.fa-birthday-cake:before {
|
1649 |
+
content: "\f1fd";
|
1650 |
+
}
|
1651 |
+
.fa-area-chart:before {
|
1652 |
+
content: "\f1fe";
|
1653 |
+
}
|
1654 |
+
.fa-pie-chart:before {
|
1655 |
+
content: "\f200";
|
1656 |
+
}
|
1657 |
+
.fa-line-chart:before {
|
1658 |
+
content: "\f201";
|
1659 |
+
}
|
1660 |
+
.fa-lastfm:before {
|
1661 |
+
content: "\f202";
|
1662 |
+
}
|
1663 |
+
.fa-lastfm-square:before {
|
1664 |
+
content: "\f203";
|
1665 |
+
}
|
1666 |
+
.fa-toggle-off:before {
|
1667 |
+
content: "\f204";
|
1668 |
+
}
|
1669 |
+
.fa-toggle-on:before {
|
1670 |
+
content: "\f205";
|
1671 |
+
}
|
1672 |
+
.fa-bicycle:before {
|
1673 |
+
content: "\f206";
|
1674 |
+
}
|
1675 |
+
.fa-bus:before {
|
1676 |
+
content: "\f207";
|
1677 |
+
}
|
1678 |
+
.fa-ioxhost:before {
|
1679 |
+
content: "\f208";
|
1680 |
+
}
|
1681 |
+
.fa-angellist:before {
|
1682 |
+
content: "\f209";
|
1683 |
+
}
|
1684 |
+
.fa-cc:before {
|
1685 |
+
content: "\f20a";
|
1686 |
+
}
|
1687 |
+
.fa-shekel:before,
|
1688 |
+
.fa-sheqel:before,
|
1689 |
+
.fa-ils:before {
|
1690 |
+
content: "\f20b";
|
1691 |
+
}
|
1692 |
+
.fa-meanpath:before {
|
1693 |
+
content: "\f20c";
|
1694 |
+
}
|
1695 |
+
.fa-buysellads:before {
|
1696 |
+
content: "\f20d";
|
1697 |
+
}
|
1698 |
+
.fa-connectdevelop:before {
|
1699 |
+
content: "\f20e";
|
1700 |
+
}
|
1701 |
+
.fa-dashcube:before {
|
1702 |
+
content: "\f210";
|
1703 |
+
}
|
1704 |
+
.fa-forumbee:before {
|
1705 |
+
content: "\f211";
|
1706 |
+
}
|
1707 |
+
.fa-leanpub:before {
|
1708 |
+
content: "\f212";
|
1709 |
+
}
|
1710 |
+
.fa-sellsy:before {
|
1711 |
+
content: "\f213";
|
1712 |
+
}
|
1713 |
+
.fa-shirtsinbulk:before {
|
1714 |
+
content: "\f214";
|
1715 |
+
}
|
1716 |
+
.fa-simplybuilt:before {
|
1717 |
+
content: "\f215";
|
1718 |
+
}
|
1719 |
+
.fa-skyatlas:before {
|
1720 |
+
content: "\f216";
|
1721 |
+
}
|
1722 |
+
.fa-cart-plus:before {
|
1723 |
+
content: "\f217";
|
1724 |
+
}
|
1725 |
+
.fa-cart-arrow-down:before {
|
1726 |
+
content: "\f218";
|
1727 |
+
}
|
1728 |
+
.fa-diamond:before {
|
1729 |
+
content: "\f219";
|
1730 |
+
}
|
1731 |
+
.fa-ship:before {
|
1732 |
+
content: "\f21a";
|
1733 |
+
}
|
1734 |
+
.fa-user-secret:before {
|
1735 |
+
content: "\f21b";
|
1736 |
+
}
|
1737 |
+
.fa-motorcycle:before {
|
1738 |
+
content: "\f21c";
|
1739 |
+
}
|
1740 |
+
.fa-street-view:before {
|
1741 |
+
content: "\f21d";
|
1742 |
+
}
|
1743 |
+
.fa-heartbeat:before {
|
1744 |
+
content: "\f21e";
|
1745 |
+
}
|
1746 |
+
.fa-venus:before {
|
1747 |
+
content: "\f221";
|
1748 |
+
}
|
1749 |
+
.fa-mars:before {
|
1750 |
+
content: "\f222";
|
1751 |
+
}
|
1752 |
+
.fa-mercury:before {
|
1753 |
+
content: "\f223";
|
1754 |
+
}
|
1755 |
+
.fa-intersex:before,
|
1756 |
+
.fa-transgender:before {
|
1757 |
+
content: "\f224";
|
1758 |
+
}
|
1759 |
+
.fa-transgender-alt:before {
|
1760 |
+
content: "\f225";
|
1761 |
+
}
|
1762 |
+
.fa-venus-double:before {
|
1763 |
+
content: "\f226";
|
1764 |
+
}
|
1765 |
+
.fa-mars-double:before {
|
1766 |
+
content: "\f227";
|
1767 |
+
}
|
1768 |
+
.fa-venus-mars:before {
|
1769 |
+
content: "\f228";
|
1770 |
+
}
|
1771 |
+
.fa-mars-stroke:before {
|
1772 |
+
content: "\f229";
|
1773 |
+
}
|
1774 |
+
.fa-mars-stroke-v:before {
|
1775 |
+
content: "\f22a";
|
1776 |
+
}
|
1777 |
+
.fa-mars-stroke-h:before {
|
1778 |
+
content: "\f22b";
|
1779 |
+
}
|
1780 |
+
.fa-neuter:before {
|
1781 |
+
content: "\f22c";
|
1782 |
+
}
|
1783 |
+
.fa-genderless:before {
|
1784 |
+
content: "\f22d";
|
1785 |
+
}
|
1786 |
+
.fa-facebook-official:before {
|
1787 |
+
content: "\f230";
|
1788 |
+
}
|
1789 |
+
.fa-pinterest-p:before {
|
1790 |
+
content: "\f231";
|
1791 |
+
}
|
1792 |
+
.fa-whatsapp:before {
|
1793 |
+
content: "\f232";
|
1794 |
+
}
|
1795 |
+
.fa-server:before {
|
1796 |
+
content: "\f233";
|
1797 |
+
}
|
1798 |
+
.fa-user-plus:before {
|
1799 |
+
content: "\f234";
|
1800 |
+
}
|
1801 |
+
.fa-user-times:before {
|
1802 |
+
content: "\f235";
|
1803 |
+
}
|
1804 |
+
.fa-hotel:before,
|
1805 |
+
.fa-bed:before {
|
1806 |
+
content: "\f236";
|
1807 |
+
}
|
1808 |
+
.fa-viacoin:before {
|
1809 |
+
content: "\f237";
|
1810 |
+
}
|
1811 |
+
.fa-train:before {
|
1812 |
+
content: "\f238";
|
1813 |
+
}
|
1814 |
+
.fa-subway:before {
|
1815 |
+
content: "\f239";
|
1816 |
+
}
|
1817 |
+
.fa-medium:before {
|
1818 |
+
content: "\f23a";
|
1819 |
+
}
|
1820 |
+
.fa-yc:before,
|
1821 |
+
.fa-y-combinator:before {
|
1822 |
+
content: "\f23b";
|
1823 |
+
}
|
1824 |
+
.fa-optin-monster:before {
|
1825 |
+
content: "\f23c";
|
1826 |
+
}
|
1827 |
+
.fa-opencart:before {
|
1828 |
+
content: "\f23d";
|
1829 |
+
}
|
1830 |
+
.fa-expeditedssl:before {
|
1831 |
+
content: "\f23e";
|
1832 |
+
}
|
1833 |
+
.fa-battery-4:before,
|
1834 |
+
.fa-battery-full:before {
|
1835 |
+
content: "\f240";
|
1836 |
+
}
|
1837 |
+
.fa-battery-3:before,
|
1838 |
+
.fa-battery-three-quarters:before {
|
1839 |
+
content: "\f241";
|
1840 |
+
}
|
1841 |
+
.fa-battery-2:before,
|
1842 |
+
.fa-battery-half:before {
|
1843 |
+
content: "\f242";
|
1844 |
+
}
|
1845 |
+
.fa-battery-1:before,
|
1846 |
+
.fa-battery-quarter:before {
|
1847 |
+
content: "\f243";
|
1848 |
+
}
|
1849 |
+
.fa-battery-0:before,
|
1850 |
+
.fa-battery-empty:before {
|
1851 |
+
content: "\f244";
|
1852 |
+
}
|
1853 |
+
.fa-mouse-pointer:before {
|
1854 |
+
content: "\f245";
|
1855 |
+
}
|
1856 |
+
.fa-i-cursor:before {
|
1857 |
+
content: "\f246";
|
1858 |
+
}
|
1859 |
+
.fa-object-group:before {
|
1860 |
+
content: "\f247";
|
1861 |
+
}
|
1862 |
+
.fa-object-ungroup:before {
|
1863 |
+
content: "\f248";
|
1864 |
+
}
|
1865 |
+
.fa-sticky-note:before {
|
1866 |
+
content: "\f249";
|
1867 |
+
}
|
1868 |
+
.fa-sticky-note-o:before {
|
1869 |
+
content: "\f24a";
|
1870 |
+
}
|
1871 |
+
.fa-cc-jcb:before {
|
1872 |
+
content: "\f24b";
|
1873 |
+
}
|
1874 |
+
.fa-cc-diners-club:before {
|
1875 |
+
content: "\f24c";
|
1876 |
+
}
|
1877 |
+
.fa-clone:before {
|
1878 |
+
content: "\f24d";
|
1879 |
+
}
|
1880 |
+
.fa-balance-scale:before {
|
1881 |
+
content: "\f24e";
|
1882 |
+
}
|
1883 |
+
.fa-hourglass-o:before {
|
1884 |
+
content: "\f250";
|
1885 |
+
}
|
1886 |
+
.fa-hourglass-1:before,
|
1887 |
+
.fa-hourglass-start:before {
|
1888 |
+
content: "\f251";
|
1889 |
+
}
|
1890 |
+
.fa-hourglass-2:before,
|
1891 |
+
.fa-hourglass-half:before {
|
1892 |
+
content: "\f252";
|
1893 |
+
}
|
1894 |
+
.fa-hourglass-3:before,
|
1895 |
+
.fa-hourglass-end:before {
|
1896 |
+
content: "\f253";
|
1897 |
+
}
|
1898 |
+
.fa-hourglass:before {
|
1899 |
+
content: "\f254";
|
1900 |
+
}
|
1901 |
+
.fa-hand-grab-o:before,
|
1902 |
+
.fa-hand-rock-o:before {
|
1903 |
+
content: "\f255";
|
1904 |
+
}
|
1905 |
+
.fa-hand-stop-o:before,
|
1906 |
+
.fa-hand-paper-o:before {
|
1907 |
+
content: "\f256";
|
1908 |
+
}
|
1909 |
+
.fa-hand-scissors-o:before {
|
1910 |
+
content: "\f257";
|
1911 |
+
}
|
1912 |
+
.fa-hand-lizard-o:before {
|
1913 |
+
content: "\f258";
|
1914 |
+
}
|
1915 |
+
.fa-hand-spock-o:before {
|
1916 |
+
content: "\f259";
|
1917 |
+
}
|
1918 |
+
.fa-hand-pointer-o:before {
|
1919 |
+
content: "\f25a";
|
1920 |
+
}
|
1921 |
+
.fa-hand-peace-o:before {
|
1922 |
+
content: "\f25b";
|
1923 |
+
}
|
1924 |
+
.fa-trademark:before {
|
1925 |
+
content: "\f25c";
|
1926 |
+
}
|
1927 |
+
.fa-registered:before {
|
1928 |
+
content: "\f25d";
|
1929 |
+
}
|
1930 |
+
.fa-creative-commons:before {
|
1931 |
+
content: "\f25e";
|
1932 |
+
}
|
1933 |
+
.fa-gg:before {
|
1934 |
+
content: "\f260";
|
1935 |
+
}
|
1936 |
+
.fa-gg-circle:before {
|
1937 |
+
content: "\f261";
|
1938 |
+
}
|
1939 |
+
.fa-tripadvisor:before {
|
1940 |
+
content: "\f262";
|
1941 |
+
}
|
1942 |
+
.fa-odnoklassniki:before {
|
1943 |
+
content: "\f263";
|
1944 |
+
}
|
1945 |
+
.fa-odnoklassniki-square:before {
|
1946 |
+
content: "\f264";
|
1947 |
+
}
|
1948 |
+
.fa-get-pocket:before {
|
1949 |
+
content: "\f265";
|
1950 |
+
}
|
1951 |
+
.fa-wikipedia-w:before {
|
1952 |
+
content: "\f266";
|
1953 |
+
}
|
1954 |
+
.fa-safari:before {
|
1955 |
+
content: "\f267";
|
1956 |
+
}
|
1957 |
+
.fa-chrome:before {
|
1958 |
+
content: "\f268";
|
1959 |
+
}
|
1960 |
+
.fa-firefox:before {
|
1961 |
+
content: "\f269";
|
1962 |
+
}
|
1963 |
+
.fa-opera:before {
|
1964 |
+
content: "\f26a";
|
1965 |
+
}
|
1966 |
+
.fa-internet-explorer:before {
|
1967 |
+
content: "\f26b";
|
1968 |
+
}
|
1969 |
+
.fa-tv:before,
|
1970 |
+
.fa-television:before {
|
1971 |
+
content: "\f26c";
|
1972 |
+
}
|
1973 |
+
.fa-contao:before {
|
1974 |
+
content: "\f26d";
|
1975 |
+
}
|
1976 |
+
.fa-500px:before {
|
1977 |
+
content: "\f26e";
|
1978 |
+
}
|
1979 |
+
.fa-amazon:before {
|
1980 |
+
content: "\f270";
|
1981 |
+
}
|
1982 |
+
.fa-calendar-plus-o:before {
|
1983 |
+
content: "\f271";
|
1984 |
+
}
|
1985 |
+
.fa-calendar-minus-o:before {
|
1986 |
+
content: "\f272";
|
1987 |
+
}
|
1988 |
+
.fa-calendar-times-o:before {
|
1989 |
+
content: "\f273";
|
1990 |
+
}
|
1991 |
+
.fa-calendar-check-o:before {
|
1992 |
+
content: "\f274";
|
1993 |
+
}
|
1994 |
+
.fa-industry:before {
|
1995 |
+
content: "\f275";
|
1996 |
+
}
|
1997 |
+
.fa-map-pin:before {
|
1998 |
+
content: "\f276";
|
1999 |
+
}
|
2000 |
+
.fa-map-signs:before {
|
2001 |
+
content: "\f277";
|
2002 |
+
}
|
2003 |
+
.fa-map-o:before {
|
2004 |
+
content: "\f278";
|
2005 |
+
}
|
2006 |
+
.fa-map:before {
|
2007 |
+
content: "\f279";
|
2008 |
+
}
|
2009 |
+
.fa-commenting:before {
|
2010 |
+
content: "\f27a";
|
2011 |
+
}
|
2012 |
+
.fa-commenting-o:before {
|
2013 |
+
content: "\f27b";
|
2014 |
+
}
|
2015 |
+
.fa-houzz:before {
|
2016 |
+
content: "\f27c";
|
2017 |
+
}
|
2018 |
+
.fa-vimeo:before {
|
2019 |
+
content: "\f27d";
|
2020 |
+
}
|
2021 |
+
.fa-black-tie:before {
|
2022 |
+
content: "\f27e";
|
2023 |
+
}
|
2024 |
+
.fa-fonticons:before {
|
2025 |
+
content: "\f280";
|
2026 |
+
}
|
2027 |
+
.fa-reddit-alien:before {
|
2028 |
+
content: "\f281";
|
2029 |
+
}
|
2030 |
+
.fa-edge:before {
|
2031 |
+
content: "\f282";
|
2032 |
+
}
|
2033 |
+
.fa-credit-card-alt:before {
|
2034 |
+
content: "\f283";
|
2035 |
+
}
|
2036 |
+
.fa-codiepie:before {
|
2037 |
+
content: "\f284";
|
2038 |
+
}
|
2039 |
+
.fa-modx:before {
|
2040 |
+
content: "\f285";
|
2041 |
+
}
|
2042 |
+
.fa-fort-awesome:before {
|
2043 |
+
content: "\f286";
|
2044 |
+
}
|
2045 |
+
.fa-usb:before {
|
2046 |
+
content: "\f287";
|
2047 |
+
}
|
2048 |
+
.fa-product-hunt:before {
|
2049 |
+
content: "\f288";
|
2050 |
+
}
|
2051 |
+
.fa-mixcloud:before {
|
2052 |
+
content: "\f289";
|
2053 |
+
}
|
2054 |
+
.fa-scribd:before {
|
2055 |
+
content: "\f28a";
|
2056 |
+
}
|
2057 |
+
.fa-pause-circle:before {
|
2058 |
+
content: "\f28b";
|
2059 |
+
}
|
2060 |
+
.fa-pause-circle-o:before {
|
2061 |
+
content: "\f28c";
|
2062 |
+
}
|
2063 |
+
.fa-stop-circle:before {
|
2064 |
+
content: "\f28d";
|
2065 |
+
}
|
2066 |
+
.fa-stop-circle-o:before {
|
2067 |
+
content: "\f28e";
|
2068 |
+
}
|
2069 |
+
.fa-shopping-bag:before {
|
2070 |
+
content: "\f290";
|
2071 |
+
}
|
2072 |
+
.fa-shopping-basket:before {
|
2073 |
+
content: "\f291";
|
2074 |
+
}
|
2075 |
+
.fa-hashtag:before {
|
2076 |
+
content: "\f292";
|
2077 |
+
}
|
2078 |
+
.fa-bluetooth:before {
|
2079 |
+
content: "\f293";
|
2080 |
+
}
|
2081 |
+
.fa-bluetooth-b:before {
|
2082 |
+
content: "\f294";
|
2083 |
+
}
|
2084 |
+
.fa-percent:before {
|
2085 |
+
content: "\f295";
|
2086 |
+
}
|
lib/icons/css/font-awesome.min.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome
|
3 |
+
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
4 |
+
*/@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.5.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: eherman24
|
|
3 |
Donate link: http://www.evan-herman.com/contact/?contact-reason=I%20want%20to%20make%20a%20donation%20for%20all%20your%20hard%20work
|
4 |
Tags: vertical, timeline, animated, css3, animations, evan, herman, evan herman, easy, time, line, font awesome, font, awesome, announcements, notifications, simple, events, calendar, scroll, triggered, scrolling, animated, fade, in, fade in
|
5 |
Requires at least: 3.9
|
6 |
-
Tested up to: 4.4.
|
7 |
-
Stable tag: 1.1.7.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Timeline express allows you to create a beautiful vertical animated and responsive timeline of posts , without writing a single line of code. Sweet!
|
@@ -331,6 +331,22 @@ function custom_timeline_express_template_file( $template_file ) {
|
|
331 |
add_filter( 'timeline_express_custom_template' , 'custom_timeline_express_template_file' , 10 );
|
332 |
</code>
|
333 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
== Screenshots ==
|
335 |
|
336 |
1. Timeline Express announcement post creation screen
|
@@ -341,6 +357,12 @@ add_filter( 'timeline_express_custom_template' , 'custom_timeline_express_templa
|
|
341 |
|
342 |
== Changelog ==
|
343 |
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
= 1.1.7.7 - January 30th, 2016 =
|
345 |
* Wrapped single announcement template date in `timeline_express_custom_date_format` filter to allow users to alter that, as well as the date in the timeline.
|
346 |
|
@@ -523,5 +545,8 @@ add_filter( 'timeline_express_custom_template' , 'custom_timeline_express_templa
|
|
523 |
|
524 |
== Upgrade Notice ==
|
525 |
|
526 |
-
= 1.1.7.
|
527 |
-
*
|
|
|
|
|
|
3 |
Donate link: http://www.evan-herman.com/contact/?contact-reason=I%20want%20to%20make%20a%20donation%20for%20all%20your%20hard%20work
|
4 |
Tags: vertical, timeline, animated, css3, animations, evan, herman, evan herman, easy, time, line, font awesome, font, awesome, announcements, notifications, simple, events, calendar, scroll, triggered, scrolling, animated, fade, in, fade in
|
5 |
Requires at least: 3.9
|
6 |
+
Tested up to: 4.4.2
|
7 |
+
Stable tag: 1.1.7.8
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Timeline express allows you to create a beautiful vertical animated and responsive timeline of posts , without writing a single line of code. Sweet!
|
331 |
add_filter( 'timeline_express_custom_template' , 'custom_timeline_express_template_file' , 10 );
|
332 |
</code>
|
333 |
|
334 |
+
**Specify Font Awesome Version (New 1.1.7.8)**
|
335 |
+
|
336 |
+
Users can now specify which version of font awesome to load from the font awesome CDN. Alternatively, if the font awesome version is not found - the bundled fall back (version 4.5.0) will be used.
|
337 |
+
|
338 |
+
Example:
|
339 |
+
<code>
|
340 |
+
// use a different version of Font Awesome
|
341 |
+
function timeline_express_alter_font_awesome_version( $version ) {
|
342 |
+
$version = '4.4.0';
|
343 |
+
return $version;
|
344 |
+
}
|
345 |
+
add_filter( 'timeline_express_font_awesome_version', 'timeline_express_alter_font_awesome_version' );
|
346 |
+
</code>
|
347 |
+
|
348 |
+
The above example will load font awesome version 4.4.0 instead of the current stable version from the font awesome CDN.
|
349 |
+
|
350 |
== Screenshots ==
|
351 |
|
352 |
1. Timeline Express announcement post creation screen
|
357 |
|
358 |
== Changelog ==
|
359 |
|
360 |
+
= 1.1.7.8 - February 5th, 2016 =
|
361 |
+
* Upgraded font awesome library from 4.3.0 to 4.5.0.
|
362 |
+
* Added a fallback for the font awesome library - when the CDN is not accessible for whatever reason.
|
363 |
+
* Added CDN responses to transient to decrease page load times.
|
364 |
+
* Included a new filter allowing users to specify a font awesome version number to load from the CDN (`timeline_express_font_awesome_version` - see other notes.).
|
365 |
+
|
366 |
= 1.1.7.7 - January 30th, 2016 =
|
367 |
* Wrapped single announcement template date in `timeline_express_custom_date_format` filter to allow users to alter that, as well as the date in the timeline.
|
368 |
|
545 |
|
546 |
== Upgrade Notice ==
|
547 |
|
548 |
+
= 1.1.7.8 - February 5th, 2016 =
|
549 |
+
* Upgraded font awesome library from 4.3.0 to 4.5.0.
|
550 |
+
* Added a fallback for the font awesome library - when the CDN is not accessible for whatever reason.
|
551 |
+
* Added CDN responses to transient to decrease page load times.
|
552 |
+
* Included a new filter allowing users to specify a font awesome version number to load from the CDN (`timeline_express_font_awesome_version` - see other notes.).
|
timeline-express.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Timeline Express
|
5 |
Plugin URI: http://www.evan-herman.com
|
6 |
Description: Create a beautiful vertical, CSS3 animated and responsive timeline in minutes flat without writing code.
|
7 |
-
Version: 1.1.7.
|
8 |
Author: Evan Herman
|
9 |
Author URI: http://www.evan-herman.com
|
10 |
License: GPL2
|
@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
28 |
#_________________________________________________ CONSTANTS
|
29 |
|
30 |
/** Configuration **/
|
31 |
-
if(!defined('TIMELINE_EXPRESS_VERSION_CURRENT')) define('TIMELINE_EXPRESS_VERSION_CURRENT', '1.1.7.
|
32 |
if(!defined('TIMELINE_EXPRESS_PATH')) define('TIMELINE_EXPRESS_PATH', plugin_dir_path( __FILE__ ));
|
33 |
if(!defined('TIMELINE_EXPRESS_URL')) define('TIMELINE_EXPRESS_URL', plugins_url('timeline-express/'));
|
34 |
if(!defined('TIMELINE_EXPRESS_URL_WP')) define('TIMELINE_EXPRESS_URL_WP', get_bloginfo('url'));
|
4 |
Plugin Name: Timeline Express
|
5 |
Plugin URI: http://www.evan-herman.com
|
6 |
Description: Create a beautiful vertical, CSS3 animated and responsive timeline in minutes flat without writing code.
|
7 |
+
Version: 1.1.7.8
|
8 |
Author: Evan Herman
|
9 |
Author URI: http://www.evan-herman.com
|
10 |
License: GPL2
|
28 |
#_________________________________________________ CONSTANTS
|
29 |
|
30 |
/** Configuration **/
|
31 |
+
if(!defined('TIMELINE_EXPRESS_VERSION_CURRENT')) define('TIMELINE_EXPRESS_VERSION_CURRENT', '1.1.7.8');
|
32 |
if(!defined('TIMELINE_EXPRESS_PATH')) define('TIMELINE_EXPRESS_PATH', plugin_dir_path( __FILE__ ));
|
33 |
if(!defined('TIMELINE_EXPRESS_URL')) define('TIMELINE_EXPRESS_URL', plugins_url('timeline-express/'));
|
34 |
if(!defined('TIMELINE_EXPRESS_URL_WP')) define('TIMELINE_EXPRESS_URL_WP', get_bloginfo('url'));
|