Merge branch 'release/5.3.9.2' into develop

This commit is contained in:
I 2016-06-28 11:24:58 +02:00
commit 3bf8fd758b
141 changed files with 13779 additions and 7444 deletions

View File

@ -3,7 +3,7 @@
Plugin Name: Advanced Custom Fields PRO
Plugin URI: https://www.advancedcustomfields.com/
Description: Customise WordPress with powerful, professional and intuitive fields
Version: 5.3.8.1
Version: 5.3.9.2
Author: Elliot Condon
Author URI: http://www.elliotcondon.com/
Copyright: Elliot Condon
@ -58,7 +58,7 @@ class acf {
// basic
'name' => __('Advanced Custom Fields', 'acf'),
'version' => '5.3.8.1',
'version' => '5.3.9.2',
// urls
'basename' => plugin_basename( __FILE__ ),
@ -107,6 +107,7 @@ class acf {
acf_include('core/revisions.php');
acf_include('core/compatibility.php');
acf_include('core/third_party.php');
acf_include('core/updates.php');
// forms
@ -125,6 +126,7 @@ class acf {
acf_include('admin/field-group.php');
acf_include('admin/field-groups.php');
acf_include('admin/update.php');
acf_include('admin/update-network.php');
acf_include('admin/settings-tools.php');
//acf_include('admin/settings-addons.php');
acf_include('admin/settings-info.php');
@ -219,6 +221,8 @@ class acf {
acf_include('fields/user.php');
acf_include('fields/google-map.php');
acf_include('fields/date_picker.php');
acf_include('fields/date_time_picker.php');
acf_include('fields/time_picker.php');
acf_include('fields/color_picker.php');
acf_include('fields/message.php');
acf_include('fields/tab.php');
@ -368,7 +372,6 @@ class acf {
// vars
$version = acf_get_setting('version');
$lang = get_locale();
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';

View File

@ -99,21 +99,27 @@ class acf_admin_field_group {
function current_screen() {
// validate screen
if( !acf_is_screen('acf-field-group') ) {
return;
}
if( !acf_is_screen('acf-field-group') ) return;
// disable JSON to avoid conflicts between DB and JSON
acf_disable_local();
// enqueue scripts
acf_enqueue_scripts();
// actions
add_action('admin_enqueue_scripts', array($this,'admin_enqueue_scripts'), 20);
add_action('admin_head', array($this,'admin_head'), 20);
add_action('admin_footer', array($this,'admin_footer'), 20);
add_action('acf/input/admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
add_action('acf/input/admin_head', array($this, 'admin_head'));
add_action('acf/input/form_data', array($this, 'form_data'));
add_action('acf/input/admin_footer', array($this, 'admin_footer'));
add_action('acf/input/admin_footer_js', array($this, 'admin_footer_js'));
// filters
add_filter('acf/input/admin_l10n', array($this, 'admin_l10n'));
}
@ -187,12 +193,112 @@ class acf_admin_field_group {
add_filter('screen_settings', array($this, 'screen_settings'), 10, 1);
// action for 3rd party customisation
// 3rd party hook
do_action('acf/field_group/admin_head');
}
/*
* edit_form_after_title
*
* This action will allow ACF to render metaboxes after the title
*
* @type action
* @date 17/08/13
*
* @param n/a
* @return n/a
*/
function edit_form_after_title() {
// globals
global $post;
// render post data
acf_form_data(array(
'post_id' => $post->post_id,
'nonce' => 'field_group',
'ajax' => 0
));
}
/*
* form_data
*
* This function will add extra HTML to the acf form data element
*
* @type function
* @date 31/05/2016
* @since 5.3.8
*
* @param n/a
* @return n/a
*/
function form_data( $args ) {
// add extra inputs
?>
<input type="hidden" name="_acf_delete_fields" value="0" id="input-delete-fields" />
<?php
// do action
do_action('acf/field_group/form_data', $args);
}
/*
* admin_l10n
*
* This function will append extra l10n strings to the acf JS object
*
* @type function
* @date 31/05/2016
* @since 5.3.8
*
* @param $l10n (array)
* @return $l10n
*/
function admin_l10n( $l10n ) {
// merge in new strings
$l10n = array_merge($l10n, array(
'move_to_trash' => __("Move to trash. Are you sure?",'acf'),
'checked' => __("checked",'acf'),
'no_fields' => __("No toggle fields available",'acf'),
'title_is_required' => __("Field group title is required",'acf'),
'copy' => __("copy",'acf'),
'or' => __("or",'acf'),
'fields' => __("Fields",'acf'),
'parent_fields' => __("Parent fields",'acf'),
'sibling_fields' => __("Sibling fields",'acf'),
'move_field' => __("Move Custom Field",'acf'),
'move_field_warning' => __("This field cannot be moved until its changes have been saved",'acf'),
'null' => __("Null",'acf'),
'unload' => __('The changes you made will be lost if you navigate away from this page','acf'),
'field_name_start' => __('The string "field_" may not be used at the start of a field name','acf'),
));
// 3rd party hook
$l10n = apply_filters('acf/field_group/admin_l10n', $l10n);
// return
return $l10n;
}
/*
* admin_footer
*
@ -208,56 +314,29 @@ class acf_admin_field_group {
function admin_footer() {
// global
global $post;
// vars
$l10n = apply_filters('acf/field_group/admin_l10n', array(
'move_to_trash' => __("Move to trash. Are you sure?",'acf'),
'checked' => __("checked",'acf'),
'no_fields' => __("No toggle fields available",'acf'),
'title_is_required' => __("Field group title is required",'acf'),
'copy' => __("copy",'acf'),
'or' => __("or",'acf'),
'fields' => __("Fields",'acf'),
'parent_fields' => __("Parent fields",'acf'),
'sibling_fields' => __("Sibling fields",'acf'),
'move_field' => __("Move Custom Field",'acf'),
'move_field_warning' => __("This field cannot be moved until its changes have been saved",'acf'),
'null' => __("Null",'acf'),
'unload' => __('The changes you made will be lost if you navigate away from this page','acf'),
'field_name_start' => __('The string "field_" may not be used at the start of a field name','acf'),
));
$o = array(
'post_id' => $post->ID,
'nonce' => wp_create_nonce( 'acf_nonce' ),
'admin_url' => admin_url(),
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'validation' => 0,
);
?>
<script type="text/javascript">
acf = acf || {};
acf.o = <?php echo json_encode($o); ?>;
acf.l10n = <?php echo json_encode($l10n); ?>;
<?php do_action('acf/field_group/admin_footer_js'); ?>
</script>
<?php
// action
// 3rd party hook
do_action('acf/field_group/admin_footer');
}
?>
<script type="text/javascript">
acf.do_action('prepare');
</script>
<?php
/*
* admin_footer_js
*
* description
*
* @type function
* @date 31/05/2016
* @since 5.3.8
*
* @param $post_id (int)
* @return $post_id (int)
*/
function admin_footer_js() {
// 3rd party hook
do_action('acf/field_group/admin_footer_js');
}
@ -337,31 +416,6 @@ class acf_admin_field_group {
}
/*
* edit_form_after_title
*
* This action will allow ACF to render metaboxes after the title
*
* @type action
* @date 17/08/13
*
* @param n/a
* @return n/a
*/
function edit_form_after_title() {
?>
<div id="acf-form-data" class="acf-hidden">
<input type="hidden" name="_acfnonce" value="<?php echo wp_create_nonce( 'field_group' ); ?>" />
<input type="hidden" name="_acf_delete_fields" value="0" id="input-delete-fields" />
<?php do_action('acf/field_group/form_data'); ?>
</div>
<?php
}
/*
* save_post
*

View File

@ -526,7 +526,6 @@ class acf_admin_field_groups {
'acf-fg-description' => __('Description', 'acf'),
'acf-fg-status' => '<i class="acf-icon -dot-3 small acf-js-tooltip" title="' . __('Status', 'acf') . '"></i>',
'acf-fg-count' => __('Fields', 'acf'),
);
}
@ -709,6 +708,11 @@ class acf_admin_field_groups {
var status = $('.acf-icon.-dot-3').first().attr('title');
$('td.column-acf-fg-status').attr('data-colname', status);
// no field groups found
$('#the-list tr.no-items td').attr('colspan', 4);
})(jQuery);
</script>
<?php

View File

@ -43,11 +43,7 @@ class acf_settings_tools {
function admin_menu() {
// bail early if no show_admin
if( !acf_get_setting('show_admin') ) {
return;
}
if( !acf_get_setting('show_admin') ) return;
// add page
@ -239,104 +235,119 @@ class acf_settings_tools {
// vars
$added = array();
$ignored = array();
$ref = array();
$order = array();
$ids = array();
$keys = array();
$imported = array();
// populate keys
foreach( $json as $field_group ) {
// check if field group exists
if( acf_get_field_group($field_group['key'], true) ) {
// append to ignored
$ignored[] = $field_group['title'];
continue;
// append key
$keys[] = $field_group['key'];
}
// remove fields
$fields = acf_extract_var($field_group, 'fields');
// look for existing ids
foreach( $keys as $key ) {
// attempt find ID
$field_group = _acf_get_field_group_by_key( $key );
// format fields
$fields = acf_prepare_fields_for_import( $fields );
// bail early if no field group
if( !$field_group ) continue;
// save field group
$field_group = acf_update_field_group( $field_group );
// add to ref
$ref[ $field_group['key'] ] = $field_group['ID'];
// add to order
$order[ $field_group['ID'] ] = 0;
// add fields
foreach( $fields as $field ) {
// add parent
if( empty($field['parent']) ) {
$field['parent'] = $field_group['ID'];
} elseif( isset($ref[ $field['parent'] ]) ) {
$field['parent'] = $ref[ $field['parent'] ];
// append
$ids[ $key ] = $field_group['ID'];
}
// add field menu_order
if( !isset($order[ $field['parent'] ]) ) {
// enable local
acf_enable_local();
$order[ $field['parent'] ] = 0;
// reset local (JSON class has already included .json field groups which may conflict)
acf_reset_local();
// add local field groups
foreach( $json as $field_group ) {
// add field group
acf_add_local_field_group( $field_group );
}
$field['menu_order'] = $order[ $field['parent'] ];
$order[ $field['parent'] ]++;
// loop over keys
foreach( $keys as $key ) {
// vars
$field_group = acf_get_local_field_group( $key );
// save field
$field = acf_update_field( $field );
// attempt get id
$id = acf_maybe_get( $ids, $key );
if( $id ) {
// add to ref
$ref[ $field['key'] ] = $field['ID'];
$field_group['ID'] = $id;
}
// append to added
$added[] = '<a href="' . admin_url("post.php?post={$field_group['ID']}&action=edit") . '" target="_blank">' . $field_group['title'] . '</a>';
// append fields
if( acf_have_local_fields($key) ) {
$field_group['fields'] = acf_get_local_fields( $key );
}
// import
$field_group = acf_import_field_group( $field_group );
// append message
$imported[] = array(
'ID' => $field_group['ID'],
'title' => $field_group['title'],
'updated' => $id ? 1 : 0
);
}
// messages
if( !empty($added) ) {
if( !empty($imported) ) {
$message = __('<b>Success</b>. Import tool added %s field groups: %s', 'acf');
$message = sprintf( $message, count($added), implode(', ', $added) );
// vars
$links = array();
$count = count($imported);
$message = sprintf(_n( 'Imported 1 field group', 'Imported %s field groups', $count, 'acf' ), $count) . '.';
// populate links
foreach( $imported as $import ) {
$links[] = '<a href="' . admin_url("post.php?post={$import['ID']}&action=edit") . '" target="_blank">' . $import['title'] . '</a>';
}
// append links
$message .= ' ' . implode(', ', $links);
// add notice
acf_add_admin_notice( $message );
}
if( !empty($ignored) ) {
$message = __('<b>Warning</b>. Import tool detected %s field groups already exist and have been ignored: %s', 'acf');
$message = sprintf( $message, count($ignored), implode(', ', $ignored) );
acf_add_admin_notice( $message, 'error' );
}
}

242
admin/update-network.php Normal file
View File

@ -0,0 +1,242 @@
<?php
/*
* ACF Admin Update Network Class
*
* All the logic for updates
*
* @class acf_admin_update
* @package ACF
* @subpackage Admin
*/
if( ! class_exists('acf_admin_update_network') ) :
class acf_admin_update_network {
/*
* __construct
*
* A good place to add actions / filters
*
* @type function
* @date 11/08/13
*
* @param n/a
* @return n/a
*/
function __construct() {
// actions
add_action('network_admin_menu', array($this,'network_admin_menu'), 20);
}
/*
* network_admin_menu
*
* This function will chck for available updates and add actions if needed
*
* @type function
* @date 2/04/2015
* @since 5.1.5
*
* @param n/a
* @return n/a
*/
function network_admin_menu() {
// vars
$prompt = false;
// loop through sites and find updates
$sites = wp_get_sites();
if( $sites ) {
foreach( $sites as $site ) {
// switch blog
switch_to_blog( $site['blog_id'] );
// get site updates
$updates = acf_get_updates();
// restore
restore_current_blog();
if( $updates ) {
$prompt = true;
break;
}
}
}
// bail if no prompt
if( !$prompt ) return;
// actions
add_action('network_admin_notices', array($this, 'network_admin_notices'), 1);
// add page
$page = add_submenu_page('index.php', __('Upgrade Database','acf'), __('Upgrade Database','acf'), acf_get_setting('capability'), 'acf-upgrade', array($this,'network_html'));
// actions
add_action('load-' . $page, array($this,'network_load'));
}
/*
* load
*
* This function will look at the $_POST data and run any functions if needed
*
* @type function
* @date 7/01/2014
* @since 5.0.0
*
* @param n/a
* @return n/a
*/
function network_load() {
// hide notice on this page
remove_action('network_admin_notices', array($this, 'network_admin_notices'), 1);
// load acf scripts
acf_enqueue_scripts();
}
/*
* network_admin_notices
*
* This function will render the update notice
*
* @type function
* @date 2/04/2015
* @since 5.1.5
*
* @param n/a
* @return n/a
*/
function network_admin_notices() {
// view
$view = array(
'button_text' => __("Review sites & upgrade", 'acf'),
'button_url' => network_admin_url('index.php?page=acf-upgrade'),
'confirm' => false
);
// load view
acf_get_view('update-notice', $view);
}
/*
* network_html
*
* This function will render the HTML for the network upgrade page
*
* @type function
* @date 19/02/2014
* @since 5.0.0
*
* @param n/a
* @return n/a
*/
function network_html() {
// vars
$plugin_version = acf_get_setting('version');
// loop through sites and find updates
$sites = wp_get_sites();
if( $sites ) {
foreach( $sites as $i => $site ) {
// switch blog
switch_to_blog( $site['blog_id'] );
// extra info
$site['name'] = get_bloginfo('name');
$site['url'] = home_url();
// get site updates
$site['updates'] = acf_get_updates();
// get site version
$site['acf_version'] = get_option('acf_version');
// no value equals new instal
if( !$site['acf_version'] ) {
$site['acf_version'] = $plugin_version;
}
// update
$sites[ $i ] = $site;
// restore
restore_current_blog();
}
}
// view
$view = array(
'sites' => $sites,
'plugin_version' => $plugin_version
);
// load view
acf_get_view('update-network', $view);
}
}
// initialize
new acf_admin_update_network();
endif;
?>

View File

@ -30,7 +30,6 @@ class acf_admin_update {
// actions
add_action('admin_menu', array($this,'admin_menu'), 20);
add_action('network_admin_menu', array($this,'network_admin_menu'), 20);
// ajax
@ -39,218 +38,6 @@ class acf_admin_update {
}
/*
* network_admin_menu
*
* This function will chck for available updates and add actions if needed
*
* @type function
* @date 2/04/2015
* @since 5.1.5
*
* @param n/a
* @return n/a
*/
function network_admin_menu() {
// bail early if no show_admin
if( !acf_get_setting('show_admin') ) {
return;
}
// vars
$prompt = false;
// loop through sites and find updates
$sites = wp_get_sites();
if( $sites ) {
foreach( $sites as $site ) {
// switch blog
switch_to_blog( $site['blog_id'] );
// get site updates
$updates = acf_get_updates();
// restore
restore_current_blog();
if( $updates ) {
$prompt = true;
break;
}
}
}
// bail if no prompt
if( !$prompt ) {
return;
}
// actions
add_action('network_admin_notices', array($this, 'network_admin_notices'), 1);
// add page
$page = add_submenu_page('update-core.php', __('Upgrade ACF','acf'), __('Upgrade ACF','acf'), acf_get_setting('capability'),'acf-upgrade', array($this,'network_html'));
// actions
add_action('load-' . $page, array($this,'network_load'));
}
/*
* load
*
* This function will look at the $_POST data and run any functions if needed
*
* @type function
* @date 7/01/2014
* @since 5.0.0
*
* @param n/a
* @return n/a
*/
function network_load() {
// hide upgrade
remove_action('network_admin_notices', array($this, 'network_admin_notices'), 1);
// load acf scripts
acf_enqueue_scripts();
}
/*
* network_admin_notices
*
* This function will render the update notice
*
* @type function
* @date 2/04/2015
* @since 5.1.5
*
* @param n/a
* @return n/a
*/
function network_admin_notices() {
// view
$view = array(
'button_text' => __("Review sites & upgrade", 'acf'),
'button_url' => network_admin_url('update-core.php?page=acf-upgrade'),
'confirm' => false
);
// load view
acf_get_view('update-notice', $view);
}
/*
* network_html
*
* This function will render the HTML for the network upgrade page
*
* @type function
* @date 19/02/2014
* @since 5.0.0
*
* @param n/a
* @return n/a
*/
function network_html() {
// vars
$plugin_version = acf_get_setting('version');
// loop through sites and find updates
$sites = wp_get_sites();
if( $sites ) {
foreach( $sites as $i => $site ) {
// switch blog
switch_to_blog( $site['blog_id'] );
// extra info
$site['name'] = get_bloginfo('name');
$site['url'] = home_url();
// get site updates
$site['updates'] = acf_get_updates();
// get site version
$site['acf_version'] = get_option('acf_version');
// no value equals new instal
if( !$site['acf_version'] ) {
$site['acf_version'] = $plugin_version;
}
// update
$sites[ $i ] = $site;
// restore
restore_current_blog();
}
}
// view
$view = array(
'sites' => $sites,
'plugin_version' => $plugin_version
);
// load view
acf_get_view('update-network', $view);
}
/*
* admin_menu
*
@ -314,7 +101,7 @@ class acf_admin_update {
// add page
$page = add_submenu_page('edit.php?post_type=acf-field-group', __('Upgrade','acf'), __('Upgrade','acf'), acf_get_setting('capability'),'acf-upgrade', array($this,'html') );
$page = add_submenu_page('edit.php?post_type=acf-field-group', __('Upgrade Database','acf'), __('Upgrade Database','acf'), acf_get_setting('capability'), 'acf-upgrade', array($this,'html') );
// actions

View File

@ -1,5 +1,10 @@
<?php
// vars
$button = __('Upgrade Sites');
// extract
extract($args);
?>
@ -7,15 +12,15 @@ extract($args);
<h1><?php _e("Advanced Custom Fields Database Upgrade",'acf'); ?></h1>
<p><?php _e("The following sites require a DB upgrade. Check the ones you want to update and then click “Upgrade Database”.",'acf'); ?></p>
<p><?php echo sprintf( __("The following sites require a DB upgrade. Check the ones you want to update and then click %s.", 'acf'), '"' . $button . '"'); ?></p>
<p><input type="submit" name="upgrade" value="Update Sites" class="button" id="upgrade-sites"></p>
<p><input type="submit" name="upgrade" value="<?php echo $button; ?>" class="button" id="upgrade-sites"></p>
<table class="wp-list-table widefat">
<thead>
<tr>
<th class="manage-column check-column" scope="col"><input type="checkbox" id="sites-select-all"></th>
<td class="manage-column check-column" scope="col"><input type="checkbox" id="sites-select-all"></td>
<th class="manage-column" scope="col" style="width:33%;"><label for="sites-select-all"><?php _e("Site", 'acf'); ?></label></th>
<th><?php _e("Description", 'acf'); ?></th>
</tr>
@ -23,7 +28,7 @@ extract($args);
<tfoot>
<tr>
<th class="manage-column check-column" scope="col"><input type="checkbox" id="sites-select-all-2"></th>
<td class="manage-column check-column" scope="col"><input type="checkbox" id="sites-select-all-2"></td>
<th class="manage-column" scope="col"><label for="sites-select-all-2"><?php _e("Site", 'acf'); ?></label></th>
<th><?php _e("Description", 'acf'); ?></th>
</tr>
@ -57,7 +62,7 @@ extract($args);
</table>
<p><input type="submit" name="upgrade" value="Update Sites" class="button" id="upgrade-sites-2"></p>
<p><input type="submit" name="upgrade" value="<?php echo $button; ?>" class="button" id="upgrade-sites-2"></p>
<p class="show-on-complete"><?php _e('Database Upgrade complete', 'acf'); ?>. <a href="<?php echo network_admin_url(); ?>"><?php _e("Return to network dashboard",'acf'); ?></a>.</p>

View File

@ -1739,22 +1739,22 @@ function acf_prepare_fields_for_import( $fields = false ) {
$field = acf_prepare_field_for_import( $fields[ $i ] );
// $field may be an array of multiple fields (including sub fields)
if( !isset($field['key']) ) {
// ensure $field is an array of fields
// this allows for multiepl sub fields to be returned
if( !isset($field[0]) ) {
$extra = $field;
$field = array_shift($extra);
$fields = array_merge($fields, $extra);
$field = array( $field );
}
// prepare
$fields[ $i ] = $field;
// merge in $field (1 or more fields)
array_splice($fields, $i, 1, $field);
// $i
$i++;
}
@ -1899,4 +1899,38 @@ function acf_get_sub_field( $selector, $field ) {
}
/*
* acf_get_field_ancestors
*
* This function will return an array of all ancestor fields
*
* @type function
* @date 22/06/2016
* @since 5.3.8
*
* @param $field (array)
* @return (array)
*/
function acf_get_field_ancestors( $field ) {
// get field
$ancestors = array();
// loop
while( $field && acf_is_field_key($field['parent']) ) {
$ancestors[] = $field['parent'];
$field = acf_get_field($field['parent']);
}
// return
return $ancestors;
}
?>

View File

@ -1739,14 +1739,17 @@ function _acf_orderby_post_type( $ordeby, $wp_query ) {
}
function acf_get_post_title( $post = 0 ) {
// load post if given an ID
if( is_numeric($post) ) {
function acf_get_post_title( $post = 0, $is_search = false ) {
// vars
$post = get_post($post);
$title = '';
$prepend = '';
$append = '';
}
// bail early if no post
if( !$post ) return '';
// title
@ -1762,11 +1765,20 @@ function acf_get_post_title( $post = 0 ) {
// ancestors
if( $post->post_type != 'attachment' ) {
if( $post->post_type !== 'attachment' ) {
// get ancestors
$ancestors = get_ancestors( $post->ID, $post->post_type );
$parent_id = acf_maybe_get( $ancestors, 0 );
$prepend = str_repeat('- ', count($ancestors));
$title = str_repeat('- ', count($ancestors)) . $title;
// add parent
if( $is_search && $parent_id ) {
$append .= ' (Parent page: ' . get_the_title( $parent_id ) . ')';
}
}
@ -1774,17 +1786,92 @@ function acf_get_post_title( $post = 0 ) {
// status
if( get_post_status( $post->ID ) != "publish" ) {
$title .= ' (' . get_post_status( $post->ID ) . ')';
$append .= ' (' . get_post_status( $post->ID ) . ')';
}
// merge
$title = $prepend . $title . $append;
// return
return $title;
}
/*
function acf_get_post_title( $post = 0, $is_search = false ) {
// vars
$post = get_post($post);
$title = '';
$prepend = '';
$append = '';
// bail early if no post
if( !$post ) return '';
// title
$title = get_the_title( $post->ID );
// empty
if( $title === '' ) {
$title = __('(no title)', 'acf');
}
// ancestors
if( $post->post_type !== 'attachment' ) {
// get ancestors
$ancestors = get_ancestors( $post->ID, $post->post_type );
$parent_id = acf_maybe_get( $ancestors, 0 );
// add parent
if( $is_search && !empty($ancestors) ) {
foreach( $ancestors as $post_id ) {
$prepend = get_the_title( $post_id ) . ' / ' . $prepend;
}
} else {
$prepend = str_repeat('- ', count($ancestors));
}
}
// status
if( get_post_status( $post->ID ) != "publish" ) {
$append .= ' (' . get_post_status( $post->ID ) . ')';
}
// merge
$title = $prepend . $title . $append;
// return
return $title;
}
*/
function acf_order_by_search( $array, $search ) {
// vars
@ -2445,18 +2532,69 @@ function acf_decode_choices( $string = '', $array_keys = false ) {
}
/*
* acf_convert_date_to_php
* acf_str_replace
*
* This fucntion converts a date format string from JS to PHP
* This function will replace an array of strings much like str_replace
* The difference is the extra logic to avoid replacing a string that has alread been replaced
* This is very useful for replacing date characters as they overlap with eachother
*
* @type function
* @date 20/06/2014
* @since 5.0.0
* @date 21/06/2016
* @since 5.3.8
*
* @param $date (string)
* @return $date (string)
* @param $post_id (int)
* @return $post_id (int)
*/
function acf_str_replace( $string, $search_replace ) {
// vars
$ignore = array();
// remove potential empty search to avoid PHP error
unset($search_replace['']);
// loop over conversions
foreach( $search_replace as $search => $replace ) {
// ignore this search, it was a previous replace
if( in_array($search, $ignore) ) continue;
// bail early if subsctring not found
if( strpos($string, $search) === false ) continue;
// replace
$string = str_replace($search, $replace, $string);
// append to ignore
$ignore[] = $replace;
}
// return
return $string;
}
/*
* date & time formats
*
* These settings contain an association of format strings from PHP => JS
*
* @type function
* @date 21/06/2016
* @since 5.3.8
*
* @param n/a
* @return n/a
*/
acf_update_setting('php_to_js_date_formats', array(
@ -2485,38 +2623,42 @@ acf_update_setting('php_to_js_date_formats', array(
));
function acf_convert_date_to_php( $date ) {
acf_update_setting('php_to_js_time_formats', array(
'a' => 'tt', // Lowercase Ante meridiem and Post meridiem am or pm
'A' => 'TT', // Uppercase Ante meridiem and Post meridiem AM or PM
'h' => 'hh', // 12-hour format of an hour with leading zeros 01 through 12
'g' => 'h', // 12-hour format of an hour without leading zeros 1 through 12
'H' => 'HH', // 24-hour format of an hour with leading zeros 00 through 23
'G' => 'H', // 24-hour format of an hour without leading zeros 0 through 23
'i' => 'mm', // Minutes with leading zeros 00 to 59
's' => 'ss', // Seconds, with leading zeros 00 through 59
));
/*
* acf_convert_date_to_php
*
* This fucntion converts a date format string from JS to PHP
*
* @type function
* @date 20/06/2014
* @since 5.0.0
*
* @param $date (string)
* @return (string)
*/
function acf_convert_date_to_php( $date = '' ) {
// vars
$ignore = array();
// conversion
$php_to_js = acf_get_setting('php_to_js_date_formats');
// loop over conversions
foreach( $php_to_js as $replace => $search ) {
// ignore this replace?
if( in_array($search, $ignore) ) {
continue;
}
// replace
$date = str_replace($search, $replace, $date);
// append to ignore
$ignore[] = $replace;
}
$js_to_php = array_flip($php_to_js);
// return
return $date;
return acf_str_replace( $date, $js_to_php );
}
@ -2529,42 +2671,69 @@ function acf_convert_date_to_php( $date ) {
* @date 20/06/2014
* @since 5.0.0
*
* @param $post_id (int)
* @return $post_id (int)
* @param $date (string)
* @return (string)
*/
function acf_convert_date_to_js( $date ) {
function acf_convert_date_to_js( $date = '' ) {
// vars
$ignore = array();
// conversion
$php_to_js = acf_get_setting('php_to_js_date_formats');
// loop over conversions
foreach( $php_to_js as $search => $replace ) {
// ignore this replace?
if( in_array($search, $ignore) ) {
continue;
// return
return acf_str_replace( $date, $php_to_js );
}
// replace
$date = str_replace($search, $replace, $date);
/*
* acf_convert_time_to_php
*
* This fucntion converts a time format string from JS to PHP
*
* @type function
* @date 20/06/2014
* @since 5.0.0
*
* @param $time (string)
* @return (string)
*/
function acf_convert_time_to_php( $time = '' ) {
// append to ignore
$ignore[] = $replace;
}
// vars
$php_to_js = acf_get_setting('php_to_js_time_formats');
$js_to_php = array_flip($php_to_js);
// return
return $date;
return acf_str_replace( $time, $js_to_php );
}
/*
* acf_convert_time_to_js
*
* This fucntion converts a date format string from PHP to JS
*
* @type function
* @date 20/06/2014
* @since 5.0.0
*
* @param $time (string)
* @return (string)
*/
function acf_convert_time_to_js( $time = '' ) {
// vars
$php_to_js = acf_get_setting('php_to_js_time_formats');
// return
return acf_str_replace( $time, $php_to_js );
}
@ -2674,14 +2843,10 @@ function acf_get_user_setting( $name = '', $default = false ) {
* @return $post_id (int)
*/
function acf_in_array( $value, $array ) {
function acf_in_array( $value = '', $array = false ) {
// bail early if not array
if( !is_array($array) ) {
return false;
}
if( !is_array($array) ) return false;
// find value in array
@ -3971,18 +4136,116 @@ function acf_get_post_thumbnail( $post = null, $size = 'thumbnail' ) {
/*
* Hacks
* acf_get_browser
*
* description
* This functino will return the browser string for major browsers
*
* @type function
* @date 17/01/2014
* @since 5.0.0
*
* @param $post_id (int)
* @return $post_id (int)
* @param n/a
* @return (string)
*/
function acf_get_browser() {
// vars
$agent = $_SERVER['HTTP_USER_AGENT'];
// browsers
$browsers = array(
'Firefox' => 'firefox',
'Trident' => 'msie',
'MSIE' => 'msie',
'Edge' => 'edge',
'Chrome' => 'chrome',
'Safari' => 'safari',
);
// loop
foreach( $browsers as $k => $v ) {
if( strpos($agent, $k) !== false ) return $v;
}
// return
return '';
}
/*
* acf_is_ajax
*
* This function will reutrn true if performing a wp ajax call
*
* @type function
* @date 7/06/2016
* @since 5.3.8
*
* @param n/a
* @return (boolean)
*/
function acf_is_ajax() {
return ( defined('DOING_AJAX') && DOING_AJAX );
}
/*
* acf_format_date
*
* This function will accept a date value and return it in a formatted string
*
* @type function
* @date 16/06/2016
* @since 5.3.8
*
* @param $value (string)
* @return $format (string)
*/
function acf_format_date( $value, $format ) {
// bail early if no value
if( empty($value) ) return $value;
// attempt strtotime for standard date value
$unixtimestamp = strtotime($value);
// allow for timestamp value
if( !$unixtimestamp && is_numeric($value) ) {
$unixtimestamp = $value;
}
// bail early if timestamp error
if( !$unixtimestamp ) return $value;
// translate
$value = date_i18n($format, $unixtimestamp);
// return
return $value;
}
add_filter("acf/settings/slug", '_acf_settings_slug');
function _acf_settings_slug( $v ) {

View File

@ -361,7 +361,16 @@ function get_field_objects( $post_id = false, $format_value = true, $load_value
function have_rows( $selector, $post_id = false ) {
// reference
$_post_id = $post_id;
// filter post_id
$post_id = acf_get_valid_post_id( $post_id );
// vars
$key = "selector={$selector}/post_id={$post_id}";
$active_loop = acf_get_loop('active');
$previous_loop = acf_get_loop('previous');
$new_parent_loop = false;
@ -371,21 +380,14 @@ function have_rows( $selector, $post_id = false ) {
$change = false;
// reference
$_post_id = $post_id;
// filter post_id
$post_id = acf_get_valid_post_id( $post_id );
// empty?
// no active loops
if( !$active_loop ) {
// create a new loop
$new_parent_loop = true;
} else {
// loop has changed
} elseif( $active_loop['key'] != $key ) {
// detect change
if( $post_id != $active_loop['post_id'] ) {
@ -396,12 +398,14 @@ function have_rows( $selector, $post_id = false ) {
$change = 'selector';
} else {
// key has changed due to a technicallity, however, the post_id and selector are the same
}
// attempt to find sub field
if( $change ) {
$sub_field = acf_get_sub_field($selector, $active_loop['field']);
if( $sub_field ) {
@ -410,8 +414,6 @@ function have_rows( $selector, $post_id = false ) {
}
}
// If post_id has changed, this is most likely an archive loop
if( $change == 'post_id' ) {
@ -460,6 +462,11 @@ function have_rows( $selector, $post_id = false ) {
}
// loop is the same
} else {
// do nothing
}
@ -479,6 +486,7 @@ function have_rows( $selector, $post_id = false ) {
'field' => $field,
'i' => -1,
'post_id' => $post_id,
'key' => $key
));
// add child loop
@ -486,6 +494,7 @@ function have_rows( $selector, $post_id = false ) {
// vars
$value = $active_loop['value'][ $active_loop['i'] ][ $sub_field['key'] ];
$post_id = $active_loop['post_id'];
// add loop
@ -496,6 +505,7 @@ function have_rows( $selector, $post_id = false ) {
'field' => $sub_field,
'i' => -1,
'post_id' => $post_id,
'key' => $key
));
}
@ -566,7 +576,12 @@ function get_row( $format = false ) {
// get value
$value = $loop['value'][ $loop['i'] ];
$value = acf_maybe_get( $loop['value'], $loop['i'] );
// bail early if no current value
// possible if get_row_layout() is called before the_row()
if( !$value ) return false;
// format
@ -602,6 +617,12 @@ function get_row_index() {
}
function the_row_index() {
echo get_row_index();
}
/*
* get_row_sub_field

View File

@ -430,6 +430,7 @@ function acf_update_value( $value = null, $post_id = 0, $field ) {
// clear cache
wp_cache_delete( "load_value/post_id={$post_id}/name={$field['name']}", 'acf' );
wp_cache_delete( "format_value/post_id={$post_id}/name={$field['name']}", 'acf' );
// return
@ -471,6 +472,7 @@ function acf_delete_value( $post_id = 0, $field ) {
// clear cache
wp_cache_delete( "load_value/post_id={$post_id}/name={$field['name']}", 'acf' );
wp_cache_delete( "format_value/post_id={$post_id}/name={$field['name']}", 'acf' );
// return

View File

@ -704,7 +704,6 @@ a.acf-icon.-cancel.grey:hover {
*
*---------------------------------------------------------------------------------------------*/
/* Menu */
#adminmenu a[href="edit.php?post_type=acf-field-group&page=acf-upgrade"],
#adminmenu a[href="edit.php?post_type=acf-field-group&page=acf-settings-info"] {
display: none;
}
@ -734,9 +733,6 @@ a.acf-icon.-cancel.grey:hover {
#acf-field-group-wrap .tablenav.bottom {
display: block;
}
#acf-field-group-wrap .wp-list-table {
border-radius: 0;
}
#acf-field-group-wrap .acf-description {
font-weight: normal;
font-size: 13px;
@ -1082,6 +1078,41 @@ html[dir="rtl"] #acf-popup .title .acf-icon {
}
/*--------------------------------------------------------------------------------------------
*
* Plugins
*
*--------------------------------------------------------------------------------------------*/
.acf-plugin-upgrade-notice {
font-weight: normal;
color: #fff;
background: #d54d21;
padding: 1em;
margin: 9px 0;
}
.acf-plugin-upgrade-notice:before {
content: "\f348";
display: inline-block;
font: 400 18px/1 dashicons;
speak: none;
margin: 0 8px 0 -2px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
vertical-align: top;
}
.acf-plugin-upgrade-notice h4 {
display: none;
}
.acf-plugin-upgrade-notice ul,
.acf-plugin-upgrade-notice li {
display: inline;
color: inherit;
list-style: none;
}
.acf-plugin-upgrade-notice li:after {
content: '. ';
display: inline;
}
/*--------------------------------------------------------------------------------------------
*
* RTL
*
*--------------------------------------------------------------------------------------------*/

View File

@ -343,11 +343,10 @@ html[dir="rtl"] .acf-c0 {
-moz-box-sizing: border-box;
box-sizing: border-box;
font-size: 14px;
line-height: 15px;
line-height: 1.4;
}
.acf-field textarea {
resize: vertical;
line-height: 1.4em;
}
/*---------------------------------------------------------------------------------------------
*
@ -1407,6 +1406,23 @@ html[dir="rtl"] .acf-file-uploader .file-info ul {
.acf-ui-datepicker .ui-datepicker {
z-index: 999999999 !important;
}
.acf-ui-datepicker .ui-datepicker .ui-widget-header a {
cursor: pointer;
transition: none;
}
/* fix highlight state overriding hover / active */
.acf-ui-datepicker .ui-state-highlight.ui-state-hover {
border: 1px solid #98b7e8 !important;
background: #98b7e8 !important;
font-weight: normal !important;
color: #ffffff !important;
}
.acf-ui-datepicker .ui-state-highlight.ui-state-active {
border: 1px solid #3875d7 !important;
background: #3875d7 !important;
font-weight: normal !important;
color: #ffffff !important;
}
/*---------------------------------------------------------------------------------------------
*
* Taxonomy
@ -1766,7 +1782,7 @@ html[dir="rtl"] .acf-taxonomy-field[data-type="select"] .acf-icon {
.acf-media-modal.-edit .media-frame-content {
top: 56px;
}
body.acf-wp-4 .acf-media-modal.-edit .media-frame-content {
body.major-4 .acf-media-modal.-edit .media-frame-content {
top: 50px;
}
.acf-media-modal.-edit .media-frame-title {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
/*! jQuery UI - v1.10.4 - 2014-02-04
/*! jQuery UI - v1.11.4 - 2016-05-31
* http://jqueryui.com
* Includes: jquery.ui.core.css, jquery.ui.datepicker.css, jquery.ui.theme.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=%22Open%20Sans%22%2C%E2%80%8B%20sans-serif&fwDefault=normal&fsDefault=13px&cornerRadius=0&bgColorHeader=%23ffffff&bgTextureHeader=highlight_soft&bgImgOpacityHeader=0&borderColorHeader=%23ffffff&fcHeader=%23222222&iconColorHeader=%23DDDDDD&bgColorContent=%23ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=%23E1E1E1&fcContent=%23222222&iconColorContent=%23222222&bgColorDefault=%23F9F9F9&bgTextureDefault=flat&bgImgOpacityDefault=0&borderColorDefault=%23F0F0F0&fcDefault=%23444444&iconColorDefault=%23444444&bgColorHover=%23F0F0F0&bgTextureHover=flat&bgImgOpacityHover=0&borderColorHover=%23E1E1E1&fcHover=%23444444&iconColorHover=%232EA2CC&bgColorActive=%232EA2CC&bgTextureActive=flat&bgImgOpacityActive=0&borderColorActive=%230074A2&fcActive=%23ffffff&iconColorActive=%23ffffff&bgColorHighlight=%23ffffff&bgTextureHighlight=flat&bgImgOpacityHighlight=0&borderColorHighlight=%23aaaaaa&fcHighlight=%23444444&iconColorHighlight=%23444444&bgColorError=%23E14D43&bgTextureError=flat&bgImgOpacityError=0&borderColorError=%23D02A21&fcError=%23ffffff&iconColorError=%23ffffff&bgColorOverlay=%23aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=%23aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
* Includes: core.css, datepicker.css, theme.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=%22Open%20Sans%22%2C%E2%80%8B%20sans-serif&fsDefault=14px&fwDefault=normal&cornerRadius=3&bgColorHeader=%23ffffff&bgTextureHeader=highlight_soft&borderColorHeader=%23ffffff&fcHeader=%23222222&iconColorHeader=%23DDDDDD&bgColorContent=%23ffffff&bgTextureContent=flat&borderColorContent=%23E1E1E1&fcContent=%23444444&iconColorContent=%23444444&bgColorDefault=%23F9F9F9&bgTextureDefault=flat&borderColorDefault=%23F0F0F0&fcDefault=%23444444&iconColorDefault=%23444444&bgColorHover=%2398b7e8&bgTextureHover=flat&borderColorHover=%2398b7e8&fcHover=%23ffffff&iconColorHover=%23ffffff&bgColorActive=%233875d7&bgTextureActive=flat&borderColorActive=%233875d7&fcActive=%23ffffff&iconColorActive=%23ffffff&bgColorHighlight=%23ffffff&bgTextureHighlight=flat&borderColorHighlight=%23aaaaaa&fcHighlight=%23444444&iconColorHighlight=%23444444&bgColorError=%23E14D43&bgTextureError=flat&borderColorError=%23E14D43&fcError=%23ffffff&iconColorError=%23ffffff&bgColorOverlay=%23ffffff&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=%23aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px&bgImgOpacityHeader=0&bgImgOpacityContent=&bgImgOpacityDefault=0&bgImgOpacityHover=0&bgImgOpacityActive=0&bgImgOpacityHighlight=0&bgImgOpacityError=0
* Copyright jQuery Foundation and other contributors; Licensed MIT */
/* Layout helpers
----------------------------------*/
@ -48,7 +48,7 @@
left: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0);
filter:Alpha(Opacity=0); /* support: IE8 */
}
.ui-front {
@ -138,7 +138,7 @@
}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
width: 49%;
width: 45%;
}
.ui-datepicker table {
width: 100%;
@ -256,7 +256,7 @@
----------------------------------*/
.acf-ui-datepicker .ui-widget {
font-family: "Open Sans", sans-serif;
font-size: 13px;
font-size: 14px;
}
.acf-ui-datepicker .ui-widget .ui-widget {
font-size: 1em;
@ -270,15 +270,15 @@
}
.acf-ui-datepicker .ui-widget-content {
border: 1px solid #E1E1E1;
background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
color: #222222;
background: #ffffff;
color: #444444;
}
.acf-ui-datepicker .ui-widget-content a {
color: #222222;
color: #444444;
}
.acf-ui-datepicker .ui-widget-header {
border: 1px solid #ffffff;
background: #ffffff url(images/ui-bg_highlight-soft_0_ffffff_1x100.png) 50% 50% repeat-x;
background: #ffffff url("images/ui-bg_highlight-soft_0_ffffff_1x100.png") 50% 50% repeat-x;
color: #222222;
font-weight: bold;
}
@ -292,7 +292,7 @@
.acf-ui-datepicker .ui-widget-content .ui-state-default,
.acf-ui-datepicker .ui-widget-header .ui-state-default {
border: 1px solid #F0F0F0;
background: #F9F9F9 url(images/ui-bg_flat_0_F9F9F9_40x100.png) 50% 50% repeat-x;
background: #F9F9F9;
font-weight: normal;
color: #444444;
}
@ -308,10 +308,10 @@
.acf-ui-datepicker .ui-state-focus,
.acf-ui-datepicker .ui-widget-content .ui-state-focus,
.acf-ui-datepicker .ui-widget-header .ui-state-focus {
border: 1px solid #E1E1E1;
background: #F0F0F0 url(images/ui-bg_flat_0_F0F0F0_40x100.png) 50% 50% repeat-x;
border: 1px solid #98b7e8;
background: #98b7e8;
font-weight: normal;
color: #444444;
color: #ffffff;
}
.acf-ui-datepicker .ui-state-hover a,
.acf-ui-datepicker .ui-state-hover a:hover,
@ -321,14 +321,14 @@
.acf-ui-datepicker .ui-state-focus a:hover,
.acf-ui-datepicker .ui-state-focus a:link,
.acf-ui-datepicker .ui-state-focus a:visited {
color: #444444;
color: #ffffff;
text-decoration: none;
}
.acf-ui-datepicker .ui-state-active,
.acf-ui-datepicker .ui-widget-content .ui-state-active,
.acf-ui-datepicker .ui-widget-header .ui-state-active {
border: 1px solid #0074A2;
background: #2EA2CC url(images/ui-bg_flat_0_2EA2CC_40x100.png) 50% 50% repeat-x;
border: 1px solid #3875d7;
background: #3875d7;
font-weight: normal;
color: #ffffff;
}
@ -345,7 +345,7 @@
.acf-ui-datepicker .ui-widget-content .ui-state-highlight,
.acf-ui-datepicker .ui-widget-header .ui-state-highlight {
border: 1px solid #aaaaaa;
background: #ffffff url(images/ui-bg_flat_0_ffffff_40x100.png) 50% 50% repeat-x;
background: #ffffff;
color: #444444;
}
.acf-ui-datepicker .ui-state-highlight a,
@ -356,8 +356,8 @@
.acf-ui-datepicker .ui-state-error,
.acf-ui-datepicker .ui-widget-content .ui-state-error,
.acf-ui-datepicker .ui-widget-header .ui-state-error {
border: 1px solid #D02A21;
background: #E14D43 url(images/ui-bg_flat_0_E14D43_40x100.png) 50% 50% repeat-x;
border: 1px solid #E14D43;
background: #E14D43;
color: #ffffff;
}
.acf-ui-datepicker .ui-state-error a,
@ -379,18 +379,18 @@
.acf-ui-datepicker .ui-widget-content .ui-priority-secondary,
.acf-ui-datepicker .ui-widget-header .ui-priority-secondary {
opacity: .7;
filter:Alpha(Opacity=70);
filter:Alpha(Opacity=70); /* support: IE8 */
font-weight: normal;
}
.acf-ui-datepicker .ui-state-disabled,
.acf-ui-datepicker .ui-widget-content .ui-state-disabled,
.acf-ui-datepicker .ui-widget-header .ui-state-disabled {
opacity: .35;
filter:Alpha(Opacity=35);
filter:Alpha(Opacity=35); /* support: IE8 */
background-image: none;
}
.acf-ui-datepicker .ui-state-disabled .ui-icon {
filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
}
/* Icons
@ -403,27 +403,27 @@
}
.acf-ui-datepicker .ui-icon,
.acf-ui-datepicker .ui-widget-content .ui-icon {
background-image: url(images/ui-icons_222222_256x240.png);
background-image: url("images/ui-icons_444444_256x240.png");
}
.acf-ui-datepicker .ui-widget-header .ui-icon {
background-image: url(images/ui-icons_DDDDDD_256x240.png);
background-image: url("images/ui-icons_DDDDDD_256x240.png");
}
.acf-ui-datepicker .ui-state-default .ui-icon {
background-image: url(images/ui-icons_444444_256x240.png);
background-image: url("images/ui-icons_444444_256x240.png");
}
.acf-ui-datepicker .ui-state-hover .ui-icon,
.acf-ui-datepicker .ui-state-focus .ui-icon {
background-image: url(images/ui-icons_2EA2CC_256x240.png);
background-image: url("images/ui-icons_ffffff_256x240.png");
}
.acf-ui-datepicker .ui-state-active .ui-icon {
background-image: url(images/ui-icons_ffffff_256x240.png);
background-image: url("images/ui-icons_ffffff_256x240.png");
}
.acf-ui-datepicker .ui-state-highlight .ui-icon {
background-image: url(images/ui-icons_444444_256x240.png);
background-image: url("images/ui-icons_444444_256x240.png");
}
.acf-ui-datepicker .ui-state-error .ui-icon,
.acf-ui-datepicker .ui-state-error-text .ui-icon {
background-image: url(images/ui-icons_ffffff_256x240.png);
background-image: url("images/ui-icons_ffffff_256x240.png");
}
/* positioning */
@ -613,38 +613,38 @@
.acf-ui-datepicker .ui-corner-top,
.acf-ui-datepicker .ui-corner-left,
.acf-ui-datepicker .ui-corner-tl {
border-top-left-radius: 0;
border-top-left-radius: 3;
}
.acf-ui-datepicker .ui-corner-all,
.acf-ui-datepicker .ui-corner-top,
.acf-ui-datepicker .ui-corner-right,
.acf-ui-datepicker .ui-corner-tr {
border-top-right-radius: 0;
border-top-right-radius: 3;
}
.acf-ui-datepicker .ui-corner-all,
.acf-ui-datepicker .ui-corner-bottom,
.acf-ui-datepicker .ui-corner-left,
.acf-ui-datepicker .ui-corner-bl {
border-bottom-left-radius: 0;
border-bottom-left-radius: 3;
}
.acf-ui-datepicker .ui-corner-all,
.acf-ui-datepicker .ui-corner-bottom,
.acf-ui-datepicker .ui-corner-right,
.acf-ui-datepicker .ui-corner-br {
border-bottom-right-radius: 0;
border-bottom-right-radius: 3;
}
/* Overlays */
.acf-ui-datepicker .ui-widget-overlay {
background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
background: #ffffff;
opacity: .3;
filter: Alpha(Opacity=30);
filter: Alpha(Opacity=30); /* support: IE8 */
}
.acf-ui-datepicker .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;
background: #aaaaaa;
opacity: .3;
filter: Alpha(Opacity=30);
filter: Alpha(Opacity=30); /* support: IE8 */
border-radius: 8px;
}

File diff suppressed because one or more lines are too long

View File

@ -1,107 +0,0 @@
Contributing to Select2
=======================
Looking to contribute something to Select2? **Here's how you can help.**
Please take a moment to review this document in order to make the contribution
process easy and effective for everyone involved.
Following these guidelines helps to communicate that you respect the time of
the developers managing and developing this open source project. In return,
they should reciprocate that respect in addressing your issue or assessing
patches and features.
Using the issue tracker
-----------------------
When [reporting bugs][reporting-bugs] or
[requesting features][requesting-features], the
[issue tracker on GitHub][issue-tracker] is the recommended channel to use.
The issue tracker **is not** a place for support requests. The
[mailing list][mailing-list] or [IRC channel][irc-channel] are better places to
get help.
Reporting bugs with Select2
---------------------------
We really appreciate clear bug reports that _consistently_ show an issue
_within Select2_.
The ideal bug report follows these guidelines:
1. **Use the [GitHub issue search][issue-search]** &mdash; Check if the issue
has already been reported.
2. **Check if the issue has been fixed** &mdash; Try to reproduce the problem
using the code in the `master` branch.
3. **Isolate the problem** &mdash; Try to create an
[isolated test case][isolated-case] that consistently reproduces the problem.
Please try to be as detailed as possible in your bug report, especially if an
isolated test case cannot be made. Some useful questions to include the answer
to are:
- What steps can be used to reproduce the issue?
- What is the bug and what is the expected outcome?
- What browser(s) and Operating System have you tested with?
- Does the bug happen consistently across all tested browsers?
- What version of jQuery are you using? And what version of Select2?
- Are you using Select2 with other plugins?
All of these questions will help people fix and identify any potential bugs.
Requesting features in Select2
------------------------------
Select2 is a large library that carries with it a lot of functionality. Because
of this, many feature requests will not be implemented in the core library.
Before starting work on a major feature for Select2, **contact the
[community][community] first** or you may risk spending a considerable amount of
time on something which the project developers are not interested in bringing
into the project.
### Select2 4.0
Many feature requests will be closed off until 4.0, where Select2 plans to adopt
a more flexible API. If you are interested in helping with the development of
the next major Select2 release, please send a message to the
[mailing list][mailing-list] or [irc channel][irc-channel] for more information.
Triaging issues and pull requests
---------------------------------
Anyone can help the project maintainers triage issues and review pull requests.
### Handling new issues
Select2 regularly receives new issues which need to be tested and organized.
When a new issue that comes in that is similar to another existing issue, it
should be checked to make sure it is not a duplicate. Duplicates issues should
be marked by replying to the issue with "Duplicate of #[issue number]" where
`[issue number]` is the url or issue number for the existing issue. This will
allow the project maintainers to quickly close off additional issues and keep
the discussion focused within a single issue.
If you can test issues that are reported to Select2 that contain test cases and
confirm under what conditions bugs happen, that will allow others to identify
what causes a bug quicker.
### Reviewing pull requests
It is very common for pull requests to be opened for issues that contain a clear
solution to the problem. These pull requests should be rigorously reviewed by
the community before being accepted. If you are not sure about a piece of
submitted code, or know of a better way to do something, do not hesitate to make
a comment on the pull request.
It should also be made clear that **all code contributed to Select** must be
licensable under the [Apache 2 or GPL 2 licenses][licensing]. Code that cannot
be released under either of these licenses **cannot be accepted** into the
project.
[community]: https://github.com/ivaynberg/select2#community
[reporting-bugs]: #reporting-bugs-with-select2
[requesting-features]: #requesting-features-in-select2
[issue-tracker]: https://github.com/ivaynberg/select2/issues
[mailing-list]: https://github.com/ivaynberg/select2#mailing-list
[irc-channel]: https://github.com/ivaynberg/select2#irc-channel
[issue-search]: https://github.com/ivaynberg/select2/search?q=&type=Issues
[isolated-case]: http://css-tricks.com/6263-reduced-test-cases/
[licensing]: https://github.com/ivaynberg/select2#copyright-and-license

View File

@ -1,18 +0,0 @@
Copyright 2014 Igor Vaynberg
Version: @@ver@@ Timestamp: @@timestamp@@
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may choose either license to govern your
use of this software only upon the condition that you accept all of the terms of either the Apache
License or the GPL License.
You may obtain a copy of the Apache License and the GPL License at:
http://www.apache.org/licenses/LICENSE-2.0
http://www.gnu.org/licenses/gpl-2.0.html
Unless required by applicable law or agreed to in writing, software distributed under the Apache License
or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the Apache License and the GPL License for the specific language governing
permissions and limitations under the Apache License and the GPL License.

View File

@ -1,114 +0,0 @@
Select2
=======
Select2 is a jQuery-based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.
To get started, checkout examples and documentation at http://ivaynberg.github.com/select2
Use cases
---------
* Enhancing native selects with search.
* Enhancing native selects with a better multi-select interface.
* Loading data from JavaScript: easily load items via ajax and have them searchable.
* Nesting optgroups: native selects only support one level of nested. Select2 does not have this restriction.
* Tagging: ability to add new items on the fly.
* Working with large, remote datasets: ability to partially load a dataset based on the search term.
* Paging of large datasets: easy support for loading more pages when the results are scrolled to the end.
* Templating: support for custom rendering of results and selections.
Browser compatibility
---------------------
* IE 8+
* Chrome 8+
* Firefox 10+
* Safari 3+
* Opera 10.6+
Usage
-----
You can source Select2 directly from a CDN like [JSDliver](http://www.jsdelivr.com/#!select2) or [CDNJS](http://www.cdnjs.com/libraries/select2), [download it from this GitHub repo](https://github.com/ivaynberg/select2/tags), or use one of the integrations below.
Integrations
------------
* [Wicket-Select2](https://github.com/ivaynberg/wicket-select2) (Java / [Apache Wicket](http://wicket.apache.org))
* [select2-rails](https://github.com/argerim/select2-rails) (Ruby on Rails)
* [AngularUI](http://angular-ui.github.io/#ui-select) ([AngularJS](https://angularjs.org/))
* [Django](https://github.com/applegrew/django-select2)
* [Symfony](https://github.com/19Gerhard85/sfSelect2WidgetsPlugin)
* [Symfony2](https://github.com/avocode/FormExtensions)
* [Bootstrap 2](https://github.com/t0m/select2-bootstrap-css) and [Bootstrap 3](https://github.com/t0m/select2-bootstrap-css/tree/bootstrap3) (CSS skins)
* [Meteor](https://github.com/nate-strauser/meteor-select2) (modern reactive JavaScript framework; + [Bootstrap 3 skin](https://github.com/esperadomedia/meteor-select2-bootstrap3-css/))
* [Meteor](https://jquery-select2.meteor.com)
* [Yii 2.x](http://demos.krajee.com/widgets#select2)
* [Yii 1.x](https://github.com/tonybolzan/yii-select2)
* [AtmosphereJS](https://atmospherejs.com/package/jquery-select2)
### Example Integrations
* [Knockout.js](https://github.com/ivaynberg/select2/wiki/Knockout.js-Integration)
* [Socket.IO](https://github.com/ivaynberg/select2/wiki/Socket.IO-Integration)
* [PHP](https://github.com/ivaynberg/select2/wiki/PHP-Example)
* [.Net MVC] (https://github.com/ivaynberg/select2/wiki/.Net-MVC-Example)
Internationalization (i18n)
---------------------------
Select2 supports multiple languages by simply including the right language JS
file (`select2_locale_it.js`, `select2_locale_nl.js`, etc.) after `select2.js`.
Missing a language? Just copy `select2_locale_en.js.template`, translate
it, and make a pull request back to Select2 here on GitHub.
Documentation
-------------
The documentation for Select2 is available [through GitHub Pages](https://ivaynberg.github.io/select2/) and is located within this repository in the [`gh-pages` branch](https://github.com/ivaynberg/select2/tree/gh-pages).
Community
---------
### Bug tracker
Have a bug? Please create an issue here on GitHub!
https://github.com/ivaynberg/select2/issues
### Mailing list
Have a question? Ask on our mailing list!
select2@googlegroups.com
https://groups.google.com/d/forum/select2
### IRC channel
Need help implementing Select2 in your project? Ask in our IRC channel!
**Network:** [Freenode](https://freenode.net/) (`chat.freenode.net`)
**Channel:** `#select2`
**Web access:** https://webchat.freenode.net/?channels=select2
Copyright and license
---------------------
Copyright 2012 Igor Vaynberg
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may choose either license to govern your
use of this software only upon the condition that you accept all of the terms of either the Apache
License or the GPL License.
You may obtain a copy of the Apache License and the GPL License in the LICENSE file, or at:
http://www.apache.org/licenses/LICENSE-2.0
http://www.gnu.org/licenses/gpl-2.0.html
Unless required by applicable law or agreed to in writing, software distributed under the Apache License
or the GPL License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the Apache License and the GPL License for the specific language governing
permissions and limitations under the Apache License and the GPL License.

View File

@ -1,8 +0,0 @@
{
"name": "select2",
"version": "3.5.2",
"main": ["select2.js", "select2.css", "select2.png", "select2x2.png", "select2-spinner.gif"],
"dependencies": {
"jquery": ">= 1.7.1"
}
}

View File

@ -1,66 +0,0 @@
{
"name": "select2",
"repo": "ivaynberg/select2",
"description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.",
"version": "3.5.2",
"demo": "http://ivaynberg.github.io/select2/",
"keywords": [
"jquery"
],
"main": "select2.js",
"styles": [
"select2.css",
"select2-bootstrap.css"
],
"scripts": [
"select2.js",
"select2_locale_ar.js",
"select2_locale_bg.js",
"select2_locale_ca.js",
"select2_locale_cs.js",
"select2_locale_da.js",
"select2_locale_de.js",
"select2_locale_el.js",
"select2_locale_es.js",
"select2_locale_et.js",
"select2_locale_eu.js",
"select2_locale_fa.js",
"select2_locale_fi.js",
"select2_locale_fr.js",
"select2_locale_gl.js",
"select2_locale_he.js",
"select2_locale_hr.js",
"select2_locale_hu.js",
"select2_locale_id.js",
"select2_locale_is.js",
"select2_locale_it.js",
"select2_locale_ja.js",
"select2_locale_ka.js",
"select2_locale_ko.js",
"select2_locale_lt.js",
"select2_locale_lv.js",
"select2_locale_mk.js",
"select2_locale_ms.js",
"select2_locale_nl.js",
"select2_locale_no.js",
"select2_locale_pl.js",
"select2_locale_pt-BR.js",
"select2_locale_pt-PT.js",
"select2_locale_ro.js",
"select2_locale_ru.js",
"select2_locale_sk.js",
"select2_locale_sv.js",
"select2_locale_th.js",
"select2_locale_tr.js",
"select2_locale_uk.js",
"select2_locale_vi.js",
"select2_locale_zh-CN.js",
"select2_locale_zh-TW.js"
],
"images": [
"select2-spinner.gif",
"select2.png",
"select2x2.png"
],
"license": "MIT"
}

View File

@ -1,29 +0,0 @@
{
"name":
"ivaynberg/select2",
"description": "Select2 is a jQuery based replacement for select boxes.",
"version": "3.5.2",
"type": "component",
"homepage": "http://ivaynberg.github.io/select2/",
"license": "Apache-2.0",
"require": {
"robloach/component-installer": "*",
"components/jquery": ">=1.7.1"
},
"extra": {
"component": {
"scripts": [
"select2.js"
],
"files": [
"select2.js",
"select2_locale_*.js",
"select2.css",
"select2-bootstrap.css",
"select2-spinner.gif",
"select2.png",
"select2x2.png"
]
}
}
}

View File

@ -1,20 +0,0 @@
{
"name" : "Select2",
"description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.",
"homepage": "http://ivaynberg.github.io/select2",
"author": "Igor Vaynberg",
"repository": {"type": "git", "url": "git://github.com/ivaynberg/select2.git"},
"main": "select2.js",
"version": "3.5.2",
"jspm": {
"main": "select2",
"files": ["select2.js", "select2.png", "select2.css", "select2-spinner.gif"],
"shim": {
"select2": {
"imports": ["jquery", "./select2.css!"],
"exports": "$"
}
},
"buildConfig": { "uglify": true }
}
}

View File

@ -1,79 +0,0 @@
#!/bin/bash
set -e
echo -n "Enter the version for this release: "
read ver
if [ ! $ver ]; then
echo "Invalid version."
exit
fi
name="select2"
js="$name.js"
mini="$name.min.js"
css="$name.css"
release="$name-$ver"
tag="$ver"
branch="build-$ver"
curbranch=`git branch | grep "*" | sed "s/* //"`
timestamp=$(date)
tokens="s/@@ver@@/$ver/g;s/\@@timestamp@@/$timestamp/g"
remote="origin"
echo "Pulling from origin"
git pull
echo "Updating Version Identifiers"
sed -E -e "s/\"version\": \"([0-9\.]+)\",/\"version\": \"$ver\",/g" -i -- bower.json select2.jquery.json component.json composer.json package.json
git add bower.json
git add select2.jquery.json
git add component.json
git add composer.json
git add package.json
git commit -m "modified version identifiers in descriptors for release $ver"
git push
git branch "$branch"
git checkout "$branch"
echo "Tokenizing..."
find . -name "$js" | xargs -I{} sed -e "$tokens" -i -- {}
find . -name "$css" | xargs -I{} sed -e "$tokens" -i -- {}
sed -e "s/latest/$ver/g" -i -- bower.json
git add "$js"
git add "$css"
echo "Minifying..."
echo "/*" > "$mini"
cat LICENSE | sed "$tokens" >> "$mini"
echo "*/" >> "$mini"
curl -s \
--data-urlencode "js_code@$js" \
http://marijnhaverbeke.nl/uglifyjs \
>> "$mini"
git add "$mini"
git commit -m "release $ver"
echo "Tagging..."
git tag -a "$tag" -m "tagged version $ver"
git push "$remote" --tags
echo "Cleaning Up..."
git checkout "$curbranch"
git branch -D "$branch"
echo "Done"

View File

@ -1,87 +0,0 @@
.form-control .select2-choice {
border: 0;
border-radius: 2px;
}
.form-control .select2-choice .select2-arrow {
border-radius: 0 2px 2px 0;
}
.form-control.select2-container {
height: auto !important;
padding: 0;
}
.form-control.select2-container.select2-dropdown-open {
border-color: #5897FB;
border-radius: 3px 3px 0 0;
}
.form-control .select2-container.select2-dropdown-open .select2-choices {
border-radius: 3px 3px 0 0;
}
.form-control.select2-container .select2-choices {
border: 0 !important;
border-radius: 3px;
}
.control-group.warning .select2-container .select2-choice,
.control-group.warning .select2-container .select2-choices,
.control-group.warning .select2-container-active .select2-choice,
.control-group.warning .select2-container-active .select2-choices,
.control-group.warning .select2-dropdown-open.select2-drop-above .select2-choice,
.control-group.warning .select2-dropdown-open.select2-drop-above .select2-choices,
.control-group.warning .select2-container-multi.select2-container-active .select2-choices {
border: 1px solid #C09853 !important;
}
.control-group.warning .select2-container .select2-choice div {
border-left: 1px solid #C09853 !important;
background: #FCF8E3 !important;
}
.control-group.error .select2-container .select2-choice,
.control-group.error .select2-container .select2-choices,
.control-group.error .select2-container-active .select2-choice,
.control-group.error .select2-container-active .select2-choices,
.control-group.error .select2-dropdown-open.select2-drop-above .select2-choice,
.control-group.error .select2-dropdown-open.select2-drop-above .select2-choices,
.control-group.error .select2-container-multi.select2-container-active .select2-choices {
border: 1px solid #B94A48 !important;
}
.control-group.error .select2-container .select2-choice div {
border-left: 1px solid #B94A48 !important;
background: #F2DEDE !important;
}
.control-group.info .select2-container .select2-choice,
.control-group.info .select2-container .select2-choices,
.control-group.info .select2-container-active .select2-choice,
.control-group.info .select2-container-active .select2-choices,
.control-group.info .select2-dropdown-open.select2-drop-above .select2-choice,
.control-group.info .select2-dropdown-open.select2-drop-above .select2-choices,
.control-group.info .select2-container-multi.select2-container-active .select2-choices {
border: 1px solid #3A87AD !important;
}
.control-group.info .select2-container .select2-choice div {
border-left: 1px solid #3A87AD !important;
background: #D9EDF7 !important;
}
.control-group.success .select2-container .select2-choice,
.control-group.success .select2-container .select2-choices,
.control-group.success .select2-container-active .select2-choice,
.control-group.success .select2-container-active .select2-choices,
.control-group.success .select2-dropdown-open.select2-drop-above .select2-choice,
.control-group.success .select2-dropdown-open.select2-drop-above .select2-choices,
.control-group.success .select2-container-multi.select2-container-active .select2-choices {
border: 1px solid #468847 !important;
}
.control-group.success .select2-container .select2-choice div {
border-left: 1px solid #468847 !important;
background: #DFF0D8 !important;
}

View File

@ -1,36 +0,0 @@
{
"name": "select2",
"title": "Select2",
"description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.",
"keywords": [
"select",
"autocomplete",
"typeahead",
"dropdown",
"multiselect",
"tag",
"tagging"
],
"version": "3.5.2",
"author": {
"name": "Igor Vaynberg",
"url": "https://github.com/ivaynberg"
},
"licenses": [
{
"type": "Apache",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
},
{
"type": "GPL v2",
"url": "http://www.gnu.org/licenses/gpl-2.0.html"
}
],
"bugs": "https://github.com/ivaynberg/select2/issues",
"homepage": "http://ivaynberg.github.com/select2",
"docs": "http://ivaynberg.github.com/select2/",
"download": "https://github.com/ivaynberg/select2/tags",
"dependencies": {
"jquery": ">=1.7.1"
}
}

View File

@ -1,19 +0,0 @@
/**
* Select2 Arabic translation.
*
* Author: Adel KEDJOUR <adel@kedjour.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['ar'] = {
formatNoMatches: function () { return "لم يتم العثور على مطابقات"; },
formatInputTooShort: function (input, min) { var n = min - input.length; if (n == 1){ return "الرجاء إدخال حرف واحد على الأكثر"; } return n == 2 ? "الرجاء إدخال حرفين على الأكثر" : "الرجاء إدخال " + n + " على الأكثر"; },
formatInputTooLong: function (input, max) { var n = input.length - max; if (n == 1){ return "الرجاء إدخال حرف واحد على الأقل"; } return n == 2 ? "الرجاء إدخال حرفين على الأقل" : "الرجاء إدخال " + n + " على الأقل "; },
formatSelectionTooBig: function (limit) { if (limit == 1){ return "يمكنك أن تختار إختيار واحد فقط"; } return limit == 2 ? "يمكنك أن تختار إختيارين فقط" : "يمكنك أن تختار " + limit + " إختيارات فقط"; },
formatLoadMore: function (pageNumber) { return "تحميل المزيد من النتائج…"; },
formatSearching: function () { return "البحث…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['ar']);
})(jQuery);

View File

@ -1,20 +0,0 @@
/**
* Select2 Azerbaijani translation.
*
* Author: Farhad Safarov <farhad.safarov@gmail.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['az'] = {
formatMatches: function (matches) { return matches + " nəticə mövcuddur, hərəkət etdirmək üçün yuxarı və aşağı düymələrindən istifadə edin."; },
formatNoMatches: function () { return "Nəticə tapılmadı"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return n + " simvol daxil edin"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return n + " simvol silin"; },
formatSelectionTooBig: function (limit) { return "Sadəcə " + limit + " element seçə bilərsiniz"; },
formatLoadMore: function (pageNumber) { return "Daha çox nəticə yüklənir…"; },
formatSearching: function () { return "Axtarılır…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['az']);
})(jQuery);

View File

@ -1,20 +0,0 @@
/**
* Select2 Bulgarian translation.
*
* @author Lubomir Vikev <lubomirvikev@gmail.com>
* @author Uriy Efremochkin <efremochkin@uriy.me>
*/
(function ($) {
"use strict";
$.fn.select2.locales['bg'] = {
formatNoMatches: function () { return "Няма намерени съвпадения"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Моля въведете още " + n + " символ" + (n > 1 ? "а" : ""); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Моля въведете с " + n + " по-малко символ" + (n > 1 ? "а" : ""); },
formatSelectionTooBig: function (limit) { return "Можете да направите до " + limit + (limit > 1 ? " избора" : " избор"); },
formatLoadMore: function (pageNumber) { return "Зареждат се още…"; },
formatSearching: function () { return "Търсене…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['bg']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Catalan translation.
*
* Author: David Planella <david.planella@gmail.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['ca'] = {
formatNoMatches: function () { return "No s'ha trobat cap coincidència"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduïu " + n + " caràcter" + (n == 1 ? "" : "s") + " més"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Introduïu " + n + " caràcter" + (n == 1? "" : "s") + "menys"; },
formatSelectionTooBig: function (limit) { return "Només podeu seleccionar " + limit + " element" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "S'estan carregant més resultats…"; },
formatSearching: function () { return "S'està cercant…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['ca']);
})(jQuery);

View File

@ -1,51 +0,0 @@
/**
* Select2 Czech translation.
*
* Author: Michal Marek <ahoj@michal-marek.cz>
* Author - sklonovani: David Vallner <david@vallner.net>
*/
(function ($) {
"use strict";
// use text for the numbers 2 through 4
var smallNumbers = {
2: function(masc) { return (masc ? "dva" : "dvě"); },
3: function() { return "tři"; },
4: function() { return "čtyři"; }
}
$.fn.select2.locales['cs'] = {
formatNoMatches: function () { return "Nenalezeny žádné položky"; },
formatInputTooShort: function (input, min) {
var n = min - input.length;
if (n == 1) {
return "Prosím zadejte ještě jeden znak";
} else if (n <= 4) {
return "Prosím zadejte ještě další "+smallNumbers[n](true)+" znaky";
} else {
return "Prosím zadejte ještě dalších "+n+" znaků";
}
},
formatInputTooLong: function (input, max) {
var n = input.length - max;
if (n == 1) {
return "Prosím zadejte o jeden znak méně";
} else if (n <= 4) {
return "Prosím zadejte o "+smallNumbers[n](true)+" znaky méně";
} else {
return "Prosím zadejte o "+n+" znaků méně";
}
},
formatSelectionTooBig: function (limit) {
if (limit == 1) {
return "Můžete zvolit jen jednu položku";
} else if (limit <= 4) {
return "Můžete zvolit maximálně "+smallNumbers[limit](false)+" položky";
} else {
return "Můžete zvolit maximálně "+limit+" položek";
}
},
formatLoadMore: function (pageNumber) { return "Načítají se další výsledky…"; },
formatSearching: function () { return "Vyhledávání…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['cs']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Danish translation.
*
* Author: Anders Jenbo <anders@jenbo.dk>
*/
(function ($) {
"use strict";
$.fn.select2.locales['da'] = {
formatNoMatches: function () { return "Ingen resultater fundet"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Angiv venligst " + n + " tegn mere"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Angiv venligst " + n + " tegn mindre"; },
formatSelectionTooBig: function (limit) { return "Du kan kun vælge " + limit + " emne" + (limit === 1 ? "" : "r"); },
formatLoadMore: function (pageNumber) { return "Indlæser flere resultater…"; },
formatSearching: function () { return "Søger…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['da']);
})(jQuery);

View File

@ -1,18 +0,0 @@
/**
* Select2 German translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['de'] = {
formatNoMatches: function () { return "Keine Übereinstimmungen gefunden"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Bitte " + n + " Zeichen mehr eingeben"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Bitte " + n + " Zeichen weniger eingeben"; },
formatSelectionTooBig: function (limit) { return "Sie können nur " + limit + " Eintr" + (limit === 1 ? "ag" : "äge") + " auswählen"; },
formatLoadMore: function (pageNumber) { return "Lade mehr Ergebnisse…"; },
formatSearching: function () { return "Suche…"; },
formatMatches: function (matches) { return matches + " Ergebnis " + (matches > 1 ? "se" : "") + " verfügbar, zum Navigieren die Hoch-/Runter-Pfeiltasten verwenden."; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['de']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Greek translation.
*
* @author Uriy Efremochkin <efremochkin@uriy.me>
*/
(function ($) {
"use strict";
$.fn.select2.locales['el'] = {
formatNoMatches: function () { return "Δεν βρέθηκαν αποτελέσματα"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Παρακαλούμε εισάγετε " + n + " περισσότερο" + (n > 1 ? "υς" : "") + " χαρακτήρ" + (n > 1 ? "ες" : "α"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Παρακαλούμε διαγράψτε " + n + " χαρακτήρ" + (n > 1 ? "ες" : "α"); },
formatSelectionTooBig: function (limit) { return "Μπορείτε να επιλέξετε μόνο " + limit + " αντικείμεν" + (limit > 1 ? "α" : "ο"); },
formatLoadMore: function (pageNumber) { return "Φόρτωση περισσότερων…"; },
formatSearching: function () { return "Αναζήτηση…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['el']);
})(jQuery);

View File

@ -1,20 +0,0 @@
/**
* Select2 <Language> translation.
*
* Author: Your Name <your@email>
*/
(function ($) {
"use strict";
$.fn.select2.locales['en'] = {
formatMatches: function (matches) { if (matches === 1) { return "One result is available, press enter to select it."; } return matches + " results are available, use up and down arrow keys to navigate."; },
formatNoMatches: function () { return "No matches found"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " or more character" + (n == 1 ? "" : "s"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " character" + (n == 1 ? "" : "s"); },
formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "Loading more results…"; },
formatSearching: function () { return "Searching…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['en']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Spanish translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['es'] = {
formatMatches: function (matches) { if (matches === 1) { return "Un resultado disponible, presione enter para seleccionarlo."; } return matches + " resultados disponibles, use las teclas de dirección para navegar."; },
formatNoMatches: function () { return "No se encontraron resultados"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor, introduzca " + n + " car" + (n == 1? "ácter" : "acteres"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor, elimine " + n + " car" + (n == 1? "ácter" : "acteres"); },
formatSelectionTooBig: function (limit) { return "Sólo puede seleccionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "Cargando más resultados…"; },
formatSearching: function () { return "Buscando…"; },
formatAjaxError: function() { return "La carga falló"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['es']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Estonian translation.
*
* Author: Kuldar Kalvik <kuldar@kalvik.ee>
*/
(function ($) {
"use strict";
$.fn.select2.locales['et'] = {
formatNoMatches: function () { return "Tulemused puuduvad"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Sisesta " + n + " täht" + (n == 1 ? "" : "e") + " rohkem"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Sisesta " + n + " täht" + (n == 1? "" : "e") + " vähem"; },
formatSelectionTooBig: function (limit) { return "Saad vaid " + limit + " tulemus" + (limit == 1 ? "e" : "t") + " valida"; },
formatLoadMore: function (pageNumber) { return "Laen tulemusi.."; },
formatSearching: function () { return "Otsin.."; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['et']);
})(jQuery);

View File

@ -1,45 +0,0 @@
/**
* Select2 Basque translation.
*
* Author: Julen Ruiz Aizpuru <julenx at gmail dot com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['eu'] = {
formatNoMatches: function () {
return "Ez da bat datorrenik aurkitu";
},
formatInputTooShort: function (input, min) {
var n = min - input.length;
if (n === 1) {
return "Idatzi karaktere bat gehiago";
} else {
return "Idatzi " + n + " karaktere gehiago";
}
},
formatInputTooLong: function (input, max) {
var n = input.length - max;
if (n === 1) {
return "Idatzi karaktere bat gutxiago";
} else {
return "Idatzi " + n + " karaktere gutxiago";
}
},
formatSelectionTooBig: function (limit) {
if (limit === 1 ) {
return "Elementu bakarra hauta dezakezu";
} else {
return limit + " elementu hauta ditzakezu soilik";
}
},
formatLoadMore: function (pageNumber) {
return "Emaitza gehiago kargatzen…";
},
formatSearching: function () {
return "Bilatzen…";
}
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['eu']);
})(jQuery);

View File

@ -1,21 +0,0 @@
/**
* Select2 Persian translation.
*
* Author: Ali Choopan <choopan@arsh.co>
* Author: Ebrahim Byagowi <ebrahim@gnu.org>
*/
(function ($) {
"use strict";
$.fn.select2.locales['fa'] = {
formatMatches: function (matches) { return matches + " نتیجه موجود است، کلیدهای جهت بالا و پایین را برای گشتن استفاده کنید."; },
formatNoMatches: function () { return "نتیجه‌ای یافت نشد."; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "لطفاً " + n + " نویسه بیشتر وارد نمایید"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "لطفاً " + n + " نویسه را حذف کنید."; },
formatSelectionTooBig: function (limit) { return "شما فقط می‌توانید " + limit + " مورد را انتخاب کنید"; },
formatLoadMore: function (pageNumber) { return "در حال بارگیری موارد بیشتر…"; },
formatSearching: function () { return "در حال جستجو…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['fa']);
})(jQuery);

View File

@ -1,30 +0,0 @@
/**
* Select2 Finnish translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['fi'] = {
formatNoMatches: function () {
return "Ei tuloksia";
},
formatInputTooShort: function (input, min) {
var n = min - input.length;
return "Ole hyvä ja anna " + n + " merkkiä lisää";
},
formatInputTooLong: function (input, max) {
var n = input.length - max;
return "Ole hyvä ja anna " + n + " merkkiä vähemmän";
},
formatSelectionTooBig: function (limit) {
return "Voit valita ainoastaan " + limit + " kpl";
},
formatLoadMore: function (pageNumber) {
return "Ladataan lisää tuloksia…";
},
formatSearching: function () {
return "Etsitään…";
}
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['fi']);
})(jQuery);

View File

@ -1,18 +0,0 @@
/**
* Select2 French translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['fr'] = {
formatMatches: function (matches) { return matches + " résultats sont disponibles, utilisez les flèches haut et bas pour naviguer."; },
formatNoMatches: function () { return "Aucun résultat trouvé"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Saisissez " + n + " caractère" + (n == 1? "" : "s") + " supplémentaire" + (n == 1? "" : "s") ; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Supprimez " + n + " caractère" + (n == 1? "" : "s"); },
formatSelectionTooBig: function (limit) { return "Vous pouvez seulement sélectionner " + limit + " élément" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "Chargement de résultats supplémentaires…"; },
formatSearching: function () { return "Recherche en cours…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['fr']);
})(jQuery);

View File

@ -1,45 +0,0 @@
/**
* Select2 Galician translation
*
* Author: Leandro Regueiro <leandro.regueiro@gmail.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['gl'] = {
formatNoMatches: function () {
return "Non se atoparon resultados";
},
formatInputTooShort: function (input, min) {
var n = min - input.length;
if (n === 1) {
return "Engada un carácter";
} else {
return "Engada " + n + " caracteres";
}
},
formatInputTooLong: function (input, max) {
var n = input.length - max;
if (n === 1) {
return "Elimine un carácter";
} else {
return "Elimine " + n + " caracteres";
}
},
formatSelectionTooBig: function (limit) {
if (limit === 1 ) {
return "Só pode seleccionar un elemento";
} else {
return "Só pode seleccionar " + limit + " elementos";
}
},
formatLoadMore: function (pageNumber) {
return "Cargando máis resultados…";
},
formatSearching: function () {
return "Buscando…";
}
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['gl']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Hebrew translation.
*
* Author: Yakir Sitbon <http://www.yakirs.net/>
*/
(function ($) {
"use strict";
$.fn.select2.locales['he'] = {
formatNoMatches: function () { return "לא נמצאו התאמות"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "נא להזין עוד " + n + " תווים נוספים"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "נא להזין פחות " + n + " תווים"; },
formatSelectionTooBig: function (limit) { return "ניתן לבחור " + limit + " פריטים"; },
formatLoadMore: function (pageNumber) { return "טוען תוצאות נוספות…"; },
formatSearching: function () { return "מחפש…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['he']);
})(jQuery);

View File

@ -1,24 +0,0 @@
/**
* Select2 Croatian translation.
*
* @author Edi Modrić <edi.modric@gmail.com>
* @author Uriy Efremochkin <efremochkin@uriy.me>
*/
(function ($) {
"use strict";
$.fn.select2.locales['hr'] = {
formatNoMatches: function () { return "Nema rezultata"; },
formatInputTooShort: function (input, min) { return "Unesite još" + character(min - input.length); },
formatInputTooLong: function (input, max) { return "Unesite" + character(input.length - max) + " manje"; },
formatSelectionTooBig: function (limit) { return "Maksimalan broj odabranih stavki je " + limit; },
formatLoadMore: function (pageNumber) { return "Učitavanje rezultata…"; },
formatSearching: function () { return "Pretraga…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['hr']);
function character (n) {
return " " + n + " znak" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "a" : "" : "ova");
}
})(jQuery);

View File

@ -1,17 +0,0 @@
/**
* Select2 Hungarian translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['hu'] = {
formatNoMatches: function () { return "Nincs találat."; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Túl rövid. Még " + n + " karakter hiányzik."; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Túl hosszú. " + n + " karakterrel több, mint kellene."; },
formatSelectionTooBig: function (limit) { return "Csak " + limit + " elemet lehet kiválasztani."; },
formatLoadMore: function (pageNumber) { return "Töltés…"; },
formatSearching: function () { return "Keresés…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['hu']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Indonesian translation.
*
* Author: Ibrahim Yusuf <ibrahim7usuf@gmail.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['id'] = {
formatNoMatches: function () { return "Tidak ada data yang sesuai"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Masukkan " + n + " huruf lagi" + (n == 1 ? "" : "s"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Hapus " + n + " huruf" + (n == 1 ? "" : "s"); },
formatSelectionTooBig: function (limit) { return "Anda hanya dapat memilih " + limit + " pilihan" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "Mengambil data…"; },
formatSearching: function () { return "Mencari…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['id']);
})(jQuery);

View File

@ -1,17 +0,0 @@
/**
* Select2 Icelandic translation.
*/
(function ($) {
"use strict";
$.fn.select2.locales['is'] = {
formatNoMatches: function () { return "Ekkert fannst"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vinsamlegast skrifið " + n + " staf" + (n > 1 ? "i" : "") + " í viðbót"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vinsamlegast styttið texta um " + n + " staf" + (n > 1 ? "i" : ""); },
formatSelectionTooBig: function (limit) { return "Þú getur aðeins valið " + limit + " atriði"; },
formatLoadMore: function (pageNumber) { return "Sæki fleiri niðurstöður…"; },
formatSearching: function () { return "Leita…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['is']);
})(jQuery);

View File

@ -1,17 +0,0 @@
/**
* Select2 Italian translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['it'] = {
formatNoMatches: function () { return "Nessuna corrispondenza trovata"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Inserisci ancora " + n + " caratter" + (n == 1? "e" : "i"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Inserisci " + n + " caratter" + (n == 1? "e" : "i") + " in meno"; },
formatSelectionTooBig: function (limit) { return "Puoi selezionare solo " + limit + " element" + (limit == 1 ? "o" : "i"); },
formatLoadMore: function (pageNumber) { return "Caricamento in corso…"; },
formatSearching: function () { return "Ricerca…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['it']);
})(jQuery);

View File

@ -1,17 +0,0 @@
/**
* Select2 Japanese translation.
*/
(function ($) {
"use strict";
$.fn.select2.locales['ja'] = {
formatNoMatches: function () { return "該当なし"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "後" + n + "文字入れてください"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "検索文字列が" + n + "文字長すぎます"; },
formatSelectionTooBig: function (limit) { return "最多で" + limit + "項目までしか選択できません"; },
formatLoadMore: function (pageNumber) { return "読込中・・・"; },
formatSearching: function () { return "検索中・・・"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['ja']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Georgian (Kartuli) translation.
*
* Author: Dimitri Kurashvili dimakura@gmail.com
*/
(function ($) {
"use strict";
$.fn.select2.locales['ka'] = {
formatNoMatches: function () { return "ვერ მოიძებნა"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "გთხოვთ შეიყვანოთ კიდევ " + n + " სიმბოლო"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "გთხოვთ წაშალოთ " + n + " სიმბოლო"; },
formatSelectionTooBig: function (limit) { return "თქვენ შეგიძლიათ მხოლოდ " + limit + " ჩანაწერის მონიშვნა"; },
formatLoadMore: function (pageNumber) { return "შედეგის ჩატვირთვა…"; },
formatSearching: function () { return "ძებნა…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['ka']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Korean translation.
*
* @author Swen Mun <longfinfunnel@gmail.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['ko'] = {
formatNoMatches: function () { return "결과 없음"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "너무 짧습니다. "+n+"글자 더 입력해주세요."; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "너무 깁니다. "+n+"글자 지워주세요."; },
formatSelectionTooBig: function (limit) { return "최대 "+limit+"개까지만 선택하실 수 있습니다."; },
formatLoadMore: function (pageNumber) { return "불러오는 중…"; },
formatSearching: function () { return "검색 중…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['ko']);
})(jQuery);

View File

@ -1,26 +0,0 @@
/**
* Select2 Lithuanian translation.
*
* @author CRONUS Karmalakas <cronus dot karmalakas at gmail dot com>
* @author Uriy Efremochkin <efremochkin@uriy.me>
*/
(function ($) {
"use strict";
$.fn.select2.locales['lt'] = {
formatNoMatches: function () { return "Atitikmenų nerasta"; },
formatInputTooShort: function (input, min) { return "Įrašykite dar" + character(min - input.length); },
formatInputTooLong: function (input, max) { return "Pašalinkite" + character(input.length - max); },
formatSelectionTooBig: function (limit) {
return "Jūs galite pasirinkti tik " + limit + " element" + ((limit%100 > 9 && limit%100 < 21) || limit%10 == 0 ? "ų" : limit%10 > 1 ? "us" : "ą");
},
formatLoadMore: function (pageNumber) { return "Kraunama daugiau rezultatų…"; },
formatSearching: function () { return "Ieškoma…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['lt']);
function character (n) {
return " " + n + " simbol" + ((n%100 > 9 && n%100 < 21) || n%10 == 0 ? "ių" : n%10 > 1 ? "ius" : "į");
}
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Latvian translation.
*
* @author Uriy Efremochkin <efremochkin@uriy.me>
*/
(function ($) {
"use strict";
$.fn.select2.locales['lv'] = {
formatNoMatches: function () { return "Sakritību nav"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Lūdzu ievadiet vēl " + n + " simbol" + (n == 11 ? "us" : n%10 == 1 ? "u" : "us"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Lūdzu ievadiet par " + n + " simbol" + (n == 11 ? "iem" : n%10 == 1 ? "u" : "iem") + " mazāk"; },
formatSelectionTooBig: function (limit) { return "Jūs varat izvēlēties ne vairāk kā " + limit + " element" + (limit == 11 ? "us" : limit%10 == 1 ? "u" : "us"); },
formatLoadMore: function (pageNumber) { return "Datu ielāde…"; },
formatSearching: function () { return "Meklēšana…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['lv']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Macedonian translation.
*
* Author: Marko Aleksic <psybaron@gmail.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['mk'] = {
formatNoMatches: function () { return "Нема пронајдено совпаѓања"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Ве молиме внесете уште " + n + " карактер" + (n == 1 ? "" : "и"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Ве молиме внесете " + n + " помалку карактер" + (n == 1? "" : "и"); },
formatSelectionTooBig: function (limit) { return "Можете да изберете само " + limit + " ставк" + (limit == 1 ? "а" : "и"); },
formatLoadMore: function (pageNumber) { return "Вчитување резултати…"; },
formatSearching: function () { return "Пребарување…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['mk']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Malay translation.
*
* Author: Kepoweran <kepoweran@gmail.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['ms'] = {
formatNoMatches: function () { return "Tiada padanan yang ditemui"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Sila masukkan " + n + " aksara lagi"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Sila hapuskan " + n + " aksara"; },
formatSelectionTooBig: function (limit) { return "Anda hanya boleh memilih " + limit + " pilihan"; },
formatLoadMore: function (pageNumber) { return "Sedang memuatkan keputusan…"; },
formatSearching: function () { return "Mencari…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['ms']);
})(jQuery);

View File

@ -1,22 +0,0 @@
/**
* Select2 Norwegian Bokmål translation.
*
* Author: Torgeir Veimo <torgeir.veimo@gmail.com>
* Author: Bjørn Johansen <post@bjornjohansen.no>
*/
(function ($) {
"use strict";
$.fn.select2.locales['nb'] = {
formatMatches: function (matches) { if (matches === 1) { return "Ett resultat er tilgjengelig, trykk enter for å velge det."; } return matches + " resultater er tilgjengelig. Bruk piltastene opp og ned for å navigere."; },
formatNoMatches: function () { return "Ingen treff"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vennligst skriv inn " + n + (n>1 ? " flere tegn" : " tegn til"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vennligst fjern " + n + " tegn"; },
formatSelectionTooBig: function (limit) { return "Du kan velge maks " + limit + " elementer"; },
formatLoadMore: function (pageNumber) { return "Laster flere resultater …"; },
formatSearching: function () { return "Søker …"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['no']);
})(jQuery);

View File

@ -1,17 +0,0 @@
/**
* Select2 Dutch translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['nl'] = {
formatNoMatches: function () { return "Geen resultaten gevonden"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vul nog " + n + " karakter" + (n == 1? "" : "s") + " in"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Haal " + n + " karakter" + (n == 1? "" : "s") + " weg"; },
formatSelectionTooBig: function (limit) { return "Maximaal " + limit + " item" + (limit == 1 ? "" : "s") + " toegestaan"; },
formatLoadMore: function (pageNumber) { return "Meer resultaten laden…"; },
formatSearching: function () { return "Zoeken…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['nl']);
})(jQuery);

View File

@ -1,54 +0,0 @@
/**
* Select2 Polish translation.
*
* @author Jan Kondratowicz <jan@kondratowicz.pl>
* @author Uriy Efremochkin <efremochkin@uriy.me>
* @author Michał Połtyn <mike@poltyn.com>
* @author Damian Zajkowski <damian.zajkowski@gmail.com>
*/
(function($) {
"use strict";
$.fn.select2.locales['pl'] = {
formatNoMatches: function() {
return "Brak wyników";
},
formatInputTooShort: function(input, min) {
return "Wpisz co najmniej" + character(min - input.length, "znak", "i");
},
formatInputTooLong: function(input, max) {
return "Wpisana fraza jest za długa o" + character(input.length - max, "znak", "i");
},
formatSelectionTooBig: function(limit) {
return "Możesz zaznaczyć najwyżej" + character(limit, "element", "y");
},
formatLoadMore: function(pageNumber) {
return "Ładowanie wyników…";
},
formatSearching: function() {
return "Szukanie…";
}
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['pl']);
function character(n, word, pluralSuffix) {
//Liczba pojedyncza - brak suffiksu
//jeden znak
//jeden element
var suffix = '';
if (n > 1 && n < 5) {
//Liczaba mnoga ilość od 2 do 4 - własny suffiks
//Dwa znaki, trzy znaki, cztery znaki.
//Dwa elementy, trzy elementy, cztery elementy
suffix = pluralSuffix;
} else if (n == 0 || n >= 5) {
//Ilość 0 suffiks ów
//Liczaba mnoga w ilości 5 i więcej - suffiks ów (nie poprawny dla wszystkich wyrazów, np. 100 wiadomości)
//Zero znaków, Pięć znaków, sześć znaków, siedem znaków, osiem znaków.
//Zero elementów Pięć elementów, sześć elementów, siedem elementów, osiem elementów.
suffix = 'ów';
}
return " " + n + " " + word + suffix;
}
})(jQuery);

View File

@ -1,18 +0,0 @@
/**
* Select2 Brazilian Portuguese translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['pt-BR'] = {
formatNoMatches: function () { return "Nenhum resultado encontrado"; },
formatAjaxError: function () { return "Erro na busca"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Digite " + (min == 1 ? "" : "mais") + " " + n + " caracter" + (n == 1? "" : "es"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " caracter" + (n == 1? "" : "es"); },
formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "Carregando mais resultados…"; },
formatSearching: function () { return "Buscando…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['pt-BR']);
})(jQuery);

View File

@ -1,17 +0,0 @@
/**
* Select2 Portuguese (Portugal) translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['pt-PT'] = {
formatNoMatches: function () { return "Nenhum resultado encontrado"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduza " + n + " car" + (n == 1 ? "ácter" : "acteres"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " car" + (n == 1 ? "ácter" : "acteres"); },
formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "A carregar mais resultados…"; },
formatSearching: function () { return "A pesquisar…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['pt-PT']);
})(jQuery);

View File

@ -1,17 +0,0 @@
/**
* Select2 Romanian translation.
*/
(function ($) {
"use strict";
$.fn.select2.locales['ro'] = {
formatNoMatches: function () { return "Nu a fost găsit nimic"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vă rugăm să introduceți incă " + n + " caracter" + (n == 1 ? "" : "e"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vă rugăm să introduceți mai puțin de " + n + " caracter" + (n == 1? "" : "e"); },
formatSelectionTooBig: function (limit) { return "Aveți voie să selectați cel mult " + limit + " element" + (limit == 1 ? "" : "e"); },
formatLoadMore: function (pageNumber) { return "Se încarcă…"; },
formatSearching: function () { return "Căutare…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['ro']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Serbian translation.
*
* @author Limon Monte <limon.monte@gmail.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['rs'] = {
formatNoMatches: function () { return "Ništa nije pronađeno"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Ukucajte bar još " + n + " simbol" + (n % 10 == 1 && n % 100 != 11 ? "" : "a"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Obrišite " + n + " simbol" + (n % 10 == 1 && n % 100 != 11 ? "" : "a"); },
formatSelectionTooBig: function (limit) { return "Možete izabrati samo " + limit + " stavk" + (limit % 10 == 1 && limit % 100 != 11 ? "u" : (limit % 10 >= 2 && limit % 10 <= 4 && (limit % 100 < 12 || limit % 100 > 14)? "e" : "i")); },
formatLoadMore: function (pageNumber) { return "Preuzimanje još rezultata…"; },
formatSearching: function () { return "Pretraga…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['rs']);
})(jQuery);

View File

@ -1,23 +0,0 @@
/**
* Select2 Russian translation.
*
* @author Uriy Efremochkin <efremochkin@uriy.me>
*/
(function ($) {
"use strict";
$.fn.select2.locales['ru'] = {
formatNoMatches: function () { return "Совпадений не найдено"; },
formatInputTooShort: function (input, min) { return "Пожалуйста, введите еще хотя бы" + character(min - input.length); },
formatInputTooLong: function (input, max) { return "Пожалуйста, введите на" + character(input.length - max) + " меньше"; },
formatSelectionTooBig: function (limit) { return "Вы можете выбрать не более " + limit + " элемент" + (limit%10 == 1 && limit%100 != 11 ? "а" : "ов"); },
formatLoadMore: function (pageNumber) { return "Загрузка данных…"; },
formatSearching: function () { return "Поиск…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['ru']);
function character (n) {
return " " + n + " символ" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 20) ? n%10 > 1 ? "a" : "" : "ов");
}
})(jQuery);

View File

@ -1,50 +0,0 @@
/**
* Select2 Slovak translation.
*
* Author: David Vallner <david@vallner.net>
*/
(function ($) {
"use strict";
// use text for the numbers 2 through 4
var smallNumbers = {
2: function(masc) { return (masc ? "dva" : "dve"); },
3: function() { return "tri"; },
4: function() { return "štyri"; }
};
$.fn.select2.locales['sk'] = {
formatNoMatches: function () { return "Nenašli sa žiadne položky"; },
formatInputTooShort: function (input, min) {
var n = min - input.length;
if (n == 1) {
return "Prosím, zadajte ešte jeden znak";
} else if (n <= 4) {
return "Prosím, zadajte ešte ďalšie "+smallNumbers[n](true)+" znaky";
} else {
return "Prosím, zadajte ešte ďalších "+n+" znakov";
}
},
formatInputTooLong: function (input, max) {
var n = input.length - max;
if (n == 1) {
return "Prosím, zadajte o jeden znak menej";
} else if (n >= 2 && n <= 4) {
return "Prosím, zadajte o "+smallNumbers[n](true)+" znaky menej";
} else {
return "Prosím, zadajte o "+n+" znakov menej";
}
},
formatSelectionTooBig: function (limit) {
if (limit == 1) {
return "Môžete zvoliť len jednu položku";
} else if (limit >= 2 && limit <= 4) {
return "Môžete zvoliť najviac "+smallNumbers[limit](false)+" položky";
} else {
return "Môžete zvoliť najviac "+limit+" položiek";
}
},
formatLoadMore: function (pageNumber) { return "Načítavajú sa ďalšie výsledky…"; },
formatSearching: function () { return "Vyhľadávanie…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['sk']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Swedish translation.
*
* Author: Jens Rantil <jens.rantil@telavox.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['sv'] = {
formatNoMatches: function () { return "Inga träffar"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Var god skriv in " + n + (n>1 ? " till tecken" : " tecken till"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Var god sudda ut " + n + " tecken"; },
formatSelectionTooBig: function (limit) { return "Du kan max välja " + limit + " element"; },
formatLoadMore: function (pageNumber) { return "Laddar fler resultat…"; },
formatSearching: function () { return "Söker…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['sv']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Thai translation.
*
* Author: Atsawin Chaowanakritsanakul <joke@nakhon.net>
*/
(function ($) {
"use strict";
$.fn.select2.locales['th'] = {
formatNoMatches: function () { return "ไม่พบข้อมูล"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "โปรดพิมพ์เพิ่มอีก " + n + " ตัวอักษร"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "โปรดลบออก " + n + " ตัวอักษร"; },
formatSelectionTooBig: function (limit) { return "คุณสามารถเลือกได้ไม่เกิน " + limit + " รายการ"; },
formatLoadMore: function (pageNumber) { return "กำลังค้นข้อมูลเพิ่ม…"; },
formatSearching: function () { return "กำลังค้นข้อมูล…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['th']);
})(jQuery);

View File

@ -1,19 +0,0 @@
/**
* Select2 Turkish translation.
*
* Author: Salim KAYABAŞI <salim.kayabasi@gmail.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['tr'] = {
formatNoMatches: function () { return "Sonuç bulunamadı"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "En az " + n + " karakter daha girmelisiniz"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return n + " karakter azaltmalısınız"; },
formatSelectionTooBig: function (limit) { return "Sadece " + limit + " seçim yapabilirsiniz"; },
formatLoadMore: function (pageNumber) { return "Daha fazla…"; },
formatSearching: function () { return "Aranıyor…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['tr']);
})(jQuery);

View File

@ -1,16 +0,0 @@
/**
* Select2 Uyghur translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['ug-CN'] = {
formatNoMatches: function () { return "ماس كېلىدىغان ئۇچۇر تېپىلمىدى"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "يەنە " + n + " ھەرپ كىرگۈزۈڭ";},
formatInputTooLong: function (input, max) { var n = input.length - max; return "" + n + "ھەرپ ئۆچۈرۈڭ";},
formatSelectionTooBig: function (limit) { return "ئەڭ كۆپ بولغاندا" + limit + " تال ئۇچۇر تاللىيالايسىز"; },
formatLoadMore: function (pageNumber) { return "ئۇچۇرلار ئوقۇلىۋاتىدۇ…"; },
formatSearching: function () { return "ئىزدەۋاتىدۇ…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['ug-CN']);
})(jQuery);

View File

@ -1,25 +0,0 @@
/**
* Select2 Ukrainian translation.
*
* @author bigmihail <bigmihail@bigmir.net>
* @author Uriy Efremochkin <efremochkin@uriy.me>
*/
(function ($) {
"use strict";
$.fn.select2.locales['uk'] = {
formatMatches: function (matches) { return character(matches, "результат") + " знайдено, використовуйте клавіші зі стрілками вверх та вниз для навігації."; },
formatNoMatches: function () { return "Нічого не знайдено"; },
formatInputTooShort: function (input, min) { return "Введіть буль ласка ще " + character(min - input.length, "символ"); },
formatInputTooLong: function (input, max) { return "Введіть буль ласка на " + character(input.length - max, "символ") + " менше"; },
formatSelectionTooBig: function (limit) { return "Ви можете вибрати лише " + character(limit, "елемент"); },
formatLoadMore: function (pageNumber) { return "Завантаження даних…"; },
formatSearching: function () { return "Пошук…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['uk']);
function character (n, word) {
return n + " " + word + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "и" : "" : "ів");
}
})(jQuery);

View File

@ -1,20 +0,0 @@
/**
* Select2 Vietnamese translation.
*
* Author: Long Nguyen <olragon@gmail.com>
*/
(function ($) {
"use strict";
$.fn.select2.locales['vi'] = {
formatNoMatches: function () { return "Không tìm thấy kết quả"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vui lòng nhập nhiều hơn " + n + " ký tự" + (n == 1 ? "" : "s"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vui lòng nhập ít hơn " + n + " ký tự" + (n == 1? "" : "s"); },
formatSelectionTooBig: function (limit) { return "Chỉ có thể chọn được " + limit + " tùy chọn" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "Đang lấy thêm kết quả…"; },
formatSearching: function () { return "Đang tìm…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['vi']);
})(jQuery);

View File

@ -1,16 +0,0 @@
/**
* Select2 Chinese translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['zh-CN'] = {
formatNoMatches: function () { return "没有找到匹配项"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "请再输入" + n + "个字符";},
formatInputTooLong: function (input, max) { var n = input.length - max; return "请删掉" + n + "个字符";},
formatSelectionTooBig: function (limit) { return "你只能选择最多" + limit + "项"; },
formatLoadMore: function (pageNumber) { return "加载结果中…"; },
formatSearching: function () { return "搜索中…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['zh-CN']);
})(jQuery);

View File

@ -1,16 +0,0 @@
/**
* Select2 Traditional Chinese translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['zh-TW'] = {
formatNoMatches: function () { return "沒有找到相符的項目"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "請再輸入" + n + "個字元";},
formatInputTooLong: function (input, max) { var n = input.length - max; return "請刪掉" + n + "個字元";},
formatSelectionTooBig: function (limit) { return "你只能選擇最多" + limit + "項"; },
formatLoadMore: function (pageNumber) { return "載入中…"; },
formatSearching: function () { return "搜尋中…"; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['zh-TW']);
})(jQuery);

View File

@ -0,0 +1,30 @@
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
.ui-timepicker-div dl { text-align: left; }
.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; }
.ui-timepicker-div dl dd { margin: 0 10px 10px 40%; }
.ui-timepicker-div td { font-size: 90%; }
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
.ui-timepicker-div .ui_tpicker_unit_hide{ display: none; }
.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input { background: none; color: inherit; border: none; outline: none; border-bottom: solid 1px #555; width: 95%; }
.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus { border-bottom-color: #aaa; }
.ui-timepicker-rtl{ direction: rtl; }
.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
.ui-timepicker-rtl dl dt{ float: right; clear: right; }
.ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; }
/* Shortened version style */
.ui-timepicker-div.ui-timepicker-oneLine { padding-right: 2px; }
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time,
.ui-timepicker-div.ui-timepicker-oneLine dt { display: none; }
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label { display: block; padding-top: 2px; }
.ui-timepicker-div.ui-timepicker-oneLine dl { text-align: right; }
.ui-timepicker-div.ui-timepicker-oneLine dl dd,
.ui-timepicker-div.ui-timepicker-oneLine dl dd > div { display:inline-block; margin:0; }
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before { content:':'; display:inline-block; }
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before,
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before { content:'.'; display:inline-block; }
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{ display: none; }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20
* http://trentrichardson.com/examples/timepicker
* Copyright (c) 2016 Trent Richardson; Licensed MIT */
.ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:0 0;border:0;margin:0;padding:0}.ui-timepicker-div .ui_tpicker_unit_hide{display:none}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input{background:0 0;color:inherit;border:0;outline:0;border-bottom:solid 1px #555;width:95%}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus{border-bottom-color:#aaa}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px}.ui-timepicker-div.ui-timepicker-oneLine{padding-right:2px}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time,.ui-timepicker-div.ui-timepicker-oneLine dt{display:none}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label{display:block;padding-top:2px}.ui-timepicker-div.ui-timepicker-oneLine dl{text-align:right}.ui-timepicker-div.ui-timepicker-oneLine dl dd,.ui-timepicker-div.ui-timepicker-oneLine dl dd>div{display:inline-block;margin:0}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before{content:':';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before{content:'.';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{display:none}

File diff suppressed because one or more lines are too long

View File

@ -2378,6 +2378,124 @@
});
/*
* Date Time Picker
*
* This field type requires some extra logic for its settings
*
* @type function
* @date 24/10/13
* @since 5.0.0
*
* @param n/a
* @return n/a
*/
var acf_settings_date_time_picker = acf.model.extend({
actions: {
'open_field': 'render',
'change_field_type': 'render'
},
events: {
'change .acf-field-object-date-time-picker input[type="radio"]': 'render',
},
event: function( e ){
// override
return e.$el.closest('.acf-field-object');
},
render: function( $el ){
// bail early if not correct field type
if( $el.attr('data-type') != 'date_time_picker' ) return;
// loop
$el.find('.acf-radio-list[data-other_choice="1"]').each(function(){
// vars
var $ul = $(this),
$radio = $ul.find('input[type="radio"]:checked'),
$other = $ul.find('input[type="text"]');
// display val
if( $radio.val() != 'other' ) {
$other.val( $radio.val() );
}
});
}
});
/*
* Time Picker
*
* This field type requires some extra logic for its settings
*
* @type function
* @date 24/10/13
* @since 5.0.0
*
* @param n/a
* @return n/a
*/
var acf_settings_time_picker = acf.model.extend({
actions: {
'open_field': 'render',
'change_field_type': 'render'
},
events: {
'change .acf-field-object-time-picker input[type="radio"]': 'render',
},
event: function( e ){
// override
return e.$el.closest('.acf-field-object');
},
render: function( $el ){
// bail early if not correct field type
if( $el.attr('data-type') != 'time_picker' ) return;
// loop
$el.find('.acf-radio-list[data-other_choice="1"]').each(function(){
// vars
var $ul = $(this),
$radio = $ul.find('input[type="radio"]:checked'),
$other = $ul.find('input[type="text"]');
// display val
if( $radio.val() != 'other' ) {
$other.val( $radio.val() );
}
});
}
});
/*
* tab
*

File diff suppressed because one or more lines are too long

View File

@ -3155,6 +3155,10 @@ var acf;
$('.acf-postbox-toggle').addClass('acf-hidden');
// reset style
$('#acf-style').html('');
// show the new postboxes
$.each(json, function( k, field_group ){
@ -4057,6 +4061,103 @@ var acf;
(function($){
/*
* acf.datepicker
*
* description
*
* @type function
* @date 16/12/2015
* @since 5.3.2
*
* @param $post_id (int)
* @return $post_id (int)
*/
acf.datepicker = acf.model.extend({
actions: {
'ready 1': 'ready',
},
ready: function(){
// vars
var locale = acf.get('locale'),
rtl = acf.get('rtl')
l10n = acf._e('date_picker');
// bail ealry if no l10n (fiedl groups admin page)
if( !l10n ) return;
// rtl
l10n.isRTL = rtl;
// append
$.datepicker.regional[ locale ] = l10n;
$.datepicker.setDefaults(l10n);
},
/*
* init
*
* This function will initialize JS
*
* @type function
* @date 2/06/2016
* @since 5.3.8
*
* @param $input (jQuery selector)
* @param args (object)
* @return n/a
*/
init: function( $input, args ){
// defaults
args = args || {};
// add date picker
$input.datepicker( args );
// wrap the datepicker (only if it hasn't already been wrapped)
if( $('body > #ui-datepicker-div').exists() ) {
$('body > #ui-datepicker-div').wrap('<div class="acf-ui-datepicker" />');
}
},
/*
* init
*
* This function will remove JS
*
* @type function
* @date 2/06/2016
* @since 5.3.8
*
* @param $input (jQuery selector)
* @return n/a
*/
destroy: function( $input ){
// do nothing
}
});
acf.fields.date_picker = acf.field.extend({
type: 'date_picker',
@ -4078,10 +4179,11 @@ var acf;
focus: function(){
// get elements
this.$el = this.$field.find('.acf-date_picker');
this.$el = this.$field.find('.acf-date-picker');
this.$input = this.$el.find('input[type="text"]');
this.$hidden = this.$el.find('input[type="hidden"]');
// get options
this.o = acf.get_data( this.$el );
@ -4089,13 +4191,9 @@ var acf;
initialize: function(){
// get and set value from alt field
this.$input.val( this.$hidden.val() );
// create options
var args = $.extend( {}, acf.l10n.date_picker, {
dateFormat : 'yymmdd',
var args = {
dateFormat: this.o.date_format,
altField: this.$hidden,
altFormat: 'yymmdd',
changeYear: true,
@ -4103,7 +4201,7 @@ var acf;
changeMonth: true,
showButtonPanel: true,
firstDay: this.o.first_day
});
};
// filter for 3rd party customization
@ -4111,11 +4209,90 @@ var acf;
// add date picker
this.$input.addClass('active').datepicker( args );
acf.datepicker.init( this.$input, args );
},
blur: function(){
if( !this.$input.val() ) {
this.$hidden.val('');
}
}
});
})(jQuery);
(function($){
/*
* acf.datepicker
*
* description
*
* @type function
* @date 16/12/2015
* @since 5.3.2
*
* @param $post_id (int)
* @return $post_id (int)
*/
acf.datetimepicker = acf.model.extend({
actions: {
'ready 1': 'ready',
},
ready: function(){
// vars
var locale = acf.get('locale'),
rtl = acf.get('rtl')
l10n = acf._e('date_time_picker');
// now change the format back to how it should be.
this.$input.datepicker( "option", "dateFormat", this.o.display_format );
// bail ealry if no l10n (fiedl groups admin page)
if( !l10n ) return;
// rtl
l10n.isRTL = rtl;
// append
$.timepicker.regional[ locale ] = l10n;
$.timepicker.setDefaults(l10n);
},
/*
* init
*
* This function will initialize JS
*
* @type function
* @date 2/06/2016
* @since 5.3.8
*
* @param $input (jQuery selector)
* @param args (object)
* @return n/a
*/
init: function( $input, args ){
// defaults
args = args || {};
// add date picker
$input.datetimepicker( args );
// wrap the datepicker (only if it hasn't already been wrapped)
@ -4127,6 +4304,89 @@ var acf;
},
/*
* init
*
* This function will remove JS
*
* @type function
* @date 2/06/2016
* @since 5.3.8
*
* @param $input (jQuery selector)
* @return n/a
*/
destroy: function( $input ){
// do nothing
}
});
acf.fields.date_time_picker = acf.field.extend({
type: 'date_time_picker',
$el: null,
$input: null,
$hidden: null,
o: {},
actions: {
'ready': 'initialize',
'append': 'initialize'
},
events: {
'blur input[type="text"]': 'blur',
},
focus: function(){
// get elements
this.$el = this.$field.find('.acf-date-time-picker');
this.$input = this.$el.find('input[type="text"]');
this.$hidden = this.$el.find('input[type="hidden"]');
// get options
this.o = acf.get_data( this.$el );
},
initialize: function(){
// create options
var args = {
dateFormat: this.o.date_format,
timeFormat: this.o.time_format,
altField: this.$hidden,
altFieldTimeOnly: false,
altFormat: 'yy-mm-dd',
altTimeFormat: 'HH:mm:ss',
changeYear: true,
yearRange: "-100:+100",
changeMonth: true,
showButtonPanel: true,
firstDay: this.o.first_day,
controlType: 'select',
oneLine: true,
};
// filter for 3rd party customization
args = acf.apply_filters('date_time_picker_args', args, this.$field);
// add date time picker
acf.datetimepicker.init( this.$input, args );
},
blur: function(){
if( !this.$input.val() ) {
@ -6307,6 +6567,7 @@ var acf;
// vars
var version = acf.get('wp_version'),
browser = acf.get('browser'),
post_id = acf.get('post_id');
@ -6318,19 +6579,27 @@ var acf;
}
// update version
if( version ) {
// append browser
if( browser ) {
// use only major version
if( typeof version == 'string' ) {
version = version.substr(0,1);
$('body').addClass('browser-' + browser );
}
// append version
if( version ) {
// ensure is string
version = version + '';
// use only major version
major = version.substr(0,1);
// add body class
$('body').addClass('acf-wp-' + version);
$('body').addClass('major-' + major);
}
@ -7016,7 +7285,7 @@ var acf;
focus: function(){
// focus on $select
this.$ul = this.$field.find('ul');
this.$ul = this.$field.find('.acf-radio-list');
// get options
@ -7588,26 +7857,164 @@ var acf;
/*
* acf.select2
*
* description
* all logic to create select2 instances
*
* @type function
* @date 16/12/2015
* @since 5.3.2
*
* @param $post_id (int)
* @return $post_id (int)
* @param n/a
* @return n/a
*/
acf.select2 = acf.model.extend({
init: function( $select, args ){
// vars
version: 0,
// actions
actions: {
'ready 1': 'ready',
},
/*
* ready
*
* This function will setup vars
*
* @type function
* @date 21/06/2016
* @since 5.3.8
*
* @param n/a
* @return n/a
*/
ready: function(){
// determine Select2 version
if( acf.maybe_get(window, 'Select2') ) {
this.version = 3;
this.l10n_v3();
} else if( acf.maybe_get(window, 'jQuery.fn.select2.amd') ) {
this.version = 4;
}
},
/*
* l10n_v3
*
* This function will set l10n for Select2 v3
*
* @type function
* @date 21/06/2016
* @since 5.3.8
*
* @param n/a
* @return n/a
*/
l10n_v3: function(){
// vars
var version = this.version();
var locale = acf.get('locale'),
rtl = acf.get('rtl')
l10n = acf._e('select');
// bail ealry if no l10n
if( !l10n ) return;
// vars
var l10n_functions = {
formatMatches: function( matches ) {
if ( 1 === matches ) {
return l10n.matches_1;
}
return l10n.matches_n.replace('%d', matches);
},
formatNoMatches: function() {
return l10n.matches_0;
},
formatAjaxError: function() {
return l10n.load_fail;
},
formatInputTooShort: function( input, min ) {
var number = min - input.length;
if ( 1 === number ) {
return l10n.input_too_short_1;
}
return l10n.input_too_short_n.replace( '%d', number );
},
formatInputTooLong: function( input, max ) {
var number = input.length - max;
if ( 1 === number ) {
return l10n.input_too_long_1;
}
return l10n.input_too_long_n.replace( '%d', number );
},
formatSelectionTooBig: function( limit ) {
if ( 1 === limit ) {
return l10n.selection_too_long_1;
}
return l10n.selection_too_long_n.replace( '%d', limit );
},
formatLoadMore: function() {
return l10n.load_more;
},
formatSearching: function() {
return l10n.searching;
}
};
// ensure locales exists
// older versions of Select2 did not have a locale storage
$.fn.select2.locales = acf.maybe_get(window, 'jQuery.fn.select2.locales', {});
// append
$.fn.select2.locales[ locale ] = l10n_functions;
$.extend($.fn.select2.defaults, l10n_functions);
},
/*
* init
*
* This function will initialize a Select2 instance
*
* @type function
* @date 21/06/2016
* @since 5.3.8
*
* @param $select (jQuery object)
* @param args (object)
* @return (mixed)
*/
init: function( $select, args ){
// bail early if no version found
if( !version ) return;
if( !this.version ) return;
// defaults
@ -7616,50 +8023,26 @@ var acf;
placeholder: '',
multiple: false,
ajax: false,
action: '',
ajax_action: '',
pagination: false
}, args);
// v3
if( version == 3 ) {
if( this.version == 3 ) {
return this.init_v3( $select, args );
// v4
} else if( this.version == 4 ) {
return this.init_v4( $select, args );
}
// v4
return this.init_v4( $select, args );
},
/*
* version
*
* This function will return the Select2 version number
*
* @type function
* @date 24/12/2015
* @since 5.3.2
*
* @param n/a
* @return (int)
*/
version: function(){
// v3
if( acf.maybe_get(window, 'Select2') ) return 3;
// v4
if( acf.maybe_get(window, 'jQuery.fn.select2.amd') ) return 4;
// return
return 0;
return false;
},
@ -7965,7 +8348,7 @@ var acf;
// vars
var data = acf.prepare_for_ajax({
action: args.action,
action: args.ajax_action,
field_key: args.key,
post_id: acf.get('post_id'),
s: term,
@ -8190,7 +8573,7 @@ var acf;
// vars
var data = acf.prepare_for_ajax({
action: args.action,
action: args.ajax_action,
field_key: args.key,
post_id: acf.get('post_id'),
s: params.term,
@ -8388,11 +8771,7 @@ var acf;
// bail early if no select field
if( !this.$select.exists() ) {
return;
}
if( !this.$select.exists() ) return;
// get options
@ -8400,9 +8779,11 @@ var acf;
// customize o
this.o.pagination = this.pagination;
this.o.key = this.$field.data('key');
this.o.action = 'acf/fields/' + this.type + '/query';
this.o = acf.parse_args(this.o, {
'pagination': this.pagination,
'ajax_action': 'acf/fields/'+this.type+'/query',
'key': this.$field.data('key')
});
},
@ -8911,6 +9292,84 @@ var acf;
})(jQuery);
(function($){
acf.fields.time_picker = acf.field.extend({
type: 'time_picker',
$el: null,
$input: null,
$hidden: null,
o: {},
actions: {
'ready': 'initialize',
'append': 'initialize'
},
events: {
'blur input[type="text"]': 'blur',
},
focus: function(){
// get elements
this.$el = this.$field.find('.acf-time-picker');
this.$input = this.$el.find('input[type="text"]');
this.$hidden = this.$el.find('input[type="hidden"]');
// get options
this.o = acf.get_data( this.$el );
},
initialize: function(){
// create options
var args = {
timeFormat: this.o.time_format,
altField: this.$hidden,
altFieldTimeOnly: false,
altTimeFormat: 'HH:mm:ss',
showButtonPanel: true,
controlType: 'select',
oneLine: true,
};
// filter for 3rd party customization
args = acf.apply_filters('time_picker_args', args, this.$field);
// add date picker
this.$input.addClass('active').timepicker( args );
// wrap the datepicker (only if it hasn't already been wrapped)
if( $('body > #ui-datepicker-div').exists() ) {
$('body > #ui-datepicker-div').wrap('<div class="acf-ui-datepicker" />');
}
},
blur: function(){
if( !this.$input.val() ) {
this.$hidden.val('');
}
}
});
})(jQuery);
(function($){
// taxonomy
@ -8949,13 +9408,8 @@ var acf;
var $select = this.$field.find('select');
// bail early if no select
if( !$select.exists() ) {
return false;
}
// bail early if no select field
if( !$select.exists() ) return;
// select2 options
@ -8963,9 +9417,11 @@ var acf;
// customize args
args.pagination = true;
args.key = this.o.key;
args.action = 'acf/fields/taxonomy/query';
args = acf.parse_args(args, {
'pagination': true,
'ajax_action': 'acf/fields/taxonomy/query',
'key': this.o.key
});
// add select2
@ -8980,11 +9436,7 @@ var acf;
// validate ui
if( !$select.exists() ) {
return false;
}
if( !$select.exists() ) return false;
// remove select2
@ -10677,6 +11129,7 @@ ed.on('ResizeEditor', function(e) {
// @codekit-prepend "../js/acf-color-picker.js";
// @codekit-prepend "../js/acf-conditional-logic.js";
// @codekit-prepend "../js/acf-date-picker.js";
// @codekit-prepend "../js/acf-date-time-picker.js";
// @codekit-prepend "../js/acf-file.js";
// @codekit-prepend "../js/acf-google-map.js";
// @codekit-prepend "../js/acf-image.js";
@ -10686,6 +11139,7 @@ ed.on('ResizeEditor', function(e) {
// @codekit-prepend "../js/acf-relationship.js";
// @codekit-prepend "../js/acf-select.js";
// @codekit-prepend "../js/acf-tab.js";
// @codekit-prepend "../js/acf-time-picker.js";
// @codekit-prepend "../js/acf-taxonomy.js";
// @codekit-prepend "../js/acf-url.js";
// @codekit-prepend "../js/acf-validation.js";

File diff suppressed because one or more lines are too long

View File

@ -28,6 +28,7 @@ class acf_compatibility {
add_filter('acf/get_valid_field/type=wysiwyg', array($this, 'get_valid_wysiwyg_field'), 20, 1);
add_filter('acf/get_valid_field/type=date_picker', array($this, 'get_valid_date_picker_field'), 20, 1);
add_filter('acf/get_valid_field/type=taxonomy', array($this, 'get_valid_taxonomy_field'), 20, 1);
add_filter('acf/get_valid_field/type=date_time_picker', array($this, 'get_valid_date_time_picker_field'), 20, 1);
// field groups
@ -378,6 +379,57 @@ class acf_compatibility {
}
/*
* get_valid_date_time_picker_field
*
* This function will provide compatibility with existing 3rd party fields
*
* @type function
* @date 23/04/2014
* @since 5.0.0
*
* @param $field (array)
* @return $field
*/
function get_valid_date_time_picker_field( $field ) {
// 3rd party date time picker
// https://github.com/soderlind/acf-field-date-time-picker
if( !empty($field['time_format']) ) {
// extract vars
$time_format = acf_extract_var( $field, 'time_format' );
$date_format = acf_extract_var( $field, 'date_format' );
$get_as_timestamp = acf_extract_var( $field, 'get_as_timestamp' );
// convert from js to php
$time_format = acf_convert_time_to_php( $time_format );
$date_format = acf_convert_date_to_php( $date_format );
// append settings
$field['return_format'] = $date_format . ' ' . $time_format;
$field['display_format'] = $date_format . ' ' . $time_format;
// timestamp
if( $get_as_timestamp === 'true' ) {
$field['return_format'] = 'U';
}
}
// return
return $field;
}
/*
* get_valid_field_group
*

View File

@ -245,7 +245,10 @@ class acf_input {
'ajax' => acf_get_form_data('ajax'),
'validation' => acf_get_form_data('validation'),
'wp_version' => $wp_version,
'acf_version' => acf_get_setting('version')
'acf_version' => acf_get_setting('version'),
'browser' => acf_get_browser(),
'locale' => get_locale(),
'rtl' => is_rtl()
);
@ -407,7 +410,7 @@ function acf_set_form_data( $data = array() ) {
function acf_enqueue_uploader() {
// bail early if doing ajax
if( defined('DOING_AJAX') && DOING_AJAX ) return;
if( acf_is_ajax() ) return;
// bail ealry if already run

View File

@ -69,13 +69,14 @@ class acf_json {
function delete_field_group( $field_group ) {
// validate
if( !acf_get_setting('json') ) {
return;
}
if( !acf_get_setting('json') ) return;
// WP appends '__trashed' to end of 'key' (post_name)
$field_group['key'] = str_replace('__trashed', '', $field_group['key']);
// delete
acf_delete_json_field_group( $field_group['key'] );
}

View File

@ -385,6 +385,29 @@ function acf_enable_local() {
}
/*
* acf_reset_local
*
* This function will remove (reset) all field group and fields
*
* @type function
* @date 2/06/2016
* @since 5.3.8
*
* @param $post_id (int)
* @return $post_id (int)
*/
function acf_reset_local() {
// vars
acf_local()->groups = array();
acf_local()->fields = array();
acf_local()->parents = array();
}
/*
* acf_is_local_enabled
*

View File

@ -128,6 +128,7 @@ class acf_loop {
'field' => false,
'i' => -1,
'post_id' => 0,
'key' => ''
));

Some files were not shown because too many files have changed in this diff Show More