Version Description
Download this release
Release Info
Developer | adbox |
Plugin | WordPress Landing Pages |
Version | 2.7.2 |
Comparing to | |
See all releases |
Code changes from version 2.6.9 to 2.7.2
- assets/js/admin/admin.post-new.js +1 -1
- assets/lang/landing-pages-ar.mo +0 -0
- assets/lang/landing-pages-ar_SA.mo +0 -0
- assets/lang/landing-pages-de_DE.mo +0 -0
- assets/lang/landing-pages-es.mo +0 -0
- assets/lang/landing-pages-fa_IR.mo +0 -0
- assets/lang/landing-pages-he_IL.mo +0 -0
- assets/lang/landing-pages-hu.mo +0 -0
- assets/lang/landing-pages-pt_BR.mo +0 -0
- assets/lang/landing-pages-tr_TR.mo +0 -0
- classes/class.admin-notices.php +1 -1
- classes/class.post-type.landing-page.php +4 -4
- classes/class.welcome.php +2 -11
- landing-pages.php +2 -2
- readme.txt +6 -2
- shared/assets/js/admin/customizer-parent.js +2 -3
- shared/assets/js/frontend/analytics-src/analytics.forms.js +82 -91
- shared/assets/js/frontend/analytics/inboundAnalytics.js +223 -232
- shared/assets/js/frontend/analytics/inboundAnalytics.min.js +2 -2
- shared/assets/plugins/advanced-custom-fields/FETCH_HEAD +0 -1
- shared/assets/plugins/advanced-custom-fields/HEAD +0 -1
- shared/assets/plugins/advanced-custom-fields/README.md +0 -11
- shared/assets/plugins/advanced-custom-fields/acf.php +495 -768
- shared/assets/plugins/advanced-custom-fields/assets/css/acf-dark.css +1 -0
- shared/assets/plugins/advanced-custom-fields/assets/css/acf-field-group.css +457 -0
- shared/assets/plugins/advanced-custom-fields/assets/css/acf-global.css +1525 -0
- shared/assets/plugins/advanced-custom-fields/assets/css/acf-input.css +2708 -0
- shared/assets/plugins/advanced-custom-fields/assets/font/LICENSE.txt +48 -0
- shared/assets/plugins/advanced-custom-fields/assets/font/README.txt +75 -0
- shared/assets/plugins/advanced-custom-fields/assets/font/acf.eot +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/font/acf.svg +48 -0
- shared/assets/plugins/advanced-custom-fields/assets/font/acf.ttf +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/font/acf.woff +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/font/acf.woff2 +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/font/config.json +124 -0
- shared/assets/plugins/advanced-custom-fields/assets/images/acf-logo.png +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/images/spinner.gif +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/images/spinner@2x.gif +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/images/ui-bg_highlight-soft_0_ffffff_1x100.png +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_444444_256x240.png +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_DDDDDD_256x240.png +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/jquery-ui.css +650 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/jquery-ui.min.css +7 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2-spinner.gif +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2.css +704 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2.js +3541 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2.min.js +23 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2.png +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2x2.png +0 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.css +484 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.full.js +6436 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.full.min.js +3 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.js +5725 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.min.css +1 -0
- shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.min.js +1 -0
assets/js/admin/admin.post-new.js
CHANGED
@@ -29,7 +29,7 @@ jQuery(document).ready(function ($) {
|
|
29 |
jQuery("#lp_template_change a").removeClass("button-primary").addClass("button");
|
30 |
|
31 |
// New Sidebar
|
32 |
-
jQuery("#postbox-container-1").html("<div class='postbox'><center><h3>Download
|
33 |
|
34 |
jQuery('.lp_select_template').click(function(){
|
35 |
jQuery(".mceIframeContainer iframe#content_ifr").css("height", "100%");
|
29 |
jQuery("#lp_template_change a").removeClass("button-primary").addClass("button");
|
30 |
|
31 |
// New Sidebar
|
32 |
+
jQuery("#postbox-container-1").html("<div class='postbox'><center><h3>Download Inbound PRO and join Inbound Now's membership plan for access to premium templates.</h3><a target='_blank' href='http://www.inboundnow.com/market/?show=landing-pages'><img src='"+lp_post_new_ui.LANDINGPAGES_URLPATH+"assets/images/get-wordpress-templates.png'></a><a target='_blank' href='http://www.inboundnow.com/market/?show=landing-pages' class='button new-lp-button button-primary button-large'>Download Landing Page Templates</a></center></div><div class='postbox'><center><h3>Need Custom Template Design?</h3><a target='_blank' href='http://www.inboundnow.com/contact'><img src='"+lp_post_new_ui.LANDINGPAGES_URLPATH+"assets/images/get-custom-setup.png'></a><a target='_blank' href='http://docs.inboundnow.com/guide/default-wp-themes/' class='button new-lp-button button-primary button-large'>Get Custom Template Setup</a></center></div>");
|
33 |
|
34 |
jQuery('.lp_select_template').click(function(){
|
35 |
jQuery(".mceIframeContainer iframe#content_ifr").css("height", "100%");
|
assets/lang/landing-pages-ar.mo
CHANGED
Binary file
|
assets/lang/landing-pages-ar_SA.mo
CHANGED
Binary file
|
assets/lang/landing-pages-de_DE.mo
CHANGED
Binary file
|
assets/lang/landing-pages-es.mo
CHANGED
Binary file
|
assets/lang/landing-pages-fa_IR.mo
CHANGED
Binary file
|
assets/lang/landing-pages-he_IL.mo
CHANGED
Binary file
|
assets/lang/landing-pages-hu.mo
CHANGED
Binary file
|
assets/lang/landing-pages-pt_BR.mo
CHANGED
Binary file
|
assets/lang/landing-pages-tr_TR.mo
CHANGED
Binary file
|
classes/class.admin-notices.php
CHANGED
@@ -93,7 +93,7 @@ class Landing_Pages_Admin_Notices {
|
|
93 |
|
94 |
?>
|
95 |
<div id="more-templates-button" style="display:none;">
|
96 |
-
<a target="_blank" href="https://www.inboundnow.com/marketplace/?show=landing-pages" class="button new-lp-button button-primary button-large"><?php _e( 'Download
|
97 |
</div>
|
98 |
<script type="text/javascript">
|
99 |
jQuery(document).ready(function($) {
|
93 |
|
94 |
?>
|
95 |
<div id="more-templates-button" style="display:none;">
|
96 |
+
<a target="_blank" href="https://www.inboundnow.com/marketplace/?show=landing-pages" class="button new-lp-button button-primary button-large"><?php _e( 'Download Inbound PRO and join Inbound Now\'s membership plan for access to premium templates.' , 'inbound-pro' ); ?></a>
|
97 |
</div>
|
98 |
<script type="text/javascript">
|
99 |
jQuery(document).ready(function($) {
|
classes/class.post-type.landing-page.php
CHANGED
@@ -335,11 +335,11 @@ class Landing_Pages_Post_Type {
|
|
335 |
$conversions = 0;
|
336 |
|
337 |
foreach ($variations as $vid) {
|
338 |
-
$each_impression = get_post_meta($post->ID, 'lp-ab-variation-impressions-' . $vid, true);
|
339 |
-
$each_conversion = get_post_meta($post->ID, 'lp-ab-variation-conversions-' . $vid, true);
|
340 |
(($each_conversion === "")) ? $final_conversion = 0 : $final_conversion = $each_conversion;
|
341 |
-
$impressions += get_post_meta($post->ID, 'lp-ab-variation-impressions-' . $vid, true);
|
342 |
-
$conversions += get_post_meta($post->ID, 'lp-ab-variation-conversions-' . $vid, true);
|
343 |
}
|
344 |
|
345 |
if ($type_of_stat === "actions") {
|
335 |
$conversions = 0;
|
336 |
|
337 |
foreach ($variations as $vid) {
|
338 |
+
$each_impression = (int) get_post_meta($post->ID, 'lp-ab-variation-impressions-' . $vid, true);
|
339 |
+
$each_conversion = (int) get_post_meta($post->ID, 'lp-ab-variation-conversions-' . $vid, true);
|
340 |
(($each_conversion === "")) ? $final_conversion = 0 : $final_conversion = $each_conversion;
|
341 |
+
$impressions += (int) get_post_meta($post->ID, 'lp-ab-variation-impressions-' . $vid, true);
|
342 |
+
$conversions += (int) get_post_meta($post->ID, 'lp-ab-variation-conversions-' . $vid, true);
|
343 |
}
|
344 |
|
345 |
if ($type_of_stat === "actions") {
|
classes/class.welcome.php
CHANGED
@@ -44,14 +44,6 @@ class LandingPages_Welcome {
|
|
44 |
* @return void
|
45 |
*/
|
46 |
public function admin_menus() {
|
47 |
-
/* About Page */
|
48 |
-
add_dashboard_page(
|
49 |
-
__( 'Welcome to WordPress Landing Pages', 'landing-pages'),
|
50 |
-
__( 'Welcome to WordPress Landing Pages', 'landing-pages'),
|
51 |
-
$this->minimum_capability,
|
52 |
-
'lp-quick-start',
|
53 |
-
array( $this, 'quick_start_screen' )
|
54 |
-
);
|
55 |
/* About InboundNow Page */
|
56 |
add_dashboard_page(
|
57 |
__( 'About the Inbound Now Marketing Platform', 'landing-pages'),
|
@@ -79,7 +71,6 @@ class LandingPages_Welcome {
|
|
79 |
* @return void
|
80 |
*/
|
81 |
public function admin_head() {
|
82 |
-
remove_submenu_page( 'index.php', 'lp-quick-start' );
|
83 |
remove_submenu_page( 'index.php', 'about-inboundnow' );
|
84 |
remove_submenu_page( 'index.php', 'inbound-developers' );
|
85 |
|
@@ -247,7 +238,7 @@ class LandingPages_Welcome {
|
|
247 |
*/
|
248 |
static function render_nav_menu() {
|
249 |
$current_view = $_GET['page'];
|
250 |
-
$page_array = array(
|
251 |
'about-inboundnow' => "About the Platform",
|
252 |
'inbound-developers' => 'Developers & Designers'
|
253 |
);
|
@@ -625,7 +616,7 @@ class LandingPages_Welcome {
|
|
625 |
return;
|
626 |
}
|
627 |
|
628 |
-
wp_safe_redirect( admin_url( 'index.php?page=
|
629 |
}
|
630 |
}
|
631 |
|
44 |
* @return void
|
45 |
*/
|
46 |
public function admin_menus() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
/* About InboundNow Page */
|
48 |
add_dashboard_page(
|
49 |
__( 'About the Inbound Now Marketing Platform', 'landing-pages'),
|
71 |
* @return void
|
72 |
*/
|
73 |
public function admin_head() {
|
|
|
74 |
remove_submenu_page( 'index.php', 'about-inboundnow' );
|
75 |
remove_submenu_page( 'index.php', 'inbound-developers' );
|
76 |
|
238 |
*/
|
239 |
static function render_nav_menu() {
|
240 |
$current_view = $_GET['page'];
|
241 |
+
$page_array = array(
|
242 |
'about-inboundnow' => "About the Platform",
|
243 |
'inbound-developers' => 'Developers & Designers'
|
244 |
);
|
616 |
return;
|
617 |
}
|
618 |
|
619 |
+
wp_safe_redirect( admin_url( 'index.php?page=about-inboundnow' ) ); exit;
|
620 |
}
|
621 |
}
|
622 |
|
landing-pages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: Landing page template framework with variant testing and lead capturing through cooperation with Inbound Now's Leads plugin. This is the stand alone version served through WordPress.org.
|
6 |
-
Version: 2.
|
7 |
Author: Inbound Now
|
8 |
Author URI: https://www.inboundnow.com/?innercity=true
|
9 |
Text Domain: inbound-pro
|
@@ -42,7 +42,7 @@ if (!class_exists('Inbound_Landing_Pages_Plugin')) {
|
|
42 |
*/
|
43 |
private static function load_constants() {
|
44 |
|
45 |
-
define('LANDINGPAGES_CURRENT_VERSION', '2.
|
46 |
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
|
47 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
48 |
define('LANDINGPAGES_PLUGIN_SLUG', 'landing-pages' );
|
3 |
Plugin Name: Landing Pages
|
4 |
Plugin URI: http://www.inboundnow.com/landing-pages/
|
5 |
Description: Landing page template framework with variant testing and lead capturing through cooperation with Inbound Now's Leads plugin. This is the stand alone version served through WordPress.org.
|
6 |
+
Version: 2.7.2
|
7 |
Author: Inbound Now
|
8 |
Author URI: https://www.inboundnow.com/?innercity=true
|
9 |
Text Domain: inbound-pro
|
42 |
*/
|
43 |
private static function load_constants() {
|
44 |
|
45 |
+
define('LANDINGPAGES_CURRENT_VERSION', '2.7.2' );
|
46 |
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
|
47 |
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
|
48 |
define('LANDINGPAGES_PLUGIN_SLUG', 'landing-pages' );
|
readme.txt
CHANGED
@@ -6,8 +6,8 @@ License: GPLv2 or later
|
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.8
|
9 |
-
Tested up to:
|
10 |
-
Stable Tag: 2.
|
11 |
|
12 |
|
13 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
@@ -85,6 +85,10 @@ We also offer a guide for using <a href="https://github.com/inboundnow/inbound-p
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
|
|
88 |
= 2.6.9 =
|
89 |
* Maintenance work on impression storing.
|
90 |
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
|
8 |
Requires at least: 3.8
|
9 |
+
Tested up to: 5.0.2
|
10 |
+
Stable Tag: 2.7.2
|
11 |
|
12 |
|
13 |
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
|
85 |
|
86 |
== Changelog ==
|
87 |
|
88 |
+
= 2.7.1 =
|
89 |
+
* Double Optin Maintenance Work
|
90 |
+
* Typecasting statistics
|
91 |
+
|
92 |
= 2.6.9 =
|
93 |
* Maintenance work on impression storing.
|
94 |
|
shared/assets/js/admin/customizer-parent.js
CHANGED
@@ -12,10 +12,9 @@ var InboundCustomizerParent = (function () {
|
|
12 |
/* triggered from editor frame */
|
13 |
setTimeout(function() {
|
14 |
console.log('reload preview');
|
15 |
-
document.getElementById('
|
16 |
-
//document.getElementById('wp-cta-live-preview').contentDocument.location.reload(true);
|
17 |
|
18 |
-
},
|
19 |
}
|
20 |
};
|
21 |
|
12 |
/* triggered from editor frame */
|
13 |
setTimeout(function() {
|
14 |
console.log('reload preview');
|
15 |
+
document.getElementById('inbound-customizer-preview-id').src = document.getElementById('inbound-customizer-preview-id').src
|
|
|
16 |
|
17 |
+
}, 3000);
|
18 |
}
|
19 |
};
|
20 |
|
shared/assets/js/frontend/analytics-src/analytics.forms.js
CHANGED
@@ -244,15 +244,6 @@ var InboundForms = (function(_inbound) {
|
|
244 |
var lookingFor = utils.trim(match);
|
245 |
var nice_name = lookingFor.replace(/ /g, '_');
|
246 |
|
247 |
-
|
248 |
-
//console.log("NICE NAME", nice_name);
|
249 |
-
//console.log('looking for match on ' + lookingFor);
|
250 |
-
//_inbound.deBugger('forms', 'looking for match on ' + lookingFor + " nice_name= " + nice_name);
|
251 |
-
|
252 |
-
// Check if input has an attached lable using for= tag
|
253 |
-
//var $laxbel = $("label[for='" + $element.attr('id') + "']").text();
|
254 |
-
//var labxel = 'label[for="' + input_id + '"]';
|
255 |
-
|
256 |
/* look for name attribute match */
|
257 |
if (input_name && input_name.toLowerCase().indexOf(lookingFor) > -1) {
|
258 |
found = true;
|
@@ -411,104 +402,91 @@ var InboundForms = (function(_inbound) {
|
|
411 |
|
412 |
},
|
413 |
saveFormData: function(form) {
|
|
|
414 |
var inputsObject = inputsObject || {};
|
415 |
for (var i = 0; i < form.elements.length; i++) {
|
416 |
|
417 |
-
// console.log(inputsObject);
|
418 |
-
|
419 |
formInput = form.elements[i];
|
420 |
multiple = false;
|
421 |
|
422 |
-
if (formInput.name) {
|
|
|
|
|
423 |
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
|
429 |
-
|
430 |
-
//inputName = inputName.replace(/-/g, "_");
|
431 |
-
if (!inputsObject[inputName]) {
|
432 |
-
inputsObject[inputName] = {};
|
433 |
-
}
|
434 |
-
if (formInput.type) {
|
435 |
-
inputsObject[inputName]['type'] = formInput.type;
|
436 |
-
}
|
437 |
-
if (!inputsObject[inputName]['name']) {
|
438 |
-
inputsObject[inputName]['name'] = formInput.name;
|
439 |
-
}
|
440 |
-
if (formInput.dataset.mapFormField) {
|
441 |
-
inputsObject[inputName]['map'] = formInput.dataset.mapFormField;
|
442 |
-
}
|
443 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
|
445 |
-
switch (formInput.nodeName) {
|
446 |
|
447 |
-
|
448 |
-
value = this.getInputValue(formInput);
|
449 |
|
|
|
|
|
450 |
|
451 |
-
if (value === false) {
|
452 |
-
continue;
|
453 |
-
}
|
454 |
-
break;
|
455 |
|
456 |
-
|
457 |
-
|
458 |
-
|
|
|
459 |
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
multiple = true;
|
464 |
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
}
|
470 |
|
471 |
-
|
472 |
-
|
|
|
|
|
473 |
}
|
474 |
|
475 |
-
|
476 |
-
|
|
|
477 |
|
478 |
-
|
|
|
479 |
|
|
|
480 |
|
481 |
-
if (value) {
|
482 |
-
/* inputsObject[inputName].push(multiple ? values.join(',') : encodeURIComponent(value)); */
|
483 |
-
if (!inputsObject[inputName]['value']) {
|
484 |
-
inputsObject[inputName]['value'] = [];
|
485 |
-
}
|
486 |
-
inputsObject[inputName]['value'].push(multiple ? values.join(',') : encodeURIComponent(value));
|
487 |
-
var value = multiple ? values.join(',') : encodeURIComponent(value);
|
488 |
|
|
|
|
|
|
|
|
|
489 |
}
|
|
|
|
|
490 |
|
491 |
}
|
492 |
}
|
493 |
_inbound.deBugger('forms', inputsObject);
|
494 |
|
495 |
-
//console.log('These are the raw values', inputsObject);
|
496 |
-
//_inbound.totalStorage('the_key', inputsObject);
|
497 |
-
//var inputsObject = sortInputs(inputsObject);
|
498 |
-
|
499 |
-
var matchCommon = /name|first name|last name|email|e-mail|phone|website|job title|company|tele|address|comment/;
|
500 |
-
|
501 |
for (var input in inputsObject) {
|
502 |
-
//
|
503 |
|
504 |
var inputValue = inputsObject[input]['value'];
|
505 |
var inputMappedField = inputsObject[input]['map'];
|
506 |
-
//if (matchCommon.test(input) !== false) {
|
507 |
-
//console.log(input + " Matches Regex run mapping test");
|
508 |
-
//var map = inputsObject[input];
|
509 |
-
//console.log("MAPP", map);
|
510 |
-
//mappedParams.push( input + '=' + inputsObject[input]['value'].join(',') );
|
511 |
-
//}
|
512 |
|
513 |
/* Add custom hook here to look for additional values */
|
514 |
if (typeof(inputValue) != "undefined" && inputValue != null && inputValue != "") {
|
@@ -516,30 +494,42 @@ var InboundForms = (function(_inbound) {
|
|
516 |
}
|
517 |
|
518 |
if (typeof(inputMappedField) != "undefined" && inputMappedField != null && inputsObject[input]['value']) {
|
519 |
-
//console.log('Data ATTR', formInput.dataset.mapFormField);
|
520 |
-
mappedParams.push(inputMappedField + "=" + inputsObject[input]['value'].join(','));
|
521 |
-
if (input === 'email') {
|
522 |
-
var email = inputsObject[input]['value'].join(',');
|
523 |
-
//alert(email);
|
524 |
|
525 |
-
|
|
|
526 |
}
|
527 |
}
|
528 |
|
529 |
var raw_params = rawParams.join('&');
|
530 |
_inbound.deBugger('forms', "Stringified Raw Form PARAMS: " + raw_params);
|
531 |
|
532 |
-
var mapped_params =
|
533 |
-
|
|
|
|
|
|
|
534 |
|
535 |
/* Check Use form Email or Cookie */
|
536 |
-
var email = utils.getParameterVal('email', mapped_params) || utils.readCookie('wp_lead_email');
|
537 |
-
|
538 |
-
/* Legacy Email map */
|
539 |
if (!email) {
|
540 |
email = utils.getParameterVal('wpleads_email_address', mapped_params);
|
541 |
}
|
542 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
543 |
var fullName = utils.getParameterVal('name', mapped_params);
|
544 |
var fName = utils.getParameterVal('first_name', mapped_params);
|
545 |
var lName = utils.getParameterVal('last_name', mapped_params);
|
@@ -569,6 +559,7 @@ var InboundForms = (function(_inbound) {
|
|
569 |
_inbound.deBugger('forms', "fName = " + fName);
|
570 |
_inbound.deBugger('forms', "lName = " + lName);
|
571 |
_inbound.deBugger('forms', "fullName = " + fullName);
|
|
|
572 |
|
573 |
//return false;
|
574 |
var page_views = _inbound.totalStorage('page_views') || {};
|
@@ -656,7 +647,7 @@ var InboundForms = (function(_inbound) {
|
|
656 |
var inputsObject = inputsObject || {};
|
657 |
for (var i = 0; i < form.elements.length; i++) {
|
658 |
|
659 |
-
//
|
660 |
|
661 |
formInput = form.elements[i];
|
662 |
multiple = false;
|
@@ -837,8 +828,8 @@ var InboundForms = (function(_inbound) {
|
|
837 |
value = values.join(',');
|
838 |
};
|
839 |
}
|
840 |
-
//
|
841 |
-
//
|
842 |
|
843 |
inputData = {
|
844 |
name: e.target.name,
|
@@ -887,7 +878,7 @@ var InboundForms = (function(_inbound) {
|
|
887 |
} else if (label = this.CheckParentForLabel(input)) {
|
888 |
return label;
|
889 |
} else {
|
890 |
-
//
|
891 |
return false;
|
892 |
}
|
893 |
},
|
@@ -900,7 +891,7 @@ var InboundForms = (function(_inbound) {
|
|
900 |
case 'checkbox':
|
901 |
if (input.checked) {
|
902 |
value = input.value;
|
903 |
-
//
|
904 |
}
|
905 |
break;
|
906 |
|
@@ -939,7 +930,7 @@ var InboundForms = (function(_inbound) {
|
|
939 |
array.splice(index, 1);
|
940 |
}
|
941 |
//_inbound.deBugger('forms', 'removed ' + item + " from array");
|
942 |
-
//
|
943 |
return;
|
944 |
},
|
945 |
/* Look for siblings that are form labels */
|
244 |
var lookingFor = utils.trim(match);
|
245 |
var nice_name = lookingFor.replace(/ /g, '_');
|
246 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
/* look for name attribute match */
|
248 |
if (input_name && input_name.toLowerCase().indexOf(lookingFor) > -1) {
|
249 |
found = true;
|
402 |
|
403 |
},
|
404 |
saveFormData: function(form) {
|
405 |
+
|
406 |
var inputsObject = inputsObject || {};
|
407 |
for (var i = 0; i < form.elements.length; i++) {
|
408 |
|
|
|
|
|
409 |
formInput = form.elements[i];
|
410 |
multiple = false;
|
411 |
|
412 |
+
if (!formInput.name) {
|
413 |
+
continue;
|
414 |
+
}
|
415 |
|
416 |
+
if (formInput.dataset.ignoreFormField) {
|
417 |
+
_inbound.deBugger('forms', 'ignore ' + formInput.name);
|
418 |
+
continue;
|
419 |
+
}
|
420 |
|
421 |
+
inputName = formInput.name.replace(/\[([^\[]*)\]/g, "%5B%5D$1");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
|
423 |
+
if (!inputsObject[inputName]) {
|
424 |
+
inputsObject[inputName] = {};
|
425 |
+
}
|
426 |
+
if (formInput.type) {
|
427 |
+
inputsObject[inputName]['type'] = formInput.type;
|
428 |
+
}
|
429 |
+
if (!inputsObject[inputName]['name']) {
|
430 |
+
inputsObject[inputName]['name'] = formInput.name;
|
431 |
+
}
|
432 |
+
if (formInput.dataset.mapFormField) {
|
433 |
+
inputsObject[inputName]['map'] = formInput.dataset.mapFormField;
|
434 |
+
}
|
435 |
|
|
|
436 |
|
437 |
+
switch (formInput.nodeName) {
|
|
|
438 |
|
439 |
+
case 'INPUT':
|
440 |
+
value = this.getInputValue(formInput);
|
441 |
|
|
|
|
|
|
|
|
|
442 |
|
443 |
+
if (value === false) {
|
444 |
+
continue;
|
445 |
+
}
|
446 |
+
break;
|
447 |
|
448 |
+
case 'TEXTAREA':
|
449 |
+
value = formInput.value;
|
450 |
+
break;
|
|
|
451 |
|
452 |
+
case 'SELECT':
|
453 |
+
if (formInput.multiple) {
|
454 |
+
values = [];
|
455 |
+
multiple = true;
|
|
|
456 |
|
457 |
+
for (var j = 0; j < formInput.length; j++) {
|
458 |
+
if (formInput[j].selected) {
|
459 |
+
values.push(encodeURIComponent(formInput[j].value));
|
460 |
+
}
|
461 |
}
|
462 |
|
463 |
+
} else {
|
464 |
+
value = (formInput.value);
|
465 |
+
}
|
466 |
|
467 |
+
break;
|
468 |
+
}
|
469 |
|
470 |
+
_inbound.deBugger('forms', 'Input Value = ' + value);
|
471 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
|
473 |
+
if (value) {
|
474 |
+
/* inputsObject[inputName].push(multiple ? values.join(',') : encodeURIComponent(value)); */
|
475 |
+
if (!inputsObject[inputName]['value']) {
|
476 |
+
inputsObject[inputName]['value'] = [];
|
477 |
}
|
478 |
+
inputsObject[inputName]['value'].push(multiple ? values.join(',') : encodeURIComponent(value));
|
479 |
+
var value = multiple ? values.join(',') : encodeURIComponent(value);
|
480 |
|
481 |
}
|
482 |
}
|
483 |
_inbound.deBugger('forms', inputsObject);
|
484 |
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
for (var input in inputsObject) {
|
486 |
+
//_inbound.deBugger(input);
|
487 |
|
488 |
var inputValue = inputsObject[input]['value'];
|
489 |
var inputMappedField = inputsObject[input]['map'];
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
|
491 |
/* Add custom hook here to look for additional values */
|
492 |
if (typeof(inputValue) != "undefined" && inputValue != null && inputValue != "") {
|
494 |
}
|
495 |
|
496 |
if (typeof(inputMappedField) != "undefined" && inputMappedField != null && inputsObject[input]['value']) {
|
|
|
|
|
|
|
|
|
|
|
497 |
|
498 |
+
/* update mapped param if already exists */
|
499 |
+
mappedParams[inputMappedField] = inputsObject[input]['value'].join(',');
|
500 |
}
|
501 |
}
|
502 |
|
503 |
var raw_params = rawParams.join('&');
|
504 |
_inbound.deBugger('forms', "Stringified Raw Form PARAMS: " + raw_params);
|
505 |
|
506 |
+
var mapped_params = Object.keys(mappedParams).map(function(key) {
|
507 |
+
return key + '=' + mappedParams[key]
|
508 |
+
}).join('&');
|
509 |
+
_inbound.deBugger(mappedParams);
|
510 |
+
_inbound.deBugger('forms', "Stringified Mapped PARAMS" + mapped_params);
|
511 |
|
512 |
/* Check Use form Email or Cookie */
|
|
|
|
|
|
|
513 |
if (!email) {
|
514 |
email = utils.getParameterVal('wpleads_email_address', mapped_params);
|
515 |
}
|
516 |
|
517 |
+
|
518 |
+
_inbound.deBugger('Email 1:' + email)
|
519 |
+
|
520 |
+
/* fallback 1 */
|
521 |
+
if (!email) {
|
522 |
+
var email = utils.getParameterVal('email', mapped_params)
|
523 |
+
}
|
524 |
+
|
525 |
+
_inbound.deBugger('Email 2:' + email)
|
526 |
+
|
527 |
+
/* fallback 2 */
|
528 |
+
if (!email) {
|
529 |
+
email = utils.readCookie('wp_lead_email');
|
530 |
+
}
|
531 |
+
_inbound.deBugger('Email 3:' + email)
|
532 |
+
|
533 |
var fullName = utils.getParameterVal('name', mapped_params);
|
534 |
var fName = utils.getParameterVal('first_name', mapped_params);
|
535 |
var lName = utils.getParameterVal('last_name', mapped_params);
|
559 |
_inbound.deBugger('forms', "fName = " + fName);
|
560 |
_inbound.deBugger('forms', "lName = " + lName);
|
561 |
_inbound.deBugger('forms', "fullName = " + fullName);
|
562 |
+
_inbound.deBugger('forms', "Email = " + email);
|
563 |
|
564 |
//return false;
|
565 |
var page_views = _inbound.totalStorage('page_views') || {};
|
647 |
var inputsObject = inputsObject || {};
|
648 |
for (var i = 0; i < form.elements.length; i++) {
|
649 |
|
650 |
+
//_inbound.deBugger(inputsObject);
|
651 |
|
652 |
formInput = form.elements[i];
|
653 |
multiple = false;
|
828 |
value = values.join(',');
|
829 |
};
|
830 |
}
|
831 |
+
//_inbound.deBugger(e.target.nodeName);
|
832 |
+
//_inbound.deBugger('change ' + e.target.name + " " + encodeURIComponent(value));
|
833 |
|
834 |
inputData = {
|
835 |
name: e.target.name,
|
878 |
} else if (label = this.CheckParentForLabel(input)) {
|
879 |
return label;
|
880 |
} else {
|
881 |
+
//_inbound.deBugger("no label nf", input);
|
882 |
return false;
|
883 |
}
|
884 |
},
|
891 |
case 'checkbox':
|
892 |
if (input.checked) {
|
893 |
value = input.value;
|
894 |
+
//_inbound.deBugger("CHECKBOX VAL", value)
|
895 |
}
|
896 |
break;
|
897 |
|
930 |
array.splice(index, 1);
|
931 |
}
|
932 |
//_inbound.deBugger('forms', 'removed ' + item + " from array");
|
933 |
+
//_inbound.deBugger('removed ' + item + " from array");
|
934 |
return;
|
935 |
},
|
936 |
/* Look for siblings that are form labels */
|
shared/assets/js/frontend/analytics/inboundAnalytics.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Inbound Analyticsv1.0.0 | (c) 2018 Inbound Now | https://github.com/inboundnow/cta */
|
2 |
/**
|
3 |
* # _inbound
|
4 |
*
|
@@ -130,7 +130,7 @@ var _inbound = (function(options) {
|
|
130 |
return Analytics;
|
131 |
|
132 |
})(_inboundOptions);
|
133 |
-
|
134 |
/**
|
135 |
* # Hooks & Filters
|
136 |
*
|
@@ -536,7 +536,7 @@ var _inboundHooks = (function (_inbound) {
|
|
536 |
return _inbound;
|
537 |
|
538 |
})(_inbound || {});
|
539 |
-
|
540 |
/**
|
541 |
* # _inbound UTILS
|
542 |
*
|
@@ -1395,7 +1395,7 @@ var _inboundUtils = (function(_inbound) {
|
|
1395 |
return _inbound;
|
1396 |
|
1397 |
})(_inbound || {});
|
1398 |
-
|
1399 |
/**
|
1400 |
* # Inbound Forms
|
1401 |
*
|
@@ -1642,15 +1642,6 @@ var InboundForms = (function(_inbound) {
|
|
1642 |
var lookingFor = utils.trim(match);
|
1643 |
var nice_name = lookingFor.replace(/ /g, '_');
|
1644 |
|
1645 |
-
|
1646 |
-
//console.log("NICE NAME", nice_name);
|
1647 |
-
//console.log('looking for match on ' + lookingFor);
|
1648 |
-
//_inbound.deBugger('forms', 'looking for match on ' + lookingFor + " nice_name= " + nice_name);
|
1649 |
-
|
1650 |
-
// Check if input has an attached lable using for= tag
|
1651 |
-
//var $laxbel = $("label[for='" + $element.attr('id') + "']").text();
|
1652 |
-
//var labxel = 'label[for="' + input_id + '"]';
|
1653 |
-
|
1654 |
/* look for name attribute match */
|
1655 |
if (input_name && input_name.toLowerCase().indexOf(lookingFor) > -1) {
|
1656 |
found = true;
|
@@ -1809,104 +1800,91 @@ var InboundForms = (function(_inbound) {
|
|
1809 |
|
1810 |
},
|
1811 |
saveFormData: function(form) {
|
|
|
1812 |
var inputsObject = inputsObject || {};
|
1813 |
for (var i = 0; i < form.elements.length; i++) {
|
1814 |
|
1815 |
-
// console.log(inputsObject);
|
1816 |
-
|
1817 |
formInput = form.elements[i];
|
1818 |
multiple = false;
|
1819 |
|
1820 |
-
if (formInput.name) {
|
|
|
|
|
1821 |
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
|
1827 |
-
|
1828 |
-
//inputName = inputName.replace(/-/g, "_");
|
1829 |
-
if (!inputsObject[inputName]) {
|
1830 |
-
inputsObject[inputName] = {};
|
1831 |
-
}
|
1832 |
-
if (formInput.type) {
|
1833 |
-
inputsObject[inputName]['type'] = formInput.type;
|
1834 |
-
}
|
1835 |
-
if (!inputsObject[inputName]['name']) {
|
1836 |
-
inputsObject[inputName]['name'] = formInput.name;
|
1837 |
-
}
|
1838 |
-
if (formInput.dataset.mapFormField) {
|
1839 |
-
inputsObject[inputName]['map'] = formInput.dataset.mapFormField;
|
1840 |
-
}
|
1841 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1842 |
|
1843 |
-
switch (formInput.nodeName) {
|
1844 |
|
1845 |
-
|
1846 |
-
value = this.getInputValue(formInput);
|
1847 |
|
|
|
|
|
1848 |
|
1849 |
-
if (value === false) {
|
1850 |
-
continue;
|
1851 |
-
}
|
1852 |
-
break;
|
1853 |
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
|
|
1857 |
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
multiple = true;
|
1862 |
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
}
|
1868 |
|
1869 |
-
|
1870 |
-
|
|
|
|
|
1871 |
}
|
1872 |
|
1873 |
-
|
1874 |
-
|
|
|
1875 |
|
1876 |
-
|
|
|
1877 |
|
|
|
1878 |
|
1879 |
-
if (value) {
|
1880 |
-
/* inputsObject[inputName].push(multiple ? values.join(',') : encodeURIComponent(value)); */
|
1881 |
-
if (!inputsObject[inputName]['value']) {
|
1882 |
-
inputsObject[inputName]['value'] = [];
|
1883 |
-
}
|
1884 |
-
inputsObject[inputName]['value'].push(multiple ? values.join(',') : encodeURIComponent(value));
|
1885 |
-
var value = multiple ? values.join(',') : encodeURIComponent(value);
|
1886 |
|
|
|
|
|
|
|
|
|
1887 |
}
|
|
|
|
|
1888 |
|
1889 |
}
|
1890 |
}
|
1891 |
_inbound.deBugger('forms', inputsObject);
|
1892 |
|
1893 |
-
//console.log('These are the raw values', inputsObject);
|
1894 |
-
//_inbound.totalStorage('the_key', inputsObject);
|
1895 |
-
//var inputsObject = sortInputs(inputsObject);
|
1896 |
-
|
1897 |
-
var matchCommon = /name|first name|last name|email|e-mail|phone|website|job title|company|tele|address|comment/;
|
1898 |
-
|
1899 |
for (var input in inputsObject) {
|
1900 |
-
//
|
1901 |
|
1902 |
var inputValue = inputsObject[input]['value'];
|
1903 |
var inputMappedField = inputsObject[input]['map'];
|
1904 |
-
//if (matchCommon.test(input) !== false) {
|
1905 |
-
//console.log(input + " Matches Regex run mapping test");
|
1906 |
-
//var map = inputsObject[input];
|
1907 |
-
//console.log("MAPP", map);
|
1908 |
-
//mappedParams.push( input + '=' + inputsObject[input]['value'].join(',') );
|
1909 |
-
//}
|
1910 |
|
1911 |
/* Add custom hook here to look for additional values */
|
1912 |
if (typeof(inputValue) != "undefined" && inputValue != null && inputValue != "") {
|
@@ -1914,30 +1892,42 @@ var InboundForms = (function(_inbound) {
|
|
1914 |
}
|
1915 |
|
1916 |
if (typeof(inputMappedField) != "undefined" && inputMappedField != null && inputsObject[input]['value']) {
|
1917 |
-
//console.log('Data ATTR', formInput.dataset.mapFormField);
|
1918 |
-
mappedParams.push(inputMappedField + "=" + inputsObject[input]['value'].join(','));
|
1919 |
-
if (input === 'email') {
|
1920 |
-
var email = inputsObject[input]['value'].join(',');
|
1921 |
-
//alert(email);
|
1922 |
|
1923 |
-
|
|
|
1924 |
}
|
1925 |
}
|
1926 |
|
1927 |
var raw_params = rawParams.join('&');
|
1928 |
_inbound.deBugger('forms', "Stringified Raw Form PARAMS: " + raw_params);
|
1929 |
|
1930 |
-
var mapped_params =
|
1931 |
-
|
|
|
|
|
|
|
1932 |
|
1933 |
/* Check Use form Email or Cookie */
|
1934 |
-
var email = utils.getParameterVal('email', mapped_params) || utils.readCookie('wp_lead_email');
|
1935 |
-
|
1936 |
-
/* Legacy Email map */
|
1937 |
if (!email) {
|
1938 |
email = utils.getParameterVal('wpleads_email_address', mapped_params);
|
1939 |
}
|
1940 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1941 |
var fullName = utils.getParameterVal('name', mapped_params);
|
1942 |
var fName = utils.getParameterVal('first_name', mapped_params);
|
1943 |
var lName = utils.getParameterVal('last_name', mapped_params);
|
@@ -1967,6 +1957,7 @@ var InboundForms = (function(_inbound) {
|
|
1967 |
_inbound.deBugger('forms', "fName = " + fName);
|
1968 |
_inbound.deBugger('forms', "lName = " + lName);
|
1969 |
_inbound.deBugger('forms', "fullName = " + fullName);
|
|
|
1970 |
|
1971 |
//return false;
|
1972 |
var page_views = _inbound.totalStorage('page_views') || {};
|
@@ -2054,7 +2045,7 @@ var InboundForms = (function(_inbound) {
|
|
2054 |
var inputsObject = inputsObject || {};
|
2055 |
for (var i = 0; i < form.elements.length; i++) {
|
2056 |
|
2057 |
-
//
|
2058 |
|
2059 |
formInput = form.elements[i];
|
2060 |
multiple = false;
|
@@ -2235,8 +2226,8 @@ var InboundForms = (function(_inbound) {
|
|
2235 |
value = values.join(',');
|
2236 |
};
|
2237 |
}
|
2238 |
-
//
|
2239 |
-
//
|
2240 |
|
2241 |
inputData = {
|
2242 |
name: e.target.name,
|
@@ -2285,7 +2276,7 @@ var InboundForms = (function(_inbound) {
|
|
2285 |
} else if (label = this.CheckParentForLabel(input)) {
|
2286 |
return label;
|
2287 |
} else {
|
2288 |
-
//
|
2289 |
return false;
|
2290 |
}
|
2291 |
},
|
@@ -2298,7 +2289,7 @@ var InboundForms = (function(_inbound) {
|
|
2298 |
case 'checkbox':
|
2299 |
if (input.checked) {
|
2300 |
value = input.value;
|
2301 |
-
//
|
2302 |
}
|
2303 |
break;
|
2304 |
|
@@ -2337,7 +2328,7 @@ var InboundForms = (function(_inbound) {
|
|
2337 |
array.splice(index, 1);
|
2338 |
}
|
2339 |
//_inbound.deBugger('forms', 'removed ' + item + " from array");
|
2340 |
-
//
|
2341 |
return;
|
2342 |
},
|
2343 |
/* Look for siblings that are form labels */
|
@@ -2611,7 +2602,7 @@ var InboundForms = (function(_inbound) {
|
|
2611 |
return _inbound;
|
2612 |
|
2613 |
})(_inbound || {});
|
2614 |
-
|
2615 |
/**
|
2616 |
* # Analytics Events
|
2617 |
*
|
@@ -3221,140 +3212,140 @@ function inboundFormNoRedirectContent(){
|
|
3221 |
}
|
3222 |
|
3223 |
_inbound.add_action( 'form_after_submission', inboundFormNoRedirectContent, 10 );
|
3224 |
-
|
3225 |
-
/* LocalStorage Component */
|
3226 |
-
var InboundTotalStorage = (function (_inbound){
|
3227 |
-
|
3228 |
-
var supported, ls, mod = '_inbound';
|
3229 |
-
if ('localStorage' in window){
|
3230 |
-
try {
|
3231 |
-
ls = (typeof window.localStorage === 'undefined') ? undefined : window.localStorage;
|
3232 |
-
if (typeof ls == 'undefined' || typeof window.JSON == 'undefined'){
|
3233 |
-
supported = false;
|
3234 |
-
} else {
|
3235 |
-
supported = true;
|
3236 |
-
}
|
3237 |
-
window.localStorage.setItem(mod, '1');
|
3238 |
-
window.localStorage.removeItem(mod);
|
3239 |
-
}
|
3240 |
-
catch (err){
|
3241 |
-
supported = false;
|
3242 |
-
}
|
3243 |
-
}
|
3244 |
-
|
3245 |
-
/* Make the methods public */
|
3246 |
-
_inbound.totalStorage = function(key, value, options){
|
3247 |
-
return _inbound.totalStorage.impl.init(key, value);
|
3248 |
-
};
|
3249 |
-
|
3250 |
-
_inbound.totalStorage.setItem = function(key, value){
|
3251 |
-
return _inbound.totalStorage.impl.setItem(key, value);
|
3252 |
-
};
|
3253 |
-
|
3254 |
-
_inbound.totalStorage.getItem = function(key){
|
3255 |
-
return _inbound.totalStorage.impl.getItem(key);
|
3256 |
-
};
|
3257 |
-
|
3258 |
-
_inbound.totalStorage.getAll = function(){
|
3259 |
-
return _inbound.totalStorage.impl.getAll();
|
3260 |
-
};
|
3261 |
-
|
3262 |
-
_inbound.totalStorage.deleteItem = function(key){
|
3263 |
-
return _inbound.totalStorage.impl.deleteItem(key);
|
3264 |
-
};
|
3265 |
-
|
3266 |
-
|
3267 |
-
_inbound.totalStorage.impl = {
|
3268 |
-
|
3269 |
-
init: function(key, value){
|
3270 |
-
if (typeof value != 'undefined') {
|
3271 |
-
return this.setItem(key, value);
|
3272 |
-
} else {
|
3273 |
-
return this.getItem(key);
|
3274 |
-
}
|
3275 |
-
},
|
3276 |
-
|
3277 |
-
setItem: function(key, value){
|
3278 |
-
if (!supported){
|
3279 |
-
try {
|
3280 |
-
_inbound.Utils.createCookie(key, value);
|
3281 |
-
return value;
|
3282 |
-
} catch(e){
|
3283 |
-
console.log('Local Storage not supported by this browser. Install the cookie plugin on your site to take advantage of the same functionality. You can get it at https://github.com/carhartl/jquery-cookie');
|
3284 |
-
}
|
3285 |
-
}
|
3286 |
-
var saver = JSON.stringify(value);
|
3287 |
-
ls.setItem(key, saver);
|
3288 |
-
return this.parseResult(saver);
|
3289 |
-
},
|
3290 |
-
getItem: function(key){
|
3291 |
-
if (!supported){
|
3292 |
-
try {
|
3293 |
-
return this.parseResult(_inbound.Utils.readCookie(key));
|
3294 |
-
} catch(e){
|
3295 |
-
return null;
|
3296 |
-
}
|
3297 |
-
}
|
3298 |
-
var item = ls.getItem(key);
|
3299 |
-
return this.parseResult(item);
|
3300 |
-
},
|
3301 |
-
deleteItem: function(key){
|
3302 |
-
if (!supported){
|
3303 |
-
try {
|
3304 |
-
_inbound.Utils.eraseCookie(key, null);
|
3305 |
-
return true;
|
3306 |
-
} catch(e){
|
3307 |
-
return false;
|
3308 |
-
}
|
3309 |
-
}
|
3310 |
-
ls.removeItem(key);
|
3311 |
-
return true;
|
3312 |
-
},
|
3313 |
-
getAll: function(){
|
3314 |
-
var items = [];
|
3315 |
-
if (!supported){
|
3316 |
-
try {
|
3317 |
-
var pairs = document.cookie.split(";");
|
3318 |
-
for (var i = 0; i<pairs.length; i++){
|
3319 |
-
var pair = pairs[i].split('=');
|
3320 |
-
var key = pair[0];
|
3321 |
-
items.push({key:key, value:this.parseResult(_inbound.Utils.readCookie(key))});
|
3322 |
-
}
|
3323 |
-
} catch(e){
|
3324 |
-
return null;
|
3325 |
-
}
|
3326 |
-
} else {
|
3327 |
-
for (var j in ls){
|
3328 |
-
if (j.length){
|
3329 |
-
items.push({key:j, value:this.parseResult(ls.getItem(j))});
|
3330 |
-
}
|
3331 |
-
}
|
3332 |
-
}
|
3333 |
-
return items;
|
3334 |
-
},
|
3335 |
-
parseResult: function(res){
|
3336 |
-
var ret;
|
3337 |
-
try {
|
3338 |
-
ret = JSON.parse(res);
|
3339 |
-
if (typeof ret == 'undefined'){
|
3340 |
-
ret = res;
|
3341 |
-
}
|
3342 |
-
if (ret == 'true'){
|
3343 |
-
ret = true;
|
3344 |
-
}
|
3345 |
-
if (ret == 'false'){
|
3346 |
-
ret = false;
|
3347 |
-
}
|
3348 |
-
if (parseFloat(ret) == ret && typeof ret != "object"){
|
3349 |
-
ret = parseFloat(ret);
|
3350 |
-
}
|
3351 |
-
} catch(e){
|
3352 |
-
ret = res;
|
3353 |
-
}
|
3354 |
-
return ret;
|
3355 |
-
}
|
3356 |
-
};
|
3357 |
-
})(_inbound || {});
|
3358 |
/**
|
3359 |
* Leads API functions
|
3360 |
* @param Object _inbound - Main JS object
|
@@ -3442,7 +3433,7 @@ var _inboundLeadsAPI = (function(_inbound) {
|
|
3442 |
|
3443 |
return _inbound;
|
3444 |
|
3445 |
-
})(_inbound || {});
|
3446 |
/**
|
3447 |
* # Page View Tracking
|
3448 |
*
|
@@ -3818,7 +3809,7 @@ var _inboundPageTracking = (function(_inbound) {
|
|
3818 |
|
3819 |
return _inbound;
|
3820 |
|
3821 |
-
})(_inbound || {});
|
3822 |
/**
|
3823 |
* # Start
|
3824 |
*
|
1 |
+
/*! Inbound Analyticsv1.0.0 | (c) 2018 Inbound Now | https://github.com/inboundnow/cta */
|
2 |
/**
|
3 |
* # _inbound
|
4 |
*
|
130 |
return Analytics;
|
131 |
|
132 |
})(_inboundOptions);
|
133 |
+
|
134 |
/**
|
135 |
* # Hooks & Filters
|
136 |
*
|
536 |
return _inbound;
|
537 |
|
538 |
})(_inbound || {});
|
539 |
+
|
540 |
/**
|
541 |
* # _inbound UTILS
|
542 |
*
|
1395 |
return _inbound;
|
1396 |
|
1397 |
})(_inbound || {});
|
1398 |
+
|
1399 |
/**
|
1400 |
* # Inbound Forms
|
1401 |
*
|
1642 |
var lookingFor = utils.trim(match);
|
1643 |
var nice_name = lookingFor.replace(/ /g, '_');
|
1644 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1645 |
/* look for name attribute match */
|
1646 |
if (input_name && input_name.toLowerCase().indexOf(lookingFor) > -1) {
|
1647 |
found = true;
|
1800 |
|
1801 |
},
|
1802 |
saveFormData: function(form) {
|
1803 |
+
|
1804 |
var inputsObject = inputsObject || {};
|
1805 |
for (var i = 0; i < form.elements.length; i++) {
|
1806 |
|
|
|
|
|
1807 |
formInput = form.elements[i];
|
1808 |
multiple = false;
|
1809 |
|
1810 |
+
if (!formInput.name) {
|
1811 |
+
continue;
|
1812 |
+
}
|
1813 |
|
1814 |
+
if (formInput.dataset.ignoreFormField) {
|
1815 |
+
_inbound.deBugger('forms', 'ignore ' + formInput.name);
|
1816 |
+
continue;
|
1817 |
+
}
|
1818 |
|
1819 |
+
inputName = formInput.name.replace(/\[([^\[]*)\]/g, "%5B%5D$1");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1820 |
|
1821 |
+
if (!inputsObject[inputName]) {
|
1822 |
+
inputsObject[inputName] = {};
|
1823 |
+
}
|
1824 |
+
if (formInput.type) {
|
1825 |
+
inputsObject[inputName]['type'] = formInput.type;
|
1826 |
+
}
|
1827 |
+
if (!inputsObject[inputName]['name']) {
|
1828 |
+
inputsObject[inputName]['name'] = formInput.name;
|
1829 |
+
}
|
1830 |
+
if (formInput.dataset.mapFormField) {
|
1831 |
+
inputsObject[inputName]['map'] = formInput.dataset.mapFormField;
|
1832 |
+
}
|
1833 |
|
|
|
1834 |
|
1835 |
+
switch (formInput.nodeName) {
|
|
|
1836 |
|
1837 |
+
case 'INPUT':
|
1838 |
+
value = this.getInputValue(formInput);
|
1839 |
|
|
|
|
|
|
|
|
|
1840 |
|
1841 |
+
if (value === false) {
|
1842 |
+
continue;
|
1843 |
+
}
|
1844 |
+
break;
|
1845 |
|
1846 |
+
case 'TEXTAREA':
|
1847 |
+
value = formInput.value;
|
1848 |
+
break;
|
|
|
1849 |
|
1850 |
+
case 'SELECT':
|
1851 |
+
if (formInput.multiple) {
|
1852 |
+
values = [];
|
1853 |
+
multiple = true;
|
|
|
1854 |
|
1855 |
+
for (var j = 0; j < formInput.length; j++) {
|
1856 |
+
if (formInput[j].selected) {
|
1857 |
+
values.push(encodeURIComponent(formInput[j].value));
|
1858 |
+
}
|
1859 |
}
|
1860 |
|
1861 |
+
} else {
|
1862 |
+
value = (formInput.value);
|
1863 |
+
}
|
1864 |
|
1865 |
+
break;
|
1866 |
+
}
|
1867 |
|
1868 |
+
_inbound.deBugger('forms', 'Input Value = ' + value);
|
1869 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1870 |
|
1871 |
+
if (value) {
|
1872 |
+
/* inputsObject[inputName].push(multiple ? values.join(',') : encodeURIComponent(value)); */
|
1873 |
+
if (!inputsObject[inputName]['value']) {
|
1874 |
+
inputsObject[inputName]['value'] = [];
|
1875 |
}
|
1876 |
+
inputsObject[inputName]['value'].push(multiple ? values.join(',') : encodeURIComponent(value));
|
1877 |
+
var value = multiple ? values.join(',') : encodeURIComponent(value);
|
1878 |
|
1879 |
}
|
1880 |
}
|
1881 |
_inbound.deBugger('forms', inputsObject);
|
1882 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1883 |
for (var input in inputsObject) {
|
1884 |
+
//_inbound.deBugger(input);
|
1885 |
|
1886 |
var inputValue = inputsObject[input]['value'];
|
1887 |
var inputMappedField = inputsObject[input]['map'];
|
|
|
|
|
|
|
|
|
|
|
|
|
1888 |
|
1889 |
/* Add custom hook here to look for additional values */
|
1890 |
if (typeof(inputValue) != "undefined" && inputValue != null && inputValue != "") {
|
1892 |
}
|
1893 |
|
1894 |
if (typeof(inputMappedField) != "undefined" && inputMappedField != null && inputsObject[input]['value']) {
|
|
|
|
|
|
|
|
|
|
|
1895 |
|
1896 |
+
/* update mapped param if already exists */
|
1897 |
+
mappedParams[inputMappedField] = inputsObject[input]['value'].join(',');
|
1898 |
}
|
1899 |
}
|
1900 |
|
1901 |
var raw_params = rawParams.join('&');
|
1902 |
_inbound.deBugger('forms', "Stringified Raw Form PARAMS: " + raw_params);
|
1903 |
|
1904 |
+
var mapped_params = Object.keys(mappedParams).map(function(key) {
|
1905 |
+
return key + '=' + mappedParams[key]
|
1906 |
+
}).join('&');
|
1907 |
+
_inbound.deBugger(mappedParams);
|
1908 |
+
_inbound.deBugger('forms', "Stringified Mapped PARAMS" + mapped_params);
|
1909 |
|
1910 |
/* Check Use form Email or Cookie */
|
|
|
|
|
|
|
1911 |
if (!email) {
|
1912 |
email = utils.getParameterVal('wpleads_email_address', mapped_params);
|
1913 |
}
|
1914 |
|
1915 |
+
|
1916 |
+
_inbound.deBugger('Email 1:' + email)
|
1917 |
+
|
1918 |
+
/* fallback 1 */
|
1919 |
+
if (!email) {
|
1920 |
+
var email = utils.getParameterVal('email', mapped_params)
|
1921 |
+
}
|
1922 |
+
|
1923 |
+
_inbound.deBugger('Email 2:' + email)
|
1924 |
+
|
1925 |
+
/* fallback 2 */
|
1926 |
+
if (!email) {
|
1927 |
+
email = utils.readCookie('wp_lead_email');
|
1928 |
+
}
|
1929 |
+
_inbound.deBugger('Email 3:' + email)
|
1930 |
+
|
1931 |
var fullName = utils.getParameterVal('name', mapped_params);
|
1932 |
var fName = utils.getParameterVal('first_name', mapped_params);
|
1933 |
var lName = utils.getParameterVal('last_name', mapped_params);
|
1957 |
_inbound.deBugger('forms', "fName = " + fName);
|
1958 |
_inbound.deBugger('forms', "lName = " + lName);
|
1959 |
_inbound.deBugger('forms', "fullName = " + fullName);
|
1960 |
+
_inbound.deBugger('forms', "Email = " + email);
|
1961 |
|
1962 |
//return false;
|
1963 |
var page_views = _inbound.totalStorage('page_views') || {};
|
2045 |
var inputsObject = inputsObject || {};
|
2046 |
for (var i = 0; i < form.elements.length; i++) {
|
2047 |
|
2048 |
+
//_inbound.deBugger(inputsObject);
|
2049 |
|
2050 |
formInput = form.elements[i];
|
2051 |
multiple = false;
|
2226 |
value = values.join(',');
|
2227 |
};
|
2228 |
}
|
2229 |
+
//_inbound.deBugger(e.target.nodeName);
|
2230 |
+
//_inbound.deBugger('change ' + e.target.name + " " + encodeURIComponent(value));
|
2231 |
|
2232 |
inputData = {
|
2233 |
name: e.target.name,
|
2276 |
} else if (label = this.CheckParentForLabel(input)) {
|
2277 |
return label;
|
2278 |
} else {
|
2279 |
+
//_inbound.deBugger("no label nf", input);
|
2280 |
return false;
|
2281 |
}
|
2282 |
},
|
2289 |
case 'checkbox':
|
2290 |
if (input.checked) {
|
2291 |
value = input.value;
|
2292 |
+
//_inbound.deBugger("CHECKBOX VAL", value)
|
2293 |
}
|
2294 |
break;
|
2295 |
|
2328 |
array.splice(index, 1);
|
2329 |
}
|
2330 |
//_inbound.deBugger('forms', 'removed ' + item + " from array");
|
2331 |
+
//_inbound.deBugger('removed ' + item + " from array");
|
2332 |
return;
|
2333 |
},
|
2334 |
/* Look for siblings that are form labels */
|
2602 |
return _inbound;
|
2603 |
|
2604 |
})(_inbound || {});
|
2605 |
+
|
2606 |
/**
|
2607 |
* # Analytics Events
|
2608 |
*
|
3212 |
}
|
3213 |
|
3214 |
_inbound.add_action( 'form_after_submission', inboundFormNoRedirectContent, 10 );
|
3215 |
+
|
3216 |
+
/* LocalStorage Component */
|
3217 |
+
var InboundTotalStorage = (function (_inbound){
|
3218 |
+
|
3219 |
+
var supported, ls, mod = '_inbound';
|
3220 |
+
if ('localStorage' in window){
|
3221 |
+
try {
|
3222 |
+
ls = (typeof window.localStorage === 'undefined') ? undefined : window.localStorage;
|
3223 |
+
if (typeof ls == 'undefined' || typeof window.JSON == 'undefined'){
|
3224 |
+
supported = false;
|
3225 |
+
} else {
|
3226 |
+
supported = true;
|
3227 |
+
}
|
3228 |
+
window.localStorage.setItem(mod, '1');
|
3229 |
+
window.localStorage.removeItem(mod);
|
3230 |
+
}
|
3231 |
+
catch (err){
|
3232 |
+
supported = false;
|
3233 |
+
}
|
3234 |
+
}
|
3235 |
+
|
3236 |
+
/* Make the methods public */
|
3237 |
+
_inbound.totalStorage = function(key, value, options){
|
3238 |
+
return _inbound.totalStorage.impl.init(key, value);
|
3239 |
+
};
|
3240 |
+
|
3241 |
+
_inbound.totalStorage.setItem = function(key, value){
|
3242 |
+
return _inbound.totalStorage.impl.setItem(key, value);
|
3243 |
+
};
|
3244 |
+
|
3245 |
+
_inbound.totalStorage.getItem = function(key){
|
3246 |
+
return _inbound.totalStorage.impl.getItem(key);
|
3247 |
+
};
|
3248 |
+
|
3249 |
+
_inbound.totalStorage.getAll = function(){
|
3250 |
+
return _inbound.totalStorage.impl.getAll();
|
3251 |
+
};
|
3252 |
+
|
3253 |
+
_inbound.totalStorage.deleteItem = function(key){
|
3254 |
+
return _inbound.totalStorage.impl.deleteItem(key);
|
3255 |
+
};
|
3256 |
+
|
3257 |
+
|
3258 |
+
_inbound.totalStorage.impl = {
|
3259 |
+
|
3260 |
+
init: function(key, value){
|
3261 |
+
if (typeof value != 'undefined') {
|
3262 |
+
return this.setItem(key, value);
|
3263 |
+
} else {
|
3264 |
+
return this.getItem(key);
|
3265 |
+
}
|
3266 |
+
},
|
3267 |
+
|
3268 |
+
setItem: function(key, value){
|
3269 |
+
if (!supported){
|
3270 |
+
try {
|
3271 |
+
_inbound.Utils.createCookie(key, value);
|
3272 |
+
return value;
|
3273 |
+
} catch(e){
|
3274 |
+
console.log('Local Storage not supported by this browser. Install the cookie plugin on your site to take advantage of the same functionality. You can get it at https://github.com/carhartl/jquery-cookie');
|
3275 |
+
}
|
3276 |
+
}
|
3277 |
+
var saver = JSON.stringify(value);
|
3278 |
+
ls.setItem(key, saver);
|
3279 |
+
return this.parseResult(saver);
|
3280 |
+
},
|
3281 |
+
getItem: function(key){
|
3282 |
+
if (!supported){
|
3283 |
+
try {
|
3284 |
+
return this.parseResult(_inbound.Utils.readCookie(key));
|
3285 |
+
} catch(e){
|
3286 |
+
return null;
|
3287 |
+
}
|
3288 |
+
}
|
3289 |
+
var item = ls.getItem(key);
|
3290 |
+
return this.parseResult(item);
|
3291 |
+
},
|
3292 |
+
deleteItem: function(key){
|
3293 |
+
if (!supported){
|
3294 |
+
try {
|
3295 |
+
_inbound.Utils.eraseCookie(key, null);
|
3296 |
+
return true;
|
3297 |
+
} catch(e){
|
3298 |
+
return false;
|
3299 |
+
}
|
3300 |
+
}
|
3301 |
+
ls.removeItem(key);
|
3302 |
+
return true;
|
3303 |
+
},
|
3304 |
+
getAll: function(){
|
3305 |
+
var items = [];
|
3306 |
+
if (!supported){
|
3307 |
+
try {
|
3308 |
+
var pairs = document.cookie.split(";");
|
3309 |
+
for (var i = 0; i<pairs.length; i++){
|
3310 |
+
var pair = pairs[i].split('=');
|
3311 |
+
var key = pair[0];
|
3312 |
+
items.push({key:key, value:this.parseResult(_inbound.Utils.readCookie(key))});
|
3313 |
+
}
|
3314 |
+
} catch(e){
|
3315 |
+
return null;
|
3316 |
+
}
|
3317 |
+
} else {
|
3318 |
+
for (var j in ls){
|
3319 |
+
if (j.length){
|
3320 |
+
items.push({key:j, value:this.parseResult(ls.getItem(j))});
|
3321 |
+
}
|
3322 |
+
}
|
3323 |
+
}
|
3324 |
+
return items;
|
3325 |
+
},
|
3326 |
+
parseResult: function(res){
|
3327 |
+
var ret;
|
3328 |
+
try {
|
3329 |
+
ret = JSON.parse(res);
|
3330 |
+
if (typeof ret == 'undefined'){
|
3331 |
+
ret = res;
|
3332 |
+
}
|
3333 |
+
if (ret == 'true'){
|
3334 |
+
ret = true;
|
3335 |
+
}
|
3336 |
+
if (ret == 'false'){
|
3337 |
+
ret = false;
|
3338 |
+
}
|
3339 |
+
if (parseFloat(ret) == ret && typeof ret != "object"){
|
3340 |
+
ret = parseFloat(ret);
|
3341 |
+
}
|
3342 |
+
} catch(e){
|
3343 |
+
ret = res;
|
3344 |
+
}
|
3345 |
+
return ret;
|
3346 |
+
}
|
3347 |
+
};
|
3348 |
+
})(_inbound || {});
|
3349 |
/**
|
3350 |
* Leads API functions
|
3351 |
* @param Object _inbound - Main JS object
|
3433 |
|
3434 |
return _inbound;
|
3435 |
|
3436 |
+
})(_inbound || {});
|
3437 |
/**
|
3438 |
* # Page View Tracking
|
3439 |
*
|
3809 |
|
3810 |
return _inbound;
|
3811 |
|
3812 |
+
})(_inbound || {});
|
3813 |
/**
|
3814 |
* # Start
|
3815 |
*
|
shared/assets/js/frontend/analytics/inboundAnalytics.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/*! Inbound Analyticsv1.0.0 | (c) 2018 Inbound Now | https://github.com/inboundnow/cta */
|
2 |
-
function inboundFormNoRedirect(){if(null==window.frames.frameElement)e=document.querySelectorAll("button.inbound-button-submit[disabled]")[0];else if("iframe"==window.frames.frameElement.tagName.toLowerCase())var e=window.frames.frameElement.contentWindow.document.querySelectorAll("button.inbound-button-submit")[0];if(void 0!==e){var t=e.form,n=t.querySelectorAll('input[value][type="hidden"][name="inbound_furl"]:not([value=""])');0!=n.length&&"IA=="!=n[0].value||(t.action="javascript:void(0)")}}function inboundFormNoRedirectContent(){if(null==window.frames.frameElement)e=document.querySelectorAll("button.inbound-button-submit[disabled]")[0];else if("iframe"==window.frames.frameElement.tagName.toLowerCase())var e=window.frames.frameElement.contentWindow.document.querySelectorAll("button.inbound-button-submit")[0];if(void 0!==e){var t=e.form.querySelectorAll('input[value][type="hidden"][name="inbound_furl"]:not([value=""])'),n=jQuery(e).css("background"),o=jQuery(e).css("color"),i=jQuery(e).css("height"),a=e.getElementsByClassName("inbound-form-spinner");0!=t.length&&"IA=="!=t[0].value||(jQuery(a).remove(),jQuery(e).prepend('<div id="redir-check"><i class="fa fa-check-square" aria-hidden="true" style="background='+n+"; color="+o+"; font-size:calc("+i+' * .42);"></i></div>'))}}var inbound_data=inbound_data||{},_inboundOptions=_inboundOptions||{},_gaq=_gaq||[],_inbound=function(e){var t={timeout:inbound_settings.is_admin?500:1e4,formAutoTracking:!0,formAutoPopulation:!0},n={init:function(){_inbound.Utils.init(),_inbound.Utils.domReady(window,function(){_inbound.DomLoaded()})},DomLoaded:function(){_inbound.PageTracking.init(),_inbound.Forms.init(),_inbound.Utils.setUrlParams(),_inbound.LeadsAPI.init(),setTimeout(function(){_inbound.Forms.init()},2e3),_inbound.trigger("analytics_ready")},extend:function(e,t){var n,o={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[n]=t[n]);return o},debug:function(e,t){},deBugger:function(e,t,n){if(console){var o,i,a,r=document.location.hash?document.location.hash:"",s=r.indexOf("#debug")>-1,t=t||!1;r&&r.match(/debug/)&&(a=(r=r.split("-"))[1]),i="true"===_inbound.Utils.readCookie("inbound_debug"),((o="true"===_inbound.Utils.readCookie("inbound_debug_"+e))||s||i)&&(t&&"string"==typeof t&&(i||"all"===a?console.log('logAll "'+e+'" =>',t):o?console.log('log "'+e+'" =>',t):e===a&&console.log('#log "'+e+'" =>',t)),n&&n instanceof Function&&n())}}},o=n.extend(t,e);return n.Settings=o||{},n}(_inboundOptions),_inboundHooks=function(e){return e.hooks=new function(){function e(e,t,n,o){if(a[e][t])if(n){var i,r=a[e][t];if(o)for(i=r.length;i--;){var s=r[i];s.callback===n&&s.context===o&&r.splice(i,1)}else for(i=r.length;i--;)r[i].callback===n&&r.splice(i,1)}else a[e][t]=[]}function t(e,t,o,i,r){var s={callback:o,priority:i,context:r},l=a[e][t];l?(l.push(s),l=n(l)):l=[s],a[e][t]=l}function n(e){for(var t,n,o,i=1,a=e.length;i<a;i++){for(t=e[i],n=i;(o=e[n-1])&&o.priority>t.priority;)e[n]=e[n-1],--n;e[n]=t}return e}function o(e,t,n){var o=a[e][t];if(!o)return"filters"===e&&n[0];var i=0,r=o.length;if("filters"===e)for(;i<r;i++)n[0]=o[i].callback.apply(o[i].context,n);else for(;i<r;i++)o[i].callback.apply(o[i].context,n);return"filters"!==e||n[0]}var i={removeFilter:function(t,n){return"string"==typeof t&&e("filters",t,n),i},applyFilters:function(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t?o("filters",t,e):i},addFilter:function(e,n,o,a){return"string"==typeof e&&"function"==typeof n&&t("filters",e,n,o=parseInt(o||10,10)),i},removeAction:function(t,n){return"string"==typeof t&&e("actions",t,n),i},doAction:function(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t&&o("actions",t,e),i},addAction:function(e,n,o,a){return"string"==typeof e&&"function"==typeof n&&t("actions",e,n,o=parseInt(o||10,10),a),i}},a={actions:{},filters:{}};return i},e.add_action=function(){var t=arguments[0].split(" ");for(k in t)arguments[0]="inbound."+t[k],e.hooks.addAction.apply(this,arguments);return this},e.remove_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeAction.apply(this,arguments),this},e.do_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.doAction.apply(this,arguments),this},e.add_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.addFilter.apply(this,arguments),this},e.remove_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeFilter.apply(this,arguments),this},e.apply_filters=function(){return arguments[0]="inbound."+arguments[0],e.hooks.applyFilters.apply(this,arguments)},e}(_inbound||{}),_inboundUtils=function(e){var t,n=window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,o=(Object.prototype.toString,{api_host:("https:"==location.protocol?"https://":"http://")+location.hostname+location.pathname.replace(/\/$/,""),track_pageview:!0,track_links_timeout:300,cookie_name:"_sp",cookie_expiration:365,cookie_domain:(host=location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i))?host[0]:""});return e.Utils={init:function(){this.polyFills(),this.checkLocalStorage(),this.SetUID(),this.storeReferralData()},polyFills:function(){window.console||(window.console={});for(var e=["log","info","warn","error","debug","trace","dir","group","groupCollapsed","groupEnd","time","timeEnd","profile","profileEnd","dirxml","assert","count","markTimeline","timeStamp","clear"],t=0;t<e.length;t++)window.console[e[t]]||(window.console[e[t]]=function(){});Date.prototype.toISOString||function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}();try{new CustomEvent("?")}catch(e){this.CustomEvent=function(e,t){function n(t,n,o,i){this["init"+e](t,n,o,i),"detail"in this||(this.detail=i)}return function(o,i){var a=document.createEvent(e);return null!==o?n.call(a,o,(i||(i=t)).bubbles,i.cancelable,i.detail):a.initCustomEvent=n,a}}(this.CustomEvent?"CustomEvent":"Event",{bubbles:!1,cancelable:!1,detail:null})}document.querySelectorAll||(document.querySelectorAll=function(e){var t,n=document.createElement("style"),o=[];for(document.documentElement.firstChild.appendChild(n),document._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),n.parentNode.removeChild(n);document._qsa.length;)(t=document._qsa.shift()).style.removeAttribute("x-qsa"),o.push(t);return document._qsa=null,o}),document.querySelector||(document.querySelector=function(e){var t=document.querySelectorAll(e);return t.length?t[0]:null}),!("innerText"in document.createElement("a"))&&"getSelection"in window&&HTMLElement.prototype.__defineGetter__("innerText",function(){for(var e,t=window.getSelection(),n=[],o=0;o<t.rangeCount;o++)n[o]=t.getRangeAt(o);t.removeAllRanges(),t.selectAllChildren(this),e=t.toString(),t.removeAllRanges();for(o=0;o<n.length;o++)t.addRange(n[o]);return e})},createCookie:function(e,t,n){var o="";if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),o="; expires="+i.toGMTString()}document.cookie=e+"="+t+o+"; path=/"},readCookie:function(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var i=n[o];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},eraseCookie:function(e){this.createCookie(e,"",-1)},getAllCookies:function(){var t={};if(document.cookie&&""!==document.cookie)for(var n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o].split("=");i[0]=i[0].replace(/^ /,""),t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e.totalStorage("inbound_cookies",t),t},setUrlParams:function(){var n={};!function(){for(var e,t=function(e){return decodeURIComponent(e).replace(/\+/g," ")},o=window.location.search.substring(1),i=/([^&=]+)=?([^&]*)/g;e=i.exec(o);)if("-1"==e[1].indexOf("["))n[t(e[1])]=t(e[2]);else{var a=e[1].indexOf("["),r=e[1].slice(a+1,e[1].indexOf("]",a)),s=t(e[1].slice(0,a));"object"!=typeof n[s]&&(n[t(s)]={},n[t(s)].length=0),r?n[t(s)][t(r)]=t(e[2]):Array.prototype.push.call(n[t(s)],t(e[2]))}}();for(var o in n)if("action"!=o)if("object"==typeof n[o])for(var i in n[o])this.createCookie(i,n[o][i],30);else this.createCookie(o,n[o],30);if(t){var a=e.totalStorage("inbound_url_params")||{},r=this.mergeObjs(a,n);e.totalStorage("inbound_url_params",r)}var s={option1:"yo",option2:"woooo"};e.trigger("url_parameters",n,s)},getAllUrlParams:function(){n={};if(t)var n=e.totalStorage("inbound_url_params");return n},getParameterVal:function(e,t){return(RegExp(e+"=(.+?)(&|$)").exec(t)||[,!1])[1]},checkLocalStorage:function(){if("localStorage"in window)try{ls=void 0===window.localStorage?void 0:window.localStorage,t="undefined"!=typeof ls&&void 0!==window.JSON}catch(e){t=!1}return t},showLocalStorageSize:function(){function e(e){return 2*e.length}function t(e){return e/1024/1024}var n=Object.keys(localStorage).map(function(t){return{name:t,size:e(localStorage[t])}}).map(function(e){return e.size=t(e.size).toFixed(2)+" MB",e});console.table(n)},addDays:function(e,t){return new Date(e.getTime()+24*t*60*60*1e3)},GetDate:function(){var e=new Date,t=e.getDate(),n=t<10?"0":"",o=e.getFullYear(),i=e.getHours(),a=i<10?"0":"",r=e.getMinutes(),s=r<10?"0":"",l=e.getSeconds(),u=l<10?"0":"",c=e.getMonth()+1;return o+"/"+(c<10?"0":"")+c+"/"+n+t+" "+a+i+":"+s+r+":"+u+l},SetSessionTimeout:function(){this.readCookie("lead_session_expire");var e=new Date;e.setTime(e.getTime()+18e5),this.createCookie("lead_session_expire",!0,e)},storeReferralData:function(){var t=new Date,n=document.referrer||"Direct Traffic",o=e.Utils.readCookie("inbound_referral_site"),i=e.totalStorage("inbound_original_referral");t.setTime(t.getTime()+18e5),o||this.createCookie("inbound_referral_site",n,t),i||e.totalStorage("inbound_original_referral",i)},CreateUID:function(e){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),n="";e||(e=Math.floor(Math.random()*t.length));for(var o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n},generateGUID:function(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,guid)},SetUID:function(e){if(!this.readCookie("wp_lead_uid")){var t=e||this.CreateUID(35);this.createCookie("wp_lead_uid",t)}},countProperties:function(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&++t;return t},mergeObjs:function(e,t){var n={};for(var o in e)n[o]=e[o];for(var o in t)n[o]=t[o];return n},hasClass:function(e,t){if("classList"in document.documentElement)n=t.classList.contains(e);else var n=new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className);return n},addClass:function(e,t){"classList"in document.documentElement?t.classList.add(e):this.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(e,t){"classList"in document.documentElement?t.classList.remove(e):this.hasClass(t,e)&&(t.className=t.className.replace(new RegExp("(^|\\s)*"+e+"(\\s|$)*","g"),""))},removeElement:function(e){e.parentNode.removeChild(e)},trim:function(e){return e=e.replace(/(^\s*)|(\s*$)/gi,""),e=e.replace(/[ ]{2,}/gi," "),e=e.replace(/\n /,"\n")},ajaxPolyFill:function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;for(var e,t=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"],n=0;n<t.length;n++)try{e=new ActiveXObject(t[n]);break}catch(e){}return e},ajaxSendData:function(e,t,n,o,i){var a=this.ajaxPolyFill();setTimeout(function(){a.open(n,e,!0),a.onreadystatechange=function(){4==a.readyState&&t(a.responseText)},"POST"==n&&a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o)},100)},ajaxGet:function(e,t,n,o){var i=[];for(var a in t)i.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e+"?"+i.join("&"),n,"GET",null,o)},ajaxPost:function(e,t,n,o){var i=[];for(var a in t)i.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e,n,"POST",i.join("&"),o)},sendEvent:function(e,t,i){t=t||{},async=!0;var a=getCookie();if(a){var r;for(r in a)t[r]=a[r]}t.id||(t.id=getId());var s={e:e,t:(new Date).toISOString(),kv:t},l=o.api_host+"/track?data="+encodeURIComponent(JSON.stringify(s));if(n){var u=new XMLHttpRequest;u.open("GET",l,async),u.withCredentials=async,u.send(null)}else{var c=document.createElement("script");c.type="text/javascript",c.async=async,c.defer=async,c.src=l;var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d)}return action(i),self},domReady:function(e,t){var n=!1,o=!0,i=e.document,a=i.documentElement,r=i.addEventListener?"addEventListener":"attachEvent",s=i.addEventListener?"removeEventListener":"detachEvent",l=i.addEventListener?"":"on",u=function(o){"readystatechange"==o.type&&"complete"!=i.readyState||(("load"==o.type?e:i)[s](l+o.type,u,!1),!n&&(n=!0)&&t.call(e,o.type||o))},c=function(){try{a.doScroll("left")}catch(e){return void setTimeout(c,50)}u("poll")};if("complete"==i.readyState)t.call(e,"lazy");else{if(i.createEventObject&&a.doScroll){try{o=!e.frameElement}catch(e){}o&&c()}i[r](l+"DOMContentLoaded",u,!1),i[r](l+"readystatechange",u,!1),e[r](l+"load",u,!1)}},addListener:function(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n)},removeListener:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},throttle:function(e,t){var n,o,i,a=null,r=0,s=function(){r=new Date,a=null,i=e.apply(n,o)};return function(){var l=new Date;r||(r=l);var u=t-(l-r);return n=this,o=arguments,u<=0?(clearTimeout(a),a=null,r=l,i=e.apply(n,o)):a||(a=setTimeout(s,u)),i}},checkTypeofGA:function(){"function"==typeof ga&&(universalGA=!0),void 0!==_gaq&&"function"==typeof _gaq.push&&(classicGA=!0),"undefined"!=typeof dataLayer&&"function"==typeof dataLayer.push&&(googleTagManager=!0)},cacheSearchData:function(n,o){if(t){var i=e.totalStorage.getItem("inbound_search_storage");if(i)i.unshift(n),e.totalStorage.setItem("inbound_search_storage",i);else{var a=[n];e.totalStorage.setItem("inbound_search_storage",a)}}else{var r=JSON.stringify(n),s=this.readCookie("inbound_search_storage");s&&(r+="SPLIT-TOKEN"+s),this.createCookie("inbound_search_storage",r,"180")}e.Forms.releaseFormSubmit(o)},storeSearchData:function(){if(inbound_settings.wp_lead_data.lead_id&&inbound_settings.wp_lead_data.lead_nonce){var t=[],n=e.totalStorage.getItem("inbound_search_storage"),o=this.readCookie("inbound_search_storage");if(n||o){if(o){o=o.split("SPLIT-TOKEN");for(var i in o)t.push(JSON.parse(o[i]))}n&&(t=t.concat(n)),t.sort(function(e,t){return e.timestamp-t.timestamp});var a={action:"inbound_search_store",data:t=encodeURIComponent(JSON.stringify(t)),nonce:inbound_settings.wp_lead_data.lead_nonce,lead_id:inbound_settings.wp_lead_data.lead_id};callback=function(t){t&&(t=JSON.parse(t)),t.success&&(console.log(t.success),e.Utils.eraseCookie("inbound_search_storage"),e.totalStorage.deleteItem("inbound_search_storage")),t.error&&console.log(t.error)},this.ajaxPost(inbound_settings.admin_url,a,callback)}}}},e}(_inbound||{}),InboundForms=function(e){var t=e.Utils,n=[],o=[],a=[],r={},s=e.Settings,l=["first name","last name","name","email","e-mail","phone","website","job title","your favorite food","company","tele","address","comment"];if(e.Forms={init:function(){e.Forms.runFieldMappingFilters(),e.Forms.formTrackInit(),e.Forms.searchTrackInit()},runFieldMappingFilters:function(){l=e.hooks.applyFilters("forms.field_map",l)},debug:function(e,t){return},formTrackInit:function(){for(var e=0;e<window.document.forms.length;e++){var t=window.document.forms[e];t.dataset.formProcessed||(t.dataset.formProcessed=!0,this.checkTrackStatus(t)&&(this.attachFormSubmitEvent(t),this.initFormMapping(t)))}},searchTrackInit:function(){if("off"!=inbound_settings.search_tracking&&!r.searchTrackInit){for(var e=0;e<window.document.forms.length;e++){var n=window.document.forms[e];n.dataset.searchChecked||(n.dataset.searchChecked=!0,this.checkSearchTrackStatus(n)&&this.attachSearchFormSubmitEvent(n))}t.storeSearchData(),r.searchTrackInit=!0}},checkTrackStatus:function(t){var n=t.getAttribute("class");if(""!==n&&null!==n)return n.toLowerCase().indexOf("wpl-track-me")>-1||(n.toLowerCase().indexOf("inbound-track")>-1||(cb=function(){console.log(t)},e.deBugger("forms","This form not tracked. Please assign on in settings...",cb),!1))},checkSearchTrackStatus:function(t){var n=t.getAttribute("class"),o=t.getAttribute("id");return""!==n&&null!==n&&n.toLowerCase().indexOf("search")>-1||(""===o||null===o?(cb=function(){console.log(t)},e.deBugger("searches","This search form is not tracked. Please assign on in settings...",cb),!1):o.toLowerCase().indexOf("search")>-1||void 0)},loopClassSelectors:function(n,o){for(var i=n.length-1;i>=0;i--){var a=t.trim(n[i]);-1===a.indexOf("#")&&-1===a.indexOf(".")&&(a="#"+a),(a=document.querySelector(a))&&("add"===o?(e.Utils.addClass("wpl-track-me",a),e.Utils.addClass("inbound-track",a)):(e.Utils.removeClass("wpl-track-me",a),e.Utils.removeClass("inbound-track",a)))}},initFormMapping:function(t){for(var n=[],o=0;o<t.elements.length;o++)formInput=t.elements[o],"hidden"!==formInput.type?(this.mapField(formInput),this.rememberInputValues(formInput),s.formAutoPopulation&&!e.Utils.hasClass("nopopulate",t)&&this.fillInputValues(formInput)):n.push(formInput);for(var i=n.length-1;i>=0;i--)formInput=n[i],this.mapField(formInput)},mapField:function(o){var a=o.id||!1,r=o.name||!1,s=this.getInputLabel(o);if(s&&this.ignoreFieldByLabel(s[0].innerText))return o.dataset.ignoreFormField=!0,!1;for(i=0;i<l.length;i++){var u=!1,c=l[i],d=t.trim(c),m=d.replace(/ /g,"_");r&&r.toLowerCase().indexOf(d)>-1?(u=!0,e.deBugger("forms","Found matching name attribute for -> "+d)):a&&a.toLowerCase().indexOf(d)>-1?(u=!0,e.deBugger("forms","Found matching ID attribute for ->"+d)):s?s[0].innerText.toLowerCase().indexOf(d)>-1&&(u=!0,e.deBugger("forms","Found matching sibling label for -> "+d)):n.push(d),u&&(this.addDataAttr(o,m),this.removeArrayItem(l,d),i--)}return inbound_data},formListener:function(t){t.preventDefault(),e.Forms.saveFormData(t.target),document.body.style.cursor="wait"},searchFormListener:function(t){t.preventDefault(),e.Forms.saveSearchData(t.target)},attachFormSubmitEvent:function(e){t.addListener(e,"submit",this.formListener);document.querySelector(".inbound-email")},attachSearchFormSubmitEvent:function(e){t.addListener(e,"submit",this.searchFormListener)},ignoreFieldByLabel:function(t){var n=!1;return!!t&&(-1==t.toLowerCase().indexOf("credit card")&&-1==t.toLowerCase().indexOf("card number")||(n=!0),-1==t.toLowerCase().indexOf("expiration")&&-1==t.toLowerCase().indexOf("expiry")||(n=!0),"month"!=t.toLowerCase()&&"mm"!=t.toLowerCase()&&"yy"!=t.toLowerCase()&&"yyyy"!=t.toLowerCase()&&"year"!=t.toLowerCase()||(n=!0),-1==t.toLowerCase().indexOf("cvv")&&-1==t.toLowerCase().indexOf("cvc")&&-1==t.toLowerCase().indexOf("secure code")&&-1==t.toLowerCase().indexOf("security code")||(n=!0),n&&e.deBugger("forms","ignore "+t),n)},ignoreFieldByValue:function(e){var t=!1;if(!e)return!1;if("visa"!=e.toLowerCase()&&"mastercard"!=e.toLowerCase()&&"american express"!=e.toLowerCase()&&"amex"!=e.toLowerCase()&&"discover"!=e.toLowerCase()||(t=!0),new RegExp("/^[0-9]+$/").test(e)){var n=e.replace(" ","");this.isInt(n)&&n.length>=16&&(t=!0)}return t},isInt:function(e){return"number"==typeof e&&isFinite(e)&&e%1==0},releaseFormSubmit:function(e){document.body.style.cursor="default",t.removeClass("wpl-track-me",e),t.removeListener(e,"submit",this.formListener);var n=e.getAttribute("class");if(""!==n&&null!==n&&-1!=n.toLowerCase().indexOf("wpcf7-form"))return setTimeout(function(){document.body.style.cursor="default"},300),!0;"function"==typeof e.submit?e.submit():"function"==typeof e.click&&jQuery("#"+e.id).find("button").click(),setTimeout(function(){for(var t=0;t<e.elements.length;t++)formInput=e.elements[t],type=formInput.type||!1,"submit"===type&&"submit"===formInput.name&&e.elements[t].click()},2e3)},saveFormData:function(n){for(var i=i||{},r=0;r<n.elements.length;r++)if(formInput=n.elements[r],multiple=!1,formInput.name){if(formInput.dataset.ignoreFormField){e.deBugger("forms","ignore "+formInput.name);continue}switch(inputName=formInput.name.replace(/\[([^\[]*)\]/g,"%5B%5D$1"),i[inputName]||(i[inputName]={}),formInput.type&&(i[inputName].type=formInput.type),i[inputName].name||(i[inputName].name=formInput.name),formInput.dataset.mapFormField&&(i[inputName].map=formInput.dataset.mapFormField),formInput.nodeName){case"INPUT":if(!1===(l=this.getInputValue(formInput)))continue;break;case"TEXTAREA":l=formInput.value;break;case"SELECT":if(formInput.multiple){values=[],multiple=!0;for(var s=0;s<formInput.length;s++)formInput[s].selected&&values.push(encodeURIComponent(formInput[s].value))}else l=formInput.value}if(e.deBugger("forms","Input Value = "+l),l){i[inputName].value||(i[inputName].value=[]),i[inputName].value.push(multiple?values.join(","):encodeURIComponent(l));var l=multiple?values.join(","):encodeURIComponent(l)}}e.deBugger("forms",i);for(var u in i){var c=i[u].value,d=i[u].map;if(void 0!==c&&null!=c&&""!=c&&o.push(u+"="+i[u].value.join(",")),void 0!==d&&null!=d&&i[u].value&&(a.push(d+"="+i[u].value.join(",")),"email"===u))var m=i[u].value.join(",")}var f=o.join("&");e.deBugger("forms","Stringified Raw Form PARAMS: "+f);var g=a.join("&");e.deBugger("forms","Stringified Mapped PARAMS"+g),(m=t.getParameterVal("email",g)||t.readCookie("wp_lead_email"))||(m=t.getParameterVal("wpleads_email_address",g));var p=t.getParameterVal("name",g),h=t.getParameterVal("first_name",g),v=t.getParameterVal("last_name",g);if(!v&&h&&(_=decodeURI(h).split(" ")).length>0&&(h=_[0],v=_[1]),p&&!v&&!h){var _=decodeURI(p).split(" ");_.length>0&&(h=_[0],v=_[1])}p=h&&v?h+" "+v:p,h||(h=""),v||(v=""),e.deBugger("forms","fName = "+h),e.deBugger("forms","lName = "+v),e.deBugger("forms","fullName = "+p);var b=e.totalStorage("page_views")||{},y=e.totalStorage("inbound_url_params")||{},w=n.querySelectorAll('input[value][type="hidden"][name="inbound_furl"]:not([value=""])'),k=!1;if(0==w.length||"IA=="==w[0].value)k=!0;var S=n.querySelectorAll('input[value][type="hidden"][name="inbound_form_id"]');S=S.length>0?S[0].value:0;if("undefined"!=typeof landing_path_info)I=landing_path_info.variation;else if("undefined"!=typeof cta_path_info)I=cta_path_info.variation;else var I=inbound_settings.variation_id;var C=inbound_settings.post_type||"page",L=inbound_settings.post_id||0;search_data={},formData={action:"inbound_lead_store",email:m,full_name:p,first_name:h,last_name:v,raw_params:f,mapped_params:g,url_params:JSON.stringify(y),search_data:"test",page_views:JSON.stringify(b),post_type:C,page_id:L,variation:I,source:t.readCookie("inbound_referral_site"),inbound_submitted:k,inbound_form_id:S,inbound_nonce:inbound_settings.ajax_nonce,event:n},callback=function(o){e.deBugger("forms","Lead Created with ID: "+o),o=parseInt(o,10),formData.leadID=o,o&&(t.createCookie("wp_lead_id",o),e.totalStorage.deleteItem("page_views"),e.totalStorage.deleteItem("tracking_events")),e.trigger("form_after_submission",formData),e.Forms.releaseFormSubmit(n)},e.trigger("form_before_submission",formData),t.ajaxPost(inbound_settings.admin_url,formData,callback)},saveSearchData:function(n){for(var o=o||{},i=0;i<n.elements.length;i++)if(formInput=n.elements[i],multiple=!1,formInput.name){if(formInput.dataset.ignoreFormField){e.deBugger("searches","ignore "+formInput.name);continue}switch(d=formInput.name.replace(/\[([^\[]*)\]/g,"%5B%5D$1"),o[d]||(o[d]={}),formInput.type&&(o[d].type=formInput.type),o[d].name||(o[d].name=formInput.name),formInput.dataset.mapFormField&&(o[d].map=formInput.dataset.mapFormField),formInput.nodeName){case"INPUT":if(!1===(r=this.getInputValue(formInput)))continue;break;case"TEXTAREA":r=formInput.value;break;case"SELECT":if(formInput.multiple){values=[],multiple=!0;for(var a=0;a<formInput.length;a++)formInput[a].selected&&values.push(encodeURIComponent(formInput[a].value))}else r=formInput.value}if(e.deBugger("searches","Input Value = "+r),r){o[d].value||(o[d].value=[]),o[d].value.push(multiple?values.join(","):encodeURIComponent(r));var r=multiple?values.join(","):encodeURIComponent(r)}}e.deBugger("searches",o);var s=[];for(var l in o){var u=o[l].value,c=o[l].type,d=o[l].name;void 0!==u&&null!=u&&""!=u&&("search"==c?s.push("search_text|value|"+o[l].value):"s"==d&&s.push("search_text|value|"+o[l].value))}s[0]||e.Forms.releaseFormSubmit(n);var m=s.join("|field|");if(e.deBugger("searches","Stringified Search Form PARAMS: "+m),"undefined"!=typeof landing_path_info)f=landing_path_info.variation;else if("undefined"!=typeof cta_path_info)f=cta_path_info.variation;else var f=inbound_settings.variation_id;var g=inbound_settings.post_type||"page",p=inbound_settings.post_id||0,h=t.readCookie("wp_lead_uid");inbound_settings.wp_lead_data.lead_email?email=inbound_settings.wp_lead_data.lead_email:t.readCookie("inbound_wpleads_email_address")?email=t.readCookie("inbound_wpleads_email_address"):email="",searchData={email:email,search_data:m,user_UID:h,post_type:g,page_id:p,variation:f,source:t.readCookie("inbound_referral_site"),ip_address:inbound_settings.ip_address,timestamp:Math.floor((new Date).getTime()/1e3)},e.trigger("search_before_caching",searchData),inbound_settings.wp_lead_data.lead_id?(searchData.lead_id=inbound_settings.wp_lead_data.lead_id,t.cacheSearchData(searchData,n)):t.cacheSearchData(searchData,n)},rememberInputValues:function(n){n.name&&n.name;var o=n.type?n.type:"text";if("submit"===o||"hidden"===o||"file"===o||"password"===o||n.dataset.ignoreFormField)return!1;t.addListener(n,"change",function(n){if(n.target.name){if("checkbox"!==o)var i=n.target.value;else for(var a=[],r=document.querySelectorAll('input[name="'+n.target.name+'"]'),s=0;s<r.length;s++)r[s].checked&&a.push(r[s].value),i=a.join(",");inputData={name:n.target.name,node:n.target.nodeName.toLowerCase(),type:o,value:i,mapping:n.target.dataset.mapFormField},e.trigger("form_input_change",inputData),t.createCookie("inbound_"+n.target.name,encodeURIComponent(i))}})},fillInputValues:function(e){var n=e.name?"inbound_"+e.name:"",o=e.type?e.type:"text";if("submit"===o||"hidden"===o||"file"===o||"password"===o)return!1;if(t.readCookie(n)&&"comment"!=n)if(value=decodeURIComponent(t.readCookie(n)),"checkbox"===o||"radio"===o)for(var i=value.split(","),a=0;a<i.length;a++)e.value.indexOf(i[a])>-1&&(e.checked=!0);else"undefined"!==value&&(e.value=value)},getInputLabel:function(e){var t;return(t=this.siblingsIsLabel(e))?t:!!(t=this.CheckParentForLabel(e))&&t},getInputValue:function(e){var t=!1;switch(e.type){case"radio":case"checkbox":e.checked&&(t=e.value);break;case"text":case"hidden":default:t=e.value}return t},addDataAttr:function(e,t){for(var n=document.getElementsByName(e.name),o=n.length-1;o>=0;o--)e.dataset.mapFormField||(n[o].dataset.mapFormField=t)},removeArrayItem:function(e,t){if(e.indexOf)index=e.indexOf(t);else for(index=e.length-1;index>=0&&e[index]!==t;--index);index>=0&&e.splice(index,1)},siblingsIsLabel:function(e){for(var t=this.getSiblings(e),n=[],o=t.length-1;o>=0;o--)"label"===t[o].nodeName.toLowerCase()&&n.push(t[o]);return n.length>0&&n.length<2&&n},getChildren:function(e,t){for(var n=[];e;e=e.nextSibling)1==e.nodeType&&e!=t&&n.push(e);return n},getSiblings:function(e){return this.getChildren(e.parentNode.firstChild,e)},CheckParentForLabel:function(e){if("FORM"===e.nodeName)return null;do{var t=e.getElementsByTagName("label");if(t.length>0&&t.length<2)return e.getElementsByTagName("label")}while(e=e.parentNode);return null},mailCheck:function(){var e=document.querySelector(".inbound-email");e&&(t.addListener(e,"blur",this.mailCheck),u.run({email:document.querySelector(".inbound-email").value,suggested:function(n){var o=document.querySelector(".email_suggestion");o&&t.removeElement(o);var i=document.createElement("span");i.innerHTML="<span class=\"email_suggestion\">Did youu mean <b><i id='email_correction' style='cursor: pointer;' title=\"click to update\">"+n.full+"</b></i>?</span>",e.parentNode.insertBefore(i,e.nextSibling);var a=document.getElementById("email_correction");t.addListener(a,"click",function(){e.value=a.innerHTML,a.parentNode.parentNode.innerHTML="Fixed!"})},empty:function(){}}))}},void 0===u)var u={domainThreshold:1,topLevelThreshold:3,defaultDomains:["yahoo.com","google.com","hotmail.com","gmail.com","me.com","aol.com","mac.com","live.com","comcast.net","googlemail.com","msn.com","hotmail.co.uk","yahoo.co.uk","facebook.com","verizon.net","sbcglobal.net","att.net","gmx.com","mail.com","outlook.com","icloud.com"],defaultTopLevelDomains:["co.jp","co.uk","com","net","org","info","edu","gov","mil","ca","de"],run:function(e){e.domains=e.domains||u.defaultDomains,e.topLevelDomains=e.topLevelDomains||u.defaultTopLevelDomains,e.distanceFunction=e.distanceFunction||u.sift3Distance;var t=function(e){return e},n=e.suggested||t,o=e.empty||t,i=u.suggest(u.encodeEmail(e.email),e.domains,e.topLevelDomains,e.distanceFunction);return i?n(i):o()},suggest:function(e,t,n,o){e=e.toLowerCase();var i=this.splitEmail(e),a=this.findClosestDomain(i.domain,t,o,this.domainThreshold);if(a){if(a!=i.domain)return{address:i.address,domain:a,full:i.address+"@"+a}}else{var r=this.findClosestDomain(i.topLevelDomain,n,o,this.topLevelThreshold);if(i.domain&&r&&r!=i.topLevelDomain){var s=i.domain;return a=s.substring(0,s.lastIndexOf(i.topLevelDomain))+r,{address:i.address,domain:a,full:i.address+"@"+a}}}return!1},findClosestDomain:function(e,t,n,o){o=o||this.topLevelThreshold;var i,a=99,r=null;if(!e||!t)return!1;n||(n=this.sift3Distance);for(var s=0;s<t.length;s++){if(e===t[s])return e;(i=n(e,t[s]))<a&&(a=i,r=t[s])}return a<=o&&null!==r&&r},sift3Distance:function(e,t){if(null===e||0===e.length)return null===t||0===t.length?0:t.length;if(null===t||0===t.length)return e.length;for(var n=0,o=0,i=0,a=0;n+o<e.length&&n+i<t.length;){if(e.charAt(n+o)==t.charAt(n+i))a++;else{o=0,i=0;for(var r=0;r<5;r++){if(n+r<e.length&&e.charAt(n+r)==t.charAt(n)){o=r;break}if(n+r<t.length&&e.charAt(n)==t.charAt(n+r)){i=r;break}}}n++}return(e.length+t.length)/2-a},splitEmail:function(e){var t=e.trim().split("@");if(t.length<2)return!1;for(a=0;a<t.length;a++)if(""===t[a])return!1;var n=t.pop(),o=n.split("."),i="";if(0===o.length)return!1;if(1==o.length)i=o[0];else{for(var a=1;a<o.length;a++)i+=o[a]+".";o.length>=2&&(i=i.substring(0,i.length-1))}return{topLevelDomain:i,domain:n,address:t.join("@")}},encodeEmail:function(e){var t=encodeURI(e);return t=t.replace("%20"," ").replace("%25","%").replace("%5E","^").replace("%60","`").replace("%7B","{").replace("%7C","|").replace("%7D","}")}};return e}(_inbound||{}),_inboundEvents=function(e){function t(t,o,i){var o=o||{};(i=i||{}).bubbles=i.bubbles||!0,i.cancelable=i.cancelable||!0,o=e.apply_filters("filter_"+t,o);!window.ActiveXObject&&window;if("function"==typeof CustomEvent)var a=new CustomEvent(t,{detail:o,bubbles:i.bubbles,cancelable:i.cancelable});else(a=document.createEvent("Event")).initEvent(t,!0,!0);window.dispatchEvent(a),e.do_action(t,o),n(t,o)}function n(e,t){if(window.jQuery){var t=t||{};jQuery(document).trigger(e,t)}}e.trigger=function(t,n){e.Events[t](n)};return e.Events={analytics_ready:function(){t("analytics_ready",{data:"xyxy"},{opt1:!0})},url_parameters:function(e){t("url_parameters",e)},session_start:function(){console.log(""),t("session_start")},session_end:function(e){t("session_end",e),console.log("Session End")},session_active:function(){t("session_active")},session_idle:function(e){t("session_idle",e)},session_resume:function(){t("session_resume")},session_heartbeat:function(e){t("session_heartbeat",{clock:e,leadData:InboundLeadData})},page_visit:function(e){t("page_view",e)},page_first_visit:function(n){t("page_first_visit"),e.deBugger("pages","First Ever Page View of this Page")},page_revisit:function(n){t("page_revisit",n);e.deBugger("pages",status,function(){console.log("pageData",n),console.log("Page Revisit viewed "+n+" times")})},tab_hidden:function(n){e.deBugger("pages","Tab Hidden"),t("tab_hidden")},tab_visible:function(n){e.deBugger("pages","Tab Visible"),t("tab_visible")},tab_mouseout:function(n){e.deBugger("pages","Tab Mouseout"),t("tab_mouseout")},form_input_change:function(n){e.deBugger("forms","inputData change. Data=",function(){console.log(n)}),t("form_input_change",n)},form_before_submission:function(e){t("form_before_submission",e)},form_after_submission:function(e){t("form_after_submission",e)},search_before_caching:function(e){t("search_before_caching",e)},analyticsError:function(e,t,n){var o=new CustomEvent("inbound_analytics_error",{detail:{MLHttpRequest:e,textStatus:t,errorThrown:n}});window.dispatchEvent(o),console.log("Page Save Error")}},e}(_inbound||{});_inbound.add_action("form_before_submission",inboundFormNoRedirect,10),_inbound.add_action("form_after_submission",inboundFormNoRedirectContent,10);var InboundTotalStorage=function(e){var t,n;if("localStorage"in window)try{n=void 0===window.localStorage?void 0:window.localStorage,t=void 0!==n&&void 0!==window.JSON,window.localStorage.setItem("_inbound","1"),window.localStorage.removeItem("_inbound")}catch(e){t=!1}e.totalStorage=function(t,n,o){return e.totalStorage.impl.init(t,n)},e.totalStorage.setItem=function(t,n){return e.totalStorage.impl.setItem(t,n)},e.totalStorage.getItem=function(t){return e.totalStorage.impl.getItem(t)},e.totalStorage.getAll=function(){return e.totalStorage.impl.getAll()},e.totalStorage.deleteItem=function(t){return e.totalStorage.impl.deleteItem(t)},e.totalStorage.impl={init:function(e,t){return void 0!==t?this.setItem(e,t):this.getItem(e)},setItem:function(o,i){if(!t)try{return e.Utils.createCookie(o,i),i}catch(e){console.log("Local Storage not supported by this browser. Install the cookie plugin on your site to take advantage of the same functionality. You can get it at https://github.com/carhartl/jquery-cookie")}var a=JSON.stringify(i);return n.setItem(o,a),this.parseResult(a)},getItem:function(o){if(!t)try{return this.parseResult(e.Utils.readCookie(o))}catch(e){return null}var i=n.getItem(o);return this.parseResult(i)},deleteItem:function(o){if(!t)try{return e.Utils.eraseCookie(o,null),!0}catch(e){return!1}return n.removeItem(o),!0},getAll:function(){var o=[];if(t)for(var i in n)i.length&&o.push({key:i,value:this.parseResult(n.getItem(i))});else try{for(var a=document.cookie.split(";"),r=0;r<a.length;r++){var s=a[r].split("=")[0];o.push({key:s,value:this.parseResult(e.Utils.readCookie(s))})}}catch(e){return null}return o},parseResult:function(e){var t;try{void 0===(t=JSON.parse(e))&&(t=e),"true"==t&&(t=!0),"false"==t&&(t=!1),parseFloat(t)==t&&"object"!=typeof t&&(t=parseFloat(t))}catch(n){t=e}return t}}}(_inbound||{}),_inboundLeadsAPI=function(e){return e.LeadsAPI={init:function(){var t=e.Utils,n=(t.readCookie("wp_lead_uid"),t.readCookie("wp_lead_id"));t.readCookie("lead_data_expire")||(e.deBugger("leads","expired vistor. Run Processes"),n&&e.LeadsAPI.getAllLeadData())},setGlobalLeadData:function(e){InboundLeadData=e},getAllLeadData:function(t){var n=e.Utils.readCookie("wp_lead_id"),o=e.totalStorage("inbound_lead_data"),i=e.Utils.readCookie("lead_data_expire");data={action:"inbound_get_all_lead_data",wp_lead_id:n},success=function(t){var n=JSON.parse(t);e.LeadsAPI.setGlobalLeadData(n),e.totalStorage("inbound_lead_data",n);var o=new Date;o.setTime(o.getTime()+18e5);var i=e.Utils.addDays(o,3);e.Utils.createCookie("lead_data_expire",!0,i)},o?(e.LeadsAPI.setGlobalLeadData(o),e.deBugger("lead","Set Global Lead Data from Localstorage"),i||(e.Utils.ajaxPost(inbound_settings.admin_url,data,success),e.deBugger("lead","localized data old. Pull new from DB"))):e.Utils.ajaxPost(inbound_settings.admin_url,data,success)},getLeadLists:function(){var t={action:"wpl_check_lists",wp_lead_id:e.Utils.readCookie("wp_lead_id")};e.Utils.ajaxPost(inbound_settings.admin_url,t,function(t){e.Utils.createCookie("lead_session_list_check",!0,{path:"/",expires:1}),e.deBugger("lead","Lists checked")})}},e}(_inbound||{}),_inboundPageTracking=function(e){var t,n,o=!1,i=!1,a=!1,r=parseInt(e.Utils.readCookie("lead_session"),10)||0,s=0,l=(new Date,null),u=null,c=null,d=e.Utils,m=e.Utils.GetDate(),f="page_views",g=e.totalStorage(f)||{},p=inbound_settings.post_id||window.location.pathname;e.Settings.timeout;return e.PageTracking={init:function(o){var i=this.isRevisit(g);this.triggerPageView(i),o=o||{},t=parseInt(o.reportInterval,10)||10,n=parseInt(o.idleTimeout,10)||3,d.addListener(document,"keydown",d.throttle(e.PageTracking.pingSession,1e3)),d.addListener(document,"click",d.throttle(e.PageTracking.pingSession,1e3)),d.addListener(window,"mousemove",d.throttle(e.PageTracking.pingSession,1e3)),e.PageTracking.checkVisibility(),this.startSession()},setIdle:function(t){var n="Session IDLE. Activity Timeout due to "+(t=t||"No Movement");e.deBugger("pages",n),clearTimeout(e.PageTracking.idleTimer),e.PageTracking.stopClock(),e.trigger("session_idle")},checkVisibility:function(){var t,n;void 0!==document.hidden?(t="hidden",n="visibilitychange"):void 0!==document.mozHidden?(t="mozHidden",n="mozvisibilitychange"):void 0!==document.msHidden?(t="msHidden",n="msvisibilitychange"):void 0!==document.webkitHidden&&(t="webkitHidden",n="webkitvisibilitychange");var o=document[t];e.Utils.addListener(document,n,function(n){o!=document[t]&&(document[t]?(e.trigger("tab_hidden"),e.PageTracking.setIdle("browser tab switch")):(e.trigger("tab_visible"),e.PageTracking.pingSession()),o=document[t])})},clock:function(){var n="Total time spent on Page in this Session: "+((r+=1)/60).toFixed(2)+" min";if(e.deBugger("pages",n),r>0&&r%t==0){var o=new Date;o.setTime(o.getTime()+18e5),d.createCookie("lead_session",r,o),e.trigger("session_heartbeat",r)}},inactiveClock:function(){var t="Time until Session Timeout: "+((1800-(s+=1))/60).toFixed(2)+" min";e.deBugger("pages",t),s>1800&&(e.trigger("session_end",InboundLeadData),e.Utils.eraseCookie("lead_session"),s=0,clearTimeout(u))},stopClock:function(){i=!0,clearTimeout(l),clearTimeout(u),u=setInterval(e.PageTracking.inactiveClock,1e3)},restartClock:function(){i=!1,e.trigger("session_resume"),e.deBugger("pages","Activity resumed. Session Active"),clearTimeout(l),s=0,clearTimeout(u),l=setInterval(e.PageTracking.clock,1e3)},turnOff:function(){e.PageTracking.setIdle(),a=!0},turnOn:function(){a=!1},startSession:function(){new Date;if(o=!0,l=setInterval(e.PageTracking.clock,1e3),d.readCookie("lead_session"))e.trigger("session_active");else{e.trigger("session_start");var t=new Date;t.setTime(t.getTime()+18e5),e.Utils.createCookie("lead_session",1,t)}this.pingSession()},resetInactiveFunc:function(){s=0,clearTimeout(u)},pingSession:function(t){a||(o||e.PageTracking.startSession(),i&&e.PageTracking.restartClock(),clearTimeout(c),c=setTimeout(e.PageTracking.setIdle,1e3*n+100),void 0!==t&&"mousemove"===t.type&&e.PageTracking.mouseEvents(t))},mouseEvents:function(t){t.pageY<=5&&e.trigger("tab_mouseout")},getPageViews:function(){if(e.Utils.checkLocalStorage()){var t=localStorage.getItem(f),n=JSON.parse(t);return n}},isRevisit:function(e){var t=!1,n=(e=e||{})[p];return void 0!==n&&null!==n&&(t=!0),t},triggerPageView:function(t){var n={title:document.title,url:document.location.href,path:document.location.pathname,count:1};t?(g[p].push(m),n.count=g[p].length,e.trigger("page_revisit",n)):(g[p]=[],g[p].push(m),e.trigger("page_first_visit",n)),e.trigger("page_visit",n),e.totalStorage(f,g);jQuery(document).ready(function(){e.PageTracking.storePageView()})},CheckTimeOut:function(){e.deBugger("pages",status)},storePageView:function(){"off"==inbound_settings.page_tracking&&"landing-page"!=inbound_settings.post_type||setTimeout(function(){var t=e.Utils.readCookie("wp_lead_id")?e.Utils.readCookie("wp_lead_id"):"",n=e.Utils.readCookie("wp_lead_uid")?e.Utils.readCookie("wp_lead_uid"):"",o=e.totalStorage("wp_cta_loaded"),i=e.totalStorage("wp_cta_impressions");stored=!0,e.totalStorage("wp_cta_impressions",{});var a={action:"inbound_track_lead",wp_lead_uid:n,wp_lead_id:t,page_id:inbound_settings.post_id,variation_id:inbound_settings.variation_id,post_type:inbound_settings.post_type,current_url:window.location.href,page_views:JSON.stringify(e.PageTracking.getPageViews()),cta_impressions:JSON.stringify(i),cta_history:JSON.stringify(o),json:"0"};e.Utils.ajaxPost(inbound_settings.admin_url,a,function(e){})},200)}},e}(_inbound||{});_inbound.init(),InboundLeadData=_inbound.totalStorage("inbound_lead_data")||null;
|
1 |
+
/*! Inbound Analyticsv1.0.0 | (c) 2018 Inbound Now | https://github.com/inboundnow/cta */
|
2 |
+
function inboundFormNoRedirect(){if(null==window.frames.frameElement)e=document.querySelectorAll("button.inbound-button-submit[disabled]")[0];else if("iframe"==window.frames.frameElement.tagName.toLowerCase())var e=window.frames.frameElement.contentWindow.document.querySelectorAll("button.inbound-button-submit")[0];if(void 0!==e){var t=e.form,n=t.querySelectorAll('input[value][type="hidden"][name="inbound_furl"]:not([value=""])');0!=n.length&&"IA=="!=n[0].value||(t.action="javascript:void(0)")}}function inboundFormNoRedirectContent(){if(null==window.frames.frameElement)e=document.querySelectorAll("button.inbound-button-submit[disabled]")[0];else if("iframe"==window.frames.frameElement.tagName.toLowerCase())var e=window.frames.frameElement.contentWindow.document.querySelectorAll("button.inbound-button-submit")[0];if(void 0!==e){var t=e.form.querySelectorAll('input[value][type="hidden"][name="inbound_furl"]:not([value=""])'),n=jQuery(e).css("background"),o=jQuery(e).css("color"),i=jQuery(e).css("height"),a=e.getElementsByClassName("inbound-form-spinner");0!=t.length&&"IA=="!=t[0].value||(jQuery(a).remove(),jQuery(e).prepend('<div id="redir-check"><i class="fa fa-check-square" aria-hidden="true" style="background='+n+"; color="+o+"; font-size:calc("+i+' * .42);"></i></div>'))}}var inbound_data=inbound_data||{},_inboundOptions=_inboundOptions||{},_gaq=_gaq||[],_inbound=function(e){var t={timeout:inbound_settings.is_admin?500:1e4,formAutoTracking:!0,formAutoPopulation:!0},n={init:function(){_inbound.Utils.init(),_inbound.Utils.domReady(window,function(){_inbound.DomLoaded()})},DomLoaded:function(){_inbound.PageTracking.init(),_inbound.Forms.init(),_inbound.Utils.setUrlParams(),_inbound.LeadsAPI.init(),setTimeout(function(){_inbound.Forms.init()},2e3),_inbound.trigger("analytics_ready")},extend:function(e,t){var n,o={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[n]=t[n]);return o},debug:function(e,t){},deBugger:function(e,t,n){if(console){var o,i,a,r=document.location.hash?document.location.hash:"",s=r.indexOf("#debug")>-1,t=t||!1;r&&r.match(/debug/)&&(a=(r=r.split("-"))[1]),i="true"===_inbound.Utils.readCookie("inbound_debug"),((o="true"===_inbound.Utils.readCookie("inbound_debug_"+e))||s||i)&&(t&&"string"==typeof t&&(i||"all"===a?console.log('logAll "'+e+'" =>',t):o?console.log('log "'+e+'" =>',t):e===a&&console.log('#log "'+e+'" =>',t)),n&&n instanceof Function&&n())}}},o=n.extend(t,e);return n.Settings=o||{},n}(_inboundOptions),_inboundHooks=function(e){return e.hooks=new function(){function e(e,t,n,o){if(a[e][t])if(n){var i,r=a[e][t];if(o)for(i=r.length;i--;){var s=r[i];s.callback===n&&s.context===o&&r.splice(i,1)}else for(i=r.length;i--;)r[i].callback===n&&r.splice(i,1)}else a[e][t]=[]}function t(e,t,o,i,r){var s={callback:o,priority:i,context:r},l=a[e][t];l?(l.push(s),l=n(l)):l=[s],a[e][t]=l}function n(e){for(var t,n,o,i=1,a=e.length;i<a;i++){for(t=e[i],n=i;(o=e[n-1])&&o.priority>t.priority;)e[n]=e[n-1],--n;e[n]=t}return e}function o(e,t,n){var o=a[e][t];if(!o)return"filters"===e&&n[0];var i=0,r=o.length;if("filters"===e)for(;i<r;i++)n[0]=o[i].callback.apply(o[i].context,n);else for(;i<r;i++)o[i].callback.apply(o[i].context,n);return"filters"!==e||n[0]}var i={removeFilter:function(t,n){return"string"==typeof t&&e("filters",t,n),i},applyFilters:function(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t?o("filters",t,e):i},addFilter:function(e,n,o,a){return"string"==typeof e&&"function"==typeof n&&t("filters",e,n,o=parseInt(o||10,10)),i},removeAction:function(t,n){return"string"==typeof t&&e("actions",t,n),i},doAction:function(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t&&o("actions",t,e),i},addAction:function(e,n,o,a){return"string"==typeof e&&"function"==typeof n&&t("actions",e,n,o=parseInt(o||10,10),a),i}},a={actions:{},filters:{}};return i},e.add_action=function(){var t=arguments[0].split(" ");for(k in t)arguments[0]="inbound."+t[k],e.hooks.addAction.apply(this,arguments);return this},e.remove_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeAction.apply(this,arguments),this},e.do_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.doAction.apply(this,arguments),this},e.add_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.addFilter.apply(this,arguments),this},e.remove_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeFilter.apply(this,arguments),this},e.apply_filters=function(){return arguments[0]="inbound."+arguments[0],e.hooks.applyFilters.apply(this,arguments)},e}(_inbound||{}),_inboundUtils=function(e){var t,n=window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,o=(Object.prototype.toString,{api_host:("https:"==location.protocol?"https://":"http://")+location.hostname+location.pathname.replace(/\/$/,""),track_pageview:!0,track_links_timeout:300,cookie_name:"_sp",cookie_expiration:365,cookie_domain:(host=location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i))?host[0]:""});return e.Utils={init:function(){this.polyFills(),this.checkLocalStorage(),this.SetUID(),this.storeReferralData()},polyFills:function(){window.console||(window.console={});for(var e=["log","info","warn","error","debug","trace","dir","group","groupCollapsed","groupEnd","time","timeEnd","profile","profileEnd","dirxml","assert","count","markTimeline","timeStamp","clear"],t=0;t<e.length;t++)window.console[e[t]]||(window.console[e[t]]=function(){});Date.prototype.toISOString||function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}();try{new CustomEvent("?")}catch(e){this.CustomEvent=function(e,t){function n(t,n,o,i){this["init"+e](t,n,o,i),"detail"in this||(this.detail=i)}return function(o,i){var a=document.createEvent(e);return null!==o?n.call(a,o,(i||(i=t)).bubbles,i.cancelable,i.detail):a.initCustomEvent=n,a}}(this.CustomEvent?"CustomEvent":"Event",{bubbles:!1,cancelable:!1,detail:null})}document.querySelectorAll||(document.querySelectorAll=function(e){var t,n=document.createElement("style"),o=[];for(document.documentElement.firstChild.appendChild(n),document._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),n.parentNode.removeChild(n);document._qsa.length;)(t=document._qsa.shift()).style.removeAttribute("x-qsa"),o.push(t);return document._qsa=null,o}),document.querySelector||(document.querySelector=function(e){var t=document.querySelectorAll(e);return t.length?t[0]:null}),!("innerText"in document.createElement("a"))&&"getSelection"in window&&HTMLElement.prototype.__defineGetter__("innerText",function(){for(var e,t=window.getSelection(),n=[],o=0;o<t.rangeCount;o++)n[o]=t.getRangeAt(o);t.removeAllRanges(),t.selectAllChildren(this),e=t.toString(),t.removeAllRanges();for(o=0;o<n.length;o++)t.addRange(n[o]);return e})},createCookie:function(e,t,n){var o="";if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),o="; expires="+i.toGMTString()}document.cookie=e+"="+t+o+"; path=/"},readCookie:function(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var i=n[o];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},eraseCookie:function(e){this.createCookie(e,"",-1)},getAllCookies:function(){var t={};if(document.cookie&&""!==document.cookie)for(var n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o].split("=");i[0]=i[0].replace(/^ /,""),t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e.totalStorage("inbound_cookies",t),t},setUrlParams:function(){var n={};!function(){for(var e,t=function(e){return decodeURIComponent(e).replace(/\+/g," ")},o=window.location.search.substring(1),i=/([^&=]+)=?([^&]*)/g;e=i.exec(o);)if("-1"==e[1].indexOf("["))n[t(e[1])]=t(e[2]);else{var a=e[1].indexOf("["),r=e[1].slice(a+1,e[1].indexOf("]",a)),s=t(e[1].slice(0,a));"object"!=typeof n[s]&&(n[t(s)]={},n[t(s)].length=0),r?n[t(s)][t(r)]=t(e[2]):Array.prototype.push.call(n[t(s)],t(e[2]))}}();for(var o in n)if("action"!=o)if("object"==typeof n[o])for(var i in n[o])this.createCookie(i,n[o][i],30);else this.createCookie(o,n[o],30);if(t){var a=e.totalStorage("inbound_url_params")||{},r=this.mergeObjs(a,n);e.totalStorage("inbound_url_params",r)}var s={option1:"yo",option2:"woooo"};e.trigger("url_parameters",n,s)},getAllUrlParams:function(){n={};if(t)var n=e.totalStorage("inbound_url_params");return n},getParameterVal:function(e,t){return(RegExp(e+"=(.+?)(&|$)").exec(t)||[,!1])[1]},checkLocalStorage:function(){if("localStorage"in window)try{ls=void 0===window.localStorage?void 0:window.localStorage,t="undefined"!=typeof ls&&void 0!==window.JSON}catch(e){t=!1}return t},showLocalStorageSize:function(){function e(e){return 2*e.length}function t(e){return e/1024/1024}var n=Object.keys(localStorage).map(function(t){return{name:t,size:e(localStorage[t])}}).map(function(e){return e.size=t(e.size).toFixed(2)+" MB",e});console.table(n)},addDays:function(e,t){return new Date(e.getTime()+24*t*60*60*1e3)},GetDate:function(){var e=new Date,t=e.getDate(),n=t<10?"0":"",o=e.getFullYear(),i=e.getHours(),a=i<10?"0":"",r=e.getMinutes(),s=r<10?"0":"",l=e.getSeconds(),u=l<10?"0":"",c=e.getMonth()+1;return o+"/"+(c<10?"0":"")+c+"/"+n+t+" "+a+i+":"+s+r+":"+u+l},SetSessionTimeout:function(){this.readCookie("lead_session_expire");var e=new Date;e.setTime(e.getTime()+18e5),this.createCookie("lead_session_expire",!0,e)},storeReferralData:function(){var t=new Date,n=document.referrer||"Direct Traffic",o=e.Utils.readCookie("inbound_referral_site"),i=e.totalStorage("inbound_original_referral");t.setTime(t.getTime()+18e5),o||this.createCookie("inbound_referral_site",n,t),i||e.totalStorage("inbound_original_referral",i)},CreateUID:function(e){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),n="";e||(e=Math.floor(Math.random()*t.length));for(var o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n},generateGUID:function(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,guid)},SetUID:function(e){if(!this.readCookie("wp_lead_uid")){var t=e||this.CreateUID(35);this.createCookie("wp_lead_uid",t)}},countProperties:function(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&++t;return t},mergeObjs:function(e,t){var n={};for(var o in e)n[o]=e[o];for(var o in t)n[o]=t[o];return n},hasClass:function(e,t){if("classList"in document.documentElement)n=t.classList.contains(e);else var n=new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className);return n},addClass:function(e,t){"classList"in document.documentElement?t.classList.add(e):this.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(e,t){"classList"in document.documentElement?t.classList.remove(e):this.hasClass(t,e)&&(t.className=t.className.replace(new RegExp("(^|\\s)*"+e+"(\\s|$)*","g"),""))},removeElement:function(e){e.parentNode.removeChild(e)},trim:function(e){return e=e.replace(/(^\s*)|(\s*$)/gi,""),e=e.replace(/[ ]{2,}/gi," "),e=e.replace(/\n /,"\n")},ajaxPolyFill:function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;for(var e,t=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"],n=0;n<t.length;n++)try{e=new ActiveXObject(t[n]);break}catch(e){}return e},ajaxSendData:function(e,t,n,o,i){var a=this.ajaxPolyFill();setTimeout(function(){a.open(n,e,!0),a.onreadystatechange=function(){4==a.readyState&&t(a.responseText)},"POST"==n&&a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o)},100)},ajaxGet:function(e,t,n,o){var i=[];for(var a in t)i.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e+"?"+i.join("&"),n,"GET",null,o)},ajaxPost:function(e,t,n,o){var i=[];for(var a in t)i.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e,n,"POST",i.join("&"),o)},sendEvent:function(e,t,i){t=t||{},async=!0;var a=getCookie();if(a){var r;for(r in a)t[r]=a[r]}t.id||(t.id=getId());var s={e:e,t:(new Date).toISOString(),kv:t},l=o.api_host+"/track?data="+encodeURIComponent(JSON.stringify(s));if(n){var u=new XMLHttpRequest;u.open("GET",l,async),u.withCredentials=async,u.send(null)}else{var c=document.createElement("script");c.type="text/javascript",c.async=async,c.defer=async,c.src=l;var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d)}return action(i),self},domReady:function(e,t){var n=!1,o=!0,i=e.document,a=i.documentElement,r=i.addEventListener?"addEventListener":"attachEvent",s=i.addEventListener?"removeEventListener":"detachEvent",l=i.addEventListener?"":"on",u=function(o){"readystatechange"==o.type&&"complete"!=i.readyState||(("load"==o.type?e:i)[s](l+o.type,u,!1),!n&&(n=!0)&&t.call(e,o.type||o))},c=function(){try{a.doScroll("left")}catch(e){return void setTimeout(c,50)}u("poll")};if("complete"==i.readyState)t.call(e,"lazy");else{if(i.createEventObject&&a.doScroll){try{o=!e.frameElement}catch(e){}o&&c()}i[r](l+"DOMContentLoaded",u,!1),i[r](l+"readystatechange",u,!1),e[r](l+"load",u,!1)}},addListener:function(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n)},removeListener:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},throttle:function(e,t){var n,o,i,a=null,r=0,s=function(){r=new Date,a=null,i=e.apply(n,o)};return function(){var l=new Date;r||(r=l);var u=t-(l-r);return n=this,o=arguments,u<=0?(clearTimeout(a),a=null,r=l,i=e.apply(n,o)):a||(a=setTimeout(s,u)),i}},checkTypeofGA:function(){"function"==typeof ga&&(universalGA=!0),void 0!==_gaq&&"function"==typeof _gaq.push&&(classicGA=!0),"undefined"!=typeof dataLayer&&"function"==typeof dataLayer.push&&(googleTagManager=!0)},cacheSearchData:function(n,o){if(t){var i=e.totalStorage.getItem("inbound_search_storage");if(i)i.unshift(n),e.totalStorage.setItem("inbound_search_storage",i);else{var a=[n];e.totalStorage.setItem("inbound_search_storage",a)}}else{var r=JSON.stringify(n),s=this.readCookie("inbound_search_storage");s&&(r+="SPLIT-TOKEN"+s),this.createCookie("inbound_search_storage",r,"180")}e.Forms.releaseFormSubmit(o)},storeSearchData:function(){if(inbound_settings.wp_lead_data.lead_id&&inbound_settings.wp_lead_data.lead_nonce){var t=[],n=e.totalStorage.getItem("inbound_search_storage"),o=this.readCookie("inbound_search_storage");if(n||o){if(o){o=o.split("SPLIT-TOKEN");for(var i in o)t.push(JSON.parse(o[i]))}n&&(t=t.concat(n)),t.sort(function(e,t){return e.timestamp-t.timestamp});var a={action:"inbound_search_store",data:t=encodeURIComponent(JSON.stringify(t)),nonce:inbound_settings.wp_lead_data.lead_nonce,lead_id:inbound_settings.wp_lead_data.lead_id};callback=function(t){t&&(t=JSON.parse(t)),t.success&&(console.log(t.success),e.Utils.eraseCookie("inbound_search_storage"),e.totalStorage.deleteItem("inbound_search_storage")),t.error&&console.log(t.error)},this.ajaxPost(inbound_settings.admin_url,a,callback)}}}},e}(_inbound||{}),InboundForms=function(e){var t=e.Utils,n=[],o=[],a=[],r={},s=e.Settings,l=["first name","last name","name","email","e-mail","phone","website","job title","your favorite food","company","tele","address","comment"];if(e.Forms={init:function(){e.Forms.runFieldMappingFilters(),e.Forms.formTrackInit(),e.Forms.searchTrackInit()},runFieldMappingFilters:function(){l=e.hooks.applyFilters("forms.field_map",l)},debug:function(e,t){return},formTrackInit:function(){for(var e=0;e<window.document.forms.length;e++){var t=window.document.forms[e];t.dataset.formProcessed||(t.dataset.formProcessed=!0,this.checkTrackStatus(t)&&(this.attachFormSubmitEvent(t),this.initFormMapping(t)))}},searchTrackInit:function(){if("off"!=inbound_settings.search_tracking&&!r.searchTrackInit){for(var e=0;e<window.document.forms.length;e++){var n=window.document.forms[e];n.dataset.searchChecked||(n.dataset.searchChecked=!0,this.checkSearchTrackStatus(n)&&this.attachSearchFormSubmitEvent(n))}t.storeSearchData(),r.searchTrackInit=!0}},checkTrackStatus:function(t){var n=t.getAttribute("class");if(""!==n&&null!==n)return n.toLowerCase().indexOf("wpl-track-me")>-1||(n.toLowerCase().indexOf("inbound-track")>-1||(cb=function(){console.log(t)},e.deBugger("forms","This form not tracked. Please assign on in settings...",cb),!1))},checkSearchTrackStatus:function(t){var n=t.getAttribute("class"),o=t.getAttribute("id");return""!==n&&null!==n&&n.toLowerCase().indexOf("search")>-1||(""===o||null===o?(cb=function(){console.log(t)},e.deBugger("searches","This search form is not tracked. Please assign on in settings...",cb),!1):o.toLowerCase().indexOf("search")>-1||void 0)},loopClassSelectors:function(n,o){for(var i=n.length-1;i>=0;i--){var a=t.trim(n[i]);-1===a.indexOf("#")&&-1===a.indexOf(".")&&(a="#"+a),(a=document.querySelector(a))&&("add"===o?(e.Utils.addClass("wpl-track-me",a),e.Utils.addClass("inbound-track",a)):(e.Utils.removeClass("wpl-track-me",a),e.Utils.removeClass("inbound-track",a)))}},initFormMapping:function(t){for(var n=[],o=0;o<t.elements.length;o++)formInput=t.elements[o],"hidden"!==formInput.type?(this.mapField(formInput),this.rememberInputValues(formInput),s.formAutoPopulation&&!e.Utils.hasClass("nopopulate",t)&&this.fillInputValues(formInput)):n.push(formInput);for(var i=n.length-1;i>=0;i--)formInput=n[i],this.mapField(formInput)},mapField:function(o){var a=o.id||!1,r=o.name||!1,s=this.getInputLabel(o);if(s&&this.ignoreFieldByLabel(s[0].innerText))return o.dataset.ignoreFormField=!0,!1;for(i=0;i<l.length;i++){var u=!1,c=l[i],d=t.trim(c),m=d.replace(/ /g,"_");r&&r.toLowerCase().indexOf(d)>-1?(u=!0,e.deBugger("forms","Found matching name attribute for -> "+d)):a&&a.toLowerCase().indexOf(d)>-1?(u=!0,e.deBugger("forms","Found matching ID attribute for ->"+d)):s?s[0].innerText.toLowerCase().indexOf(d)>-1&&(u=!0,e.deBugger("forms","Found matching sibling label for -> "+d)):n.push(d),u&&(this.addDataAttr(o,m),this.removeArrayItem(l,d),i--)}return inbound_data},formListener:function(t){t.preventDefault(),e.Forms.saveFormData(t.target),document.body.style.cursor="wait"},searchFormListener:function(t){t.preventDefault(),e.Forms.saveSearchData(t.target)},attachFormSubmitEvent:function(e){t.addListener(e,"submit",this.formListener);document.querySelector(".inbound-email")},attachSearchFormSubmitEvent:function(e){t.addListener(e,"submit",this.searchFormListener)},ignoreFieldByLabel:function(t){var n=!1;return!!t&&(-1==t.toLowerCase().indexOf("credit card")&&-1==t.toLowerCase().indexOf("card number")||(n=!0),-1==t.toLowerCase().indexOf("expiration")&&-1==t.toLowerCase().indexOf("expiry")||(n=!0),"month"!=t.toLowerCase()&&"mm"!=t.toLowerCase()&&"yy"!=t.toLowerCase()&&"yyyy"!=t.toLowerCase()&&"year"!=t.toLowerCase()||(n=!0),-1==t.toLowerCase().indexOf("cvv")&&-1==t.toLowerCase().indexOf("cvc")&&-1==t.toLowerCase().indexOf("secure code")&&-1==t.toLowerCase().indexOf("security code")||(n=!0),n&&e.deBugger("forms","ignore "+t),n)},ignoreFieldByValue:function(e){var t=!1;if(!e)return!1;if("visa"!=e.toLowerCase()&&"mastercard"!=e.toLowerCase()&&"american express"!=e.toLowerCase()&&"amex"!=e.toLowerCase()&&"discover"!=e.toLowerCase()||(t=!0),new RegExp("/^[0-9]+$/").test(e)){var n=e.replace(" ","");this.isInt(n)&&n.length>=16&&(t=!0)}return t},isInt:function(e){return"number"==typeof e&&isFinite(e)&&e%1==0},releaseFormSubmit:function(e){document.body.style.cursor="default",t.removeClass("wpl-track-me",e),t.removeListener(e,"submit",this.formListener);var n=e.getAttribute("class");if(""!==n&&null!==n&&-1!=n.toLowerCase().indexOf("wpcf7-form"))return setTimeout(function(){document.body.style.cursor="default"},300),!0;"function"==typeof e.submit?e.submit():"function"==typeof e.click&&jQuery("#"+e.id).find("button").click(),setTimeout(function(){for(var t=0;t<e.elements.length;t++)formInput=e.elements[t],type=formInput.type||!1,"submit"===type&&"submit"===formInput.name&&e.elements[t].click()},2e3)},saveFormData:function(n){for(var i=i||{},r=0;r<n.elements.length;r++)if(formInput=n.elements[r],multiple=!1,formInput.name)if(formInput.dataset.ignoreFormField)e.deBugger("forms","ignore "+formInput.name);else{switch(inputName=formInput.name.replace(/\[([^\[]*)\]/g,"%5B%5D$1"),i[inputName]||(i[inputName]={}),formInput.type&&(i[inputName].type=formInput.type),i[inputName].name||(i[inputName].name=formInput.name),formInput.dataset.mapFormField&&(i[inputName].map=formInput.dataset.mapFormField),formInput.nodeName){case"INPUT":if(!1===(l=this.getInputValue(formInput)))continue;break;case"TEXTAREA":l=formInput.value;break;case"SELECT":if(formInput.multiple){values=[],multiple=!0;for(var s=0;s<formInput.length;s++)formInput[s].selected&&values.push(encodeURIComponent(formInput[s].value))}else l=formInput.value}if(e.deBugger("forms","Input Value = "+l),l){i[inputName].value||(i[inputName].value=[]),i[inputName].value.push(multiple?values.join(","):encodeURIComponent(l));var l=multiple?values.join(","):encodeURIComponent(l)}}e.deBugger("forms",i);for(var u in i){var c=i[u].value,d=i[u].map;void 0!==c&&null!=c&&""!=c&&o.push(u+"="+i[u].value.join(",")),void 0!==d&&null!=d&&i[u].value&&(a[d]=i[u].value.join(","))}var m=o.join("&");e.deBugger("forms","Stringified Raw Form PARAMS: "+m);var f=Object.keys(a).map(function(e){return e+"="+a[e]}).join("&");if(e.deBugger(a),e.deBugger("forms","Stringified Mapped PARAMS"+f),g||(g=t.getParameterVal("wpleads_email_address",f)),e.deBugger("Email 1:"+g),!g)var g=t.getParameterVal("email",f);e.deBugger("Email 2:"+g),g||(g=t.readCookie("wp_lead_email")),e.deBugger("Email 3:"+g);var p=t.getParameterVal("name",f),h=t.getParameterVal("first_name",f),v=t.getParameterVal("last_name",f);if(!v&&h&&(_=decodeURI(h).split(" ")).length>0&&(h=_[0],v=_[1]),p&&!v&&!h){var _=decodeURI(p).split(" ");_.length>0&&(h=_[0],v=_[1])}p=h&&v?h+" "+v:p,h||(h=""),v||(v=""),e.deBugger("forms","fName = "+h),e.deBugger("forms","lName = "+v),e.deBugger("forms","fullName = "+p),e.deBugger("forms","Email = "+g);var b=e.totalStorage("page_views")||{},y=e.totalStorage("inbound_url_params")||{},w=n.querySelectorAll('input[value][type="hidden"][name="inbound_furl"]:not([value=""])'),k=!1;if(0==w.length||"IA=="==w[0].value)k=!0;var S=n.querySelectorAll('input[value][type="hidden"][name="inbound_form_id"]');S=S.length>0?S[0].value:0;if("undefined"!=typeof landing_path_info)I=landing_path_info.variation;else if("undefined"!=typeof cta_path_info)I=cta_path_info.variation;else var I=inbound_settings.variation_id;var C=inbound_settings.post_type||"page",L=inbound_settings.post_id||0;search_data={},formData={action:"inbound_lead_store",email:g,full_name:p,first_name:h,last_name:v,raw_params:m,mapped_params:f,url_params:JSON.stringify(y),search_data:"test",page_views:JSON.stringify(b),post_type:C,page_id:L,variation:I,source:t.readCookie("inbound_referral_site"),inbound_submitted:k,inbound_form_id:S,inbound_nonce:inbound_settings.ajax_nonce,event:n},callback=function(o){e.deBugger("forms","Lead Created with ID: "+o),o=parseInt(o,10),formData.leadID=o,o&&(t.createCookie("wp_lead_id",o),e.totalStorage.deleteItem("page_views"),e.totalStorage.deleteItem("tracking_events")),e.trigger("form_after_submission",formData),e.Forms.releaseFormSubmit(n)},e.trigger("form_before_submission",formData),t.ajaxPost(inbound_settings.admin_url,formData,callback)},saveSearchData:function(n){for(var o=o||{},i=0;i<n.elements.length;i++)if(formInput=n.elements[i],multiple=!1,formInput.name){if(formInput.dataset.ignoreFormField){e.deBugger("searches","ignore "+formInput.name);continue}switch(d=formInput.name.replace(/\[([^\[]*)\]/g,"%5B%5D$1"),o[d]||(o[d]={}),formInput.type&&(o[d].type=formInput.type),o[d].name||(o[d].name=formInput.name),formInput.dataset.mapFormField&&(o[d].map=formInput.dataset.mapFormField),formInput.nodeName){case"INPUT":if(!1===(r=this.getInputValue(formInput)))continue;break;case"TEXTAREA":r=formInput.value;break;case"SELECT":if(formInput.multiple){values=[],multiple=!0;for(var a=0;a<formInput.length;a++)formInput[a].selected&&values.push(encodeURIComponent(formInput[a].value))}else r=formInput.value}if(e.deBugger("searches","Input Value = "+r),r){o[d].value||(o[d].value=[]),o[d].value.push(multiple?values.join(","):encodeURIComponent(r));var r=multiple?values.join(","):encodeURIComponent(r)}}e.deBugger("searches",o);var s=[];for(var l in o){var u=o[l].value,c=o[l].type,d=o[l].name;void 0!==u&&null!=u&&""!=u&&("search"==c?s.push("search_text|value|"+o[l].value):"s"==d&&s.push("search_text|value|"+o[l].value))}s[0]||e.Forms.releaseFormSubmit(n);var m=s.join("|field|");if(e.deBugger("searches","Stringified Search Form PARAMS: "+m),"undefined"!=typeof landing_path_info)f=landing_path_info.variation;else if("undefined"!=typeof cta_path_info)f=cta_path_info.variation;else var f=inbound_settings.variation_id;var g=inbound_settings.post_type||"page",p=inbound_settings.post_id||0,h=t.readCookie("wp_lead_uid");inbound_settings.wp_lead_data.lead_email?email=inbound_settings.wp_lead_data.lead_email:t.readCookie("inbound_wpleads_email_address")?email=t.readCookie("inbound_wpleads_email_address"):email="",searchData={email:email,search_data:m,user_UID:h,post_type:g,page_id:p,variation:f,source:t.readCookie("inbound_referral_site"),ip_address:inbound_settings.ip_address,timestamp:Math.floor((new Date).getTime()/1e3)},e.trigger("search_before_caching",searchData),inbound_settings.wp_lead_data.lead_id?(searchData.lead_id=inbound_settings.wp_lead_data.lead_id,t.cacheSearchData(searchData,n)):t.cacheSearchData(searchData,n)},rememberInputValues:function(n){n.name&&n.name;var o=n.type?n.type:"text";if("submit"===o||"hidden"===o||"file"===o||"password"===o||n.dataset.ignoreFormField)return!1;t.addListener(n,"change",function(n){if(n.target.name){if("checkbox"!==o)var i=n.target.value;else for(var a=[],r=document.querySelectorAll('input[name="'+n.target.name+'"]'),s=0;s<r.length;s++)r[s].checked&&a.push(r[s].value),i=a.join(",");inputData={name:n.target.name,node:n.target.nodeName.toLowerCase(),type:o,value:i,mapping:n.target.dataset.mapFormField},e.trigger("form_input_change",inputData),t.createCookie("inbound_"+n.target.name,encodeURIComponent(i))}})},fillInputValues:function(e){var n=e.name?"inbound_"+e.name:"",o=e.type?e.type:"text";if("submit"===o||"hidden"===o||"file"===o||"password"===o)return!1;if(t.readCookie(n)&&"comment"!=n)if(value=decodeURIComponent(t.readCookie(n)),"checkbox"===o||"radio"===o)for(var i=value.split(","),a=0;a<i.length;a++)e.value.indexOf(i[a])>-1&&(e.checked=!0);else"undefined"!==value&&(e.value=value)},getInputLabel:function(e){var t;return(t=this.siblingsIsLabel(e))?t:!!(t=this.CheckParentForLabel(e))&&t},getInputValue:function(e){var t=!1;switch(e.type){case"radio":case"checkbox":e.checked&&(t=e.value);break;case"text":case"hidden":default:t=e.value}return t},addDataAttr:function(e,t){for(var n=document.getElementsByName(e.name),o=n.length-1;o>=0;o--)e.dataset.mapFormField||(n[o].dataset.mapFormField=t)},removeArrayItem:function(e,t){if(e.indexOf)index=e.indexOf(t);else for(index=e.length-1;index>=0&&e[index]!==t;--index);index>=0&&e.splice(index,1)},siblingsIsLabel:function(e){for(var t=this.getSiblings(e),n=[],o=t.length-1;o>=0;o--)"label"===t[o].nodeName.toLowerCase()&&n.push(t[o]);return n.length>0&&n.length<2&&n},getChildren:function(e,t){for(var n=[];e;e=e.nextSibling)1==e.nodeType&&e!=t&&n.push(e);return n},getSiblings:function(e){return this.getChildren(e.parentNode.firstChild,e)},CheckParentForLabel:function(e){if("FORM"===e.nodeName)return null;do{var t=e.getElementsByTagName("label");if(t.length>0&&t.length<2)return e.getElementsByTagName("label")}while(e=e.parentNode);return null},mailCheck:function(){var e=document.querySelector(".inbound-email");e&&(t.addListener(e,"blur",this.mailCheck),u.run({email:document.querySelector(".inbound-email").value,suggested:function(n){var o=document.querySelector(".email_suggestion");o&&t.removeElement(o);var i=document.createElement("span");i.innerHTML="<span class=\"email_suggestion\">Did youu mean <b><i id='email_correction' style='cursor: pointer;' title=\"click to update\">"+n.full+"</b></i>?</span>",e.parentNode.insertBefore(i,e.nextSibling);var a=document.getElementById("email_correction");t.addListener(a,"click",function(){e.value=a.innerHTML,a.parentNode.parentNode.innerHTML="Fixed!"})},empty:function(){}}))}},void 0===u)var u={domainThreshold:1,topLevelThreshold:3,defaultDomains:["yahoo.com","google.com","hotmail.com","gmail.com","me.com","aol.com","mac.com","live.com","comcast.net","googlemail.com","msn.com","hotmail.co.uk","yahoo.co.uk","facebook.com","verizon.net","sbcglobal.net","att.net","gmx.com","mail.com","outlook.com","icloud.com"],defaultTopLevelDomains:["co.jp","co.uk","com","net","org","info","edu","gov","mil","ca","de"],run:function(e){e.domains=e.domains||u.defaultDomains,e.topLevelDomains=e.topLevelDomains||u.defaultTopLevelDomains,e.distanceFunction=e.distanceFunction||u.sift3Distance;var t=function(e){return e},n=e.suggested||t,o=e.empty||t,i=u.suggest(u.encodeEmail(e.email),e.domains,e.topLevelDomains,e.distanceFunction);return i?n(i):o()},suggest:function(e,t,n,o){e=e.toLowerCase();var i=this.splitEmail(e),a=this.findClosestDomain(i.domain,t,o,this.domainThreshold);if(a){if(a!=i.domain)return{address:i.address,domain:a,full:i.address+"@"+a}}else{var r=this.findClosestDomain(i.topLevelDomain,n,o,this.topLevelThreshold);if(i.domain&&r&&r!=i.topLevelDomain){var s=i.domain;return a=s.substring(0,s.lastIndexOf(i.topLevelDomain))+r,{address:i.address,domain:a,full:i.address+"@"+a}}}return!1},findClosestDomain:function(e,t,n,o){o=o||this.topLevelThreshold;var i,a=99,r=null;if(!e||!t)return!1;n||(n=this.sift3Distance);for(var s=0;s<t.length;s++){if(e===t[s])return e;(i=n(e,t[s]))<a&&(a=i,r=t[s])}return a<=o&&null!==r&&r},sift3Distance:function(e,t){if(null===e||0===e.length)return null===t||0===t.length?0:t.length;if(null===t||0===t.length)return e.length;for(var n=0,o=0,i=0,a=0;n+o<e.length&&n+i<t.length;){if(e.charAt(n+o)==t.charAt(n+i))a++;else{o=0,i=0;for(var r=0;r<5;r++){if(n+r<e.length&&e.charAt(n+r)==t.charAt(n)){o=r;break}if(n+r<t.length&&e.charAt(n)==t.charAt(n+r)){i=r;break}}}n++}return(e.length+t.length)/2-a},splitEmail:function(e){var t=e.trim().split("@");if(t.length<2)return!1;for(a=0;a<t.length;a++)if(""===t[a])return!1;var n=t.pop(),o=n.split("."),i="";if(0===o.length)return!1;if(1==o.length)i=o[0];else{for(var a=1;a<o.length;a++)i+=o[a]+".";o.length>=2&&(i=i.substring(0,i.length-1))}return{topLevelDomain:i,domain:n,address:t.join("@")}},encodeEmail:function(e){var t=encodeURI(e);return t=t.replace("%20"," ").replace("%25","%").replace("%5E","^").replace("%60","`").replace("%7B","{").replace("%7C","|").replace("%7D","}")}};return e}(_inbound||{}),_inboundEvents=function(e){function t(t,o,i){var o=o||{};(i=i||{}).bubbles=i.bubbles||!0,i.cancelable=i.cancelable||!0,o=e.apply_filters("filter_"+t,o);!window.ActiveXObject&&window;if("function"==typeof CustomEvent)var a=new CustomEvent(t,{detail:o,bubbles:i.bubbles,cancelable:i.cancelable});else(a=document.createEvent("Event")).initEvent(t,!0,!0);window.dispatchEvent(a),e.do_action(t,o),n(t,o)}function n(e,t){if(window.jQuery){var t=t||{};jQuery(document).trigger(e,t)}}e.trigger=function(t,n){e.Events[t](n)};return e.Events={analytics_ready:function(){t("analytics_ready",{data:"xyxy"},{opt1:!0})},url_parameters:function(e){t("url_parameters",e)},session_start:function(){console.log(""),t("session_start")},session_end:function(e){t("session_end",e),console.log("Session End")},session_active:function(){t("session_active")},session_idle:function(e){t("session_idle",e)},session_resume:function(){t("session_resume")},session_heartbeat:function(e){t("session_heartbeat",{clock:e,leadData:InboundLeadData})},page_visit:function(e){t("page_view",e)},page_first_visit:function(n){t("page_first_visit"),e.deBugger("pages","First Ever Page View of this Page")},page_revisit:function(n){t("page_revisit",n);e.deBugger("pages",status,function(){console.log("pageData",n),console.log("Page Revisit viewed "+n+" times")})},tab_hidden:function(n){e.deBugger("pages","Tab Hidden"),t("tab_hidden")},tab_visible:function(n){e.deBugger("pages","Tab Visible"),t("tab_visible")},tab_mouseout:function(n){e.deBugger("pages","Tab Mouseout"),t("tab_mouseout")},form_input_change:function(n){e.deBugger("forms","inputData change. Data=",function(){console.log(n)}),t("form_input_change",n)},form_before_submission:function(e){t("form_before_submission",e)},form_after_submission:function(e){t("form_after_submission",e)},search_before_caching:function(e){t("search_before_caching",e)},analyticsError:function(e,t,n){var o=new CustomEvent("inbound_analytics_error",{detail:{MLHttpRequest:e,textStatus:t,errorThrown:n}});window.dispatchEvent(o),console.log("Page Save Error")}},e}(_inbound||{});_inbound.add_action("form_before_submission",inboundFormNoRedirect,10),_inbound.add_action("form_after_submission",inboundFormNoRedirectContent,10);var InboundTotalStorage=function(e){var t,n;if("localStorage"in window)try{n=void 0===window.localStorage?void 0:window.localStorage,t=void 0!==n&&void 0!==window.JSON,window.localStorage.setItem("_inbound","1"),window.localStorage.removeItem("_inbound")}catch(e){t=!1}e.totalStorage=function(t,n,o){return e.totalStorage.impl.init(t,n)},e.totalStorage.setItem=function(t,n){return e.totalStorage.impl.setItem(t,n)},e.totalStorage.getItem=function(t){return e.totalStorage.impl.getItem(t)},e.totalStorage.getAll=function(){return e.totalStorage.impl.getAll()},e.totalStorage.deleteItem=function(t){return e.totalStorage.impl.deleteItem(t)},e.totalStorage.impl={init:function(e,t){return void 0!==t?this.setItem(e,t):this.getItem(e)},setItem:function(o,i){if(!t)try{return e.Utils.createCookie(o,i),i}catch(e){console.log("Local Storage not supported by this browser. Install the cookie plugin on your site to take advantage of the same functionality. You can get it at https://github.com/carhartl/jquery-cookie")}var a=JSON.stringify(i);return n.setItem(o,a),this.parseResult(a)},getItem:function(o){if(!t)try{return this.parseResult(e.Utils.readCookie(o))}catch(e){return null}var i=n.getItem(o);return this.parseResult(i)},deleteItem:function(o){if(!t)try{return e.Utils.eraseCookie(o,null),!0}catch(e){return!1}return n.removeItem(o),!0},getAll:function(){var o=[];if(t)for(var i in n)i.length&&o.push({key:i,value:this.parseResult(n.getItem(i))});else try{for(var a=document.cookie.split(";"),r=0;r<a.length;r++){var s=a[r].split("=")[0];o.push({key:s,value:this.parseResult(e.Utils.readCookie(s))})}}catch(e){return null}return o},parseResult:function(e){var t;try{void 0===(t=JSON.parse(e))&&(t=e),"true"==t&&(t=!0),"false"==t&&(t=!1),parseFloat(t)==t&&"object"!=typeof t&&(t=parseFloat(t))}catch(n){t=e}return t}}}(_inbound||{}),_inboundLeadsAPI=function(e){return e.LeadsAPI={init:function(){var t=e.Utils,n=(t.readCookie("wp_lead_uid"),t.readCookie("wp_lead_id"));t.readCookie("lead_data_expire")||(e.deBugger("leads","expired vistor. Run Processes"),n&&e.LeadsAPI.getAllLeadData())},setGlobalLeadData:function(e){InboundLeadData=e},getAllLeadData:function(t){var n=e.Utils.readCookie("wp_lead_id"),o=e.totalStorage("inbound_lead_data"),i=e.Utils.readCookie("lead_data_expire");data={action:"inbound_get_all_lead_data",wp_lead_id:n},success=function(t){var n=JSON.parse(t);e.LeadsAPI.setGlobalLeadData(n),e.totalStorage("inbound_lead_data",n);var o=new Date;o.setTime(o.getTime()+18e5);var i=e.Utils.addDays(o,3);e.Utils.createCookie("lead_data_expire",!0,i)},o?(e.LeadsAPI.setGlobalLeadData(o),e.deBugger("lead","Set Global Lead Data from Localstorage"),i||(e.Utils.ajaxPost(inbound_settings.admin_url,data,success),e.deBugger("lead","localized data old. Pull new from DB"))):e.Utils.ajaxPost(inbound_settings.admin_url,data,success)},getLeadLists:function(){var t={action:"wpl_check_lists",wp_lead_id:e.Utils.readCookie("wp_lead_id")};e.Utils.ajaxPost(inbound_settings.admin_url,t,function(t){e.Utils.createCookie("lead_session_list_check",!0,{path:"/",expires:1}),e.deBugger("lead","Lists checked")})}},e}(_inbound||{}),_inboundPageTracking=function(e){var t,n,o=!1,i=!1,a=!1,r=parseInt(e.Utils.readCookie("lead_session"),10)||0,s=0,l=(new Date,null),u=null,c=null,d=e.Utils,m=e.Utils.GetDate(),f="page_views",g=e.totalStorage(f)||{},p=inbound_settings.post_id||window.location.pathname;e.Settings.timeout;return e.PageTracking={init:function(o){var i=this.isRevisit(g);this.triggerPageView(i),o=o||{},t=parseInt(o.reportInterval,10)||10,n=parseInt(o.idleTimeout,10)||3,d.addListener(document,"keydown",d.throttle(e.PageTracking.pingSession,1e3)),d.addListener(document,"click",d.throttle(e.PageTracking.pingSession,1e3)),d.addListener(window,"mousemove",d.throttle(e.PageTracking.pingSession,1e3)),e.PageTracking.checkVisibility(),this.startSession()},setIdle:function(t){var n="Session IDLE. Activity Timeout due to "+(t=t||"No Movement");e.deBugger("pages",n),clearTimeout(e.PageTracking.idleTimer),e.PageTracking.stopClock(),e.trigger("session_idle")},checkVisibility:function(){var t,n;void 0!==document.hidden?(t="hidden",n="visibilitychange"):void 0!==document.mozHidden?(t="mozHidden",n="mozvisibilitychange"):void 0!==document.msHidden?(t="msHidden",n="msvisibilitychange"):void 0!==document.webkitHidden&&(t="webkitHidden",n="webkitvisibilitychange");var o=document[t];e.Utils.addListener(document,n,function(n){o!=document[t]&&(document[t]?(e.trigger("tab_hidden"),e.PageTracking.setIdle("browser tab switch")):(e.trigger("tab_visible"),e.PageTracking.pingSession()),o=document[t])})},clock:function(){var n="Total time spent on Page in this Session: "+((r+=1)/60).toFixed(2)+" min";if(e.deBugger("pages",n),r>0&&r%t==0){var o=new Date;o.setTime(o.getTime()+18e5),d.createCookie("lead_session",r,o),e.trigger("session_heartbeat",r)}},inactiveClock:function(){var t="Time until Session Timeout: "+((1800-(s+=1))/60).toFixed(2)+" min";e.deBugger("pages",t),s>1800&&(e.trigger("session_end",InboundLeadData),e.Utils.eraseCookie("lead_session"),s=0,clearTimeout(u))},stopClock:function(){i=!0,clearTimeout(l),clearTimeout(u),u=setInterval(e.PageTracking.inactiveClock,1e3)},restartClock:function(){i=!1,e.trigger("session_resume"),e.deBugger("pages","Activity resumed. Session Active"),clearTimeout(l),s=0,clearTimeout(u),l=setInterval(e.PageTracking.clock,1e3)},turnOff:function(){e.PageTracking.setIdle(),a=!0},turnOn:function(){a=!1},startSession:function(){new Date;if(o=!0,l=setInterval(e.PageTracking.clock,1e3),d.readCookie("lead_session"))e.trigger("session_active");else{e.trigger("session_start");var t=new Date;t.setTime(t.getTime()+18e5),e.Utils.createCookie("lead_session",1,t)}this.pingSession()},resetInactiveFunc:function(){s=0,clearTimeout(u)},pingSession:function(t){a||(o||e.PageTracking.startSession(),i&&e.PageTracking.restartClock(),clearTimeout(c),c=setTimeout(e.PageTracking.setIdle,1e3*n+100),void 0!==t&&"mousemove"===t.type&&e.PageTracking.mouseEvents(t))},mouseEvents:function(t){t.pageY<=5&&e.trigger("tab_mouseout")},getPageViews:function(){if(e.Utils.checkLocalStorage()){var t=localStorage.getItem(f),n=JSON.parse(t);return n}},isRevisit:function(e){var t=!1,n=(e=e||{})[p];return void 0!==n&&null!==n&&(t=!0),t},triggerPageView:function(t){var n={title:document.title,url:document.location.href,path:document.location.pathname,count:1};t?(g[p].push(m),n.count=g[p].length,e.trigger("page_revisit",n)):(g[p]=[],g[p].push(m),e.trigger("page_first_visit",n)),e.trigger("page_visit",n),e.totalStorage(f,g);jQuery(document).ready(function(){e.PageTracking.storePageView()})},CheckTimeOut:function(){e.deBugger("pages",status)},storePageView:function(){"off"==inbound_settings.page_tracking&&"landing-page"!=inbound_settings.post_type||setTimeout(function(){var t=e.Utils.readCookie("wp_lead_id")?e.Utils.readCookie("wp_lead_id"):"",n=e.Utils.readCookie("wp_lead_uid")?e.Utils.readCookie("wp_lead_uid"):"",o=e.totalStorage("wp_cta_loaded"),i=e.totalStorage("wp_cta_impressions");stored=!0,e.totalStorage("wp_cta_impressions",{});var a={action:"inbound_track_lead",wp_lead_uid:n,wp_lead_id:t,page_id:inbound_settings.post_id,variation_id:inbound_settings.variation_id,post_type:inbound_settings.post_type,current_url:window.location.href,page_views:JSON.stringify(e.PageTracking.getPageViews()),cta_impressions:JSON.stringify(i),cta_history:JSON.stringify(o),json:"0"};e.Utils.ajaxPost(inbound_settings.admin_url,a,function(e){})},200)}},e}(_inbound||{});_inbound.init(),InboundLeadData=_inbound.totalStorage("inbound_lead_data")||null;
|
shared/assets/plugins/advanced-custom-fields/FETCH_HEAD
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
b65534f71d0efff916a133609aee3d98a8b1c7de branch 'master' of https://github.com/elliotcondon/acf
|
|
shared/assets/plugins/advanced-custom-fields/HEAD
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
ref: refs/heads/master
|
|
shared/assets/plugins/advanced-custom-fields/README.md
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
# Advanced Custom Fields
|
2 |
-
|
3 |
-
Welcome to the official repository for Advanced Custom Fields WordPress plugin.
|
4 |
-
|
5 |
-
-----------------------
|
6 |
-
|
7 |
-
* Readme : https://github.com/elliotcondon/acf/blob/master/readme.txt
|
8 |
-
* WordPress repository: https://wordpress.org/plugins/advanced-custom-fields/
|
9 |
-
* Website : http://www.advancedcustomfields.com/
|
10 |
-
* Documentation: http://www.advancedcustomfields.com/resources/
|
11 |
-
* Support: http://support.advancedcustomfields.com/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shared/assets/plugins/advanced-custom-fields/acf.php
CHANGED
@@ -1,37 +1,43 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Advanced Custom Fields
|
4 |
-
Plugin URI:
|
5 |
-
Description: Customise WordPress with powerful, professional and intuitive fields
|
6 |
-
Version:
|
7 |
Author: Elliot Condon
|
8 |
Author URI: http://www.elliotcondon.com/
|
9 |
-
License: GPL
|
10 |
Copyright: Elliot Condon
|
11 |
Text Domain: acf
|
12 |
Domain Path: /lang
|
13 |
*/
|
14 |
|
15 |
-
if( !
|
16 |
|
17 |
-
|
|
|
|
|
18 |
|
19 |
/** @var string The plugin version number */
|
20 |
-
var $version = '
|
21 |
-
|
22 |
|
23 |
/** @var array The plugin settings array */
|
24 |
var $settings = array();
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
/*
|
28 |
-
*
|
29 |
*
|
30 |
-
*
|
31 |
*
|
32 |
* @type function
|
33 |
* @date 23/06/12
|
34 |
-
* @since
|
35 |
*
|
36 |
* @param N/A
|
37 |
* @return N/A
|
@@ -39,908 +45,623 @@ class acf {
|
|
39 |
|
40 |
function __construct() {
|
41 |
|
42 |
-
|
43 |
-
add_filter('acf/helpers/get_path', array($this, 'helpers_get_path'), 1, 1);
|
44 |
-
add_filter('acf/helpers/get_dir', array($this, 'helpers_get_dir'), 1, 1);
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
// vars
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
$this->settings = array(
|
49 |
|
50 |
// basic
|
51 |
'name' => __('Advanced Custom Fields', 'acf'),
|
52 |
-
'version' => $
|
53 |
-
|
54 |
// urls
|
55 |
'file' => __FILE__,
|
56 |
-
'
|
57 |
-
'
|
58 |
-
'
|
|
|
59 |
|
60 |
// options
|
61 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
);
|
63 |
|
64 |
|
65 |
-
//
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
-
// actions
|
70 |
-
add_action('init', array($this, 'init'), 1);
|
71 |
-
add_action('acf/pre_save_post', array($this, 'save_post_lock'), 0);
|
72 |
-
add_action('acf/pre_save_post', array($this, 'save_post_unlock'), 999);
|
73 |
-
add_action('acf/save_post', array($this, 'save_post_lock'), 0);
|
74 |
-
add_action('acf/save_post', array($this, 'save_post'), 10);
|
75 |
-
add_action('acf/save_post', array($this, 'save_post_unlock'), 999);
|
76 |
-
add_action('acf/create_fields', array($this, 'create_fields'), 1, 2);
|
77 |
|
|
|
|
|
78 |
|
79 |
-
// filters
|
80 |
-
add_filter('acf/get_info', array($this, 'get_info'), 1, 1);
|
81 |
-
add_filter('acf/parse_types', array($this, 'parse_types'), 1, 1);
|
82 |
-
add_filter('acf/get_post_types', array($this, 'get_post_types'), 1, 3);
|
83 |
-
add_filter('acf/get_taxonomies_for_select', array($this, 'get_taxonomies_for_select'), 1, 2);
|
84 |
-
add_filter('acf/get_image_sizes', array($this, 'get_image_sizes'), 1, 1);
|
85 |
-
add_filter('acf/get_post_id', array($this, 'get_post_id'), 1, 1);
|
86 |
|
|
|
|
|
|
|
|
|
87 |
|
88 |
-
// includes
|
89 |
-
$this->include_before_theme();
|
90 |
-
add_action('after_setup_theme', array($this, 'include_after_theme'), 1);
|
91 |
-
add_action('after_setup_theme', array($this, 'include_3rd_party'), 1);
|
92 |
|
|
|
|
|
|
|
93 |
}
|
94 |
|
95 |
|
96 |
/*
|
97 |
-
*
|
98 |
-
*
|
99 |
-
* This function will calculate the path to a file
|
100 |
-
*
|
101 |
-
* @type function
|
102 |
-
* @date 30/01/13
|
103 |
-
* @since 3.6.0
|
104 |
-
*
|
105 |
-
* @param $file (file) a reference to the file
|
106 |
-
* @return (string)
|
107 |
-
*/
|
108 |
-
|
109 |
-
function helpers_get_path( $file )
|
110 |
-
{
|
111 |
-
return trailingslashit(dirname($file));
|
112 |
-
}
|
113 |
-
|
114 |
-
|
115 |
-
/*
|
116 |
-
* helpers_get_dir
|
117 |
-
*
|
118 |
-
* This function will calculate the directory (URL) to a file
|
119 |
-
*
|
120 |
-
* @type function
|
121 |
-
* @date 30/01/13
|
122 |
-
* @since 3.6.0
|
123 |
-
*
|
124 |
-
* @param $file (file) a reference to the file
|
125 |
-
* @return (string)
|
126 |
-
*/
|
127 |
-
|
128 |
-
function helpers_get_dir( $file )
|
129 |
-
{
|
130 |
-
$dir = trailingslashit(dirname($file));
|
131 |
-
$count = 0;
|
132 |
-
|
133 |
-
|
134 |
-
// sanitize for Win32 installs
|
135 |
-
$dir = str_replace('\\' ,'/', $dir);
|
136 |
-
|
137 |
-
|
138 |
-
// if file is in plugins folder
|
139 |
-
$wp_plugin_dir = str_replace('\\' ,'/', WP_PLUGIN_DIR);
|
140 |
-
$dir = str_replace($wp_plugin_dir, plugins_url(), $dir, $count);
|
141 |
-
|
142 |
-
|
143 |
-
if( $count < 1 )
|
144 |
-
{
|
145 |
-
// if file is in wp-content folder
|
146 |
-
$wp_content_dir = str_replace('\\' ,'/', WP_CONTENT_DIR);
|
147 |
-
$dir = str_replace($wp_content_dir, content_url(), $dir, $count);
|
148 |
-
}
|
149 |
-
|
150 |
-
|
151 |
-
if( $count < 1 )
|
152 |
-
{
|
153 |
-
// if file is in ??? folder
|
154 |
-
$wp_dir = str_replace('\\' ,'/', ABSPATH);
|
155 |
-
$dir = str_replace($wp_dir, site_url('/'), $dir);
|
156 |
-
}
|
157 |
-
|
158 |
-
|
159 |
-
return $dir;
|
160 |
-
}
|
161 |
-
|
162 |
-
|
163 |
-
/*
|
164 |
-
* acf/get_post_id
|
165 |
*
|
166 |
-
*
|
167 |
*
|
168 |
-
* @type
|
169 |
-
* @date
|
|
|
170 |
*
|
171 |
-
* @param
|
172 |
-
* @return
|
173 |
*/
|
174 |
|
175 |
-
function
|
176 |
|
177 |
-
//
|
178 |
-
|
179 |
-
|
180 |
-
// try for global post (needed for setup_postdata)
|
181 |
-
$post_id = (int) get_the_ID();
|
182 |
-
|
183 |
-
|
184 |
-
// try for current screen
|
185 |
-
if( !$post_id ) {
|
186 |
-
|
187 |
-
$post_id = get_queried_object();
|
188 |
-
|
189 |
-
}
|
190 |
-
|
191 |
-
}
|
192 |
|
193 |
|
194 |
-
//
|
195 |
-
if(
|
196 |
-
|
197 |
-
// user
|
198 |
-
if( isset($post_id->roles, $post_id->ID) ) {
|
199 |
-
|
200 |
-
$post_id = 'user_' . $post_id->ID;
|
201 |
-
|
202 |
-
// term
|
203 |
-
} elseif( isset($post_id->taxonomy, $post_id->term_id) ) {
|
204 |
-
|
205 |
-
$post_id = $post_id->taxonomy . '_' . $post_id->term_id;
|
206 |
-
|
207 |
-
// comment
|
208 |
-
} elseif( isset($post_id->comment_ID) ) {
|
209 |
-
|
210 |
-
$post_id = 'comment_' . $post_id->comment_ID;
|
211 |
-
|
212 |
-
// post
|
213 |
-
} elseif( isset($post_id->ID) ) {
|
214 |
-
|
215 |
-
$post_id = $post_id->ID;
|
216 |
-
|
217 |
-
// default
|
218 |
-
} else {
|
219 |
-
|
220 |
-
$post_id = 0;
|
221 |
-
|
222 |
-
}
|
223 |
-
|
224 |
-
}
|
225 |
|
226 |
|
227 |
-
//
|
228 |
-
|
229 |
|
230 |
-
$post_id = 'options';
|
231 |
-
|
232 |
-
}
|
233 |
|
|
|
|
|
|
|
234 |
|
235 |
-
/*
|
236 |
-
* Override for preview
|
237 |
-
*
|
238 |
-
* If the $_GET['preview_id'] is set, then the user wants to see the preview data.
|
239 |
-
* There is also the case of previewing a page with post_id = 1, but using get_field
|
240 |
-
* to load data from another post_id.
|
241 |
-
* In this case, we need to make sure that the autosave revision is actually related
|
242 |
-
* to the $post_id variable. If they match, then the autosave data will be used, otherwise,
|
243 |
-
* the user wants to load data from a completely different post_id
|
244 |
-
*/
|
245 |
|
246 |
-
|
|
|
247 |
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
}
|
255 |
-
|
256 |
}
|
257 |
|
|
|
|
|
|
|
|
|
258 |
|
259 |
-
//
|
260 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
}
|
262 |
|
263 |
|
264 |
/*
|
265 |
-
*
|
266 |
*
|
267 |
-
* This function will
|
268 |
*
|
269 |
* @type function
|
270 |
-
* @date
|
271 |
-
* @since
|
272 |
*
|
273 |
-
* @param
|
274 |
-
* @return
|
275 |
*/
|
276 |
|
277 |
-
function
|
278 |
-
|
279 |
// vars
|
280 |
-
$
|
|
|
|
|
281 |
|
282 |
|
283 |
-
//
|
284 |
-
|
285 |
-
{
|
286 |
-
$return = $this->settings[ $i ];
|
287 |
-
}
|
288 |
|
289 |
|
290 |
-
//
|
291 |
-
|
292 |
-
{
|
293 |
-
$return = $this->settings;
|
294 |
-
}
|
295 |
|
296 |
|
297 |
-
//
|
298 |
-
|
299 |
-
}
|
300 |
-
|
301 |
-
|
302 |
-
/*
|
303 |
-
* parse_types
|
304 |
-
*
|
305 |
-
* @description: helper function to set the 'types' of variables
|
306 |
-
* @since: 2.0.4
|
307 |
-
* @created: 9/12/12
|
308 |
-
*/
|
309 |
-
|
310 |
-
function parse_types( $value )
|
311 |
-
{
|
312 |
-
// vars
|
313 |
-
$restricted = array(
|
314 |
-
'label',
|
315 |
-
'name',
|
316 |
-
'_name',
|
317 |
-
'value',
|
318 |
-
'instructions'
|
319 |
-
);
|
320 |
-
|
321 |
-
|
322 |
-
// is value another array?
|
323 |
-
if( is_array($value) )
|
324 |
-
{
|
325 |
-
foreach( $value as $k => $v )
|
326 |
-
{
|
327 |
-
// bail early for restricted pieces
|
328 |
-
if( in_array($k, $restricted, true) )
|
329 |
-
{
|
330 |
-
continue;
|
331 |
-
}
|
332 |
-
|
333 |
-
|
334 |
-
// filter piece
|
335 |
-
$value[ $k ] = apply_filters( 'acf/parse_types', $v );
|
336 |
-
}
|
337 |
-
}
|
338 |
-
else
|
339 |
-
{
|
340 |
-
// string
|
341 |
-
if( is_string($value) )
|
342 |
-
{
|
343 |
-
$value = trim( $value );
|
344 |
-
}
|
345 |
-
|
346 |
-
|
347 |
-
// numbers
|
348 |
-
if( is_numeric($value) )
|
349 |
-
{
|
350 |
-
// check for non numeric characters
|
351 |
-
if( preg_match('/[^0-9]/', $value) )
|
352 |
-
{
|
353 |
-
// leave value if it contains such characters: . + - e
|
354 |
-
//$value = floatval( $value );
|
355 |
-
}
|
356 |
-
else
|
357 |
-
{
|
358 |
-
$value = intval( $value );
|
359 |
-
}
|
360 |
-
}
|
361 |
-
}
|
362 |
|
363 |
-
|
364 |
-
// return
|
365 |
-
return $value;
|
366 |
}
|
367 |
|
368 |
|
369 |
/*
|
370 |
-
*
|
371 |
*
|
372 |
-
* This function will
|
373 |
-
*
|
374 |
-
* @type action (plugins_loaded)
|
375 |
-
* @date 3/09/13
|
376 |
-
* @since 4.3.0
|
377 |
*
|
378 |
-
* @
|
379 |
-
* @
|
|
|
|
|
|
|
|
|
380 |
*/
|
381 |
|
382 |
-
function
|
383 |
-
{
|
384 |
-
// incudes
|
385 |
-
include_once('core/api.php');
|
386 |
-
|
387 |
-
include_once('core/controllers/input.php');
|
388 |
-
include_once('core/controllers/location.php');
|
389 |
-
include_once('core/controllers/field_group.php');
|
390 |
-
|
391 |
-
|
392 |
-
// admin only includes
|
393 |
-
if( is_admin() )
|
394 |
-
{
|
395 |
-
include_once('core/controllers/post.php');
|
396 |
-
include_once('core/controllers/revisions.php');
|
397 |
-
include_once('core/controllers/everything_fields.php');
|
398 |
-
include_once('core/controllers/field_groups.php');
|
399 |
-
}
|
400 |
-
|
401 |
-
|
402 |
-
// register fields
|
403 |
-
include_once('core/fields/_functions.php');
|
404 |
-
include_once('core/fields/_base.php');
|
405 |
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
|
427 |
-
include_once('core/fields/google-map.php');
|
428 |
-
include_once('core/fields/date_picker/date_picker.php');
|
429 |
-
include_once('core/fields/color_picker.php');
|
430 |
|
431 |
-
|
432 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
|
434 |
}
|
435 |
|
436 |
|
437 |
/*
|
438 |
-
*
|
439 |
*
|
440 |
-
* This function will
|
441 |
*
|
442 |
* @type function
|
443 |
-
* @date
|
444 |
-
* @since 5.
|
445 |
*
|
446 |
-
* @param
|
447 |
-
* @return
|
448 |
*/
|
449 |
|
450 |
-
function
|
451 |
-
|
452 |
-
// run only once
|
453 |
-
if( $this->settings['include_3rd_party'] )
|
454 |
-
{
|
455 |
-
return false;
|
456 |
-
}
|
457 |
-
|
458 |
|
459 |
-
//
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
|
|
|
|
|
|
465 |
|
466 |
}
|
467 |
|
468 |
|
469 |
/*
|
470 |
-
*
|
471 |
*
|
472 |
-
* This function will
|
473 |
-
*
|
474 |
-
* @type action (after_setup_theme)
|
475 |
-
* @date 3/09/13
|
476 |
-
* @since 4.3.0
|
477 |
*
|
478 |
-
* @
|
479 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
480 |
*/
|
481 |
|
482 |
-
function
|
483 |
-
|
484 |
-
//
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
if(
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
}
|
508 |
|
509 |
|
510 |
/*
|
511 |
-
*
|
512 |
*
|
513 |
-
* This function
|
514 |
-
* create post_type, register scripts, add actions / filters
|
515 |
*
|
516 |
-
* @type
|
517 |
-
* @date
|
518 |
-
* @since
|
519 |
*
|
520 |
-
* @param
|
521 |
-
* @
|
|
|
522 |
*/
|
523 |
|
524 |
-
function
|
525 |
-
{
|
526 |
-
|
527 |
-
// Create ACF post type
|
528 |
-
$labels = array(
|
529 |
-
'name' => __( 'Field Groups', 'acf' ),
|
530 |
-
'singular_name' => __( 'Advanced Custom Fields', 'acf' ),
|
531 |
-
'add_new' => __( 'Add New' , 'acf' ),
|
532 |
-
'add_new_item' => __( 'Add New Field Group' , 'acf' ),
|
533 |
-
'edit_item' => __( 'Edit Field Group' , 'acf' ),
|
534 |
-
'new_item' => __( 'New Field Group' , 'acf' ),
|
535 |
-
'view_item' => __('View Field Group', 'acf'),
|
536 |
-
'search_items' => __('Search Field Groups', 'acf'),
|
537 |
-
'not_found' => __('No Field Groups found', 'acf'),
|
538 |
-
'not_found_in_trash' => __('No Field Groups found in Trash', 'acf'),
|
539 |
-
);
|
540 |
-
|
541 |
-
register_post_type('acf', array(
|
542 |
-
'labels' => $labels,
|
543 |
-
'public' => false,
|
544 |
-
'show_ui' => true,
|
545 |
-
'_builtin' => false,
|
546 |
-
'capability_type' => 'page',
|
547 |
-
'hierarchical' => true,
|
548 |
-
'rewrite' => false,
|
549 |
-
'query_var' => "acf",
|
550 |
-
'supports' => array(
|
551 |
-
'title',
|
552 |
-
),
|
553 |
-
'show_in_menu' => false,
|
554 |
-
));
|
555 |
-
|
556 |
-
|
557 |
-
// min
|
558 |
-
$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
559 |
-
|
560 |
-
|
561 |
-
// register acf scripts
|
562 |
-
$scripts = array();
|
563 |
-
$scripts[] = array(
|
564 |
-
'handle' => 'acf-field-group',
|
565 |
-
'src' => $this->settings['dir'] . "js/field-group{$min}.js",
|
566 |
-
'deps' => array('jquery')
|
567 |
-
);
|
568 |
-
$scripts[] = array(
|
569 |
-
'handle' => 'acf-input',
|
570 |
-
'src' => $this->settings['dir'] . "js/input{$min}.js",
|
571 |
-
'deps' => array('jquery', 'jquery-ui-core', 'jquery-ui-datepicker')
|
572 |
-
);
|
573 |
-
|
574 |
-
|
575 |
-
foreach( $scripts as $script )
|
576 |
-
{
|
577 |
-
wp_register_script( $script['handle'], $script['src'], $script['deps'], $this->settings['version'] );
|
578 |
-
}
|
579 |
-
|
580 |
-
|
581 |
-
// register acf styles
|
582 |
-
$styles = array(
|
583 |
-
'acf' => $this->settings['dir'] . 'css/acf.css',
|
584 |
-
'acf-field-group' => $this->settings['dir'] . 'css/field-group.css',
|
585 |
-
'acf-global' => $this->settings['dir'] . 'css/global.css',
|
586 |
-
'acf-input' => $this->settings['dir'] . 'css/input.css',
|
587 |
-
'acf-datepicker' => $this->settings['dir'] . 'core/fields/date_picker/style.date_picker.css',
|
588 |
-
);
|
589 |
|
590 |
-
|
591 |
-
|
592 |
-
wp_register_style( $k, $v, false, $this->settings['version'] );
|
593 |
}
|
594 |
|
595 |
-
|
596 |
-
// bail early if user has defined LITE_MODE as true
|
597 |
-
if( defined('ACF_LITE') && ACF_LITE )
|
598 |
-
{
|
599 |
-
return;
|
600 |
-
}
|
601 |
-
|
602 |
-
|
603 |
-
// admin only
|
604 |
-
if( is_admin() )
|
605 |
-
{
|
606 |
-
add_action('admin_menu', array($this,'admin_menu'));
|
607 |
-
add_action('admin_head', array($this,'admin_head'));
|
608 |
-
add_filter('post_updated_messages', array($this, 'post_updated_messages'));
|
609 |
-
}
|
610 |
}
|
611 |
|
612 |
-
|
613 |
-
|
614 |
-
* admin_menu
|
615 |
*
|
616 |
-
*
|
617 |
-
*
|
618 |
-
* @
|
619 |
-
|
620 |
-
|
621 |
-
function admin_menu()
|
622 |
-
{
|
623 |
-
add_menu_page(__("Custom Fields",'acf'), __("Custom Fields",'acf'), 'manage_options', 'edit.php?post_type=acf', false, false, '80.025');
|
624 |
-
}
|
625 |
-
|
626 |
-
|
627 |
-
/*
|
628 |
-
* post_updated_messages
|
629 |
*
|
630 |
-
* @
|
631 |
-
* @
|
632 |
-
* @created: 23/06/12
|
633 |
*/
|
634 |
-
|
635 |
-
function post_updated_messages( $messages )
|
636 |
-
{
|
637 |
-
global $post, $post_ID;
|
638 |
-
|
639 |
-
$messages['acf'] = array(
|
640 |
-
0 => '', // Unused. Messages start at index 1.
|
641 |
-
1 => __('Field group updated.', 'acf'),
|
642 |
-
2 => __('Custom field updated.', 'acf'),
|
643 |
-
3 => __('Custom field deleted.', 'acf'),
|
644 |
-
4 => __('Field group updated.', 'acf'),
|
645 |
-
/* translators: %s: date and time of the revision */
|
646 |
-
5 => isset($_GET['revision']) ? sprintf( __('Field group restored to revision from %s', 'acf'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
647 |
-
6 => __('Field group published.', 'acf'),
|
648 |
-
7 => __('Field group saved.', 'acf'),
|
649 |
-
8 => __('Field group submitted.', 'acf'),
|
650 |
-
9 => __('Field group scheduled for.', 'acf'),
|
651 |
-
10 => __('Field group draft updated.', 'acf'),
|
652 |
-
);
|
653 |
-
|
654 |
-
return $messages;
|
655 |
-
}
|
656 |
|
|
|
|
|
|
|
657 |
|
658 |
-
|
|
|
659 |
*
|
660 |
-
*
|
661 |
*
|
662 |
-
*
|
663 |
-
*
|
664 |
-
*
|
665 |
-
*-------------------------------------------------------------------------------------*/
|
666 |
-
|
667 |
-
function admin_head()
|
668 |
-
{
|
669 |
-
?>
|
670 |
-
<style type="text/css">
|
671 |
-
#adminmenu #toplevel_page_edit-post_type-acf a[href="edit.php?post_type=acf&page=acf-upgrade"]{ display: none; }
|
672 |
-
#adminmenu #toplevel_page_edit-post_type-acf .wp-menu-image { background-position: 1px -33px; }
|
673 |
-
#adminmenu #toplevel_page_edit-post_type-acf:hover .wp-menu-image,
|
674 |
-
#adminmenu #toplevel_page_edit-post_type-acf.wp-menu-open .wp-menu-image { background-position: 1px -1px; }
|
675 |
-
</style>
|
676 |
-
<?php
|
677 |
-
}
|
678 |
-
|
679 |
-
|
680 |
-
/*
|
681 |
-
* get_taxonomies_for_select
|
682 |
*
|
683 |
-
* @
|
684 |
-
* @
|
685 |
-
* @created: 27/01/13
|
686 |
*/
|
687 |
|
688 |
-
function
|
689 |
-
|
690 |
-
// vars
|
691 |
-
$post_types = get_post_types();
|
692 |
-
|
693 |
-
|
694 |
-
if($post_types)
|
695 |
-
{
|
696 |
-
foreach($post_types as $post_type)
|
697 |
-
{
|
698 |
-
$post_type_object = get_post_type_object($post_type);
|
699 |
-
$taxonomies = get_object_taxonomies($post_type);
|
700 |
-
if($taxonomies)
|
701 |
-
{
|
702 |
-
foreach($taxonomies as $taxonomy)
|
703 |
-
{
|
704 |
-
if(!is_taxonomy_hierarchical($taxonomy)) continue;
|
705 |
-
$terms = get_terms($taxonomy, array('hide_empty' => false));
|
706 |
-
if($terms)
|
707 |
-
{
|
708 |
-
foreach($terms as $term)
|
709 |
-
{
|
710 |
-
$value = $taxonomy . ':' . $term->term_id;
|
711 |
-
|
712 |
-
if( $simple_value )
|
713 |
-
{
|
714 |
-
$value = $term->term_id;
|
715 |
-
}
|
716 |
-
|
717 |
-
$choices[$post_type_object->label . ': ' . $taxonomy][$value] = $term->name;
|
718 |
-
}
|
719 |
-
}
|
720 |
-
}
|
721 |
-
}
|
722 |
-
}
|
723 |
-
}
|
724 |
-
|
725 |
-
return $choices;
|
726 |
}
|
727 |
|
728 |
-
|
729 |
-
|
730 |
-
* get_post_types
|
731 |
*
|
732 |
-
*
|
733 |
-
* @since: 3.5.5
|
734 |
-
* @created: 16/12/12
|
735 |
-
*/
|
736 |
-
|
737 |
-
function get_post_types( $post_types, $exclude = array(), $include = array() )
|
738 |
-
{
|
739 |
-
// get all custom post types
|
740 |
-
$post_types = array_merge($post_types, get_post_types());
|
741 |
-
|
742 |
-
|
743 |
-
// core include / exclude
|
744 |
-
$acf_includes = array_merge( array(), $include );
|
745 |
-
$acf_excludes = array_merge( array( 'acf', 'revision', 'nav_menu_item' ), $exclude );
|
746 |
-
|
747 |
-
|
748 |
-
// include
|
749 |
-
foreach( $acf_includes as $p )
|
750 |
-
{
|
751 |
-
if( post_type_exists($p) )
|
752 |
-
{
|
753 |
-
$post_types[ $p ] = $p;
|
754 |
-
}
|
755 |
-
}
|
756 |
-
|
757 |
-
|
758 |
-
// exclude
|
759 |
-
foreach( $acf_excludes as $p )
|
760 |
-
{
|
761 |
-
unset( $post_types[ $p ] );
|
762 |
-
}
|
763 |
-
|
764 |
-
|
765 |
-
return $post_types;
|
766 |
-
|
767 |
-
}
|
768 |
-
|
769 |
-
|
770 |
-
/*
|
771 |
-
* get_image_sizes
|
772 |
*
|
773 |
-
* @
|
774 |
-
* @since
|
775 |
-
*
|
|
|
|
|
|
|
776 |
*/
|
777 |
|
778 |
-
function
|
779 |
-
|
780 |
-
|
781 |
-
$all_sizes = get_intermediate_image_sizes();
|
782 |
-
|
783 |
-
|
784 |
-
// define default sizes
|
785 |
-
$sizes = array_merge($sizes, array(
|
786 |
-
'thumbnail' => __("Thumbnail",'acf'),
|
787 |
-
'medium' => __("Medium",'acf'),
|
788 |
-
'large' => __("Large",'acf'),
|
789 |
-
'full' => __("Full",'acf')
|
790 |
-
));
|
791 |
-
|
792 |
-
|
793 |
-
// add extra registered sizes
|
794 |
-
foreach( $all_sizes as $size )
|
795 |
-
{
|
796 |
-
if( !isset($sizes[ $size ]) )
|
797 |
-
{
|
798 |
-
$sizes[ $size ] = ucwords( str_replace('-', ' ', $size) );
|
799 |
-
}
|
800 |
-
}
|
801 |
-
|
802 |
-
|
803 |
-
// return array
|
804 |
-
return $sizes;
|
805 |
}
|
806 |
|
807 |
-
|
808 |
-
|
809 |
-
* render_fields_for_input
|
810 |
*
|
811 |
-
*
|
812 |
-
*
|
813 |
-
* @
|
|
|
|
|
|
|
|
|
814 |
*/
|
815 |
|
816 |
-
function
|
817 |
-
|
818 |
-
if( is_array($fields) ){ foreach( $fields as $field ){
|
819 |
-
|
820 |
-
// if they didn't select a type, skip this field
|
821 |
-
if( !$field || !$field['type'] || $field['type'] == 'null' )
|
822 |
-
{
|
823 |
-
continue;
|
824 |
-
}
|
825 |
-
|
826 |
-
|
827 |
-
// set value
|
828 |
-
if( !isset($field['value']) )
|
829 |
-
{
|
830 |
-
$field['value'] = apply_filters('acf/load_value', false, $post_id, $field);
|
831 |
-
$field['value'] = apply_filters('acf/format_value', $field['value'], $post_id, $field);
|
832 |
-
}
|
833 |
-
|
834 |
-
|
835 |
-
// required
|
836 |
-
$required_class = "";
|
837 |
-
$required_label = "";
|
838 |
-
|
839 |
-
if( $field['required'] )
|
840 |
-
{
|
841 |
-
$required_class = ' required';
|
842 |
-
$required_label = ' <span class="required">*</span>';
|
843 |
-
}
|
844 |
-
|
845 |
-
|
846 |
-
echo '<div id="acf-' . $field['name'] . '" class="field field_type-' . $field['type'] . ' field_key-' . $field['key'] . $required_class . '" data-field_name="' . $field['name'] . '" data-field_key="' . $field['key'] . '" data-field_type="' . $field['type'] . '">';
|
847 |
-
|
848 |
-
echo '<p class="label">';
|
849 |
-
echo '<label for="' . $field['id'] . '">' . $field['label'] . $required_label . '</label>';
|
850 |
-
echo $field['instructions'];
|
851 |
-
echo '</p>';
|
852 |
-
|
853 |
-
$field['name'] = 'fields[' . $field['key'] . ']';
|
854 |
-
do_action('acf/create_field', $field, $post_id);
|
855 |
-
|
856 |
-
echo '</div>';
|
857 |
-
|
858 |
-
}}
|
859 |
-
|
860 |
}
|
861 |
|
862 |
|
863 |
-
|
864 |
-
*
|
865 |
*
|
866 |
-
*
|
867 |
-
* This prevents an inifinite loop if a user was to hook into the save and create a new post
|
868 |
*
|
869 |
-
* @
|
870 |
-
* @
|
871 |
*
|
872 |
-
* @param
|
873 |
-
* @
|
|
|
874 |
*/
|
875 |
|
876 |
-
function
|
877 |
-
|
878 |
-
$GLOBALS['acf_save_lock'] = $post_id;
|
879 |
-
|
880 |
-
return $post_id;
|
881 |
}
|
882 |
|
883 |
|
884 |
-
|
885 |
-
*
|
886 |
*
|
887 |
-
*
|
888 |
-
* This prevents an inifinite loop if a user was to hook into the save and create a new post
|
889 |
*
|
890 |
-
* @
|
891 |
-
* @
|
892 |
*
|
893 |
-
* @param
|
894 |
-
* @return
|
895 |
*/
|
896 |
|
897 |
-
function
|
898 |
-
|
899 |
-
$
|
900 |
-
|
901 |
-
return $post_id;
|
902 |
}
|
903 |
|
904 |
-
|
905 |
-
|
906 |
-
* save_post
|
907 |
*
|
908 |
-
*
|
909 |
-
*
|
910 |
-
* @
|
|
|
|
|
|
|
|
|
911 |
*/
|
912 |
|
913 |
-
function
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
{
|
919 |
-
return $post_id;
|
920 |
-
}
|
921 |
-
|
922 |
-
|
923 |
-
// loop through and save
|
924 |
-
if( !empty($_POST['fields']) )
|
925 |
-
{
|
926 |
-
// loop through and save $_POST data
|
927 |
-
foreach( $_POST['fields'] as $k => $v )
|
928 |
-
{
|
929 |
-
// get field
|
930 |
-
$f = apply_filters('acf/load_field', false, $k );
|
931 |
-
|
932 |
-
// update field
|
933 |
-
do_action('acf/update_value', $v, $post_id, $f );
|
934 |
-
|
935 |
-
}
|
936 |
-
// foreach($fields as $key => $value)
|
937 |
-
}
|
938 |
-
// if($fields)
|
939 |
-
|
940 |
-
|
941 |
-
return $post_id;
|
942 |
}
|
943 |
-
|
944 |
|
945 |
}
|
946 |
|
@@ -961,16 +682,22 @@ class acf {
|
|
961 |
* @return (object)
|
962 |
*/
|
963 |
|
964 |
-
function acf()
|
965 |
-
|
|
|
966 |
global $acf;
|
967 |
|
968 |
-
|
969 |
-
|
970 |
-
|
|
|
|
|
971 |
}
|
972 |
|
|
|
|
|
973 |
return $acf;
|
|
|
974 |
}
|
975 |
|
976 |
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Advanced Custom Fields
|
4 |
+
Plugin URI: https://www.advancedcustomfields.com/
|
5 |
+
Description: Customise WordPress with powerful, professional and intuitive fields.
|
6 |
+
Version: 5.7.6
|
7 |
Author: Elliot Condon
|
8 |
Author URI: http://www.elliotcondon.com/
|
|
|
9 |
Copyright: Elliot Condon
|
10 |
Text Domain: acf
|
11 |
Domain Path: /lang
|
12 |
*/
|
13 |
|
14 |
+
if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
15 |
|
16 |
+
if( ! class_exists('ACF') ) :
|
17 |
+
|
18 |
+
class ACF {
|
19 |
|
20 |
/** @var string The plugin version number */
|
21 |
+
var $version = '5.7.6';
|
|
|
22 |
|
23 |
/** @var array The plugin settings array */
|
24 |
var $settings = array();
|
25 |
|
26 |
+
/** @var array The plugin data array */
|
27 |
+
var $data = array();
|
28 |
+
|
29 |
+
/** @var array Storage for class instances */
|
30 |
+
var $instances = array();
|
31 |
+
|
32 |
|
33 |
/*
|
34 |
+
* __construct
|
35 |
*
|
36 |
+
* A dummy constructor to ensure ACF is only initialized once
|
37 |
*
|
38 |
* @type function
|
39 |
* @date 23/06/12
|
40 |
+
* @since 5.0.0
|
41 |
*
|
42 |
* @param N/A
|
43 |
* @return N/A
|
45 |
|
46 |
function __construct() {
|
47 |
|
48 |
+
/* Do nothing here */
|
|
|
|
|
49 |
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
/*
|
54 |
+
* initialize
|
55 |
+
*
|
56 |
+
* The real constructor to initialize ACF
|
57 |
+
*
|
58 |
+
* @type function
|
59 |
+
* @date 28/09/13
|
60 |
+
* @since 5.0.0
|
61 |
+
*
|
62 |
+
* @param $post_id (int)
|
63 |
+
* @return $post_id (int)
|
64 |
+
*/
|
65 |
+
|
66 |
+
function initialize() {
|
67 |
|
68 |
// vars
|
69 |
+
$version = $this->version;
|
70 |
+
$basename = plugin_basename( __FILE__ );
|
71 |
+
$path = plugin_dir_path( __FILE__ );
|
72 |
+
$url = plugin_dir_url( __FILE__ );
|
73 |
+
$slug = dirname($basename);
|
74 |
+
|
75 |
+
|
76 |
+
// settings
|
77 |
$this->settings = array(
|
78 |
|
79 |
// basic
|
80 |
'name' => __('Advanced Custom Fields', 'acf'),
|
81 |
+
'version' => $version,
|
82 |
+
|
83 |
// urls
|
84 |
'file' => __FILE__,
|
85 |
+
'basename' => $basename,
|
86 |
+
'path' => $path,
|
87 |
+
'url' => $url,
|
88 |
+
'slug' => $slug,
|
89 |
|
90 |
// options
|
91 |
+
'show_admin' => true,
|
92 |
+
'show_updates' => true,
|
93 |
+
'stripslashes' => false,
|
94 |
+
'local' => true,
|
95 |
+
'json' => true,
|
96 |
+
'save_json' => '',
|
97 |
+
'load_json' => array(),
|
98 |
+
'default_language' => '',
|
99 |
+
'current_language' => '',
|
100 |
+
'capability' => 'manage_options',
|
101 |
+
'uploader' => 'wp',
|
102 |
+
'autoload' => false,
|
103 |
+
'l10n' => true,
|
104 |
+
'l10n_textdomain' => '',
|
105 |
+
'google_api_key' => '',
|
106 |
+
'google_api_client' => '',
|
107 |
+
'enqueue_google_maps' => true,
|
108 |
+
'enqueue_select2' => true,
|
109 |
+
'enqueue_datepicker' => true,
|
110 |
+
'enqueue_datetimepicker' => true,
|
111 |
+
'select2_version' => 4,
|
112 |
+
'row_index_offset' => 1,
|
113 |
+
'remove_wp_meta_box' => true
|
114 |
);
|
115 |
|
116 |
|
117 |
+
// constants
|
118 |
+
$this->define( 'ACF', true );
|
119 |
+
$this->define( 'ACF_VERSION', $version );
|
120 |
+
$this->define( 'ACF_PATH', $path );
|
121 |
+
//$this->define( 'ACF_DEV', true );
|
122 |
+
|
123 |
+
// api
|
124 |
+
include_once( ACF_PATH . 'includes/api/api-helpers.php');
|
125 |
+
acf_include('includes/api/api-input.php');
|
126 |
+
acf_include('includes/api/api-value.php');
|
127 |
+
acf_include('includes/api/api-field.php');
|
128 |
+
acf_include('includes/api/api-field-group.php');
|
129 |
+
acf_include('includes/api/api-template.php');
|
130 |
+
acf_include('includes/api/api-term.php');
|
131 |
+
|
132 |
+
// fields
|
133 |
+
acf_include('includes/fields.php');
|
134 |
+
acf_include('includes/fields/class-acf-field.php');
|
135 |
+
|
136 |
|
137 |
+
// locations
|
138 |
+
acf_include('includes/locations.php');
|
139 |
+
acf_include('includes/locations/class-acf-location.php');
|
140 |
+
|
141 |
+
|
142 |
+
// core
|
143 |
+
acf_include('includes/assets.php');
|
144 |
+
acf_include('includes/cache.php');
|
145 |
+
acf_include('includes/compatibility.php');
|
146 |
+
acf_include('includes/deprecated.php');
|
147 |
+
acf_include('includes/form.php');
|
148 |
+
acf_include('includes/json.php');
|
149 |
+
acf_include('includes/local.php');
|
150 |
+
acf_include('includes/loop.php');
|
151 |
+
acf_include('includes/media.php');
|
152 |
+
acf_include('includes/revisions.php');
|
153 |
+
acf_include('includes/updates.php');
|
154 |
+
acf_include('includes/upgrades.php');
|
155 |
+
acf_include('includes/validation.php');
|
156 |
+
|
157 |
+
// ajax
|
158 |
+
acf_include('includes/ajax/class-acf-ajax.php');
|
159 |
+
acf_include('includes/ajax/class-acf-ajax-check-screen.php');
|
160 |
+
acf_include('includes/ajax/class-acf-ajax-user-setting.php');
|
161 |
+
acf_include('includes/ajax/class-acf-ajax-upgrade.php');
|
162 |
+
acf_include('includes/ajax/class-acf-ajax-query.php');
|
163 |
+
acf_include('includes/ajax/class-acf-ajax-query-terms.php');
|
164 |
+
|
165 |
+
// forms
|
166 |
+
acf_include('includes/forms/form-attachment.php');
|
167 |
+
acf_include('includes/forms/form-comment.php');
|
168 |
+
acf_include('includes/forms/form-customizer.php');
|
169 |
+
acf_include('includes/forms/form-front.php');
|
170 |
+
acf_include('includes/forms/form-nav-menu.php');
|
171 |
+
acf_include('includes/forms/form-post.php');
|
172 |
+
acf_include('includes/forms/form-taxonomy.php');
|
173 |
+
acf_include('includes/forms/form-user.php');
|
174 |
+
acf_include('includes/forms/form-widget.php');
|
175 |
+
|
176 |
+
|
177 |
+
// admin
|
178 |
+
if( is_admin() ) {
|
179 |
+
acf_include('includes/admin/admin.php');
|
180 |
+
acf_include('includes/admin/admin-field-group.php');
|
181 |
+
acf_include('includes/admin/admin-field-groups.php');
|
182 |
+
acf_include('includes/admin/admin-tools.php');
|
183 |
+
acf_include('includes/admin/admin-upgrade.php');
|
184 |
+
acf_include('includes/admin/settings-info.php');
|
185 |
+
}
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
|
188 |
+
// pro
|
189 |
+
acf_include('pro/acf-pro.php');
|
190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
|
192 |
+
// actions
|
193 |
+
add_action('init', array($this, 'init'), 5);
|
194 |
+
add_action('init', array($this, 'register_post_types'), 5);
|
195 |
+
add_action('init', array($this, 'register_post_status'), 5);
|
196 |
|
|
|
|
|
|
|
|
|
197 |
|
198 |
+
// filters
|
199 |
+
add_filter('posts_where', array($this, 'posts_where'), 10, 2 );
|
200 |
+
//add_filter('posts_request', array($this, 'posts_request'), 10, 1 );
|
201 |
}
|
202 |
|
203 |
|
204 |
/*
|
205 |
+
* init
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
*
|
207 |
+
* This function will run after all plugins and theme functions have been included
|
208 |
*
|
209 |
+
* @type action (init)
|
210 |
+
* @date 28/09/13
|
211 |
+
* @since 5.0.0
|
212 |
*
|
213 |
+
* @param N/A
|
214 |
+
* @return N/A
|
215 |
*/
|
216 |
|
217 |
+
function init() {
|
218 |
|
219 |
+
// bail early if too early
|
220 |
+
// ensures all plugins have a chance to add fields, etc
|
221 |
+
if( !did_action('plugins_loaded') ) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
|
223 |
|
224 |
+
// bail early if already init
|
225 |
+
if( acf_has_done('init') ) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
|
227 |
|
228 |
+
// vars
|
229 |
+
$major = intval( acf_get_setting('version') );
|
230 |
|
|
|
|
|
|
|
231 |
|
232 |
+
// update url
|
233 |
+
// - allow another plugin to modify dir (maybe force SSL)
|
234 |
+
acf_update_setting('url', plugin_dir_url( __FILE__ ));
|
235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
|
237 |
+
// textdomain
|
238 |
+
$this->load_plugin_textdomain();
|
239 |
|
240 |
+
// include 3rd party support
|
241 |
+
acf_include('includes/third-party.php');
|
242 |
+
|
243 |
+
// include wpml support
|
244 |
+
if( defined('ICL_SITEPRESS_VERSION') ) {
|
245 |
+
acf_include('includes/wpml.php');
|
|
|
|
|
246 |
}
|
247 |
|
248 |
+
// early access
|
249 |
+
if( defined('ACF_EARLY_ACCESS') ) {
|
250 |
+
acf_include('includes/early-access.php');
|
251 |
+
}
|
252 |
|
253 |
+
// include gutenberg
|
254 |
+
if( defined('GUTENBERG_VERSION') ) {
|
255 |
+
acf_include('includes/forms/form-gutenberg.php');
|
256 |
+
}
|
257 |
+
|
258 |
+
// fields
|
259 |
+
acf_include('includes/fields/class-acf-field-text.php');
|
260 |
+
acf_include('includes/fields/class-acf-field-textarea.php');
|
261 |
+
acf_include('includes/fields/class-acf-field-number.php');
|
262 |
+
acf_include('includes/fields/class-acf-field-range.php');
|
263 |
+
acf_include('includes/fields/class-acf-field-email.php');
|
264 |
+
acf_include('includes/fields/class-acf-field-url.php');
|
265 |
+
acf_include('includes/fields/class-acf-field-password.php');
|
266 |
+
|
267 |
+
acf_include('includes/fields/class-acf-field-image.php');
|
268 |
+
acf_include('includes/fields/class-acf-field-file.php');
|
269 |
+
acf_include('includes/fields/class-acf-field-wysiwyg.php');
|
270 |
+
acf_include('includes/fields/class-acf-field-oembed.php');
|
271 |
+
|
272 |
+
acf_include('includes/fields/class-acf-field-select.php');
|
273 |
+
acf_include('includes/fields/class-acf-field-checkbox.php');
|
274 |
+
acf_include('includes/fields/class-acf-field-radio.php');
|
275 |
+
acf_include('includes/fields/class-acf-field-button-group.php');
|
276 |
+
acf_include('includes/fields/class-acf-field-true_false.php');
|
277 |
+
|
278 |
+
acf_include('includes/fields/class-acf-field-link.php');
|
279 |
+
acf_include('includes/fields/class-acf-field-post_object.php');
|
280 |
+
acf_include('includes/fields/class-acf-field-page_link.php');
|
281 |
+
acf_include('includes/fields/class-acf-field-relationship.php');
|
282 |
+
acf_include('includes/fields/class-acf-field-taxonomy.php');
|
283 |
+
acf_include('includes/fields/class-acf-field-user.php');
|
284 |
+
|
285 |
+
acf_include('includes/fields/class-acf-field-google-map.php');
|
286 |
+
acf_include('includes/fields/class-acf-field-date_picker.php');
|
287 |
+
acf_include('includes/fields/class-acf-field-date_time_picker.php');
|
288 |
+
acf_include('includes/fields/class-acf-field-time_picker.php');
|
289 |
+
acf_include('includes/fields/class-acf-field-color_picker.php');
|
290 |
+
|
291 |
+
acf_include('includes/fields/class-acf-field-message.php');
|
292 |
+
acf_include('includes/fields/class-acf-field-accordion.php');
|
293 |
+
acf_include('includes/fields/class-acf-field-tab.php');
|
294 |
+
acf_include('includes/fields/class-acf-field-group.php');
|
295 |
+
do_action('acf/include_field_types', $major);
|
296 |
+
|
297 |
+
|
298 |
+
// locations
|
299 |
+
acf_include('includes/locations/class-acf-location-post-type.php');
|
300 |
+
acf_include('includes/locations/class-acf-location-post-template.php');
|
301 |
+
acf_include('includes/locations/class-acf-location-post-status.php');
|
302 |
+
acf_include('includes/locations/class-acf-location-post-format.php');
|
303 |
+
acf_include('includes/locations/class-acf-location-post-category.php');
|
304 |
+
acf_include('includes/locations/class-acf-location-post-taxonomy.php');
|
305 |
+
acf_include('includes/locations/class-acf-location-post.php');
|
306 |
+
acf_include('includes/locations/class-acf-location-page-template.php');
|
307 |
+
acf_include('includes/locations/class-acf-location-page-type.php');
|
308 |
+
acf_include('includes/locations/class-acf-location-page-parent.php');
|
309 |
+
acf_include('includes/locations/class-acf-location-page.php');
|
310 |
+
acf_include('includes/locations/class-acf-location-current-user.php');
|
311 |
+
acf_include('includes/locations/class-acf-location-current-user-role.php');
|
312 |
+
acf_include('includes/locations/class-acf-location-user-form.php');
|
313 |
+
acf_include('includes/locations/class-acf-location-user-role.php');
|
314 |
+
acf_include('includes/locations/class-acf-location-taxonomy.php');
|
315 |
+
acf_include('includes/locations/class-acf-location-attachment.php');
|
316 |
+
acf_include('includes/locations/class-acf-location-comment.php');
|
317 |
+
acf_include('includes/locations/class-acf-location-widget.php');
|
318 |
+
acf_include('includes/locations/class-acf-location-nav-menu.php');
|
319 |
+
acf_include('includes/locations/class-acf-location-nav-menu-item.php');
|
320 |
+
do_action('acf/include_location_rules', $major);
|
321 |
+
|
322 |
+
|
323 |
+
// local fields
|
324 |
+
do_action('acf/include_fields', $major);
|
325 |
+
|
326 |
+
|
327 |
+
// action for 3rd party
|
328 |
+
do_action('acf/init');
|
329 |
+
|
330 |
}
|
331 |
|
332 |
|
333 |
/*
|
334 |
+
* load_plugin_textdomain
|
335 |
*
|
336 |
+
* This function will load the textdomain file
|
337 |
*
|
338 |
* @type function
|
339 |
+
* @date 3/5/17
|
340 |
+
* @since 5.5.13
|
341 |
*
|
342 |
+
* @param n/a
|
343 |
+
* @return n/a
|
344 |
*/
|
345 |
|
346 |
+
function load_plugin_textdomain() {
|
347 |
+
|
348 |
// vars
|
349 |
+
$domain = 'acf';
|
350 |
+
$locale = apply_filters( 'plugin_locale', acf_get_locale(), $domain );
|
351 |
+
$mofile = $domain . '-' . $locale . '.mo';
|
352 |
|
353 |
|
354 |
+
// load from the languages directory first
|
355 |
+
load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile );
|
|
|
|
|
|
|
356 |
|
357 |
|
358 |
+
// redirect missing translations
|
359 |
+
$mofile = str_replace('fr_CA', 'fr_FR', $mofile);
|
|
|
|
|
|
|
360 |
|
361 |
|
362 |
+
// load from plugin lang folder
|
363 |
+
load_textdomain( $domain, acf_get_path( 'lang/' . $mofile ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
|
|
|
|
|
|
|
365 |
}
|
366 |
|
367 |
|
368 |
/*
|
369 |
+
* register_post_types
|
370 |
*
|
371 |
+
* This function will register post types and statuses
|
|
|
|
|
|
|
|
|
372 |
*
|
373 |
+
* @type function
|
374 |
+
* @date 22/10/2015
|
375 |
+
* @since 5.3.2
|
376 |
+
*
|
377 |
+
* @param n/a
|
378 |
+
* @return n/a
|
379 |
*/
|
380 |
|
381 |
+
function register_post_types() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
|
383 |
+
// vars
|
384 |
+
$cap = acf_get_setting('capability');
|
385 |
+
|
386 |
+
|
387 |
+
// register post type 'acf-field-group'
|
388 |
+
register_post_type('acf-field-group', array(
|
389 |
+
'labels' => array(
|
390 |
+
'name' => __( 'Field Groups', 'acf' ),
|
391 |
+
'singular_name' => __( 'Field Group', 'acf' ),
|
392 |
+
'add_new' => __( 'Add New' , 'acf' ),
|
393 |
+
'add_new_item' => __( 'Add New Field Group' , 'acf' ),
|
394 |
+
'edit_item' => __( 'Edit Field Group' , 'acf' ),
|
395 |
+
'new_item' => __( 'New Field Group' , 'acf' ),
|
396 |
+
'view_item' => __( 'View Field Group', 'acf' ),
|
397 |
+
'search_items' => __( 'Search Field Groups', 'acf' ),
|
398 |
+
'not_found' => __( 'No Field Groups found', 'acf' ),
|
399 |
+
'not_found_in_trash' => __( 'No Field Groups found in Trash', 'acf' ),
|
400 |
+
),
|
401 |
+
'public' => false,
|
402 |
+
'show_ui' => true,
|
403 |
+
'_builtin' => false,
|
404 |
+
'capability_type' => 'post',
|
405 |
+
'capabilities' => array(
|
406 |
+
'edit_post' => $cap,
|
407 |
+
'delete_post' => $cap,
|
408 |
+
'edit_posts' => $cap,
|
409 |
+
'delete_posts' => $cap,
|
410 |
+
),
|
411 |
+
'hierarchical' => true,
|
412 |
+
'rewrite' => false,
|
413 |
+
'query_var' => false,
|
414 |
+
'supports' => array('title'),
|
415 |
+
'show_in_menu' => false,
|
416 |
+
));
|
417 |
|
|
|
|
|
|
|
418 |
|
419 |
+
// register post type 'acf-field'
|
420 |
+
register_post_type('acf-field', array(
|
421 |
+
'labels' => array(
|
422 |
+
'name' => __( 'Fields', 'acf' ),
|
423 |
+
'singular_name' => __( 'Field', 'acf' ),
|
424 |
+
'add_new' => __( 'Add New' , 'acf' ),
|
425 |
+
'add_new_item' => __( 'Add New Field' , 'acf' ),
|
426 |
+
'edit_item' => __( 'Edit Field' , 'acf' ),
|
427 |
+
'new_item' => __( 'New Field' , 'acf' ),
|
428 |
+
'view_item' => __( 'View Field', 'acf' ),
|
429 |
+
'search_items' => __( 'Search Fields', 'acf' ),
|
430 |
+
'not_found' => __( 'No Fields found', 'acf' ),
|
431 |
+
'not_found_in_trash' => __( 'No Fields found in Trash', 'acf' ),
|
432 |
+
),
|
433 |
+
'public' => false,
|
434 |
+
'show_ui' => false,
|
435 |
+
'_builtin' => false,
|
436 |
+
'capability_type' => 'post',
|
437 |
+
'capabilities' => array(
|
438 |
+
'edit_post' => $cap,
|
439 |
+
'delete_post' => $cap,
|
440 |
+
'edit_posts' => $cap,
|
441 |
+
'delete_posts' => $cap,
|
442 |
+
),
|
443 |
+
'hierarchical' => true,
|
444 |
+
'rewrite' => false,
|
445 |
+
'query_var' => false,
|
446 |
+
'supports' => array('title'),
|
447 |
+
'show_in_menu' => false,
|
448 |
+
));
|
449 |
|
450 |
}
|
451 |
|
452 |
|
453 |
/*
|
454 |
+
* register_post_status
|
455 |
*
|
456 |
+
* This function will register custom post statuses
|
457 |
*
|
458 |
* @type function
|
459 |
+
* @date 22/10/2015
|
460 |
+
* @since 5.3.2
|
461 |
*
|
462 |
+
* @param $post_id (int)
|
463 |
+
* @return $post_id (int)
|
464 |
*/
|
465 |
|
466 |
+
function register_post_status() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
|
468 |
+
// acf-disabled
|
469 |
+
register_post_status('acf-disabled', array(
|
470 |
+
'label' => __( 'Inactive', 'acf' ),
|
471 |
+
'public' => true,
|
472 |
+
'exclude_from_search' => false,
|
473 |
+
'show_in_admin_all_list' => true,
|
474 |
+
'show_in_admin_status_list' => true,
|
475 |
+
'label_count' => _n_noop( 'Inactive <span class="count">(%s)</span>', 'Inactive <span class="count">(%s)</span>', 'acf' ),
|
476 |
+
));
|
477 |
|
478 |
}
|
479 |
|
480 |
|
481 |
/*
|
482 |
+
* posts_where
|
483 |
*
|
484 |
+
* This function will add in some new parameters to the WP_Query args allowing fields to be found via key / name
|
|
|
|
|
|
|
|
|
485 |
*
|
486 |
+
* @type filter
|
487 |
+
* @date 5/12/2013
|
488 |
+
* @since 5.0.0
|
489 |
+
*
|
490 |
+
* @param $where (string)
|
491 |
+
* @param $wp_query (object)
|
492 |
+
* @return $where (string)
|
493 |
*/
|
494 |
|
495 |
+
function posts_where( $where, $wp_query ) {
|
496 |
+
|
497 |
+
// global
|
498 |
+
global $wpdb;
|
499 |
+
|
500 |
+
|
501 |
+
// acf_field_key
|
502 |
+
if( $field_key = $wp_query->get('acf_field_key') ) {
|
503 |
+
$where .= $wpdb->prepare(" AND {$wpdb->posts}.post_name = %s", $field_key );
|
504 |
+
}
|
505 |
+
|
506 |
+
// acf_field_name
|
507 |
+
if( $field_name = $wp_query->get('acf_field_name') ) {
|
508 |
+
$where .= $wpdb->prepare(" AND {$wpdb->posts}.post_excerpt = %s", $field_name );
|
509 |
+
}
|
510 |
+
|
511 |
+
// acf_group_key
|
512 |
+
if( $group_key = $wp_query->get('acf_group_key') ) {
|
513 |
+
$where .= $wpdb->prepare(" AND {$wpdb->posts}.post_name = %s", $group_key );
|
514 |
+
}
|
515 |
+
|
516 |
+
|
517 |
+
// return
|
518 |
+
return $where;
|
519 |
+
|
520 |
}
|
521 |
|
522 |
|
523 |
/*
|
524 |
+
* define
|
525 |
*
|
526 |
+
* This function will safely define a constant
|
|
|
527 |
*
|
528 |
+
* @type function
|
529 |
+
* @date 3/5/17
|
530 |
+
* @since 5.5.13
|
531 |
*
|
532 |
+
* @param $name (string)
|
533 |
+
* @param $value (mixed)
|
534 |
+
* @return n/a
|
535 |
*/
|
536 |
|
537 |
+
function define( $name, $value = true ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
538 |
|
539 |
+
if( !defined($name) ) {
|
540 |
+
define( $name, $value );
|
|
|
541 |
}
|
542 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
543 |
}
|
544 |
|
545 |
+
/**
|
546 |
+
* has_setting
|
|
|
547 |
*
|
548 |
+
* Returns true if has setting.
|
549 |
+
*
|
550 |
+
* @date 2/2/18
|
551 |
+
* @since 5.6.5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
552 |
*
|
553 |
+
* @param string $name
|
554 |
+
* @return boolean
|
|
|
555 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
556 |
|
557 |
+
function has_setting( $name ) {
|
558 |
+
return isset($this->settings[ $name ]);
|
559 |
+
}
|
560 |
|
561 |
+
/**
|
562 |
+
* get_setting
|
563 |
*
|
564 |
+
* Returns a setting.
|
565 |
*
|
566 |
+
* @date 28/09/13
|
567 |
+
* @since 5.0.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
568 |
*
|
569 |
+
* @param string $name
|
570 |
+
* @return mixed
|
|
|
571 |
*/
|
572 |
|
573 |
+
function get_setting( $name ) {
|
574 |
+
return isset($this->settings[ $name ]) ? $this->settings[ $name ] : null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
575 |
}
|
576 |
|
577 |
+
/**
|
578 |
+
* update_setting
|
|
|
579 |
*
|
580 |
+
* Updates a setting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
*
|
582 |
+
* @date 28/09/13
|
583 |
+
* @since 5.0.0
|
584 |
+
*
|
585 |
+
* @param string $name
|
586 |
+
* @param mixed $value
|
587 |
+
* @return n/a
|
588 |
*/
|
589 |
|
590 |
+
function update_setting( $name, $value ) {
|
591 |
+
$this->settings[ $name ] = $value;
|
592 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
}
|
594 |
|
595 |
+
/**
|
596 |
+
* get_data
|
|
|
597 |
*
|
598 |
+
* Returns data.
|
599 |
+
*
|
600 |
+
* @date 28/09/13
|
601 |
+
* @since 5.0.0
|
602 |
+
*
|
603 |
+
* @param string $name
|
604 |
+
* @return mixed
|
605 |
*/
|
606 |
|
607 |
+
function get_data( $name ) {
|
608 |
+
return isset($this->data[ $name ]) ? $this->data[ $name ] : null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
609 |
}
|
610 |
|
611 |
|
612 |
+
/**
|
613 |
+
* set_data
|
614 |
*
|
615 |
+
* Sets data.
|
|
|
616 |
*
|
617 |
+
* @date 28/09/13
|
618 |
+
* @since 5.0.0
|
619 |
*
|
620 |
+
* @param string $name
|
621 |
+
* @param mixed $value
|
622 |
+
* @return n/a
|
623 |
*/
|
624 |
|
625 |
+
function set_data( $name, $value ) {
|
626 |
+
$this->data[ $name ] = $value;
|
|
|
|
|
|
|
627 |
}
|
628 |
|
629 |
|
630 |
+
/**
|
631 |
+
* get_instance
|
632 |
*
|
633 |
+
* Returns an instance.
|
|
|
634 |
*
|
635 |
+
* @date 13/2/18
|
636 |
+
* @since 5.6.9
|
637 |
*
|
638 |
+
* @param string $class The instance class name.
|
639 |
+
* @return object
|
640 |
*/
|
641 |
|
642 |
+
function get_instance( $class ) {
|
643 |
+
$name = strtolower($class);
|
644 |
+
return isset($this->instances[ $name ]) ? $this->instances[ $name ] : null;
|
|
|
|
|
645 |
}
|
646 |
|
647 |
+
/**
|
648 |
+
* new_instance
|
|
|
649 |
*
|
650 |
+
* Creates and stores an instance.
|
651 |
+
*
|
652 |
+
* @date 13/2/18
|
653 |
+
* @since 5.6.9
|
654 |
+
*
|
655 |
+
* @param string $class The instance class name.
|
656 |
+
* @return object
|
657 |
*/
|
658 |
|
659 |
+
function new_instance( $class ) {
|
660 |
+
$instance = new $class();
|
661 |
+
$name = strtolower($class);
|
662 |
+
$this->instances[ $name ] = $instance;
|
663 |
+
return $instance;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
664 |
}
|
|
|
665 |
|
666 |
}
|
667 |
|
682 |
* @return (object)
|
683 |
*/
|
684 |
|
685 |
+
function acf() {
|
686 |
+
|
687 |
+
// globals
|
688 |
global $acf;
|
689 |
|
690 |
+
|
691 |
+
// initialize
|
692 |
+
if( !isset($acf) ) {
|
693 |
+
$acf = new ACF();
|
694 |
+
$acf->initialize();
|
695 |
}
|
696 |
|
697 |
+
|
698 |
+
// return
|
699 |
return $acf;
|
700 |
+
|
701 |
}
|
702 |
|
703 |
|
shared/assets/plugins/advanced-custom-fields/assets/css/acf-dark.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.acf-box{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-box .footer,.acf-box .title{border-color:#23282d}.acf-box h2{color:#bbc8d4}.acf-box table,.acf-box tbody,.acf-box tr{background:0 0!important}.acf-thead{color:#bbc8d4;border-color:#191f25}.acf-tfoot{background-color:#2d3136;border-color:#23282d}.acf-table.-clear,.acf-table.-clear tr{background:0 0!important}.acf-loading-overlay{background:rgba(0,0,0,.5)}.acf-fields>.acf-field{border-color:#23282d}.acf-fields.-left>.acf-field:before{background:rgba(0,0,0,.1);border-color:#23282d}.acf-fields.-border{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-field[data-width]+.acf-field[data-width]{border-color:#23282d}.acf-input-append,.acf-input-prepend{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-fields>.acf-tab-wrap{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-fields>.acf-tab-wrap .acf-tab-group{background-color:#2d3136;border-color:#23282d}.acf-fields>.acf-tab-wrap .acf-tab-group li a{background-color:#2d3136;border-color:#23282d}.acf-fields>.acf-tab-wrap .acf-tab-group li a:hover{background-color:#2d3136;border-color:#23282d;color:#bbc8d4}.acf-fields>.acf-tab-wrap .acf-tab-group li.active a{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-fields.-sidebar:before{background-color:#2d3136;border-color:#23282d}.acf-fields.-sidebar.-left:before{background-color:#2d3136;border-color:#23282d;background:#23282d}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group li a{background-color:#2d3136;border-color:#23282d}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group li.active a{background-color:#2d3136;border-color:#23282d}.acf-file-uploader .show-if-value{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-file-uploader .show-if-value .file-icon{background-color:#2d3136;border-color:#23282d}.acf-oembed{background-color:#2d3136;border-color:#23282d}.acf-oembed .title{background-color:#50626f;border-color:#191f25;color:#fff}.acf-gallery{background-color:#2d3136;border-color:#23282d}.acf-gallery .acf-gallery-main{background:#23282d}.acf-gallery .acf-gallery-attachment .margin{background-color:#2d3136;border-color:#23282d}.acf-gallery .acf-gallery-side{background-color:#2d3136;border-color:#23282d}.acf-gallery .acf-gallery-side .acf-gallery-side-info{background-color:#2d3136;border-color:#23282d}.acf-gallery .acf-gallery-toolbar{background-color:#2d3136;border-color:#23282d}.acf-button-group label:not(.selected){background-color:#2d3136;border-color:#23282d}.acf-switch:not(.-on){background-color:#2d3136;border-color:#23282d}.acf-switch:not(.-on) .acf-switch-slider{background-color:#50626f;border-color:#191f25;color:#fff}.acf-link .link-wrap{background-color:#2d3136;border-color:#23282d}.acf-relationship .filters{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-relationship .selection{background-color:#2d3136;border-color:#23282d}.acf-relationship .selection .choices,.acf-relationship .selection .choices-list,.acf-relationship .selection .values{background-color:#2d3136;border-color:#23282d}.acf-taxonomy-field .categorychecklist-holder{background-color:#2d3136;border-color:#23282d}.acf-google-map{background-color:#2d3136;border-color:#23282d}.acf-google-map .title{background-color:#50626f;border-color:#191f25;color:#fff}.acf-accordion{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-field.acf-accordion .acf-accordion-content>.acf-fields{border-color:#191f25}.acf-flexible-content .layout{background-color:#32373c;border-color:#191f25;color:#bbc8d4}.acf-flexible-content .layout .acf-fc-layout-handle{background-color:#2d3136;border-color:#23282d}.acf-flexible-content .layout .acf-fc-layout-handle .acf-fc-layout-order{background-color:#32373c;border-color:#191f25;color:#bbc8d4}#wpbody .acf-table{background-color:#2d3136;border-color:#23282d}#wpbody .acf-table>tbody>tr,#wpbody .acf-table>thead>tr{background:0 0}#wpbody .acf-table>tbody>tr>td,#wpbody .acf-table>tbody>tr>th,#wpbody .acf-table>thead>tr>td,#wpbody .acf-table>thead>tr>th{border-color:#191f25}.acf-field select optgroup,.acf-field select optgroup:nth-child(2n){background:#50626f}#acf-field-group-fields .acf-field-list-wrap{background-color:#32373c;border-color:#191f25;color:#bbc8d4}#acf-field-group-fields .acf-field-list .no-fields-message{background-color:#32373c;border-color:#191f25;color:#bbc8d4}#acf-field-group-fields .acf-field-object{background-color:#32373c;border-color:#191f25;color:#bbc8d4;border-color:#23282d}#acf-field-group-fields .acf-field-object table,#acf-field-group-fields .acf-field-object tbody,#acf-field-group-fields .acf-field-object td,#acf-field-group-fields .acf-field-object th,#acf-field-group-fields .acf-field-object tr{background:0 0;border-color:#23282d}#acf-field-group-fields .acf-field-object .acf-field .acf-label{background-color:#2d3136;border-color:#23282d}#acf-field-group-fields .acf-field-object.ui-sortable-helper{border-color:#191f25;box-shadow:none}#acf-field-group-fields .acf-field-object.ui-sortable-placeholder{background-color:#2d3136;border-color:#23282d;box-shadow:none}#acf-field-group-fields .acf-field-object+.acf-field-object-accordion::before,#acf-field-group-fields .acf-field-object+.acf-field-object-tab::before{background-color:#2d3136;border-color:#23282d}.acf-meta-box-wrap .acf-fields{background-color:#50626f;border-color:#191f25;color:#fff;background:0 0}
|
shared/assets/plugins/advanced-custom-fields/assets/css/acf-field-group.css
ADDED
@@ -0,0 +1,457 @@
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*--------------------------------------------------------------------------------------------
|
2 |
+
*
|
3 |
+
* Vars
|
4 |
+
*
|
5 |
+
*--------------------------------------------------------------------------------------------*/
|
6 |
+
/* colors */
|
7 |
+
/* acf-field */
|
8 |
+
/* responsive */
|
9 |
+
/*--------------------------------------------------------------------------------------------
|
10 |
+
*
|
11 |
+
* Mixins
|
12 |
+
*
|
13 |
+
*--------------------------------------------------------------------------------------------*/
|
14 |
+
/*---------------------------------------------------------------------------------------------
|
15 |
+
*
|
16 |
+
* Global
|
17 |
+
*
|
18 |
+
*---------------------------------------------------------------------------------------------*/
|
19 |
+
#adv-settings .show-field-keys label {
|
20 |
+
padding: 0 5px;
|
21 |
+
}
|
22 |
+
#acf-field-group-fields > .inside,
|
23 |
+
#acf-field-group-locations > .inside,
|
24 |
+
#acf-field-group-options > .inside {
|
25 |
+
padding: 0;
|
26 |
+
margin: 0;
|
27 |
+
}
|
28 |
+
.acf-field p.description {
|
29 |
+
font-style: normal;
|
30 |
+
font-size: 12px;
|
31 |
+
color: #777777;
|
32 |
+
}
|
33 |
+
/*---------------------------------------------------------------------------------------------
|
34 |
+
*
|
35 |
+
* Postbox: Publish
|
36 |
+
*
|
37 |
+
*---------------------------------------------------------------------------------------------*/
|
38 |
+
#minor-publishing-actions,
|
39 |
+
#misc-publishing-actions #visibility {
|
40 |
+
display: none;
|
41 |
+
}
|
42 |
+
#minor-publishing {
|
43 |
+
border-bottom: 0 none;
|
44 |
+
}
|
45 |
+
#misc-pub-section {
|
46 |
+
border-bottom: 0 none;
|
47 |
+
}
|
48 |
+
#misc-publishing-actions .misc-pub-section {
|
49 |
+
border-bottom-color: #F5F5F5;
|
50 |
+
}
|
51 |
+
/*---------------------------------------------------------------------------------------------
|
52 |
+
*
|
53 |
+
* Postbox: Fields
|
54 |
+
*
|
55 |
+
*---------------------------------------------------------------------------------------------*/
|
56 |
+
#acf-field-group-fields {
|
57 |
+
border: 0 none;
|
58 |
+
box-shadow: none;
|
59 |
+
/* metabox */
|
60 |
+
/* links */
|
61 |
+
/* table header */
|
62 |
+
/* show keys */
|
63 |
+
/* fields */
|
64 |
+
}
|
65 |
+
#acf-field-group-fields > .handlediv,
|
66 |
+
#acf-field-group-fields > .hndle {
|
67 |
+
display: none;
|
68 |
+
}
|
69 |
+
#acf-field-group-fields a {
|
70 |
+
text-decoration: none;
|
71 |
+
}
|
72 |
+
#acf-field-group-fields a:active,
|
73 |
+
#acf-field-group-fields a:focus {
|
74 |
+
outline: none;
|
75 |
+
box-shadow: none;
|
76 |
+
}
|
77 |
+
#acf-field-group-fields .li-field-order {
|
78 |
+
width: 20%;
|
79 |
+
}
|
80 |
+
#acf-field-group-fields .li-field-label {
|
81 |
+
width: 30%;
|
82 |
+
}
|
83 |
+
#acf-field-group-fields .li-field-name {
|
84 |
+
width: 25%;
|
85 |
+
}
|
86 |
+
#acf-field-group-fields .li-field-type {
|
87 |
+
width: 25%;
|
88 |
+
}
|
89 |
+
#acf-field-group-fields .li-field-key {
|
90 |
+
display: none;
|
91 |
+
}
|
92 |
+
#acf-field-group-fields.show-field-keys .li-field-label,
|
93 |
+
#acf-field-group-fields.show-field-keys .li-field-name,
|
94 |
+
#acf-field-group-fields.show-field-keys .li-field-type,
|
95 |
+
#acf-field-group-fields.show-field-keys .li-field-key {
|
96 |
+
width: 20%;
|
97 |
+
}
|
98 |
+
#acf-field-group-fields.show-field-keys .li-field-key {
|
99 |
+
display: block;
|
100 |
+
}
|
101 |
+
#acf-field-group-fields .acf-field-list-wrap {
|
102 |
+
border: #DFDFDF solid 1px;
|
103 |
+
}
|
104 |
+
#acf-field-group-fields .acf-field-list {
|
105 |
+
background: #F9F9F9;
|
106 |
+
margin-top: -1px;
|
107 |
+
/* no fields */
|
108 |
+
/* empty */
|
109 |
+
}
|
110 |
+
#acf-field-group-fields .acf-field-list .no-fields-message {
|
111 |
+
padding: 15px 15px;
|
112 |
+
background: #fff;
|
113 |
+
display: none;
|
114 |
+
}
|
115 |
+
#acf-field-group-fields .acf-field-list.-empty .no-fields-message {
|
116 |
+
display: block;
|
117 |
+
}
|
118 |
+
/* field object */
|
119 |
+
.acf-field-object {
|
120 |
+
border-top: #F0F0F0 solid 1px;
|
121 |
+
background: #fff;
|
122 |
+
/* sortable */
|
123 |
+
/* meta */
|
124 |
+
/* handle */
|
125 |
+
/* open */
|
126 |
+
/*
|
127 |
+
// debug
|
128 |
+
&[data-save="meta"] {
|
129 |
+
> .handle {
|
130 |
+
border-left: #ffb700 solid 5px !important;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
&[data-save="settings"] {
|
135 |
+
> .handle {
|
136 |
+
border-left: #0ec563 solid 5px !important;
|
137 |
+
}
|
138 |
+
}
|
139 |
+
*/
|
140 |
+
/* hover */
|
141 |
+
/* settings */
|
142 |
+
/* conditional logic */
|
143 |
+
}
|
144 |
+
.acf-field-object.ui-sortable-helper {
|
145 |
+
border-top-color: #fff;
|
146 |
+
box-shadow: 0 0 0 1px #DFDFDF, 0 1px 4px rgba(0, 0, 0, 0.1);
|
147 |
+
}
|
148 |
+
.acf-field-object.ui-sortable-placeholder {
|
149 |
+
box-shadow: 0 -1px 0 0 #DFDFDF;
|
150 |
+
visibility: visible !important;
|
151 |
+
background: #F9F9F9;
|
152 |
+
border-top-color: transparent;
|
153 |
+
min-height: 54px;
|
154 |
+
}
|
155 |
+
.acf-field-object.ui-sortable-placeholder:after,
|
156 |
+
.acf-field-object.ui-sortable-placeholder:before {
|
157 |
+
visibility: hidden;
|
158 |
+
}
|
159 |
+
.acf-field-object > .meta {
|
160 |
+
display: none;
|
161 |
+
}
|
162 |
+
.acf-field-object > .handle a {
|
163 |
+
-webkit-transition: none;
|
164 |
+
-moz-transition: none;
|
165 |
+
-o-transition: none;
|
166 |
+
transition: none;
|
167 |
+
}
|
168 |
+
.acf-field-object > .handle li {
|
169 |
+
padding-top: 10px;
|
170 |
+
padding-bottom: 10px;
|
171 |
+
word-wrap: break-word;
|
172 |
+
}
|
173 |
+
.acf-field-object > .handle .acf-icon {
|
174 |
+
margin: 1px 0 0;
|
175 |
+
cursor: move;
|
176 |
+
background: transparent;
|
177 |
+
float: left;
|
178 |
+
height: 28px;
|
179 |
+
line-height: 28px;
|
180 |
+
width: 28px;
|
181 |
+
font-size: 13px;
|
182 |
+
color: #444;
|
183 |
+
position: relative;
|
184 |
+
z-index: 1;
|
185 |
+
}
|
186 |
+
.acf-field-object > .handle strong {
|
187 |
+
display: block;
|
188 |
+
padding-bottom: 6px;
|
189 |
+
font-size: 14px;
|
190 |
+
line-height: 14px;
|
191 |
+
min-height: 14px;
|
192 |
+
}
|
193 |
+
.acf-field-object > .handle .row-options {
|
194 |
+
visibility: hidden;
|
195 |
+
}
|
196 |
+
.acf-field-object > .handle .row-options a {
|
197 |
+
margin-right: 4px;
|
198 |
+
}
|
199 |
+
.acf-field-object > .handle .row-options a.delete-field {
|
200 |
+
color: #a00;
|
201 |
+
}
|
202 |
+
.acf-field-object > .handle .row-options a.delete-field:hover {
|
203 |
+
color: #f00;
|
204 |
+
}
|
205 |
+
.acf-field-object.open + .acf-field-object {
|
206 |
+
border-top-color: #E1E1E1;
|
207 |
+
}
|
208 |
+
.acf-field-object.open > .handle {
|
209 |
+
background: #2a9bd9;
|
210 |
+
border: #2696d3 solid 1px;
|
211 |
+
text-shadow: #268FBB 0 1px 0;
|
212 |
+
color: #fff;
|
213 |
+
position: relative;
|
214 |
+
margin: -1px -1px 0 -1px;
|
215 |
+
}
|
216 |
+
.acf-field-object.open > .handle a {
|
217 |
+
color: #fff !important;
|
218 |
+
}
|
219 |
+
.acf-field-object.open > .handle a:hover {
|
220 |
+
text-decoration: underline !important;
|
221 |
+
}
|
222 |
+
.acf-field-object.open > .handle .acf-icon {
|
223 |
+
border-color: #fff;
|
224 |
+
color: #fff;
|
225 |
+
}
|
226 |
+
.acf-field-object.open > .handle .acf-required {
|
227 |
+
color: #fff;
|
228 |
+
}
|
229 |
+
.acf-field-object:hover > .handle .row-options,
|
230 |
+
.acf-field-object.-hover > .handle .row-options {
|
231 |
+
visibility: visible;
|
232 |
+
}
|
233 |
+
.acf-field-object > .settings {
|
234 |
+
display: none;
|
235 |
+
width: 100%;
|
236 |
+
}
|
237 |
+
.acf-field-object > .settings > .acf-table {
|
238 |
+
border: none;
|
239 |
+
}
|
240 |
+
.acf-field-object .rule-groups {
|
241 |
+
margin-top: 20px;
|
242 |
+
}
|
243 |
+
/*---------------------------------------------------------------------------------------------
|
244 |
+
*
|
245 |
+
* Postbox: Locations
|
246 |
+
*
|
247 |
+
*---------------------------------------------------------------------------------------------*/
|
248 |
+
.rule-groups h4 {
|
249 |
+
margin: 15px 0 5px;
|
250 |
+
}
|
251 |
+
.rule-groups .rule-group {
|
252 |
+
margin: 0 0 5px;
|
253 |
+
/* Don't allow user to delete the first field group */
|
254 |
+
}
|
255 |
+
.rule-groups .rule-group h4 {
|
256 |
+
margin: 0 0 3px;
|
257 |
+
}
|
258 |
+
.rule-groups .rule-group td.param {
|
259 |
+
width: 35%;
|
260 |
+
}
|
261 |
+
.rule-groups .rule-group td.operator {
|
262 |
+
width: 20%;
|
263 |
+
}
|
264 |
+
.rule-groups .rule-group td.add {
|
265 |
+
width: 40px;
|
266 |
+
}
|
267 |
+
.rule-groups .rule-group td.remove {
|
268 |
+
width: 28px;
|
269 |
+
vertical-align: middle;
|
270 |
+
}
|
271 |
+
.rule-groups .rule-group td.remove a {
|
272 |
+
visibility: hidden;
|
273 |
+
}
|
274 |
+
.rule-groups .rule-group tr:hover td.remove a {
|
275 |
+
visibility: visible;
|
276 |
+
}
|
277 |
+
.rule-groups .rule-group:first-child tr:first-child td.remove a {
|
278 |
+
visibility: hidden !important;
|
279 |
+
}
|
280 |
+
.rule-groups .rule-group select:empty {
|
281 |
+
background: #f8f8f8;
|
282 |
+
}
|
283 |
+
/*---------------------------------------------------------------------------------------------
|
284 |
+
*
|
285 |
+
* Options
|
286 |
+
*
|
287 |
+
*---------------------------------------------------------------------------------------------*/
|
288 |
+
#acf-field-group-options tr[data-name="hide_on_screen"] li {
|
289 |
+
float: left;
|
290 |
+
width: 33%;
|
291 |
+
}
|
292 |
+
@media (max-width: 1100px) {
|
293 |
+
#acf-field-group-options tr[data-name="hide_on_screen"] li {
|
294 |
+
width: 50%;
|
295 |
+
}
|
296 |
+
}
|
297 |
+
/*---------------------------------------------------------------------------------------------
|
298 |
+
*
|
299 |
+
* Conditional Logic
|
300 |
+
*
|
301 |
+
*---------------------------------------------------------------------------------------------*/
|
302 |
+
table.conditional-logic-rules {
|
303 |
+
background: transparent;
|
304 |
+
border: 0 none;
|
305 |
+
border-radius: 0;
|
306 |
+
}
|
307 |
+
table.conditional-logic-rules tbody td {
|
308 |
+
background: transparent;
|
309 |
+
border: 0 none !important;
|
310 |
+
padding: 5px 2px !important;
|
311 |
+
}
|
312 |
+
/*---------------------------------------------------------------------------------------------
|
313 |
+
*
|
314 |
+
* Field: Tab
|
315 |
+
*
|
316 |
+
*---------------------------------------------------------------------------------------------*/
|
317 |
+
.acf-field-object-tab .acf-field-setting-name,
|
318 |
+
.acf-field-object-tab .acf-field-setting-instructions,
|
319 |
+
.acf-field-object-tab .acf-field-setting-required,
|
320 |
+
.acf-field-object-tab .acf-field-setting-warning,
|
321 |
+
.acf-field-object-tab .acf-field-setting-wrapper,
|
322 |
+
.acf-field-object-accordion .acf-field-setting-name,
|
323 |
+
.acf-field-object-accordion .acf-field-setting-instructions,
|
324 |
+
.acf-field-object-accordion .acf-field-setting-required,
|
325 |
+
.acf-field-object-accordion .acf-field-setting-warning,
|
326 |
+
.acf-field-object-accordion .acf-field-setting-wrapper {
|
327 |
+
display: none;
|
328 |
+
}
|
329 |
+
.acf-field-object-tab .li-field-name,
|
330 |
+
.acf-field-object-accordion .li-field-name {
|
331 |
+
visibility: hidden;
|
332 |
+
}
|
333 |
+
.acf-field-object + .acf-field-object-tab:before,
|
334 |
+
.acf-field-object + .acf-field-object-accordion:before {
|
335 |
+
display: block;
|
336 |
+
content: "";
|
337 |
+
height: 5px;
|
338 |
+
width: 100%;
|
339 |
+
background: #f9f9f9;
|
340 |
+
border-bottom: #f0f0f0 solid 1px;
|
341 |
+
}
|
342 |
+
.acf-field-object-tab p:first-child,
|
343 |
+
.acf-field-object-accordion p:first-child {
|
344 |
+
margin: 0.5em 0;
|
345 |
+
}
|
346 |
+
/*---------------------------------------------------------------------------------------------
|
347 |
+
*
|
348 |
+
* Field: Accordion
|
349 |
+
*
|
350 |
+
*---------------------------------------------------------------------------------------------*/
|
351 |
+
.acf-field-object-accordion .acf-field-setting-instructions {
|
352 |
+
display: table-row;
|
353 |
+
}
|
354 |
+
/*---------------------------------------------------------------------------------------------
|
355 |
+
*
|
356 |
+
* Field: Message
|
357 |
+
*
|
358 |
+
*---------------------------------------------------------------------------------------------*/
|
359 |
+
.acf-field-object-message tr[data-name="name"],
|
360 |
+
.acf-field-object-message tr[data-name="instructions"],
|
361 |
+
.acf-field-object-message tr[data-name="required"] {
|
362 |
+
display: none !important;
|
363 |
+
}
|
364 |
+
.acf-field-object-message .li-field-name {
|
365 |
+
visibility: hidden;
|
366 |
+
}
|
367 |
+
.acf-field-object-message textarea {
|
368 |
+
height: 175px !important;
|
369 |
+
}
|
370 |
+
/*---------------------------------------------------------------------------------------------
|
371 |
+
*
|
372 |
+
* Field: Separator
|
373 |
+
*
|
374 |
+
*---------------------------------------------------------------------------------------------*/
|
375 |
+
.acf-field-object-separator tr[data-name="name"],
|
376 |
+
.acf-field-object-separator tr[data-name="instructions"],
|
377 |
+
.acf-field-object-separator tr[data-name="required"] {
|
378 |
+
display: none !important;
|
379 |
+
}
|
380 |
+
/*---------------------------------------------------------------------------------------------
|
381 |
+
*
|
382 |
+
* Field: Date Picker
|
383 |
+
*
|
384 |
+
*---------------------------------------------------------------------------------------------*/
|
385 |
+
.acf-field-object-date-picker .acf-radio-list li,
|
386 |
+
.acf-field-object-time-picker .acf-radio-list li,
|
387 |
+
.acf-field-object-date-time-picker .acf-radio-list li {
|
388 |
+
line-height: 25px;
|
389 |
+
}
|
390 |
+
.acf-field-object-date-picker .acf-radio-list span,
|
391 |
+
.acf-field-object-time-picker .acf-radio-list span,
|
392 |
+
.acf-field-object-date-time-picker .acf-radio-list span {
|
393 |
+
display: inline-block;
|
394 |
+
min-width: 10em;
|
395 |
+
}
|
396 |
+
.acf-field-object-date-picker .acf-radio-list input[type="text"],
|
397 |
+
.acf-field-object-time-picker .acf-radio-list input[type="text"],
|
398 |
+
.acf-field-object-date-time-picker .acf-radio-list input[type="text"] {
|
399 |
+
width: 100px;
|
400 |
+
}
|
401 |
+
.acf-field-object-date-time-picker .acf-radio-list span {
|
402 |
+
min-width: 15em;
|
403 |
+
}
|
404 |
+
.acf-field-object-date-time-picker .acf-radio-list input[type="text"] {
|
405 |
+
width: 200px;
|
406 |
+
}
|
407 |
+
/*--------------------------------------------------------------------------------------------
|
408 |
+
*
|
409 |
+
* Slug
|
410 |
+
*
|
411 |
+
*--------------------------------------------------------------------------------------------*/
|
412 |
+
#slugdiv .inside {
|
413 |
+
padding: 12px;
|
414 |
+
margin: 0;
|
415 |
+
}
|
416 |
+
#slugdiv input[type="text"] {
|
417 |
+
width: 100%;
|
418 |
+
height: 28px;
|
419 |
+
font-size: 14px;
|
420 |
+
}
|
421 |
+
/*--------------------------------------------------------------------------------------------
|
422 |
+
*
|
423 |
+
* RTL
|
424 |
+
*
|
425 |
+
*--------------------------------------------------------------------------------------------*/
|
426 |
+
html[dir="rtl"] .acf-field-object.open > .handle {
|
427 |
+
margin: -1px -1px 0;
|
428 |
+
}
|
429 |
+
html[dir="rtl"] .acf-field-object.open > .handle .acf-icon {
|
430 |
+
float: right;
|
431 |
+
}
|
432 |
+
html[dir="rtl"] .acf-field-object.open > .handle .li-field-order {
|
433 |
+
padding-left: 0 !important;
|
434 |
+
padding-right: 15px !important;
|
435 |
+
}
|
436 |
+
/*---------------------------------------------------------------------------------------------
|
437 |
+
*
|
438 |
+
* Device
|
439 |
+
*
|
440 |
+
*---------------------------------------------------------------------------------------------*/
|
441 |
+
@media only screen and (max-width: 850px) {
|
442 |
+
tr.acf-field,
|
443 |
+
td.acf-label,
|
444 |
+
td.acf-input {
|
445 |
+
display: block !important;
|
446 |
+
width: auto !important;
|
447 |
+
border: 0 none !important;
|
448 |
+
}
|
449 |
+
tr.acf-field {
|
450 |
+
border-top: #ededed solid 1px !important;
|
451 |
+
margin-bottom: 0 !important;
|
452 |
+
}
|
453 |
+
td.acf-label {
|
454 |
+
background: transparent !important;
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*--------------------------------------------------------------------------------------------
|
2 |
+
*
|
3 |
+
* Vars
|
4 |
+
*
|
5 |
+
*--------------------------------------------------------------------------------------------*/
|
6 |
+
/* colors */
|
7 |
+
/* acf-field */
|
8 |
+
/* responsive */
|
9 |
+
/*--------------------------------------------------------------------------------------------
|
10 |
+
*
|
11 |
+
* Mixins
|
12 |
+
*
|
13 |
+
*--------------------------------------------------------------------------------------------*/
|
14 |
+
/*--------------------------------------------------------------------------------------------
|
15 |
+
*
|
16 |
+
* General
|
17 |
+
*
|
18 |
+
*--------------------------------------------------------------------------------------------*/
|
19 |
+
/* Horizontal List */
|
20 |
+
.acf-hl {
|
21 |
+
padding: 0;
|
22 |
+
margin: 0;
|
23 |
+
list-style: none;
|
24 |
+
display: block;
|
25 |
+
position: relative;
|
26 |
+
}
|
27 |
+
.acf-hl > li {
|
28 |
+
float: left;
|
29 |
+
display: block;
|
30 |
+
margin: 0;
|
31 |
+
padding: 0;
|
32 |
+
}
|
33 |
+
.acf-hl > li.acf-fr {
|
34 |
+
float: right;
|
35 |
+
}
|
36 |
+
/* Horizontal List: Clearfix */
|
37 |
+
.acf-hl:before,
|
38 |
+
.acf-hl:after,
|
39 |
+
.acf-bl:before,
|
40 |
+
.acf-bl:after,
|
41 |
+
.acf-cf:before,
|
42 |
+
.acf-cf:after {
|
43 |
+
content: "";
|
44 |
+
display: block;
|
45 |
+
line-height: 0;
|
46 |
+
}
|
47 |
+
.acf-hl:after,
|
48 |
+
.acf-bl:after,
|
49 |
+
.acf-cf:after {
|
50 |
+
clear: both;
|
51 |
+
}
|
52 |
+
/* Block List */
|
53 |
+
.acf-bl {
|
54 |
+
padding: 0;
|
55 |
+
margin: 0;
|
56 |
+
list-style: none;
|
57 |
+
display: block;
|
58 |
+
position: relative;
|
59 |
+
}
|
60 |
+
.acf-bl > li {
|
61 |
+
display: block;
|
62 |
+
margin: 0;
|
63 |
+
padding: 0;
|
64 |
+
float: none;
|
65 |
+
}
|
66 |
+
/* Visibility */
|
67 |
+
.acf-hidden {
|
68 |
+
display: none !important;
|
69 |
+
}
|
70 |
+
.acf-empty {
|
71 |
+
display: table-cell !important;
|
72 |
+
}
|
73 |
+
.acf-empty * {
|
74 |
+
display: none !important;
|
75 |
+
}
|
76 |
+
/* Float */
|
77 |
+
.acf-fl {
|
78 |
+
float: left;
|
79 |
+
}
|
80 |
+
.acf-fr {
|
81 |
+
float: right;
|
82 |
+
}
|
83 |
+
.acf-fn {
|
84 |
+
float: none;
|
85 |
+
}
|
86 |
+
/* Align */
|
87 |
+
.acf-al {
|
88 |
+
text-align: left;
|
89 |
+
}
|
90 |
+
.acf-ar {
|
91 |
+
text-align: right;
|
92 |
+
}
|
93 |
+
.acf-ac {
|
94 |
+
text-align: center;
|
95 |
+
}
|
96 |
+
/* loading */
|
97 |
+
.acf-loading,
|
98 |
+
.acf-spinner {
|
99 |
+
display: inline-block;
|
100 |
+
height: 20px;
|
101 |
+
width: 20px;
|
102 |
+
vertical-align: text-top;
|
103 |
+
background: transparent url(../images/spinner.gif) no-repeat 50% 50%;
|
104 |
+
}
|
105 |
+
/* spinner */
|
106 |
+
.acf-spinner {
|
107 |
+
display: none;
|
108 |
+
}
|
109 |
+
.acf-spinner.is-active {
|
110 |
+
display: inline-block;
|
111 |
+
}
|
112 |
+
/* WP < 4.2 */
|
113 |
+
.spinner.is-active {
|
114 |
+
display: inline-block;
|
115 |
+
}
|
116 |
+
/* required */
|
117 |
+
.acf-required {
|
118 |
+
color: #f00;
|
119 |
+
}
|
120 |
+
/* show on hover */
|
121 |
+
.acf-soh .acf-soh-target {
|
122 |
+
-webkit-transition: opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
|
123 |
+
-moz-transition: opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
|
124 |
+
-o-transition: opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
|
125 |
+
transition: opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;
|
126 |
+
visibility: hidden;
|
127 |
+
opacity: 0;
|
128 |
+
}
|
129 |
+
.acf-soh:hover .acf-soh-target {
|
130 |
+
-webkit-transition-delay: 0s;
|
131 |
+
-moz-transition-delay: 0s;
|
132 |
+
-o-transition-delay: 0s;
|
133 |
+
transition-delay: 0s;
|
134 |
+
visibility: visible;
|
135 |
+
opacity: 1;
|
136 |
+
}
|
137 |
+
/* show if value */
|
138 |
+
.show-if-value {
|
139 |
+
display: none;
|
140 |
+
}
|
141 |
+
.hide-if-value {
|
142 |
+
display: block;
|
143 |
+
}
|
144 |
+
.has-value .show-if-value {
|
145 |
+
display: block;
|
146 |
+
}
|
147 |
+
.has-value .hide-if-value {
|
148 |
+
display: none;
|
149 |
+
}
|
150 |
+
/* select2 WP animation fix */
|
151 |
+
.select2-search-choice-close {
|
152 |
+
-webkit-transition: none;
|
153 |
+
-moz-transition: none;
|
154 |
+
-o-transition: none;
|
155 |
+
transition: none;
|
156 |
+
}
|
157 |
+
/*---------------------------------------------------------------------------------------------
|
158 |
+
*
|
159 |
+
* tooltip
|
160 |
+
*
|
161 |
+
*---------------------------------------------------------------------------------------------*/
|
162 |
+
/* tooltip */
|
163 |
+
.acf-tooltip {
|
164 |
+
background: #2F353E;
|
165 |
+
border-radius: 5px;
|
166 |
+
color: #fff;
|
167 |
+
padding: 5px 10px;
|
168 |
+
position: absolute;
|
169 |
+
font-size: 12px;
|
170 |
+
line-height: 1.4em;
|
171 |
+
z-index: 900000;
|
172 |
+
/* tip */
|
173 |
+
/* positions */
|
174 |
+
}
|
175 |
+
.acf-tooltip:before {
|
176 |
+
border: solid;
|
177 |
+
border-color: transparent;
|
178 |
+
border-width: 6px;
|
179 |
+
content: "";
|
180 |
+
position: absolute;
|
181 |
+
}
|
182 |
+
.acf-tooltip.top {
|
183 |
+
margin-top: -8px;
|
184 |
+
}
|
185 |
+
.acf-tooltip.top:before {
|
186 |
+
top: 100%;
|
187 |
+
left: 50%;
|
188 |
+
margin-left: -6px;
|
189 |
+
border-top-color: #2F353E;
|
190 |
+
border-bottom-width: 0;
|
191 |
+
}
|
192 |
+
.acf-tooltip.right {
|
193 |
+
margin-right: -8px;
|
194 |
+
}
|
195 |
+
.acf-tooltip.right:before {
|
196 |
+
top: 50%;
|
197 |
+
margin-top: -6px;
|
198 |
+
right: 100%;
|
199 |
+
border-right-color: #2F353E;
|
200 |
+
border-left-width: 0;
|
201 |
+
}
|
202 |
+
.acf-tooltip.bottom {
|
203 |
+
margin-bottom: -8px;
|
204 |
+
}
|
205 |
+
.acf-tooltip.bottom:before {
|
206 |
+
bottom: 100%;
|
207 |
+
left: 50%;
|
208 |
+
margin-left: -6px;
|
209 |
+
border-bottom-color: #2F353E;
|
210 |
+
border-top-width: 0;
|
211 |
+
}
|
212 |
+
.acf-tooltip.left {
|
213 |
+
margin-left: -8px;
|
214 |
+
}
|
215 |
+
.acf-tooltip.left:before {
|
216 |
+
top: 50%;
|
217 |
+
margin-top: -6px;
|
218 |
+
left: 100%;
|
219 |
+
border-left-color: #2F353E;
|
220 |
+
border-right-width: 0;
|
221 |
+
}
|
222 |
+
.acf-tooltip .acf-overlay {
|
223 |
+
z-index: -1;
|
224 |
+
}
|
225 |
+
/* confirm */
|
226 |
+
.acf-tooltip.-confirm {
|
227 |
+
z-index: 900001;
|
228 |
+
}
|
229 |
+
.acf-tooltip.-confirm a {
|
230 |
+
text-decoration: none;
|
231 |
+
color: #9ea3a8;
|
232 |
+
}
|
233 |
+
.acf-tooltip.-confirm a:hover {
|
234 |
+
text-decoration: underline;
|
235 |
+
}
|
236 |
+
.acf-tooltip.-confirm a[data-event="confirm"] {
|
237 |
+
color: #F55E4F;
|
238 |
+
}
|
239 |
+
.acf-overlay {
|
240 |
+
position: fixed;
|
241 |
+
top: 0;
|
242 |
+
bottom: 0;
|
243 |
+
left: 0;
|
244 |
+
right: 0;
|
245 |
+
cursor: default;
|
246 |
+
}
|
247 |
+
.acf-tooltip-target {
|
248 |
+
position: relative;
|
249 |
+
z-index: 900002;
|
250 |
+
}
|
251 |
+
/*---------------------------------------------------------------------------------------------
|
252 |
+
*
|
253 |
+
* loading
|
254 |
+
*
|
255 |
+
*---------------------------------------------------------------------------------------------*/
|
256 |
+
.acf-loading-overlay {
|
257 |
+
position: absolute;
|
258 |
+
top: 0;
|
259 |
+
bottom: 0;
|
260 |
+
left: 0;
|
261 |
+
right: 0;
|
262 |
+
cursor: default;
|
263 |
+
z-index: 99;
|
264 |
+
background: rgba(249, 249, 249, 0.5);
|
265 |
+
}
|
266 |
+
.acf-loading-overlay i {
|
267 |
+
position: absolute;
|
268 |
+
top: 50%;
|
269 |
+
left: 50%;
|
270 |
+
transform: translate(-50%, -50%);
|
271 |
+
}
|
272 |
+
/*---------------------------------------------------------------------------------------------
|
273 |
+
*
|
274 |
+
* callout
|
275 |
+
*
|
276 |
+
*---------------------------------------------------------------------------------------------*/
|
277 |
+
.acf-callout {
|
278 |
+
margin: 20px 0;
|
279 |
+
padding: 20px;
|
280 |
+
background-color: #FCF8F2;
|
281 |
+
border-left: 3px solid #F0AD4E;
|
282 |
+
}
|
283 |
+
.acf-callout h4 {
|
284 |
+
color: #F0AD4E;
|
285 |
+
margin: 0 !important;
|
286 |
+
}
|
287 |
+
.acf-callout p {
|
288 |
+
margin-bottom: 0;
|
289 |
+
}
|
290 |
+
.acf-callout.danger {
|
291 |
+
border-color: #D9534F;
|
292 |
+
background-color: #FDF7F7;
|
293 |
+
}
|
294 |
+
.acf-callout.danger h4 {
|
295 |
+
color: #D9534F;
|
296 |
+
}
|
297 |
+
.acf-callout.success {
|
298 |
+
background-color: #f4faf6;
|
299 |
+
border-color: #bcf1c5;
|
300 |
+
}
|
301 |
+
.acf-callout.success h4 {
|
302 |
+
color: #3aad60;
|
303 |
+
}
|
304 |
+
/*--------------------------------------------------------------------------------------------
|
305 |
+
*
|
306 |
+
* acf-icon
|
307 |
+
*
|
308 |
+
*--------------------------------------------------------------------------------------------*/
|
309 |
+
@font-face {
|
310 |
+
font-family: 'acf';
|
311 |
+
src: url('../font/acf.eot?57601716');
|
312 |
+
src: url('../font/acf.eot?57601716#iefix') format('embedded-opentype'), url('../font/acf.woff2?57601716') format('woff2'), url('../font/acf.woff?57601716') format('woff'), url('../font/acf.ttf?57601716') format('truetype'), url('../font/acf.svg?57601716#acf') format('svg');
|
313 |
+
font-weight: normal;
|
314 |
+
font-style: normal;
|
315 |
+
}
|
316 |
+
.acf-icon:before {
|
317 |
+
font-family: "acf";
|
318 |
+
font-style: normal;
|
319 |
+
font-weight: normal;
|
320 |
+
speak: none;
|
321 |
+
display: inline-block;
|
322 |
+
text-decoration: inherit;
|
323 |
+
width: 1em;
|
324 |
+
text-align: center;
|
325 |
+
/* opacity: .8; */
|
326 |
+
/* For safety - reset parent styles, that can break glyph codes*/
|
327 |
+
font-variant: normal;
|
328 |
+
text-transform: none;
|
329 |
+
/* fix buttons height, for twitter bootstrap */
|
330 |
+
line-height: 1em;
|
331 |
+
/* Font smoothing. That was taken from TWBS */
|
332 |
+
-webkit-font-smoothing: antialiased;
|
333 |
+
-moz-osx-font-smoothing: grayscale;
|
334 |
+
/* more consistent vertical align */
|
335 |
+
position: relative;
|
336 |
+
}
|
337 |
+
.acf-icon.-plus:before {
|
338 |
+
content: '\e800';
|
339 |
+
}
|
340 |
+
/* '' */
|
341 |
+
.acf-icon.-minus:before {
|
342 |
+
content: '\e801';
|
343 |
+
}
|
344 |
+
/* '' */
|
345 |
+
.acf-icon.-cancel:before {
|
346 |
+
content: '\e802';
|
347 |
+
}
|
348 |
+
/* '' */
|
349 |
+
.acf-icon.-pencil:before {
|
350 |
+
content: '\e803';
|
351 |
+
top: -1px;
|
352 |
+
}
|
353 |
+
/* '' */
|
354 |
+
.acf-icon.-location:before {
|
355 |
+
content: '\e804';
|
356 |
+
}
|
357 |
+
/* '' */
|
358 |
+
.acf-icon.-down:before {
|
359 |
+
content: '\e805';
|
360 |
+
top: 1px;
|
361 |
+
}
|
362 |
+
/* '' */
|
363 |
+
.acf-icon.-left:before {
|
364 |
+
content: '\e806';
|
365 |
+
left: -1px;
|
366 |
+
}
|
367 |
+
/* '' */
|
368 |
+
.acf-icon.-right:before {
|
369 |
+
content: '\e807';
|
370 |
+
left: 1px;
|
371 |
+
}
|
372 |
+
/* '' */
|
373 |
+
.acf-icon.-up:before {
|
374 |
+
content: '\e808';
|
375 |
+
top: -1px;
|
376 |
+
}
|
377 |
+
/* '' */
|
378 |
+
.acf-icon.-sync:before {
|
379 |
+
content: '\e809';
|
380 |
+
}
|
381 |
+
/* '' */
|
382 |
+
.acf-icon.-globe:before {
|
383 |
+
content: '\e80a';
|
384 |
+
}
|
385 |
+
/* '' */
|
386 |
+
.acf-icon.-picture:before {
|
387 |
+
content: '\e80b';
|
388 |
+
}
|
389 |
+
/* '' */
|
390 |
+
.acf-icon.-check:before {
|
391 |
+
content: '\e80c';
|
392 |
+
}
|
393 |
+
/* '' */
|
394 |
+
.acf-icon.-dot-3:before {
|
395 |
+
content: '\e80d';
|
396 |
+
}
|
397 |
+
/* '' */
|
398 |
+
.acf-icon.-arrow-combo:before {
|
399 |
+
content: '\e80e';
|
400 |
+
}
|
401 |
+
/* '' */
|
402 |
+
.acf-icon.-arrow-up:before {
|
403 |
+
content: '\e810';
|
404 |
+
top: -1px;
|
405 |
+
}
|
406 |
+
/* '' */
|
407 |
+
.acf-icon.-arrow-down:before {
|
408 |
+
content: '\e80f';
|
409 |
+
top: 1px;
|
410 |
+
}
|
411 |
+
/* '' */
|
412 |
+
.acf-icon.-search:before {
|
413 |
+
content: '\e811';
|
414 |
+
}
|
415 |
+
/* '' */
|
416 |
+
.acf-icon.-link-ext:before {
|
417 |
+
content: '\f08e';
|
418 |
+
}
|
419 |
+
/* '' */
|
420 |
+
/* collapse */
|
421 |
+
.acf-icon.-collapse:before {
|
422 |
+
content: '\e810';
|
423 |
+
top: -1px;
|
424 |
+
}
|
425 |
+
/* arrow-up */
|
426 |
+
.-collapsed .acf-icon.-collapse:before {
|
427 |
+
content: '\e80f';
|
428 |
+
top: 1px;
|
429 |
+
}
|
430 |
+
/* arrow-down */
|
431 |
+
/* default */
|
432 |
+
.acf-icon {
|
433 |
+
display: inline-block;
|
434 |
+
height: 26px;
|
435 |
+
width: 26px;
|
436 |
+
border: transparent solid 1px;
|
437 |
+
border-radius: 100%;
|
438 |
+
font-size: 16px;
|
439 |
+
line-height: 26px;
|
440 |
+
text-align: center;
|
441 |
+
text-decoration: none;
|
442 |
+
vertical-align: top;
|
443 |
+
}
|
444 |
+
/* elements */
|
445 |
+
span.acf-icon {
|
446 |
+
color: #999;
|
447 |
+
border-color: #BBB;
|
448 |
+
background-color: #fff;
|
449 |
+
}
|
450 |
+
/* icon */
|
451 |
+
a.acf-icon {
|
452 |
+
color: #999;
|
453 |
+
border-color: #BBB;
|
454 |
+
background-color: #fff;
|
455 |
+
position: relative;
|
456 |
+
overflow: hidden;
|
457 |
+
transition: none;
|
458 |
+
/* clear */
|
459 |
+
/* light*/
|
460 |
+
/* states */
|
461 |
+
/* remove WP outline box-shadow */
|
462 |
+
/* red */
|
463 |
+
}
|
464 |
+
a.acf-icon.-clear {
|
465 |
+
color: #444;
|
466 |
+
background: transparent;
|
467 |
+
border: none;
|
468 |
+
}
|
469 |
+
a.acf-icon.light {
|
470 |
+
border: none;
|
471 |
+
padding: 1px;
|
472 |
+
background: #F5F5F5;
|
473 |
+
color: #72777c;
|
474 |
+
}
|
475 |
+
a.acf-icon:hover {
|
476 |
+
border-color: transparent;
|
477 |
+
background: #2a9bd9;
|
478 |
+
color: #fff;
|
479 |
+
}
|
480 |
+
a.acf-icon:active {
|
481 |
+
color: #fff;
|
482 |
+
background-color: #238cc6;
|
483 |
+
}
|
484 |
+
a.acf-icon:active,
|
485 |
+
a.acf-icon:focus {
|
486 |
+
outline: none;
|
487 |
+
box-shadow: none;
|
488 |
+
}
|
489 |
+
a.acf-icon.-minus:hover,
|
490 |
+
a.acf-icon.-cancel:hover {
|
491 |
+
background-color: #F55E4F;
|
492 |
+
}
|
493 |
+
a.acf-icon.-minus:active,
|
494 |
+
a.acf-icon.-cancel:active {
|
495 |
+
background-color: #f44837;
|
496 |
+
}
|
497 |
+
/* minor tweaks */
|
498 |
+
.acf-icon.-pencil {
|
499 |
+
font-size: 15px;
|
500 |
+
}
|
501 |
+
.acf-icon.-location {
|
502 |
+
font-size: 18px;
|
503 |
+
}
|
504 |
+
/* sizes */
|
505 |
+
.acf-icon.small,
|
506 |
+
.acf-icon.-small {
|
507 |
+
width: 18px;
|
508 |
+
height: 18px;
|
509 |
+
line-height: 18px;
|
510 |
+
font-size: 14px;
|
511 |
+
}
|
512 |
+
/* dark */
|
513 |
+
.acf-icon.dark {
|
514 |
+
border-color: transparent;
|
515 |
+
background: #23282D;
|
516 |
+
color: #eee;
|
517 |
+
}
|
518 |
+
a.acf-icon.dark:hover {
|
519 |
+
border-color: transparent;
|
520 |
+
background: #191E23;
|
521 |
+
color: #00b9eb;
|
522 |
+
}
|
523 |
+
a.acf-icon.-minus.dark:hover,
|
524 |
+
a.acf-icon.-cancel.dark:hover {
|
525 |
+
color: #D54E21;
|
526 |
+
}
|
527 |
+
/* grey */
|
528 |
+
.acf-icon.grey {
|
529 |
+
border-color: transparent;
|
530 |
+
background: #b4b9be;
|
531 |
+
color: #fff;
|
532 |
+
}
|
533 |
+
a.acf-icon.grey:hover {
|
534 |
+
border-color: transparent;
|
535 |
+
background: #00A0D2;
|
536 |
+
color: #fff;
|
537 |
+
}
|
538 |
+
a.acf-icon.-minus.grey:hover,
|
539 |
+
a.acf-icon.-cancel.grey:hover {
|
540 |
+
background: #32373C;
|
541 |
+
}
|
542 |
+
/* red */
|
543 |
+
.acf-icon.red {
|
544 |
+
border-color: transparent;
|
545 |
+
background-color: #F55E4F;
|
546 |
+
color: #fff;
|
547 |
+
}
|
548 |
+
/* yellow */
|
549 |
+
.acf-icon.yellow {
|
550 |
+
border-color: transparent;
|
551 |
+
background-color: #FDBC40;
|
552 |
+
color: #fff;
|
553 |
+
}
|
554 |
+
/* logo */
|
555 |
+
.acf-icon.logo {
|
556 |
+
width: 150px;
|
557 |
+
height: 150px;
|
558 |
+
background: #5EE8BF;
|
559 |
+
border: 0 none;
|
560 |
+
position: absolute;
|
561 |
+
right: 0;
|
562 |
+
top: 0;
|
563 |
+
}
|
564 |
+
/*--------------------------------------------------------------------------------------------
|
565 |
+
*
|
566 |
+
* acf-box
|
567 |
+
*
|
568 |
+
*--------------------------------------------------------------------------------------------*/
|
569 |
+
.acf-box {
|
570 |
+
background: #FFFFFF;
|
571 |
+
border: 1px solid #E5E5E5;
|
572 |
+
position: relative;
|
573 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
574 |
+
/* title */
|
575 |
+
/* footer */
|
576 |
+
}
|
577 |
+
.acf-box .title {
|
578 |
+
border-bottom: 1px solid #EEEEEE;
|
579 |
+
margin: 0;
|
580 |
+
padding: 15px;
|
581 |
+
}
|
582 |
+
.acf-box .title h3 {
|
583 |
+
font-size: 14px;
|
584 |
+
line-height: 1em;
|
585 |
+
margin: 0;
|
586 |
+
padding: 0;
|
587 |
+
}
|
588 |
+
.acf-box .inner {
|
589 |
+
padding: 15px;
|
590 |
+
}
|
591 |
+
.acf-box h2 {
|
592 |
+
color: #333333;
|
593 |
+
font-size: 26px;
|
594 |
+
line-height: 1.25em;
|
595 |
+
margin: 0.25em 0 0.75em;
|
596 |
+
padding: 0;
|
597 |
+
}
|
598 |
+
.acf-box h3 {
|
599 |
+
margin: 1.5em 0 0;
|
600 |
+
}
|
601 |
+
.acf-box p {
|
602 |
+
margin-top: 0.5em;
|
603 |
+
}
|
604 |
+
.acf-box a {
|
605 |
+
text-decoration: none;
|
606 |
+
}
|
607 |
+
.acf-box i.dashicons-external {
|
608 |
+
margin-top: -1px;
|
609 |
+
}
|
610 |
+
.acf-box .footer {
|
611 |
+
border-top: 1px solid #eee;
|
612 |
+
padding: 12px;
|
613 |
+
font-size: 13px;
|
614 |
+
line-height: 1.5;
|
615 |
+
}
|
616 |
+
.acf-box .footer p {
|
617 |
+
margin: 0;
|
618 |
+
}
|
619 |
+
/*--------------------------------------------------------------------------------------------
|
620 |
+
*
|
621 |
+
* acf-notice
|
622 |
+
*
|
623 |
+
*--------------------------------------------------------------------------------------------*/
|
624 |
+
.acf-notice {
|
625 |
+
position: relative;
|
626 |
+
display: block;
|
627 |
+
color: #fff;
|
628 |
+
margin: 5px 0 15px;
|
629 |
+
padding: 3px 12px;
|
630 |
+
background: #2a9bd9;
|
631 |
+
border-left: #2183b9 solid 4px;
|
632 |
+
}
|
633 |
+
.acf-notice p {
|
634 |
+
font-size: 13px;
|
635 |
+
line-height: 1.5;
|
636 |
+
margin: 0.5em 0;
|
637 |
+
text-shadow: none;
|
638 |
+
color: inherit;
|
639 |
+
}
|
640 |
+
.acf-notice a.acf-notice-dismiss {
|
641 |
+
position: absolute;
|
642 |
+
border-color: transparent;
|
643 |
+
top: 9px;
|
644 |
+
right: 12px;
|
645 |
+
color: #fff;
|
646 |
+
background: rgba(0, 0, 0, 0.1);
|
647 |
+
}
|
648 |
+
.acf-notice a.acf-notice-dismiss:hover {
|
649 |
+
background: rgba(0, 0, 0, 0.2);
|
650 |
+
}
|
651 |
+
.acf-notice.-dismiss {
|
652 |
+
padding-right: 40px;
|
653 |
+
}
|
654 |
+
.acf-notice.-error {
|
655 |
+
background: #F55E4F;
|
656 |
+
border-color: #f33b28;
|
657 |
+
}
|
658 |
+
.acf-notice.-success {
|
659 |
+
background: #46b450;
|
660 |
+
border-color: #3b9743;
|
661 |
+
}
|
662 |
+
.acf-notice.-warning {
|
663 |
+
background: #fd8d3b;
|
664 |
+
border-color: #fd7613;
|
665 |
+
}
|
666 |
+
/*--------------------------------------------------------------------------------------------
|
667 |
+
*
|
668 |
+
* acf-table
|
669 |
+
*
|
670 |
+
*--------------------------------------------------------------------------------------------*/
|
671 |
+
.acf-table {
|
672 |
+
border: #DFDFDF solid 1px;
|
673 |
+
background: #fff;
|
674 |
+
border-spacing: 0;
|
675 |
+
border-radius: 0;
|
676 |
+
table-layout: auto;
|
677 |
+
padding: 0;
|
678 |
+
margin: 0;
|
679 |
+
width: 100%;
|
680 |
+
clear: both;
|
681 |
+
/* defaults */
|
682 |
+
/* thead */
|
683 |
+
/* tbody */
|
684 |
+
/* -clear */
|
685 |
+
}
|
686 |
+
.acf-table > tbody > tr > th,
|
687 |
+
.acf-table > thead > tr > th,
|
688 |
+
.acf-table > tbody > tr > td,
|
689 |
+
.acf-table > thead > tr > td {
|
690 |
+
padding: 8px;
|
691 |
+
vertical-align: top;
|
692 |
+
background: #fff;
|
693 |
+
text-align: left;
|
694 |
+
border-style: solid;
|
695 |
+
font-weight: normal;
|
696 |
+
}
|
697 |
+
.acf-table > tbody > tr > th,
|
698 |
+
.acf-table > thead > tr > th {
|
699 |
+
position: relative;
|
700 |
+
color: #333333;
|
701 |
+
}
|
702 |
+
.acf-table > thead > tr > th {
|
703 |
+
border-color: #E1E1E1;
|
704 |
+
border-width: 0 0 1px 1px;
|
705 |
+
}
|
706 |
+
.acf-table > thead > tr > th:first-child {
|
707 |
+
border-left-width: 0;
|
708 |
+
}
|
709 |
+
.acf-table > tbody > tr {
|
710 |
+
z-index: 1;
|
711 |
+
}
|
712 |
+
.acf-table > tbody > tr > td {
|
713 |
+
border-color: #EDEDED;
|
714 |
+
border-width: 1px 0 0 1px;
|
715 |
+
}
|
716 |
+
.acf-table > tbody > tr > td:first-child {
|
717 |
+
border-left-width: 0;
|
718 |
+
}
|
719 |
+
.acf-table > tbody > tr:first-child > td {
|
720 |
+
border-top-width: 0;
|
721 |
+
}
|
722 |
+
.acf-table.-clear {
|
723 |
+
border: 0 none;
|
724 |
+
}
|
725 |
+
.acf-table.-clear > tbody > tr > td,
|
726 |
+
.acf-table.-clear > thead > tr > td,
|
727 |
+
.acf-table.-clear > tbody > tr > th,
|
728 |
+
.acf-table.-clear > thead > tr > th {
|
729 |
+
border: 0 none;
|
730 |
+
padding: 4px;
|
731 |
+
}
|
732 |
+
/* remove tr */
|
733 |
+
.acf-remove-element {
|
734 |
+
-webkit-transition: all 0.25s ease-out;
|
735 |
+
-moz-transition: all 0.25s ease-out;
|
736 |
+
-o-transition: all 0.25s ease-out;
|
737 |
+
transition: all 0.25s ease-out;
|
738 |
+
transform: translate(50px, 0);
|
739 |
+
opacity: 0;
|
740 |
+
}
|
741 |
+
/* fade-up */
|
742 |
+
.acf-fade-up {
|
743 |
+
-webkit-transition: all 0.25s ease-out;
|
744 |
+
-moz-transition: all 0.25s ease-out;
|
745 |
+
-o-transition: all 0.25s ease-out;
|
746 |
+
transition: all 0.25s ease-out;
|
747 |
+
transform: translate(0, -10px);
|
748 |
+
opacity: 0;
|
749 |
+
}
|
750 |
+
/*---------------------------------------------------------------------------------------------
|
751 |
+
*
|
752 |
+
* wp-admin
|
753 |
+
*
|
754 |
+
*---------------------------------------------------------------------------------------------*/
|
755 |
+
/* Menu */
|
756 |
+
#adminmenu a[href="edit.php?post_type=acf-field-group&page=acf-settings-info"] {
|
757 |
+
display: none;
|
758 |
+
}
|
759 |
+
/*---------------------------------------------------------------------------------------------
|
760 |
+
*
|
761 |
+
* Field Group List
|
762 |
+
*
|
763 |
+
*---------------------------------------------------------------------------------------------*/
|
764 |
+
#icon-edit.icon32-posts-acf-field-group {
|
765 |
+
background-position: -11px -5px;
|
766 |
+
}
|
767 |
+
#acf-field-group-wrap .tablenav,
|
768 |
+
#acf-field-group-wrap p.search-box {
|
769 |
+
display: none;
|
770 |
+
}
|
771 |
+
#acf-field-group-wrap .wp-list-table .column-acf-fg-description,
|
772 |
+
#acf-field-group-wrap .wp-list-table .column-acf-fg-description:before {
|
773 |
+
display: none !important;
|
774 |
+
/* important needed to override mobile */
|
775 |
+
}
|
776 |
+
#acf-field-group-wrap .wp-list-table .column-acf-fg-count {
|
777 |
+
width: 10%;
|
778 |
+
}
|
779 |
+
#acf-field-group-wrap .wp-list-table .column-acf-fg-status {
|
780 |
+
width: 10%;
|
781 |
+
}
|
782 |
+
#acf-field-group-wrap .tablenav.bottom {
|
783 |
+
display: block;
|
784 |
+
}
|
785 |
+
#acf-field-group-wrap .acf-description {
|
786 |
+
font-weight: normal;
|
787 |
+
font-size: 13px;
|
788 |
+
color: #999;
|
789 |
+
margin-left: 7px;
|
790 |
+
font-style: italic;
|
791 |
+
}
|
792 |
+
/* subsubsub */
|
793 |
+
#acf-field-group-wrap .subsubsub {
|
794 |
+
/* WPML */
|
795 |
+
margin-bottom: 3px;
|
796 |
+
/* search */
|
797 |
+
}
|
798 |
+
#acf-field-group-wrap .subsubsub ul {
|
799 |
+
margin: 0;
|
800 |
+
}
|
801 |
+
#acf-field-group-wrap .subsubsub + .subsubsub {
|
802 |
+
margin-top: 0;
|
803 |
+
}
|
804 |
+
#acf-field-group-wrap .subsubsub a:focus {
|
805 |
+
box-shadow: none;
|
806 |
+
}
|
807 |
+
/* columns (replicate post edit layout) */
|
808 |
+
.acf-columns-2 {
|
809 |
+
margin-right: 300px;
|
810 |
+
clear: both;
|
811 |
+
/* rtl */
|
812 |
+
}
|
813 |
+
.acf-columns-2:after {
|
814 |
+
clear: both;
|
815 |
+
content: "";
|
816 |
+
display: table;
|
817 |
+
}
|
818 |
+
html[dir="rtl"] .acf-columns-2 {
|
819 |
+
margin-right: 0;
|
820 |
+
margin-left: 300px;
|
821 |
+
}
|
822 |
+
.acf-columns-2 .acf-column-1 {
|
823 |
+
float: left;
|
824 |
+
width: 100%;
|
825 |
+
/* rtl */
|
826 |
+
}
|
827 |
+
html[dir="rtl"] .acf-columns-2 .acf-column-1 {
|
828 |
+
float: right;
|
829 |
+
}
|
830 |
+
.acf-columns-2 .acf-column-2 {
|
831 |
+
float: right;
|
832 |
+
margin-right: -300px;
|
833 |
+
width: 280px;
|
834 |
+
/* rtl */
|
835 |
+
}
|
836 |
+
html[dir="rtl"] .acf-columns-2 .acf-column-2 {
|
837 |
+
float: left;
|
838 |
+
margin-right: 0;
|
839 |
+
margin-left: -300px;
|
840 |
+
}
|
841 |
+
/* search */
|
842 |
+
#acf-field-group-wrap .search-box:after {
|
843 |
+
display: block;
|
844 |
+
content: "";
|
845 |
+
height: 5px;
|
846 |
+
}
|
847 |
+
.acf-clear {
|
848 |
+
clear: both;
|
849 |
+
}
|
850 |
+
/* mobile compatibilty */
|
851 |
+
@media screen and (max-width: 782px) {
|
852 |
+
#acf-field-group-wrap #the-list .acf-icon:after {
|
853 |
+
content: attr(title);
|
854 |
+
position: absolute;
|
855 |
+
margin-left: 5px;
|
856 |
+
font-size: 13px;
|
857 |
+
line-height: 18px;
|
858 |
+
font-style: normal;
|
859 |
+
color: #444;
|
860 |
+
}
|
861 |
+
}
|
862 |
+
/*---------------------------------------------------------------------------------------------
|
863 |
+
*
|
864 |
+
* Fake table
|
865 |
+
*
|
866 |
+
*---------------------------------------------------------------------------------------------*/
|
867 |
+
.acf-thead,
|
868 |
+
.acf-tbody,
|
869 |
+
.acf-tfoot {
|
870 |
+
width: 100%;
|
871 |
+
padding: 0;
|
872 |
+
margin: 0;
|
873 |
+
}
|
874 |
+
.acf-thead > li,
|
875 |
+
.acf-tbody > li,
|
876 |
+
.acf-tfoot > li {
|
877 |
+
-webkit-box-sizing: border-box;
|
878 |
+
-moz-box-sizing: border-box;
|
879 |
+
box-sizing: border-box;
|
880 |
+
padding: 8px 15px;
|
881 |
+
font-size: 12px;
|
882 |
+
line-height: 14px;
|
883 |
+
}
|
884 |
+
.acf-thead {
|
885 |
+
border-bottom: #E1E1E1 solid 1px;
|
886 |
+
color: #23282d;
|
887 |
+
}
|
888 |
+
.acf-thead > li {
|
889 |
+
font-size: 14px;
|
890 |
+
line-height: 1.4em;
|
891 |
+
font-family: "Open Sans", sans-serif;
|
892 |
+
font-weight: bold;
|
893 |
+
}
|
894 |
+
.acf-tfoot {
|
895 |
+
background: #f5f5f5;
|
896 |
+
border-top: #dddddd solid 1px;
|
897 |
+
}
|
898 |
+
.acf-tfoot > li {
|
899 |
+
color: #7A9BBE;
|
900 |
+
font-size: 12px;
|
901 |
+
line-height: 27px;
|
902 |
+
}
|
903 |
+
/*--------------------------------------------------------------------------------------------
|
904 |
+
*
|
905 |
+
* Settings
|
906 |
+
*
|
907 |
+
*--------------------------------------------------------------------------------------------*/
|
908 |
+
.acf-settings-wrap .acf-box {
|
909 |
+
margin: 20px 0;
|
910 |
+
}
|
911 |
+
.acf-settings-wrap table {
|
912 |
+
margin: 0;
|
913 |
+
}
|
914 |
+
.acf-settings-wrap table .button {
|
915 |
+
vertical-align: middle;
|
916 |
+
}
|
917 |
+
/*--------------------------------------------------------------------------------------------
|
918 |
+
*
|
919 |
+
* Settings: Add-ons
|
920 |
+
*
|
921 |
+
*--------------------------------------------------------------------------------------------*/
|
922 |
+
.add-ons-list {
|
923 |
+
margin: 20px 0 0 -18px;
|
924 |
+
max-width: 960px;
|
925 |
+
}
|
926 |
+
.add-ons-list .add-on {
|
927 |
+
width: 220px;
|
928 |
+
margin: 0 0 20px 18px;
|
929 |
+
float: left;
|
930 |
+
}
|
931 |
+
.add-ons-list .add-on .inner {
|
932 |
+
min-height: 90px;
|
933 |
+
}
|
934 |
+
.add-ons-list .add-on-acf-pro {
|
935 |
+
width: 940px;
|
936 |
+
}
|
937 |
+
.add-ons-list .add-on .thumbnail img {
|
938 |
+
display: block;
|
939 |
+
}
|
940 |
+
.add-ons-list .add-on h3 a {
|
941 |
+
color: inherit;
|
942 |
+
text-decoration: none;
|
943 |
+
}
|
944 |
+
.add-ons-list .add-on h3 {
|
945 |
+
margin: 0.5em 0;
|
946 |
+
}
|
947 |
+
/*--------------------------------------------------------------------------------------------
|
948 |
+
*
|
949 |
+
* acf-popup
|
950 |
+
*
|
951 |
+
*--------------------------------------------------------------------------------------------*/
|
952 |
+
#acf-popup {
|
953 |
+
position: fixed;
|
954 |
+
z-index: 900000;
|
955 |
+
top: 0;
|
956 |
+
left: 0;
|
957 |
+
right: 0;
|
958 |
+
bottom: 0;
|
959 |
+
text-align: center;
|
960 |
+
}
|
961 |
+
#acf-popup .bg {
|
962 |
+
position: absolute;
|
963 |
+
top: 0;
|
964 |
+
left: 0;
|
965 |
+
right: 0;
|
966 |
+
bottom: 0;
|
967 |
+
z-index: 0;
|
968 |
+
background: rgba(0, 0, 0, 0.25);
|
969 |
+
}
|
970 |
+
#acf-popup:before {
|
971 |
+
content: '';
|
972 |
+
display: inline-block;
|
973 |
+
height: 100%;
|
974 |
+
vertical-align: middle;
|
975 |
+
}
|
976 |
+
#acf-popup .acf-popup-box {
|
977 |
+
display: inline-block;
|
978 |
+
vertical-align: middle;
|
979 |
+
z-index: 1;
|
980 |
+
min-width: 300px;
|
981 |
+
min-height: 160px;
|
982 |
+
border-color: #aaaaaa;
|
983 |
+
box-shadow: 0 5px 30px -5px rgba(0, 0, 0, 0.25);
|
984 |
+
text-align: left;
|
985 |
+
}
|
986 |
+
html[dir="rtl"] #acf-popup .acf-popup-box {
|
987 |
+
text-align: right;
|
988 |
+
}
|
989 |
+
#acf-popup .acf-popup-box .title {
|
990 |
+
min-height: 15px;
|
991 |
+
line-height: 15px;
|
992 |
+
}
|
993 |
+
#acf-popup .acf-popup-box .title .acf-icon {
|
994 |
+
position: absolute;
|
995 |
+
top: 10px;
|
996 |
+
right: 10px;
|
997 |
+
}
|
998 |
+
html[dir="rtl"] #acf-popup .acf-popup-box .title .acf-icon {
|
999 |
+
right: auto;
|
1000 |
+
left: 10px;
|
1001 |
+
}
|
1002 |
+
#acf-popup .acf-popup-box .inner {
|
1003 |
+
min-height: 50px;
|
1004 |
+
padding: 0;
|
1005 |
+
margin: 15px;
|
1006 |
+
}
|
1007 |
+
#acf-popup .acf-popup-box .loading {
|
1008 |
+
position: absolute;
|
1009 |
+
top: 45px;
|
1010 |
+
left: 0;
|
1011 |
+
right: 0;
|
1012 |
+
bottom: 0;
|
1013 |
+
z-index: 2;
|
1014 |
+
background: rgba(0, 0, 0, 0.1);
|
1015 |
+
display: none;
|
1016 |
+
}
|
1017 |
+
#acf-popup .acf-popup-box .loading i {
|
1018 |
+
position: absolute;
|
1019 |
+
top: 50%;
|
1020 |
+
left: 50%;
|
1021 |
+
transform: translate(-50%, -50%);
|
1022 |
+
}
|
1023 |
+
.acf-submit {
|
1024 |
+
margin-bottom: 0;
|
1025 |
+
line-height: 28px;
|
1026 |
+
}
|
1027 |
+
.acf-submit span {
|
1028 |
+
float: right;
|
1029 |
+
color: #999;
|
1030 |
+
}
|
1031 |
+
.acf-submit span.-error {
|
1032 |
+
color: #dd4232;
|
1033 |
+
}
|
1034 |
+
.acf-submit .button {
|
1035 |
+
margin-right: 5px;
|
1036 |
+
}
|
1037 |
+
/*--------------------------------------------------------------------------------------------
|
1038 |
+
*
|
1039 |
+
* upgrade notice
|
1040 |
+
*
|
1041 |
+
*--------------------------------------------------------------------------------------------*/
|
1042 |
+
#acf-upgrade-notice {
|
1043 |
+
position: relative;
|
1044 |
+
background: #fff;
|
1045 |
+
border-left: 4px solid #00a0d2;
|
1046 |
+
padding: 20px;
|
1047 |
+
}
|
1048 |
+
#acf-upgrade-notice:after {
|
1049 |
+
clear: both;
|
1050 |
+
content: "";
|
1051 |
+
display: table;
|
1052 |
+
}
|
1053 |
+
#acf-upgrade-notice .col-content {
|
1054 |
+
float: left;
|
1055 |
+
width: 55%;
|
1056 |
+
padding-left: 90px;
|
1057 |
+
}
|
1058 |
+
#acf-upgrade-notice .col-actions {
|
1059 |
+
float: right;
|
1060 |
+
text-align: center;
|
1061 |
+
padding: 10px;
|
1062 |
+
}
|
1063 |
+
#acf-upgrade-notice img {
|
1064 |
+
float: left;
|
1065 |
+
width: 70px;
|
1066 |
+
height: 70px;
|
1067 |
+
margin: 0 0 0 -90px;
|
1068 |
+
}
|
1069 |
+
#acf-upgrade-notice h2 {
|
1070 |
+
font-size: 16px;
|
1071 |
+
margin: 2px 0 6.5px;
|
1072 |
+
}
|
1073 |
+
#acf-upgrade-notice p {
|
1074 |
+
padding: 0;
|
1075 |
+
margin: 0;
|
1076 |
+
}
|
1077 |
+
#acf-upgrade-notice .button:before {
|
1078 |
+
margin-top: 11px;
|
1079 |
+
}
|
1080 |
+
@media screen and (max-width: 640px) {
|
1081 |
+
#acf-upgrade-notice .col-content,
|
1082 |
+
#acf-upgrade-notice .col-actions {
|
1083 |
+
float: none;
|
1084 |
+
padding-left: 90px;
|
1085 |
+
width: auto;
|
1086 |
+
text-align: left;
|
1087 |
+
}
|
1088 |
+
}
|
1089 |
+
/*--------------------------------------------------------------------------------------------
|
1090 |
+
*
|
1091 |
+
* Welcome
|
1092 |
+
*
|
1093 |
+
*--------------------------------------------------------------------------------------------*/
|
1094 |
+
.acf-wrap h1 {
|
1095 |
+
margin-top: 0;
|
1096 |
+
padding-top: 20px;
|
1097 |
+
}
|
1098 |
+
.acf-wrap .about-text {
|
1099 |
+
margin-top: 0.5em;
|
1100 |
+
min-height: 50px;
|
1101 |
+
}
|
1102 |
+
.acf-wrap .about-headline-callout {
|
1103 |
+
font-size: 2.4em;
|
1104 |
+
font-weight: 300;
|
1105 |
+
line-height: 1.3;
|
1106 |
+
margin: 1.1em 0 0.2em;
|
1107 |
+
text-align: center;
|
1108 |
+
}
|
1109 |
+
.acf-wrap .feature-section {
|
1110 |
+
padding: 40px 0;
|
1111 |
+
}
|
1112 |
+
.acf-wrap .feature-section h2 {
|
1113 |
+
margin-top: 20px;
|
1114 |
+
}
|
1115 |
+
.acf-wrap .changelog {
|
1116 |
+
list-style: disc;
|
1117 |
+
padding-left: 15px;
|
1118 |
+
}
|
1119 |
+
.acf-wrap .changelog li {
|
1120 |
+
margin: 0 0 0.75em;
|
1121 |
+
}
|
1122 |
+
.acf-wrap .acf-three-col {
|
1123 |
+
display: flex;
|
1124 |
+
flex-wrap: wrap;
|
1125 |
+
justify-content: space-between;
|
1126 |
+
}
|
1127 |
+
.acf-wrap .acf-three-col > div {
|
1128 |
+
flex: 1;
|
1129 |
+
align-self: flex-start;
|
1130 |
+
min-width: 31%;
|
1131 |
+
max-width: 31%;
|
1132 |
+
}
|
1133 |
+
@media screen and (max-width: 880px) {
|
1134 |
+
.acf-wrap .acf-three-col > div {
|
1135 |
+
min-width: 48%;
|
1136 |
+
}
|
1137 |
+
}
|
1138 |
+
@media screen and (max-width: 640px) {
|
1139 |
+
.acf-wrap .acf-three-col > div {
|
1140 |
+
min-width: 100%;
|
1141 |
+
}
|
1142 |
+
}
|
1143 |
+
.acf-wrap .acf-three-col h3 .badge {
|
1144 |
+
display: inline-block;
|
1145 |
+
vertical-align: top;
|
1146 |
+
border-radius: 5px;
|
1147 |
+
background: #fc9700;
|
1148 |
+
color: #fff;
|
1149 |
+
font-weight: normal;
|
1150 |
+
font-size: 12px;
|
1151 |
+
padding: 2px 5px;
|
1152 |
+
}
|
1153 |
+
.acf-wrap .acf-three-col img + h3 {
|
1154 |
+
margin-top: 0.5em;
|
1155 |
+
}
|
1156 |
+
/*--------------------------------------------------------------------------------------------
|
1157 |
+
*
|
1158 |
+
* acf-hl cols
|
1159 |
+
*
|
1160 |
+
*--------------------------------------------------------------------------------------------*/
|
1161 |
+
.acf-hl[data-cols] {
|
1162 |
+
margin-left: -10px;
|
1163 |
+
margin-right: -10px;
|
1164 |
+
}
|
1165 |
+
.acf-hl[data-cols] > li {
|
1166 |
+
padding: 0 10px;
|
1167 |
+
-webkit-box-sizing: border-box;
|
1168 |
+
-moz-box-sizing: border-box;
|
1169 |
+
box-sizing: border-box;
|
1170 |
+
}
|
1171 |
+
/* sizes */
|
1172 |
+
.acf-hl[data-cols="2"] > li {
|
1173 |
+
width: 50%;
|
1174 |
+
}
|
1175 |
+
.acf-hl[data-cols="3"] > li {
|
1176 |
+
width: 33.333%;
|
1177 |
+
}
|
1178 |
+
.acf-hl[data-cols="4"] > li {
|
1179 |
+
width: 25%;
|
1180 |
+
}
|
1181 |
+
/* mobile */
|
1182 |
+
@media screen and (max-width: 640px) {
|
1183 |
+
.acf-hl[data-cols] {
|
1184 |
+
margin-left: 0;
|
1185 |
+
margin-right: 0;
|
1186 |
+
margin-top: -10px;
|
1187 |
+
}
|
1188 |
+
.acf-hl[data-cols] > li {
|
1189 |
+
width: 100% !important;
|
1190 |
+
padding: 10px 0 0;
|
1191 |
+
}
|
1192 |
+
}
|
1193 |
+
/*--------------------------------------------------------------------------------------------
|
1194 |
+
*
|
1195 |
+
* misc
|
1196 |
+
*
|
1197 |
+
*--------------------------------------------------------------------------------------------*/
|
1198 |
+
.acf-actions {
|
1199 |
+
text-align: right;
|
1200 |
+
z-index: 1;
|
1201 |
+
/* hover */
|
1202 |
+
/* rtl */
|
1203 |
+
}
|
1204 |
+
.acf-actions a {
|
1205 |
+
margin-left: 4px;
|
1206 |
+
}
|
1207 |
+
.acf-actions.-hover {
|
1208 |
+
position: absolute;
|
1209 |
+
display: none;
|
1210 |
+
top: 0;
|
1211 |
+
right: 0;
|
1212 |
+
padding: 5px;
|
1213 |
+
}
|
1214 |
+
html[dir="rtl"] .acf-actions a {
|
1215 |
+
margin-left: 0;
|
1216 |
+
margin-right: 4px;
|
1217 |
+
}
|
1218 |
+
html[dir="rtl"] .acf-actions.-hover {
|
1219 |
+
right: auto;
|
1220 |
+
left: 0;
|
1221 |
+
}
|
1222 |
+
/* ul compatibility */
|
1223 |
+
ul.acf-actions li {
|
1224 |
+
float: right;
|
1225 |
+
margin-left: 4px;
|
1226 |
+
}
|
1227 |
+
/*--------------------------------------------------------------------------------------------
|
1228 |
+
*
|
1229 |
+
* Plugins
|
1230 |
+
*
|
1231 |
+
*--------------------------------------------------------------------------------------------*/
|
1232 |
+
.acf-plugin-upgrade-notice {
|
1233 |
+
font-weight: normal;
|
1234 |
+
color: #fff;
|
1235 |
+
background: #d54d21;
|
1236 |
+
padding: 1em;
|
1237 |
+
margin: 9px 0;
|
1238 |
+
}
|
1239 |
+
.acf-plugin-upgrade-notice:before {
|
1240 |
+
content: "\f348";
|
1241 |
+
display: inline-block;
|
1242 |
+
font: 400 18px/1 dashicons;
|
1243 |
+
speak: none;
|
1244 |
+
margin: 0 8px 0 -2px;
|
1245 |
+
-webkit-font-smoothing: antialiased;
|
1246 |
+
-moz-osx-font-smoothing: grayscale;
|
1247 |
+
vertical-align: top;
|
1248 |
+
}
|
1249 |
+
.acf-plugin-upgrade-notice h4 {
|
1250 |
+
display: none;
|
1251 |
+
}
|
1252 |
+
.acf-plugin-upgrade-notice ul,
|
1253 |
+
.acf-plugin-upgrade-notice li {
|
1254 |
+
display: inline;
|
1255 |
+
color: inherit;
|
1256 |
+
list-style: none;
|
1257 |
+
}
|
1258 |
+
.acf-plugin-upgrade-notice li:after {
|
1259 |
+
content: '. ';
|
1260 |
+
display: inline;
|
1261 |
+
}
|
1262 |
+
/*--------------------------------------------------------------------------------------------
|
1263 |
+
*
|
1264 |
+
* RTL
|
1265 |
+
*
|
1266 |
+
*--------------------------------------------------------------------------------------------*/
|
1267 |
+
html[dir="rtl"] .acf-fl {
|
1268 |
+
float: right;
|
1269 |
+
}
|
1270 |
+
html[dir="rtl"] .acf-fr {
|
1271 |
+
float: left;
|
1272 |
+
}
|
1273 |
+
html[dir="rtl"] .acf-hl > li {
|
1274 |
+
float: right;
|
1275 |
+
}
|
1276 |
+
html[dir="rtl"] .acf-hl > li.acf-fr {
|
1277 |
+
float: left;
|
1278 |
+
}
|
1279 |
+
html[dir="rtl"] .acf-icon.logo {
|
1280 |
+
left: 0;
|
1281 |
+
right: auto;
|
1282 |
+
}
|
1283 |
+
html[dir="rtl"] .acf-table thead th {
|
1284 |
+
text-align: right;
|
1285 |
+
border-right-width: 1px;
|
1286 |
+
border-left-width: 0px;
|
1287 |
+
}
|
1288 |
+
html[dir="rtl"] .acf-table > tbody > tr > td {
|
1289 |
+
text-align: right;
|
1290 |
+
border-right-width: 1px;
|
1291 |
+
border-left-width: 0px;
|
1292 |
+
}
|
1293 |
+
html[dir="rtl"] .acf-table > thead > tr > th:first-child,
|
1294 |
+
html[dir="rtl"] .acf-table > tbody > tr > td:first-child {
|
1295 |
+
border-right-width: 0;
|
1296 |
+
}
|
1297 |
+
html[dir="rtl"] .acf-table > tbody > tr > td.order + td {
|
1298 |
+
border-right-color: #e1e1e1;
|
1299 |
+
}
|
1300 |
+
/*---------------------------------------------------------------------------------------------
|
1301 |
+
*
|
1302 |
+
* acf-postbox-columns
|
1303 |
+
*
|
1304 |
+
*---------------------------------------------------------------------------------------------*/
|
1305 |
+
.acf-postbox-columns {
|
1306 |
+
position: relative;
|
1307 |
+
margin-top: -11px;
|
1308 |
+
margin-bottom: -11px;
|
1309 |
+
margin-left: -12px;
|
1310 |
+
margin-right: 268px;
|
1311 |
+
}
|
1312 |
+
.acf-postbox-columns:after {
|
1313 |
+
clear: both;
|
1314 |
+
content: "";
|
1315 |
+
display: table;
|
1316 |
+
}
|
1317 |
+
.acf-postbox-columns .acf-postbox-main,
|
1318 |
+
.acf-postbox-columns .acf-postbox-side {
|
1319 |
+
-webkit-box-sizing: border-box;
|
1320 |
+
-moz-box-sizing: border-box;
|
1321 |
+
box-sizing: border-box;
|
1322 |
+
padding: 0 12px 12px;
|
1323 |
+
}
|
1324 |
+
.acf-postbox-columns .acf-postbox-main {
|
1325 |
+
float: left;
|
1326 |
+
width: 100%;
|
1327 |
+
}
|
1328 |
+
.acf-postbox-columns .acf-postbox-side {
|
1329 |
+
float: right;
|
1330 |
+
width: 280px;
|
1331 |
+
margin-right: -280px;
|
1332 |
+
}
|
1333 |
+
.acf-postbox-columns .acf-postbox-side:before {
|
1334 |
+
content: "";
|
1335 |
+
display: block;
|
1336 |
+
position: absolute;
|
1337 |
+
width: 1px;
|
1338 |
+
height: 100%;
|
1339 |
+
top: 0;
|
1340 |
+
right: 0;
|
1341 |
+
background: #ebebeb;
|
1342 |
+
}
|
1343 |
+
/* mobile */
|
1344 |
+
@media only screen and (max-width: 850px) {
|
1345 |
+
.acf-postbox-columns {
|
1346 |
+
margin: 0;
|
1347 |
+
}
|
1348 |
+
.acf-postbox-columns .acf-postbox-main,
|
1349 |
+
.acf-postbox-columns .acf-postbox-side {
|
1350 |
+
float: none;
|
1351 |
+
width: auto;
|
1352 |
+
margin: 0;
|
1353 |
+
padding: 0;
|
1354 |
+
}
|
1355 |
+
.acf-postbox-columns .acf-postbox-side {
|
1356 |
+
margin-top: 1em;
|
1357 |
+
}
|
1358 |
+
.acf-postbox-columns .acf-postbox-side:before {
|
1359 |
+
display: none;
|
1360 |
+
}
|
1361 |
+
}
|
1362 |
+
/*---------------------------------------------------------------------------------------------
|
1363 |
+
*
|
1364 |
+
* acf-panel
|
1365 |
+
*
|
1366 |
+
*---------------------------------------------------------------------------------------------*/
|
1367 |
+
.acf-panel {
|
1368 |
+
margin-top: -1px;
|
1369 |
+
border-top: 1px solid #e2e4e7;
|
1370 |
+
border-bottom: 1px solid #e2e4e7;
|
1371 |
+
/* open */
|
1372 |
+
/* inside postbox */
|
1373 |
+
/* fields */
|
1374 |
+
}
|
1375 |
+
.acf-panel .acf-panel-title {
|
1376 |
+
margin: 0;
|
1377 |
+
padding: 12px;
|
1378 |
+
font-weight: bold;
|
1379 |
+
cursor: pointer;
|
1380 |
+
font-size: inherit;
|
1381 |
+
}
|
1382 |
+
.acf-panel .acf-panel-title i {
|
1383 |
+
float: right;
|
1384 |
+
}
|
1385 |
+
.acf-panel .acf-panel-inside {
|
1386 |
+
margin: 0;
|
1387 |
+
padding: 0 12px 12px;
|
1388 |
+
display: none;
|
1389 |
+
}
|
1390 |
+
.acf-panel.-open .acf-panel-inside {
|
1391 |
+
display: block;
|
1392 |
+
}
|
1393 |
+
.postbox .acf-panel {
|
1394 |
+
margin-left: -12px;
|
1395 |
+
margin-right: -12px;
|
1396 |
+
}
|
1397 |
+
.acf-panel .acf-field {
|
1398 |
+
margin: 20px 0 0;
|
1399 |
+
}
|
1400 |
+
.acf-panel .acf-field .acf-label label {
|
1401 |
+
color: #555d66;
|
1402 |
+
font-weight: normal;
|
1403 |
+
}
|
1404 |
+
.acf-panel .acf-field:first-child {
|
1405 |
+
margin-top: 0;
|
1406 |
+
}
|
1407 |
+
/*---------------------------------------------------------------------------------------------
|
1408 |
+
*
|
1409 |
+
* Admin Tools
|
1410 |
+
*
|
1411 |
+
*---------------------------------------------------------------------------------------------*/
|
1412 |
+
#acf-admin-tools .notice {
|
1413 |
+
margin-top: 10px;
|
1414 |
+
}
|
1415 |
+
.acf-meta-box-wrap {
|
1416 |
+
margin-top: 10px;
|
1417 |
+
/* acf-fields */
|
1418 |
+
}
|
1419 |
+
.acf-meta-box-wrap .postbox {
|
1420 |
+
-webkit-box-sizing: border-box;
|
1421 |
+
-moz-box-sizing: border-box;
|
1422 |
+
box-sizing: border-box;
|
1423 |
+
}
|
1424 |
+
.acf-meta-box-wrap .postbox .inside {
|
1425 |
+
margin-bottom: 0;
|
1426 |
+
}
|
1427 |
+
.acf-meta-box-wrap .postbox .hndle {
|
1428 |
+
font-size: 14px;
|
1429 |
+
padding: 8px 12px;
|
1430 |
+
margin: 0;
|
1431 |
+
line-height: 1.4;
|
1432 |
+
}
|
1433 |
+
.acf-meta-box-wrap .postbox .handlediv {
|
1434 |
+
display: none;
|
1435 |
+
}
|
1436 |
+
.acf-meta-box-wrap .acf-fields {
|
1437 |
+
border: #ebebeb solid 1px;
|
1438 |
+
background: #fafafa;
|
1439 |
+
border-radius: 3px;
|
1440 |
+
}
|
1441 |
+
/* grid */
|
1442 |
+
.acf-meta-box-wrap.-grid {
|
1443 |
+
margin-left: 8px;
|
1444 |
+
margin-right: 8px;
|
1445 |
+
}
|
1446 |
+
.acf-meta-box-wrap.-grid .postbox {
|
1447 |
+
float: left;
|
1448 |
+
clear: left;
|
1449 |
+
width: 50%;
|
1450 |
+
margin: 0 0 16px;
|
1451 |
+
}
|
1452 |
+
.acf-meta-box-wrap.-grid .postbox:nth-child(odd) {
|
1453 |
+
margin-left: -8px;
|
1454 |
+
}
|
1455 |
+
.acf-meta-box-wrap.-grid .postbox:nth-child(even) {
|
1456 |
+
float: right;
|
1457 |
+
clear: right;
|
1458 |
+
margin-right: -8px;
|
1459 |
+
}
|
1460 |
+
/* mobile */
|
1461 |
+
@media only screen and (max-width: 850px) {
|
1462 |
+
.acf-meta-box-wrap.-grid {
|
1463 |
+
margin-left: 0;
|
1464 |
+
margin-right: 0;
|
1465 |
+
}
|
1466 |
+
.acf-meta-box-wrap.-grid .postbox {
|
1467 |
+
margin-left: 0 !important;
|
1468 |
+
margin-right: 0 !important;
|
1469 |
+
width: 100%;
|
1470 |
+
}
|
1471 |
+
}
|
1472 |
+
/* export tool */
|
1473 |
+
#acf-admin-tool-export {
|
1474 |
+
/* panel: selection */
|
1475 |
+
}
|
1476 |
+
#acf-admin-tool-export p {
|
1477 |
+
max-width: 800px;
|
1478 |
+
}
|
1479 |
+
#acf-admin-tool-export ul {
|
1480 |
+
column-width: 200px;
|
1481 |
+
}
|
1482 |
+
#acf-admin-tool-export .acf-postbox-side .button {
|
1483 |
+
margin: 0;
|
1484 |
+
width: 100%;
|
1485 |
+
}
|
1486 |
+
#acf-admin-tool-export textarea {
|
1487 |
+
display: block;
|
1488 |
+
width: 100%;
|
1489 |
+
min-height: 500px;
|
1490 |
+
background: #fafafa;
|
1491 |
+
box-shadow: none;
|
1492 |
+
padding: 7px;
|
1493 |
+
border-radius: 3px;
|
1494 |
+
}
|
1495 |
+
#acf-admin-tool-export .acf-panel-selection .acf-label {
|
1496 |
+
display: none;
|
1497 |
+
}
|
1498 |
+
/*---------------------------------------------------------------------------------------------
|
1499 |
+
*
|
1500 |
+
* Retina
|
1501 |
+
*
|
1502 |
+
*---------------------------------------------------------------------------------------------*/
|
1503 |
+
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
1504 |
+
.acf-loading,
|
1505 |
+
.acf-spinner {
|
1506 |
+
background-image: url(../images/spinner@2x.gif);
|
1507 |
+
background-size: 20px 20px;
|
1508 |
+
}
|
1509 |
+
}
|
1510 |
+
/*---------------------------------------------------------------------------------------------
|
1511 |
+
*
|
1512 |
+
* Device
|
1513 |
+
*
|
1514 |
+
*---------------------------------------------------------------------------------------------*/
|
1515 |
+
@media only screen and (max-width: 850px) {
|
1516 |
+
.acf-columns-2 {
|
1517 |
+
margin-right: 0;
|
1518 |
+
}
|
1519 |
+
.acf-columns-2 .acf-column-1,
|
1520 |
+
.acf-columns-2 .acf-column-2 {
|
1521 |
+
float: none;
|
1522 |
+
width: auto;
|
1523 |
+
margin: 0;
|
1524 |
+
}
|
1525 |
+
}
|
shared/assets/plugins/advanced-custom-fields/assets/css/acf-input.css
ADDED
@@ -0,0 +1,2708 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*--------------------------------------------------------------------------------------------
|
2 |
+
*
|
3 |
+
* Vars
|
4 |
+
*
|
5 |
+
*--------------------------------------------------------------------------------------------*/
|
6 |
+
/* colors */
|
7 |
+
/* acf-field */
|
8 |
+
/* responsive */
|
9 |
+
/*--------------------------------------------------------------------------------------------
|
10 |
+
*
|
11 |
+
* Mixins
|
12 |
+
*
|
13 |
+
*--------------------------------------------------------------------------------------------*/
|
14 |
+
/*--------------------------------------------------------------------------------------------
|
15 |
+
*
|
16 |
+
* acf-field
|
17 |
+
*
|
18 |
+
*--------------------------------------------------------------------------------------------*/
|
19 |
+
.acf-field,
|
20 |
+
.acf-field .acf-label,
|
21 |
+
.acf-field .acf-input {
|
22 |
+
-webkit-box-sizing: border-box;
|
23 |
+
-moz-box-sizing: border-box;
|
24 |
+
box-sizing: border-box;
|
25 |
+
position: relative;
|
26 |
+
}
|
27 |
+
.acf-field {
|
28 |
+
margin: 15px 0;
|
29 |
+
clear: both;
|
30 |
+
}
|
31 |
+
.acf-field p.description {
|
32 |
+
display: block;
|
33 |
+
margin: 0;
|
34 |
+
padding: 0;
|
35 |
+
}
|
36 |
+
.acf-field .acf-label {
|
37 |
+
vertical-align: top;
|
38 |
+
margin: 0 0 10px;
|
39 |
+
}
|
40 |
+
.acf-field .acf-label label {
|
41 |
+
display: block;
|
42 |
+
font-weight: bold;
|
43 |
+
margin: 0 0 3px;
|
44 |
+
padding: 0;
|
45 |
+
}
|
46 |
+
.acf-field .acf-label:empty {
|
47 |
+
margin-bottom: 0;
|
48 |
+
}
|
49 |
+
.acf-field .acf-input {
|
50 |
+
vertical-align: top;
|
51 |
+
}
|
52 |
+
.acf-field .acf-input > p.description {
|
53 |
+
margin-top: 5px;
|
54 |
+
}
|
55 |
+
.acf-field .acf-notice {
|
56 |
+
margin: 0 0 15px;
|
57 |
+
background: #edf2ff;
|
58 |
+
color: #2183b9;
|
59 |
+
border: none;
|
60 |
+
}
|
61 |
+
.acf-field .acf-notice .acf-notice-dismiss {
|
62 |
+
background: transparent;
|
63 |
+
color: inherit;
|
64 |
+
}
|
65 |
+
.acf-field .acf-notice .acf-notice-dismiss:hover {
|
66 |
+
background: #fff;
|
67 |
+
}
|
68 |
+
.acf-field .acf-notice.-dismiss {
|
69 |
+
padding-right: 40px;
|
70 |
+
}
|
71 |
+
.acf-field .acf-notice.-error {
|
72 |
+
background: #ffe6e6;
|
73 |
+
color: #d12626;
|
74 |
+
}
|
75 |
+
.acf-field .acf-notice.-success {
|
76 |
+
background: #eefbe8;
|
77 |
+
color: #32a23b;
|
78 |
+
}
|
79 |
+
.acf-field .acf-notice.-warning {
|
80 |
+
background: #fff3e6;
|
81 |
+
color: #d16226;
|
82 |
+
}
|
83 |
+
.acf-fieldtd,
|
84 |
+
.acf-fieldtr {
|
85 |
+
margin: 0;
|
86 |
+
}
|
87 |
+
.acf-field[data-width] {
|
88 |
+
float: left;
|
89 |
+
clear: none;
|
90 |
+
/*
|
91 |
+
@media screen and (max-width: @sm) {
|
92 |
+
float: none;
|
93 |
+
width: auto;
|
94 |
+
border-left-width: 0;
|
95 |
+
border-right-width: 0;
|
96 |
+
}
|
97 |
+
*/
|
98 |
+
}
|
99 |
+
.acf-field[data-width] + .acf-field[data-width] {
|
100 |
+
border-left: 1px solid #eeeeee;
|
101 |
+
}
|
102 |
+
html[dir="rtl"] .acf-field[data-width] {
|
103 |
+
float: right;
|
104 |
+
}
|
105 |
+
html[dir="rtl"] .acf-field[data-width] + .acf-field[data-width] {
|
106 |
+
border-left: none;
|
107 |
+
border-right: 1px solid #eeeeee;
|
108 |
+
}
|
109 |
+
.acf-field[data-width]td,
|
110 |
+
.acf-field[data-width]tr {
|
111 |
+
float: none;
|
112 |
+
}
|
113 |
+
.acf-field.-c0 {
|
114 |
+
clear: both;
|
115 |
+
border-left-width: 0 !important;
|
116 |
+
}
|
117 |
+
html[dir="rtl"] .acf-field.-c0 {
|
118 |
+
border-left-width: 1px !important;
|
119 |
+
border-right-width: 0 !important;
|
120 |
+
}
|
121 |
+
.acf-field.-r0 {
|
122 |
+
border-top-width: 0 !important;
|
123 |
+
}
|
124 |
+
/*--------------------------------------------------------------------------------------------
|
125 |
+
*
|
126 |
+
* acf-fields
|
127 |
+
*
|
128 |
+
*--------------------------------------------------------------------------------------------*/
|
129 |
+
.acf-fields {
|
130 |
+
position: relative;
|
131 |
+
}
|
132 |
+
.acf-fields:after {
|
133 |
+
clear: both;
|
134 |
+
content: "";
|
135 |
+
display: table;
|
136 |
+
}
|
137 |
+
.acf-fields.-border {
|
138 |
+
border: #dfdfdf solid 1px;
|
139 |
+
background: #fff;
|
140 |
+
}
|
141 |
+
.acf-fields > .acf-field {
|
142 |
+
position: relative;
|
143 |
+
margin: 0;
|
144 |
+
padding: 15px 12px;
|
145 |
+
border-top: #EEEEEE solid 1px;
|
146 |
+
}
|
147 |
+
.acf-fields > .acf-field:first-child {
|
148 |
+
border-top-width: 0;
|
149 |
+
}
|
150 |
+
td.acf-fields {
|
151 |
+
padding: 0 !important;
|
152 |
+
}
|
153 |
+
/*--------------------------------------------------------------------------------------------
|
154 |
+
*
|
155 |
+
* acf-fields (clear)
|
156 |
+
*
|
157 |
+
*--------------------------------------------------------------------------------------------*/
|
158 |
+
.acf-fields.-clear > .acf-field {
|
159 |
+
border: none;
|
160 |
+
padding: 0;
|
161 |
+
margin: 15px 0;
|
162 |
+
}
|
163 |
+
.acf-fields.-clear > .acf-field[data-width] {
|
164 |
+
border: none !important;
|
165 |
+
}
|
166 |
+
.acf-fields.-clear > .acf-field > .acf-label {
|
167 |
+
padding: 0;
|
168 |
+
}
|
169 |
+
.acf-fields.-clear > .acf-field > .acf-input {
|
170 |
+
padding: 0;
|
171 |
+
}
|
172 |
+
/*--------------------------------------------------------------------------------------------
|
173 |
+
*
|
174 |
+
* acf-fields (left)
|
175 |
+
*
|
176 |
+
*--------------------------------------------------------------------------------------------*/
|
177 |
+
.acf-fields.-left > .acf-field {
|
178 |
+
padding: 15px 0;
|
179 |
+
}
|
180 |
+
.acf-fields.-left > .acf-field:after {
|
181 |
+
clear: both;
|
182 |
+
content: "";
|
183 |
+
display: table;
|
184 |
+
}
|
185 |
+
.acf-fields.-left > .acf-field:before {
|
186 |
+
content: "";
|
187 |
+
display: block;
|
188 |
+
position: absolute;
|
189 |
+
z-index: 0;
|
190 |
+
background: #F9F9F9;
|
191 |
+
border-color: #E1E1E1;
|
192 |
+
border-style: solid;
|
193 |
+
border-width: 0 1px 0 0;
|
194 |
+
top: 0;
|
195 |
+
bottom: 0;
|
196 |
+
left: 0;
|
197 |
+
width: 20%;
|
198 |
+
}
|
199 |
+
.acf-fields.-left > .acf-field[data-width] {
|
200 |
+
float: none;
|
201 |
+
width: auto !important;
|
202 |
+
border-left-width: 0 !important;
|
203 |
+
border-right-width: 0 !important;
|
204 |
+
}
|
205 |
+
.acf-fields.-left > .acf-field > .acf-label {
|
206 |
+
float: left;
|
207 |
+
width: 20%;
|
208 |
+
margin: 0;
|
209 |
+
padding: 0 12px;
|
210 |
+
}
|
211 |
+
.acf-fields.-left > .acf-field > .acf-input {
|
212 |
+
float: left;
|
213 |
+
width: 80%;
|
214 |
+
margin: 0;
|
215 |
+
padding: 0 12px;
|
216 |
+
}
|
217 |
+
html[dir="rtl"] .acf-fields.-left > .acf-field:before {
|
218 |
+
border-width: 0 0 0 1px;
|
219 |
+
left: auto;
|
220 |
+
right: 0;
|
221 |
+
}
|
222 |
+
html[dir="rtl"] .acf-fields.-left > .acf-field > .acf-label {
|
223 |
+
float: right;
|
224 |
+
}
|
225 |
+
html[dir="rtl"] .acf-fields.-left > .acf-field > .acf-input {
|
226 |
+
float: right;
|
227 |
+
}
|
228 |
+
@media screen and (max-width: 640px) {
|
229 |
+
.acf-fields.-left > .acf-field:before {
|
230 |
+
display: none;
|
231 |
+
}
|
232 |
+
.acf-fields.-left > .acf-field > .acf-label {
|
233 |
+
width: 100%;
|
234 |
+
margin-bottom: 10px;
|
235 |
+
}
|
236 |
+
.acf-fields.-left > .acf-field > .acf-input {
|
237 |
+
width: 100%;
|
238 |
+
}
|
239 |
+
}
|
240 |
+
/* clear + left */
|
241 |
+
.acf-fields.-clear.-left > .acf-field {
|
242 |
+
padding: 0;
|
243 |
+
border: none;
|
244 |
+
}
|
245 |
+
.acf-fields.-clear.-left > .acf-field:before {
|
246 |
+
display: none;
|
247 |
+
}
|
248 |
+
.acf-fields.-clear.-left > .acf-field > .acf-label {
|
249 |
+
padding: 0;
|
250 |
+
}
|
251 |
+
.acf-fields.-clear.-left > .acf-field > .acf-input {
|
252 |
+
padding: 0;
|
253 |
+
}
|
254 |
+
/*--------------------------------------------------------------------------------------------
|
255 |
+
*
|
256 |
+
* acf-table
|
257 |
+
*
|
258 |
+
*--------------------------------------------------------------------------------------------*/
|
259 |
+
.acf-table tr.acf-field > td.acf-label {
|
260 |
+
padding: 15px 12px;
|
261 |
+
margin: 0;
|
262 |
+
background: #F9F9F9;
|
263 |
+
width: 20%;
|
264 |
+
}
|
265 |
+
.acf-table tr.acf-field > td.acf-input {
|
266 |
+
padding: 15px 12px;
|
267 |
+
margin: 0;
|
268 |
+
border-left-color: #E1E1E1;
|
269 |
+
}
|
270 |
+
/*--------------------------------------------------------------------------------------------
|
271 |
+
*
|
272 |
+
* acf-postbox
|
273 |
+
*
|
274 |
+
*--------------------------------------------------------------------------------------------*/
|
275 |
+
.acf-postbox {
|
276 |
+
position: relative;
|
277 |
+
}
|
278 |
+
#acf_after_title-sortables .acf-postbox {
|
279 |
+
margin: 20px 0 0;
|
280 |
+
}
|
281 |
+
.acf-postbox > .inside {
|
282 |
+
margin: 0 !important;
|
283 |
+
/* override WP style - do not delete - you have tried this before */
|
284 |
+
padding: 0 !important;
|
285 |
+
/* override WP style - do not delete - you have tried this before */
|
286 |
+
}
|
287 |
+
.acf-postbox > .hndle {
|
288 |
+
/* edit field group */
|
289 |
+
}
|
290 |
+
.acf-postbox > .hndle .acf-hndle-cog {
|
291 |
+
color: #AAAAAA;
|
292 |
+
font-size: 16px;
|
293 |
+
line-height: 20px;
|
294 |
+
padding: 0 2px;
|
295 |
+
float: right;
|
296 |
+
position: relative;
|
297 |
+
display: none;
|
298 |
+
}
|
299 |
+
.acf-postbox > .hndle .acf-hndle-cog:hover {
|
300 |
+
color: #777777;
|
301 |
+
}
|
302 |
+
.acf-postbox:hover > .hndle .acf-hndle-cog {
|
303 |
+
display: block;
|
304 |
+
}
|
305 |
+
.acf-postbox .acf-replace-with-fields {
|
306 |
+
padding: 15px;
|
307 |
+
text-align: center;
|
308 |
+
}
|
309 |
+
/* seamless */
|
310 |
+
.acf-postbox.seamless {
|
311 |
+
border: 0 none;
|
312 |
+
background: transparent;
|
313 |
+
box-shadow: none;
|
314 |
+
/* hide hndle */
|
315 |
+
/* inside */
|
316 |
+
}
|
317 |
+
.acf-postbox.seamless > .hndle,
|
318 |
+
.acf-postbox.seamless > .handlediv {
|
319 |
+
display: none !important;
|
320 |
+
}
|
321 |
+
.acf-postbox.seamless > .inside {
|
322 |
+
display: block !important;
|
323 |
+
/* stop metabox from hiding when closed */
|
324 |
+
margin-left: -12px !important;
|
325 |
+
margin-right: -12px !important;
|
326 |
+
}
|
327 |
+
.acf-postbox.seamless > .inside > .acf-field {
|
328 |
+
border-color: transparent;
|
329 |
+
}
|
330 |
+
/* seamless (left) */
|
331 |
+
.acf-postbox.seamless > .acf-fields.-left {
|
332 |
+
/* hide sidebar bg */
|
333 |
+
/* mobile */
|
334 |
+
}
|
335 |
+
.acf-postbox.seamless > .acf-fields.-left > .acf-field:before {
|
336 |
+
display: none;
|
337 |
+
}
|
338 |
+
@media screen and (max-width: 782px) {
|
339 |
+
.acf-postbox.seamless > .acf-fields.-left {
|
340 |
+
/* remove padding */
|
341 |
+
}
|
342 |
+
.acf-postbox.seamless > .acf-fields.-left > .acf-field > .acf-label,
|
343 |
+
.acf-postbox.seamless > .acf-fields.-left > .acf-field > .acf-input {
|
344 |
+
padding: 0;
|
345 |
+
}
|
346 |
+
}
|
347 |
+
/* override WP CSS */
|
348 |
+
.metabox-prefs label.acf-hidden {
|
349 |
+
display: none;
|
350 |
+
}
|
351 |
+
/*---------------------------------------------------------------------------------------------
|
352 |
+
*
|
353 |
+
* Inputs
|
354 |
+
*
|
355 |
+
*---------------------------------------------------------------------------------------------*/
|
356 |
+
.acf-field input[type="text"],
|
357 |
+
.acf-field input[type="password"],
|
358 |
+
.acf-field input[type="number"],
|
359 |
+
.acf-field input[type="search"],
|
360 |
+
.acf-field input[type="email"],
|
361 |
+
.acf-field input[type="url"],
|
362 |
+
.acf-field textarea,
|
363 |
+
.acf-field select {
|
364 |
+
width: 100%;
|
365 |
+
padding: 3px 5px;
|
366 |
+
resize: none;
|
367 |
+
margin: 0;
|
368 |
+
-webkit-box-sizing: border-box;
|
369 |
+
-moz-box-sizing: border-box;
|
370 |
+
box-sizing: border-box;
|
371 |
+
font-size: 14px;
|
372 |
+
line-height: 1.4;
|
373 |
+
}
|
374 |
+
.acf-field input[type="text"]:disabled,
|
375 |
+
.acf-field input[type="password"]:disabled,
|
376 |
+
.acf-field input[type="number"]:disabled,
|
377 |
+
.acf-field input[type="search"]:disabled,
|
378 |
+
.acf-field input[type="email"]:disabled,
|
379 |
+
.acf-field input[type="url"]:disabled,
|
380 |
+
.acf-field textarea:disabled,
|
381 |
+
.acf-field select:disabled {
|
382 |
+
background: #f8f8f8;
|
383 |
+
}
|
384 |
+
.acf-field input[type="text"][readonly],
|
385 |
+
.acf-field input[type="password"][readonly],
|
386 |
+
.acf-field input[type="number"][readonly],
|
387 |
+
.acf-field input[type="search"][readonly],
|
388 |
+
.acf-field input[type="email"][readonly],
|
389 |
+
.acf-field input[type="url"][readonly],
|
390 |
+
.acf-field textarea[readonly],
|
391 |
+
.acf-field select[readonly] {
|
392 |
+
background: #f8f8f8;
|
393 |
+
}
|
394 |
+
.acf-field textarea {
|
395 |
+
resize: vertical;
|
396 |
+
}
|
397 |
+
/*---------------------------------------------------------------------------------------------
|
398 |
+
*
|
399 |
+
* Text
|
400 |
+
*
|
401 |
+
*---------------------------------------------------------------------------------------------*/
|
402 |
+
.acf-input-prepend,
|
403 |
+
.acf-input-append {
|
404 |
+
font-size: 13px;
|
405 |
+
line-height: 20px;
|
406 |
+
height: 20px;
|
407 |
+
padding: 3px 7px;
|
408 |
+
background: #F4F4F4;
|
409 |
+
border: #DFDFDF solid 1px;
|
410 |
+
}
|
411 |
+
.acf-input-prepend {
|
412 |
+
float: left;
|
413 |
+
border-right-width: 0;
|
414 |
+
border-radius: 3px 0 0 3px;
|
415 |
+
}
|
416 |
+
.acf-input-append {
|
417 |
+
float: right;
|
418 |
+
border-left-width: 0;
|
419 |
+
border-radius: 0 3px 3px 0;
|
420 |
+
}
|
421 |
+
.acf-input-wrap {
|
422 |
+
position: relative;
|
423 |
+
overflow: hidden;
|
424 |
+
}
|
425 |
+
.acf-input-wrap input {
|
426 |
+
height: 28px;
|
427 |
+
margin: 0;
|
428 |
+
}
|
429 |
+
input.acf-is-prepended {
|
430 |
+
border-radius: 0 3px 3px 0 !important;
|
431 |
+
}
|
432 |
+
input.acf-is-appended {
|
433 |
+
border-radius: 3px 0 0 3px !important;
|
434 |
+
}
|
435 |
+
input.acf-is-prepended.acf-is-appended {
|
436 |
+
border-radius: 0 !important;
|
437 |
+
}
|
438 |
+
/* rtl */
|
439 |
+
html[dir="rtl"] .acf-input-prepend {
|
440 |
+
border-left-width: 0;
|
441 |
+
border-right-width: 1px;
|
442 |
+
border-radius: 0 3px 3px 0;
|
443 |
+
float: right;
|
444 |
+
}
|
445 |
+
html[dir="rtl"] .acf-input-append {
|
446 |
+
border-left-width: 1px;
|
447 |
+
border-right-width: 0;
|
448 |
+
border-radius: 3px 0 0 3px;
|
449 |
+
float: left;
|
450 |
+
}
|
451 |
+
html[dir="rtl"] input.acf-is-prepended {
|
452 |
+
border-radius: 3px 0 0 3px !important;
|
453 |
+
}
|
454 |
+
html[dir="rtl"] input.acf-is-appended {
|
455 |
+
border-radius: 0 3px 3px 0 !important;
|
456 |
+
}
|
457 |
+
html[dir="rtl"] input.acf-is-prepended.acf-is-appended {
|
458 |
+
border-radius: 0 !important;
|
459 |
+
}
|
460 |
+
/*---------------------------------------------------------------------------------------------
|
461 |
+
*
|
462 |
+
* Color Picker
|
463 |
+
*
|
464 |
+
*---------------------------------------------------------------------------------------------*/
|
465 |
+
.acf-color-picker .wp-picker-active {
|
466 |
+
position: relative;
|
467 |
+
z-index: 1;
|
468 |
+
}
|
469 |
+
/*---------------------------------------------------------------------------------------------
|
470 |
+
*
|
471 |
+
* Url
|
472 |
+
*
|
473 |
+
*---------------------------------------------------------------------------------------------*/
|
474 |
+
.acf-url i {
|
475 |
+
position: absolute;
|
476 |
+
top: 4px;
|
477 |
+
left: 4px;
|
478 |
+
opacity: 0.5;
|
479 |
+
color: #A9A9A9;
|
480 |
+
}
|
481 |
+
.acf-url input[type="url"] {
|
482 |
+
padding-left: 25px;
|
483 |
+
}
|
484 |
+
.acf-url.-valid i {
|
485 |
+
opacity: 1;
|
486 |
+
}
|
487 |
+
/*---------------------------------------------------------------------------------------------
|
488 |
+
*
|
489 |
+
* Select
|
490 |
+
*
|
491 |
+
*---------------------------------------------------------------------------------------------*/
|
492 |
+
.acf-field select {
|
493 |
+
padding: 2px;
|
494 |
+
}
|
495 |
+
.acf-field select optgroup {
|
496 |
+
padding: 5px;
|
497 |
+
background: #fff;
|
498 |
+
}
|
499 |
+
.acf-field select option {
|
500 |
+
padding: 3px;
|
501 |
+
}
|
502 |
+
.acf-field select optgroup option {
|
503 |
+
padding-left: 5px;
|
504 |
+
}
|
505 |
+
.acf-field select optgroup:nth-child(2n) {
|
506 |
+
background: #F9F9F9;
|
507 |
+
}
|
508 |
+
.acf-field .select2-input {
|
509 |
+
max-width: 200px;
|
510 |
+
}
|
511 |
+
/*---------------------------------------------------------------------------------------------
|
512 |
+
*
|
513 |
+
* Select2 (v3)
|
514 |
+
*
|
515 |
+
*---------------------------------------------------------------------------------------------*/
|
516 |
+
.select2-container.-acf {
|
517 |
+
/* open */
|
518 |
+
/* single open */
|
519 |
+
}
|
520 |
+
.select2-container.-acf .select2-choices {
|
521 |
+
background: #fff;
|
522 |
+
border-color: #ddd;
|
523 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset;
|
524 |
+
min-height: 31px;
|
525 |
+
}
|
526 |
+
.select2-container.-acf .select2-choices .select2-search-choice {
|
527 |
+
margin: 5px 0 5px 5px;
|
528 |
+
padding: 3px 5px 3px 18px;
|
529 |
+
border-color: #bbb;
|
530 |
+
background: #f9f9f9;
|
531 |
+
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
|
532 |
+
/* sortable item*/
|
533 |
+
/* sortable shadow */
|
534 |
+
}
|
535 |
+
.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-helper {
|
536 |
+
background: #5897fb;
|
537 |
+
border-color: #3f87fa;
|
538 |
+
color: #fff;
|
539 |
+
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
|
540 |
+
}
|
541 |
+
.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-helper a {
|
542 |
+
visibility: hidden;
|
543 |
+
}
|
544 |
+
.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-placeholder {
|
545 |
+
background-color: #f7f7f7;
|
546 |
+
border-color: #f7f7f7;
|
547 |
+
visibility: visible !important;
|
548 |
+
}
|
549 |
+
.select2-container.-acf .select2-choices .select2-search-choice-focus {
|
550 |
+
border-color: #999;
|
551 |
+
}
|
552 |
+
.select2-container.-acf .select2-choices .select2-search-field input {
|
553 |
+
height: 31px;
|
554 |
+
line-height: 22px;
|
555 |
+
margin: 0;
|
556 |
+
padding: 5px 5px 5px 7px;
|
557 |
+
}
|
558 |
+
.select2-container.-acf .select2-choice {
|
559 |
+
border-color: #BBBBBB;
|
560 |
+
}
|
561 |
+
.select2-container.-acf .select2-choice .select2-arrow {
|
562 |
+
background: transparent;
|
563 |
+
border-left-color: #DFDFDF;
|
564 |
+
padding-left: 1px;
|
565 |
+
}
|
566 |
+
.select2-container.-acf .select2-choice .select2-result-description {
|
567 |
+
display: none;
|
568 |
+
}
|
569 |
+
.select2-container.-acf.select2-container-active .select2-choices,
|
570 |
+
.select2-container.-acf.select2-dropdown-open .select2-choices {
|
571 |
+
border-color: #5B9DD9;
|
572 |
+
border-radius: 3px 3px 0 0;
|
573 |
+
}
|
574 |
+
.select2-container.-acf.select2-dropdown-open .select2-choice {
|
575 |
+
background: #fff;
|
576 |
+
border-color: #5B9DD9;
|
577 |
+
}
|
578 |
+
/* rtl */
|
579 |
+
html[dir="rtl"] .select2-container.-acf .select2-search-choice-close {
|
580 |
+
left: 24px;
|
581 |
+
}
|
582 |
+
html[dir="rtl"] .select2-container.-acf .select2-choice > .select2-chosen {
|
583 |
+
margin-left: 42px;
|
584 |
+
}
|
585 |
+
html[dir="rtl"] .select2-container.-acf .select2-choice .select2-arrow {
|
586 |
+
padding-left: 0;
|
587 |
+
padding-right: 1px;
|
588 |
+
}
|
589 |
+
/* description */
|
590 |
+
.select2-drop {
|
591 |
+
/* search*/
|
592 |
+
/* result */
|
593 |
+
}
|
594 |
+
.select2-drop .select2-search {
|
595 |
+
padding: 4px 4px 0;
|
596 |
+
}
|
597 |
+
.select2-drop .select2-result {
|
598 |
+
/* hover*/
|
599 |
+
}
|
600 |
+
.select2-drop .select2-result .select2-result-description {
|
601 |
+
color: #999;
|
602 |
+
font-size: 12px;
|
603 |
+
margin-left: 5px;
|
604 |
+
}
|
605 |
+
.select2-drop .select2-result.select2-highlighted .select2-result-description {
|
606 |
+
color: #fff;
|
607 |
+
opacity: 0.75;
|
608 |
+
}
|
609 |
+
/*---------------------------------------------------------------------------------------------
|
610 |
+
*
|
611 |
+
* Select2 (v4)
|
612 |
+
*
|
613 |
+
*---------------------------------------------------------------------------------------------*/
|
614 |
+
.select2-container.-acf li {
|
615 |
+
margin-bottom: 0;
|
616 |
+
}
|
617 |
+
.select2-container--default.-acf .select2-selection--multiple {
|
618 |
+
/* multiple choice item */
|
619 |
+
}
|
620 |
+
.select2-container--default.-acf .select2-selection--multiple .select2-search--inline:first-child {
|
621 |
+
float: none;
|
622 |
+
}
|
623 |
+
.select2-container--default.-acf .select2-selection--multiple .select2-search--inline:first-child input {
|
624 |
+
width: 100% !important;
|
625 |
+
}
|
626 |
+
.select2-container--default.-acf .select2-selection--multiple .select2-selection__choice {
|
627 |
+
background-color: #f7f7f7;
|
628 |
+
border-color: #cccccc;
|
629 |
+
/* sortable item*/
|
630 |
+
/* sortable shadow */
|
631 |
+
}
|
632 |
+
.select2-container--default.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-helper {
|
633 |
+
background: #5897fb;
|
634 |
+
border-color: #3f87fa;
|
635 |
+
color: #fff;
|
636 |
+
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
|
637 |
+
}
|
638 |
+
.select2-container--default.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-helper span {
|
639 |
+
visibility: hidden;
|
640 |
+
}
|
641 |
+
.select2-container--default.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-placeholder {
|
642 |
+
background-color: #f7f7f7;
|
643 |
+
border-color: #f7f7f7;
|
644 |
+
visibility: visible !important;
|
645 |
+
}
|
646 |
+
.select2-container .select2-dropdown {
|
647 |
+
z-index: 900000;
|
648 |
+
}
|
649 |
+
/*---------------------------------------------------------------------------------------------
|
650 |
+
*
|
651 |
+
* Link
|
652 |
+
*
|
653 |
+
*---------------------------------------------------------------------------------------------*/
|
654 |
+
.link-wrap {
|
655 |
+
border: #dddddd solid 1px;
|
656 |
+
border-radius: 3px;
|
657 |
+
padding: 5px;
|
658 |
+
line-height: 26px;
|
659 |
+
background: #fff;
|
660 |
+
word-wrap: break-word;
|
661 |
+
word-break: break-all;
|
662 |
+
}
|
663 |
+
.link-wrap .link-title {
|
664 |
+
padding: 0 5px;
|
665 |
+
}
|
666 |
+
.acf-link {
|
667 |
+
/* value */
|
668 |
+
/* external */
|
669 |
+
}
|
670 |
+
.acf-link .link-wrap,
|
671 |
+
.acf-link .acf-icon.-link-ext {
|
672 |
+
display: none;
|
673 |
+
}
|
674 |
+
.acf-link.-value .button {
|
675 |
+
display: none;
|
676 |
+
}
|
677 |
+
.acf-link.-value .link-wrap {
|
678 |
+
display: inline-block;
|
679 |
+
}
|
680 |
+
.acf-link.-external .acf-icon.-link-ext {
|
681 |
+
display: inline-block;
|
682 |
+
}
|
683 |
+
#wp-link-backdrop {
|
684 |
+
z-index: 900000 !important;
|
685 |
+
}
|
686 |
+
#wp-link-wrap {
|
687 |
+
z-index: 900001 !important;
|
688 |
+
}
|
689 |
+
/*---------------------------------------------------------------------------------------------
|
690 |
+
*
|
691 |
+
* Radio
|
692 |
+
*
|
693 |
+
*---------------------------------------------------------------------------------------------*/
|
694 |
+
ul.acf-radio-list,
|
695 |
+
ul.acf-checkbox-list {
|
696 |
+
background: transparent;
|
697 |
+
position: relative;
|
698 |
+
padding: 1px;
|
699 |
+
margin: 0;
|
700 |
+
/* hl */
|
701 |
+
/* rtl */
|
702 |
+
}
|
703 |
+
ul.acf-radio-list li,
|
704 |
+
ul.acf-checkbox-list li {
|
705 |
+
font-size: 13px;
|
706 |
+
line-height: 22px;
|
707 |
+
margin: 0;
|
708 |
+
position: relative;
|
709 |
+
word-wrap: break-word;
|
710 |
+
/* attachment sidebar fix*/
|
711 |
+
}
|
712 |
+
ul.acf-radio-list li label,
|
713 |
+
ul.acf-checkbox-list li label {
|
714 |
+
display: inline;
|
715 |
+
}
|
716 |
+
ul.acf-radio-list li input[type="checkbox"],
|
717 |
+
ul.acf-checkbox-list li input[type="checkbox"],
|
718 |
+
ul.acf-radio-list li input[type="radio"],
|
719 |
+
ul.acf-checkbox-list li input[type="radio"] {
|
720 |
+
margin: -1px 4px 0 0;
|
721 |
+
vertical-align: middle;
|
722 |
+
}
|
723 |
+
ul.acf-radio-list li input[type="text"],
|
724 |
+
ul.acf-checkbox-list li input[type="text"] {
|
725 |
+
width: auto;
|
726 |
+
vertical-align: middle;
|
727 |
+
margin: 2px 0;
|
728 |
+
}
|
729 |
+
ul.acf-radio-list li span,
|
730 |
+
ul.acf-checkbox-list li span {
|
731 |
+
float: none;
|
732 |
+
}
|
733 |
+
ul.acf-radio-list li i,
|
734 |
+
ul.acf-checkbox-list li i {
|
735 |
+
vertical-align: middle;
|
736 |
+
}
|
737 |
+
ul.acf-radio-list.acf-hl li,
|
738 |
+
ul.acf-checkbox-list.acf-hl li {
|
739 |
+
margin-right: 20px;
|
740 |
+
clear: none;
|
741 |
+
}
|
742 |
+
html[dir="rtl"] ul.acf-radio-list input[type="checkbox"],
|
743 |
+
html[dir="rtl"] ul.acf-checkbox-list input[type="checkbox"],
|
744 |
+
html[dir="rtl"] ul.acf-radio-list input[type="radio"],
|
745 |
+
html[dir="rtl"] ul.acf-checkbox-list input[type="radio"] {
|
746 |
+
margin-left: 4px;
|
747 |
+
margin-right: 0;
|
748 |
+
}
|
749 |
+
/*---------------------------------------------------------------------------------------------
|
750 |
+
*
|
751 |
+
* Button Group
|
752 |
+
*
|
753 |
+
*---------------------------------------------------------------------------------------------*/
|
754 |
+
.acf-button-group {
|
755 |
+
display: inline-block;
|
756 |
+
/* default (horizontal) */
|
757 |
+
padding-left: 1px;
|
758 |
+
display: inline-flex;
|
759 |
+
flex-direction: row;
|
760 |
+
flex-wrap: nowrap;
|
761 |
+
/* vertical */
|
762 |
+
}
|
763 |
+
.acf-button-group label {
|
764 |
+
display: inline-block;
|
765 |
+
border: #ccc solid 1px;
|
766 |
+
position: relative;
|
767 |
+
z-index: 1;
|
768 |
+
padding: 5px 10px;
|
769 |
+
background: #fff;
|
770 |
+
}
|
771 |
+
.acf-button-group label:hover {
|
772 |
+
border-color: #999999;
|
773 |
+
z-index: 2;
|
774 |
+
}
|
775 |
+
.acf-button-group label.selected {
|
776 |
+
border-color: #2b9af3;
|
777 |
+
background: #309cf3;
|
778 |
+
color: #fff;
|
779 |
+
z-index: 2;
|
780 |
+
}
|
781 |
+
.acf-button-group label.selected:hover {
|
782 |
+
background: #48a8f4;
|
783 |
+
}
|
784 |
+
.acf-button-group input {
|
785 |
+
display: none !important;
|
786 |
+
}
|
787 |
+
.acf-button-group label {
|
788 |
+
margin: 0 0 0 -1px;
|
789 |
+
flex: 1;
|
790 |
+
text-align: center;
|
791 |
+
white-space: nowrap;
|
792 |
+
}
|
793 |
+
.acf-button-group label:first-child {
|
794 |
+
border-radius: 3px 0 0 3px;
|
795 |
+
}
|
796 |
+
html[dir="rtl"] .acf-button-group label:first-child {
|
797 |
+
border-radius: 0 3px 3px 0;
|
798 |
+
}
|
799 |
+
.acf-button-group label:last-child {
|
800 |
+
border-radius: 0 3px 3px 0;
|
801 |
+
}
|
802 |
+
html[dir="rtl"] .acf-button-group label:last-child {
|
803 |
+
border-radius: 3px 0 0 3px;
|
804 |
+
}
|
805 |
+
.acf-button-group label:only-child {
|
806 |
+
border-radius: 3px;
|
807 |
+
}
|
808 |
+
.acf-button-group.-vertical {
|
809 |
+
padding-left: 0;
|
810 |
+
padding-top: 1px;
|
811 |
+
flex-direction: column;
|
812 |
+
}
|
813 |
+
.acf-button-group.-vertical label {
|
814 |
+
margin: -1px 0 0 0;
|
815 |
+
}
|
816 |
+
.acf-button-group.-vertical label:first-child {
|
817 |
+
border-radius: 3px 3px 0 0;
|
818 |
+
}
|
819 |
+
.acf-button-group.-vertical label:last-child {
|
820 |
+
border-radius: 0 0 3px 3px;
|
821 |
+
}
|
822 |
+
.acf-button-group.-vertical label:only-child {
|
823 |
+
border-radius: 3px;
|
824 |
+
}
|
825 |
+
/*---------------------------------------------------------------------------------------------
|
826 |
+
*
|
827 |
+
* Checkbox
|
828 |
+
*
|
829 |
+
*---------------------------------------------------------------------------------------------*/
|
830 |
+
.acf-checkbox-list .button {
|
831 |
+
margin: 10px 0 0;
|
832 |
+
}
|
833 |
+
/*---------------------------------------------------------------------------------------------
|
834 |
+
*
|
835 |
+
* True / False
|
836 |
+
*
|
837 |
+
*---------------------------------------------------------------------------------------------*/
|
838 |
+
.acf-switch {
|
839 |
+
display: inline-block;
|
840 |
+
border-radius: 5px;
|
841 |
+
cursor: pointer;
|
842 |
+
position: relative;
|
843 |
+
background: #f8f8f8;
|
844 |
+
height: 30px;
|
845 |
+
vertical-align: middle;
|
846 |
+
border: #ccc solid 1px;
|
847 |
+
-webkit-transition: background 0.25s ease;
|
848 |
+
-moz-transition: background 0.25s ease;
|
849 |
+
-o-transition: background 0.25s ease;
|
850 |
+
transition: background 0.25s ease;
|
851 |
+
/* hover */
|
852 |
+
/* active */
|
853 |
+
/* focus */
|
854 |
+
/* message */
|
855 |
+
}
|
856 |
+
.acf-switch span {
|
857 |
+
display: inline-block;
|
858 |
+
float: left;
|
859 |
+
text-align: center;
|
860 |
+
font-size: 13px;
|
861 |
+
line-height: 22px;
|
862 |
+
padding: 4px 10px;
|
863 |
+
min-width: 15px;
|
864 |
+
}
|
865 |
+
.acf-switch span i {
|
866 |
+
vertical-align: middle;
|
867 |
+
}
|
868 |
+
.acf-switch .acf-switch-on {
|
869 |
+
color: #fff;
|
870 |
+
text-shadow: #1f7db1 0 1px 0;
|
871 |
+
}
|
872 |
+
.acf-switch .acf-switch-slider {
|
873 |
+
position: absolute;
|
874 |
+
top: 2px;
|
875 |
+
left: 2px;
|
876 |
+
bottom: 2px;
|
877 |
+
right: 50%;
|
878 |
+
z-index: 1;
|
879 |
+
background: #fff;
|
880 |
+
border-radius: 3px;
|
881 |
+
border: #ccc solid 1px;
|
882 |
+
-webkit-transition: all 0.25s ease;
|
883 |
+
-moz-transition: all 0.25s ease;
|
884 |
+
-o-transition: all 0.25s ease;
|
885 |
+
transition: all 0.25s ease;
|
886 |
+
transition-property: left, right;
|
887 |
+
}
|
888 |
+
.acf-switch:hover .acf-switch-slider {
|
889 |
+
border-color: #b3b3b3;
|
890 |
+
}
|
891 |
+
.acf-switch.-on {
|
892 |
+
background: #309cf3;
|
893 |
+
border-color: #2b9af3;
|
894 |
+
/* hover */
|
895 |
+
}
|
896 |
+
.acf-switch.-on .acf-switch-slider {
|
897 |
+
left: 50%;
|
898 |
+
right: 2px;
|
899 |
+
border-color: #0d84e3;
|
900 |
+
}
|
901 |
+
.acf-switch.-on:hover {
|
902 |
+
background: #48a8f4;
|
903 |
+
}
|
904 |
+
.acf-switch.-focus .acf-switch-slider {
|
905 |
+
border-color: #5b9dd9;
|
906 |
+
box-shadow: 0 0 2px rgba(30, 140, 190, 0.5);
|
907 |
+
}
|
908 |
+
.acf-switch.-focus.-on .acf-switch-slider {
|
909 |
+
border-color: #185e85;
|
910 |
+
box-shadow: 0 0 2px #1f7db1;
|
911 |
+
}
|
912 |
+
.acf-switch + span {
|
913 |
+
margin-left: 6px;
|
914 |
+
}
|
915 |
+
/* checkbox */
|
916 |
+
.acf-switch-input {
|
917 |
+
opacity: 0;
|
918 |
+
position: absolute;
|
919 |
+
margin: 0;
|
920 |
+
}
|
921 |
+
/* in media modal */
|
922 |
+
.compat-item .acf-true-false .message {
|
923 |
+
float: none;
|
924 |
+
padding: 0;
|
925 |
+
vertical-align: middle;
|
926 |
+
}
|
927 |
+
/*--------------------------------------------------------------------------
|
928 |
+
*
|
929 |
+
* Google Map
|
930 |
+
*
|
931 |
+
*-------------------------------------------------------------------------*/
|
932 |
+
.acf-google-map {
|
933 |
+
position: relative;
|
934 |
+
border: #DFDFDF solid 1px;
|
935 |
+
background: #fff;
|
936 |
+
/* default is focused */
|
937 |
+
/* -search */
|
938 |
+
/* -value */
|
939 |
+
/* -loading */
|
940 |
+
}
|
941 |
+
.acf-google-map .title {
|
942 |
+
position: relative;
|
943 |
+
border-bottom: #DFDFDF solid 1px;
|
944 |
+
}
|
945 |
+
.acf-google-map .title .search {
|
946 |
+
margin: 0;
|
947 |
+
font-size: 14px;
|
948 |
+
line-height: 30px;
|
949 |
+
height: 40px;
|
950 |
+
padding: 5px 10px;
|
951 |
+
border: 0 none;
|
952 |
+
box-shadow: none;
|
953 |
+
border-radius: 0;
|
954 |
+
font-family: inherit;
|
955 |
+
cursor: text;
|
956 |
+
}
|
957 |
+
.acf-google-map .title .acf-loading {
|
958 |
+
position: absolute;
|
959 |
+
top: 10px;
|
960 |
+
right: 11px;
|
961 |
+
display: none;
|
962 |
+
}
|
963 |
+
.acf-google-map .title:hover .acf-actions {
|
964 |
+
display: block;
|
965 |
+
}
|
966 |
+
.acf-google-map .canvas {
|
967 |
+
height: 400px;
|
968 |
+
}
|
969 |
+
.acf-google-map .title .acf-icon.-location {
|
970 |
+
display: inline-block;
|
971 |
+
}
|
972 |
+
.acf-google-map .title .acf-icon.-cancel {
|
973 |
+
display: none;
|
974 |
+
}
|
975 |
+
.acf-google-map .title .acf-icon.-search {
|
976 |
+
display: none;
|
977 |
+
}
|
978 |
+
.acf-google-map.-search .title .acf-icon.-location {
|
979 |
+
display: none;
|
980 |
+
}
|
981 |
+
.acf-google-map.-search .title .acf-icon.-cancel {
|
982 |
+
display: inline-block;
|
983 |
+
}
|
984 |
+
.acf-google-map.-search .title .acf-icon.-search {
|
985 |
+
display: inline-block;
|
986 |
+
}
|
987 |
+
.acf-google-map.-value .title .search {
|
988 |
+
font-weight: bold;
|
989 |
+
}
|
990 |
+
.acf-google-map.-value .title .acf-icon.-location {
|
991 |
+
display: none;
|
992 |
+
}
|
993 |
+
.acf-google-map.-value .title .acf-icon.-cancel {
|
994 |
+
display: inline-block;
|
995 |
+
}
|
996 |
+
.acf-google-map.-value .title .acf-icon.-search {
|
997 |
+
display: none;
|
998 |
+
}
|
999 |
+
.acf-google-map.-loading .title a {
|
1000 |
+
display: none !important;
|
1001 |
+
}
|
1002 |
+
.acf-google-map.-loading .title i {
|
1003 |
+
display: inline-block;
|
1004 |
+
}
|
1005 |
+
/* autocomplete */
|
1006 |
+
.pac-container {
|
1007 |
+
border-width: 1px 0;
|
1008 |
+
box-shadow: none;
|
1009 |
+
}
|
1010 |
+
.pac-container:after {
|
1011 |
+
display: none;
|
1012 |
+
}
|
1013 |
+
.pac-container .pac-item:first-child {
|
1014 |
+
border-top: 0 none;
|
1015 |
+
}
|
1016 |
+
.pac-container .pac-item {
|
1017 |
+
padding: 5px 10px;
|
1018 |
+
cursor: pointer;
|
1019 |
+
}
|
1020 |
+
html[dir="rtl"] .pac-container .pac-item {
|
1021 |
+
text-align: right;
|
1022 |
+
}
|
1023 |
+
/*--------------------------------------------------------------------------
|
1024 |
+
*
|
1025 |
+
* Relationship
|
1026 |
+
*
|
1027 |
+
*-------------------------------------------------------------------------*/
|
1028 |
+
.acf-relationship {
|
1029 |
+
background: #fff;
|
1030 |
+
/* filters (top) */
|
1031 |
+
/* list */
|
1032 |
+
/* selection (bottom) */
|
1033 |
+
}
|
1034 |
+
.acf-relationship .filters {
|
1035 |
+
border: #DFDFDF solid 1px;
|
1036 |
+
background: #fff;
|
1037 |
+
/* widths */
|
1038 |
+
}
|
1039 |
+
.acf-relationship .filters:after {
|
1040 |
+
clear: both;
|
1041 |
+
content: "";
|
1042 |
+
display: table;
|
1043 |
+
}
|
1044 |
+
.acf-relationship .filters .filter {
|
1045 |
+
margin: 0;
|
1046 |
+
padding: 0;
|
1047 |
+
float: left;
|
1048 |
+
width: 100%;
|
1049 |
+
/* inner padding */
|
1050 |
+
}
|
1051 |
+
.acf-relationship .filters .filter span {
|
1052 |
+
display: block;
|
1053 |
+
padding: 7px 7px 7px 0;
|
1054 |
+
}
|
1055 |
+
.acf-relationship .filters .filter:first-child span {
|
1056 |
+
padding-left: 7px;
|
1057 |
+
}
|
1058 |
+
.acf-relationship .filters .filter input,
|
1059 |
+
.acf-relationship .filters .filter select {
|
1060 |
+
height: 28px;
|
1061 |
+
line-height: 28px;
|
1062 |
+
padding: 2px;
|
1063 |
+
width: 100%;
|
1064 |
+
margin: 0;
|
1065 |
+
float: none;
|
1066 |
+
/* potential fix for media popup? */
|
1067 |
+
}
|
1068 |
+
.acf-relationship .filters .filter input:focus,
|
1069 |
+
.acf-relationship .filters .filter select:focus,
|
1070 |
+
.acf-relationship .filters .filter input:active,
|
1071 |
+
.acf-relationship .filters .filter select:active {
|
1072 |
+
outline: none;
|
1073 |
+
box-shadow: none;
|
1074 |
+
}
|
1075 |
+
.acf-relationship .filters .filter input {
|
1076 |
+
border-color: transparent;
|
1077 |
+
box-shadow: none;
|
1078 |
+
}
|
1079 |
+
.acf-relationship .filters.-f2 .filter {
|
1080 |
+
width: 50%;
|
1081 |
+
}
|
1082 |
+
.acf-relationship .filters.-f3 .filter {
|
1083 |
+
width: 25%;
|
1084 |
+
}
|
1085 |
+
.acf-relationship .filters.-f3 .filter.-search {
|
1086 |
+
width: 50%;
|
1087 |
+
}
|
1088 |
+
.acf-relationship .list {
|
1089 |
+
margin: 0;
|
1090 |
+
padding: 5px;
|
1091 |
+
height: 160px;
|
1092 |
+
overflow: auto;
|
1093 |
+
}
|
1094 |
+
.acf-relationship .list .acf-rel-label,
|
1095 |
+
.acf-relationship .list .acf-rel-item,
|
1096 |
+
.acf-relationship .list p {
|
1097 |
+
padding: 5px 7px;
|
1098 |
+
margin: 0;
|
1099 |
+
display: block;
|
1100 |
+
position: relative;
|
1101 |
+
min-height: 18px;
|
1102 |
+
}
|
1103 |
+
.acf-relationship .list .acf-rel-label {
|
1104 |
+
font-weight: bold;
|
1105 |
+
}
|
1106 |
+
.acf-relationship .list .acf-rel-item {
|
1107 |
+
cursor: pointer;
|
1108 |
+
/* hover */
|
1109 |
+
/* disabled */
|
1110 |
+
}
|
1111 |
+
.acf-relationship .list .acf-rel-item b {
|
1112 |
+
text-decoration: underline;
|
1113 |
+
font-weight: normal;
|
1114 |
+
}
|
1115 |
+
.acf-relationship .list .acf-rel-item .thumbnail {
|
1116 |
+
background: #e0e0e0;
|
1117 |
+
width: 22px;
|
1118 |
+
height: 22px;
|
1119 |
+
float: left;
|
1120 |
+
margin: -2px 5px 0 0;
|
1121 |
+
}
|
1122 |
+
.acf-relationship .list .acf-rel-item .thumbnail img {
|
1123 |
+
max-width: 22px;
|
1124 |
+
max-height: 22px;
|
1125 |
+
margin: 0 auto;
|
1126 |
+
display: block;
|
1127 |
+
}
|
1128 |
+
.acf-relationship .list .acf-rel-item .thumbnail.-icon {
|
1129 |
+
background: #fff;
|
1130 |
+
}
|
1131 |
+
.acf-relationship .list .acf-rel-item .thumbnail.-icon img {
|
1132 |
+
max-height: 20px;
|
1133 |
+
margin-top: 1px;
|
1134 |
+
}
|
1135 |
+
.acf-relationship .list .acf-rel-item:hover {
|
1136 |
+
background: #3875D7;
|
1137 |
+
color: #fff;
|
1138 |
+
}
|
1139 |
+
.acf-relationship .list .acf-rel-item:hover .thumbnail {
|
1140 |
+
background: #a2bfec;
|
1141 |
+
}
|
1142 |
+
.acf-relationship .list .acf-rel-item:hover .thumbnail.-icon {
|
1143 |
+
background: #fff;
|
1144 |
+
}
|
1145 |
+
.acf-relationship .list .acf-rel-item.disabled {
|
1146 |
+
opacity: 0.5;
|
1147 |
+
}
|
1148 |
+
.acf-relationship .list .acf-rel-item.disabled:hover {
|
1149 |
+
background: transparent;
|
1150 |
+
color: #333;
|
1151 |
+
cursor: default;
|
1152 |
+
}
|
1153 |
+
.acf-relationship .list .acf-rel-item.disabled:hover .thumbnail {
|
1154 |
+
background: #e0e0e0;
|
1155 |
+
}
|
1156 |
+
.acf-relationship .list .acf-rel-item.disabled:hover .thumbnail.-icon {
|
1157 |
+
background: #fff;
|
1158 |
+
}
|
1159 |
+
.acf-relationship .list ul {
|
1160 |
+
padding-bottom: 5px;
|
1161 |
+
}
|
1162 |
+
.acf-relationship .list ul .acf-rel-label,
|
1163 |
+
.acf-relationship .list ul .acf-rel-item,
|
1164 |
+
.acf-relationship .list ul p {
|
1165 |
+
padding-left: 20px;
|
1166 |
+
}
|
1167 |
+
.acf-relationship .selection {
|
1168 |
+
border: #DFDFDF solid 1px;
|
1169 |
+
position: relative;
|
1170 |
+
margin-top: -1px;
|
1171 |
+
/* choices */
|
1172 |
+
/* values */
|
1173 |
+
}
|
1174 |
+
.acf-relationship .selection:after {
|
1175 |
+
clear: both;
|
1176 |
+
content: "";
|
1177 |
+
display: table;
|
1178 |
+
}
|
1179 |
+
.acf-relationship .selection .values,
|
1180 |
+
.acf-relationship .selection .choices {
|
1181 |
+
width: 50%;
|
1182 |
+
background: #fff;
|
1183 |
+
float: left;
|
1184 |
+
}
|
1185 |
+
.acf-relationship .selection .choices {
|
1186 |
+
background: #F9F9F9;
|
1187 |
+
}
|
1188 |
+
.acf-relationship .selection .choices .list {
|
1189 |
+
border-right: #DFDFDF solid 1px;
|
1190 |
+
}
|
1191 |
+
.acf-relationship .selection .values .acf-icon {
|
1192 |
+
position: absolute;
|
1193 |
+
top: 4px;
|
1194 |
+
right: 7px;
|
1195 |
+
display: none;
|
1196 |
+
/* rtl */
|
1197 |
+
}
|
1198 |
+
html[dir="rtl"] .acf-relationship .selection .values .acf-icon {
|
1199 |
+
right: auto;
|
1200 |
+
left: 7px;
|
1201 |
+
}
|
1202 |
+
.acf-relationship .selection .values .acf-rel-item:hover .acf-icon {
|
1203 |
+
display: block;
|
1204 |
+
}
|
1205 |
+
.acf-relationship .selection .values .acf-rel-item {
|
1206 |
+
cursor: move;
|
1207 |
+
}
|
1208 |
+
.acf-relationship .selection .values .acf-rel-item b {
|
1209 |
+
text-decoration: none;
|
1210 |
+
}
|
1211 |
+
/* menu item fix */
|
1212 |
+
.menu-item .acf-relationship ul {
|
1213 |
+
width: auto;
|
1214 |
+
}
|
1215 |
+
.menu-item .acf-relationship li {
|
1216 |
+
display: block;
|
1217 |
+
}
|
1218 |
+
/*--------------------------------------------------------------------------
|
1219 |
+
*
|
1220 |
+
* WYSIWYG
|
1221 |
+
*
|
1222 |
+
*-------------------------------------------------------------------------*/
|
1223 |
+
.acf-editor-wrap {
|
1224 |
+
/* delay */
|
1225 |
+
}
|
1226 |
+
.acf-editor-wrap.delay .acf-editor-toolbar {
|
1227 |
+
content: "";
|
1228 |
+
display: block;
|
1229 |
+
background: #f5f5f5;
|
1230 |
+
border-bottom: #dddddd solid 1px;
|
1231 |
+
color: #555d66;
|
1232 |
+
padding: 10px;
|
1233 |
+
}
|
1234 |
+
.acf-editor-wrap.delay textarea {
|
1235 |
+
padding: 10px;
|
1236 |
+
}
|
1237 |
+
.acf-editor-wrap iframe {
|
1238 |
+
min-height: 200px;
|
1239 |
+
}
|
1240 |
+
.acf-editor-wrap .wp-editor-container {
|
1241 |
+
border: 1px solid #E5E5E5;
|
1242 |
+
box-shadow: none;
|
1243 |
+
}
|
1244 |
+
#mce_fullscreen_container {
|
1245 |
+
z-index: 900000 !important;
|
1246 |
+
}
|
1247 |
+
/* WP < 4.1 */
|
1248 |
+
.acf-editor-wrap .wp-switch-editor {
|
1249 |
+
float: left;
|
1250 |
+
-moz-box-sizing: content-box;
|
1251 |
+
-webkit-box-sizing: content-box;
|
1252 |
+
box-sizing: content-box;
|
1253 |
+
}
|
1254 |
+
.acf-editor-wrap.tmce-active .wp-editor-area {
|
1255 |
+
color: #333 !important;
|
1256 |
+
}
|
1257 |
+
/*---------------------------------------------------------------------------------------------
|
1258 |
+
*
|
1259 |
+
* Tab
|
1260 |
+
*
|
1261 |
+
*---------------------------------------------------------------------------------------------*/
|
1262 |
+
.acf-field-tab {
|
1263 |
+
display: none !important;
|
1264 |
+
}
|
1265 |
+
.hidden-by-tab {
|
1266 |
+
display: none !important;
|
1267 |
+
}
|
1268 |
+
.acf-tab-wrap {
|
1269 |
+
clear: both;
|
1270 |
+
z-index: 1;
|
1271 |
+
}
|
1272 |
+
.acf-tab-group {
|
1273 |
+
border-bottom: #ccc solid 1px;
|
1274 |
+
padding: 10px 10px 0;
|
1275 |
+
}
|
1276 |
+
.acf-tab-group li {
|
1277 |
+
margin: 0 0.5em 0 0;
|
1278 |
+
}
|
1279 |
+
.acf-tab-group li a {
|
1280 |
+
padding: 5px 10px;
|
1281 |
+
display: block;
|
1282 |
+
color: #555;
|
1283 |
+
font-size: 14px;
|
1284 |
+
font-weight: 600;
|
1285 |
+
line-height: 24px;
|
1286 |
+
border: #ccc solid 1px;
|
1287 |
+
border-bottom: 0 none;
|
1288 |
+
text-decoration: none;
|
1289 |
+
background: #e5e5e5;
|
1290 |
+
transition: none;
|
1291 |
+
}
|
1292 |
+
.acf-tab-group li a:hover {
|
1293 |
+
background: #FFF;
|
1294 |
+
}
|
1295 |
+
.acf-tab-group li a:focus {
|
1296 |
+
outline: none;
|
1297 |
+
box-shadow: none;
|
1298 |
+
}
|
1299 |
+
.acf-tab-group li a:empty {
|
1300 |
+
display: none;
|
1301 |
+
}
|
1302 |
+
html[dir="rtl"] .acf-tab-group li {
|
1303 |
+
margin: 0 0 0 0.5em;
|
1304 |
+
}
|
1305 |
+
.acf-tab-group li.active a {
|
1306 |
+
background: #F1F1F1;
|
1307 |
+
color: #000;
|
1308 |
+
padding-bottom: 6px;
|
1309 |
+
margin-bottom: -1px;
|
1310 |
+
position: relative;
|
1311 |
+
z-index: 1;
|
1312 |
+
}
|
1313 |
+
.acf-fields > .acf-tab-wrap {
|
1314 |
+
background: #F9F9F9;
|
1315 |
+
}
|
1316 |
+
.acf-fields > .acf-tab-wrap .acf-tab-group {
|
1317 |
+
position: relative;
|
1318 |
+
z-index: 1;
|
1319 |
+
margin-bottom: -1px;
|
1320 |
+
border-top: #DFDFDF solid 1px;
|
1321 |
+
border-bottom: #DFDFDF solid 1px;
|
1322 |
+
}
|
1323 |
+
.acf-fields > .acf-tab-wrap .acf-tab-group li a {
|
1324 |
+
background: #f1f1f1;
|
1325 |
+
}
|
1326 |
+
.acf-fields > .acf-tab-wrap .acf-tab-group li a:hover {
|
1327 |
+
background: #FFF;
|
1328 |
+
}
|
1329 |
+
.acf-fields > .acf-tab-wrap .acf-tab-group li.active a {
|
1330 |
+
background: #FFFFFF;
|
1331 |
+
}
|
1332 |
+
.acf-fields > .acf-tab-wrap:first-child .acf-tab-group {
|
1333 |
+
border-top: none;
|
1334 |
+
}
|
1335 |
+
.acf-fields.-left > .acf-tab-wrap .acf-tab-group {
|
1336 |
+
padding-left: 20%;
|
1337 |
+
/* mobile */
|
1338 |
+
/* rtl */
|
1339 |
+
}
|
1340 |
+
@media screen and (max-width: 640px) {
|
1341 |
+
.acf-fields.-left > .acf-tab-wrap .acf-tab-group {
|
1342 |
+
padding-left: 10px;
|
1343 |
+
}
|
1344 |
+
}
|
1345 |
+
html[dir="rtl"] .acf-fields.-left > .acf-tab-wrap .acf-tab-group {
|
1346 |
+
padding-left: 0;
|
1347 |
+
padding-right: 20%;
|
1348 |
+
/* mobile */
|
1349 |
+
}
|
1350 |
+
@media screen and (max-width: 850px) {
|
1351 |
+
html[dir="rtl"] .acf-fields.-left > .acf-tab-wrap .acf-tab-group {
|
1352 |
+
padding-right: 10px;
|
1353 |
+
}
|
1354 |
+
}
|
1355 |
+
.acf-tab-wrap.-left .acf-tab-group {
|
1356 |
+
position: absolute;
|
1357 |
+
left: 0;
|
1358 |
+
width: 20%;
|
1359 |
+
border: 0 none;
|
1360 |
+
padding: 0 !important;
|
1361 |
+
/* important overrides 'left aligned labels' */
|
1362 |
+
margin: 1px 0 0;
|
1363 |
+
}
|
1364 |
+
.acf-tab-wrap.-left .acf-tab-group li {
|
1365 |
+
float: none;
|
1366 |
+
margin: -1px 0 0;
|
1367 |
+
}
|
1368 |
+
.acf-tab-wrap.-left .acf-tab-group li a {
|
1369 |
+
border: 1px solid #ededed;
|
1370 |
+
font-size: 13px;
|
1371 |
+
line-height: 18px;
|
1372 |
+
color: #0073aa;
|
1373 |
+
padding: 10px;
|
1374 |
+
margin: 0;
|
1375 |
+
font-weight: normal;
|
1376 |
+
border-width: 1px 0;
|
1377 |
+
border-radius: 0;
|
1378 |
+
background: transparent;
|
1379 |
+
}
|
1380 |
+
.acf-tab-wrap.-left .acf-tab-group li a:hover {
|
1381 |
+
color: #00a0d2;
|
1382 |
+
}
|
1383 |
+
.acf-tab-wrap.-left .acf-tab-group li.active a {
|
1384 |
+
border-color: #DFDFDF;
|
1385 |
+
color: #000;
|
1386 |
+
margin-right: -1px;
|
1387 |
+
background: #fff;
|
1388 |
+
}
|
1389 |
+
html[dir="rtl"] .acf-tab-wrap.-left .acf-tab-group {
|
1390 |
+
left: auto;
|
1391 |
+
right: 0;
|
1392 |
+
}
|
1393 |
+
html[dir="rtl"] .acf-tab-wrap.-left .acf-tab-group li.active a {
|
1394 |
+
margin-right: 0;
|
1395 |
+
margin-left: -1px;
|
1396 |
+
}
|
1397 |
+
.acf-field + .acf-tab-wrap.-left:before {
|
1398 |
+
content: "";
|
1399 |
+
display: block;
|
1400 |
+
position: relative;
|
1401 |
+
z-index: 1;
|
1402 |
+
height: 10px;
|
1403 |
+
border-top: #DFDFDF solid 1px;
|
1404 |
+
border-bottom: #DFDFDF solid 1px;
|
1405 |
+
margin-bottom: -1px;
|
1406 |
+
}
|
1407 |
+
.acf-tab-wrap.-left:first-child .acf-tab-group li:first-child a {
|
1408 |
+
border-top: none;
|
1409 |
+
}
|
1410 |
+
/* sidebar */
|
1411 |
+
.acf-fields.-sidebar {
|
1412 |
+
padding: 0 0 0 20% !important;
|
1413 |
+
position: relative;
|
1414 |
+
/* before */
|
1415 |
+
/* rtl */
|
1416 |
+
}
|
1417 |
+
.acf-fields.-sidebar:before {
|
1418 |
+
content: "";
|
1419 |
+
display: block;
|
1420 |
+
position: absolute;
|
1421 |
+
top: 0;
|
1422 |
+
left: 0;
|
1423 |
+
width: 20%;
|
1424 |
+
bottom: 0;
|
1425 |
+
border-right: #DFDFDF solid 1px;
|
1426 |
+
background: #F9F9F9;
|
1427 |
+
z-index: 1;
|
1428 |
+
}
|
1429 |
+
html[dir="rtl"] .acf-fields.-sidebar {
|
1430 |
+
padding: 0 20% 0 0 !important;
|
1431 |
+
}
|
1432 |
+
html[dir="rtl"] .acf-fields.-sidebar:before {
|
1433 |
+
border-left: #DFDFDF solid 1px;
|
1434 |
+
border-right-width: 0;
|
1435 |
+
left: auto;
|
1436 |
+
right: 0;
|
1437 |
+
}
|
1438 |
+
.acf-fields.-sidebar.-left {
|
1439 |
+
padding: 0 0 0 180px !important;
|
1440 |
+
/* rtl */
|
1441 |
+
}
|
1442 |
+
html[dir="rtl"] .acf-fields.-sidebar.-left {
|
1443 |
+
padding: 0 180px 0 0 !important;
|
1444 |
+
}
|
1445 |
+
.acf-fields.-sidebar.-left:before {
|
1446 |
+
background: #F1F1F1;
|
1447 |
+
border-color: #dfdfdf;
|
1448 |
+
width: 180px;
|
1449 |
+
}
|
1450 |
+
.acf-fields.-sidebar.-left > .acf-tab-wrap.-left .acf-tab-group {
|
1451 |
+
width: 180px;
|
1452 |
+
}
|
1453 |
+
.acf-fields.-sidebar.-left > .acf-tab-wrap.-left .acf-tab-group li a {
|
1454 |
+
border-color: #e4e4e4;
|
1455 |
+
}
|
1456 |
+
.acf-fields.-sidebar.-left > .acf-tab-wrap.-left .acf-tab-group li.active a {
|
1457 |
+
background: #F9F9F9;
|
1458 |
+
}
|
1459 |
+
.acf-fields.-sidebar > .acf-field-tab + .acf-field {
|
1460 |
+
border-top: none;
|
1461 |
+
}
|
1462 |
+
.acf-fields.-clear > .acf-tab-wrap {
|
1463 |
+
background: transparent;
|
1464 |
+
}
|
1465 |
+
.acf-fields.-clear > .acf-tab-wrap .acf-tab-group {
|
1466 |
+
margin-top: 0;
|
1467 |
+
border-top: none;
|
1468 |
+
padding-left: 0;
|
1469 |
+
padding-right: 0;
|
1470 |
+
}
|
1471 |
+
.acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a {
|
1472 |
+
background: #e5e5e5;
|
1473 |
+
}
|
1474 |
+
.acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a:hover {
|
1475 |
+
background: #fff;
|
1476 |
+
}
|
1477 |
+
.acf-fields.-clear > .acf-tab-wrap .acf-tab-group li.active a {
|
1478 |
+
background: #f1f1f1;
|
1479 |
+
}
|
1480 |
+
/* seamless */
|
1481 |
+
.acf-postbox.seamless > .acf-fields.-sidebar {
|
1482 |
+
margin-left: 0 !important;
|
1483 |
+
}
|
1484 |
+
.acf-postbox.seamless > .acf-fields.-sidebar:before {
|
1485 |
+
background: transparent;
|
1486 |
+
}
|
1487 |
+
.acf-postbox.seamless > .acf-fields > .acf-tab-wrap {
|
1488 |
+
background: transparent;
|
1489 |
+
margin-bottom: 10px;
|
1490 |
+
padding-left: 12px;
|
1491 |
+
padding-right: 12px;
|
1492 |
+
}
|
1493 |
+
.acf-postbox.seamless > .acf-fields > .acf-tab-wrap .acf-tab-group {
|
1494 |
+
border-top: 0 none;
|
1495 |
+
}
|
1496 |
+
.acf-postbox.seamless > .acf-fields > .acf-tab-wrap .acf-tab-group li a {
|
1497 |
+
background: #e5e5e5;
|
1498 |
+
}
|
1499 |
+
.acf-postbox.seamless > .acf-fields > .acf-tab-wrap .acf-tab-group li a:hover {
|
1500 |
+
background: #fff;
|
1501 |
+
}
|
1502 |
+
.acf-postbox.seamless > .acf-fields > .acf-tab-wrap .acf-tab-group li.active a {
|
1503 |
+
background: #f1f1f1;
|
1504 |
+
}
|
1505 |
+
.acf-postbox.seamless > .acf-fields > .acf-tab-wrap.-left:before {
|
1506 |
+
border-top: none;
|
1507 |
+
height: auto;
|
1508 |
+
}
|
1509 |
+
.acf-postbox.seamless > .acf-fields > .acf-tab-wrap.-left .acf-tab-group {
|
1510 |
+
margin-bottom: 0;
|
1511 |
+
}
|
1512 |
+
.acf-postbox.seamless > .acf-fields > .acf-tab-wrap.-left .acf-tab-group li a {
|
1513 |
+
border-width: 1px 0 1px 1px !important;
|
1514 |
+
border-color: #cccccc;
|
1515 |
+
background: #e5e5e5;
|
1516 |
+
}
|
1517 |
+
.acf-postbox.seamless > .acf-fields > .acf-tab-wrap.-left .acf-tab-group li.active a {
|
1518 |
+
background: #f1f1f1;
|
1519 |
+
}
|
1520 |
+
.menu-edit .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a,
|
1521 |
+
.widget .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a {
|
1522 |
+
background: #f1f1f1;
|
1523 |
+
}
|
1524 |
+
.menu-edit .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a:hover,
|
1525 |
+
.widget .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li a:hover,
|
1526 |
+
.menu-edit .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li.active a,
|
1527 |
+
.widget .acf-fields.-clear > .acf-tab-wrap .acf-tab-group li.active a {
|
1528 |
+
background: #fff;
|
1529 |
+
}
|
1530 |
+
.compat-item .acf-tab-wrap td {
|
1531 |
+
display: block;
|
1532 |
+
}
|
1533 |
+
/* within gallery sidebar */
|
1534 |
+
.acf-gallery-side .acf-tab-wrap {
|
1535 |
+
border-top: 0 none !important;
|
1536 |
+
}
|
1537 |
+
.acf-gallery-side .acf-tab-wrap .acf-tab-group {
|
1538 |
+
margin: 10px 0 !important;
|
1539 |
+
padding: 0 !important;
|
1540 |
+
}
|
1541 |
+
.acf-gallery-side .acf-tab-group li.active a {
|
1542 |
+
background: #F9F9F9 !important;
|
1543 |
+
}
|
1544 |
+
/* withing widget */
|
1545 |
+
.widget .acf-tab-group {
|
1546 |
+
border-bottom-color: #e8e8e8;
|
1547 |
+
}
|
1548 |
+
.widget .acf-tab-group li a {
|
1549 |
+
background: #F1F1F1;
|
1550 |
+
}
|
1551 |
+
.widget .acf-tab-group li.active a {
|
1552 |
+
background: #fff;
|
1553 |
+
}
|
1554 |
+
/* media popup (edit image) */
|
1555 |
+
.media-modal.acf-expanded .compat-attachment-fields > tbody > tr.acf-tab-wrap .acf-tab-group {
|
1556 |
+
padding-left: 23%;
|
1557 |
+
border-bottom-color: #DDDDDD;
|
1558 |
+
}
|
1559 |
+
/* table */
|
1560 |
+
.form-table > tbody > tr.acf-tab-wrap .acf-tab-group {
|
1561 |
+
padding: 0 5px 0 210px;
|
1562 |
+
}
|
1563 |
+
/* rtl */
|
1564 |
+
html[dir="rtl"] .form-table > tbody > tr.acf-tab-wrap .acf-tab-group {
|
1565 |
+
padding: 0 210px 0 5px;
|
1566 |
+
}
|
1567 |
+
/*--------------------------------------------------------------------------------------------
|
1568 |
+
*
|
1569 |
+
* oembed
|
1570 |
+
*
|
1571 |
+
*--------------------------------------------------------------------------------------------*/
|
1572 |
+
.acf-oembed {
|
1573 |
+
position: relative;
|
1574 |
+
border: #DFDFDF solid 1px;
|
1575 |
+
background: #fff;
|
1576 |
+
}
|
1577 |
+
.acf-oembed .title {
|
1578 |
+
position: relative;
|
1579 |
+
border-bottom: #DFDFDF solid 1px;
|
1580 |
+
padding: 5px 10px;
|
1581 |
+
}
|
1582 |
+
.acf-oembed .title .input-search {
|
1583 |
+
margin: 0;
|
1584 |
+
font-size: 14px;
|
1585 |
+
line-height: 30px;
|
1586 |
+
height: 30px;
|
1587 |
+
padding: 0;
|
1588 |
+
border: 0 none;
|
1589 |
+
box-shadow: none;
|
1590 |
+
border-radius: 0;
|
1591 |
+
font-family: inherit;
|
1592 |
+
cursor: text;
|
1593 |
+
}
|
1594 |
+
.acf-oembed .title .acf-actions {
|
1595 |
+
padding: 6px;
|
1596 |
+
}
|
1597 |
+
.acf-oembed .canvas {
|
1598 |
+
position: relative;
|
1599 |
+
min-height: 250px;
|
1600 |
+
background: #F9F9F9;
|
1601 |
+
}
|
1602 |
+
.acf-oembed .canvas .canvas-media {
|
1603 |
+
position: relative;
|
1604 |
+
z-index: 1;
|
1605 |
+
}
|
1606 |
+
.acf-oembed .canvas iframe {
|
1607 |
+
display: block;
|
1608 |
+
margin: 0;
|
1609 |
+
padding: 0;
|
1610 |
+
width: 100%;
|
1611 |
+
}
|
1612 |
+
.acf-oembed .canvas .acf-icon.-picture {
|
1613 |
+
position: absolute;
|
1614 |
+
top: 50%;
|
1615 |
+
left: 50%;
|
1616 |
+
transform: translate(-50%, -50%);
|
1617 |
+
z-index: 0;
|
1618 |
+
height: 42px;
|
1619 |
+
width: 42px;
|
1620 |
+
font-size: 42px;
|
1621 |
+
color: #999;
|
1622 |
+
}
|
1623 |
+
.acf-oembed .canvas .acf-loading-overlay {
|
1624 |
+
background: rgba(255, 255, 255, 0.9);
|
1625 |
+
}
|
1626 |
+
.acf-oembed .canvas .canvas-error {
|
1627 |
+
position: absolute;
|
1628 |
+
top: 50%;
|
1629 |
+
left: 0%;
|
1630 |
+
right: 0%;
|
1631 |
+
margin: -9px 0 0 0;
|
1632 |
+
text-align: center;
|
1633 |
+
display: none;
|
1634 |
+
}
|
1635 |
+
.acf-oembed .canvas .canvas-error p {
|
1636 |
+
padding: 8px;
|
1637 |
+
margin: 0;
|
1638 |
+
display: inline;
|
1639 |
+
}
|
1640 |
+
.acf-oembed.has-value .canvas {
|
1641 |
+
min-height: 50;
|
1642 |
+
}
|
1643 |
+
.acf-oembed.has-value .input-search {
|
1644 |
+
font-weight: bold;
|
1645 |
+
}
|
1646 |
+
.acf-oembed.has-value .title:hover .acf-actions {
|
1647 |
+
display: block;
|
1648 |
+
}
|
1649 |
+
/*--------------------------------------------------------------------------------------------
|
1650 |
+
*
|
1651 |
+
* Image
|
1652 |
+
*
|
1653 |
+
*--------------------------------------------------------------------------------------------*/
|
1654 |
+
.acf-image-uploader {
|
1655 |
+
position: relative;
|
1656 |
+
/* image wrap*/
|
1657 |
+
/* input */
|
1658 |
+
/* rtl */
|
1659 |
+
}
|
1660 |
+
.acf-image-uploader:after {
|
1661 |
+
clear: both;
|
1662 |
+
content: "";
|
1663 |
+
display: table;
|
1664 |
+
}
|
1665 |
+
.acf-image-uploader p {
|
1666 |
+
margin: 0;
|
1667 |
+
}
|
1668 |
+
.acf-image-uploader .image-wrap {
|
1669 |
+
position: relative;
|
1670 |
+
float: left;
|
1671 |
+
/* hover */
|
1672 |
+
}
|
1673 |
+
.acf-image-uploader .image-wrap img {
|
1674 |
+
max-width: 100%;
|
1675 |
+
width: auto;
|
1676 |
+
height: auto;
|
1677 |
+
display: block;
|
1678 |
+
min-width: 30px;
|
1679 |
+
min-height: 30px;
|
1680 |
+
background: #f1f1f1;
|
1681 |
+
margin: 0;
|
1682 |
+
padding: 0;
|
1683 |
+
/* svg */
|
1684 |
+
}
|
1685 |
+
.acf-image-uploader .image-wrap img[src$=".svg"] {
|
1686 |
+
min-height: 100px;
|
1687 |
+
min-width: 100px;
|
1688 |
+
}
|
1689 |
+
.acf-image-uploader .image-wrap:hover .acf-actions {
|
1690 |
+
display: block;
|
1691 |
+
}
|
1692 |
+
.acf-image-uploader input.button {
|
1693 |
+
width: auto;
|
1694 |
+
}
|
1695 |
+
html[dir="rtl"] .acf-image-uploader .image-wrap {
|
1696 |
+
float: right;
|
1697 |
+
}
|
1698 |
+
/*--------------------------------------------------------------------------------------------
|
1699 |
+
*
|
1700 |
+
* File
|
1701 |
+
*
|
1702 |
+
*--------------------------------------------------------------------------------------------*/
|
1703 |
+
.acf-file-uploader {
|
1704 |
+
position: relative;
|
1705 |
+
/* hover */
|
1706 |
+
/* rtl */
|
1707 |
+
}
|
1708 |
+
.acf-file-uploader p {
|
1709 |
+
margin: 0;
|
1710 |
+
}
|
1711 |
+
.acf-file-uploader .file-wrap {
|
1712 |
+
border: #DFDFDF solid 1px;
|
1713 |
+
min-height: 84px;
|
1714 |
+
position: relative;
|
1715 |
+
background: #fff;
|
1716 |
+
}
|
1717 |
+
.acf-file-uploader .file-icon {
|
1718 |
+
position: absolute;
|
1719 |
+
top: 0;
|
1720 |
+
left: 0;
|
1721 |
+
bottom: 0;
|
1722 |
+
padding: 10px;
|
1723 |
+
background: #F1F1F1;
|
1724 |
+
border-right: #E5E5E5 solid 1px;
|
1725 |
+
}
|
1726 |
+
.acf-file-uploader .file-icon img {
|
1727 |
+
display: block;
|
1728 |
+
padding: 0;
|
1729 |
+
margin: 0;
|
1730 |
+
max-width: 48px;
|
1731 |
+
}
|
1732 |
+
.acf-file-uploader .file-info {
|
1733 |
+
padding: 10px;
|
1734 |
+
margin-left: 69px;
|
1735 |
+
}
|
1736 |
+
.acf-file-uploader .file-info p {
|
1737 |
+
margin: 0 0 2px;
|
1738 |
+
font-size: 13px;
|
1739 |
+
line-height: 1.4em;
|
1740 |
+
word-break: break-all;
|
1741 |
+
}
|
1742 |
+
.acf-file-uploader .file-info a {
|
1743 |
+
text-decoration: none;
|
1744 |
+
}
|
1745 |
+
.acf-file-uploader:hover .acf-actions {
|
1746 |
+
display: block;
|
1747 |
+
}
|
1748 |
+
html[dir="rtl"] .acf-file-uploader .file-icon {
|
1749 |
+
left: auto;
|
1750 |
+
right: 0;
|
1751 |
+
border-left: #E5E5E5 solid 1px;
|
1752 |
+
border-right: none;
|
1753 |
+
}
|
1754 |
+
html[dir="rtl"] .acf-file-uploader .file-info {
|
1755 |
+
margin-right: 69px;
|
1756 |
+
margin-left: 0;
|
1757 |
+
}
|
1758 |
+
/*---------------------------------------------------------------------------------------------
|
1759 |
+
*
|
1760 |
+
* Date Picker
|
1761 |
+
*
|
1762 |
+
*---------------------------------------------------------------------------------------------*/
|
1763 |
+
.acf-ui-datepicker .ui-datepicker {
|
1764 |
+
z-index: 900000 !important;
|
1765 |
+
}
|
1766 |
+
.acf-ui-datepicker .ui-datepicker .ui-widget-header a {
|
1767 |
+
cursor: pointer;
|
1768 |
+
transition: none;
|
1769 |
+
}
|
1770 |
+
/* fix highlight state overriding hover / active */
|
1771 |
+
.acf-ui-datepicker .ui-state-highlight.ui-state-hover {
|
1772 |
+
border: 1px solid #98b7e8 !important;
|
1773 |
+
background: #98b7e8 !important;
|
1774 |
+
font-weight: normal !important;
|
1775 |
+
color: #ffffff !important;
|
1776 |
+
}
|
1777 |
+
.acf-ui-datepicker .ui-state-highlight.ui-state-active {
|
1778 |
+
border: 1px solid #3875d7 !important;
|
1779 |
+
background: #3875d7 !important;
|
1780 |
+
font-weight: normal !important;
|
1781 |
+
color: #ffffff !important;
|
1782 |
+
}
|
1783 |
+
/*---------------------------------------------------------------------------------------------
|
1784 |
+
*
|
1785 |
+
* Separator field
|
1786 |
+
*
|
1787 |
+
*---------------------------------------------------------------------------------------------*/
|
1788 |
+
.acf-field-separator {
|
1789 |
+
/* fields */
|
1790 |
+
}
|
1791 |
+
.acf-field-separator .acf-label {
|
1792 |
+
margin-bottom: 0;
|
1793 |
+
}
|
1794 |
+
.acf-field-separator .acf-label label {
|
1795 |
+
font-weight: normal;
|
1796 |
+
}
|
1797 |
+
.acf-field-separator .acf-input {
|
1798 |
+
display: none;
|
1799 |
+
}
|
1800 |
+
.acf-fields > .acf-field-separator {
|
1801 |
+
background: #f9f9f9;
|
1802 |
+
border-bottom: 1px solid #dfdfdf;
|
1803 |
+
border-top: 1px solid #dfdfdf;
|
1804 |
+
margin-bottom: -1px;
|
1805 |
+
z-index: 2;
|
1806 |
+
}
|
1807 |
+
/*---------------------------------------------------------------------------------------------
|
1808 |
+
*
|
1809 |
+
* Taxonomy
|
1810 |
+
*
|
1811 |
+
*---------------------------------------------------------------------------------------------*/
|
1812 |
+
.acf-taxonomy-field {
|
1813 |
+
position: relative;
|
1814 |
+
/* hover */
|
1815 |
+
/* select */
|
1816 |
+
}
|
1817 |
+
.acf-taxonomy-field .categorychecklist-holder {
|
1818 |
+
border: #DFDFDF solid 1px;
|
1819 |
+
border-radius: 3px;
|
1820 |
+
max-height: 200px;
|
1821 |
+
overflow: auto;
|
1822 |
+
}
|
1823 |
+
.acf-taxonomy-field .acf-checkbox-list {
|
1824 |
+
margin: 0;
|
1825 |
+
padding: 10px;
|
1826 |
+
}
|
1827 |
+
.acf-taxonomy-field .acf-checkbox-list ul.children {
|
1828 |
+
padding-left: 18px;
|
1829 |
+
}
|
1830 |
+
.acf-taxonomy-field:hover .acf-actions {
|
1831 |
+
display: block;
|
1832 |
+
}
|
1833 |
+
.acf-taxonomy-field[data-ftype="select"] .acf-actions {
|
1834 |
+
padding: 0;
|
1835 |
+
margin: -9px;
|
1836 |
+
}
|
1837 |
+
/*---------------------------------------------------------------------------------------------
|
1838 |
+
*
|
1839 |
+
* Range
|
1840 |
+
*
|
1841 |
+
*---------------------------------------------------------------------------------------------*/
|
1842 |
+
.acf-range-wrap {
|
1843 |
+
/* rtl */
|
1844 |
+
}
|
1845 |
+
.acf-range-wrap .acf-append,
|
1846 |
+
.acf-range-wrap .acf-prepend {
|
1847 |
+
display: inline-block;
|
1848 |
+
vertical-align: middle;
|
1849 |
+
line-height: 28px;
|
1850 |
+
margin: 0 7px 0 0;
|
1851 |
+
}
|
1852 |
+
.acf-range-wrap .acf-append {
|
1853 |
+
margin: 0 0 0 7px;
|
1854 |
+
}
|
1855 |
+
.acf-range-wrap input[type="range"] {
|
1856 |
+
display: inline-block;
|
1857 |
+
padding: 0;
|
1858 |
+
margin: 0;
|
1859 |
+
vertical-align: middle;
|
1860 |
+
height: 28px;
|
1861 |
+
}
|
1862 |
+
.acf-range-wrap input[type="range"]:focus {
|
1863 |
+
outline: none;
|
1864 |
+
}
|
1865 |
+
.acf-range-wrap input[type="number"] {
|
1866 |
+
display: inline-block;
|
1867 |
+
min-width: 3em;
|
1868 |
+
margin-left: 10px;
|
1869 |
+
vertical-align: middle;
|
1870 |
+
}
|
1871 |
+
html[dir="rtl"] .acf-range-wrap input[type="number"] {
|
1872 |
+
margin-right: 10px;
|
1873 |
+
margin-left: 0;
|
1874 |
+
}
|
1875 |
+
html[dir="rtl"] .acf-range-wrap .acf-append {
|
1876 |
+
margin: 0 7px 0 0;
|
1877 |
+
}
|
1878 |
+
html[dir="rtl"] .acf-range-wrap .acf-prepend {
|
1879 |
+
margin: 0 0 0 7px;
|
1880 |
+
}
|
1881 |
+
/*---------------------------------------------------------------------------------------------
|
1882 |
+
*
|
1883 |
+
* acf-accordion
|
1884 |
+
*
|
1885 |
+
*---------------------------------------------------------------------------------------------*/
|
1886 |
+
.acf-accordion {
|
1887 |
+
margin: 0;
|
1888 |
+
padding: 0;
|
1889 |
+
background: #fff;
|
1890 |
+
/* title */
|
1891 |
+
/* open */
|
1892 |
+
}
|
1893 |
+
.acf-accordion .acf-accordion-title {
|
1894 |
+
margin: 0;
|
1895 |
+
padding: 12px;
|
1896 |
+
font-weight: bold;
|
1897 |
+
cursor: pointer;
|
1898 |
+
font-size: inherit;
|
1899 |
+
font-size: 13px;
|
1900 |
+
line-height: 1.4em;
|
1901 |
+
}
|
1902 |
+
.acf-accordion .acf-accordion-title label {
|
1903 |
+
margin: 0;
|
1904 |
+
padding: 0;
|
1905 |
+
font-size: 13px;
|
1906 |
+
line-height: 1.4em;
|
1907 |
+
}
|
1908 |
+
.acf-accordion .acf-accordion-title p {
|
1909 |
+
font-weight: normal;
|
1910 |
+
}
|
1911 |
+
.acf-accordion .acf-accordion-title .acf-accordion-icon {
|
1912 |
+
float: right;
|
1913 |
+
}
|
1914 |
+
.acf-accordion .acf-accordion-content {
|
1915 |
+
margin: 0;
|
1916 |
+
padding: 0 12px 12px;
|
1917 |
+
display: none;
|
1918 |
+
}
|
1919 |
+
.acf-accordion.-open > .acf-accordion-content {
|
1920 |
+
display: block;
|
1921 |
+
}
|
1922 |
+
/* field specific */
|
1923 |
+
.acf-field.acf-accordion {
|
1924 |
+
padding: 0;
|
1925 |
+
border-color: #dfdfdf;
|
1926 |
+
}
|
1927 |
+
.acf-field.acf-accordion .acf-accordion-title {
|
1928 |
+
padding: 12px !important;
|
1929 |
+
float: none !important;
|
1930 |
+
width: auto !important;
|
1931 |
+
}
|
1932 |
+
.acf-field.acf-accordion .acf-accordion-content {
|
1933 |
+
padding: 0;
|
1934 |
+
float: none !important;
|
1935 |
+
width: auto !important;
|
1936 |
+
}
|
1937 |
+
.acf-field.acf-accordion .acf-accordion-content > .acf-fields {
|
1938 |
+
border-top: #EEEEEE solid 1px;
|
1939 |
+
}
|
1940 |
+
.acf-field.acf-accordion .acf-accordion-content > .acf-fields.-clear {
|
1941 |
+
padding: 0 12px 15px;
|
1942 |
+
}
|
1943 |
+
/* field specific (left) */
|
1944 |
+
.acf-fields.-left > .acf-field.acf-accordion {
|
1945 |
+
padding: 0 !important;
|
1946 |
+
}
|
1947 |
+
.acf-fields.-left > .acf-field.acf-accordion:before {
|
1948 |
+
display: none;
|
1949 |
+
}
|
1950 |
+
.acf-fields.-left > .acf-field.acf-accordion .acf-accordion-title {
|
1951 |
+
width: auto;
|
1952 |
+
margin: 0 !important;
|
1953 |
+
padding: 12px;
|
1954 |
+
float: none !important;
|
1955 |
+
}
|
1956 |
+
.acf-fields.-left > .acf-field.acf-accordion .acf-accordion-content {
|
1957 |
+
padding: 0 !important;
|
1958 |
+
}
|
1959 |
+
/* field specific (clear) */
|
1960 |
+
.acf-fields.-clear > .acf-field.acf-accordion {
|
1961 |
+
border: #cccccc solid 1px;
|
1962 |
+
background: transparent;
|
1963 |
+
}
|
1964 |
+
.acf-fields.-clear > .acf-field.acf-accordion + .acf-field.acf-accordion {
|
1965 |
+
margin-top: -16px;
|
1966 |
+
}
|
1967 |
+
/* table */
|
1968 |
+
tr.acf-field.acf-accordion {
|
1969 |
+
background: transparent;
|
1970 |
+
}
|
1971 |
+
tr.acf-field.acf-accordion > .acf-input {
|
1972 |
+
padding: 0 !important;
|
1973 |
+
border: #cccccc solid 1px;
|
1974 |
+
}
|
1975 |
+
tr.acf-field.acf-accordion .acf-accordion-content {
|
1976 |
+
padding: 0 12px 12px;
|
1977 |
+
}
|
1978 |
+
/* #addtag */
|
1979 |
+
#addtag div.acf-field.error {
|
1980 |
+
border: 0 none;
|
1981 |
+
padding: 8px 0;
|
1982 |
+
}
|
1983 |
+
#addtag > .acf-field.acf-accordion {
|
1984 |
+
padding-right: 0;
|
1985 |
+
margin-right: 5%;
|
1986 |
+
}
|
1987 |
+
#addtag > .acf-field.acf-accordion + p.submit {
|
1988 |
+
margin-top: 0;
|
1989 |
+
}
|
1990 |
+
/* border */
|
1991 |
+
tr.acf-accordion {
|
1992 |
+
margin: 15px 0 !important;
|
1993 |
+
}
|
1994 |
+
tr.acf-accordion + tr.acf-accordion {
|
1995 |
+
margin-top: -16px !important;
|
1996 |
+
}
|
1997 |
+
/* seamless */
|
1998 |
+
.acf-postbox.seamless > .acf-fields > .acf-accordion {
|
1999 |
+
margin-left: 12px !important;
|
2000 |
+
margin-right: 12px !important;
|
2001 |
+
}
|
2002 |
+
/* rtl */
|
2003 |
+
/* menu item */
|
2004 |
+
/*
|
2005 |
+
.menu-item-settings > .field-acf > .acf-field.acf-accordion {
|
2006 |
+
border: #dfdfdf solid 1px;
|
2007 |
+
margin: 10px -13px 10px -11px;
|
2008 |
+
|
2009 |
+
+ .acf-field.acf-accordion {
|
2010 |
+
margin-top: -11px;
|
2011 |
+
}
|
2012 |
+
}
|
2013 |
+
*/
|
2014 |
+
/* widget */
|
2015 |
+
.widget .widget-content > .acf-field.acf-accordion {
|
2016 |
+
border: #dfdfdf solid 1px;
|
2017 |
+
margin-bottom: 10px;
|
2018 |
+
}
|
2019 |
+
.widget .widget-content > .acf-field.acf-accordion .acf-accordion-title {
|
2020 |
+
margin-bottom: 0;
|
2021 |
+
}
|
2022 |
+
.widget .widget-content > .acf-field.acf-accordion + .acf-field.acf-accordion {
|
2023 |
+
margin-top: -11px;
|
2024 |
+
}
|
2025 |
+
.acf-postbox.seamless > .acf-fields > .acf-field.acf-accordion {
|
2026 |
+
border: #e5e5e5 solid 1px;
|
2027 |
+
}
|
2028 |
+
.acf-postbox.seamless > .acf-fields > .acf-field.acf-accordion + .acf-field.acf-accordion {
|
2029 |
+
margin-top: -1px;
|
2030 |
+
}
|
2031 |
+
.media-modal .compat-attachment-fields .acf-field.acf-accordion + .acf-field.acf-accordion {
|
2032 |
+
margin-top: -1px;
|
2033 |
+
}
|
2034 |
+
.media-modal .compat-attachment-fields .acf-field.acf-accordion > .acf-input {
|
2035 |
+
width: 100%;
|
2036 |
+
}
|
2037 |
+
.media-modal .compat-attachment-fields .acf-field.acf-accordion .compat-attachment-fields > tbody > tr > td {
|
2038 |
+
padding-bottom: 5px;
|
2039 |
+
}
|
2040 |
+
/*---------------------------------------------------------------------------------------------
|
2041 |
+
*
|
2042 |
+
* Attachment Form (single page)
|
2043 |
+
*
|
2044 |
+
*---------------------------------------------------------------------------------------------*/
|
2045 |
+
#post .compat-attachment-fields .compat-field-acf-form-data {
|
2046 |
+
display: none;
|
2047 |
+
}
|
2048 |
+
#post .compat-attachment-fields,
|
2049 |
+
#post .compat-attachment-fields > tbody,
|
2050 |
+
#post .compat-attachment-fields > tbody > tr,
|
2051 |
+
#post .compat-attachment-fields > tbody > tr > th,
|
2052 |
+
#post .compat-attachment-fields > tbody > tr > td {
|
2053 |
+
display: block;
|
2054 |
+
}
|
2055 |
+
#post .compat-attachment-fields > tbody > .acf-field {
|
2056 |
+
margin: 15px 0;
|
2057 |
+
}
|
2058 |
+
#post .compat-attachment-fields > tbody > .acf-field > .acf-label {
|
2059 |
+
margin: 0;
|
2060 |
+
}
|
2061 |
+
#post .compat-attachment-fields > tbody > .acf-field > .acf-label label {
|
2062 |
+
margin: 0;
|
2063 |
+
padding: 0;
|
2064 |
+
}
|
2065 |
+
#post .compat-attachment-fields > tbody > .acf-field > .acf-label label p {
|
2066 |
+
margin: 0 0 3px !important;
|
2067 |
+
}
|
2068 |
+
#post .compat-attachment-fields > tbody > .acf-field > .acf-input {
|
2069 |
+
margin: 0;
|
2070 |
+
}
|
2071 |
+
/*---------------------------------------------------------------------------------------------
|
2072 |
+
*
|
2073 |
+
* Media Model
|
2074 |
+
*
|
2075 |
+
*---------------------------------------------------------------------------------------------*/
|
2076 |
+
/* WP sets tables to act as divs. ACF uses tables, so these muct be reset */
|
2077 |
+
.media-modal .compat-attachment-fields td.acf-input table {
|
2078 |
+
display: table;
|
2079 |
+
table-layout: auto;
|
2080 |
+
}
|
2081 |
+
.media-modal .compat-attachment-fields td.acf-input table tbody {
|
2082 |
+
display: table-row-group;
|
2083 |
+
}
|
2084 |
+
.media-modal .compat-attachment-fields td.acf-input table tr {
|
2085 |
+
display: table-row;
|
2086 |
+
}
|
2087 |
+
.media-modal .compat-attachment-fields td.acf-input table td,
|
2088 |
+
.media-modal .compat-attachment-fields td.acf-input table th {
|
2089 |
+
display: table-cell;
|
2090 |
+
}
|
2091 |
+
/* field widths floats */
|
2092 |
+
.media-modal .compat-attachment-fields > tbody > .acf-field {
|
2093 |
+
margin: 5px 0;
|
2094 |
+
}
|
2095 |
+
.media-modal .compat-attachment-fields > tbody > .acf-field > .acf-label {
|
2096 |
+
min-width: 30%;
|
2097 |
+
margin: 0;
|
2098 |
+
padding: 0;
|
2099 |
+
text-align: right;
|
2100 |
+
display: block;
|
2101 |
+
float: left;
|
2102 |
+
}
|
2103 |
+
.media-modal .compat-attachment-fields > tbody > .acf-field > .acf-label > label {
|
2104 |
+
padding-top: 6px;
|
2105 |
+
margin: 0;
|
2106 |
+
color: #666666;
|
2107 |
+
font-weight: 400;
|
2108 |
+
line-height: 16px;
|
2109 |
+
}
|
2110 |
+
.media-modal .compat-attachment-fields > tbody > .acf-field > .acf-input {
|
2111 |
+
width: 65%;
|
2112 |
+
margin: 0;
|
2113 |
+
padding: 0;
|
2114 |
+
float: right;
|
2115 |
+
display: block;
|
2116 |
+
}
|
2117 |
+
.media-modal .compat-attachment-fields > tbody > .acf-field p.description {
|
2118 |
+
margin: 0;
|
2119 |
+
}
|
2120 |
+
/* restricted selection (copy of WP .upload-errors)*/
|
2121 |
+
.acf-selection-error {
|
2122 |
+
background: #ffebe8;
|
2123 |
+
border: 1px solid #c00;
|
2124 |
+
border-radius: 3px;
|
2125 |
+
padding: 8px;
|
2126 |
+
margin: 20px 0 0;
|
2127 |
+
}
|
2128 |
+
.acf-selection-error .selection-error-label {
|
2129 |
+
background: #CC0000;
|
2130 |
+
border-radius: 3px;
|
2131 |
+
color: #fff;
|
2132 |
+
font-weight: bold;
|
2133 |
+
margin-right: 8px;
|
2134 |
+
padding: 2px 4px;
|
2135 |
+
}
|
2136 |
+
.acf-selection-error .selection-error-message {
|
2137 |
+
color: #b44;
|
2138 |
+
display: block;
|
2139 |
+
padding-top: 8px;
|
2140 |
+
word-wrap: break-word;
|
2141 |
+
white-space: pre-wrap;
|
2142 |
+
}
|
2143 |
+
/* disabled attachment */
|
2144 |
+
.media-modal .attachment.acf-disabled .thumbnail {
|
2145 |
+
opacity: 0.25 !important;
|
2146 |
+
}
|
2147 |
+
.media-modal .attachment.acf-disabled .attachment-preview:before {
|
2148 |
+
background: rgba(0, 0, 0, 0.15);
|
2149 |
+
z-index: 1;
|
2150 |
+
position: relative;
|
2151 |
+
}
|
2152 |
+
/* misc */
|
2153 |
+
.media-modal {
|
2154 |
+
/* compat-item */
|
2155 |
+
/* allow line breaks in upload error */
|
2156 |
+
/* fix required span */
|
2157 |
+
/* sidebar */
|
2158 |
+
/* mobile md */
|
2159 |
+
}
|
2160 |
+
.media-modal .compat-field-acf-form-data,
|
2161 |
+
.media-modal .compat-field-acf-blank {
|
2162 |
+
display: none !important;
|
2163 |
+
}
|
2164 |
+
.media-modal .upload-error-message {
|
2165 |
+
white-space: pre-wrap;
|
2166 |
+
}
|
2167 |
+
.media-modal .acf-required {
|
2168 |
+
padding: 0 !important;
|
2169 |
+
margin: 0 !important;
|
2170 |
+
float: none !important;
|
2171 |
+
color: #f00 !important;
|
2172 |
+
}
|
2173 |
+
.media-modal .media-sidebar .compat-item {
|
2174 |
+
padding-bottom: 20px;
|
2175 |
+
}
|
2176 |
+
@media (max-width: 900px) {
|
2177 |
+
.media-modal {
|
2178 |
+
/* label */
|
2179 |
+
/* field */
|
2180 |
+
}
|
2181 |
+
.media-modal .setting span,
|
2182 |
+
.media-modal .compat-attachment-fields > tbody > .acf-field > .acf-label {
|
2183 |
+
width: 98%;
|
2184 |
+
float: none;
|
2185 |
+
text-align: left;
|
2186 |
+
min-height: 0;
|
2187 |
+
padding: 0;
|
2188 |
+
}
|
2189 |
+
.media-modal .setting input,
|
2190 |
+
.media-modal .setting textarea,
|
2191 |
+
.media-modal .compat-attachment-fields > tbody > .acf-field > .acf-input {
|
2192 |
+
float: none;
|
2193 |
+
height: auto;
|
2194 |
+
max-width: none;
|
2195 |
+
width: 98%;
|
2196 |
+
}
|
2197 |
+
}
|
2198 |
+
/*---------------------------------------------------------------------------------------------
|
2199 |
+
*
|
2200 |
+
* Media Model (expand details)
|
2201 |
+
*
|
2202 |
+
*---------------------------------------------------------------------------------------------*/
|
2203 |
+
.media-modal .acf-expand-details {
|
2204 |
+
float: right;
|
2205 |
+
padding: 1px 10px;
|
2206 |
+
margin-right: 6px;
|
2207 |
+
height: 18px;
|
2208 |
+
line-height: 18px;
|
2209 |
+
color: #AAAAAA;
|
2210 |
+
font-size: 12px;
|
2211 |
+
/* mobile sm */
|
2212 |
+
}
|
2213 |
+
.media-modal .acf-expand-details:focus,
|
2214 |
+
.media-modal .acf-expand-details:active {
|
2215 |
+
outline: 0 none;
|
2216 |
+
box-shadow: none;
|
2217 |
+
color: #AAAAAA;
|
2218 |
+
}
|
2219 |
+
.media-modal .acf-expand-details:hover {
|
2220 |
+
color: #666666 !important;
|
2221 |
+
}
|
2222 |
+
.media-modal .acf-expand-details span {
|
2223 |
+
display: block;
|
2224 |
+
float: left;
|
2225 |
+
}
|
2226 |
+
.media-modal .acf-expand-details .acf-icon {
|
2227 |
+
margin: 0 4px 0 0;
|
2228 |
+
}
|
2229 |
+
.media-modal .acf-expand-details:hover .acf-icon {
|
2230 |
+
border-color: #AAAAAA;
|
2231 |
+
}
|
2232 |
+
.media-modal .acf-expand-details .is-open {
|
2233 |
+
display: none;
|
2234 |
+
}
|
2235 |
+
.media-modal .acf-expand-details .is-closed {
|
2236 |
+
display: block;
|
2237 |
+
}
|
2238 |
+
@media (max-width: 640px) {
|
2239 |
+
.media-modal .acf-expand-details {
|
2240 |
+
display: none;
|
2241 |
+
}
|
2242 |
+
}
|
2243 |
+
/* expanded */
|
2244 |
+
.media-modal.acf-expanded {
|
2245 |
+
/* toggle */
|
2246 |
+
/* resize */
|
2247 |
+
/* label & fields */
|
2248 |
+
/* mobile md */
|
2249 |
+
}
|
2250 |
+
.media-modal.acf-expanded .acf-expand-details .is-open {
|
2251 |
+
display: block;
|
2252 |
+
}
|
2253 |
+
.media-modal.acf-expanded .acf-expand-details .is-closed {
|
2254 |
+
display: none;
|
2255 |
+
}
|
2256 |
+
.media-modal.acf-expanded .attachments-browser .media-toolbar,
|
2257 |
+
.media-modal.acf-expanded .attachments-browser .attachments {
|
2258 |
+
right: 740px;
|
2259 |
+
}
|
2260 |
+
.media-modal.acf-expanded .media-sidebar {
|
2261 |
+
width: 708px;
|
2262 |
+
}
|
2263 |
+
.media-modal.acf-expanded .media-sidebar {
|
2264 |
+
/* label */
|
2265 |
+
/* field */
|
2266 |
+
/* larger thumbnail */
|
2267 |
+
}
|
2268 |
+
.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail,
|
2269 |
+
.media-modal.acf-expanded .media-sidebar .setting span,
|
2270 |
+
.media-modal.acf-expanded .media-sidebar .compat-attachment-fields > tbody > .acf-field > .acf-label {
|
2271 |
+
min-width: 20%;
|
2272 |
+
}
|
2273 |
+
.media-modal.acf-expanded .media-sidebar .attachment-info .details,
|
2274 |
+
.media-modal.acf-expanded .media-sidebar .setting input,
|
2275 |
+
.media-modal.acf-expanded .media-sidebar .setting textarea,
|
2276 |
+
.media-modal.acf-expanded .media-sidebar .compat-attachment-fields > tbody > .acf-field > .acf-input {
|
2277 |
+
min-width: 77%;
|
2278 |
+
}
|
2279 |
+
.media-modal.acf-expanded .media-sidebar .setting span {
|
2280 |
+
margin-right: 2%;
|
2281 |
+
}
|
2282 |
+
.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail {
|
2283 |
+
max-height: none;
|
2284 |
+
}
|
2285 |
+
.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail img {
|
2286 |
+
max-width: 100%;
|
2287 |
+
max-height: 200px;
|
2288 |
+
}
|
2289 |
+
.media-modal.acf-expanded .media-sidebar .attachment-info .details {
|
2290 |
+
float: right;
|
2291 |
+
}
|
2292 |
+
@media (max-width: 900px) {
|
2293 |
+
.media-modal.acf-expanded {
|
2294 |
+
/* resize */
|
2295 |
+
}
|
2296 |
+
.media-modal.acf-expanded .attachments-browser .media-toolbar {
|
2297 |
+
display: none;
|
2298 |
+
}
|
2299 |
+
.media-modal.acf-expanded .attachments {
|
2300 |
+
display: none;
|
2301 |
+
}
|
2302 |
+
.media-modal.acf-expanded .media-sidebar {
|
2303 |
+
width: auto;
|
2304 |
+
max-width: none !important;
|
2305 |
+
}
|
2306 |
+
.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail {
|
2307 |
+
min-width: 30%;
|
2308 |
+
margin: 0;
|
2309 |
+
}
|
2310 |
+
.media-modal.acf-expanded .media-sidebar .attachment-info .details {
|
2311 |
+
min-width: 67%;
|
2312 |
+
}
|
2313 |
+
}
|
2314 |
+
/*---------------------------------------------------------------------------------------------
|
2315 |
+
*
|
2316 |
+
* ACF Media Model
|
2317 |
+
*
|
2318 |
+
*---------------------------------------------------------------------------------------------*/
|
2319 |
+
.acf-media-modal {
|
2320 |
+
/* hide embed settings */
|
2321 |
+
}
|
2322 |
+
.acf-media-modal .media-embed .setting.align,
|
2323 |
+
.acf-media-modal .media-embed .setting.link-to {
|
2324 |
+
display: none;
|
2325 |
+
}
|
2326 |
+
@media screen and (min-width: 1024px) {
|
2327 |
+
.acf-media-modal .media-modal-content .media-frame .media-toolbar-secondary {
|
2328 |
+
max-width: none;
|
2329 |
+
}
|
2330 |
+
.acf-media-modal .media-modal-content .media-frame .media-toolbar-secondary select.attachment-filters {
|
2331 |
+
width: auto;
|
2332 |
+
min-width: 150px;
|
2333 |
+
max-width: none;
|
2334 |
+
margin: 11px 6px 0 0;
|
2335 |
+
vertical-align: middle;
|
2336 |
+
}
|
2337 |
+
}
|
2338 |
+
/*---------------------------------------------------------------------------------------------
|
2339 |
+
*
|
2340 |
+
* ACF Media Model (Select Mode)
|
2341 |
+
*
|
2342 |
+
*---------------------------------------------------------------------------------------------*/
|
2343 |
+
/*---------------------------------------------------------------------------------------------
|
2344 |
+
*
|
2345 |
+
* ACF Media Model (Edit Mode)
|
2346 |
+
*
|
2347 |
+
*---------------------------------------------------------------------------------------------*/
|
2348 |
+
.acf-media-modal.-edit {
|
2349 |
+
/* resize modal */
|
2350 |
+
left: 15%;
|
2351 |
+
right: 15%;
|
2352 |
+
top: 100px;
|
2353 |
+
bottom: 100px;
|
2354 |
+
/* hide elements */
|
2355 |
+
/* full width */
|
2356 |
+
/* tidy up incorrect distance */
|
2357 |
+
/* title box shadow (to match media grid) */
|
2358 |
+
/* sidebar */
|
2359 |
+
/* mobile md */
|
2360 |
+
/* mobile sm */
|
2361 |
+
}
|
2362 |
+
.acf-media-modal.-edit .media-frame-menu,
|
2363 |
+
.acf-media-modal.-edit .media-frame-router,
|
2364 |
+
.acf-media-modal.-edit .media-frame-content .attachments,
|
2365 |
+
.acf-media-modal.-edit .media-frame-content .media-toolbar {
|
2366 |
+
display: none;
|
2367 |
+
}
|
2368 |
+
.acf-media-modal.-edit .media-frame-title,
|
2369 |
+
.acf-media-modal.-edit .media-frame-content,
|
2370 |
+
.acf-media-modal.-edit .media-frame-toolbar,
|
2371 |
+
.acf-media-modal.-edit .media-sidebar {
|
2372 |
+
width: auto;
|
2373 |
+
left: 0;
|
2374 |
+
right: 0;
|
2375 |
+
}
|
2376 |
+
.acf-media-modal.-edit .media-frame-content {
|
2377 |
+
top: 50px;
|
2378 |
+
}
|
2379 |
+
.acf-media-modal.-edit .media-frame-title {
|
2380 |
+
border-bottom: 1px solid #DFDFDF;
|
2381 |
+
box-shadow: 0 4px 4px -4px rgba(0, 0, 0, 0.1);
|
2382 |
+
}
|
2383 |
+
.acf-media-modal.-edit .media-sidebar {
|
2384 |
+
padding: 0 16px;
|
2385 |
+
/* WP details */
|
2386 |
+
/* ACF fields */
|
2387 |
+
/* WP required message */
|
2388 |
+
}
|
2389 |
+
.acf-media-modal.-edit .media-sidebar .attachment-details {
|
2390 |
+
overflow: visible;
|
2391 |
+
/* hide 'Attachment Details' heading */
|
2392 |
+
/* remove overflow */
|
2393 |
+
/* move thumbnail */
|
2394 |
+
}
|
2395 |
+
.acf-media-modal.-edit .media-sidebar .attachment-details > h3,
|
2396 |
+
.acf-media-modal.-edit .media-sidebar .attachment-details > h2 {
|
2397 |
+
display: none;
|
2398 |
+
}
|
2399 |
+
.acf-media-modal.-edit .media-sidebar .attachment-details .attachment-info {
|
2400 |
+
background: #fff;
|
2401 |
+
border-bottom: #dddddd solid 1px;
|
2402 |
+
padding: 16px;
|
2403 |
+
margin: 0 -16px 16px;
|
2404 |
+
}
|
2405 |
+
.acf-media-modal.-edit .media-sidebar .attachment-details .thumbnail {
|
2406 |
+
margin: 0 16px 0 0;
|
2407 |
+
}
|
2408 |
+
.acf-media-modal.-edit .media-sidebar .attachment-details .setting {
|
2409 |
+
display: block;
|
2410 |
+
overflow: hidden;
|
2411 |
+
float: none;
|
2412 |
+
width: auto;
|
2413 |
+
margin: 0 0 5px;
|
2414 |
+
}
|
2415 |
+
.acf-media-modal.-edit .media-sidebar .attachment-details .setting span {
|
2416 |
+
margin: 0;
|
2417 |
+
}
|
2418 |
+
.acf-media-modal.-edit .media-sidebar .compat-attachment-fields > tbody > .acf-field {
|
2419 |
+
margin: 0 0 5px;
|
2420 |
+
}
|
2421 |
+
.acf-media-modal.-edit .media-sidebar .compat-attachment-fields > tbody > .acf-field p.description {
|
2422 |
+
margin-top: 3px;
|
2423 |
+
}
|
2424 |
+
.acf-media-modal.-edit .media-sidebar .media-types-required-info {
|
2425 |
+
display: none;
|
2426 |
+
}
|
2427 |
+
@media (max-width: 900px) {
|
2428 |
+
.acf-media-modal.-edit {
|
2429 |
+
top: 30px;
|
2430 |
+
right: 30px;
|
2431 |
+
bottom: 30px;
|
2432 |
+
left: 30px;
|
2433 |
+
}
|
2434 |
+
}
|
2435 |
+
@media (max-width: 640px) {
|
2436 |
+
.acf-media-modal.-edit {
|
2437 |
+
top: 0;
|
2438 |
+
right: 0;
|
2439 |
+
bottom: 0;
|
2440 |
+
left: 0;
|
2441 |
+
}
|
2442 |
+
.acf-media-modal.-edit .media-sidebar {
|
2443 |
+
bottom: 0 !important;
|
2444 |
+
}
|
2445 |
+
}
|
2446 |
+
/*--------------------------------------------------------------------------------------------
|
2447 |
+
*
|
2448 |
+
* User
|
2449 |
+
*
|
2450 |
+
*--------------------------------------------------------------------------------------------*/
|
2451 |
+
.form-table > tbody {
|
2452 |
+
/* field */
|
2453 |
+
/* tab wrap */
|
2454 |
+
/* misc */
|
2455 |
+
}
|
2456 |
+
.form-table > tbody > .acf-field {
|
2457 |
+
/* label */
|
2458 |
+
/* input */
|
2459 |
+
}
|
2460 |
+
.form-table > tbody > .acf-field > .acf-label {
|
2461 |
+
padding: 20px 10px 20px 0;
|
2462 |
+
width: 210px;
|
2463 |
+
/* rtl */
|
2464 |
+
}
|
2465 |
+
html[dir="rtl"] .form-table > tbody > .acf-field > .acf-label {
|
2466 |
+
padding: 20px 0 20px 10px;
|
2467 |
+
}
|
2468 |
+
.form-table > tbody > .acf-field > .acf-label label {
|
2469 |
+
font-size: 14px;
|
2470 |
+
color: #23282d;
|
2471 |
+
}
|
2472 |
+
.form-table > tbody > .acf-field > .acf-input {
|
2473 |
+
padding: 15px 10px;
|
2474 |
+
/* rtl */
|
2475 |
+
}
|
2476 |
+
html[dir="rtl"] .form-table > tbody > .acf-field > .acf-input {
|
2477 |
+
padding: 15px 10px 15px 5%;
|
2478 |
+
}
|
2479 |
+
.form-table > tbody > .acf-tab-wrap td {
|
2480 |
+
padding: 15px 5% 15px 0;
|
2481 |
+
/* rtl */
|
2482 |
+
}
|
2483 |
+
html[dir="rtl"] .form-table > tbody > .acf-tab-wrap td {
|
2484 |
+
padding: 15px 0 15px 5%;
|
2485 |
+
}
|
2486 |
+
.form-table > tbody .form-table th.acf-th {
|
2487 |
+
width: auto;
|
2488 |
+
}
|
2489 |
+
#your-profile,
|
2490 |
+
#createuser {
|
2491 |
+
/* override for user css */
|
2492 |
+
/* allow sub fields to display correctly */
|
2493 |
+
}
|
2494 |
+
#your-profile .acf-field input[type="text"],
|
2495 |
+
#createuser .acf-field input[type="text"],
|
2496 |
+
#your-profile .acf-field input[type="password"],
|
2497 |
+
#createuser .acf-field input[type="password"],
|
2498 |
+
#your-profile .acf-field input[type="number"],
|
2499 |
+
#createuser .acf-field input[type="number"],
|
2500 |
+
#your-profile .acf-field input[type="search"],
|
2501 |
+
#createuser .acf-field input[type="search"],
|
2502 |
+
#your-profile .acf-field input[type="email"],
|
2503 |
+
#createuser .acf-field input[type="email"],
|
2504 |
+
#your-profile .acf-field input[type="url"],
|
2505 |
+
#createuser .acf-field input[type="url"],
|
2506 |
+
#your-profile .acf-field select,
|
2507 |
+
#createuser .acf-field select {
|
2508 |
+
max-width: 25em;
|
2509 |
+
}
|
2510 |
+
#your-profile .acf-field textarea,
|
2511 |
+
#createuser .acf-field textarea {
|
2512 |
+
max-width: 500px;
|
2513 |
+
}
|
2514 |
+
#your-profile .acf-field .acf-field input[type="text"],
|
2515 |
+
#createuser .acf-field .acf-field input[type="text"],
|
2516 |
+
#your-profile .acf-field .acf-field input[type="password"],
|
2517 |
+
#createuser .acf-field .acf-field input[type="password"],
|
2518 |
+
#your-profile .acf-field .acf-field input[type="number"],
|
2519 |
+
#createuser .acf-field .acf-field input[type="number"],
|
2520 |
+
#your-profile .acf-field .acf-field input[type="search"],
|
2521 |
+
#createuser .acf-field .acf-field input[type="search"],
|
2522 |
+
#your-profile .acf-field .acf-field input[type="email"],
|
2523 |
+
#createuser .acf-field .acf-field input[type="email"],
|
2524 |
+
#your-profile .acf-field .acf-field input[type="url"],
|
2525 |
+
#createuser .acf-field .acf-field input[type="url"],
|
2526 |
+
#your-profile .acf-field .acf-field textarea,
|
2527 |
+
#createuser .acf-field .acf-field textarea,
|
2528 |
+
#your-profile .acf-field .acf-field select,
|
2529 |
+
#createuser .acf-field .acf-field select {
|
2530 |
+
max-width: none;
|
2531 |
+
}
|
2532 |
+
#registerform h2 {
|
2533 |
+
margin: 1em 0;
|
2534 |
+
}
|
2535 |
+
#registerform .acf-field .acf-label {
|
2536 |
+
margin-bottom: 0;
|
2537 |
+
}
|
2538 |
+
#registerform .acf-field .acf-label label {
|
2539 |
+
font-weight: normal;
|
2540 |
+
font-size: 14px;
|
2541 |
+
}
|
2542 |
+
#registerform p.submit {
|
2543 |
+
text-align: right;
|
2544 |
+
}
|
2545 |
+
/*--------------------------------------------------------------------------------------------
|
2546 |
+
*
|
2547 |
+
* Term
|
2548 |
+
*
|
2549 |
+
*--------------------------------------------------------------------------------------------*/
|
2550 |
+
#acf-term-fields {
|
2551 |
+
padding-right: 5%;
|
2552 |
+
}
|
2553 |
+
#acf-term-fields > .acf-field > .acf-label {
|
2554 |
+
margin: 0;
|
2555 |
+
}
|
2556 |
+
#acf-term-fields > .acf-field > .acf-label label {
|
2557 |
+
font-size: 12px;
|
2558 |
+
font-weight: normal;
|
2559 |
+
}
|
2560 |
+
p.submit .spinner,
|
2561 |
+
p.submit .acf-spinner {
|
2562 |
+
vertical-align: top;
|
2563 |
+
float: none;
|
2564 |
+
margin: 4px 4px 0;
|
2565 |
+
}
|
2566 |
+
#edittag .acf-fields.-left > .acf-field {
|
2567 |
+
padding-left: 220px;
|
2568 |
+
}
|
2569 |
+
#edittag .acf-fields.-left > .acf-field:before {
|
2570 |
+
width: 209px;
|
2571 |
+
}
|
2572 |
+
#edittag .acf-fields.-left > .acf-field > .acf-label {
|
2573 |
+
width: 220px;
|
2574 |
+
margin-left: -220px;
|
2575 |
+
padding: 0 10px;
|
2576 |
+
}
|
2577 |
+
#edittag .acf-fields.-left > .acf-field > .acf-input {
|
2578 |
+
padding: 0;
|
2579 |
+
}
|
2580 |
+
#edittag > .acf-fields.-left {
|
2581 |
+
width: 96%;
|
2582 |
+
}
|
2583 |
+
#edittag > .acf-fields.-left > .acf-field > .acf-label {
|
2584 |
+
padding-left: 0;
|
2585 |
+
}
|
2586 |
+
/*--------------------------------------------------------------------------------------------
|
2587 |
+
*
|
2588 |
+
* Comment
|
2589 |
+
*
|
2590 |
+
*--------------------------------------------------------------------------------------------*/
|
2591 |
+
.editcomment td:first-child {
|
2592 |
+
white-space: nowrap;
|
2593 |
+
width: 131px;
|
2594 |
+
}
|
2595 |
+
/*--------------------------------------------------------------------------------------------
|
2596 |
+
*
|
2597 |
+
* Widget
|
2598 |
+
*
|
2599 |
+
*--------------------------------------------------------------------------------------------*/
|
2600 |
+
#widgets-right .widget .acf-field .description {
|
2601 |
+
padding-left: 0;
|
2602 |
+
padding-right: 0;
|
2603 |
+
}
|
2604 |
+
.acf-widget-fields > .acf-field .acf-label {
|
2605 |
+
margin-bottom: 5px;
|
2606 |
+
}
|
2607 |
+
.acf-widget-fields > .acf-field .acf-label label {
|
2608 |
+
font-weight: normal;
|
2609 |
+
margin: 0;
|
2610 |
+
}
|
2611 |
+
/*--------------------------------------------------------------------------------------------
|
2612 |
+
*
|
2613 |
+
* Nav Menu
|
2614 |
+
*
|
2615 |
+
*--------------------------------------------------------------------------------------------*/
|
2616 |
+
.acf-menu-settings {
|
2617 |
+
border-top: 1px solid #eee;
|
2618 |
+
margin-top: 2em;
|
2619 |
+
}
|
2620 |
+
.acf-menu-settings.-seamless {
|
2621 |
+
border-top: none;
|
2622 |
+
margin-top: 15px;
|
2623 |
+
}
|
2624 |
+
.acf-menu-settings.-seamless > h2 {
|
2625 |
+
display: none;
|
2626 |
+
}
|
2627 |
+
.acf-menu-item-fields {
|
2628 |
+
margin-right: 10px;
|
2629 |
+
float: left;
|
2630 |
+
}
|
2631 |
+
/*--------------------------------------------------------------------------------------------
|
2632 |
+
*
|
2633 |
+
* Confirm remove
|
2634 |
+
*
|
2635 |
+
*--------------------------------------------------------------------------------------------*/
|
2636 |
+
.acf-temp-remove {
|
2637 |
+
position: relative;
|
2638 |
+
opacity: 1;
|
2639 |
+
-webkit-transition: all 0.25s ease;
|
2640 |
+
-moz-transition: all 0.25s ease;
|
2641 |
+
-o-transition: all 0.25s ease;
|
2642 |
+
transition: all 0.25s ease;
|
2643 |
+
overflow: hidden;
|
2644 |
+
/* overlay prevents hover */
|
2645 |
+
}
|
2646 |
+
.acf-temp-remove:after {
|
2647 |
+
display: block;
|
2648 |
+
content: "";
|
2649 |
+
position: absolute;
|
2650 |
+
top: 0;
|
2651 |
+
left: 0;
|
2652 |
+
right: 0;
|
2653 |
+
bottom: 0;
|
2654 |
+
z-index: 99;
|
2655 |
+
}
|
2656 |
+
/*--------------------------------------------------------------------------
|
2657 |
+
*
|
2658 |
+
* Conditional Logic
|
2659 |
+
*
|
2660 |
+
*-------------------------------------------------------------------------*/
|
2661 |
+
/* Hide */
|
2662 |
+
.hidden-by-conditional-logic {
|
2663 |
+
display: none !important;
|
2664 |
+
}
|
2665 |
+
/* Hide (appear empty) */
|
2666 |
+
.hidden-by-conditional-logic.appear-empty {
|
2667 |
+
display: table-cell !important;
|
2668 |
+
}
|
2669 |
+
.hidden-by-conditional-logic.appear-empty .acf-input {
|
2670 |
+
display: none !important;
|
2671 |
+
}
|
2672 |
+
/*--------------------------------------------------------------------------
|
2673 |
+
*
|
2674 |
+
* 3rd Party
|
2675 |
+
*
|
2676 |
+
*-------------------------------------------------------------------------*/
|
2677 |
+
/* Tabify shows hidden postboxes */
|
2678 |
+
.acf-postbox.acf-hidden {
|
2679 |
+
display: none !important;
|
2680 |
+
}
|
2681 |
+
/*--------------------------------------------------------------------------------------------
|
2682 |
+
*
|
2683 |
+
* Gutenberg
|
2684 |
+
*
|
2685 |
+
*--------------------------------------------------------------------------------------------*/
|
2686 |
+
/*
|
2687 |
+
#editor {
|
2688 |
+
|
2689 |
+
.edit-post-layout__metaboxes {
|
2690 |
+
//border-top: none;
|
2691 |
+
}
|
2692 |
+
|
2693 |
+
.edit-post-meta-boxes-area {
|
2694 |
+
max-width: 80%;
|
2695 |
+
|
2696 |
+
.postbox {
|
2697 |
+
border: #e2e4e7 solid 1px;
|
2698 |
+
border-bottom: none;
|
2699 |
+
margin: 20px 0;
|
2700 |
+
}
|
2701 |
+
|
2702 |
+
input {
|
2703 |
+
max-width: none;
|
2704 |
+
}
|
2705 |
+
}
|
2706 |
+
|
2707 |
+
}
|
2708 |
+
*/
|
shared/assets/plugins/advanced-custom-fields/assets/font/LICENSE.txt
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Font license info
|
2 |
+
|
3 |
+
|
4 |
+
## Entypo
|
5 |
+
|
6 |
+
Copyright (C) 2012 by Daniel Bruce
|
7 |
+
|
8 |
+
Author: Daniel Bruce
|
9 |
+
License: SIL (http://scripts.sil.org/OFL)
|
10 |
+
Homepage: http://www.entypo.com
|
11 |
+
|
12 |
+
|
13 |
+
## Typicons
|
14 |
+
|
15 |
+
(c) Stephen Hutchings 2012
|
16 |
+
|
17 |
+
Author: Stephen Hutchings
|
18 |
+
License: SIL (http://scripts.sil.org/OFL)
|
19 |
+
Homepage: http://typicons.com/
|
20 |
+
|
21 |
+
|
22 |
+
## Font Awesome
|
23 |
+
|
24 |
+
Copyright (C) 2016 by Dave Gandy
|
25 |
+
|
26 |
+
Author: Dave Gandy
|
27 |
+
License: SIL ()
|
28 |
+
Homepage: http://fortawesome.github.com/Font-Awesome/
|
29 |
+
|
30 |
+
|
31 |
+
## Elusive
|
32 |
+
|
33 |
+
Copyright (C) 2013 by Aristeides Stathopoulos
|
34 |
+
|
35 |
+
Author: Aristeides Stathopoulos
|
36 |
+
License: SIL (http://scripts.sil.org/OFL)
|
37 |
+
Homepage: http://aristeides.com/
|
38 |
+
|
39 |
+
|
40 |
+
## Modern Pictograms
|
41 |
+
|
42 |
+
Copyright (c) 2012 by John Caserta. All rights reserved.
|
43 |
+
|
44 |
+
Author: John Caserta
|
45 |
+
License: SIL (http://scripts.sil.org/OFL)
|
46 |
+
Homepage: http://thedesignoffice.org/project/modern-pictograms/
|
47 |
+
|
48 |
+
|
shared/assets/plugins/advanced-custom-fields/assets/font/README.txt
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
This webfont is generated by http://fontello.com open source project.
|
2 |
+
|
3 |
+
|
4 |
+
================================================================================
|
5 |
+
Please, note, that you should obey original font licenses, used to make this
|
6 |
+
webfont pack. Details available in LICENSE.txt file.
|
7 |
+
|
8 |
+
- Usually, it's enough to publish content of LICENSE.txt file somewhere on your
|
9 |
+
site in "About" section.
|
10 |
+
|
11 |
+
- If your project is open-source, usually, it will be ok to make LICENSE.txt
|
12 |
+
file publicly available in your repository.
|
13 |
+
|
14 |
+
- Fonts, used in Fontello, don't require a clickable link on your site.
|
15 |
+
But any kind of additional authors crediting is welcome.
|
16 |
+
================================================================================
|
17 |
+
|
18 |
+
|
19 |
+
Comments on archive content
|
20 |
+
---------------------------
|
21 |
+
|
22 |
+
- /font/* - fonts in different formats
|
23 |
+
|
24 |
+
- /css/* - different kinds of css, for all situations. Should be ok with
|
25 |
+
twitter bootstrap. Also, you can skip <i> style and assign icon classes
|
26 |
+
directly to text elements, if you don't mind about IE7.
|
27 |
+
|
28 |
+
- demo.html - demo file, to show your webfont content
|
29 |
+
|
30 |
+
- LICENSE.txt - license info about source fonts, used to build your one.
|
31 |
+
|
32 |
+
- config.json - keeps your settings. You can import it back into fontello
|
33 |
+
anytime, to continue your work
|
34 |
+
|
35 |
+
|
36 |
+
Why so many CSS files ?
|
37 |
+
-----------------------
|
38 |
+
|
39 |
+
Because we like to fit all your needs :)
|
40 |
+
|
41 |
+
- basic file, <your_font_name>.css - is usually enough, it contains @font-face
|
42 |
+
and character code definitions
|
43 |
+
|
44 |
+
- *-ie7.css - if you need IE7 support, but still don't wish to put char codes
|
45 |
+
directly into html
|
46 |
+
|
47 |
+
- *-codes.css and *-ie7-codes.css - if you like to use your own @font-face
|
48 |
+
rules, but still wish to benefit from css generation. That can be very
|
49 |
+
convenient for automated asset build systems. When you need to update font -
|
50 |
+
no need to manually edit files, just override old version with archive
|
51 |
+
content. See fontello source code for examples.
|
52 |
+
|
53 |
+
- *-embedded.css - basic css file, but with embedded WOFF font, to avoid
|
54 |
+
CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain.
|
55 |
+
We strongly recommend to resolve this issue by `Access-Control-Allow-Origin`
|
56 |
+
server headers. But if you ok with dirty hack - this file is for you. Note,
|
57 |
+
that data url moved to separate @font-face to avoid problems with <IE9, when
|
58 |
+
string is too long.
|
59 |
+
|
60 |
+
- animate.css - use it to get ideas about spinner rotation animation.
|
61 |
+
|
62 |
+
|
63 |
+
Attention for server setup
|
64 |
+
--------------------------
|
65 |
+
|
66 |
+
You MUST setup server to reply with proper `mime-types` for font files -
|
67 |
+
otherwise some browsers will fail to show fonts.
|
68 |
+
|
69 |
+
Usually, `apache` already has necessary settings, but `nginx` and other
|
70 |
+
webservers should be tuned. Here is list of mime types for our file extensions:
|
71 |
+
|
72 |
+
- `application/vnd.ms-fontobject` - eot
|
73 |
+
- `application/x-font-woff` - woff
|
74 |
+
- `application/x-font-ttf` - ttf
|
75 |
+
- `image/svg+xml` - svg
|
shared/assets/plugins/advanced-custom-fields/assets/font/acf.eot
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/font/acf.svg
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3 |
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
+
<metadata>Copyright (C) 2017 by original authors @ fontello.com</metadata>
|
5 |
+
<defs>
|
6 |
+
<font id="acf" horiz-adv-x="1000" >
|
7 |
+
<font-face font-family="acf" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
8 |
+
<missing-glyph horiz-adv-x="1000" />
|
9 |
+
<glyph glyph-name="plus" unicode="" d="M550 400q30 0 30-50t-30-50l-210 0 0-210q0-30-50-30t-50 30l0 210-210 0q-30 0-30 50t30 50l210 0 0 210q0 30 50 30t50-30l0-210 210 0z" horiz-adv-x="580" />
|
10 |
+
|
11 |
+
<glyph glyph-name="minus" unicode="" d="M550 400q30 0 30-50t-30-50l-520 0q-30 0-30 50t30 50l520 0z" horiz-adv-x="580" />
|
12 |
+
|
13 |
+
<glyph glyph-name="cancel" unicode="" d="M452 194q18-18 18-43t-18-43q-18-16-43-16t-43 16l-132 152-132-152q-18-16-43-16t-43 16q-16 18-16 43t16 43l138 156-138 158q-16 18-16 43t16 43q18 16 43 16t43-16l132-152 132 152q18 16 43 16t43-16q18-18 18-43t-18-43l-138-158z" horiz-adv-x="470" />
|
14 |
+
|
15 |
+
<glyph glyph-name="pencil" unicode="" d="M938 605q22-22 22-55t-22-55l-570-570q-22-21-60-38t-73-17l-235 0 0 234q0 35 17 74t38 60l570 570q23 22 55 22t55-22z m-794-426l65-64 431 433-64 63z m91-205q14 0 33 8-10 10-27 26t-50 50-56 56l-22 22q-9-21-9-32l0-78 52-52 79 0z m74 40l432 432-63 64-433-431z m469 469l67 67-165 165-67-66z" horiz-adv-x="960" />
|
16 |
+
|
17 |
+
<glyph glyph-name="location" unicode="" d="M250 750q104 0 177-73t73-177q0-106-62-243t-126-223l-62-84q-10 12-27 35t-60 89-76 130-60 147-27 149q0 104 73 177t177 73z m0-388q56 0 96 40t40 96-40 95-96 39-95-39-39-95 39-96 95-40z" horiz-adv-x="500" />
|
18 |
+
|
19 |
+
<glyph glyph-name="down" unicode="" d="M564 422l-234-224q-18-18-40-18t-40 18l-234 224q-16 16-16 41t16 41q38 38 78 0l196-188 196 188q40 38 78 0 16-16 16-41t-16-41z" horiz-adv-x="580" />
|
20 |
+
|
21 |
+
<glyph glyph-name="left" unicode="" d="M242 626q14 16 39 16t41-16q38-36 0-80l-186-196 186-194q38-44 0-80-16-16-40-16t-40 16l-226 236q-16 16-16 38 0 24 16 40 206 214 226 236z" horiz-adv-x="341" />
|
22 |
+
|
23 |
+
<glyph glyph-name="right" unicode="" d="M98 626l226-236q16-16 16-40 0-22-16-38l-226-236q-16-16-40-16t-40 16q-36 36 0 80l186 194-186 196q-36 44 0 80 16 16 41 16t39-16z" horiz-adv-x="340" />
|
24 |
+
|
25 |
+
<glyph glyph-name="up" unicode="" d="M564 280q16-16 16-41t-16-41q-38-38-78 0l-196 188-196-188q-40-38-78 0-16 16-16 41t16 41l234 224q16 16 40 16t40-16z" horiz-adv-x="580" />
|
26 |
+
|
27 |
+
<glyph glyph-name="sync" unicode="" d="M843 261q0-3 0-4-36-150-150-243t-267-93q-81 0-157 31t-136 88l-72-72q-11-11-25-11t-25 11-11 25v250q0 14 11 25t25 11h250q14 0 25-11t10-25-10-25l-77-77q40-36 90-57t105-20q74 0 139 37t104 99q6 10 30 66 4 13 16 13h107q8 0 13-6t5-12z m14 446v-250q0-14-10-25t-26-11h-250q-14 0-25 11t-10 25 10 25l77 77q-82 77-194 77-75 0-140-37t-104-99q-6-10-29-66-5-13-17-13h-111q-7 0-13 6t-5 12v4q36 150 151 243t268 93q81 0 158-31t137-88l72 72q11 11 25 11t26-11 10-25z" horiz-adv-x="857.1" />
|
28 |
+
|
29 |
+
<glyph glyph-name="globe" unicode="" d="M480 830q200 0 340-141t140-339q0-200-140-340t-340-140q-198 0-339 140t-141 340q0 198 141 339t339 141z m410-480q0 132-78 239t-202 149q-18-24-16-32 4-38 18-51t30-7l32 12t20 2q22-24 0-47t-45-56-1-77q34-64 96-64 28-2 43-36t17-66q10-80-14-140-22-44 14-76 86 112 86 250z m-466 404q-112-14-199-84t-127-174q6 0 22-2t28-3 26-4 24-8 12-13q4-12-14-45t-18-61q0-30 38-56t38-46q0-28 8-68t8-44q0-12 36-54t52-42q10 0 11 22t-2 54-3 40q0 32 14 74 12 42 59 70t55 46q16 34 9 61t-17 43-34 28-41 17-37 9-22 4q-16 6-42 7t-36-3-27 11-17 29q0 10 15 27t35 37 28 30q8 14 17 21t22 16 27 21q4 4 25 17t27 23z m-72-794q66-20 128-20 128 0 226 68-26 44-118 34-24-2-65-17t-47-17q-74-16-76-16-12-2-26-14t-22-18z" horiz-adv-x="960" />
|
30 |
+
|
31 |
+
<glyph glyph-name="picture" unicode="" d="M0-68l0 836 1000 0 0-836-1000 0z m76 78l848 0 0 680-848 0 0-680z m90 80l0 59 150 195 102-86 193 291 223-228 0-231-668 0z m0 416q0 37 24 62t62 24q33 0 58-24t24-62q0-33-24-57t-58-25q-37 0-62 25t-24 57z" horiz-adv-x="1000" />
|
32 |
+
|
33 |
+
<glyph glyph-name="check" unicode="" d="M249 0q-34 0-56 28l-180 236q-16 24-12 52t26 46 51 14 47-28l118-154 296 474q16 24 43 30t53-8q24-16 30-43t-8-53l-350-560q-20-32-56-32z" horiz-adv-x="667" />
|
34 |
+
|
35 |
+
<glyph glyph-name="dot-3" unicode="" d="M110 460q46 0 78-32t32-78q0-44-32-77t-78-33-78 33-32 77q0 46 32 78t78 32z m350 0q46 0 78-32t32-78q0-44-33-77t-77-33-77 33-33 77q0 46 32 78t78 32z m350 0q46 0 78-32t32-78q0-44-32-77t-78-33-78 33-32 77q0 46 32 78t78 32z" horiz-adv-x="920" />
|
36 |
+
|
37 |
+
<glyph glyph-name="arrow-combo" unicode="" d="M230 850l230-364-460 0z m0-1000l-230 366 460 0z" horiz-adv-x="460" />
|
38 |
+
|
39 |
+
<glyph glyph-name="arrow-down" unicode="" d="M540 587l-269-473-271 473 540 0z" horiz-adv-x="540" />
|
40 |
+
|
41 |
+
<glyph glyph-name="arrow-up" unicode="" d="M0 114l269 473 271-473-540 0z" horiz-adv-x="540" />
|
42 |
+
|
43 |
+
<glyph glyph-name="search" unicode="" d="M772 78q30-34 6-62l-46-46q-36-32-68 0l-190 190q-74-42-156-42-128 0-223 95t-95 223 90 219 218 91 224-95 96-223q0-88-46-162z m-678 358q0-88 68-156t156-68 151 63 63 153q0 88-68 155t-156 67-151-63-63-151z" horiz-adv-x="789" />
|
44 |
+
|
45 |
+
<glyph glyph-name="link-ext" unicode="" d="M786 332v-178q0-67-47-114t-114-47h-464q-67 0-114 47t-47 114v464q0 66 47 113t114 48h393q7 0 12-5t5-13v-36q0-8-5-13t-12-5h-393q-37 0-63-26t-27-63v-464q0-37 27-63t63-27h464q37 0 63 27t26 63v178q0 8 5 13t13 5h36q8 0 13-5t5-13z m214 482v-285q0-15-11-25t-25-11-25 11l-98 98-364-364q-5-6-13-6t-12 6l-64 64q-6 5-6 12t6 13l364 364-98 98q-11 11-11 25t11 25 25 11h285q15 0 25-11t11-25z" horiz-adv-x="1000" />
|
46 |
+
</font>
|
47 |
+
</defs>
|
48 |
+
</svg>
|
shared/assets/plugins/advanced-custom-fields/assets/font/acf.ttf
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/font/acf.woff
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/font/acf.woff2
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/font/config.json
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "acf",
|
3 |
+
"css_prefix_text": "acf-icon-",
|
4 |
+
"css_use_suffix": false,
|
5 |
+
"hinting": true,
|
6 |
+
"units_per_em": 1000,
|
7 |
+
"ascent": 850,
|
8 |
+
"glyphs": [
|
9 |
+
{
|
10 |
+
"uid": "a73c5deb486c8d66249811642e5d719a",
|
11 |
+
"css": "sync",
|
12 |
+
"code": 59401,
|
13 |
+
"src": "fontawesome"
|
14 |
+
},
|
15 |
+
{
|
16 |
+
"uid": "7222571caa5c15f83dcfd447c58d68d9",
|
17 |
+
"css": "search",
|
18 |
+
"code": 59409,
|
19 |
+
"src": "entypo"
|
20 |
+
},
|
21 |
+
{
|
22 |
+
"uid": "14017aae737730faeda4a6fd8fb3a5f0",
|
23 |
+
"css": "check",
|
24 |
+
"code": 59404,
|
25 |
+
"src": "entypo"
|
26 |
+
},
|
27 |
+
{
|
28 |
+
"uid": "c709da589c923ba3c2ad48d9fc563e93",
|
29 |
+
"css": "cancel",
|
30 |
+
"code": 59394,
|
31 |
+
"src": "entypo"
|
32 |
+
},
|
33 |
+
{
|
34 |
+
"uid": "70370693ada58ef0a60fa0984fe8d52a",
|
35 |
+
"css": "plus",
|
36 |
+
"code": 59392,
|
37 |
+
"src": "entypo"
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"uid": "1256e3054823e304d7e452a589cf8bb8",
|
41 |
+
"css": "minus",
|
42 |
+
"code": 59393,
|
43 |
+
"src": "entypo"
|
44 |
+
},
|
45 |
+
{
|
46 |
+
"uid": "a42b598e4298f3319b25a2702a02e7ff",
|
47 |
+
"css": "location",
|
48 |
+
"code": 59396,
|
49 |
+
"src": "entypo"
|
50 |
+
},
|
51 |
+
{
|
52 |
+
"uid": "0a3192de65a73ca1501b073ad601f87d",
|
53 |
+
"css": "arrow-combo",
|
54 |
+
"code": 59406,
|
55 |
+
"src": "entypo"
|
56 |
+
},
|
57 |
+
{
|
58 |
+
"uid": "8704cd847a47b64265b8bb110c8b4d62",
|
59 |
+
"css": "down",
|
60 |
+
"code": 59397,
|
61 |
+
"src": "entypo"
|
62 |
+
},
|
63 |
+
{
|
64 |
+
"uid": "c311c48d79488965b0fab7f9cd12b6b5",
|
65 |
+
"css": "left",
|
66 |
+
"code": 59398,
|
67 |
+
"src": "entypo"
|
68 |
+
},
|
69 |
+
{
|
70 |
+
"uid": "749e7d90a9182938180f1d2d8c33584e",
|
71 |
+
"css": "right",
|
72 |
+
"code": 59399,
|
73 |
+
"src": "entypo"
|
74 |
+
},
|
75 |
+
{
|
76 |
+
"uid": "9c7ff134960bb5a82404e4aeaab366d9",
|
77 |
+
"css": "up",
|
78 |
+
"code": 59400,
|
79 |
+
"src": "entypo"
|
80 |
+
},
|
81 |
+
{
|
82 |
+
"uid": "6a12c2b74456ea21cc984e11dec227a1",
|
83 |
+
"css": "globe",
|
84 |
+
"code": 59402,
|
85 |
+
"src": "entypo"
|
86 |
+
},
|
87 |
+
{
|
88 |
+
"uid": "d10920db2e79c997c5e783279291970c",
|
89 |
+
"css": "dot-3",
|
90 |
+
"code": 59405,
|
91 |
+
"src": "entypo"
|
92 |
+
},
|
93 |
+
{
|
94 |
+
"uid": "1e77a2yvsq3owssduo2lcgsiven57iv5",
|
95 |
+
"css": "pencil",
|
96 |
+
"code": 59395,
|
97 |
+
"src": "typicons"
|
98 |
+
},
|
99 |
+
{
|
100 |
+
"uid": "8ax1xqcbzz1hobyd4i7f0unwib1bztip",
|
101 |
+
"css": "arrow-down",
|
102 |
+
"code": 59407,
|
103 |
+
"src": "modernpics"
|
104 |
+
},
|
105 |
+
{
|
106 |
+
"uid": "6ipws8y9gej6vbloufvhi5qux7rluf64",
|
107 |
+
"css": "arrow-up",
|
108 |
+
"code": 59408,
|
109 |
+
"src": "modernpics"
|
110 |
+
},
|
111 |
+
{
|
112 |
+
"uid": "a1be363d4de9be39857893d4134f6215",
|
113 |
+
"css": "picture",
|
114 |
+
"code": 59403,
|
115 |
+
"src": "elusive"
|
116 |
+
},
|
117 |
+
{
|
118 |
+
"uid": "e15f0d620a7897e2035c18c80142f6d9",
|
119 |
+
"css": "link-ext",
|
120 |
+
"code": 61582,
|
121 |
+
"src": "fontawesome"
|
122 |
+
}
|
123 |
+
]
|
124 |
+
}
|
shared/assets/plugins/advanced-custom-fields/assets/images/acf-logo.png
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/images/spinner.gif
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/images/spinner@2x.gif
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/images/ui-bg_highlight-soft_0_ffffff_1x100.png
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_444444_256x240.png
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_DDDDDD_256x240.png
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/jquery-ui.css
ADDED
@@ -0,0 +1,650 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery UI - v1.11.4 - 2016-05-31
|
2 |
+
* http://jqueryui.com
|
3 |
+
* Includes: core.css, datepicker.css, theme.css
|
4 |
+
* 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
|
5 |
+
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
6 |
+
|
7 |
+
/* Layout helpers
|
8 |
+
----------------------------------*/
|
9 |
+
.ui-helper-hidden {
|
10 |
+
display: none;
|
11 |
+
}
|
12 |
+
.ui-helper-hidden-accessible {
|
13 |
+
border: 0;
|
14 |
+
clip: rect(0 0 0 0);
|
15 |
+
height: 1px;
|
16 |
+
margin: -1px;
|
17 |
+
overflow: hidden;
|
18 |
+
padding: 0;
|
19 |
+
position: absolute;
|
20 |
+
width: 1px;
|
21 |
+
}
|
22 |
+
.ui-helper-reset {
|
23 |
+
margin: 0;
|
24 |
+
padding: 0;
|
25 |
+
border: 0;
|
26 |
+
outline: 0;
|
27 |
+
line-height: 1.3;
|
28 |
+
text-decoration: none;
|
29 |
+
font-size: 100%;
|
30 |
+
list-style: none;
|
31 |
+
}
|
32 |
+
.ui-helper-clearfix:before,
|
33 |
+
.ui-helper-clearfix:after {
|
34 |
+
content: "";
|
35 |
+
display: table;
|
36 |
+
border-collapse: collapse;
|
37 |
+
}
|
38 |
+
.ui-helper-clearfix:after {
|
39 |
+
clear: both;
|
40 |
+
}
|
41 |
+
.ui-helper-clearfix {
|
42 |
+
min-height: 0; /* support: IE7 */
|
43 |
+
}
|
44 |
+
.ui-helper-zfix {
|
45 |
+
width: 100%;
|
46 |
+
height: 100%;
|
47 |
+
top: 0;
|
48 |
+
left: 0;
|
49 |
+
position: absolute;
|
50 |
+
opacity: 0;
|
51 |
+
filter:Alpha(Opacity=0); /* support: IE8 */
|
52 |
+
}
|
53 |
+
|
54 |
+
.ui-front {
|
55 |
+
z-index: 100;
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
/* Interaction Cues
|
60 |
+
----------------------------------*/
|
61 |
+
.ui-state-disabled {
|
62 |
+
cursor: default !important;
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
/* Icons
|
67 |
+
----------------------------------*/
|
68 |
+
|
69 |
+
/* states and images */
|
70 |
+
.ui-icon {
|
71 |
+
display: block;
|
72 |
+
text-indent: -99999px;
|
73 |
+
overflow: hidden;
|
74 |
+
background-repeat: no-repeat;
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
/* Misc visuals
|
79 |
+
----------------------------------*/
|
80 |
+
|
81 |
+
/* Overlays */
|
82 |
+
.ui-widget-overlay {
|
83 |
+
position: fixed;
|
84 |
+
top: 0;
|
85 |
+
left: 0;
|
86 |
+
width: 100%;
|
87 |
+
height: 100%;
|
88 |
+
}
|
89 |
+
.ui-datepicker {
|
90 |
+
width: 17em;
|
91 |
+
padding: .2em .2em 0;
|
92 |
+
display: none;
|
93 |
+
}
|
94 |
+
.ui-datepicker .ui-datepicker-header {
|
95 |
+
position: relative;
|
96 |
+
padding: .2em 0;
|
97 |
+
}
|
98 |
+
.ui-datepicker .ui-datepicker-prev,
|
99 |
+
.ui-datepicker .ui-datepicker-next {
|
100 |
+
position: absolute;
|
101 |
+
top: 2px;
|
102 |
+
width: 1.8em;
|
103 |
+
height: 1.8em;
|
104 |
+
}
|
105 |
+
.ui-datepicker .ui-datepicker-prev-hover,
|
106 |
+
.ui-datepicker .ui-datepicker-next-hover {
|
107 |
+
top: 1px;
|
108 |
+
}
|
109 |
+
.ui-datepicker .ui-datepicker-prev {
|
110 |
+
left: 2px;
|
111 |
+
}
|
112 |
+
.ui-datepicker .ui-datepicker-next {
|
113 |
+
right: 2px;
|
114 |
+
}
|
115 |
+
.ui-datepicker .ui-datepicker-prev-hover {
|
116 |
+
left: 1px;
|
117 |
+
}
|
118 |
+
.ui-datepicker .ui-datepicker-next-hover {
|
119 |
+
right: 1px;
|
120 |
+
}
|
121 |
+
.ui-datepicker .ui-datepicker-prev span,
|
122 |
+
.ui-datepicker .ui-datepicker-next span {
|
123 |
+
display: block;
|
124 |
+
position: absolute;
|
125 |
+
left: 50%;
|
126 |
+
margin-left: -8px;
|
127 |
+
top: 50%;
|
128 |
+
margin-top: -8px;
|
129 |
+
}
|
130 |
+
.ui-datepicker .ui-datepicker-title {
|
131 |
+
margin: 0 2.3em;
|
132 |
+
line-height: 1.8em;
|
133 |
+
text-align: center;
|
134 |
+
}
|
135 |
+
.ui-datepicker .ui-datepicker-title select {
|
136 |
+
font-size: 1em;
|
137 |
+
margin: 1px 0;
|
138 |
+
}
|
139 |
+
.ui-datepicker select.ui-datepicker-month,
|
140 |
+
.ui-datepicker select.ui-datepicker-year {
|
141 |
+
width: 45%;
|
142 |
+
}
|
143 |
+
.ui-datepicker table {
|
144 |
+
width: 100%;
|
145 |
+
font-size: .9em;
|
146 |
+
border-collapse: collapse;
|
147 |
+
margin: 0 0 .4em;
|
148 |
+
}
|
149 |
+
.ui-datepicker th {
|
150 |
+
padding: .7em .3em;
|
151 |
+
text-align: center;
|
152 |
+
font-weight: bold;
|
153 |
+
border: 0;
|
154 |
+
}
|
155 |
+
.ui-datepicker td {
|
156 |
+
border: 0;
|
157 |
+
padding: 1px;
|
158 |
+
}
|
159 |
+
.ui-datepicker td span,
|
160 |
+
.ui-datepicker td a {
|
161 |
+
display: block;
|
162 |
+
padding: .2em;
|
163 |
+
text-align: right;
|
164 |
+
text-decoration: none;
|
165 |
+
}
|
166 |
+
.ui-datepicker .ui-datepicker-buttonpane {
|
167 |
+
background-image: none;
|
168 |
+
margin: .7em 0 0 0;
|
169 |
+
padding: 0 .2em;
|
170 |
+
border-left: 0;
|
171 |
+
border-right: 0;
|
172 |
+
border-bottom: 0;
|
173 |
+
}
|
174 |
+
.ui-datepicker .ui-datepicker-buttonpane button {
|
175 |
+
float: right;
|
176 |
+
margin: .5em .2em .4em;
|
177 |
+
cursor: pointer;
|
178 |
+
padding: .2em .6em .3em .6em;
|
179 |
+
width: auto;
|
180 |
+
overflow: visible;
|
181 |
+
}
|
182 |
+
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
|
183 |
+
float: left;
|
184 |
+
}
|
185 |
+
|
186 |
+
/* with multiple calendars */
|
187 |
+
.ui-datepicker.ui-datepicker-multi {
|
188 |
+
width: auto;
|
189 |
+
}
|
190 |
+
.ui-datepicker-multi .ui-datepicker-group {
|
191 |
+
float: left;
|
192 |
+
}
|
193 |
+
.ui-datepicker-multi .ui-datepicker-group table {
|
194 |
+
width: 95%;
|
195 |
+
margin: 0 auto .4em;
|
196 |
+
}
|
197 |
+
.ui-datepicker-multi-2 .ui-datepicker-group {
|
198 |
+
width: 50%;
|
199 |
+
}
|
200 |
+
.ui-datepicker-multi-3 .ui-datepicker-group {
|
201 |
+
width: 33.3%;
|
202 |
+
}
|
203 |
+
.ui-datepicker-multi-4 .ui-datepicker-group {
|
204 |
+
width: 25%;
|
205 |
+
}
|
206 |
+
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
|
207 |
+
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
|
208 |
+
border-left-width: 0;
|
209 |
+
}
|
210 |
+
.ui-datepicker-multi .ui-datepicker-buttonpane {
|
211 |
+
clear: left;
|
212 |
+
}
|
213 |
+
.ui-datepicker-row-break {
|
214 |
+
clear: both;
|
215 |
+
width: 100%;
|
216 |
+
font-size: 0;
|
217 |
+
}
|
218 |
+
|
219 |
+
/* RTL support */
|
220 |
+
.ui-datepicker-rtl {
|
221 |
+
direction: rtl;
|
222 |
+
}
|
223 |
+
.ui-datepicker-rtl .ui-datepicker-prev {
|
224 |
+
right: 2px;
|
225 |
+
left: auto;
|
226 |
+
}
|
227 |
+
.ui-datepicker-rtl .ui-datepicker-next {
|
228 |
+
left: 2px;
|
229 |
+
right: auto;
|
230 |
+
}
|
231 |
+
.ui-datepicker-rtl .ui-datepicker-prev:hover {
|
232 |
+
right: 1px;
|
233 |
+
left: auto;
|
234 |
+
}
|
235 |
+
.ui-datepicker-rtl .ui-datepicker-next:hover {
|
236 |
+
left: 1px;
|
237 |
+
right: auto;
|
238 |
+
}
|
239 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane {
|
240 |
+
clear: right;
|
241 |
+
}
|
242 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
|
243 |
+
float: left;
|
244 |
+
}
|
245 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
|
246 |
+
.ui-datepicker-rtl .ui-datepicker-group {
|
247 |
+
float: right;
|
248 |
+
}
|
249 |
+
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
|
250 |
+
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
|
251 |
+
border-right-width: 0;
|
252 |
+
border-left-width: 1px;
|
253 |
+
}
|
254 |
+
|
255 |
+
/* Component containers
|
256 |
+
----------------------------------*/
|
257 |
+
.acf-ui-datepicker .ui-widget {
|
258 |
+
font-family: inherit;
|
259 |
+
font-size: 14px;
|
260 |
+
}
|
261 |
+
.acf-ui-datepicker .ui-widget .ui-widget {
|
262 |
+
font-size: 1em;
|
263 |
+
}
|
264 |
+
.acf-ui-datepicker .ui-widget input,
|
265 |
+
.acf-ui-datepicker .ui-widget select,
|
266 |
+
.acf-ui-datepicker .ui-widget textarea,
|
267 |
+
.acf-ui-datepicker .ui-widget button {
|
268 |
+
font-family: inherit;
|
269 |
+
font-size: 1em;
|
270 |
+
}
|
271 |
+
.acf-ui-datepicker .ui-widget-content {
|
272 |
+
border: 1px solid #E1E1E1;
|
273 |
+
background: #ffffff;
|
274 |
+
color: #444444;
|
275 |
+
}
|
276 |
+
.acf-ui-datepicker .ui-widget-content a {
|
277 |
+
color: #444444;
|
278 |
+
}
|
279 |
+
.acf-ui-datepicker .ui-widget-header {
|
280 |
+
border: 1px solid #ffffff;
|
281 |
+
background: #ffffff url("images/ui-bg_highlight-soft_0_ffffff_1x100.png") 50% 50% repeat-x;
|
282 |
+
color: #222222;
|
283 |
+
font-weight: bold;
|
284 |
+
}
|
285 |
+
.acf-ui-datepicker .ui-widget-header a {
|
286 |
+
color: #222222;
|
287 |
+
}
|
288 |
+
|
289 |
+
/* Interaction states
|
290 |
+
----------------------------------*/
|
291 |
+
.acf-ui-datepicker .ui-state-default,
|
292 |
+
.acf-ui-datepicker .ui-widget-content .ui-state-default,
|
293 |
+
.acf-ui-datepicker .ui-widget-header .ui-state-default {
|
294 |
+
border: 1px solid #F0F0F0;
|
295 |
+
background: #F9F9F9;
|
296 |
+
font-weight: normal;
|
297 |
+
color: #444444;
|
298 |
+
}
|
299 |
+
.acf-ui-datepicker .ui-state-default a,
|
300 |
+
.acf-ui-datepicker .ui-state-default a:link,
|
301 |
+
.acf-ui-datepicker .ui-state-default a:visited {
|
302 |
+
color: #444444;
|
303 |
+
text-decoration: none;
|
304 |
+
}
|
305 |
+
.acf-ui-datepicker .ui-state-hover,
|
306 |
+
.acf-ui-datepicker .ui-widget-content .ui-state-hover,
|
307 |
+
.acf-ui-datepicker .ui-widget-header .ui-state-hover,
|
308 |
+
.acf-ui-datepicker .ui-state-focus,
|
309 |
+
.acf-ui-datepicker .ui-widget-content .ui-state-focus,
|
310 |
+
.acf-ui-datepicker .ui-widget-header .ui-state-focus {
|
311 |
+
border: 1px solid #98b7e8;
|
312 |
+
background: #98b7e8;
|
313 |
+
font-weight: normal;
|
314 |
+
color: #ffffff;
|
315 |
+
}
|
316 |
+
.acf-ui-datepicker .ui-state-hover a,
|
317 |
+
.acf-ui-datepicker .ui-state-hover a:hover,
|
318 |
+
.acf-ui-datepicker .ui-state-hover a:link,
|
319 |
+
.acf-ui-datepicker .ui-state-hover a:visited,
|
320 |
+
.acf-ui-datepicker .ui-state-focus a,
|
321 |
+
.acf-ui-datepicker .ui-state-focus a:hover,
|
322 |
+
.acf-ui-datepicker .ui-state-focus a:link,
|
323 |
+
.acf-ui-datepicker .ui-state-focus a:visited {
|
324 |
+
color: #ffffff;
|
325 |
+
text-decoration: none;
|
326 |
+
}
|
327 |
+
.acf-ui-datepicker .ui-state-active,
|
328 |
+
.acf-ui-datepicker .ui-widget-content .ui-state-active,
|
329 |
+
.acf-ui-datepicker .ui-widget-header .ui-state-active {
|
330 |
+
border: 1px solid #3875d7;
|
331 |
+
background: #3875d7;
|
332 |
+
font-weight: normal;
|
333 |
+
color: #ffffff;
|
334 |
+
}
|
335 |
+
.acf-ui-datepicker .ui-state-active a,
|
336 |
+
.acf-ui-datepicker .ui-state-active a:link,
|
337 |
+
.acf-ui-datepicker .ui-state-active a:visited {
|
338 |
+
color: #ffffff;
|
339 |
+
text-decoration: none;
|
340 |
+
}
|
341 |
+
|
342 |
+
/* Interaction Cues
|
343 |
+
----------------------------------*/
|
344 |
+
.acf-ui-datepicker .ui-state-highlight,
|
345 |
+
.acf-ui-datepicker .ui-widget-content .ui-state-highlight,
|
346 |
+
.acf-ui-datepicker .ui-widget-header .ui-state-highlight {
|
347 |
+
border: 1px solid #aaaaaa;
|
348 |
+
background: #ffffff;
|
349 |
+
color: #444444;
|
350 |
+
}
|
351 |
+
.acf-ui-datepicker .ui-state-highlight a,
|
352 |
+
.acf-ui-datepicker .ui-widget-content .ui-state-highlight a,
|
353 |
+
.acf-ui-datepicker .ui-widget-header .ui-state-highlight a {
|
354 |
+
color: #444444;
|
355 |
+
}
|
356 |
+
.acf-ui-datepicker .ui-state-error,
|
357 |
+
.acf-ui-datepicker .ui-widget-content .ui-state-error,
|
358 |
+
.acf-ui-datepicker .ui-widget-header .ui-state-error {
|
359 |
+
border: 1px solid #E14D43;
|
360 |
+
background: #E14D43;
|
361 |
+
color: #ffffff;
|
362 |
+
}
|
363 |
+
.acf-ui-datepicker .ui-state-error a,
|
364 |
+
.acf-ui-datepicker .ui-widget-content .ui-state-error a,
|
365 |
+
.acf-ui-datepicker .ui-widget-header .ui-state-error a {
|
366 |
+
color: #ffffff;
|
367 |
+
}
|
368 |
+
.acf-ui-datepicker .ui-state-error-text,
|
369 |
+
.acf-ui-datepicker .ui-widget-content .ui-state-error-text,
|
370 |
+
.acf-ui-datepicker .ui-widget-header .ui-state-error-text {
|
371 |
+
color: #ffffff;
|
372 |
+
}
|
373 |
+
.acf-ui-datepicker .ui-priority-primary,
|
374 |
+
.acf-ui-datepicker .ui-widget-content .ui-priority-primary,
|
375 |
+
.acf-ui-datepicker .ui-widget-header .ui-priority-primary {
|
376 |
+
font-weight: bold;
|
377 |
+
}
|
378 |
+
.acf-ui-datepicker .ui-priority-secondary,
|
379 |
+
.acf-ui-datepicker .ui-widget-content .ui-priority-secondary,
|
380 |
+
.acf-ui-datepicker .ui-widget-header .ui-priority-secondary {
|
381 |
+
opacity: .7;
|
382 |
+
filter:Alpha(Opacity=70); /* support: IE8 */
|
383 |
+
font-weight: normal;
|
384 |
+
}
|
385 |
+
.acf-ui-datepicker .ui-state-disabled,
|
386 |
+
.acf-ui-datepicker .ui-widget-content .ui-state-disabled,
|
387 |
+
.acf-ui-datepicker .ui-widget-header .ui-state-disabled {
|
388 |
+
opacity: .35;
|
389 |
+
filter:Alpha(Opacity=35); /* support: IE8 */
|
390 |
+
background-image: none;
|
391 |
+
}
|
392 |
+
.acf-ui-datepicker .ui-state-disabled .ui-icon {
|
393 |
+
filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
|
394 |
+
}
|
395 |
+
|
396 |
+
/* Icons
|
397 |
+
----------------------------------*/
|
398 |
+
|
399 |
+
/* states and images */
|
400 |
+
.acf-ui-datepicker .ui-icon {
|
401 |
+
width: 16px;
|
402 |
+
height: 16px;
|
403 |
+
}
|
404 |
+
.acf-ui-datepicker .ui-icon,
|
405 |
+
.acf-ui-datepicker .ui-widget-content .ui-icon {
|
406 |
+
background-image: url("images/ui-icons_444444_256x240.png");
|
407 |
+
}
|
408 |
+
.acf-ui-datepicker .ui-widget-header .ui-icon {
|
409 |
+
background-image: url("images/ui-icons_DDDDDD_256x240.png");
|
410 |
+
}
|
411 |
+
.acf-ui-datepicker .ui-state-default .ui-icon {
|
412 |
+
background-image: url("images/ui-icons_444444_256x240.png");
|
413 |
+
}
|
414 |
+
.acf-ui-datepicker .ui-state-hover .ui-icon,
|
415 |
+
.acf-ui-datepicker .ui-state-focus .ui-icon {
|
416 |
+
background-image: url("images/ui-icons_ffffff_256x240.png");
|
417 |
+
}
|
418 |
+
.acf-ui-datepicker .ui-state-active .ui-icon {
|
419 |
+
background-image: url("images/ui-icons_ffffff_256x240.png");
|
420 |
+
}
|
421 |
+
.acf-ui-datepicker .ui-state-highlight .ui-icon {
|
422 |
+
background-image: url("images/ui-icons_444444_256x240.png");
|
423 |
+
}
|
424 |
+
.acf-ui-datepicker .ui-state-error .ui-icon,
|
425 |
+
.acf-ui-datepicker .ui-state-error-text .ui-icon {
|
426 |
+
background-image: url("images/ui-icons_ffffff_256x240.png");
|
427 |
+
}
|
428 |
+
|
429 |
+
/* positioning */
|
430 |
+
.acf-ui-datepicker .ui-icon-blank { background-position: 16px 16px; }
|
431 |
+
.acf-ui-datepicker .ui-icon-carat-1-n { background-position: 0 0; }
|
432 |
+
.acf-ui-datepicker .ui-icon-carat-1-ne { background-position: -16px 0; }
|
433 |
+
.acf-ui-datepicker .ui-icon-carat-1-e { background-position: -32px 0; }
|
434 |
+
.acf-ui-datepicker .ui-icon-carat-1-se { background-position: -48px 0; }
|
435 |
+
.acf-ui-datepicker .ui-icon-carat-1-s { background-position: -64px 0; }
|
436 |
+
.acf-ui-datepicker .ui-icon-carat-1-sw { background-position: -80px 0; }
|
437 |
+
.acf-ui-datepicker .ui-icon-carat-1-w { background-position: -96px 0; }
|
438 |
+
.acf-ui-datepicker .ui-icon-carat-1-nw { background-position: -112px 0; }
|
439 |
+
.acf-ui-datepicker .ui-icon-carat-2-n-s { background-position: -128px 0; }
|
440 |
+
.acf-ui-datepicker .ui-icon-carat-2-e-w { background-position: -144px 0; }
|
441 |
+
.acf-ui-datepicker .ui-icon-triangle-1-n { background-position: 0 -16px; }
|
442 |
+
.acf-ui-datepicker .ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
443 |
+
.acf-ui-datepicker .ui-icon-triangle-1-e { background-position: -32px -16px; }
|
444 |
+
.acf-ui-datepicker .ui-icon-triangle-1-se { background-position: -48px -16px; }
|
445 |
+
.acf-ui-datepicker .ui-icon-triangle-1-s { background-position: -64px -16px; }
|
446 |
+
.acf-ui-datepicker .ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
447 |
+
.acf-ui-datepicker .ui-icon-triangle-1-w { background-position: -96px -16px; }
|
448 |
+
.acf-ui-datepicker .ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
449 |
+
.acf-ui-datepicker .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
450 |
+
.acf-ui-datepicker .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
451 |
+
.acf-ui-datepicker .ui-icon-arrow-1-n { background-position: 0 -32px; }
|
452 |
+
.acf-ui-datepicker .ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
453 |
+
.acf-ui-datepicker .ui-icon-arrow-1-e { background-position: -32px -32px; }
|
454 |
+
.acf-ui-datepicker .ui-icon-arrow-1-se { background-position: -48px -32px; }
|
455 |
+
.acf-ui-datepicker .ui-icon-arrow-1-s { background-position: -64px -32px; }
|
456 |
+
.acf-ui-datepicker .ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
457 |
+
.acf-ui-datepicker .ui-icon-arrow-1-w { background-position: -96px -32px; }
|
458 |
+
.acf-ui-datepicker .ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
459 |
+
.acf-ui-datepicker .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
460 |
+
.acf-ui-datepicker .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
461 |
+
.acf-ui-datepicker .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
462 |
+
.acf-ui-datepicker .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
463 |
+
.acf-ui-datepicker .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
464 |
+
.acf-ui-datepicker .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
465 |
+
.acf-ui-datepicker .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
466 |
+
.acf-ui-datepicker .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
467 |
+
.acf-ui-datepicker .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
468 |
+
.acf-ui-datepicker .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
469 |
+
.acf-ui-datepicker .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
470 |
+
.acf-ui-datepicker .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
471 |
+
.acf-ui-datepicker .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
472 |
+
.acf-ui-datepicker .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
473 |
+
.acf-ui-datepicker .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
474 |
+
.acf-ui-datepicker .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
475 |
+
.acf-ui-datepicker .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
476 |
+
.acf-ui-datepicker .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
477 |
+
.acf-ui-datepicker .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
478 |
+
.acf-ui-datepicker .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
479 |
+
.acf-ui-datepicker .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
480 |
+
.acf-ui-datepicker .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
481 |
+
.acf-ui-datepicker .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
482 |
+
.acf-ui-datepicker .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
483 |
+
.acf-ui-datepicker .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
484 |
+
.acf-ui-datepicker .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
485 |
+
.acf-ui-datepicker .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
486 |
+
.acf-ui-datepicker .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
487 |
+
.acf-ui-datepicker .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
488 |
+
.acf-ui-datepicker .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
489 |
+
.acf-ui-datepicker .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
490 |
+
.acf-ui-datepicker .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
491 |
+
.acf-ui-datepicker .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
492 |
+
.acf-ui-datepicker .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
493 |
+
.acf-ui-datepicker .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
494 |
+
.acf-ui-datepicker .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
495 |
+
.acf-ui-datepicker .ui-icon-arrow-4 { background-position: 0 -80px; }
|
496 |
+
.acf-ui-datepicker .ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
497 |
+
.acf-ui-datepicker .ui-icon-extlink { background-position: -32px -80px; }
|
498 |
+
.acf-ui-datepicker .ui-icon-newwin { background-position: -48px -80px; }
|
499 |
+
.acf-ui-datepicker .ui-icon-refresh { background-position: -64px -80px; }
|
500 |
+
.acf-ui-datepicker .ui-icon-shuffle { background-position: -80px -80px; }
|
501 |
+
.acf-ui-datepicker .ui-icon-transfer-e-w { background-position: -96px -80px; }
|
502 |
+
.acf-ui-datepicker .ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
503 |
+
.acf-ui-datepicker .ui-icon-folder-collapsed { background-position: 0 -96px; }
|
504 |
+
.acf-ui-datepicker .ui-icon-folder-open { background-position: -16px -96px; }
|
505 |
+
.acf-ui-datepicker .ui-icon-document { background-position: -32px -96px; }
|
506 |
+
.acf-ui-datepicker .ui-icon-document-b { background-position: -48px -96px; }
|
507 |
+
.acf-ui-datepicker .ui-icon-note { background-position: -64px -96px; }
|
508 |
+
.acf-ui-datepicker .ui-icon-mail-closed { background-position: -80px -96px; }
|
509 |
+
.acf-ui-datepicker .ui-icon-mail-open { background-position: -96px -96px; }
|
510 |
+
.acf-ui-datepicker .ui-icon-suitcase { background-position: -112px -96px; }
|
511 |
+
.acf-ui-datepicker .ui-icon-comment { background-position: -128px -96px; }
|
512 |
+
.acf-ui-datepicker .ui-icon-person { background-position: -144px -96px; }
|
513 |
+
.acf-ui-datepicker .ui-icon-print { background-position: -160px -96px; }
|
514 |
+
.acf-ui-datepicker .ui-icon-trash { background-position: -176px -96px; }
|
515 |
+
.acf-ui-datepicker .ui-icon-locked { background-position: -192px -96px; }
|
516 |
+
.acf-ui-datepicker .ui-icon-unlocked { background-position: -208px -96px; }
|
517 |
+
.acf-ui-datepicker .ui-icon-bookmark { background-position: -224px -96px; }
|
518 |
+
.acf-ui-datepicker .ui-icon-tag { background-position: -240px -96px; }
|
519 |
+
.acf-ui-datepicker .ui-icon-home { background-position: 0 -112px; }
|
520 |
+
.acf-ui-datepicker .ui-icon-flag { background-position: -16px -112px; }
|
521 |
+
.acf-ui-datepicker .ui-icon-calendar { background-position: -32px -112px; }
|
522 |
+
.acf-ui-datepicker .ui-icon-cart { background-position: -48px -112px; }
|
523 |
+
.acf-ui-datepicker .ui-icon-pencil { background-position: -64px -112px; }
|
524 |
+
.acf-ui-datepicker .ui-icon-clock { background-position: -80px -112px; }
|
525 |
+
.acf-ui-datepicker .ui-icon-disk { background-position: -96px -112px; }
|
526 |
+
.acf-ui-datepicker .ui-icon-calculator { background-position: -112px -112px; }
|
527 |
+
.acf-ui-datepicker .ui-icon-zoomin { background-position: -128px -112px; }
|
528 |
+
.acf-ui-datepicker .ui-icon-zoomout { background-position: -144px -112px; }
|
529 |
+
.acf-ui-datepicker .ui-icon-search { background-position: -160px -112px; }
|
530 |
+
.acf-ui-datepicker .ui-icon-wrench { background-position: -176px -112px; }
|
531 |
+
.acf-ui-datepicker .ui-icon-gear { background-position: -192px -112px; }
|
532 |
+
.acf-ui-datepicker .ui-icon-heart { background-position: -208px -112px; }
|
533 |
+
.acf-ui-datepicker .ui-icon-star { background-position: -224px -112px; }
|
534 |
+
.acf-ui-datepicker .ui-icon-link { background-position: -240px -112px; }
|
535 |
+
.acf-ui-datepicker .ui-icon-cancel { background-position: 0 -128px; }
|
536 |
+
.acf-ui-datepicker .ui-icon-plus { background-position: -16px -128px; }
|
537 |
+
.acf-ui-datepicker .ui-icon-plusthick { background-position: -32px -128px; }
|
538 |
+
.acf-ui-datepicker .ui-icon-minus { background-position: -48px -128px; }
|
539 |
+
.acf-ui-datepicker .ui-icon-minusthick { background-position: -64px -128px; }
|
540 |
+
.acf-ui-datepicker .ui-icon-close { background-position: -80px -128px; }
|
541 |
+
.acf-ui-datepicker .ui-icon-closethick { background-position: -96px -128px; }
|
542 |
+
.acf-ui-datepicker .ui-icon-key { background-position: -112px -128px; }
|
543 |
+
.acf-ui-datepicker .ui-icon-lightbulb { background-position: -128px -128px; }
|
544 |
+
.acf-ui-datepicker .ui-icon-scissors { background-position: -144px -128px; }
|
545 |
+
.acf-ui-datepicker .ui-icon-clipboard { background-position: -160px -128px; }
|
546 |
+
.acf-ui-datepicker .ui-icon-copy { background-position: -176px -128px; }
|
547 |
+
.acf-ui-datepicker .ui-icon-contact { background-position: -192px -128px; }
|
548 |
+
.acf-ui-datepicker .ui-icon-image { background-position: -208px -128px; }
|
549 |
+
.acf-ui-datepicker .ui-icon-video { background-position: -224px -128px; }
|
550 |
+
.acf-ui-datepicker .ui-icon-script { background-position: -240px -128px; }
|
551 |
+
.acf-ui-datepicker .ui-icon-alert { background-position: 0 -144px; }
|
552 |
+
.acf-ui-datepicker .ui-icon-info { background-position: -16px -144px; }
|
553 |
+
.acf-ui-datepicker .ui-icon-notice { background-position: -32px -144px; }
|
554 |
+
.acf-ui-datepicker .ui-icon-help { background-position: -48px -144px; }
|
555 |
+
.acf-ui-datepicker .ui-icon-check { background-position: -64px -144px; }
|
556 |
+
.acf-ui-datepicker .ui-icon-bullet { background-position: -80px -144px; }
|
557 |
+
.acf-ui-datepicker .ui-icon-radio-on { background-position: -96px -144px; }
|
558 |
+
.acf-ui-datepicker .ui-icon-radio-off { background-position: -112px -144px; }
|
559 |
+
.acf-ui-datepicker .ui-icon-pin-w { background-position: -128px -144px; }
|
560 |
+
.acf-ui-datepicker .ui-icon-pin-s { background-position: -144px -144px; }
|
561 |
+
.acf-ui-datepicker .ui-icon-play { background-position: 0 -160px; }
|
562 |
+
.acf-ui-datepicker .ui-icon-pause { background-position: -16px -160px; }
|
563 |
+
.acf-ui-datepicker .ui-icon-seek-next { background-position: -32px -160px; }
|
564 |
+
.acf-ui-datepicker .ui-icon-seek-prev { background-position: -48px -160px; }
|
565 |
+
.acf-ui-datepicker .ui-icon-seek-end { background-position: -64px -160px; }
|
566 |
+
.acf-ui-datepicker .ui-icon-seek-start { background-position: -80px -160px; }
|
567 |
+
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
568 |
+
.acf-ui-datepicker .ui-icon-seek-first { background-position: -80px -160px; }
|
569 |
+
.acf-ui-datepicker .ui-icon-stop { background-position: -96px -160px; }
|
570 |
+
.acf-ui-datepicker .ui-icon-eject { background-position: -112px -160px; }
|
571 |
+
.acf-ui-datepicker .ui-icon-volume-off { background-position: -128px -160px; }
|
572 |
+
.acf-ui-datepicker .ui-icon-volume-on { background-position: -144px -160px; }
|
573 |
+
.acf-ui-datepicker .ui-icon-power { background-position: 0 -176px; }
|
574 |
+
.acf-ui-datepicker .ui-icon-signal-diag { background-position: -16px -176px; }
|
575 |
+
.acf-ui-datepicker .ui-icon-signal { background-position: -32px -176px; }
|
576 |
+
.acf-ui-datepicker .ui-icon-battery-0 { background-position: -48px -176px; }
|
577 |
+
.acf-ui-datepicker .ui-icon-battery-1 { background-position: -64px -176px; }
|
578 |
+
.acf-ui-datepicker .ui-icon-battery-2 { background-position: -80px -176px; }
|
579 |
+
.acf-ui-datepicker .ui-icon-battery-3 { background-position: -96px -176px; }
|
580 |
+
.acf-ui-datepicker .ui-icon-circle-plus { background-position: 0 -192px; }
|
581 |
+
.acf-ui-datepicker .ui-icon-circle-minus { background-position: -16px -192px; }
|
582 |
+
.acf-ui-datepicker .ui-icon-circle-close { background-position: -32px -192px; }
|
583 |
+
.acf-ui-datepicker .ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
584 |
+
.acf-ui-datepicker .ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
585 |
+
.acf-ui-datepicker .ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
586 |
+
.acf-ui-datepicker .ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
587 |
+
.acf-ui-datepicker .ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
588 |
+
.acf-ui-datepicker .ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
589 |
+
.acf-ui-datepicker .ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
590 |
+
.acf-ui-datepicker .ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
591 |
+
.acf-ui-datepicker .ui-icon-circle-zoomin { background-position: -176px -192px; }
|
592 |
+
.acf-ui-datepicker .ui-icon-circle-zoomout { background-position: -192px -192px; }
|
593 |
+
.acf-ui-datepicker .ui-icon-circle-check { background-position: -208px -192px; }
|
594 |
+
.acf-ui-datepicker .ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
595 |
+
.acf-ui-datepicker .ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
596 |
+
.acf-ui-datepicker .ui-icon-circlesmall-close { background-position: -32px -208px; }
|
597 |
+
.acf-ui-datepicker .ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
598 |
+
.acf-ui-datepicker .ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
599 |
+
.acf-ui-datepicker .ui-icon-squaresmall-close { background-position: -80px -208px; }
|
600 |
+
.acf-ui-datepicker .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
601 |
+
.acf-ui-datepicker .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
602 |
+
.acf-ui-datepicker .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
603 |
+
.acf-ui-datepicker .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
604 |
+
.acf-ui-datepicker .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
605 |
+
.acf-ui-datepicker .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
606 |
+
|
607 |
+
|
608 |
+
/* Misc visuals
|
609 |
+
----------------------------------*/
|
610 |
+
|
611 |
+
/* Corner radius */
|
612 |
+
.acf-ui-datepicker .ui-corner-all,
|
613 |
+
.acf-ui-datepicker .ui-corner-top,
|
614 |
+
.acf-ui-datepicker .ui-corner-left,
|
615 |
+
.acf-ui-datepicker .ui-corner-tl {
|
616 |
+
border-top-left-radius: 3;
|
617 |
+
}
|
618 |
+
.acf-ui-datepicker .ui-corner-all,
|
619 |
+
.acf-ui-datepicker .ui-corner-top,
|
620 |
+
.acf-ui-datepicker .ui-corner-right,
|
621 |
+
.acf-ui-datepicker .ui-corner-tr {
|
622 |
+
border-top-right-radius: 3;
|
623 |
+
}
|
624 |
+
.acf-ui-datepicker .ui-corner-all,
|
625 |
+
.acf-ui-datepicker .ui-corner-bottom,
|
626 |
+
.acf-ui-datepicker .ui-corner-left,
|
627 |
+
.acf-ui-datepicker .ui-corner-bl {
|
628 |
+
border-bottom-left-radius: 3;
|
629 |
+
}
|
630 |
+
.acf-ui-datepicker .ui-corner-all,
|
631 |
+
.acf-ui-datepicker .ui-corner-bottom,
|
632 |
+
.acf-ui-datepicker .ui-corner-right,
|
633 |
+
.acf-ui-datepicker .ui-corner-br {
|
634 |
+
border-bottom-right-radius: 3;
|
635 |
+
}
|
636 |
+
|
637 |
+
/* Overlays */
|
638 |
+
.acf-ui-datepicker .ui-widget-overlay {
|
639 |
+
background: #ffffff;
|
640 |
+
opacity: .3;
|
641 |
+
filter: Alpha(Opacity=30); /* support: IE8 */
|
642 |
+
}
|
643 |
+
.acf-ui-datepicker .ui-widget-shadow {
|
644 |
+
margin: -8px 0 0 -8px;
|
645 |
+
padding: 8px;
|
646 |
+
background: #aaaaaa;
|
647 |
+
opacity: .3;
|
648 |
+
filter: Alpha(Opacity=30); /* support: IE8 */
|
649 |
+
border-radius: 8px;
|
650 |
+
}
|
shared/assets/plugins/advanced-custom-fields/assets/inc/datepicker/jquery-ui.min.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery UI - v1.11.4 - 2016-05-31
|
2 |
+
* http://jqueryui.com
|
3 |
+
* Includes: core.css, datepicker.css, theme.css
|
4 |
+
* 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
|
5 |
+
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
6 |
+
|
7 |
+
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.acf-ui-datepicker .ui-widget{font-family:inherit;font-size:14px}.acf-ui-datepicker .ui-widget .ui-widget{font-size:1em}.acf-ui-datepicker .ui-widget input,.acf-ui-datepicker .ui-widget select,.acf-ui-datepicker .ui-widget textarea,.acf-ui-datepicker .ui-widget button{font-family:inherit;font-size:1em}.acf-ui-datepicker .ui-widget-content{border:1px solid #E1E1E1;background:#fff;color:#444}.acf-ui-datepicker .ui-widget-content a{color:#444}.acf-ui-datepicker .ui-widget-header{border:1px solid #fff;background:#fff url("images/ui-bg_highlight-soft_0_ffffff_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.acf-ui-datepicker .ui-widget-header a{color:#222}.acf-ui-datepicker .ui-state-default,.acf-ui-datepicker .ui-widget-content .ui-state-default,.acf-ui-datepicker .ui-widget-header .ui-state-default{border:1px solid #F0F0F0;background:#F9F9F9;font-weight:normal;color:#444}.acf-ui-datepicker .ui-state-default a,.acf-ui-datepicker .ui-state-default a:link,.acf-ui-datepicker .ui-state-default a:visited{color:#444;text-decoration:none}.acf-ui-datepicker .ui-state-hover,.acf-ui-datepicker .ui-widget-content .ui-state-hover,.acf-ui-datepicker .ui-widget-header .ui-state-hover,.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 #98b7e8;background:#98b7e8;font-weight:normal;color:#fff}.acf-ui-datepicker .ui-state-hover a,.acf-ui-datepicker .ui-state-hover a:hover,.acf-ui-datepicker .ui-state-hover a:link,.acf-ui-datepicker .ui-state-hover a:visited,.acf-ui-datepicker .ui-state-focus a,.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:#fff;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 #3875d7;background:#3875d7;font-weight:normal;color:#fff}.acf-ui-datepicker .ui-state-active a,.acf-ui-datepicker .ui-state-active a:link,.acf-ui-datepicker .ui-state-active a:visited{color:#fff;text-decoration:none}.acf-ui-datepicker .ui-state-highlight,.acf-ui-datepicker .ui-widget-content .ui-state-highlight,.acf-ui-datepicker .ui-widget-header .ui-state-highlight{border:1px solid #aaa;background:#fff;color:#444}.acf-ui-datepicker .ui-state-highlight a,.acf-ui-datepicker .ui-widget-content .ui-state-highlight a,.acf-ui-datepicker .ui-widget-header .ui-state-highlight a{color:#444}.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 #E14D43;background:#E14D43;color:#fff}.acf-ui-datepicker .ui-state-error a,.acf-ui-datepicker .ui-widget-content .ui-state-error a,.acf-ui-datepicker .ui-widget-header .ui-state-error a{color:#fff}.acf-ui-datepicker .ui-state-error-text,.acf-ui-datepicker .ui-widget-content .ui-state-error-text,.acf-ui-datepicker .ui-widget-header .ui-state-error-text{color:#fff}.acf-ui-datepicker .ui-priority-primary,.acf-ui-datepicker .ui-widget-content .ui-priority-primary,.acf-ui-datepicker .ui-widget-header .ui-priority-primary{font-weight:bold}.acf-ui-datepicker .ui-priority-secondary,.acf-ui-datepicker .ui-widget-content .ui-priority-secondary,.acf-ui-datepicker .ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);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);background-image:none}.acf-ui-datepicker .ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.acf-ui-datepicker .ui-icon{width:16px;height:16px}.acf-ui-datepicker .ui-icon,.acf-ui-datepicker .ui-widget-content .ui-icon{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")}.acf-ui-datepicker .ui-state-default .ui-icon{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_ffffff_256x240.png")}.acf-ui-datepicker .ui-state-active .ui-icon{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")}.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")}.acf-ui-datepicker .ui-icon-blank{background-position:16px 16px}.acf-ui-datepicker .ui-icon-carat-1-n{background-position:0 0}.acf-ui-datepicker .ui-icon-carat-1-ne{background-position:-16px 0}.acf-ui-datepicker .ui-icon-carat-1-e{background-position:-32px 0}.acf-ui-datepicker .ui-icon-carat-1-se{background-position:-48px 0}.acf-ui-datepicker .ui-icon-carat-1-s{background-position:-64px 0}.acf-ui-datepicker .ui-icon-carat-1-sw{background-position:-80px 0}.acf-ui-datepicker .ui-icon-carat-1-w{background-position:-96px 0}.acf-ui-datepicker .ui-icon-carat-1-nw{background-position:-112px 0}.acf-ui-datepicker .ui-icon-carat-2-n-s{background-position:-128px 0}.acf-ui-datepicker .ui-icon-carat-2-e-w{background-position:-144px 0}.acf-ui-datepicker .ui-icon-triangle-1-n{background-position:0 -16px}.acf-ui-datepicker .ui-icon-triangle-1-ne{background-position:-16px -16px}.acf-ui-datepicker .ui-icon-triangle-1-e{background-position:-32px -16px}.acf-ui-datepicker .ui-icon-triangle-1-se{background-position:-48px -16px}.acf-ui-datepicker .ui-icon-triangle-1-s{background-position:-64px -16px}.acf-ui-datepicker .ui-icon-triangle-1-sw{background-position:-80px -16px}.acf-ui-datepicker .ui-icon-triangle-1-w{background-position:-96px -16px}.acf-ui-datepicker .ui-icon-triangle-1-nw{background-position:-112px -16px}.acf-ui-datepicker .ui-icon-triangle-2-n-s{background-position:-128px -16px}.acf-ui-datepicker .ui-icon-triangle-2-e-w{background-position:-144px -16px}.acf-ui-datepicker .ui-icon-arrow-1-n{background-position:0 -32px}.acf-ui-datepicker .ui-icon-arrow-1-ne{background-position:-16px -32px}.acf-ui-datepicker .ui-icon-arrow-1-e{background-position:-32px -32px}.acf-ui-datepicker .ui-icon-arrow-1-se{background-position:-48px -32px}.acf-ui-datepicker .ui-icon-arrow-1-s{background-position:-64px -32px}.acf-ui-datepicker .ui-icon-arrow-1-sw{background-position:-80px -32px}.acf-ui-datepicker .ui-icon-arrow-1-w{background-position:-96px -32px}.acf-ui-datepicker .ui-icon-arrow-1-nw{background-position:-112px -32px}.acf-ui-datepicker .ui-icon-arrow-2-n-s{background-position:-128px -32px}.acf-ui-datepicker .ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.acf-ui-datepicker .ui-icon-arrow-2-e-w{background-position:-160px -32px}.acf-ui-datepicker .ui-icon-arrow-2-se-nw{background-position:-176px -32px}.acf-ui-datepicker .ui-icon-arrowstop-1-n{background-position:-192px -32px}.acf-ui-datepicker .ui-icon-arrowstop-1-e{background-position:-208px -32px}.acf-ui-datepicker .ui-icon-arrowstop-1-s{background-position:-224px -32px}.acf-ui-datepicker .ui-icon-arrowstop-1-w{background-position:-240px -32px}.acf-ui-datepicker .ui-icon-arrowthick-1-n{background-position:0 -48px}.acf-ui-datepicker .ui-icon-arrowthick-1-ne{background-position:-16px -48px}.acf-ui-datepicker .ui-icon-arrowthick-1-e{background-position:-32px -48px}.acf-ui-datepicker .ui-icon-arrowthick-1-se{background-position:-48px -48px}.acf-ui-datepicker .ui-icon-arrowthick-1-s{background-position:-64px -48px}.acf-ui-datepicker .ui-icon-arrowthick-1-sw{background-position:-80px -48px}.acf-ui-datepicker .ui-icon-arrowthick-1-w{background-position:-96px -48px}.acf-ui-datepicker .ui-icon-arrowthick-1-nw{background-position:-112px -48px}.acf-ui-datepicker .ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.acf-ui-datepicker .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.acf-ui-datepicker .ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.acf-ui-datepicker .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.acf-ui-datepicker .ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.acf-ui-datepicker .ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.acf-ui-datepicker .ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.acf-ui-datepicker .ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.acf-ui-datepicker .ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.acf-ui-datepicker .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.acf-ui-datepicker .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.acf-ui-datepicker .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.acf-ui-datepicker .ui-icon-arrowreturn-1-w{background-position:-64px -64px}.acf-ui-datepicker .ui-icon-arrowreturn-1-n{background-position:-80px -64px}.acf-ui-datepicker .ui-icon-arrowreturn-1-e{background-position:-96px -64px}.acf-ui-datepicker .ui-icon-arrowreturn-1-s{background-position:-112px -64px}.acf-ui-datepicker .ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.acf-ui-datepicker .ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.acf-ui-datepicker .ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.acf-ui-datepicker .ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.acf-ui-datepicker .ui-icon-arrow-4{background-position:0 -80px}.acf-ui-datepicker .ui-icon-arrow-4-diag{background-position:-16px -80px}.acf-ui-datepicker .ui-icon-extlink{background-position:-32px -80px}.acf-ui-datepicker .ui-icon-newwin{background-position:-48px -80px}.acf-ui-datepicker .ui-icon-refresh{background-position:-64px -80px}.acf-ui-datepicker .ui-icon-shuffle{background-position:-80px -80px}.acf-ui-datepicker .ui-icon-transfer-e-w{background-position:-96px -80px}.acf-ui-datepicker .ui-icon-transferthick-e-w{background-position:-112px -80px}.acf-ui-datepicker .ui-icon-folder-collapsed{background-position:0 -96px}.acf-ui-datepicker .ui-icon-folder-open{background-position:-16px -96px}.acf-ui-datepicker .ui-icon-document{background-position:-32px -96px}.acf-ui-datepicker .ui-icon-document-b{background-position:-48px -96px}.acf-ui-datepicker .ui-icon-note{background-position:-64px -96px}.acf-ui-datepicker .ui-icon-mail-closed{background-position:-80px -96px}.acf-ui-datepicker .ui-icon-mail-open{background-position:-96px -96px}.acf-ui-datepicker .ui-icon-suitcase{background-position:-112px -96px}.acf-ui-datepicker .ui-icon-comment{background-position:-128px -96px}.acf-ui-datepicker .ui-icon-person{background-position:-144px -96px}.acf-ui-datepicker .ui-icon-print{background-position:-160px -96px}.acf-ui-datepicker .ui-icon-trash{background-position:-176px -96px}.acf-ui-datepicker .ui-icon-locked{background-position:-192px -96px}.acf-ui-datepicker .ui-icon-unlocked{background-position:-208px -96px}.acf-ui-datepicker .ui-icon-bookmark{background-position:-224px -96px}.acf-ui-datepicker .ui-icon-tag{background-position:-240px -96px}.acf-ui-datepicker .ui-icon-home{background-position:0 -112px}.acf-ui-datepicker .ui-icon-flag{background-position:-16px -112px}.acf-ui-datepicker .ui-icon-calendar{background-position:-32px -112px}.acf-ui-datepicker .ui-icon-cart{background-position:-48px -112px}.acf-ui-datepicker .ui-icon-pencil{background-position:-64px -112px}.acf-ui-datepicker .ui-icon-clock{background-position:-80px -112px}.acf-ui-datepicker .ui-icon-disk{background-position:-96px -112px}.acf-ui-datepicker .ui-icon-calculator{background-position:-112px -112px}.acf-ui-datepicker .ui-icon-zoomin{background-position:-128px -112px}.acf-ui-datepicker .ui-icon-zoomout{background-position:-144px -112px}.acf-ui-datepicker .ui-icon-search{background-position:-160px -112px}.acf-ui-datepicker .ui-icon-wrench{background-position:-176px -112px}.acf-ui-datepicker .ui-icon-gear{background-position:-192px -112px}.acf-ui-datepicker .ui-icon-heart{background-position:-208px -112px}.acf-ui-datepicker .ui-icon-star{background-position:-224px -112px}.acf-ui-datepicker .ui-icon-link{background-position:-240px -112px}.acf-ui-datepicker .ui-icon-cancel{background-position:0 -128px}.acf-ui-datepicker .ui-icon-plus{background-position:-16px -128px}.acf-ui-datepicker .ui-icon-plusthick{background-position:-32px -128px}.acf-ui-datepicker .ui-icon-minus{background-position:-48px -128px}.acf-ui-datepicker .ui-icon-minusthick{background-position:-64px -128px}.acf-ui-datepicker .ui-icon-close{background-position:-80px -128px}.acf-ui-datepicker .ui-icon-closethick{background-position:-96px -128px}.acf-ui-datepicker .ui-icon-key{background-position:-112px -128px}.acf-ui-datepicker .ui-icon-lightbulb{background-position:-128px -128px}.acf-ui-datepicker .ui-icon-scissors{background-position:-144px -128px}.acf-ui-datepicker .ui-icon-clipboard{background-position:-160px -128px}.acf-ui-datepicker .ui-icon-copy{background-position:-176px -128px}.acf-ui-datepicker .ui-icon-contact{background-position:-192px -128px}.acf-ui-datepicker .ui-icon-image{background-position:-208px -128px}.acf-ui-datepicker .ui-icon-video{background-position:-224px -128px}.acf-ui-datepicker .ui-icon-script{background-position:-240px -128px}.acf-ui-datepicker .ui-icon-alert{background-position:0 -144px}.acf-ui-datepicker .ui-icon-info{background-position:-16px -144px}.acf-ui-datepicker .ui-icon-notice{background-position:-32px -144px}.acf-ui-datepicker .ui-icon-help{background-position:-48px -144px}.acf-ui-datepicker .ui-icon-check{background-position:-64px -144px}.acf-ui-datepicker .ui-icon-bullet{background-position:-80px -144px}.acf-ui-datepicker .ui-icon-radio-on{background-position:-96px -144px}.acf-ui-datepicker .ui-icon-radio-off{background-position:-112px -144px}.acf-ui-datepicker .ui-icon-pin-w{background-position:-128px -144px}.acf-ui-datepicker .ui-icon-pin-s{background-position:-144px -144px}.acf-ui-datepicker .ui-icon-play{background-position:0 -160px}.acf-ui-datepicker .ui-icon-pause{background-position:-16px -160px}.acf-ui-datepicker .ui-icon-seek-next{background-position:-32px -160px}.acf-ui-datepicker .ui-icon-seek-prev{background-position:-48px -160px}.acf-ui-datepicker .ui-icon-seek-end{background-position:-64px -160px}.acf-ui-datepicker .ui-icon-seek-start{background-position:-80px -160px}.acf-ui-datepicker .ui-icon-seek-first{background-position:-80px -160px}.acf-ui-datepicker .ui-icon-stop{background-position:-96px -160px}.acf-ui-datepicker .ui-icon-eject{background-position:-112px -160px}.acf-ui-datepicker .ui-icon-volume-off{background-position:-128px -160px}.acf-ui-datepicker .ui-icon-volume-on{background-position:-144px -160px}.acf-ui-datepicker .ui-icon-power{background-position:0 -176px}.acf-ui-datepicker .ui-icon-signal-diag{background-position:-16px -176px}.acf-ui-datepicker .ui-icon-signal{background-position:-32px -176px}.acf-ui-datepicker .ui-icon-battery-0{background-position:-48px -176px}.acf-ui-datepicker .ui-icon-battery-1{background-position:-64px -176px}.acf-ui-datepicker .ui-icon-battery-2{background-position:-80px -176px}.acf-ui-datepicker .ui-icon-battery-3{background-position:-96px -176px}.acf-ui-datepicker .ui-icon-circle-plus{background-position:0 -192px}.acf-ui-datepicker .ui-icon-circle-minus{background-position:-16px -192px}.acf-ui-datepicker .ui-icon-circle-close{background-position:-32px -192px}.acf-ui-datepicker .ui-icon-circle-triangle-e{background-position:-48px -192px}.acf-ui-datepicker .ui-icon-circle-triangle-s{background-position:-64px -192px}.acf-ui-datepicker .ui-icon-circle-triangle-w{background-position:-80px -192px}.acf-ui-datepicker .ui-icon-circle-triangle-n{background-position:-96px -192px}.acf-ui-datepicker .ui-icon-circle-arrow-e{background-position:-112px -192px}.acf-ui-datepicker .ui-icon-circle-arrow-s{background-position:-128px -192px}.acf-ui-datepicker .ui-icon-circle-arrow-w{background-position:-144px -192px}.acf-ui-datepicker .ui-icon-circle-arrow-n{background-position:-160px -192px}.acf-ui-datepicker .ui-icon-circle-zoomin{background-position:-176px -192px}.acf-ui-datepicker .ui-icon-circle-zoomout{background-position:-192px -192px}.acf-ui-datepicker .ui-icon-circle-check{background-position:-208px -192px}.acf-ui-datepicker .ui-icon-circlesmall-plus{background-position:0 -208px}.acf-ui-datepicker .ui-icon-circlesmall-minus{background-position:-16px -208px}.acf-ui-datepicker .ui-icon-circlesmall-close{background-position:-32px -208px}.acf-ui-datepicker .ui-icon-squaresmall-plus{background-position:-48px -208px}.acf-ui-datepicker .ui-icon-squaresmall-minus{background-position:-64px -208px}.acf-ui-datepicker .ui-icon-squaresmall-close{background-position:-80px -208px}.acf-ui-datepicker .ui-icon-grip-dotted-vertical{background-position:0 -224px}.acf-ui-datepicker .ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.acf-ui-datepicker .ui-icon-grip-solid-vertical{background-position:-32px -224px}.acf-ui-datepicker .ui-icon-grip-solid-horizontal{background-position:-48px -224px}.acf-ui-datepicker .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.acf-ui-datepicker .ui-icon-grip-diagonal-se{background-position:-80px -224px}.acf-ui-datepicker .ui-corner-all,.acf-ui-datepicker .ui-corner-top,.acf-ui-datepicker .ui-corner-left,.acf-ui-datepicker .ui-corner-tl{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: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: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:3}.acf-ui-datepicker .ui-widget-overlay{background:#fff;opacity:.3;filter:Alpha(Opacity=30)}.acf-ui-datepicker .ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2-spinner.gif
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2.css
ADDED
@@ -0,0 +1,704 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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inline-block;
|
8 |
+
/* inline-block for ie7 */
|
9 |
+
zoom: 1;
|
10 |
+
*display: inline;
|
11 |
+
vertical-align: middle;
|
12 |
+
}
|
13 |
+
|
14 |
+
.select2-container,
|
15 |
+
.select2-drop,
|
16 |
+
.select2-search,
|
17 |
+
.select2-search input {
|
18 |
+
/*
|
19 |
+
Force border-box so that % widths fit the parent
|
20 |
+
container without overlap because of margin/padding.
|
21 |
+
More Info : http://www.quirksmode.org/css/box.html
|
22 |
+
*/
|
23 |
+
-webkit-box-sizing: border-box; /* webkit */
|
24 |
+
-moz-box-sizing: border-box; /* firefox */
|
25 |
+
box-sizing: border-box; /* css3 */
|
26 |
+
}
|
27 |
+
|
28 |
+
.select2-container .select2-choice {
|
29 |
+
display: block;
|
30 |
+
height: 26px;
|
31 |
+
padding: 0 0 0 8px;
|
32 |
+
overflow: hidden;
|
33 |
+
position: relative;
|
34 |
+
|
35 |
+
border: 1px solid #aaa;
|
36 |
+
white-space: nowrap;
|
37 |
+
line-height: 26px;
|
38 |
+
color: #444;
|
39 |
+
text-decoration: none;
|
40 |
+
|
41 |
+
border-radius: 4px;
|
42 |
+
|
43 |
+
background-clip: padding-box;
|
44 |
+
|
45 |
+
-webkit-touch-callout: none;
|
46 |
+
-webkit-user-select: none;
|
47 |
+
-moz-user-select: none;
|
48 |
+
-ms-user-select: none;
|
49 |
+
user-select: none;
|
50 |
+
|
51 |
+
background-color: #fff;
|
52 |
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff));
|
53 |
+
background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%);
|
54 |
+
background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%);
|
55 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
|
56 |
+
background-image: linear-gradient(to top, #eee 0%, #fff 50%);
|
57 |
+
}
|
58 |
+
|
59 |
+
html[dir="rtl"] .select2-container .select2-choice {
|
60 |
+
padding: 0 8px 0 0;
|
61 |
+
}
|
62 |
+
|
63 |
+
.select2-container.select2-drop-above .select2-choice {
|
64 |
+
border-bottom-color: #aaa;
|
65 |
+
|
66 |
+
border-radius: 0 0 4px 4px;
|
67 |
+
|
68 |
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff));
|
69 |
+
background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%);
|
70 |
+
background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%);
|
71 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
|
72 |
+
background-image: linear-gradient(to bottom, #eee 0%, #fff 90%);
|
73 |
+
}
|
74 |
+
|
75 |
+
.select2-container.select2-allowclear .select2-choice .select2-chosen {
|
76 |
+
margin-right: 42px;
|
77 |
+
}
|
78 |
+
|
79 |
+
.select2-container .select2-choice > .select2-chosen {
|
80 |
+
margin-right: 26px;
|
81 |
+
display: block;
|
82 |
+
overflow: hidden;
|
83 |
+
|
84 |
+
white-space: nowrap;
|
85 |
+
|
86 |
+
text-overflow: ellipsis;
|
87 |
+
float: none;
|
88 |
+
width: auto;
|
89 |
+
}
|
90 |
+
|
91 |
+
html[dir="rtl"] .select2-container .select2-choice > .select2-chosen {
|
92 |
+
margin-left: 26px;
|
93 |
+
margin-right: 0;
|
94 |
+
}
|
95 |
+
|
96 |
+
.select2-container .select2-choice abbr {
|
97 |
+
display: none;
|
98 |
+
width: 12px;
|
99 |
+
height: 12px;
|
100 |
+
position: absolute;
|
101 |
+
right: 24px;
|
102 |
+
top: 8px;
|
103 |
+
|
104 |
+
font-size: 1px;
|
105 |
+
text-decoration: none;
|
106 |
+
|
107 |
+
border: 0;
|
108 |
+
background: url('select2.png') right top no-repeat;
|
109 |
+
cursor: pointer;
|
110 |
+
outline: 0;
|
111 |
+
}
|
112 |
+
|
113 |
+
.select2-container.select2-allowclear .select2-choice abbr {
|
114 |
+
display: inline-block;
|
115 |
+
}
|
116 |
+
|
117 |
+
.select2-container .select2-choice abbr:hover {
|
118 |
+
background-position: right -11px;
|
119 |
+
cursor: pointer;
|
120 |
+
}
|
121 |
+
|
122 |
+
.select2-drop-mask {
|
123 |
+
border: 0;
|
124 |
+
margin: 0;
|
125 |
+
padding: 0;
|
126 |
+
position: fixed;
|
127 |
+
left: 0;
|
128 |
+
top: 0;
|
129 |
+
min-height: 100%;
|
130 |
+
min-width: 100%;
|
131 |
+
height: auto;
|
132 |
+
width: auto;
|
133 |
+
opacity: 0;
|
134 |
+
z-index: 9998;
|
135 |
+
/* styles required for IE to work */
|
136 |
+
background-color: #fff;
|
137 |
+
filter: alpha(opacity=0);
|
138 |
+
}
|
139 |
+
|
140 |
+
.select2-drop {
|
141 |
+
width: 100%;
|
142 |
+
margin-top: -1px;
|
143 |
+
position: absolute;
|
144 |
+
z-index: 9999;
|
145 |
+
top: 100%;
|
146 |
+
|
147 |
+
background: #fff;
|
148 |
+
color: #000;
|
149 |
+
border: 1px solid #aaa;
|
150 |
+
border-top: 0;
|
151 |
+
|
152 |
+
border-radius: 0 0 4px 4px;
|
153 |
+
|
154 |
+
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
155 |
+
box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
156 |
+
}
|
157 |
+
|
158 |
+
.select2-drop.select2-drop-above {
|
159 |
+
margin-top: 1px;
|
160 |
+
border-top: 1px solid #aaa;
|
161 |
+
border-bottom: 0;
|
162 |
+
|
163 |
+
border-radius: 4px 4px 0 0;
|
164 |
+
|
165 |
+
-webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
166 |
+
box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
167 |
+
}
|
168 |
+
|
169 |
+
.select2-drop-active {
|
170 |
+
border: 1px solid #5897fb;
|
171 |
+
border-top: none;
|
172 |
+
}
|
173 |
+
|
174 |
+
.select2-drop.select2-drop-above.select2-drop-active {
|
175 |
+
border-top: 1px solid #5897fb;
|
176 |
+
}
|
177 |
+
|
178 |
+
.select2-drop-auto-width {
|
179 |
+
border-top: 1px solid #aaa;
|
180 |
+
width: auto;
|
181 |
+
}
|
182 |
+
|
183 |
+
.select2-drop-auto-width .select2-search {
|
184 |
+
padding-top: 4px;
|
185 |
+
}
|
186 |
+
|
187 |
+
.select2-container .select2-choice .select2-arrow {
|
188 |
+
display: inline-block;
|
189 |
+
width: 18px;
|
190 |
+
height: 100%;
|
191 |
+
position: absolute;
|
192 |
+
right: 0;
|
193 |
+
top: 0;
|
194 |
+
|
195 |
+
border-left: 1px solid #aaa;
|
196 |
+
border-radius: 0 4px 4px 0;
|
197 |
+
|
198 |
+
background-clip: padding-box;
|
199 |
+
|
200 |
+
background: #ccc;
|
201 |
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
|
202 |
+
background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
203 |
+
background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
204 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
|
205 |
+
background-image: linear-gradient(to top, #ccc 0%, #eee 60%);
|
206 |
+
}
|
207 |
+
|
208 |
+
html[dir="rtl"] .select2-container .select2-choice .select2-arrow {
|
209 |
+
left: 0;
|
210 |
+
right: auto;
|
211 |
+
|
212 |
+
border-left: none;
|
213 |
+
border-right: 1px solid #aaa;
|
214 |
+
border-radius: 4px 0 0 4px;
|
215 |
+
}
|
216 |
+
|
217 |
+
.select2-container .select2-choice .select2-arrow b {
|
218 |
+
display: block;
|
219 |
+
width: 100%;
|
220 |
+
height: 100%;
|
221 |
+
background: url('select2.png') no-repeat 0 1px;
|
222 |
+
}
|
223 |
+
|
224 |
+
html[dir="rtl"] .select2-container .select2-choice .select2-arrow b {
|
225 |
+
background-position: 2px 1px;
|
226 |
+
}
|
227 |
+
|
228 |
+
.select2-search {
|
229 |
+
display: inline-block;
|
230 |
+
width: 100%;
|
231 |
+
min-height: 26px;
|
232 |
+
margin: 0;
|
233 |
+
padding-left: 4px;
|
234 |
+
padding-right: 4px;
|
235 |
+
|
236 |
+
position: relative;
|
237 |
+
z-index: 10000;
|
238 |
+
|
239 |
+
white-space: nowrap;
|
240 |
+
}
|
241 |
+
|
242 |
+
.select2-search input {
|
243 |
+
width: 100%;
|
244 |
+
height: auto !important;
|
245 |
+
min-height: 26px;
|
246 |
+
padding: 4px 20px 4px 5px;
|
247 |
+
margin: 0;
|
248 |
+
|
249 |
+
outline: 0;
|
250 |
+
font-family: sans-serif;
|
251 |
+
font-size: 1em;
|
252 |
+
|
253 |
+
border: 1px solid #aaa;
|
254 |
+
border-radius: 0;
|
255 |
+
|
256 |
+
-webkit-box-shadow: none;
|
257 |
+
box-shadow: none;
|
258 |
+
|
259 |
+
background: #fff url('select2.png') no-repeat 100% -22px;
|
260 |
+
background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
|
261 |
+
background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
|
262 |
+
background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
|
263 |
+
background: url('select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
|
264 |
+
}
|
265 |
+
|
266 |
+
html[dir="rtl"] .select2-search input {
|
267 |
+
padding: 4px 5px 4px 20px;
|
268 |
+
|
269 |
+
background: #fff url('select2.png') no-repeat -37px -22px;
|
270 |
+
background: url('select2.png') no-repeat -37px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
|
271 |
+
background: url('select2.png') no-repeat -37px -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
|
272 |
+
background: url('select2.png') no-repeat -37px -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
|
273 |
+
background: url('select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
|
274 |
+
}
|
275 |
+
|
276 |
+
.select2-drop.select2-drop-above .select2-search input {
|
277 |
+
margin-top: 4px;
|
278 |
+
}
|
279 |
+
|
280 |
+
.select2-search input.select2-active {
|
281 |
+
background: #fff url('select2-spinner.gif') no-repeat 100%;
|
282 |
+
background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
|
283 |
+
background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
|
284 |
+
background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
|
285 |
+
background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
|
286 |
+
}
|
287 |
+
|
288 |
+
.select2-container-active .select2-choice,
|
289 |
+
.select2-container-active .select2-choices {
|
290 |
+
border: 1px solid #5897fb;
|
291 |
+
outline: none;
|
292 |
+
|
293 |
+
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
|
294 |
+
box-shadow: 0 0 5px rgba(0, 0, 0, .3);
|
295 |
+
}
|
296 |
+
|
297 |
+
.select2-dropdown-open .select2-choice {
|
298 |
+
border-bottom-color: transparent;
|
299 |
+
-webkit-box-shadow: 0 1px 0 #fff inset;
|
300 |
+
box-shadow: 0 1px 0 #fff inset;
|
301 |
+
|
302 |
+
border-bottom-left-radius: 0;
|
303 |
+
border-bottom-right-radius: 0;
|
304 |
+
|
305 |
+
background-color: #eee;
|
306 |
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee));
|
307 |
+
background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%);
|
308 |
+
background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%);
|
309 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
|
310 |
+
background-image: linear-gradient(to top, #fff 0%, #eee 50%);
|
311 |
+
}
|
312 |
+
|
313 |
+
.select2-dropdown-open.select2-drop-above .select2-choice,
|
314 |
+
.select2-dropdown-open.select2-drop-above .select2-choices {
|
315 |
+
border: 1px solid #5897fb;
|
316 |
+
border-top-color: transparent;
|
317 |
+
|
318 |
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee));
|
319 |
+
background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%);
|
320 |
+
background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%);
|
321 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
|
322 |
+
background-image: linear-gradient(to bottom, #fff 0%, #eee 50%);
|
323 |
+
}
|
324 |
+
|
325 |
+
.select2-dropdown-open .select2-choice .select2-arrow {
|
326 |
+
background: transparent;
|
327 |
+
border-left: none;
|
328 |
+
filter: none;
|
329 |
+
}
|
330 |
+
html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow {
|
331 |
+
border-right: none;
|
332 |
+
}
|
333 |
+
|
334 |
+
.select2-dropdown-open .select2-choice .select2-arrow b {
|
335 |
+
background-position: -18px 1px;
|
336 |
+
}
|
337 |
+
|
338 |
+
html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow b {
|
339 |
+
background-position: -16px 1px;
|
340 |
+
}
|
341 |
+
|
342 |
+
.select2-hidden-accessible {
|
343 |
+
border: 0;
|
344 |
+
clip: rect(0 0 0 0);
|
345 |
+
height: 1px;
|
346 |
+
margin: -1px;
|
347 |
+
overflow: hidden;
|
348 |
+
padding: 0;
|
349 |
+
position: absolute;
|
350 |
+
width: 1px;
|
351 |
+
}
|
352 |
+
|
353 |
+
/* results */
|
354 |
+
.select2-results {
|
355 |
+
max-height: 200px;
|
356 |
+
padding: 0 0 0 4px;
|
357 |
+
margin: 4px 4px 4px 0;
|
358 |
+
position: relative;
|
359 |
+
overflow-x: hidden;
|
360 |
+
overflow-y: auto;
|
361 |
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
362 |
+
}
|
363 |
+
|
364 |
+
html[dir="rtl"] .select2-results {
|
365 |
+
padding: 0 4px 0 0;
|
366 |
+
margin: 4px 0 4px 4px;
|
367 |
+
}
|
368 |
+
|
369 |
+
.select2-results ul.select2-result-sub {
|
370 |
+
margin: 0;
|
371 |
+
padding-left: 0;
|
372 |
+
}
|
373 |
+
|
374 |
+
.select2-results li {
|
375 |
+
list-style: none;
|
376 |
+
display: list-item;
|
377 |
+
background-image: none;
|
378 |
+
}
|
379 |
+
|
380 |
+
.select2-results li.select2-result-with-children > .select2-result-label {
|
381 |
+
font-weight: bold;
|
382 |
+
}
|
383 |
+
|
384 |
+
.select2-results .select2-result-label {
|
385 |
+
padding: 3px 7px 4px;
|
386 |
+
margin: 0;
|
387 |
+
cursor: pointer;
|
388 |
+
|
389 |
+
min-height: 1em;
|
390 |
+
|
391 |
+
-webkit-touch-callout: none;
|
392 |
+
-webkit-user-select: none;
|
393 |
+
-moz-user-select: none;
|
394 |
+
-ms-user-select: none;
|
395 |
+
user-select: none;
|
396 |
+
}
|
397 |
+
|
398 |
+
.select2-results-dept-1 .select2-result-label { padding-left: 20px }
|
399 |
+
.select2-results-dept-2 .select2-result-label { padding-left: 40px }
|
400 |
+
.select2-results-dept-3 .select2-result-label { padding-left: 60px }
|
401 |
+
.select2-results-dept-4 .select2-result-label { padding-left: 80px }
|
402 |
+
.select2-results-dept-5 .select2-result-label { padding-left: 100px }
|
403 |
+
.select2-results-dept-6 .select2-result-label { padding-left: 110px }
|
404 |
+
.select2-results-dept-7 .select2-result-label { padding-left: 120px }
|
405 |
+
|
406 |
+
.select2-results .select2-highlighted {
|
407 |
+
background: #3875d7;
|
408 |
+
color: #fff;
|
409 |
+
}
|
410 |
+
|
411 |
+
.select2-results li em {
|
412 |
+
background: #feffde;
|
413 |
+
font-style: normal;
|
414 |
+
}
|
415 |
+
|
416 |
+
.select2-results .select2-highlighted em {
|
417 |
+
background: transparent;
|
418 |
+
}
|
419 |
+
|
420 |
+
.select2-results .select2-highlighted ul {
|
421 |
+
background: #fff;
|
422 |
+
color: #000;
|
423 |
+
}
|
424 |
+
|
425 |
+
.select2-results .select2-no-results,
|
426 |
+
.select2-results .select2-searching,
|
427 |
+
.select2-results .select2-ajax-error,
|
428 |
+
.select2-results .select2-selection-limit {
|
429 |
+
background: #f4f4f4;
|
430 |
+
display: list-item;
|
431 |
+
padding-left: 5px;
|
432 |
+
}
|
433 |
+
|
434 |
+
/*
|
435 |
+
disabled look for disabled choices in the results dropdown
|
436 |
+
*/
|
437 |
+
.select2-results .select2-disabled.select2-highlighted {
|
438 |
+
color: #666;
|
439 |
+
background: #f4f4f4;
|
440 |
+
display: list-item;
|
441 |
+
cursor: default;
|
442 |
+
}
|
443 |
+
.select2-results .select2-disabled {
|
444 |
+
background: #f4f4f4;
|
445 |
+
display: list-item;
|
446 |
+
cursor: default;
|
447 |
+
}
|
448 |
+
|
449 |
+
.select2-results .select2-selected {
|
450 |
+
display: none;
|
451 |
+
}
|
452 |
+
|
453 |
+
.select2-more-results.select2-active {
|
454 |
+
background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%;
|
455 |
+
}
|
456 |
+
|
457 |
+
.select2-results .select2-ajax-error {
|
458 |
+
background: rgba(255, 50, 50, .2);
|
459 |
+
}
|
460 |
+
|
461 |
+
.select2-more-results {
|
462 |
+
background: #f4f4f4;
|
463 |
+
display: list-item;
|
464 |
+
}
|
465 |
+
|
466 |
+
/* disabled styles */
|
467 |
+
|
468 |
+
.select2-container.select2-container-disabled .select2-choice {
|
469 |
+
background-color: #f4f4f4;
|
470 |
+
background-image: none;
|
471 |
+
border: 1px solid #ddd;
|
472 |
+
cursor: default;
|
473 |
+
}
|
474 |
+
|
475 |
+
.select2-container.select2-container-disabled .select2-choice .select2-arrow {
|
476 |
+
background-color: #f4f4f4;
|
477 |
+
background-image: none;
|
478 |
+
border-left: 0;
|
479 |
+
}
|
480 |
+
|
481 |
+
.select2-container.select2-container-disabled .select2-choice abbr {
|
482 |
+
display: none;
|
483 |
+
}
|
484 |
+
|
485 |
+
|
486 |
+
/* multiselect */
|
487 |
+
|
488 |
+
.select2-container-multi .select2-choices {
|
489 |
+
height: auto !important;
|
490 |
+
height: 1%;
|
491 |
+
margin: 0;
|
492 |
+
padding: 0 5px 0 0;
|
493 |
+
position: relative;
|
494 |
+
|
495 |
+
border: 1px solid #aaa;
|
496 |
+
cursor: text;
|
497 |
+
overflow: hidden;
|
498 |
+
|
499 |
+
background-color: #fff;
|
500 |
+
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff));
|
501 |
+
background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%);
|
502 |
+
background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%);
|
503 |
+
background-image: linear-gradient(to bottom, #eee 1%, #fff 15%);
|
504 |
+
}
|
505 |
+
|
506 |
+
html[dir="rtl"] .select2-container-multi .select2-choices {
|
507 |
+
padding: 0 0 0 5px;
|
508 |
+
}
|
509 |
+
|
510 |
+
.select2-locked {
|
511 |
+
padding: 3px 5px 3px 5px !important;
|
512 |
+
}
|
513 |
+
|
514 |
+
.select2-container-multi .select2-choices {
|
515 |
+
min-height: 26px;
|
516 |
+
}
|
517 |
+
|
518 |
+
.select2-container-multi.select2-container-active .select2-choices {
|
519 |
+
border: 1px solid #5897fb;
|
520 |
+
outline: none;
|
521 |
+
|
522 |
+
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
|
523 |
+
box-shadow: 0 0 5px rgba(0, 0, 0, .3);
|
524 |
+
}
|
525 |
+
.select2-container-multi .select2-choices li {
|
526 |
+
float: left;
|
527 |
+
list-style: none;
|
528 |
+
}
|
529 |
+
html[dir="rtl"] .select2-container-multi .select2-choices li
|
530 |
+
{
|
531 |
+
float: right;
|
532 |
+
}
|
533 |
+
.select2-container-multi .select2-choices .select2-search-field {
|
534 |
+
margin: 0;
|
535 |
+
padding: 0;
|
536 |
+
white-space: nowrap;
|
537 |
+
}
|
538 |
+
|
539 |
+
.select2-container-multi .select2-choices .select2-search-field input {
|
540 |
+
padding: 5px;
|
541 |
+
margin: 1px 0;
|
542 |
+
|
543 |
+
font-family: sans-serif;
|
544 |
+
font-size: 100%;
|
545 |
+
color: #666;
|
546 |
+
outline: 0;
|
547 |
+
border: 0;
|
548 |
+
-webkit-box-shadow: none;
|
549 |
+
box-shadow: none;
|
550 |
+
background: transparent !important;
|
551 |
+
}
|
552 |
+
|
553 |
+
.select2-container-multi .select2-choices .select2-search-field input.select2-active {
|
554 |
+
background: #fff url('select2-spinner.gif') no-repeat 100% !important;
|
555 |
+
}
|
556 |
+
|
557 |
+
.select2-default {
|
558 |
+
color: #999 !important;
|
559 |
+
}
|
560 |
+
|
561 |
+
.select2-container-multi .select2-choices .select2-search-choice {
|
562 |
+
padding: 3px 5px 3px 18px;
|
563 |
+
margin: 3px 0 3px 5px;
|
564 |
+
position: relative;
|
565 |
+
|
566 |
+
line-height: 13px;
|
567 |
+
color: #333;
|
568 |
+
cursor: default;
|
569 |
+
border: 1px solid #aaaaaa;
|
570 |
+
|
571 |
+
border-radius: 3px;
|
572 |
+
|
573 |
+
-webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
|
574 |
+
box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
|
575 |
+
|
576 |
+
background-clip: padding-box;
|
577 |
+
|
578 |
+
-webkit-touch-callout: none;
|
579 |
+
-webkit-user-select: none;
|
580 |
+
-moz-user-select: none;
|
581 |
+
-ms-user-select: none;
|
582 |
+
user-select: none;
|
583 |
+
|
584 |
+
background-color: #e4e4e4;
|
585 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0);
|
586 |
+
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee));
|
587 |
+
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
588 |
+
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
589 |
+
background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
590 |
+
}
|
591 |
+
html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice
|
592 |
+
{
|
593 |
+
margin: 3px 5px 3px 0;
|
594 |
+
padding: 3px 18px 3px 5px;
|
595 |
+
}
|
596 |
+
.select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
|
597 |
+
cursor: default;
|
598 |
+
}
|
599 |
+
.select2-container-multi .select2-choices .select2-search-choice-focus {
|
600 |
+
background: #d4d4d4;
|
601 |
+
}
|
602 |
+
|
603 |
+
.select2-search-choice-close {
|
604 |
+
display: block;
|
605 |
+
width: 12px;
|
606 |
+
height: 13px;
|
607 |
+
position: absolute;
|
608 |
+
right: 3px;
|
609 |
+
top: 4px;
|
610 |
+
|
611 |
+
font-size: 1px;
|
612 |
+
outline: none;
|
613 |
+
background: url('select2.png') right top no-repeat;
|
614 |
+
}
|
615 |
+
html[dir="rtl"] .select2-search-choice-close {
|
616 |
+
right: auto;
|
617 |
+
left: 3px;
|
618 |
+
}
|
619 |
+
|
620 |
+
.select2-container-multi .select2-search-choice-close {
|
621 |
+
left: 3px;
|
622 |
+
}
|
623 |
+
|
624 |
+
html[dir="rtl"] .select2-container-multi .select2-search-choice-close {
|
625 |
+
left: auto;
|
626 |
+
right: 2px;
|
627 |
+
}
|
628 |
+
|
629 |
+
.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
|
630 |
+
background-position: right -11px;
|
631 |
+
}
|
632 |
+
.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
|
633 |
+
background-position: right -11px;
|
634 |
+
}
|
635 |
+
|
636 |
+
/* disabled styles */
|
637 |
+
.select2-container-multi.select2-container-disabled .select2-choices {
|
638 |
+
background-color: #f4f4f4;
|
639 |
+
background-image: none;
|
640 |
+
border: 1px solid #ddd;
|
641 |
+
cursor: default;
|
642 |
+
}
|
643 |
+
|
644 |
+
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
|
645 |
+
padding: 3px 5px 3px 5px;
|
646 |
+
border: 1px solid #ddd;
|
647 |
+
background-image: none;
|
648 |
+
background-color: #f4f4f4;
|
649 |
+
}
|
650 |
+
|
651 |
+
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none;
|
652 |
+
background: none;
|
653 |
+
}
|
654 |
+
/* end multiselect */
|
655 |
+
|
656 |
+
|
657 |
+
.select2-result-selectable .select2-match,
|
658 |
+
.select2-result-unselectable .select2-match {
|
659 |
+
text-decoration: underline;
|
660 |
+
}
|
661 |
+
|
662 |
+
.select2-offscreen, .select2-offscreen:focus {
|
663 |
+
clip: rect(0 0 0 0) !important;
|
664 |
+
width: 1px !important;
|
665 |
+
height: 1px !important;
|
666 |
+
border: 0 !important;
|
667 |
+
margin: 0 !important;
|
668 |
+
padding: 0 !important;
|
669 |
+
overflow: hidden !important;
|
670 |
+
position: absolute !important;
|
671 |
+
outline: 0 !important;
|
672 |
+
left: 0px !important;
|
673 |
+
top: 0px !important;
|
674 |
+
}
|
675 |
+
|
676 |
+
.select2-display-none {
|
677 |
+
display: none;
|
678 |
+
}
|
679 |
+
|
680 |
+
.select2-measure-scrollbar {
|
681 |
+
position: absolute;
|
682 |
+
top: -10000px;
|
683 |
+
left: -10000px;
|
684 |
+
width: 100px;
|
685 |
+
height: 100px;
|
686 |
+
overflow: scroll;
|
687 |
+
}
|
688 |
+
|
689 |
+
/* Retina-ize icons */
|
690 |
+
|
691 |
+
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 2dppx) {
|
692 |
+
.select2-search input,
|
693 |
+
.select2-search-choice-close,
|
694 |
+
.select2-container .select2-choice abbr,
|
695 |
+
.select2-container .select2-choice .select2-arrow b {
|
696 |
+
background-image: url('select2x2.png') !important;
|
697 |
+
background-repeat: no-repeat !important;
|
698 |
+
background-size: 60px 40px !important;
|
699 |
+
}
|
700 |
+
|
701 |
+
.select2-search input {
|
702 |
+
background-position: 100% -21px !important;
|
703 |
+
}
|
704 |
+
}
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2.js
ADDED
@@ -0,0 +1,3541 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Copyright 2012 Igor Vaynberg
|
3 |
+
|
4 |
+
Version: 3.5.2 Timestamp: Sat Nov 1 14:43:36 EDT 2014
|
5 |
+
|
6 |
+
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
|
7 |
+
General Public License version 2 (the "GPL License"). You may choose either license to govern your
|
8 |
+
use of this software only upon the condition that you accept all of the terms of either the Apache
|
9 |
+
License or the GPL License.
|
10 |
+
|
11 |
+
You may obtain a copy of the Apache License and the GPL License at:
|
12 |
+
|
13 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
14 |
+
http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
+
|
16 |
+
Unless required by applicable law or agreed to in writing, software distributed under the
|
17 |
+
Apache License or the GPL License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
18 |
+
CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
|
19 |
+
the specific language governing permissions and limitations under the Apache License and the GPL License.
|
20 |
+
*/
|
21 |
+
(function ($) {
|
22 |
+
if(typeof $.fn.each2 == "undefined") {
|
23 |
+
$.extend($.fn, {
|
24 |
+
/*
|
25 |
+
* 4-10 times faster .each replacement
|
26 |
+
* use it carefully, as it overrides jQuery context of element on each iteration
|
27 |
+
*/
|
28 |
+
each2 : function (c) {
|
29 |
+
var j = $([0]), i = -1, l = this.length;
|
30 |
+
while (
|
31 |
+
++i < l
|
32 |
+
&& (j.context = j[0] = this[i])
|
33 |
+
&& c.call(j[0], i, j) !== false //"this"=DOM, i=index, j=jQuery object
|
34 |
+
);
|
35 |
+
return this;
|
36 |
+
}
|
37 |
+
});
|
38 |
+
}
|
39 |
+
})(jQuery);
|
40 |
+
|
41 |
+
(function ($, undefined) {
|
42 |
+
"use strict";
|
43 |
+
/*global document, window, jQuery, console */
|
44 |
+
|
45 |
+
if (window.Select2 !== undefined) {
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
var AbstractSelect2, SingleSelect2, MultiSelect2, nextUid, sizer,
|
50 |
+
lastMousePosition={x:0,y:0}, $document, scrollBarDimensions,
|
51 |
+
|
52 |
+
KEY = {
|
53 |
+
TAB: 9,
|
54 |
+
ENTER: 13,
|
55 |
+
ESC: 27,
|
56 |
+
SPACE: 32,
|
57 |
+
LEFT: 37,
|
58 |
+
UP: 38,
|
59 |
+
RIGHT: 39,
|
60 |
+
DOWN: 40,
|
61 |
+
SHIFT: 16,
|
62 |
+
CTRL: 17,
|
63 |
+
ALT: 18,
|
64 |
+
PAGE_UP: 33,
|
65 |
+
PAGE_DOWN: 34,
|
66 |
+
HOME: 36,
|
67 |
+
END: 35,
|
68 |
+
BACKSPACE: 8,
|
69 |
+
DELETE: 46,
|
70 |
+
isArrow: function (k) {
|
71 |
+
k = k.which ? k.which : k;
|
72 |
+
switch (k) {
|
73 |
+
case KEY.LEFT:
|
74 |
+
case KEY.RIGHT:
|
75 |
+
case KEY.UP:
|
76 |
+
case KEY.DOWN:
|
77 |
+
return true;
|
78 |
+
}
|
79 |
+
return false;
|
80 |
+
},
|
81 |
+
isControl: function (e) {
|
82 |
+
var k = e.which;
|
83 |
+
switch (k) {
|
84 |
+
case KEY.SHIFT:
|
85 |
+
case KEY.CTRL:
|
86 |
+
case KEY.ALT:
|
87 |
+
return true;
|
88 |
+
}
|
89 |
+
|
90 |
+
if (e.metaKey) return true;
|
91 |
+
|
92 |
+
return false;
|
93 |
+
},
|
94 |
+
isFunctionKey: function (k) {
|
95 |
+
k = k.which ? k.which : k;
|
96 |
+
return k >= 112 && k <= 123;
|
97 |
+
}
|
98 |
+
},
|
99 |
+
MEASURE_SCROLLBAR_TEMPLATE = "<div class='select2-measure-scrollbar'></div>",
|
100 |
+
|
101 |
+
DIACRITICS = {"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24B8":"C","\uFF23":"C","\u0106":"C","\u0108":"C","\u010A":"C","\u010C":"C","\u00C7":"C","\u1E08":"C","\u0187":"C","\u023B":"C","\uA73E":"C","\u24B9":"D","\uFF24":"D","\u1E0A":"D","\u010E":"D","\u1E0C":"D","\u1E10":"D","\u1E12":"D","\u1E0E":"D","\u0110":"D","\u018B":"D","\u018A":"D","\u0189":"D","\uA779":"D","\u01F1":"DZ","\u01C4":"DZ","\u01F2":"Dz","\u01C5":"Dz","\u24BA":"E","\uFF25":"E","\u00C8":"E","\u00C9":"E","\u00CA":"E","\u1EC0":"E","\u1EBE":"E","\u1EC4":"E","\u1EC2":"E","\u1EBC":"E","\u0112":"E","\u1E14":"E","\u1E16":"E","\u0114":"E","\u0116":"E","\u00CB":"E","\u1EBA":"E","\u011A":"E","\u0204":"E","\u0206":"E","\u1EB8":"E","\u1EC6":"E","\u0228":"E","\u1E1C":"E","\u0118":"E","\u1E18":"E","\u1E1A":"E","\u0190":"E","\u018E":"E","\u24BB":"F","\uFF26":"F","\u1E1E":"F","\u0191":"F","\uA77B":"F","\u24BC":"G","\uFF27":"G","\u01F4":"G","\u011C":"G","\u1E20":"G","\u011E":"G","\u0120":"G","\u01E6":"G","\u0122":"G","\u01E4":"G","\u0193":"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H","\uFF28":"H","\u0124":"H","\u1E22":"H","\u1E26":"H","\u021E":"H","\u1E24":"H","\u1E28":"H","\u1E2A":"H","\u0126":"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I","\uFF29":"I","\u00CC":"I","\u00CD":"I","\u00CE":"I","\u0128":"I","\u012A":"I","\u012C":"I","\u0130":"I","\u00CF":"I","\u1E2E":"I","\u1EC8":"I","\u01CF":"I","\u0208":"I","\u020A":"I","\u1ECA":"I","\u012E":"I","\u1E2C":"I","\u0197":"I","\u24BF":"J","\uFF2A":"J","\u0134":"J","\u0248":"J","\u24C0":"K","\uFF2B":"K","\u1E30":"K","\u01E8":"K","\u1E32":"K","\u0136":"K","\u1E34":"K","\u0198":"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L","\uFF2C":"L","\u013F":"L","\u0139":"L","\u013D":"L","\u1E36":"L","\u1E38":"L","\u013B":"L","\u1E3C":"L","\u1E3A":"L","\u0141":"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L","\u01C7":"LJ","\u01C8":"Lj","\u24C2":"M","\uFF2D":"M","\u1E3E":"M","\u1E40":"M","\u1E42":"M","\u2C6E":"M","\u019C":"M","\u24C3":"N","\uFF2E":"N","\u01F8":"N","\u0143":"N","\u00D1":"N","\u1E44":"N","\u0147":"N","\u1E46":"N","\u0145":"N","\u1E4A":"N","\u1E48":"N","\u0220":"N","\u019D":"N","\uA790":"N","\uA7A4":"N","\u01CA":"NJ","\u01CB":"Nj","\u24C4":"O","\uFF2F":"O","\u00D2":"O","\u00D3":"O","\u00D4":"O","\u1ED2":"O","\u1ED0":"O","\u1ED6":"O","\u1ED4":"O","\u00D5":"O","\u1E4C":"O","\u022C":"O","\u1E4E":"O","\u014C":"O","\u1E50":"O","\u1E52":"O","\u014E":"O","\u022E":"O","\u0230":"O","\u00D6":"O","\u022A":"O","\u1ECE":"O","\u0150":"O","\u01D1":"O","\u020C":"O","\u020E":"O","\u01A0":"O","\u1EDC":"O","\u1EDA":"O","\u1EE0":"O","\u1EDE":"O","\u1EE2":"O","\u1ECC":"O","\u1ED8":"O","\u01EA":"O","\u01EC":"O","\u00D8":"O","\u01FE":"O","\u0186":"O","\u019F":"O","\uA74A":"O","\uA74C":"O","\u01A2":"OI","\uA74E":"OO","\u0222":"OU","\u24C5":"P","\uFF30":"P","\u1E54":"P","\u1E56":"P","\u01A4":"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q","\uFF31":"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R","\uFF32":"R","\u0154":"R","\u1E58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1E5A":"R","\u1E5C":"R","\u0156":"R","\u1E5E":"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S","\uFF33":"S","\u1E9E":"S","\u015A":"S","\u1E64":"S","\u015C":"S","\u1E60":"S","\u0160":"S","\u1E66":"S","\u1E62":"S","\u1E68":"S","\u0218":"S","\u015E":"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T","\uFF34":"T","\u1E6A":"T","\u0164":"T","\u1E6C":"T","\u021A":"T","\u0162":"T","\u1E70":"T","\u1E6E":"T","\u0166":"T","\u01AC":"T","\u01AE":"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U","\uFF35":"U","\u00D9":"U","\u00DA":"U","\u00DB":"U","\u0168":"U","\u1E78":"U","\u016A":"U","\u1E7A":"U","\u016C":"U","\u00DC":"U","\u01DB":"U","\u01D7":"U","\u01D5":"U","\u01D9":"U","\u1EE6":"U","\u016E":"U","\u0170":"U","\u01D3":"U","\u0214":"U","\u0216":"U","\u01AF":"U","\u1EEA":"U","\u1EE8":"U","\u1EEE":"U","\u1EEC":"U","\u1EF0":"U","\u1EE4":"U","\u1E72":"U","\u0172":"U","\u1E76":"U","\u1E74":"U","\u0244":"U","\u24CB":"V","\uFF36":"V","\u1E7C":"V","\u1E7E":"V","\u01B2":"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W","\uFF37":"W","\u1E80":"W","\u1E82":"W","\u0174":"W","\u1E86":"W","\u1E84":"W","\u1E88":"W","\u2C72":"W","\u24CD":"X","\uFF38":"X","\u1E8A":"X","\u1E8C":"X","\u24CE":"Y","\uFF39":"Y","\u1EF2":"Y","\u00DD":"Y","\u0176":"Y","\u1EF8":"Y","\u0232":"Y","\u1E8E":"Y","\u0178":"Y","\u1EF6":"Y","\u1EF4":"Y","\u01B3":"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z","\uFF3A":"Z","\u0179":"Z","\u1E90":"Z","\u017B":"Z","\u017D":"Z","\u1E92":"Z","\u1E94":"Z","\u01B5":"Z","\u0224":"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a","\uFF41":"a","\u1E9A":"a","\u00E0":"a","\u00E1":"a","\u00E2":"a","\u1EA7":"a","\u1EA5":"a","\u1EAB":"a","\u1EA9":"a","\u00E3":"a","\u0101":"a","\u0103":"a","\u1EB1":"a","\u1EAF":"a","\u1EB5":"a","\u1EB3":"a","\u0227":"a","\u01E1":"a","\u00E4":"a","\u01DF":"a","\u1EA3":"a","\u00E5":"a","\u01FB":"a","\u01CE":"a","\u0201":"a","\u0203":"a","\u1EA1":"a","\u1EAD":"a","\u1EB7":"a","\u1E01":"a","\u0105":"a","\u2C65":"a","\u0250":"a","\uA733":"aa","\u00E6":"ae","\u01FD":"ae","\u01E3":"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b","\uFF42":"b","\u1E03":"b","\u1E05":"b","\u1E07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24D2":"c","\uFF43":"c","\u0107":"c","\u0109":"c","\u010B":"c","\u010D":"c","\u00E7":"c","\u1E09":"c","\u0188":"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d","\uFF44":"d","\u1E0B":"d","\u010F":"d","\u1E0D":"d","\u1E11":"d","\u1E13":"d","\u1E0F":"d","\u0111":"d","\u018C":"d","\u0256":"d","\u0257":"d","\uA77A":"d","\u01F3":"dz","\u01C6":"dz","\u24D4":"e","\uFF45":"e","\u00E8":"e","\u00E9":"e","\u00EA":"e","\u1EC1":"e","\u1EBF":"e","\u1EC5":"e","\u1EC3":"e","\u1EBD":"e","\u0113":"e","\u1E15":"e","\u1E17":"e","\u0115":"e","\u0117":"e","\u00EB":"e","\u1EBB":"e","\u011B":"e","\u0205":"e","\u0207":"e","\u1EB9":"e","\u1EC7":"e","\u0229":"e","\u1E1D":"e","\u0119":"e","\u1E19":"e","\u1E1B":"e","\u0247":"e","\u025B":"e","\u01DD":"e","\u24D5":"f","\uFF46":"f","\u1E1F":"f","\u0192":"f","\uA77C":"f","\u24D6":"g","\uFF47":"g","\u01F5":"g","\u011D":"g","\u1E21":"g","\u011F":"g","\u0121":"g","\u01E7":"g","\u0123":"g","\u01E5":"g","\u0260":"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h","\uFF48":"h","\u0125":"h","\u1E23":"h","\u1E27":"h","\u021F":"h","\u1E25":"h","\u1E29":"h","\u1E2B":"h","\u1E96":"h","\u0127":"h","\u2C68":"h","\u2C76":"h","\u0265":"h","\u0195":"hv","\u24D8":"i","\uFF49":"i","\u00EC":"i","\u00ED":"i","\u00EE":"i","\u0129":"i","\u012B":"i","\u012D":"i","\u00EF":"i","\u1E2F":"i","\u1EC9":"i","\u01D0":"i","\u0209":"i","\u020B":"i","\u1ECB":"i","\u012F":"i","\u1E2D":"i","\u0268":"i","\u0131":"i","\u24D9":"j","\uFF4A":"j","\u0135":"j","\u01F0":"j","\u0249":"j","\u24DA":"k","\uFF4B":"k","\u1E31":"k","\u01E9":"k","\u1E33":"k","\u0137":"k","\u1E35":"k","\u0199":"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l","\uFF4C":"l","\u0140":"l","\u013A":"l","\u013E":"l","\u1E37":"l","\u1E39":"l","\u013C":"l","\u1E3D":"l","\u1E3B":"l","\u017F":"l","\u0142":"l","\u019A":"l","\u026B":"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l","\u01C9":"lj","\u24DC":"m","\uFF4D":"m","\u1E3F":"m","\u1E41":"m","\u1E43":"m","\u0271":"m","\u026F":"m","\u24DD":"n","\uFF4E":"n","\u01F9":"n","\u0144":"n","\u00F1":"n","\u1E45":"n","\u0148":"n","\u1E47":"n","\u0146":"n","\u1E4B":"n","\u1E49":"n","\u019E":"n","\u0272":"n","\u0149":"n","\uA791":"n","\uA7A5":"n","\u01CC":"nj","\u24DE":"o","\uFF4F":"o","\u00F2":"o","\u00F3":"o","\u00F4":"o","\u1ED3":"o","\u1ED1":"o","\u1ED7":"o","\u1ED5":"o","\u00F5":"o","\u1E4D":"o","\u022D":"o","\u1E4F":"o","\u014D":"o","\u1E51":"o","\u1E53":"o","\u014F":"o","\u022F":"o","\u0231":"o","\u00F6":"o","\u022B":"o","\u1ECF":"o","\u0151":"o","\u01D2":"o","\u020D":"o","\u020F":"o","\u01A1":"o","\u1EDD":"o","\u1EDB":"o","\u1EE1":"o","\u1EDF":"o","\u1EE3":"o","\u1ECD":"o","\u1ED9":"o","\u01EB":"o","\u01ED":"o","\u00F8":"o","\u01FF":"o","\u0254":"o","\uA74B":"o","\uA74D":"o","\u0275":"o","\u01A3":"oi","\u0223":"ou","\uA74F":"oo","\u24DF":"p","\uFF50":"p","\u1E55":"p","\u1E57":"p","\u01A5":"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q","\uFF51":"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r","\uFF52":"r","\u0155":"r","\u1E59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1E5B":"r","\u1E5D":"r","\u0157":"r","\u1E5F":"r","\u024D":"r","\u027D":"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s","\uFF53":"s","\u00DF":"s","\u015B":"s","\u1E65":"s","\u015D":"s","\u1E61":"s","\u0161":"s","\u1E67":"s","\u1E63":"s","\u1E69":"s","\u0219":"s","\u015F":"s","\u023F":"s","\uA7A9":"s","\uA785":"s","\u1E9B":"s","\u24E3":"t","\uFF54":"t","\u1E6B":"t","\u1E97":"t","\u0165":"t","\u1E6D":"t","\u021B":"t","\u0163":"t","\u1E71":"t","\u1E6F":"t","\u0167":"t","\u01AD":"t","\u0288":"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u","\uFF55":"u","\u00F9":"u","\u00FA":"u","\u00FB":"u","\u0169":"u","\u1E79":"u","\u016B":"u","\u1E7B":"u","\u016D":"u","\u00FC":"u","\u01DC":"u","\u01D8":"u","\u01D6":"u","\u01DA":"u","\u1EE7":"u","\u016F":"u","\u0171":"u","\u01D4":"u","\u0215":"u","\u0217":"u","\u01B0":"u","\u1EEB":"u","\u1EE9":"u","\u1EEF":"u","\u1EED":"u","\u1EF1":"u","\u1EE5":"u","\u1E73":"u","\u0173":"u","\u1E77":"u","\u1E75":"u","\u0289":"u","\u24E5":"v","\uFF56":"v","\u1E7D":"v","\u1E7F":"v","\u028B":"v","\uA75F":"v","\u028C":"v","\uA761":"vy","\u24E6":"w","\uFF57":"w","\u1E81":"w","\u1E83":"w","\u0175":"w","\u1E87":"w","\u1E85":"w","\u1E98":"w","\u1E89":"w","\u2C73":"w","\u24E7":"x","\uFF58":"x","\u1E8B":"x","\u1E8D":"x","\u24E8":"y","\uFF59":"y","\u1EF3":"y","\u00FD":"y","\u0177":"y","\u1EF9":"y","\u0233":"y","\u1E8F":"y","\u00FF":"y","\u1EF7":"y","\u1E99":"y","\u1EF5":"y","\u01B4":"y","\u024F":"y","\u1EFF":"y","\u24E9":"z","\uFF5A":"z","\u017A":"z","\u1E91":"z","\u017C":"z","\u017E":"z","\u1E93":"z","\u1E95":"z","\u01B6":"z","\u0225":"z","\u0240":"z","\u2C6C":"z","\uA763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038A":"\u0399","\u03AA":"\u0399","\u038C":"\u039F","\u038E":"\u03A5","\u03AB":"\u03A5","\u038F":"\u03A9","\u03AC":"\u03B1","\u03AD":"\u03B5","\u03AE":"\u03B7","\u03AF":"\u03B9","\u03CA":"\u03B9","\u0390":"\u03B9","\u03CC":"\u03BF","\u03CD":"\u03C5","\u03CB":"\u03C5","\u03B0":"\u03C5","\u03C9":"\u03C9","\u03C2":"\u03C3"};
|
102 |
+
|
103 |
+
$document = $(document);
|
104 |
+
|
105 |
+
nextUid=(function() { var counter=1; return function() { return counter++; }; }());
|
106 |
+
|
107 |
+
|
108 |
+
function reinsertElement(element) {
|
109 |
+
var placeholder = $(document.createTextNode(''));
|
110 |
+
|
111 |
+
element.before(placeholder);
|
112 |
+
placeholder.before(element);
|
113 |
+
placeholder.remove();
|
114 |
+
}
|
115 |
+
|
116 |
+
function stripDiacritics(str) {
|
117 |
+
// Used 'uni range + named function' from http://jsperf.com/diacritics/18
|
118 |
+
function match(a) {
|
119 |
+
return DIACRITICS[a] || a;
|
120 |
+
}
|
121 |
+
|
122 |
+
return str.replace(/[^\u0000-\u007E]/g, match);
|
123 |
+
}
|
124 |
+
|
125 |
+
function indexOf(value, array) {
|
126 |
+
var i = 0, l = array.length;
|
127 |
+
for (; i < l; i = i + 1) {
|
128 |
+
if (equal(value, array[i])) return i;
|
129 |
+
}
|
130 |
+
return -1;
|
131 |
+
}
|
132 |
+
|
133 |
+
function measureScrollbar () {
|
134 |
+
var $template = $( MEASURE_SCROLLBAR_TEMPLATE );
|
135 |
+
$template.appendTo(document.body);
|
136 |
+
|
137 |
+
var dim = {
|
138 |
+
width: $template.width() - $template[0].clientWidth,
|
139 |
+
height: $template.height() - $template[0].clientHeight
|
140 |
+
};
|
141 |
+
$template.remove();
|
142 |
+
|
143 |
+
return dim;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Compares equality of a and b
|
148 |
+
* @param a
|
149 |
+
* @param b
|
150 |
+
*/
|
151 |
+
function equal(a, b) {
|
152 |
+
if (a === b) return true;
|
153 |
+
if (a === undefined || b === undefined) return false;
|
154 |
+
if (a === null || b === null) return false;
|
155 |
+
// Check whether 'a' or 'b' is a string (primitive or object).
|
156 |
+
// The concatenation of an empty string (+'') converts its argument to a string's primitive.
|
157 |
+
if (a.constructor === String) return a+'' === b+''; // a+'' - in case 'a' is a String object
|
158 |
+
if (b.constructor === String) return b+'' === a+''; // b+'' - in case 'b' is a String object
|
159 |
+
return false;
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Splits the string into an array of values, transforming each value. An empty array is returned for nulls or empty
|
164 |
+
* strings
|
165 |
+
* @param string
|
166 |
+
* @param separator
|
167 |
+
*/
|
168 |
+
function splitVal(string, separator, transform) {
|
169 |
+
var val, i, l;
|
170 |
+
if (string === null || string.length < 1) return [];
|
171 |
+
val = string.split(separator);
|
172 |
+
for (i = 0, l = val.length; i < l; i = i + 1) val[i] = transform(val[i]);
|
173 |
+
return val;
|
174 |
+
}
|
175 |
+
|
176 |
+
function getSideBorderPadding(element) {
|
177 |
+
return element.outerWidth(false) - element.width();
|
178 |
+
}
|
179 |
+
|
180 |
+
function installKeyUpChangeEvent(element) {
|
181 |
+
var key="keyup-change-value";
|
182 |
+
element.on("keydown", function () {
|
183 |
+
if ($.data(element, key) === undefined) {
|
184 |
+
$.data(element, key, element.val());
|
185 |
+
}
|
186 |
+
});
|
187 |
+
element.on("keyup", function () {
|
188 |
+
var val= $.data(element, key);
|
189 |
+
if (val !== undefined && element.val() !== val) {
|
190 |
+
$.removeData(element, key);
|
191 |
+
element.trigger("keyup-change");
|
192 |
+
}
|
193 |
+
});
|
194 |
+
}
|
195 |
+
|
196 |
+
|
197 |
+
/**
|
198 |
+
* filters mouse events so an event is fired only if the mouse moved.
|
199 |
+
*
|
200 |
+
* filters out mouse events that occur when mouse is stationary but
|
201 |
+
* the elements under the pointer are scrolled.
|
202 |
+
*/
|
203 |
+
function installFilteredMouseMove(element) {
|
204 |
+
element.on("mousemove", function (e) {
|
205 |
+
var lastpos = lastMousePosition;
|
206 |
+
if (lastpos === undefined || lastpos.x !== e.pageX || lastpos.y !== e.pageY) {
|
207 |
+
$(e.target).trigger("mousemove-filtered", e);
|
208 |
+
}
|
209 |
+
});
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Debounces a function. Returns a function that calls the original fn function only if no invocations have been made
|
214 |
+
* within the last quietMillis milliseconds.
|
215 |
+
*
|
216 |
+
* @param quietMillis number of milliseconds to wait before invoking fn
|
217 |
+
* @param fn function to be debounced
|
218 |
+
* @param ctx object to be used as this reference within fn
|
219 |
+
* @return debounced version of fn
|
220 |
+
*/
|
221 |
+
function debounce(quietMillis, fn, ctx) {
|
222 |
+
ctx = ctx || undefined;
|
223 |
+
var timeout;
|
224 |
+
return function () {
|
225 |
+
var args = arguments;
|
226 |
+
window.clearTimeout(timeout);
|
227 |
+
timeout = window.setTimeout(function() {
|
228 |
+
fn.apply(ctx, args);
|
229 |
+
}, quietMillis);
|
230 |
+
};
|
231 |
+
}
|
232 |
+
|
233 |
+
function installDebouncedScroll(threshold, element) {
|
234 |
+
var notify = debounce(threshold, function (e) { element.trigger("scroll-debounced", e);});
|
235 |
+
element.on("scroll", function (e) {
|
236 |
+
if (indexOf(e.target, element.get()) >= 0) notify(e);
|
237 |
+
});
|
238 |
+
}
|
239 |
+
|
240 |
+
function focus($el) {
|
241 |
+
if ($el[0] === document.activeElement) return;
|
242 |
+
|
243 |
+
/* set the focus in a 0 timeout - that way the focus is set after the processing
|
244 |
+
of the current event has finished - which seems like the only reliable way
|
245 |
+
to set focus */
|
246 |
+
window.setTimeout(function() {
|
247 |
+
var el=$el[0], pos=$el.val().length, range;
|
248 |
+
|
249 |
+
$el.focus();
|
250 |
+
|
251 |
+
/* make sure el received focus so we do not error out when trying to manipulate the caret.
|
252 |
+
sometimes modals or others listeners may steal it after its set */
|
253 |
+
var isVisible = (el.offsetWidth > 0 || el.offsetHeight > 0);
|
254 |
+
if (isVisible && el === document.activeElement) {
|
255 |
+
|
256 |
+
/* after the focus is set move the caret to the end, necessary when we val()
|
257 |
+
just before setting focus */
|
258 |
+
if(el.setSelectionRange)
|
259 |
+
{
|
260 |
+
el.setSelectionRange(pos, pos);
|
261 |
+
}
|
262 |
+
else if (el.createTextRange) {
|
263 |
+
range = el.createTextRange();
|
264 |
+
range.collapse(false);
|
265 |
+
range.select();
|
266 |
+
}
|
267 |
+
}
|
268 |
+
}, 0);
|
269 |
+
}
|
270 |
+
|
271 |
+
function getCursorInfo(el) {
|
272 |
+
el = $(el)[0];
|
273 |
+
var offset = 0;
|
274 |
+
var length = 0;
|
275 |
+
if ('selectionStart' in el) {
|
276 |
+
offset = el.selectionStart;
|
277 |
+
length = el.selectionEnd - offset;
|
278 |
+
} else if ('selection' in document) {
|
279 |
+
el.focus();
|
280 |
+
var sel = document.selection.createRange();
|
281 |
+
length = document.selection.createRange().text.length;
|
282 |
+
sel.moveStart('character', -el.value.length);
|
283 |
+
offset = sel.text.length - length;
|
284 |
+
}
|
285 |
+
return { offset: offset, length: length };
|
286 |
+
}
|
287 |
+
|
288 |
+
function killEvent(event) {
|
289 |
+
event.preventDefault();
|
290 |
+
event.stopPropagation();
|
291 |
+
}
|
292 |
+
function killEventImmediately(event) {
|
293 |
+
event.preventDefault();
|
294 |
+
event.stopImmediatePropagation();
|
295 |
+
}
|
296 |
+
|
297 |
+
function measureTextWidth(e) {
|
298 |
+
if (!sizer){
|
299 |
+
var style = e[0].currentStyle || window.getComputedStyle(e[0], null);
|
300 |
+
sizer = $(document.createElement("div")).css({
|
301 |
+
position: "absolute",
|
302 |
+
left: "-10000px",
|
303 |
+
top: "-10000px",
|
304 |
+
display: "none",
|
305 |
+
fontSize: style.fontSize,
|
306 |
+
fontFamily: style.fontFamily,
|
307 |
+
fontStyle: style.fontStyle,
|
308 |
+
fontWeight: style.fontWeight,
|
309 |
+
letterSpacing: style.letterSpacing,
|
310 |
+
textTransform: style.textTransform,
|
311 |
+
whiteSpace: "nowrap"
|
312 |
+
});
|
313 |
+
sizer.attr("class","select2-sizer");
|
314 |
+
$(document.body).append(sizer);
|
315 |
+
}
|
316 |
+
sizer.text(e.val());
|
317 |
+
return sizer.width();
|
318 |
+
}
|
319 |
+
|
320 |
+
function syncCssClasses(dest, src, adapter) {
|
321 |
+
var classes, replacements = [], adapted;
|
322 |
+
|
323 |
+
classes = $.trim(dest.attr("class"));
|
324 |
+
|
325 |
+
if (classes) {
|
326 |
+
classes = '' + classes; // for IE which returns object
|
327 |
+
|
328 |
+
$(classes.split(/\s+/)).each2(function() {
|
329 |
+
if (this.indexOf("select2-") === 0) {
|
330 |
+
replacements.push(this);
|
331 |
+
}
|
332 |
+
});
|
333 |
+
}
|
334 |
+
|
335 |
+
classes = $.trim(src.attr("class"));
|
336 |
+
|
337 |
+
if (classes) {
|
338 |
+
classes = '' + classes; // for IE which returns object
|
339 |
+
|
340 |
+
$(classes.split(/\s+/)).each2(function() {
|
341 |
+
if (this.indexOf("select2-") !== 0) {
|
342 |
+
adapted = adapter(this);
|
343 |
+
|
344 |
+
if (adapted) {
|
345 |
+
replacements.push(adapted);
|
346 |
+
}
|
347 |
+
}
|
348 |
+
});
|
349 |
+
}
|
350 |
+
|
351 |
+
dest.attr("class", replacements.join(" "));
|
352 |
+
}
|
353 |
+
|
354 |
+
|
355 |
+
function markMatch(text, term, markup, escapeMarkup) {
|
356 |
+
var match=stripDiacritics(text.toUpperCase()).indexOf(stripDiacritics(term.toUpperCase())),
|
357 |
+
tl=term.length;
|
358 |
+
|
359 |
+
if (match<0) {
|
360 |
+
markup.push(escapeMarkup(text));
|
361 |
+
return;
|
362 |
+
}
|
363 |
+
|
364 |
+
markup.push(escapeMarkup(text.substring(0, match)));
|
365 |
+
markup.push("<span class='select2-match'>");
|
366 |
+
markup.push(escapeMarkup(text.substring(match, match + tl)));
|
367 |
+
markup.push("</span>");
|
368 |
+
markup.push(escapeMarkup(text.substring(match + tl, text.length)));
|
369 |
+
}
|
370 |
+
|
371 |
+
function defaultEscapeMarkup(markup) {
|
372 |
+
var replace_map = {
|
373 |
+
'\\': '\',
|
374 |
+
'&': '&',
|
375 |
+
'<': '<',
|
376 |
+
'>': '>',
|
377 |
+
'"': '"',
|
378 |
+
"'": ''',
|
379 |
+
"/": '/'
|
380 |
+
};
|
381 |
+
|
382 |
+
return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
|
383 |
+
return replace_map[match];
|
384 |
+
});
|
385 |
+
}
|
386 |
+
|
387 |
+
/**
|
388 |
+
* Produces an ajax-based query function
|
389 |
+
*
|
390 |
+
* @param options object containing configuration parameters
|
391 |
+
* @param options.params parameter map for the transport ajax call, can contain such options as cache, jsonpCallback, etc. see $.ajax
|
392 |
+
* @param options.transport function that will be used to execute the ajax request. must be compatible with parameters supported by $.ajax
|
393 |
+
* @param options.url url for the data
|
394 |
+
* @param options.data a function(searchTerm, pageNumber, context) that should return an object containing query string parameters for the above url.
|
395 |
+
* @param options.dataType request data type: ajax, jsonp, other datatypes supported by jQuery's $.ajax function or the transport function if specified
|
396 |
+
* @param options.quietMillis (optional) milliseconds to wait before making the ajaxRequest, helps debounce the ajax function if invoked too often
|
397 |
+
* @param options.results a function(remoteData, pageNumber, query) that converts data returned form the remote request to the format expected by Select2.
|
398 |
+
* The expected format is an object containing the following keys:
|
399 |
+
* results array of objects that will be used as choices
|
400 |
+
* more (optional) boolean indicating whether there are more results available
|
401 |
+
* Example: {results:[{id:1, text:'Red'},{id:2, text:'Blue'}], more:true}
|
402 |
+
*/
|
403 |
+
function ajax(options) {
|
404 |
+
var timeout, // current scheduled but not yet executed request
|
405 |
+
handler = null,
|
406 |
+
quietMillis = options.quietMillis || 100,
|
407 |
+
ajaxUrl = options.url,
|
408 |
+
self = this;
|
409 |
+
|
410 |
+
return function (query) {
|
411 |
+
window.clearTimeout(timeout);
|
412 |
+
timeout = window.setTimeout(function () {
|
413 |
+
var data = options.data, // ajax data function
|
414 |
+
url = ajaxUrl, // ajax url string or function
|
415 |
+
transport = options.transport || $.fn.select2.ajaxDefaults.transport,
|
416 |
+
// deprecated - to be removed in 4.0 - use params instead
|
417 |
+
deprecated = {
|
418 |
+
type: options.type || 'GET', // set type of request (GET or POST)
|
419 |
+
cache: options.cache || false,
|
420 |
+
jsonpCallback: options.jsonpCallback||undefined,
|
421 |
+
dataType: options.dataType||"json"
|
422 |
+
},
|
423 |
+
params = $.extend({}, $.fn.select2.ajaxDefaults.params, deprecated);
|
424 |
+
|
425 |
+
data = data ? data.call(self, query.term, query.page, query.context) : null;
|
426 |
+
url = (typeof url === 'function') ? url.call(self, query.term, query.page, query.context) : url;
|
427 |
+
|
428 |
+
if (handler && typeof handler.abort === "function") { handler.abort(); }
|
429 |
+
|
430 |
+
if (options.params) {
|
431 |
+
if ($.isFunction(options.params)) {
|
432 |
+
$.extend(params, options.params.call(self));
|
433 |
+
} else {
|
434 |
+
$.extend(params, options.params);
|
435 |
+
}
|
436 |
+
}
|
437 |
+
|
438 |
+
$.extend(params, {
|
439 |
+
url: url,
|
440 |
+
dataType: options.dataType,
|
441 |
+
data: data,
|
442 |
+
success: function (data) {
|
443 |
+
// TODO - replace query.page with query so users have access to term, page, etc.
|
444 |
+
// added query as third paramter to keep backwards compatibility
|
445 |
+
var results = options.results(data, query.page, query);
|
446 |
+
query.callback(results);
|
447 |
+
},
|
448 |
+
error: function(jqXHR, textStatus, errorThrown){
|
449 |
+
var results = {
|
450 |
+
hasError: true,
|
451 |
+
jqXHR: jqXHR,
|
452 |
+
textStatus: textStatus,
|
453 |
+
errorThrown: errorThrown
|
454 |
+
};
|
455 |
+
|
456 |
+
query.callback(results);
|
457 |
+
}
|
458 |
+
});
|
459 |
+
handler = transport.call(self, params);
|
460 |
+
}, quietMillis);
|
461 |
+
};
|
462 |
+
}
|
463 |
+
|
464 |
+
/**
|
465 |
+
* Produces a query function that works with a local array
|
466 |
+
*
|
467 |
+
* @param options object containing configuration parameters. The options parameter can either be an array or an
|
468 |
+
* object.
|
469 |
+
*
|
470 |
+
* If the array form is used it is assumed that it contains objects with 'id' and 'text' keys.
|
471 |
+
*
|
472 |
+
* If the object form is used it is assumed that it contains 'data' and 'text' keys. The 'data' key should contain
|
473 |
+
* an array of objects that will be used as choices. These objects must contain at least an 'id' key. The 'text'
|
474 |
+
* key can either be a String in which case it is expected that each element in the 'data' array has a key with the
|
475 |
+
* value of 'text' which will be used to match choices. Alternatively, text can be a function(item) that can extract
|
476 |
+
* the text.
|
477 |
+
*/
|
478 |
+
function local(options) {
|
479 |
+
var data = options, // data elements
|
480 |
+
dataText,
|
481 |
+
tmp,
|
482 |
+
text = function (item) { return ""+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search
|
483 |
+
|
484 |
+
if ($.isArray(data)) {
|
485 |
+
tmp = data;
|
486 |
+
data = { results: tmp };
|
487 |
+
}
|
488 |
+
|
489 |
+
if ($.isFunction(data) === false) {
|
490 |
+
tmp = data;
|
491 |
+
data = function() { return tmp; };
|
492 |
+
}
|
493 |
+
|
494 |
+
var dataItem = data();
|
495 |
+
if (dataItem.text) {
|
496 |
+
text = dataItem.text;
|
497 |
+
// if text is not a function we assume it to be a key name
|
498 |
+
if (!$.isFunction(text)) {
|
499 |
+
dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available
|
500 |
+
text = function (item) { return item[dataText]; };
|
501 |
+
}
|
502 |
+
}
|
503 |
+
|
504 |
+
return function (query) {
|
505 |
+
var t = query.term, filtered = { results: [] }, process;
|
506 |
+
if (t === "") {
|
507 |
+
query.callback(data());
|
508 |
+
return;
|
509 |
+
}
|
510 |
+
|
511 |
+
process = function(datum, collection) {
|
512 |
+
var group, attr;
|
513 |
+
datum = datum[0];
|
514 |
+
if (datum.children) {
|
515 |
+
group = {};
|
516 |
+
for (attr in datum) {
|
517 |
+
if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];
|
518 |
+
}
|
519 |
+
group.children=[];
|
520 |
+
$(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });
|
521 |
+
if (group.children.length || query.matcher(t, text(group), datum)) {
|
522 |
+
collection.push(group);
|
523 |
+
}
|
524 |
+
} else {
|
525 |
+
if (query.matcher(t, text(datum), datum)) {
|
526 |
+
collection.push(datum);
|
527 |
+
}
|
528 |
+
}
|
529 |
+
};
|
530 |
+
|
531 |
+
$(data().results).each2(function(i, datum) { process(datum, filtered.results); });
|
532 |
+
query.callback(filtered);
|
533 |
+
};
|
534 |
+
}
|
535 |
+
|
536 |
+
// TODO javadoc
|
537 |
+
function tags(data) {
|
538 |
+
var isFunc = $.isFunction(data);
|
539 |
+
return function (query) {
|
540 |
+
var t = query.term, filtered = {results: []};
|
541 |
+
var result = isFunc ? data(query) : data;
|
542 |
+
if ($.isArray(result)) {
|
543 |
+
$(result).each(function () {
|
544 |
+
var isObject = this.text !== undefined,
|
545 |
+
text = isObject ? this.text : this;
|
546 |
+
if (t === "" || query.matcher(t, text)) {
|
547 |
+
filtered.results.push(isObject ? this : {id: this, text: this});
|
548 |
+
}
|
549 |
+
});
|
550 |
+
query.callback(filtered);
|
551 |
+
}
|
552 |
+
};
|
553 |
+
}
|
554 |
+
|
555 |
+
/**
|
556 |
+
* Checks if the formatter function should be used.
|
557 |
+
*
|
558 |
+
* Throws an error if it is not a function. Returns true if it should be used,
|
559 |
+
* false if no formatting should be performed.
|
560 |
+
*
|
561 |
+
* @param formatter
|
562 |
+
*/
|
563 |
+
function checkFormatter(formatter, formatterName) {
|
564 |
+
if ($.isFunction(formatter)) return true;
|
565 |
+
if (!formatter) return false;
|
566 |
+
if (typeof(formatter) === 'string') return true;
|
567 |
+
throw new Error(formatterName +" must be a string, function, or falsy value");
|
568 |
+
}
|
569 |
+
|
570 |
+
/**
|
571 |
+
* Returns a given value
|
572 |
+
* If given a function, returns its output
|
573 |
+
*
|
574 |
+
* @param val string|function
|
575 |
+
* @param context value of "this" to be passed to function
|
576 |
+
* @returns {*}
|
577 |
+
*/
|
578 |
+
function evaluate(val, context) {
|
579 |
+
if ($.isFunction(val)) {
|
580 |
+
var args = Array.prototype.slice.call(arguments, 2);
|
581 |
+
return val.apply(context, args);
|
582 |
+
}
|
583 |
+
return val;
|
584 |
+
}
|
585 |
+
|
586 |
+
function countResults(results) {
|
587 |
+
var count = 0;
|
588 |
+
$.each(results, function(i, item) {
|
589 |
+
if (item.children) {
|
590 |
+
count += countResults(item.children);
|
591 |
+
} else {
|
592 |
+
count++;
|
593 |
+
}
|
594 |
+
});
|
595 |
+
return count;
|
596 |
+
}
|
597 |
+
|
598 |
+
/**
|
599 |
+
* Default tokenizer. This function uses breaks the input on substring match of any string from the
|
600 |
+
* opts.tokenSeparators array and uses opts.createSearchChoice to create the choice object. Both of those
|
601 |
+
* two options have to be defined in order for the tokenizer to work.
|
602 |
+
*
|
603 |
+
* @param input text user has typed so far or pasted into the search field
|
604 |
+
* @param selection currently selected choices
|
605 |
+
* @param selectCallback function(choice) callback tho add the choice to selection
|
606 |
+
* @param opts select2's opts
|
607 |
+
* @return undefined/null to leave the current input unchanged, or a string to change the input to the returned value
|
608 |
+
*/
|
609 |
+
function defaultTokenizer(input, selection, selectCallback, opts) {
|
610 |
+
var original = input, // store the original so we can compare and know if we need to tell the search to update its text
|
611 |
+
dupe = false, // check for whether a token we extracted represents a duplicate selected choice
|
612 |
+
token, // token
|
613 |
+
index, // position at which the separator was found
|
614 |
+
i, l, // looping variables
|
615 |
+
separator; // the matched separator
|
616 |
+
|
617 |
+
if (!opts.createSearchChoice || !opts.tokenSeparators || opts.tokenSeparators.length < 1) return undefined;
|
618 |
+
|
619 |
+
while (true) {
|
620 |
+
index = -1;
|
621 |
+
|
622 |
+
for (i = 0, l = opts.tokenSeparators.length; i < l; i++) {
|
623 |
+
separator = opts.tokenSeparators[i];
|
624 |
+
index = input.indexOf(separator);
|
625 |
+
if (index >= 0) break;
|
626 |
+
}
|
627 |
+
|
628 |
+
if (index < 0) break; // did not find any token separator in the input string, bail
|
629 |
+
|
630 |
+
token = input.substring(0, index);
|
631 |
+
input = input.substring(index + separator.length);
|
632 |
+
|
633 |
+
if (token.length > 0) {
|
634 |
+
token = opts.createSearchChoice.call(this, token, selection);
|
635 |
+
if (token !== undefined && token !== null && opts.id(token) !== undefined && opts.id(token) !== null) {
|
636 |
+
dupe = false;
|
637 |
+
for (i = 0, l = selection.length; i < l; i++) {
|
638 |
+
if (equal(opts.id(token), opts.id(selection[i]))) {
|
639 |
+
dupe = true; break;
|
640 |
+
}
|
641 |
+
}
|
642 |
+
|
643 |
+
if (!dupe) selectCallback(token);
|
644 |
+
}
|
645 |
+
}
|
646 |
+
}
|
647 |
+
|
648 |
+
if (original!==input) return input;
|
649 |
+
}
|
650 |
+
|
651 |
+
function cleanupJQueryElements() {
|
652 |
+
var self = this;
|
653 |
+
|
654 |
+
$.each(arguments, function (i, element) {
|
655 |
+
self[element].remove();
|
656 |
+
self[element] = null;
|
657 |
+
});
|
658 |
+
}
|
659 |
+
|
660 |
+
/**
|
661 |
+
* Creates a new class
|
662 |
+
*
|
663 |
+
* @param superClass
|
664 |
+
* @param methods
|
665 |
+
*/
|
666 |
+
function clazz(SuperClass, methods) {
|
667 |
+
var constructor = function () {};
|
668 |
+
constructor.prototype = new SuperClass;
|
669 |
+
constructor.prototype.constructor = constructor;
|
670 |
+
constructor.prototype.parent = SuperClass.prototype;
|
671 |
+
constructor.prototype = $.extend(constructor.prototype, methods);
|
672 |
+
return constructor;
|
673 |
+
}
|
674 |
+
|
675 |
+
AbstractSelect2 = clazz(Object, {
|
676 |
+
|
677 |
+
// abstract
|
678 |
+
bind: function (func) {
|
679 |
+
var self = this;
|
680 |
+
return function () {
|
681 |
+
func.apply(self, arguments);
|
682 |
+
};
|
683 |
+
},
|
684 |
+
|
685 |
+
// abstract
|
686 |
+
init: function (opts) {
|
687 |
+
var results, search, resultsSelector = ".select2-results";
|
688 |
+
|
689 |
+
// prepare options
|
690 |
+
this.opts = opts = this.prepareOpts(opts);
|
691 |
+
|
692 |
+
this.id=opts.id;
|
693 |
+
|
694 |
+
// destroy if called on an existing component
|
695 |
+
if (opts.element.data("select2") !== undefined &&
|
696 |
+
opts.element.data("select2") !== null) {
|
697 |
+
opts.element.data("select2").destroy();
|
698 |
+
}
|
699 |
+
|
700 |
+
this.container = this.createContainer();
|
701 |
+
|
702 |
+
this.liveRegion = $('.select2-hidden-accessible');
|
703 |
+
if (this.liveRegion.length == 0) {
|
704 |
+
this.liveRegion = $("<span>", {
|
705 |
+
role: "status",
|
706 |
+
"aria-live": "polite"
|
707 |
+
})
|
708 |
+
.addClass("select2-hidden-accessible")
|
709 |
+
.appendTo(document.body);
|
710 |
+
}
|
711 |
+
|
712 |
+
this.containerId="s2id_"+(opts.element.attr("id") || "autogen"+nextUid());
|
713 |
+
this.containerEventName= this.containerId
|
714 |
+
.replace(/([.])/g, '_')
|
715 |
+
.replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');
|
716 |
+
this.container.attr("id", this.containerId);
|
717 |
+
|
718 |
+
this.container.attr("title", opts.element.attr("title"));
|
719 |
+
|
720 |
+
this.body = $(document.body);
|
721 |
+
|
722 |
+
syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
|
723 |
+
|
724 |
+
this.container.attr("style", opts.element.attr("style"));
|
725 |
+
this.container.css(evaluate(opts.containerCss, this.opts.element));
|
726 |
+
this.container.addClass(evaluate(opts.containerCssClass, this.opts.element));
|
727 |
+
|
728 |
+
this.elementTabIndex = this.opts.element.attr("tabindex");
|
729 |
+
|
730 |
+
// swap container for the element
|
731 |
+
this.opts.element
|
732 |
+
.data("select2", this)
|
733 |
+
.attr("tabindex", "-1")
|
734 |
+
.before(this.container)
|
735 |
+
.on("click.select2", killEvent); // do not leak click events
|
736 |
+
|
737 |
+
this.container.data("select2", this);
|
738 |
+
|
739 |
+
this.dropdown = this.container.find(".select2-drop");
|
740 |
+
|
741 |
+
syncCssClasses(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass);
|
742 |
+
|
743 |
+
this.dropdown.addClass(evaluate(opts.dropdownCssClass, this.opts.element));
|
744 |
+
this.dropdown.data("select2", this);
|
745 |
+
this.dropdown.on("click", killEvent);
|
746 |
+
|
747 |
+
this.results = results = this.container.find(resultsSelector);
|
748 |
+
this.search = search = this.container.find("input.select2-input");
|
749 |
+
|
750 |
+
this.queryCount = 0;
|
751 |
+
this.resultsPage = 0;
|
752 |
+
this.context = null;
|
753 |
+
|
754 |
+
// initialize the container
|
755 |
+
this.initContainer();
|
756 |
+
|
757 |
+
this.container.on("click", killEvent);
|
758 |
+
|
759 |
+
installFilteredMouseMove(this.results);
|
760 |
+
|
761 |
+
this.dropdown.on("mousemove-filtered", resultsSelector, this.bind(this.highlightUnderEvent));
|
762 |
+
this.dropdown.on("touchstart touchmove touchend", resultsSelector, this.bind(function (event) {
|
763 |
+
this._touchEvent = true;
|
764 |
+
this.highlightUnderEvent(event);
|
765 |
+
}));
|
766 |
+
this.dropdown.on("touchmove", resultsSelector, this.bind(this.touchMoved));
|
767 |
+
this.dropdown.on("touchstart touchend", resultsSelector, this.bind(this.clearTouchMoved));
|
768 |
+
|
769 |
+
// Waiting for a click event on touch devices to select option and hide dropdown
|
770 |
+
// otherwise click will be triggered on an underlying element
|
771 |
+
this.dropdown.on('click', this.bind(function (event) {
|
772 |
+
if (this._touchEvent) {
|
773 |
+
this._touchEvent = false;
|
774 |
+
this.selectHighlighted();
|
775 |
+
}
|
776 |
+
}));
|
777 |
+
|
778 |
+
installDebouncedScroll(80, this.results);
|
779 |
+
this.dropdown.on("scroll-debounced", resultsSelector, this.bind(this.loadMoreIfNeeded));
|
780 |
+
|
781 |
+
// do not propagate change event from the search field out of the component
|
782 |
+
$(this.container).on("change", ".select2-input", function(e) {e.stopPropagation();});
|
783 |
+
$(this.dropdown).on("change", ".select2-input", function(e) {e.stopPropagation();});
|
784 |
+
|
785 |
+
// if jquery.mousewheel plugin is installed we can prevent out-of-bounds scrolling of results via mousewheel
|
786 |
+
if ($.fn.mousewheel) {
|
787 |
+
results.mousewheel(function (e, delta, deltaX, deltaY) {
|
788 |
+
var top = results.scrollTop();
|
789 |
+
if (deltaY > 0 && top - deltaY <= 0) {
|
790 |
+
results.scrollTop(0);
|
791 |
+
killEvent(e);
|
792 |
+
} else if (deltaY < 0 && results.get(0).scrollHeight - results.scrollTop() + deltaY <= results.height()) {
|
793 |
+
results.scrollTop(results.get(0).scrollHeight - results.height());
|
794 |
+
killEvent(e);
|
795 |
+
}
|
796 |
+
});
|
797 |
+
}
|
798 |
+
|
799 |
+
installKeyUpChangeEvent(search);
|
800 |
+
search.on("keyup-change input paste", this.bind(this.updateResults));
|
801 |
+
search.on("focus", function () { search.addClass("select2-focused"); });
|
802 |
+
search.on("blur", function () { search.removeClass("select2-focused");});
|
803 |
+
|
804 |
+
this.dropdown.on("mouseup", resultsSelector, this.bind(function (e) {
|
805 |
+
if ($(e.target).closest(".select2-result-selectable").length > 0) {
|
806 |
+
this.highlightUnderEvent(e);
|
807 |
+
this.selectHighlighted(e);
|
808 |
+
}
|
809 |
+
}));
|
810 |
+
|
811 |
+
// trap all mouse events from leaving the dropdown. sometimes there may be a modal that is listening
|
812 |
+
// for mouse events outside of itself so it can close itself. since the dropdown is now outside the select2's
|
813 |
+
// dom it will trigger the popup close, which is not what we want
|
814 |
+
// focusin can cause focus wars between modals and select2 since the dropdown is outside the modal.
|
815 |
+
this.dropdown.on("click mouseup mousedown touchstart touchend focusin", function (e) { e.stopPropagation(); });
|
816 |
+
|
817 |
+
this.nextSearchTerm = undefined;
|
818 |
+
|
819 |
+
if ($.isFunction(this.opts.initSelection)) {
|
820 |
+
// initialize selection based on the current value of the source element
|
821 |
+
this.initSelection();
|
822 |
+
|
823 |
+
// if the user has provided a function that can set selection based on the value of the source element
|
824 |
+
// we monitor the change event on the element and trigger it, allowing for two way synchronization
|
825 |
+
this.monitorSource();
|
826 |
+
}
|
827 |
+
|
828 |
+
if (opts.maximumInputLength !== null) {
|
829 |
+
this.search.attr("maxlength", opts.maximumInputLength);
|
830 |
+
}
|
831 |
+
|
832 |
+
var disabled = opts.element.prop("disabled");
|
833 |
+
if (disabled === undefined) disabled = false;
|
834 |
+
this.enable(!disabled);
|
835 |
+
|
836 |
+
var readonly = opts.element.prop("readonly");
|
837 |
+
if (readonly === undefined) readonly = false;
|
838 |
+
this.readonly(readonly);
|
839 |
+
|
840 |
+
// Calculate size of scrollbar
|
841 |
+
scrollBarDimensions = scrollBarDimensions || measureScrollbar();
|
842 |
+
|
843 |
+
this.autofocus = opts.element.prop("autofocus");
|
844 |
+
opts.element.prop("autofocus", false);
|
845 |
+
if (this.autofocus) this.focus();
|
846 |
+
|
847 |
+
this.search.attr("placeholder", opts.searchInputPlaceholder);
|
848 |
+
},
|
849 |
+
|
850 |
+
// abstract
|
851 |
+
destroy: function () {
|
852 |
+
var element=this.opts.element, select2 = element.data("select2"), self = this;
|
853 |
+
|
854 |
+
this.close();
|
855 |
+
|
856 |
+
if (element.length && element[0].detachEvent && self._sync) {
|
857 |
+
element.each(function () {
|
858 |
+
if (self._sync) {
|
859 |
+
this.detachEvent("onpropertychange", self._sync);
|
860 |
+
}
|
861 |
+
});
|
862 |
+
}
|
863 |
+
if (this.propertyObserver) {
|
864 |
+
this.propertyObserver.disconnect();
|
865 |
+
this.propertyObserver = null;
|
866 |
+
}
|
867 |
+
this._sync = null;
|
868 |
+
|
869 |
+
if (select2 !== undefined) {
|
870 |
+
select2.container.remove();
|
871 |
+
select2.liveRegion.remove();
|
872 |
+
select2.dropdown.remove();
|
873 |
+
element
|
874 |
+
.show()
|
875 |
+
.removeData("select2")
|
876 |
+
.off(".select2")
|
877 |
+
.prop("autofocus", this.autofocus || false);
|
878 |
+
if (this.elementTabIndex) {
|
879 |
+
element.attr({tabindex: this.elementTabIndex});
|
880 |
+
} else {
|
881 |
+
element.removeAttr("tabindex");
|
882 |
+
}
|
883 |
+
element.show();
|
884 |
+
}
|
885 |
+
|
886 |
+
cleanupJQueryElements.call(this,
|
887 |
+
"container",
|
888 |
+
"liveRegion",
|
889 |
+
"dropdown",
|
890 |
+
"results",
|
891 |
+
"search"
|
892 |
+
);
|
893 |
+
},
|
894 |
+
|
895 |
+
// abstract
|
896 |
+
optionToData: function(element) {
|
897 |
+
if (element.is("option")) {
|
898 |
+
return {
|
899 |
+
id:element.prop("value"),
|
900 |
+
text:element.text(),
|
901 |
+
element: element.get(),
|
902 |
+
css: element.attr("class"),
|
903 |
+
disabled: element.prop("disabled"),
|
904 |
+
locked: equal(element.attr("locked"), "locked") || equal(element.data("locked"), true)
|
905 |
+
};
|
906 |
+
} else if (element.is("optgroup")) {
|
907 |
+
return {
|
908 |
+
text:element.attr("label"),
|
909 |
+
children:[],
|
910 |
+
element: element.get(),
|
911 |
+
css: element.attr("class")
|
912 |
+
};
|
913 |
+
}
|
914 |
+
},
|
915 |
+
|
916 |
+
// abstract
|
917 |
+
prepareOpts: function (opts) {
|
918 |
+
var element, select, idKey, ajaxUrl, self = this;
|
919 |
+
|
920 |
+
element = opts.element;
|
921 |
+
|
922 |
+
if (element.get(0).tagName.toLowerCase() === "select") {
|
923 |
+
this.select = select = opts.element;
|
924 |
+
}
|
925 |
+
|
926 |
+
if (select) {
|
927 |
+
// these options are not allowed when attached to a select because they are picked up off the element itself
|
928 |
+
$.each(["id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags"], function () {
|
929 |
+
if (this in opts) {
|
930 |
+
throw new Error("Option '" + this + "' is not allowed for Select2 when attached to a <select> element.");
|
931 |
+
}
|
932 |
+
});
|
933 |
+
}
|
934 |
+
|
935 |
+
opts = $.extend({}, {
|
936 |
+
populateResults: function(container, results, query) {
|
937 |
+
var populate, id=this.opts.id, liveRegion=this.liveRegion;
|
938 |
+
|
939 |
+
populate=function(results, container, depth) {
|
940 |
+
|
941 |
+
var i, l, result, selectable, disabled, compound, node, label, innerContainer, formatted;
|
942 |
+
|
943 |
+
results = opts.sortResults(results, container, query);
|
944 |
+
|
945 |
+
// collect the created nodes for bulk append
|
946 |
+
var nodes = [];
|
947 |
+
for (i = 0, l = results.length; i < l; i = i + 1) {
|
948 |
+
|
949 |
+
result=results[i];
|
950 |
+
|
951 |
+
disabled = (result.disabled === true);
|
952 |
+
selectable = (!disabled) && (id(result) !== undefined);
|
953 |
+
|
954 |
+
compound=result.children && result.children.length > 0;
|
955 |
+
|
956 |
+
node=$("<li></li>");
|
957 |
+
node.addClass("select2-results-dept-"+depth);
|
958 |
+
node.addClass("select2-result");
|
959 |
+
node.addClass(selectable ? "select2-result-selectable" : "select2-result-unselectable");
|
960 |
+
if (disabled) { node.addClass("select2-disabled"); }
|
961 |
+
if (compound) { node.addClass("select2-result-with-children"); }
|
962 |
+
node.addClass(self.opts.formatResultCssClass(result));
|
963 |
+
node.attr("role", "presentation");
|
964 |
+
|
965 |
+
label=$(document.createElement("div"));
|
966 |
+
label.addClass("select2-result-label");
|
967 |
+
label.attr("id", "select2-result-label-" + nextUid());
|
968 |
+
label.attr("role", "option");
|
969 |
+
|
970 |
+
formatted=opts.formatResult(result, label, query, self.opts.escapeMarkup);
|
971 |
+
if (formatted!==undefined) {
|
972 |
+
label.html(formatted);
|
973 |
+
node.append(label);
|
974 |
+
}
|
975 |
+
|
976 |
+
|
977 |
+
if (compound) {
|
978 |
+
|
979 |
+
innerContainer=$("<ul></ul>");
|
980 |
+
innerContainer.addClass("select2-result-sub");
|
981 |
+
populate(result.children, innerContainer, depth+1);
|
982 |
+
node.append(innerContainer);
|
983 |
+
}
|
984 |
+
|
985 |
+
node.data("select2-data", result);
|
986 |
+
nodes.push(node[0]);
|
987 |
+
}
|
988 |
+
|
989 |
+
// bulk append the created nodes
|
990 |
+
container.append(nodes);
|
991 |
+
liveRegion.text(opts.formatMatches(results.length));
|
992 |
+
};
|
993 |
+
|
994 |
+
populate(results, container, 0);
|
995 |
+
}
|
996 |
+
}, $.fn.select2.defaults, opts);
|
997 |
+
|
998 |
+
if (typeof(opts.id) !== "function") {
|
999 |
+
idKey = opts.id;
|
1000 |
+
opts.id = function (e) { return e[idKey]; };
|
1001 |
+
}
|
1002 |
+
|
1003 |
+
if ($.isArray(opts.element.data("select2Tags"))) {
|
1004 |
+
if ("tags" in opts) {
|
1005 |
+
throw "tags specified as both an attribute 'data-select2-tags' and in options of Select2 " + opts.element.attr("id");
|
1006 |
+
}
|
1007 |
+
opts.tags=opts.element.data("select2Tags");
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
if (select) {
|
1011 |
+
opts.query = this.bind(function (query) {
|
1012 |
+
var data = { results: [], more: false },
|
1013 |
+
term = query.term,
|
1014 |
+
children, placeholderOption, process;
|
1015 |
+
|
1016 |
+
process=function(element, collection) {
|
1017 |
+
var group;
|
1018 |
+
if (element.is("option")) {
|
1019 |
+
if (query.matcher(term, element.text(), element)) {
|
1020 |
+
collection.push(self.optionToData(element));
|
1021 |
+
}
|
1022 |
+
} else if (element.is("optgroup")) {
|
1023 |
+
group=self.optionToData(element);
|
1024 |
+
element.children().each2(function(i, elm) { process(elm, group.children); });
|
1025 |
+
if (group.children.length>0) {
|
1026 |
+
collection.push(group);
|
1027 |
+
}
|
1028 |
+
}
|
1029 |
+
};
|
1030 |
+
|
1031 |
+
children=element.children();
|
1032 |
+
|
1033 |
+
// ignore the placeholder option if there is one
|
1034 |
+
if (this.getPlaceholder() !== undefined && children.length > 0) {
|
1035 |
+
placeholderOption = this.getPlaceholderOption();
|
1036 |
+
if (placeholderOption) {
|
1037 |
+
children=children.not(placeholderOption);
|
1038 |
+
}
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
children.each2(function(i, elm) { process(elm, data.results); });
|
1042 |
+
|
1043 |
+
query.callback(data);
|
1044 |
+
});
|
1045 |
+
// this is needed because inside val() we construct choices from options and their id is hardcoded
|
1046 |
+
opts.id=function(e) { return e.id; };
|
1047 |
+
} else {
|
1048 |
+
if (!("query" in opts)) {
|
1049 |
+
|
1050 |
+
if ("ajax" in opts) {
|
1051 |
+
ajaxUrl = opts.element.data("ajax-url");
|
1052 |
+
if (ajaxUrl && ajaxUrl.length > 0) {
|
1053 |
+
opts.ajax.url = ajaxUrl;
|
1054 |
+
}
|
1055 |
+
opts.query = ajax.call(opts.element, opts.ajax);
|
1056 |
+
} else if ("data" in opts) {
|
1057 |
+
opts.query = local(opts.data);
|
1058 |
+
} else if ("tags" in opts) {
|
1059 |
+
opts.query = tags(opts.tags);
|
1060 |
+
if (opts.createSearchChoice === undefined) {
|
1061 |
+
opts.createSearchChoice = function (term) { return {id: $.trim(term), text: $.trim(term)}; };
|
1062 |
+
}
|
1063 |
+
if (opts.initSelection === undefined) {
|
1064 |
+
opts.initSelection = function (element, callback) {
|
1065 |
+
var data = [];
|
1066 |
+
$(splitVal(element.val(), opts.separator, opts.transformVal)).each(function () {
|
1067 |
+
var obj = { id: this, text: this },
|
1068 |
+
tags = opts.tags;
|
1069 |
+
if ($.isFunction(tags)) tags=tags();
|
1070 |
+
$(tags).each(function() { if (equal(this.id, obj.id)) { obj = this; return false; } });
|
1071 |
+
data.push(obj);
|
1072 |
+
});
|
1073 |
+
|
1074 |
+
callback(data);
|
1075 |
+
};
|
1076 |
+
}
|
1077 |
+
}
|
1078 |
+
}
|
1079 |
+
}
|
1080 |
+
if (typeof(opts.query) !== "function") {
|
1081 |
+
throw "query function not defined for Select2 " + opts.element.attr("id");
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
if (opts.createSearchChoicePosition === 'top') {
|
1085 |
+
opts.createSearchChoicePosition = function(list, item) { list.unshift(item); };
|
1086 |
+
}
|
1087 |
+
else if (opts.createSearchChoicePosition === 'bottom') {
|
1088 |
+
opts.createSearchChoicePosition = function(list, item) { list.push(item); };
|
1089 |
+
}
|
1090 |
+
else if (typeof(opts.createSearchChoicePosition) !== "function") {
|
1091 |
+
throw "invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
return opts;
|
1095 |
+
},
|
1096 |
+
|
1097 |
+
/**
|
1098 |
+
* Monitor the original element for changes and update select2 accordingly
|
1099 |
+
*/
|
1100 |
+
// abstract
|
1101 |
+
monitorSource: function () {
|
1102 |
+
var el = this.opts.element, observer, self = this;
|
1103 |
+
|
1104 |
+
el.on("change.select2", this.bind(function (e) {
|
1105 |
+
if (this.opts.element.data("select2-change-triggered") !== true) {
|
1106 |
+
this.initSelection();
|
1107 |
+
}
|
1108 |
+
}));
|
1109 |
+
|
1110 |
+
this._sync = this.bind(function () {
|
1111 |
+
|
1112 |
+
// sync enabled state
|
1113 |
+
var disabled = el.prop("disabled");
|
1114 |
+
if (disabled === undefined) disabled = false;
|
1115 |
+
this.enable(!disabled);
|
1116 |
+
|
1117 |
+
var readonly = el.prop("readonly");
|
1118 |
+
if (readonly === undefined) readonly = false;
|
1119 |
+
this.readonly(readonly);
|
1120 |
+
|
1121 |
+
if (this.container) {
|
1122 |
+
syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
|
1123 |
+
this.container.addClass(evaluate(this.opts.containerCssClass, this.opts.element));
|
1124 |
+
}
|
1125 |
+
|
1126 |
+
if (this.dropdown) {
|
1127 |
+
syncCssClasses(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass);
|
1128 |
+
this.dropdown.addClass(evaluate(this.opts.dropdownCssClass, this.opts.element));
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
});
|
1132 |
+
|
1133 |
+
// IE8-10 (IE9/10 won't fire propertyChange via attachEventListener)
|
1134 |
+
if (el.length && el[0].attachEvent) {
|
1135 |
+
el.each(function() {
|
1136 |
+
this.attachEvent("onpropertychange", self._sync);
|
1137 |
+
});
|
1138 |
+
}
|
1139 |
+
|
1140 |
+
// safari, chrome, firefox, IE11
|
1141 |
+
observer = window.MutationObserver || window.WebKitMutationObserver|| window.MozMutationObserver;
|
1142 |
+
if (observer !== undefined) {
|
1143 |
+
if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
|
1144 |
+
this.propertyObserver = new observer(function (mutations) {
|
1145 |
+
$.each(mutations, self._sync);
|
1146 |
+
});
|
1147 |
+
this.propertyObserver.observe(el.get(0), { attributes:true, subtree:false });
|
1148 |
+
}
|
1149 |
+
},
|
1150 |
+
|
1151 |
+
// abstract
|
1152 |
+
triggerSelect: function(data) {
|
1153 |
+
var evt = $.Event("select2-selecting", { val: this.id(data), object: data, choice: data });
|
1154 |
+
this.opts.element.trigger(evt);
|
1155 |
+
return !evt.isDefaultPrevented();
|
1156 |
+
},
|
1157 |
+
|
1158 |
+
/**
|
1159 |
+
* Triggers the change event on the source element
|
1160 |
+
*/
|
1161 |
+
// abstract
|
1162 |
+
triggerChange: function (details) {
|
1163 |
+
|
1164 |
+
details = details || {};
|
1165 |
+
details= $.extend({}, details, { type: "change", val: this.val() });
|
1166 |
+
// prevents recursive triggering
|
1167 |
+
this.opts.element.data("select2-change-triggered", true);
|
1168 |
+
this.opts.element.trigger(details);
|
1169 |
+
this.opts.element.data("select2-change-triggered", false);
|
1170 |
+
|
1171 |
+
// some validation frameworks ignore the change event and listen instead to keyup, click for selects
|
1172 |
+
// so here we trigger the click event manually
|
1173 |
+
this.opts.element.click();
|
1174 |
+
|
1175 |
+
// ValidationEngine ignores the change event and listens instead to blur
|
1176 |
+
// so here we trigger the blur event manually if so desired
|
1177 |
+
if (this.opts.blurOnChange)
|
1178 |
+
this.opts.element.blur();
|
1179 |
+
},
|
1180 |
+
|
1181 |
+
//abstract
|
1182 |
+
isInterfaceEnabled: function()
|
1183 |
+
{
|
1184 |
+
return this.enabledInterface === true;
|
1185 |
+
},
|
1186 |
+
|
1187 |
+
// abstract
|
1188 |
+
enableInterface: function() {
|
1189 |
+
var enabled = this._enabled && !this._readonly,
|
1190 |
+
disabled = !enabled;
|
1191 |
+
|
1192 |
+
if (enabled === this.enabledInterface) return false;
|
1193 |
+
|
1194 |
+
this.container.toggleClass("select2-container-disabled", disabled);
|
1195 |
+
this.close();
|
1196 |
+
this.enabledInterface = enabled;
|
1197 |
+
|
1198 |
+
return true;
|
1199 |
+
},
|
1200 |
+
|
1201 |
+
// abstract
|
1202 |
+
enable: function(enabled) {
|
1203 |
+
if (enabled === undefined) enabled = true;
|
1204 |
+
if (this._enabled === enabled) return;
|
1205 |
+
this._enabled = enabled;
|
1206 |
+
|
1207 |
+
this.opts.element.prop("disabled", !enabled);
|
1208 |
+
this.enableInterface();
|
1209 |
+
},
|
1210 |
+
|
1211 |
+
// abstract
|
1212 |
+
disable: function() {
|
1213 |
+
this.enable(false);
|
1214 |
+
},
|
1215 |
+
|
1216 |
+
// abstract
|
1217 |
+
readonly: function(enabled) {
|
1218 |
+
if (enabled === undefined) enabled = false;
|
1219 |
+
if (this._readonly === enabled) return;
|
1220 |
+
this._readonly = enabled;
|
1221 |
+
|
1222 |
+
this.opts.element.prop("readonly", enabled);
|
1223 |
+
this.enableInterface();
|
1224 |
+
},
|
1225 |
+
|
1226 |
+
// abstract
|
1227 |
+
opened: function () {
|
1228 |
+
return (this.container) ? this.container.hasClass("select2-dropdown-open") : false;
|
1229 |
+
},
|
1230 |
+
|
1231 |
+
// abstract
|
1232 |
+
positionDropdown: function() {
|
1233 |
+
var $dropdown = this.dropdown,
|
1234 |
+
container = this.container,
|
1235 |
+
offset = container.offset(),
|
1236 |
+
height = container.outerHeight(false),
|
1237 |
+
width = container.outerWidth(false),
|
1238 |
+
dropHeight = $dropdown.outerHeight(false),
|
1239 |
+
$window = $(window),
|
1240 |
+
windowWidth = $window.width(),
|
1241 |
+
windowHeight = $window.height(),
|
1242 |
+
viewPortRight = $window.scrollLeft() + windowWidth,
|
1243 |
+
viewportBottom = $window.scrollTop() + windowHeight,
|
1244 |
+
dropTop = offset.top + height,
|
1245 |
+
dropLeft = offset.left,
|
1246 |
+
enoughRoomBelow = dropTop + dropHeight <= viewportBottom,
|
1247 |
+
enoughRoomAbove = (offset.top - dropHeight) >= $window.scrollTop(),
|
1248 |
+
dropWidth = $dropdown.outerWidth(false),
|
1249 |
+
enoughRoomOnRight = function() {
|
1250 |
+
return dropLeft + dropWidth <= viewPortRight;
|
1251 |
+
},
|
1252 |
+
enoughRoomOnLeft = function() {
|
1253 |
+
return offset.left + viewPortRight + container.outerWidth(false) > dropWidth;
|
1254 |
+
},
|
1255 |
+
aboveNow = $dropdown.hasClass("select2-drop-above"),
|
1256 |
+
bodyOffset,
|
1257 |
+
above,
|
1258 |
+
changeDirection,
|
1259 |
+
css,
|
1260 |
+
resultsListNode;
|
1261 |
+
|
1262 |
+
// always prefer the current above/below alignment, unless there is not enough room
|
1263 |
+
if (aboveNow) {
|
1264 |
+
above = true;
|
1265 |
+
if (!enoughRoomAbove && enoughRoomBelow) {
|
1266 |
+
changeDirection = true;
|
1267 |
+
above = false;
|
1268 |
+
}
|
1269 |
+
} else {
|
1270 |
+
above = false;
|
1271 |
+
if (!enoughRoomBelow && enoughRoomAbove) {
|
1272 |
+
changeDirection = true;
|
1273 |
+
above = true;
|
1274 |
+
}
|
1275 |
+
}
|
1276 |
+
|
1277 |
+
//if we are changing direction we need to get positions when dropdown is hidden;
|
1278 |
+
if (changeDirection) {
|
1279 |
+
$dropdown.hide();
|
1280 |
+
offset = this.container.offset();
|
1281 |
+
height = this.container.outerHeight(false);
|
1282 |
+
width = this.container.outerWidth(false);
|
1283 |
+
dropHeight = $dropdown.outerHeight(false);
|
1284 |
+
viewPortRight = $window.scrollLeft() + windowWidth;
|
1285 |
+
viewportBottom = $window.scrollTop() + windowHeight;
|
1286 |
+
dropTop = offset.top + height;
|
1287 |
+
dropLeft = offset.left;
|
1288 |
+
dropWidth = $dropdown.outerWidth(false);
|
1289 |
+
$dropdown.show();
|
1290 |
+
|
1291 |
+
// fix so the cursor does not move to the left within the search-textbox in IE
|
1292 |
+
this.focusSearch();
|
1293 |
+
}
|
1294 |
+
|
1295 |
+
if (this.opts.dropdownAutoWidth) {
|
1296 |
+
resultsListNode = $('.select2-results', $dropdown)[0];
|
1297 |
+
$dropdown.addClass('select2-drop-auto-width');
|
1298 |
+
$dropdown.css('width', '');
|
1299 |
+
// Add scrollbar width to dropdown if vertical scrollbar is present
|
1300 |
+
dropWidth = $dropdown.outerWidth(false) + (resultsListNode.scrollHeight === resultsListNode.clientHeight ? 0 : scrollBarDimensions.width);
|
1301 |
+
dropWidth > width ? width = dropWidth : dropWidth = width;
|
1302 |
+
dropHeight = $dropdown.outerHeight(false);
|
1303 |
+
}
|
1304 |
+
else {
|
1305 |
+
this.container.removeClass('select2-drop-auto-width');
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
//console.log("below/ droptop:", dropTop, "dropHeight", dropHeight, "sum", (dropTop+dropHeight)+" viewport bottom", viewportBottom, "enough?", enoughRoomBelow);
|
1309 |
+
//console.log("above/ offset.top", offset.top, "dropHeight", dropHeight, "top", (offset.top-dropHeight), "scrollTop", this.body.scrollTop(), "enough?", enoughRoomAbove);
|
1310 |
+
|
1311 |
+
// fix positioning when body has an offset and is not position: static
|
1312 |
+
if (this.body.css('position') !== 'static') {
|
1313 |
+
bodyOffset = this.body.offset();
|
1314 |
+
dropTop -= bodyOffset.top;
|
1315 |
+
dropLeft -= bodyOffset.left;
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
if (!enoughRoomOnRight() && enoughRoomOnLeft()) {
|
1319 |
+
dropLeft = offset.left + this.container.outerWidth(false) - dropWidth;
|
1320 |
+
}
|
1321 |
+
|
1322 |
+
css = {
|
1323 |
+
left: dropLeft,
|
1324 |
+
width: width
|
1325 |
+
};
|
1326 |
+
|
1327 |
+
if (above) {
|
1328 |
+
css.top = offset.top - dropHeight;
|
1329 |
+
css.bottom = 'auto';
|
1330 |
+
this.container.addClass("select2-drop-above");
|
1331 |
+
$dropdown.addClass("select2-drop-above");
|
1332 |
+
}
|
1333 |
+
else {
|
1334 |
+
css.top = dropTop;
|
1335 |
+
css.bottom = 'auto';
|
1336 |
+
this.container.removeClass("select2-drop-above");
|
1337 |
+
$dropdown.removeClass("select2-drop-above");
|
1338 |
+
}
|
1339 |
+
css = $.extend(css, evaluate(this.opts.dropdownCss, this.opts.element));
|
1340 |
+
|
1341 |
+
$dropdown.css(css);
|
1342 |
+
},
|
1343 |
+
|
1344 |
+
// abstract
|
1345 |
+
shouldOpen: function() {
|
1346 |
+
var event;
|
1347 |
+
|
1348 |
+
if (this.opened()) return false;
|
1349 |
+
|
1350 |
+
if (this._enabled === false || this._readonly === true) return false;
|
1351 |
+
|
1352 |
+
event = $.Event("select2-opening");
|
1353 |
+
this.opts.element.trigger(event);
|
1354 |
+
return !event.isDefaultPrevented();
|
1355 |
+
},
|
1356 |
+
|
1357 |
+
// abstract
|
1358 |
+
clearDropdownAlignmentPreference: function() {
|
1359 |
+
// clear the classes used to figure out the preference of where the dropdown should be opened
|
1360 |
+
this.container.removeClass("select2-drop-above");
|
1361 |
+
this.dropdown.removeClass("select2-drop-above");
|
1362 |
+
},
|
1363 |
+
|
1364 |
+
/**
|
1365 |
+
* Opens the dropdown
|
1366 |
+
*
|
1367 |
+
* @return {Boolean} whether or not dropdown was opened. This method will return false if, for example,
|
1368 |
+
* the dropdown is already open, or if the 'open' event listener on the element called preventDefault().
|
1369 |
+
*/
|
1370 |
+
// abstract
|
1371 |
+
open: function () {
|
1372 |
+
|
1373 |
+
if (!this.shouldOpen()) return false;
|
1374 |
+
|
1375 |
+
this.opening();
|
1376 |
+
|
1377 |
+
// Only bind the document mousemove when the dropdown is visible
|
1378 |
+
$document.on("mousemove.select2Event", function (e) {
|
1379 |
+
lastMousePosition.x = e.pageX;
|
1380 |
+
lastMousePosition.y = e.pageY;
|
1381 |
+
});
|
1382 |
+
|
1383 |
+
return true;
|
1384 |
+
},
|
1385 |
+
|
1386 |
+
/**
|
1387 |
+
* Performs the opening of the dropdown
|
1388 |
+
*/
|
1389 |
+
// abstract
|
1390 |
+
opening: function() {
|
1391 |
+
var cid = this.containerEventName,
|
1392 |
+
scroll = "scroll." + cid,
|
1393 |
+
resize = "resize."+cid,
|
1394 |
+
orient = "orientationchange."+cid,
|
1395 |
+
mask;
|
1396 |
+
|
1397 |
+
this.container.addClass("select2-dropdown-open").addClass("select2-container-active");
|
1398 |
+
|
1399 |
+
this.clearDropdownAlignmentPreference();
|
1400 |
+
|
1401 |
+
if(this.dropdown[0] !== this.body.children().last()[0]) {
|
1402 |
+
this.dropdown.detach().appendTo(this.body);
|
1403 |
+
}
|
1404 |
+
|
1405 |
+
// create the dropdown mask if doesn't already exist
|
1406 |
+
mask = $("#select2-drop-mask");
|
1407 |
+
if (mask.length === 0) {
|
1408 |
+
mask = $(document.createElement("div"));
|
1409 |
+
mask.attr("id","select2-drop-mask").attr("class","select2-drop-mask");
|
1410 |
+
mask.hide();
|
1411 |
+
mask.appendTo(this.body);
|
1412 |
+
mask.on("mousedown touchstart click", function (e) {
|
1413 |
+
// Prevent IE from generating a click event on the body
|
1414 |
+
reinsertElement(mask);
|
1415 |
+
|
1416 |
+
var dropdown = $("#select2-drop"), self;
|
1417 |
+
if (dropdown.length > 0) {
|
1418 |
+
self=dropdown.data("select2");
|
1419 |
+
if (self.opts.selectOnBlur) {
|
1420 |
+
self.selectHighlighted({noFocus: true});
|
1421 |
+
}
|
1422 |
+
self.close();
|
1423 |
+
e.preventDefault();
|
1424 |
+
e.stopPropagation();
|
1425 |
+
}
|
1426 |
+
});
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
// ensure the mask is always right before the dropdown
|
1430 |
+
if (this.dropdown.prev()[0] !== mask[0]) {
|
1431 |
+
this.dropdown.before(mask);
|
1432 |
+
}
|
1433 |
+
|
1434 |
+
// move the global id to the correct dropdown
|
1435 |
+
$("#select2-drop").removeAttr("id");
|
1436 |
+
this.dropdown.attr("id", "select2-drop");
|
1437 |
+
|
1438 |
+
// show the elements
|
1439 |
+
mask.show();
|
1440 |
+
|
1441 |
+
this.positionDropdown();
|
1442 |
+
this.dropdown.show();
|
1443 |
+
this.positionDropdown();
|
1444 |
+
|
1445 |
+
this.dropdown.addClass("select2-drop-active");
|
1446 |
+
|
1447 |
+
// attach listeners to events that can change the position of the container and thus require
|
1448 |
+
// the position of the dropdown to be updated as well so it does not come unglued from the container
|
1449 |
+
var that = this;
|
1450 |
+
this.container.parents().add(window).each(function () {
|
1451 |
+
$(this).on(resize+" "+scroll+" "+orient, function (e) {
|
1452 |
+
if (that.opened()) that.positionDropdown();
|
1453 |
+
});
|
1454 |
+
});
|
1455 |
+
|
1456 |
+
|
1457 |
+
},
|
1458 |
+
|
1459 |
+
// abstract
|
1460 |
+
close: function () {
|
1461 |
+
if (!this.opened()) return;
|
1462 |
+
|
1463 |
+
var cid = this.containerEventName,
|
1464 |
+
scroll = "scroll." + cid,
|
1465 |
+
resize = "resize."+cid,
|
1466 |
+
orient = "orientationchange."+cid;
|
1467 |
+
|
1468 |
+
// unbind event listeners
|
1469 |
+
this.container.parents().add(window).each(function () { $(this).off(scroll).off(resize).off(orient); });
|
1470 |
+
|
1471 |
+
this.clearDropdownAlignmentPreference();
|
1472 |
+
|
1473 |
+
$("#select2-drop-mask").hide();
|
1474 |
+
this.dropdown.removeAttr("id"); // only the active dropdown has the select2-drop id
|
1475 |
+
this.dropdown.hide();
|
1476 |
+
this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active");
|
1477 |
+
this.results.empty();
|
1478 |
+
|
1479 |
+
// Now that the dropdown is closed, unbind the global document mousemove event
|
1480 |
+
$document.off("mousemove.select2Event");
|
1481 |
+
|
1482 |
+
this.clearSearch();
|
1483 |
+
this.search.removeClass("select2-active");
|
1484 |
+
this.opts.element.trigger($.Event("select2-close"));
|
1485 |
+
},
|
1486 |
+
|
1487 |
+
/**
|
1488 |
+
* Opens control, sets input value, and updates results.
|
1489 |
+
*/
|
1490 |
+
// abstract
|
1491 |
+
externalSearch: function (term) {
|
1492 |
+
this.open();
|
1493 |
+
this.search.val(term);
|
1494 |
+
this.updateResults(false);
|
1495 |
+
},
|
1496 |
+
|
1497 |
+
// abstract
|
1498 |
+
clearSearch: function () {
|
1499 |
+
|
1500 |
+
},
|
1501 |
+
|
1502 |
+
//abstract
|
1503 |
+
getMaximumSelectionSize: function() {
|
1504 |
+
return evaluate(this.opts.maximumSelectionSize, this.opts.element);
|
1505 |
+
},
|
1506 |
+
|
1507 |
+
// abstract
|
1508 |
+
ensureHighlightVisible: function () {
|
1509 |
+
var results = this.results, children, index, child, hb, rb, y, more, topOffset;
|
1510 |
+
|
1511 |
+
index = this.highlight();
|
1512 |
+
|
1513 |
+
if (index < 0) return;
|
1514 |
+
|
1515 |
+
if (index == 0) {
|
1516 |
+
|
1517 |
+
// if the first element is highlighted scroll all the way to the top,
|
1518 |
+
// that way any unselectable headers above it will also be scrolled
|
1519 |
+
// into view
|
1520 |
+
|
1521 |
+
results.scrollTop(0);
|
1522 |
+
return;
|
1523 |
+
}
|
1524 |
+
|
1525 |
+
children = this.findHighlightableChoices().find('.select2-result-label');
|
1526 |
+
|
1527 |
+
child = $(children[index]);
|
1528 |
+
|
1529 |
+
topOffset = (child.offset() || {}).top || 0;
|
1530 |
+
|
1531 |
+
hb = topOffset + child.outerHeight(true);
|
1532 |
+
|
1533 |
+
// if this is the last child lets also make sure select2-more-results is visible
|
1534 |
+
if (index === children.length - 1) {
|
1535 |
+
more = results.find("li.select2-more-results");
|
1536 |
+
if (more.length > 0) {
|
1537 |
+
hb = more.offset().top + more.outerHeight(true);
|
1538 |
+
}
|
1539 |
+
}
|
1540 |
+
|
1541 |
+
rb = results.offset().top + results.outerHeight(false);
|
1542 |
+
if (hb > rb) {
|
1543 |
+
results.scrollTop(results.scrollTop() + (hb - rb));
|
1544 |
+
}
|
1545 |
+
y = topOffset - results.offset().top;
|
1546 |
+
|
1547 |
+
// make sure the top of the element is visible
|
1548 |
+
if (y < 0 && child.css('display') != 'none' ) {
|
1549 |
+
results.scrollTop(results.scrollTop() + y); // y is negative
|
1550 |
+
}
|
1551 |
+
},
|
1552 |
+
|
1553 |
+
// abstract
|
1554 |
+
findHighlightableChoices: function() {
|
1555 |
+
return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)");
|
1556 |
+
},
|
1557 |
+
|
1558 |
+
// abstract
|
1559 |
+
moveHighlight: function (delta) {
|
1560 |
+
var choices = this.findHighlightableChoices(),
|
1561 |
+
index = this.highlight();
|
1562 |
+
|
1563 |
+
while (index > -1 && index < choices.length) {
|
1564 |
+
index += delta;
|
1565 |
+
var choice = $(choices[index]);
|
1566 |
+
if (choice.hasClass("select2-result-selectable") && !choice.hasClass("select2-disabled") && !choice.hasClass("select2-selected")) {
|
1567 |
+
this.highlight(index);
|
1568 |
+
break;
|
1569 |
+
}
|
1570 |
+
}
|
1571 |
+
},
|
1572 |
+
|
1573 |
+
// abstract
|
1574 |
+
highlight: function (index) {
|
1575 |
+
var choices = this.findHighlightableChoices(),
|
1576 |
+
choice,
|
1577 |
+
data;
|
1578 |
+
|
1579 |
+
if (arguments.length === 0) {
|
1580 |
+
return indexOf(choices.filter(".select2-highlighted")[0], choices.get());
|
1581 |
+
}
|
1582 |
+
|
1583 |
+
if (index >= choices.length) index = choices.length - 1;
|
1584 |
+
if (index < 0) index = 0;
|
1585 |
+
|
1586 |
+
this.removeHighlight();
|
1587 |
+
|
1588 |
+
choice = $(choices[index]);
|
1589 |
+
choice.addClass("select2-highlighted");
|
1590 |
+
|
1591 |
+
// ensure assistive technology can determine the active choice
|
1592 |
+
this.search.attr("aria-activedescendant", choice.find(".select2-result-label").attr("id"));
|
1593 |
+
|
1594 |
+
this.ensureHighlightVisible();
|
1595 |
+
|
1596 |
+
this.liveRegion.text(choice.text());
|
1597 |
+
|
1598 |
+
data = choice.data("select2-data");
|
1599 |
+
if (data) {
|
1600 |
+
this.opts.element.trigger({ type: "select2-highlight", val: this.id(data), choice: data });
|
1601 |
+
}
|
1602 |
+
},
|
1603 |
+
|
1604 |
+
removeHighlight: function() {
|
1605 |
+
this.results.find(".select2-highlighted").removeClass("select2-highlighted");
|
1606 |
+
},
|
1607 |
+
|
1608 |
+
touchMoved: function() {
|
1609 |
+
this._touchMoved = true;
|
1610 |
+
},
|
1611 |
+
|
1612 |
+
clearTouchMoved: function() {
|
1613 |
+
this._touchMoved = false;
|
1614 |
+
},
|
1615 |
+
|
1616 |
+
// abstract
|
1617 |
+
countSelectableResults: function() {
|
1618 |
+
return this.findHighlightableChoices().length;
|
1619 |
+
},
|
1620 |
+
|
1621 |
+
// abstract
|
1622 |
+
highlightUnderEvent: function (event) {
|
1623 |
+
var el = $(event.target).closest(".select2-result-selectable");
|
1624 |
+
if (el.length > 0 && !el.is(".select2-highlighted")) {
|
1625 |
+
var choices = this.findHighlightableChoices();
|
1626 |
+
this.highlight(choices.index(el));
|
1627 |
+
} else if (el.length == 0) {
|
1628 |
+
// if we are over an unselectable item remove all highlights
|
1629 |
+
this.removeHighlight();
|
1630 |
+
}
|
1631 |
+
},
|
1632 |
+
|
1633 |
+
// abstract
|
1634 |
+
loadMoreIfNeeded: function () {
|
1635 |
+
var results = this.results,
|
1636 |
+
more = results.find("li.select2-more-results"),
|
1637 |
+
below, // pixels the element is below the scroll fold, below==0 is when the element is starting to be visible
|
1638 |
+
page = this.resultsPage + 1,
|
1639 |
+
self=this,
|
1640 |
+
term=this.search.val(),
|
1641 |
+
context=this.context;
|
1642 |
+
|
1643 |
+
if (more.length === 0) return;
|
1644 |
+
below = more.offset().top - results.offset().top - results.height();
|
1645 |
+
|
1646 |
+
if (below <= this.opts.loadMorePadding) {
|
1647 |
+
more.addClass("select2-active");
|
1648 |
+
this.opts.query({
|
1649 |
+
element: this.opts.element,
|
1650 |
+
term: term,
|
1651 |
+
page: page,
|
1652 |
+
context: context,
|
1653 |
+
matcher: this.opts.matcher,
|
1654 |
+
callback: this.bind(function (data) {
|
1655 |
+
|
1656 |
+
// ignore a response if the select2 has been closed before it was received
|
1657 |
+
if (!self.opened()) return;
|
1658 |
+
|
1659 |
+
|
1660 |
+
self.opts.populateResults.call(this, results, data.results, {term: term, page: page, context:context});
|
1661 |
+
self.postprocessResults(data, false, false);
|
1662 |
+
|
1663 |
+
if (data.more===true) {
|
1664 |
+
more.detach().appendTo(results).html(self.opts.escapeMarkup(evaluate(self.opts.formatLoadMore, self.opts.element, page+1)));
|
1665 |
+
window.setTimeout(function() { self.loadMoreIfNeeded(); }, 10);
|
1666 |
+
} else {
|
1667 |
+
more.remove();
|
1668 |
+
}
|
1669 |
+
self.positionDropdown();
|
1670 |
+
self.resultsPage = page;
|
1671 |
+
self.context = data.context;
|
1672 |
+
this.opts.element.trigger({ type: "select2-loaded", items: data });
|
1673 |
+
})});
|
1674 |
+
}
|
1675 |
+
},
|
1676 |
+
|
1677 |
+
/**
|
1678 |
+
* Default tokenizer function which does nothing
|
1679 |
+
*/
|
1680 |
+
tokenize: function() {
|
1681 |
+
|
1682 |
+
},
|
1683 |
+
|
1684 |
+
/**
|
1685 |
+
* @param initial whether or not this is the call to this method right after the dropdown has been opened
|
1686 |
+
*/
|
1687 |
+
// abstract
|
1688 |
+
updateResults: function (initial) {
|
1689 |
+
var search = this.search,
|
1690 |
+
results = this.results,
|
1691 |
+
opts = this.opts,
|
1692 |
+
data,
|
1693 |
+
self = this,
|
1694 |
+
input,
|
1695 |
+
term = search.val(),
|
1696 |
+
lastTerm = $.data(this.container, "select2-last-term"),
|
1697 |
+
// sequence number used to drop out-of-order responses
|
1698 |
+
queryNumber;
|
1699 |
+
|
1700 |
+
// prevent duplicate queries against the same term
|
1701 |
+
if (initial !== true && lastTerm && equal(term, lastTerm)) return;
|
1702 |
+
|
1703 |
+
$.data(this.container, "select2-last-term", term);
|
1704 |
+
|
1705 |
+
// if the search is currently hidden we do not alter the results
|
1706 |
+
if (initial !== true && (this.showSearchInput === false || !this.opened())) {
|
1707 |
+
return;
|
1708 |
+
}
|
1709 |
+
|
1710 |
+
function postRender() {
|
1711 |
+
search.removeClass("select2-active");
|
1712 |
+
self.positionDropdown();
|
1713 |
+
if (results.find('.select2-no-results,.select2-selection-limit,.select2-searching').length) {
|
1714 |
+
self.liveRegion.text(results.text());
|
1715 |
+
}
|
1716 |
+
else {
|
1717 |
+
self.liveRegion.text(self.opts.formatMatches(results.find('.select2-result-selectable:not(".select2-selected")').length));
|
1718 |
+
}
|
1719 |
+
}
|
1720 |
+
|
1721 |
+
function render(html) {
|
1722 |
+
results.html(html);
|
1723 |
+
postRender();
|
1724 |
+
}
|
1725 |
+
|
1726 |
+
queryNumber = ++this.queryCount;
|
1727 |
+
|
1728 |
+
var maxSelSize = this.getMaximumSelectionSize();
|
1729 |
+
if (maxSelSize >=1) {
|
1730 |
+
data = this.data();
|
1731 |
+
if ($.isArray(data) && data.length >= maxSelSize && checkFormatter(opts.formatSelectionTooBig, "formatSelectionTooBig")) {
|
1732 |
+
render("<li class='select2-selection-limit'>" + evaluate(opts.formatSelectionTooBig, opts.element, maxSelSize) + "</li>");
|
1733 |
+
return;
|
1734 |
+
}
|
1735 |
+
}
|
1736 |
+
|
1737 |
+
if (search.val().length < opts.minimumInputLength) {
|
1738 |
+
if (checkFormatter(opts.formatInputTooShort, "formatInputTooShort")) {
|
1739 |
+
render("<li class='select2-no-results'>" + evaluate(opts.formatInputTooShort, opts.element, search.val(), opts.minimumInputLength) + "</li>");
|
1740 |
+
} else {
|
1741 |
+
render("");
|
1742 |
+
}
|
1743 |
+
if (initial && this.showSearch) this.showSearch(true);
|
1744 |
+
return;
|
1745 |
+
}
|
1746 |
+
|
1747 |
+
if (opts.maximumInputLength && search.val().length > opts.maximumInputLength) {
|
1748 |
+
if (checkFormatter(opts.formatInputTooLong, "formatInputTooLong")) {
|
1749 |
+
render("<li class='select2-no-results'>" + evaluate(opts.formatInputTooLong, opts.element, search.val(), opts.maximumInputLength) + "</li>");
|
1750 |
+
} else {
|
1751 |
+
render("");
|
1752 |
+
}
|
1753 |
+
return;
|
1754 |
+
}
|
1755 |
+
|
1756 |
+
if (opts.formatSearching && this.findHighlightableChoices().length === 0) {
|
1757 |
+
render("<li class='select2-searching'>" + evaluate(opts.formatSearching, opts.element) + "</li>");
|
1758 |
+
}
|
1759 |
+
|
1760 |
+
search.addClass("select2-active");
|
1761 |
+
|
1762 |
+
this.removeHighlight();
|
1763 |
+
|
1764 |
+
// give the tokenizer a chance to pre-process the input
|
1765 |
+
input = this.tokenize();
|
1766 |
+
if (input != undefined && input != null) {
|
1767 |
+
search.val(input);
|
1768 |
+
}
|
1769 |
+
|
1770 |
+
this.resultsPage = 1;
|
1771 |
+
|
1772 |
+
opts.query({
|
1773 |
+
element: opts.element,
|
1774 |
+
term: search.val(),
|
1775 |
+
page: this.resultsPage,
|
1776 |
+
context: null,
|
1777 |
+
matcher: opts.matcher,
|
1778 |
+
callback: this.bind(function (data) {
|
1779 |
+
var def; // default choice
|
1780 |
+
|
1781 |
+
// ignore old responses
|
1782 |
+
if (queryNumber != this.queryCount) {
|
1783 |
+
return;
|
1784 |
+
}
|
1785 |
+
|
1786 |
+
// ignore a response if the select2 has been closed before it was received
|
1787 |
+
if (!this.opened()) {
|
1788 |
+
this.search.removeClass("select2-active");
|
1789 |
+
return;
|
1790 |
+
}
|
1791 |
+
|
1792 |
+
// handle ajax error
|
1793 |
+
if(data.hasError !== undefined && checkFormatter(opts.formatAjaxError, "formatAjaxError")) {
|
1794 |
+
render("<li class='select2-ajax-error'>" + evaluate(opts.formatAjaxError, opts.element, data.jqXHR, data.textStatus, data.errorThrown) + "</li>");
|
1795 |
+
return;
|
1796 |
+
}
|
1797 |
+
|
1798 |
+
// save context, if any
|
1799 |
+
this.context = (data.context===undefined) ? null : data.context;
|
1800 |
+
// create a default choice and prepend it to the list
|
1801 |
+
if (this.opts.createSearchChoice && search.val() !== "") {
|
1802 |
+
def = this.opts.createSearchChoice.call(self, search.val(), data.results);
|
1803 |
+
if (def !== undefined && def !== null && self.id(def) !== undefined && self.id(def) !== null) {
|
1804 |
+
if ($(data.results).filter(
|
1805 |
+
function () {
|
1806 |
+
return equal(self.id(this), self.id(def));
|
1807 |
+
}).length === 0) {
|
1808 |
+
this.opts.createSearchChoicePosition(data.results, def);
|
1809 |
+
}
|
1810 |
+
}
|
1811 |
+
}
|
1812 |
+
|
1813 |
+
if (data.results.length === 0 && checkFormatter(opts.formatNoMatches, "formatNoMatches")) {
|
1814 |
+
render("<li class='select2-no-results'>" + evaluate(opts.formatNoMatches, opts.element, search.val()) + "</li>");
|
1815 |
+
return;
|
1816 |
+
}
|
1817 |
+
|
1818 |
+
results.empty();
|
1819 |
+
self.opts.populateResults.call(this, results, data.results, {term: search.val(), page: this.resultsPage, context:null});
|
1820 |
+
|
1821 |
+
if (data.more === true && checkFormatter(opts.formatLoadMore, "formatLoadMore")) {
|
1822 |
+
results.append("<li class='select2-more-results'>" + opts.escapeMarkup(evaluate(opts.formatLoadMore, opts.element, this.resultsPage)) + "</li>");
|
1823 |
+
window.setTimeout(function() { self.loadMoreIfNeeded(); }, 10);
|
1824 |
+
}
|
1825 |
+
|
1826 |
+
this.postprocessResults(data, initial);
|
1827 |
+
|
1828 |
+
postRender();
|
1829 |
+
|
1830 |
+
this.opts.element.trigger({ type: "select2-loaded", items: data });
|
1831 |
+
})});
|
1832 |
+
},
|
1833 |
+
|
1834 |
+
// abstract
|
1835 |
+
cancel: function () {
|
1836 |
+
this.close();
|
1837 |
+
},
|
1838 |
+
|
1839 |
+
// abstract
|
1840 |
+
blur: function () {
|
1841 |
+
// if selectOnBlur == true, select the currently highlighted option
|
1842 |
+
if (this.opts.selectOnBlur)
|
1843 |
+
this.selectHighlighted({noFocus: true});
|
1844 |
+
|
1845 |
+
this.close();
|
1846 |
+
this.container.removeClass("select2-container-active");
|
1847 |
+
// synonymous to .is(':focus'), which is available in jquery >= 1.6
|
1848 |
+
if (this.search[0] === document.activeElement) { this.search.blur(); }
|
1849 |
+
this.clearSearch();
|
1850 |
+
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
|
1851 |
+
},
|
1852 |
+
|
1853 |
+
// abstract
|
1854 |
+
focusSearch: function () {
|
1855 |
+
focus(this.search);
|
1856 |
+
},
|
1857 |
+
|
1858 |
+
// abstract
|
1859 |
+
selectHighlighted: function (options) {
|
1860 |
+
if (this._touchMoved) {
|
1861 |
+
this.clearTouchMoved();
|
1862 |
+
return;
|
1863 |
+
}
|
1864 |
+
var index=this.highlight(),
|
1865 |
+
highlighted=this.results.find(".select2-highlighted"),
|
1866 |
+
data = highlighted.closest('.select2-result').data("select2-data");
|
1867 |
+
|
1868 |
+
if (data) {
|
1869 |
+
this.highlight(index);
|
1870 |
+
this.onSelect(data, options);
|
1871 |
+
} else if (options && options.noFocus) {
|
1872 |
+
this.close();
|
1873 |
+
}
|
1874 |
+
},
|
1875 |
+
|
1876 |
+
// abstract
|
1877 |
+
getPlaceholder: function () {
|
1878 |
+
var placeholderOption;
|
1879 |
+
return this.opts.element.attr("placeholder") ||
|
1880 |
+
this.opts.element.attr("data-placeholder") || // jquery 1.4 compat
|
1881 |
+
this.opts.element.data("placeholder") ||
|
1882 |
+
this.opts.placeholder ||
|
1883 |
+
((placeholderOption = this.getPlaceholderOption()) !== undefined ? placeholderOption.text() : undefined);
|
1884 |
+
},
|
1885 |
+
|
1886 |
+
// abstract
|
1887 |
+
getPlaceholderOption: function() {
|
1888 |
+
if (this.select) {
|
1889 |
+
var firstOption = this.select.children('option').first();
|
1890 |
+
if (this.opts.placeholderOption !== undefined ) {
|
1891 |
+
//Determine the placeholder option based on the specified placeholderOption setting
|
1892 |
+
return (this.opts.placeholderOption === "first" && firstOption) ||
|
1893 |
+
(typeof this.opts.placeholderOption === "function" && this.opts.placeholderOption(this.select));
|
1894 |
+
} else if ($.trim(firstOption.text()) === "" && firstOption.val() === "") {
|
1895 |
+
//No explicit placeholder option specified, use the first if it's blank
|
1896 |
+
return firstOption;
|
1897 |
+
}
|
1898 |
+
}
|
1899 |
+
},
|
1900 |
+
|
1901 |
+
/**
|
1902 |
+
* Get the desired width for the container element. This is
|
1903 |
+
* derived first from option `width` passed to select2, then
|
1904 |
+
* the inline 'style' on the original element, and finally
|
1905 |
+
* falls back to the jQuery calculated element width.
|
1906 |
+
*/
|
1907 |
+
// abstract
|
1908 |
+
initContainerWidth: function () {
|
1909 |
+
function resolveContainerWidth() {
|
1910 |
+
var style, attrs, matches, i, l, attr;
|
1911 |
+
|
1912 |
+
if (this.opts.width === "off") {
|
1913 |
+
return null;
|
1914 |
+
} else if (this.opts.width === "element"){
|
1915 |
+
return this.opts.element.outerWidth(false) === 0 ? 'auto' : this.opts.element.outerWidth(false) + 'px';
|
1916 |
+
} else if (this.opts.width === "copy" || this.opts.width === "resolve") {
|
1917 |
+
// check if there is inline style on the element that contains width
|
1918 |
+
style = this.opts.element.attr('style');
|
1919 |
+
if (style !== undefined) {
|
1920 |
+
attrs = style.split(';');
|
1921 |
+
for (i = 0, l = attrs.length; i < l; i = i + 1) {
|
1922 |
+
attr = attrs[i].replace(/\s/g, '');
|
1923 |
+
matches = attr.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);
|
1924 |
+
if (matches !== null && matches.length >= 1)
|
1925 |
+
return matches[1];
|
1926 |
+
}
|
1927 |
+
}
|
1928 |
+
|
1929 |
+
if (this.opts.width === "resolve") {
|
1930 |
+
// next check if css('width') can resolve a width that is percent based, this is sometimes possible
|
1931 |
+
// when attached to input type=hidden or elements hidden via css
|
1932 |
+
style = this.opts.element.css('width');
|
1933 |
+
if (style.indexOf("%") > 0) return style;
|
1934 |
+
|
1935 |
+
// finally, fallback on the calculated width of the element
|
1936 |
+
return (this.opts.element.outerWidth(false) === 0 ? 'auto' : this.opts.element.outerWidth(false) + 'px');
|
1937 |
+
}
|
1938 |
+
|
1939 |
+
return null;
|
1940 |
+
} else if ($.isFunction(this.opts.width)) {
|
1941 |
+
return this.opts.width();
|
1942 |
+
} else {
|
1943 |
+
return this.opts.width;
|
1944 |
+
}
|
1945 |
+
};
|
1946 |
+
|
1947 |
+
var width = resolveContainerWidth.call(this);
|
1948 |
+
if (width !== null) {
|
1949 |
+
this.container.css("width", width);
|
1950 |
+
}
|
1951 |
+
}
|
1952 |
+
});
|
1953 |
+
|
1954 |
+
SingleSelect2 = clazz(AbstractSelect2, {
|
1955 |
+
|
1956 |
+
// single
|
1957 |
+
|
1958 |
+
createContainer: function () {
|
1959 |
+
var container = $(document.createElement("div")).attr({
|
1960 |
+
"class": "select2-container"
|
1961 |
+
}).html([
|
1962 |
+
"<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>",
|
1963 |
+
" <span class='select2-chosen'> </span><abbr class='select2-search-choice-close'></abbr>",
|
1964 |
+
" <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>",
|
1965 |
+
"</a>",
|
1966 |
+
"<label for='' class='select2-offscreen'></label>",
|
1967 |
+
"<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />",
|
1968 |
+
"<div class='select2-drop select2-display-none'>",
|
1969 |
+
" <div class='select2-search'>",
|
1970 |
+
" <label for='' class='select2-offscreen'></label>",
|
1971 |
+
" <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'",
|
1972 |
+
" aria-autocomplete='list' />",
|
1973 |
+
" </div>",
|
1974 |
+
" <ul class='select2-results' role='listbox'>",
|
1975 |
+
" </ul>",
|
1976 |
+
"</div>"].join(""));
|
1977 |
+
return container;
|
1978 |
+
},
|
1979 |
+
|
1980 |
+
// single
|
1981 |
+
enableInterface: function() {
|
1982 |
+
if (this.parent.enableInterface.apply(this, arguments)) {
|
1983 |
+
this.focusser.prop("disabled", !this.isInterfaceEnabled());
|
1984 |
+
}
|
1985 |
+
},
|
1986 |
+
|
1987 |
+
// single
|
1988 |
+
opening: function () {
|
1989 |
+
var el, range, len;
|
1990 |
+
|
1991 |
+
if (this.opts.minimumResultsForSearch >= 0) {
|
1992 |
+
this.showSearch(true);
|
1993 |
+
}
|
1994 |
+
|
1995 |
+
this.parent.opening.apply(this, arguments);
|
1996 |
+
|
1997 |
+
if (this.showSearchInput !== false) {
|
1998 |
+
// IE appends focusser.val() at the end of field :/ so we manually insert it at the beginning using a range
|
1999 |
+
// all other browsers handle this just fine
|
2000 |
+
|
2001 |
+
this.search.val(this.focusser.val());
|
2002 |
+
}
|
2003 |
+
if (this.opts.shouldFocusInput(this)) {
|
2004 |
+
this.search.focus();
|
2005 |
+
// move the cursor to the end after focussing, otherwise it will be at the beginning and
|
2006 |
+
// new text will appear *before* focusser.val()
|
2007 |
+
el = this.search.get(0);
|
2008 |
+
if (el.createTextRange) {
|
2009 |
+
range = el.createTextRange();
|
2010 |
+
range.collapse(false);
|
2011 |
+
range.select();
|
2012 |
+
} else if (el.setSelectionRange) {
|
2013 |
+
len = this.search.val().length;
|
2014 |
+
el.setSelectionRange(len, len);
|
2015 |
+
}
|
2016 |
+
}
|
2017 |
+
|
2018 |
+
// initializes search's value with nextSearchTerm (if defined by user)
|
2019 |
+
// ignore nextSearchTerm if the dropdown is opened by the user pressing a letter
|
2020 |
+
if(this.search.val() === "") {
|
2021 |
+
if(this.nextSearchTerm != undefined){
|
2022 |
+
this.search.val(this.nextSearchTerm);
|
2023 |
+
this.search.select();
|
2024 |
+
}
|
2025 |
+
}
|
2026 |
+
|
2027 |
+
this.focusser.prop("disabled", true).val("");
|
2028 |
+
this.updateResults(true);
|
2029 |
+
this.opts.element.trigger($.Event("select2-open"));
|
2030 |
+
},
|
2031 |
+
|
2032 |
+
// single
|
2033 |
+
close: function () {
|
2034 |
+
if (!this.opened()) return;
|
2035 |
+
this.parent.close.apply(this, arguments);
|
2036 |
+
|
2037 |
+
this.focusser.prop("disabled", false);
|
2038 |
+
|
2039 |
+
if (this.opts.shouldFocusInput(this)) {
|
2040 |
+
this.focusser.focus();
|
2041 |
+
}
|
2042 |
+
},
|
2043 |
+
|
2044 |
+
// single
|
2045 |
+
focus: function () {
|
2046 |
+
if (this.opened()) {
|
2047 |
+
this.close();
|
2048 |
+
} else {
|
2049 |
+
this.focusser.prop("disabled", false);
|
2050 |
+
if (this.opts.shouldFocusInput(this)) {
|
2051 |
+
this.focusser.focus();
|
2052 |
+
}
|
2053 |
+
}
|
2054 |
+
},
|
2055 |
+
|
2056 |
+
// single
|
2057 |
+
isFocused: function () {
|
2058 |
+
return this.container.hasClass("select2-container-active");
|
2059 |
+
},
|
2060 |
+
|
2061 |
+
// single
|
2062 |
+
cancel: function () {
|
2063 |
+
this.parent.cancel.apply(this, arguments);
|
2064 |
+
this.focusser.prop("disabled", false);
|
2065 |
+
|
2066 |
+
if (this.opts.shouldFocusInput(this)) {
|
2067 |
+
this.focusser.focus();
|
2068 |
+
}
|
2069 |
+
},
|
2070 |
+
|
2071 |
+
// single
|
2072 |
+
destroy: function() {
|
2073 |
+
$("label[for='" + this.focusser.attr('id') + "']")
|
2074 |
+
.attr('for', this.opts.element.attr("id"));
|
2075 |
+
this.parent.destroy.apply(this, arguments);
|
2076 |
+
|
2077 |
+
cleanupJQueryElements.call(this,
|
2078 |
+
"selection",
|
2079 |
+
"focusser"
|
2080 |
+
);
|
2081 |
+
},
|
2082 |
+
|
2083 |
+
// single
|
2084 |
+
initContainer: function () {
|
2085 |
+
|
2086 |
+
var selection,
|
2087 |
+
container = this.container,
|
2088 |
+
dropdown = this.dropdown,
|
2089 |
+
idSuffix = nextUid(),
|
2090 |
+
elementLabel;
|
2091 |
+
|
2092 |
+
if (this.opts.minimumResultsForSearch < 0) {
|
2093 |
+
this.showSearch(false);
|
2094 |
+
} else {
|
2095 |
+
this.showSearch(true);
|
2096 |
+
}
|
2097 |
+
|
2098 |
+
this.selection = selection = container.find(".select2-choice");
|
2099 |
+
|
2100 |
+
this.focusser = container.find(".select2-focusser");
|
2101 |
+
|
2102 |
+
// add aria associations
|
2103 |
+
selection.find(".select2-chosen").attr("id", "select2-chosen-"+idSuffix);
|
2104 |
+
this.focusser.attr("aria-labelledby", "select2-chosen-"+idSuffix);
|
2105 |
+
this.results.attr("id", "select2-results-"+idSuffix);
|
2106 |
+
this.search.attr("aria-owns", "select2-results-"+idSuffix);
|
2107 |
+
|
2108 |
+
// rewrite labels from original element to focusser
|
2109 |
+
this.focusser.attr("id", "s2id_autogen"+idSuffix);
|
2110 |
+
|
2111 |
+
elementLabel = $("label[for='" + this.opts.element.attr("id") + "']");
|
2112 |
+
this.opts.element.focus(this.bind(function () { this.focus(); }));
|
2113 |
+
|
2114 |
+
this.focusser.prev()
|
2115 |
+
.text(elementLabel.text())
|
2116 |
+
.attr('for', this.focusser.attr('id'));
|
2117 |
+
|
2118 |
+
// Ensure the original element retains an accessible name
|
2119 |
+
var originalTitle = this.opts.element.attr("title");
|
2120 |
+
this.opts.element.attr("title", (originalTitle || elementLabel.text()));
|
2121 |
+
|
2122 |
+
this.focusser.attr("tabindex", this.elementTabIndex);
|
2123 |
+
|
2124 |
+
// write label for search field using the label from the focusser element
|
2125 |
+
this.search.attr("id", this.focusser.attr('id') + '_search');
|
2126 |
+
|
2127 |
+
this.search.prev()
|
2128 |
+
.text($("label[for='" + this.focusser.attr('id') + "']").text())
|
2129 |
+
.attr('for', this.search.attr('id'));
|
2130 |
+
|
2131 |
+
this.search.on("keydown", this.bind(function (e) {
|
2132 |
+
if (!this.isInterfaceEnabled()) return;
|
2133 |
+
|
2134 |
+
// filter 229 keyCodes (input method editor is processing key input)
|
2135 |
+
if (229 == e.keyCode) return;
|
2136 |
+
|
2137 |
+
if (e.which === KEY.PAGE_UP || e.which === KEY.PAGE_DOWN) {
|
2138 |
+
// prevent the page from scrolling
|
2139 |
+
killEvent(e);
|
2140 |
+
return;
|
2141 |
+
}
|
2142 |
+
|
2143 |
+
switch (e.which) {
|
2144 |
+
case KEY.UP:
|
2145 |
+
case KEY.DOWN:
|
2146 |
+
this.moveHighlight((e.which === KEY.UP) ? -1 : 1);
|
2147 |
+
killEvent(e);
|
2148 |
+
return;
|
2149 |
+
case KEY.ENTER:
|
2150 |
+
this.selectHighlighted();
|
2151 |
+
killEvent(e);
|
2152 |
+
return;
|
2153 |
+
case KEY.TAB:
|
2154 |
+
this.selectHighlighted({noFocus: true});
|
2155 |
+
return;
|
2156 |
+
case KEY.ESC:
|
2157 |
+
this.cancel(e);
|
2158 |
+
killEvent(e);
|
2159 |
+
return;
|
2160 |
+
}
|
2161 |
+
}));
|
2162 |
+
|
2163 |
+
this.search.on("blur", this.bind(function(e) {
|
2164 |
+
// a workaround for chrome to keep the search field focussed when the scroll bar is used to scroll the dropdown.
|
2165 |
+
// without this the search field loses focus which is annoying
|
2166 |
+
if (document.activeElement === this.body.get(0)) {
|
2167 |
+
window.setTimeout(this.bind(function() {
|
2168 |
+
if (this.opened()) {
|
2169 |
+
this.search.focus();
|
2170 |
+
}
|
2171 |
+
}), 0);
|
2172 |
+
}
|
2173 |
+
}));
|
2174 |
+
|
2175 |
+
this.focusser.on("keydown", this.bind(function (e) {
|
2176 |
+
if (!this.isInterfaceEnabled()) return;
|
2177 |
+
|
2178 |
+
if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) {
|
2179 |
+
return;
|
2180 |
+
}
|
2181 |
+
|
2182 |
+
if (this.opts.openOnEnter === false && e.which === KEY.ENTER) {
|
2183 |
+
killEvent(e);
|
2184 |
+
return;
|
2185 |
+
}
|
2186 |
+
|
2187 |
+
if (e.which == KEY.DOWN || e.which == KEY.UP
|
2188 |
+
|| (e.which == KEY.ENTER && this.opts.openOnEnter)) {
|
2189 |
+
|
2190 |
+
if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) return;
|
2191 |
+
|
2192 |
+
this.open();
|
2193 |
+
killEvent(e);
|
2194 |
+
return;
|
2195 |
+
}
|
2196 |
+
|
2197 |
+
if (e.which == KEY.DELETE || e.which == KEY.BACKSPACE) {
|
2198 |
+
if (this.opts.allowClear) {
|
2199 |
+
this.clear();
|
2200 |
+
}
|
2201 |
+
killEvent(e);
|
2202 |
+
return;
|
2203 |
+
}
|
2204 |
+
}));
|
2205 |
+
|
2206 |
+
|
2207 |
+
installKeyUpChangeEvent(this.focusser);
|
2208 |
+
this.focusser.on("keyup-change input", this.bind(function(e) {
|
2209 |
+
if (this.opts.minimumResultsForSearch >= 0) {
|
2210 |
+
e.stopPropagation();
|
2211 |
+
if (this.opened()) return;
|
2212 |
+
this.open();
|
2213 |
+
}
|
2214 |
+
}));
|
2215 |
+
|
2216 |
+
selection.on("mousedown touchstart", "abbr", this.bind(function (e) {
|
2217 |
+
if (!this.isInterfaceEnabled()) {
|
2218 |
+
return;
|
2219 |
+
}
|
2220 |
+
|
2221 |
+
this.clear();
|
2222 |
+
killEventImmediately(e);
|
2223 |
+
this.close();
|
2224 |
+
|
2225 |
+
if (this.selection) {
|
2226 |
+
this.selection.focus();
|
2227 |
+
}
|
2228 |
+
}));
|
2229 |
+
|
2230 |
+
selection.on("mousedown touchstart", this.bind(function (e) {
|
2231 |
+
// Prevent IE from generating a click event on the body
|
2232 |
+
reinsertElement(selection);
|
2233 |
+
|
2234 |
+
if (!this.container.hasClass("select2-container-active")) {
|
2235 |
+
this.opts.element.trigger($.Event("select2-focus"));
|
2236 |
+
}
|
2237 |
+
|
2238 |
+
if (this.opened()) {
|
2239 |
+
this.close();
|
2240 |
+
} else if (this.isInterfaceEnabled()) {
|
2241 |
+
this.open();
|
2242 |
+
}
|
2243 |
+
|
2244 |
+
killEvent(e);
|
2245 |
+
}));
|
2246 |
+
|
2247 |
+
dropdown.on("mousedown touchstart", this.bind(function() {
|
2248 |
+
if (this.opts.shouldFocusInput(this)) {
|
2249 |
+
this.search.focus();
|
2250 |
+
}
|
2251 |
+
}));
|
2252 |
+
|
2253 |
+
selection.on("focus", this.bind(function(e) {
|
2254 |
+
killEvent(e);
|
2255 |
+
}));
|
2256 |
+
|
2257 |
+
this.focusser.on("focus", this.bind(function(){
|
2258 |
+
if (!this.container.hasClass("select2-container-active")) {
|
2259 |
+
this.opts.element.trigger($.Event("select2-focus"));
|
2260 |
+
}
|
2261 |
+
this.container.addClass("select2-container-active");
|
2262 |
+
})).on("blur", this.bind(function() {
|
2263 |
+
if (!this.opened()) {
|
2264 |
+
this.container.removeClass("select2-container-active");
|
2265 |
+
this.opts.element.trigger($.Event("select2-blur"));
|
2266 |
+
}
|
2267 |
+
}));
|
2268 |
+
this.search.on("focus", this.bind(function(){
|
2269 |
+
if (!this.container.hasClass("select2-container-active")) {
|
2270 |
+
this.opts.element.trigger($.Event("select2-focus"));
|
2271 |
+
}
|
2272 |
+
this.container.addClass("select2-container-active");
|
2273 |
+
}));
|
2274 |
+
|
2275 |
+
this.initContainerWidth();
|
2276 |
+
this.opts.element.hide();
|
2277 |
+
this.setPlaceholder();
|
2278 |
+
|
2279 |
+
},
|
2280 |
+
|
2281 |
+
// single
|
2282 |
+
clear: function(triggerChange) {
|
2283 |
+
var data=this.selection.data("select2-data");
|
2284 |
+
if (data) { // guard against queued quick consecutive clicks
|
2285 |
+
var evt = $.Event("select2-clearing");
|
2286 |
+
this.opts.element.trigger(evt);
|
2287 |
+
if (evt.isDefaultPrevented()) {
|
2288 |
+
return;
|
2289 |
+
}
|
2290 |
+
var placeholderOption = this.getPlaceholderOption();
|
2291 |
+
this.opts.element.val(placeholderOption ? placeholderOption.val() : "");
|
2292 |
+
this.selection.find(".select2-chosen").empty();
|
2293 |
+
this.selection.removeData("select2-data");
|
2294 |
+
this.setPlaceholder();
|
2295 |
+
|
2296 |
+
if (triggerChange !== false){
|
2297 |
+
this.opts.element.trigger({ type: "select2-removed", val: this.id(data), choice: data });
|
2298 |
+
this.triggerChange({removed:data});
|
2299 |
+
}
|
2300 |
+
}
|
2301 |
+
},
|
2302 |
+
|
2303 |
+
/**
|
2304 |
+
* Sets selection based on source element's value
|
2305 |
+
*/
|
2306 |
+
// single
|
2307 |
+
initSelection: function () {
|
2308 |
+
var selected;
|
2309 |
+
if (this.isPlaceholderOptionSelected()) {
|
2310 |
+
this.updateSelection(null);
|
2311 |
+
this.close();
|
2312 |
+
this.setPlaceholder();
|
2313 |
+
} else {
|
2314 |
+
var self = this;
|
2315 |
+
this.opts.initSelection.call(null, this.opts.element, function(selected){
|
2316 |
+
if (selected !== undefined && selected !== null) {
|
2317 |
+
self.updateSelection(selected);
|
2318 |
+
self.close();
|
2319 |
+
self.setPlaceholder();
|
2320 |
+
self.nextSearchTerm = self.opts.nextSearchTerm(selected, self.search.val());
|
2321 |
+
}
|
2322 |
+
});
|
2323 |
+
}
|
2324 |
+
},
|
2325 |
+
|
2326 |
+
isPlaceholderOptionSelected: function() {
|
2327 |
+
var placeholderOption;
|
2328 |
+
if (this.getPlaceholder() === undefined) return false; // no placeholder specified so no option should be considered
|
2329 |
+
return ((placeholderOption = this.getPlaceholderOption()) !== undefined && placeholderOption.prop("selected"))
|
2330 |
+
|| (this.opts.element.val() === "")
|
2331 |
+
|| (this.opts.element.val() === undefined)
|
2332 |
+
|| (this.opts.element.val() === null);
|
2333 |
+
},
|
2334 |
+
|
2335 |
+
// single
|
2336 |
+
prepareOpts: function () {
|
2337 |
+
var opts = this.parent.prepareOpts.apply(this, arguments),
|
2338 |
+
self=this;
|
2339 |
+
|
2340 |
+
if (opts.element.get(0).tagName.toLowerCase() === "select") {
|
2341 |
+
// install the selection initializer
|
2342 |
+
opts.initSelection = function (element, callback) {
|
2343 |
+
var selected = element.find("option").filter(function() { return this.selected && !this.disabled });
|
2344 |
+
// a single select box always has a value, no need to null check 'selected'
|
2345 |
+
callback(self.optionToData(selected));
|
2346 |
+
};
|
2347 |
+
} else if ("data" in opts) {
|
2348 |
+
// install default initSelection when applied to hidden input and data is local
|
2349 |
+
opts.initSelection = opts.initSelection || function (element, callback) {
|
2350 |
+
var id = element.val();
|
2351 |
+
//search in data by id, storing the actual matching item
|
2352 |
+
var match = null;
|
2353 |
+
opts.query({
|
2354 |
+
matcher: function(term, text, el){
|
2355 |
+
var is_match = equal(id, opts.id(el));
|
2356 |
+
if (is_match) {
|
2357 |
+
match = el;
|
2358 |
+
}
|
2359 |
+
return is_match;
|
2360 |
+
},
|
2361 |
+
callback: !$.isFunction(callback) ? $.noop : function() {
|
2362 |
+
callback(match);
|
2363 |
+
}
|
2364 |
+
});
|
2365 |
+
};
|
2366 |
+
}
|
2367 |
+
|
2368 |
+
return opts;
|
2369 |
+
},
|
2370 |
+
|
2371 |
+
// single
|
2372 |
+
getPlaceholder: function() {
|
2373 |
+
// if a placeholder is specified on a single select without a valid placeholder option ignore it
|
2374 |
+
if (this.select) {
|
2375 |
+
if (this.getPlaceholderOption() === undefined) {
|
2376 |
+
return undefined;
|
2377 |
+
}
|
2378 |
+
}
|
2379 |
+
|
2380 |
+
return this.parent.getPlaceholder.apply(this, arguments);
|
2381 |
+
},
|
2382 |
+
|
2383 |
+
// single
|
2384 |
+
setPlaceholder: function () {
|
2385 |
+
var placeholder = this.getPlaceholder();
|
2386 |
+
|
2387 |
+
if (this.isPlaceholderOptionSelected() && placeholder !== undefined) {
|
2388 |
+
|
2389 |
+
// check for a placeholder option if attached to a select
|
2390 |
+
if (this.select && this.getPlaceholderOption() === undefined) return;
|
2391 |
+
|
2392 |
+
this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(placeholder));
|
2393 |
+
|
2394 |
+
this.selection.addClass("select2-default");
|
2395 |
+
|
2396 |
+
this.container.removeClass("select2-allowclear");
|
2397 |
+
}
|
2398 |
+
},
|
2399 |
+
|
2400 |
+
// single
|
2401 |
+
postprocessResults: function (data, initial, noHighlightUpdate) {
|
2402 |
+
var selected = 0, self = this, showSearchInput = true;
|
2403 |
+
|
2404 |
+
// find the selected element in the result list
|
2405 |
+
|
2406 |
+
this.findHighlightableChoices().each2(function (i, elm) {
|
2407 |
+
if (equal(self.id(elm.data("select2-data")), self.opts.element.val())) {
|
2408 |
+
selected = i;
|
2409 |
+
return false;
|
2410 |
+
}
|
2411 |
+
});
|
2412 |
+
|
2413 |
+
// and highlight it
|
2414 |
+
if (noHighlightUpdate !== false) {
|
2415 |
+
if (initial === true && selected >= 0) {
|
2416 |
+
this.highlight(selected);
|
2417 |
+
} else {
|
2418 |
+
this.highlight(0);
|
2419 |
+
}
|
2420 |
+
}
|
2421 |
+
|
2422 |
+
// hide the search box if this is the first we got the results and there are enough of them for search
|
2423 |
+
|
2424 |
+
if (initial === true) {
|
2425 |
+
var min = this.opts.minimumResultsForSearch;
|
2426 |
+
if (min >= 0) {
|
2427 |
+
this.showSearch(countResults(data.results) >= min);
|
2428 |
+
}
|
2429 |
+
}
|
2430 |
+
},
|
2431 |
+
|
2432 |
+
// single
|
2433 |
+
showSearch: function(showSearchInput) {
|
2434 |
+
if (this.showSearchInput === showSearchInput) return;
|
2435 |
+
|
2436 |
+
this.showSearchInput = showSearchInput;
|
2437 |
+
|
2438 |
+
this.dropdown.find(".select2-search").toggleClass("select2-search-hidden", !showSearchInput);
|
2439 |
+
this.dropdown.find(".select2-search").toggleClass("select2-offscreen", !showSearchInput);
|
2440 |
+
//add "select2-with-searchbox" to the container if search box is shown
|
2441 |
+
$(this.dropdown, this.container).toggleClass("select2-with-searchbox", showSearchInput);
|
2442 |
+
},
|
2443 |
+
|
2444 |
+
// single
|
2445 |
+
onSelect: function (data, options) {
|
2446 |
+
|
2447 |
+
if (!this.triggerSelect(data)) { return; }
|
2448 |
+
|
2449 |
+
var old = this.opts.element.val(),
|
2450 |
+
oldData = this.data();
|
2451 |
+
|
2452 |
+
this.opts.element.val(this.id(data));
|
2453 |
+
this.updateSelection(data);
|
2454 |
+
|
2455 |
+
this.opts.element.trigger({ type: "select2-selected", val: this.id(data), choice: data });
|
2456 |
+
|
2457 |
+
this.nextSearchTerm = this.opts.nextSearchTerm(data, this.search.val());
|
2458 |
+
this.close();
|
2459 |
+
|
2460 |
+
if ((!options || !options.noFocus) && this.opts.shouldFocusInput(this)) {
|
2461 |
+
this.focusser.focus();
|
2462 |
+
}
|
2463 |
+
|
2464 |
+
if (!equal(old, this.id(data))) {
|
2465 |
+
this.triggerChange({ added: data, removed: oldData });
|
2466 |
+
}
|
2467 |
+
},
|
2468 |
+
|
2469 |
+
// single
|
2470 |
+
updateSelection: function (data) {
|
2471 |
+
|
2472 |
+
var container=this.selection.find(".select2-chosen"), formatted, cssClass;
|
2473 |
+
|
2474 |
+
this.selection.data("select2-data", data);
|
2475 |
+
|
2476 |
+
container.empty();
|
2477 |
+
if (data !== null) {
|
2478 |
+
formatted=this.opts.formatSelection(data, container, this.opts.escapeMarkup);
|
2479 |
+
}
|
2480 |
+
if (formatted !== undefined) {
|
2481 |
+
container.append(formatted);
|
2482 |
+
}
|
2483 |
+
cssClass=this.opts.formatSelectionCssClass(data, container);
|
2484 |
+
if (cssClass !== undefined) {
|
2485 |
+
container.addClass(cssClass);
|
2486 |
+
}
|
2487 |
+
|
2488 |
+
this.selection.removeClass("select2-default");
|
2489 |
+
|
2490 |
+
if (this.opts.allowClear && this.getPlaceholder() !== undefined) {
|
2491 |
+
this.container.addClass("select2-allowclear");
|
2492 |
+
}
|
2493 |
+
},
|
2494 |
+
|
2495 |
+
// single
|
2496 |
+
val: function () {
|
2497 |
+
var val,
|
2498 |
+
triggerChange = false,
|
2499 |
+
data = null,
|
2500 |
+
self = this,
|
2501 |
+
oldData = this.data();
|
2502 |
+
|
2503 |
+
if (arguments.length === 0) {
|
2504 |
+
return this.opts.element.val();
|
2505 |
+
}
|
2506 |
+
|
2507 |
+
val = arguments[0];
|
2508 |
+
|
2509 |
+
if (arguments.length > 1) {
|
2510 |
+
triggerChange = arguments[1];
|
2511 |
+
}
|
2512 |
+
|
2513 |
+
if (this.select) {
|
2514 |
+
this.select
|
2515 |
+
.val(val)
|
2516 |
+
.find("option").filter(function() { return this.selected }).each2(function (i, elm) {
|
2517 |
+
data = self.optionToData(elm);
|
2518 |
+
return false;
|
2519 |
+
});
|
2520 |
+
this.updateSelection(data);
|
2521 |
+
this.setPlaceholder();
|
2522 |
+
if (triggerChange) {
|
2523 |
+
this.triggerChange({added: data, removed:oldData});
|
2524 |
+
}
|
2525 |
+
} else {
|
2526 |
+
// val is an id. !val is true for [undefined,null,'',0] - 0 is legal
|
2527 |
+
if (!val && val !== 0) {
|
2528 |
+
this.clear(triggerChange);
|
2529 |
+
return;
|
2530 |
+
}
|
2531 |
+
if (this.opts.initSelection === undefined) {
|
2532 |
+
throw new Error("cannot call val() if initSelection() is not defined");
|
2533 |
+
}
|
2534 |
+
this.opts.element.val(val);
|
2535 |
+
this.opts.initSelection(this.opts.element, function(data){
|
2536 |
+
self.opts.element.val(!data ? "" : self.id(data));
|
2537 |
+
self.updateSelection(data);
|
2538 |
+
self.setPlaceholder();
|
2539 |
+
if (triggerChange) {
|
2540 |
+
self.triggerChange({added: data, removed:oldData});
|
2541 |
+
}
|
2542 |
+
});
|
2543 |
+
}
|
2544 |
+
},
|
2545 |
+
|
2546 |
+
// single
|
2547 |
+
clearSearch: function () {
|
2548 |
+
this.search.val("");
|
2549 |
+
this.focusser.val("");
|
2550 |
+
},
|
2551 |
+
|
2552 |
+
// single
|
2553 |
+
data: function(value) {
|
2554 |
+
var data,
|
2555 |
+
triggerChange = false;
|
2556 |
+
|
2557 |
+
if (arguments.length === 0) {
|
2558 |
+
data = this.selection.data("select2-data");
|
2559 |
+
if (data == undefined) data = null;
|
2560 |
+
return data;
|
2561 |
+
} else {
|
2562 |
+
if (arguments.length > 1) {
|
2563 |
+
triggerChange = arguments[1];
|
2564 |
+
}
|
2565 |
+
if (!value) {
|
2566 |
+
this.clear(triggerChange);
|
2567 |
+
} else {
|
2568 |
+
data = this.data();
|
2569 |
+
this.opts.element.val(!value ? "" : this.id(value));
|
2570 |
+
this.updateSelection(value);
|
2571 |
+
if (triggerChange) {
|
2572 |
+
this.triggerChange({added: value, removed:data});
|
2573 |
+
}
|
2574 |
+
}
|
2575 |
+
}
|
2576 |
+
}
|
2577 |
+
});
|
2578 |
+
|
2579 |
+
MultiSelect2 = clazz(AbstractSelect2, {
|
2580 |
+
|
2581 |
+
// multi
|
2582 |
+
createContainer: function () {
|
2583 |
+
var container = $(document.createElement("div")).attr({
|
2584 |
+
"class": "select2-container select2-container-multi"
|
2585 |
+
}).html([
|
2586 |
+
"<ul class='select2-choices'>",
|
2587 |
+
" <li class='select2-search-field'>",
|
2588 |
+
" <label for='' class='select2-offscreen'></label>",
|
2589 |
+
" <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>",
|
2590 |
+
" </li>",
|
2591 |
+
"</ul>",
|
2592 |
+
"<div class='select2-drop select2-drop-multi select2-display-none'>",
|
2593 |
+
" <ul class='select2-results'>",
|
2594 |
+
" </ul>",
|
2595 |
+
"</div>"].join(""));
|
2596 |
+
return container;
|
2597 |
+
},
|
2598 |
+
|
2599 |
+
// multi
|
2600 |
+
prepareOpts: function () {
|
2601 |
+
var opts = this.parent.prepareOpts.apply(this, arguments),
|
2602 |
+
self=this;
|
2603 |
+
|
2604 |
+
// TODO validate placeholder is a string if specified
|
2605 |
+
if (opts.element.get(0).tagName.toLowerCase() === "select") {
|
2606 |
+
// install the selection initializer
|
2607 |
+
opts.initSelection = function (element, callback) {
|
2608 |
+
|
2609 |
+
var data = [];
|
2610 |
+
|
2611 |
+
element.find("option").filter(function() { return this.selected && !this.disabled }).each2(function (i, elm) {
|
2612 |
+
data.push(self.optionToData(elm));
|
2613 |
+
});
|
2614 |
+
callback(data);
|
2615 |
+
};
|
2616 |
+
} else if ("data" in opts) {
|
2617 |
+
// install default initSelection when applied to hidden input and data is local
|
2618 |
+
opts.initSelection = opts.initSelection || function (element, callback) {
|
2619 |
+
var ids = splitVal(element.val(), opts.separator, opts.transformVal);
|
2620 |
+
//search in data by array of ids, storing matching items in a list
|
2621 |
+
var matches = [];
|
2622 |
+
opts.query({
|
2623 |
+
matcher: function(term, text, el){
|
2624 |
+
var is_match = $.grep(ids, function(id) {
|
2625 |
+
return equal(id, opts.id(el));
|
2626 |
+
}).length;
|
2627 |
+
if (is_match) {
|
2628 |
+
matches.push(el);
|
2629 |
+
}
|
2630 |
+
return is_match;
|
2631 |
+
},
|
2632 |
+
callback: !$.isFunction(callback) ? $.noop : function() {
|
2633 |
+
// reorder matches based on the order they appear in the ids array because right now
|
2634 |
+
// they are in the order in which they appear in data array
|
2635 |
+
var ordered = [];
|
2636 |
+
for (var i = 0; i < ids.length; i++) {
|
2637 |
+
var id = ids[i];
|
2638 |
+
for (var j = 0; j < matches.length; j++) {
|
2639 |
+
var match = matches[j];
|
2640 |
+
if (equal(id, opts.id(match))) {
|
2641 |
+
ordered.push(match);
|
2642 |
+
matches.splice(j, 1);
|
2643 |
+
break;
|
2644 |
+
}
|
2645 |
+
}
|
2646 |
+
}
|
2647 |
+
callback(ordered);
|
2648 |
+
}
|
2649 |
+
});
|
2650 |
+
};
|
2651 |
+
}
|
2652 |
+
|
2653 |
+
return opts;
|
2654 |
+
},
|
2655 |
+
|
2656 |
+
// multi
|
2657 |
+
selectChoice: function (choice) {
|
2658 |
+
|
2659 |
+
var selected = this.container.find(".select2-search-choice-focus");
|
2660 |
+
if (selected.length && choice && choice[0] == selected[0]) {
|
2661 |
+
|
2662 |
+
} else {
|
2663 |
+
if (selected.length) {
|
2664 |
+
this.opts.element.trigger("choice-deselected", selected);
|
2665 |
+
}
|
2666 |
+
selected.removeClass("select2-search-choice-focus");
|
2667 |
+
if (choice && choice.length) {
|
2668 |
+
this.close();
|
2669 |
+
choice.addClass("select2-search-choice-focus");
|
2670 |
+
this.opts.element.trigger("choice-selected", choice);
|
2671 |
+
}
|
2672 |
+
}
|
2673 |
+
},
|
2674 |
+
|
2675 |
+
// multi
|
2676 |
+
destroy: function() {
|
2677 |
+
$("label[for='" + this.search.attr('id') + "']")
|
2678 |
+
.attr('for', this.opts.element.attr("id"));
|
2679 |
+
this.parent.destroy.apply(this, arguments);
|
2680 |
+
|
2681 |
+
cleanupJQueryElements.call(this,
|
2682 |
+
"searchContainer",
|
2683 |
+
"selection"
|
2684 |
+
);
|
2685 |
+
},
|
2686 |
+
|
2687 |
+
// multi
|
2688 |
+
initContainer: function () {
|
2689 |
+
|
2690 |
+
var selector = ".select2-choices", selection;
|
2691 |
+
|
2692 |
+
this.searchContainer = this.container.find(".select2-search-field");
|
2693 |
+
this.selection = selection = this.container.find(selector);
|
2694 |
+
|
2695 |
+
var _this = this;
|
2696 |
+
this.selection.on("click", ".select2-container:not(.select2-container-disabled) .select2-search-choice:not(.select2-locked)", function (e) {
|
2697 |
+
_this.search[0].focus();
|
2698 |
+
_this.selectChoice($(this));
|
2699 |
+
});
|
2700 |
+
|
2701 |
+
// rewrite labels from original element to focusser
|
2702 |
+
this.search.attr("id", "s2id_autogen"+nextUid());
|
2703 |
+
|
2704 |
+
this.search.prev()
|
2705 |
+
.text($("label[for='" + this.opts.element.attr("id") + "']").text())
|
2706 |
+
.attr('for', this.search.attr('id'));
|
2707 |
+
this.opts.element.focus(this.bind(function () { this.focus(); }));
|
2708 |
+
|
2709 |
+
this.search.on("input paste", this.bind(function() {
|
2710 |
+
if (this.search.attr('placeholder') && this.search.val().length == 0) return;
|
2711 |
+
if (!this.isInterfaceEnabled()) return;
|
2712 |
+
if (!this.opened()) {
|
2713 |
+
this.open();
|
2714 |
+
}
|
2715 |
+
}));
|
2716 |
+
|
2717 |
+
this.search.attr("tabindex", this.elementTabIndex);
|
2718 |
+
|
2719 |
+
this.keydowns = 0;
|
2720 |
+
this.search.on("keydown", this.bind(function (e) {
|
2721 |
+
if (!this.isInterfaceEnabled()) return;
|
2722 |
+
|
2723 |
+
++this.keydowns;
|
2724 |
+
var selected = selection.find(".select2-search-choice-focus");
|
2725 |
+
var prev = selected.prev(".select2-search-choice:not(.select2-locked)");
|
2726 |
+
var next = selected.next(".select2-search-choice:not(.select2-locked)");
|
2727 |
+
var pos = getCursorInfo(this.search);
|
2728 |
+
|
2729 |
+
if (selected.length &&
|
2730 |
+
(e.which == KEY.LEFT || e.which == KEY.RIGHT || e.which == KEY.BACKSPACE || e.which == KEY.DELETE || e.which == KEY.ENTER)) {
|
2731 |
+
var selectedChoice = selected;
|
2732 |
+
if (e.which == KEY.LEFT && prev.length) {
|
2733 |
+
selectedChoice = prev;
|
2734 |
+
}
|
2735 |
+
else if (e.which == KEY.RIGHT) {
|
2736 |
+
selectedChoice = next.length ? next : null;
|
2737 |
+
}
|
2738 |
+
else if (e.which === KEY.BACKSPACE) {
|
2739 |
+
if (this.unselect(selected.first())) {
|
2740 |
+
this.search.width(10);
|
2741 |
+
selectedChoice = prev.length ? prev : next;
|
2742 |
+
}
|
2743 |
+
} else if (e.which == KEY.DELETE) {
|
2744 |
+
if (this.unselect(selected.first())) {
|
2745 |
+
this.search.width(10);
|
2746 |
+
selectedChoice = next.length ? next : null;
|
2747 |
+
}
|
2748 |
+
} else if (e.which == KEY.ENTER) {
|
2749 |
+
selectedChoice = null;
|
2750 |
+
}
|
2751 |
+
|
2752 |
+
this.selectChoice(selectedChoice);
|
2753 |
+
killEvent(e);
|
2754 |
+
if (!selectedChoice || !selectedChoice.length) {
|
2755 |
+
this.open();
|
2756 |
+
}
|
2757 |
+
return;
|
2758 |
+
} else if (((e.which === KEY.BACKSPACE && this.keydowns == 1)
|
2759 |
+
|| e.which == KEY.LEFT) && (pos.offset == 0 && !pos.length)) {
|
2760 |
+
|
2761 |
+
this.selectChoice(selection.find(".select2-search-choice:not(.select2-locked)").last());
|
2762 |
+
killEvent(e);
|
2763 |
+
return;
|
2764 |
+
} else {
|
2765 |
+
this.selectChoice(null);
|
2766 |
+
}
|
2767 |
+
|
2768 |
+
if (this.opened()) {
|
2769 |
+
switch (e.which) {
|
2770 |
+
case KEY.UP:
|
2771 |
+
case KEY.DOWN:
|
2772 |
+
this.moveHighlight((e.which === KEY.UP) ? -1 : 1);
|
2773 |
+
killEvent(e);
|
2774 |
+
return;
|
2775 |
+
case KEY.ENTER:
|
2776 |
+
this.selectHighlighted();
|
2777 |
+
killEvent(e);
|
2778 |
+
return;
|
2779 |
+
case KEY.TAB:
|
2780 |
+
this.selectHighlighted({noFocus:true});
|
2781 |
+
this.close();
|
2782 |
+
return;
|
2783 |
+
case KEY.ESC:
|
2784 |
+
this.cancel(e);
|
2785 |
+
killEvent(e);
|
2786 |
+
return;
|
2787 |
+
}
|
2788 |
+
}
|
2789 |
+
|
2790 |
+
if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e)
|
2791 |
+
|| e.which === KEY.BACKSPACE || e.which === KEY.ESC) {
|
2792 |
+
return;
|
2793 |
+
}
|
2794 |
+
|
2795 |
+
if (e.which === KEY.ENTER) {
|
2796 |
+
if (this.opts.openOnEnter === false) {
|
2797 |
+
return;
|
2798 |
+
} else if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {
|
2799 |
+
return;
|
2800 |
+
}
|
2801 |
+
}
|
2802 |
+
|
2803 |
+
this.open();
|
2804 |
+
|
2805 |
+
if (e.which === KEY.PAGE_UP || e.which === KEY.PAGE_DOWN) {
|
2806 |
+
// prevent the page from scrolling
|
2807 |
+
killEvent(e);
|
2808 |
+
}
|
2809 |
+
|
2810 |
+
if (e.which === KEY.ENTER) {
|
2811 |
+
// prevent form from being submitted
|
2812 |
+
killEvent(e);
|
2813 |
+
}
|
2814 |
+
|
2815 |
+
}));
|
2816 |
+
|
2817 |
+
this.search.on("keyup", this.bind(function (e) {
|
2818 |
+
this.keydowns = 0;
|
2819 |
+
this.resizeSearch();
|
2820 |
+
})
|
2821 |
+
);
|
2822 |
+
|
2823 |
+
this.search.on("blur", this.bind(function(e) {
|
2824 |
+
this.container.removeClass("select2-container-active");
|
2825 |
+
this.search.removeClass("select2-focused");
|
2826 |
+
this.selectChoice(null);
|
2827 |
+
if (!this.opened()) this.clearSearch();
|
2828 |
+
e.stopImmediatePropagation();
|
2829 |
+
this.opts.element.trigger($.Event("select2-blur"));
|
2830 |
+
}));
|
2831 |
+
|
2832 |
+
this.container.on("click", selector, this.bind(function (e) {
|
2833 |
+
if (!this.isInterfaceEnabled()) return;
|
2834 |
+
if ($(e.target).closest(".select2-search-choice").length > 0) {
|
2835 |
+
// clicked inside a select2 search choice, do not open
|
2836 |
+
return;
|
2837 |
+
}
|
2838 |
+
this.selectChoice(null);
|
2839 |
+
this.clearPlaceholder();
|
2840 |
+
if (!this.container.hasClass("select2-container-active")) {
|
2841 |
+
this.opts.element.trigger($.Event("select2-focus"));
|
2842 |
+
}
|
2843 |
+
this.open();
|
2844 |
+
this.focusSearch();
|
2845 |
+
e.preventDefault();
|
2846 |
+
}));
|
2847 |
+
|
2848 |
+
this.container.on("focus", selector, this.bind(function () {
|
2849 |
+
if (!this.isInterfaceEnabled()) return;
|
2850 |
+
if (!this.container.hasClass("select2-container-active")) {
|
2851 |
+
this.opts.element.trigger($.Event("select2-focus"));
|
2852 |
+
}
|
2853 |
+
this.container.addClass("select2-container-active");
|
2854 |
+
this.dropdown.addClass("select2-drop-active");
|
2855 |
+
this.clearPlaceholder();
|
2856 |
+
}));
|
2857 |
+
|
2858 |
+
this.initContainerWidth();
|
2859 |
+
this.opts.element.hide();
|
2860 |
+
|
2861 |
+
// set the placeholder if necessary
|
2862 |
+
this.clearSearch();
|
2863 |
+
},
|
2864 |
+
|
2865 |
+
// multi
|
2866 |
+
enableInterface: function() {
|
2867 |
+
if (this.parent.enableInterface.apply(this, arguments)) {
|
2868 |
+
this.search.prop("disabled", !this.isInterfaceEnabled());
|
2869 |
+
}
|
2870 |
+
},
|
2871 |
+
|
2872 |
+
// multi
|
2873 |
+
initSelection: function () {
|
2874 |
+
var data;
|
2875 |
+
if (this.opts.element.val() === "" && this.opts.element.text() === "") {
|
2876 |
+
this.updateSelection([]);
|
2877 |
+
this.close();
|
2878 |
+
// set the placeholder if necessary
|
2879 |
+
this.clearSearch();
|
2880 |
+
}
|
2881 |
+
if (this.select || this.opts.element.val() !== "") {
|
2882 |
+
var self = this;
|
2883 |
+
this.opts.initSelection.call(null, this.opts.element, function(data){
|
2884 |
+
if (data !== undefined && data !== null) {
|
2885 |
+
self.updateSelection(data);
|
2886 |
+
self.close();
|
2887 |
+
// set the placeholder if necessary
|
2888 |
+
self.clearSearch();
|
2889 |
+
}
|
2890 |
+
});
|
2891 |
+
}
|
2892 |
+
},
|
2893 |
+
|
2894 |
+
// multi
|
2895 |
+
clearSearch: function () {
|
2896 |
+
var placeholder = this.getPlaceholder(),
|
2897 |
+
maxWidth = this.getMaxSearchWidth();
|
2898 |
+
|
2899 |
+
if (placeholder !== undefined && this.getVal().length === 0 && this.search.hasClass("select2-focused") === false) {
|
2900 |
+
this.search.val(placeholder).addClass("select2-default");
|
2901 |
+
// stretch the search box to full width of the container so as much of the placeholder is visible as possible
|
2902 |
+
// we could call this.resizeSearch(), but we do not because that requires a sizer and we do not want to create one so early because of a firefox bug, see #944
|
2903 |
+
this.search.width(maxWidth > 0 ? maxWidth : this.container.css("width"));
|
2904 |
+
} else {
|
2905 |
+
this.search.val("").width(10);
|
2906 |
+
}
|
2907 |
+
},
|
2908 |
+
|
2909 |
+
// multi
|
2910 |
+
clearPlaceholder: function () {
|
2911 |
+
if (this.search.hasClass("select2-default")) {
|
2912 |
+
this.search.val("").removeClass("select2-default");
|
2913 |
+
}
|
2914 |
+
},
|
2915 |
+
|
2916 |
+
// multi
|
2917 |
+
opening: function () {
|
2918 |
+
this.clearPlaceholder(); // should be done before super so placeholder is not used to search
|
2919 |
+
this.resizeSearch();
|
2920 |
+
|
2921 |
+
this.parent.opening.apply(this, arguments);
|
2922 |
+
|
2923 |
+
this.focusSearch();
|
2924 |
+
|
2925 |
+
// initializes search's value with nextSearchTerm (if defined by user)
|
2926 |
+
// ignore nextSearchTerm if the dropdown is opened by the user pressing a letter
|
2927 |
+
if(this.search.val() === "") {
|
2928 |
+
if(this.nextSearchTerm != undefined){
|
2929 |
+
this.search.val(this.nextSearchTerm);
|
2930 |
+
this.search.select();
|
2931 |
+
}
|
2932 |
+
}
|
2933 |
+
|
2934 |
+
this.updateResults(true);
|
2935 |
+
if (this.opts.shouldFocusInput(this)) {
|
2936 |
+
this.search.focus();
|
2937 |
+
}
|
2938 |
+
this.opts.element.trigger($.Event("select2-open"));
|
2939 |
+
},
|
2940 |
+
|
2941 |
+
// multi
|
2942 |
+
close: function () {
|
2943 |
+
if (!this.opened()) return;
|
2944 |
+
this.parent.close.apply(this, arguments);
|
2945 |
+
},
|
2946 |
+
|
2947 |
+
// multi
|
2948 |
+
focus: function () {
|
2949 |
+
this.close();
|
2950 |
+
this.search.focus();
|
2951 |
+
},
|
2952 |
+
|
2953 |
+
// multi
|
2954 |
+
isFocused: function () {
|
2955 |
+
return this.search.hasClass("select2-focused");
|
2956 |
+
},
|
2957 |
+
|
2958 |
+
// multi
|
2959 |
+
updateSelection: function (data) {
|
2960 |
+
var ids = [], filtered = [], self = this;
|
2961 |
+
|
2962 |
+
// filter out duplicates
|
2963 |
+
$(data).each(function () {
|
2964 |
+
if (indexOf(self.id(this), ids) < 0) {
|
2965 |
+
ids.push(self.id(this));
|
2966 |
+
filtered.push(this);
|
2967 |
+
}
|
2968 |
+
});
|
2969 |
+
data = filtered;
|
2970 |
+
|
2971 |
+
this.selection.find(".select2-search-choice").remove();
|
2972 |
+
$(data).each(function () {
|
2973 |
+
self.addSelectedChoice(this);
|
2974 |
+
});
|
2975 |
+
self.postprocessResults();
|
2976 |
+
},
|
2977 |
+
|
2978 |
+
// multi
|
2979 |
+
tokenize: function() {
|
2980 |
+
var input = this.search.val();
|
2981 |
+
input = this.opts.tokenizer.call(this, input, this.data(), this.bind(this.onSelect), this.opts);
|
2982 |
+
if (input != null && input != undefined) {
|
2983 |
+
this.search.val(input);
|
2984 |
+
if (input.length > 0) {
|
2985 |
+
this.open();
|
2986 |
+
}
|
2987 |
+
}
|
2988 |
+
|
2989 |
+
},
|
2990 |
+
|
2991 |
+
// multi
|
2992 |
+
onSelect: function (data, options) {
|
2993 |
+
|
2994 |
+
if (!this.triggerSelect(data) || data.text === "") { return; }
|
2995 |
+
|
2996 |
+
this.addSelectedChoice(data);
|
2997 |
+
|
2998 |
+
this.opts.element.trigger({ type: "selected", val: this.id(data), choice: data });
|
2999 |
+
|
3000 |
+
// keep track of the search's value before it gets cleared
|
3001 |
+
this.nextSearchTerm = this.opts.nextSearchTerm(data, this.search.val());
|
3002 |
+
|
3003 |
+
this.clearSearch();
|
3004 |
+
this.updateResults();
|
3005 |
+
|
3006 |
+
if (this.select || !this.opts.closeOnSelect) this.postprocessResults(data, false, this.opts.closeOnSelect===true);
|
3007 |
+
|
3008 |
+
if (this.opts.closeOnSelect) {
|
3009 |
+
this.close();
|
3010 |
+
this.search.width(10);
|
3011 |
+
} else {
|
3012 |
+
if (this.countSelectableResults()>0) {
|
3013 |
+
this.search.width(10);
|
3014 |
+
this.resizeSearch();
|
3015 |
+
if (this.getMaximumSelectionSize() > 0 && this.val().length >= this.getMaximumSelectionSize()) {
|
3016 |
+
// if we reached max selection size repaint the results so choices
|
3017 |
+
// are replaced with the max selection reached message
|
3018 |
+
this.updateResults(true);
|
3019 |
+
} else {
|
3020 |
+
// initializes search's value with nextSearchTerm and update search result
|
3021 |
+
if(this.nextSearchTerm != undefined){
|
3022 |
+
this.search.val(this.nextSearchTerm);
|
3023 |
+
this.updateResults();
|
3024 |
+
this.search.select();
|
3025 |
+
}
|
3026 |
+
}
|
3027 |
+
this.positionDropdown();
|
3028 |
+
} else {
|
3029 |
+
// if nothing left to select close
|
3030 |
+
this.close();
|
3031 |
+
this.search.width(10);
|
3032 |
+
}
|
3033 |
+
}
|
3034 |
+
|
3035 |
+
// since its not possible to select an element that has already been
|
3036 |
+
// added we do not need to check if this is a new element before firing change
|
3037 |
+
this.triggerChange({ added: data });
|
3038 |
+
|
3039 |
+
if (!options || !options.noFocus)
|
3040 |
+
this.focusSearch();
|
3041 |
+
},
|
3042 |
+
|
3043 |
+
// multi
|
3044 |
+
cancel: function () {
|
3045 |
+
this.close();
|
3046 |
+
this.focusSearch();
|
3047 |
+
},
|
3048 |
+
|
3049 |
+
addSelectedChoice: function (data) {
|
3050 |
+
var enableChoice = !data.locked,
|
3051 |
+
enabledItem = $(
|
3052 |
+
"<li class='select2-search-choice'>" +
|
3053 |
+
" <div></div>" +
|
3054 |
+
" <a href='#' class='select2-search-choice-close' tabindex='-1'></a>" +
|
3055 |
+
"</li>"),
|
3056 |
+
disabledItem = $(
|
3057 |
+
"<li class='select2-search-choice select2-locked'>" +
|
3058 |
+
"<div></div>" +
|
3059 |
+
"</li>");
|
3060 |
+
var choice = enableChoice ? enabledItem : disabledItem,
|
3061 |
+
id = this.id(data),
|
3062 |
+
val = this.getVal(),
|
3063 |
+
formatted,
|
3064 |
+
cssClass;
|
3065 |
+
|
3066 |
+
formatted=this.opts.formatSelection(data, choice.find("div"), this.opts.escapeMarkup);
|
3067 |
+
if (formatted != undefined) {
|
3068 |
+
choice.find("div").replaceWith($("<div></div>").html(formatted));
|
3069 |
+
}
|
3070 |
+
cssClass=this.opts.formatSelectionCssClass(data, choice.find("div"));
|
3071 |
+
if (cssClass != undefined) {
|
3072 |
+
choice.addClass(cssClass);
|
3073 |
+
}
|
3074 |
+
|
3075 |
+
if(enableChoice){
|
3076 |
+
choice.find(".select2-search-choice-close")
|
3077 |
+
.on("mousedown", killEvent)
|
3078 |
+
.on("click dblclick", this.bind(function (e) {
|
3079 |
+
if (!this.isInterfaceEnabled()) return;
|
3080 |
+
|
3081 |
+
this.unselect($(e.target));
|
3082 |
+
this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
|
3083 |
+
killEvent(e);
|
3084 |
+
this.close();
|
3085 |
+
this.focusSearch();
|
3086 |
+
})).on("focus", this.bind(function () {
|
3087 |
+
if (!this.isInterfaceEnabled()) return;
|
3088 |
+
this.container.addClass("select2-container-active");
|
3089 |
+
this.dropdown.addClass("select2-drop-active");
|
3090 |
+
}));
|
3091 |
+
}
|
3092 |
+
|
3093 |
+
choice.data("select2-data", data);
|
3094 |
+
choice.insertBefore(this.searchContainer);
|
3095 |
+
|
3096 |
+
val.push(id);
|
3097 |
+
this.setVal(val);
|
3098 |
+
},
|
3099 |
+
|
3100 |
+
// multi
|
3101 |
+
unselect: function (selected) {
|
3102 |
+
var val = this.getVal(),
|
3103 |
+
data,
|
3104 |
+
index;
|
3105 |
+
selected = selected.closest(".select2-search-choice");
|
3106 |
+
|
3107 |
+
if (selected.length === 0) {
|
3108 |
+
throw "Invalid argument: " + selected + ". Must be .select2-search-choice";
|
3109 |
+
}
|
3110 |
+
|
3111 |
+
data = selected.data("select2-data");
|
3112 |
+
|
3113 |
+
if (!data) {
|
3114 |
+
// prevent a race condition when the 'x' is clicked really fast repeatedly the event can be queued
|
3115 |
+
// and invoked on an element already removed
|
3116 |
+
return;
|
3117 |
+
}
|
3118 |
+
|
3119 |
+
var evt = $.Event("select2-removing");
|
3120 |
+
evt.val = this.id(data);
|
3121 |
+
evt.choice = data;
|
3122 |
+
this.opts.element.trigger(evt);
|
3123 |
+
|
3124 |
+
if (evt.isDefaultPrevented()) {
|
3125 |
+
return false;
|
3126 |
+
}
|
3127 |
+
|
3128 |
+
while((index = indexOf(this.id(data), val)) >= 0) {
|
3129 |
+
val.splice(index, 1);
|
3130 |
+
this.setVal(val);
|
3131 |
+
if (this.select) this.postprocessResults();
|
3132 |
+
}
|
3133 |
+
|
3134 |
+
selected.remove();
|
3135 |
+
|
3136 |
+
this.opts.element.trigger({ type: "select2-removed", val: this.id(data), choice: data });
|
3137 |
+
this.triggerChange({ removed: data });
|
3138 |
+
|
3139 |
+
return true;
|
3140 |
+
},
|
3141 |
+
|
3142 |
+
// multi
|
3143 |
+
postprocessResults: function (data, initial, noHighlightUpdate) {
|
3144 |
+
var val = this.getVal(),
|
3145 |
+
choices = this.results.find(".select2-result"),
|
3146 |
+
compound = this.results.find(".select2-result-with-children"),
|
3147 |
+
self = this;
|
3148 |
+
|
3149 |
+
choices.each2(function (i, choice) {
|
3150 |
+
var id = self.id(choice.data("select2-data"));
|
3151 |
+
if (indexOf(id, val) >= 0) {
|
3152 |
+
choice.addClass("select2-selected");
|
3153 |
+
// mark all children of the selected parent as selected
|
3154 |
+
choice.find(".select2-result-selectable").addClass("select2-selected");
|
3155 |
+
}
|
3156 |
+
});
|
3157 |
+
|
3158 |
+
compound.each2(function(i, choice) {
|
3159 |
+
// hide an optgroup if it doesn't have any selectable children
|
3160 |
+
if (!choice.is('.select2-result-selectable')
|
3161 |
+
&& choice.find(".select2-result-selectable:not(.select2-selected)").length === 0) {
|
3162 |
+
choice.addClass("select2-selected");
|
3163 |
+
}
|
3164 |
+
});
|
3165 |
+
|
3166 |
+
if (this.highlight() == -1 && noHighlightUpdate !== false && this.opts.closeOnSelect === true){
|
3167 |
+
self.highlight(0);
|
3168 |
+
}
|
3169 |
+
|
3170 |
+
//If all results are chosen render formatNoMatches
|
3171 |
+
if(!this.opts.createSearchChoice && !choices.filter('.select2-result:not(.select2-selected)').length > 0){
|
3172 |
+
if(!data || data && !data.more && this.results.find(".select2-no-results").length === 0) {
|
3173 |
+
if (checkFormatter(self.opts.formatNoMatches, "formatNoMatches")) {
|
3174 |
+
this.results.append("<li class='select2-no-results'>" + evaluate(self.opts.formatNoMatches, self.opts.element, self.search.val()) + "</li>");
|
3175 |
+
}
|
3176 |
+
}
|
3177 |
+
}
|
3178 |
+
|
3179 |
+
},
|
3180 |
+
|
3181 |
+
// multi
|
3182 |
+
getMaxSearchWidth: function() {
|
3183 |
+
return this.selection.width() - getSideBorderPadding(this.search);
|
3184 |
+
},
|
3185 |
+
|
3186 |
+
// multi
|
3187 |
+
resizeSearch: function () {
|
3188 |
+
var minimumWidth, left, maxWidth, containerLeft, searchWidth,
|
3189 |
+
sideBorderPadding = getSideBorderPadding(this.search);
|
3190 |
+
|
3191 |
+
minimumWidth = measureTextWidth(this.search) + 10;
|
3192 |
+
|
3193 |
+
left = this.search.offset().left;
|
3194 |
+
|
3195 |
+
maxWidth = this.selection.width();
|
3196 |
+
containerLeft = this.selection.offset().left;
|
3197 |
+
|
3198 |
+
searchWidth = maxWidth - (left - containerLeft) - sideBorderPadding;
|
3199 |
+
|
3200 |
+
if (searchWidth < minimumWidth) {
|
3201 |
+
searchWidth = maxWidth - sideBorderPadding;
|
3202 |
+
}
|
3203 |
+
|
3204 |
+
if (searchWidth < 40) {
|
3205 |
+
searchWidth = maxWidth - sideBorderPadding;
|
3206 |
+
}
|
3207 |
+
|
3208 |
+
if (searchWidth <= 0) {
|
3209 |
+
searchWidth = minimumWidth;
|
3210 |
+
}
|
3211 |
+
|
3212 |
+
this.search.width(Math.floor(searchWidth));
|
3213 |
+
},
|
3214 |
+
|
3215 |
+
// multi
|
3216 |
+
getVal: function () {
|
3217 |
+
var val;
|
3218 |
+
if (this.select) {
|
3219 |
+
val = this.select.val();
|
3220 |
+
return val === null ? [] : val;
|
3221 |
+
} else {
|
3222 |
+
val = this.opts.element.val();
|
3223 |
+
return splitVal(val, this.opts.separator, this.opts.transformVal);
|
3224 |
+
}
|
3225 |
+
},
|
3226 |
+
|
3227 |
+
// multi
|
3228 |
+
setVal: function (val) {
|
3229 |
+
var unique;
|
3230 |
+
if (this.select) {
|
3231 |
+
this.select.val(val);
|
3232 |
+
} else {
|
3233 |
+
unique = [];
|
3234 |
+
// filter out duplicates
|
3235 |
+
$(val).each(function () {
|
3236 |
+
if (indexOf(this, unique) < 0) unique.push(this);
|
3237 |
+
});
|
3238 |
+
this.opts.element.val(unique.length === 0 ? "" : unique.join(this.opts.separator));
|
3239 |
+
}
|
3240 |
+
},
|
3241 |
+
|
3242 |
+
// multi
|
3243 |
+
buildChangeDetails: function (old, current) {
|
3244 |
+
var current = current.slice(0),
|
3245 |
+
old = old.slice(0);
|
3246 |
+
|
3247 |
+
// remove intersection from each array
|
3248 |
+
for (var i = 0; i < current.length; i++) {
|
3249 |
+
for (var j = 0; j < old.length; j++) {
|
3250 |
+
if (equal(this.opts.id(current[i]), this.opts.id(old[j]))) {
|
3251 |
+
current.splice(i, 1);
|
3252 |
+
if(i>0){
|
3253 |
+
i--;
|
3254 |
+
}
|
3255 |
+
old.splice(j, 1);
|
3256 |
+
j--;
|
3257 |
+
}
|
3258 |
+
}
|
3259 |
+
}
|
3260 |
+
|
3261 |
+
return {added: current, removed: old};
|
3262 |
+
},
|
3263 |
+
|
3264 |
+
|
3265 |
+
// multi
|
3266 |
+
val: function (val, triggerChange) {
|
3267 |
+
var oldData, self=this;
|
3268 |
+
|
3269 |
+
if (arguments.length === 0) {
|
3270 |
+
return this.getVal();
|
3271 |
+
}
|
3272 |
+
|
3273 |
+
oldData=this.data();
|
3274 |
+
if (!oldData.length) oldData=[];
|
3275 |
+
|
3276 |
+
// val is an id. !val is true for [undefined,null,'',0] - 0 is legal
|
3277 |
+
if (!val && val !== 0) {
|
3278 |
+
this.opts.element.val("");
|
3279 |
+
this.updateSelection([]);
|
3280 |
+
this.clearSearch();
|
3281 |
+
if (triggerChange) {
|
3282 |
+
this.triggerChange({added: this.data(), removed: oldData});
|
3283 |
+
}
|
3284 |
+
return;
|
3285 |
+
}
|
3286 |
+
|
3287 |
+
// val is a list of ids
|
3288 |
+
this.setVal(val);
|
3289 |
+
|
3290 |
+
if (this.select) {
|
3291 |
+
this.opts.initSelection(this.select, this.bind(this.updateSelection));
|
3292 |
+
if (triggerChange) {
|
3293 |
+
this.triggerChange(this.buildChangeDetails(oldData, this.data()));
|
3294 |
+
}
|
3295 |
+
} else {
|
3296 |
+
if (this.opts.initSelection === undefined) {
|
3297 |
+
throw new Error("val() cannot be called if initSelection() is not defined");
|
3298 |
+
}
|
3299 |
+
|
3300 |
+
this.opts.initSelection(this.opts.element, function(data){
|
3301 |
+
var ids=$.map(data, self.id);
|
3302 |
+
self.setVal(ids);
|
3303 |
+
self.updateSelection(data);
|
3304 |
+
self.clearSearch();
|
3305 |
+
if (triggerChange) {
|
3306 |
+
self.triggerChange(self.buildChangeDetails(oldData, self.data()));
|
3307 |
+
}
|
3308 |
+
});
|
3309 |
+
}
|
3310 |
+
this.clearSearch();
|
3311 |
+
},
|
3312 |
+
|
3313 |
+
// multi
|
3314 |
+
onSortStart: function() {
|
3315 |
+
if (this.select) {
|
3316 |
+
throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");
|
3317 |
+
}
|
3318 |
+
|
3319 |
+
// collapse search field into 0 width so its container can be collapsed as well
|
3320 |
+
this.search.width(0);
|
3321 |
+
// hide the container
|
3322 |
+
this.searchContainer.hide();
|
3323 |
+
},
|
3324 |
+
|
3325 |
+
// multi
|
3326 |
+
onSortEnd:function() {
|
3327 |
+
|
3328 |
+
var val=[], self=this;
|
3329 |
+
|
3330 |
+
// show search and move it to the end of the list
|
3331 |
+
this.searchContainer.show();
|
3332 |
+
// make sure the search container is the last item in the list
|
3333 |
+
this.searchContainer.appendTo(this.searchContainer.parent());
|
3334 |
+
// since we collapsed the width in dragStarted, we resize it here
|
3335 |
+
this.resizeSearch();
|
3336 |
+
|
3337 |
+
// update selection
|
3338 |
+
this.selection.find(".select2-search-choice").each(function() {
|
3339 |
+
val.push(self.opts.id($(this).data("select2-data")));
|
3340 |
+
});
|
3341 |
+
this.setVal(val);
|
3342 |
+
this.triggerChange();
|
3343 |
+
},
|
3344 |
+
|
3345 |
+
// multi
|
3346 |
+
data: function(values, triggerChange) {
|
3347 |
+
var self=this, ids, old;
|
3348 |
+
if (arguments.length === 0) {
|
3349 |
+
return this.selection
|
3350 |
+
.children(".select2-search-choice")
|
3351 |
+
.map(function() { return $(this).data("select2-data"); })
|
3352 |
+
.get();
|
3353 |
+
} else {
|
3354 |
+
old = this.data();
|
3355 |
+
if (!values) { values = []; }
|
3356 |
+
ids = $.map(values, function(e) { return self.opts.id(e); });
|
3357 |
+
this.setVal(ids);
|
3358 |
+
this.updateSelection(values);
|
3359 |
+
this.clearSearch();
|
3360 |
+
if (triggerChange) {
|
3361 |
+
this.triggerChange(this.buildChangeDetails(old, this.data()));
|
3362 |
+
}
|
3363 |
+
}
|
3364 |
+
}
|
3365 |
+
});
|
3366 |
+
|
3367 |
+
$.fn.select2 = function () {
|
3368 |
+
|
3369 |
+
var args = Array.prototype.slice.call(arguments, 0),
|
3370 |
+
opts,
|
3371 |
+
select2,
|
3372 |
+
method, value, multiple,
|
3373 |
+
allowedMethods = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "dropdown", "onSortStart", "onSortEnd", "enable", "disable", "readonly", "positionDropdown", "data", "search"],
|
3374 |
+
valueMethods = ["opened", "isFocused", "container", "dropdown"],
|
3375 |
+
propertyMethods = ["val", "data"],
|
3376 |
+
methodsMap = { search: "externalSearch" };
|
3377 |
+
|
3378 |
+
this.each(function () {
|
3379 |
+
if (args.length === 0 || typeof(args[0]) === "object") {
|
3380 |
+
opts = args.length === 0 ? {} : $.extend({}, args[0]);
|
3381 |
+
opts.element = $(this);
|
3382 |
+
|
3383 |
+
if (opts.element.get(0).tagName.toLowerCase() === "select") {
|
3384 |
+
multiple = opts.element.prop("multiple");
|
3385 |
+
} else {
|
3386 |
+
multiple = opts.multiple || false;
|
3387 |
+
if ("tags" in opts) {opts.multiple = multiple = true;}
|
3388 |
+
}
|
3389 |
+
|
3390 |
+
select2 = multiple ? new window.Select2["class"].multi() : new window.Select2["class"].single();
|
3391 |
+
select2.init(opts);
|
3392 |
+
} else if (typeof(args[0]) === "string") {
|
3393 |
+
|
3394 |
+
if (indexOf(args[0], allowedMethods) < 0) {
|
3395 |
+
throw "Unknown method: " + args[0];
|
3396 |
+
}
|
3397 |
+
|
3398 |
+
value = undefined;
|
3399 |
+
select2 = $(this).data("select2");
|
3400 |
+
if (select2 === undefined) return;
|
3401 |
+
|
3402 |
+
method=args[0];
|
3403 |
+
|
3404 |
+
if (method === "container") {
|
3405 |
+
value = select2.container;
|
3406 |
+
} else if (method === "dropdown") {
|
3407 |
+
value = select2.dropdown;
|
3408 |
+
} else {
|
3409 |
+
if (methodsMap[method]) method = methodsMap[method];
|
3410 |
+
|
3411 |
+
value = select2[method].apply(select2, args.slice(1));
|
3412 |
+
}
|
3413 |
+
if (indexOf(args[0], valueMethods) >= 0
|
3414 |
+
|| (indexOf(args[0], propertyMethods) >= 0 && args.length == 1)) {
|
3415 |
+
return false; // abort the iteration, ready to return first matched value
|
3416 |
+
}
|
3417 |
+
} else {
|
3418 |
+
throw "Invalid arguments to select2 plugin: " + args;
|
3419 |
+
}
|
3420 |
+
});
|
3421 |
+
return (value === undefined) ? this : value;
|
3422 |
+
};
|
3423 |
+
|
3424 |
+
// plugin defaults, accessible to users
|
3425 |
+
$.fn.select2.defaults = {
|
3426 |
+
width: "copy",
|
3427 |
+
loadMorePadding: 0,
|
3428 |
+
closeOnSelect: true,
|
3429 |
+
openOnEnter: true,
|
3430 |
+
containerCss: {},
|
3431 |
+
dropdownCss: {},
|
3432 |
+
containerCssClass: "",
|
3433 |
+
dropdownCssClass: "",
|
3434 |
+
formatResult: function(result, container, query, escapeMarkup) {
|
3435 |
+
var markup=[];
|
3436 |
+
markMatch(this.text(result), query.term, markup, escapeMarkup);
|
3437 |
+
return markup.join("");
|
3438 |
+
},
|
3439 |
+
transformVal: function(val) {
|
3440 |
+
return $.trim(val);
|
3441 |
+
},
|
3442 |
+
formatSelection: function (data, container, escapeMarkup) {
|
3443 |
+
return data ? escapeMarkup(this.text(data)) : undefined;
|
3444 |
+
},
|
3445 |
+
sortResults: function (results, container, query) {
|
3446 |
+
return results;
|
3447 |
+
},
|
3448 |
+
formatResultCssClass: function(data) {return data.css;},
|
3449 |
+
formatSelectionCssClass: function(data, container) {return undefined;},
|
3450 |
+
minimumResultsForSearch: 0,
|
3451 |
+
minimumInputLength: 0,
|
3452 |
+
maximumInputLength: null,
|
3453 |
+
maximumSelectionSize: 0,
|
3454 |
+
id: function (e) { return e == undefined ? null : e.id; },
|
3455 |
+
text: function (e) {
|
3456 |
+
if (e && this.data && this.data.text) {
|
3457 |
+
if ($.isFunction(this.data.text)) {
|
3458 |
+
return this.data.text(e);
|
3459 |
+
} else {
|
3460 |
+
return e[this.data.text];
|
3461 |
+
}
|
3462 |
+
} else {
|
3463 |
+
return e.text;
|
3464 |
+
}
|
3465 |
+
},
|
3466 |
+
matcher: function(term, text) {
|
3467 |
+
return stripDiacritics(''+text).toUpperCase().indexOf(stripDiacritics(''+term).toUpperCase()) >= 0;
|
3468 |
+
},
|
3469 |
+
separator: ",",
|
3470 |
+
tokenSeparators: [],
|
3471 |
+
tokenizer: defaultTokenizer,
|
3472 |
+
escapeMarkup: defaultEscapeMarkup,
|
3473 |
+
blurOnChange: false,
|
3474 |
+
selectOnBlur: false,
|
3475 |
+
adaptContainerCssClass: function(c) { return c; },
|
3476 |
+
adaptDropdownCssClass: function(c) { return null; },
|
3477 |
+
nextSearchTerm: function(selectedObject, currentSearchTerm) { return undefined; },
|
3478 |
+
searchInputPlaceholder: '',
|
3479 |
+
createSearchChoicePosition: 'top',
|
3480 |
+
shouldFocusInput: function (instance) {
|
3481 |
+
// Attempt to detect touch devices
|
3482 |
+
var supportsTouchEvents = (('ontouchstart' in window) ||
|
3483 |
+
(navigator.msMaxTouchPoints > 0));
|
3484 |
+
|
3485 |
+
// Only devices which support touch events should be special cased
|
3486 |
+
if (!supportsTouchEvents) {
|
3487 |
+
return true;
|
3488 |
+
}
|
3489 |
+
|
3490 |
+
// Never focus the input if search is disabled
|
3491 |
+
if (instance.opts.minimumResultsForSearch < 0) {
|
3492 |
+
return false;
|
3493 |
+
}
|
3494 |
+
|
3495 |
+
return true;
|
3496 |
+
}
|
3497 |
+
};
|
3498 |
+
|
3499 |
+
$.fn.select2.locales = [];
|
3500 |
+
|
3501 |
+
$.fn.select2.locales['en'] = {
|
3502 |
+
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."; },
|
3503 |
+
formatNoMatches: function () { return "No matches found"; },
|
3504 |
+
formatAjaxError: function (jqXHR, textStatus, errorThrown) { return "Loading failed"; },
|
3505 |
+
formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " or more character" + (n == 1 ? "" : "s"); },
|
3506 |
+
formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " character" + (n == 1 ? "" : "s"); },
|
3507 |
+
formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); },
|
3508 |
+
formatLoadMore: function (pageNumber) { return "Loading more results…"; },
|
3509 |
+
formatSearching: function () { return "Searching…"; }
|
3510 |
+
};
|
3511 |
+
|
3512 |
+
$.extend($.fn.select2.defaults, $.fn.select2.locales['en']);
|
3513 |
+
|
3514 |
+
$.fn.select2.ajaxDefaults = {
|
3515 |
+
transport: $.ajax,
|
3516 |
+
params: {
|
3517 |
+
type: "GET",
|
3518 |
+
cache: false,
|
3519 |
+
dataType: "json"
|
3520 |
+
}
|
3521 |
+
};
|
3522 |
+
|
3523 |
+
// exports
|
3524 |
+
window.Select2 = {
|
3525 |
+
query: {
|
3526 |
+
ajax: ajax,
|
3527 |
+
local: local,
|
3528 |
+
tags: tags
|
3529 |
+
}, util: {
|
3530 |
+
debounce: debounce,
|
3531 |
+
markMatch: markMatch,
|
3532 |
+
escapeMarkup: defaultEscapeMarkup,
|
3533 |
+
stripDiacritics: stripDiacritics
|
3534 |
+
}, "class": {
|
3535 |
+
"abstract": AbstractSelect2,
|
3536 |
+
"single": SingleSelect2,
|
3537 |
+
"multi": MultiSelect2
|
3538 |
+
}
|
3539 |
+
};
|
3540 |
+
|
3541 |
+
}(jQuery));
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2.min.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Copyright 2014 Igor Vaynberg
|
3 |
+
|
4 |
+
Version: 3.5.2 Timestamp: Sat Nov 1 14:43:36 EDT 2014
|
5 |
+
|
6 |
+
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
|
7 |
+
General Public License version 2 (the "GPL License"). You may choose either license to govern your
|
8 |
+
use of this software only upon the condition that you accept all of the terms of either the Apache
|
9 |
+
License or the GPL License.
|
10 |
+
|
11 |
+
You may obtain a copy of the Apache License and the GPL License at:
|
12 |
+
|
13 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
14 |
+
http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
+
|
16 |
+
Unless required by applicable law or agreed to in writing, software distributed under the Apache License
|
17 |
+
or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
18 |
+
either express or implied. See the Apache License and the GPL License for the specific language governing
|
19 |
+
permissions and limitations under the Apache License and the GPL License.
|
20 |
+
*/
|
21 |
+
!function(a){"undefined"==typeof a.fn.each2&&a.extend(a.fn,{each2:function(b){for(var c=a([0]),d=-1,e=this.length;++d<e&&(c.context=c[0]=this[d])&&b.call(c[0],d,c)!==!1;);return this}})}(jQuery),function(a,b){"use strict";function n(b){var c=a(document.createTextNode(""));b.before(c),c.before(b),c.remove()}function o(a){function b(a){return m[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function p(a,b){for(var c=0,d=b.length;d>c;c+=1)if(r(a,b[c]))return c;return-1}function q(){var b=a(l);b.appendTo(document.body);var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function r(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function s(a,b,c){var d,e,f;if(null===a||a.length<1)return[];for(d=a.split(b),e=0,f=d.length;f>e;e+=1)d[e]=c(d[e]);return d}function t(a){return a.outerWidth(!1)-a.width()}function u(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function v(c){c.on("mousemove",function(c){var d=h;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function w(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function x(a,b){var c=w(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){p(a.target,b.get())>=0&&c(a)})}function y(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus();var e=b.offsetWidth>0||b.offsetHeight>0;e&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function z(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function A(a){a.preventDefault(),a.stopPropagation()}function B(a){a.preventDefault(),a.stopImmediatePropagation()}function C(b){if(!g){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);g=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),g.attr("class","select2-sizer"),a(document.body).append(g)}return g.text(b.val()),g.width()}function D(b,c,d){var e,g,f=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(g))})),b.attr("class",f.join(" "))}function E(a,b,c,d){var e=o(a.toUpperCase()).indexOf(o(b.toUpperCase())),f=b.length;return 0>e?(c.push(d(a)),void 0):(c.push(d(a.substring(0,e))),c.push("<span class='select2-match'>"),c.push(d(a.substring(e,e+f))),c.push("</span>"),c.push(d(a.substring(e+f,a.length))),void 0)}function F(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})}function G(c){var d,e=null,f=c.quietMillis||100,g=c.url,h=this;return function(i){window.clearTimeout(d),d=window.setTimeout(function(){var d=c.data,f=g,j=c.transport||a.fn.select2.ajaxDefaults.transport,k={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},l=a.extend({},a.fn.select2.ajaxDefaults.params,k);d=d?d.call(h,i.term,i.page,i.context):null,f="function"==typeof f?f.call(h,i.term,i.page,i.context):f,e&&"function"==typeof e.abort&&e.abort(),c.params&&(a.isFunction(c.params)?a.extend(l,c.params.call(h)):a.extend(l,c.params)),a.extend(l,{url:f,dataType:c.dataType,data:d,success:function(a){var b=c.results(a,i.page,i);i.callback(b)},error:function(a,b,c){var d={hasError:!0,jqXHR:a,textStatus:b,errorThrown:c};i.callback(d)}}),e=j.call(h,l)},f)}}function H(b){var d,e,c=b,f=function(a){return""+a.text};a.isArray(c)&&(e=c,c={results:e}),a.isFunction(c)===!1&&(e=c,c=function(){return e});var g=c();return g.text&&(f=g.text,a.isFunction(f)||(d=g.text,f=function(a){return a[d]})),function(b){var g,d=b.term,e={results:[]};return""===d?(b.callback(c()),void 0):(g=function(c,e){var h,i;if(c=c[0],c.children){h={};for(i in c)c.hasOwnProperty(i)&&(h[i]=c[i]);h.children=[],a(c.children).each2(function(a,b){g(b,h.children)}),(h.children.length||b.matcher(d,f(h),c))&&e.push(h)}else b.matcher(d,f(c),c)&&e.push(c)},a(c().results).each2(function(a,b){g(b,e.results)}),b.callback(e),void 0)}}function I(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]},h=d?c(e):c;a.isArray(h)&&(a(h).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g))}}function J(b,c){if(a.isFunction(b))return!0;if(!b)return!1;if("string"==typeof b)return!0;throw new Error(c+" must be a string, function, or falsy value")}function K(b,c){if(a.isFunction(b)){var d=Array.prototype.slice.call(arguments,2);return b.apply(c,d)}return b}function L(b){var c=0;return a.each(b,function(a,b){b.children?c+=L(b.children):c++}),c}function M(a,c,d,e){var h,i,j,k,l,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||e.tokenSeparators.length<1)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(l=e.tokenSeparators[j],i=a.indexOf(l),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+l.length),h.length>0&&(h=e.createSearchChoice.call(this,h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(r(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:void 0}function N(){var b=this;a.each(arguments,function(a,c){b[c].remove(),b[c]=null})}function O(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,i,j,h={x:0,y:0},k={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case k.LEFT:case k.RIGHT:case k.UP:case k.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case k.SHIFT:case k.CTRL:case k.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},l="<div class='select2-measure-scrollbar'></div>",m={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03c9":"\u03c9","\u03c2":"\u03c3"};i=a(document),f=function(){var a=1;return function(){return a++}}(),c=O(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,g=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&c.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=a(".select2-hidden-accessible"),0==this.liveRegion.length&&(this.liveRegion=a("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body)),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+f()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",c.element.attr("title")),this.body=a(document.body),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",c.element.attr("style")),this.container.css(K(c.containerCss,this.opts.element)),this.container.addClass(K(c.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",A),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(c.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",A),this.results=d=this.container.find(g),this.search=e=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",A),v(this.results),this.dropdown.on("mousemove-filtered",g,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",g,this.bind(function(a){this._touchEvent=!0,this.highlightUnderEvent(a)})),this.dropdown.on("touchmove",g,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",g,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),x(80,this.results),this.dropdown.on("scroll-debounced",g,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),A(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),A(a))}),u(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",g,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(a){a.stopPropagation()}),this.nextSearchTerm=b,a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var i=c.element.prop("readonly");i===b&&(i=!1),this.readonly(i),j=j||q(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",c.searchInputPlaceholder)},destroy:function(){var a=this.opts.element,c=a.data("select2"),d=this;this.close(),a.length&&a[0].detachEvent&&d._sync&&a.each(function(){d._sync&&this.detachEvent("onpropertychange",d._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,c!==b&&(c.container.remove(),c.liveRegion.remove(),c.dropdown.remove(),a.show().removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?a.attr({tabindex:this.elementTabIndex}):a.removeAttr("tabindex"),a.show()),N.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:r(a.attr("locked"),"locked")||r(a.data("locked"),!0)}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:void 0},prepareOpts:function(c){var d,e,g,h,i=this;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),c=a.extend({},{populateResults:function(d,e,g){var h,j=this.opts.id,k=this.liveRegion;h=function(d,e,l){var m,n,o,p,q,r,s,t,u,v;d=c.sortResults(d,e,g);var w=[];for(m=0,n=d.length;n>m;m+=1)o=d[m],q=o.disabled===!0,p=!q&&j(o)!==b,r=o.children&&o.children.length>0,s=a("<li></li>"),s.addClass("select2-results-dept-"+l),s.addClass("select2-result"),s.addClass(p?"select2-result-selectable":"select2-result-unselectable"),q&&s.addClass("select2-disabled"),r&&s.addClass("select2-result-with-children"),s.addClass(i.opts.formatResultCssClass(o)),s.attr("role","presentation"),t=a(document.createElement("div")),t.addClass("select2-result-label"),t.attr("id","select2-result-label-"+f()),t.attr("role","option"),v=c.formatResult(o,t,g,i.opts.escapeMarkup),v!==b&&(t.html(v),s.append(t)),r&&(u=a("<ul></ul>"),u.addClass("select2-result-sub"),h(o.children,u,l+1),s.append(u)),s.data("select2-data",o),w.push(s[0]);e.append(w),k.text(c.formatMatches(d.length))},h(e,d,0)}},a.fn.select2.defaults,c),"function"!=typeof c.id&&(g=c.id,c.id=function(a){return a[g]}),a.isArray(c.element.data("select2Tags"))){if("tags"in c)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+c.element.attr("id");c.tags=c.element.data("select2Tags")}if(e?(c.query=this.bind(function(a){var f,g,h,c={results:[],more:!1},e=a.term;h=function(b,c){var d;b.is("option")?a.matcher(e,b.text(),b)&&c.push(i.optionToData(b)):b.is("optgroup")&&(d=i.optionToData(b),b.children().each2(function(a,b){h(b,d.children)}),d.children.length>0&&c.push(d))},f=d.children(),this.getPlaceholder()!==b&&f.length>0&&(g=this.getPlaceholderOption(),g&&(f=f.not(g))),f.each2(function(a,b){h(b,c.results)}),a.callback(c)}),c.id=function(a){return a.id}):"query"in c||("ajax"in c?(h=c.element.data("ajax-url"),h&&h.length>0&&(c.ajax.url=h),c.query=G.call(c.element,c.ajax)):"data"in c?c.query=H(c.data):"tags"in c&&(c.query=I(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(b){return{id:a.trim(b),text:a.trim(b)}}),c.initSelection===b&&(c.initSelection=function(b,d){var e=[];a(s(b.val(),c.separator,c.transformVal)).each(function(){var b={id:this,text:this},d=c.tags;a.isFunction(d)&&(d=d()),a(d).each(function(){return r(this.id,b.id)?(b=this,!1):void 0}),e.push(b)}),d(e)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");if("top"===c.createSearchChoicePosition)c.createSearchChoicePosition=function(a,b){a.unshift(b)};else if("bottom"===c.createSearchChoicePosition)c.createSearchChoicePosition=function(a,b){a.push(b)};else if("function"!=typeof c.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return c},monitorSource:function(){var d,c=this.opts.element,e=this;c.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),this._sync=this.bind(function(){var a=c.prop("disabled");a===b&&(a=!1),this.enable(!a);var d=c.prop("readonly");d===b&&(d=!1),this.readonly(d),this.container&&(D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(K(this.opts.containerCssClass,this.opts.element))),this.dropdown&&(D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(this.opts.dropdownCssClass,this.opts.element)))}),c.length&&c[0].attachEvent&&c.each(function(){this.attachEvent("onpropertychange",e._sync)}),d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,d!==b&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new d(function(b){a.each(b,e._sync)}),this.propertyObserver.observe(c.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(b){var c=a.Event("select2-selecting",{val:this.id(b),object:b,choice:b});return this.opts.element.trigger(c),!c.isDefaultPrevented()},triggerChange:function(b){b=b||{},b=a.extend({},b,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(b),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var a=this._enabled&&!this._readonly,b=!a;return a===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",b),this.close(),this.enabledInterface=a,!0)},enable:function(a){a===b&&(a=!0),this._enabled!==a&&(this._enabled=a,this.opts.element.prop("disabled",!a),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(a){a===b&&(a=!1),this._readonly!==a&&(this._readonly=a,this.opts.element.prop("readonly",a),this.enableInterface())},opened:function(){return this.container?this.container.hasClass("select2-dropdown-open"):!1},positionDropdown:function(){var v,w,x,y,z,b=this.dropdown,c=this.container,d=c.offset(),e=c.outerHeight(!1),f=c.outerWidth(!1),g=b.outerHeight(!1),h=a(window),i=h.width(),k=h.height(),l=h.scrollLeft()+i,m=h.scrollTop()+k,n=d.top+e,o=d.left,p=m>=n+g,q=d.top-g>=h.scrollTop(),r=b.outerWidth(!1),s=function(){return l>=o+r},t=function(){return d.left+l+c.outerWidth(!1)>r},u=b.hasClass("select2-drop-above");u?(w=!0,!q&&p&&(x=!0,w=!1)):(w=!1,!p&&q&&(x=!0,w=!0)),x&&(b.hide(),d=this.container.offset(),e=this.container.outerHeight(!1),f=this.container.outerWidth(!1),g=b.outerHeight(!1),l=h.scrollLeft()+i,m=h.scrollTop()+k,n=d.top+e,o=d.left,r=b.outerWidth(!1),b.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(z=a(".select2-results",b)[0],b.addClass("select2-drop-auto-width"),b.css("width",""),r=b.outerWidth(!1)+(z.scrollHeight===z.clientHeight?0:j.width),r>f?f=r:r=f,g=b.outerHeight(!1)):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(v=this.body.offset(),n-=v.top,o-=v.left),!s()&&t()&&(o=d.left+this.container.outerWidth(!1)-r),y={left:o,width:f},w?(y.top=d.top-g,y.bottom="auto",this.container.addClass("select2-drop-above"),b.addClass("select2-drop-above")):(y.top=n,y.bottom="auto",this.container.removeClass("select2-drop-above"),b.removeClass("select2-drop-above")),y=a.extend(y,K(this.opts.dropdownCss,this.opts.element)),b.css(y)},shouldOpen:function(){var b;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(b=a.Event("select2-opening"),this.opts.element.trigger(b),!b.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),i.on("mousemove.select2Event",function(a){h.x=a.pageX,h.y=a.pageY}),!0):!1},opening:function(){var f,b=this.containerEventName,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),f=a("#select2-drop-mask"),0===f.length&&(f=a(document.createElement("div")),f.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),f.hide(),f.appendTo(this.body),f.on("mousedown touchstart click",function(b){n(f);var d,c=a("#select2-drop");c.length>0&&(d=c.data("select2"),d.opts.selectOnBlur&&d.selectHighlighted({noFocus:!0}),d.close(),b.preventDefault(),b.stopPropagation())})),this.dropdown.prev()[0]!==f[0]&&this.dropdown.before(f),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),f.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var g=this;this.container.parents().add(window).each(function(){a(this).on(d+" "+c+" "+e,function(){g.opened()&&g.positionDropdown()})})},close:function(){if(this.opened()){var b=this.containerEventName,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.parents().add(window).each(function(){a(this).off(c).off(d).off(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),i.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("select2-close"))}},externalSearch:function(a){this.open(),this.search.val(a),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return K(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var c,d,e,f,g,h,i,j,b=this.results;if(d=this.highlight(),!(0>d)){if(0==d)return b.scrollTop(0),void 0;c=this.findHighlightableChoices().find(".select2-result-label"),e=a(c[d]),j=(e.offset()||{}).top||0,f=j+e.outerHeight(!0),d===c.length-1&&(i=b.find("li.select2-more-results"),i.length>0&&(f=i.offset().top+i.outerHeight(!0))),g=b.offset().top+b.outerHeight(!1),f>g&&b.scrollTop(b.scrollTop()+(f-g)),h=j-b.offset().top,0>h&&"none"!=e.css("display")&&b.scrollTop(b.scrollTop()+h)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&d<c.length;){d+=b;
|
22 |
+
var e=a(c[d]);if(e.hasClass("select2-result-selectable")&&!e.hasClass("select2-disabled")&&!e.hasClass("select2-selected")){this.highlight(d);break}}},highlight:function(b){var d,e,c=this.findHighlightableChoices();return 0===arguments.length?p(c.filter(".select2-highlighted")[0],c.get()):(b>=c.length&&(b=c.length-1),0>b&&(b=0),this.removeHighlight(),d=a(c[b]),d.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",d.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(d.text()),e=d.data("select2-data"),e&&this.opts.element.trigger({type:"select2-highlight",val:this.id(e),choice:e}),void 0)},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(b){var c=a(b.target).closest(".select2-result-selectable");if(c.length>0&&!c.is(".select2-highlighted")){var d=this.findHighlightableChoices();this.highlight(d.index(c))}else 0==c.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var c,a=this.results,b=a.find("li.select2-more-results"),d=this.resultsPage+1,e=this,f=this.search.val(),g=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-a.height(),c<=this.opts.loadMorePadding&&(b.addClass("select2-active"),this.opts.query({element:this.opts.element,term:f,page:d,context:g,matcher:this.opts.matcher,callback:this.bind(function(c){e.opened()&&(e.opts.populateResults.call(this,a,c.results,{term:f,page:d,context:g}),e.postprocessResults(c,!1,!1),c.more===!0?(b.detach().appendTo(a).html(e.opts.escapeMarkup(K(e.opts.formatLoadMore,e.opts.element,d+1))),window.setTimeout(function(){e.loadMoreIfNeeded()},10)):b.remove(),e.positionDropdown(),e.resultsPage=d,e.context=c.context,this.opts.element.trigger({type:"select2-loaded",items:c}))})})))},tokenize:function(){},updateResults:function(c){function m(){d.removeClass("select2-active"),h.positionDropdown(),e.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?h.liveRegion.text(e.text()):h.liveRegion.text(h.opts.formatMatches(e.find('.select2-result-selectable:not(".select2-selected")').length))}function n(a){e.html(a),m()}var g,i,l,d=this.search,e=this.results,f=this.opts,h=this,j=d.val(),k=a.data(this.container,"select2-last-term");if((c===!0||!k||!r(j,k))&&(a.data(this.container,"select2-last-term",j),c===!0||this.showSearchInput!==!1&&this.opened())){l=++this.queryCount;var o=this.getMaximumSelectionSize();if(o>=1&&(g=this.data(),a.isArray(g)&&g.length>=o&&J(f.formatSelectionTooBig,"formatSelectionTooBig")))return n("<li class='select2-selection-limit'>"+K(f.formatSelectionTooBig,f.element,o)+"</li>"),void 0;if(d.val().length<f.minimumInputLength)return J(f.formatInputTooShort,"formatInputTooShort")?n("<li class='select2-no-results'>"+K(f.formatInputTooShort,f.element,d.val(),f.minimumInputLength)+"</li>"):n(""),c&&this.showSearch&&this.showSearch(!0),void 0;if(f.maximumInputLength&&d.val().length>f.maximumInputLength)return J(f.formatInputTooLong,"formatInputTooLong")?n("<li class='select2-no-results'>"+K(f.formatInputTooLong,f.element,d.val(),f.maximumInputLength)+"</li>"):n(""),void 0;f.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+K(f.formatSearching,f.element)+"</li>"),d.addClass("select2-active"),this.removeHighlight(),i=this.tokenize(),i!=b&&null!=i&&d.val(i),this.resultsPage=1,f.query({element:f.element,term:d.val(),page:this.resultsPage,context:null,matcher:f.matcher,callback:this.bind(function(g){var i;if(l==this.queryCount){if(!this.opened())return this.search.removeClass("select2-active"),void 0;if(g.hasError!==b&&J(f.formatAjaxError,"formatAjaxError"))return n("<li class='select2-ajax-error'>"+K(f.formatAjaxError,f.element,g.jqXHR,g.textStatus,g.errorThrown)+"</li>"),void 0;if(this.context=g.context===b?null:g.context,this.opts.createSearchChoice&&""!==d.val()&&(i=this.opts.createSearchChoice.call(h,d.val(),g.results),i!==b&&null!==i&&h.id(i)!==b&&null!==h.id(i)&&0===a(g.results).filter(function(){return r(h.id(this),h.id(i))}).length&&this.opts.createSearchChoicePosition(g.results,i)),0===g.results.length&&J(f.formatNoMatches,"formatNoMatches"))return n("<li class='select2-no-results'>"+K(f.formatNoMatches,f.element,d.val())+"</li>"),void 0;e.empty(),h.opts.populateResults.call(this,e,g.results,{term:d.val(),page:this.resultsPage,context:null}),g.more===!0&&J(f.formatLoadMore,"formatLoadMore")&&(e.append("<li class='select2-more-results'>"+f.escapeMarkup(K(f.formatLoadMore,f.element,this.resultsPage))+"</li>"),window.setTimeout(function(){h.loadMoreIfNeeded()},10)),this.postprocessResults(g,c),m(),this.opts.element.trigger({type:"select2-loaded",items:g})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){y(this.search)},selectHighlighted:function(a){if(this._touchMoved)return this.clearTouchMoved(),void 0;var b=this.highlight(),c=this.results.find(".select2-highlighted"),d=c.closest(".select2-result").data("select2-data");d?(this.highlight(b),this.onSelect(d,a)):a&&a.noFocus&&this.close()},getPlaceholder:function(){var a;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((a=this.getPlaceholderOption())!==b?a.text():b)},getPlaceholderOption:function(){if(this.select){var c=this.select.children("option").first();if(this.opts.placeholderOption!==b)return"first"===this.opts.placeholderOption&&c||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===a.trim(c.text())&&""===c.val())return c}},initContainerWidth:function(){function c(){var c,d,e,f,g,h;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(c=this.opts.element.attr("style"),c!==b)for(d=c.split(";"),f=0,g=d.length;g>f;f+=1)if(h=d[f].replace(/\s/g,""),e=h.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==e&&e.length>=1)return e[1];return"resolve"===this.opts.width?(c=this.opts.element.css("width"),c.indexOf("%")>0?c:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return a.isFunction(this.opts.width)?this.opts.width():this.opts.width}var d=c.call(this);null!==d&&this.container.css("width",d)}}),d=O(c,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'> </span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'"," aria-autocomplete='list' />"," </div>"," <ul class='select2-results' role='listbox'>"," </ul>","</div>"].join(""));return b},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var c,d,e;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),c=this.search.get(0),c.createTextRange?(d=c.createTextRange(),d.collapse(!1),d.select()):c.setSelectionRange&&(e=this.search.val().length,c.setSelectionRange(e,e))),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){a("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),N.call(this,"selection","focusser")},initContainer:function(){var b,g,c=this.container,d=this.dropdown,e=f();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=b=c.find(".select2-choice"),this.focusser=c.find(".select2-focusser"),b.find(".select2-chosen").attr("id","select2-chosen-"+e),this.focusser.attr("aria-labelledby","select2-chosen-"+e),this.results.attr("id","select2-results-"+e),this.search.attr("aria-owns","select2-results-"+e),this.focusser.attr("id","s2id_autogen"+e),g=a("label[for='"+this.opts.element.attr("id")+"']"),this.opts.element.focus(this.bind(function(){this.focus()})),this.focusser.prev().text(g.text()).attr("for",this.focusser.attr("id"));var h=this.opts.element.attr("title");this.opts.element.attr("title",h||g.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(a("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&229!=a.keyCode){if(a.which===k.PAGE_UP||a.which===k.PAGE_DOWN)return A(a),void 0;switch(a.which){case k.UP:case k.DOWN:return this.moveHighlight(a.which===k.UP?-1:1),A(a),void 0;case k.ENTER:return this.selectHighlighted(),A(a),void 0;case k.TAB:return this.selectHighlighted({noFocus:!0}),void 0;case k.ESC:return this.cancel(a),A(a),void 0}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&a.which!==k.TAB&&!k.isControl(a)&&!k.isFunctionKey(a)&&a.which!==k.ESC){if(this.opts.openOnEnter===!1&&a.which===k.ENTER)return A(a),void 0;if(a.which==k.DOWN||a.which==k.UP||a.which==k.ENTER&&this.opts.openOnEnter){if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return;return this.open(),A(a),void 0}return a.which==k.DELETE||a.which==k.BACKSPACE?(this.opts.allowClear&&this.clear(),A(a),void 0):void 0}})),u(this.focusser),this.focusser.on("keyup-change input",this.bind(function(a){if(this.opts.minimumResultsForSearch>=0){if(a.stopPropagation(),this.opened())return;this.open()}})),b.on("mousedown touchstart","abbr",this.bind(function(a){this.isInterfaceEnabled()&&(this.clear(),B(a),this.close(),this.selection&&this.selection.focus())})),b.on("mousedown touchstart",this.bind(function(c){n(b),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),A(c)})),d.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),b.on("focus",this.bind(function(a){A(a)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(a.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.hide(),this.setPlaceholder()},clear:function(b){var c=this.selection.data("select2-data");if(c){var d=a.Event("select2-clearing");if(this.opts.element.trigger(d),d.isDefaultPrevented())return;var e=this.getPlaceholderOption();this.opts.element.val(e?e.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),b!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.setPlaceholder(),c.nextSearchTerm=c.opts.nextSearchTerm(a,c.search.val()))})}},isPlaceholderOptionSelected:function(){var a;return this.getPlaceholder()===b?!1:(a=this.getPlaceholderOption())!==b&&a.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val()},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=a.find("option").filter(function(){return this.selected&&!this.disabled});b(c.optionToData(d))}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),f=null;b.query({matcher:function(a,c,d){var g=r(e,b.id(d));return g&&(f=d),g},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&a!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(a,b,c){var d=0,e=this;if(this.findHighlightableChoices().each2(function(a,b){return r(e.id(b.data("select2-data")),e.opts.element.val())?(d=a,!1):void 0}),c!==!1&&(b===!0&&d>=0?this.highlight(d):this.highlight(0)),b===!0){var g=this.opts.minimumResultsForSearch;g>=0&&this.showSearch(L(a.results)>=g)}},showSearch:function(b){this.showSearchInput!==b&&(this.showSearchInput=b,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!b),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!b),a(this.dropdown,this.container).toggleClass("select2-with-searchbox",b))},onSelect:function(a,b){if(this.triggerSelect(a)){var c=this.opts.element.val(),d=this.data();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"select2-selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.close(),b&&b.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),r(c,this.id(a))||this.triggerChange({added:a,removed:d})}},updateSelection:function(a){var d,e,c=this.selection.find(".select2-chosen");this.selection.data("select2-data",a),c.empty(),null!==a&&(d=this.opts.formatSelection(a,c,this.opts.escapeMarkup)),d!==b&&c.append(d),e=this.opts.formatSelectionCssClass(a,c),e!==b&&c.addClass(e),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var a,c=!1,d=null,e=this,f=this.data();if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find("option").filter(function(){return this.selected}).each2(function(a,b){return d=e.optionToData(b),!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange({added:d,removed:f});else{if(!a&&0!==a)return this.clear(c),void 0;if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange({added:a,removed:f})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c,d=!1;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):(arguments.length>1&&(d=arguments[1]),a?(c=this.data(),this.opts.element.val(a?this.id(a):""),this.updateSelection(a),d&&this.triggerChange({added:a,removed:c})):this.clear(d),void 0)}}),e=O(c,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=[];a.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(a,b){d.push(c.optionToData(b))}),b(d)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=s(c.val(),b.separator,b.transformVal),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return r(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){for(var a=[],c=0;c<e.length;c++)for(var g=e[c],h=0;h<f.length;h++){var i=f[h];if(r(g,b.id(i))){a.push(i),f.splice(h,1);break}}d(a)}:a.noop})}),b},selectChoice:function(a){var b=this.container.find(".select2-search-choice-focus");b.length&&a&&a[0]==b[0]||(b.length&&this.opts.element.trigger("choice-deselected",b),b.removeClass("select2-search-choice-focus"),a&&a.length&&(this.close(),a.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",a)))},destroy:function(){a("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),N.call(this,"searchContainer","selection")},initContainer:function(){var c,b=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=c=this.container.find(b);var d=this;this.selection.on("click",".select2-container:not(.select2-container-disabled) .select2-search-choice:not(.select2-locked)",function(){d.search[0].focus(),d.selectChoice(a(this))}),this.search.attr("id","s2id_autogen"+f()),this.search.prev().text(a("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.opts.element.focus(this.bind(function(){this.focus()})),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){++this.keydowns;var b=c.find(".select2-search-choice-focus"),d=b.prev(".select2-search-choice:not(.select2-locked)"),e=b.next(".select2-search-choice:not(.select2-locked)"),f=z(this.search);if(b.length&&(a.which==k.LEFT||a.which==k.RIGHT||a.which==k.BACKSPACE||a.which==k.DELETE||a.which==k.ENTER)){var g=b;return a.which==k.LEFT&&d.length?g=d:a.which==k.RIGHT?g=e.length?e:null:a.which===k.BACKSPACE?this.unselect(b.first())&&(this.search.width(10),g=d.length?d:e):a.which==k.DELETE?this.unselect(b.first())&&(this.search.width(10),g=e.length?e:null):a.which==k.ENTER&&(g=null),this.selectChoice(g),A(a),g&&g.length||this.open(),void 0}if((a.which===k.BACKSPACE&&1==this.keydowns||a.which==k.LEFT)&&0==f.offset&&!f.length)return this.selectChoice(c.find(".select2-search-choice:not(.select2-locked)").last()),A(a),void 0;if(this.selectChoice(null),this.opened())switch(a.which){case k.UP:case k.DOWN:return this.moveHighlight(a.which===k.UP?-1:1),A(a),void 0;case k.ENTER:return this.selectHighlighted(),A(a),void 0;case k.TAB:return this.selectHighlighted({noFocus:!0}),this.close(),void 0;case k.ESC:return this.cancel(a),A(a),void 0}if(a.which!==k.TAB&&!k.isControl(a)&&!k.isFunctionKey(a)&&a.which!==k.BACKSPACE&&a.which!==k.ESC){if(a.which===k.ENTER){if(this.opts.openOnEnter===!1)return;if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return}this.open(),(a.which===k.PAGE_UP||a.which===k.PAGE_DOWN)&&A(a),a.which===k.ENTER&&A(a)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(b){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),b.stopImmediatePropagation(),this.opts.element.trigger(a.Event("select2-blur"))})),this.container.on("click",b,this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.on("focus",b,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.hide(),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder(),c=this.getMaxSearchWidth();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(c>0?c:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],d=[],e=this;a(b).each(function(){p(e.id(this),c)<0&&(c.push(e.id(this)),d.push(this))}),b=d,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){e.addSelectedChoice(this)}),e.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer.call(this,a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,c){this.triggerSelect(a)&&""!==a.text&&(this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(a,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),c&&c.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var j,k,d=!c.locked,e=a("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),f=a("<li class='select2-search-choice select2-locked'><div></div></li>"),g=d?e:f,h=this.id(c),i=this.getVal();j=this.opts.formatSelection(c,g.find("div"),this.opts.escapeMarkup),j!=b&&g.find("div").replaceWith(a("<div></div>").html(j)),k=this.opts.formatSelectionCssClass(c,g.find("div")),k!=b&&g.addClass(k),d&&g.find(".select2-search-choice-close").on("mousedown",A).on("click dblclick",this.bind(function(b){this.isInterfaceEnabled()&&(this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),A(b),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),g.data("select2-data",c),g.insertBefore(this.searchContainer),i.push(h),this.setVal(i)},unselect:function(b){var d,e,c=this.getVal();if(b=b.closest(".select2-search-choice"),0===b.length)throw"Invalid argument: "+b+". Must be .select2-search-choice";if(d=b.data("select2-data")){var f=a.Event("select2-removing");if(f.val=this.id(d),f.choice=d,this.opts.element.trigger(f),f.isDefaultPrevented())return!1;for(;(e=p(this.id(d),c))>=0;)c.splice(e,1),this.setVal(c),this.select&&this.postprocessResults();return b.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(d),choice:d}),this.triggerChange({removed:d}),!0}},postprocessResults:function(a,b,c){var d=this.getVal(),e=this.results.find(".select2-result"),f=this.results.find(".select2-result-with-children"),g=this;e.each2(function(a,b){var c=g.id(b.data("select2-data"));p(c,d)>=0&&(b.addClass("select2-selected"),b.find(".select2-result-selectable").addClass("select2-selected"))}),f.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&c!==!1&&this.opts.closeOnSelect===!0&&g.highlight(0),!this.opts.createSearchChoice&&!e.filter(".select2-result:not(.select2-selected)").length>0&&(!a||a&&!a.more&&0===this.results.find(".select2-no-results").length)&&J(g.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+K(g.opts.formatNoMatches,g.opts.element,g.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-t(this.search)},resizeSearch:function(){var a,b,c,d,e,f=t(this.search);a=C(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(Math.floor(e))},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),s(a,this.opts.separator,this.opts.transformVal))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){p(this,c)<0&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},buildChangeDetails:function(a,b){for(var b=b.slice(0),a=a.slice(0),c=0;c<b.length;c++)for(var d=0;d<a.length;d++)r(this.opts.id(b[c]),this.opts.id(a[d]))&&(b.splice(c,1),c>0&&c--,a.splice(d,1),d--);return{added:b,removed:a}},val:function(c,d){var e,f=this;if(0===arguments.length)return this.getVal();if(e=this.data(),e.length||(e=[]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),d&&this.triggerChange({added:this.data(),removed:e}),void 0;if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange(this.buildChangeDetails(e,this.data()));else{if(this.opts.initSelection===b)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a.map(b,f.id);f.setVal(c),f.updateSelection(b),f.clearSearch(),d&&f.triggerChange(f.buildChangeDetails(e,f.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(b,c){var e,f,d=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(f=this.data(),b||(b=[]),e=a.map(b,function(a){return d.opts.id(a)}),this.setVal(e),this.updateSelection(b),this.clearSearch(),c&&this.triggerChange(this.buildChangeDetails(f,this.data())),void 0)}}),a.fn.select2=function(){var d,e,f,g,h,c=Array.prototype.slice.call(arguments,0),i=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],j=["opened","isFocused","container","dropdown"],k=["val","data"],l={search:"externalSearch"};return this.each(function(){if(0===c.length||"object"==typeof c[0])d=0===c.length?{}:a.extend({},c[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?h=d.element.prop("multiple"):(h=d.multiple||!1,"tags"in d&&(d.multiple=h=!0)),e=h?new window.Select2["class"].multi:new window.Select2["class"].single,e.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(p(c[0],i)<0)throw"Unknown method: "+c[0];if(g=b,e=a(this).data("select2"),e===b)return;if(f=c[0],"container"===f?g=e.container:"dropdown"===f?g=e.dropdown:(l[f]&&(f=l[f]),g=e[f].apply(e,c.slice(1))),p(c[0],j)>=0||p(c[0],k)>=0&&1==c.length)return!1}}),g===b?this:g},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return E(this.text(a),c.term,e,d),e.join("")},transformVal:function(b){return a.trim(b)},formatSelection:function(a,c,d){return a?d(this.text(a)):b},sortResults:function(a){return a},formatResultCssClass:function(a){return a.css},formatSelectionCssClass:function(){return b},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a==b?null:a.id},text:function(b){return b&&this.data&&this.data.text?a.isFunction(this.data.text)?this.data.text(b):b[this.data.text]:b.text
|
23 |
+
},matcher:function(a,b){return o(""+b).toUpperCase().indexOf(o(""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:F,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return b},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(a){var b="ontouchstart"in window||navigator.msMaxTouchPoints>0;return b?a.opts.minimumResultsForSearch<0?!1:!0:!0}},a.fn.select2.locales=[],a.fn.select2.locales.en={formatMatches:function(a){return 1===a?"One result is available, press enter to select it.":a+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatAjaxError:function(){return"Loading failed"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" or more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results\u2026"},formatSearching:function(){return"Searching\u2026"}},a.extend(a.fn.select2.defaults,a.fn.select2.locales.en),a.fn.select2.ajaxDefaults={transport:a.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:G,local:H,tags:I},util:{debounce:w,markMatch:E,escapeMarkup:F,stripDiacritics:o},"class":{"abstract":c,single:d,multi:e}}}}(jQuery);
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2.png
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/3/select2x2.png
ADDED
Binary file
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.css
ADDED
@@ -0,0 +1,484 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.select2-container {
|
2 |
+
box-sizing: border-box;
|
3 |
+
display: inline-block;
|
4 |
+
margin: 0;
|
5 |
+
position: relative;
|
6 |
+
vertical-align: middle; }
|
7 |
+
.select2-container .select2-selection--single {
|
8 |
+
box-sizing: border-box;
|
9 |
+
cursor: pointer;
|
10 |
+
display: block;
|
11 |
+
height: 28px;
|
12 |
+
user-select: none;
|
13 |
+
-webkit-user-select: none; }
|
14 |
+
.select2-container .select2-selection--single .select2-selection__rendered {
|
15 |
+
display: block;
|
16 |
+
padding-left: 8px;
|
17 |
+
padding-right: 20px;
|
18 |
+
overflow: hidden;
|
19 |
+
text-overflow: ellipsis;
|
20 |
+
white-space: nowrap; }
|
21 |
+
.select2-container .select2-selection--single .select2-selection__clear {
|
22 |
+
position: relative; }
|
23 |
+
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
24 |
+
padding-right: 8px;
|
25 |
+
padding-left: 20px; }
|
26 |
+
.select2-container .select2-selection--multiple {
|
27 |
+
box-sizing: border-box;
|
28 |
+
cursor: pointer;
|
29 |
+
display: block;
|
30 |
+
min-height: 32px;
|
31 |
+
user-select: none;
|
32 |
+
-webkit-user-select: none; }
|
33 |
+
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
34 |
+
display: inline-block;
|
35 |
+
overflow: hidden;
|
36 |
+
padding-left: 8px;
|
37 |
+
text-overflow: ellipsis;
|
38 |
+
white-space: nowrap; }
|
39 |
+
.select2-container .select2-search--inline {
|
40 |
+
float: left; }
|
41 |
+
.select2-container .select2-search--inline .select2-search__field {
|
42 |
+
box-sizing: border-box;
|
43 |
+
border: none;
|
44 |
+
font-size: 100%;
|
45 |
+
margin-top: 5px;
|
46 |
+
padding: 0; }
|
47 |
+
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
48 |
+
-webkit-appearance: none; }
|
49 |
+
|
50 |
+
.select2-dropdown {
|
51 |
+
background-color: white;
|
52 |
+
border: 1px solid #aaa;
|
53 |
+
border-radius: 4px;
|
54 |
+
box-sizing: border-box;
|
55 |
+
display: block;
|
56 |
+
position: absolute;
|
57 |
+
left: -100000px;
|
58 |
+
width: 100%;
|
59 |
+
z-index: 1051; }
|
60 |
+
|
61 |
+
.select2-results {
|
62 |
+
display: block; }
|
63 |
+
|
64 |
+
.select2-results__options {
|
65 |
+
list-style: none;
|
66 |
+
margin: 0;
|
67 |
+
padding: 0; }
|
68 |
+
|
69 |
+
.select2-results__option {
|
70 |
+
padding: 6px;
|
71 |
+
user-select: none;
|
72 |
+
-webkit-user-select: none; }
|
73 |
+
.select2-results__option[aria-selected] {
|
74 |
+
cursor: pointer; }
|
75 |
+
|
76 |
+
.select2-container--open .select2-dropdown {
|
77 |
+
left: 0; }
|
78 |
+
|
79 |
+
.select2-container--open .select2-dropdown--above {
|
80 |
+
border-bottom: none;
|
81 |
+
border-bottom-left-radius: 0;
|
82 |
+
border-bottom-right-radius: 0; }
|
83 |
+
|
84 |
+
.select2-container--open .select2-dropdown--below {
|
85 |
+
border-top: none;
|
86 |
+
border-top-left-radius: 0;
|
87 |
+
border-top-right-radius: 0; }
|
88 |
+
|
89 |
+
.select2-search--dropdown {
|
90 |
+
display: block;
|
91 |
+
padding: 4px; }
|
92 |
+
.select2-search--dropdown .select2-search__field {
|
93 |
+
padding: 4px;
|
94 |
+
width: 100%;
|
95 |
+
box-sizing: border-box; }
|
96 |
+
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
97 |
+
-webkit-appearance: none; }
|
98 |
+
.select2-search--dropdown.select2-search--hide {
|
99 |
+
display: none; }
|
100 |
+
|
101 |
+
.select2-close-mask {
|
102 |
+
border: 0;
|
103 |
+
margin: 0;
|
104 |
+
padding: 0;
|
105 |
+
display: block;
|
106 |
+
position: fixed;
|
107 |
+
left: 0;
|
108 |
+
top: 0;
|
109 |
+
min-height: 100%;
|
110 |
+
min-width: 100%;
|
111 |
+
height: auto;
|
112 |
+
width: auto;
|
113 |
+
opacity: 0;
|
114 |
+
z-index: 99;
|
115 |
+
background-color: #fff;
|
116 |
+
filter: alpha(opacity=0); }
|
117 |
+
|
118 |
+
.select2-hidden-accessible {
|
119 |
+
border: 0 !important;
|
120 |
+
clip: rect(0 0 0 0) !important;
|
121 |
+
height: 1px !important;
|
122 |
+
margin: -1px !important;
|
123 |
+
overflow: hidden !important;
|
124 |
+
padding: 0 !important;
|
125 |
+
position: absolute !important;
|
126 |
+
width: 1px !important; }
|
127 |
+
|
128 |
+
.select2-container--default .select2-selection--single {
|
129 |
+
background-color: #fff;
|
130 |
+
border: 1px solid #aaa;
|
131 |
+
border-radius: 4px; }
|
132 |
+
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
133 |
+
color: #444;
|
134 |
+
line-height: 28px; }
|
135 |
+
.select2-container--default .select2-selection--single .select2-selection__clear {
|
136 |
+
cursor: pointer;
|
137 |
+
float: right;
|
138 |
+
font-weight: bold; }
|
139 |
+
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
140 |
+
color: #999; }
|
141 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
142 |
+
height: 26px;
|
143 |
+
position: absolute;
|
144 |
+
top: 1px;
|
145 |
+
right: 1px;
|
146 |
+
width: 20px; }
|
147 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
148 |
+
border-color: #888 transparent transparent transparent;
|
149 |
+
border-style: solid;
|
150 |
+
border-width: 5px 4px 0 4px;
|
151 |
+
height: 0;
|
152 |
+
left: 50%;
|
153 |
+
margin-left: -4px;
|
154 |
+
margin-top: -2px;
|
155 |
+
position: absolute;
|
156 |
+
top: 50%;
|
157 |
+
width: 0; }
|
158 |
+
|
159 |
+
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
160 |
+
float: left; }
|
161 |
+
|
162 |
+
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
163 |
+
left: 1px;
|
164 |
+
right: auto; }
|
165 |
+
|
166 |
+
.select2-container--default.select2-container--disabled .select2-selection--single {
|
167 |
+
background-color: #eee;
|
168 |
+
cursor: default; }
|
169 |
+
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
170 |
+
display: none; }
|
171 |
+
|
172 |
+
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
173 |
+
border-color: transparent transparent #888 transparent;
|
174 |
+
border-width: 0 4px 5px 4px; }
|
175 |
+
|
176 |
+
.select2-container--default .select2-selection--multiple {
|
177 |
+
background-color: white;
|
178 |
+
border: 1px solid #aaa;
|
179 |
+
border-radius: 4px;
|
180 |
+
cursor: text; }
|
181 |
+
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
182 |
+
box-sizing: border-box;
|
183 |
+
list-style: none;
|
184 |
+
margin: 0;
|
185 |
+
padding: 0 5px;
|
186 |
+
width: 100%; }
|
187 |
+
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
188 |
+
list-style: none; }
|
189 |
+
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
190 |
+
color: #999;
|
191 |
+
margin-top: 5px;
|
192 |
+
float: left; }
|
193 |
+
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
194 |
+
cursor: pointer;
|
195 |
+
float: right;
|
196 |
+
font-weight: bold;
|
197 |
+
margin-top: 5px;
|
198 |
+
margin-right: 10px; }
|
199 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
200 |
+
background-color: #e4e4e4;
|
201 |
+
border: 1px solid #aaa;
|
202 |
+
border-radius: 4px;
|
203 |
+
cursor: default;
|
204 |
+
float: left;
|
205 |
+
margin-right: 5px;
|
206 |
+
margin-top: 5px;
|
207 |
+
padding: 0 5px; }
|
208 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
209 |
+
color: #999;
|
210 |
+
cursor: pointer;
|
211 |
+
display: inline-block;
|
212 |
+
font-weight: bold;
|
213 |
+
margin-right: 2px; }
|
214 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
215 |
+
color: #333; }
|
216 |
+
|
217 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
218 |
+
float: right; }
|
219 |
+
|
220 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
221 |
+
margin-left: 5px;
|
222 |
+
margin-right: auto; }
|
223 |
+
|
224 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
225 |
+
margin-left: 2px;
|
226 |
+
margin-right: auto; }
|
227 |
+
|
228 |
+
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
229 |
+
border: solid black 1px;
|
230 |
+
outline: 0; }
|
231 |
+
|
232 |
+
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
233 |
+
background-color: #eee;
|
234 |
+
cursor: default; }
|
235 |
+
|
236 |
+
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
237 |
+
display: none; }
|
238 |
+
|
239 |
+
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
240 |
+
border-top-left-radius: 0;
|
241 |
+
border-top-right-radius: 0; }
|
242 |
+
|
243 |
+
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
244 |
+
border-bottom-left-radius: 0;
|
245 |
+
border-bottom-right-radius: 0; }
|
246 |
+
|
247 |
+
.select2-container--default .select2-search--dropdown .select2-search__field {
|
248 |
+
border: 1px solid #aaa; }
|
249 |
+
|
250 |
+
.select2-container--default .select2-search--inline .select2-search__field {
|
251 |
+
background: transparent;
|
252 |
+
border: none;
|
253 |
+
outline: 0;
|
254 |
+
box-shadow: none;
|
255 |
+
-webkit-appearance: textfield; }
|
256 |
+
|
257 |
+
.select2-container--default .select2-results > .select2-results__options {
|
258 |
+
max-height: 200px;
|
259 |
+
overflow-y: auto; }
|
260 |
+
|
261 |
+
.select2-container--default .select2-results__option[role=group] {
|
262 |
+
padding: 0; }
|
263 |
+
|
264 |
+
.select2-container--default .select2-results__option[aria-disabled=true] {
|
265 |
+
color: #999; }
|
266 |
+
|
267 |
+
.select2-container--default .select2-results__option[aria-selected=true] {
|
268 |
+
background-color: #ddd; }
|
269 |
+
|
270 |
+
.select2-container--default .select2-results__option .select2-results__option {
|
271 |
+
padding-left: 1em; }
|
272 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
273 |
+
padding-left: 0; }
|
274 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
275 |
+
margin-left: -1em;
|
276 |
+
padding-left: 2em; }
|
277 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
278 |
+
margin-left: -2em;
|
279 |
+
padding-left: 3em; }
|
280 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
281 |
+
margin-left: -3em;
|
282 |
+
padding-left: 4em; }
|
283 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
284 |
+
margin-left: -4em;
|
285 |
+
padding-left: 5em; }
|
286 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
287 |
+
margin-left: -5em;
|
288 |
+
padding-left: 6em; }
|
289 |
+
|
290 |
+
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
291 |
+
background-color: #5897fb;
|
292 |
+
color: white; }
|
293 |
+
|
294 |
+
.select2-container--default .select2-results__group {
|
295 |
+
cursor: default;
|
296 |
+
display: block;
|
297 |
+
padding: 6px; }
|
298 |
+
|
299 |
+
.select2-container--classic .select2-selection--single {
|
300 |
+
background-color: #f7f7f7;
|
301 |
+
border: 1px solid #aaa;
|
302 |
+
border-radius: 4px;
|
303 |
+
outline: 0;
|
304 |
+
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
305 |
+
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
306 |
+
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
307 |
+
background-repeat: repeat-x;
|
308 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
309 |
+
.select2-container--classic .select2-selection--single:focus {
|
310 |
+
border: 1px solid #5897fb; }
|
311 |
+
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
312 |
+
color: #444;
|
313 |
+
line-height: 28px; }
|
314 |
+
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
315 |
+
cursor: pointer;
|
316 |
+
float: right;
|
317 |
+
font-weight: bold;
|
318 |
+
margin-right: 10px; }
|
319 |
+
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
320 |
+
color: #999; }
|
321 |
+
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
322 |
+
background-color: #ddd;
|
323 |
+
border: none;
|
324 |
+
border-left: 1px solid #aaa;
|
325 |
+
border-top-right-radius: 4px;
|
326 |
+
border-bottom-right-radius: 4px;
|
327 |
+
height: 26px;
|
328 |
+
position: absolute;
|
329 |
+
top: 1px;
|
330 |
+
right: 1px;
|
331 |
+
width: 20px;
|
332 |
+
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
333 |
+
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
334 |
+
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
335 |
+
background-repeat: repeat-x;
|
336 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
|
337 |
+
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
338 |
+
border-color: #888 transparent transparent transparent;
|
339 |
+
border-style: solid;
|
340 |
+
border-width: 5px 4px 0 4px;
|
341 |
+
height: 0;
|
342 |
+
left: 50%;
|
343 |
+
margin-left: -4px;
|
344 |
+
margin-top: -2px;
|
345 |
+
position: absolute;
|
346 |
+
top: 50%;
|
347 |
+
width: 0; }
|
348 |
+
|
349 |
+
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
350 |
+
float: left; }
|
351 |
+
|
352 |
+
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
353 |
+
border: none;
|
354 |
+
border-right: 1px solid #aaa;
|
355 |
+
border-radius: 0;
|
356 |
+
border-top-left-radius: 4px;
|
357 |
+
border-bottom-left-radius: 4px;
|
358 |
+
left: 1px;
|
359 |
+
right: auto; }
|
360 |
+
|
361 |
+
.select2-container--classic.select2-container--open .select2-selection--single {
|
362 |
+
border: 1px solid #5897fb; }
|
363 |
+
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
364 |
+
background: transparent;
|
365 |
+
border: none; }
|
366 |
+
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
367 |
+
border-color: transparent transparent #888 transparent;
|
368 |
+
border-width: 0 4px 5px 4px; }
|
369 |
+
|
370 |
+
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
371 |
+
border-top: none;
|
372 |
+
border-top-left-radius: 0;
|
373 |
+
border-top-right-radius: 0;
|
374 |
+
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
375 |
+
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
376 |
+
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
377 |
+
background-repeat: repeat-x;
|
378 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
379 |
+
|
380 |
+
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
381 |
+
border-bottom: none;
|
382 |
+
border-bottom-left-radius: 0;
|
383 |
+
border-bottom-right-radius: 0;
|
384 |
+
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
385 |
+
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
386 |
+
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
387 |
+
background-repeat: repeat-x;
|
388 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
389 |
+
|
390 |
+
.select2-container--classic .select2-selection--multiple {
|
391 |
+
background-color: white;
|
392 |
+
border: 1px solid #aaa;
|
393 |
+
border-radius: 4px;
|
394 |
+
cursor: text;
|
395 |
+
outline: 0; }
|
396 |
+
.select2-container--classic .select2-selection--multiple:focus {
|
397 |
+
border: 1px solid #5897fb; }
|
398 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
399 |
+
list-style: none;
|
400 |
+
margin: 0;
|
401 |
+
padding: 0 5px; }
|
402 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
403 |
+
display: none; }
|
404 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
405 |
+
background-color: #e4e4e4;
|
406 |
+
border: 1px solid #aaa;
|
407 |
+
border-radius: 4px;
|
408 |
+
cursor: default;
|
409 |
+
float: left;
|
410 |
+
margin-right: 5px;
|
411 |
+
margin-top: 5px;
|
412 |
+
padding: 0 5px; }
|
413 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
414 |
+
color: #888;
|
415 |
+
cursor: pointer;
|
416 |
+
display: inline-block;
|
417 |
+
font-weight: bold;
|
418 |
+
margin-right: 2px; }
|
419 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
420 |
+
color: #555; }
|
421 |
+
|
422 |
+
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
423 |
+
float: right; }
|
424 |
+
|
425 |
+
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
426 |
+
margin-left: 5px;
|
427 |
+
margin-right: auto; }
|
428 |
+
|
429 |
+
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
430 |
+
margin-left: 2px;
|
431 |
+
margin-right: auto; }
|
432 |
+
|
433 |
+
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
434 |
+
border: 1px solid #5897fb; }
|
435 |
+
|
436 |
+
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
437 |
+
border-top: none;
|
438 |
+
border-top-left-radius: 0;
|
439 |
+
border-top-right-radius: 0; }
|
440 |
+
|
441 |
+
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
442 |
+
border-bottom: none;
|
443 |
+
border-bottom-left-radius: 0;
|
444 |
+
border-bottom-right-radius: 0; }
|
445 |
+
|
446 |
+
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
447 |
+
border: 1px solid #aaa;
|
448 |
+
outline: 0; }
|
449 |
+
|
450 |
+
.select2-container--classic .select2-search--inline .select2-search__field {
|
451 |
+
outline: 0;
|
452 |
+
box-shadow: none; }
|
453 |
+
|
454 |
+
.select2-container--classic .select2-dropdown {
|
455 |
+
background-color: white;
|
456 |
+
border: 1px solid transparent; }
|
457 |
+
|
458 |
+
.select2-container--classic .select2-dropdown--above {
|
459 |
+
border-bottom: none; }
|
460 |
+
|
461 |
+
.select2-container--classic .select2-dropdown--below {
|
462 |
+
border-top: none; }
|
463 |
+
|
464 |
+
.select2-container--classic .select2-results > .select2-results__options {
|
465 |
+
max-height: 200px;
|
466 |
+
overflow-y: auto; }
|
467 |
+
|
468 |
+
.select2-container--classic .select2-results__option[role=group] {
|
469 |
+
padding: 0; }
|
470 |
+
|
471 |
+
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
472 |
+
color: grey; }
|
473 |
+
|
474 |
+
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
475 |
+
background-color: #3875d7;
|
476 |
+
color: white; }
|
477 |
+
|
478 |
+
.select2-container--classic .select2-results__group {
|
479 |
+
cursor: default;
|
480 |
+
display: block;
|
481 |
+
padding: 6px; }
|
482 |
+
|
483 |
+
.select2-container--classic.select2-container--open .select2-dropdown {
|
484 |
+
border-color: #5897fb; }
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.full.js
ADDED
@@ -0,0 +1,6436 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Select2 4.0.3
|
3 |
+
* https://select2.github.io
|
4 |
+
*
|
5 |
+
* Released under the MIT license
|
6 |
+
* https://github.com/select2/select2/blob/master/LICENSE.md
|
7 |
+
*/
|
8 |
+
(function (factory) {
|
9 |
+
if (typeof define === 'function' && define.amd) {
|
10 |
+
// AMD. Register as an anonymous module.
|
11 |
+
define(['jquery'], factory);
|
12 |
+
} else if (typeof exports === 'object') {
|
13 |
+
// Node/CommonJS
|
14 |
+
factory(require('jquery'));
|
15 |
+
} else {
|
16 |
+
// Browser globals
|
17 |
+
factory(jQuery);
|
18 |
+
}
|
19 |
+
}(function (jQuery) {
|
20 |
+
// This is needed so we can catch the AMD loader configuration and use it
|
21 |
+
// The inner file should be wrapped (by `banner.start.js`) in a function that
|
22 |
+
// returns the AMD loader references.
|
23 |
+
var S2 =
|
24 |
+
(function () {
|
25 |
+
// Restore the Select2 AMD loader so it can be used
|
26 |
+
// Needed mostly in the language files, where the loader is not inserted
|
27 |
+
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
|
28 |
+
var S2 = jQuery.fn.select2.amd;
|
29 |
+
}
|
30 |
+
var S2;(function () { if (!S2 || !S2.requirejs) {
|
31 |
+
if (!S2) { S2 = {}; } else { require = S2; }
|
32 |
+
/**
|
33 |
+
* @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
|
34 |
+
* Available via the MIT or new BSD license.
|
35 |
+
* see: http://github.com/jrburke/almond for details
|
36 |
+
*/
|
37 |
+
//Going sloppy to avoid 'use strict' string cost, but strict practices should
|
38 |
+
//be followed.
|
39 |
+
/*jslint sloppy: true */
|
40 |
+
/*global setTimeout: false */
|
41 |
+
|
42 |
+
var requirejs, require, define;
|
43 |
+
(function (undef) {
|
44 |
+
var main, req, makeMap, handlers,
|
45 |
+
defined = {},
|
46 |
+
waiting = {},
|
47 |
+
config = {},
|
48 |
+
defining = {},
|
49 |
+
hasOwn = Object.prototype.hasOwnProperty,
|
50 |
+
aps = [].slice,
|
51 |
+
jsSuffixRegExp = /\.js$/;
|
52 |
+
|
53 |
+
function hasProp(obj, prop) {
|
54 |
+
return hasOwn.call(obj, prop);
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Given a relative module name, like ./something, normalize it to
|
59 |
+
* a real name that can be mapped to a path.
|
60 |
+
* @param {String} name the relative name
|
61 |
+
* @param {String} baseName a real name that the name arg is relative
|
62 |
+
* to.
|
63 |
+
* @returns {String} normalized name
|
64 |
+
*/
|
65 |
+
function normalize(name, baseName) {
|
66 |
+
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
|
67 |
+
foundI, foundStarMap, starI, i, j, part,
|
68 |
+
baseParts = baseName && baseName.split("/"),
|
69 |
+
map = config.map,
|
70 |
+
starMap = (map && map['*']) || {};
|
71 |
+
|
72 |
+
//Adjust any relative paths.
|
73 |
+
if (name && name.charAt(0) === ".") {
|
74 |
+
//If have a base name, try to normalize against it,
|
75 |
+
//otherwise, assume it is a top-level require that will
|
76 |
+
//be relative to baseUrl in the end.
|
77 |
+
if (baseName) {
|
78 |
+
name = name.split('/');
|
79 |
+
lastIndex = name.length - 1;
|
80 |
+
|
81 |
+
// Node .js allowance:
|
82 |
+
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
|
83 |
+
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
|
84 |
+
}
|
85 |
+
|
86 |
+
//Lop off the last part of baseParts, so that . matches the
|
87 |
+
//"directory" and not name of the baseName's module. For instance,
|
88 |
+
//baseName of "one/two/three", maps to "one/two/three.js", but we
|
89 |
+
//want the directory, "one/two" for this normalization.
|
90 |
+
name = baseParts.slice(0, baseParts.length - 1).concat(name);
|
91 |
+
|
92 |
+
//start trimDots
|
93 |
+
for (i = 0; i < name.length; i += 1) {
|
94 |
+
part = name[i];
|
95 |
+
if (part === ".") {
|
96 |
+
name.splice(i, 1);
|
97 |
+
i -= 1;
|
98 |
+
} else if (part === "..") {
|
99 |
+
if (i === 1 && (name[2] === '..' || name[0] === '..')) {
|
100 |
+
//End of the line. Keep at least one non-dot
|
101 |
+
//path segment at the front so it can be mapped
|
102 |
+
//correctly to disk. Otherwise, there is likely
|
103 |
+
//no path mapping for a path starting with '..'.
|
104 |
+
//This can still fail, but catches the most reasonable
|
105 |
+
//uses of ..
|
106 |
+
break;
|
107 |
+
} else if (i > 0) {
|
108 |
+
name.splice(i - 1, 2);
|
109 |
+
i -= 2;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
//end trimDots
|
114 |
+
|
115 |
+
name = name.join("/");
|
116 |
+
} else if (name.indexOf('./') === 0) {
|
117 |
+
// No baseName, so this is ID is resolved relative
|
118 |
+
// to baseUrl, pull off the leading dot.
|
119 |
+
name = name.substring(2);
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
//Apply map config if available.
|
124 |
+
if ((baseParts || starMap) && map) {
|
125 |
+
nameParts = name.split('/');
|
126 |
+
|
127 |
+
for (i = nameParts.length; i > 0; i -= 1) {
|
128 |
+
nameSegment = nameParts.slice(0, i).join("/");
|
129 |
+
|
130 |
+
if (baseParts) {
|
131 |
+
//Find the longest baseName segment match in the config.
|
132 |
+
//So, do joins on the biggest to smallest lengths of baseParts.
|
133 |
+
for (j = baseParts.length; j > 0; j -= 1) {
|
134 |
+
mapValue = map[baseParts.slice(0, j).join('/')];
|
135 |
+
|
136 |
+
//baseName segment has config, find if it has one for
|
137 |
+
//this name.
|
138 |
+
if (mapValue) {
|
139 |
+
mapValue = mapValue[nameSegment];
|
140 |
+
if (mapValue) {
|
141 |
+
//Match, update name to the new value.
|
142 |
+
foundMap = mapValue;
|
143 |
+
foundI = i;
|
144 |
+
break;
|
145 |
+
}
|
146 |
+
}
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
if (foundMap) {
|
151 |
+
break;
|
152 |
+
}
|
153 |
+
|
154 |
+
//Check for a star map match, but just hold on to it,
|
155 |
+
//if there is a shorter segment match later in a matching
|
156 |
+
//config, then favor over this star map.
|
157 |
+
if (!foundStarMap && starMap && starMap[nameSegment]) {
|
158 |
+
foundStarMap = starMap[nameSegment];
|
159 |
+
starI = i;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
if (!foundMap && foundStarMap) {
|
164 |
+
foundMap = foundStarMap;
|
165 |
+
foundI = starI;
|
166 |
+
}
|
167 |
+
|
168 |
+
if (foundMap) {
|
169 |
+
nameParts.splice(0, foundI, foundMap);
|
170 |
+
name = nameParts.join('/');
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
return name;
|
175 |
+
}
|
176 |
+
|
177 |
+
function makeRequire(relName, forceSync) {
|
178 |
+
return function () {
|
179 |
+
//A version of a require function that passes a moduleName
|
180 |
+
//value for items that may need to
|
181 |
+
//look up paths relative to the moduleName
|
182 |
+
var args = aps.call(arguments, 0);
|
183 |
+
|
184 |
+
//If first arg is not require('string'), and there is only
|
185 |
+
//one arg, it is the array form without a callback. Insert
|
186 |
+
//a null so that the following concat is correct.
|
187 |
+
if (typeof args[0] !== 'string' && args.length === 1) {
|
188 |
+
args.push(null);
|
189 |
+
}
|
190 |
+
return req.apply(undef, args.concat([relName, forceSync]));
|
191 |
+
};
|
192 |
+
}
|
193 |
+
|
194 |
+
function makeNormalize(relName) {
|
195 |
+
return function (name) {
|
196 |
+
return normalize(name, relName);
|
197 |
+
};
|
198 |
+
}
|
199 |
+
|
200 |
+
function makeLoad(depName) {
|
201 |
+
return function (value) {
|
202 |
+
defined[depName] = value;
|
203 |
+
};
|
204 |
+
}
|
205 |
+
|
206 |
+
function callDep(name) {
|
207 |
+
if (hasProp(waiting, name)) {
|
208 |
+
var args = waiting[name];
|
209 |
+
delete waiting[name];
|
210 |
+
defining[name] = true;
|
211 |
+
main.apply(undef, args);
|
212 |
+
}
|
213 |
+
|
214 |
+
if (!hasProp(defined, name) && !hasProp(defining, name)) {
|
215 |
+
throw new Error('No ' + name);
|
216 |
+
}
|
217 |
+
return defined[name];
|
218 |
+
}
|
219 |
+
|
220 |
+
//Turns a plugin!resource to [plugin, resource]
|
221 |
+
//with the plugin being undefined if the name
|
222 |
+
//did not have a plugin prefix.
|
223 |
+
function splitPrefix(name) {
|
224 |
+
var prefix,
|
225 |
+
index = name ? name.indexOf('!') : -1;
|
226 |
+
if (index > -1) {
|
227 |
+
prefix = name.substring(0, index);
|
228 |
+
name = name.substring(index + 1, name.length);
|
229 |
+
}
|
230 |
+
return [prefix, name];
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Makes a name map, normalizing the name, and using a plugin
|
235 |
+
* for normalization if necessary. Grabs a ref to plugin
|
236 |
+
* too, as an optimization.
|
237 |
+
*/
|
238 |
+
makeMap = function (name, relName) {
|
239 |
+
var plugin,
|
240 |
+
parts = splitPrefix(name),
|
241 |
+
prefix = parts[0];
|
242 |
+
|
243 |
+
name = parts[1];
|
244 |
+
|
245 |
+
if (prefix) {
|
246 |
+
prefix = normalize(prefix, relName);
|
247 |
+
plugin = callDep(prefix);
|
248 |
+
}
|
249 |
+
|
250 |
+
//Normalize according
|
251 |
+
if (prefix) {
|
252 |
+
if (plugin && plugin.normalize) {
|
253 |
+
name = plugin.normalize(name, makeNormalize(relName));
|
254 |
+
} else {
|
255 |
+
name = normalize(name, relName);
|
256 |
+
}
|
257 |
+
} else {
|
258 |
+
name = normalize(name, relName);
|
259 |
+
parts = splitPrefix(name);
|
260 |
+
prefix = parts[0];
|
261 |
+
name = parts[1];
|
262 |
+
if (prefix) {
|
263 |
+
plugin = callDep(prefix);
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
+
//Using ridiculous property names for space reasons
|
268 |
+
return {
|
269 |
+
f: prefix ? prefix + '!' + name : name, //fullName
|
270 |
+
n: name,
|
271 |
+
pr: prefix,
|
272 |
+
p: plugin
|
273 |
+
};
|
274 |
+
};
|
275 |
+
|
276 |
+
function makeConfig(name) {
|
277 |
+
return function () {
|
278 |
+
return (config && config.config && config.config[name]) || {};
|
279 |
+
};
|
280 |
+
}
|
281 |
+
|
282 |
+
handlers = {
|
283 |
+
require: function (name) {
|
284 |
+
return makeRequire(name);
|
285 |
+
},
|
286 |
+
exports: function (name) {
|
287 |
+
var e = defined[name];
|
288 |
+
if (typeof e !== 'undefined') {
|
289 |
+
return e;
|
290 |
+
} else {
|
291 |
+
return (defined[name] = {});
|
292 |
+
}
|
293 |
+
},
|
294 |
+
module: function (name) {
|
295 |
+
return {
|
296 |
+
id: name,
|
297 |
+
uri: '',
|
298 |
+
exports: defined[name],
|
299 |
+
config: makeConfig(name)
|
300 |
+
};
|
301 |
+
}
|
302 |
+
};
|
303 |
+
|
304 |
+
main = function (name, deps, callback, relName) {
|
305 |
+
var cjsModule, depName, ret, map, i,
|
306 |
+
args = [],
|
307 |
+
callbackType = typeof callback,
|
308 |
+
usingExports;
|
309 |
+
|
310 |
+
//Use name if no relName
|
311 |
+
relName = relName || name;
|
312 |
+
|
313 |
+
//Call the callback to define the module, if necessary.
|
314 |
+
if (callbackType === 'undefined' || callbackType === 'function') {
|
315 |
+
//Pull out the defined dependencies and pass the ordered
|
316 |
+
//values to the callback.
|
317 |
+
//Default to [require, exports, module] if no deps
|
318 |
+
deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
|
319 |
+
for (i = 0; i < deps.length; i += 1) {
|
320 |
+
map = makeMap(deps[i], relName);
|
321 |
+
depName = map.f;
|
322 |
+
|
323 |
+
//Fast path CommonJS standard dependencies.
|
324 |
+
if (depName === "require") {
|
325 |
+
args[i] = handlers.require(name);
|
326 |
+
} else if (depName === "exports") {
|
327 |
+
//CommonJS module spec 1.1
|
328 |
+
args[i] = handlers.exports(name);
|
329 |
+
usingExports = true;
|
330 |
+
} else if (depName === "module") {
|
331 |
+
//CommonJS module spec 1.1
|
332 |
+
cjsModule = args[i] = handlers.module(name);
|
333 |
+
} else if (hasProp(defined, depName) ||
|
334 |
+
hasProp(waiting, depName) ||
|
335 |
+
hasProp(defining, depName)) {
|
336 |
+
args[i] = callDep(depName);
|
337 |
+
} else if (map.p) {
|
338 |
+
map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
|
339 |
+
args[i] = defined[depName];
|
340 |
+
} else {
|
341 |
+
throw new Error(name + ' missing ' + depName);
|
342 |
+
}
|
343 |
+
}
|
344 |
+
|
345 |
+
ret = callback ? callback.apply(defined[name], args) : undefined;
|
346 |
+
|
347 |
+
if (name) {
|
348 |
+
//If setting exports via "module" is in play,
|
349 |
+
//favor that over return value and exports. After that,
|
350 |
+
//favor a non-undefined return value over exports use.
|
351 |
+
if (cjsModule && cjsModule.exports !== undef &&
|
352 |
+
cjsModule.exports !== defined[name]) {
|
353 |
+
defined[name] = cjsModule.exports;
|
354 |
+
} else if (ret !== undef || !usingExports) {
|
355 |
+
//Use the return value from the function.
|
356 |
+
defined[name] = ret;
|
357 |
+
}
|
358 |
+
}
|
359 |
+
} else if (name) {
|
360 |
+
//May just be an object definition for the module. Only
|
361 |
+
//worry about defining if have a module name.
|
362 |
+
defined[name] = callback;
|
363 |
+
}
|
364 |
+
};
|
365 |
+
|
366 |
+
requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
|
367 |
+
if (typeof deps === "string") {
|
368 |
+
if (handlers[deps]) {
|
369 |
+
//callback in this case is really relName
|
370 |
+
return handlers[deps](callback);
|
371 |
+
}
|
372 |
+
//Just return the module wanted. In this scenario, the
|
373 |
+
//deps arg is the module name, and second arg (if passed)
|
374 |
+
//is just the relName.
|
375 |
+
//Normalize module name, if it contains . or ..
|
376 |
+
return callDep(makeMap(deps, callback).f);
|
377 |
+
} else if (!deps.splice) {
|
378 |
+
//deps is a config object, not an array.
|
379 |
+
config = deps;
|
380 |
+
if (config.deps) {
|
381 |
+
req(config.deps, config.callback);
|
382 |
+
}
|
383 |
+
if (!callback) {
|
384 |
+
return;
|
385 |
+
}
|
386 |
+
|
387 |
+
if (callback.splice) {
|
388 |
+
//callback is an array, which means it is a dependency list.
|
389 |
+
//Adjust args if there are dependencies
|
390 |
+
deps = callback;
|
391 |
+
callback = relName;
|
392 |
+
relName = null;
|
393 |
+
} else {
|
394 |
+
deps = undef;
|
395 |
+
}
|
396 |
+
}
|
397 |
+
|
398 |
+
//Support require(['a'])
|
399 |
+
callback = callback || function () {};
|
400 |
+
|
401 |
+
//If relName is a function, it is an errback handler,
|
402 |
+
//so remove it.
|
403 |
+
if (typeof relName === 'function') {
|
404 |
+
relName = forceSync;
|
405 |
+
forceSync = alt;
|
406 |
+
}
|
407 |
+
|
408 |
+
//Simulate async callback;
|
409 |
+
if (forceSync) {
|
410 |
+
main(undef, deps, callback, relName);
|
411 |
+
} else {
|
412 |
+
//Using a non-zero value because of concern for what old browsers
|
413 |
+
//do, and latest browsers "upgrade" to 4 if lower value is used:
|
414 |
+
//http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
|
415 |
+
//If want a value immediately, use require('id') instead -- something
|
416 |
+
//that works in almond on the global level, but not guaranteed and
|
417 |
+
//unlikely to work in other AMD implementations.
|
418 |
+
setTimeout(function () {
|
419 |
+
main(undef, deps, callback, relName);
|
420 |
+
}, 4);
|
421 |
+
}
|
422 |
+
|
423 |
+
return req;
|
424 |
+
};
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Just drops the config on the floor, but returns req in case
|
428 |
+
* the config return value is used.
|
429 |
+
*/
|
430 |
+
req.config = function (cfg) {
|
431 |
+
return req(cfg);
|
432 |
+
};
|
433 |
+
|
434 |
+
/**
|
435 |
+
* Expose module registry for debugging and tooling
|
436 |
+
*/
|
437 |
+
requirejs._defined = defined;
|
438 |
+
|
439 |
+
define = function (name, deps, callback) {
|
440 |
+
if (typeof name !== 'string') {
|
441 |
+
throw new Error('See almond README: incorrect module build, no module name');
|
442 |
+
}
|
443 |
+
|
444 |
+
//This module may not have dependencies
|
445 |
+
if (!deps.splice) {
|
446 |
+
//deps is not an array, so probably means
|
447 |
+
//an object literal or factory function for
|
448 |
+
//the value. Adjust args.
|
449 |
+
callback = deps;
|
450 |
+
deps = [];
|
451 |
+
}
|
452 |
+
|
453 |
+
if (!hasProp(defined, name) && !hasProp(waiting, name)) {
|
454 |
+
waiting[name] = [name, deps, callback];
|
455 |
+
}
|
456 |
+
};
|
457 |
+
|
458 |
+
define.amd = {
|
459 |
+
jQuery: true
|
460 |
+
};
|
461 |
+
}());
|
462 |
+
|
463 |
+
S2.requirejs = requirejs;S2.require = require;S2.define = define;
|
464 |
+
}
|
465 |
+
}());
|
466 |
+
S2.define("almond", function(){});
|
467 |
+
|
468 |
+
/* global jQuery:false, $:false */
|
469 |
+
S2.define('jquery',[],function () {
|
470 |
+
var _$ = jQuery || $;
|
471 |
+
|
472 |
+
if (_$ == null && console && console.error) {
|
473 |
+
console.error(
|
474 |
+
'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
|
475 |
+
'found. Make sure that you are including jQuery before Select2 on your ' +
|
476 |
+
'web page.'
|
477 |
+
);
|
478 |
+
}
|
479 |
+
|
480 |
+
return _$;
|
481 |
+
});
|
482 |
+
|
483 |
+
S2.define('select2/utils',[
|
484 |
+
'jquery'
|
485 |
+
], function ($) {
|
486 |
+
var Utils = {};
|
487 |
+
|
488 |
+
Utils.Extend = function (ChildClass, SuperClass) {
|
489 |
+
var __hasProp = {}.hasOwnProperty;
|
490 |
+
|
491 |
+
function BaseConstructor () {
|
492 |
+
this.constructor = ChildClass;
|
493 |
+
}
|
494 |
+
|
495 |
+
for (var key in SuperClass) {
|
496 |
+
if (__hasProp.call(SuperClass, key)) {
|
497 |
+
ChildClass[key] = SuperClass[key];
|
498 |
+
}
|
499 |
+
}
|
500 |
+
|
501 |
+
BaseConstructor.prototype = SuperClass.prototype;
|
502 |
+
ChildClass.prototype = new BaseConstructor();
|
503 |
+
ChildClass.__super__ = SuperClass.prototype;
|
504 |
+
|
505 |
+
return ChildClass;
|
506 |
+
};
|
507 |
+
|
508 |
+
function getMethods (theClass) {
|
509 |
+
var proto = theClass.prototype;
|
510 |
+
|
511 |
+
var methods = [];
|
512 |
+
|
513 |
+
for (var methodName in proto) {
|
514 |
+
var m = proto[methodName];
|
515 |
+
|
516 |
+
if (typeof m !== 'function') {
|
517 |
+
continue;
|
518 |
+
}
|
519 |
+
|
520 |
+
if (methodName === 'constructor') {
|
521 |
+
continue;
|
522 |
+
}
|
523 |
+
|
524 |
+
methods.push(methodName);
|
525 |
+
}
|
526 |
+
|
527 |
+
return methods;
|
528 |
+
}
|
529 |
+
|
530 |
+
Utils.Decorate = function (SuperClass, DecoratorClass) {
|
531 |
+
var decoratedMethods = getMethods(DecoratorClass);
|
532 |
+
var superMethods = getMethods(SuperClass);
|
533 |
+
|
534 |
+
function DecoratedClass () {
|
535 |
+
var unshift = Array.prototype.unshift;
|
536 |
+
|
537 |
+
var argCount = DecoratorClass.prototype.constructor.length;
|
538 |
+
|
539 |
+
var calledConstructor = SuperClass.prototype.constructor;
|
540 |
+
|
541 |
+
if (argCount > 0) {
|
542 |
+
unshift.call(arguments, SuperClass.prototype.constructor);
|
543 |
+
|
544 |
+
calledConstructor = DecoratorClass.prototype.constructor;
|
545 |
+
}
|
546 |
+
|
547 |
+
calledConstructor.apply(this, arguments);
|
548 |
+
}
|
549 |
+
|
550 |
+
DecoratorClass.displayName = SuperClass.displayName;
|
551 |
+
|
552 |
+
function ctr () {
|
553 |
+
this.constructor = DecoratedClass;
|
554 |
+
}
|
555 |
+
|
556 |
+
DecoratedClass.prototype = new ctr();
|
557 |
+
|
558 |
+
for (var m = 0; m < superMethods.length; m++) {
|
559 |
+
var superMethod = superMethods[m];
|
560 |
+
|
561 |
+
DecoratedClass.prototype[superMethod] =
|
562 |
+
SuperClass.prototype[superMethod];
|
563 |
+
}
|
564 |
+
|
565 |
+
var calledMethod = function (methodName) {
|
566 |
+
// Stub out the original method if it's not decorating an actual method
|
567 |
+
var originalMethod = function () {};
|
568 |
+
|
569 |
+
if (methodName in DecoratedClass.prototype) {
|
570 |
+
originalMethod = DecoratedClass.prototype[methodName];
|
571 |
+
}
|
572 |
+
|
573 |
+
var decoratedMethod = DecoratorClass.prototype[methodName];
|
574 |
+
|
575 |
+
return function () {
|
576 |
+
var unshift = Array.prototype.unshift;
|
577 |
+
|
578 |
+
unshift.call(arguments, originalMethod);
|
579 |
+
|
580 |
+
return decoratedMethod.apply(this, arguments);
|
581 |
+
};
|
582 |
+
};
|
583 |
+
|
584 |
+
for (var d = 0; d < decoratedMethods.length; d++) {
|
585 |
+
var decoratedMethod = decoratedMethods[d];
|
586 |
+
|
587 |
+
DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
|
588 |
+
}
|
589 |
+
|
590 |
+
return DecoratedClass;
|
591 |
+
};
|
592 |
+
|
593 |
+
var Observable = function () {
|
594 |
+
this.listeners = {};
|
595 |
+
};
|
596 |
+
|
597 |
+
Observable.prototype.on = function (event, callback) {
|
598 |
+
this.listeners = this.listeners || {};
|
599 |
+
|
600 |
+
if (event in this.listeners) {
|
601 |
+
this.listeners[event].push(callback);
|
602 |
+
} else {
|
603 |
+
this.listeners[event] = [callback];
|
604 |
+
}
|
605 |
+
};
|
606 |
+
|
607 |
+
Observable.prototype.trigger = function (event) {
|
608 |
+
var slice = Array.prototype.slice;
|
609 |
+
var params = slice.call(arguments, 1);
|
610 |
+
|
611 |
+
this.listeners = this.listeners || {};
|
612 |
+
|
613 |
+
// Params should always come in as an array
|
614 |
+
if (params == null) {
|
615 |
+
params = [];
|
616 |
+
}
|
617 |
+
|
618 |
+
// If there are no arguments to the event, use a temporary object
|
619 |
+
if (params.length === 0) {
|
620 |
+
params.push({});
|
621 |
+
}
|
622 |
+
|
623 |
+
// Set the `_type` of the first object to the event
|
624 |
+
params[0]._type = event;
|
625 |
+
|
626 |
+
if (event in this.listeners) {
|
627 |
+
this.invoke(this.listeners[event], slice.call(arguments, 1));
|
628 |
+
}
|
629 |
+
|
630 |
+
if ('*' in this.listeners) {
|
631 |
+
this.invoke(this.listeners['*'], arguments);
|
632 |
+
}
|
633 |
+
};
|
634 |
+
|
635 |
+
Observable.prototype.invoke = function (listeners, params) {
|
636 |
+
for (var i = 0, len = listeners.length; i < len; i++) {
|
637 |
+
listeners[i].apply(this, params);
|
638 |
+
}
|
639 |
+
};
|
640 |
+
|
641 |
+
Utils.Observable = Observable;
|
642 |
+
|
643 |
+
Utils.generateChars = function (length) {
|
644 |
+
var chars = '';
|
645 |
+
|
646 |
+
for (var i = 0; i < length; i++) {
|
647 |
+
var randomChar = Math.floor(Math.random() * 36);
|
648 |
+
chars += randomChar.toString(36);
|
649 |
+
}
|
650 |
+
|
651 |
+
return chars;
|
652 |
+
};
|
653 |
+
|
654 |
+
Utils.bind = function (func, context) {
|
655 |
+
return function () {
|
656 |
+
func.apply(context, arguments);
|
657 |
+
};
|
658 |
+
};
|
659 |
+
|
660 |
+
Utils._convertData = function (data) {
|
661 |
+
for (var originalKey in data) {
|
662 |
+
var keys = originalKey.split('-');
|
663 |
+
|
664 |
+
var dataLevel = data;
|
665 |
+
|
666 |
+
if (keys.length === 1) {
|
667 |
+
continue;
|
668 |
+
}
|
669 |
+
|
670 |
+
for (var k = 0; k < keys.length; k++) {
|
671 |
+
var key = keys[k];
|
672 |
+
|
673 |
+
// Lowercase the first letter
|
674 |
+
// By default, dash-separated becomes camelCase
|
675 |
+
key = key.substring(0, 1).toLowerCase() + key.substring(1);
|
676 |
+
|
677 |
+
if (!(key in dataLevel)) {
|
678 |
+
dataLevel[key] = {};
|
679 |
+
}
|
680 |
+
|
681 |
+
if (k == keys.length - 1) {
|
682 |
+
dataLevel[key] = data[originalKey];
|
683 |
+
}
|
684 |
+
|
685 |
+
dataLevel = dataLevel[key];
|
686 |
+
}
|
687 |
+
|
688 |
+
delete data[originalKey];
|
689 |
+
}
|
690 |
+
|
691 |
+
return data;
|
692 |
+
};
|
693 |
+
|
694 |
+
Utils.hasScroll = function (index, el) {
|
695 |
+
// Adapted from the function created by @ShadowScripter
|
696 |
+
// and adapted by @BillBarry on the Stack Exchange Code Review website.
|
697 |
+
// The original code can be found at
|
698 |
+
// http://codereview.stackexchange.com/q/13338
|
699 |
+
// and was designed to be used with the Sizzle selector engine.
|
700 |
+
|
701 |
+
var $el = $(el);
|
702 |
+
var overflowX = el.style.overflowX;
|
703 |
+
var overflowY = el.style.overflowY;
|
704 |
+
|
705 |
+
//Check both x and y declarations
|
706 |
+
if (overflowX === overflowY &&
|
707 |
+
(overflowY === 'hidden' || overflowY === 'visible')) {
|
708 |
+
return false;
|
709 |
+
}
|
710 |
+
|
711 |
+
if (overflowX === 'scroll' || overflowY === 'scroll') {
|
712 |
+
return true;
|
713 |
+
}
|
714 |
+
|
715 |
+
return ($el.innerHeight() < el.scrollHeight ||
|
716 |
+
$el.innerWidth() < el.scrollWidth);
|
717 |
+
};
|
718 |
+
|
719 |
+
Utils.escapeMarkup = function (markup) {
|
720 |
+
var replaceMap = {
|
721 |
+
'\\': '\',
|
722 |
+
'&': '&',
|
723 |
+
'<': '<',
|
724 |
+
'>': '>',
|
725 |
+
'"': '"',
|
726 |
+
'\'': ''',
|
727 |
+
'/': '/'
|
728 |
+
};
|
729 |
+
|
730 |
+
// Do not try to escape the markup if it's not a string
|
731 |
+
if (typeof markup !== 'string') {
|
732 |
+
return markup;
|
733 |
+
}
|
734 |
+
|
735 |
+
return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
|
736 |
+
return replaceMap[match];
|
737 |
+
});
|
738 |
+
};
|
739 |
+
|
740 |
+
// Append an array of jQuery nodes to a given element.
|
741 |
+
Utils.appendMany = function ($element, $nodes) {
|
742 |
+
// jQuery 1.7.x does not support $.fn.append() with an array
|
743 |
+
// Fall back to a jQuery object collection using $.fn.add()
|
744 |
+
if ($.fn.jquery.substr(0, 3) === '1.7') {
|
745 |
+
var $jqNodes = $();
|
746 |
+
|
747 |
+
$.map($nodes, function (node) {
|
748 |
+
$jqNodes = $jqNodes.add(node);
|
749 |
+
});
|
750 |
+
|
751 |
+
$nodes = $jqNodes;
|
752 |
+
}
|
753 |
+
|
754 |
+
$element.append($nodes);
|
755 |
+
};
|
756 |
+
|
757 |
+
return Utils;
|
758 |
+
});
|
759 |
+
|
760 |
+
S2.define('select2/results',[
|
761 |
+
'jquery',
|
762 |
+
'./utils'
|
763 |
+
], function ($, Utils) {
|
764 |
+
function Results ($element, options, dataAdapter) {
|
765 |
+
this.$element = $element;
|
766 |
+
this.data = dataAdapter;
|
767 |
+
this.options = options;
|
768 |
+
|
769 |
+
Results.__super__.constructor.call(this);
|
770 |
+
}
|
771 |
+
|
772 |
+
Utils.Extend(Results, Utils.Observable);
|
773 |
+
|
774 |
+
Results.prototype.render = function () {
|
775 |
+
var $results = $(
|
776 |
+
'<ul class="select2-results__options" role="tree"></ul>'
|
777 |
+
);
|
778 |
+
|
779 |
+
if (this.options.get('multiple')) {
|
780 |
+
$results.attr('aria-multiselectable', 'true');
|
781 |
+
}
|
782 |
+
|
783 |
+
this.$results = $results;
|
784 |
+
|
785 |
+
return $results;
|
786 |
+
};
|
787 |
+
|
788 |
+
Results.prototype.clear = function () {
|
789 |
+
this.$results.empty();
|
790 |
+
};
|
791 |
+
|
792 |
+
Results.prototype.displayMessage = function (params) {
|
793 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
794 |
+
|
795 |
+
this.clear();
|
796 |
+
this.hideLoading();
|
797 |
+
|
798 |
+
var $message = $(
|
799 |
+
'<li role="treeitem" aria-live="assertive"' +
|
800 |
+
' class="select2-results__option"></li>'
|
801 |
+
);
|
802 |
+
|
803 |
+
var message = this.options.get('translations').get(params.message);
|
804 |
+
|
805 |
+
$message.append(
|
806 |
+
escapeMarkup(
|
807 |
+
message(params.args)
|
808 |
+
)
|
809 |
+
);
|
810 |
+
|
811 |
+
$message[0].className += ' select2-results__message';
|
812 |
+
|
813 |
+
this.$results.append($message);
|
814 |
+
};
|
815 |
+
|
816 |
+
Results.prototype.hideMessages = function () {
|
817 |
+
this.$results.find('.select2-results__message').remove();
|
818 |
+
};
|
819 |
+
|
820 |
+
Results.prototype.append = function (data) {
|
821 |
+
this.hideLoading();
|
822 |
+
|
823 |
+
var $options = [];
|
824 |
+
|
825 |
+
if (data.results == null || data.results.length === 0) {
|
826 |
+
if (this.$results.children().length === 0) {
|
827 |
+
this.trigger('results:message', {
|
828 |
+
message: 'noResults'
|
829 |
+
});
|
830 |
+
}
|
831 |
+
|
832 |
+
return;
|
833 |
+
}
|
834 |
+
|
835 |
+
data.results = this.sort(data.results);
|
836 |
+
|
837 |
+
for (var d = 0; d < data.results.length; d++) {
|
838 |
+
var item = data.results[d];
|
839 |
+
|
840 |
+
var $option = this.option(item);
|
841 |
+
|
842 |
+
$options.push($option);
|
843 |
+
}
|
844 |
+
|
845 |
+
this.$results.append($options);
|
846 |
+
};
|
847 |
+
|
848 |
+
Results.prototype.position = function ($results, $dropdown) {
|
849 |
+
var $resultsContainer = $dropdown.find('.select2-results');
|
850 |
+
$resultsContainer.append($results);
|
851 |
+
};
|
852 |
+
|
853 |
+
Results.prototype.sort = function (data) {
|
854 |
+
var sorter = this.options.get('sorter');
|
855 |
+
|
856 |
+
return sorter(data);
|
857 |
+
};
|
858 |
+
|
859 |
+
Results.prototype.highlightFirstItem = function () {
|
860 |
+
var $options = this.$results
|
861 |
+
.find('.select2-results__option[aria-selected]');
|
862 |
+
|
863 |
+
var $selected = $options.filter('[aria-selected=true]');
|
864 |
+
|
865 |
+
// Check if there are any selected options
|
866 |
+
if ($selected.length > 0) {
|
867 |
+
// If there are selected options, highlight the first
|
868 |
+
$selected.first().trigger('mouseenter');
|
869 |
+
} else {
|
870 |
+
// If there are no selected options, highlight the first option
|
871 |
+
// in the dropdown
|
872 |
+
$options.first().trigger('mouseenter');
|
873 |
+
}
|
874 |
+
|
875 |
+
this.ensureHighlightVisible();
|
876 |
+
};
|
877 |
+
|
878 |
+
Results.prototype.setClasses = function () {
|
879 |
+
var self = this;
|
880 |
+
|
881 |
+
this.data.current(function (selected) {
|
882 |
+
var selectedIds = $.map(selected, function (s) {
|
883 |
+
return s.id.toString();
|
884 |
+
});
|
885 |
+
|
886 |
+
var $options = self.$results
|
887 |
+
.find('.select2-results__option[aria-selected]');
|
888 |
+
|
889 |
+
$options.each(function () {
|
890 |
+
var $option = $(this);
|
891 |
+
|
892 |
+
var item = $.data(this, 'data');
|
893 |
+
|
894 |
+
// id needs to be converted to a string when comparing
|
895 |
+
var id = '' + item.id;
|
896 |
+
|
897 |
+
if ((item.element != null && item.element.selected) ||
|
898 |
+
(item.element == null && $.inArray(id, selectedIds) > -1)) {
|
899 |
+
$option.attr('aria-selected', 'true');
|
900 |
+
} else {
|
901 |
+
$option.attr('aria-selected', 'false');
|
902 |
+
}
|
903 |
+
});
|
904 |
+
|
905 |
+
});
|
906 |
+
};
|
907 |
+
|
908 |
+
Results.prototype.showLoading = function (params) {
|
909 |
+
this.hideLoading();
|
910 |
+
|
911 |
+
var loadingMore = this.options.get('translations').get('searching');
|
912 |
+
|
913 |
+
var loading = {
|
914 |
+
disabled: true,
|
915 |
+
loading: true,
|
916 |
+
text: loadingMore(params)
|
917 |
+
};
|
918 |
+
var $loading = this.option(loading);
|
919 |
+
$loading.className += ' loading-results';
|
920 |
+
|
921 |
+
this.$results.prepend($loading);
|
922 |
+
};
|
923 |
+
|
924 |
+
Results.prototype.hideLoading = function () {
|
925 |
+
this.$results.find('.loading-results').remove();
|
926 |
+
};
|
927 |
+
|
928 |
+
Results.prototype.option = function (data) {
|
929 |
+
var option = document.createElement('li');
|
930 |
+
option.className = 'select2-results__option';
|
931 |
+
|
932 |
+
var attrs = {
|
933 |
+
'role': 'treeitem',
|
934 |
+
'aria-selected': 'false'
|
935 |
+
};
|
936 |
+
|
937 |
+
if (data.disabled) {
|
938 |
+
delete attrs['aria-selected'];
|
939 |
+
attrs['aria-disabled'] = 'true';
|
940 |
+
}
|
941 |
+
|
942 |
+
if (data.id == null) {
|
943 |
+
delete attrs['aria-selected'];
|
944 |
+
}
|
945 |
+
|
946 |
+
if (data._resultId != null) {
|
947 |
+
option.id = data._resultId;
|
948 |
+
}
|
949 |
+
|
950 |
+
if (data.title) {
|
951 |
+
option.title = data.title;
|
952 |
+
}
|
953 |
+
|
954 |
+
if (data.children) {
|
955 |
+
attrs.role = 'group';
|
956 |
+
attrs['aria-label'] = data.text;
|
957 |
+
delete attrs['aria-selected'];
|
958 |
+
}
|
959 |
+
|
960 |
+
for (var attr in attrs) {
|
961 |
+
var val = attrs[attr];
|
962 |
+
|
963 |
+
option.setAttribute(attr, val);
|
964 |
+
}
|
965 |
+
|
966 |
+
if (data.children) {
|
967 |
+
var $option = $(option);
|
968 |
+
|
969 |
+
var label = document.createElement('strong');
|
970 |
+
label.className = 'select2-results__group';
|
971 |
+
|
972 |
+
var $label = $(label);
|
973 |
+
this.template(data, label);
|
974 |
+
|
975 |
+
var $children = [];
|
976 |
+
|
977 |
+
for (var c = 0; c < data.children.length; c++) {
|
978 |
+
var child = data.children[c];
|
979 |
+
|
980 |
+
var $child = this.option(child);
|
981 |
+
|
982 |
+
$children.push($child);
|
983 |
+
}
|
984 |
+
|
985 |
+
var $childrenContainer = $('<ul></ul>', {
|
986 |
+
'class': 'select2-results__options select2-results__options--nested'
|
987 |
+
});
|
988 |
+
|
989 |
+
$childrenContainer.append($children);
|
990 |
+
|
991 |
+
$option.append(label);
|
992 |
+
$option.append($childrenContainer);
|
993 |
+
} else {
|
994 |
+
this.template(data, option);
|
995 |
+
}
|
996 |
+
|
997 |
+
$.data(option, 'data', data);
|
998 |
+
|
999 |
+
return option;
|
1000 |
+
};
|
1001 |
+
|
1002 |
+
Results.prototype.bind = function (container, $container) {
|
1003 |
+
var self = this;
|
1004 |
+
|
1005 |
+
var id = container.id + '-results';
|
1006 |
+
|
1007 |
+
this.$results.attr('id', id);
|
1008 |
+
|
1009 |
+
container.on('results:all', function (params) {
|
1010 |
+
self.clear();
|
1011 |
+
self.append(params.data);
|
1012 |
+
|
1013 |
+
if (container.isOpen()) {
|
1014 |
+
self.setClasses();
|
1015 |
+
self.highlightFirstItem();
|
1016 |
+
}
|
1017 |
+
});
|
1018 |
+
|
1019 |
+
container.on('results:append', function (params) {
|
1020 |
+
self.append(params.data);
|
1021 |
+
|
1022 |
+
if (container.isOpen()) {
|
1023 |
+
self.setClasses();
|
1024 |
+
}
|
1025 |
+
});
|
1026 |
+
|
1027 |
+
container.on('query', function (params) {
|
1028 |
+
self.hideMessages();
|
1029 |
+
self.showLoading(params);
|
1030 |
+
});
|
1031 |
+
|
1032 |
+
container.on('select', function () {
|
1033 |
+
if (!container.isOpen()) {
|
1034 |
+
return;
|
1035 |
+
}
|
1036 |
+
|
1037 |
+
self.setClasses();
|
1038 |
+
self.highlightFirstItem();
|
1039 |
+
});
|
1040 |
+
|
1041 |
+
container.on('unselect', function () {
|
1042 |
+
if (!container.isOpen()) {
|
1043 |
+
return;
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
self.setClasses();
|
1047 |
+
self.highlightFirstItem();
|
1048 |
+
});
|
1049 |
+
|
1050 |
+
container.on('open', function () {
|
1051 |
+
// When the dropdown is open, aria-expended="true"
|
1052 |
+
self.$results.attr('aria-expanded', 'true');
|
1053 |
+
self.$results.attr('aria-hidden', 'false');
|
1054 |
+
|
1055 |
+
self.setClasses();
|
1056 |
+
self.ensureHighlightVisible();
|
1057 |
+
});
|
1058 |
+
|
1059 |
+
container.on('close', function () {
|
1060 |
+
// When the dropdown is closed, aria-expended="false"
|
1061 |
+
self.$results.attr('aria-expanded', 'false');
|
1062 |
+
self.$results.attr('aria-hidden', 'true');
|
1063 |
+
self.$results.removeAttr('aria-activedescendant');
|
1064 |
+
});
|
1065 |
+
|
1066 |
+
container.on('results:toggle', function () {
|
1067 |
+
var $highlighted = self.getHighlightedResults();
|
1068 |
+
|
1069 |
+
if ($highlighted.length === 0) {
|
1070 |
+
return;
|
1071 |
+
}
|
1072 |
+
|
1073 |
+
$highlighted.trigger('mouseup');
|
1074 |
+
});
|
1075 |
+
|
1076 |
+
container.on('results:select', function () {
|
1077 |
+
var $highlighted = self.getHighlightedResults();
|
1078 |
+
|
1079 |
+
if ($highlighted.length === 0) {
|
1080 |
+
return;
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
var data = $highlighted.data('data');
|
1084 |
+
|
1085 |
+
if ($highlighted.attr('aria-selected') == 'true') {
|
1086 |
+
self.trigger('close', {});
|
1087 |
+
} else {
|
1088 |
+
self.trigger('select', {
|
1089 |
+
data: data
|
1090 |
+
});
|
1091 |
+
}
|
1092 |
+
});
|
1093 |
+
|
1094 |
+
container.on('results:previous', function () {
|
1095 |
+
var $highlighted = self.getHighlightedResults();
|
1096 |
+
|
1097 |
+
var $options = self.$results.find('[aria-selected]');
|
1098 |
+
|
1099 |
+
var currentIndex = $options.index($highlighted);
|
1100 |
+
|
1101 |
+
// If we are already at te top, don't move further
|
1102 |
+
if (currentIndex === 0) {
|
1103 |
+
return;
|
1104 |
+
}
|
1105 |
+
|
1106 |
+
var nextIndex = currentIndex - 1;
|
1107 |
+
|
1108 |
+
// If none are highlighted, highlight the first
|
1109 |
+
if ($highlighted.length === 0) {
|
1110 |
+
nextIndex = 0;
|
1111 |
+
}
|
1112 |
+
|
1113 |
+
var $next = $options.eq(nextIndex);
|
1114 |
+
|
1115 |
+
$next.trigger('mouseenter');
|
1116 |
+
|
1117 |
+
var currentOffset = self.$results.offset().top;
|
1118 |
+
var nextTop = $next.offset().top;
|
1119 |
+
var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
|
1120 |
+
|
1121 |
+
if (nextIndex === 0) {
|
1122 |
+
self.$results.scrollTop(0);
|
1123 |
+
} else if (nextTop - currentOffset < 0) {
|
1124 |
+
self.$results.scrollTop(nextOffset);
|
1125 |
+
}
|
1126 |
+
});
|
1127 |
+
|
1128 |
+
container.on('results:next', function () {
|
1129 |
+
var $highlighted = self.getHighlightedResults();
|
1130 |
+
|
1131 |
+
var $options = self.$results.find('[aria-selected]');
|
1132 |
+
|
1133 |
+
var currentIndex = $options.index($highlighted);
|
1134 |
+
|
1135 |
+
var nextIndex = currentIndex + 1;
|
1136 |
+
|
1137 |
+
// If we are at the last option, stay there
|
1138 |
+
if (nextIndex >= $options.length) {
|
1139 |
+
return;
|
1140 |
+
}
|
1141 |
+
|
1142 |
+
var $next = $options.eq(nextIndex);
|
1143 |
+
|
1144 |
+
$next.trigger('mouseenter');
|
1145 |
+
|
1146 |
+
var currentOffset = self.$results.offset().top +
|
1147 |
+
self.$results.outerHeight(false);
|
1148 |
+
var nextBottom = $next.offset().top + $next.outerHeight(false);
|
1149 |
+
var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
|
1150 |
+
|
1151 |
+
if (nextIndex === 0) {
|
1152 |
+
self.$results.scrollTop(0);
|
1153 |
+
} else if (nextBottom > currentOffset) {
|
1154 |
+
self.$results.scrollTop(nextOffset);
|
1155 |
+
}
|
1156 |
+
});
|
1157 |
+
|
1158 |
+
container.on('results:focus', function (params) {
|
1159 |
+
params.element.addClass('select2-results__option--highlighted');
|
1160 |
+
});
|
1161 |
+
|
1162 |
+
container.on('results:message', function (params) {
|
1163 |
+
self.displayMessage(params);
|
1164 |
+
});
|
1165 |
+
|
1166 |
+
if ($.fn.mousewheel) {
|
1167 |
+
this.$results.on('mousewheel', function (e) {
|
1168 |
+
var top = self.$results.scrollTop();
|
1169 |
+
|
1170 |
+
var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
|
1171 |
+
|
1172 |
+
var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
|
1173 |
+
var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
|
1174 |
+
|
1175 |
+
if (isAtTop) {
|
1176 |
+
self.$results.scrollTop(0);
|
1177 |
+
|
1178 |
+
e.preventDefault();
|
1179 |
+
e.stopPropagation();
|
1180 |
+
} else if (isAtBottom) {
|
1181 |
+
self.$results.scrollTop(
|
1182 |
+
self.$results.get(0).scrollHeight - self.$results.height()
|
1183 |
+
);
|
1184 |
+
|
1185 |
+
e.preventDefault();
|
1186 |
+
e.stopPropagation();
|
1187 |
+
}
|
1188 |
+
});
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
this.$results.on('mouseup', '.select2-results__option[aria-selected]',
|
1192 |
+
function (evt) {
|
1193 |
+
var $this = $(this);
|
1194 |
+
|
1195 |
+
var data = $this.data('data');
|
1196 |
+
|
1197 |
+
if ($this.attr('aria-selected') === 'true') {
|
1198 |
+
if (self.options.get('multiple')) {
|
1199 |
+
self.trigger('unselect', {
|
1200 |
+
originalEvent: evt,
|
1201 |
+
data: data
|
1202 |
+
});
|
1203 |
+
} else {
|
1204 |
+
self.trigger('close', {});
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
return;
|
1208 |
+
}
|
1209 |
+
|
1210 |
+
self.trigger('select', {
|
1211 |
+
originalEvent: evt,
|
1212 |
+
data: data
|
1213 |
+
});
|
1214 |
+
});
|
1215 |
+
|
1216 |
+
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
|
1217 |
+
function (evt) {
|
1218 |
+
var data = $(this).data('data');
|
1219 |
+
|
1220 |
+
self.getHighlightedResults()
|
1221 |
+
.removeClass('select2-results__option--highlighted');
|
1222 |
+
|
1223 |
+
self.trigger('results:focus', {
|
1224 |
+
data: data,
|
1225 |
+
element: $(this)
|
1226 |
+
});
|
1227 |
+
});
|
1228 |
+
};
|
1229 |
+
|
1230 |
+
Results.prototype.getHighlightedResults = function () {
|
1231 |
+
var $highlighted = this.$results
|
1232 |
+
.find('.select2-results__option--highlighted');
|
1233 |
+
|
1234 |
+
return $highlighted;
|
1235 |
+
};
|
1236 |
+
|
1237 |
+
Results.prototype.destroy = function () {
|
1238 |
+
this.$results.remove();
|
1239 |
+
};
|
1240 |
+
|
1241 |
+
Results.prototype.ensureHighlightVisible = function () {
|
1242 |
+
var $highlighted = this.getHighlightedResults();
|
1243 |
+
|
1244 |
+
if ($highlighted.length === 0) {
|
1245 |
+
return;
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
var $options = this.$results.find('[aria-selected]');
|
1249 |
+
|
1250 |
+
var currentIndex = $options.index($highlighted);
|
1251 |
+
|
1252 |
+
var currentOffset = this.$results.offset().top;
|
1253 |
+
var nextTop = $highlighted.offset().top;
|
1254 |
+
var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
|
1255 |
+
|
1256 |
+
var offsetDelta = nextTop - currentOffset;
|
1257 |
+
nextOffset -= $highlighted.outerHeight(false) * 2;
|
1258 |
+
|
1259 |
+
if (currentIndex <= 2) {
|
1260 |
+
this.$results.scrollTop(0);
|
1261 |
+
} else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
|
1262 |
+
this.$results.scrollTop(nextOffset);
|
1263 |
+
}
|
1264 |
+
};
|
1265 |
+
|
1266 |
+
Results.prototype.template = function (result, container) {
|
1267 |
+
var template = this.options.get('templateResult');
|
1268 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1269 |
+
|
1270 |
+
var content = template(result, container);
|
1271 |
+
|
1272 |
+
if (content == null) {
|
1273 |
+
container.style.display = 'none';
|
1274 |
+
} else if (typeof content === 'string') {
|
1275 |
+
container.innerHTML = escapeMarkup(content);
|
1276 |
+
} else {
|
1277 |
+
$(container).append(content);
|
1278 |
+
}
|
1279 |
+
};
|
1280 |
+
|
1281 |
+
return Results;
|
1282 |
+
});
|
1283 |
+
|
1284 |
+
S2.define('select2/keys',[
|
1285 |
+
|
1286 |
+
], function () {
|
1287 |
+
var KEYS = {
|
1288 |
+
BACKSPACE: 8,
|
1289 |
+
TAB: 9,
|
1290 |
+
ENTER: 13,
|
1291 |
+
SHIFT: 16,
|
1292 |
+
CTRL: 17,
|
1293 |
+
ALT: 18,
|
1294 |
+
ESC: 27,
|
1295 |
+
SPACE: 32,
|
1296 |
+
PAGE_UP: 33,
|
1297 |
+
PAGE_DOWN: 34,
|
1298 |
+
END: 35,
|
1299 |
+
HOME: 36,
|
1300 |
+
LEFT: 37,
|
1301 |
+
UP: 38,
|
1302 |
+
RIGHT: 39,
|
1303 |
+
DOWN: 40,
|
1304 |
+
DELETE: 46
|
1305 |
+
};
|
1306 |
+
|
1307 |
+
return KEYS;
|
1308 |
+
});
|
1309 |
+
|
1310 |
+
S2.define('select2/selection/base',[
|
1311 |
+
'jquery',
|
1312 |
+
'../utils',
|
1313 |
+
'../keys'
|
1314 |
+
], function ($, Utils, KEYS) {
|
1315 |
+
function BaseSelection ($element, options) {
|
1316 |
+
this.$element = $element;
|
1317 |
+
this.options = options;
|
1318 |
+
|
1319 |
+
BaseSelection.__super__.constructor.call(this);
|
1320 |
+
}
|
1321 |
+
|
1322 |
+
Utils.Extend(BaseSelection, Utils.Observable);
|
1323 |
+
|
1324 |
+
BaseSelection.prototype.render = function () {
|
1325 |
+
var $selection = $(
|
1326 |
+
'<span class="select2-selection" role="combobox" ' +
|
1327 |
+
' aria-haspopup="true" aria-expanded="false">' +
|
1328 |
+
'</span>'
|
1329 |
+
);
|
1330 |
+
|
1331 |
+
this._tabindex = 0;
|
1332 |
+
|
1333 |
+
if (this.$element.data('old-tabindex') != null) {
|
1334 |
+
this._tabindex = this.$element.data('old-tabindex');
|
1335 |
+
} else if (this.$element.attr('tabindex') != null) {
|
1336 |
+
this._tabindex = this.$element.attr('tabindex');
|
1337 |
+
}
|
1338 |
+
|
1339 |
+
$selection.attr('title', this.$element.attr('title'));
|
1340 |
+
$selection.attr('tabindex', this._tabindex);
|
1341 |
+
|
1342 |
+
this.$selection = $selection;
|
1343 |
+
|
1344 |
+
return $selection;
|
1345 |
+
};
|
1346 |
+
|
1347 |
+
BaseSelection.prototype.bind = function (container, $container) {
|
1348 |
+
var self = this;
|
1349 |
+
|
1350 |
+
var id = container.id + '-container';
|
1351 |
+
var resultsId = container.id + '-results';
|
1352 |
+
|
1353 |
+
this.container = container;
|
1354 |
+
|
1355 |
+
this.$selection.on('focus', function (evt) {
|
1356 |
+
self.trigger('focus', evt);
|
1357 |
+
});
|
1358 |
+
|
1359 |
+
this.$selection.on('blur', function (evt) {
|
1360 |
+
self._handleBlur(evt);
|
1361 |
+
});
|
1362 |
+
|
1363 |
+
this.$selection.on('keydown', function (evt) {
|
1364 |
+
self.trigger('keypress', evt);
|
1365 |
+
|
1366 |
+
if (evt.which === KEYS.SPACE) {
|
1367 |
+
evt.preventDefault();
|
1368 |
+
}
|
1369 |
+
});
|
1370 |
+
|
1371 |
+
container.on('results:focus', function (params) {
|
1372 |
+
self.$selection.attr('aria-activedescendant', params.data._resultId);
|
1373 |
+
});
|
1374 |
+
|
1375 |
+
container.on('selection:update', function (params) {
|
1376 |
+
self.update(params.data);
|
1377 |
+
});
|
1378 |
+
|
1379 |
+
container.on('open', function () {
|
1380 |
+
// When the dropdown is open, aria-expanded="true"
|
1381 |
+
self.$selection.attr('aria-expanded', 'true');
|
1382 |
+
self.$selection.attr('aria-owns', resultsId);
|
1383 |
+
|
1384 |
+
self._attachCloseHandler(container);
|
1385 |
+
});
|
1386 |
+
|
1387 |
+
container.on('close', function () {
|
1388 |
+
// When the dropdown is closed, aria-expanded="false"
|
1389 |
+
self.$selection.attr('aria-expanded', 'false');
|
1390 |
+
self.$selection.removeAttr('aria-activedescendant');
|
1391 |
+
self.$selection.removeAttr('aria-owns');
|
1392 |
+
|
1393 |
+
self.$selection.focus();
|
1394 |
+
|
1395 |
+
self._detachCloseHandler(container);
|
1396 |
+
});
|
1397 |
+
|
1398 |
+
container.on('enable', function () {
|
1399 |
+
self.$selection.attr('tabindex', self._tabindex);
|
1400 |
+
});
|
1401 |
+
|
1402 |
+
container.on('disable', function () {
|
1403 |
+
self.$selection.attr('tabindex', '-1');
|
1404 |
+
});
|
1405 |
+
};
|
1406 |
+
|
1407 |
+
BaseSelection.prototype._handleBlur = function (evt) {
|
1408 |
+
var self = this;
|
1409 |
+
|
1410 |
+
// This needs to be delayed as the active element is the body when the tab
|
1411 |
+
// key is pressed, possibly along with others.
|
1412 |
+
window.setTimeout(function () {
|
1413 |
+
// Don't trigger `blur` if the focus is still in the selection
|
1414 |
+
if (
|
1415 |
+
(document.activeElement == self.$selection[0]) ||
|
1416 |
+
($.contains(self.$selection[0], document.activeElement))
|
1417 |
+
) {
|
1418 |
+
return;
|
1419 |
+
}
|
1420 |
+
|
1421 |
+
self.trigger('blur', evt);
|
1422 |
+
}, 1);
|
1423 |
+
};
|
1424 |
+
|
1425 |
+
BaseSelection.prototype._attachCloseHandler = function (container) {
|
1426 |
+
var self = this;
|
1427 |
+
|
1428 |
+
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
1429 |
+
var $target = $(e.target);
|
1430 |
+
|
1431 |
+
var $select = $target.closest('.select2');
|
1432 |
+
|
1433 |
+
var $all = $('.select2.select2-container--open');
|
1434 |
+
|
1435 |
+
$all.each(function () {
|
1436 |
+
var $this = $(this);
|
1437 |
+
|
1438 |
+
if (this == $select[0]) {
|
1439 |
+
return;
|
1440 |
+
}
|
1441 |
+
|
1442 |
+
var $element = $this.data('element');
|
1443 |
+
|
1444 |
+
$element.select2('close');
|
1445 |
+
});
|
1446 |
+
});
|
1447 |
+
};
|
1448 |
+
|
1449 |
+
BaseSelection.prototype._detachCloseHandler = function (container) {
|
1450 |
+
$(document.body).off('mousedown.select2.' + container.id);
|
1451 |
+
};
|
1452 |
+
|
1453 |
+
BaseSelection.prototype.position = function ($selection, $container) {
|
1454 |
+
var $selectionContainer = $container.find('.selection');
|
1455 |
+
$selectionContainer.append($selection);
|
1456 |
+
};
|
1457 |
+
|
1458 |
+
BaseSelection.prototype.destroy = function () {
|
1459 |
+
this._detachCloseHandler(this.container);
|
1460 |
+
};
|
1461 |
+
|
1462 |
+
BaseSelection.prototype.update = function (data) {
|
1463 |
+
throw new Error('The `update` method must be defined in child classes.');
|
1464 |
+
};
|
1465 |
+
|
1466 |
+
return BaseSelection;
|
1467 |
+
});
|
1468 |
+
|
1469 |
+
S2.define('select2/selection/single',[
|
1470 |
+
'jquery',
|
1471 |
+
'./base',
|
1472 |
+
'../utils',
|
1473 |
+
'../keys'
|
1474 |
+
], function ($, BaseSelection, Utils, KEYS) {
|
1475 |
+
function SingleSelection () {
|
1476 |
+
SingleSelection.__super__.constructor.apply(this, arguments);
|
1477 |
+
}
|
1478 |
+
|
1479 |
+
Utils.Extend(SingleSelection, BaseSelection);
|
1480 |
+
|
1481 |
+
SingleSelection.prototype.render = function () {
|
1482 |
+
var $selection = SingleSelection.__super__.render.call(this);
|
1483 |
+
|
1484 |
+
$selection.addClass('select2-selection--single');
|
1485 |
+
|
1486 |
+
$selection.html(
|
1487 |
+
'<span class="select2-selection__rendered"></span>' +
|
1488 |
+
'<span class="select2-selection__arrow" role="presentation">' +
|
1489 |
+
'<b role="presentation"></b>' +
|
1490 |
+
'</span>'
|
1491 |
+
);
|
1492 |
+
|
1493 |
+
return $selection;
|
1494 |
+
};
|
1495 |
+
|
1496 |
+
SingleSelection.prototype.bind = function (container, $container) {
|
1497 |
+
var self = this;
|
1498 |
+
|
1499 |
+
SingleSelection.__super__.bind.apply(this, arguments);
|
1500 |
+
|
1501 |
+
var id = container.id + '-container';
|
1502 |
+
|
1503 |
+
this.$selection.find('.select2-selection__rendered').attr('id', id);
|
1504 |
+
this.$selection.attr('aria-labelledby', id);
|
1505 |
+
|
1506 |
+
this.$selection.on('mousedown', function (evt) {
|
1507 |
+
// Only respond to left clicks
|
1508 |
+
if (evt.which !== 1) {
|
1509 |
+
return;
|
1510 |
+
}
|
1511 |
+
|
1512 |
+
self.trigger('toggle', {
|
1513 |
+
originalEvent: evt
|
1514 |
+
});
|
1515 |
+
});
|
1516 |
+
|
1517 |
+
this.$selection.on('focus', function (evt) {
|
1518 |
+
// User focuses on the container
|
1519 |
+
});
|
1520 |
+
|
1521 |
+
this.$selection.on('blur', function (evt) {
|
1522 |
+
// User exits the container
|
1523 |
+
});
|
1524 |
+
|
1525 |
+
container.on('focus', function (evt) {
|
1526 |
+
if (!container.isOpen()) {
|
1527 |
+
self.$selection.focus();
|
1528 |
+
}
|
1529 |
+
});
|
1530 |
+
|
1531 |
+
container.on('selection:update', function (params) {
|
1532 |
+
self.update(params.data);
|
1533 |
+
});
|
1534 |
+
};
|
1535 |
+
|
1536 |
+
SingleSelection.prototype.clear = function () {
|
1537 |
+
this.$selection.find('.select2-selection__rendered').empty();
|
1538 |
+
};
|
1539 |
+
|
1540 |
+
SingleSelection.prototype.display = function (data, container) {
|
1541 |
+
var template = this.options.get('templateSelection');
|
1542 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1543 |
+
|
1544 |
+
return escapeMarkup(template(data, container));
|
1545 |
+
};
|
1546 |
+
|
1547 |
+
SingleSelection.prototype.selectionContainer = function () {
|
1548 |
+
return $('<span></span>');
|
1549 |
+
};
|
1550 |
+
|
1551 |
+
SingleSelection.prototype.update = function (data) {
|
1552 |
+
if (data.length === 0) {
|
1553 |
+
this.clear();
|
1554 |
+
return;
|
1555 |
+
}
|
1556 |
+
|
1557 |
+
var selection = data[0];
|
1558 |
+
|
1559 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1560 |
+
var formatted = this.display(selection, $rendered);
|
1561 |
+
|
1562 |
+
$rendered.empty().append(formatted);
|
1563 |
+
$rendered.prop('title', selection.title || selection.text);
|
1564 |
+
};
|
1565 |
+
|
1566 |
+
return SingleSelection;
|
1567 |
+
});
|
1568 |
+
|
1569 |
+
S2.define('select2/selection/multiple',[
|
1570 |
+
'jquery',
|
1571 |
+
'./base',
|
1572 |
+
'../utils'
|
1573 |
+
], function ($, BaseSelection, Utils) {
|
1574 |
+
function MultipleSelection ($element, options) {
|
1575 |
+
MultipleSelection.__super__.constructor.apply(this, arguments);
|
1576 |
+
}
|
1577 |
+
|
1578 |
+
Utils.Extend(MultipleSelection, BaseSelection);
|
1579 |
+
|
1580 |
+
MultipleSelection.prototype.render = function () {
|
1581 |
+
var $selection = MultipleSelection.__super__.render.call(this);
|
1582 |
+
|
1583 |
+
$selection.addClass('select2-selection--multiple');
|
1584 |
+
|
1585 |
+
$selection.html(
|
1586 |
+
'<ul class="select2-selection__rendered"></ul>'
|
1587 |
+
);
|
1588 |
+
|
1589 |
+
return $selection;
|
1590 |
+
};
|
1591 |
+
|
1592 |
+
MultipleSelection.prototype.bind = function (container, $container) {
|
1593 |
+
var self = this;
|
1594 |
+
|
1595 |
+
MultipleSelection.__super__.bind.apply(this, arguments);
|
1596 |
+
|
1597 |
+
this.$selection.on('click', function (evt) {
|
1598 |
+
self.trigger('toggle', {
|
1599 |
+
originalEvent: evt
|
1600 |
+
});
|
1601 |
+
});
|
1602 |
+
|
1603 |
+
this.$selection.on(
|
1604 |
+
'click',
|
1605 |
+
'.select2-selection__choice__remove',
|
1606 |
+
function (evt) {
|
1607 |
+
// Ignore the event if it is disabled
|
1608 |
+
if (self.options.get('disabled')) {
|
1609 |
+
return;
|
1610 |
+
}
|
1611 |
+
|
1612 |
+
var $remove = $(this);
|
1613 |
+
var $selection = $remove.parent();
|
1614 |
+
|
1615 |
+
var data = $selection.data('data');
|
1616 |
+
|
1617 |
+
self.trigger('unselect', {
|
1618 |
+
originalEvent: evt,
|
1619 |
+
data: data
|
1620 |
+
});
|
1621 |
+
}
|
1622 |
+
);
|
1623 |
+
};
|
1624 |
+
|
1625 |
+
MultipleSelection.prototype.clear = function () {
|
1626 |
+
this.$selection.find('.select2-selection__rendered').empty();
|
1627 |
+
};
|
1628 |
+
|
1629 |
+
MultipleSelection.prototype.display = function (data, container) {
|
1630 |
+
var template = this.options.get('templateSelection');
|
1631 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1632 |
+
|
1633 |
+
return escapeMarkup(template(data, container));
|
1634 |
+
};
|
1635 |
+
|
1636 |
+
MultipleSelection.prototype.selectionContainer = function () {
|
1637 |
+
var $container = $(
|
1638 |
+
'<li class="select2-selection__choice">' +
|
1639 |
+
'<span class="select2-selection__choice__remove" role="presentation">' +
|
1640 |
+
'×' +
|
1641 |
+
'</span>' +
|
1642 |
+
'</li>'
|
1643 |
+
);
|
1644 |
+
|
1645 |
+
return $container;
|
1646 |
+
};
|
1647 |
+
|
1648 |
+
MultipleSelection.prototype.update = function (data) {
|
1649 |
+
this.clear();
|
1650 |
+
|
1651 |
+
if (data.length === 0) {
|
1652 |
+
return;
|
1653 |
+
}
|
1654 |
+
|
1655 |
+
var $selections = [];
|
1656 |
+
|
1657 |
+
for (var d = 0; d < data.length; d++) {
|
1658 |
+
var selection = data[d];
|
1659 |
+
|
1660 |
+
var $selection = this.selectionContainer();
|
1661 |
+
var formatted = this.display(selection, $selection);
|
1662 |
+
|
1663 |
+
$selection.append(formatted);
|
1664 |
+
$selection.prop('title', selection.title || selection.text);
|
1665 |
+
|
1666 |
+
$selection.data('data', selection);
|
1667 |
+
|
1668 |
+
$selections.push($selection);
|
1669 |
+
}
|
1670 |
+
|
1671 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1672 |
+
|
1673 |
+
Utils.appendMany($rendered, $selections);
|
1674 |
+
};
|
1675 |
+
|
1676 |
+
return MultipleSelection;
|
1677 |
+
});
|
1678 |
+
|
1679 |
+
S2.define('select2/selection/placeholder',[
|
1680 |
+
'../utils'
|
1681 |
+
], function (Utils) {
|
1682 |
+
function Placeholder (decorated, $element, options) {
|
1683 |
+
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
|
1684 |
+
|
1685 |
+
decorated.call(this, $element, options);
|
1686 |
+
}
|
1687 |
+
|
1688 |
+
Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
|
1689 |
+
if (typeof placeholder === 'string') {
|
1690 |
+
placeholder = {
|
1691 |
+
id: '',
|
1692 |
+
text: placeholder
|
1693 |
+
};
|
1694 |
+
}
|
1695 |
+
|
1696 |
+
return placeholder;
|
1697 |
+
};
|
1698 |
+
|
1699 |
+
Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
|
1700 |
+
var $placeholder = this.selectionContainer();
|
1701 |
+
|
1702 |
+
$placeholder.html(this.display(placeholder));
|
1703 |
+
$placeholder.addClass('select2-selection__placeholder')
|
1704 |
+
.removeClass('select2-selection__choice');
|
1705 |
+
|
1706 |
+
return $placeholder;
|
1707 |
+
};
|
1708 |
+
|
1709 |
+
Placeholder.prototype.update = function (decorated, data) {
|
1710 |
+
var singlePlaceholder = (
|
1711 |
+
data.length == 1 && data[0].id != this.placeholder.id
|
1712 |
+
);
|
1713 |
+
var multipleSelections = data.length > 1;
|
1714 |
+
|
1715 |
+
if (multipleSelections || singlePlaceholder) {
|
1716 |
+
return decorated.call(this, data);
|
1717 |
+
}
|
1718 |
+
|
1719 |
+
this.clear();
|
1720 |
+
|
1721 |
+
var $placeholder = this.createPlaceholder(this.placeholder);
|
1722 |
+
|
1723 |
+
this.$selection.find('.select2-selection__rendered').append($placeholder);
|
1724 |
+
};
|
1725 |
+
|
1726 |
+
return Placeholder;
|
1727 |
+
});
|
1728 |
+
|
1729 |
+
S2.define('select2/selection/allowClear',[
|
1730 |
+
'jquery',
|
1731 |
+
'../keys'
|
1732 |
+
], function ($, KEYS) {
|
1733 |
+
function AllowClear () { }
|
1734 |
+
|
1735 |
+
AllowClear.prototype.bind = function (decorated, container, $container) {
|
1736 |
+
var self = this;
|
1737 |
+
|
1738 |
+
decorated.call(this, container, $container);
|
1739 |
+
|
1740 |
+
if (this.placeholder == null) {
|
1741 |
+
if (this.options.get('debug') && window.console && console.error) {
|
1742 |
+
console.error(
|
1743 |
+
'Select2: The `allowClear` option should be used in combination ' +
|
1744 |
+
'with the `placeholder` option.'
|
1745 |
+
);
|
1746 |
+
}
|
1747 |
+
}
|
1748 |
+
|
1749 |
+
this.$selection.on('mousedown', '.select2-selection__clear',
|
1750 |
+
function (evt) {
|
1751 |
+
self._handleClear(evt);
|
1752 |
+
});
|
1753 |
+
|
1754 |
+
container.on('keypress', function (evt) {
|
1755 |
+
self._handleKeyboardClear(evt, container);
|
1756 |
+
});
|
1757 |
+
};
|
1758 |
+
|
1759 |
+
AllowClear.prototype._handleClear = function (_, evt) {
|
1760 |
+
// Ignore the event if it is disabled
|
1761 |
+
if (this.options.get('disabled')) {
|
1762 |
+
return;
|
1763 |
+
}
|
1764 |
+
|
1765 |
+
var $clear = this.$selection.find('.select2-selection__clear');
|
1766 |
+
|
1767 |
+
// Ignore the event if nothing has been selected
|
1768 |
+
if ($clear.length === 0) {
|
1769 |
+
return;
|
1770 |
+
}
|
1771 |
+
|
1772 |
+
evt.stopPropagation();
|
1773 |
+
|
1774 |
+
var data = $clear.data('data');
|
1775 |
+
|
1776 |
+
for (var d = 0; d < data.length; d++) {
|
1777 |
+
var unselectData = {
|
1778 |
+
data: data[d]
|
1779 |
+
};
|
1780 |
+
|
1781 |
+
// Trigger the `unselect` event, so people can prevent it from being
|
1782 |
+
// cleared.
|
1783 |
+
this.trigger('unselect', unselectData);
|
1784 |
+
|
1785 |
+
// If the event was prevented, don't clear it out.
|
1786 |
+
if (unselectData.prevented) {
|
1787 |
+
return;
|
1788 |
+
}
|
1789 |
+
}
|
1790 |
+
|
1791 |
+
this.$element.val(this.placeholder.id).trigger('change');
|
1792 |
+
|
1793 |
+
this.trigger('toggle', {});
|
1794 |
+
};
|
1795 |
+
|
1796 |
+
AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
|
1797 |
+
if (container.isOpen()) {
|
1798 |
+
return;
|
1799 |
+
}
|
1800 |
+
|
1801 |
+
if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
|
1802 |
+
this._handleClear(evt);
|
1803 |
+
}
|
1804 |
+
};
|
1805 |
+
|
1806 |
+
AllowClear.prototype.update = function (decorated, data) {
|
1807 |
+
decorated.call(this, data);
|
1808 |
+
|
1809 |
+
if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
|
1810 |
+
data.length === 0) {
|
1811 |
+
return;
|
1812 |
+
}
|
1813 |
+
|
1814 |
+
var $remove = $(
|
1815 |
+
'<span class="select2-selection__clear">' +
|
1816 |
+
'×' +
|
1817 |
+
'</span>'
|
1818 |
+
);
|
1819 |
+
$remove.data('data', data);
|
1820 |
+
|
1821 |
+
this.$selection.find('.select2-selection__rendered').prepend($remove);
|
1822 |
+
};
|
1823 |
+
|
1824 |
+
return AllowClear;
|
1825 |
+
});
|
1826 |
+
|
1827 |
+
S2.define('select2/selection/search',[
|
1828 |
+
'jquery',
|
1829 |
+
'../utils',
|
1830 |
+
'../keys'
|
1831 |
+
], function ($, Utils, KEYS) {
|
1832 |
+
function Search (decorated, $element, options) {
|
1833 |
+
decorated.call(this, $element, options);
|
1834 |
+
}
|
1835 |
+
|
1836 |
+
Search.prototype.render = function (decorated) {
|
1837 |
+
var $search = $(
|
1838 |
+
'<li class="select2-search select2-search--inline">' +
|
1839 |
+
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
1840 |
+
' autocomplete="off" autocorrect="off" autocapitalize="off"' +
|
1841 |
+
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
|
1842 |
+
'</li>'
|
1843 |
+
);
|
1844 |
+
|
1845 |
+
this.$searchContainer = $search;
|
1846 |
+
this.$search = $search.find('input');
|
1847 |
+
|
1848 |
+
var $rendered = decorated.call(this);
|
1849 |
+
|
1850 |
+
this._transferTabIndex();
|
1851 |
+
|
1852 |
+
return $rendered;
|
1853 |
+
};
|
1854 |
+
|
1855 |
+
Search.prototype.bind = function (decorated, container, $container) {
|
1856 |
+
var self = this;
|
1857 |
+
|
1858 |
+
decorated.call(this, container, $container);
|
1859 |
+
|
1860 |
+
container.on('open', function () {
|
1861 |
+
self.$search.trigger('focus');
|
1862 |
+
});
|
1863 |
+
|
1864 |
+
container.on('close', function () {
|
1865 |
+
self.$search.val('');
|
1866 |
+
self.$search.removeAttr('aria-activedescendant');
|
1867 |
+
self.$search.trigger('focus');
|
1868 |
+
});
|
1869 |
+
|
1870 |
+
container.on('enable', function () {
|
1871 |
+
self.$search.prop('disabled', false);
|
1872 |
+
|
1873 |
+
self._transferTabIndex();
|
1874 |
+
});
|
1875 |
+
|
1876 |
+
container.on('disable', function () {
|
1877 |
+
self.$search.prop('disabled', true);
|
1878 |
+
});
|
1879 |
+
|
1880 |
+
container.on('focus', function (evt) {
|
1881 |
+
self.$search.trigger('focus');
|
1882 |
+
});
|
1883 |
+
|
1884 |
+
container.on('results:focus', function (params) {
|
1885 |
+
self.$search.attr('aria-activedescendant', params.id);
|
1886 |
+
});
|
1887 |
+
|
1888 |
+
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
1889 |
+
self.trigger('focus', evt);
|
1890 |
+
});
|
1891 |
+
|
1892 |
+
this.$selection.on('focusout', '.select2-search--inline', function (evt) {
|
1893 |
+
self._handleBlur(evt);
|
1894 |
+
});
|
1895 |
+
|
1896 |
+
this.$selection.on('keydown', '.select2-search--inline', function (evt) {
|
1897 |
+
evt.stopPropagation();
|
1898 |
+
|
1899 |
+
self.trigger('keypress', evt);
|
1900 |
+
|
1901 |
+
self._keyUpPrevented = evt.isDefaultPrevented();
|
1902 |
+
|
1903 |
+
var key = evt.which;
|
1904 |
+
|
1905 |
+
if (key === KEYS.BACKSPACE && self.$search.val() === '') {
|
1906 |
+
var $previousChoice = self.$searchContainer
|
1907 |
+
.prev('.select2-selection__choice');
|
1908 |
+
|
1909 |
+
if ($previousChoice.length > 0) {
|
1910 |
+
var item = $previousChoice.data('data');
|
1911 |
+
|
1912 |
+
self.searchRemoveChoice(item);
|
1913 |
+
|
1914 |
+
evt.preventDefault();
|
1915 |
+
}
|
1916 |
+
}
|
1917 |
+
});
|
1918 |
+
|
1919 |
+
// Try to detect the IE version should the `documentMode` property that
|
1920 |
+
// is stored on the document. This is only implemented in IE and is
|
1921 |
+
// slightly cleaner than doing a user agent check.
|
1922 |
+
// This property is not available in Edge, but Edge also doesn't have
|
1923 |
+
// this bug.
|
1924 |
+
var msie = document.documentMode;
|
1925 |
+
var disableInputEvents = msie && msie <= 11;
|
1926 |
+
|
1927 |
+
// Workaround for browsers which do not support the `input` event
|
1928 |
+
// This will prevent double-triggering of events for browsers which support
|
1929 |
+
// both the `keyup` and `input` events.
|
1930 |
+
this.$selection.on(
|
1931 |
+
'input.searchcheck',
|
1932 |
+
'.select2-search--inline',
|
1933 |
+
function (evt) {
|
1934 |
+
// IE will trigger the `input` event when a placeholder is used on a
|
1935 |
+
// search box. To get around this issue, we are forced to ignore all
|
1936 |
+
// `input` events in IE and keep using `keyup`.
|
1937 |
+
if (disableInputEvents) {
|
1938 |
+
self.$selection.off('input.search input.searchcheck');
|
1939 |
+
return;
|
1940 |
+
}
|
1941 |
+
|
1942 |
+
// Unbind the duplicated `keyup` event
|
1943 |
+
self.$selection.off('keyup.search');
|
1944 |
+
}
|
1945 |
+
);
|
1946 |
+
|
1947 |
+
this.$selection.on(
|
1948 |
+
'keyup.search input.search',
|
1949 |
+
'.select2-search--inline',
|
1950 |
+
function (evt) {
|
1951 |
+
// IE will trigger the `input` event when a placeholder is used on a
|
1952 |
+
// search box. To get around this issue, we are forced to ignore all
|
1953 |
+
// `input` events in IE and keep using `keyup`.
|
1954 |
+
if (disableInputEvents && evt.type === 'input') {
|
1955 |
+
self.$selection.off('input.search input.searchcheck');
|
1956 |
+
return;
|
1957 |
+
}
|
1958 |
+
|
1959 |
+
var key = evt.which;
|
1960 |
+
|
1961 |
+
// We can freely ignore events from modifier keys
|
1962 |
+
if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
|
1963 |
+
return;
|
1964 |
+
}
|
1965 |
+
|
1966 |
+
// Tabbing will be handled during the `keydown` phase
|
1967 |
+
if (key == KEYS.TAB) {
|
1968 |
+
return;
|
1969 |
+
}
|
1970 |
+
|
1971 |
+
self.handleSearch(evt);
|
1972 |
+
}
|
1973 |
+
);
|
1974 |
+
};
|
1975 |
+
|
1976 |
+
/**
|
1977 |
+
* This method will transfer the tabindex attribute from the rendered
|
1978 |
+
* selection to the search box. This allows for the search box to be used as
|
1979 |
+
* the primary focus instead of the selection container.
|
1980 |
+
*
|
1981 |
+
* @private
|
1982 |
+
*/
|
1983 |
+
Search.prototype._transferTabIndex = function (decorated) {
|
1984 |
+
this.$search.attr('tabindex', this.$selection.attr('tabindex'));
|
1985 |
+
this.$selection.attr('tabindex', '-1');
|
1986 |
+
};
|
1987 |
+
|
1988 |
+
Search.prototype.createPlaceholder = function (decorated, placeholder) {
|
1989 |
+
this.$search.attr('placeholder', placeholder.text);
|
1990 |
+
};
|
1991 |
+
|
1992 |
+
Search.prototype.update = function (decorated, data) {
|
1993 |
+
var searchHadFocus = this.$search[0] == document.activeElement;
|
1994 |
+
|
1995 |
+
this.$search.attr('placeholder', '');
|
1996 |
+
|
1997 |
+
decorated.call(this, data);
|
1998 |
+
|
1999 |
+
this.$selection.find('.select2-selection__rendered')
|
2000 |
+
.append(this.$searchContainer);
|
2001 |
+
|
2002 |
+
this.resizeSearch();
|
2003 |
+
if (searchHadFocus) {
|
2004 |
+
this.$search.focus();
|
2005 |
+
}
|
2006 |
+
};
|
2007 |
+
|
2008 |
+
Search.prototype.handleSearch = function () {
|
2009 |
+
this.resizeSearch();
|
2010 |
+
|
2011 |
+
if (!this._keyUpPrevented) {
|
2012 |
+
var input = this.$search.val();
|
2013 |
+
|
2014 |
+
this.trigger('query', {
|
2015 |
+
term: input
|
2016 |
+
});
|
2017 |
+
}
|
2018 |
+
|
2019 |
+
this._keyUpPrevented = false;
|
2020 |
+
};
|
2021 |
+
|
2022 |
+
Search.prototype.searchRemoveChoice = function (decorated, item) {
|
2023 |
+
this.trigger('unselect', {
|
2024 |
+
data: item
|
2025 |
+
});
|
2026 |
+
|
2027 |
+
this.$search.val(item.text);
|
2028 |
+
this.handleSearch();
|
2029 |
+
};
|
2030 |
+
|
2031 |
+
Search.prototype.resizeSearch = function () {
|
2032 |
+
this.$search.css('width', '25px');
|
2033 |
+
|
2034 |
+
var width = '';
|
2035 |
+
|
2036 |
+
if (this.$search.attr('placeholder') !== '') {
|
2037 |
+
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
2038 |
+
} else {
|
2039 |
+
var minimumWidth = this.$search.val().length + 1;
|
2040 |
+
|
2041 |
+
width = (minimumWidth * 0.75) + 'em';
|
2042 |
+
}
|
2043 |
+
|
2044 |
+
this.$search.css('width', width);
|
2045 |
+
};
|
2046 |
+
|
2047 |
+
return Search;
|
2048 |
+
});
|
2049 |
+
|
2050 |
+
S2.define('select2/selection/eventRelay',[
|
2051 |
+
'jquery'
|
2052 |
+
], function ($) {
|
2053 |
+
function EventRelay () { }
|
2054 |
+
|
2055 |
+
EventRelay.prototype.bind = function (decorated, container, $container) {
|
2056 |
+
var self = this;
|
2057 |
+
var relayEvents = [
|
2058 |
+
'open', 'opening',
|
2059 |
+
'close', 'closing',
|
2060 |
+
'select', 'selecting',
|
2061 |
+
'unselect', 'unselecting'
|
2062 |
+
];
|
2063 |
+
|
2064 |
+
var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
|
2065 |
+
|
2066 |
+
decorated.call(this, container, $container);
|
2067 |
+
|
2068 |
+
container.on('*', function (name, params) {
|
2069 |
+
// Ignore events that should not be relayed
|
2070 |
+
if ($.inArray(name, relayEvents) === -1) {
|
2071 |
+
return;
|
2072 |
+
}
|
2073 |
+
|
2074 |
+
// The parameters should always be an object
|
2075 |
+
params = params || {};
|
2076 |
+
|
2077 |
+
// Generate the jQuery event for the Select2 event
|
2078 |
+
var evt = $.Event('select2:' + name, {
|
2079 |
+
params: params
|
2080 |
+
});
|
2081 |
+
|
2082 |
+
self.$element.trigger(evt);
|
2083 |
+
|
2084 |
+
// Only handle preventable events if it was one
|
2085 |
+
if ($.inArray(name, preventableEvents) === -1) {
|
2086 |
+
return;
|
2087 |
+
}
|
2088 |
+
|
2089 |
+
params.prevented = evt.isDefaultPrevented();
|
2090 |
+
});
|
2091 |
+
};
|
2092 |
+
|
2093 |
+
return EventRelay;
|
2094 |
+
});
|
2095 |
+
|
2096 |
+
S2.define('select2/translation',[
|
2097 |
+
'jquery',
|
2098 |
+
'require'
|
2099 |
+
], function ($, require) {
|
2100 |
+
function Translation (dict) {
|
2101 |
+
this.dict = dict || {};
|
2102 |
+
}
|
2103 |
+
|
2104 |
+
Translation.prototype.all = function () {
|
2105 |
+
return this.dict;
|
2106 |
+
};
|
2107 |
+
|
2108 |
+
Translation.prototype.get = function (key) {
|
2109 |
+
return this.dict[key];
|
2110 |
+
};
|
2111 |
+
|
2112 |
+
Translation.prototype.extend = function (translation) {
|
2113 |
+
this.dict = $.extend({}, translation.all(), this.dict);
|
2114 |
+
};
|
2115 |
+
|
2116 |
+
// Static functions
|
2117 |
+
|
2118 |
+
Translation._cache = {};
|
2119 |
+
|
2120 |
+
Translation.loadPath = function (path) {
|
2121 |
+
if (!(path in Translation._cache)) {
|
2122 |
+
var translations = require(path);
|
2123 |
+
|
2124 |
+
Translation._cache[path] = translations;
|
2125 |
+
}
|
2126 |
+
|
2127 |
+
return new Translation(Translation._cache[path]);
|
2128 |
+
};
|
2129 |
+
|
2130 |
+
return Translation;
|
2131 |
+
});
|
2132 |
+
|
2133 |
+
S2.define('select2/diacritics',[
|
2134 |
+
|
2135 |
+
], function () {
|
2136 |
+
var diacritics = {
|
2137 |
+
'\u24B6': 'A',
|
2138 |
+
'\uFF21': 'A',
|
2139 |
+
'\u00C0': 'A',
|
2140 |
+
'\u00C1': 'A',
|
2141 |
+
'\u00C2': 'A',
|
2142 |
+
'\u1EA6': 'A',
|
2143 |
+
'\u1EA4': 'A',
|
2144 |
+
'\u1EAA': 'A',
|
2145 |
+
'\u1EA8': 'A',
|
2146 |
+
'\u00C3': 'A',
|
2147 |
+
'\u0100': 'A',
|
2148 |
+
'\u0102': 'A',
|
2149 |
+
'\u1EB0': 'A',
|
2150 |
+
'\u1EAE': 'A',
|
2151 |
+
'\u1EB4': 'A',
|
2152 |
+
'\u1EB2': 'A',
|
2153 |
+
'\u0226': 'A',
|
2154 |
+
'\u01E0': 'A',
|
2155 |
+
'\u00C4': 'A',
|
2156 |
+
'\u01DE': 'A',
|
2157 |
+
'\u1EA2': 'A',
|
2158 |
+
'\u00C5': 'A',
|
2159 |
+
'\u01FA': 'A',
|
2160 |
+
'\u01CD': 'A',
|
2161 |
+
'\u0200': 'A',
|
2162 |
+
'\u0202': 'A',
|
2163 |
+
'\u1EA0': 'A',
|
2164 |
+
'\u1EAC': 'A',
|
2165 |
+
'\u1EB6': 'A',
|
2166 |
+
'\u1E00': 'A',
|
2167 |
+
'\u0104': 'A',
|
2168 |
+
'\u023A': 'A',
|
2169 |
+
'\u2C6F': 'A',
|
2170 |
+
'\uA732': 'AA',
|
2171 |
+
'\u00C6': 'AE',
|
2172 |
+
'\u01FC': 'AE',
|
2173 |
+
'\u01E2': 'AE',
|
2174 |
+
'\uA734': 'AO',
|
2175 |
+
'\uA736': 'AU',
|
2176 |
+
'\uA738': 'AV',
|
2177 |
+
'\uA73A': 'AV',
|
2178 |
+
'\uA73C': 'AY',
|
2179 |
+
'\u24B7': 'B',
|
2180 |
+
'\uFF22': 'B',
|
2181 |
+
'\u1E02': 'B',
|
2182 |
+
'\u1E04': 'B',
|
2183 |
+
'\u1E06': 'B',
|
2184 |
+
'\u0243': 'B',
|
2185 |
+
'\u0182': 'B',
|
2186 |
+
'\u0181': 'B',
|
2187 |
+
'\u24B8': 'C',
|
2188 |
+
'\uFF23': 'C',
|
2189 |
+
'\u0106': 'C',
|
2190 |
+
'\u0108': 'C',
|
2191 |
+
'\u010A': 'C',
|
2192 |
+
'\u010C': 'C',
|
2193 |
+
'\u00C7': 'C',
|
2194 |
+
'\u1E08': 'C',
|
2195 |
+
'\u0187': 'C',
|
2196 |
+
'\u023B': 'C',
|
2197 |
+
'\uA73E': 'C',
|
2198 |
+
'\u24B9': 'D',
|
2199 |
+
'\uFF24': 'D',
|
2200 |
+
'\u1E0A': 'D',
|
2201 |
+
'\u010E': 'D',
|
2202 |
+
'\u1E0C': 'D',
|
2203 |
+
'\u1E10': 'D',
|
2204 |
+
'\u1E12': 'D',
|
2205 |
+
'\u1E0E': 'D',
|
2206 |
+
'\u0110': 'D',
|
2207 |
+
'\u018B': 'D',
|
2208 |
+
'\u018A': 'D',
|
2209 |
+
'\u0189': 'D',
|
2210 |
+
'\uA779': 'D',
|
2211 |
+
'\u01F1': 'DZ',
|
2212 |
+
'\u01C4': 'DZ',
|
2213 |
+
'\u01F2': 'Dz',
|
2214 |
+
'\u01C5': 'Dz',
|
2215 |
+
'\u24BA': 'E',
|
2216 |
+
'\uFF25': 'E',
|
2217 |
+
'\u00C8': 'E',
|
2218 |
+
'\u00C9': 'E',
|
2219 |
+
'\u00CA': 'E',
|
2220 |
+
'\u1EC0': 'E',
|
2221 |
+
'\u1EBE': 'E',
|
2222 |
+
'\u1EC4': 'E',
|
2223 |
+
'\u1EC2': 'E',
|
2224 |
+
'\u1EBC': 'E',
|
2225 |
+
'\u0112': 'E',
|
2226 |
+
'\u1E14': 'E',
|
2227 |
+
'\u1E16': 'E',
|
2228 |
+
'\u0114': 'E',
|
2229 |
+
'\u0116': 'E',
|
2230 |
+
'\u00CB': 'E',
|
2231 |
+
'\u1EBA': 'E',
|
2232 |
+
'\u011A': 'E',
|
2233 |
+
'\u0204': 'E',
|
2234 |
+
'\u0206': 'E',
|
2235 |
+
'\u1EB8': 'E',
|
2236 |
+
'\u1EC6': 'E',
|
2237 |
+
'\u0228': 'E',
|
2238 |
+
'\u1E1C': 'E',
|
2239 |
+
'\u0118': 'E',
|
2240 |
+
'\u1E18': 'E',
|
2241 |
+
'\u1E1A': 'E',
|
2242 |
+
'\u0190': 'E',
|
2243 |
+
'\u018E': 'E',
|
2244 |
+
'\u24BB': 'F',
|
2245 |
+
'\uFF26': 'F',
|
2246 |
+
'\u1E1E': 'F',
|
2247 |
+
'\u0191': 'F',
|
2248 |
+
'\uA77B': 'F',
|
2249 |
+
'\u24BC': 'G',
|
2250 |
+
'\uFF27': 'G',
|
2251 |
+
'\u01F4': 'G',
|
2252 |
+
'\u011C': 'G',
|
2253 |
+
'\u1E20': 'G',
|
2254 |
+
'\u011E': 'G',
|
2255 |
+
'\u0120': 'G',
|
2256 |
+
'\u01E6': 'G',
|
2257 |
+
'\u0122': 'G',
|
2258 |
+
'\u01E4': 'G',
|
2259 |
+
'\u0193': 'G',
|
2260 |
+
'\uA7A0': 'G',
|
2261 |
+
'\uA77D': 'G',
|
2262 |
+
'\uA77E': 'G',
|
2263 |
+
'\u24BD': 'H',
|
2264 |
+
'\uFF28': 'H',
|
2265 |
+
'\u0124': 'H',
|
2266 |
+
'\u1E22': 'H',
|
2267 |
+
'\u1E26': 'H',
|
2268 |
+
'\u021E': 'H',
|
2269 |
+
'\u1E24': 'H',
|
2270 |
+
'\u1E28': 'H',
|
2271 |
+
'\u1E2A': 'H',
|
2272 |
+
'\u0126': 'H',
|
2273 |
+
'\u2C67': 'H',
|
2274 |
+
'\u2C75': 'H',
|
2275 |
+
'\uA78D': 'H',
|
2276 |
+
'\u24BE': 'I',
|
2277 |
+
'\uFF29': 'I',
|
2278 |
+
'\u00CC': 'I',
|
2279 |
+
'\u00CD': 'I',
|
2280 |
+
'\u00CE': 'I',
|
2281 |
+
'\u0128': 'I',
|
2282 |
+
'\u012A': 'I',
|
2283 |
+
'\u012C': 'I',
|
2284 |
+
'\u0130': 'I',
|
2285 |
+
'\u00CF': 'I',
|
2286 |
+
'\u1E2E': 'I',
|
2287 |
+
'\u1EC8': 'I',
|
2288 |
+
'\u01CF': 'I',
|
2289 |
+
'\u0208': 'I',
|
2290 |
+
'\u020A': 'I',
|
2291 |
+
'\u1ECA': 'I',
|
2292 |
+
'\u012E': 'I',
|
2293 |
+
'\u1E2C': 'I',
|
2294 |
+
'\u0197': 'I',
|
2295 |
+
'\u24BF': 'J',
|
2296 |
+
'\uFF2A': 'J',
|
2297 |
+
'\u0134': 'J',
|
2298 |
+
'\u0248': 'J',
|
2299 |
+
'\u24C0': 'K',
|
2300 |
+
'\uFF2B': 'K',
|
2301 |
+
'\u1E30': 'K',
|
2302 |
+
'\u01E8': 'K',
|
2303 |
+
'\u1E32': 'K',
|
2304 |
+
'\u0136': 'K',
|
2305 |
+
'\u1E34': 'K',
|
2306 |
+
'\u0198': 'K',
|
2307 |
+
'\u2C69': 'K',
|
2308 |
+
'\uA740': 'K',
|
2309 |
+
'\uA742': 'K',
|
2310 |
+
'\uA744': 'K',
|
2311 |
+
'\uA7A2': 'K',
|
2312 |
+
'\u24C1': 'L',
|
2313 |
+
'\uFF2C': 'L',
|
2314 |
+
'\u013F': 'L',
|
2315 |
+
'\u0139': 'L',
|
2316 |
+
'\u013D': 'L',
|
2317 |
+
'\u1E36': 'L',
|
2318 |
+
'\u1E38': 'L',
|
2319 |
+
'\u013B': 'L',
|
2320 |
+
'\u1E3C': 'L',
|
2321 |
+
'\u1E3A': 'L',
|
2322 |
+
'\u0141': 'L',
|
2323 |
+
'\u023D': 'L',
|
2324 |
+
'\u2C62': 'L',
|
2325 |
+
'\u2C60': 'L',
|
2326 |
+
'\uA748': 'L',
|
2327 |
+
'\uA746': 'L',
|
2328 |
+
'\uA780': 'L',
|
2329 |
+
'\u01C7': 'LJ',
|
2330 |
+
'\u01C8': 'Lj',
|
2331 |
+
'\u24C2': 'M',
|
2332 |
+
'\uFF2D': 'M',
|
2333 |
+
'\u1E3E': 'M',
|
2334 |
+
'\u1E40': 'M',
|
2335 |
+
'\u1E42': 'M',
|
2336 |
+
'\u2C6E': 'M',
|
2337 |
+
'\u019C': 'M',
|
2338 |
+
'\u24C3': 'N',
|
2339 |
+
'\uFF2E': 'N',
|
2340 |
+
'\u01F8': 'N',
|
2341 |
+
'\u0143': 'N',
|
2342 |
+
'\u00D1': 'N',
|
2343 |
+
'\u1E44': 'N',
|
2344 |
+
'\u0147': 'N',
|
2345 |
+
'\u1E46': 'N',
|
2346 |
+
'\u0145': 'N',
|
2347 |
+
'\u1E4A': 'N',
|
2348 |
+
'\u1E48': 'N',
|
2349 |
+
'\u0220': 'N',
|
2350 |
+
'\u019D': 'N',
|
2351 |
+
'\uA790': 'N',
|
2352 |
+
'\uA7A4': 'N',
|
2353 |
+
'\u01CA': 'NJ',
|
2354 |
+
'\u01CB': 'Nj',
|
2355 |
+
'\u24C4': 'O',
|
2356 |
+
'\uFF2F': 'O',
|
2357 |
+
'\u00D2': 'O',
|
2358 |
+
'\u00D3': 'O',
|
2359 |
+
'\u00D4': 'O',
|
2360 |
+
'\u1ED2': 'O',
|
2361 |
+
'\u1ED0': 'O',
|
2362 |
+
'\u1ED6': 'O',
|
2363 |
+
'\u1ED4': 'O',
|
2364 |
+
'\u00D5': 'O',
|
2365 |
+
'\u1E4C': 'O',
|
2366 |
+
'\u022C': 'O',
|
2367 |
+
'\u1E4E': 'O',
|
2368 |
+
'\u014C': 'O',
|
2369 |
+
'\u1E50': 'O',
|
2370 |
+
'\u1E52': 'O',
|
2371 |
+
'\u014E': 'O',
|
2372 |
+
'\u022E': 'O',
|
2373 |
+
'\u0230': 'O',
|
2374 |
+
'\u00D6': 'O',
|
2375 |
+
'\u022A': 'O',
|
2376 |
+
'\u1ECE': 'O',
|
2377 |
+
'\u0150': 'O',
|
2378 |
+
'\u01D1': 'O',
|
2379 |
+
'\u020C': 'O',
|
2380 |
+
'\u020E': 'O',
|
2381 |
+
'\u01A0': 'O',
|
2382 |
+
'\u1EDC': 'O',
|
2383 |
+
'\u1EDA': 'O',
|
2384 |
+
'\u1EE0': 'O',
|
2385 |
+
'\u1EDE': 'O',
|
2386 |
+
'\u1EE2': 'O',
|
2387 |
+
'\u1ECC': 'O',
|
2388 |
+
'\u1ED8': 'O',
|
2389 |
+
'\u01EA': 'O',
|
2390 |
+
'\u01EC': 'O',
|
2391 |
+
'\u00D8': 'O',
|
2392 |
+
'\u01FE': 'O',
|
2393 |
+
'\u0186': 'O',
|
2394 |
+
'\u019F': 'O',
|
2395 |
+
'\uA74A': 'O',
|
2396 |
+
'\uA74C': 'O',
|
2397 |
+
'\u01A2': 'OI',
|
2398 |
+
'\uA74E': 'OO',
|
2399 |
+
'\u0222': 'OU',
|
2400 |
+
'\u24C5': 'P',
|
2401 |
+
'\uFF30': 'P',
|
2402 |
+
'\u1E54': 'P',
|
2403 |
+
'\u1E56': 'P',
|
2404 |
+
'\u01A4': 'P',
|
2405 |
+
'\u2C63': 'P',
|
2406 |
+
'\uA750': 'P',
|
2407 |
+
'\uA752': 'P',
|
2408 |
+
'\uA754': 'P',
|
2409 |
+
'\u24C6': 'Q',
|
2410 |
+
'\uFF31': 'Q',
|
2411 |
+
'\uA756': 'Q',
|
2412 |
+
'\uA758': 'Q',
|
2413 |
+
'\u024A': 'Q',
|
2414 |
+
'\u24C7': 'R',
|
2415 |
+
'\uFF32': 'R',
|
2416 |
+
'\u0154': 'R',
|
2417 |
+
'\u1E58': 'R',
|
2418 |
+
'\u0158': 'R',
|
2419 |
+
'\u0210': 'R',
|
2420 |
+
'\u0212': 'R',
|
2421 |
+
'\u1E5A': 'R',
|
2422 |
+
'\u1E5C': 'R',
|
2423 |
+
'\u0156': 'R',
|
2424 |
+
'\u1E5E': 'R',
|
2425 |
+
'\u024C': 'R',
|
2426 |
+
'\u2C64': 'R',
|
2427 |
+
'\uA75A': 'R',
|
2428 |
+
'\uA7A6': 'R',
|
2429 |
+
'\uA782': 'R',
|
2430 |
+
'\u24C8': 'S',
|
2431 |
+
'\uFF33': 'S',
|
2432 |
+
'\u1E9E': 'S',
|
2433 |
+
'\u015A': 'S',
|
2434 |
+
'\u1E64': 'S',
|
2435 |
+
'\u015C': 'S',
|
2436 |
+
'\u1E60': 'S',
|
2437 |
+
'\u0160': 'S',
|
2438 |
+
'\u1E66': 'S',
|
2439 |
+
'\u1E62': 'S',
|
2440 |
+
'\u1E68': 'S',
|
2441 |
+
'\u0218': 'S',
|
2442 |
+
'\u015E': 'S',
|
2443 |
+
'\u2C7E': 'S',
|
2444 |
+
'\uA7A8': 'S',
|
2445 |
+
'\uA784': 'S',
|
2446 |
+
'\u24C9': 'T',
|
2447 |
+
'\uFF34': 'T',
|
2448 |
+
'\u1E6A': 'T',
|
2449 |
+
'\u0164': 'T',
|
2450 |
+
'\u1E6C': 'T',
|
2451 |
+
'\u021A': 'T',
|
2452 |
+
'\u0162': 'T',
|
2453 |
+
'\u1E70': 'T',
|
2454 |
+
'\u1E6E': 'T',
|
2455 |
+
'\u0166': 'T',
|
2456 |
+
'\u01AC': 'T',
|
2457 |
+
'\u01AE': 'T',
|
2458 |
+
'\u023E': 'T',
|
2459 |
+
'\uA786': 'T',
|
2460 |
+
'\uA728': 'TZ',
|
2461 |
+
'\u24CA': 'U',
|
2462 |
+
'\uFF35': 'U',
|
2463 |
+
'\u00D9': 'U',
|
2464 |
+
'\u00DA': 'U',
|
2465 |
+
'\u00DB': 'U',
|
2466 |
+
'\u0168': 'U',
|
2467 |
+
'\u1E78': 'U',
|
2468 |
+
'\u016A': 'U',
|
2469 |
+
'\u1E7A': 'U',
|
2470 |
+
'\u016C': 'U',
|
2471 |
+
'\u00DC': 'U',
|
2472 |
+
'\u01DB': 'U',
|
2473 |
+
'\u01D7': 'U',
|
2474 |
+
'\u01D5': 'U',
|
2475 |
+
'\u01D9': 'U',
|
2476 |
+
'\u1EE6': 'U',
|
2477 |
+
'\u016E': 'U',
|
2478 |
+
'\u0170': 'U',
|
2479 |
+
'\u01D3': 'U',
|
2480 |
+
'\u0214': 'U',
|
2481 |
+
'\u0216': 'U',
|
2482 |
+
'\u01AF': 'U',
|
2483 |
+
'\u1EEA': 'U',
|
2484 |
+
'\u1EE8': 'U',
|
2485 |
+
'\u1EEE': 'U',
|
2486 |
+
'\u1EEC': 'U',
|
2487 |
+
'\u1EF0': 'U',
|
2488 |
+
'\u1EE4': 'U',
|
2489 |
+
'\u1E72': 'U',
|
2490 |
+
'\u0172': 'U',
|
2491 |
+
'\u1E76': 'U',
|
2492 |
+
'\u1E74': 'U',
|
2493 |
+
'\u0244': 'U',
|
2494 |
+
'\u24CB': 'V',
|
2495 |
+
'\uFF36': 'V',
|
2496 |
+
'\u1E7C': 'V',
|
2497 |
+
'\u1E7E': 'V',
|
2498 |
+
'\u01B2': 'V',
|
2499 |
+
'\uA75E': 'V',
|
2500 |
+
'\u0245': 'V',
|
2501 |
+
'\uA760': 'VY',
|
2502 |
+
'\u24CC': 'W',
|
2503 |
+
'\uFF37': 'W',
|
2504 |
+
'\u1E80': 'W',
|
2505 |
+
'\u1E82': 'W',
|
2506 |
+
'\u0174': 'W',
|
2507 |
+
'\u1E86': 'W',
|
2508 |
+
'\u1E84': 'W',
|
2509 |
+
'\u1E88': 'W',
|
2510 |
+
'\u2C72': 'W',
|
2511 |
+
'\u24CD': 'X',
|
2512 |
+
'\uFF38': 'X',
|
2513 |
+
'\u1E8A': 'X',
|
2514 |
+
'\u1E8C': 'X',
|
2515 |
+
'\u24CE': 'Y',
|
2516 |
+
'\uFF39': 'Y',
|
2517 |
+
'\u1EF2': 'Y',
|
2518 |
+
'\u00DD': 'Y',
|
2519 |
+
'\u0176': 'Y',
|
2520 |
+
'\u1EF8': 'Y',
|
2521 |
+
'\u0232': 'Y',
|
2522 |
+
'\u1E8E': 'Y',
|
2523 |
+
'\u0178': 'Y',
|
2524 |
+
'\u1EF6': 'Y',
|
2525 |
+
'\u1EF4': 'Y',
|
2526 |
+
'\u01B3': 'Y',
|
2527 |
+
'\u024E': 'Y',
|
2528 |
+
'\u1EFE': 'Y',
|
2529 |
+
'\u24CF': 'Z',
|
2530 |
+
'\uFF3A': 'Z',
|
2531 |
+
'\u0179': 'Z',
|
2532 |
+
'\u1E90': 'Z',
|
2533 |
+
'\u017B': 'Z',
|
2534 |
+
'\u017D': 'Z',
|
2535 |
+
'\u1E92': 'Z',
|
2536 |
+
'\u1E94': 'Z',
|
2537 |
+
'\u01B5': 'Z',
|
2538 |
+
'\u0224': 'Z',
|
2539 |
+
'\u2C7F': 'Z',
|
2540 |
+
'\u2C6B': 'Z',
|
2541 |
+
'\uA762': 'Z',
|
2542 |
+
'\u24D0': 'a',
|
2543 |
+
'\uFF41': 'a',
|
2544 |
+
'\u1E9A': 'a',
|
2545 |
+
'\u00E0': 'a',
|
2546 |
+
'\u00E1': 'a',
|
2547 |
+
'\u00E2': 'a',
|
2548 |
+
'\u1EA7': 'a',
|
2549 |
+
'\u1EA5': 'a',
|
2550 |
+
'\u1EAB': 'a',
|
2551 |
+
'\u1EA9': 'a',
|
2552 |
+
'\u00E3': 'a',
|
2553 |
+
'\u0101': 'a',
|
2554 |
+
'\u0103': 'a',
|
2555 |
+
'\u1EB1': 'a',
|
2556 |
+
'\u1EAF': 'a',
|
2557 |
+
'\u1EB5': 'a',
|
2558 |
+
'\u1EB3': 'a',
|
2559 |
+
'\u0227': 'a',
|
2560 |
+
'\u01E1': 'a',
|
2561 |
+
'\u00E4': 'a',
|
2562 |
+
'\u01DF': 'a',
|
2563 |
+
'\u1EA3': 'a',
|
2564 |
+
'\u00E5': 'a',
|
2565 |
+
'\u01FB': 'a',
|
2566 |
+
'\u01CE': 'a',
|
2567 |
+
'\u0201': 'a',
|
2568 |
+
'\u0203': 'a',
|
2569 |
+
'\u1EA1': 'a',
|
2570 |
+
'\u1EAD': 'a',
|
2571 |
+
'\u1EB7': 'a',
|
2572 |
+
'\u1E01': 'a',
|
2573 |
+
'\u0105': 'a',
|
2574 |
+
'\u2C65': 'a',
|
2575 |
+
'\u0250': 'a',
|
2576 |
+
'\uA733': 'aa',
|
2577 |
+
'\u00E6': 'ae',
|
2578 |
+
'\u01FD': 'ae',
|
2579 |
+
'\u01E3': 'ae',
|
2580 |
+
'\uA735': 'ao',
|
2581 |
+
'\uA737': 'au',
|
2582 |
+
'\uA739': 'av',
|
2583 |
+
'\uA73B': 'av',
|
2584 |
+
'\uA73D': 'ay',
|
2585 |
+
'\u24D1': 'b',
|
2586 |
+
'\uFF42': 'b',
|
2587 |
+
'\u1E03': 'b',
|
2588 |
+
'\u1E05': 'b',
|
2589 |
+
'\u1E07': 'b',
|
2590 |
+
'\u0180': 'b',
|
2591 |
+
'\u0183': 'b',
|
2592 |
+
'\u0253': 'b',
|
2593 |
+
'\u24D2': 'c',
|
2594 |
+
'\uFF43': 'c',
|
2595 |
+
'\u0107': 'c',
|
2596 |
+
'\u0109': 'c',
|
2597 |
+
'\u010B': 'c',
|
2598 |
+
'\u010D': 'c',
|
2599 |
+
'\u00E7': 'c',
|
2600 |
+
'\u1E09': 'c',
|
2601 |
+
'\u0188': 'c',
|
2602 |
+
'\u023C': 'c',
|
2603 |
+
'\uA73F': 'c',
|
2604 |
+
'\u2184': 'c',
|
2605 |
+
'\u24D3': 'd',
|
2606 |
+
'\uFF44': 'd',
|
2607 |
+
'\u1E0B': 'd',
|
2608 |
+
'\u010F': 'd',
|
2609 |
+
'\u1E0D': 'd',
|
2610 |
+
'\u1E11': 'd',
|
2611 |
+
'\u1E13': 'd',
|
2612 |
+
'\u1E0F': 'd',
|
2613 |
+
'\u0111': 'd',
|
2614 |
+
'\u018C': 'd',
|
2615 |
+
'\u0256': 'd',
|
2616 |
+
'\u0257': 'd',
|
2617 |
+
'\uA77A': 'd',
|
2618 |
+
'\u01F3': 'dz',
|
2619 |
+
'\u01C6': 'dz',
|
2620 |
+
'\u24D4': 'e',
|
2621 |
+
'\uFF45': 'e',
|
2622 |
+
'\u00E8': 'e',
|
2623 |
+
'\u00E9': 'e',
|
2624 |
+
'\u00EA': 'e',
|
2625 |
+
'\u1EC1': 'e',
|
2626 |
+
'\u1EBF': 'e',
|
2627 |
+
'\u1EC5': 'e',
|
2628 |
+
'\u1EC3': 'e',
|
2629 |
+
'\u1EBD': 'e',
|
2630 |
+
'\u0113': 'e',
|
2631 |
+
'\u1E15': 'e',
|
2632 |
+
'\u1E17': 'e',
|
2633 |
+
'\u0115': 'e',
|
2634 |
+
'\u0117': 'e',
|
2635 |
+
'\u00EB': 'e',
|
2636 |
+
'\u1EBB': 'e',
|
2637 |
+
'\u011B': 'e',
|
2638 |
+
'\u0205': 'e',
|
2639 |
+
'\u0207': 'e',
|
2640 |
+
'\u1EB9': 'e',
|
2641 |
+
'\u1EC7': 'e',
|
2642 |
+
'\u0229': 'e',
|
2643 |
+
'\u1E1D': 'e',
|
2644 |
+
'\u0119': 'e',
|
2645 |
+
'\u1E19': 'e',
|
2646 |
+
'\u1E1B': 'e',
|
2647 |
+
'\u0247': 'e',
|
2648 |
+
'\u025B': 'e',
|
2649 |
+
'\u01DD': 'e',
|
2650 |
+
'\u24D5': 'f',
|
2651 |
+
'\uFF46': 'f',
|
2652 |
+
'\u1E1F': 'f',
|
2653 |
+
'\u0192': 'f',
|
2654 |
+
'\uA77C': 'f',
|
2655 |
+
'\u24D6': 'g',
|
2656 |
+
'\uFF47': 'g',
|
2657 |
+
'\u01F5': 'g',
|
2658 |
+
'\u011D': 'g',
|
2659 |
+
'\u1E21': 'g',
|
2660 |
+
'\u011F': 'g',
|
2661 |
+
'\u0121': 'g',
|
2662 |
+
'\u01E7': 'g',
|
2663 |
+
'\u0123': 'g',
|
2664 |
+
'\u01E5': 'g',
|
2665 |
+
'\u0260': 'g',
|
2666 |
+
'\uA7A1': 'g',
|
2667 |
+
'\u1D79': 'g',
|
2668 |
+
'\uA77F': 'g',
|
2669 |
+
'\u24D7': 'h',
|
2670 |
+
'\uFF48': 'h',
|
2671 |
+
'\u0125': 'h',
|
2672 |
+
'\u1E23': 'h',
|
2673 |
+
'\u1E27': 'h',
|
2674 |
+
'\u021F': 'h',
|
2675 |
+
'\u1E25': 'h',
|
2676 |
+
'\u1E29': 'h',
|
2677 |
+
'\u1E2B': 'h',
|
2678 |
+
'\u1E96': 'h',
|
2679 |
+
'\u0127': 'h',
|
2680 |
+
'\u2C68': 'h',
|
2681 |
+
'\u2C76': 'h',
|
2682 |
+
'\u0265': 'h',
|
2683 |
+
'\u0195': 'hv',
|
2684 |
+
'\u24D8': 'i',
|
2685 |
+
'\uFF49': 'i',
|
2686 |
+
'\u00EC': 'i',
|
2687 |
+
'\u00ED': 'i',
|
2688 |
+
'\u00EE': 'i',
|
2689 |
+
'\u0129': 'i',
|
2690 |
+
'\u012B': 'i',
|
2691 |
+
'\u012D': 'i',
|
2692 |
+
'\u00EF': 'i',
|
2693 |
+
'\u1E2F': 'i',
|
2694 |
+
'\u1EC9': 'i',
|
2695 |
+
'\u01D0': 'i',
|
2696 |
+
'\u0209': 'i',
|
2697 |
+
'\u020B': 'i',
|
2698 |
+
'\u1ECB': 'i',
|
2699 |
+
'\u012F': 'i',
|
2700 |
+
'\u1E2D': 'i',
|
2701 |
+
'\u0268': 'i',
|
2702 |
+
'\u0131': 'i',
|
2703 |
+
'\u24D9': 'j',
|
2704 |
+
'\uFF4A': 'j',
|
2705 |
+
'\u0135': 'j',
|
2706 |
+
'\u01F0': 'j',
|
2707 |
+
'\u0249': 'j',
|
2708 |
+
'\u24DA': 'k',
|
2709 |
+
'\uFF4B': 'k',
|
2710 |
+
'\u1E31': 'k',
|
2711 |
+
'\u01E9': 'k',
|
2712 |
+
'\u1E33': 'k',
|
2713 |
+
'\u0137': 'k',
|
2714 |
+
'\u1E35': 'k',
|
2715 |
+
'\u0199': 'k',
|
2716 |
+
'\u2C6A': 'k',
|
2717 |
+
'\uA741': 'k',
|
2718 |
+
'\uA743': 'k',
|
2719 |
+
'\uA745': 'k',
|
2720 |
+
'\uA7A3': 'k',
|
2721 |
+
'\u24DB': 'l',
|
2722 |
+
'\uFF4C': 'l',
|
2723 |
+
'\u0140': 'l',
|
2724 |
+
'\u013A': 'l',
|
2725 |
+
'\u013E': 'l',
|
2726 |
+
'\u1E37': 'l',
|
2727 |
+
'\u1E39': 'l',
|
2728 |
+
'\u013C': 'l',
|
2729 |
+
'\u1E3D': 'l',
|
2730 |
+
'\u1E3B': 'l',
|
2731 |
+
'\u017F': 'l',
|
2732 |
+
'\u0142': 'l',
|
2733 |
+
'\u019A': 'l',
|
2734 |
+
'\u026B': 'l',
|
2735 |
+
'\u2C61': 'l',
|
2736 |
+
'\uA749': 'l',
|
2737 |
+
'\uA781': 'l',
|
2738 |
+
'\uA747': 'l',
|
2739 |
+
'\u01C9': 'lj',
|
2740 |
+
'\u24DC': 'm',
|
2741 |
+
'\uFF4D': 'm',
|
2742 |
+
'\u1E3F': 'm',
|
2743 |
+
'\u1E41': 'm',
|
2744 |
+
'\u1E43': 'm',
|
2745 |
+
'\u0271': 'm',
|
2746 |
+
'\u026F': 'm',
|
2747 |
+
'\u24DD': 'n',
|
2748 |
+
'\uFF4E': 'n',
|
2749 |
+
'\u01F9': 'n',
|
2750 |
+
'\u0144': 'n',
|
2751 |
+
'\u00F1': 'n',
|
2752 |
+
'\u1E45': 'n',
|
2753 |
+
'\u0148': 'n',
|
2754 |
+
'\u1E47': 'n',
|
2755 |
+
'\u0146': 'n',
|
2756 |
+
'\u1E4B': 'n',
|
2757 |
+
'\u1E49': 'n',
|
2758 |
+
'\u019E': 'n',
|
2759 |
+
'\u0272': 'n',
|
2760 |
+
'\u0149': 'n',
|
2761 |
+
'\uA791': 'n',
|
2762 |
+
'\uA7A5': 'n',
|
2763 |
+
'\u01CC': 'nj',
|
2764 |
+
'\u24DE': 'o',
|
2765 |
+
'\uFF4F': 'o',
|
2766 |
+
'\u00F2': 'o',
|
2767 |
+
'\u00F3': 'o',
|
2768 |
+
'\u00F4': 'o',
|
2769 |
+
'\u1ED3': 'o',
|
2770 |
+
'\u1ED1': 'o',
|
2771 |
+
'\u1ED7': 'o',
|
2772 |
+
'\u1ED5': 'o',
|
2773 |
+
'\u00F5': 'o',
|
2774 |
+
'\u1E4D': 'o',
|
2775 |
+
'\u022D': 'o',
|
2776 |
+
'\u1E4F': 'o',
|
2777 |
+
'\u014D': 'o',
|
2778 |
+
'\u1E51': 'o',
|
2779 |
+
'\u1E53': 'o',
|
2780 |
+
'\u014F': 'o',
|
2781 |
+
'\u022F': 'o',
|
2782 |
+
'\u0231': 'o',
|
2783 |
+
'\u00F6': 'o',
|
2784 |
+
'\u022B': 'o',
|
2785 |
+
'\u1ECF': 'o',
|
2786 |
+
'\u0151': 'o',
|
2787 |
+
'\u01D2': 'o',
|
2788 |
+
'\u020D': 'o',
|
2789 |
+
'\u020F': 'o',
|
2790 |
+
'\u01A1': 'o',
|
2791 |
+
'\u1EDD': 'o',
|
2792 |
+
'\u1EDB': 'o',
|
2793 |
+
'\u1EE1': 'o',
|
2794 |
+
'\u1EDF': 'o',
|
2795 |
+
'\u1EE3': 'o',
|
2796 |
+
'\u1ECD': 'o',
|
2797 |
+
'\u1ED9': 'o',
|
2798 |
+
'\u01EB': 'o',
|
2799 |
+
'\u01ED': 'o',
|
2800 |
+
'\u00F8': 'o',
|
2801 |
+
'\u01FF': 'o',
|
2802 |
+
'\u0254': 'o',
|
2803 |
+
'\uA74B': 'o',
|
2804 |
+
'\uA74D': 'o',
|
2805 |
+
'\u0275': 'o',
|
2806 |
+
'\u01A3': 'oi',
|
2807 |
+
'\u0223': 'ou',
|
2808 |
+
'\uA74F': 'oo',
|
2809 |
+
'\u24DF': 'p',
|
2810 |
+
'\uFF50': 'p',
|
2811 |
+
'\u1E55': 'p',
|
2812 |
+
'\u1E57': 'p',
|
2813 |
+
'\u01A5': 'p',
|
2814 |
+
'\u1D7D': 'p',
|
2815 |
+
'\uA751': 'p',
|
2816 |
+
'\uA753': 'p',
|
2817 |
+
'\uA755': 'p',
|
2818 |
+
'\u24E0': 'q',
|
2819 |
+
'\uFF51': 'q',
|
2820 |
+
'\u024B': 'q',
|
2821 |
+
'\uA757': 'q',
|
2822 |
+
'\uA759': 'q',
|
2823 |
+
'\u24E1': 'r',
|
2824 |
+
'\uFF52': 'r',
|
2825 |
+
'\u0155': 'r',
|
2826 |
+
'\u1E59': 'r',
|
2827 |
+
'\u0159': 'r',
|
2828 |
+
'\u0211': 'r',
|
2829 |
+
'\u0213': 'r',
|
2830 |
+
'\u1E5B': 'r',
|
2831 |
+
'\u1E5D': 'r',
|
2832 |
+
'\u0157': 'r',
|
2833 |
+
'\u1E5F': 'r',
|
2834 |
+
'\u024D': 'r',
|
2835 |
+
'\u027D': 'r',
|
2836 |
+
'\uA75B': 'r',
|
2837 |
+
'\uA7A7': 'r',
|
2838 |
+
'\uA783': 'r',
|
2839 |
+
'\u24E2': 's',
|
2840 |
+
'\uFF53': 's',
|
2841 |
+
'\u00DF': 's',
|
2842 |
+
'\u015B': 's',
|
2843 |
+
'\u1E65': 's',
|
2844 |
+
'\u015D': 's',
|
2845 |
+
'\u1E61': 's',
|
2846 |
+
'\u0161': 's',
|
2847 |
+
'\u1E67': 's',
|
2848 |
+
'\u1E63': 's',
|
2849 |
+
'\u1E69': 's',
|
2850 |
+
'\u0219': 's',
|
2851 |
+
'\u015F': 's',
|
2852 |
+
'\u023F': 's',
|
2853 |
+
'\uA7A9': 's',
|
2854 |
+
'\uA785': 's',
|
2855 |
+
'\u1E9B': 's',
|
2856 |
+
'\u24E3': 't',
|
2857 |
+
'\uFF54': 't',
|
2858 |
+
'\u1E6B': 't',
|
2859 |
+
'\u1E97': 't',
|
2860 |
+
'\u0165': 't',
|
2861 |
+
'\u1E6D': 't',
|
2862 |
+
'\u021B': 't',
|
2863 |
+
'\u0163': 't',
|
2864 |
+
'\u1E71': 't',
|
2865 |
+
'\u1E6F': 't',
|
2866 |
+
'\u0167': 't',
|
2867 |
+
'\u01AD': 't',
|
2868 |
+
'\u0288': 't',
|
2869 |
+
'\u2C66': 't',
|
2870 |
+
'\uA787': 't',
|
2871 |
+
'\uA729': 'tz',
|
2872 |
+
'\u24E4': 'u',
|
2873 |
+
'\uFF55': 'u',
|
2874 |
+
'\u00F9': 'u',
|
2875 |
+
'\u00FA': 'u',
|
2876 |
+
'\u00FB': 'u',
|
2877 |
+
'\u0169': 'u',
|
2878 |
+
'\u1E79': 'u',
|
2879 |
+
'\u016B': 'u',
|
2880 |
+
'\u1E7B': 'u',
|
2881 |
+
'\u016D': 'u',
|
2882 |
+
'\u00FC': 'u',
|
2883 |
+
'\u01DC': 'u',
|
2884 |
+
'\u01D8': 'u',
|
2885 |
+
'\u01D6': 'u',
|
2886 |
+
'\u01DA': 'u',
|
2887 |
+
'\u1EE7': 'u',
|
2888 |
+
'\u016F': 'u',
|
2889 |
+
'\u0171': 'u',
|
2890 |
+
'\u01D4': 'u',
|
2891 |
+
'\u0215': 'u',
|
2892 |
+
'\u0217': 'u',
|
2893 |
+
'\u01B0': 'u',
|
2894 |
+
'\u1EEB': 'u',
|
2895 |
+
'\u1EE9': 'u',
|
2896 |
+
'\u1EEF': 'u',
|
2897 |
+
'\u1EED': 'u',
|
2898 |
+
'\u1EF1': 'u',
|
2899 |
+
'\u1EE5': 'u',
|
2900 |
+
'\u1E73': 'u',
|
2901 |
+
'\u0173': 'u',
|
2902 |
+
'\u1E77': 'u',
|
2903 |
+
'\u1E75': 'u',
|
2904 |
+
'\u0289': 'u',
|
2905 |
+
'\u24E5': 'v',
|
2906 |
+
'\uFF56': 'v',
|
2907 |
+
'\u1E7D': 'v',
|
2908 |
+
'\u1E7F': 'v',
|
2909 |
+
'\u028B': 'v',
|
2910 |
+
'\uA75F': 'v',
|
2911 |
+
'\u028C': 'v',
|
2912 |
+
'\uA761': 'vy',
|
2913 |
+
'\u24E6': 'w',
|
2914 |
+
'\uFF57': 'w',
|
2915 |
+
'\u1E81': 'w',
|
2916 |
+
'\u1E83': 'w',
|
2917 |
+
'\u0175': 'w',
|
2918 |
+
'\u1E87': 'w',
|
2919 |
+
'\u1E85': 'w',
|
2920 |
+
'\u1E98': 'w',
|
2921 |
+
'\u1E89': 'w',
|
2922 |
+
'\u2C73': 'w',
|
2923 |
+
'\u24E7': 'x',
|
2924 |
+
'\uFF58': 'x',
|
2925 |
+
'\u1E8B': 'x',
|
2926 |
+
'\u1E8D': 'x',
|
2927 |
+
'\u24E8': 'y',
|
2928 |
+
'\uFF59': 'y',
|
2929 |
+
'\u1EF3': 'y',
|
2930 |
+
'\u00FD': 'y',
|
2931 |
+
'\u0177': 'y',
|
2932 |
+
'\u1EF9': 'y',
|
2933 |
+
'\u0233': 'y',
|
2934 |
+
'\u1E8F': 'y',
|
2935 |
+
'\u00FF': 'y',
|
2936 |
+
'\u1EF7': 'y',
|
2937 |
+
'\u1E99': 'y',
|
2938 |
+
'\u1EF5': 'y',
|
2939 |
+
'\u01B4': 'y',
|
2940 |
+
'\u024F': 'y',
|
2941 |
+
'\u1EFF': 'y',
|
2942 |
+
'\u24E9': 'z',
|
2943 |
+
'\uFF5A': 'z',
|
2944 |
+
'\u017A': 'z',
|
2945 |
+
'\u1E91': 'z',
|
2946 |
+
'\u017C': 'z',
|
2947 |
+
'\u017E': 'z',
|
2948 |
+
'\u1E93': 'z',
|
2949 |
+
'\u1E95': 'z',
|
2950 |
+
'\u01B6': 'z',
|
2951 |
+
'\u0225': 'z',
|
2952 |
+
'\u0240': 'z',
|
2953 |
+
'\u2C6C': 'z',
|
2954 |
+
'\uA763': 'z',
|
2955 |
+
'\u0386': '\u0391',
|
2956 |
+
'\u0388': '\u0395',
|
2957 |
+
'\u0389': '\u0397',
|
2958 |
+
'\u038A': '\u0399',
|
2959 |
+
'\u03AA': '\u0399',
|
2960 |
+
'\u038C': '\u039F',
|
2961 |
+
'\u038E': '\u03A5',
|
2962 |
+
'\u03AB': '\u03A5',
|
2963 |
+
'\u038F': '\u03A9',
|
2964 |
+
'\u03AC': '\u03B1',
|
2965 |
+
'\u03AD': '\u03B5',
|
2966 |
+
'\u03AE': '\u03B7',
|
2967 |
+
'\u03AF': '\u03B9',
|
2968 |
+
'\u03CA': '\u03B9',
|
2969 |
+
'\u0390': '\u03B9',
|
2970 |
+
'\u03CC': '\u03BF',
|
2971 |
+
'\u03CD': '\u03C5',
|
2972 |
+
'\u03CB': '\u03C5',
|
2973 |
+
'\u03B0': '\u03C5',
|
2974 |
+
'\u03C9': '\u03C9',
|
2975 |
+
'\u03C2': '\u03C3'
|
2976 |
+
};
|
2977 |
+
|
2978 |
+
return diacritics;
|
2979 |
+
});
|
2980 |
+
|
2981 |
+
S2.define('select2/data/base',[
|
2982 |
+
'../utils'
|
2983 |
+
], function (Utils) {
|
2984 |
+
function BaseAdapter ($element, options) {
|
2985 |
+
BaseAdapter.__super__.constructor.call(this);
|
2986 |
+
}
|
2987 |
+
|
2988 |
+
Utils.Extend(BaseAdapter, Utils.Observable);
|
2989 |
+
|
2990 |
+
BaseAdapter.prototype.current = function (callback) {
|
2991 |
+
throw new Error('The `current` method must be defined in child classes.');
|
2992 |
+
};
|
2993 |
+
|
2994 |
+
BaseAdapter.prototype.query = function (params, callback) {
|
2995 |
+
throw new Error('The `query` method must be defined in child classes.');
|
2996 |
+
};
|
2997 |
+
|
2998 |
+
BaseAdapter.prototype.bind = function (container, $container) {
|
2999 |
+
// Can be implemented in subclasses
|
3000 |
+
};
|
3001 |
+
|
3002 |
+
BaseAdapter.prototype.destroy = function () {
|
3003 |
+
// Can be implemented in subclasses
|
3004 |
+
};
|
3005 |
+
|
3006 |
+
BaseAdapter.prototype.generateResultId = function (container, data) {
|
3007 |
+
var id = container.id + '-result-';
|
3008 |
+
|
3009 |
+
id += Utils.generateChars(4);
|
3010 |
+
|
3011 |
+
if (data.id != null) {
|
3012 |
+
id += '-' + data.id.toString();
|
3013 |
+
} else {
|
3014 |
+
id += '-' + Utils.generateChars(4);
|
3015 |
+
}
|
3016 |
+
return id;
|
3017 |
+
};
|
3018 |
+
|
3019 |
+
return BaseAdapter;
|
3020 |
+
});
|
3021 |
+
|
3022 |
+
S2.define('select2/data/select',[
|
3023 |
+
'./base',
|
3024 |
+
'../utils',
|
3025 |
+
'jquery'
|
3026 |
+
], function (BaseAdapter, Utils, $) {
|
3027 |
+
function SelectAdapter ($element, options) {
|
3028 |
+
this.$element = $element;
|
3029 |
+
this.options = options;
|
3030 |
+
|
3031 |
+
SelectAdapter.__super__.constructor.call(this);
|
3032 |
+
}
|
3033 |
+
|
3034 |
+
Utils.Extend(SelectAdapter, BaseAdapter);
|
3035 |
+
|
3036 |
+
SelectAdapter.prototype.current = function (callback) {
|
3037 |
+
var data = [];
|
3038 |
+
var self = this;
|
3039 |
+
|
3040 |
+
this.$element.find(':selected').each(function () {
|
3041 |
+
var $option = $(this);
|
3042 |
+
|
3043 |
+
var option = self.item($option);
|
3044 |
+
|
3045 |
+
data.push(option);
|
3046 |
+
});
|
3047 |
+
|
3048 |
+
callback(data);
|
3049 |
+
};
|
3050 |
+
|
3051 |
+
SelectAdapter.prototype.select = function (data) {
|
3052 |
+
var self = this;
|
3053 |
+
|
3054 |
+
data.selected = true;
|
3055 |
+
|
3056 |
+
// If data.element is a DOM node, use it instead
|
3057 |
+
if ($(data.element).is('option')) {
|
3058 |
+
data.element.selected = true;
|
3059 |
+
|
3060 |
+
this.$element.trigger('change');
|
3061 |
+
|
3062 |
+
return;
|
3063 |
+
}
|
3064 |
+
|
3065 |
+
if (this.$element.prop('multiple')) {
|
3066 |
+
this.current(function (currentData) {
|
3067 |
+
var val = [];
|
3068 |
+
|
3069 |
+
data = [data];
|
3070 |
+
data.push.apply(data, currentData);
|
3071 |
+
|
3072 |
+
for (var d = 0; d < data.length; d++) {
|
3073 |
+
var id = data[d].id;
|
3074 |
+
|
3075 |
+
if ($.inArray(id, val) === -1) {
|
3076 |
+
val.push(id);
|
3077 |
+
}
|
3078 |
+
}
|
3079 |
+
|
3080 |
+
self.$element.val(val);
|
3081 |
+
self.$element.trigger('change');
|
3082 |
+
});
|
3083 |
+
} else {
|
3084 |
+
var val = data.id;
|
3085 |
+
|
3086 |
+
this.$element.val(val);
|
3087 |
+
this.$element.trigger('change');
|
3088 |
+
}
|
3089 |
+
};
|
3090 |
+
|
3091 |
+
SelectAdapter.prototype.unselect = function (data) {
|
3092 |
+
var self = this;
|
3093 |
+
|
3094 |
+
if (!this.$element.prop('multiple')) {
|
3095 |
+
return;
|
3096 |
+
}
|
3097 |
+
|
3098 |
+
data.selected = false;
|
3099 |
+
|
3100 |
+
if ($(data.element).is('option')) {
|
3101 |
+
data.element.selected = false;
|
3102 |
+
|
3103 |
+
this.$element.trigger('change');
|
3104 |
+
|
3105 |
+
return;
|
3106 |
+
}
|
3107 |
+
|
3108 |
+
this.current(function (currentData) {
|
3109 |
+
var val = [];
|
3110 |
+
|
3111 |
+
for (var d = 0; d < currentData.length; d++) {
|
3112 |
+
var id = currentData[d].id;
|
3113 |
+
|
3114 |
+
if (id !== data.id && $.inArray(id, val) === -1) {
|
3115 |
+
val.push(id);
|
3116 |
+
}
|
3117 |
+
}
|
3118 |
+
|
3119 |
+
self.$element.val(val);
|
3120 |
+
|
3121 |
+
self.$element.trigger('change');
|
3122 |
+
});
|
3123 |
+
};
|
3124 |
+
|
3125 |
+
SelectAdapter.prototype.bind = function (container, $container) {
|
3126 |
+
var self = this;
|
3127 |
+
|
3128 |
+
this.container = container;
|
3129 |
+
|
3130 |
+
container.on('select', function (params) {
|
3131 |
+
self.select(params.data);
|
3132 |
+
});
|
3133 |
+
|
3134 |
+
container.on('unselect', function (params) {
|
3135 |
+
self.unselect(params.data);
|
3136 |
+
});
|
3137 |
+
};
|
3138 |
+
|
3139 |
+
SelectAdapter.prototype.destroy = function () {
|
3140 |
+
// Remove anything added to child elements
|
3141 |
+
this.$element.find('*').each(function () {
|
3142 |
+
// Remove any custom data set by Select2
|
3143 |
+
$.removeData(this, 'data');
|
3144 |
+
});
|
3145 |
+
};
|
3146 |
+
|
3147 |
+
SelectAdapter.prototype.query = function (params, callback) {
|
3148 |
+
var data = [];
|
3149 |
+
var self = this;
|
3150 |
+
|
3151 |
+
var $options = this.$element.children();
|
3152 |
+
|
3153 |
+
$options.each(function () {
|
3154 |
+
var $option = $(this);
|
3155 |
+
|
3156 |
+
if (!$option.is('option') && !$option.is('optgroup')) {
|
3157 |
+
return;
|
3158 |
+
}
|
3159 |
+
|
3160 |
+
var option = self.item($option);
|
3161 |
+
|
3162 |
+
var matches = self.matches(params, option);
|
3163 |
+
|
3164 |
+
if (matches !== null) {
|
3165 |
+
data.push(matches);
|
3166 |
+
}
|
3167 |
+
});
|
3168 |
+
|
3169 |
+
callback({
|
3170 |
+
results: data
|
3171 |
+
});
|
3172 |
+
};
|
3173 |
+
|
3174 |
+
SelectAdapter.prototype.addOptions = function ($options) {
|
3175 |
+
Utils.appendMany(this.$element, $options);
|
3176 |
+
};
|
3177 |
+
|
3178 |
+
SelectAdapter.prototype.option = function (data) {
|
3179 |
+
var option;
|
3180 |
+
|
3181 |
+
if (data.children) {
|
3182 |
+
option = document.createElement('optgroup');
|
3183 |
+
option.label = data.text;
|
3184 |
+
} else {
|
3185 |
+
option = document.createElement('option');
|
3186 |
+
|
3187 |
+
if (option.textContent !== undefined) {
|
3188 |
+
option.textContent = data.text;
|
3189 |
+
} else {
|
3190 |
+
option.innerText = data.text;
|
3191 |
+
}
|
3192 |
+
}
|
3193 |
+
|
3194 |
+
if (data.id) {
|
3195 |
+
option.value = data.id;
|
3196 |
+
}
|
3197 |
+
|
3198 |
+
if (data.disabled) {
|
3199 |
+
option.disabled = true;
|
3200 |
+
}
|
3201 |
+
|
3202 |
+
if (data.selected) {
|
3203 |
+
option.selected = true;
|
3204 |
+
}
|
3205 |
+
|
3206 |
+
if (data.title) {
|
3207 |
+
option.title = data.title;
|
3208 |
+
}
|
3209 |
+
|
3210 |
+
var $option = $(option);
|
3211 |
+
|
3212 |
+
var normalizedData = this._normalizeItem(data);
|
3213 |
+
normalizedData.element = option;
|
3214 |
+
|
3215 |
+
// Override the option's data with the combined data
|
3216 |
+
$.data(option, 'data', normalizedData);
|
3217 |
+
|
3218 |
+
return $option;
|
3219 |
+
};
|
3220 |
+
|
3221 |
+
SelectAdapter.prototype.item = function ($option) {
|
3222 |
+
var data = {};
|
3223 |
+
|
3224 |
+
data = $.data($option[0], 'data');
|
3225 |
+
|
3226 |
+
if (data != null) {
|
3227 |
+
return data;
|
3228 |
+
}
|
3229 |
+
|
3230 |
+
if ($option.is('option')) {
|
3231 |
+
data = {
|
3232 |
+
id: $option.val(),
|
3233 |
+
text: $option.text(),
|
3234 |
+
disabled: $option.prop('disabled'),
|
3235 |
+
selected: $option.prop('selected'),
|
3236 |
+
title: $option.prop('title')
|
3237 |
+
};
|
3238 |
+
} else if ($option.is('optgroup')) {
|
3239 |
+
data = {
|
3240 |
+
text: $option.prop('label'),
|
3241 |
+
children: [],
|
3242 |
+
title: $option.prop('title')
|
3243 |
+
};
|
3244 |
+
|
3245 |
+
var $children = $option.children('option');
|
3246 |
+
var children = [];
|
3247 |
+
|
3248 |
+
for (var c = 0; c < $children.length; c++) {
|
3249 |
+
var $child = $($children[c]);
|
3250 |
+
|
3251 |
+
var child = this.item($child);
|
3252 |
+
|
3253 |
+
children.push(child);
|
3254 |
+
}
|
3255 |
+
|
3256 |
+
data.children = children;
|
3257 |
+
}
|
3258 |
+
|
3259 |
+
data = this._normalizeItem(data);
|
3260 |
+
data.element = $option[0];
|
3261 |
+
|
3262 |
+
$.data($option[0], 'data', data);
|
3263 |
+
|
3264 |
+
return data;
|
3265 |
+
};
|
3266 |
+
|
3267 |
+
SelectAdapter.prototype._normalizeItem = function (item) {
|
3268 |
+
if (!$.isPlainObject(item)) {
|
3269 |
+
item = {
|
3270 |
+
id: item,
|
3271 |
+
text: item
|
3272 |
+
};
|
3273 |
+
}
|
3274 |
+
|
3275 |
+
item = $.extend({}, {
|
3276 |
+
text: ''
|
3277 |
+
}, item);
|
3278 |
+
|
3279 |
+
var defaults = {
|
3280 |
+
selected: false,
|
3281 |
+
disabled: false
|
3282 |
+
};
|
3283 |
+
|
3284 |
+
if (item.id != null) {
|
3285 |
+
item.id = item.id.toString();
|
3286 |
+
}
|
3287 |
+
|
3288 |
+
if (item.text != null) {
|
3289 |
+
item.text = item.text.toString();
|
3290 |
+
}
|
3291 |
+
|
3292 |
+
if (item._resultId == null && item.id && this.container != null) {
|
3293 |
+
item._resultId = this.generateResultId(this.container, item);
|
3294 |
+
}
|
3295 |
+
|
3296 |
+
return $.extend({}, defaults, item);
|
3297 |
+
};
|
3298 |
+
|
3299 |
+
SelectAdapter.prototype.matches = function (params, data) {
|
3300 |
+
var matcher = this.options.get('matcher');
|
3301 |
+
|
3302 |
+
return matcher(params, data);
|
3303 |
+
};
|
3304 |
+
|
3305 |
+
return SelectAdapter;
|
3306 |
+
});
|
3307 |
+
|
3308 |
+
S2.define('select2/data/array',[
|
3309 |
+
'./select',
|
3310 |
+
'../utils',
|
3311 |
+
'jquery'
|
3312 |
+
], function (SelectAdapter, Utils, $) {
|
3313 |
+
function ArrayAdapter ($element, options) {
|
3314 |
+
var data = options.get('data') || [];
|
3315 |
+
|
3316 |
+
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
3317 |
+
|
3318 |
+
this.addOptions(this.convertToOptions(data));
|
3319 |
+
}
|
3320 |
+
|
3321 |
+
Utils.Extend(ArrayAdapter, SelectAdapter);
|
3322 |
+
|
3323 |
+
ArrayAdapter.prototype.select = function (data) {
|
3324 |
+
var $option = this.$element.find('option').filter(function (i, elm) {
|
3325 |
+
return elm.value == data.id.toString();
|
3326 |
+
});
|
3327 |
+
|
3328 |
+
if ($option.length === 0) {
|
3329 |
+
$option = this.option(data);
|
3330 |
+
|
3331 |
+
this.addOptions($option);
|
3332 |
+
}
|
3333 |
+
|
3334 |
+
ArrayAdapter.__super__.select.call(this, data);
|
3335 |
+
};
|
3336 |
+
|
3337 |
+
ArrayAdapter.prototype.convertToOptions = function (data) {
|
3338 |
+
var self = this;
|
3339 |
+
|
3340 |
+
var $existing = this.$element.find('option');
|
3341 |
+
var existingIds = $existing.map(function () {
|
3342 |
+
return self.item($(this)).id;
|
3343 |
+
}).get();
|
3344 |
+
|
3345 |
+
var $options = [];
|
3346 |
+
|
3347 |
+
// Filter out all items except for the one passed in the argument
|
3348 |
+
function onlyItem (item) {
|
3349 |
+
return function () {
|
3350 |
+
return $(this).val() == item.id;
|
3351 |
+
};
|
3352 |
+
}
|
3353 |
+
|
3354 |
+
for (var d = 0; d < data.length; d++) {
|
3355 |
+
var item = this._normalizeItem(data[d]);
|
3356 |
+
|
3357 |
+
// Skip items which were pre-loaded, only merge the data
|
3358 |
+
if ($.inArray(item.id, existingIds) >= 0) {
|
3359 |
+
var $existingOption = $existing.filter(onlyItem(item));
|
3360 |
+
|
3361 |
+
var existingData = this.item($existingOption);
|
3362 |
+
var newData = $.extend(true, {}, item, existingData);
|
3363 |
+
|
3364 |
+
var $newOption = this.option(newData);
|
3365 |
+
|
3366 |
+
$existingOption.replaceWith($newOption);
|
3367 |
+
|
3368 |
+
continue;
|
3369 |
+
}
|
3370 |
+
|
3371 |
+
var $option = this.option(item);
|
3372 |
+
|
3373 |
+
if (item.children) {
|
3374 |
+
var $children = this.convertToOptions(item.children);
|
3375 |
+
|
3376 |
+
Utils.appendMany($option, $children);
|
3377 |
+
}
|
3378 |
+
|
3379 |
+
$options.push($option);
|
3380 |
+
}
|
3381 |
+
|
3382 |
+
return $options;
|
3383 |
+
};
|
3384 |
+
|
3385 |
+
return ArrayAdapter;
|
3386 |
+
});
|
3387 |
+
|
3388 |
+
S2.define('select2/data/ajax',[
|
3389 |
+
'./array',
|
3390 |
+
'../utils',
|
3391 |
+
'jquery'
|
3392 |
+
], function (ArrayAdapter, Utils, $) {
|
3393 |
+
function AjaxAdapter ($element, options) {
|
3394 |
+
this.ajaxOptions = this._applyDefaults(options.get('ajax'));
|
3395 |
+
|
3396 |
+
if (this.ajaxOptions.processResults != null) {
|
3397 |
+
this.processResults = this.ajaxOptions.processResults;
|
3398 |
+
}
|
3399 |
+
|
3400 |
+
AjaxAdapter.__super__.constructor.call(this, $element, options);
|
3401 |
+
}
|
3402 |
+
|
3403 |
+
Utils.Extend(AjaxAdapter, ArrayAdapter);
|
3404 |
+
|
3405 |
+
AjaxAdapter.prototype._applyDefaults = function (options) {
|
3406 |
+
var defaults = {
|
3407 |
+
data: function (params) {
|
3408 |
+
return $.extend({}, params, {
|
3409 |
+
q: params.term
|
3410 |
+
});
|
3411 |
+
},
|
3412 |
+
transport: function (params, success, failure) {
|
3413 |
+
var $request = $.ajax(params);
|
3414 |
+
|
3415 |
+
$request.then(success);
|
3416 |
+
$request.fail(failure);
|
3417 |
+
|
3418 |
+
return $request;
|
3419 |
+
}
|
3420 |
+
};
|
3421 |
+
|
3422 |
+
return $.extend({}, defaults, options, true);
|
3423 |
+
};
|
3424 |
+
|
3425 |
+
AjaxAdapter.prototype.processResults = function (results) {
|
3426 |
+
return results;
|
3427 |
+
};
|
3428 |
+
|
3429 |
+
AjaxAdapter.prototype.query = function (params, callback) {
|
3430 |
+
var matches = [];
|
3431 |
+
var self = this;
|
3432 |
+
|
3433 |
+
if (this._request != null) {
|
3434 |
+
// JSONP requests cannot always be aborted
|
3435 |
+
if ($.isFunction(this._request.abort)) {
|
3436 |
+
this._request.abort();
|
3437 |
+
}
|
3438 |
+
|
3439 |
+
this._request = null;
|
3440 |
+
}
|
3441 |
+
|
3442 |
+
var options = $.extend({
|
3443 |
+
type: 'GET'
|
3444 |
+
}, this.ajaxOptions);
|
3445 |
+
|
3446 |
+
if (typeof options.url === 'function') {
|
3447 |
+
options.url = options.url.call(this.$element, params);
|
3448 |
+
}
|
3449 |
+
|
3450 |
+
if (typeof options.data === 'function') {
|
3451 |
+
options.data = options.data.call(this.$element, params);
|
3452 |
+
}
|
3453 |
+
|
3454 |
+
function request () {
|
3455 |
+
var $request = options.transport(options, function (data) {
|
3456 |
+
var results = self.processResults(data, params);
|
3457 |
+
|
3458 |
+
if (self.options.get('debug') && window.console && console.error) {
|
3459 |
+
// Check to make sure that the response included a `results` key.
|
3460 |
+
if (!results || !results.results || !$.isArray(results.results)) {
|
3461 |
+
console.error(
|
3462 |
+
'Select2: The AJAX results did not return an array in the ' +
|
3463 |
+
'`results` key of the response.'
|
3464 |
+
);
|
3465 |
+
}
|
3466 |
+
}
|
3467 |
+
|
3468 |
+
callback(results);
|
3469 |
+
}, function () {
|
3470 |
+
// Attempt to detect if a request was aborted
|
3471 |
+
// Only works if the transport exposes a status property
|
3472 |
+
if ($request.status && $request.status === '0') {
|
3473 |
+
return;
|
3474 |
+
}
|
3475 |
+
|
3476 |
+
self.trigger('results:message', {
|
3477 |
+
message: 'errorLoading'
|
3478 |
+
});
|
3479 |
+
});
|
3480 |
+
|
3481 |
+
self._request = $request;
|
3482 |
+
}
|
3483 |
+
|
3484 |
+
if (this.ajaxOptions.delay && params.term != null) {
|
3485 |
+
if (this._queryTimeout) {
|
3486 |
+
window.clearTimeout(this._queryTimeout);
|
3487 |
+
}
|
3488 |
+
|
3489 |
+
this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
|
3490 |
+
} else {
|
3491 |
+
request();
|
3492 |
+
}
|
3493 |
+
};
|
3494 |
+
|
3495 |
+
return AjaxAdapter;
|
3496 |
+
});
|
3497 |
+
|
3498 |
+
S2.define('select2/data/tags',[
|
3499 |
+
'jquery'
|
3500 |
+
], function ($) {
|
3501 |
+
function Tags (decorated, $element, options) {
|
3502 |
+
var tags = options.get('tags');
|
3503 |
+
|
3504 |
+
var createTag = options.get('createTag');
|
3505 |
+
|
3506 |
+
if (createTag !== undefined) {
|
3507 |
+
this.createTag = createTag;
|
3508 |
+
}
|
3509 |
+
|
3510 |
+
var insertTag = options.get('insertTag');
|
3511 |
+
|
3512 |
+
if (insertTag !== undefined) {
|
3513 |
+
this.insertTag = insertTag;
|
3514 |
+
}
|
3515 |
+
|
3516 |
+
decorated.call(this, $element, options);
|
3517 |
+
|
3518 |
+
if ($.isArray(tags)) {
|
3519 |
+
for (var t = 0; t < tags.length; t++) {
|
3520 |
+
var tag = tags[t];
|
3521 |
+
var item = this._normalizeItem(tag);
|
3522 |
+
|
3523 |
+
var $option = this.option(item);
|
3524 |
+
|
3525 |
+
this.$element.append($option);
|
3526 |
+
}
|
3527 |
+
}
|
3528 |
+
}
|
3529 |
+
|
3530 |
+
Tags.prototype.query = function (decorated, params, callback) {
|
3531 |
+
var self = this;
|
3532 |
+
|
3533 |
+
this._removeOldTags();
|
3534 |
+
|
3535 |
+
if (params.term == null || params.page != null) {
|
3536 |
+
decorated.call(this, params, callback);
|
3537 |
+
return;
|
3538 |
+
}
|
3539 |
+
|
3540 |
+
function wrapper (obj, child) {
|
3541 |
+
var data = obj.results;
|
3542 |
+
|
3543 |
+
for (var i = 0; i < data.length; i++) {
|
3544 |
+
var option = data[i];
|
3545 |
+
|
3546 |
+
var checkChildren = (
|
3547 |
+
option.children != null &&
|
3548 |
+
!wrapper({
|
3549 |
+
results: option.children
|
3550 |
+
}, true)
|
3551 |
+
);
|
3552 |
+
|
3553 |
+
var checkText = option.text === params.term;
|
3554 |
+
|
3555 |
+
if (checkText || checkChildren) {
|
3556 |
+
if (child) {
|
3557 |
+
return false;
|
3558 |
+
}
|
3559 |
+
|
3560 |
+
obj.data = data;
|
3561 |
+
callback(obj);
|
3562 |
+
|
3563 |
+
return;
|
3564 |
+
}
|
3565 |
+
}
|
3566 |
+
|
3567 |
+
if (child) {
|
3568 |
+
return true;
|
3569 |
+
}
|
3570 |
+
|
3571 |
+
var tag = self.createTag(params);
|
3572 |
+
|
3573 |
+
if (tag != null) {
|
3574 |
+
var $option = self.option(tag);
|
3575 |
+
$option.attr('data-select2-tag', true);
|
3576 |
+
|
3577 |
+
self.addOptions([$option]);
|
3578 |
+
|
3579 |
+
self.insertTag(data, tag);
|
3580 |
+
}
|
3581 |
+
|
3582 |
+
obj.results = data;
|
3583 |
+
|
3584 |
+
callback(obj);
|
3585 |
+
}
|
3586 |
+
|
3587 |
+
decorated.call(this, params, wrapper);
|
3588 |
+
};
|
3589 |
+
|
3590 |
+
Tags.prototype.createTag = function (decorated, params) {
|
3591 |
+
var term = $.trim(params.term);
|
3592 |
+
|
3593 |
+
if (term === '') {
|
3594 |
+
return null;
|
3595 |
+
}
|
3596 |
+
|
3597 |
+
return {
|
3598 |
+
id: term,
|
3599 |
+
text: term
|
3600 |
+
};
|
3601 |
+
};
|
3602 |
+
|
3603 |
+
Tags.prototype.insertTag = function (_, data, tag) {
|
3604 |
+
data.unshift(tag);
|
3605 |
+
};
|
3606 |
+
|
3607 |
+
Tags.prototype._removeOldTags = function (_) {
|
3608 |
+
var tag = this._lastTag;
|
3609 |
+
|
3610 |
+
var $options = this.$element.find('option[data-select2-tag]');
|
3611 |
+
|
3612 |
+
$options.each(function () {
|
3613 |
+
if (this.selected) {
|
3614 |
+
return;
|
3615 |
+
}
|
3616 |
+
|
3617 |
+
$(this).remove();
|
3618 |
+
});
|
3619 |
+
};
|
3620 |
+
|
3621 |
+
return Tags;
|
3622 |
+
});
|
3623 |
+
|
3624 |
+
S2.define('select2/data/tokenizer',[
|
3625 |
+
'jquery'
|
3626 |
+
], function ($) {
|
3627 |
+
function Tokenizer (decorated, $element, options) {
|
3628 |
+
var tokenizer = options.get('tokenizer');
|
3629 |
+
|
3630 |
+
if (tokenizer !== undefined) {
|
3631 |
+
this.tokenizer = tokenizer;
|
3632 |
+
}
|
3633 |
+
|
3634 |
+
decorated.call(this, $element, options);
|
3635 |
+
}
|
3636 |
+
|
3637 |
+
Tokenizer.prototype.bind = function (decorated, container, $container) {
|
3638 |
+
decorated.call(this, container, $container);
|
3639 |
+
|
3640 |
+
this.$search = container.dropdown.$search || container.selection.$search ||
|
3641 |
+
$container.find('.select2-search__field');
|
3642 |
+
};
|
3643 |
+
|
3644 |
+
Tokenizer.prototype.query = function (decorated, params, callback) {
|
3645 |
+
var self = this;
|
3646 |
+
|
3647 |
+
function createAndSelect (data) {
|
3648 |
+
// Normalize the data object so we can use it for checks
|
3649 |
+
var item = self._normalizeItem(data);
|
3650 |
+
|
3651 |
+
// Check if the data object already exists as a tag
|
3652 |
+
// Select it if it doesn't
|
3653 |
+
var $existingOptions = self.$element.find('option').filter(function () {
|
3654 |
+
return $(this).val() === item.id;
|
3655 |
+
});
|
3656 |
+
|
3657 |
+
// If an existing option wasn't found for it, create the option
|
3658 |
+
if (!$existingOptions.length) {
|
3659 |
+
var $option = self.option(item);
|
3660 |
+
$option.attr('data-select2-tag', true);
|
3661 |
+
|
3662 |
+
self._removeOldTags();
|
3663 |
+
self.addOptions([$option]);
|
3664 |
+
}
|
3665 |
+
|
3666 |
+
// Select the item, now that we know there is an option for it
|
3667 |
+
select(item);
|
3668 |
+
}
|
3669 |
+
|
3670 |
+
function select (data) {
|
3671 |
+
self.trigger('select', {
|
3672 |
+
data: data
|
3673 |
+
});
|
3674 |
+
}
|
3675 |
+
|
3676 |
+
params.term = params.term || '';
|
3677 |
+
|
3678 |
+
var tokenData = this.tokenizer(params, this.options, createAndSelect);
|
3679 |
+
|
3680 |
+
if (tokenData.term !== params.term) {
|
3681 |
+
// Replace the search term if we have the search box
|
3682 |
+
if (this.$search.length) {
|
3683 |
+
this.$search.val(tokenData.term);
|
3684 |
+
this.$search.focus();
|
3685 |
+
}
|
3686 |
+
|
3687 |
+
params.term = tokenData.term;
|
3688 |
+
}
|
3689 |
+
|
3690 |
+
decorated.call(this, params, callback);
|
3691 |
+
};
|
3692 |
+
|
3693 |
+
Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
|
3694 |
+
var separators = options.get('tokenSeparators') || [];
|
3695 |
+
var term = params.term;
|
3696 |
+
var i = 0;
|
3697 |
+
|
3698 |
+
var createTag = this.createTag || function (params) {
|
3699 |
+
return {
|
3700 |
+
id: params.term,
|
3701 |
+
text: params.term
|
3702 |
+
};
|
3703 |
+
};
|
3704 |
+
|
3705 |
+
while (i < term.length) {
|
3706 |
+
var termChar = term[i];
|
3707 |
+
|
3708 |
+
if ($.inArray(termChar, separators) === -1) {
|
3709 |
+
i++;
|
3710 |
+
|
3711 |
+
continue;
|
3712 |
+
}
|
3713 |
+
|
3714 |
+
var part = term.substr(0, i);
|
3715 |
+
var partParams = $.extend({}, params, {
|
3716 |
+
term: part
|
3717 |
+
});
|
3718 |
+
|
3719 |
+
var data = createTag(partParams);
|
3720 |
+
|
3721 |
+
if (data == null) {
|
3722 |
+
i++;
|
3723 |
+
continue;
|
3724 |
+
}
|
3725 |
+
|
3726 |
+
callback(data);
|
3727 |
+
|
3728 |
+
// Reset the term to not include the tokenized portion
|
3729 |
+
term = term.substr(i + 1) || '';
|
3730 |
+
i = 0;
|
3731 |
+
}
|
3732 |
+
|
3733 |
+
return {
|
3734 |
+
term: term
|
3735 |
+
};
|
3736 |
+
};
|
3737 |
+
|
3738 |
+
return Tokenizer;
|
3739 |
+
});
|
3740 |
+
|
3741 |
+
S2.define('select2/data/minimumInputLength',[
|
3742 |
+
|
3743 |
+
], function () {
|
3744 |
+
function MinimumInputLength (decorated, $e, options) {
|
3745 |
+
this.minimumInputLength = options.get('minimumInputLength');
|
3746 |
+
|
3747 |
+
decorated.call(this, $e, options);
|
3748 |
+
}
|
3749 |
+
|
3750 |
+
MinimumInputLength.prototype.query = function (decorated, params, callback) {
|
3751 |
+
params.term = params.term || '';
|
3752 |
+
|
3753 |
+
if (params.term.length < this.minimumInputLength) {
|
3754 |
+
this.trigger('results:message', {
|
3755 |
+
message: 'inputTooShort',
|
3756 |
+
args: {
|
3757 |
+
minimum: this.minimumInputLength,
|
3758 |
+
input: params.term,
|
3759 |
+
params: params
|
3760 |
+
}
|
3761 |
+
});
|
3762 |
+
|
3763 |
+
return;
|
3764 |
+
}
|
3765 |
+
|
3766 |
+
decorated.call(this, params, callback);
|
3767 |
+
};
|
3768 |
+
|
3769 |
+
return MinimumInputLength;
|
3770 |
+
});
|
3771 |
+
|
3772 |
+
S2.define('select2/data/maximumInputLength',[
|
3773 |
+
|
3774 |
+
], function () {
|
3775 |
+
function MaximumInputLength (decorated, $e, options) {
|
3776 |
+
this.maximumInputLength = options.get('maximumInputLength');
|
3777 |
+
|
3778 |
+
decorated.call(this, $e, options);
|
3779 |
+
}
|
3780 |
+
|
3781 |
+
MaximumInputLength.prototype.query = function (decorated, params, callback) {
|
3782 |
+
params.term = params.term || '';
|
3783 |
+
|
3784 |
+
if (this.maximumInputLength > 0 &&
|
3785 |
+
params.term.length > this.maximumInputLength) {
|
3786 |
+
this.trigger('results:message', {
|
3787 |
+
message: 'inputTooLong',
|
3788 |
+
args: {
|
3789 |
+
maximum: this.maximumInputLength,
|
3790 |
+
input: params.term,
|
3791 |
+
params: params
|
3792 |
+
}
|
3793 |
+
});
|
3794 |
+
|
3795 |
+
return;
|
3796 |
+
}
|
3797 |
+
|
3798 |
+
decorated.call(this, params, callback);
|
3799 |
+
};
|
3800 |
+
|
3801 |
+
return MaximumInputLength;
|
3802 |
+
});
|
3803 |
+
|
3804 |
+
S2.define('select2/data/maximumSelectionLength',[
|
3805 |
+
|
3806 |
+
], function (){
|
3807 |
+
function MaximumSelectionLength (decorated, $e, options) {
|
3808 |
+
this.maximumSelectionLength = options.get('maximumSelectionLength');
|
3809 |
+
|
3810 |
+
decorated.call(this, $e, options);
|
3811 |
+
}
|
3812 |
+
|
3813 |
+
MaximumSelectionLength.prototype.query =
|
3814 |
+
function (decorated, params, callback) {
|
3815 |
+
var self = this;
|
3816 |
+
|
3817 |
+
this.current(function (currentData) {
|
3818 |
+
var count = currentData != null ? currentData.length : 0;
|
3819 |
+
if (self.maximumSelectionLength > 0 &&
|
3820 |
+
count >= self.maximumSelectionLength) {
|
3821 |
+
self.trigger('results:message', {
|
3822 |
+
message: 'maximumSelected',
|
3823 |
+
args: {
|
3824 |
+
maximum: self.maximumSelectionLength
|
3825 |
+
}
|
3826 |
+
});
|
3827 |
+
return;
|
3828 |
+
}
|
3829 |
+
decorated.call(self, params, callback);
|
3830 |
+
});
|
3831 |
+
};
|
3832 |
+
|
3833 |
+
return MaximumSelectionLength;
|
3834 |
+
});
|
3835 |
+
|
3836 |
+
S2.define('select2/dropdown',[
|
3837 |
+
'jquery',
|
3838 |
+
'./utils'
|
3839 |
+
], function ($, Utils) {
|
3840 |
+
function Dropdown ($element, options) {
|
3841 |
+
this.$element = $element;
|
3842 |
+
this.options = options;
|
3843 |
+
|
3844 |
+
Dropdown.__super__.constructor.call(this);
|
3845 |
+
}
|
3846 |
+
|
3847 |
+
Utils.Extend(Dropdown, Utils.Observable);
|
3848 |
+
|
3849 |
+
Dropdown.prototype.render = function () {
|
3850 |
+
var $dropdown = $(
|
3851 |
+
'<span class="select2-dropdown">' +
|
3852 |
+
'<span class="select2-results"></span>' +
|
3853 |
+
'</span>'
|
3854 |
+
);
|
3855 |
+
|
3856 |
+
$dropdown.attr('dir', this.options.get('dir'));
|
3857 |
+
|
3858 |
+
this.$dropdown = $dropdown;
|
3859 |
+
|
3860 |
+
return $dropdown;
|
3861 |
+
};
|
3862 |
+
|
3863 |
+
Dropdown.prototype.bind = function () {
|
3864 |
+
// Should be implemented in subclasses
|
3865 |
+
};
|
3866 |
+
|
3867 |
+
Dropdown.prototype.position = function ($dropdown, $container) {
|
3868 |
+
// Should be implmented in subclasses
|
3869 |
+
};
|
3870 |
+
|
3871 |
+
Dropdown.prototype.destroy = function () {
|
3872 |
+
// Remove the dropdown from the DOM
|
3873 |
+
this.$dropdown.remove();
|
3874 |
+
};
|
3875 |
+
|
3876 |
+
return Dropdown;
|
3877 |
+
});
|
3878 |
+
|
3879 |
+
S2.define('select2/dropdown/search',[
|
3880 |
+
'jquery',
|
3881 |
+
'../utils'
|
3882 |
+
], function ($, Utils) {
|
3883 |
+
function Search () { }
|
3884 |
+
|
3885 |
+
Search.prototype.render = function (decorated) {
|
3886 |
+
var $rendered = decorated.call(this);
|
3887 |
+
|
3888 |
+
var $search = $(
|
3889 |
+
'<span class="select2-search select2-search--dropdown">' +
|
3890 |
+
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
3891 |
+
' autocomplete="off" autocorrect="off" autocapitalize="off"' +
|
3892 |
+
' spellcheck="false" role="textbox" />' +
|
3893 |
+
'</span>'
|
3894 |
+
);
|
3895 |
+
|
3896 |
+
this.$searchContainer = $search;
|
3897 |
+
this.$search = $search.find('input');
|
3898 |
+
|
3899 |
+
$rendered.prepend($search);
|
3900 |
+
|
3901 |
+
return $rendered;
|
3902 |
+
};
|
3903 |
+
|
3904 |
+
Search.prototype.bind = function (decorated, container, $container) {
|
3905 |
+
var self = this;
|
3906 |
+
|
3907 |
+
decorated.call(this, container, $container);
|
3908 |
+
|
3909 |
+
this.$search.on('keydown', function (evt) {
|
3910 |
+
self.trigger('keypress', evt);
|
3911 |
+
|
3912 |
+
self._keyUpPrevented = evt.isDefaultPrevented();
|
3913 |
+
});
|
3914 |
+
|
3915 |
+
// Workaround for browsers which do not support the `input` event
|
3916 |
+
// This will prevent double-triggering of events for browsers which support
|
3917 |
+
// both the `keyup` and `input` events.
|
3918 |
+
this.$search.on('input', function (evt) {
|
3919 |
+
// Unbind the duplicated `keyup` event
|
3920 |
+
$(this).off('keyup');
|
3921 |
+
});
|
3922 |
+
|
3923 |
+
this.$search.on('keyup input', function (evt) {
|
3924 |
+
self.handleSearch(evt);
|
3925 |
+
});
|
3926 |
+
|
3927 |
+
container.on('open', function () {
|
3928 |
+
self.$search.attr('tabindex', 0);
|
3929 |
+
|
3930 |
+
self.$search.focus();
|
3931 |
+
|
3932 |
+
window.setTimeout(function () {
|
3933 |
+
self.$search.focus();
|
3934 |
+
}, 0);
|
3935 |
+
});
|
3936 |
+
|
3937 |
+
container.on('close', function () {
|
3938 |
+
self.$search.attr('tabindex', -1);
|
3939 |
+
|
3940 |
+
self.$search.val('');
|
3941 |
+
});
|
3942 |
+
|
3943 |
+
container.on('focus', function () {
|
3944 |
+
if (container.isOpen()) {
|
3945 |
+
self.$search.focus();
|
3946 |
+
}
|
3947 |
+
});
|
3948 |
+
|
3949 |
+
container.on('results:all', function (params) {
|
3950 |
+
if (params.query.term == null || params.query.term === '') {
|
3951 |
+
var showSearch = self.showSearch(params);
|
3952 |
+
|
3953 |
+
if (showSearch) {
|
3954 |
+
self.$searchContainer.removeClass('select2-search--hide');
|
3955 |
+
} else {
|
3956 |
+
self.$searchContainer.addClass('select2-search--hide');
|
3957 |
+
}
|
3958 |
+
}
|
3959 |
+
});
|
3960 |
+
};
|
3961 |
+
|
3962 |
+
Search.prototype.handleSearch = function (evt) {
|
3963 |
+
if (!this._keyUpPrevented) {
|
3964 |
+
var input = this.$search.val();
|
3965 |
+
|
3966 |
+
this.trigger('query', {
|
3967 |
+
term: input
|
3968 |
+
});
|
3969 |
+
}
|
3970 |
+
|
3971 |
+
this._keyUpPrevented = false;
|
3972 |
+
};
|
3973 |
+
|
3974 |
+
Search.prototype.showSearch = function (_, params) {
|
3975 |
+
return true;
|
3976 |
+
};
|
3977 |
+
|
3978 |
+
return Search;
|
3979 |
+
});
|
3980 |
+
|
3981 |
+
S2.define('select2/dropdown/hidePlaceholder',[
|
3982 |
+
|
3983 |
+
], function () {
|
3984 |
+
function HidePlaceholder (decorated, $element, options, dataAdapter) {
|
3985 |
+
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
|
3986 |
+
|
3987 |
+
decorated.call(this, $element, options, dataAdapter);
|
3988 |
+
}
|
3989 |
+
|
3990 |
+
HidePlaceholder.prototype.append = function (decorated, data) {
|
3991 |
+
data.results = this.removePlaceholder(data.results);
|
3992 |
+
|
3993 |
+
decorated.call(this, data);
|
3994 |
+
};
|
3995 |
+
|
3996 |
+
HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
|
3997 |
+
if (typeof placeholder === 'string') {
|
3998 |
+
placeholder = {
|
3999 |
+
id: '',
|
4000 |
+
text: placeholder
|
4001 |
+
};
|
4002 |
+
}
|
4003 |
+
|
4004 |
+
return placeholder;
|
4005 |
+
};
|
4006 |
+
|
4007 |
+
HidePlaceholder.prototype.removePlaceholder = function (_, data) {
|
4008 |
+
var modifiedData = data.slice(0);
|
4009 |
+
|
4010 |
+
for (var d = data.length - 1; d >= 0; d--) {
|
4011 |
+
var item = data[d];
|
4012 |
+
|
4013 |
+
if (this.placeholder.id === item.id) {
|
4014 |
+
modifiedData.splice(d, 1);
|
4015 |
+
}
|
4016 |
+
}
|
4017 |
+
|
4018 |
+
return modifiedData;
|
4019 |
+
};
|
4020 |
+
|
4021 |
+
return HidePlaceholder;
|
4022 |
+
});
|
4023 |
+
|
4024 |
+
S2.define('select2/dropdown/infiniteScroll',[
|
4025 |
+
'jquery'
|
4026 |
+
], function ($) {
|
4027 |
+
function InfiniteScroll (decorated, $element, options, dataAdapter) {
|
4028 |
+
this.lastParams = {};
|
4029 |
+
|
4030 |
+
decorated.call(this, $element, options, dataAdapter);
|
4031 |
+
|
4032 |
+
this.$loadingMore = this.createLoadingMore();
|
4033 |
+
this.loading = false;
|
4034 |
+
}
|
4035 |
+
|
4036 |
+
InfiniteScroll.prototype.append = function (decorated, data) {
|
4037 |
+
this.$loadingMore.remove();
|
4038 |
+
this.loading = false;
|
4039 |
+
|
4040 |
+
decorated.call(this, data);
|
4041 |
+
|
4042 |
+
if (this.showLoadingMore(data)) {
|
4043 |
+
this.$results.append(this.$loadingMore);
|
4044 |
+
}
|
4045 |
+
};
|
4046 |
+
|
4047 |
+
InfiniteScroll.prototype.bind = function (decorated, container, $container) {
|
4048 |
+
var self = this;
|
4049 |
+
|
4050 |
+
decorated.call(this, container, $container);
|
4051 |
+
|
4052 |
+
container.on('query', function (params) {
|
4053 |
+
self.lastParams = params;
|
4054 |
+
self.loading = true;
|
4055 |
+
});
|
4056 |
+
|
4057 |
+
container.on('query:append', function (params) {
|
4058 |
+
self.lastParams = params;
|
4059 |
+
self.loading = true;
|
4060 |
+
});
|
4061 |
+
|
4062 |
+
this.$results.on('scroll', function () {
|
4063 |
+
var isLoadMoreVisible = $.contains(
|
4064 |
+
document.documentElement,
|
4065 |
+
self.$loadingMore[0]
|
4066 |
+
);
|
4067 |
+
|
4068 |
+
if (self.loading || !isLoadMoreVisible) {
|
4069 |
+
return;
|
4070 |
+
}
|
4071 |
+
|
4072 |
+
var currentOffset = self.$results.offset().top +
|
4073 |
+
self.$results.outerHeight(false);
|
4074 |
+
var loadingMoreOffset = self.$loadingMore.offset().top +
|
4075 |
+
self.$loadingMore.outerHeight(false);
|
4076 |
+
|
4077 |
+
if (currentOffset + 50 >= loadingMoreOffset) {
|
4078 |
+
self.loadMore();
|
4079 |
+
}
|
4080 |
+
});
|
4081 |
+
};
|
4082 |
+
|
4083 |
+
InfiniteScroll.prototype.loadMore = function () {
|
4084 |
+
this.loading = true;
|
4085 |
+
|
4086 |
+
var params = $.extend({}, {page: 1}, this.lastParams);
|
4087 |
+
|
4088 |
+
params.page++;
|
4089 |
+
|
4090 |
+
this.trigger('query:append', params);
|
4091 |
+
};
|
4092 |
+
|
4093 |
+
InfiniteScroll.prototype.showLoadingMore = function (_, data) {
|
4094 |
+
return data.pagination && data.pagination.more;
|
4095 |
+
};
|
4096 |
+
|
4097 |
+
InfiniteScroll.prototype.createLoadingMore = function () {
|
4098 |
+
var $option = $(
|
4099 |
+
'<li ' +
|
4100 |
+
'class="select2-results__option select2-results__option--load-more"' +
|
4101 |
+
'role="treeitem" aria-disabled="true"></li>'
|
4102 |
+
);
|
4103 |
+
|
4104 |
+
var message = this.options.get('translations').get('loadingMore');
|
4105 |
+
|
4106 |
+
$option.html(message(this.lastParams));
|
4107 |
+
|
4108 |
+
return $option;
|
4109 |
+
};
|
4110 |
+
|
4111 |
+
return InfiniteScroll;
|
4112 |
+
});
|
4113 |
+
|
4114 |
+
S2.define('select2/dropdown/attachBody',[
|
4115 |
+
'jquery',
|
4116 |
+
'../utils'
|
4117 |
+
], function ($, Utils) {
|
4118 |
+
function AttachBody (decorated, $element, options) {
|
4119 |
+
this.$dropdownParent = options.get('dropdownParent') || $(document.body);
|
4120 |
+
|
4121 |
+
decorated.call(this, $element, options);
|
4122 |
+
}
|
4123 |
+
|
4124 |
+
AttachBody.prototype.bind = function (decorated, container, $container) {
|
4125 |
+
var self = this;
|
4126 |
+
|
4127 |
+
var setupResultsEvents = false;
|
4128 |
+
|
4129 |
+
decorated.call(this, container, $container);
|
4130 |
+
|
4131 |
+
container.on('open', function () {
|
4132 |
+
self._showDropdown();
|
4133 |
+
self._attachPositioningHandler(container);
|
4134 |
+
|
4135 |
+
if (!setupResultsEvents) {
|
4136 |
+
setupResultsEvents = true;
|
4137 |
+
|
4138 |
+
container.on('results:all', function () {
|
4139 |
+
self._positionDropdown();
|
4140 |
+
self._resizeDropdown();
|
4141 |
+
});
|
4142 |
+
|
4143 |
+
container.on('results:append', function () {
|
4144 |
+
self._positionDropdown();
|
4145 |
+
self._resizeDropdown();
|
4146 |
+
});
|
4147 |
+
}
|
4148 |
+
});
|
4149 |
+
|
4150 |
+
container.on('close', function () {
|
4151 |
+
self._hideDropdown();
|
4152 |
+
self._detachPositioningHandler(container);
|
4153 |
+
});
|
4154 |
+
|
4155 |
+
this.$dropdownContainer.on('mousedown', function (evt) {
|
4156 |
+
evt.stopPropagation();
|
4157 |
+
});
|
4158 |
+
};
|
4159 |
+
|
4160 |
+
AttachBody.prototype.destroy = function (decorated) {
|
4161 |
+
decorated.call(this);
|
4162 |
+
|
4163 |
+
this.$dropdownContainer.remove();
|
4164 |
+
};
|
4165 |
+
|
4166 |
+
AttachBody.prototype.position = function (decorated, $dropdown, $container) {
|
4167 |
+
// Clone all of the container classes
|
4168 |
+
$dropdown.attr('class', $container.attr('class'));
|
4169 |
+
|
4170 |
+
$dropdown.removeClass('select2');
|
4171 |
+
$dropdown.addClass('select2-container--open');
|
4172 |
+
|
4173 |
+
$dropdown.css({
|
4174 |
+
position: 'absolute',
|
4175 |
+
top: -999999
|
4176 |
+
});
|
4177 |
+
|
4178 |
+
this.$container = $container;
|
4179 |
+
};
|
4180 |
+
|
4181 |
+
AttachBody.prototype.render = function (decorated) {
|
4182 |
+
var $container = $('<span></span>');
|
4183 |
+
|
4184 |
+
var $dropdown = decorated.call(this);
|
4185 |
+
$container.append($dropdown);
|
4186 |
+
|
4187 |
+
this.$dropdownContainer = $container;
|
4188 |
+
|
4189 |
+
return $container;
|
4190 |
+
};
|
4191 |
+
|
4192 |
+
AttachBody.prototype._hideDropdown = function (decorated) {
|
4193 |
+
this.$dropdownContainer.detach();
|
4194 |
+
};
|
4195 |
+
|
4196 |
+
AttachBody.prototype._attachPositioningHandler =
|
4197 |
+
function (decorated, container) {
|
4198 |
+
var self = this;
|
4199 |
+
|
4200 |
+
var scrollEvent = 'scroll.select2.' + container.id;
|
4201 |
+
var resizeEvent = 'resize.select2.' + container.id;
|
4202 |
+
var orientationEvent = 'orientationchange.select2.' + container.id;
|
4203 |
+
|
4204 |
+
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4205 |
+
$watchers.each(function () {
|
4206 |
+
$(this).data('select2-scroll-position', {
|
4207 |
+
x: $(this).scrollLeft(),
|
4208 |
+
y: $(this).scrollTop()
|
4209 |
+
});
|
4210 |
+
});
|
4211 |
+
|
4212 |
+
$watchers.on(scrollEvent, function (ev) {
|
4213 |
+
var position = $(this).data('select2-scroll-position');
|
4214 |
+
$(this).scrollTop(position.y);
|
4215 |
+
});
|
4216 |
+
|
4217 |
+
$(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
|
4218 |
+
function (e) {
|
4219 |
+
self._positionDropdown();
|
4220 |
+
self._resizeDropdown();
|
4221 |
+
});
|
4222 |
+
};
|
4223 |
+
|
4224 |
+
AttachBody.prototype._detachPositioningHandler =
|
4225 |
+
function (decorated, container) {
|
4226 |
+
var scrollEvent = 'scroll.select2.' + container.id;
|
4227 |
+
var resizeEvent = 'resize.select2.' + container.id;
|
4228 |
+
var orientationEvent = 'orientationchange.select2.' + container.id;
|
4229 |
+
|
4230 |
+
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4231 |
+
$watchers.off(scrollEvent);
|
4232 |
+
|
4233 |
+
$(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
|
4234 |
+
};
|
4235 |
+
|
4236 |
+
AttachBody.prototype._positionDropdown = function () {
|
4237 |
+
var $window = $(window);
|
4238 |
+
|
4239 |
+
var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
|
4240 |
+
var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
|
4241 |
+
|
4242 |
+
var newDirection = null;
|
4243 |
+
|
4244 |
+
var offset = this.$container.offset();
|
4245 |
+
|
4246 |
+
offset.bottom = offset.top + this.$container.outerHeight(false);
|
4247 |
+
|
4248 |
+
var container = {
|
4249 |
+
height: this.$container.outerHeight(false)
|
4250 |
+
};
|
4251 |
+
|
4252 |
+
container.top = offset.top;
|
4253 |
+
container.bottom = offset.top + container.height;
|
4254 |
+
|
4255 |
+
var dropdown = {
|
4256 |
+
height: this.$dropdown.outerHeight(false)
|
4257 |
+
};
|
4258 |
+
|
4259 |
+
var viewport = {
|
4260 |
+
top: $window.scrollTop(),
|
4261 |
+
bottom: $window.scrollTop() + $window.height()
|
4262 |
+
};
|
4263 |
+
|
4264 |
+
var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
|
4265 |
+
var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
|
4266 |
+
|
4267 |
+
var css = {
|
4268 |
+
left: offset.left,
|
4269 |
+
top: container.bottom
|
4270 |
+
};
|
4271 |
+
|
4272 |
+
// Determine what the parent element is to use for calciulating the offset
|
4273 |
+
var $offsetParent = this.$dropdownParent;
|
4274 |
+
|
4275 |
+
// For statically positoned elements, we need to get the element
|
4276 |
+
// that is determining the offset
|
4277 |
+
if ($offsetParent.css('position') === 'static') {
|
4278 |
+
$offsetParent = $offsetParent.offsetParent();
|
4279 |
+
}
|
4280 |
+
|
4281 |
+
var parentOffset = $offsetParent.offset();
|
4282 |
+
|
4283 |
+
css.top -= parentOffset.top;
|
4284 |
+
css.left -= parentOffset.left;
|
4285 |
+
|
4286 |
+
if (!isCurrentlyAbove && !isCurrentlyBelow) {
|
4287 |
+
newDirection = 'below';
|
4288 |
+
}
|
4289 |
+
|
4290 |
+
if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
|
4291 |
+
newDirection = 'above';
|
4292 |
+
} else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
|
4293 |
+
newDirection = 'below';
|
4294 |
+
}
|
4295 |
+
|
4296 |
+
if (newDirection == 'above' ||
|
4297 |
+
(isCurrentlyAbove && newDirection !== 'below')) {
|
4298 |
+
css.top = container.top - parentOffset.top - dropdown.height;
|
4299 |
+
}
|
4300 |
+
|
4301 |
+
if (newDirection != null) {
|
4302 |
+
this.$dropdown
|
4303 |
+
.removeClass('select2-dropdown--below select2-dropdown--above')
|
4304 |
+
.addClass('select2-dropdown--' + newDirection);
|
4305 |
+
this.$container
|
4306 |
+
.removeClass('select2-container--below select2-container--above')
|
4307 |
+
.addClass('select2-container--' + newDirection);
|
4308 |
+
}
|
4309 |
+
|
4310 |
+
this.$dropdownContainer.css(css);
|
4311 |
+
};
|
4312 |
+
|
4313 |
+
AttachBody.prototype._resizeDropdown = function () {
|
4314 |
+
var css = {
|
4315 |
+
width: this.$container.outerWidth(false) + 'px'
|
4316 |
+
};
|
4317 |
+
|
4318 |
+
if (this.options.get('dropdownAutoWidth')) {
|
4319 |
+
css.minWidth = css.width;
|
4320 |
+
css.position = 'relative';
|
4321 |
+
css.width = 'auto';
|
4322 |
+
}
|
4323 |
+
|
4324 |
+
this.$dropdown.css(css);
|
4325 |
+
};
|
4326 |
+
|
4327 |
+
AttachBody.prototype._showDropdown = function (decorated) {
|
4328 |
+
this.$dropdownContainer.appendTo(this.$dropdownParent);
|
4329 |
+
|
4330 |
+
this._positionDropdown();
|
4331 |
+
this._resizeDropdown();
|
4332 |
+
};
|
4333 |
+
|
4334 |
+
return AttachBody;
|
4335 |
+
});
|
4336 |
+
|
4337 |
+
S2.define('select2/dropdown/minimumResultsForSearch',[
|
4338 |
+
|
4339 |
+
], function () {
|
4340 |
+
function countResults (data) {
|
4341 |
+
var count = 0;
|
4342 |
+
|
4343 |
+
for (var d = 0; d < data.length; d++) {
|
4344 |
+
var item = data[d];
|
4345 |
+
|
4346 |
+
if (item.children) {
|
4347 |
+
count += countResults(item.children);
|
4348 |
+
} else {
|
4349 |
+
count++;
|
4350 |
+
}
|
4351 |
+
}
|
4352 |
+
|
4353 |
+
return count;
|
4354 |
+
}
|
4355 |
+
|
4356 |
+
function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
|
4357 |
+
this.minimumResultsForSearch = options.get('minimumResultsForSearch');
|
4358 |
+
|
4359 |
+
if (this.minimumResultsForSearch < 0) {
|
4360 |
+
this.minimumResultsForSearch = Infinity;
|
4361 |
+
}
|
4362 |
+
|
4363 |
+
decorated.call(this, $element, options, dataAdapter);
|
4364 |
+
}
|
4365 |
+
|
4366 |
+
MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
|
4367 |
+
if (countResults(params.data.results) < this.minimumResultsForSearch) {
|
4368 |
+
return false;
|
4369 |
+
}
|
4370 |
+
|
4371 |
+
return decorated.call(this, params);
|
4372 |
+
};
|
4373 |
+
|
4374 |
+
return MinimumResultsForSearch;
|
4375 |
+
});
|
4376 |
+
|
4377 |
+
S2.define('select2/dropdown/selectOnClose',[
|
4378 |
+
|
4379 |
+
], function () {
|
4380 |
+
function SelectOnClose () { }
|
4381 |
+
|
4382 |
+
SelectOnClose.prototype.bind = function (decorated, container, $container) {
|
4383 |
+
var self = this;
|
4384 |
+
|
4385 |
+
decorated.call(this, container, $container);
|
4386 |
+
|
4387 |
+
container.on('close', function (params) {
|
4388 |
+
self._handleSelectOnClose(params);
|
4389 |
+
});
|
4390 |
+
};
|
4391 |
+
|
4392 |
+
SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
|
4393 |
+
if (params && params.originalSelect2Event != null) {
|
4394 |
+
var event = params.originalSelect2Event;
|
4395 |
+
|
4396 |
+
// Don't select an item if the close event was triggered from a select or
|
4397 |
+
// unselect event
|
4398 |
+
if (event._type === 'select' || event._type === 'unselect') {
|
4399 |
+
return;
|
4400 |
+
}
|
4401 |
+
}
|
4402 |
+
|
4403 |
+
var $highlightedResults = this.getHighlightedResults();
|
4404 |
+
|
4405 |
+
// Only select highlighted results
|
4406 |
+
if ($highlightedResults.length < 1) {
|
4407 |
+
return;
|
4408 |
+
}
|
4409 |
+
|
4410 |
+
var data = $highlightedResults.data('data');
|
4411 |
+
|
4412 |
+
// Don't re-select already selected resulte
|
4413 |
+
if (
|
4414 |
+
(data.element != null && data.element.selected) ||
|
4415 |
+
(data.element == null && data.selected)
|
4416 |
+
) {
|
4417 |
+
return;
|
4418 |
+
}
|
4419 |
+
|
4420 |
+
this.trigger('select', {
|
4421 |
+
data: data
|
4422 |
+
});
|
4423 |
+
};
|
4424 |
+
|
4425 |
+
return SelectOnClose;
|
4426 |
+
});
|
4427 |
+
|
4428 |
+
S2.define('select2/dropdown/closeOnSelect',[
|
4429 |
+
|
4430 |
+
], function () {
|
4431 |
+
function CloseOnSelect () { }
|
4432 |
+
|
4433 |
+
CloseOnSelect.prototype.bind = function (decorated, container, $container) {
|
4434 |
+
var self = this;
|
4435 |
+
|
4436 |
+
decorated.call(this, container, $container);
|
4437 |
+
|
4438 |
+
container.on('select', function (evt) {
|
4439 |
+
self._selectTriggered(evt);
|
4440 |
+
});
|
4441 |
+
|
4442 |
+
container.on('unselect', function (evt) {
|
4443 |
+
self._selectTriggered(evt);
|
4444 |
+
});
|
4445 |
+
};
|
4446 |
+
|
4447 |
+
CloseOnSelect.prototype._selectTriggered = function (_, evt) {
|
4448 |
+
var originalEvent = evt.originalEvent;
|
4449 |
+
|
4450 |
+
// Don't close if the control key is being held
|
4451 |
+
if (originalEvent && originalEvent.ctrlKey) {
|
4452 |
+
return;
|
4453 |
+
}
|
4454 |
+
|
4455 |
+
this.trigger('close', {
|
4456 |
+
originalEvent: originalEvent,
|
4457 |
+
originalSelect2Event: evt
|
4458 |
+
});
|
4459 |
+
};
|
4460 |
+
|
4461 |
+
return CloseOnSelect;
|
4462 |
+
});
|
4463 |
+
|
4464 |
+
S2.define('select2/i18n/en',[],function () {
|
4465 |
+
// English
|
4466 |
+
return {
|
4467 |
+
errorLoading: function () {
|
4468 |
+
return 'The results could not be loaded.';
|
4469 |
+
},
|
4470 |
+
inputTooLong: function (args) {
|
4471 |
+
var overChars = args.input.length - args.maximum;
|
4472 |
+
|
4473 |
+
var message = 'Please delete ' + overChars + ' character';
|
4474 |
+
|
4475 |
+
if (overChars != 1) {
|
4476 |
+
message += 's';
|
4477 |
+
}
|
4478 |
+
|
4479 |
+
return message;
|
4480 |
+
},
|
4481 |
+
inputTooShort: function (args) {
|
4482 |
+
var remainingChars = args.minimum - args.input.length;
|
4483 |
+
|
4484 |
+
var message = 'Please enter ' + remainingChars + ' or more characters';
|
4485 |
+
|
4486 |
+
return message;
|
4487 |
+
},
|
4488 |
+
loadingMore: function () {
|
4489 |
+
return 'Loading more results…';
|
4490 |
+
},
|
4491 |
+
maximumSelected: function (args) {
|
4492 |
+
var message = 'You can only select ' + args.maximum + ' item';
|
4493 |
+
|
4494 |
+
if (args.maximum != 1) {
|
4495 |
+
message += 's';
|
4496 |
+
}
|
4497 |
+
|
4498 |
+
return message;
|
4499 |
+
},
|
4500 |
+
noResults: function () {
|
4501 |
+
return 'No results found';
|
4502 |
+
},
|
4503 |
+
searching: function () {
|
4504 |
+
return 'Searching…';
|
4505 |
+
}
|
4506 |
+
};
|
4507 |
+
});
|
4508 |
+
|
4509 |
+
S2.define('select2/defaults',[
|
4510 |
+
'jquery',
|
4511 |
+
'require',
|
4512 |
+
|
4513 |
+
'./results',
|
4514 |
+
|
4515 |
+
'./selection/single',
|
4516 |
+
'./selection/multiple',
|
4517 |
+
'./selection/placeholder',
|
4518 |
+
'./selection/allowClear',
|
4519 |
+
'./selection/search',
|
4520 |
+
'./selection/eventRelay',
|
4521 |
+
|
4522 |
+
'./utils',
|
4523 |
+
'./translation',
|
4524 |
+
'./diacritics',
|
4525 |
+
|
4526 |
+
'./data/select',
|
4527 |
+
'./data/array',
|
4528 |
+
'./data/ajax',
|
4529 |
+
'./data/tags',
|
4530 |
+
'./data/tokenizer',
|
4531 |
+
'./data/minimumInputLength',
|
4532 |
+
'./data/maximumInputLength',
|
4533 |
+
'./data/maximumSelectionLength',
|
4534 |
+
|
4535 |
+
'./dropdown',
|
4536 |
+
'./dropdown/search',
|
4537 |
+
'./dropdown/hidePlaceholder',
|
4538 |
+
'./dropdown/infiniteScroll',
|
4539 |
+
'./dropdown/attachBody',
|
4540 |
+
'./dropdown/minimumResultsForSearch',
|
4541 |
+
'./dropdown/selectOnClose',
|
4542 |
+
'./dropdown/closeOnSelect',
|
4543 |
+
|
4544 |
+
'./i18n/en'
|
4545 |
+
], function ($, require,
|
4546 |
+
|
4547 |
+
ResultsList,
|
4548 |
+
|
4549 |
+
SingleSelection, MultipleSelection, Placeholder, AllowClear,
|
4550 |
+
SelectionSearch, EventRelay,
|
4551 |
+
|
4552 |
+
Utils, Translation, DIACRITICS,
|
4553 |
+
|
4554 |
+
SelectData, ArrayData, AjaxData, Tags, Tokenizer,
|
4555 |
+
MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
|
4556 |
+
|
4557 |
+
Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
|
4558 |
+
AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
|
4559 |
+
|
4560 |
+
EnglishTranslation) {
|
4561 |
+
function Defaults () {
|
4562 |
+
this.reset();
|
4563 |
+
}
|
4564 |
+
|
4565 |
+
Defaults.prototype.apply = function (options) {
|
4566 |
+
options = $.extend(true, {}, this.defaults, options);
|
4567 |
+
|
4568 |
+
if (options.dataAdapter == null) {
|
4569 |
+
if (options.ajax != null) {
|
4570 |
+
options.dataAdapter = AjaxData;
|
4571 |
+
} else if (options.data != null) {
|
4572 |
+
options.dataAdapter = ArrayData;
|
4573 |
+
} else {
|
4574 |
+
options.dataAdapter = SelectData;
|
4575 |
+
}
|
4576 |
+
|
4577 |
+
if (options.minimumInputLength > 0) {
|
4578 |
+
options.dataAdapter = Utils.Decorate(
|
4579 |
+
options.dataAdapter,
|
4580 |
+
MinimumInputLength
|
4581 |
+
);
|
4582 |
+
}
|
4583 |
+
|
4584 |
+
if (options.maximumInputLength > 0) {
|
4585 |
+
options.dataAdapter = Utils.Decorate(
|
4586 |
+
options.dataAdapter,
|
4587 |
+
MaximumInputLength
|
4588 |
+
);
|
4589 |
+
}
|
4590 |
+
|
4591 |
+
if (options.maximumSelectionLength > 0) {
|
4592 |
+
options.dataAdapter = Utils.Decorate(
|
4593 |
+
options.dataAdapter,
|
4594 |
+
MaximumSelectionLength
|
4595 |
+
);
|
4596 |
+
}
|
4597 |
+
|
4598 |
+
if (options.tags) {
|
4599 |
+
options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
|
4600 |
+
}
|
4601 |
+
|
4602 |
+
if (options.tokenSeparators != null || options.tokenizer != null) {
|
4603 |
+
options.dataAdapter = Utils.Decorate(
|
4604 |
+
options.dataAdapter,
|
4605 |
+
Tokenizer
|
4606 |
+
);
|
4607 |
+
}
|
4608 |
+
|
4609 |
+
if (options.query != null) {
|
4610 |
+
var Query = require(options.amdBase + 'compat/query');
|
4611 |
+
|
4612 |
+
options.dataAdapter = Utils.Decorate(
|
4613 |
+
options.dataAdapter,
|
4614 |
+
Query
|
4615 |
+
);
|
4616 |
+
}
|
4617 |
+
|
4618 |
+
if (options.initSelection != null) {
|
4619 |
+
var InitSelection = require(options.amdBase + 'compat/initSelection');
|
4620 |
+
|
4621 |
+
options.dataAdapter = Utils.Decorate(
|
4622 |
+
options.dataAdapter,
|
4623 |
+
InitSelection
|
4624 |
+
);
|
4625 |
+
}
|
4626 |
+
}
|
4627 |
+
|
4628 |
+
if (options.resultsAdapter == null) {
|
4629 |
+
options.resultsAdapter = ResultsList;
|
4630 |
+
|
4631 |
+
if (options.ajax != null) {
|
4632 |
+
options.resultsAdapter = Utils.Decorate(
|
4633 |
+
options.resultsAdapter,
|
4634 |
+
InfiniteScroll
|
4635 |
+
);
|
4636 |
+
}
|
4637 |
+
|
4638 |
+
if (options.placeholder != null) {
|
4639 |
+
options.resultsAdapter = Utils.Decorate(
|
4640 |
+
options.resultsAdapter,
|
4641 |
+
HidePlaceholder
|
4642 |
+
);
|
4643 |
+
}
|
4644 |
+
|
4645 |
+
if (options.selectOnClose) {
|
4646 |
+
options.resultsAdapter = Utils.Decorate(
|
4647 |
+
options.resultsAdapter,
|
4648 |
+
SelectOnClose
|
4649 |
+
);
|
4650 |
+
}
|
4651 |
+
}
|
4652 |
+
|
4653 |
+
if (options.dropdownAdapter == null) {
|
4654 |
+
if (options.multiple) {
|
4655 |
+
options.dropdownAdapter = Dropdown;
|
4656 |
+
} else {
|
4657 |
+
var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
|
4658 |
+
|
4659 |
+
options.dropdownAdapter = SearchableDropdown;
|
4660 |
+
}
|
4661 |
+
|
4662 |
+
if (options.minimumResultsForSearch !== 0) {
|
4663 |
+
options.dropdownAdapter = Utils.Decorate(
|
4664 |
+
options.dropdownAdapter,
|
4665 |
+
MinimumResultsForSearch
|
4666 |
+
);
|
4667 |
+
}
|
4668 |
+
|
4669 |
+
if (options.closeOnSelect) {
|
4670 |
+
options.dropdownAdapter = Utils.Decorate(
|
4671 |
+
options.dropdownAdapter,
|
4672 |
+
CloseOnSelect
|
4673 |
+
);
|
4674 |
+
}
|
4675 |
+
|
4676 |
+
if (
|
4677 |
+
options.dropdownCssClass != null ||
|
4678 |
+
options.dropdownCss != null ||
|
4679 |
+
options.adaptDropdownCssClass != null
|
4680 |
+
) {
|
4681 |
+
var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
|
4682 |
+
|
4683 |
+
options.dropdownAdapter = Utils.Decorate(
|
4684 |
+
options.dropdownAdapter,
|
4685 |
+
DropdownCSS
|
4686 |
+
);
|
4687 |
+
}
|
4688 |
+
|
4689 |
+
options.dropdownAdapter = Utils.Decorate(
|
4690 |
+
options.dropdownAdapter,
|
4691 |
+
AttachBody
|
4692 |
+
);
|
4693 |
+
}
|
4694 |
+
|
4695 |
+
if (options.selectionAdapter == null) {
|
4696 |
+
if (options.multiple) {
|
4697 |
+
options.selectionAdapter = MultipleSelection;
|
4698 |
+
} else {
|
4699 |
+
options.selectionAdapter = SingleSelection;
|
4700 |
+
}
|
4701 |
+
|
4702 |
+
// Add the placeholder mixin if a placeholder was specified
|
4703 |
+
if (options.placeholder != null) {
|
4704 |
+
options.selectionAdapter = Utils.Decorate(
|
4705 |
+
options.selectionAdapter,
|
4706 |
+
Placeholder
|
4707 |
+
);
|
4708 |
+
}
|
4709 |
+
|
4710 |
+
if (options.allowClear) {
|
4711 |
+
options.selectionAdapter = Utils.Decorate(
|
4712 |
+
options.selectionAdapter,
|
4713 |
+
AllowClear
|
4714 |
+
);
|
4715 |
+
}
|
4716 |
+
|
4717 |
+
if (options.multiple) {
|
4718 |
+
options.selectionAdapter = Utils.Decorate(
|
4719 |
+
options.selectionAdapter,
|
4720 |
+
SelectionSearch
|
4721 |
+
);
|
4722 |
+
}
|
4723 |
+
|
4724 |
+
if (
|
4725 |
+
options.containerCssClass != null ||
|
4726 |
+
options.containerCss != null ||
|
4727 |
+
options.adaptContainerCssClass != null
|
4728 |
+
) {
|
4729 |
+
var ContainerCSS = require(options.amdBase + 'compat/containerCss');
|
4730 |
+
|
4731 |
+
options.selectionAdapter = Utils.Decorate(
|
4732 |
+
options.selectionAdapter,
|
4733 |
+
ContainerCSS
|
4734 |
+
);
|
4735 |
+
}
|
4736 |
+
|
4737 |
+
options.selectionAdapter = Utils.Decorate(
|
4738 |
+
options.selectionAdapter,
|
4739 |
+
EventRelay
|
4740 |
+
);
|
4741 |
+
}
|
4742 |
+
|
4743 |
+
if (typeof options.language === 'string') {
|
4744 |
+
// Check if the language is specified with a region
|
4745 |
+
if (options.language.indexOf('-') > 0) {
|
4746 |
+
// Extract the region information if it is included
|
4747 |
+
var languageParts = options.language.split('-');
|
4748 |
+
var baseLanguage = languageParts[0];
|
4749 |
+
|
4750 |
+
options.language = [options.language, baseLanguage];
|
4751 |
+
} else {
|
4752 |
+
options.language = [options.language];
|
4753 |
+
}
|
4754 |
+
}
|
4755 |
+
|
4756 |
+
if ($.isArray(options.language)) {
|
4757 |
+
var languages = new Translation();
|
4758 |
+
options.language.push('en');
|
4759 |
+
|
4760 |
+
var languageNames = options.language;
|
4761 |
+
|
4762 |
+
for (var l = 0; l < languageNames.length; l++) {
|
4763 |
+
var name = languageNames[l];
|
4764 |
+
var language = {};
|
4765 |
+
|
4766 |
+
try {
|
4767 |
+
// Try to load it with the original name
|
4768 |
+
language = Translation.loadPath(name);
|
4769 |
+
} catch (e) {
|
4770 |
+
try {
|
4771 |
+
// If we couldn't load it, check if it wasn't the full path
|
4772 |
+
name = this.defaults.amdLanguageBase + name;
|
4773 |
+
language = Translation.loadPath(name);
|
4774 |
+
} catch (ex) {
|
4775 |
+
// The translation could not be loaded at all. Sometimes this is
|
4776 |
+
// because of a configuration problem, other times this can be
|
4777 |
+
// because of how Select2 helps load all possible translation files.
|
4778 |
+
if (options.debug && window.console && console.warn) {
|
4779 |
+
console.warn(
|
4780 |
+
'Select2: The language file for "' + name + '" could not be ' +
|
4781 |
+
'automatically loaded. A fallback will be used instead.'
|
4782 |
+
);
|
4783 |
+
}
|
4784 |
+
|
4785 |
+
continue;
|
4786 |
+
}
|
4787 |
+
}
|
4788 |
+
|
4789 |
+
languages.extend(language);
|
4790 |
+
}
|
4791 |
+
|
4792 |
+
options.translations = languages;
|
4793 |
+
} else {
|
4794 |
+
var baseTranslation = Translation.loadPath(
|
4795 |
+
this.defaults.amdLanguageBase + 'en'
|
4796 |
+
);
|
4797 |
+
var customTranslation = new Translation(options.language);
|
4798 |
+
|
4799 |
+
customTranslation.extend(baseTranslation);
|
4800 |
+
|
4801 |
+
options.translations = customTranslation;
|
4802 |
+
}
|
4803 |
+
|
4804 |
+
return options;
|
4805 |
+
};
|
4806 |
+
|
4807 |
+
Defaults.prototype.reset = function () {
|
4808 |
+
function stripDiacritics (text) {
|
4809 |
+
// Used 'uni range + named function' from http://jsperf.com/diacritics/18
|
4810 |
+
function match(a) {
|
4811 |
+
return DIACRITICS[a] || a;
|
4812 |
+
}
|
4813 |
+
|
4814 |
+
return text.replace(/[^\u0000-\u007E]/g, match);
|
4815 |
+
}
|
4816 |
+
|
4817 |
+
function matcher (params, data) {
|
4818 |
+
// Always return the object if there is nothing to compare
|
4819 |
+
if ($.trim(params.term) === '') {
|
4820 |
+
return data;
|
4821 |
+
}
|
4822 |
+
|
4823 |
+
// Do a recursive check for options with children
|
4824 |
+
if (data.children && data.children.length > 0) {
|
4825 |
+
// Clone the data object if there are children
|
4826 |
+
// This is required as we modify the object to remove any non-matches
|
4827 |
+
var match = $.extend(true, {}, data);
|
4828 |
+
|
4829 |
+
// Check each child of the option
|
4830 |
+
for (var c = data.children.length - 1; c >= 0; c--) {
|
4831 |
+
var child = data.children[c];
|
4832 |
+
|
4833 |
+
var matches = matcher(params, child);
|
4834 |
+
|
4835 |
+
// If there wasn't a match, remove the object in the array
|
4836 |
+
if (matches == null) {
|
4837 |
+
match.children.splice(c, 1);
|
4838 |
+
}
|
4839 |
+
}
|
4840 |
+
|
4841 |
+
// If any children matched, return the new object
|
4842 |
+
if (match.children.length > 0) {
|
4843 |
+
return match;
|
4844 |
+
}
|
4845 |
+
|
4846 |
+
// If there were no matching children, check just the plain object
|
4847 |
+
return matcher(params, match);
|
4848 |
+
}
|
4849 |
+
|
4850 |
+
var original = stripDiacritics(data.text).toUpperCase();
|
4851 |
+
var term = stripDiacritics(params.term).toUpperCase();
|
4852 |
+
|
4853 |
+
// Check if the text contains the term
|
4854 |
+
if (original.indexOf(term) > -1) {
|
4855 |
+
return data;
|
4856 |
+
}
|
4857 |
+
|
4858 |
+
// If it doesn't contain the term, don't return anything
|
4859 |
+
return null;
|
4860 |
+
}
|
4861 |
+
|
4862 |
+
this.defaults = {
|
4863 |
+
amdBase: './',
|
4864 |
+
amdLanguageBase: './i18n/',
|
4865 |
+
closeOnSelect: true,
|
4866 |
+
debug: false,
|
4867 |
+
dropdownAutoWidth: false,
|
4868 |
+
escapeMarkup: Utils.escapeMarkup,
|
4869 |
+
language: EnglishTranslation,
|
4870 |
+
matcher: matcher,
|
4871 |
+
minimumInputLength: 0,
|
4872 |
+
maximumInputLength: 0,
|
4873 |
+
maximumSelectionLength: 0,
|
4874 |
+
minimumResultsForSearch: 0,
|
4875 |
+
selectOnClose: false,
|
4876 |
+
sorter: function (data) {
|
4877 |
+
return data;
|
4878 |
+
},
|
4879 |
+
templateResult: function (result) {
|
4880 |
+
return result.text;
|
4881 |
+
},
|
4882 |
+
templateSelection: function (selection) {
|
4883 |
+
return selection.text;
|
4884 |
+
},
|
4885 |
+
theme: 'default',
|
4886 |
+
width: 'resolve'
|
4887 |
+
};
|
4888 |
+
};
|
4889 |
+
|
4890 |
+
Defaults.prototype.set = function (key, value) {
|
4891 |
+
var camelKey = $.camelCase(key);
|
4892 |
+
|
4893 |
+
var data = {};
|
4894 |
+
data[camelKey] = value;
|
4895 |
+
|
4896 |
+
var convertedData = Utils._convertData(data);
|
4897 |
+
|
4898 |
+
$.extend(this.defaults, convertedData);
|
4899 |
+
};
|
4900 |
+
|
4901 |
+
var defaults = new Defaults();
|
4902 |
+
|
4903 |
+
return defaults;
|
4904 |
+
});
|
4905 |
+
|
4906 |
+
S2.define('select2/options',[
|
4907 |
+
'require',
|
4908 |
+
'jquery',
|
4909 |
+
'./defaults',
|
4910 |
+
'./utils'
|
4911 |
+
], function (require, $, Defaults, Utils) {
|
4912 |
+
function Options (options, $element) {
|
4913 |
+
this.options = options;
|
4914 |
+
|
4915 |
+
if ($element != null) {
|
4916 |
+
this.fromElement($element);
|
4917 |
+
}
|
4918 |
+
|
4919 |
+
this.options = Defaults.apply(this.options);
|
4920 |
+
|
4921 |
+
if ($element && $element.is('input')) {
|
4922 |
+
var InputCompat = require(this.get('amdBase') + 'compat/inputData');
|
4923 |
+
|
4924 |
+
this.options.dataAdapter = Utils.Decorate(
|
4925 |
+
this.options.dataAdapter,
|
4926 |
+
InputCompat
|
4927 |
+
);
|
4928 |
+
}
|
4929 |
+
}
|
4930 |
+
|
4931 |
+
Options.prototype.fromElement = function ($e) {
|
4932 |
+
var excludedData = ['select2'];
|
4933 |
+
|
4934 |
+
if (this.options.multiple == null) {
|
4935 |
+
this.options.multiple = $e.prop('multiple');
|
4936 |
+
}
|
4937 |
+
|
4938 |
+
if (this.options.disabled == null) {
|
4939 |
+
this.options.disabled = $e.prop('disabled');
|
4940 |
+
}
|
4941 |
+
|
4942 |
+
if (this.options.language == null) {
|
4943 |
+
if ($e.prop('lang')) {
|
4944 |
+
this.options.language = $e.prop('lang').toLowerCase();
|
4945 |
+
} else if ($e.closest('[lang]').prop('lang')) {
|
4946 |
+
this.options.language = $e.closest('[lang]').prop('lang');
|
4947 |
+
}
|
4948 |
+
}
|
4949 |
+
|
4950 |
+
if (this.options.dir == null) {
|
4951 |
+
if ($e.prop('dir')) {
|
4952 |
+
this.options.dir = $e.prop('dir');
|
4953 |
+
} else if ($e.closest('[dir]').prop('dir')) {
|
4954 |
+
this.options.dir = $e.closest('[dir]').prop('dir');
|
4955 |
+
} else {
|
4956 |
+
this.options.dir = 'ltr';
|
4957 |
+
}
|
4958 |
+
}
|
4959 |
+
|
4960 |
+
$e.prop('disabled', this.options.disabled);
|
4961 |
+
$e.prop('multiple', this.options.multiple);
|
4962 |
+
|
4963 |
+
if ($e.data('select2Tags')) {
|
4964 |
+
if (this.options.debug && window.console && console.warn) {
|
4965 |
+
console.warn(
|
4966 |
+
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
4967 |
+
'use the `data-data` and `data-tags="true"` attributes and will be ' +
|
4968 |
+
'removed in future versions of Select2.'
|
4969 |
+
);
|
4970 |
+
}
|
4971 |
+
|
4972 |
+
$e.data('data', $e.data('select2Tags'));
|
4973 |
+
$e.data('tags', true);
|
4974 |
+
}
|
4975 |
+
|
4976 |
+
if ($e.data('ajaxUrl')) {
|
4977 |
+
if (this.options.debug && window.console && console.warn) {
|
4978 |
+
console.warn(
|
4979 |
+
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
4980 |
+
'`data-ajax--url` and support for the old attribute will be removed' +
|
4981 |
+
' in future versions of Select2.'
|
4982 |
+
);
|
4983 |
+
}
|
4984 |
+
|
4985 |
+
$e.attr('ajax--url', $e.data('ajaxUrl'));
|
4986 |
+
$e.data('ajax--url', $e.data('ajaxUrl'));
|
4987 |
+
}
|
4988 |
+
|
4989 |
+
var dataset = {};
|
4990 |
+
|
4991 |
+
// Prefer the element's `dataset` attribute if it exists
|
4992 |
+
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
4993 |
+
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
4994 |
+
dataset = $.extend(true, {}, $e[0].dataset, $e.data());
|
4995 |
+
} else {
|
4996 |
+
dataset = $e.data();
|
4997 |
+
}
|
4998 |
+
|
4999 |
+
var data = $.extend(true, {}, dataset);
|
5000 |
+
|
5001 |
+
data = Utils._convertData(data);
|
5002 |
+
|
5003 |
+
for (var key in data) {
|
5004 |
+
if ($.inArray(key, excludedData) > -1) {
|
5005 |
+
continue;
|
5006 |
+
}
|
5007 |
+
|
5008 |
+
if ($.isPlainObject(this.options[key])) {
|
5009 |
+
$.extend(this.options[key], data[key]);
|
5010 |
+
} else {
|
5011 |
+
this.options[key] = data[key];
|
5012 |
+
}
|
5013 |
+
}
|
5014 |
+
|
5015 |
+
return this;
|
5016 |
+
};
|
5017 |
+
|
5018 |
+
Options.prototype.get = function (key) {
|
5019 |
+
return this.options[key];
|
5020 |
+
};
|
5021 |
+
|
5022 |
+
Options.prototype.set = function (key, val) {
|
5023 |
+
this.options[key] = val;
|
5024 |
+
};
|
5025 |
+
|
5026 |
+
return Options;
|
5027 |
+
});
|
5028 |
+
|
5029 |
+
S2.define('select2/core',[
|
5030 |
+
'jquery',
|
5031 |
+
'./options',
|
5032 |
+
'./utils',
|
5033 |
+
'./keys'
|
5034 |
+
], function ($, Options, Utils, KEYS) {
|
5035 |
+
var Select2 = function ($element, options) {
|
5036 |
+
if ($element.data('select2') != null) {
|
5037 |
+
$element.data('select2').destroy();
|
5038 |
+
}
|
5039 |
+
|
5040 |
+
this.$element = $element;
|
5041 |
+
|
5042 |
+
this.id = this._generateId($element);
|
5043 |
+
|
5044 |
+
options = options || {};
|
5045 |
+
|
5046 |
+
this.options = new Options(options, $element);
|
5047 |
+
|
5048 |
+
Select2.__super__.constructor.call(this);
|
5049 |
+
|
5050 |
+
// Set up the tabindex
|
5051 |
+
|
5052 |
+
var tabindex = $element.attr('tabindex') || 0;
|
5053 |
+
$element.data('old-tabindex', tabindex);
|
5054 |
+
$element.attr('tabindex', '-1');
|
5055 |
+
|
5056 |
+
// Set up containers and adapters
|
5057 |
+
|
5058 |
+
var DataAdapter = this.options.get('dataAdapter');
|
5059 |
+
this.dataAdapter = new DataAdapter($element, this.options);
|
5060 |
+
|
5061 |
+
var $container = this.render();
|
5062 |
+
|
5063 |
+
this._placeContainer($container);
|
5064 |
+
|
5065 |
+
var SelectionAdapter = this.options.get('selectionAdapter');
|
5066 |
+
this.selection = new SelectionAdapter($element, this.options);
|
5067 |
+
this.$selection = this.selection.render();
|
5068 |
+
|
5069 |
+
this.selection.position(this.$selection, $container);
|
5070 |
+
|
5071 |
+
var DropdownAdapter = this.options.get('dropdownAdapter');
|
5072 |
+
this.dropdown = new DropdownAdapter($element, this.options);
|
5073 |
+
this.$dropdown = this.dropdown.render();
|
5074 |
+
|
5075 |
+
this.dropdown.position(this.$dropdown, $container);
|
5076 |
+
|
5077 |
+
var ResultsAdapter = this.options.get('resultsAdapter');
|
5078 |
+
this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
|
5079 |
+
this.$results = this.results.render();
|
5080 |
+
|
5081 |
+
this.results.position(this.$results, this.$dropdown);
|
5082 |
+
|
5083 |
+
// Bind events
|
5084 |
+
|
5085 |
+
var self = this;
|
5086 |
+
|
5087 |
+
// Bind the container to all of the adapters
|
5088 |
+
this._bindAdapters();
|
5089 |
+
|
5090 |
+
// Register any DOM event handlers
|
5091 |
+
this._registerDomEvents();
|
5092 |
+
|
5093 |
+
// Register any internal event handlers
|
5094 |
+
this._registerDataEvents();
|
5095 |
+
this._registerSelectionEvents();
|
5096 |
+
this._registerDropdownEvents();
|
5097 |
+
this._registerResultsEvents();
|
5098 |
+
this._registerEvents();
|
5099 |
+
|
5100 |
+
// Set the initial state
|
5101 |
+
this.dataAdapter.current(function (initialData) {
|
5102 |
+
self.trigger('selection:update', {
|
5103 |
+
data: initialData
|
5104 |
+
});
|
5105 |
+
});
|
5106 |
+
|
5107 |
+
// Hide the original select
|
5108 |
+
$element.addClass('select2-hidden-accessible');
|
5109 |
+
$element.attr('aria-hidden', 'true');
|
5110 |
+
|
5111 |
+
// Synchronize any monitored attributes
|
5112 |
+
this._syncAttributes();
|
5113 |
+
|
5114 |
+
$element.data('select2', this);
|
5115 |
+
};
|
5116 |
+
|
5117 |
+
Utils.Extend(Select2, Utils.Observable);
|
5118 |
+
|
5119 |
+
Select2.prototype._generateId = function ($element) {
|
5120 |
+
var id = '';
|
5121 |
+
|
5122 |
+
if ($element.attr('id') != null) {
|
5123 |
+
id = $element.attr('id');
|
5124 |
+
} else if ($element.attr('name') != null) {
|
5125 |
+
id = $element.attr('name') + '-' + Utils.generateChars(2);
|
5126 |
+
} else {
|
5127 |
+
id = Utils.generateChars(4);
|
5128 |
+
}
|
5129 |
+
|
5130 |
+
id = id.replace(/(:|\.|\[|\]|,)/g, '');
|
5131 |
+
id = 'select2-' + id;
|
5132 |
+
|
5133 |
+
return id;
|
5134 |
+
};
|
5135 |
+
|
5136 |
+
Select2.prototype._placeContainer = function ($container) {
|
5137 |
+
$container.insertAfter(this.$element);
|
5138 |
+
|
5139 |
+
var width = this._resolveWidth(this.$element, this.options.get('width'));
|
5140 |
+
|
5141 |
+
if (width != null) {
|
5142 |
+
$container.css('width', width);
|
5143 |
+
}
|
5144 |
+
};
|
5145 |
+
|
5146 |
+
Select2.prototype._resolveWidth = function ($element, method) {
|
5147 |
+
var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
|
5148 |
+
|
5149 |
+
if (method == 'resolve') {
|
5150 |
+
var styleWidth = this._resolveWidth($element, 'style');
|
5151 |
+
|
5152 |
+
if (styleWidth != null) {
|
5153 |
+
return styleWidth;
|
5154 |
+
}
|
5155 |
+
|
5156 |
+
return this._resolveWidth($element, 'element');
|
5157 |
+
}
|
5158 |
+
|
5159 |
+
if (method == 'element') {
|
5160 |
+
var elementWidth = $element.outerWidth(false);
|
5161 |
+
|
5162 |
+
if (elementWidth <= 0) {
|
5163 |
+
return 'auto';
|
5164 |
+
}
|
5165 |
+
|
5166 |
+
return elementWidth + 'px';
|
5167 |
+
}
|
5168 |
+
|
5169 |
+
if (method == 'style') {
|
5170 |
+
var style = $element.attr('style');
|
5171 |
+
|
5172 |
+
if (typeof(style) !== 'string') {
|
5173 |
+
return null;
|
5174 |
+
}
|
5175 |
+
|
5176 |
+
var attrs = style.split(';');
|
5177 |
+
|
5178 |
+
for (var i = 0, l = attrs.length; i < l; i = i + 1) {
|
5179 |
+
var attr = attrs[i].replace(/\s/g, '');
|
5180 |
+
var matches = attr.match(WIDTH);
|
5181 |
+
|
5182 |
+
if (matches !== null && matches.length >= 1) {
|
5183 |
+
return matches[1];
|
5184 |
+
}
|
5185 |
+
}
|
5186 |
+
|
5187 |
+
return null;
|
5188 |
+
}
|
5189 |
+
|
5190 |
+
return method;
|
5191 |
+
};
|
5192 |
+
|
5193 |
+
Select2.prototype._bindAdapters = function () {
|
5194 |
+
this.dataAdapter.bind(this, this.$container);
|
5195 |
+
this.selection.bind(this, this.$container);
|
5196 |
+
|
5197 |
+
this.dropdown.bind(this, this.$container);
|
5198 |
+
this.results.bind(this, this.$container);
|
5199 |
+
};
|
5200 |
+
|
5201 |
+
Select2.prototype._registerDomEvents = function () {
|
5202 |
+
var self = this;
|
5203 |
+
|
5204 |
+
this.$element.on('change.select2', function () {
|
5205 |
+
self.dataAdapter.current(function (data) {
|
5206 |
+
self.trigger('selection:update', {
|
5207 |
+
data: data
|
5208 |
+
});
|
5209 |
+
});
|
5210 |
+
});
|
5211 |
+
|
5212 |
+
this.$element.on('focus.select2', function (evt) {
|
5213 |
+
self.trigger('focus', evt);
|
5214 |
+
});
|
5215 |
+
|
5216 |
+
this._syncA = Utils.bind(this._syncAttributes, this);
|
5217 |
+
this._syncS = Utils.bind(this._syncSubtree, this);
|
5218 |
+
|
5219 |
+
if (this.$element[0].attachEvent) {
|
5220 |
+
this.$element[0].attachEvent('onpropertychange', this._syncA);
|
5221 |
+
}
|
5222 |
+
|
5223 |
+
var observer = window.MutationObserver ||
|
5224 |
+
window.WebKitMutationObserver ||
|
5225 |
+
window.MozMutationObserver
|
5226 |
+
;
|
5227 |
+
|
5228 |
+
if (observer != null) {
|
5229 |
+
this._observer = new observer(function (mutations) {
|
5230 |
+
$.each(mutations, self._syncA);
|
5231 |
+
$.each(mutations, self._syncS);
|
5232 |
+
});
|
5233 |
+
this._observer.observe(this.$element[0], {
|
5234 |
+
attributes: true,
|
5235 |
+
childList: true,
|
5236 |
+
subtree: false
|
5237 |
+
});
|
5238 |
+
} else if (this.$element[0].addEventListener) {
|
5239 |
+
this.$element[0].addEventListener(
|
5240 |
+
'DOMAttrModified',
|
5241 |
+
self._syncA,
|
5242 |
+
false
|
5243 |
+
);
|
5244 |
+
this.$element[0].addEventListener(
|
5245 |
+
'DOMNodeInserted',
|
5246 |
+
self._syncS,
|
5247 |
+
false
|
5248 |
+
);
|
5249 |
+
this.$element[0].addEventListener(
|
5250 |
+
'DOMNodeRemoved',
|
5251 |
+
self._syncS,
|
5252 |
+
false
|
5253 |
+
);
|
5254 |
+
}
|
5255 |
+
};
|
5256 |
+
|
5257 |
+
Select2.prototype._registerDataEvents = function () {
|
5258 |
+
var self = this;
|
5259 |
+
|
5260 |
+
this.dataAdapter.on('*', function (name, params) {
|
5261 |
+
self.trigger(name, params);
|
5262 |
+
});
|
5263 |
+
};
|
5264 |
+
|
5265 |
+
Select2.prototype._registerSelectionEvents = function () {
|
5266 |
+
var self = this;
|
5267 |
+
var nonRelayEvents = ['toggle', 'focus'];
|
5268 |
+
|
5269 |
+
this.selection.on('toggle', function () {
|
5270 |
+
self.toggleDropdown();
|
5271 |
+
});
|
5272 |
+
|
5273 |
+
this.selection.on('focus', function (params) {
|
5274 |
+
self.focus(params);
|
5275 |
+
});
|
5276 |
+
|
5277 |
+
this.selection.on('*', function (name, params) {
|
5278 |
+
if ($.inArray(name, nonRelayEvents) !== -1) {
|
5279 |
+
return;
|
5280 |
+
}
|
5281 |
+
|
5282 |
+
self.trigger(name, params);
|
5283 |
+
});
|
5284 |
+
};
|
5285 |
+
|
5286 |
+
Select2.prototype._registerDropdownEvents = function () {
|
5287 |
+
var self = this;
|
5288 |
+
|
5289 |
+
this.dropdown.on('*', function (name, params) {
|
5290 |
+
self.trigger(name, params);
|
5291 |
+
});
|
5292 |
+
};
|
5293 |
+
|
5294 |
+
Select2.prototype._registerResultsEvents = function () {
|
5295 |
+
var self = this;
|
5296 |
+
|
5297 |
+
this.results.on('*', function (name, params) {
|
5298 |
+
self.trigger(name, params);
|
5299 |
+
});
|
5300 |
+
};
|
5301 |
+
|
5302 |
+
Select2.prototype._registerEvents = function () {
|
5303 |
+
var self = this;
|
5304 |
+
|
5305 |
+
this.on('open', function () {
|
5306 |
+
self.$container.addClass('select2-container--open');
|
5307 |
+
});
|
5308 |
+
|
5309 |
+
this.on('close', function () {
|
5310 |
+
self.$container.removeClass('select2-container--open');
|
5311 |
+
});
|
5312 |
+
|
5313 |
+
this.on('enable', function () {
|
5314 |
+
self.$container.removeClass('select2-container--disabled');
|
5315 |
+
});
|
5316 |
+
|
5317 |
+
this.on('disable', function () {
|
5318 |
+
self.$container.addClass('select2-container--disabled');
|
5319 |
+
});
|
5320 |
+
|
5321 |
+
this.on('blur', function () {
|
5322 |
+
self.$container.removeClass('select2-container--focus');
|
5323 |
+
});
|
5324 |
+
|
5325 |
+
this.on('query', function (params) {
|
5326 |
+
if (!self.isOpen()) {
|
5327 |
+
self.trigger('open', {});
|
5328 |
+
}
|
5329 |
+
|
5330 |
+
this.dataAdapter.query(params, function (data) {
|
5331 |
+
self.trigger('results:all', {
|
5332 |
+
data: data,
|
5333 |
+
query: params
|
5334 |
+
});
|
5335 |
+
});
|
5336 |
+
});
|
5337 |
+
|
5338 |
+
this.on('query:append', function (params) {
|
5339 |
+
this.dataAdapter.query(params, function (data) {
|
5340 |
+
self.trigger('results:append', {
|
5341 |
+
data: data,
|
5342 |
+
query: params
|
5343 |
+
});
|
5344 |
+
});
|
5345 |
+
});
|
5346 |
+
|
5347 |
+
this.on('keypress', function (evt) {
|
5348 |
+
var key = evt.which;
|
5349 |
+
|
5350 |
+
if (self.isOpen()) {
|
5351 |
+
if (key === KEYS.ESC || key === KEYS.TAB ||
|
5352 |
+
(key === KEYS.UP && evt.altKey)) {
|
5353 |
+
self.close();
|
5354 |
+
|
5355 |
+
evt.preventDefault();
|
5356 |
+
} else if (key === KEYS.ENTER) {
|
5357 |
+
self.trigger('results:select', {});
|
5358 |
+
|
5359 |
+
evt.preventDefault();
|
5360 |
+
} else if ((key === KEYS.SPACE && evt.ctrlKey)) {
|
5361 |
+
self.trigger('results:toggle', {});
|
5362 |
+
|
5363 |
+
evt.preventDefault();
|
5364 |
+
} else if (key === KEYS.UP) {
|
5365 |
+
self.trigger('results:previous', {});
|
5366 |
+
|
5367 |
+
evt.preventDefault();
|
5368 |
+
} else if (key === KEYS.DOWN) {
|
5369 |
+
self.trigger('results:next', {});
|
5370 |
+
|
5371 |
+
evt.preventDefault();
|
5372 |
+
}
|
5373 |
+
} else {
|
5374 |
+
if (key === KEYS.ENTER || key === KEYS.SPACE ||
|
5375 |
+
(key === KEYS.DOWN && evt.altKey)) {
|
5376 |
+
self.open();
|
5377 |
+
|
5378 |
+
evt.preventDefault();
|
5379 |
+
}
|
5380 |
+
}
|
5381 |
+
});
|
5382 |
+
};
|
5383 |
+
|
5384 |
+
Select2.prototype._syncAttributes = function () {
|
5385 |
+
this.options.set('disabled', this.$element.prop('disabled'));
|
5386 |
+
|
5387 |
+
if (this.options.get('disabled')) {
|
5388 |
+
if (this.isOpen()) {
|
5389 |
+
this.close();
|
5390 |
+
}
|
5391 |
+
|
5392 |
+
this.trigger('disable', {});
|
5393 |
+
} else {
|
5394 |
+
this.trigger('enable', {});
|
5395 |
+
}
|
5396 |
+
};
|
5397 |
+
|
5398 |
+
Select2.prototype._syncSubtree = function (evt, mutations) {
|
5399 |
+
var changed = false;
|
5400 |
+
var self = this;
|
5401 |
+
|
5402 |
+
// Ignore any mutation events raised for elements that aren't options or
|
5403 |
+
// optgroups. This handles the case when the select element is destroyed
|
5404 |
+
if (
|
5405 |
+
evt && evt.target && (
|
5406 |
+
evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
|
5407 |
+
)
|
5408 |
+
) {
|
5409 |
+
return;
|
5410 |
+
}
|
5411 |
+
|
5412 |
+
if (!mutations) {
|
5413 |
+
// If mutation events aren't supported, then we can only assume that the
|
5414 |
+
// change affected the selections
|
5415 |
+
changed = true;
|
5416 |
+
} else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
|
5417 |
+
for (var n = 0; n < mutations.addedNodes.length; n++) {
|
5418 |
+
var node = mutations.addedNodes[n];
|
5419 |
+
|
5420 |
+
if (node.selected) {
|
5421 |
+
changed = true;
|
5422 |
+
}
|
5423 |
+
}
|
5424 |
+
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
|
5425 |
+
changed = true;
|
5426 |
+
}
|
5427 |
+
|
5428 |
+
// Only re-pull the data if we think there is a change
|
5429 |
+
if (changed) {
|
5430 |
+
this.dataAdapter.current(function (currentData) {
|
5431 |
+
self.trigger('selection:update', {
|
5432 |
+
data: currentData
|
5433 |
+
});
|
5434 |
+
});
|
5435 |
+
}
|
5436 |
+
};
|
5437 |
+
|
5438 |
+
/**
|
5439 |
+
* Override the trigger method to automatically trigger pre-events when
|
5440 |
+
* there are events that can be prevented.
|
5441 |
+
*/
|
5442 |
+
Select2.prototype.trigger = function (name, args) {
|
5443 |
+
var actualTrigger = Select2.__super__.trigger;
|
5444 |
+
var preTriggerMap = {
|
5445 |
+
'open': 'opening',
|
5446 |
+
'close': 'closing',
|
5447 |
+
'select': 'selecting',
|
5448 |
+
'unselect': 'unselecting'
|
5449 |
+
};
|
5450 |
+
|
5451 |
+
if (args === undefined) {
|
5452 |
+
args = {};
|
5453 |
+
}
|
5454 |
+
|
5455 |
+
if (name in preTriggerMap) {
|
5456 |
+
var preTriggerName = preTriggerMap[name];
|
5457 |
+
var preTriggerArgs = {
|
5458 |
+
prevented: false,
|
5459 |
+
name: name,
|
5460 |
+
args: args
|
5461 |
+
};
|
5462 |
+
|
5463 |
+
actualTrigger.call(this, preTriggerName, preTriggerArgs);
|
5464 |
+
|
5465 |
+
if (preTriggerArgs.prevented) {
|
5466 |
+
args.prevented = true;
|
5467 |
+
|
5468 |
+
return;
|
5469 |
+
}
|
5470 |
+
}
|
5471 |
+
|
5472 |
+
actualTrigger.call(this, name, args);
|
5473 |
+
};
|
5474 |
+
|
5475 |
+
Select2.prototype.toggleDropdown = function () {
|
5476 |
+
if (this.options.get('disabled')) {
|
5477 |
+
return;
|
5478 |
+
}
|
5479 |
+
|
5480 |
+
if (this.isOpen()) {
|
5481 |
+
this.close();
|
5482 |
+
} else {
|
5483 |
+
this.open();
|
5484 |
+
}
|
5485 |
+
};
|
5486 |
+
|
5487 |
+
Select2.prototype.open = function () {
|
5488 |
+
if (this.isOpen()) {
|
5489 |
+
return;
|
5490 |
+
}
|
5491 |
+
|
5492 |
+
this.trigger('query', {});
|
5493 |
+
};
|
5494 |
+
|
5495 |
+
Select2.prototype.close = function () {
|
5496 |
+
if (!this.isOpen()) {
|
5497 |
+
return;
|
5498 |
+
}
|
5499 |
+
|
5500 |
+
this.trigger('close', {});
|
5501 |
+
};
|
5502 |
+
|
5503 |
+
Select2.prototype.isOpen = function () {
|
5504 |
+
return this.$container.hasClass('select2-container--open');
|
5505 |
+
};
|
5506 |
+
|
5507 |
+
Select2.prototype.hasFocus = function () {
|
5508 |
+
return this.$container.hasClass('select2-container--focus');
|
5509 |
+
};
|
5510 |
+
|
5511 |
+
Select2.prototype.focus = function (data) {
|
5512 |
+
// No need to re-trigger focus events if we are already focused
|
5513 |
+
if (this.hasFocus()) {
|
5514 |
+
return;
|
5515 |
+
}
|
5516 |
+
|
5517 |
+
this.$container.addClass('select2-container--focus');
|
5518 |
+
this.trigger('focus', {});
|
5519 |
+
};
|
5520 |
+
|
5521 |
+
Select2.prototype.enable = function (args) {
|
5522 |
+
if (this.options.get('debug') && window.console && console.warn) {
|
5523 |
+
console.warn(
|
5524 |
+
'Select2: The `select2("enable")` method has been deprecated and will' +
|
5525 |
+
' be removed in later Select2 versions. Use $element.prop("disabled")' +
|
5526 |
+
' instead.'
|
5527 |
+
);
|
5528 |
+
}
|
5529 |
+
|
5530 |
+
if (args == null || args.length === 0) {
|
5531 |
+
args = [true];
|
5532 |
+
}
|
5533 |
+
|
5534 |
+
var disabled = !args[0];
|
5535 |
+
|
5536 |
+
this.$element.prop('disabled', disabled);
|
5537 |
+
};
|
5538 |
+
|
5539 |
+
Select2.prototype.data = function () {
|
5540 |
+
if (this.options.get('debug') &&
|
5541 |
+
arguments.length > 0 && window.console && console.warn) {
|
5542 |
+
console.warn(
|
5543 |
+
'Select2: Data can no longer be set using `select2("data")`. You ' +
|
5544 |
+
'should consider setting the value instead using `$element.val()`.'
|
5545 |
+
);
|
5546 |
+
}
|
5547 |
+
|
5548 |
+
var data = [];
|
5549 |
+
|
5550 |
+
this.dataAdapter.current(function (currentData) {
|
5551 |
+
data = currentData;
|
5552 |
+
});
|
5553 |
+
|
5554 |
+
return data;
|
5555 |
+
};
|
5556 |
+
|
5557 |
+
Select2.prototype.val = function (args) {
|
5558 |
+
if (this.options.get('debug') && window.console && console.warn) {
|
5559 |
+
console.warn(
|
5560 |
+
'Select2: The `select2("val")` method has been deprecated and will be' +
|
5561 |
+
' removed in later Select2 versions. Use $element.val() instead.'
|
5562 |
+
);
|
5563 |
+
}
|
5564 |
+
|
5565 |
+
if (args == null || args.length === 0) {
|
5566 |
+
return this.$element.val();
|
5567 |
+
}
|
5568 |
+
|
5569 |
+
var newVal = args[0];
|
5570 |
+
|
5571 |
+
if ($.isArray(newVal)) {
|
5572 |
+
newVal = $.map(newVal, function (obj) {
|
5573 |
+
return obj.toString();
|
5574 |
+
});
|
5575 |
+
}
|
5576 |
+
|
5577 |
+
this.$element.val(newVal).trigger('change');
|
5578 |
+
};
|
5579 |
+
|
5580 |
+
Select2.prototype.destroy = function () {
|
5581 |
+
this.$container.remove();
|
5582 |
+
|
5583 |
+
if (this.$element[0].detachEvent) {
|
5584 |
+
this.$element[0].detachEvent('onpropertychange', this._syncA);
|
5585 |
+
}
|
5586 |
+
|
5587 |
+
if (this._observer != null) {
|
5588 |
+
this._observer.disconnect();
|
5589 |
+
this._observer = null;
|
5590 |
+
} else if (this.$element[0].removeEventListener) {
|
5591 |
+
this.$element[0]
|
5592 |
+
.removeEventListener('DOMAttrModified', this._syncA, false);
|
5593 |
+
this.$element[0]
|
5594 |
+
.removeEventListener('DOMNodeInserted', this._syncS, false);
|
5595 |
+
this.$element[0]
|
5596 |
+
.removeEventListener('DOMNodeRemoved', this._syncS, false);
|
5597 |
+
}
|
5598 |
+
|
5599 |
+
this._syncA = null;
|
5600 |
+
this._syncS = null;
|
5601 |
+
|
5602 |
+
this.$element.off('.select2');
|
5603 |
+
this.$element.attr('tabindex', this.$element.data('old-tabindex'));
|
5604 |
+
|
5605 |
+
this.$element.removeClass('select2-hidden-accessible');
|
5606 |
+
this.$element.attr('aria-hidden', 'false');
|
5607 |
+
this.$element.removeData('select2');
|
5608 |
+
|
5609 |
+
this.dataAdapter.destroy();
|
5610 |
+
this.selection.destroy();
|
5611 |
+
this.dropdown.destroy();
|
5612 |
+
this.results.destroy();
|
5613 |
+
|
5614 |
+
this.dataAdapter = null;
|
5615 |
+
this.selection = null;
|
5616 |
+
this.dropdown = null;
|
5617 |
+
this.results = null;
|
5618 |
+
};
|
5619 |
+
|
5620 |
+
Select2.prototype.render = function () {
|
5621 |
+
var $container = $(
|
5622 |
+
'<span class="select2 select2-container">' +
|
5623 |
+
'<span class="selection"></span>' +
|
5624 |
+
'<span class="dropdown-wrapper" aria-hidden="true"></span>' +
|
5625 |
+
'</span>'
|
5626 |
+
);
|
5627 |
+
|
5628 |
+
$container.attr('dir', this.options.get('dir'));
|
5629 |
+
|
5630 |
+
this.$container = $container;
|
5631 |
+
|
5632 |
+
this.$container.addClass('select2-container--' + this.options.get('theme'));
|
5633 |
+
|
5634 |
+
$container.data('element', this.$element);
|
5635 |
+
|
5636 |
+
return $container;
|
5637 |
+
};
|
5638 |
+
|
5639 |
+
return Select2;
|
5640 |
+
});
|
5641 |
+
|
5642 |
+
S2.define('select2/compat/utils',[
|
5643 |
+
'jquery'
|
5644 |
+
], function ($) {
|
5645 |
+
function syncCssClasses ($dest, $src, adapter) {
|
5646 |
+
var classes, replacements = [], adapted;
|
5647 |
+
|
5648 |
+
classes = $.trim($dest.attr('class'));
|
5649 |
+
|
5650 |
+
if (classes) {
|
5651 |
+
classes = '' + classes; // for IE which returns object
|
5652 |
+
|
5653 |
+
$(classes.split(/\s+/)).each(function () {
|
5654 |
+
// Save all Select2 classes
|
5655 |
+
if (this.indexOf('select2-') === 0) {
|
5656 |
+
replacements.push(this);
|
5657 |
+
}
|
5658 |
+
});
|
5659 |
+
}
|
5660 |
+
|
5661 |
+
classes = $.trim($src.attr('class'));
|
5662 |
+
|
5663 |
+
if (classes) {
|
5664 |
+
classes = '' + classes; // for IE which returns object
|
5665 |
+
|
5666 |
+
$(classes.split(/\s+/)).each(function () {
|
5667 |
+
// Only adapt non-Select2 classes
|
5668 |
+
if (this.indexOf('select2-') !== 0) {
|
5669 |
+
adapted = adapter(this);
|
5670 |
+
|
5671 |
+
if (adapted != null) {
|
5672 |
+
replacements.push(adapted);
|
5673 |
+
}
|
5674 |
+
}
|
5675 |
+
});
|
5676 |
+
}
|
5677 |
+
|
5678 |
+
$dest.attr('class', replacements.join(' '));
|
5679 |
+
}
|
5680 |
+
|
5681 |
+
return {
|
5682 |
+
syncCssClasses: syncCssClasses
|
5683 |
+
};
|
5684 |
+
});
|
5685 |
+
|
5686 |
+
S2.define('select2/compat/containerCss',[
|
5687 |
+
'jquery',
|
5688 |
+
'./utils'
|
5689 |
+
], function ($, CompatUtils) {
|
5690 |
+
// No-op CSS adapter that discards all classes by default
|
5691 |
+
function _containerAdapter (clazz) {
|
5692 |
+
return null;
|
5693 |
+
}
|
5694 |
+
|
5695 |
+
function ContainerCSS () { }
|
5696 |
+
|
5697 |
+
ContainerCSS.prototype.render = function (decorated) {
|
5698 |
+
var $container = decorated.call(this);
|
5699 |
+
|
5700 |
+
var containerCssClass = this.options.get('containerCssClass') || '';
|
5701 |
+
|
5702 |
+
if ($.isFunction(containerCssClass)) {
|
5703 |
+
containerCssClass = containerCssClass(this.$element);
|
5704 |
+
}
|
5705 |
+
|
5706 |
+
var containerCssAdapter = this.options.get('adaptContainerCssClass');
|
5707 |
+
containerCssAdapter = containerCssAdapter || _containerAdapter;
|
5708 |
+
|
5709 |
+
if (containerCssClass.indexOf(':all:') !== -1) {
|
5710 |
+
containerCssClass = containerCssClass.replace(':all:', '');
|
5711 |
+
|
5712 |
+
var _cssAdapter = containerCssAdapter;
|
5713 |
+
|
5714 |
+
containerCssAdapter = function (clazz) {
|
5715 |
+
var adapted = _cssAdapter(clazz);
|
5716 |
+
|
5717 |
+
if (adapted != null) {
|
5718 |
+
// Append the old one along with the adapted one
|
5719 |
+
return adapted + ' ' + clazz;
|
5720 |
+
}
|
5721 |
+
|
5722 |
+
return clazz;
|
5723 |
+
};
|
5724 |
+
}
|
5725 |
+
|
5726 |
+
var containerCss = this.options.get('containerCss') || {};
|
5727 |
+
|
5728 |
+
if ($.isFunction(containerCss)) {
|
5729 |
+
containerCss = containerCss(this.$element);
|
5730 |
+
}
|
5731 |
+
|
5732 |
+
CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
|
5733 |
+
|
5734 |
+
$container.css(containerCss);
|
5735 |
+
$container.addClass(containerCssClass);
|
5736 |
+
|
5737 |
+
return $container;
|
5738 |
+
};
|
5739 |
+
|
5740 |
+
return ContainerCSS;
|
5741 |
+
});
|
5742 |
+
|
5743 |
+
S2.define('select2/compat/dropdownCss',[
|
5744 |
+
'jquery',
|
5745 |
+
'./utils'
|
5746 |
+
], function ($, CompatUtils) {
|
5747 |
+
// No-op CSS adapter that discards all classes by default
|
5748 |
+
function _dropdownAdapter (clazz) {
|
5749 |
+
return null;
|
5750 |
+
}
|
5751 |
+
|
5752 |
+
function DropdownCSS () { }
|
5753 |
+
|
5754 |
+
DropdownCSS.prototype.render = function (decorated) {
|
5755 |
+
var $dropdown = decorated.call(this);
|
5756 |
+
|
5757 |
+
var dropdownCssClass = this.options.get('dropdownCssClass') || '';
|
5758 |
+
|
5759 |
+
if ($.isFunction(dropdownCssClass)) {
|
5760 |
+
dropdownCssClass = dropdownCssClass(this.$element);
|
5761 |
+
}
|
5762 |
+
|
5763 |
+
var dropdownCssAdapter = this.options.get('adaptDropdownCssClass');
|
5764 |
+
dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter;
|
5765 |
+
|
5766 |
+
if (dropdownCssClass.indexOf(':all:') !== -1) {
|
5767 |
+
dropdownCssClass = dropdownCssClass.replace(':all:', '');
|
5768 |
+
|
5769 |
+
var _cssAdapter = dropdownCssAdapter;
|
5770 |
+
|
5771 |
+
dropdownCssAdapter = function (clazz) {
|
5772 |
+
var adapted = _cssAdapter(clazz);
|
5773 |
+
|
5774 |
+
if (adapted != null) {
|
5775 |
+
// Append the old one along with the adapted one
|
5776 |
+
return adapted + ' ' + clazz;
|
5777 |
+
}
|
5778 |
+
|
5779 |
+
return clazz;
|
5780 |
+
};
|
5781 |
+
}
|
5782 |
+
|
5783 |
+
var dropdownCss = this.options.get('dropdownCss') || {};
|
5784 |
+
|
5785 |
+
if ($.isFunction(dropdownCss)) {
|
5786 |
+
dropdownCss = dropdownCss(this.$element);
|
5787 |
+
}
|
5788 |
+
|
5789 |
+
CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter);
|
5790 |
+
|
5791 |
+
$dropdown.css(dropdownCss);
|
5792 |
+
$dropdown.addClass(dropdownCssClass);
|
5793 |
+
|
5794 |
+
return $dropdown;
|
5795 |
+
};
|
5796 |
+
|
5797 |
+
return DropdownCSS;
|
5798 |
+
});
|
5799 |
+
|
5800 |
+
S2.define('select2/compat/initSelection',[
|
5801 |
+
'jquery'
|
5802 |
+
], function ($) {
|
5803 |
+
function InitSelection (decorated, $element, options) {
|
5804 |
+
if (options.get('debug') && window.console && console.warn) {
|
5805 |
+
console.warn(
|
5806 |
+
'Select2: The `initSelection` option has been deprecated in favor' +
|
5807 |
+
' of a custom data adapter that overrides the `current` method. ' +
|
5808 |
+
'This method is now called multiple times instead of a single ' +
|
5809 |
+
'time when the instance is initialized. Support will be removed ' +
|
5810 |
+
'for the `initSelection` option in future versions of Select2'
|
5811 |
+
);
|
5812 |
+
}
|
5813 |
+
|
5814 |
+
this.initSelection = options.get('initSelection');
|
5815 |
+
this._isInitialized = false;
|
5816 |
+
|
5817 |
+
decorated.call(this, $element, options);
|
5818 |
+
}
|
5819 |
+
|
5820 |
+
InitSelection.prototype.current = function (decorated, callback) {
|
5821 |
+
var self = this;
|
5822 |
+
|
5823 |
+
if (this._isInitialized) {
|
5824 |
+
decorated.call(this, callback);
|
5825 |
+
|
5826 |
+
return;
|
5827 |
+
}
|
5828 |
+
|
5829 |
+
this.initSelection.call(null, this.$element, function (data) {
|
5830 |
+
self._isInitialized = true;
|
5831 |
+
|
5832 |
+
if (!$.isArray(data)) {
|
5833 |
+
data = [data];
|
5834 |
+
}
|
5835 |
+
|
5836 |
+
callback(data);
|
5837 |
+
});
|
5838 |
+
};
|
5839 |
+
|
5840 |
+
return InitSelection;
|
5841 |
+
});
|
5842 |
+
|
5843 |
+
S2.define('select2/compat/inputData',[
|
5844 |
+
'jquery'
|
5845 |
+
], function ($) {
|
5846 |
+
function InputData (decorated, $element, options) {
|
5847 |
+
this._currentData = [];
|
5848 |
+
this._valueSeparator = options.get('valueSeparator') || ',';
|
5849 |
+
|
5850 |
+
if ($element.prop('type') === 'hidden') {
|
5851 |
+
if (options.get('debug') && console && console.warn) {
|
5852 |
+
console.warn(
|
5853 |
+
'Select2: Using a hidden input with Select2 is no longer ' +
|
5854 |
+
'supported and may stop working in the future. It is recommended ' +
|
5855 |
+
'to use a `<select>` element instead.'
|
5856 |
+
);
|
5857 |
+
}
|
5858 |
+
}
|
5859 |
+
|
5860 |
+
decorated.call(this, $element, options);
|
5861 |
+
}
|
5862 |
+
|
5863 |
+
InputData.prototype.current = function (_, callback) {
|
5864 |
+
function getSelected (data, selectedIds) {
|
5865 |
+
var selected = [];
|
5866 |
+
|
5867 |
+
if (data.selected || $.inArray(data.id, selectedIds) !== -1) {
|
5868 |
+
data.selected = true;
|
5869 |
+
selected.push(data);
|
5870 |
+
} else {
|
5871 |
+
data.selected = false;
|
5872 |
+
}
|
5873 |
+
|
5874 |
+
if (data.children) {
|
5875 |
+
selected.push.apply(selected, getSelected(data.children, selectedIds));
|
5876 |
+
}
|
5877 |
+
|
5878 |
+
return selected;
|
5879 |
+
}
|
5880 |
+
|
5881 |
+
var selected = [];
|
5882 |
+
|
5883 |
+
for (var d = 0; d < this._currentData.length; d++) {
|
5884 |
+
var data = this._currentData[d];
|
5885 |
+
|
5886 |
+
selected.push.apply(
|
5887 |
+
selected,
|
5888 |
+
getSelected(
|
5889 |
+
data,
|
5890 |
+
this.$element.val().split(
|
5891 |
+
this._valueSeparator
|
5892 |
+
)
|
5893 |
+
)
|
5894 |
+
);
|
5895 |
+
}
|
5896 |
+
|
5897 |
+
callback(selected);
|
5898 |
+
};
|
5899 |
+
|
5900 |
+
InputData.prototype.select = function (_, data) {
|
5901 |
+
if (!this.options.get('multiple')) {
|
5902 |
+
this.current(function (allData) {
|
5903 |
+
$.map(allData, function (data) {
|
5904 |
+
data.selected = false;
|
5905 |
+
});
|
5906 |
+
});
|
5907 |
+
|
5908 |
+
this.$element.val(data.id);
|
5909 |
+
this.$element.trigger('change');
|
5910 |
+
} else {
|
5911 |
+
var value = this.$element.val();
|
5912 |
+
value += this._valueSeparator + data.id;
|
5913 |
+
|
5914 |
+
this.$element.val(value);
|
5915 |
+
this.$element.trigger('change');
|
5916 |
+
}
|
5917 |
+
};
|
5918 |
+
|
5919 |
+
InputData.prototype.unselect = function (_, data) {
|
5920 |
+
var self = this;
|
5921 |
+
|
5922 |
+
data.selected = false;
|
5923 |
+
|
5924 |
+
this.current(function (allData) {
|
5925 |
+
var values = [];
|
5926 |
+
|
5927 |
+
for (var d = 0; d < allData.length; d++) {
|
5928 |
+
var item = allData[d];
|
5929 |
+
|
5930 |
+
if (data.id == item.id) {
|
5931 |
+
continue;
|
5932 |
+
}
|
5933 |
+
|
5934 |
+
values.push(item.id);
|
5935 |
+
}
|
5936 |
+
|
5937 |
+
self.$element.val(values.join(self._valueSeparator));
|
5938 |
+
self.$element.trigger('change');
|
5939 |
+
});
|
5940 |
+
};
|
5941 |
+
|
5942 |
+
InputData.prototype.query = function (_, params, callback) {
|
5943 |
+
var results = [];
|
5944 |
+
|
5945 |
+
for (var d = 0; d < this._currentData.length; d++) {
|
5946 |
+
var data = this._currentData[d];
|
5947 |
+
|
5948 |
+
var matches = this.matches(params, data);
|
5949 |
+
|
5950 |
+
if (matches !== null) {
|
5951 |
+
results.push(matches);
|
5952 |
+
}
|
5953 |
+
}
|
5954 |
+
|
5955 |
+
callback({
|
5956 |
+
results: results
|
5957 |
+
});
|
5958 |
+
};
|
5959 |
+
|
5960 |
+
InputData.prototype.addOptions = function (_, $options) {
|
5961 |
+
var options = $.map($options, function ($option) {
|
5962 |
+
return $.data($option[0], 'data');
|
5963 |
+
});
|
5964 |
+
|
5965 |
+
this._currentData.push.apply(this._currentData, options);
|
5966 |
+
};
|
5967 |
+
|
5968 |
+
return InputData;
|
5969 |
+
});
|
5970 |
+
|
5971 |
+
S2.define('select2/compat/matcher',[
|
5972 |
+
'jquery'
|
5973 |
+
], function ($) {
|
5974 |
+
function oldMatcher (matcher) {
|
5975 |
+
function wrappedMatcher (params, data) {
|
5976 |
+
var match = $.extend(true, {}, data);
|
5977 |
+
|
5978 |
+
if (params.term == null || $.trim(params.term) === '') {
|
5979 |
+
return match;
|
5980 |
+
}
|
5981 |
+
|
5982 |
+
if (data.children) {
|
5983 |
+
for (var c = data.children.length - 1; c >= 0; c--) {
|
5984 |
+
var child = data.children[c];
|
5985 |
+
|
5986 |
+
// Check if the child object matches
|
5987 |
+
// The old matcher returned a boolean true or false
|
5988 |
+
var doesMatch = matcher(params.term, child.text, child);
|
5989 |
+
|
5990 |
+
// If the child didn't match, pop it off
|
5991 |
+
if (!doesMatch) {
|
5992 |
+
match.children.splice(c, 1);
|
5993 |
+
}
|
5994 |
+
}
|
5995 |
+
|
5996 |
+
if (match.children.length > 0) {
|
5997 |
+
return match;
|
5998 |
+
}
|
5999 |
+
}
|
6000 |
+
|
6001 |
+
if (matcher(params.term, data.text, data)) {
|
6002 |
+
return match;
|
6003 |
+
}
|
6004 |
+
|
6005 |
+
return null;
|
6006 |
+
}
|
6007 |
+
|
6008 |
+
return wrappedMatcher;
|
6009 |
+
}
|
6010 |
+
|
6011 |
+
return oldMatcher;
|
6012 |
+
});
|
6013 |
+
|
6014 |
+
S2.define('select2/compat/query',[
|
6015 |
+
|
6016 |
+
], function () {
|
6017 |
+
function Query (decorated, $element, options) {
|
6018 |
+
if (options.get('debug') && window.console && console.warn) {
|
6019 |
+
console.warn(
|
6020 |
+
'Select2: The `query` option has been deprecated in favor of a ' +
|
6021 |
+
'custom data adapter that overrides the `query` method. Support ' +
|
6022 |
+
'will be removed for the `query` option in future versions of ' +
|
6023 |
+
'Select2.'
|
6024 |
+
);
|
6025 |
+
}
|
6026 |
+
|
6027 |
+
decorated.call(this, $element, options);
|
6028 |
+
}
|
6029 |
+
|
6030 |
+
Query.prototype.query = function (_, params, callback) {
|
6031 |
+
params.callback = callback;
|
6032 |
+
|
6033 |
+
var query = this.options.get('query');
|
6034 |
+
|
6035 |
+
query.call(null, params);
|
6036 |
+
};
|
6037 |
+
|
6038 |
+
return Query;
|
6039 |
+
});
|
6040 |
+
|
6041 |
+
S2.define('select2/dropdown/attachContainer',[
|
6042 |
+
|
6043 |
+
], function () {
|
6044 |
+
function AttachContainer (decorated, $element, options) {
|
6045 |
+
decorated.call(this, $element, options);
|
6046 |
+
}
|
6047 |
+
|
6048 |
+
AttachContainer.prototype.position =
|
6049 |
+
function (decorated, $dropdown, $container) {
|
6050 |
+
var $dropdownContainer = $container.find('.dropdown-wrapper');
|
6051 |
+
$dropdownContainer.append($dropdown);
|
6052 |
+
|
6053 |
+
$dropdown.addClass('select2-dropdown--below');
|
6054 |
+
$container.addClass('select2-container--below');
|
6055 |
+
};
|
6056 |
+
|
6057 |
+
return AttachContainer;
|
6058 |
+
});
|
6059 |
+
|
6060 |
+
S2.define('select2/dropdown/stopPropagation',[
|
6061 |
+
|
6062 |
+
], function () {
|
6063 |
+
function StopPropagation () { }
|
6064 |
+
|
6065 |
+
StopPropagation.prototype.bind = function (decorated, container, $container) {
|
6066 |
+
decorated.call(this, container, $container);
|
6067 |
+
|
6068 |
+
var stoppedEvents = [
|
6069 |
+
'blur',
|
6070 |
+
'change',
|
6071 |
+
'click',
|
6072 |
+
'dblclick',
|
6073 |
+
'focus',
|
6074 |
+
'focusin',
|
6075 |
+
'focusout',
|
6076 |
+
'input',
|
6077 |
+
'keydown',
|
6078 |
+
'keyup',
|
6079 |
+
'keypress',
|
6080 |
+
'mousedown',
|
6081 |
+
'mouseenter',
|
6082 |
+
'mouseleave',
|
6083 |
+
'mousemove',
|
6084 |
+
'mouseover',
|
6085 |
+
'mouseup',
|
6086 |
+
'search',
|
6087 |
+
'touchend',
|
6088 |
+
'touchstart'
|
6089 |
+
];
|
6090 |
+
|
6091 |
+
this.$dropdown.on(stoppedEvents.join(' '), function (evt) {
|
6092 |
+
evt.stopPropagation();
|
6093 |
+
});
|
6094 |
+
};
|
6095 |
+
|
6096 |
+
return StopPropagation;
|
6097 |
+
});
|
6098 |
+
|
6099 |
+
S2.define('select2/selection/stopPropagation',[
|
6100 |
+
|
6101 |
+
], function () {
|
6102 |
+
function StopPropagation () { }
|
6103 |
+
|
6104 |
+
StopPropagation.prototype.bind = function (decorated, container, $container) {
|
6105 |
+
decorated.call(this, container, $container);
|
6106 |
+
|
6107 |
+
var stoppedEvents = [
|
6108 |
+
'blur',
|
6109 |
+
'change',
|
6110 |
+
'click',
|
6111 |
+
'dblclick',
|
6112 |
+
'focus',
|
6113 |
+
'focusin',
|
6114 |
+
'focusout',
|
6115 |
+
'input',
|
6116 |
+
'keydown',
|
6117 |
+
'keyup',
|
6118 |
+
'keypress',
|
6119 |
+
'mousedown',
|
6120 |
+
'mouseenter',
|
6121 |
+
'mouseleave',
|
6122 |
+
'mousemove',
|
6123 |
+
'mouseover',
|
6124 |
+
'mouseup',
|
6125 |
+
'search',
|
6126 |
+
'touchend',
|
6127 |
+
'touchstart'
|
6128 |
+
];
|
6129 |
+
|
6130 |
+
this.$selection.on(stoppedEvents.join(' '), function (evt) {
|
6131 |
+
evt.stopPropagation();
|
6132 |
+
});
|
6133 |
+
};
|
6134 |
+
|
6135 |
+
return StopPropagation;
|
6136 |
+
});
|
6137 |
+
|
6138 |
+
/*!
|
6139 |
+
* jQuery Mousewheel 3.1.13
|
6140 |
+
*
|
6141 |
+
* Copyright jQuery Foundation and other contributors
|
6142 |
+
* Released under the MIT license
|
6143 |
+
* http://jquery.org/license
|
6144 |
+
*/
|
6145 |
+
|
6146 |
+
(function (factory) {
|
6147 |
+
if ( typeof S2.define === 'function' && S2.define.amd ) {
|
6148 |
+
// AMD. Register as an anonymous module.
|
6149 |
+
S2.define('jquery-mousewheel',['jquery'], factory);
|
6150 |
+
} else if (typeof exports === 'object') {
|
6151 |
+
// Node/CommonJS style for Browserify
|
6152 |
+
module.exports = factory;
|
6153 |
+
} else {
|
6154 |
+
// Browser globals
|
6155 |
+
factory(jQuery);
|
6156 |
+
}
|
6157 |
+
}(function ($) {
|
6158 |
+
|
6159 |
+
var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
|
6160 |
+
toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
|
6161 |
+
['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
|
6162 |
+
slice = Array.prototype.slice,
|
6163 |
+
nullLowestDeltaTimeout, lowestDelta;
|
6164 |
+
|
6165 |
+
if ( $.event.fixHooks ) {
|
6166 |
+
for ( var i = toFix.length; i; ) {
|
6167 |
+
$.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
|
6168 |
+
}
|
6169 |
+
}
|
6170 |
+
|
6171 |
+
var special = $.event.special.mousewheel = {
|
6172 |
+
version: '3.1.12',
|
6173 |
+
|
6174 |
+
setup: function() {
|
6175 |
+
if ( this.addEventListener ) {
|
6176 |
+
for ( var i = toBind.length; i; ) {
|
6177 |
+
this.addEventListener( toBind[--i], handler, false );
|
6178 |
+
}
|
6179 |
+
} else {
|
6180 |
+
this.onmousewheel = handler;
|
6181 |
+
}
|
6182 |
+
// Store the line height and page height for this particular element
|
6183 |
+
$.data(this, 'mousewheel-line-height', special.getLineHeight(this));
|
6184 |
+
$.data(this, 'mousewheel-page-height', special.getPageHeight(this));
|
6185 |
+
},
|
6186 |
+
|
6187 |
+
teardown: function() {
|
6188 |
+
if ( this.removeEventListener ) {
|
6189 |
+
for ( var i = toBind.length; i; ) {
|
6190 |
+
this.removeEventListener( toBind[--i], handler, false );
|
6191 |
+
}
|
6192 |
+
} else {
|
6193 |
+
this.onmousewheel = null;
|
6194 |
+
}
|
6195 |
+
// Clean up the data we added to the element
|
6196 |
+
$.removeData(this, 'mousewheel-line-height');
|
6197 |
+
$.removeData(this, 'mousewheel-page-height');
|
6198 |
+
},
|
6199 |
+
|
6200 |
+
getLineHeight: function(elem) {
|
6201 |
+
var $elem = $(elem),
|
6202 |
+
$parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
|
6203 |
+
if (!$parent.length) {
|
6204 |
+
$parent = $('body');
|
6205 |
+
}
|
6206 |
+
return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
|
6207 |
+
},
|
6208 |
+
|
6209 |
+
getPageHeight: function(elem) {
|
6210 |
+
return $(elem).height();
|
6211 |
+
},
|
6212 |
+
|
6213 |
+
settings: {
|
6214 |
+
adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
|
6215 |
+
normalizeOffset: true // calls getBoundingClientRect for each event
|
6216 |
+
}
|
6217 |
+
};
|
6218 |
+
|
6219 |
+
$.fn.extend({
|
6220 |
+
mousewheel: function(fn) {
|
6221 |
+
return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
|
6222 |
+
},
|
6223 |
+
|
6224 |
+
unmousewheel: function(fn) {
|
6225 |
+
return this.unbind('mousewheel', fn);
|
6226 |
+
}
|
6227 |
+
});
|
6228 |
+
|
6229 |
+
|
6230 |
+
function handler(event) {
|
6231 |
+
var orgEvent = event || window.event,
|
6232 |
+
args = slice.call(arguments, 1),
|
6233 |
+
delta = 0,
|
6234 |
+
deltaX = 0,
|
6235 |
+
deltaY = 0,
|
6236 |
+
absDelta = 0,
|
6237 |
+
offsetX = 0,
|
6238 |
+
offsetY = 0;
|
6239 |
+
event = $.event.fix(orgEvent);
|
6240 |
+
event.type = 'mousewheel';
|
6241 |
+
|
6242 |
+
// Old school scrollwheel delta
|
6243 |
+
if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
|
6244 |
+
if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
|
6245 |
+
if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
|
6246 |
+
if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
|
6247 |
+
|
6248 |
+
// Firefox < 17 horizontal scrolling related to DOMMouseScroll event
|
6249 |
+
if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
|
6250 |
+
deltaX = deltaY * -1;
|
6251 |
+
deltaY = 0;
|
6252 |
+
}
|
6253 |
+
|
6254 |
+
// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
|
6255 |
+
delta = deltaY === 0 ? deltaX : deltaY;
|
6256 |
+
|
6257 |
+
// New school wheel delta (wheel event)
|
6258 |
+
if ( 'deltaY' in orgEvent ) {
|
6259 |
+
deltaY = orgEvent.deltaY * -1;
|
6260 |
+
delta = deltaY;
|
6261 |
+
}
|
6262 |
+
if ( 'deltaX' in orgEvent ) {
|
6263 |
+
deltaX = orgEvent.deltaX;
|
6264 |
+
if ( deltaY === 0 ) { delta = deltaX * -1; }
|
6265 |
+
}
|
6266 |
+
|
6267 |
+
// No change actually happened, no reason to go any further
|
6268 |
+
if ( deltaY === 0 && deltaX === 0 ) { return; }
|
6269 |
+
|
6270 |
+
// Need to convert lines and pages to pixels if we aren't already in pixels
|
6271 |
+
// There are three delta modes:
|
6272 |
+
// * deltaMode 0 is by pixels, nothing to do
|
6273 |
+
// * deltaMode 1 is by lines
|
6274 |
+
// * deltaMode 2 is by pages
|
6275 |
+
if ( orgEvent.deltaMode === 1 ) {
|
6276 |
+
var lineHeight = $.data(this, 'mousewheel-line-height');
|
6277 |
+
delta *= lineHeight;
|
6278 |
+
deltaY *= lineHeight;
|
6279 |
+
deltaX *= lineHeight;
|
6280 |
+
} else if ( orgEvent.deltaMode === 2 ) {
|
6281 |
+
var pageHeight = $.data(this, 'mousewheel-page-height');
|
6282 |
+
delta *= pageHeight;
|
6283 |
+
deltaY *= pageHeight;
|
6284 |
+
deltaX *= pageHeight;
|
6285 |
+
}
|
6286 |
+
|
6287 |
+
// Store lowest absolute delta to normalize the delta values
|
6288 |
+
absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
|
6289 |
+
|
6290 |
+
if ( !lowestDelta || absDelta < lowestDelta ) {
|
6291 |
+
lowestDelta = absDelta;
|
6292 |
+
|
6293 |
+
// Adjust older deltas if necessary
|
6294 |
+
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
|
6295 |
+
lowestDelta /= 40;
|
6296 |
+
}
|
6297 |
+
}
|
6298 |
+
|
6299 |
+
// Adjust older deltas if necessary
|
6300 |
+
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
|
6301 |
+
// Divide all the things by 40!
|
6302 |
+
delta /= 40;
|
6303 |
+
deltaX /= 40;
|
6304 |
+
deltaY /= 40;
|
6305 |
+
}
|
6306 |
+
|
6307 |
+
// Get a whole, normalized value for the deltas
|
6308 |
+
delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
|
6309 |
+
deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
|
6310 |
+
deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
|
6311 |
+
|
6312 |
+
// Normalise offsetX and offsetY properties
|
6313 |
+
if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
|
6314 |
+
var boundingRect = this.getBoundingClientRect();
|
6315 |
+
offsetX = event.clientX - boundingRect.left;
|
6316 |
+
offsetY = event.clientY - boundingRect.top;
|
6317 |
+
}
|
6318 |
+
|
6319 |
+
// Add information to the event object
|
6320 |
+
event.deltaX = deltaX;
|
6321 |
+
event.deltaY = deltaY;
|
6322 |
+
event.deltaFactor = lowestDelta;
|
6323 |
+
event.offsetX = offsetX;
|
6324 |
+
event.offsetY = offsetY;
|
6325 |
+
// Go ahead and set deltaMode to 0 since we converted to pixels
|
6326 |
+
// Although this is a little odd since we overwrite the deltaX/Y
|
6327 |
+
// properties with normalized deltas.
|
6328 |
+
event.deltaMode = 0;
|
6329 |
+
|
6330 |
+
// Add event and delta to the front of the arguments
|
6331 |
+
args.unshift(event, delta, deltaX, deltaY);
|
6332 |
+
|
6333 |
+
// Clearout lowestDelta after sometime to better
|
6334 |
+
// handle multiple device types that give different
|
6335 |
+
// a different lowestDelta
|
6336 |
+
// Ex: trackpad = 3 and mouse wheel = 120
|
6337 |
+
if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
|
6338 |
+
nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
|
6339 |
+
|
6340 |
+
return ($.event.dispatch || $.event.handle).apply(this, args);
|
6341 |
+
}
|
6342 |
+
|
6343 |
+
function nullLowestDelta() {
|
6344 |
+
lowestDelta = null;
|
6345 |
+
}
|
6346 |
+
|
6347 |
+
function shouldAdjustOldDeltas(orgEvent, absDelta) {
|
6348 |
+
// If this is an older event and the delta is divisable by 120,
|
6349 |
+
// then we are assuming that the browser is treating this as an
|
6350 |
+
// older mouse wheel event and that we should divide the deltas
|
6351 |
+
// by 40 to try and get a more usable deltaFactor.
|
6352 |
+
// Side note, this actually impacts the reported scroll distance
|
6353 |
+
// in older browsers and can cause scrolling to be slower than native.
|
6354 |
+
// Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
|
6355 |
+
return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
|
6356 |
+
}
|
6357 |
+
|
6358 |
+
}));
|
6359 |
+
|
6360 |
+
S2.define('jquery.select2',[
|
6361 |
+
'jquery',
|
6362 |
+
'jquery-mousewheel',
|
6363 |
+
|
6364 |
+
'./select2/core',
|
6365 |
+
'./select2/defaults'
|
6366 |
+
], function ($, _, Select2, Defaults) {
|
6367 |
+
if ($.fn.select2 == null) {
|
6368 |
+
// All methods that should return the element
|
6369 |
+
var thisMethods = ['open', 'close', 'destroy'];
|
6370 |
+
|
6371 |
+
$.fn.select2 = function (options) {
|
6372 |
+
options = options || {};
|
6373 |
+
|
6374 |
+
if (typeof options === 'object') {
|
6375 |
+
this.each(function () {
|
6376 |
+
var instanceOptions = $.extend(true, {}, options);
|
6377 |
+
|
6378 |
+
var instance = new Select2($(this), instanceOptions);
|
6379 |
+
});
|
6380 |
+
|
6381 |
+
return this;
|
6382 |
+
} else if (typeof options === 'string') {
|
6383 |
+
var ret;
|
6384 |
+
var args = Array.prototype.slice.call(arguments, 1);
|
6385 |
+
|
6386 |
+
this.each(function () {
|
6387 |
+
var instance = $(this).data('select2');
|
6388 |
+
|
6389 |
+
if (instance == null && window.console && console.error) {
|
6390 |
+
console.error(
|
6391 |
+
'The select2(\'' + options + '\') method was called on an ' +
|
6392 |
+
'element that is not using Select2.'
|
6393 |
+
);
|
6394 |
+
}
|
6395 |
+
|
6396 |
+
ret = instance[options].apply(instance, args);
|
6397 |
+
});
|
6398 |
+
|
6399 |
+
// Check if we should be returning `this`
|
6400 |
+
if ($.inArray(options, thisMethods) > -1) {
|
6401 |
+
return this;
|
6402 |
+
}
|
6403 |
+
|
6404 |
+
return ret;
|
6405 |
+
} else {
|
6406 |
+
throw new Error('Invalid arguments for Select2: ' + options);
|
6407 |
+
}
|
6408 |
+
};
|
6409 |
+
}
|
6410 |
+
|
6411 |
+
if ($.fn.select2.defaults == null) {
|
6412 |
+
$.fn.select2.defaults = Defaults;
|
6413 |
+
}
|
6414 |
+
|
6415 |
+
return Select2;
|
6416 |
+
});
|
6417 |
+
|
6418 |
+
// Return the AMD loader configuration so it can be used outside of this file
|
6419 |
+
return {
|
6420 |
+
define: S2.define,
|
6421 |
+
require: S2.require
|
6422 |
+
};
|
6423 |
+
}());
|
6424 |
+
|
6425 |
+
// Autoload the jQuery bindings
|
6426 |
+
// We know that all of the modules exist above this, so we're safe
|
6427 |
+
var select2 = S2.require('jquery.select2');
|
6428 |
+
|
6429 |
+
// Hold the AMD module references on the jQuery function that was just loaded
|
6430 |
+
// This allows Select2 to use the internal loader outside of this file, such
|
6431 |
+
// as in the language files.
|
6432 |
+
jQuery.fn.select2.amd = S2;
|
6433 |
+
|
6434 |
+
// Return the Select2 instance for anyone who is importing it.
|
6435 |
+
return select2;
|
6436 |
+
}));
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.full.min.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">×</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");
|
2 |
+
if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null;
|
3 |
+
},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&(f=d(this),null!=f&&g.push(f))})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;return this._isInitialized?void b.call(this,c):void this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery"],function(a){function b(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),a.call(this,b,c)}return b.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},b.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("change")},b.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("change")})},b.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},b.prototype.addOptions=function(b,c){var d=a.map(c,function(b){return a.data(b[0],"data")});this._currentData.push.apply(this._currentData,d)},b}),b.define("select2/compat/matcher",["jquery"],function(a){function b(b){function c(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;f>=0;f--){var g=d.children[f],h=b(c.term,g.text,g);h||e.children.splice(f,1)}if(e.children.length>0)return e}return b(c.term,d.text,d)?e:null}return c}return b}),b.define("select2/compat/query",[],function(){function a(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c;var d=this.options.get("query");d.call(null,b)},a}),b.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){var d=c.find(".dropdown-wrapper");d.append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),b.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(d.join(" "),function(a){a.stopPropagation()})},a}),b.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(d.join(" "),function(a){a.stopPropagation()})},a}),function(c){"function"==typeof b.define&&b.define.amd?b.define("jquery-mousewheel",["jquery"],c):"object"==typeof exports?module.exports=c:c(a)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.js
ADDED
@@ -0,0 +1,5725 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Select2 4.0.3
|
3 |
+
* https://select2.github.io
|
4 |
+
*
|
5 |
+
* Released under the MIT license
|
6 |
+
* https://github.com/select2/select2/blob/master/LICENSE.md
|
7 |
+
*/
|
8 |
+
(function (factory) {
|
9 |
+
if (typeof define === 'function' && define.amd) {
|
10 |
+
// AMD. Register as an anonymous module.
|
11 |
+
define(['jquery'], factory);
|
12 |
+
} else if (typeof exports === 'object') {
|
13 |
+
// Node/CommonJS
|
14 |
+
factory(require('jquery'));
|
15 |
+
} else {
|
16 |
+
// Browser globals
|
17 |
+
factory(jQuery);
|
18 |
+
}
|
19 |
+
}(function (jQuery) {
|
20 |
+
// This is needed so we can catch the AMD loader configuration and use it
|
21 |
+
// The inner file should be wrapped (by `banner.start.js`) in a function that
|
22 |
+
// returns the AMD loader references.
|
23 |
+
var S2 =
|
24 |
+
(function () {
|
25 |
+
// Restore the Select2 AMD loader so it can be used
|
26 |
+
// Needed mostly in the language files, where the loader is not inserted
|
27 |
+
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
|
28 |
+
var S2 = jQuery.fn.select2.amd;
|
29 |
+
}
|
30 |
+
var S2;(function () { if (!S2 || !S2.requirejs) {
|
31 |
+
if (!S2) { S2 = {}; } else { require = S2; }
|
32 |
+
/**
|
33 |
+
* @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
|
34 |
+
* Available via the MIT or new BSD license.
|
35 |
+
* see: http://github.com/jrburke/almond for details
|
36 |
+
*/
|
37 |
+
//Going sloppy to avoid 'use strict' string cost, but strict practices should
|
38 |
+
//be followed.
|
39 |
+
/*jslint sloppy: true */
|
40 |
+
/*global setTimeout: false */
|
41 |
+
|
42 |
+
var requirejs, require, define;
|
43 |
+
(function (undef) {
|
44 |
+
var main, req, makeMap, handlers,
|
45 |
+
defined = {},
|
46 |
+
waiting = {},
|
47 |
+
config = {},
|
48 |
+
defining = {},
|
49 |
+
hasOwn = Object.prototype.hasOwnProperty,
|
50 |
+
aps = [].slice,
|
51 |
+
jsSuffixRegExp = /\.js$/;
|
52 |
+
|
53 |
+
function hasProp(obj, prop) {
|
54 |
+
return hasOwn.call(obj, prop);
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Given a relative module name, like ./something, normalize it to
|
59 |
+
* a real name that can be mapped to a path.
|
60 |
+
* @param {String} name the relative name
|
61 |
+
* @param {String} baseName a real name that the name arg is relative
|
62 |
+
* to.
|
63 |
+
* @returns {String} normalized name
|
64 |
+
*/
|
65 |
+
function normalize(name, baseName) {
|
66 |
+
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
|
67 |
+
foundI, foundStarMap, starI, i, j, part,
|
68 |
+
baseParts = baseName && baseName.split("/"),
|
69 |
+
map = config.map,
|
70 |
+
starMap = (map && map['*']) || {};
|
71 |
+
|
72 |
+
//Adjust any relative paths.
|
73 |
+
if (name && name.charAt(0) === ".") {
|
74 |
+
//If have a base name, try to normalize against it,
|
75 |
+
//otherwise, assume it is a top-level require that will
|
76 |
+
//be relative to baseUrl in the end.
|
77 |
+
if (baseName) {
|
78 |
+
name = name.split('/');
|
79 |
+
lastIndex = name.length - 1;
|
80 |
+
|
81 |
+
// Node .js allowance:
|
82 |
+
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
|
83 |
+
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
|
84 |
+
}
|
85 |
+
|
86 |
+
//Lop off the last part of baseParts, so that . matches the
|
87 |
+
//"directory" and not name of the baseName's module. For instance,
|
88 |
+
//baseName of "one/two/three", maps to "one/two/three.js", but we
|
89 |
+
//want the directory, "one/two" for this normalization.
|
90 |
+
name = baseParts.slice(0, baseParts.length - 1).concat(name);
|
91 |
+
|
92 |
+
//start trimDots
|
93 |
+
for (i = 0; i < name.length; i += 1) {
|
94 |
+
part = name[i];
|
95 |
+
if (part === ".") {
|
96 |
+
name.splice(i, 1);
|
97 |
+
i -= 1;
|
98 |
+
} else if (part === "..") {
|
99 |
+
if (i === 1 && (name[2] === '..' || name[0] === '..')) {
|
100 |
+
//End of the line. Keep at least one non-dot
|
101 |
+
//path segment at the front so it can be mapped
|
102 |
+
//correctly to disk. Otherwise, there is likely
|
103 |
+
//no path mapping for a path starting with '..'.
|
104 |
+
//This can still fail, but catches the most reasonable
|
105 |
+
//uses of ..
|
106 |
+
break;
|
107 |
+
} else if (i > 0) {
|
108 |
+
name.splice(i - 1, 2);
|
109 |
+
i -= 2;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
//end trimDots
|
114 |
+
|
115 |
+
name = name.join("/");
|
116 |
+
} else if (name.indexOf('./') === 0) {
|
117 |
+
// No baseName, so this is ID is resolved relative
|
118 |
+
// to baseUrl, pull off the leading dot.
|
119 |
+
name = name.substring(2);
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
//Apply map config if available.
|
124 |
+
if ((baseParts || starMap) && map) {
|
125 |
+
nameParts = name.split('/');
|
126 |
+
|
127 |
+
for (i = nameParts.length; i > 0; i -= 1) {
|
128 |
+
nameSegment = nameParts.slice(0, i).join("/");
|
129 |
+
|
130 |
+
if (baseParts) {
|
131 |
+
//Find the longest baseName segment match in the config.
|
132 |
+
//So, do joins on the biggest to smallest lengths of baseParts.
|
133 |
+
for (j = baseParts.length; j > 0; j -= 1) {
|
134 |
+
mapValue = map[baseParts.slice(0, j).join('/')];
|
135 |
+
|
136 |
+
//baseName segment has config, find if it has one for
|
137 |
+
//this name.
|
138 |
+
if (mapValue) {
|
139 |
+
mapValue = mapValue[nameSegment];
|
140 |
+
if (mapValue) {
|
141 |
+
//Match, update name to the new value.
|
142 |
+
foundMap = mapValue;
|
143 |
+
foundI = i;
|
144 |
+
break;
|
145 |
+
}
|
146 |
+
}
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
if (foundMap) {
|
151 |
+
break;
|
152 |
+
}
|
153 |
+
|
154 |
+
//Check for a star map match, but just hold on to it,
|
155 |
+
//if there is a shorter segment match later in a matching
|
156 |
+
//config, then favor over this star map.
|
157 |
+
if (!foundStarMap && starMap && starMap[nameSegment]) {
|
158 |
+
foundStarMap = starMap[nameSegment];
|
159 |
+
starI = i;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
if (!foundMap && foundStarMap) {
|
164 |
+
foundMap = foundStarMap;
|
165 |
+
foundI = starI;
|
166 |
+
}
|
167 |
+
|
168 |
+
if (foundMap) {
|
169 |
+
nameParts.splice(0, foundI, foundMap);
|
170 |
+
name = nameParts.join('/');
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
return name;
|
175 |
+
}
|
176 |
+
|
177 |
+
function makeRequire(relName, forceSync) {
|
178 |
+
return function () {
|
179 |
+
//A version of a require function that passes a moduleName
|
180 |
+
//value for items that may need to
|
181 |
+
//look up paths relative to the moduleName
|
182 |
+
var args = aps.call(arguments, 0);
|
183 |
+
|
184 |
+
//If first arg is not require('string'), and there is only
|
185 |
+
//one arg, it is the array form without a callback. Insert
|
186 |
+
//a null so that the following concat is correct.
|
187 |
+
if (typeof args[0] !== 'string' && args.length === 1) {
|
188 |
+
args.push(null);
|
189 |
+
}
|
190 |
+
return req.apply(undef, args.concat([relName, forceSync]));
|
191 |
+
};
|
192 |
+
}
|
193 |
+
|
194 |
+
function makeNormalize(relName) {
|
195 |
+
return function (name) {
|
196 |
+
return normalize(name, relName);
|
197 |
+
};
|
198 |
+
}
|
199 |
+
|
200 |
+
function makeLoad(depName) {
|
201 |
+
return function (value) {
|
202 |
+
defined[depName] = value;
|
203 |
+
};
|
204 |
+
}
|
205 |
+
|
206 |
+
function callDep(name) {
|
207 |
+
if (hasProp(waiting, name)) {
|
208 |
+
var args = waiting[name];
|
209 |
+
delete waiting[name];
|
210 |
+
defining[name] = true;
|
211 |
+
main.apply(undef, args);
|
212 |
+
}
|
213 |
+
|
214 |
+
if (!hasProp(defined, name) && !hasProp(defining, name)) {
|
215 |
+
throw new Error('No ' + name);
|
216 |
+
}
|
217 |
+
return defined[name];
|
218 |
+
}
|
219 |
+
|
220 |
+
//Turns a plugin!resource to [plugin, resource]
|
221 |
+
//with the plugin being undefined if the name
|
222 |
+
//did not have a plugin prefix.
|
223 |
+
function splitPrefix(name) {
|
224 |
+
var prefix,
|
225 |
+
index = name ? name.indexOf('!') : -1;
|
226 |
+
if (index > -1) {
|
227 |
+
prefix = name.substring(0, index);
|
228 |
+
name = name.substring(index + 1, name.length);
|
229 |
+
}
|
230 |
+
return [prefix, name];
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Makes a name map, normalizing the name, and using a plugin
|
235 |
+
* for normalization if necessary. Grabs a ref to plugin
|
236 |
+
* too, as an optimization.
|
237 |
+
*/
|
238 |
+
makeMap = function (name, relName) {
|
239 |
+
var plugin,
|
240 |
+
parts = splitPrefix(name),
|
241 |
+
prefix = parts[0];
|
242 |
+
|
243 |
+
name = parts[1];
|
244 |
+
|
245 |
+
if (prefix) {
|
246 |
+
prefix = normalize(prefix, relName);
|
247 |
+
plugin = callDep(prefix);
|
248 |
+
}
|
249 |
+
|
250 |
+
//Normalize according
|
251 |
+
if (prefix) {
|
252 |
+
if (plugin && plugin.normalize) {
|
253 |
+
name = plugin.normalize(name, makeNormalize(relName));
|
254 |
+
} else {
|
255 |
+
name = normalize(name, relName);
|
256 |
+
}
|
257 |
+
} else {
|
258 |
+
name = normalize(name, relName);
|
259 |
+
parts = splitPrefix(name);
|
260 |
+
prefix = parts[0];
|
261 |
+
name = parts[1];
|
262 |
+
if (prefix) {
|
263 |
+
plugin = callDep(prefix);
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
+
//Using ridiculous property names for space reasons
|
268 |
+
return {
|
269 |
+
f: prefix ? prefix + '!' + name : name, //fullName
|
270 |
+
n: name,
|
271 |
+
pr: prefix,
|
272 |
+
p: plugin
|
273 |
+
};
|
274 |
+
};
|
275 |
+
|
276 |
+
function makeConfig(name) {
|
277 |
+
return function () {
|
278 |
+
return (config && config.config && config.config[name]) || {};
|
279 |
+
};
|
280 |
+
}
|
281 |
+
|
282 |
+
handlers = {
|
283 |
+
require: function (name) {
|
284 |
+
return makeRequire(name);
|
285 |
+
},
|
286 |
+
exports: function (name) {
|
287 |
+
var e = defined[name];
|
288 |
+
if (typeof e !== 'undefined') {
|
289 |
+
return e;
|
290 |
+
} else {
|
291 |
+
return (defined[name] = {});
|
292 |
+
}
|
293 |
+
},
|
294 |
+
module: function (name) {
|
295 |
+
return {
|
296 |
+
id: name,
|
297 |
+
uri: '',
|
298 |
+
exports: defined[name],
|
299 |
+
config: makeConfig(name)
|
300 |
+
};
|
301 |
+
}
|
302 |
+
};
|
303 |
+
|
304 |
+
main = function (name, deps, callback, relName) {
|
305 |
+
var cjsModule, depName, ret, map, i,
|
306 |
+
args = [],
|
307 |
+
callbackType = typeof callback,
|
308 |
+
usingExports;
|
309 |
+
|
310 |
+
//Use name if no relName
|
311 |
+
relName = relName || name;
|
312 |
+
|
313 |
+
//Call the callback to define the module, if necessary.
|
314 |
+
if (callbackType === 'undefined' || callbackType === 'function') {
|
315 |
+
//Pull out the defined dependencies and pass the ordered
|
316 |
+
//values to the callback.
|
317 |
+
//Default to [require, exports, module] if no deps
|
318 |
+
deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
|
319 |
+
for (i = 0; i < deps.length; i += 1) {
|
320 |
+
map = makeMap(deps[i], relName);
|
321 |
+
depName = map.f;
|
322 |
+
|
323 |
+
//Fast path CommonJS standard dependencies.
|
324 |
+
if (depName === "require") {
|
325 |
+
args[i] = handlers.require(name);
|
326 |
+
} else if (depName === "exports") {
|
327 |
+
//CommonJS module spec 1.1
|
328 |
+
args[i] = handlers.exports(name);
|
329 |
+
usingExports = true;
|
330 |
+
} else if (depName === "module") {
|
331 |
+
//CommonJS module spec 1.1
|
332 |
+
cjsModule = args[i] = handlers.module(name);
|
333 |
+
} else if (hasProp(defined, depName) ||
|
334 |
+
hasProp(waiting, depName) ||
|
335 |
+
hasProp(defining, depName)) {
|
336 |
+
args[i] = callDep(depName);
|
337 |
+
} else if (map.p) {
|
338 |
+
map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
|
339 |
+
args[i] = defined[depName];
|
340 |
+
} else {
|
341 |
+
throw new Error(name + ' missing ' + depName);
|
342 |
+
}
|
343 |
+
}
|
344 |
+
|
345 |
+
ret = callback ? callback.apply(defined[name], args) : undefined;
|
346 |
+
|
347 |
+
if (name) {
|
348 |
+
//If setting exports via "module" is in play,
|
349 |
+
//favor that over return value and exports. After that,
|
350 |
+
//favor a non-undefined return value over exports use.
|
351 |
+
if (cjsModule && cjsModule.exports !== undef &&
|
352 |
+
cjsModule.exports !== defined[name]) {
|
353 |
+
defined[name] = cjsModule.exports;
|
354 |
+
} else if (ret !== undef || !usingExports) {
|
355 |
+
//Use the return value from the function.
|
356 |
+
defined[name] = ret;
|
357 |
+
}
|
358 |
+
}
|
359 |
+
} else if (name) {
|
360 |
+
//May just be an object definition for the module. Only
|
361 |
+
//worry about defining if have a module name.
|
362 |
+
defined[name] = callback;
|
363 |
+
}
|
364 |
+
};
|
365 |
+
|
366 |
+
requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
|
367 |
+
if (typeof deps === "string") {
|
368 |
+
if (handlers[deps]) {
|
369 |
+
//callback in this case is really relName
|
370 |
+
return handlers[deps](callback);
|
371 |
+
}
|
372 |
+
//Just return the module wanted. In this scenario, the
|
373 |
+
//deps arg is the module name, and second arg (if passed)
|
374 |
+
//is just the relName.
|
375 |
+
//Normalize module name, if it contains . or ..
|
376 |
+
return callDep(makeMap(deps, callback).f);
|
377 |
+
} else if (!deps.splice) {
|
378 |
+
//deps is a config object, not an array.
|
379 |
+
config = deps;
|
380 |
+
if (config.deps) {
|
381 |
+
req(config.deps, config.callback);
|
382 |
+
}
|
383 |
+
if (!callback) {
|
384 |
+
return;
|
385 |
+
}
|
386 |
+
|
387 |
+
if (callback.splice) {
|
388 |
+
//callback is an array, which means it is a dependency list.
|
389 |
+
//Adjust args if there are dependencies
|
390 |
+
deps = callback;
|
391 |
+
callback = relName;
|
392 |
+
relName = null;
|
393 |
+
} else {
|
394 |
+
deps = undef;
|
395 |
+
}
|
396 |
+
}
|
397 |
+
|
398 |
+
//Support require(['a'])
|
399 |
+
callback = callback || function () {};
|
400 |
+
|
401 |
+
//If relName is a function, it is an errback handler,
|
402 |
+
//so remove it.
|
403 |
+
if (typeof relName === 'function') {
|
404 |
+
relName = forceSync;
|
405 |
+
forceSync = alt;
|
406 |
+
}
|
407 |
+
|
408 |
+
//Simulate async callback;
|
409 |
+
if (forceSync) {
|
410 |
+
main(undef, deps, callback, relName);
|
411 |
+
} else {
|
412 |
+
//Using a non-zero value because of concern for what old browsers
|
413 |
+
//do, and latest browsers "upgrade" to 4 if lower value is used:
|
414 |
+
//http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
|
415 |
+
//If want a value immediately, use require('id') instead -- something
|
416 |
+
//that works in almond on the global level, but not guaranteed and
|
417 |
+
//unlikely to work in other AMD implementations.
|
418 |
+
setTimeout(function () {
|
419 |
+
main(undef, deps, callback, relName);
|
420 |
+
}, 4);
|
421 |
+
}
|
422 |
+
|
423 |
+
return req;
|
424 |
+
};
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Just drops the config on the floor, but returns req in case
|
428 |
+
* the config return value is used.
|
429 |
+
*/
|
430 |
+
req.config = function (cfg) {
|
431 |
+
return req(cfg);
|
432 |
+
};
|
433 |
+
|
434 |
+
/**
|
435 |
+
* Expose module registry for debugging and tooling
|
436 |
+
*/
|
437 |
+
requirejs._defined = defined;
|
438 |
+
|
439 |
+
define = function (name, deps, callback) {
|
440 |
+
if (typeof name !== 'string') {
|
441 |
+
throw new Error('See almond README: incorrect module build, no module name');
|
442 |
+
}
|
443 |
+
|
444 |
+
//This module may not have dependencies
|
445 |
+
if (!deps.splice) {
|
446 |
+
//deps is not an array, so probably means
|
447 |
+
//an object literal or factory function for
|
448 |
+
//the value. Adjust args.
|
449 |
+
callback = deps;
|
450 |
+
deps = [];
|
451 |
+
}
|
452 |
+
|
453 |
+
if (!hasProp(defined, name) && !hasProp(waiting, name)) {
|
454 |
+
waiting[name] = [name, deps, callback];
|
455 |
+
}
|
456 |
+
};
|
457 |
+
|
458 |
+
define.amd = {
|
459 |
+
jQuery: true
|
460 |
+
};
|
461 |
+
}());
|
462 |
+
|
463 |
+
S2.requirejs = requirejs;S2.require = require;S2.define = define;
|
464 |
+
}
|
465 |
+
}());
|
466 |
+
S2.define("almond", function(){});
|
467 |
+
|
468 |
+
/* global jQuery:false, $:false */
|
469 |
+
S2.define('jquery',[],function () {
|
470 |
+
var _$ = jQuery || $;
|
471 |
+
|
472 |
+
if (_$ == null && console && console.error) {
|
473 |
+
console.error(
|
474 |
+
'Select2: An instance of jQuery or a jQuery-compatible library was not ' +
|
475 |
+
'found. Make sure that you are including jQuery before Select2 on your ' +
|
476 |
+
'web page.'
|
477 |
+
);
|
478 |
+
}
|
479 |
+
|
480 |
+
return _$;
|
481 |
+
});
|
482 |
+
|
483 |
+
S2.define('select2/utils',[
|
484 |
+
'jquery'
|
485 |
+
], function ($) {
|
486 |
+
var Utils = {};
|
487 |
+
|
488 |
+
Utils.Extend = function (ChildClass, SuperClass) {
|
489 |
+
var __hasProp = {}.hasOwnProperty;
|
490 |
+
|
491 |
+
function BaseConstructor () {
|
492 |
+
this.constructor = ChildClass;
|
493 |
+
}
|
494 |
+
|
495 |
+
for (var key in SuperClass) {
|
496 |
+
if (__hasProp.call(SuperClass, key)) {
|
497 |
+
ChildClass[key] = SuperClass[key];
|
498 |
+
}
|
499 |
+
}
|
500 |
+
|
501 |
+
BaseConstructor.prototype = SuperClass.prototype;
|
502 |
+
ChildClass.prototype = new BaseConstructor();
|
503 |
+
ChildClass.__super__ = SuperClass.prototype;
|
504 |
+
|
505 |
+
return ChildClass;
|
506 |
+
};
|
507 |
+
|
508 |
+
function getMethods (theClass) {
|
509 |
+
var proto = theClass.prototype;
|
510 |
+
|
511 |
+
var methods = [];
|
512 |
+
|
513 |
+
for (var methodName in proto) {
|
514 |
+
var m = proto[methodName];
|
515 |
+
|
516 |
+
if (typeof m !== 'function') {
|
517 |
+
continue;
|
518 |
+
}
|
519 |
+
|
520 |
+
if (methodName === 'constructor') {
|
521 |
+
continue;
|
522 |
+
}
|
523 |
+
|
524 |
+
methods.push(methodName);
|
525 |
+
}
|
526 |
+
|
527 |
+
return methods;
|
528 |
+
}
|
529 |
+
|
530 |
+
Utils.Decorate = function (SuperClass, DecoratorClass) {
|
531 |
+
var decoratedMethods = getMethods(DecoratorClass);
|
532 |
+
var superMethods = getMethods(SuperClass);
|
533 |
+
|
534 |
+
function DecoratedClass () {
|
535 |
+
var unshift = Array.prototype.unshift;
|
536 |
+
|
537 |
+
var argCount = DecoratorClass.prototype.constructor.length;
|
538 |
+
|
539 |
+
var calledConstructor = SuperClass.prototype.constructor;
|
540 |
+
|
541 |
+
if (argCount > 0) {
|
542 |
+
unshift.call(arguments, SuperClass.prototype.constructor);
|
543 |
+
|
544 |
+
calledConstructor = DecoratorClass.prototype.constructor;
|
545 |
+
}
|
546 |
+
|
547 |
+
calledConstructor.apply(this, arguments);
|
548 |
+
}
|
549 |
+
|
550 |
+
DecoratorClass.displayName = SuperClass.displayName;
|
551 |
+
|
552 |
+
function ctr () {
|
553 |
+
this.constructor = DecoratedClass;
|
554 |
+
}
|
555 |
+
|
556 |
+
DecoratedClass.prototype = new ctr();
|
557 |
+
|
558 |
+
for (var m = 0; m < superMethods.length; m++) {
|
559 |
+
var superMethod = superMethods[m];
|
560 |
+
|
561 |
+
DecoratedClass.prototype[superMethod] =
|
562 |
+
SuperClass.prototype[superMethod];
|
563 |
+
}
|
564 |
+
|
565 |
+
var calledMethod = function (methodName) {
|
566 |
+
// Stub out the original method if it's not decorating an actual method
|
567 |
+
var originalMethod = function () {};
|
568 |
+
|
569 |
+
if (methodName in DecoratedClass.prototype) {
|
570 |
+
originalMethod = DecoratedClass.prototype[methodName];
|
571 |
+
}
|
572 |
+
|
573 |
+
var decoratedMethod = DecoratorClass.prototype[methodName];
|
574 |
+
|
575 |
+
return function () {
|
576 |
+
var unshift = Array.prototype.unshift;
|
577 |
+
|
578 |
+
unshift.call(arguments, originalMethod);
|
579 |
+
|
580 |
+
return decoratedMethod.apply(this, arguments);
|
581 |
+
};
|
582 |
+
};
|
583 |
+
|
584 |
+
for (var d = 0; d < decoratedMethods.length; d++) {
|
585 |
+
var decoratedMethod = decoratedMethods[d];
|
586 |
+
|
587 |
+
DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);
|
588 |
+
}
|
589 |
+
|
590 |
+
return DecoratedClass;
|
591 |
+
};
|
592 |
+
|
593 |
+
var Observable = function () {
|
594 |
+
this.listeners = {};
|
595 |
+
};
|
596 |
+
|
597 |
+
Observable.prototype.on = function (event, callback) {
|
598 |
+
this.listeners = this.listeners || {};
|
599 |
+
|
600 |
+
if (event in this.listeners) {
|
601 |
+
this.listeners[event].push(callback);
|
602 |
+
} else {
|
603 |
+
this.listeners[event] = [callback];
|
604 |
+
}
|
605 |
+
};
|
606 |
+
|
607 |
+
Observable.prototype.trigger = function (event) {
|
608 |
+
var slice = Array.prototype.slice;
|
609 |
+
var params = slice.call(arguments, 1);
|
610 |
+
|
611 |
+
this.listeners = this.listeners || {};
|
612 |
+
|
613 |
+
// Params should always come in as an array
|
614 |
+
if (params == null) {
|
615 |
+
params = [];
|
616 |
+
}
|
617 |
+
|
618 |
+
// If there are no arguments to the event, use a temporary object
|
619 |
+
if (params.length === 0) {
|
620 |
+
params.push({});
|
621 |
+
}
|
622 |
+
|
623 |
+
// Set the `_type` of the first object to the event
|
624 |
+
params[0]._type = event;
|
625 |
+
|
626 |
+
if (event in this.listeners) {
|
627 |
+
this.invoke(this.listeners[event], slice.call(arguments, 1));
|
628 |
+
}
|
629 |
+
|
630 |
+
if ('*' in this.listeners) {
|
631 |
+
this.invoke(this.listeners['*'], arguments);
|
632 |
+
}
|
633 |
+
};
|
634 |
+
|
635 |
+
Observable.prototype.invoke = function (listeners, params) {
|
636 |
+
for (var i = 0, len = listeners.length; i < len; i++) {
|
637 |
+
listeners[i].apply(this, params);
|
638 |
+
}
|
639 |
+
};
|
640 |
+
|
641 |
+
Utils.Observable = Observable;
|
642 |
+
|
643 |
+
Utils.generateChars = function (length) {
|
644 |
+
var chars = '';
|
645 |
+
|
646 |
+
for (var i = 0; i < length; i++) {
|
647 |
+
var randomChar = Math.floor(Math.random() * 36);
|
648 |
+
chars += randomChar.toString(36);
|
649 |
+
}
|
650 |
+
|
651 |
+
return chars;
|
652 |
+
};
|
653 |
+
|
654 |
+
Utils.bind = function (func, context) {
|
655 |
+
return function () {
|
656 |
+
func.apply(context, arguments);
|
657 |
+
};
|
658 |
+
};
|
659 |
+
|
660 |
+
Utils._convertData = function (data) {
|
661 |
+
for (var originalKey in data) {
|
662 |
+
var keys = originalKey.split('-');
|
663 |
+
|
664 |
+
var dataLevel = data;
|
665 |
+
|
666 |
+
if (keys.length === 1) {
|
667 |
+
continue;
|
668 |
+
}
|
669 |
+
|
670 |
+
for (var k = 0; k < keys.length; k++) {
|
671 |
+
var key = keys[k];
|
672 |
+
|
673 |
+
// Lowercase the first letter
|
674 |
+
// By default, dash-separated becomes camelCase
|
675 |
+
key = key.substring(0, 1).toLowerCase() + key.substring(1);
|
676 |
+
|
677 |
+
if (!(key in dataLevel)) {
|
678 |
+
dataLevel[key] = {};
|
679 |
+
}
|
680 |
+
|
681 |
+
if (k == keys.length - 1) {
|
682 |
+
dataLevel[key] = data[originalKey];
|
683 |
+
}
|
684 |
+
|
685 |
+
dataLevel = dataLevel[key];
|
686 |
+
}
|
687 |
+
|
688 |
+
delete data[originalKey];
|
689 |
+
}
|
690 |
+
|
691 |
+
return data;
|
692 |
+
};
|
693 |
+
|
694 |
+
Utils.hasScroll = function (index, el) {
|
695 |
+
// Adapted from the function created by @ShadowScripter
|
696 |
+
// and adapted by @BillBarry on the Stack Exchange Code Review website.
|
697 |
+
// The original code can be found at
|
698 |
+
// http://codereview.stackexchange.com/q/13338
|
699 |
+
// and was designed to be used with the Sizzle selector engine.
|
700 |
+
|
701 |
+
var $el = $(el);
|
702 |
+
var overflowX = el.style.overflowX;
|
703 |
+
var overflowY = el.style.overflowY;
|
704 |
+
|
705 |
+
//Check both x and y declarations
|
706 |
+
if (overflowX === overflowY &&
|
707 |
+
(overflowY === 'hidden' || overflowY === 'visible')) {
|
708 |
+
return false;
|
709 |
+
}
|
710 |
+
|
711 |
+
if (overflowX === 'scroll' || overflowY === 'scroll') {
|
712 |
+
return true;
|
713 |
+
}
|
714 |
+
|
715 |
+
return ($el.innerHeight() < el.scrollHeight ||
|
716 |
+
$el.innerWidth() < el.scrollWidth);
|
717 |
+
};
|
718 |
+
|
719 |
+
Utils.escapeMarkup = function (markup) {
|
720 |
+
var replaceMap = {
|
721 |
+
'\\': '\',
|
722 |
+
'&': '&',
|
723 |
+
'<': '<',
|
724 |
+
'>': '>',
|
725 |
+
'"': '"',
|
726 |
+
'\'': ''',
|
727 |
+
'/': '/'
|
728 |
+
};
|
729 |
+
|
730 |
+
// Do not try to escape the markup if it's not a string
|
731 |
+
if (typeof markup !== 'string') {
|
732 |
+
return markup;
|
733 |
+
}
|
734 |
+
|
735 |
+
return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
|
736 |
+
return replaceMap[match];
|
737 |
+
});
|
738 |
+
};
|
739 |
+
|
740 |
+
// Append an array of jQuery nodes to a given element.
|
741 |
+
Utils.appendMany = function ($element, $nodes) {
|
742 |
+
// jQuery 1.7.x does not support $.fn.append() with an array
|
743 |
+
// Fall back to a jQuery object collection using $.fn.add()
|
744 |
+
if ($.fn.jquery.substr(0, 3) === '1.7') {
|
745 |
+
var $jqNodes = $();
|
746 |
+
|
747 |
+
$.map($nodes, function (node) {
|
748 |
+
$jqNodes = $jqNodes.add(node);
|
749 |
+
});
|
750 |
+
|
751 |
+
$nodes = $jqNodes;
|
752 |
+
}
|
753 |
+
|
754 |
+
$element.append($nodes);
|
755 |
+
};
|
756 |
+
|
757 |
+
return Utils;
|
758 |
+
});
|
759 |
+
|
760 |
+
S2.define('select2/results',[
|
761 |
+
'jquery',
|
762 |
+
'./utils'
|
763 |
+
], function ($, Utils) {
|
764 |
+
function Results ($element, options, dataAdapter) {
|
765 |
+
this.$element = $element;
|
766 |
+
this.data = dataAdapter;
|
767 |
+
this.options = options;
|
768 |
+
|
769 |
+
Results.__super__.constructor.call(this);
|
770 |
+
}
|
771 |
+
|
772 |
+
Utils.Extend(Results, Utils.Observable);
|
773 |
+
|
774 |
+
Results.prototype.render = function () {
|
775 |
+
var $results = $(
|
776 |
+
'<ul class="select2-results__options" role="tree"></ul>'
|
777 |
+
);
|
778 |
+
|
779 |
+
if (this.options.get('multiple')) {
|
780 |
+
$results.attr('aria-multiselectable', 'true');
|
781 |
+
}
|
782 |
+
|
783 |
+
this.$results = $results;
|
784 |
+
|
785 |
+
return $results;
|
786 |
+
};
|
787 |
+
|
788 |
+
Results.prototype.clear = function () {
|
789 |
+
this.$results.empty();
|
790 |
+
};
|
791 |
+
|
792 |
+
Results.prototype.displayMessage = function (params) {
|
793 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
794 |
+
|
795 |
+
this.clear();
|
796 |
+
this.hideLoading();
|
797 |
+
|
798 |
+
var $message = $(
|
799 |
+
'<li role="treeitem" aria-live="assertive"' +
|
800 |
+
' class="select2-results__option"></li>'
|
801 |
+
);
|
802 |
+
|
803 |
+
var message = this.options.get('translations').get(params.message);
|
804 |
+
|
805 |
+
$message.append(
|
806 |
+
escapeMarkup(
|
807 |
+
message(params.args)
|
808 |
+
)
|
809 |
+
);
|
810 |
+
|
811 |
+
$message[0].className += ' select2-results__message';
|
812 |
+
|
813 |
+
this.$results.append($message);
|
814 |
+
};
|
815 |
+
|
816 |
+
Results.prototype.hideMessages = function () {
|
817 |
+
this.$results.find('.select2-results__message').remove();
|
818 |
+
};
|
819 |
+
|
820 |
+
Results.prototype.append = function (data) {
|
821 |
+
this.hideLoading();
|
822 |
+
|
823 |
+
var $options = [];
|
824 |
+
|
825 |
+
if (data.results == null || data.results.length === 0) {
|
826 |
+
if (this.$results.children().length === 0) {
|
827 |
+
this.trigger('results:message', {
|
828 |
+
message: 'noResults'
|
829 |
+
});
|
830 |
+
}
|
831 |
+
|
832 |
+
return;
|
833 |
+
}
|
834 |
+
|
835 |
+
data.results = this.sort(data.results);
|
836 |
+
|
837 |
+
for (var d = 0; d < data.results.length; d++) {
|
838 |
+
var item = data.results[d];
|
839 |
+
|
840 |
+
var $option = this.option(item);
|
841 |
+
|
842 |
+
$options.push($option);
|
843 |
+
}
|
844 |
+
|
845 |
+
this.$results.append($options);
|
846 |
+
};
|
847 |
+
|
848 |
+
Results.prototype.position = function ($results, $dropdown) {
|
849 |
+
var $resultsContainer = $dropdown.find('.select2-results');
|
850 |
+
$resultsContainer.append($results);
|
851 |
+
};
|
852 |
+
|
853 |
+
Results.prototype.sort = function (data) {
|
854 |
+
var sorter = this.options.get('sorter');
|
855 |
+
|
856 |
+
return sorter(data);
|
857 |
+
};
|
858 |
+
|
859 |
+
Results.prototype.highlightFirstItem = function () {
|
860 |
+
var $options = this.$results
|
861 |
+
.find('.select2-results__option[aria-selected]');
|
862 |
+
|
863 |
+
var $selected = $options.filter('[aria-selected=true]');
|
864 |
+
|
865 |
+
// Check if there are any selected options
|
866 |
+
if ($selected.length > 0) {
|
867 |
+
// If there are selected options, highlight the first
|
868 |
+
$selected.first().trigger('mouseenter');
|
869 |
+
} else {
|
870 |
+
// If there are no selected options, highlight the first option
|
871 |
+
// in the dropdown
|
872 |
+
$options.first().trigger('mouseenter');
|
873 |
+
}
|
874 |
+
|
875 |
+
this.ensureHighlightVisible();
|
876 |
+
};
|
877 |
+
|
878 |
+
Results.prototype.setClasses = function () {
|
879 |
+
var self = this;
|
880 |
+
|
881 |
+
this.data.current(function (selected) {
|
882 |
+
var selectedIds = $.map(selected, function (s) {
|
883 |
+
return s.id.toString();
|
884 |
+
});
|
885 |
+
|
886 |
+
var $options = self.$results
|
887 |
+
.find('.select2-results__option[aria-selected]');
|
888 |
+
|
889 |
+
$options.each(function () {
|
890 |
+
var $option = $(this);
|
891 |
+
|
892 |
+
var item = $.data(this, 'data');
|
893 |
+
|
894 |
+
// id needs to be converted to a string when comparing
|
895 |
+
var id = '' + item.id;
|
896 |
+
|
897 |
+
if ((item.element != null && item.element.selected) ||
|
898 |
+
(item.element == null && $.inArray(id, selectedIds) > -1)) {
|
899 |
+
$option.attr('aria-selected', 'true');
|
900 |
+
} else {
|
901 |
+
$option.attr('aria-selected', 'false');
|
902 |
+
}
|
903 |
+
});
|
904 |
+
|
905 |
+
});
|
906 |
+
};
|
907 |
+
|
908 |
+
Results.prototype.showLoading = function (params) {
|
909 |
+
this.hideLoading();
|
910 |
+
|
911 |
+
var loadingMore = this.options.get('translations').get('searching');
|
912 |
+
|
913 |
+
var loading = {
|
914 |
+
disabled: true,
|
915 |
+
loading: true,
|
916 |
+
text: loadingMore(params)
|
917 |
+
};
|
918 |
+
var $loading = this.option(loading);
|
919 |
+
$loading.className += ' loading-results';
|
920 |
+
|
921 |
+
this.$results.prepend($loading);
|
922 |
+
};
|
923 |
+
|
924 |
+
Results.prototype.hideLoading = function () {
|
925 |
+
this.$results.find('.loading-results').remove();
|
926 |
+
};
|
927 |
+
|
928 |
+
Results.prototype.option = function (data) {
|
929 |
+
var option = document.createElement('li');
|
930 |
+
option.className = 'select2-results__option';
|
931 |
+
|
932 |
+
var attrs = {
|
933 |
+
'role': 'treeitem',
|
934 |
+
'aria-selected': 'false'
|
935 |
+
};
|
936 |
+
|
937 |
+
if (data.disabled) {
|
938 |
+
delete attrs['aria-selected'];
|
939 |
+
attrs['aria-disabled'] = 'true';
|
940 |
+
}
|
941 |
+
|
942 |
+
if (data.id == null) {
|
943 |
+
delete attrs['aria-selected'];
|
944 |
+
}
|
945 |
+
|
946 |
+
if (data._resultId != null) {
|
947 |
+
option.id = data._resultId;
|
948 |
+
}
|
949 |
+
|
950 |
+
if (data.title) {
|
951 |
+
option.title = data.title;
|
952 |
+
}
|
953 |
+
|
954 |
+
if (data.children) {
|
955 |
+
attrs.role = 'group';
|
956 |
+
attrs['aria-label'] = data.text;
|
957 |
+
delete attrs['aria-selected'];
|
958 |
+
}
|
959 |
+
|
960 |
+
for (var attr in attrs) {
|
961 |
+
var val = attrs[attr];
|
962 |
+
|
963 |
+
option.setAttribute(attr, val);
|
964 |
+
}
|
965 |
+
|
966 |
+
if (data.children) {
|
967 |
+
var $option = $(option);
|
968 |
+
|
969 |
+
var label = document.createElement('strong');
|
970 |
+
label.className = 'select2-results__group';
|
971 |
+
|
972 |
+
var $label = $(label);
|
973 |
+
this.template(data, label);
|
974 |
+
|
975 |
+
var $children = [];
|
976 |
+
|
977 |
+
for (var c = 0; c < data.children.length; c++) {
|
978 |
+
var child = data.children[c];
|
979 |
+
|
980 |
+
var $child = this.option(child);
|
981 |
+
|
982 |
+
$children.push($child);
|
983 |
+
}
|
984 |
+
|
985 |
+
var $childrenContainer = $('<ul></ul>', {
|
986 |
+
'class': 'select2-results__options select2-results__options--nested'
|
987 |
+
});
|
988 |
+
|
989 |
+
$childrenContainer.append($children);
|
990 |
+
|
991 |
+
$option.append(label);
|
992 |
+
$option.append($childrenContainer);
|
993 |
+
} else {
|
994 |
+
this.template(data, option);
|
995 |
+
}
|
996 |
+
|
997 |
+
$.data(option, 'data', data);
|
998 |
+
|
999 |
+
return option;
|
1000 |
+
};
|
1001 |
+
|
1002 |
+
Results.prototype.bind = function (container, $container) {
|
1003 |
+
var self = this;
|
1004 |
+
|
1005 |
+
var id = container.id + '-results';
|
1006 |
+
|
1007 |
+
this.$results.attr('id', id);
|
1008 |
+
|
1009 |
+
container.on('results:all', function (params) {
|
1010 |
+
self.clear();
|
1011 |
+
self.append(params.data);
|
1012 |
+
|
1013 |
+
if (container.isOpen()) {
|
1014 |
+
self.setClasses();
|
1015 |
+
self.highlightFirstItem();
|
1016 |
+
}
|
1017 |
+
});
|
1018 |
+
|
1019 |
+
container.on('results:append', function (params) {
|
1020 |
+
self.append(params.data);
|
1021 |
+
|
1022 |
+
if (container.isOpen()) {
|
1023 |
+
self.setClasses();
|
1024 |
+
}
|
1025 |
+
});
|
1026 |
+
|
1027 |
+
container.on('query', function (params) {
|
1028 |
+
self.hideMessages();
|
1029 |
+
self.showLoading(params);
|
1030 |
+
});
|
1031 |
+
|
1032 |
+
container.on('select', function () {
|
1033 |
+
if (!container.isOpen()) {
|
1034 |
+
return;
|
1035 |
+
}
|
1036 |
+
|
1037 |
+
self.setClasses();
|
1038 |
+
self.highlightFirstItem();
|
1039 |
+
});
|
1040 |
+
|
1041 |
+
container.on('unselect', function () {
|
1042 |
+
if (!container.isOpen()) {
|
1043 |
+
return;
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
self.setClasses();
|
1047 |
+
self.highlightFirstItem();
|
1048 |
+
});
|
1049 |
+
|
1050 |
+
container.on('open', function () {
|
1051 |
+
// When the dropdown is open, aria-expended="true"
|
1052 |
+
self.$results.attr('aria-expanded', 'true');
|
1053 |
+
self.$results.attr('aria-hidden', 'false');
|
1054 |
+
|
1055 |
+
self.setClasses();
|
1056 |
+
self.ensureHighlightVisible();
|
1057 |
+
});
|
1058 |
+
|
1059 |
+
container.on('close', function () {
|
1060 |
+
// When the dropdown is closed, aria-expended="false"
|
1061 |
+
self.$results.attr('aria-expanded', 'false');
|
1062 |
+
self.$results.attr('aria-hidden', 'true');
|
1063 |
+
self.$results.removeAttr('aria-activedescendant');
|
1064 |
+
});
|
1065 |
+
|
1066 |
+
container.on('results:toggle', function () {
|
1067 |
+
var $highlighted = self.getHighlightedResults();
|
1068 |
+
|
1069 |
+
if ($highlighted.length === 0) {
|
1070 |
+
return;
|
1071 |
+
}
|
1072 |
+
|
1073 |
+
$highlighted.trigger('mouseup');
|
1074 |
+
});
|
1075 |
+
|
1076 |
+
container.on('results:select', function () {
|
1077 |
+
var $highlighted = self.getHighlightedResults();
|
1078 |
+
|
1079 |
+
if ($highlighted.length === 0) {
|
1080 |
+
return;
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
var data = $highlighted.data('data');
|
1084 |
+
|
1085 |
+
if ($highlighted.attr('aria-selected') == 'true') {
|
1086 |
+
self.trigger('close', {});
|
1087 |
+
} else {
|
1088 |
+
self.trigger('select', {
|
1089 |
+
data: data
|
1090 |
+
});
|
1091 |
+
}
|
1092 |
+
});
|
1093 |
+
|
1094 |
+
container.on('results:previous', function () {
|
1095 |
+
var $highlighted = self.getHighlightedResults();
|
1096 |
+
|
1097 |
+
var $options = self.$results.find('[aria-selected]');
|
1098 |
+
|
1099 |
+
var currentIndex = $options.index($highlighted);
|
1100 |
+
|
1101 |
+
// If we are already at te top, don't move further
|
1102 |
+
if (currentIndex === 0) {
|
1103 |
+
return;
|
1104 |
+
}
|
1105 |
+
|
1106 |
+
var nextIndex = currentIndex - 1;
|
1107 |
+
|
1108 |
+
// If none are highlighted, highlight the first
|
1109 |
+
if ($highlighted.length === 0) {
|
1110 |
+
nextIndex = 0;
|
1111 |
+
}
|
1112 |
+
|
1113 |
+
var $next = $options.eq(nextIndex);
|
1114 |
+
|
1115 |
+
$next.trigger('mouseenter');
|
1116 |
+
|
1117 |
+
var currentOffset = self.$results.offset().top;
|
1118 |
+
var nextTop = $next.offset().top;
|
1119 |
+
var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);
|
1120 |
+
|
1121 |
+
if (nextIndex === 0) {
|
1122 |
+
self.$results.scrollTop(0);
|
1123 |
+
} else if (nextTop - currentOffset < 0) {
|
1124 |
+
self.$results.scrollTop(nextOffset);
|
1125 |
+
}
|
1126 |
+
});
|
1127 |
+
|
1128 |
+
container.on('results:next', function () {
|
1129 |
+
var $highlighted = self.getHighlightedResults();
|
1130 |
+
|
1131 |
+
var $options = self.$results.find('[aria-selected]');
|
1132 |
+
|
1133 |
+
var currentIndex = $options.index($highlighted);
|
1134 |
+
|
1135 |
+
var nextIndex = currentIndex + 1;
|
1136 |
+
|
1137 |
+
// If we are at the last option, stay there
|
1138 |
+
if (nextIndex >= $options.length) {
|
1139 |
+
return;
|
1140 |
+
}
|
1141 |
+
|
1142 |
+
var $next = $options.eq(nextIndex);
|
1143 |
+
|
1144 |
+
$next.trigger('mouseenter');
|
1145 |
+
|
1146 |
+
var currentOffset = self.$results.offset().top +
|
1147 |
+
self.$results.outerHeight(false);
|
1148 |
+
var nextBottom = $next.offset().top + $next.outerHeight(false);
|
1149 |
+
var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;
|
1150 |
+
|
1151 |
+
if (nextIndex === 0) {
|
1152 |
+
self.$results.scrollTop(0);
|
1153 |
+
} else if (nextBottom > currentOffset) {
|
1154 |
+
self.$results.scrollTop(nextOffset);
|
1155 |
+
}
|
1156 |
+
});
|
1157 |
+
|
1158 |
+
container.on('results:focus', function (params) {
|
1159 |
+
params.element.addClass('select2-results__option--highlighted');
|
1160 |
+
});
|
1161 |
+
|
1162 |
+
container.on('results:message', function (params) {
|
1163 |
+
self.displayMessage(params);
|
1164 |
+
});
|
1165 |
+
|
1166 |
+
if ($.fn.mousewheel) {
|
1167 |
+
this.$results.on('mousewheel', function (e) {
|
1168 |
+
var top = self.$results.scrollTop();
|
1169 |
+
|
1170 |
+
var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;
|
1171 |
+
|
1172 |
+
var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;
|
1173 |
+
var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();
|
1174 |
+
|
1175 |
+
if (isAtTop) {
|
1176 |
+
self.$results.scrollTop(0);
|
1177 |
+
|
1178 |
+
e.preventDefault();
|
1179 |
+
e.stopPropagation();
|
1180 |
+
} else if (isAtBottom) {
|
1181 |
+
self.$results.scrollTop(
|
1182 |
+
self.$results.get(0).scrollHeight - self.$results.height()
|
1183 |
+
);
|
1184 |
+
|
1185 |
+
e.preventDefault();
|
1186 |
+
e.stopPropagation();
|
1187 |
+
}
|
1188 |
+
});
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
this.$results.on('mouseup', '.select2-results__option[aria-selected]',
|
1192 |
+
function (evt) {
|
1193 |
+
var $this = $(this);
|
1194 |
+
|
1195 |
+
var data = $this.data('data');
|
1196 |
+
|
1197 |
+
if ($this.attr('aria-selected') === 'true') {
|
1198 |
+
if (self.options.get('multiple')) {
|
1199 |
+
self.trigger('unselect', {
|
1200 |
+
originalEvent: evt,
|
1201 |
+
data: data
|
1202 |
+
});
|
1203 |
+
} else {
|
1204 |
+
self.trigger('close', {});
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
return;
|
1208 |
+
}
|
1209 |
+
|
1210 |
+
self.trigger('select', {
|
1211 |
+
originalEvent: evt,
|
1212 |
+
data: data
|
1213 |
+
});
|
1214 |
+
});
|
1215 |
+
|
1216 |
+
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
|
1217 |
+
function (evt) {
|
1218 |
+
var data = $(this).data('data');
|
1219 |
+
|
1220 |
+
self.getHighlightedResults()
|
1221 |
+
.removeClass('select2-results__option--highlighted');
|
1222 |
+
|
1223 |
+
self.trigger('results:focus', {
|
1224 |
+
data: data,
|
1225 |
+
element: $(this)
|
1226 |
+
});
|
1227 |
+
});
|
1228 |
+
};
|
1229 |
+
|
1230 |
+
Results.prototype.getHighlightedResults = function () {
|
1231 |
+
var $highlighted = this.$results
|
1232 |
+
.find('.select2-results__option--highlighted');
|
1233 |
+
|
1234 |
+
return $highlighted;
|
1235 |
+
};
|
1236 |
+
|
1237 |
+
Results.prototype.destroy = function () {
|
1238 |
+
this.$results.remove();
|
1239 |
+
};
|
1240 |
+
|
1241 |
+
Results.prototype.ensureHighlightVisible = function () {
|
1242 |
+
var $highlighted = this.getHighlightedResults();
|
1243 |
+
|
1244 |
+
if ($highlighted.length === 0) {
|
1245 |
+
return;
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
var $options = this.$results.find('[aria-selected]');
|
1249 |
+
|
1250 |
+
var currentIndex = $options.index($highlighted);
|
1251 |
+
|
1252 |
+
var currentOffset = this.$results.offset().top;
|
1253 |
+
var nextTop = $highlighted.offset().top;
|
1254 |
+
var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);
|
1255 |
+
|
1256 |
+
var offsetDelta = nextTop - currentOffset;
|
1257 |
+
nextOffset -= $highlighted.outerHeight(false) * 2;
|
1258 |
+
|
1259 |
+
if (currentIndex <= 2) {
|
1260 |
+
this.$results.scrollTop(0);
|
1261 |
+
} else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {
|
1262 |
+
this.$results.scrollTop(nextOffset);
|
1263 |
+
}
|
1264 |
+
};
|
1265 |
+
|
1266 |
+
Results.prototype.template = function (result, container) {
|
1267 |
+
var template = this.options.get('templateResult');
|
1268 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1269 |
+
|
1270 |
+
var content = template(result, container);
|
1271 |
+
|
1272 |
+
if (content == null) {
|
1273 |
+
container.style.display = 'none';
|
1274 |
+
} else if (typeof content === 'string') {
|
1275 |
+
container.innerHTML = escapeMarkup(content);
|
1276 |
+
} else {
|
1277 |
+
$(container).append(content);
|
1278 |
+
}
|
1279 |
+
};
|
1280 |
+
|
1281 |
+
return Results;
|
1282 |
+
});
|
1283 |
+
|
1284 |
+
S2.define('select2/keys',[
|
1285 |
+
|
1286 |
+
], function () {
|
1287 |
+
var KEYS = {
|
1288 |
+
BACKSPACE: 8,
|
1289 |
+
TAB: 9,
|
1290 |
+
ENTER: 13,
|
1291 |
+
SHIFT: 16,
|
1292 |
+
CTRL: 17,
|
1293 |
+
ALT: 18,
|
1294 |
+
ESC: 27,
|
1295 |
+
SPACE: 32,
|
1296 |
+
PAGE_UP: 33,
|
1297 |
+
PAGE_DOWN: 34,
|
1298 |
+
END: 35,
|
1299 |
+
HOME: 36,
|
1300 |
+
LEFT: 37,
|
1301 |
+
UP: 38,
|
1302 |
+
RIGHT: 39,
|
1303 |
+
DOWN: 40,
|
1304 |
+
DELETE: 46
|
1305 |
+
};
|
1306 |
+
|
1307 |
+
return KEYS;
|
1308 |
+
});
|
1309 |
+
|
1310 |
+
S2.define('select2/selection/base',[
|
1311 |
+
'jquery',
|
1312 |
+
'../utils',
|
1313 |
+
'../keys'
|
1314 |
+
], function ($, Utils, KEYS) {
|
1315 |
+
function BaseSelection ($element, options) {
|
1316 |
+
this.$element = $element;
|
1317 |
+
this.options = options;
|
1318 |
+
|
1319 |
+
BaseSelection.__super__.constructor.call(this);
|
1320 |
+
}
|
1321 |
+
|
1322 |
+
Utils.Extend(BaseSelection, Utils.Observable);
|
1323 |
+
|
1324 |
+
BaseSelection.prototype.render = function () {
|
1325 |
+
var $selection = $(
|
1326 |
+
'<span class="select2-selection" role="combobox" ' +
|
1327 |
+
' aria-haspopup="true" aria-expanded="false">' +
|
1328 |
+
'</span>'
|
1329 |
+
);
|
1330 |
+
|
1331 |
+
this._tabindex = 0;
|
1332 |
+
|
1333 |
+
if (this.$element.data('old-tabindex') != null) {
|
1334 |
+
this._tabindex = this.$element.data('old-tabindex');
|
1335 |
+
} else if (this.$element.attr('tabindex') != null) {
|
1336 |
+
this._tabindex = this.$element.attr('tabindex');
|
1337 |
+
}
|
1338 |
+
|
1339 |
+
$selection.attr('title', this.$element.attr('title'));
|
1340 |
+
$selection.attr('tabindex', this._tabindex);
|
1341 |
+
|
1342 |
+
this.$selection = $selection;
|
1343 |
+
|
1344 |
+
return $selection;
|
1345 |
+
};
|
1346 |
+
|
1347 |
+
BaseSelection.prototype.bind = function (container, $container) {
|
1348 |
+
var self = this;
|
1349 |
+
|
1350 |
+
var id = container.id + '-container';
|
1351 |
+
var resultsId = container.id + '-results';
|
1352 |
+
|
1353 |
+
this.container = container;
|
1354 |
+
|
1355 |
+
this.$selection.on('focus', function (evt) {
|
1356 |
+
self.trigger('focus', evt);
|
1357 |
+
});
|
1358 |
+
|
1359 |
+
this.$selection.on('blur', function (evt) {
|
1360 |
+
self._handleBlur(evt);
|
1361 |
+
});
|
1362 |
+
|
1363 |
+
this.$selection.on('keydown', function (evt) {
|
1364 |
+
self.trigger('keypress', evt);
|
1365 |
+
|
1366 |
+
if (evt.which === KEYS.SPACE) {
|
1367 |
+
evt.preventDefault();
|
1368 |
+
}
|
1369 |
+
});
|
1370 |
+
|
1371 |
+
container.on('results:focus', function (params) {
|
1372 |
+
self.$selection.attr('aria-activedescendant', params.data._resultId);
|
1373 |
+
});
|
1374 |
+
|
1375 |
+
container.on('selection:update', function (params) {
|
1376 |
+
self.update(params.data);
|
1377 |
+
});
|
1378 |
+
|
1379 |
+
container.on('open', function () {
|
1380 |
+
// When the dropdown is open, aria-expanded="true"
|
1381 |
+
self.$selection.attr('aria-expanded', 'true');
|
1382 |
+
self.$selection.attr('aria-owns', resultsId);
|
1383 |
+
|
1384 |
+
self._attachCloseHandler(container);
|
1385 |
+
});
|
1386 |
+
|
1387 |
+
container.on('close', function () {
|
1388 |
+
// When the dropdown is closed, aria-expanded="false"
|
1389 |
+
self.$selection.attr('aria-expanded', 'false');
|
1390 |
+
self.$selection.removeAttr('aria-activedescendant');
|
1391 |
+
self.$selection.removeAttr('aria-owns');
|
1392 |
+
|
1393 |
+
self.$selection.focus();
|
1394 |
+
|
1395 |
+
self._detachCloseHandler(container);
|
1396 |
+
});
|
1397 |
+
|
1398 |
+
container.on('enable', function () {
|
1399 |
+
self.$selection.attr('tabindex', self._tabindex);
|
1400 |
+
});
|
1401 |
+
|
1402 |
+
container.on('disable', function () {
|
1403 |
+
self.$selection.attr('tabindex', '-1');
|
1404 |
+
});
|
1405 |
+
};
|
1406 |
+
|
1407 |
+
BaseSelection.prototype._handleBlur = function (evt) {
|
1408 |
+
var self = this;
|
1409 |
+
|
1410 |
+
// This needs to be delayed as the active element is the body when the tab
|
1411 |
+
// key is pressed, possibly along with others.
|
1412 |
+
window.setTimeout(function () {
|
1413 |
+
// Don't trigger `blur` if the focus is still in the selection
|
1414 |
+
if (
|
1415 |
+
(document.activeElement == self.$selection[0]) ||
|
1416 |
+
($.contains(self.$selection[0], document.activeElement))
|
1417 |
+
) {
|
1418 |
+
return;
|
1419 |
+
}
|
1420 |
+
|
1421 |
+
self.trigger('blur', evt);
|
1422 |
+
}, 1);
|
1423 |
+
};
|
1424 |
+
|
1425 |
+
BaseSelection.prototype._attachCloseHandler = function (container) {
|
1426 |
+
var self = this;
|
1427 |
+
|
1428 |
+
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
1429 |
+
var $target = $(e.target);
|
1430 |
+
|
1431 |
+
var $select = $target.closest('.select2');
|
1432 |
+
|
1433 |
+
var $all = $('.select2.select2-container--open');
|
1434 |
+
|
1435 |
+
$all.each(function () {
|
1436 |
+
var $this = $(this);
|
1437 |
+
|
1438 |
+
if (this == $select[0]) {
|
1439 |
+
return;
|
1440 |
+
}
|
1441 |
+
|
1442 |
+
var $element = $this.data('element');
|
1443 |
+
|
1444 |
+
$element.select2('close');
|
1445 |
+
});
|
1446 |
+
});
|
1447 |
+
};
|
1448 |
+
|
1449 |
+
BaseSelection.prototype._detachCloseHandler = function (container) {
|
1450 |
+
$(document.body).off('mousedown.select2.' + container.id);
|
1451 |
+
};
|
1452 |
+
|
1453 |
+
BaseSelection.prototype.position = function ($selection, $container) {
|
1454 |
+
var $selectionContainer = $container.find('.selection');
|
1455 |
+
$selectionContainer.append($selection);
|
1456 |
+
};
|
1457 |
+
|
1458 |
+
BaseSelection.prototype.destroy = function () {
|
1459 |
+
this._detachCloseHandler(this.container);
|
1460 |
+
};
|
1461 |
+
|
1462 |
+
BaseSelection.prototype.update = function (data) {
|
1463 |
+
throw new Error('The `update` method must be defined in child classes.');
|
1464 |
+
};
|
1465 |
+
|
1466 |
+
return BaseSelection;
|
1467 |
+
});
|
1468 |
+
|
1469 |
+
S2.define('select2/selection/single',[
|
1470 |
+
'jquery',
|
1471 |
+
'./base',
|
1472 |
+
'../utils',
|
1473 |
+
'../keys'
|
1474 |
+
], function ($, BaseSelection, Utils, KEYS) {
|
1475 |
+
function SingleSelection () {
|
1476 |
+
SingleSelection.__super__.constructor.apply(this, arguments);
|
1477 |
+
}
|
1478 |
+
|
1479 |
+
Utils.Extend(SingleSelection, BaseSelection);
|
1480 |
+
|
1481 |
+
SingleSelection.prototype.render = function () {
|
1482 |
+
var $selection = SingleSelection.__super__.render.call(this);
|
1483 |
+
|
1484 |
+
$selection.addClass('select2-selection--single');
|
1485 |
+
|
1486 |
+
$selection.html(
|
1487 |
+
'<span class="select2-selection__rendered"></span>' +
|
1488 |
+
'<span class="select2-selection__arrow" role="presentation">' +
|
1489 |
+
'<b role="presentation"></b>' +
|
1490 |
+
'</span>'
|
1491 |
+
);
|
1492 |
+
|
1493 |
+
return $selection;
|
1494 |
+
};
|
1495 |
+
|
1496 |
+
SingleSelection.prototype.bind = function (container, $container) {
|
1497 |
+
var self = this;
|
1498 |
+
|
1499 |
+
SingleSelection.__super__.bind.apply(this, arguments);
|
1500 |
+
|
1501 |
+
var id = container.id + '-container';
|
1502 |
+
|
1503 |
+
this.$selection.find('.select2-selection__rendered').attr('id', id);
|
1504 |
+
this.$selection.attr('aria-labelledby', id);
|
1505 |
+
|
1506 |
+
this.$selection.on('mousedown', function (evt) {
|
1507 |
+
// Only respond to left clicks
|
1508 |
+
if (evt.which !== 1) {
|
1509 |
+
return;
|
1510 |
+
}
|
1511 |
+
|
1512 |
+
self.trigger('toggle', {
|
1513 |
+
originalEvent: evt
|
1514 |
+
});
|
1515 |
+
});
|
1516 |
+
|
1517 |
+
this.$selection.on('focus', function (evt) {
|
1518 |
+
// User focuses on the container
|
1519 |
+
});
|
1520 |
+
|
1521 |
+
this.$selection.on('blur', function (evt) {
|
1522 |
+
// User exits the container
|
1523 |
+
});
|
1524 |
+
|
1525 |
+
container.on('focus', function (evt) {
|
1526 |
+
if (!container.isOpen()) {
|
1527 |
+
self.$selection.focus();
|
1528 |
+
}
|
1529 |
+
});
|
1530 |
+
|
1531 |
+
container.on('selection:update', function (params) {
|
1532 |
+
self.update(params.data);
|
1533 |
+
});
|
1534 |
+
};
|
1535 |
+
|
1536 |
+
SingleSelection.prototype.clear = function () {
|
1537 |
+
this.$selection.find('.select2-selection__rendered').empty();
|
1538 |
+
};
|
1539 |
+
|
1540 |
+
SingleSelection.prototype.display = function (data, container) {
|
1541 |
+
var template = this.options.get('templateSelection');
|
1542 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1543 |
+
|
1544 |
+
return escapeMarkup(template(data, container));
|
1545 |
+
};
|
1546 |
+
|
1547 |
+
SingleSelection.prototype.selectionContainer = function () {
|
1548 |
+
return $('<span></span>');
|
1549 |
+
};
|
1550 |
+
|
1551 |
+
SingleSelection.prototype.update = function (data) {
|
1552 |
+
if (data.length === 0) {
|
1553 |
+
this.clear();
|
1554 |
+
return;
|
1555 |
+
}
|
1556 |
+
|
1557 |
+
var selection = data[0];
|
1558 |
+
|
1559 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1560 |
+
var formatted = this.display(selection, $rendered);
|
1561 |
+
|
1562 |
+
$rendered.empty().append(formatted);
|
1563 |
+
$rendered.prop('title', selection.title || selection.text);
|
1564 |
+
};
|
1565 |
+
|
1566 |
+
return SingleSelection;
|
1567 |
+
});
|
1568 |
+
|
1569 |
+
S2.define('select2/selection/multiple',[
|
1570 |
+
'jquery',
|
1571 |
+
'./base',
|
1572 |
+
'../utils'
|
1573 |
+
], function ($, BaseSelection, Utils) {
|
1574 |
+
function MultipleSelection ($element, options) {
|
1575 |
+
MultipleSelection.__super__.constructor.apply(this, arguments);
|
1576 |
+
}
|
1577 |
+
|
1578 |
+
Utils.Extend(MultipleSelection, BaseSelection);
|
1579 |
+
|
1580 |
+
MultipleSelection.prototype.render = function () {
|
1581 |
+
var $selection = MultipleSelection.__super__.render.call(this);
|
1582 |
+
|
1583 |
+
$selection.addClass('select2-selection--multiple');
|
1584 |
+
|
1585 |
+
$selection.html(
|
1586 |
+
'<ul class="select2-selection__rendered"></ul>'
|
1587 |
+
);
|
1588 |
+
|
1589 |
+
return $selection;
|
1590 |
+
};
|
1591 |
+
|
1592 |
+
MultipleSelection.prototype.bind = function (container, $container) {
|
1593 |
+
var self = this;
|
1594 |
+
|
1595 |
+
MultipleSelection.__super__.bind.apply(this, arguments);
|
1596 |
+
|
1597 |
+
this.$selection.on('click', function (evt) {
|
1598 |
+
self.trigger('toggle', {
|
1599 |
+
originalEvent: evt
|
1600 |
+
});
|
1601 |
+
});
|
1602 |
+
|
1603 |
+
this.$selection.on(
|
1604 |
+
'click',
|
1605 |
+
'.select2-selection__choice__remove',
|
1606 |
+
function (evt) {
|
1607 |
+
// Ignore the event if it is disabled
|
1608 |
+
if (self.options.get('disabled')) {
|
1609 |
+
return;
|
1610 |
+
}
|
1611 |
+
|
1612 |
+
var $remove = $(this);
|
1613 |
+
var $selection = $remove.parent();
|
1614 |
+
|
1615 |
+
var data = $selection.data('data');
|
1616 |
+
|
1617 |
+
self.trigger('unselect', {
|
1618 |
+
originalEvent: evt,
|
1619 |
+
data: data
|
1620 |
+
});
|
1621 |
+
}
|
1622 |
+
);
|
1623 |
+
};
|
1624 |
+
|
1625 |
+
MultipleSelection.prototype.clear = function () {
|
1626 |
+
this.$selection.find('.select2-selection__rendered').empty();
|
1627 |
+
};
|
1628 |
+
|
1629 |
+
MultipleSelection.prototype.display = function (data, container) {
|
1630 |
+
var template = this.options.get('templateSelection');
|
1631 |
+
var escapeMarkup = this.options.get('escapeMarkup');
|
1632 |
+
|
1633 |
+
return escapeMarkup(template(data, container));
|
1634 |
+
};
|
1635 |
+
|
1636 |
+
MultipleSelection.prototype.selectionContainer = function () {
|
1637 |
+
var $container = $(
|
1638 |
+
'<li class="select2-selection__choice">' +
|
1639 |
+
'<span class="select2-selection__choice__remove" role="presentation">' +
|
1640 |
+
'×' +
|
1641 |
+
'</span>' +
|
1642 |
+
'</li>'
|
1643 |
+
);
|
1644 |
+
|
1645 |
+
return $container;
|
1646 |
+
};
|
1647 |
+
|
1648 |
+
MultipleSelection.prototype.update = function (data) {
|
1649 |
+
this.clear();
|
1650 |
+
|
1651 |
+
if (data.length === 0) {
|
1652 |
+
return;
|
1653 |
+
}
|
1654 |
+
|
1655 |
+
var $selections = [];
|
1656 |
+
|
1657 |
+
for (var d = 0; d < data.length; d++) {
|
1658 |
+
var selection = data[d];
|
1659 |
+
|
1660 |
+
var $selection = this.selectionContainer();
|
1661 |
+
var formatted = this.display(selection, $selection);
|
1662 |
+
|
1663 |
+
$selection.append(formatted);
|
1664 |
+
$selection.prop('title', selection.title || selection.text);
|
1665 |
+
|
1666 |
+
$selection.data('data', selection);
|
1667 |
+
|
1668 |
+
$selections.push($selection);
|
1669 |
+
}
|
1670 |
+
|
1671 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1672 |
+
|
1673 |
+
Utils.appendMany($rendered, $selections);
|
1674 |
+
};
|
1675 |
+
|
1676 |
+
return MultipleSelection;
|
1677 |
+
});
|
1678 |
+
|
1679 |
+
S2.define('select2/selection/placeholder',[
|
1680 |
+
'../utils'
|
1681 |
+
], function (Utils) {
|
1682 |
+
function Placeholder (decorated, $element, options) {
|
1683 |
+
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
|
1684 |
+
|
1685 |
+
decorated.call(this, $element, options);
|
1686 |
+
}
|
1687 |
+
|
1688 |
+
Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {
|
1689 |
+
if (typeof placeholder === 'string') {
|
1690 |
+
placeholder = {
|
1691 |
+
id: '',
|
1692 |
+
text: placeholder
|
1693 |
+
};
|
1694 |
+
}
|
1695 |
+
|
1696 |
+
return placeholder;
|
1697 |
+
};
|
1698 |
+
|
1699 |
+
Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {
|
1700 |
+
var $placeholder = this.selectionContainer();
|
1701 |
+
|
1702 |
+
$placeholder.html(this.display(placeholder));
|
1703 |
+
$placeholder.addClass('select2-selection__placeholder')
|
1704 |
+
.removeClass('select2-selection__choice');
|
1705 |
+
|
1706 |
+
return $placeholder;
|
1707 |
+
};
|
1708 |
+
|
1709 |
+
Placeholder.prototype.update = function (decorated, data) {
|
1710 |
+
var singlePlaceholder = (
|
1711 |
+
data.length == 1 && data[0].id != this.placeholder.id
|
1712 |
+
);
|
1713 |
+
var multipleSelections = data.length > 1;
|
1714 |
+
|
1715 |
+
if (multipleSelections || singlePlaceholder) {
|
1716 |
+
return decorated.call(this, data);
|
1717 |
+
}
|
1718 |
+
|
1719 |
+
this.clear();
|
1720 |
+
|
1721 |
+
var $placeholder = this.createPlaceholder(this.placeholder);
|
1722 |
+
|
1723 |
+
this.$selection.find('.select2-selection__rendered').append($placeholder);
|
1724 |
+
};
|
1725 |
+
|
1726 |
+
return Placeholder;
|
1727 |
+
});
|
1728 |
+
|
1729 |
+
S2.define('select2/selection/allowClear',[
|
1730 |
+
'jquery',
|
1731 |
+
'../keys'
|
1732 |
+
], function ($, KEYS) {
|
1733 |
+
function AllowClear () { }
|
1734 |
+
|
1735 |
+
AllowClear.prototype.bind = function (decorated, container, $container) {
|
1736 |
+
var self = this;
|
1737 |
+
|
1738 |
+
decorated.call(this, container, $container);
|
1739 |
+
|
1740 |
+
if (this.placeholder == null) {
|
1741 |
+
if (this.options.get('debug') && window.console && console.error) {
|
1742 |
+
console.error(
|
1743 |
+
'Select2: The `allowClear` option should be used in combination ' +
|
1744 |
+
'with the `placeholder` option.'
|
1745 |
+
);
|
1746 |
+
}
|
1747 |
+
}
|
1748 |
+
|
1749 |
+
this.$selection.on('mousedown', '.select2-selection__clear',
|
1750 |
+
function (evt) {
|
1751 |
+
self._handleClear(evt);
|
1752 |
+
});
|
1753 |
+
|
1754 |
+
container.on('keypress', function (evt) {
|
1755 |
+
self._handleKeyboardClear(evt, container);
|
1756 |
+
});
|
1757 |
+
};
|
1758 |
+
|
1759 |
+
AllowClear.prototype._handleClear = function (_, evt) {
|
1760 |
+
// Ignore the event if it is disabled
|
1761 |
+
if (this.options.get('disabled')) {
|
1762 |
+
return;
|
1763 |
+
}
|
1764 |
+
|
1765 |
+
var $clear = this.$selection.find('.select2-selection__clear');
|
1766 |
+
|
1767 |
+
// Ignore the event if nothing has been selected
|
1768 |
+
if ($clear.length === 0) {
|
1769 |
+
return;
|
1770 |
+
}
|
1771 |
+
|
1772 |
+
evt.stopPropagation();
|
1773 |
+
|
1774 |
+
var data = $clear.data('data');
|
1775 |
+
|
1776 |
+
for (var d = 0; d < data.length; d++) {
|
1777 |
+
var unselectData = {
|
1778 |
+
data: data[d]
|
1779 |
+
};
|
1780 |
+
|
1781 |
+
// Trigger the `unselect` event, so people can prevent it from being
|
1782 |
+
// cleared.
|
1783 |
+
this.trigger('unselect', unselectData);
|
1784 |
+
|
1785 |
+
// If the event was prevented, don't clear it out.
|
1786 |
+
if (unselectData.prevented) {
|
1787 |
+
return;
|
1788 |
+
}
|
1789 |
+
}
|
1790 |
+
|
1791 |
+
this.$element.val(this.placeholder.id).trigger('change');
|
1792 |
+
|
1793 |
+
this.trigger('toggle', {});
|
1794 |
+
};
|
1795 |
+
|
1796 |
+
AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {
|
1797 |
+
if (container.isOpen()) {
|
1798 |
+
return;
|
1799 |
+
}
|
1800 |
+
|
1801 |
+
if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {
|
1802 |
+
this._handleClear(evt);
|
1803 |
+
}
|
1804 |
+
};
|
1805 |
+
|
1806 |
+
AllowClear.prototype.update = function (decorated, data) {
|
1807 |
+
decorated.call(this, data);
|
1808 |
+
|
1809 |
+
if (this.$selection.find('.select2-selection__placeholder').length > 0 ||
|
1810 |
+
data.length === 0) {
|
1811 |
+
return;
|
1812 |
+
}
|
1813 |
+
|
1814 |
+
var $remove = $(
|
1815 |
+
'<span class="select2-selection__clear">' +
|
1816 |
+
'×' +
|
1817 |
+
'</span>'
|
1818 |
+
);
|
1819 |
+
$remove.data('data', data);
|
1820 |
+
|
1821 |
+
this.$selection.find('.select2-selection__rendered').prepend($remove);
|
1822 |
+
};
|
1823 |
+
|
1824 |
+
return AllowClear;
|
1825 |
+
});
|
1826 |
+
|
1827 |
+
S2.define('select2/selection/search',[
|
1828 |
+
'jquery',
|
1829 |
+
'../utils',
|
1830 |
+
'../keys'
|
1831 |
+
], function ($, Utils, KEYS) {
|
1832 |
+
function Search (decorated, $element, options) {
|
1833 |
+
decorated.call(this, $element, options);
|
1834 |
+
}
|
1835 |
+
|
1836 |
+
Search.prototype.render = function (decorated) {
|
1837 |
+
var $search = $(
|
1838 |
+
'<li class="select2-search select2-search--inline">' +
|
1839 |
+
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
1840 |
+
' autocomplete="off" autocorrect="off" autocapitalize="off"' +
|
1841 |
+
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
|
1842 |
+
'</li>'
|
1843 |
+
);
|
1844 |
+
|
1845 |
+
this.$searchContainer = $search;
|
1846 |
+
this.$search = $search.find('input');
|
1847 |
+
|
1848 |
+
var $rendered = decorated.call(this);
|
1849 |
+
|
1850 |
+
this._transferTabIndex();
|
1851 |
+
|
1852 |
+
return $rendered;
|
1853 |
+
};
|
1854 |
+
|
1855 |
+
Search.prototype.bind = function (decorated, container, $container) {
|
1856 |
+
var self = this;
|
1857 |
+
|
1858 |
+
decorated.call(this, container, $container);
|
1859 |
+
|
1860 |
+
container.on('open', function () {
|
1861 |
+
self.$search.trigger('focus');
|
1862 |
+
});
|
1863 |
+
|
1864 |
+
container.on('close', function () {
|
1865 |
+
self.$search.val('');
|
1866 |
+
self.$search.removeAttr('aria-activedescendant');
|
1867 |
+
self.$search.trigger('focus');
|
1868 |
+
});
|
1869 |
+
|
1870 |
+
container.on('enable', function () {
|
1871 |
+
self.$search.prop('disabled', false);
|
1872 |
+
|
1873 |
+
self._transferTabIndex();
|
1874 |
+
});
|
1875 |
+
|
1876 |
+
container.on('disable', function () {
|
1877 |
+
self.$search.prop('disabled', true);
|
1878 |
+
});
|
1879 |
+
|
1880 |
+
container.on('focus', function (evt) {
|
1881 |
+
self.$search.trigger('focus');
|
1882 |
+
});
|
1883 |
+
|
1884 |
+
container.on('results:focus', function (params) {
|
1885 |
+
self.$search.attr('aria-activedescendant', params.id);
|
1886 |
+
});
|
1887 |
+
|
1888 |
+
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
1889 |
+
self.trigger('focus', evt);
|
1890 |
+
});
|
1891 |
+
|
1892 |
+
this.$selection.on('focusout', '.select2-search--inline', function (evt) {
|
1893 |
+
self._handleBlur(evt);
|
1894 |
+
});
|
1895 |
+
|
1896 |
+
this.$selection.on('keydown', '.select2-search--inline', function (evt) {
|
1897 |
+
evt.stopPropagation();
|
1898 |
+
|
1899 |
+
self.trigger('keypress', evt);
|
1900 |
+
|
1901 |
+
self._keyUpPrevented = evt.isDefaultPrevented();
|
1902 |
+
|
1903 |
+
var key = evt.which;
|
1904 |
+
|
1905 |
+
if (key === KEYS.BACKSPACE && self.$search.val() === '') {
|
1906 |
+
var $previousChoice = self.$searchContainer
|
1907 |
+
.prev('.select2-selection__choice');
|
1908 |
+
|
1909 |
+
if ($previousChoice.length > 0) {
|
1910 |
+
var item = $previousChoice.data('data');
|
1911 |
+
|
1912 |
+
self.searchRemoveChoice(item);
|
1913 |
+
|
1914 |
+
evt.preventDefault();
|
1915 |
+
}
|
1916 |
+
}
|
1917 |
+
});
|
1918 |
+
|
1919 |
+
// Try to detect the IE version should the `documentMode` property that
|
1920 |
+
// is stored on the document. This is only implemented in IE and is
|
1921 |
+
// slightly cleaner than doing a user agent check.
|
1922 |
+
// This property is not available in Edge, but Edge also doesn't have
|
1923 |
+
// this bug.
|
1924 |
+
var msie = document.documentMode;
|
1925 |
+
var disableInputEvents = msie && msie <= 11;
|
1926 |
+
|
1927 |
+
// Workaround for browsers which do not support the `input` event
|
1928 |
+
// This will prevent double-triggering of events for browsers which support
|
1929 |
+
// both the `keyup` and `input` events.
|
1930 |
+
this.$selection.on(
|
1931 |
+
'input.searchcheck',
|
1932 |
+
'.select2-search--inline',
|
1933 |
+
function (evt) {
|
1934 |
+
// IE will trigger the `input` event when a placeholder is used on a
|
1935 |
+
// search box. To get around this issue, we are forced to ignore all
|
1936 |
+
// `input` events in IE and keep using `keyup`.
|
1937 |
+
if (disableInputEvents) {
|
1938 |
+
self.$selection.off('input.search input.searchcheck');
|
1939 |
+
return;
|
1940 |
+
}
|
1941 |
+
|
1942 |
+
// Unbind the duplicated `keyup` event
|
1943 |
+
self.$selection.off('keyup.search');
|
1944 |
+
}
|
1945 |
+
);
|
1946 |
+
|
1947 |
+
this.$selection.on(
|
1948 |
+
'keyup.search input.search',
|
1949 |
+
'.select2-search--inline',
|
1950 |
+
function (evt) {
|
1951 |
+
// IE will trigger the `input` event when a placeholder is used on a
|
1952 |
+
// search box. To get around this issue, we are forced to ignore all
|
1953 |
+
// `input` events in IE and keep using `keyup`.
|
1954 |
+
if (disableInputEvents && evt.type === 'input') {
|
1955 |
+
self.$selection.off('input.search input.searchcheck');
|
1956 |
+
return;
|
1957 |
+
}
|
1958 |
+
|
1959 |
+
var key = evt.which;
|
1960 |
+
|
1961 |
+
// We can freely ignore events from modifier keys
|
1962 |
+
if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {
|
1963 |
+
return;
|
1964 |
+
}
|
1965 |
+
|
1966 |
+
// Tabbing will be handled during the `keydown` phase
|
1967 |
+
if (key == KEYS.TAB) {
|
1968 |
+
return;
|
1969 |
+
}
|
1970 |
+
|
1971 |
+
self.handleSearch(evt);
|
1972 |
+
}
|
1973 |
+
);
|
1974 |
+
};
|
1975 |
+
|
1976 |
+
/**
|
1977 |
+
* This method will transfer the tabindex attribute from the rendered
|
1978 |
+
* selection to the search box. This allows for the search box to be used as
|
1979 |
+
* the primary focus instead of the selection container.
|
1980 |
+
*
|
1981 |
+
* @private
|
1982 |
+
*/
|
1983 |
+
Search.prototype._transferTabIndex = function (decorated) {
|
1984 |
+
this.$search.attr('tabindex', this.$selection.attr('tabindex'));
|
1985 |
+
this.$selection.attr('tabindex', '-1');
|
1986 |
+
};
|
1987 |
+
|
1988 |
+
Search.prototype.createPlaceholder = function (decorated, placeholder) {
|
1989 |
+
this.$search.attr('placeholder', placeholder.text);
|
1990 |
+
};
|
1991 |
+
|
1992 |
+
Search.prototype.update = function (decorated, data) {
|
1993 |
+
var searchHadFocus = this.$search[0] == document.activeElement;
|
1994 |
+
|
1995 |
+
this.$search.attr('placeholder', '');
|
1996 |
+
|
1997 |
+
decorated.call(this, data);
|
1998 |
+
|
1999 |
+
this.$selection.find('.select2-selection__rendered')
|
2000 |
+
.append(this.$searchContainer);
|
2001 |
+
|
2002 |
+
this.resizeSearch();
|
2003 |
+
if (searchHadFocus) {
|
2004 |
+
this.$search.focus();
|
2005 |
+
}
|
2006 |
+
};
|
2007 |
+
|
2008 |
+
Search.prototype.handleSearch = function () {
|
2009 |
+
this.resizeSearch();
|
2010 |
+
|
2011 |
+
if (!this._keyUpPrevented) {
|
2012 |
+
var input = this.$search.val();
|
2013 |
+
|
2014 |
+
this.trigger('query', {
|
2015 |
+
term: input
|
2016 |
+
});
|
2017 |
+
}
|
2018 |
+
|
2019 |
+
this._keyUpPrevented = false;
|
2020 |
+
};
|
2021 |
+
|
2022 |
+
Search.prototype.searchRemoveChoice = function (decorated, item) {
|
2023 |
+
this.trigger('unselect', {
|
2024 |
+
data: item
|
2025 |
+
});
|
2026 |
+
|
2027 |
+
this.$search.val(item.text);
|
2028 |
+
this.handleSearch();
|
2029 |
+
};
|
2030 |
+
|
2031 |
+
Search.prototype.resizeSearch = function () {
|
2032 |
+
this.$search.css('width', '25px');
|
2033 |
+
|
2034 |
+
var width = '';
|
2035 |
+
|
2036 |
+
if (this.$search.attr('placeholder') !== '') {
|
2037 |
+
width = this.$selection.find('.select2-selection__rendered').innerWidth();
|
2038 |
+
} else {
|
2039 |
+
var minimumWidth = this.$search.val().length + 1;
|
2040 |
+
|
2041 |
+
width = (minimumWidth * 0.75) + 'em';
|
2042 |
+
}
|
2043 |
+
|
2044 |
+
this.$search.css('width', width);
|
2045 |
+
};
|
2046 |
+
|
2047 |
+
return Search;
|
2048 |
+
});
|
2049 |
+
|
2050 |
+
S2.define('select2/selection/eventRelay',[
|
2051 |
+
'jquery'
|
2052 |
+
], function ($) {
|
2053 |
+
function EventRelay () { }
|
2054 |
+
|
2055 |
+
EventRelay.prototype.bind = function (decorated, container, $container) {
|
2056 |
+
var self = this;
|
2057 |
+
var relayEvents = [
|
2058 |
+
'open', 'opening',
|
2059 |
+
'close', 'closing',
|
2060 |
+
'select', 'selecting',
|
2061 |
+
'unselect', 'unselecting'
|
2062 |
+
];
|
2063 |
+
|
2064 |
+
var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];
|
2065 |
+
|
2066 |
+
decorated.call(this, container, $container);
|
2067 |
+
|
2068 |
+
container.on('*', function (name, params) {
|
2069 |
+
// Ignore events that should not be relayed
|
2070 |
+
if ($.inArray(name, relayEvents) === -1) {
|
2071 |
+
return;
|
2072 |
+
}
|
2073 |
+
|
2074 |
+
// The parameters should always be an object
|
2075 |
+
params = params || {};
|
2076 |
+
|
2077 |
+
// Generate the jQuery event for the Select2 event
|
2078 |
+
var evt = $.Event('select2:' + name, {
|
2079 |
+
params: params
|
2080 |
+
});
|
2081 |
+
|
2082 |
+
self.$element.trigger(evt);
|
2083 |
+
|
2084 |
+
// Only handle preventable events if it was one
|
2085 |
+
if ($.inArray(name, preventableEvents) === -1) {
|
2086 |
+
return;
|
2087 |
+
}
|
2088 |
+
|
2089 |
+
params.prevented = evt.isDefaultPrevented();
|
2090 |
+
});
|
2091 |
+
};
|
2092 |
+
|
2093 |
+
return EventRelay;
|
2094 |
+
});
|
2095 |
+
|
2096 |
+
S2.define('select2/translation',[
|
2097 |
+
'jquery',
|
2098 |
+
'require'
|
2099 |
+
], function ($, require) {
|
2100 |
+
function Translation (dict) {
|
2101 |
+
this.dict = dict || {};
|
2102 |
+
}
|
2103 |
+
|
2104 |
+
Translation.prototype.all = function () {
|
2105 |
+
return this.dict;
|
2106 |
+
};
|
2107 |
+
|
2108 |
+
Translation.prototype.get = function (key) {
|
2109 |
+
return this.dict[key];
|
2110 |
+
};
|
2111 |
+
|
2112 |
+
Translation.prototype.extend = function (translation) {
|
2113 |
+
this.dict = $.extend({}, translation.all(), this.dict);
|
2114 |
+
};
|
2115 |
+
|
2116 |
+
// Static functions
|
2117 |
+
|
2118 |
+
Translation._cache = {};
|
2119 |
+
|
2120 |
+
Translation.loadPath = function (path) {
|
2121 |
+
if (!(path in Translation._cache)) {
|
2122 |
+
var translations = require(path);
|
2123 |
+
|
2124 |
+
Translation._cache[path] = translations;
|
2125 |
+
}
|
2126 |
+
|
2127 |
+
return new Translation(Translation._cache[path]);
|
2128 |
+
};
|
2129 |
+
|
2130 |
+
return Translation;
|
2131 |
+
});
|
2132 |
+
|
2133 |
+
S2.define('select2/diacritics',[
|
2134 |
+
|
2135 |
+
], function () {
|
2136 |
+
var diacritics = {
|
2137 |
+
'\u24B6': 'A',
|
2138 |
+
'\uFF21': 'A',
|
2139 |
+
'\u00C0': 'A',
|
2140 |
+
'\u00C1': 'A',
|
2141 |
+
'\u00C2': 'A',
|
2142 |
+
'\u1EA6': 'A',
|
2143 |
+
'\u1EA4': 'A',
|
2144 |
+
'\u1EAA': 'A',
|
2145 |
+
'\u1EA8': 'A',
|
2146 |
+
'\u00C3': 'A',
|
2147 |
+
'\u0100': 'A',
|
2148 |
+
'\u0102': 'A',
|
2149 |
+
'\u1EB0': 'A',
|
2150 |
+
'\u1EAE': 'A',
|
2151 |
+
'\u1EB4': 'A',
|
2152 |
+
'\u1EB2': 'A',
|
2153 |
+
'\u0226': 'A',
|
2154 |
+
'\u01E0': 'A',
|
2155 |
+
'\u00C4': 'A',
|
2156 |
+
'\u01DE': 'A',
|
2157 |
+
'\u1EA2': 'A',
|
2158 |
+
'\u00C5': 'A',
|
2159 |
+
'\u01FA': 'A',
|
2160 |
+
'\u01CD': 'A',
|
2161 |
+
'\u0200': 'A',
|
2162 |
+
'\u0202': 'A',
|
2163 |
+
'\u1EA0': 'A',
|
2164 |
+
'\u1EAC': 'A',
|
2165 |
+
'\u1EB6': 'A',
|
2166 |
+
'\u1E00': 'A',
|
2167 |
+
'\u0104': 'A',
|
2168 |
+
'\u023A': 'A',
|
2169 |
+
'\u2C6F': 'A',
|
2170 |
+
'\uA732': 'AA',
|
2171 |
+
'\u00C6': 'AE',
|
2172 |
+
'\u01FC': 'AE',
|
2173 |
+
'\u01E2': 'AE',
|
2174 |
+
'\uA734': 'AO',
|
2175 |
+
'\uA736': 'AU',
|
2176 |
+
'\uA738': 'AV',
|
2177 |
+
'\uA73A': 'AV',
|
2178 |
+
'\uA73C': 'AY',
|
2179 |
+
'\u24B7': 'B',
|
2180 |
+
'\uFF22': 'B',
|
2181 |
+
'\u1E02': 'B',
|
2182 |
+
'\u1E04': 'B',
|
2183 |
+
'\u1E06': 'B',
|
2184 |
+
'\u0243': 'B',
|
2185 |
+
'\u0182': 'B',
|
2186 |
+
'\u0181': 'B',
|
2187 |
+
'\u24B8': 'C',
|
2188 |
+
'\uFF23': 'C',
|
2189 |
+
'\u0106': 'C',
|
2190 |
+
'\u0108': 'C',
|
2191 |
+
'\u010A': 'C',
|
2192 |
+
'\u010C': 'C',
|
2193 |
+
'\u00C7': 'C',
|
2194 |
+
'\u1E08': 'C',
|
2195 |
+
'\u0187': 'C',
|
2196 |
+
'\u023B': 'C',
|
2197 |
+
'\uA73E': 'C',
|
2198 |
+
'\u24B9': 'D',
|
2199 |
+
'\uFF24': 'D',
|
2200 |
+
'\u1E0A': 'D',
|
2201 |
+
'\u010E': 'D',
|
2202 |
+
'\u1E0C': 'D',
|
2203 |
+
'\u1E10': 'D',
|
2204 |
+
'\u1E12': 'D',
|
2205 |
+
'\u1E0E': 'D',
|
2206 |
+
'\u0110': 'D',
|
2207 |
+
'\u018B': 'D',
|
2208 |
+
'\u018A': 'D',
|
2209 |
+
'\u0189': 'D',
|
2210 |
+
'\uA779': 'D',
|
2211 |
+
'\u01F1': 'DZ',
|
2212 |
+
'\u01C4': 'DZ',
|
2213 |
+
'\u01F2': 'Dz',
|
2214 |
+
'\u01C5': 'Dz',
|
2215 |
+
'\u24BA': 'E',
|
2216 |
+
'\uFF25': 'E',
|
2217 |
+
'\u00C8': 'E',
|
2218 |
+
'\u00C9': 'E',
|
2219 |
+
'\u00CA': 'E',
|
2220 |
+
'\u1EC0': 'E',
|
2221 |
+
'\u1EBE': 'E',
|
2222 |
+
'\u1EC4': 'E',
|
2223 |
+
'\u1EC2': 'E',
|
2224 |
+
'\u1EBC': 'E',
|
2225 |
+
'\u0112': 'E',
|
2226 |
+
'\u1E14': 'E',
|
2227 |
+
'\u1E16': 'E',
|
2228 |
+
'\u0114': 'E',
|
2229 |
+
'\u0116': 'E',
|
2230 |
+
'\u00CB': 'E',
|
2231 |
+
'\u1EBA': 'E',
|
2232 |
+
'\u011A': 'E',
|
2233 |
+
'\u0204': 'E',
|
2234 |
+
'\u0206': 'E',
|
2235 |
+
'\u1EB8': 'E',
|
2236 |
+
'\u1EC6': 'E',
|
2237 |
+
'\u0228': 'E',
|
2238 |
+
'\u1E1C': 'E',
|
2239 |
+
'\u0118': 'E',
|
2240 |
+
'\u1E18': 'E',
|
2241 |
+
'\u1E1A': 'E',
|
2242 |
+
'\u0190': 'E',
|
2243 |
+
'\u018E': 'E',
|
2244 |
+
'\u24BB': 'F',
|
2245 |
+
'\uFF26': 'F',
|
2246 |
+
'\u1E1E': 'F',
|
2247 |
+
'\u0191': 'F',
|
2248 |
+
'\uA77B': 'F',
|
2249 |
+
'\u24BC': 'G',
|
2250 |
+
'\uFF27': 'G',
|
2251 |
+
'\u01F4': 'G',
|
2252 |
+
'\u011C': 'G',
|
2253 |
+
'\u1E20': 'G',
|
2254 |
+
'\u011E': 'G',
|
2255 |
+
'\u0120': 'G',
|
2256 |
+
'\u01E6': 'G',
|
2257 |
+
'\u0122': 'G',
|
2258 |
+
'\u01E4': 'G',
|
2259 |
+
'\u0193': 'G',
|
2260 |
+
'\uA7A0': 'G',
|
2261 |
+
'\uA77D': 'G',
|
2262 |
+
'\uA77E': 'G',
|
2263 |
+
'\u24BD': 'H',
|
2264 |
+
'\uFF28': 'H',
|
2265 |
+
'\u0124': 'H',
|
2266 |
+
'\u1E22': 'H',
|
2267 |
+
'\u1E26': 'H',
|
2268 |
+
'\u021E': 'H',
|
2269 |
+
'\u1E24': 'H',
|
2270 |
+
'\u1E28': 'H',
|
2271 |
+
'\u1E2A': 'H',
|
2272 |
+
'\u0126': 'H',
|
2273 |
+
'\u2C67': 'H',
|
2274 |
+
'\u2C75': 'H',
|
2275 |
+
'\uA78D': 'H',
|
2276 |
+
'\u24BE': 'I',
|
2277 |
+
'\uFF29': 'I',
|
2278 |
+
'\u00CC': 'I',
|
2279 |
+
'\u00CD': 'I',
|
2280 |
+
'\u00CE': 'I',
|
2281 |
+
'\u0128': 'I',
|
2282 |
+
'\u012A': 'I',
|
2283 |
+
'\u012C': 'I',
|
2284 |
+
'\u0130': 'I',
|
2285 |
+
'\u00CF': 'I',
|
2286 |
+
'\u1E2E': 'I',
|
2287 |
+
'\u1EC8': 'I',
|
2288 |
+
'\u01CF': 'I',
|
2289 |
+
'\u0208': 'I',
|
2290 |
+
'\u020A': 'I',
|
2291 |
+
'\u1ECA': 'I',
|
2292 |
+
'\u012E': 'I',
|
2293 |
+
'\u1E2C': 'I',
|
2294 |
+
'\u0197': 'I',
|
2295 |
+
'\u24BF': 'J',
|
2296 |
+
'\uFF2A': 'J',
|
2297 |
+
'\u0134': 'J',
|
2298 |
+
'\u0248': 'J',
|
2299 |
+
'\u24C0': 'K',
|
2300 |
+
'\uFF2B': 'K',
|
2301 |
+
'\u1E30': 'K',
|
2302 |
+
'\u01E8': 'K',
|
2303 |
+
'\u1E32': 'K',
|
2304 |
+
'\u0136': 'K',
|
2305 |
+
'\u1E34': 'K',
|
2306 |
+
'\u0198': 'K',
|
2307 |
+
'\u2C69': 'K',
|
2308 |
+
'\uA740': 'K',
|
2309 |
+
'\uA742': 'K',
|
2310 |
+
'\uA744': 'K',
|
2311 |
+
'\uA7A2': 'K',
|
2312 |
+
'\u24C1': 'L',
|
2313 |
+
'\uFF2C': 'L',
|
2314 |
+
'\u013F': 'L',
|
2315 |
+
'\u0139': 'L',
|
2316 |
+
'\u013D': 'L',
|
2317 |
+
'\u1E36': 'L',
|
2318 |
+
'\u1E38': 'L',
|
2319 |
+
'\u013B': 'L',
|
2320 |
+
'\u1E3C': 'L',
|
2321 |
+
'\u1E3A': 'L',
|
2322 |
+
'\u0141': 'L',
|
2323 |
+
'\u023D': 'L',
|
2324 |
+
'\u2C62': 'L',
|
2325 |
+
'\u2C60': 'L',
|
2326 |
+
'\uA748': 'L',
|
2327 |
+
'\uA746': 'L',
|
2328 |
+
'\uA780': 'L',
|
2329 |
+
'\u01C7': 'LJ',
|
2330 |
+
'\u01C8': 'Lj',
|
2331 |
+
'\u24C2': 'M',
|
2332 |
+
'\uFF2D': 'M',
|
2333 |
+
'\u1E3E': 'M',
|
2334 |
+
'\u1E40': 'M',
|
2335 |
+
'\u1E42': 'M',
|
2336 |
+
'\u2C6E': 'M',
|
2337 |
+
'\u019C': 'M',
|
2338 |
+
'\u24C3': 'N',
|
2339 |
+
'\uFF2E': 'N',
|
2340 |
+
'\u01F8': 'N',
|
2341 |
+
'\u0143': 'N',
|
2342 |
+
'\u00D1': 'N',
|
2343 |
+
'\u1E44': 'N',
|
2344 |
+
'\u0147': 'N',
|
2345 |
+
'\u1E46': 'N',
|
2346 |
+
'\u0145': 'N',
|
2347 |
+
'\u1E4A': 'N',
|
2348 |
+
'\u1E48': 'N',
|
2349 |
+
'\u0220': 'N',
|
2350 |
+
'\u019D': 'N',
|
2351 |
+
'\uA790': 'N',
|
2352 |
+
'\uA7A4': 'N',
|
2353 |
+
'\u01CA': 'NJ',
|
2354 |
+
'\u01CB': 'Nj',
|
2355 |
+
'\u24C4': 'O',
|
2356 |
+
'\uFF2F': 'O',
|
2357 |
+
'\u00D2': 'O',
|
2358 |
+
'\u00D3': 'O',
|
2359 |
+
'\u00D4': 'O',
|
2360 |
+
'\u1ED2': 'O',
|
2361 |
+
'\u1ED0': 'O',
|
2362 |
+
'\u1ED6': 'O',
|
2363 |
+
'\u1ED4': 'O',
|
2364 |
+
'\u00D5': 'O',
|
2365 |
+
'\u1E4C': 'O',
|
2366 |
+
'\u022C': 'O',
|
2367 |
+
'\u1E4E': 'O',
|
2368 |
+
'\u014C': 'O',
|
2369 |
+
'\u1E50': 'O',
|
2370 |
+
'\u1E52': 'O',
|
2371 |
+
'\u014E': 'O',
|
2372 |
+
'\u022E': 'O',
|
2373 |
+
'\u0230': 'O',
|
2374 |
+
'\u00D6': 'O',
|
2375 |
+
'\u022A': 'O',
|
2376 |
+
'\u1ECE': 'O',
|
2377 |
+
'\u0150': 'O',
|
2378 |
+
'\u01D1': 'O',
|
2379 |
+
'\u020C': 'O',
|
2380 |
+
'\u020E': 'O',
|
2381 |
+
'\u01A0': 'O',
|
2382 |
+
'\u1EDC': 'O',
|
2383 |
+
'\u1EDA': 'O',
|
2384 |
+
'\u1EE0': 'O',
|
2385 |
+
'\u1EDE': 'O',
|
2386 |
+
'\u1EE2': 'O',
|
2387 |
+
'\u1ECC': 'O',
|
2388 |
+
'\u1ED8': 'O',
|
2389 |
+
'\u01EA': 'O',
|
2390 |
+
'\u01EC': 'O',
|
2391 |
+
'\u00D8': 'O',
|
2392 |
+
'\u01FE': 'O',
|
2393 |
+
'\u0186': 'O',
|
2394 |
+
'\u019F': 'O',
|
2395 |
+
'\uA74A': 'O',
|
2396 |
+
'\uA74C': 'O',
|
2397 |
+
'\u01A2': 'OI',
|
2398 |
+
'\uA74E': 'OO',
|
2399 |
+
'\u0222': 'OU',
|
2400 |
+
'\u24C5': 'P',
|
2401 |
+
'\uFF30': 'P',
|
2402 |
+
'\u1E54': 'P',
|
2403 |
+
'\u1E56': 'P',
|
2404 |
+
'\u01A4': 'P',
|
2405 |
+
'\u2C63': 'P',
|
2406 |
+
'\uA750': 'P',
|
2407 |
+
'\uA752': 'P',
|
2408 |
+
'\uA754': 'P',
|
2409 |
+
'\u24C6': 'Q',
|
2410 |
+
'\uFF31': 'Q',
|
2411 |
+
'\uA756': 'Q',
|
2412 |
+
'\uA758': 'Q',
|
2413 |
+
'\u024A': 'Q',
|
2414 |
+
'\u24C7': 'R',
|
2415 |
+
'\uFF32': 'R',
|
2416 |
+
'\u0154': 'R',
|
2417 |
+
'\u1E58': 'R',
|
2418 |
+
'\u0158': 'R',
|
2419 |
+
'\u0210': 'R',
|
2420 |
+
'\u0212': 'R',
|
2421 |
+
'\u1E5A': 'R',
|
2422 |
+
'\u1E5C': 'R',
|
2423 |
+
'\u0156': 'R',
|
2424 |
+
'\u1E5E': 'R',
|
2425 |
+
'\u024C': 'R',
|
2426 |
+
'\u2C64': 'R',
|
2427 |
+
'\uA75A': 'R',
|
2428 |
+
'\uA7A6': 'R',
|
2429 |
+
'\uA782': 'R',
|
2430 |
+
'\u24C8': 'S',
|
2431 |
+
'\uFF33': 'S',
|
2432 |
+
'\u1E9E': 'S',
|
2433 |
+
'\u015A': 'S',
|
2434 |
+
'\u1E64': 'S',
|
2435 |
+
'\u015C': 'S',
|
2436 |
+
'\u1E60': 'S',
|
2437 |
+
'\u0160': 'S',
|
2438 |
+
'\u1E66': 'S',
|
2439 |
+
'\u1E62': 'S',
|
2440 |
+
'\u1E68': 'S',
|
2441 |
+
'\u0218': 'S',
|
2442 |
+
'\u015E': 'S',
|
2443 |
+
'\u2C7E': 'S',
|
2444 |
+
'\uA7A8': 'S',
|
2445 |
+
'\uA784': 'S',
|
2446 |
+
'\u24C9': 'T',
|
2447 |
+
'\uFF34': 'T',
|
2448 |
+
'\u1E6A': 'T',
|
2449 |
+
'\u0164': 'T',
|
2450 |
+
'\u1E6C': 'T',
|
2451 |
+
'\u021A': 'T',
|
2452 |
+
'\u0162': 'T',
|
2453 |
+
'\u1E70': 'T',
|
2454 |
+
'\u1E6E': 'T',
|
2455 |
+
'\u0166': 'T',
|
2456 |
+
'\u01AC': 'T',
|
2457 |
+
'\u01AE': 'T',
|
2458 |
+
'\u023E': 'T',
|
2459 |
+
'\uA786': 'T',
|
2460 |
+
'\uA728': 'TZ',
|
2461 |
+
'\u24CA': 'U',
|
2462 |
+
'\uFF35': 'U',
|
2463 |
+
'\u00D9': 'U',
|
2464 |
+
'\u00DA': 'U',
|
2465 |
+
'\u00DB': 'U',
|
2466 |
+
'\u0168': 'U',
|
2467 |
+
'\u1E78': 'U',
|
2468 |
+
'\u016A': 'U',
|
2469 |
+
'\u1E7A': 'U',
|
2470 |
+
'\u016C': 'U',
|
2471 |
+
'\u00DC': 'U',
|
2472 |
+
'\u01DB': 'U',
|
2473 |
+
'\u01D7': 'U',
|
2474 |
+
'\u01D5': 'U',
|
2475 |
+
'\u01D9': 'U',
|
2476 |
+
'\u1EE6': 'U',
|
2477 |
+
'\u016E': 'U',
|
2478 |
+
'\u0170': 'U',
|
2479 |
+
'\u01D3': 'U',
|
2480 |
+
'\u0214': 'U',
|
2481 |
+
'\u0216': 'U',
|
2482 |
+
'\u01AF': 'U',
|
2483 |
+
'\u1EEA': 'U',
|
2484 |
+
'\u1EE8': 'U',
|
2485 |
+
'\u1EEE': 'U',
|
2486 |
+
'\u1EEC': 'U',
|
2487 |
+
'\u1EF0': 'U',
|
2488 |
+
'\u1EE4': 'U',
|
2489 |
+
'\u1E72': 'U',
|
2490 |
+
'\u0172': 'U',
|
2491 |
+
'\u1E76': 'U',
|
2492 |
+
'\u1E74': 'U',
|
2493 |
+
'\u0244': 'U',
|
2494 |
+
'\u24CB': 'V',
|
2495 |
+
'\uFF36': 'V',
|
2496 |
+
'\u1E7C': 'V',
|
2497 |
+
'\u1E7E': 'V',
|
2498 |
+
'\u01B2': 'V',
|
2499 |
+
'\uA75E': 'V',
|
2500 |
+
'\u0245': 'V',
|
2501 |
+
'\uA760': 'VY',
|
2502 |
+
'\u24CC': 'W',
|
2503 |
+
'\uFF37': 'W',
|
2504 |
+
'\u1E80': 'W',
|
2505 |
+
'\u1E82': 'W',
|
2506 |
+
'\u0174': 'W',
|
2507 |
+
'\u1E86': 'W',
|
2508 |
+
'\u1E84': 'W',
|
2509 |
+
'\u1E88': 'W',
|
2510 |
+
'\u2C72': 'W',
|
2511 |
+
'\u24CD': 'X',
|
2512 |
+
'\uFF38': 'X',
|
2513 |
+
'\u1E8A': 'X',
|
2514 |
+
'\u1E8C': 'X',
|
2515 |
+
'\u24CE': 'Y',
|
2516 |
+
'\uFF39': 'Y',
|
2517 |
+
'\u1EF2': 'Y',
|
2518 |
+
'\u00DD': 'Y',
|
2519 |
+
'\u0176': 'Y',
|
2520 |
+
'\u1EF8': 'Y',
|
2521 |
+
'\u0232': 'Y',
|
2522 |
+
'\u1E8E': 'Y',
|
2523 |
+
'\u0178': 'Y',
|
2524 |
+
'\u1EF6': 'Y',
|
2525 |
+
'\u1EF4': 'Y',
|
2526 |
+
'\u01B3': 'Y',
|
2527 |
+
'\u024E': 'Y',
|
2528 |
+
'\u1EFE': 'Y',
|
2529 |
+
'\u24CF': 'Z',
|
2530 |
+
'\uFF3A': 'Z',
|
2531 |
+
'\u0179': 'Z',
|
2532 |
+
'\u1E90': 'Z',
|
2533 |
+
'\u017B': 'Z',
|
2534 |
+
'\u017D': 'Z',
|
2535 |
+
'\u1E92': 'Z',
|
2536 |
+
'\u1E94': 'Z',
|
2537 |
+
'\u01B5': 'Z',
|
2538 |
+
'\u0224': 'Z',
|
2539 |
+
'\u2C7F': 'Z',
|
2540 |
+
'\u2C6B': 'Z',
|
2541 |
+
'\uA762': 'Z',
|
2542 |
+
'\u24D0': 'a',
|
2543 |
+
'\uFF41': 'a',
|
2544 |
+
'\u1E9A': 'a',
|
2545 |
+
'\u00E0': 'a',
|
2546 |
+
'\u00E1': 'a',
|
2547 |
+
'\u00E2': 'a',
|
2548 |
+
'\u1EA7': 'a',
|
2549 |
+
'\u1EA5': 'a',
|
2550 |
+
'\u1EAB': 'a',
|
2551 |
+
'\u1EA9': 'a',
|
2552 |
+
'\u00E3': 'a',
|
2553 |
+
'\u0101': 'a',
|
2554 |
+
'\u0103': 'a',
|
2555 |
+
'\u1EB1': 'a',
|
2556 |
+
'\u1EAF': 'a',
|
2557 |
+
'\u1EB5': 'a',
|
2558 |
+
'\u1EB3': 'a',
|
2559 |
+
'\u0227': 'a',
|
2560 |
+
'\u01E1': 'a',
|
2561 |
+
'\u00E4': 'a',
|
2562 |
+
'\u01DF': 'a',
|
2563 |
+
'\u1EA3': 'a',
|
2564 |
+
'\u00E5': 'a',
|
2565 |
+
'\u01FB': 'a',
|
2566 |
+
'\u01CE': 'a',
|
2567 |
+
'\u0201': 'a',
|
2568 |
+
'\u0203': 'a',
|
2569 |
+
'\u1EA1': 'a',
|
2570 |
+
'\u1EAD': 'a',
|
2571 |
+
'\u1EB7': 'a',
|
2572 |
+
'\u1E01': 'a',
|
2573 |
+
'\u0105': 'a',
|
2574 |
+
'\u2C65': 'a',
|
2575 |
+
'\u0250': 'a',
|
2576 |
+
'\uA733': 'aa',
|
2577 |
+
'\u00E6': 'ae',
|
2578 |
+
'\u01FD': 'ae',
|
2579 |
+
'\u01E3': 'ae',
|
2580 |
+
'\uA735': 'ao',
|
2581 |
+
'\uA737': 'au',
|
2582 |
+
'\uA739': 'av',
|
2583 |
+
'\uA73B': 'av',
|
2584 |
+
'\uA73D': 'ay',
|
2585 |
+
'\u24D1': 'b',
|
2586 |
+
'\uFF42': 'b',
|
2587 |
+
'\u1E03': 'b',
|
2588 |
+
'\u1E05': 'b',
|
2589 |
+
'\u1E07': 'b',
|
2590 |
+
'\u0180': 'b',
|
2591 |
+
'\u0183': 'b',
|
2592 |
+
'\u0253': 'b',
|
2593 |
+
'\u24D2': 'c',
|
2594 |
+
'\uFF43': 'c',
|
2595 |
+
'\u0107': 'c',
|
2596 |
+
'\u0109': 'c',
|
2597 |
+
'\u010B': 'c',
|
2598 |
+
'\u010D': 'c',
|
2599 |
+
'\u00E7': 'c',
|
2600 |
+
'\u1E09': 'c',
|
2601 |
+
'\u0188': 'c',
|
2602 |
+
'\u023C': 'c',
|
2603 |
+
'\uA73F': 'c',
|
2604 |
+
'\u2184': 'c',
|
2605 |
+
'\u24D3': 'd',
|
2606 |
+
'\uFF44': 'd',
|
2607 |
+
'\u1E0B': 'd',
|
2608 |
+
'\u010F': 'd',
|
2609 |
+
'\u1E0D': 'd',
|
2610 |
+
'\u1E11': 'd',
|
2611 |
+
'\u1E13': 'd',
|
2612 |
+
'\u1E0F': 'd',
|
2613 |
+
'\u0111': 'd',
|
2614 |
+
'\u018C': 'd',
|
2615 |
+
'\u0256': 'd',
|
2616 |
+
'\u0257': 'd',
|
2617 |
+
'\uA77A': 'd',
|
2618 |
+
'\u01F3': 'dz',
|
2619 |
+
'\u01C6': 'dz',
|
2620 |
+
'\u24D4': 'e',
|
2621 |
+
'\uFF45': 'e',
|
2622 |
+
'\u00E8': 'e',
|
2623 |
+
'\u00E9': 'e',
|
2624 |
+
'\u00EA': 'e',
|
2625 |
+
'\u1EC1': 'e',
|
2626 |
+
'\u1EBF': 'e',
|
2627 |
+
'\u1EC5': 'e',
|
2628 |
+
'\u1EC3': 'e',
|
2629 |
+
'\u1EBD': 'e',
|
2630 |
+
'\u0113': 'e',
|
2631 |
+
'\u1E15': 'e',
|
2632 |
+
'\u1E17': 'e',
|
2633 |
+
'\u0115': 'e',
|
2634 |
+
'\u0117': 'e',
|
2635 |
+
'\u00EB': 'e',
|
2636 |
+
'\u1EBB': 'e',
|
2637 |
+
'\u011B': 'e',
|
2638 |
+
'\u0205': 'e',
|
2639 |
+
'\u0207': 'e',
|
2640 |
+
'\u1EB9': 'e',
|
2641 |
+
'\u1EC7': 'e',
|
2642 |
+
'\u0229': 'e',
|
2643 |
+
'\u1E1D': 'e',
|
2644 |
+
'\u0119': 'e',
|
2645 |
+
'\u1E19': 'e',
|
2646 |
+
'\u1E1B': 'e',
|
2647 |
+
'\u0247': 'e',
|
2648 |
+
'\u025B': 'e',
|
2649 |
+
'\u01DD': 'e',
|
2650 |
+
'\u24D5': 'f',
|
2651 |
+
'\uFF46': 'f',
|
2652 |
+
'\u1E1F': 'f',
|
2653 |
+
'\u0192': 'f',
|
2654 |
+
'\uA77C': 'f',
|
2655 |
+
'\u24D6': 'g',
|
2656 |
+
'\uFF47': 'g',
|
2657 |
+
'\u01F5': 'g',
|
2658 |
+
'\u011D': 'g',
|
2659 |
+
'\u1E21': 'g',
|
2660 |
+
'\u011F': 'g',
|
2661 |
+
'\u0121': 'g',
|
2662 |
+
'\u01E7': 'g',
|
2663 |
+
'\u0123': 'g',
|
2664 |
+
'\u01E5': 'g',
|
2665 |
+
'\u0260': 'g',
|
2666 |
+
'\uA7A1': 'g',
|
2667 |
+
'\u1D79': 'g',
|
2668 |
+
'\uA77F': 'g',
|
2669 |
+
'\u24D7': 'h',
|
2670 |
+
'\uFF48': 'h',
|
2671 |
+
'\u0125': 'h',
|
2672 |
+
'\u1E23': 'h',
|
2673 |
+
'\u1E27': 'h',
|
2674 |
+
'\u021F': 'h',
|
2675 |
+
'\u1E25': 'h',
|
2676 |
+
'\u1E29': 'h',
|
2677 |
+
'\u1E2B': 'h',
|
2678 |
+
'\u1E96': 'h',
|
2679 |
+
'\u0127': 'h',
|
2680 |
+
'\u2C68': 'h',
|
2681 |
+
'\u2C76': 'h',
|
2682 |
+
'\u0265': 'h',
|
2683 |
+
'\u0195': 'hv',
|
2684 |
+
'\u24D8': 'i',
|
2685 |
+
'\uFF49': 'i',
|
2686 |
+
'\u00EC': 'i',
|
2687 |
+
'\u00ED': 'i',
|
2688 |
+
'\u00EE': 'i',
|
2689 |
+
'\u0129': 'i',
|
2690 |
+
'\u012B': 'i',
|
2691 |
+
'\u012D': 'i',
|
2692 |
+
'\u00EF': 'i',
|
2693 |
+
'\u1E2F': 'i',
|
2694 |
+
'\u1EC9': 'i',
|
2695 |
+
'\u01D0': 'i',
|
2696 |
+
'\u0209': 'i',
|
2697 |
+
'\u020B': 'i',
|
2698 |
+
'\u1ECB': 'i',
|
2699 |
+
'\u012F': 'i',
|
2700 |
+
'\u1E2D': 'i',
|
2701 |
+
'\u0268': 'i',
|
2702 |
+
'\u0131': 'i',
|
2703 |
+
'\u24D9': 'j',
|
2704 |
+
'\uFF4A': 'j',
|
2705 |
+
'\u0135': 'j',
|
2706 |
+
'\u01F0': 'j',
|
2707 |
+
'\u0249': 'j',
|
2708 |
+
'\u24DA': 'k',
|
2709 |
+
'\uFF4B': 'k',
|
2710 |
+
'\u1E31': 'k',
|
2711 |
+
'\u01E9': 'k',
|
2712 |
+
'\u1E33': 'k',
|
2713 |
+
'\u0137': 'k',
|
2714 |
+
'\u1E35': 'k',
|
2715 |
+
'\u0199': 'k',
|
2716 |
+
'\u2C6A': 'k',
|
2717 |
+
'\uA741': 'k',
|
2718 |
+
'\uA743': 'k',
|
2719 |
+
'\uA745': 'k',
|
2720 |
+
'\uA7A3': 'k',
|
2721 |
+
'\u24DB': 'l',
|
2722 |
+
'\uFF4C': 'l',
|
2723 |
+
'\u0140': 'l',
|
2724 |
+
'\u013A': 'l',
|
2725 |
+
'\u013E': 'l',
|
2726 |
+
'\u1E37': 'l',
|
2727 |
+
'\u1E39': 'l',
|
2728 |
+
'\u013C': 'l',
|
2729 |
+
'\u1E3D': 'l',
|
2730 |
+
'\u1E3B': 'l',
|
2731 |
+
'\u017F': 'l',
|
2732 |
+
'\u0142': 'l',
|
2733 |
+
'\u019A': 'l',
|
2734 |
+
'\u026B': 'l',
|
2735 |
+
'\u2C61': 'l',
|
2736 |
+
'\uA749': 'l',
|
2737 |
+
'\uA781': 'l',
|
2738 |
+
'\uA747': 'l',
|
2739 |
+
'\u01C9': 'lj',
|
2740 |
+
'\u24DC': 'm',
|
2741 |
+
'\uFF4D': 'm',
|
2742 |
+
'\u1E3F': 'm',
|
2743 |
+
'\u1E41': 'm',
|
2744 |
+
'\u1E43': 'm',
|
2745 |
+
'\u0271': 'm',
|
2746 |
+
'\u026F': 'm',
|
2747 |
+
'\u24DD': 'n',
|
2748 |
+
'\uFF4E': 'n',
|
2749 |
+
'\u01F9': 'n',
|
2750 |
+
'\u0144': 'n',
|
2751 |
+
'\u00F1': 'n',
|
2752 |
+
'\u1E45': 'n',
|
2753 |
+
'\u0148': 'n',
|
2754 |
+
'\u1E47': 'n',
|
2755 |
+
'\u0146': 'n',
|
2756 |
+
'\u1E4B': 'n',
|
2757 |
+
'\u1E49': 'n',
|
2758 |
+
'\u019E': 'n',
|
2759 |
+
'\u0272': 'n',
|
2760 |
+
'\u0149': 'n',
|
2761 |
+
'\uA791': 'n',
|
2762 |
+
'\uA7A5': 'n',
|
2763 |
+
'\u01CC': 'nj',
|
2764 |
+
'\u24DE': 'o',
|
2765 |
+
'\uFF4F': 'o',
|
2766 |
+
'\u00F2': 'o',
|
2767 |
+
'\u00F3': 'o',
|
2768 |
+
'\u00F4': 'o',
|
2769 |
+
'\u1ED3': 'o',
|
2770 |
+
'\u1ED1': 'o',
|
2771 |
+
'\u1ED7': 'o',
|
2772 |
+
'\u1ED5': 'o',
|
2773 |
+
'\u00F5': 'o',
|
2774 |
+
'\u1E4D': 'o',
|
2775 |
+
'\u022D': 'o',
|
2776 |
+
'\u1E4F': 'o',
|
2777 |
+
'\u014D': 'o',
|
2778 |
+
'\u1E51': 'o',
|
2779 |
+
'\u1E53': 'o',
|
2780 |
+
'\u014F': 'o',
|
2781 |
+
'\u022F': 'o',
|
2782 |
+
'\u0231': 'o',
|
2783 |
+
'\u00F6': 'o',
|
2784 |
+
'\u022B': 'o',
|
2785 |
+
'\u1ECF': 'o',
|
2786 |
+
'\u0151': 'o',
|
2787 |
+
'\u01D2': 'o',
|
2788 |
+
'\u020D': 'o',
|
2789 |
+
'\u020F': 'o',
|
2790 |
+
'\u01A1': 'o',
|
2791 |
+
'\u1EDD': 'o',
|
2792 |
+
'\u1EDB': 'o',
|
2793 |
+
'\u1EE1': 'o',
|
2794 |
+
'\u1EDF': 'o',
|
2795 |
+
'\u1EE3': 'o',
|
2796 |
+
'\u1ECD': 'o',
|
2797 |
+
'\u1ED9': 'o',
|
2798 |
+
'\u01EB': 'o',
|
2799 |
+
'\u01ED': 'o',
|
2800 |
+
'\u00F8': 'o',
|
2801 |
+
'\u01FF': 'o',
|
2802 |
+
'\u0254': 'o',
|
2803 |
+
'\uA74B': 'o',
|
2804 |
+
'\uA74D': 'o',
|
2805 |
+
'\u0275': 'o',
|
2806 |
+
'\u01A3': 'oi',
|
2807 |
+
'\u0223': 'ou',
|
2808 |
+
'\uA74F': 'oo',
|
2809 |
+
'\u24DF': 'p',
|
2810 |
+
'\uFF50': 'p',
|
2811 |
+
'\u1E55': 'p',
|
2812 |
+
'\u1E57': 'p',
|
2813 |
+
'\u01A5': 'p',
|
2814 |
+
'\u1D7D': 'p',
|
2815 |
+
'\uA751': 'p',
|
2816 |
+
'\uA753': 'p',
|
2817 |
+
'\uA755': 'p',
|
2818 |
+
'\u24E0': 'q',
|
2819 |
+
'\uFF51': 'q',
|
2820 |
+
'\u024B': 'q',
|
2821 |
+
'\uA757': 'q',
|
2822 |
+
'\uA759': 'q',
|
2823 |
+
'\u24E1': 'r',
|
2824 |
+
'\uFF52': 'r',
|
2825 |
+
'\u0155': 'r',
|
2826 |
+
'\u1E59': 'r',
|
2827 |
+
'\u0159': 'r',
|
2828 |
+
'\u0211': 'r',
|
2829 |
+
'\u0213': 'r',
|
2830 |
+
'\u1E5B': 'r',
|
2831 |
+
'\u1E5D': 'r',
|
2832 |
+
'\u0157': 'r',
|
2833 |
+
'\u1E5F': 'r',
|
2834 |
+
'\u024D': 'r',
|
2835 |
+
'\u027D': 'r',
|
2836 |
+
'\uA75B': 'r',
|
2837 |
+
'\uA7A7': 'r',
|
2838 |
+
'\uA783': 'r',
|
2839 |
+
'\u24E2': 's',
|
2840 |
+
'\uFF53': 's',
|
2841 |
+
'\u00DF': 's',
|
2842 |
+
'\u015B': 's',
|
2843 |
+
'\u1E65': 's',
|
2844 |
+
'\u015D': 's',
|
2845 |
+
'\u1E61': 's',
|
2846 |
+
'\u0161': 's',
|
2847 |
+
'\u1E67': 's',
|
2848 |
+
'\u1E63': 's',
|
2849 |
+
'\u1E69': 's',
|
2850 |
+
'\u0219': 's',
|
2851 |
+
'\u015F': 's',
|
2852 |
+
'\u023F': 's',
|
2853 |
+
'\uA7A9': 's',
|
2854 |
+
'\uA785': 's',
|
2855 |
+
'\u1E9B': 's',
|
2856 |
+
'\u24E3': 't',
|
2857 |
+
'\uFF54': 't',
|
2858 |
+
'\u1E6B': 't',
|
2859 |
+
'\u1E97': 't',
|
2860 |
+
'\u0165': 't',
|
2861 |
+
'\u1E6D': 't',
|
2862 |
+
'\u021B': 't',
|
2863 |
+
'\u0163': 't',
|
2864 |
+
'\u1E71': 't',
|
2865 |
+
'\u1E6F': 't',
|
2866 |
+
'\u0167': 't',
|
2867 |
+
'\u01AD': 't',
|
2868 |
+
'\u0288': 't',
|
2869 |
+
'\u2C66': 't',
|
2870 |
+
'\uA787': 't',
|
2871 |
+
'\uA729': 'tz',
|
2872 |
+
'\u24E4': 'u',
|
2873 |
+
'\uFF55': 'u',
|
2874 |
+
'\u00F9': 'u',
|
2875 |
+
'\u00FA': 'u',
|
2876 |
+
'\u00FB': 'u',
|
2877 |
+
'\u0169': 'u',
|
2878 |
+
'\u1E79': 'u',
|
2879 |
+
'\u016B': 'u',
|
2880 |
+
'\u1E7B': 'u',
|
2881 |
+
'\u016D': 'u',
|
2882 |
+
'\u00FC': 'u',
|
2883 |
+
'\u01DC': 'u',
|
2884 |
+
'\u01D8': 'u',
|
2885 |
+
'\u01D6': 'u',
|
2886 |
+
'\u01DA': 'u',
|
2887 |
+
'\u1EE7': 'u',
|
2888 |
+
'\u016F': 'u',
|
2889 |
+
'\u0171': 'u',
|
2890 |
+
'\u01D4': 'u',
|
2891 |
+
'\u0215': 'u',
|
2892 |
+
'\u0217': 'u',
|
2893 |
+
'\u01B0': 'u',
|
2894 |
+
'\u1EEB': 'u',
|
2895 |
+
'\u1EE9': 'u',
|
2896 |
+
'\u1EEF': 'u',
|
2897 |
+
'\u1EED': 'u',
|
2898 |
+
'\u1EF1': 'u',
|
2899 |
+
'\u1EE5': 'u',
|
2900 |
+
'\u1E73': 'u',
|
2901 |
+
'\u0173': 'u',
|
2902 |
+
'\u1E77': 'u',
|
2903 |
+
'\u1E75': 'u',
|
2904 |
+
'\u0289': 'u',
|
2905 |
+
'\u24E5': 'v',
|
2906 |
+
'\uFF56': 'v',
|
2907 |
+
'\u1E7D': 'v',
|
2908 |
+
'\u1E7F': 'v',
|
2909 |
+
'\u028B': 'v',
|
2910 |
+
'\uA75F': 'v',
|
2911 |
+
'\u028C': 'v',
|
2912 |
+
'\uA761': 'vy',
|
2913 |
+
'\u24E6': 'w',
|
2914 |
+
'\uFF57': 'w',
|
2915 |
+
'\u1E81': 'w',
|
2916 |
+
'\u1E83': 'w',
|
2917 |
+
'\u0175': 'w',
|
2918 |
+
'\u1E87': 'w',
|
2919 |
+
'\u1E85': 'w',
|
2920 |
+
'\u1E98': 'w',
|
2921 |
+
'\u1E89': 'w',
|
2922 |
+
'\u2C73': 'w',
|
2923 |
+
'\u24E7': 'x',
|
2924 |
+
'\uFF58': 'x',
|
2925 |
+
'\u1E8B': 'x',
|
2926 |
+
'\u1E8D': 'x',
|
2927 |
+
'\u24E8': 'y',
|
2928 |
+
'\uFF59': 'y',
|
2929 |
+
'\u1EF3': 'y',
|
2930 |
+
'\u00FD': 'y',
|
2931 |
+
'\u0177': 'y',
|
2932 |
+
'\u1EF9': 'y',
|
2933 |
+
'\u0233': 'y',
|
2934 |
+
'\u1E8F': 'y',
|
2935 |
+
'\u00FF': 'y',
|
2936 |
+
'\u1EF7': 'y',
|
2937 |
+
'\u1E99': 'y',
|
2938 |
+
'\u1EF5': 'y',
|
2939 |
+
'\u01B4': 'y',
|
2940 |
+
'\u024F': 'y',
|
2941 |
+
'\u1EFF': 'y',
|
2942 |
+
'\u24E9': 'z',
|
2943 |
+
'\uFF5A': 'z',
|
2944 |
+
'\u017A': 'z',
|
2945 |
+
'\u1E91': 'z',
|
2946 |
+
'\u017C': 'z',
|
2947 |
+
'\u017E': 'z',
|
2948 |
+
'\u1E93': 'z',
|
2949 |
+
'\u1E95': 'z',
|
2950 |
+
'\u01B6': 'z',
|
2951 |
+
'\u0225': 'z',
|
2952 |
+
'\u0240': 'z',
|
2953 |
+
'\u2C6C': 'z',
|
2954 |
+
'\uA763': 'z',
|
2955 |
+
'\u0386': '\u0391',
|
2956 |
+
'\u0388': '\u0395',
|
2957 |
+
'\u0389': '\u0397',
|
2958 |
+
'\u038A': '\u0399',
|
2959 |
+
'\u03AA': '\u0399',
|
2960 |
+
'\u038C': '\u039F',
|
2961 |
+
'\u038E': '\u03A5',
|
2962 |
+
'\u03AB': '\u03A5',
|
2963 |
+
'\u038F': '\u03A9',
|
2964 |
+
'\u03AC': '\u03B1',
|
2965 |
+
'\u03AD': '\u03B5',
|
2966 |
+
'\u03AE': '\u03B7',
|
2967 |
+
'\u03AF': '\u03B9',
|
2968 |
+
'\u03CA': '\u03B9',
|
2969 |
+
'\u0390': '\u03B9',
|
2970 |
+
'\u03CC': '\u03BF',
|
2971 |
+
'\u03CD': '\u03C5',
|
2972 |
+
'\u03CB': '\u03C5',
|
2973 |
+
'\u03B0': '\u03C5',
|
2974 |
+
'\u03C9': '\u03C9',
|
2975 |
+
'\u03C2': '\u03C3'
|
2976 |
+
};
|
2977 |
+
|
2978 |
+
return diacritics;
|
2979 |
+
});
|
2980 |
+
|
2981 |
+
S2.define('select2/data/base',[
|
2982 |
+
'../utils'
|
2983 |
+
], function (Utils) {
|
2984 |
+
function BaseAdapter ($element, options) {
|
2985 |
+
BaseAdapter.__super__.constructor.call(this);
|
2986 |
+
}
|
2987 |
+
|
2988 |
+
Utils.Extend(BaseAdapter, Utils.Observable);
|
2989 |
+
|
2990 |
+
BaseAdapter.prototype.current = function (callback) {
|
2991 |
+
throw new Error('The `current` method must be defined in child classes.');
|
2992 |
+
};
|
2993 |
+
|
2994 |
+
BaseAdapter.prototype.query = function (params, callback) {
|
2995 |
+
throw new Error('The `query` method must be defined in child classes.');
|
2996 |
+
};
|
2997 |
+
|
2998 |
+
BaseAdapter.prototype.bind = function (container, $container) {
|
2999 |
+
// Can be implemented in subclasses
|
3000 |
+
};
|
3001 |
+
|
3002 |
+
BaseAdapter.prototype.destroy = function () {
|
3003 |
+
// Can be implemented in subclasses
|
3004 |
+
};
|
3005 |
+
|
3006 |
+
BaseAdapter.prototype.generateResultId = function (container, data) {
|
3007 |
+
var id = container.id + '-result-';
|
3008 |
+
|
3009 |
+
id += Utils.generateChars(4);
|
3010 |
+
|
3011 |
+
if (data.id != null) {
|
3012 |
+
id += '-' + data.id.toString();
|
3013 |
+
} else {
|
3014 |
+
id += '-' + Utils.generateChars(4);
|
3015 |
+
}
|
3016 |
+
return id;
|
3017 |
+
};
|
3018 |
+
|
3019 |
+
return BaseAdapter;
|
3020 |
+
});
|
3021 |
+
|
3022 |
+
S2.define('select2/data/select',[
|
3023 |
+
'./base',
|
3024 |
+
'../utils',
|
3025 |
+
'jquery'
|
3026 |
+
], function (BaseAdapter, Utils, $) {
|
3027 |
+
function SelectAdapter ($element, options) {
|
3028 |
+
this.$element = $element;
|
3029 |
+
this.options = options;
|
3030 |
+
|
3031 |
+
SelectAdapter.__super__.constructor.call(this);
|
3032 |
+
}
|
3033 |
+
|
3034 |
+
Utils.Extend(SelectAdapter, BaseAdapter);
|
3035 |
+
|
3036 |
+
SelectAdapter.prototype.current = function (callback) {
|
3037 |
+
var data = [];
|
3038 |
+
var self = this;
|
3039 |
+
|
3040 |
+
this.$element.find(':selected').each(function () {
|
3041 |
+
var $option = $(this);
|
3042 |
+
|
3043 |
+
var option = self.item($option);
|
3044 |
+
|
3045 |
+
data.push(option);
|
3046 |
+
});
|
3047 |
+
|
3048 |
+
callback(data);
|
3049 |
+
};
|
3050 |
+
|
3051 |
+
SelectAdapter.prototype.select = function (data) {
|
3052 |
+
var self = this;
|
3053 |
+
|
3054 |
+
data.selected = true;
|
3055 |
+
|
3056 |
+
// If data.element is a DOM node, use it instead
|
3057 |
+
if ($(data.element).is('option')) {
|
3058 |
+
data.element.selected = true;
|
3059 |
+
|
3060 |
+
this.$element.trigger('change');
|
3061 |
+
|
3062 |
+
return;
|
3063 |
+
}
|
3064 |
+
|
3065 |
+
if (this.$element.prop('multiple')) {
|
3066 |
+
this.current(function (currentData) {
|
3067 |
+
var val = [];
|
3068 |
+
|
3069 |
+
data = [data];
|
3070 |
+
data.push.apply(data, currentData);
|
3071 |
+
|
3072 |
+
for (var d = 0; d < data.length; d++) {
|
3073 |
+
var id = data[d].id;
|
3074 |
+
|
3075 |
+
if ($.inArray(id, val) === -1) {
|
3076 |
+
val.push(id);
|
3077 |
+
}
|
3078 |
+
}
|
3079 |
+
|
3080 |
+
self.$element.val(val);
|
3081 |
+
self.$element.trigger('change');
|
3082 |
+
});
|
3083 |
+
} else {
|
3084 |
+
var val = data.id;
|
3085 |
+
|
3086 |
+
this.$element.val(val);
|
3087 |
+
this.$element.trigger('change');
|
3088 |
+
}
|
3089 |
+
};
|
3090 |
+
|
3091 |
+
SelectAdapter.prototype.unselect = function (data) {
|
3092 |
+
var self = this;
|
3093 |
+
|
3094 |
+
if (!this.$element.prop('multiple')) {
|
3095 |
+
return;
|
3096 |
+
}
|
3097 |
+
|
3098 |
+
data.selected = false;
|
3099 |
+
|
3100 |
+
if ($(data.element).is('option')) {
|
3101 |
+
data.element.selected = false;
|
3102 |
+
|
3103 |
+
this.$element.trigger('change');
|
3104 |
+
|
3105 |
+
return;
|
3106 |
+
}
|
3107 |
+
|
3108 |
+
this.current(function (currentData) {
|
3109 |
+
var val = [];
|
3110 |
+
|
3111 |
+
for (var d = 0; d < currentData.length; d++) {
|
3112 |
+
var id = currentData[d].id;
|
3113 |
+
|
3114 |
+
if (id !== data.id && $.inArray(id, val) === -1) {
|
3115 |
+
val.push(id);
|
3116 |
+
}
|
3117 |
+
}
|
3118 |
+
|
3119 |
+
self.$element.val(val);
|
3120 |
+
|
3121 |
+
self.$element.trigger('change');
|
3122 |
+
});
|
3123 |
+
};
|
3124 |
+
|
3125 |
+
SelectAdapter.prototype.bind = function (container, $container) {
|
3126 |
+
var self = this;
|
3127 |
+
|
3128 |
+
this.container = container;
|
3129 |
+
|
3130 |
+
container.on('select', function (params) {
|
3131 |
+
self.select(params.data);
|
3132 |
+
});
|
3133 |
+
|
3134 |
+
container.on('unselect', function (params) {
|
3135 |
+
self.unselect(params.data);
|
3136 |
+
});
|
3137 |
+
};
|
3138 |
+
|
3139 |
+
SelectAdapter.prototype.destroy = function () {
|
3140 |
+
// Remove anything added to child elements
|
3141 |
+
this.$element.find('*').each(function () {
|
3142 |
+
// Remove any custom data set by Select2
|
3143 |
+
$.removeData(this, 'data');
|
3144 |
+
});
|
3145 |
+
};
|
3146 |
+
|
3147 |
+
SelectAdapter.prototype.query = function (params, callback) {
|
3148 |
+
var data = [];
|
3149 |
+
var self = this;
|
3150 |
+
|
3151 |
+
var $options = this.$element.children();
|
3152 |
+
|
3153 |
+
$options.each(function () {
|
3154 |
+
var $option = $(this);
|
3155 |
+
|
3156 |
+
if (!$option.is('option') && !$option.is('optgroup')) {
|
3157 |
+
return;
|
3158 |
+
}
|
3159 |
+
|
3160 |
+
var option = self.item($option);
|
3161 |
+
|
3162 |
+
var matches = self.matches(params, option);
|
3163 |
+
|
3164 |
+
if (matches !== null) {
|
3165 |
+
data.push(matches);
|
3166 |
+
}
|
3167 |
+
});
|
3168 |
+
|
3169 |
+
callback({
|
3170 |
+
results: data
|
3171 |
+
});
|
3172 |
+
};
|
3173 |
+
|
3174 |
+
SelectAdapter.prototype.addOptions = function ($options) {
|
3175 |
+
Utils.appendMany(this.$element, $options);
|
3176 |
+
};
|
3177 |
+
|
3178 |
+
SelectAdapter.prototype.option = function (data) {
|
3179 |
+
var option;
|
3180 |
+
|
3181 |
+
if (data.children) {
|
3182 |
+
option = document.createElement('optgroup');
|
3183 |
+
option.label = data.text;
|
3184 |
+
} else {
|
3185 |
+
option = document.createElement('option');
|
3186 |
+
|
3187 |
+
if (option.textContent !== undefined) {
|
3188 |
+
option.textContent = data.text;
|
3189 |
+
} else {
|
3190 |
+
option.innerText = data.text;
|
3191 |
+
}
|
3192 |
+
}
|
3193 |
+
|
3194 |
+
if (data.id) {
|
3195 |
+
option.value = data.id;
|
3196 |
+
}
|
3197 |
+
|
3198 |
+
if (data.disabled) {
|
3199 |
+
option.disabled = true;
|
3200 |
+
}
|
3201 |
+
|
3202 |
+
if (data.selected) {
|
3203 |
+
option.selected = true;
|
3204 |
+
}
|
3205 |
+
|
3206 |
+
if (data.title) {
|
3207 |
+
option.title = data.title;
|
3208 |
+
}
|
3209 |
+
|
3210 |
+
var $option = $(option);
|
3211 |
+
|
3212 |
+
var normalizedData = this._normalizeItem(data);
|
3213 |
+
normalizedData.element = option;
|
3214 |
+
|
3215 |
+
// Override the option's data with the combined data
|
3216 |
+
$.data(option, 'data', normalizedData);
|
3217 |
+
|
3218 |
+
return $option;
|
3219 |
+
};
|
3220 |
+
|
3221 |
+
SelectAdapter.prototype.item = function ($option) {
|
3222 |
+
var data = {};
|
3223 |
+
|
3224 |
+
data = $.data($option[0], 'data');
|
3225 |
+
|
3226 |
+
if (data != null) {
|
3227 |
+
return data;
|
3228 |
+
}
|
3229 |
+
|
3230 |
+
if ($option.is('option')) {
|
3231 |
+
data = {
|
3232 |
+
id: $option.val(),
|
3233 |
+
text: $option.text(),
|
3234 |
+
disabled: $option.prop('disabled'),
|
3235 |
+
selected: $option.prop('selected'),
|
3236 |
+
title: $option.prop('title')
|
3237 |
+
};
|
3238 |
+
} else if ($option.is('optgroup')) {
|
3239 |
+
data = {
|
3240 |
+
text: $option.prop('label'),
|
3241 |
+
children: [],
|
3242 |
+
title: $option.prop('title')
|
3243 |
+
};
|
3244 |
+
|
3245 |
+
var $children = $option.children('option');
|
3246 |
+
var children = [];
|
3247 |
+
|
3248 |
+
for (var c = 0; c < $children.length; c++) {
|
3249 |
+
var $child = $($children[c]);
|
3250 |
+
|
3251 |
+
var child = this.item($child);
|
3252 |
+
|
3253 |
+
children.push(child);
|
3254 |
+
}
|
3255 |
+
|
3256 |
+
data.children = children;
|
3257 |
+
}
|
3258 |
+
|
3259 |
+
data = this._normalizeItem(data);
|
3260 |
+
data.element = $option[0];
|
3261 |
+
|
3262 |
+
$.data($option[0], 'data', data);
|
3263 |
+
|
3264 |
+
return data;
|
3265 |
+
};
|
3266 |
+
|
3267 |
+
SelectAdapter.prototype._normalizeItem = function (item) {
|
3268 |
+
if (!$.isPlainObject(item)) {
|
3269 |
+
item = {
|
3270 |
+
id: item,
|
3271 |
+
text: item
|
3272 |
+
};
|
3273 |
+
}
|
3274 |
+
|
3275 |
+
item = $.extend({}, {
|
3276 |
+
text: ''
|
3277 |
+
}, item);
|
3278 |
+
|
3279 |
+
var defaults = {
|
3280 |
+
selected: false,
|
3281 |
+
disabled: false
|
3282 |
+
};
|
3283 |
+
|
3284 |
+
if (item.id != null) {
|
3285 |
+
item.id = item.id.toString();
|
3286 |
+
}
|
3287 |
+
|
3288 |
+
if (item.text != null) {
|
3289 |
+
item.text = item.text.toString();
|
3290 |
+
}
|
3291 |
+
|
3292 |
+
if (item._resultId == null && item.id && this.container != null) {
|
3293 |
+
item._resultId = this.generateResultId(this.container, item);
|
3294 |
+
}
|
3295 |
+
|
3296 |
+
return $.extend({}, defaults, item);
|
3297 |
+
};
|
3298 |
+
|
3299 |
+
SelectAdapter.prototype.matches = function (params, data) {
|
3300 |
+
var matcher = this.options.get('matcher');
|
3301 |
+
|
3302 |
+
return matcher(params, data);
|
3303 |
+
};
|
3304 |
+
|
3305 |
+
return SelectAdapter;
|
3306 |
+
});
|
3307 |
+
|
3308 |
+
S2.define('select2/data/array',[
|
3309 |
+
'./select',
|
3310 |
+
'../utils',
|
3311 |
+
'jquery'
|
3312 |
+
], function (SelectAdapter, Utils, $) {
|
3313 |
+
function ArrayAdapter ($element, options) {
|
3314 |
+
var data = options.get('data') || [];
|
3315 |
+
|
3316 |
+
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
3317 |
+
|
3318 |
+
this.addOptions(this.convertToOptions(data));
|
3319 |
+
}
|
3320 |
+
|
3321 |
+
Utils.Extend(ArrayAdapter, SelectAdapter);
|
3322 |
+
|
3323 |
+
ArrayAdapter.prototype.select = function (data) {
|
3324 |
+
var $option = this.$element.find('option').filter(function (i, elm) {
|
3325 |
+
return elm.value == data.id.toString();
|
3326 |
+
});
|
3327 |
+
|
3328 |
+
if ($option.length === 0) {
|
3329 |
+
$option = this.option(data);
|
3330 |
+
|
3331 |
+
this.addOptions($option);
|
3332 |
+
}
|
3333 |
+
|
3334 |
+
ArrayAdapter.__super__.select.call(this, data);
|
3335 |
+
};
|
3336 |
+
|
3337 |
+
ArrayAdapter.prototype.convertToOptions = function (data) {
|
3338 |
+
var self = this;
|
3339 |
+
|
3340 |
+
var $existing = this.$element.find('option');
|
3341 |
+
var existingIds = $existing.map(function () {
|
3342 |
+
return self.item($(this)).id;
|
3343 |
+
}).get();
|
3344 |
+
|
3345 |
+
var $options = [];
|
3346 |
+
|
3347 |
+
// Filter out all items except for the one passed in the argument
|
3348 |
+
function onlyItem (item) {
|
3349 |
+
return function () {
|
3350 |
+
return $(this).val() == item.id;
|
3351 |
+
};
|
3352 |
+
}
|
3353 |
+
|
3354 |
+
for (var d = 0; d < data.length; d++) {
|
3355 |
+
var item = this._normalizeItem(data[d]);
|
3356 |
+
|
3357 |
+
// Skip items which were pre-loaded, only merge the data
|
3358 |
+
if ($.inArray(item.id, existingIds) >= 0) {
|
3359 |
+
var $existingOption = $existing.filter(onlyItem(item));
|
3360 |
+
|
3361 |
+
var existingData = this.item($existingOption);
|
3362 |
+
var newData = $.extend(true, {}, item, existingData);
|
3363 |
+
|
3364 |
+
var $newOption = this.option(newData);
|
3365 |
+
|
3366 |
+
$existingOption.replaceWith($newOption);
|
3367 |
+
|
3368 |
+
continue;
|
3369 |
+
}
|
3370 |
+
|
3371 |
+
var $option = this.option(item);
|
3372 |
+
|
3373 |
+
if (item.children) {
|
3374 |
+
var $children = this.convertToOptions(item.children);
|
3375 |
+
|
3376 |
+
Utils.appendMany($option, $children);
|
3377 |
+
}
|
3378 |
+
|
3379 |
+
$options.push($option);
|
3380 |
+
}
|
3381 |
+
|
3382 |
+
return $options;
|
3383 |
+
};
|
3384 |
+
|
3385 |
+
return ArrayAdapter;
|
3386 |
+
});
|
3387 |
+
|
3388 |
+
S2.define('select2/data/ajax',[
|
3389 |
+
'./array',
|
3390 |
+
'../utils',
|
3391 |
+
'jquery'
|
3392 |
+
], function (ArrayAdapter, Utils, $) {
|
3393 |
+
function AjaxAdapter ($element, options) {
|
3394 |
+
this.ajaxOptions = this._applyDefaults(options.get('ajax'));
|
3395 |
+
|
3396 |
+
if (this.ajaxOptions.processResults != null) {
|
3397 |
+
this.processResults = this.ajaxOptions.processResults;
|
3398 |
+
}
|
3399 |
+
|
3400 |
+
AjaxAdapter.__super__.constructor.call(this, $element, options);
|
3401 |
+
}
|
3402 |
+
|
3403 |
+
Utils.Extend(AjaxAdapter, ArrayAdapter);
|
3404 |
+
|
3405 |
+
AjaxAdapter.prototype._applyDefaults = function (options) {
|
3406 |
+
var defaults = {
|
3407 |
+
data: function (params) {
|
3408 |
+
return $.extend({}, params, {
|
3409 |
+
q: params.term
|
3410 |
+
});
|
3411 |
+
},
|
3412 |
+
transport: function (params, success, failure) {
|
3413 |
+
var $request = $.ajax(params);
|
3414 |
+
|
3415 |
+
$request.then(success);
|
3416 |
+
$request.fail(failure);
|
3417 |
+
|
3418 |
+
return $request;
|
3419 |
+
}
|
3420 |
+
};
|
3421 |
+
|
3422 |
+
return $.extend({}, defaults, options, true);
|
3423 |
+
};
|
3424 |
+
|
3425 |
+
AjaxAdapter.prototype.processResults = function (results) {
|
3426 |
+
return results;
|
3427 |
+
};
|
3428 |
+
|
3429 |
+
AjaxAdapter.prototype.query = function (params, callback) {
|
3430 |
+
var matches = [];
|
3431 |
+
var self = this;
|
3432 |
+
|
3433 |
+
if (this._request != null) {
|
3434 |
+
// JSONP requests cannot always be aborted
|
3435 |
+
if ($.isFunction(this._request.abort)) {
|
3436 |
+
this._request.abort();
|
3437 |
+
}
|
3438 |
+
|
3439 |
+
this._request = null;
|
3440 |
+
}
|
3441 |
+
|
3442 |
+
var options = $.extend({
|
3443 |
+
type: 'GET'
|
3444 |
+
}, this.ajaxOptions);
|
3445 |
+
|
3446 |
+
if (typeof options.url === 'function') {
|
3447 |
+
options.url = options.url.call(this.$element, params);
|
3448 |
+
}
|
3449 |
+
|
3450 |
+
if (typeof options.data === 'function') {
|
3451 |
+
options.data = options.data.call(this.$element, params);
|
3452 |
+
}
|
3453 |
+
|
3454 |
+
function request () {
|
3455 |
+
var $request = options.transport(options, function (data) {
|
3456 |
+
var results = self.processResults(data, params);
|
3457 |
+
|
3458 |
+
if (self.options.get('debug') && window.console && console.error) {
|
3459 |
+
// Check to make sure that the response included a `results` key.
|
3460 |
+
if (!results || !results.results || !$.isArray(results.results)) {
|
3461 |
+
console.error(
|
3462 |
+
'Select2: The AJAX results did not return an array in the ' +
|
3463 |
+
'`results` key of the response.'
|
3464 |
+
);
|
3465 |
+
}
|
3466 |
+
}
|
3467 |
+
|
3468 |
+
callback(results);
|
3469 |
+
}, function () {
|
3470 |
+
// Attempt to detect if a request was aborted
|
3471 |
+
// Only works if the transport exposes a status property
|
3472 |
+
if ($request.status && $request.status === '0') {
|
3473 |
+
return;
|
3474 |
+
}
|
3475 |
+
|
3476 |
+
self.trigger('results:message', {
|
3477 |
+
message: 'errorLoading'
|
3478 |
+
});
|
3479 |
+
});
|
3480 |
+
|
3481 |
+
self._request = $request;
|
3482 |
+
}
|
3483 |
+
|
3484 |
+
if (this.ajaxOptions.delay && params.term != null) {
|
3485 |
+
if (this._queryTimeout) {
|
3486 |
+
window.clearTimeout(this._queryTimeout);
|
3487 |
+
}
|
3488 |
+
|
3489 |
+
this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);
|
3490 |
+
} else {
|
3491 |
+
request();
|
3492 |
+
}
|
3493 |
+
};
|
3494 |
+
|
3495 |
+
return AjaxAdapter;
|
3496 |
+
});
|
3497 |
+
|
3498 |
+
S2.define('select2/data/tags',[
|
3499 |
+
'jquery'
|
3500 |
+
], function ($) {
|
3501 |
+
function Tags (decorated, $element, options) {
|
3502 |
+
var tags = options.get('tags');
|
3503 |
+
|
3504 |
+
var createTag = options.get('createTag');
|
3505 |
+
|
3506 |
+
if (createTag !== undefined) {
|
3507 |
+
this.createTag = createTag;
|
3508 |
+
}
|
3509 |
+
|
3510 |
+
var insertTag = options.get('insertTag');
|
3511 |
+
|
3512 |
+
if (insertTag !== undefined) {
|
3513 |
+
this.insertTag = insertTag;
|
3514 |
+
}
|
3515 |
+
|
3516 |
+
decorated.call(this, $element, options);
|
3517 |
+
|
3518 |
+
if ($.isArray(tags)) {
|
3519 |
+
for (var t = 0; t < tags.length; t++) {
|
3520 |
+
var tag = tags[t];
|
3521 |
+
var item = this._normalizeItem(tag);
|
3522 |
+
|
3523 |
+
var $option = this.option(item);
|
3524 |
+
|
3525 |
+
this.$element.append($option);
|
3526 |
+
}
|
3527 |
+
}
|
3528 |
+
}
|
3529 |
+
|
3530 |
+
Tags.prototype.query = function (decorated, params, callback) {
|
3531 |
+
var self = this;
|
3532 |
+
|
3533 |
+
this._removeOldTags();
|
3534 |
+
|
3535 |
+
if (params.term == null || params.page != null) {
|
3536 |
+
decorated.call(this, params, callback);
|
3537 |
+
return;
|
3538 |
+
}
|
3539 |
+
|
3540 |
+
function wrapper (obj, child) {
|
3541 |
+
var data = obj.results;
|
3542 |
+
|
3543 |
+
for (var i = 0; i < data.length; i++) {
|
3544 |
+
var option = data[i];
|
3545 |
+
|
3546 |
+
var checkChildren = (
|
3547 |
+
option.children != null &&
|
3548 |
+
!wrapper({
|
3549 |
+
results: option.children
|
3550 |
+
}, true)
|
3551 |
+
);
|
3552 |
+
|
3553 |
+
var checkText = option.text === params.term;
|
3554 |
+
|
3555 |
+
if (checkText || checkChildren) {
|
3556 |
+
if (child) {
|
3557 |
+
return false;
|
3558 |
+
}
|
3559 |
+
|
3560 |
+
obj.data = data;
|
3561 |
+
callback(obj);
|
3562 |
+
|
3563 |
+
return;
|
3564 |
+
}
|
3565 |
+
}
|
3566 |
+
|
3567 |
+
if (child) {
|
3568 |
+
return true;
|
3569 |
+
}
|
3570 |
+
|
3571 |
+
var tag = self.createTag(params);
|
3572 |
+
|
3573 |
+
if (tag != null) {
|
3574 |
+
var $option = self.option(tag);
|
3575 |
+
$option.attr('data-select2-tag', true);
|
3576 |
+
|
3577 |
+
self.addOptions([$option]);
|
3578 |
+
|
3579 |
+
self.insertTag(data, tag);
|
3580 |
+
}
|
3581 |
+
|
3582 |
+
obj.results = data;
|
3583 |
+
|
3584 |
+
callback(obj);
|
3585 |
+
}
|
3586 |
+
|
3587 |
+
decorated.call(this, params, wrapper);
|
3588 |
+
};
|
3589 |
+
|
3590 |
+
Tags.prototype.createTag = function (decorated, params) {
|
3591 |
+
var term = $.trim(params.term);
|
3592 |
+
|
3593 |
+
if (term === '') {
|
3594 |
+
return null;
|
3595 |
+
}
|
3596 |
+
|
3597 |
+
return {
|
3598 |
+
id: term,
|
3599 |
+
text: term
|
3600 |
+
};
|
3601 |
+
};
|
3602 |
+
|
3603 |
+
Tags.prototype.insertTag = function (_, data, tag) {
|
3604 |
+
data.unshift(tag);
|
3605 |
+
};
|
3606 |
+
|
3607 |
+
Tags.prototype._removeOldTags = function (_) {
|
3608 |
+
var tag = this._lastTag;
|
3609 |
+
|
3610 |
+
var $options = this.$element.find('option[data-select2-tag]');
|
3611 |
+
|
3612 |
+
$options.each(function () {
|
3613 |
+
if (this.selected) {
|
3614 |
+
return;
|
3615 |
+
}
|
3616 |
+
|
3617 |
+
$(this).remove();
|
3618 |
+
});
|
3619 |
+
};
|
3620 |
+
|
3621 |
+
return Tags;
|
3622 |
+
});
|
3623 |
+
|
3624 |
+
S2.define('select2/data/tokenizer',[
|
3625 |
+
'jquery'
|
3626 |
+
], function ($) {
|
3627 |
+
function Tokenizer (decorated, $element, options) {
|
3628 |
+
var tokenizer = options.get('tokenizer');
|
3629 |
+
|
3630 |
+
if (tokenizer !== undefined) {
|
3631 |
+
this.tokenizer = tokenizer;
|
3632 |
+
}
|
3633 |
+
|
3634 |
+
decorated.call(this, $element, options);
|
3635 |
+
}
|
3636 |
+
|
3637 |
+
Tokenizer.prototype.bind = function (decorated, container, $container) {
|
3638 |
+
decorated.call(this, container, $container);
|
3639 |
+
|
3640 |
+
this.$search = container.dropdown.$search || container.selection.$search ||
|
3641 |
+
$container.find('.select2-search__field');
|
3642 |
+
};
|
3643 |
+
|
3644 |
+
Tokenizer.prototype.query = function (decorated, params, callback) {
|
3645 |
+
var self = this;
|
3646 |
+
|
3647 |
+
function createAndSelect (data) {
|
3648 |
+
// Normalize the data object so we can use it for checks
|
3649 |
+
var item = self._normalizeItem(data);
|
3650 |
+
|
3651 |
+
// Check if the data object already exists as a tag
|
3652 |
+
// Select it if it doesn't
|
3653 |
+
var $existingOptions = self.$element.find('option').filter(function () {
|
3654 |
+
return $(this).val() === item.id;
|
3655 |
+
});
|
3656 |
+
|
3657 |
+
// If an existing option wasn't found for it, create the option
|
3658 |
+
if (!$existingOptions.length) {
|
3659 |
+
var $option = self.option(item);
|
3660 |
+
$option.attr('data-select2-tag', true);
|
3661 |
+
|
3662 |
+
self._removeOldTags();
|
3663 |
+
self.addOptions([$option]);
|
3664 |
+
}
|
3665 |
+
|
3666 |
+
// Select the item, now that we know there is an option for it
|
3667 |
+
select(item);
|
3668 |
+
}
|
3669 |
+
|
3670 |
+
function select (data) {
|
3671 |
+
self.trigger('select', {
|
3672 |
+
data: data
|
3673 |
+
});
|
3674 |
+
}
|
3675 |
+
|
3676 |
+
params.term = params.term || '';
|
3677 |
+
|
3678 |
+
var tokenData = this.tokenizer(params, this.options, createAndSelect);
|
3679 |
+
|
3680 |
+
if (tokenData.term !== params.term) {
|
3681 |
+
// Replace the search term if we have the search box
|
3682 |
+
if (this.$search.length) {
|
3683 |
+
this.$search.val(tokenData.term);
|
3684 |
+
this.$search.focus();
|
3685 |
+
}
|
3686 |
+
|
3687 |
+
params.term = tokenData.term;
|
3688 |
+
}
|
3689 |
+
|
3690 |
+
decorated.call(this, params, callback);
|
3691 |
+
};
|
3692 |
+
|
3693 |
+
Tokenizer.prototype.tokenizer = function (_, params, options, callback) {
|
3694 |
+
var separators = options.get('tokenSeparators') || [];
|
3695 |
+
var term = params.term;
|
3696 |
+
var i = 0;
|
3697 |
+
|
3698 |
+
var createTag = this.createTag || function (params) {
|
3699 |
+
return {
|
3700 |
+
id: params.term,
|
3701 |
+
text: params.term
|
3702 |
+
};
|
3703 |
+
};
|
3704 |
+
|
3705 |
+
while (i < term.length) {
|
3706 |
+
var termChar = term[i];
|
3707 |
+
|
3708 |
+
if ($.inArray(termChar, separators) === -1) {
|
3709 |
+
i++;
|
3710 |
+
|
3711 |
+
continue;
|
3712 |
+
}
|
3713 |
+
|
3714 |
+
var part = term.substr(0, i);
|
3715 |
+
var partParams = $.extend({}, params, {
|
3716 |
+
term: part
|
3717 |
+
});
|
3718 |
+
|
3719 |
+
var data = createTag(partParams);
|
3720 |
+
|
3721 |
+
if (data == null) {
|
3722 |
+
i++;
|
3723 |
+
continue;
|
3724 |
+
}
|
3725 |
+
|
3726 |
+
callback(data);
|
3727 |
+
|
3728 |
+
// Reset the term to not include the tokenized portion
|
3729 |
+
term = term.substr(i + 1) || '';
|
3730 |
+
i = 0;
|
3731 |
+
}
|
3732 |
+
|
3733 |
+
return {
|
3734 |
+
term: term
|
3735 |
+
};
|
3736 |
+
};
|
3737 |
+
|
3738 |
+
return Tokenizer;
|
3739 |
+
});
|
3740 |
+
|
3741 |
+
S2.define('select2/data/minimumInputLength',[
|
3742 |
+
|
3743 |
+
], function () {
|
3744 |
+
function MinimumInputLength (decorated, $e, options) {
|
3745 |
+
this.minimumInputLength = options.get('minimumInputLength');
|
3746 |
+
|
3747 |
+
decorated.call(this, $e, options);
|
3748 |
+
}
|
3749 |
+
|
3750 |
+
MinimumInputLength.prototype.query = function (decorated, params, callback) {
|
3751 |
+
params.term = params.term || '';
|
3752 |
+
|
3753 |
+
if (params.term.length < this.minimumInputLength) {
|
3754 |
+
this.trigger('results:message', {
|
3755 |
+
message: 'inputTooShort',
|
3756 |
+
args: {
|
3757 |
+
minimum: this.minimumInputLength,
|
3758 |
+
input: params.term,
|
3759 |
+
params: params
|
3760 |
+
}
|
3761 |
+
});
|
3762 |
+
|
3763 |
+
return;
|
3764 |
+
}
|
3765 |
+
|
3766 |
+
decorated.call(this, params, callback);
|
3767 |
+
};
|
3768 |
+
|
3769 |
+
return MinimumInputLength;
|
3770 |
+
});
|
3771 |
+
|
3772 |
+
S2.define('select2/data/maximumInputLength',[
|
3773 |
+
|
3774 |
+
], function () {
|
3775 |
+
function MaximumInputLength (decorated, $e, options) {
|
3776 |
+
this.maximumInputLength = options.get('maximumInputLength');
|
3777 |
+
|
3778 |
+
decorated.call(this, $e, options);
|
3779 |
+
}
|
3780 |
+
|
3781 |
+
MaximumInputLength.prototype.query = function (decorated, params, callback) {
|
3782 |
+
params.term = params.term || '';
|
3783 |
+
|
3784 |
+
if (this.maximumInputLength > 0 &&
|
3785 |
+
params.term.length > this.maximumInputLength) {
|
3786 |
+
this.trigger('results:message', {
|
3787 |
+
message: 'inputTooLong',
|
3788 |
+
args: {
|
3789 |
+
maximum: this.maximumInputLength,
|
3790 |
+
input: params.term,
|
3791 |
+
params: params
|
3792 |
+
}
|
3793 |
+
});
|
3794 |
+
|
3795 |
+
return;
|
3796 |
+
}
|
3797 |
+
|
3798 |
+
decorated.call(this, params, callback);
|
3799 |
+
};
|
3800 |
+
|
3801 |
+
return MaximumInputLength;
|
3802 |
+
});
|
3803 |
+
|
3804 |
+
S2.define('select2/data/maximumSelectionLength',[
|
3805 |
+
|
3806 |
+
], function (){
|
3807 |
+
function MaximumSelectionLength (decorated, $e, options) {
|
3808 |
+
this.maximumSelectionLength = options.get('maximumSelectionLength');
|
3809 |
+
|
3810 |
+
decorated.call(this, $e, options);
|
3811 |
+
}
|
3812 |
+
|
3813 |
+
MaximumSelectionLength.prototype.query =
|
3814 |
+
function (decorated, params, callback) {
|
3815 |
+
var self = this;
|
3816 |
+
|
3817 |
+
this.current(function (currentData) {
|
3818 |
+
var count = currentData != null ? currentData.length : 0;
|
3819 |
+
if (self.maximumSelectionLength > 0 &&
|
3820 |
+
count >= self.maximumSelectionLength) {
|
3821 |
+
self.trigger('results:message', {
|
3822 |
+
message: 'maximumSelected',
|
3823 |
+
args: {
|
3824 |
+
maximum: self.maximumSelectionLength
|
3825 |
+
}
|
3826 |
+
});
|
3827 |
+
return;
|
3828 |
+
}
|
3829 |
+
decorated.call(self, params, callback);
|
3830 |
+
});
|
3831 |
+
};
|
3832 |
+
|
3833 |
+
return MaximumSelectionLength;
|
3834 |
+
});
|
3835 |
+
|
3836 |
+
S2.define('select2/dropdown',[
|
3837 |
+
'jquery',
|
3838 |
+
'./utils'
|
3839 |
+
], function ($, Utils) {
|
3840 |
+
function Dropdown ($element, options) {
|
3841 |
+
this.$element = $element;
|
3842 |
+
this.options = options;
|
3843 |
+
|
3844 |
+
Dropdown.__super__.constructor.call(this);
|
3845 |
+
}
|
3846 |
+
|
3847 |
+
Utils.Extend(Dropdown, Utils.Observable);
|
3848 |
+
|
3849 |
+
Dropdown.prototype.render = function () {
|
3850 |
+
var $dropdown = $(
|
3851 |
+
'<span class="select2-dropdown">' +
|
3852 |
+
'<span class="select2-results"></span>' +
|
3853 |
+
'</span>'
|
3854 |
+
);
|
3855 |
+
|
3856 |
+
$dropdown.attr('dir', this.options.get('dir'));
|
3857 |
+
|
3858 |
+
this.$dropdown = $dropdown;
|
3859 |
+
|
3860 |
+
return $dropdown;
|
3861 |
+
};
|
3862 |
+
|
3863 |
+
Dropdown.prototype.bind = function () {
|
3864 |
+
// Should be implemented in subclasses
|
3865 |
+
};
|
3866 |
+
|
3867 |
+
Dropdown.prototype.position = function ($dropdown, $container) {
|
3868 |
+
// Should be implmented in subclasses
|
3869 |
+
};
|
3870 |
+
|
3871 |
+
Dropdown.prototype.destroy = function () {
|
3872 |
+
// Remove the dropdown from the DOM
|
3873 |
+
this.$dropdown.remove();
|
3874 |
+
};
|
3875 |
+
|
3876 |
+
return Dropdown;
|
3877 |
+
});
|
3878 |
+
|
3879 |
+
S2.define('select2/dropdown/search',[
|
3880 |
+
'jquery',
|
3881 |
+
'../utils'
|
3882 |
+
], function ($, Utils) {
|
3883 |
+
function Search () { }
|
3884 |
+
|
3885 |
+
Search.prototype.render = function (decorated) {
|
3886 |
+
var $rendered = decorated.call(this);
|
3887 |
+
|
3888 |
+
var $search = $(
|
3889 |
+
'<span class="select2-search select2-search--dropdown">' +
|
3890 |
+
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
3891 |
+
' autocomplete="off" autocorrect="off" autocapitalize="off"' +
|
3892 |
+
' spellcheck="false" role="textbox" />' +
|
3893 |
+
'</span>'
|
3894 |
+
);
|
3895 |
+
|
3896 |
+
this.$searchContainer = $search;
|
3897 |
+
this.$search = $search.find('input');
|
3898 |
+
|
3899 |
+
$rendered.prepend($search);
|
3900 |
+
|
3901 |
+
return $rendered;
|
3902 |
+
};
|
3903 |
+
|
3904 |
+
Search.prototype.bind = function (decorated, container, $container) {
|
3905 |
+
var self = this;
|
3906 |
+
|
3907 |
+
decorated.call(this, container, $container);
|
3908 |
+
|
3909 |
+
this.$search.on('keydown', function (evt) {
|
3910 |
+
self.trigger('keypress', evt);
|
3911 |
+
|
3912 |
+
self._keyUpPrevented = evt.isDefaultPrevented();
|
3913 |
+
});
|
3914 |
+
|
3915 |
+
// Workaround for browsers which do not support the `input` event
|
3916 |
+
// This will prevent double-triggering of events for browsers which support
|
3917 |
+
// both the `keyup` and `input` events.
|
3918 |
+
this.$search.on('input', function (evt) {
|
3919 |
+
// Unbind the duplicated `keyup` event
|
3920 |
+
$(this).off('keyup');
|
3921 |
+
});
|
3922 |
+
|
3923 |
+
this.$search.on('keyup input', function (evt) {
|
3924 |
+
self.handleSearch(evt);
|
3925 |
+
});
|
3926 |
+
|
3927 |
+
container.on('open', function () {
|
3928 |
+
self.$search.attr('tabindex', 0);
|
3929 |
+
|
3930 |
+
self.$search.focus();
|
3931 |
+
|
3932 |
+
window.setTimeout(function () {
|
3933 |
+
self.$search.focus();
|
3934 |
+
}, 0);
|
3935 |
+
});
|
3936 |
+
|
3937 |
+
container.on('close', function () {
|
3938 |
+
self.$search.attr('tabindex', -1);
|
3939 |
+
|
3940 |
+
self.$search.val('');
|
3941 |
+
});
|
3942 |
+
|
3943 |
+
container.on('focus', function () {
|
3944 |
+
if (container.isOpen()) {
|
3945 |
+
self.$search.focus();
|
3946 |
+
}
|
3947 |
+
});
|
3948 |
+
|
3949 |
+
container.on('results:all', function (params) {
|
3950 |
+
if (params.query.term == null || params.query.term === '') {
|
3951 |
+
var showSearch = self.showSearch(params);
|
3952 |
+
|
3953 |
+
if (showSearch) {
|
3954 |
+
self.$searchContainer.removeClass('select2-search--hide');
|
3955 |
+
} else {
|
3956 |
+
self.$searchContainer.addClass('select2-search--hide');
|
3957 |
+
}
|
3958 |
+
}
|
3959 |
+
});
|
3960 |
+
};
|
3961 |
+
|
3962 |
+
Search.prototype.handleSearch = function (evt) {
|
3963 |
+
if (!this._keyUpPrevented) {
|
3964 |
+
var input = this.$search.val();
|
3965 |
+
|
3966 |
+
this.trigger('query', {
|
3967 |
+
term: input
|
3968 |
+
});
|
3969 |
+
}
|
3970 |
+
|
3971 |
+
this._keyUpPrevented = false;
|
3972 |
+
};
|
3973 |
+
|
3974 |
+
Search.prototype.showSearch = function (_, params) {
|
3975 |
+
return true;
|
3976 |
+
};
|
3977 |
+
|
3978 |
+
return Search;
|
3979 |
+
});
|
3980 |
+
|
3981 |
+
S2.define('select2/dropdown/hidePlaceholder',[
|
3982 |
+
|
3983 |
+
], function () {
|
3984 |
+
function HidePlaceholder (decorated, $element, options, dataAdapter) {
|
3985 |
+
this.placeholder = this.normalizePlaceholder(options.get('placeholder'));
|
3986 |
+
|
3987 |
+
decorated.call(this, $element, options, dataAdapter);
|
3988 |
+
}
|
3989 |
+
|
3990 |
+
HidePlaceholder.prototype.append = function (decorated, data) {
|
3991 |
+
data.results = this.removePlaceholder(data.results);
|
3992 |
+
|
3993 |
+
decorated.call(this, data);
|
3994 |
+
};
|
3995 |
+
|
3996 |
+
HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {
|
3997 |
+
if (typeof placeholder === 'string') {
|
3998 |
+
placeholder = {
|
3999 |
+
id: '',
|
4000 |
+
text: placeholder
|
4001 |
+
};
|
4002 |
+
}
|
4003 |
+
|
4004 |
+
return placeholder;
|
4005 |
+
};
|
4006 |
+
|
4007 |
+
HidePlaceholder.prototype.removePlaceholder = function (_, data) {
|
4008 |
+
var modifiedData = data.slice(0);
|
4009 |
+
|
4010 |
+
for (var d = data.length - 1; d >= 0; d--) {
|
4011 |
+
var item = data[d];
|
4012 |
+
|
4013 |
+
if (this.placeholder.id === item.id) {
|
4014 |
+
modifiedData.splice(d, 1);
|
4015 |
+
}
|
4016 |
+
}
|
4017 |
+
|
4018 |
+
return modifiedData;
|
4019 |
+
};
|
4020 |
+
|
4021 |
+
return HidePlaceholder;
|
4022 |
+
});
|
4023 |
+
|
4024 |
+
S2.define('select2/dropdown/infiniteScroll',[
|
4025 |
+
'jquery'
|
4026 |
+
], function ($) {
|
4027 |
+
function InfiniteScroll (decorated, $element, options, dataAdapter) {
|
4028 |
+
this.lastParams = {};
|
4029 |
+
|
4030 |
+
decorated.call(this, $element, options, dataAdapter);
|
4031 |
+
|
4032 |
+
this.$loadingMore = this.createLoadingMore();
|
4033 |
+
this.loading = false;
|
4034 |
+
}
|
4035 |
+
|
4036 |
+
InfiniteScroll.prototype.append = function (decorated, data) {
|
4037 |
+
this.$loadingMore.remove();
|
4038 |
+
this.loading = false;
|
4039 |
+
|
4040 |
+
decorated.call(this, data);
|
4041 |
+
|
4042 |
+
if (this.showLoadingMore(data)) {
|
4043 |
+
this.$results.append(this.$loadingMore);
|
4044 |
+
}
|
4045 |
+
};
|
4046 |
+
|
4047 |
+
InfiniteScroll.prototype.bind = function (decorated, container, $container) {
|
4048 |
+
var self = this;
|
4049 |
+
|
4050 |
+
decorated.call(this, container, $container);
|
4051 |
+
|
4052 |
+
container.on('query', function (params) {
|
4053 |
+
self.lastParams = params;
|
4054 |
+
self.loading = true;
|
4055 |
+
});
|
4056 |
+
|
4057 |
+
container.on('query:append', function (params) {
|
4058 |
+
self.lastParams = params;
|
4059 |
+
self.loading = true;
|
4060 |
+
});
|
4061 |
+
|
4062 |
+
this.$results.on('scroll', function () {
|
4063 |
+
var isLoadMoreVisible = $.contains(
|
4064 |
+
document.documentElement,
|
4065 |
+
self.$loadingMore[0]
|
4066 |
+
);
|
4067 |
+
|
4068 |
+
if (self.loading || !isLoadMoreVisible) {
|
4069 |
+
return;
|
4070 |
+
}
|
4071 |
+
|
4072 |
+
var currentOffset = self.$results.offset().top +
|
4073 |
+
self.$results.outerHeight(false);
|
4074 |
+
var loadingMoreOffset = self.$loadingMore.offset().top +
|
4075 |
+
self.$loadingMore.outerHeight(false);
|
4076 |
+
|
4077 |
+
if (currentOffset + 50 >= loadingMoreOffset) {
|
4078 |
+
self.loadMore();
|
4079 |
+
}
|
4080 |
+
});
|
4081 |
+
};
|
4082 |
+
|
4083 |
+
InfiniteScroll.prototype.loadMore = function () {
|
4084 |
+
this.loading = true;
|
4085 |
+
|
4086 |
+
var params = $.extend({}, {page: 1}, this.lastParams);
|
4087 |
+
|
4088 |
+
params.page++;
|
4089 |
+
|
4090 |
+
this.trigger('query:append', params);
|
4091 |
+
};
|
4092 |
+
|
4093 |
+
InfiniteScroll.prototype.showLoadingMore = function (_, data) {
|
4094 |
+
return data.pagination && data.pagination.more;
|
4095 |
+
};
|
4096 |
+
|
4097 |
+
InfiniteScroll.prototype.createLoadingMore = function () {
|
4098 |
+
var $option = $(
|
4099 |
+
'<li ' +
|
4100 |
+
'class="select2-results__option select2-results__option--load-more"' +
|
4101 |
+
'role="treeitem" aria-disabled="true"></li>'
|
4102 |
+
);
|
4103 |
+
|
4104 |
+
var message = this.options.get('translations').get('loadingMore');
|
4105 |
+
|
4106 |
+
$option.html(message(this.lastParams));
|
4107 |
+
|
4108 |
+
return $option;
|
4109 |
+
};
|
4110 |
+
|
4111 |
+
return InfiniteScroll;
|
4112 |
+
});
|
4113 |
+
|
4114 |
+
S2.define('select2/dropdown/attachBody',[
|
4115 |
+
'jquery',
|
4116 |
+
'../utils'
|
4117 |
+
], function ($, Utils) {
|
4118 |
+
function AttachBody (decorated, $element, options) {
|
4119 |
+
this.$dropdownParent = options.get('dropdownParent') || $(document.body);
|
4120 |
+
|
4121 |
+
decorated.call(this, $element, options);
|
4122 |
+
}
|
4123 |
+
|
4124 |
+
AttachBody.prototype.bind = function (decorated, container, $container) {
|
4125 |
+
var self = this;
|
4126 |
+
|
4127 |
+
var setupResultsEvents = false;
|
4128 |
+
|
4129 |
+
decorated.call(this, container, $container);
|
4130 |
+
|
4131 |
+
container.on('open', function () {
|
4132 |
+
self._showDropdown();
|
4133 |
+
self._attachPositioningHandler(container);
|
4134 |
+
|
4135 |
+
if (!setupResultsEvents) {
|
4136 |
+
setupResultsEvents = true;
|
4137 |
+
|
4138 |
+
container.on('results:all', function () {
|
4139 |
+
self._positionDropdown();
|
4140 |
+
self._resizeDropdown();
|
4141 |
+
});
|
4142 |
+
|
4143 |
+
container.on('results:append', function () {
|
4144 |
+
self._positionDropdown();
|
4145 |
+
self._resizeDropdown();
|
4146 |
+
});
|
4147 |
+
}
|
4148 |
+
});
|
4149 |
+
|
4150 |
+
container.on('close', function () {
|
4151 |
+
self._hideDropdown();
|
4152 |
+
self._detachPositioningHandler(container);
|
4153 |
+
});
|
4154 |
+
|
4155 |
+
this.$dropdownContainer.on('mousedown', function (evt) {
|
4156 |
+
evt.stopPropagation();
|
4157 |
+
});
|
4158 |
+
};
|
4159 |
+
|
4160 |
+
AttachBody.prototype.destroy = function (decorated) {
|
4161 |
+
decorated.call(this);
|
4162 |
+
|
4163 |
+
this.$dropdownContainer.remove();
|
4164 |
+
};
|
4165 |
+
|
4166 |
+
AttachBody.prototype.position = function (decorated, $dropdown, $container) {
|
4167 |
+
// Clone all of the container classes
|
4168 |
+
$dropdown.attr('class', $container.attr('class'));
|
4169 |
+
|
4170 |
+
$dropdown.removeClass('select2');
|
4171 |
+
$dropdown.addClass('select2-container--open');
|
4172 |
+
|
4173 |
+
$dropdown.css({
|
4174 |
+
position: 'absolute',
|
4175 |
+
top: -999999
|
4176 |
+
});
|
4177 |
+
|
4178 |
+
this.$container = $container;
|
4179 |
+
};
|
4180 |
+
|
4181 |
+
AttachBody.prototype.render = function (decorated) {
|
4182 |
+
var $container = $('<span></span>');
|
4183 |
+
|
4184 |
+
var $dropdown = decorated.call(this);
|
4185 |
+
$container.append($dropdown);
|
4186 |
+
|
4187 |
+
this.$dropdownContainer = $container;
|
4188 |
+
|
4189 |
+
return $container;
|
4190 |
+
};
|
4191 |
+
|
4192 |
+
AttachBody.prototype._hideDropdown = function (decorated) {
|
4193 |
+
this.$dropdownContainer.detach();
|
4194 |
+
};
|
4195 |
+
|
4196 |
+
AttachBody.prototype._attachPositioningHandler =
|
4197 |
+
function (decorated, container) {
|
4198 |
+
var self = this;
|
4199 |
+
|
4200 |
+
var scrollEvent = 'scroll.select2.' + container.id;
|
4201 |
+
var resizeEvent = 'resize.select2.' + container.id;
|
4202 |
+
var orientationEvent = 'orientationchange.select2.' + container.id;
|
4203 |
+
|
4204 |
+
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4205 |
+
$watchers.each(function () {
|
4206 |
+
$(this).data('select2-scroll-position', {
|
4207 |
+
x: $(this).scrollLeft(),
|
4208 |
+
y: $(this).scrollTop()
|
4209 |
+
});
|
4210 |
+
});
|
4211 |
+
|
4212 |
+
$watchers.on(scrollEvent, function (ev) {
|
4213 |
+
var position = $(this).data('select2-scroll-position');
|
4214 |
+
$(this).scrollTop(position.y);
|
4215 |
+
});
|
4216 |
+
|
4217 |
+
$(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
|
4218 |
+
function (e) {
|
4219 |
+
self._positionDropdown();
|
4220 |
+
self._resizeDropdown();
|
4221 |
+
});
|
4222 |
+
};
|
4223 |
+
|
4224 |
+
AttachBody.prototype._detachPositioningHandler =
|
4225 |
+
function (decorated, container) {
|
4226 |
+
var scrollEvent = 'scroll.select2.' + container.id;
|
4227 |
+
var resizeEvent = 'resize.select2.' + container.id;
|
4228 |
+
var orientationEvent = 'orientationchange.select2.' + container.id;
|
4229 |
+
|
4230 |
+
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4231 |
+
$watchers.off(scrollEvent);
|
4232 |
+
|
4233 |
+
$(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
|
4234 |
+
};
|
4235 |
+
|
4236 |
+
AttachBody.prototype._positionDropdown = function () {
|
4237 |
+
var $window = $(window);
|
4238 |
+
|
4239 |
+
var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');
|
4240 |
+
var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');
|
4241 |
+
|
4242 |
+
var newDirection = null;
|
4243 |
+
|
4244 |
+
var offset = this.$container.offset();
|
4245 |
+
|
4246 |
+
offset.bottom = offset.top + this.$container.outerHeight(false);
|
4247 |
+
|
4248 |
+
var container = {
|
4249 |
+
height: this.$container.outerHeight(false)
|
4250 |
+
};
|
4251 |
+
|
4252 |
+
container.top = offset.top;
|
4253 |
+
container.bottom = offset.top + container.height;
|
4254 |
+
|
4255 |
+
var dropdown = {
|
4256 |
+
height: this.$dropdown.outerHeight(false)
|
4257 |
+
};
|
4258 |
+
|
4259 |
+
var viewport = {
|
4260 |
+
top: $window.scrollTop(),
|
4261 |
+
bottom: $window.scrollTop() + $window.height()
|
4262 |
+
};
|
4263 |
+
|
4264 |
+
var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);
|
4265 |
+
var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);
|
4266 |
+
|
4267 |
+
var css = {
|
4268 |
+
left: offset.left,
|
4269 |
+
top: container.bottom
|
4270 |
+
};
|
4271 |
+
|
4272 |
+
// Determine what the parent element is to use for calciulating the offset
|
4273 |
+
var $offsetParent = this.$dropdownParent;
|
4274 |
+
|
4275 |
+
// For statically positoned elements, we need to get the element
|
4276 |
+
// that is determining the offset
|
4277 |
+
if ($offsetParent.css('position') === 'static') {
|
4278 |
+
$offsetParent = $offsetParent.offsetParent();
|
4279 |
+
}
|
4280 |
+
|
4281 |
+
var parentOffset = $offsetParent.offset();
|
4282 |
+
|
4283 |
+
css.top -= parentOffset.top;
|
4284 |
+
css.left -= parentOffset.left;
|
4285 |
+
|
4286 |
+
if (!isCurrentlyAbove && !isCurrentlyBelow) {
|
4287 |
+
newDirection = 'below';
|
4288 |
+
}
|
4289 |
+
|
4290 |
+
if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {
|
4291 |
+
newDirection = 'above';
|
4292 |
+
} else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {
|
4293 |
+
newDirection = 'below';
|
4294 |
+
}
|
4295 |
+
|
4296 |
+
if (newDirection == 'above' ||
|
4297 |
+
(isCurrentlyAbove && newDirection !== 'below')) {
|
4298 |
+
css.top = container.top - parentOffset.top - dropdown.height;
|
4299 |
+
}
|
4300 |
+
|
4301 |
+
if (newDirection != null) {
|
4302 |
+
this.$dropdown
|
4303 |
+
.removeClass('select2-dropdown--below select2-dropdown--above')
|
4304 |
+
.addClass('select2-dropdown--' + newDirection);
|
4305 |
+
this.$container
|
4306 |
+
.removeClass('select2-container--below select2-container--above')
|
4307 |
+
.addClass('select2-container--' + newDirection);
|
4308 |
+
}
|
4309 |
+
|
4310 |
+
this.$dropdownContainer.css(css);
|
4311 |
+
};
|
4312 |
+
|
4313 |
+
AttachBody.prototype._resizeDropdown = function () {
|
4314 |
+
var css = {
|
4315 |
+
width: this.$container.outerWidth(false) + 'px'
|
4316 |
+
};
|
4317 |
+
|
4318 |
+
if (this.options.get('dropdownAutoWidth')) {
|
4319 |
+
css.minWidth = css.width;
|
4320 |
+
css.position = 'relative';
|
4321 |
+
css.width = 'auto';
|
4322 |
+
}
|
4323 |
+
|
4324 |
+
this.$dropdown.css(css);
|
4325 |
+
};
|
4326 |
+
|
4327 |
+
AttachBody.prototype._showDropdown = function (decorated) {
|
4328 |
+
this.$dropdownContainer.appendTo(this.$dropdownParent);
|
4329 |
+
|
4330 |
+
this._positionDropdown();
|
4331 |
+
this._resizeDropdown();
|
4332 |
+
};
|
4333 |
+
|
4334 |
+
return AttachBody;
|
4335 |
+
});
|
4336 |
+
|
4337 |
+
S2.define('select2/dropdown/minimumResultsForSearch',[
|
4338 |
+
|
4339 |
+
], function () {
|
4340 |
+
function countResults (data) {
|
4341 |
+
var count = 0;
|
4342 |
+
|
4343 |
+
for (var d = 0; d < data.length; d++) {
|
4344 |
+
var item = data[d];
|
4345 |
+
|
4346 |
+
if (item.children) {
|
4347 |
+
count += countResults(item.children);
|
4348 |
+
} else {
|
4349 |
+
count++;
|
4350 |
+
}
|
4351 |
+
}
|
4352 |
+
|
4353 |
+
return count;
|
4354 |
+
}
|
4355 |
+
|
4356 |
+
function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {
|
4357 |
+
this.minimumResultsForSearch = options.get('minimumResultsForSearch');
|
4358 |
+
|
4359 |
+
if (this.minimumResultsForSearch < 0) {
|
4360 |
+
this.minimumResultsForSearch = Infinity;
|
4361 |
+
}
|
4362 |
+
|
4363 |
+
decorated.call(this, $element, options, dataAdapter);
|
4364 |
+
}
|
4365 |
+
|
4366 |
+
MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {
|
4367 |
+
if (countResults(params.data.results) < this.minimumResultsForSearch) {
|
4368 |
+
return false;
|
4369 |
+
}
|
4370 |
+
|
4371 |
+
return decorated.call(this, params);
|
4372 |
+
};
|
4373 |
+
|
4374 |
+
return MinimumResultsForSearch;
|
4375 |
+
});
|
4376 |
+
|
4377 |
+
S2.define('select2/dropdown/selectOnClose',[
|
4378 |
+
|
4379 |
+
], function () {
|
4380 |
+
function SelectOnClose () { }
|
4381 |
+
|
4382 |
+
SelectOnClose.prototype.bind = function (decorated, container, $container) {
|
4383 |
+
var self = this;
|
4384 |
+
|
4385 |
+
decorated.call(this, container, $container);
|
4386 |
+
|
4387 |
+
container.on('close', function (params) {
|
4388 |
+
self._handleSelectOnClose(params);
|
4389 |
+
});
|
4390 |
+
};
|
4391 |
+
|
4392 |
+
SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
|
4393 |
+
if (params && params.originalSelect2Event != null) {
|
4394 |
+
var event = params.originalSelect2Event;
|
4395 |
+
|
4396 |
+
// Don't select an item if the close event was triggered from a select or
|
4397 |
+
// unselect event
|
4398 |
+
if (event._type === 'select' || event._type === 'unselect') {
|
4399 |
+
return;
|
4400 |
+
}
|
4401 |
+
}
|
4402 |
+
|
4403 |
+
var $highlightedResults = this.getHighlightedResults();
|
4404 |
+
|
4405 |
+
// Only select highlighted results
|
4406 |
+
if ($highlightedResults.length < 1) {
|
4407 |
+
return;
|
4408 |
+
}
|
4409 |
+
|
4410 |
+
var data = $highlightedResults.data('data');
|
4411 |
+
|
4412 |
+
// Don't re-select already selected resulte
|
4413 |
+
if (
|
4414 |
+
(data.element != null && data.element.selected) ||
|
4415 |
+
(data.element == null && data.selected)
|
4416 |
+
) {
|
4417 |
+
return;
|
4418 |
+
}
|
4419 |
+
|
4420 |
+
this.trigger('select', {
|
4421 |
+
data: data
|
4422 |
+
});
|
4423 |
+
};
|
4424 |
+
|
4425 |
+
return SelectOnClose;
|
4426 |
+
});
|
4427 |
+
|
4428 |
+
S2.define('select2/dropdown/closeOnSelect',[
|
4429 |
+
|
4430 |
+
], function () {
|
4431 |
+
function CloseOnSelect () { }
|
4432 |
+
|
4433 |
+
CloseOnSelect.prototype.bind = function (decorated, container, $container) {
|
4434 |
+
var self = this;
|
4435 |
+
|
4436 |
+
decorated.call(this, container, $container);
|
4437 |
+
|
4438 |
+
container.on('select', function (evt) {
|
4439 |
+
self._selectTriggered(evt);
|
4440 |
+
});
|
4441 |
+
|
4442 |
+
container.on('unselect', function (evt) {
|
4443 |
+
self._selectTriggered(evt);
|
4444 |
+
});
|
4445 |
+
};
|
4446 |
+
|
4447 |
+
CloseOnSelect.prototype._selectTriggered = function (_, evt) {
|
4448 |
+
var originalEvent = evt.originalEvent;
|
4449 |
+
|
4450 |
+
// Don't close if the control key is being held
|
4451 |
+
if (originalEvent && originalEvent.ctrlKey) {
|
4452 |
+
return;
|
4453 |
+
}
|
4454 |
+
|
4455 |
+
this.trigger('close', {
|
4456 |
+
originalEvent: originalEvent,
|
4457 |
+
originalSelect2Event: evt
|
4458 |
+
});
|
4459 |
+
};
|
4460 |
+
|
4461 |
+
return CloseOnSelect;
|
4462 |
+
});
|
4463 |
+
|
4464 |
+
S2.define('select2/i18n/en',[],function () {
|
4465 |
+
// English
|
4466 |
+
return {
|
4467 |
+
errorLoading: function () {
|
4468 |
+
return 'The results could not be loaded.';
|
4469 |
+
},
|
4470 |
+
inputTooLong: function (args) {
|
4471 |
+
var overChars = args.input.length - args.maximum;
|
4472 |
+
|
4473 |
+
var message = 'Please delete ' + overChars + ' character';
|
4474 |
+
|
4475 |
+
if (overChars != 1) {
|
4476 |
+
message += 's';
|
4477 |
+
}
|
4478 |
+
|
4479 |
+
return message;
|
4480 |
+
},
|
4481 |
+
inputTooShort: function (args) {
|
4482 |
+
var remainingChars = args.minimum - args.input.length;
|
4483 |
+
|
4484 |
+
var message = 'Please enter ' + remainingChars + ' or more characters';
|
4485 |
+
|
4486 |
+
return message;
|
4487 |
+
},
|
4488 |
+
loadingMore: function () {
|
4489 |
+
return 'Loading more results…';
|
4490 |
+
},
|
4491 |
+
maximumSelected: function (args) {
|
4492 |
+
var message = 'You can only select ' + args.maximum + ' item';
|
4493 |
+
|
4494 |
+
if (args.maximum != 1) {
|
4495 |
+
message += 's';
|
4496 |
+
}
|
4497 |
+
|
4498 |
+
return message;
|
4499 |
+
},
|
4500 |
+
noResults: function () {
|
4501 |
+
return 'No results found';
|
4502 |
+
},
|
4503 |
+
searching: function () {
|
4504 |
+
return 'Searching…';
|
4505 |
+
}
|
4506 |
+
};
|
4507 |
+
});
|
4508 |
+
|
4509 |
+
S2.define('select2/defaults',[
|
4510 |
+
'jquery',
|
4511 |
+
'require',
|
4512 |
+
|
4513 |
+
'./results',
|
4514 |
+
|
4515 |
+
'./selection/single',
|
4516 |
+
'./selection/multiple',
|
4517 |
+
'./selection/placeholder',
|
4518 |
+
'./selection/allowClear',
|
4519 |
+
'./selection/search',
|
4520 |
+
'./selection/eventRelay',
|
4521 |
+
|
4522 |
+
'./utils',
|
4523 |
+
'./translation',
|
4524 |
+
'./diacritics',
|
4525 |
+
|
4526 |
+
'./data/select',
|
4527 |
+
'./data/array',
|
4528 |
+
'./data/ajax',
|
4529 |
+
'./data/tags',
|
4530 |
+
'./data/tokenizer',
|
4531 |
+
'./data/minimumInputLength',
|
4532 |
+
'./data/maximumInputLength',
|
4533 |
+
'./data/maximumSelectionLength',
|
4534 |
+
|
4535 |
+
'./dropdown',
|
4536 |
+
'./dropdown/search',
|
4537 |
+
'./dropdown/hidePlaceholder',
|
4538 |
+
'./dropdown/infiniteScroll',
|
4539 |
+
'./dropdown/attachBody',
|
4540 |
+
'./dropdown/minimumResultsForSearch',
|
4541 |
+
'./dropdown/selectOnClose',
|
4542 |
+
'./dropdown/closeOnSelect',
|
4543 |
+
|
4544 |
+
'./i18n/en'
|
4545 |
+
], function ($, require,
|
4546 |
+
|
4547 |
+
ResultsList,
|
4548 |
+
|
4549 |
+
SingleSelection, MultipleSelection, Placeholder, AllowClear,
|
4550 |
+
SelectionSearch, EventRelay,
|
4551 |
+
|
4552 |
+
Utils, Translation, DIACRITICS,
|
4553 |
+
|
4554 |
+
SelectData, ArrayData, AjaxData, Tags, Tokenizer,
|
4555 |
+
MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
|
4556 |
+
|
4557 |
+
Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
|
4558 |
+
AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
|
4559 |
+
|
4560 |
+
EnglishTranslation) {
|
4561 |
+
function Defaults () {
|
4562 |
+
this.reset();
|
4563 |
+
}
|
4564 |
+
|
4565 |
+
Defaults.prototype.apply = function (options) {
|
4566 |
+
options = $.extend(true, {}, this.defaults, options);
|
4567 |
+
|
4568 |
+
if (options.dataAdapter == null) {
|
4569 |
+
if (options.ajax != null) {
|
4570 |
+
options.dataAdapter = AjaxData;
|
4571 |
+
} else if (options.data != null) {
|
4572 |
+
options.dataAdapter = ArrayData;
|
4573 |
+
} else {
|
4574 |
+
options.dataAdapter = SelectData;
|
4575 |
+
}
|
4576 |
+
|
4577 |
+
if (options.minimumInputLength > 0) {
|
4578 |
+
options.dataAdapter = Utils.Decorate(
|
4579 |
+
options.dataAdapter,
|
4580 |
+
MinimumInputLength
|
4581 |
+
);
|
4582 |
+
}
|
4583 |
+
|
4584 |
+
if (options.maximumInputLength > 0) {
|
4585 |
+
options.dataAdapter = Utils.Decorate(
|
4586 |
+
options.dataAdapter,
|
4587 |
+
MaximumInputLength
|
4588 |
+
);
|
4589 |
+
}
|
4590 |
+
|
4591 |
+
if (options.maximumSelectionLength > 0) {
|
4592 |
+
options.dataAdapter = Utils.Decorate(
|
4593 |
+
options.dataAdapter,
|
4594 |
+
MaximumSelectionLength
|
4595 |
+
);
|
4596 |
+
}
|
4597 |
+
|
4598 |
+
if (options.tags) {
|
4599 |
+
options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);
|
4600 |
+
}
|
4601 |
+
|
4602 |
+
if (options.tokenSeparators != null || options.tokenizer != null) {
|
4603 |
+
options.dataAdapter = Utils.Decorate(
|
4604 |
+
options.dataAdapter,
|
4605 |
+
Tokenizer
|
4606 |
+
);
|
4607 |
+
}
|
4608 |
+
|
4609 |
+
if (options.query != null) {
|
4610 |
+
var Query = require(options.amdBase + 'compat/query');
|
4611 |
+
|
4612 |
+
options.dataAdapter = Utils.Decorate(
|
4613 |
+
options.dataAdapter,
|
4614 |
+
Query
|
4615 |
+
);
|
4616 |
+
}
|
4617 |
+
|
4618 |
+
if (options.initSelection != null) {
|
4619 |
+
var InitSelection = require(options.amdBase + 'compat/initSelection');
|
4620 |
+
|
4621 |
+
options.dataAdapter = Utils.Decorate(
|
4622 |
+
options.dataAdapter,
|
4623 |
+
InitSelection
|
4624 |
+
);
|
4625 |
+
}
|
4626 |
+
}
|
4627 |
+
|
4628 |
+
if (options.resultsAdapter == null) {
|
4629 |
+
options.resultsAdapter = ResultsList;
|
4630 |
+
|
4631 |
+
if (options.ajax != null) {
|
4632 |
+
options.resultsAdapter = Utils.Decorate(
|
4633 |
+
options.resultsAdapter,
|
4634 |
+
InfiniteScroll
|
4635 |
+
);
|
4636 |
+
}
|
4637 |
+
|
4638 |
+
if (options.placeholder != null) {
|
4639 |
+
options.resultsAdapter = Utils.Decorate(
|
4640 |
+
options.resultsAdapter,
|
4641 |
+
HidePlaceholder
|
4642 |
+
);
|
4643 |
+
}
|
4644 |
+
|
4645 |
+
if (options.selectOnClose) {
|
4646 |
+
options.resultsAdapter = Utils.Decorate(
|
4647 |
+
options.resultsAdapter,
|
4648 |
+
SelectOnClose
|
4649 |
+
);
|
4650 |
+
}
|
4651 |
+
}
|
4652 |
+
|
4653 |
+
if (options.dropdownAdapter == null) {
|
4654 |
+
if (options.multiple) {
|
4655 |
+
options.dropdownAdapter = Dropdown;
|
4656 |
+
} else {
|
4657 |
+
var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);
|
4658 |
+
|
4659 |
+
options.dropdownAdapter = SearchableDropdown;
|
4660 |
+
}
|
4661 |
+
|
4662 |
+
if (options.minimumResultsForSearch !== 0) {
|
4663 |
+
options.dropdownAdapter = Utils.Decorate(
|
4664 |
+
options.dropdownAdapter,
|
4665 |
+
MinimumResultsForSearch
|
4666 |
+
);
|
4667 |
+
}
|
4668 |
+
|
4669 |
+
if (options.closeOnSelect) {
|
4670 |
+
options.dropdownAdapter = Utils.Decorate(
|
4671 |
+
options.dropdownAdapter,
|
4672 |
+
CloseOnSelect
|
4673 |
+
);
|
4674 |
+
}
|
4675 |
+
|
4676 |
+
if (
|
4677 |
+
options.dropdownCssClass != null ||
|
4678 |
+
options.dropdownCss != null ||
|
4679 |
+
options.adaptDropdownCssClass != null
|
4680 |
+
) {
|
4681 |
+
var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
|
4682 |
+
|
4683 |
+
options.dropdownAdapter = Utils.Decorate(
|
4684 |
+
options.dropdownAdapter,
|
4685 |
+
DropdownCSS
|
4686 |
+
);
|
4687 |
+
}
|
4688 |
+
|
4689 |
+
options.dropdownAdapter = Utils.Decorate(
|
4690 |
+
options.dropdownAdapter,
|
4691 |
+
AttachBody
|
4692 |
+
);
|
4693 |
+
}
|
4694 |
+
|
4695 |
+
if (options.selectionAdapter == null) {
|
4696 |
+
if (options.multiple) {
|
4697 |
+
options.selectionAdapter = MultipleSelection;
|
4698 |
+
} else {
|
4699 |
+
options.selectionAdapter = SingleSelection;
|
4700 |
+
}
|
4701 |
+
|
4702 |
+
// Add the placeholder mixin if a placeholder was specified
|
4703 |
+
if (options.placeholder != null) {
|
4704 |
+
options.selectionAdapter = Utils.Decorate(
|
4705 |
+
options.selectionAdapter,
|
4706 |
+
Placeholder
|
4707 |
+
);
|
4708 |
+
}
|
4709 |
+
|
4710 |
+
if (options.allowClear) {
|
4711 |
+
options.selectionAdapter = Utils.Decorate(
|
4712 |
+
options.selectionAdapter,
|
4713 |
+
AllowClear
|
4714 |
+
);
|
4715 |
+
}
|
4716 |
+
|
4717 |
+
if (options.multiple) {
|
4718 |
+
options.selectionAdapter = Utils.Decorate(
|
4719 |
+
options.selectionAdapter,
|
4720 |
+
SelectionSearch
|
4721 |
+
);
|
4722 |
+
}
|
4723 |
+
|
4724 |
+
if (
|
4725 |
+
options.containerCssClass != null ||
|
4726 |
+
options.containerCss != null ||
|
4727 |
+
options.adaptContainerCssClass != null
|
4728 |
+
) {
|
4729 |
+
var ContainerCSS = require(options.amdBase + 'compat/containerCss');
|
4730 |
+
|
4731 |
+
options.selectionAdapter = Utils.Decorate(
|
4732 |
+
options.selectionAdapter,
|
4733 |
+
ContainerCSS
|
4734 |
+
);
|
4735 |
+
}
|
4736 |
+
|
4737 |
+
options.selectionAdapter = Utils.Decorate(
|
4738 |
+
options.selectionAdapter,
|
4739 |
+
EventRelay
|
4740 |
+
);
|
4741 |
+
}
|
4742 |
+
|
4743 |
+
if (typeof options.language === 'string') {
|
4744 |
+
// Check if the language is specified with a region
|
4745 |
+
if (options.language.indexOf('-') > 0) {
|
4746 |
+
// Extract the region information if it is included
|
4747 |
+
var languageParts = options.language.split('-');
|
4748 |
+
var baseLanguage = languageParts[0];
|
4749 |
+
|
4750 |
+
options.language = [options.language, baseLanguage];
|
4751 |
+
} else {
|
4752 |
+
options.language = [options.language];
|
4753 |
+
}
|
4754 |
+
}
|
4755 |
+
|
4756 |
+
if ($.isArray(options.language)) {
|
4757 |
+
var languages = new Translation();
|
4758 |
+
options.language.push('en');
|
4759 |
+
|
4760 |
+
var languageNames = options.language;
|
4761 |
+
|
4762 |
+
for (var l = 0; l < languageNames.length; l++) {
|
4763 |
+
var name = languageNames[l];
|
4764 |
+
var language = {};
|
4765 |
+
|
4766 |
+
try {
|
4767 |
+
// Try to load it with the original name
|
4768 |
+
language = Translation.loadPath(name);
|
4769 |
+
} catch (e) {
|
4770 |
+
try {
|
4771 |
+
// If we couldn't load it, check if it wasn't the full path
|
4772 |
+
name = this.defaults.amdLanguageBase + name;
|
4773 |
+
language = Translation.loadPath(name);
|
4774 |
+
} catch (ex) {
|
4775 |
+
// The translation could not be loaded at all. Sometimes this is
|
4776 |
+
// because of a configuration problem, other times this can be
|
4777 |
+
// because of how Select2 helps load all possible translation files.
|
4778 |
+
if (options.debug && window.console && console.warn) {
|
4779 |
+
console.warn(
|
4780 |
+
'Select2: The language file for "' + name + '" could not be ' +
|
4781 |
+
'automatically loaded. A fallback will be used instead.'
|
4782 |
+
);
|
4783 |
+
}
|
4784 |
+
|
4785 |
+
continue;
|
4786 |
+
}
|
4787 |
+
}
|
4788 |
+
|
4789 |
+
languages.extend(language);
|
4790 |
+
}
|
4791 |
+
|
4792 |
+
options.translations = languages;
|
4793 |
+
} else {
|
4794 |
+
var baseTranslation = Translation.loadPath(
|
4795 |
+
this.defaults.amdLanguageBase + 'en'
|
4796 |
+
);
|
4797 |
+
var customTranslation = new Translation(options.language);
|
4798 |
+
|
4799 |
+
customTranslation.extend(baseTranslation);
|
4800 |
+
|
4801 |
+
options.translations = customTranslation;
|
4802 |
+
}
|
4803 |
+
|
4804 |
+
return options;
|
4805 |
+
};
|
4806 |
+
|
4807 |
+
Defaults.prototype.reset = function () {
|
4808 |
+
function stripDiacritics (text) {
|
4809 |
+
// Used 'uni range + named function' from http://jsperf.com/diacritics/18
|
4810 |
+
function match(a) {
|
4811 |
+
return DIACRITICS[a] || a;
|
4812 |
+
}
|
4813 |
+
|
4814 |
+
return text.replace(/[^\u0000-\u007E]/g, match);
|
4815 |
+
}
|
4816 |
+
|
4817 |
+
function matcher (params, data) {
|
4818 |
+
// Always return the object if there is nothing to compare
|
4819 |
+
if ($.trim(params.term) === '') {
|
4820 |
+
return data;
|
4821 |
+
}
|
4822 |
+
|
4823 |
+
// Do a recursive check for options with children
|
4824 |
+
if (data.children && data.children.length > 0) {
|
4825 |
+
// Clone the data object if there are children
|
4826 |
+
// This is required as we modify the object to remove any non-matches
|
4827 |
+
var match = $.extend(true, {}, data);
|
4828 |
+
|
4829 |
+
// Check each child of the option
|
4830 |
+
for (var c = data.children.length - 1; c >= 0; c--) {
|
4831 |
+
var child = data.children[c];
|
4832 |
+
|
4833 |
+
var matches = matcher(params, child);
|
4834 |
+
|
4835 |
+
// If there wasn't a match, remove the object in the array
|
4836 |
+
if (matches == null) {
|
4837 |
+
match.children.splice(c, 1);
|
4838 |
+
}
|
4839 |
+
}
|
4840 |
+
|
4841 |
+
// If any children matched, return the new object
|
4842 |
+
if (match.children.length > 0) {
|
4843 |
+
return match;
|
4844 |
+
}
|
4845 |
+
|
4846 |
+
// If there were no matching children, check just the plain object
|
4847 |
+
return matcher(params, match);
|
4848 |
+
}
|
4849 |
+
|
4850 |
+
var original = stripDiacritics(data.text).toUpperCase();
|
4851 |
+
var term = stripDiacritics(params.term).toUpperCase();
|
4852 |
+
|
4853 |
+
// Check if the text contains the term
|
4854 |
+
if (original.indexOf(term) > -1) {
|
4855 |
+
return data;
|
4856 |
+
}
|
4857 |
+
|
4858 |
+
// If it doesn't contain the term, don't return anything
|
4859 |
+
return null;
|
4860 |
+
}
|
4861 |
+
|
4862 |
+
this.defaults = {
|
4863 |
+
amdBase: './',
|
4864 |
+
amdLanguageBase: './i18n/',
|
4865 |
+
closeOnSelect: true,
|
4866 |
+
debug: false,
|
4867 |
+
dropdownAutoWidth: false,
|
4868 |
+
escapeMarkup: Utils.escapeMarkup,
|
4869 |
+
language: EnglishTranslation,
|
4870 |
+
matcher: matcher,
|
4871 |
+
minimumInputLength: 0,
|
4872 |
+
maximumInputLength: 0,
|
4873 |
+
maximumSelectionLength: 0,
|
4874 |
+
minimumResultsForSearch: 0,
|
4875 |
+
selectOnClose: false,
|
4876 |
+
sorter: function (data) {
|
4877 |
+
return data;
|
4878 |
+
},
|
4879 |
+
templateResult: function (result) {
|
4880 |
+
return result.text;
|
4881 |
+
},
|
4882 |
+
templateSelection: function (selection) {
|
4883 |
+
return selection.text;
|
4884 |
+
},
|
4885 |
+
theme: 'default',
|
4886 |
+
width: 'resolve'
|
4887 |
+
};
|
4888 |
+
};
|
4889 |
+
|
4890 |
+
Defaults.prototype.set = function (key, value) {
|
4891 |
+
var camelKey = $.camelCase(key);
|
4892 |
+
|
4893 |
+
var data = {};
|
4894 |
+
data[camelKey] = value;
|
4895 |
+
|
4896 |
+
var convertedData = Utils._convertData(data);
|
4897 |
+
|
4898 |
+
$.extend(this.defaults, convertedData);
|
4899 |
+
};
|
4900 |
+
|
4901 |
+
var defaults = new Defaults();
|
4902 |
+
|
4903 |
+
return defaults;
|
4904 |
+
});
|
4905 |
+
|
4906 |
+
S2.define('select2/options',[
|
4907 |
+
'require',
|
4908 |
+
'jquery',
|
4909 |
+
'./defaults',
|
4910 |
+
'./utils'
|
4911 |
+
], function (require, $, Defaults, Utils) {
|
4912 |
+
function Options (options, $element) {
|
4913 |
+
this.options = options;
|
4914 |
+
|
4915 |
+
if ($element != null) {
|
4916 |
+
this.fromElement($element);
|
4917 |
+
}
|
4918 |
+
|
4919 |
+
this.options = Defaults.apply(this.options);
|
4920 |
+
|
4921 |
+
if ($element && $element.is('input')) {
|
4922 |
+
var InputCompat = require(this.get('amdBase') + 'compat/inputData');
|
4923 |
+
|
4924 |
+
this.options.dataAdapter = Utils.Decorate(
|
4925 |
+
this.options.dataAdapter,
|
4926 |
+
InputCompat
|
4927 |
+
);
|
4928 |
+
}
|
4929 |
+
}
|
4930 |
+
|
4931 |
+
Options.prototype.fromElement = function ($e) {
|
4932 |
+
var excludedData = ['select2'];
|
4933 |
+
|
4934 |
+
if (this.options.multiple == null) {
|
4935 |
+
this.options.multiple = $e.prop('multiple');
|
4936 |
+
}
|
4937 |
+
|
4938 |
+
if (this.options.disabled == null) {
|
4939 |
+
this.options.disabled = $e.prop('disabled');
|
4940 |
+
}
|
4941 |
+
|
4942 |
+
if (this.options.language == null) {
|
4943 |
+
if ($e.prop('lang')) {
|
4944 |
+
this.options.language = $e.prop('lang').toLowerCase();
|
4945 |
+
} else if ($e.closest('[lang]').prop('lang')) {
|
4946 |
+
this.options.language = $e.closest('[lang]').prop('lang');
|
4947 |
+
}
|
4948 |
+
}
|
4949 |
+
|
4950 |
+
if (this.options.dir == null) {
|
4951 |
+
if ($e.prop('dir')) {
|
4952 |
+
this.options.dir = $e.prop('dir');
|
4953 |
+
} else if ($e.closest('[dir]').prop('dir')) {
|
4954 |
+
this.options.dir = $e.closest('[dir]').prop('dir');
|
4955 |
+
} else {
|
4956 |
+
this.options.dir = 'ltr';
|
4957 |
+
}
|
4958 |
+
}
|
4959 |
+
|
4960 |
+
$e.prop('disabled', this.options.disabled);
|
4961 |
+
$e.prop('multiple', this.options.multiple);
|
4962 |
+
|
4963 |
+
if ($e.data('select2Tags')) {
|
4964 |
+
if (this.options.debug && window.console && console.warn) {
|
4965 |
+
console.warn(
|
4966 |
+
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
4967 |
+
'use the `data-data` and `data-tags="true"` attributes and will be ' +
|
4968 |
+
'removed in future versions of Select2.'
|
4969 |
+
);
|
4970 |
+
}
|
4971 |
+
|
4972 |
+
$e.data('data', $e.data('select2Tags'));
|
4973 |
+
$e.data('tags', true);
|
4974 |
+
}
|
4975 |
+
|
4976 |
+
if ($e.data('ajaxUrl')) {
|
4977 |
+
if (this.options.debug && window.console && console.warn) {
|
4978 |
+
console.warn(
|
4979 |
+
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
4980 |
+
'`data-ajax--url` and support for the old attribute will be removed' +
|
4981 |
+
' in future versions of Select2.'
|
4982 |
+
);
|
4983 |
+
}
|
4984 |
+
|
4985 |
+
$e.attr('ajax--url', $e.data('ajaxUrl'));
|
4986 |
+
$e.data('ajax--url', $e.data('ajaxUrl'));
|
4987 |
+
}
|
4988 |
+
|
4989 |
+
var dataset = {};
|
4990 |
+
|
4991 |
+
// Prefer the element's `dataset` attribute if it exists
|
4992 |
+
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
4993 |
+
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
4994 |
+
dataset = $.extend(true, {}, $e[0].dataset, $e.data());
|
4995 |
+
} else {
|
4996 |
+
dataset = $e.data();
|
4997 |
+
}
|
4998 |
+
|
4999 |
+
var data = $.extend(true, {}, dataset);
|
5000 |
+
|
5001 |
+
data = Utils._convertData(data);
|
5002 |
+
|
5003 |
+
for (var key in data) {
|
5004 |
+
if ($.inArray(key, excludedData) > -1) {
|
5005 |
+
continue;
|
5006 |
+
}
|
5007 |
+
|
5008 |
+
if ($.isPlainObject(this.options[key])) {
|
5009 |
+
$.extend(this.options[key], data[key]);
|
5010 |
+
} else {
|
5011 |
+
this.options[key] = data[key];
|
5012 |
+
}
|
5013 |
+
}
|
5014 |
+
|
5015 |
+
return this;
|
5016 |
+
};
|
5017 |
+
|
5018 |
+
Options.prototype.get = function (key) {
|
5019 |
+
return this.options[key];
|
5020 |
+
};
|
5021 |
+
|
5022 |
+
Options.prototype.set = function (key, val) {
|
5023 |
+
this.options[key] = val;
|
5024 |
+
};
|
5025 |
+
|
5026 |
+
return Options;
|
5027 |
+
});
|
5028 |
+
|
5029 |
+
S2.define('select2/core',[
|
5030 |
+
'jquery',
|
5031 |
+
'./options',
|
5032 |
+
'./utils',
|
5033 |
+
'./keys'
|
5034 |
+
], function ($, Options, Utils, KEYS) {
|
5035 |
+
var Select2 = function ($element, options) {
|
5036 |
+
if ($element.data('select2') != null) {
|
5037 |
+
$element.data('select2').destroy();
|
5038 |
+
}
|
5039 |
+
|
5040 |
+
this.$element = $element;
|
5041 |
+
|
5042 |
+
this.id = this._generateId($element);
|
5043 |
+
|
5044 |
+
options = options || {};
|
5045 |
+
|
5046 |
+
this.options = new Options(options, $element);
|
5047 |
+
|
5048 |
+
Select2.__super__.constructor.call(this);
|
5049 |
+
|
5050 |
+
// Set up the tabindex
|
5051 |
+
|
5052 |
+
var tabindex = $element.attr('tabindex') || 0;
|
5053 |
+
$element.data('old-tabindex', tabindex);
|
5054 |
+
$element.attr('tabindex', '-1');
|
5055 |
+
|
5056 |
+
// Set up containers and adapters
|
5057 |
+
|
5058 |
+
var DataAdapter = this.options.get('dataAdapter');
|
5059 |
+
this.dataAdapter = new DataAdapter($element, this.options);
|
5060 |
+
|
5061 |
+
var $container = this.render();
|
5062 |
+
|
5063 |
+
this._placeContainer($container);
|
5064 |
+
|
5065 |
+
var SelectionAdapter = this.options.get('selectionAdapter');
|
5066 |
+
this.selection = new SelectionAdapter($element, this.options);
|
5067 |
+
this.$selection = this.selection.render();
|
5068 |
+
|
5069 |
+
this.selection.position(this.$selection, $container);
|
5070 |
+
|
5071 |
+
var DropdownAdapter = this.options.get('dropdownAdapter');
|
5072 |
+
this.dropdown = new DropdownAdapter($element, this.options);
|
5073 |
+
this.$dropdown = this.dropdown.render();
|
5074 |
+
|
5075 |
+
this.dropdown.position(this.$dropdown, $container);
|
5076 |
+
|
5077 |
+
var ResultsAdapter = this.options.get('resultsAdapter');
|
5078 |
+
this.results = new ResultsAdapter($element, this.options, this.dataAdapter);
|
5079 |
+
this.$results = this.results.render();
|
5080 |
+
|
5081 |
+
this.results.position(this.$results, this.$dropdown);
|
5082 |
+
|
5083 |
+
// Bind events
|
5084 |
+
|
5085 |
+
var self = this;
|
5086 |
+
|
5087 |
+
// Bind the container to all of the adapters
|
5088 |
+
this._bindAdapters();
|
5089 |
+
|
5090 |
+
// Register any DOM event handlers
|
5091 |
+
this._registerDomEvents();
|
5092 |
+
|
5093 |
+
// Register any internal event handlers
|
5094 |
+
this._registerDataEvents();
|
5095 |
+
this._registerSelectionEvents();
|
5096 |
+
this._registerDropdownEvents();
|
5097 |
+
this._registerResultsEvents();
|
5098 |
+
this._registerEvents();
|
5099 |
+
|
5100 |
+
// Set the initial state
|
5101 |
+
this.dataAdapter.current(function (initialData) {
|
5102 |
+
self.trigger('selection:update', {
|
5103 |
+
data: initialData
|
5104 |
+
});
|
5105 |
+
});
|
5106 |
+
|
5107 |
+
// Hide the original select
|
5108 |
+
$element.addClass('select2-hidden-accessible');
|
5109 |
+
$element.attr('aria-hidden', 'true');
|
5110 |
+
|
5111 |
+
// Synchronize any monitored attributes
|
5112 |
+
this._syncAttributes();
|
5113 |
+
|
5114 |
+
$element.data('select2', this);
|
5115 |
+
};
|
5116 |
+
|
5117 |
+
Utils.Extend(Select2, Utils.Observable);
|
5118 |
+
|
5119 |
+
Select2.prototype._generateId = function ($element) {
|
5120 |
+
var id = '';
|
5121 |
+
|
5122 |
+
if ($element.attr('id') != null) {
|
5123 |
+
id = $element.attr('id');
|
5124 |
+
} else if ($element.attr('name') != null) {
|
5125 |
+
id = $element.attr('name') + '-' + Utils.generateChars(2);
|
5126 |
+
} else {
|
5127 |
+
id = Utils.generateChars(4);
|
5128 |
+
}
|
5129 |
+
|
5130 |
+
id = id.replace(/(:|\.|\[|\]|,)/g, '');
|
5131 |
+
id = 'select2-' + id;
|
5132 |
+
|
5133 |
+
return id;
|
5134 |
+
};
|
5135 |
+
|
5136 |
+
Select2.prototype._placeContainer = function ($container) {
|
5137 |
+
$container.insertAfter(this.$element);
|
5138 |
+
|
5139 |
+
var width = this._resolveWidth(this.$element, this.options.get('width'));
|
5140 |
+
|
5141 |
+
if (width != null) {
|
5142 |
+
$container.css('width', width);
|
5143 |
+
}
|
5144 |
+
};
|
5145 |
+
|
5146 |
+
Select2.prototype._resolveWidth = function ($element, method) {
|
5147 |
+
var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
|
5148 |
+
|
5149 |
+
if (method == 'resolve') {
|
5150 |
+
var styleWidth = this._resolveWidth($element, 'style');
|
5151 |
+
|
5152 |
+
if (styleWidth != null) {
|
5153 |
+
return styleWidth;
|
5154 |
+
}
|
5155 |
+
|
5156 |
+
return this._resolveWidth($element, 'element');
|
5157 |
+
}
|
5158 |
+
|
5159 |
+
if (method == 'element') {
|
5160 |
+
var elementWidth = $element.outerWidth(false);
|
5161 |
+
|
5162 |
+
if (elementWidth <= 0) {
|
5163 |
+
return 'auto';
|
5164 |
+
}
|
5165 |
+
|
5166 |
+
return elementWidth + 'px';
|
5167 |
+
}
|
5168 |
+
|
5169 |
+
if (method == 'style') {
|
5170 |
+
var style = $element.attr('style');
|
5171 |
+
|
5172 |
+
if (typeof(style) !== 'string') {
|
5173 |
+
return null;
|
5174 |
+
}
|
5175 |
+
|
5176 |
+
var attrs = style.split(';');
|
5177 |
+
|
5178 |
+
for (var i = 0, l = attrs.length; i < l; i = i + 1) {
|
5179 |
+
var attr = attrs[i].replace(/\s/g, '');
|
5180 |
+
var matches = attr.match(WIDTH);
|
5181 |
+
|
5182 |
+
if (matches !== null && matches.length >= 1) {
|
5183 |
+
return matches[1];
|
5184 |
+
}
|
5185 |
+
}
|
5186 |
+
|
5187 |
+
return null;
|
5188 |
+
}
|
5189 |
+
|
5190 |
+
return method;
|
5191 |
+
};
|
5192 |
+
|
5193 |
+
Select2.prototype._bindAdapters = function () {
|
5194 |
+
this.dataAdapter.bind(this, this.$container);
|
5195 |
+
this.selection.bind(this, this.$container);
|
5196 |
+
|
5197 |
+
this.dropdown.bind(this, this.$container);
|
5198 |
+
this.results.bind(this, this.$container);
|
5199 |
+
};
|
5200 |
+
|
5201 |
+
Select2.prototype._registerDomEvents = function () {
|
5202 |
+
var self = this;
|
5203 |
+
|
5204 |
+
this.$element.on('change.select2', function () {
|
5205 |
+
self.dataAdapter.current(function (data) {
|
5206 |
+
self.trigger('selection:update', {
|
5207 |
+
data: data
|
5208 |
+
});
|
5209 |
+
});
|
5210 |
+
});
|
5211 |
+
|
5212 |
+
this.$element.on('focus.select2', function (evt) {
|
5213 |
+
self.trigger('focus', evt);
|
5214 |
+
});
|
5215 |
+
|
5216 |
+
this._syncA = Utils.bind(this._syncAttributes, this);
|
5217 |
+
this._syncS = Utils.bind(this._syncSubtree, this);
|
5218 |
+
|
5219 |
+
if (this.$element[0].attachEvent) {
|
5220 |
+
this.$element[0].attachEvent('onpropertychange', this._syncA);
|
5221 |
+
}
|
5222 |
+
|
5223 |
+
var observer = window.MutationObserver ||
|
5224 |
+
window.WebKitMutationObserver ||
|
5225 |
+
window.MozMutationObserver
|
5226 |
+
;
|
5227 |
+
|
5228 |
+
if (observer != null) {
|
5229 |
+
this._observer = new observer(function (mutations) {
|
5230 |
+
$.each(mutations, self._syncA);
|
5231 |
+
$.each(mutations, self._syncS);
|
5232 |
+
});
|
5233 |
+
this._observer.observe(this.$element[0], {
|
5234 |
+
attributes: true,
|
5235 |
+
childList: true,
|
5236 |
+
subtree: false
|
5237 |
+
});
|
5238 |
+
} else if (this.$element[0].addEventListener) {
|
5239 |
+
this.$element[0].addEventListener(
|
5240 |
+
'DOMAttrModified',
|
5241 |
+
self._syncA,
|
5242 |
+
false
|
5243 |
+
);
|
5244 |
+
this.$element[0].addEventListener(
|
5245 |
+
'DOMNodeInserted',
|
5246 |
+
self._syncS,
|
5247 |
+
false
|
5248 |
+
);
|
5249 |
+
this.$element[0].addEventListener(
|
5250 |
+
'DOMNodeRemoved',
|
5251 |
+
self._syncS,
|
5252 |
+
false
|
5253 |
+
);
|
5254 |
+
}
|
5255 |
+
};
|
5256 |
+
|
5257 |
+
Select2.prototype._registerDataEvents = function () {
|
5258 |
+
var self = this;
|
5259 |
+
|
5260 |
+
this.dataAdapter.on('*', function (name, params) {
|
5261 |
+
self.trigger(name, params);
|
5262 |
+
});
|
5263 |
+
};
|
5264 |
+
|
5265 |
+
Select2.prototype._registerSelectionEvents = function () {
|
5266 |
+
var self = this;
|
5267 |
+
var nonRelayEvents = ['toggle', 'focus'];
|
5268 |
+
|
5269 |
+
this.selection.on('toggle', function () {
|
5270 |
+
self.toggleDropdown();
|
5271 |
+
});
|
5272 |
+
|
5273 |
+
this.selection.on('focus', function (params) {
|
5274 |
+
self.focus(params);
|
5275 |
+
});
|
5276 |
+
|
5277 |
+
this.selection.on('*', function (name, params) {
|
5278 |
+
if ($.inArray(name, nonRelayEvents) !== -1) {
|
5279 |
+
return;
|
5280 |
+
}
|
5281 |
+
|
5282 |
+
self.trigger(name, params);
|
5283 |
+
});
|
5284 |
+
};
|
5285 |
+
|
5286 |
+
Select2.prototype._registerDropdownEvents = function () {
|
5287 |
+
var self = this;
|
5288 |
+
|
5289 |
+
this.dropdown.on('*', function (name, params) {
|
5290 |
+
self.trigger(name, params);
|
5291 |
+
});
|
5292 |
+
};
|
5293 |
+
|
5294 |
+
Select2.prototype._registerResultsEvents = function () {
|
5295 |
+
var self = this;
|
5296 |
+
|
5297 |
+
this.results.on('*', function (name, params) {
|
5298 |
+
self.trigger(name, params);
|
5299 |
+
});
|
5300 |
+
};
|
5301 |
+
|
5302 |
+
Select2.prototype._registerEvents = function () {
|
5303 |
+
var self = this;
|
5304 |
+
|
5305 |
+
this.on('open', function () {
|
5306 |
+
self.$container.addClass('select2-container--open');
|
5307 |
+
});
|
5308 |
+
|
5309 |
+
this.on('close', function () {
|
5310 |
+
self.$container.removeClass('select2-container--open');
|
5311 |
+
});
|
5312 |
+
|
5313 |
+
this.on('enable', function () {
|
5314 |
+
self.$container.removeClass('select2-container--disabled');
|
5315 |
+
});
|
5316 |
+
|
5317 |
+
this.on('disable', function () {
|
5318 |
+
self.$container.addClass('select2-container--disabled');
|
5319 |
+
});
|
5320 |
+
|
5321 |
+
this.on('blur', function () {
|
5322 |
+
self.$container.removeClass('select2-container--focus');
|
5323 |
+
});
|
5324 |
+
|
5325 |
+
this.on('query', function (params) {
|
5326 |
+
if (!self.isOpen()) {
|
5327 |
+
self.trigger('open', {});
|
5328 |
+
}
|
5329 |
+
|
5330 |
+
this.dataAdapter.query(params, function (data) {
|
5331 |
+
self.trigger('results:all', {
|
5332 |
+
data: data,
|
5333 |
+
query: params
|
5334 |
+
});
|
5335 |
+
});
|
5336 |
+
});
|
5337 |
+
|
5338 |
+
this.on('query:append', function (params) {
|
5339 |
+
this.dataAdapter.query(params, function (data) {
|
5340 |
+
self.trigger('results:append', {
|
5341 |
+
data: data,
|
5342 |
+
query: params
|
5343 |
+
});
|
5344 |
+
});
|
5345 |
+
});
|
5346 |
+
|
5347 |
+
this.on('keypress', function (evt) {
|
5348 |
+
var key = evt.which;
|
5349 |
+
|
5350 |
+
if (self.isOpen()) {
|
5351 |
+
if (key === KEYS.ESC || key === KEYS.TAB ||
|
5352 |
+
(key === KEYS.UP && evt.altKey)) {
|
5353 |
+
self.close();
|
5354 |
+
|
5355 |
+
evt.preventDefault();
|
5356 |
+
} else if (key === KEYS.ENTER) {
|
5357 |
+
self.trigger('results:select', {});
|
5358 |
+
|
5359 |
+
evt.preventDefault();
|
5360 |
+
} else if ((key === KEYS.SPACE && evt.ctrlKey)) {
|
5361 |
+
self.trigger('results:toggle', {});
|
5362 |
+
|
5363 |
+
evt.preventDefault();
|
5364 |
+
} else if (key === KEYS.UP) {
|
5365 |
+
self.trigger('results:previous', {});
|
5366 |
+
|
5367 |
+
evt.preventDefault();
|
5368 |
+
} else if (key === KEYS.DOWN) {
|
5369 |
+
self.trigger('results:next', {});
|
5370 |
+
|
5371 |
+
evt.preventDefault();
|
5372 |
+
}
|
5373 |
+
} else {
|
5374 |
+
if (key === KEYS.ENTER || key === KEYS.SPACE ||
|
5375 |
+
(key === KEYS.DOWN && evt.altKey)) {
|
5376 |
+
self.open();
|
5377 |
+
|
5378 |
+
evt.preventDefault();
|
5379 |
+
}
|
5380 |
+
}
|
5381 |
+
});
|
5382 |
+
};
|
5383 |
+
|
5384 |
+
Select2.prototype._syncAttributes = function () {
|
5385 |
+
this.options.set('disabled', this.$element.prop('disabled'));
|
5386 |
+
|
5387 |
+
if (this.options.get('disabled')) {
|
5388 |
+
if (this.isOpen()) {
|
5389 |
+
this.close();
|
5390 |
+
}
|
5391 |
+
|
5392 |
+
this.trigger('disable', {});
|
5393 |
+
} else {
|
5394 |
+
this.trigger('enable', {});
|
5395 |
+
}
|
5396 |
+
};
|
5397 |
+
|
5398 |
+
Select2.prototype._syncSubtree = function (evt, mutations) {
|
5399 |
+
var changed = false;
|
5400 |
+
var self = this;
|
5401 |
+
|
5402 |
+
// Ignore any mutation events raised for elements that aren't options or
|
5403 |
+
// optgroups. This handles the case when the select element is destroyed
|
5404 |
+
if (
|
5405 |
+
evt && evt.target && (
|
5406 |
+
evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
|
5407 |
+
)
|
5408 |
+
) {
|
5409 |
+
return;
|
5410 |
+
}
|
5411 |
+
|
5412 |
+
if (!mutations) {
|
5413 |
+
// If mutation events aren't supported, then we can only assume that the
|
5414 |
+
// change affected the selections
|
5415 |
+
changed = true;
|
5416 |
+
} else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
|
5417 |
+
for (var n = 0; n < mutations.addedNodes.length; n++) {
|
5418 |
+
var node = mutations.addedNodes[n];
|
5419 |
+
|
5420 |
+
if (node.selected) {
|
5421 |
+
changed = true;
|
5422 |
+
}
|
5423 |
+
}
|
5424 |
+
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
|
5425 |
+
changed = true;
|
5426 |
+
}
|
5427 |
+
|
5428 |
+
// Only re-pull the data if we think there is a change
|
5429 |
+
if (changed) {
|
5430 |
+
this.dataAdapter.current(function (currentData) {
|
5431 |
+
self.trigger('selection:update', {
|
5432 |
+
data: currentData
|
5433 |
+
});
|
5434 |
+
});
|
5435 |
+
}
|
5436 |
+
};
|
5437 |
+
|
5438 |
+
/**
|
5439 |
+
* Override the trigger method to automatically trigger pre-events when
|
5440 |
+
* there are events that can be prevented.
|
5441 |
+
*/
|
5442 |
+
Select2.prototype.trigger = function (name, args) {
|
5443 |
+
var actualTrigger = Select2.__super__.trigger;
|
5444 |
+
var preTriggerMap = {
|
5445 |
+
'open': 'opening',
|
5446 |
+
'close': 'closing',
|
5447 |
+
'select': 'selecting',
|
5448 |
+
'unselect': 'unselecting'
|
5449 |
+
};
|
5450 |
+
|
5451 |
+
if (args === undefined) {
|
5452 |
+
args = {};
|
5453 |
+
}
|
5454 |
+
|
5455 |
+
if (name in preTriggerMap) {
|
5456 |
+
var preTriggerName = preTriggerMap[name];
|
5457 |
+
var preTriggerArgs = {
|
5458 |
+
prevented: false,
|
5459 |
+
name: name,
|
5460 |
+
args: args
|
5461 |
+
};
|
5462 |
+
|
5463 |
+
actualTrigger.call(this, preTriggerName, preTriggerArgs);
|
5464 |
+
|
5465 |
+
if (preTriggerArgs.prevented) {
|
5466 |
+
args.prevented = true;
|
5467 |
+
|
5468 |
+
return;
|
5469 |
+
}
|
5470 |
+
}
|
5471 |
+
|
5472 |
+
actualTrigger.call(this, name, args);
|
5473 |
+
};
|
5474 |
+
|
5475 |
+
Select2.prototype.toggleDropdown = function () {
|
5476 |
+
if (this.options.get('disabled')) {
|
5477 |
+
return;
|
5478 |
+
}
|
5479 |
+
|
5480 |
+
if (this.isOpen()) {
|
5481 |
+
this.close();
|
5482 |
+
} else {
|
5483 |
+
this.open();
|
5484 |
+
}
|
5485 |
+
};
|
5486 |
+
|
5487 |
+
Select2.prototype.open = function () {
|
5488 |
+
if (this.isOpen()) {
|
5489 |
+
return;
|
5490 |
+
}
|
5491 |
+
|
5492 |
+
this.trigger('query', {});
|
5493 |
+
};
|
5494 |
+
|
5495 |
+
Select2.prototype.close = function () {
|
5496 |
+
if (!this.isOpen()) {
|
5497 |
+
return;
|
5498 |
+
}
|
5499 |
+
|
5500 |
+
this.trigger('close', {});
|
5501 |
+
};
|
5502 |
+
|
5503 |
+
Select2.prototype.isOpen = function () {
|
5504 |
+
return this.$container.hasClass('select2-container--open');
|
5505 |
+
};
|
5506 |
+
|
5507 |
+
Select2.prototype.hasFocus = function () {
|
5508 |
+
return this.$container.hasClass('select2-container--focus');
|
5509 |
+
};
|
5510 |
+
|
5511 |
+
Select2.prototype.focus = function (data) {
|
5512 |
+
// No need to re-trigger focus events if we are already focused
|
5513 |
+
if (this.hasFocus()) {
|
5514 |
+
return;
|
5515 |
+
}
|
5516 |
+
|
5517 |
+
this.$container.addClass('select2-container--focus');
|
5518 |
+
this.trigger('focus', {});
|
5519 |
+
};
|
5520 |
+
|
5521 |
+
Select2.prototype.enable = function (args) {
|
5522 |
+
if (this.options.get('debug') && window.console && console.warn) {
|
5523 |
+
console.warn(
|
5524 |
+
'Select2: The `select2("enable")` method has been deprecated and will' +
|
5525 |
+
' be removed in later Select2 versions. Use $element.prop("disabled")' +
|
5526 |
+
' instead.'
|
5527 |
+
);
|
5528 |
+
}
|
5529 |
+
|
5530 |
+
if (args == null || args.length === 0) {
|
5531 |
+
args = [true];
|
5532 |
+
}
|
5533 |
+
|
5534 |
+
var disabled = !args[0];
|
5535 |
+
|
5536 |
+
this.$element.prop('disabled', disabled);
|
5537 |
+
};
|
5538 |
+
|
5539 |
+
Select2.prototype.data = function () {
|
5540 |
+
if (this.options.get('debug') &&
|
5541 |
+
arguments.length > 0 && window.console && console.warn) {
|
5542 |
+
console.warn(
|
5543 |
+
'Select2: Data can no longer be set using `select2("data")`. You ' +
|
5544 |
+
'should consider setting the value instead using `$element.val()`.'
|
5545 |
+
);
|
5546 |
+
}
|
5547 |
+
|
5548 |
+
var data = [];
|
5549 |
+
|
5550 |
+
this.dataAdapter.current(function (currentData) {
|
5551 |
+
data = currentData;
|
5552 |
+
});
|
5553 |
+
|
5554 |
+
return data;
|
5555 |
+
};
|
5556 |
+
|
5557 |
+
Select2.prototype.val = function (args) {
|
5558 |
+
if (this.options.get('debug') && window.console && console.warn) {
|
5559 |
+
console.warn(
|
5560 |
+
'Select2: The `select2("val")` method has been deprecated and will be' +
|
5561 |
+
' removed in later Select2 versions. Use $element.val() instead.'
|
5562 |
+
);
|
5563 |
+
}
|
5564 |
+
|
5565 |
+
if (args == null || args.length === 0) {
|
5566 |
+
return this.$element.val();
|
5567 |
+
}
|
5568 |
+
|
5569 |
+
var newVal = args[0];
|
5570 |
+
|
5571 |
+
if ($.isArray(newVal)) {
|
5572 |
+
newVal = $.map(newVal, function (obj) {
|
5573 |
+
return obj.toString();
|
5574 |
+
});
|
5575 |
+
}
|
5576 |
+
|
5577 |
+
this.$element.val(newVal).trigger('change');
|
5578 |
+
};
|
5579 |
+
|
5580 |
+
Select2.prototype.destroy = function () {
|
5581 |
+
this.$container.remove();
|
5582 |
+
|
5583 |
+
if (this.$element[0].detachEvent) {
|
5584 |
+
this.$element[0].detachEvent('onpropertychange', this._syncA);
|
5585 |
+
}
|
5586 |
+
|
5587 |
+
if (this._observer != null) {
|
5588 |
+
this._observer.disconnect();
|
5589 |
+
this._observer = null;
|
5590 |
+
} else if (this.$element[0].removeEventListener) {
|
5591 |
+
this.$element[0]
|
5592 |
+
.removeEventListener('DOMAttrModified', this._syncA, false);
|
5593 |
+
this.$element[0]
|
5594 |
+
.removeEventListener('DOMNodeInserted', this._syncS, false);
|
5595 |
+
this.$element[0]
|
5596 |
+
.removeEventListener('DOMNodeRemoved', this._syncS, false);
|
5597 |
+
}
|
5598 |
+
|
5599 |
+
this._syncA = null;
|
5600 |
+
this._syncS = null;
|
5601 |
+
|
5602 |
+
this.$element.off('.select2');
|
5603 |
+
this.$element.attr('tabindex', this.$element.data('old-tabindex'));
|
5604 |
+
|
5605 |
+
this.$element.removeClass('select2-hidden-accessible');
|
5606 |
+
this.$element.attr('aria-hidden', 'false');
|
5607 |
+
this.$element.removeData('select2');
|
5608 |
+
|
5609 |
+
this.dataAdapter.destroy();
|
5610 |
+
this.selection.destroy();
|
5611 |
+
this.dropdown.destroy();
|
5612 |
+
this.results.destroy();
|
5613 |
+
|
5614 |
+
this.dataAdapter = null;
|
5615 |
+
this.selection = null;
|
5616 |
+
this.dropdown = null;
|
5617 |
+
this.results = null;
|
5618 |
+
};
|
5619 |
+
|
5620 |
+
Select2.prototype.render = function () {
|
5621 |
+
var $container = $(
|
5622 |
+
'<span class="select2 select2-container">' +
|
5623 |
+
'<span class="selection"></span>' +
|
5624 |
+
'<span class="dropdown-wrapper" aria-hidden="true"></span>' +
|
5625 |
+
'</span>'
|
5626 |
+
);
|
5627 |
+
|
5628 |
+
$container.attr('dir', this.options.get('dir'));
|
5629 |
+
|
5630 |
+
this.$container = $container;
|
5631 |
+
|
5632 |
+
this.$container.addClass('select2-container--' + this.options.get('theme'));
|
5633 |
+
|
5634 |
+
$container.data('element', this.$element);
|
5635 |
+
|
5636 |
+
return $container;
|
5637 |
+
};
|
5638 |
+
|
5639 |
+
return Select2;
|
5640 |
+
});
|
5641 |
+
|
5642 |
+
S2.define('jquery-mousewheel',[
|
5643 |
+
'jquery'
|
5644 |
+
], function ($) {
|
5645 |
+
// Used to shim jQuery.mousewheel for non-full builds.
|
5646 |
+
return $;
|
5647 |
+
});
|
5648 |
+
|
5649 |
+
S2.define('jquery.select2',[
|
5650 |
+
'jquery',
|
5651 |
+
'jquery-mousewheel',
|
5652 |
+
|
5653 |
+
'./select2/core',
|
5654 |
+
'./select2/defaults'
|
5655 |
+
], function ($, _, Select2, Defaults) {
|
5656 |
+
if ($.fn.select2 == null) {
|
5657 |
+
// All methods that should return the element
|
5658 |
+
var thisMethods = ['open', 'close', 'destroy'];
|
5659 |
+
|
5660 |
+
$.fn.select2 = function (options) {
|
5661 |
+
options = options || {};
|
5662 |
+
|
5663 |
+
if (typeof options === 'object') {
|
5664 |
+
this.each(function () {
|
5665 |
+
var instanceOptions = $.extend(true, {}, options);
|
5666 |
+
|
5667 |
+
var instance = new Select2($(this), instanceOptions);
|
5668 |
+
});
|
5669 |
+
|
5670 |
+
return this;
|
5671 |
+
} else if (typeof options === 'string') {
|
5672 |
+
var ret;
|
5673 |
+
var args = Array.prototype.slice.call(arguments, 1);
|
5674 |
+
|
5675 |
+
this.each(function () {
|
5676 |
+
var instance = $(this).data('select2');
|
5677 |
+
|
5678 |
+
if (instance == null && window.console && console.error) {
|
5679 |
+
console.error(
|
5680 |
+
'The select2(\'' + options + '\') method was called on an ' +
|
5681 |
+
'element that is not using Select2.'
|
5682 |
+
);
|
5683 |
+
}
|
5684 |
+
|
5685 |
+
ret = instance[options].apply(instance, args);
|
5686 |
+
});
|
5687 |
+
|
5688 |
+
// Check if we should be returning `this`
|
5689 |
+
if ($.inArray(options, thisMethods) > -1) {
|
5690 |
+
return this;
|
5691 |
+
}
|
5692 |
+
|
5693 |
+
return ret;
|
5694 |
+
} else {
|
5695 |
+
throw new Error('Invalid arguments for Select2: ' + options);
|
5696 |
+
}
|
5697 |
+
};
|
5698 |
+
}
|
5699 |
+
|
5700 |
+
if ($.fn.select2.defaults == null) {
|
5701 |
+
$.fn.select2.defaults = Defaults;
|
5702 |
+
}
|
5703 |
+
|
5704 |
+
return Select2;
|
5705 |
+
});
|
5706 |
+
|
5707 |
+
// Return the AMD loader configuration so it can be used outside of this file
|
5708 |
+
return {
|
5709 |
+
define: S2.define,
|
5710 |
+
require: S2.require
|
5711 |
+
};
|
5712 |
+
}());
|
5713 |
+
|
5714 |
+
// Autoload the jQuery bindings
|
5715 |
+
// We know that all of the modules exist above this, so we're safe
|
5716 |
+
var select2 = S2.require('jquery.select2');
|
5717 |
+
|
5718 |
+
// Hold the AMD module references on the jQuery function that was just loaded
|
5719 |
+
// This allows Select2 to use the internal loader outside of this file, such
|
5720 |
+
// as in the language files.
|
5721 |
+
jQuery.fn.select2.amd = S2;
|
5722 |
+
|
5723 |
+
// Return the Select2 instance for anyone who is importing it.
|
5724 |
+
return select2;
|
5725 |
+
}));
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
|
shared/assets/plugins/advanced-custom-fields/assets/inc/select2/4/select2.min.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
1 |
+
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.
|