Child Theme Configurator - Version 1.6.1

Version Description

  • Fix: add check if theme uses hard-wired stylesheet link and alert to use @import instead of link option
  • Fix: conflicts with using jQuery UI from CDN - using local version of 1.11.2 Widget/Menu/Selectmenu instead
  • Fix: using wp-color-picker handle instead of iris as dependency to make sure wpColorPicker() methods are loaded
  • Fix: copy parent theme widgets logic different if child or parent are active theme
Download this release

Release Info

Developer lilaeamedia
Plugin Icon 128x128 Child Theme Configurator
Version 1.6.1
Comparing to
See all releases

Code changes from version 1.6.0 to 1.6.1

child-theme-configurator.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
6
  Plugin Name: Child Theme Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Create a Child Theme from any installed Theme. Each CSS selector, rule and value can then be searched, previewed and modified.
9
- Version: 1.6.0
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -17,7 +17,7 @@ if ( !defined('ABSPATH')) exit;
17
 
18
  defined( 'LF' ) or define( 'LF', "\n");
19
  defined( 'CHLD_THM_CFG_OPTIONS' ) or define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
20
- defined( 'CHLD_THM_CFG_VERSION' ) or define( 'CHLD_THM_CFG_VERSION', '1.6.0' );
21
  defined( 'CHLD_THM_CFG_MAX_SELECTORS' ) or define( 'CHLD_THM_CFG_MAX_SELECTORS', '50000' );
22
  defined( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS' ) or define( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS', '1000' );
23
  defined( 'CHLD_THM_CFG_MENU' ) or define( 'CHLD_THM_CFG_MENU', 'chld_thm_cfg_menu' );
@@ -85,4 +85,3 @@ if ( !defined('ABSPATH')) exit;
85
  delete_option( CHLD_THM_CFG_OPTIONS . '_sel_ndx' );
86
  delete_option( CHLD_THM_CFG_OPTIONS . '_val_ndx' );
87
  }
88
-
6
  Plugin Name: Child Theme Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Create a Child Theme from any installed Theme. Each CSS selector, rule and value can then be searched, previewed and modified.
9
+ Version: 1.6.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
17
 
18
  defined( 'LF' ) or define( 'LF', "\n");
19
  defined( 'CHLD_THM_CFG_OPTIONS' ) or define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
20
+ defined( 'CHLD_THM_CFG_VERSION' ) or define( 'CHLD_THM_CFG_VERSION', '1.6.1' );
21
  defined( 'CHLD_THM_CFG_MAX_SELECTORS' ) or define( 'CHLD_THM_CFG_MAX_SELECTORS', '50000' );
22
  defined( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS' ) or define( 'CHLD_THM_CFG_MAX_RECURSE_LOOPS', '1000' );
23
  defined( 'CHLD_THM_CFG_MENU' ) or define( 'CHLD_THM_CFG_MENU', 'chld_thm_cfg_menu' );
85
  delete_option( CHLD_THM_CFG_OPTIONS . '_sel_ndx' );
86
  delete_option( CHLD_THM_CFG_OPTIONS . '_val_ndx' );
87
  }
 
includes/class-ctc-css.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Handles all CSS output, parsing, normalization
9
- Version: 1.6.0
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -234,7 +234,7 @@ class ChildThemeConfiguratorCSS {
234
  function get_parent_source($file = 'style.css') {
235
  return trailingslashit(get_theme_root()) . trailingslashit($this->get_prop('parnt')) . $file;
236
  }
237
-
238
  /*
239
  * update_arrays
240
  * accepts CSS properties as raw strings and normilizes into
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Handles all CSS output, parsing, normalization
9
+ Version: 1.6.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
234
  function get_parent_source($file = 'style.css') {
235
  return trailingslashit(get_theme_root()) . trailingslashit($this->get_prop('parnt')) . $file;
236
  }
237
+
238
  /*
239
  * update_arrays
240
  * accepts CSS properties as raw strings and normilizes into
includes/class-ctc-ui.php CHANGED
@@ -5,7 +5,7 @@ if ( !defined('ABSPATH')) exit;
5
  Class: Child_Theme_Configurator_UI
6
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
7
  Description: Handles the plugin User Interface
8
- Version: 1.6.0
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
@@ -25,9 +25,11 @@ class ChildThemeConfiguratorUI {
25
  $themes = $this->ctc()->themes;
26
  $parent = isset($_GET['ctc_parent']) ? sanitize_text_field($_GET['ctc_parent']) : $css->get_prop('parnt');
27
  $child = $css->get_prop('child');
28
- if (!$configtype = $css->get_prop('configtype')) $configtype = 'theme';
 
29
  $hidechild = (count($themes['child']) ? '' : 'style="display:none"');
30
  $enqueueset = 'theme' != $configtype || isset($css->enqueue);
 
31
  $imports = $css->get_prop('imports');
32
  $id = 0;
33
  $this->ctc()->fs_method = get_filesystem_method();
@@ -36,7 +38,18 @@ class ChildThemeConfiguratorUI {
36
  include ($this->ctc()->pluginPath .'/includes/forms/main.php');
37
  }
38
 
39
- function render_theme_menu($template = 'child', $selected = NULL) {
 
 
 
 
 
 
 
 
 
 
 
40
  ?>
41
  <select class="ctc-select" id="ctc_theme_<?php echo $template; ?>" name="ctc_theme_<?php echo $template; ?>" style="visibility:hidden"><?php
42
  foreach ($this->ctc()->themes[$template] as $slug => $theme)
5
  Class: Child_Theme_Configurator_UI
6
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
7
  Description: Handles the plugin User Interface
8
+ Version: 1.6.1
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
25
  $themes = $this->ctc()->themes;
26
  $parent = isset($_GET['ctc_parent']) ? sanitize_text_field($_GET['ctc_parent']) : $css->get_prop('parnt');
27
  $child = $css->get_prop('child');
28
+ $configtype = $css->get_prop('configtype');
29
+ if (empty($configtype)) $configtype = 'theme';
30
  $hidechild = (count($themes['child']) ? '' : 'style="display:none"');
31
  $enqueueset = 'theme' != $configtype || isset($css->enqueue);
32
+ $mustimport = $this->parent_stylesheet_check($parent);
33
  $imports = $css->get_prop('imports');
34
  $id = 0;
35
  $this->ctc()->fs_method = get_filesystem_method();
38
  include ($this->ctc()->pluginPath .'/includes/forms/main.php');
39
  }
40
 
41
+ function parent_stylesheet_check($parent) {
42
+ $file = trailingslashit(get_theme_root()) . trailingslashit($parent) . 'header.php';
43
+ $regex = '/<link[^>]+?stylesheet_ur[li]/is';
44
+ if (file_exists($file)):
45
+ $contents = file_get_contents($file);
46
+ if (preg_match($regex, $contents)) return TRUE;
47
+ endif;
48
+ return FALSE;
49
+ }
50
+
51
+
52
+ function render_theme_menu($template = 'child', $selected = NULL) {
53
  ?>
54
  <select class="ctc-select" id="ctc_theme_<?php echo $template; ?>" name="ctc_theme_<?php echo $template; ?>" style="visibility:hidden"><?php
55
  foreach ($this->ctc()->themes[$template] as $slug => $theme)
includes/class-ctc.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Main Controller Class
9
- Version: 1.6.0
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -88,18 +88,19 @@ class ChildThemeConfiguratorAdmin {
88
  $this->ui->render();
89
  }
90
  function enqueue_scripts() {
91
- wp_enqueue_style('chld-thm-cfg-admin', $this->pluginURL . 'css/chld-thm-cfg.css', array(), '1.6.0');
92
 
93
- // we need to use jQuery UI from CDN until 4.1 is released because jqeury-ui-selectmenu is not included
94
- // this will be updated in a later release to use WP Core scripts
95
- wp_deregister_script('jquery-ui-core');
96
- wp_enqueue_script('jquery-ui-core', '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js', array('jquery'));
 
97
  wp_enqueue_script('ctc-thm-cfg-ctcgrad', $this->pluginURL . 'js/ctcgrad.min.js', array('jquery'), FALSE, TRUE);
98
  wp_enqueue_script('chld-thm-cfg-admin', $this->pluginURL . 'js/chld-thm-cfg.min.js',
99
  array(
100
- // 'jquery-ui-autocomplete', FIXME: restore after 4.1
101
- // 'jquery-ui-selectmenu', FIXME: restore after 4.1
102
- 'iris',
103
  ), FALSE, TRUE );
104
  $localize_array = apply_filters('chld_thm_cfg_localize_script', array(
105
  'ssl' => is_ssl(),
@@ -169,7 +170,6 @@ class ChildThemeConfiguratorAdmin {
169
  $import = preg_replace($regex, '@import url(' . trailingslashit($url) . $matches[4] . ')', $import);
170
  endif;
171
  wp_enqueue_style('chld-thm-cfg-admin' . ++$count, preg_replace($regex, "$2", $import));
172
- //echo preg_replace($regex, "<link rel='stylesheet' href=\"$2\" type='text/css' />", $import) . "\n";
173
  endforeach;
174
  endif;
175
  }
@@ -182,8 +182,7 @@ class ChildThemeConfiguratorAdmin {
182
  include_once($this->pluginPath . 'includes/class-ctc-ui.php');
183
  $this->ui = new ChildThemeConfiguratorUI();
184
  $this->ui->render_help_content();
185
- add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
186
- // $this->enqueue_scripts();
187
  $this->load_imports();
188
  }
189
 
@@ -273,7 +272,8 @@ class ChildThemeConfiguratorAdmin {
273
  add_action('admin_notices', array($this, 'enqueue_notice'));
274
  endif;
275
  // check if file ownership is messed up from old version or other plugin
276
- if (fileowner($this->css->get_child_target('')) != fileowner(ABSPATH)):
 
277
  add_action('admin_notices', array($this, 'owner_notice'));
278
  endif;
279
  endif;
@@ -524,15 +524,42 @@ class ChildThemeConfiguratorAdmin {
524
  return FALSE;
525
  endif;
526
 
527
- // copy parent theme mods
528
- if (isset($_POST['ctc_parent_mods']) && ($parent_mods = get_option('theme_mods_' . $parnt))):
529
- update_option('theme_mods_' . $child, $parent_mods);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
530
  endif;
531
 
532
  // save new object to WP options table
533
  $this->css->save_config();
534
 
535
- // hoock for add'l plugin options
536
  do_action('chld_thm_cfg_addl_options', $this); // hook for add'l plugin options
537
 
538
  // return message id 1, which says new child theme created successfull;
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Main Controller Class
9
+ Version: 1.6.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
88
  $this->ui->render();
89
  }
90
  function enqueue_scripts() {
91
+ wp_enqueue_style('chld-thm-cfg-admin', $this->pluginURL . 'css/chld-thm-cfg.css', array(), '1.6.1');
92
 
93
+ // we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
94
+ // this will be updated in a later release to use WP Core scripts when it is widely adopted
95
+ if (!wp_script_is('jquery-ui-selectmenu', 'registered')): // selectmenu.min.js
96
+ wp_enqueue_script('jquery-ui-selectmenu', $this->pluginURL . 'js/selectmenu.min.js', array('jquery','jquery-ui-core','jquery-ui-position'), FALSE, TRUE);
97
+ endif;
98
  wp_enqueue_script('ctc-thm-cfg-ctcgrad', $this->pluginURL . 'js/ctcgrad.min.js', array('jquery'), FALSE, TRUE);
99
  wp_enqueue_script('chld-thm-cfg-admin', $this->pluginURL . 'js/chld-thm-cfg.min.js',
100
  array(
101
+ 'jquery-ui-autocomplete',
102
+ 'jquery-ui-selectmenu',
103
+ 'wp-color-picker',
104
  ), FALSE, TRUE );
105
  $localize_array = apply_filters('chld_thm_cfg_localize_script', array(
106
  'ssl' => is_ssl(),
170
  $import = preg_replace($regex, '@import url(' . trailingslashit($url) . $matches[4] . ')', $import);
171
  endif;
172
  wp_enqueue_style('chld-thm-cfg-admin' . ++$count, preg_replace($regex, "$2", $import));
 
173
  endforeach;
174
  endif;
175
  }
182
  include_once($this->pluginPath . 'includes/class-ctc-ui.php');
183
  $this->ui = new ChildThemeConfiguratorUI();
184
  $this->ui->render_help_content();
185
+ add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'),999);
 
186
  $this->load_imports();
187
  }
188
 
272
  add_action('admin_notices', array($this, 'enqueue_notice'));
273
  endif;
274
  // check if file ownership is messed up from old version or other plugin
275
+
276
+ if (fileowner($this->css->get_child_target('')) != fileowner(get_theme_root())):
277
  add_action('admin_notices', array($this, 'owner_notice'));
278
  endif;
279
  endif;
524
  return FALSE;
525
  endif;
526
 
527
+ // copy parent theme mods option set
528
+ if (isset($_POST['ctc_parent_mods'])):
529
+ // we can copy settings from parent to child even if neither is currently active
530
+ // so we need cases for active parent, active child or neither
531
+
532
+ // get active theme
533
+ $active_theme = get_stylesheet();
534
+ // create temp array from parent settings
535
+ $child_mods = get_option('theme_mods_' . $parnt);
536
+ if ($active_theme == $parnt):
537
+ // if parent theme is active, get widgets from active sidebars_widgets array
538
+ $child_widgets = retrieve_widgets();
539
+ else:
540
+ // otherwise get widgets from parent theme mods
541
+ $child_widgets = $child_mods['sidebars_widgets']['data'];
542
+ endif;
543
+ if ($active_theme == $child):
544
+ // if child theme is active, remove widgets from temp array
545
+ unset($child_mods['sidebars_widgets']);
546
+ // copy temp array to child mods
547
+ update_option('theme_mods_' . $child, $child_mods);
548
+ // copy widgets to active sidebars_widgets array
549
+ wp_set_sidebars_widgets($child_widgets);
550
+ else:
551
+ // otherwise copy widgets to temp array with time stamp
552
+ $child_mods['sidebars_widgets']['data'] = $child_widgets;
553
+ $child_mods['sidebars_widgets']['time'] = time();
554
+ // copy temp array to child theme mods
555
+ update_option('theme_mods_' . $child, $child_mods);
556
+ endif;
557
  endif;
558
 
559
  // save new object to WP options table
560
  $this->css->save_config();
561
 
562
+ // hook for add'l plugin options
563
  do_action('chld_thm_cfg_addl_options', $this); // hook for add'l plugin options
564
 
565
  // return message id 1, which says new child theme created successfull;
includes/forms/parent-child.php CHANGED
@@ -97,7 +97,7 @@ if (!defined('ABSPATH')) exit;
97
  <?php _e( 'This will overwrite child theme options you may have already set.', 'chld_thm_cfg'); ?>
98
  </div>
99
  </div>
100
- <?php if ('' == $hidechild): ?>
101
  <div class="ctc-input-row clearfix">
102
  <div class="ctc-input-cell"> <strong>
103
  <?php _e('Backup current stylesheet', 'chld_thm_cfg'); ?>
@@ -112,7 +112,10 @@ if (!defined('ABSPATH')) exit;
112
  <?php _e( 'This creates a copy of the current stylesheet before applying changes. You can remove old backup files using the Files tab.', 'chld_thm_cfg'); ?>
113
  </div>
114
  </div>
115
- <?php endif; ?>
 
 
 
116
  <div class="ctc-input-row clearfix">
117
  <div class="ctc-input-cell"> <strong>
118
  <?php _e('Parent stylesheet handling:', 'chld_thm_cfg'); ?>
@@ -120,26 +123,27 @@ if (!defined('ABSPATH')) exit;
120
  <div class="ctc-input-cell">
121
  <label>
122
  <input class="ctc_radio" id="ctc_parent_enqueue_enqueue" name="ctc_parent_enqueue" type="radio"
123
- value="enqueue" <?php echo ( empty($css->enqueue) || 'enqueue' == $css->enqueue ? 'checked' : '' ); ?>/>
124
  <?php _e('&lt;link&gt; (default)', 'chld_thm_cfg'); ?>
125
  </label>
126
  <br/>
127
  <label>
128
  <input class="ctc_radio" id="ctc_parent_enqueue_import" name="ctc_parent_enqueue" type="radio"
129
- value="import" <?php echo ( isset($css->enqueue) && 'import' == $css->enqueue ? 'checked' : '' ); ?>/>
130
  <?php _e('@import', 'chld_thm_cfg'); ?>
131
  </label>
132
  <br/>
133
  <label>
134
  <input class="ctc_radio" id="ctc_parent_enqueue_none" name="ctc_parent_enqueue" type="radio"
135
- value="none" <?php echo ( isset($css->enqueue) && 'none' == $css->enqueue ? 'checked' : '' ); ?>/>
136
  <?php _e('none (handled by theme)', 'chld_thm_cfg'); ?>
137
  </label>
138
  </div>
139
  <div class="ctc-input-cell"> <strong>
140
  <?php _e('NOTE:', 'chld_thm_cfg'); ?>
 
141
  </strong>
142
- <?php _e( "Only select @import for older themes that do not enqueue the stylesheet. Select 'none' if core styles are automatically loaded for child themes. Select '&lt;link&gt;' if unsure.", 'chld_thm_cfg'); ?>
143
  </div>
144
  </div>
145
  <?php if ('' == $hidechild): ?>
97
  <?php _e( 'This will overwrite child theme options you may have already set.', 'chld_thm_cfg'); ?>
98
  </div>
99
  </div>
100
+ <?php if ('' == $hidechild): ?>
101
  <div class="ctc-input-row clearfix">
102
  <div class="ctc-input-cell"> <strong>
103
  <?php _e('Backup current stylesheet', 'chld_thm_cfg'); ?>
112
  <?php _e( 'This creates a copy of the current stylesheet before applying changes. You can remove old backup files using the Files tab.', 'chld_thm_cfg'); ?>
113
  </div>
114
  </div>
115
+ <?php
116
+ endif;
117
+ $parent_handling = (isset($css->enqueue) ? $css->enqueue : ($mustimport ? 'import' : 'enqueue'));
118
+ ?>
119
  <div class="ctc-input-row clearfix">
120
  <div class="ctc-input-cell"> <strong>
121
  <?php _e('Parent stylesheet handling:', 'chld_thm_cfg'); ?>
123
  <div class="ctc-input-cell">
124
  <label>
125
  <input class="ctc_radio" id="ctc_parent_enqueue_enqueue" name="ctc_parent_enqueue" type="radio"
126
+ value="enqueue" <?php checked('enqueue', $parent_handling); ?>/>
127
  <?php _e('&lt;link&gt; (default)', 'chld_thm_cfg'); ?>
128
  </label>
129
  <br/>
130
  <label>
131
  <input class="ctc_radio" id="ctc_parent_enqueue_import" name="ctc_parent_enqueue" type="radio"
132
+ value="import" <?php checked('import', $parent_handling); ?>/>
133
  <?php _e('@import', 'chld_thm_cfg'); ?>
134
  </label>
135
  <br/>
136
  <label>
137
  <input class="ctc_radio" id="ctc_parent_enqueue_none" name="ctc_parent_enqueue" type="radio"
138
+ value="none" <?php checked('none', $parent_handling); ?>/>
139
  <?php _e('none (handled by theme)', 'chld_thm_cfg'); ?>
140
  </label>
141
  </div>
142
  <div class="ctc-input-cell"> <strong>
143
  <?php _e('NOTE:', 'chld_thm_cfg'); ?>
144
+ <?php if ($mustimport) _e('This theme does not currently enqueue the stylesheet and must use the @import option to render correctly.', 'chld_thm_cfg'); ?>
145
  </strong>
146
+ <?php _e( "Select @import for older themes that do not enqueue the stylesheet. Select 'none' if core styles are automatically loaded for child themes. Select '&lt;link&gt;' if unsure.", 'chld_thm_cfg'); ?>
147
  </div>
148
  </div>
149
  <?php if ('' == $hidechild): ?>
js/chld-thm-cfg.js CHANGED
@@ -2,7 +2,7 @@
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
4
  * Description: Handles jQuery, AJAX and other UI
5
- * Version: 1.6.0
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
4
  * Description: Handles jQuery, AJAX and other UI
5
+ * Version: 1.6.1
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
js/jquery-ui-selectmenu.js ADDED
@@ -0,0 +1,1804 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.11.2 - 2014-12-04
2
+ * http://jqueryui.com
3
+ * Includes: core.js, widget.js, position.js, menu.js, selectmenu.js
4
+ * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
5
+
6
+ (function( factory ) {
7
+ if ( typeof define === "function" && define.amd ) {
8
+
9
+ // AMD. Register as an anonymous module.
10
+ define([ "jquery" ], factory );
11
+ } else {
12
+
13
+ // Browser globals
14
+ factory( jQuery );
15
+ }
16
+ }(function( $ ) {
17
+
18
+
19
+ /*!
20
+ * jQuery UI Widget 1.11.2
21
+ * http://jqueryui.com
22
+ *
23
+ * Copyright 2014 jQuery Foundation and other contributors
24
+ * Released under the MIT license.
25
+ * http://jquery.org/license
26
+ *
27
+ * http://api.jqueryui.com/jQuery.widget/
28
+ */
29
+
30
+
31
+ var widget_uuid = 0,
32
+ widget_slice = Array.prototype.slice;
33
+
34
+ $.cleanData = (function( orig ) {
35
+ return function( elems ) {
36
+ var events, elem, i;
37
+ for ( i = 0; (elem = elems[i]) != null; i++ ) {
38
+ try {
39
+
40
+ // Only trigger remove when necessary to save time
41
+ events = $._data( elem, "events" );
42
+ if ( events && events.remove ) {
43
+ $( elem ).triggerHandler( "remove" );
44
+ }
45
+
46
+ // http://bugs.jquery.com/ticket/8235
47
+ } catch ( e ) {}
48
+ }
49
+ orig( elems );
50
+ };
51
+ })( $.cleanData );
52
+
53
+ $.widget = function( name, base, prototype ) {
54
+ var fullName, existingConstructor, constructor, basePrototype,
55
+ // proxiedPrototype allows the provided prototype to remain unmodified
56
+ // so that it can be used as a mixin for multiple widgets (#8876)
57
+ proxiedPrototype = {},
58
+ namespace = name.split( "." )[ 0 ];
59
+
60
+ name = name.split( "." )[ 1 ];
61
+ fullName = namespace + "-" + name;
62
+
63
+ if ( !prototype ) {
64
+ prototype = base;
65
+ base = $.Widget;
66
+ }
67
+
68
+ // create selector for plugin
69
+ $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
70
+ return !!$.data( elem, fullName );
71
+ };
72
+
73
+ $[ namespace ] = $[ namespace ] || {};
74
+ existingConstructor = $[ namespace ][ name ];
75
+ constructor = $[ namespace ][ name ] = function( options, element ) {
76
+ // allow instantiation without "new" keyword
77
+ if ( !this._createWidget ) {
78
+ return new constructor( options, element );
79
+ }
80
+
81
+ // allow instantiation without initializing for simple inheritance
82
+ // must use "new" keyword (the code above always passes args)
83
+ if ( arguments.length ) {
84
+ this._createWidget( options, element );
85
+ }
86
+ };
87
+ // extend with the existing constructor to carry over any static properties
88
+ $.extend( constructor, existingConstructor, {
89
+ version: prototype.version,
90
+ // copy the object used to create the prototype in case we need to
91
+ // redefine the widget later
92
+ _proto: $.extend( {}, prototype ),
93
+ // track widgets that inherit from this widget in case this widget is
94
+ // redefined after a widget inherits from it
95
+ _childConstructors: []
96
+ });
97
+
98
+ basePrototype = new base();
99
+ // we need to make the options hash a property directly on the new instance
100
+ // otherwise we'll modify the options hash on the prototype that we're
101
+ // inheriting from
102
+ basePrototype.options = $.widget.extend( {}, basePrototype.options );
103
+ $.each( prototype, function( prop, value ) {
104
+ if ( !$.isFunction( value ) ) {
105
+ proxiedPrototype[ prop ] = value;
106
+ return;
107
+ }
108
+ proxiedPrototype[ prop ] = (function() {
109
+ var _super = function() {
110
+ return base.prototype[ prop ].apply( this, arguments );
111
+ },
112
+ _superApply = function( args ) {
113
+ return base.prototype[ prop ].apply( this, args );
114
+ };
115
+ return function() {
116
+ var __super = this._super,
117
+ __superApply = this._superApply,
118
+ returnValue;
119
+
120
+ this._super = _super;
121
+ this._superApply = _superApply;
122
+
123
+ returnValue = value.apply( this, arguments );
124
+
125
+ this._super = __super;
126
+ this._superApply = __superApply;
127
+
128
+ return returnValue;
129
+ };
130
+ })();
131
+ });
132
+ constructor.prototype = $.widget.extend( basePrototype, {
133
+ // TODO: remove support for widgetEventPrefix
134
+ // always use the name + a colon as the prefix, e.g., draggable:start
135
+ // don't prefix for widgets that aren't DOM-based
136
+ widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
137
+ }, proxiedPrototype, {
138
+ constructor: constructor,
139
+ namespace: namespace,
140
+ widgetName: name,
141
+ widgetFullName: fullName
142
+ });
143
+
144
+ // If this widget is being redefined then we need to find all widgets that
145
+ // are inheriting from it and redefine all of them so that they inherit from
146
+ // the new version of this widget. We're essentially trying to replace one
147
+ // level in the prototype chain.
148
+ if ( existingConstructor ) {
149
+ $.each( existingConstructor._childConstructors, function( i, child ) {
150
+ var childPrototype = child.prototype;
151
+
152
+ // redefine the child widget using the same prototype that was
153
+ // originally used, but inherit from the new version of the base
154
+ $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
155
+ });
156
+ // remove the list of existing child constructors from the old constructor
157
+ // so the old child constructors can be garbage collected
158
+ delete existingConstructor._childConstructors;
159
+ } else {
160
+ base._childConstructors.push( constructor );
161
+ }
162
+
163
+ $.widget.bridge( name, constructor );
164
+
165
+ return constructor;
166
+ };
167
+
168
+ $.widget.extend = function( target ) {
169
+ var input = widget_slice.call( arguments, 1 ),
170
+ inputIndex = 0,
171
+ inputLength = input.length,
172
+ key,
173
+ value;
174
+ for ( ; inputIndex < inputLength; inputIndex++ ) {
175
+ for ( key in input[ inputIndex ] ) {
176
+ value = input[ inputIndex ][ key ];
177
+ if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
178
+ // Clone objects
179
+ if ( $.isPlainObject( value ) ) {
180
+ target[ key ] = $.isPlainObject( target[ key ] ) ?
181
+ $.widget.extend( {}, target[ key ], value ) :
182
+ // Don't extend strings, arrays, etc. with objects
183
+ $.widget.extend( {}, value );
184
+ // Copy everything else by reference
185
+ } else {
186
+ target[ key ] = value;
187
+ }
188
+ }
189
+ }
190
+ }
191
+ return target;
192
+ };
193
+
194
+ $.widget.bridge = function( name, object ) {
195
+ var fullName = object.prototype.widgetFullName || name;
196
+ $.fn[ name ] = function( options ) {
197
+ var isMethodCall = typeof options === "string",
198
+ args = widget_slice.call( arguments, 1 ),
199
+ returnValue = this;
200
+
201
+ // allow multiple hashes to be passed on init
202
+ options = !isMethodCall && args.length ?
203
+ $.widget.extend.apply( null, [ options ].concat(args) ) :
204
+ options;
205
+
206
+ if ( isMethodCall ) {
207
+ this.each(function() {
208
+ var methodValue,
209
+ instance = $.data( this, fullName );
210
+ if ( options === "instance" ) {
211
+ returnValue = instance;
212
+ return false;
213
+ }
214
+ if ( !instance ) {
215
+ return $.error( "cannot call methods on " + name + " prior to initialization; " +
216
+ "attempted to call method '" + options + "'" );
217
+ }
218
+ if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
219
+ return $.error( "no such method '" + options + "' for " + name + " widget instance" );
220
+ }
221
+ methodValue = instance[ options ].apply( instance, args );
222
+ if ( methodValue !== instance && methodValue !== undefined ) {
223
+ returnValue = methodValue && methodValue.jquery ?
224
+ returnValue.pushStack( methodValue.get() ) :
225
+ methodValue;
226
+ return false;
227
+ }
228
+ });
229
+ } else {
230
+ this.each(function() {
231
+ var instance = $.data( this, fullName );
232
+ if ( instance ) {
233
+ instance.option( options || {} );
234
+ if ( instance._init ) {
235
+ instance._init();
236
+ }
237
+ } else {
238
+ $.data( this, fullName, new object( options, this ) );
239
+ }
240
+ });
241
+ }
242
+
243
+ return returnValue;
244
+ };
245
+ };
246
+
247
+ $.Widget = function( /* options, element */ ) {};
248
+
249
+
250
+ $.Widget._childConstructors = [];
251
+
252
+ $.Widget.prototype = {
253
+ widgetName: "widget",
254
+ widgetEventPrefix: "",
255
+ defaultElement: "<div>",
256
+ options: {
257
+ disabled: false,
258
+
259
+ // callbacks
260
+ create: null
261
+ },
262
+ _createWidget: function( options, element ) {
263
+ element = $( element || this.defaultElement || this )[ 0 ];
264
+ this.element = $( element );
265
+ this.uuid = widget_uuid++;
266
+ this.eventNamespace = "." + this.widgetName + this.uuid;
267
+
268
+ this.bindings = $();
269
+ this.hoverable = $();
270
+ this.focusable = $();
271
+
272
+ if ( element !== this ) {
273
+ $.data( element, this.widgetFullName, this );
274
+ this._on( true, this.element, {
275
+ remove: function( event ) {
276
+ if ( event.target === element ) {
277
+ this.destroy();
278
+ }
279
+ }
280
+ });
281
+ this.document = $( element.style ?
282
+ // element within the document
283
+ element.ownerDocument :
284
+ // element is window or document
285
+ element.document || element );
286
+ this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
287
+ }
288
+
289
+ this.options = $.widget.extend( {},
290
+ this.options,
291
+ this._getCreateOptions(),
292
+ options );
293
+
294
+ this._create();
295
+ this._trigger( "create", null, this._getCreateEventData() );
296
+ this._init();
297
+ },
298
+ _getCreateOptions: $.noop,
299
+ _getCreateEventData: $.noop,
300
+ _create: $.noop,
301
+ _init: $.noop,
302
+
303
+ destroy: function() {
304
+ this._destroy();
305
+ // we can probably remove the unbind calls in 2.0
306
+ // all event bindings should go through this._on()
307
+ this.element
308
+ .unbind( this.eventNamespace )
309
+ .removeData( this.widgetFullName )
310
+ // support: jquery <1.6.3
311
+ // http://bugs.jquery.com/ticket/9413
312
+ .removeData( $.camelCase( this.widgetFullName ) );
313
+ this.widget()
314
+ .unbind( this.eventNamespace )
315
+ .removeAttr( "aria-disabled" )
316
+ .removeClass(
317
+ this.widgetFullName + "-disabled " +
318
+ "ui-state-disabled" );
319
+
320
+ // clean up events and states
321
+ this.bindings.unbind( this.eventNamespace );
322
+ this.hoverable.removeClass( "ui-state-hover" );
323
+ this.focusable.removeClass( "ui-state-focus" );
324
+ },
325
+ _destroy: $.noop,
326
+
327
+ widget: function() {
328
+ return this.element;
329
+ },
330
+
331
+ option: function( key, value ) {
332
+ var options = key,
333
+ parts,
334
+ curOption,
335
+ i;
336
+
337
+ if ( arguments.length === 0 ) {
338
+ // don't return a reference to the internal hash
339
+ return $.widget.extend( {}, this.options );
340
+ }
341
+
342
+ if ( typeof key === "string" ) {
343
+ // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
344
+ options = {};
345
+ parts = key.split( "." );
346
+ key = parts.shift();
347
+ if ( parts.length ) {
348
+ curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
349
+ for ( i = 0; i < parts.length - 1; i++ ) {
350
+ curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
351
+ curOption = curOption[ parts[ i ] ];
352
+ }
353
+ key = parts.pop();
354
+ if ( arguments.length === 1 ) {
355
+ return curOption[ key ] === undefined ? null : curOption[ key ];
356
+ }
357
+ curOption[ key ] = value;
358
+ } else {
359
+ if ( arguments.length === 1 ) {
360
+ return this.options[ key ] === undefined ? null : this.options[ key ];
361
+ }
362
+ options[ key ] = value;
363
+ }
364
+ }
365
+
366
+ this._setOptions( options );
367
+
368
+ return this;
369
+ },
370
+ _setOptions: function( options ) {
371
+ var key;
372
+
373
+ for ( key in options ) {
374
+ this._setOption( key, options[ key ] );
375
+ }
376
+
377
+ return this;
378
+ },
379
+ _setOption: function( key, value ) {
380
+ this.options[ key ] = value;
381
+
382
+ if ( key === "disabled" ) {
383
+ this.widget()
384
+ .toggleClass( this.widgetFullName + "-disabled", !!value );
385
+
386
+ // If the widget is becoming disabled, then nothing is interactive
387
+ if ( value ) {
388
+ this.hoverable.removeClass( "ui-state-hover" );
389
+ this.focusable.removeClass( "ui-state-focus" );
390
+ }
391
+ }
392
+
393
+ return this;
394
+ },
395
+
396
+ enable: function() {
397
+ return this._setOptions({ disabled: false });
398
+ },
399
+ disable: function() {
400
+ return this._setOptions({ disabled: true });
401
+ },
402
+
403
+ _on: function( suppressDisabledCheck, element, handlers ) {
404
+ var delegateElement,
405
+ instance = this;
406
+
407
+ // no suppressDisabledCheck flag, shuffle arguments
408
+ if ( typeof suppressDisabledCheck !== "boolean" ) {
409
+ handlers = element;
410
+ element = suppressDisabledCheck;
411
+ suppressDisabledCheck = false;
412
+ }
413
+
414
+ // no element argument, shuffle and use this.element
415
+ if ( !handlers ) {
416
+ handlers = element;
417
+ element = this.element;
418
+ delegateElement = this.widget();
419
+ } else {
420
+ element = delegateElement = $( element );
421
+ this.bindings = this.bindings.add( element );
422
+ }
423
+
424
+ $.each( handlers, function( event, handler ) {
425
+ function handlerProxy() {
426
+ // allow widgets to customize the disabled handling
427
+ // - disabled as an array instead of boolean
428
+ // - disabled class as method for disabling individual parts
429
+ if ( !suppressDisabledCheck &&
430
+ ( instance.options.disabled === true ||
431
+ $( this ).hasClass( "ui-state-disabled" ) ) ) {
432
+ return;
433
+ }
434
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
435
+ .apply( instance, arguments );
436
+ }
437
+
438
+ // copy the guid so direct unbinding works
439
+ if ( typeof handler !== "string" ) {
440
+ handlerProxy.guid = handler.guid =
441
+ handler.guid || handlerProxy.guid || $.guid++;
442
+ }
443
+
444
+ var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
445
+ eventName = match[1] + instance.eventNamespace,
446
+ selector = match[2];
447
+ if ( selector ) {
448
+ delegateElement.delegate( selector, eventName, handlerProxy );
449
+ } else {
450
+ element.bind( eventName, handlerProxy );
451
+ }
452
+ });
453
+ },
454
+
455
+ _off: function( element, eventName ) {
456
+ eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
457
+ this.eventNamespace;
458
+ element.unbind( eventName ).undelegate( eventName );
459
+
460
+ // Clear the stack to avoid memory leaks (#10056)
461
+ this.bindings = $( this.bindings.not( element ).get() );
462
+ this.focusable = $( this.focusable.not( element ).get() );
463
+ this.hoverable = $( this.hoverable.not( element ).get() );
464
+ },
465
+
466
+ _delay: function( handler, delay ) {
467
+ function handlerProxy() {
468
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
469
+ .apply( instance, arguments );
470
+ }
471
+ var instance = this;
472
+ return setTimeout( handlerProxy, delay || 0 );
473
+ },
474
+
475
+ _hoverable: function( element ) {
476
+ this.hoverable = this.hoverable.add( element );
477
+ this._on( element, {
478
+ mouseenter: function( event ) {
479
+ $( event.currentTarget ).addClass( "ui-state-hover" );
480
+ },
481
+ mouseleave: function( event ) {
482
+ $( event.currentTarget ).removeClass( "ui-state-hover" );
483
+ }
484
+ });
485
+ },
486
+
487
+ _focusable: function( element ) {
488
+ this.focusable = this.focusable.add( element );
489
+ this._on( element, {
490
+ focusin: function( event ) {
491
+ $( event.currentTarget ).addClass( "ui-state-focus" );
492
+ },
493
+ focusout: function( event ) {
494
+ $( event.currentTarget ).removeClass( "ui-state-focus" );
495
+ }
496
+ });
497
+ },
498
+
499
+ _trigger: function( type, event, data ) {
500
+ var prop, orig,
501
+ callback = this.options[ type ];
502
+
503
+ data = data || {};
504
+ event = $.Event( event );
505
+ event.type = ( type === this.widgetEventPrefix ?
506
+ type :
507
+ this.widgetEventPrefix + type ).toLowerCase();
508
+ // the original event may come from any element
509
+ // so we need to reset the target on the new event
510
+ event.target = this.element[ 0 ];
511
+
512
+ // copy original event properties over to the new event
513
+ orig = event.originalEvent;
514
+ if ( orig ) {
515
+ for ( prop in orig ) {
516
+ if ( !( prop in event ) ) {
517
+ event[ prop ] = orig[ prop ];
518
+ }
519
+ }
520
+ }
521
+
522
+ this.element.trigger( event, data );
523
+ return !( $.isFunction( callback ) &&
524
+ callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
525
+ event.isDefaultPrevented() );
526
+ }
527
+ };
528
+
529
+ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
530
+ $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
531
+ if ( typeof options === "string" ) {
532
+ options = { effect: options };
533
+ }
534
+ var hasOptions,
535
+ effectName = !options ?
536
+ method :
537
+ options === true || typeof options === "number" ?
538
+ defaultEffect :
539
+ options.effect || defaultEffect;
540
+ options = options || {};
541
+ if ( typeof options === "number" ) {
542
+ options = { duration: options };
543
+ }
544
+ hasOptions = !$.isEmptyObject( options );
545
+ options.complete = callback;
546
+ if ( options.delay ) {
547
+ element.delay( options.delay );
548
+ }
549
+ if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
550
+ element[ method ]( options );
551
+ } else if ( effectName !== method && element[ effectName ] ) {
552
+ element[ effectName ]( options.duration, options.easing, callback );
553
+ } else {
554
+ element.queue(function( next ) {
555
+ $( this )[ method ]();
556
+ if ( callback ) {
557
+ callback.call( element[ 0 ] );
558
+ }
559
+ next();
560
+ });
561
+ }
562
+ };
563
+ });
564
+
565
+ var widget = $.widget;
566
+
567
+
568
+
569
+
570
+ /*!
571
+ * jQuery UI Menu 1.11.2
572
+ * http://jqueryui.com
573
+ *
574
+ * Copyright 2014 jQuery Foundation and other contributors
575
+ * Released under the MIT license.
576
+ * http://jquery.org/license
577
+ *
578
+ * http://api.jqueryui.com/menu/
579
+ */
580
+
581
+
582
+ var menu = $.widget( "ui.menu", {
583
+ version: "1.11.2",
584
+ defaultElement: "<ul>",
585
+ delay: 300,
586
+ options: {
587
+ icons: {
588
+ submenu: "ui-icon-carat-1-e"
589
+ },
590
+ items: "> *",
591
+ menus: "ul",
592
+ position: {
593
+ my: "left-1 top",
594
+ at: "right top"
595
+ },
596
+ role: "menu",
597
+
598
+ // callbacks
599
+ blur: null,
600
+ focus: null,
601
+ select: null
602
+ },
603
+
604
+ _create: function() {
605
+ this.activeMenu = this.element;
606
+
607
+ // Flag used to prevent firing of the click handler
608
+ // as the event bubbles up through nested menus
609
+ this.mouseHandled = false;
610
+ this.element
611
+ .uniqueId()
612
+ .addClass( "ui-menu ui-widget ui-widget-content" )
613
+ .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
614
+ .attr({
615
+ role: this.options.role,
616
+ tabIndex: 0
617
+ });
618
+
619
+ if ( this.options.disabled ) {
620
+ this.element
621
+ .addClass( "ui-state-disabled" )
622
+ .attr( "aria-disabled", "true" );
623
+ }
624
+
625
+ this._on({
626
+ // Prevent focus from sticking to links inside menu after clicking
627
+ // them (focus should always stay on UL during navigation).
628
+ "mousedown .ui-menu-item": function( event ) {
629
+ event.preventDefault();
630
+ },
631
+ "click .ui-menu-item": function( event ) {
632
+ var target = $( event.target );
633
+ if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
634
+ this.select( event );
635
+
636
+ // Only set the mouseHandled flag if the event will bubble, see #9469.
637
+ if ( !event.isPropagationStopped() ) {
638
+ this.mouseHandled = true;
639
+ }
640
+
641
+ // Open submenu on click
642
+ if ( target.has( ".ui-menu" ).length ) {
643
+ this.expand( event );
644
+ } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
645
+
646
+ // Redirect focus to the menu
647
+ this.element.trigger( "focus", [ true ] );
648
+
649
+ // If the active item is on the top level, let it stay active.
650
+ // Otherwise, blur the active item since it is no longer visible.
651
+ if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
652
+ clearTimeout( this.timer );
653
+ }
654
+ }
655
+ }
656
+ },
657
+ "mouseenter .ui-menu-item": function( event ) {
658
+ // Ignore mouse events while typeahead is active, see #10458.
659
+ // Prevents focusing the wrong item when typeahead causes a scroll while the mouse
660
+ // is over an item in the menu
661
+ if ( this.previousFilter ) {
662
+ return;
663
+ }
664
+ var target = $( event.currentTarget );
665
+ // Remove ui-state-active class from siblings of the newly focused menu item
666
+ // to avoid a jump caused by adjacent elements both having a class with a border
667
+ target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
668
+ this.focus( event, target );
669
+ },
670
+ mouseleave: "collapseAll",
671
+ "mouseleave .ui-menu": "collapseAll",
672
+ focus: function( event, keepActiveItem ) {
673
+ // If there's already an active item, keep it active
674
+ // If not, activate the first item
675
+ var item = this.active || this.element.find( this.options.items ).eq( 0 );
676
+
677
+ if ( !keepActiveItem ) {
678
+ this.focus( event, item );
679
+ }
680
+ },
681
+ blur: function( event ) {
682
+ this._delay(function() {
683
+ if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
684
+ this.collapseAll( event );
685
+ }
686
+ });
687
+ },
688
+ keydown: "_keydown"
689
+ });
690
+
691
+ this.refresh();
692
+
693
+ // Clicks outside of a menu collapse any open menus
694
+ this._on( this.document, {
695
+ click: function( event ) {
696
+ if ( this._closeOnDocumentClick( event ) ) {
697
+ this.collapseAll( event );
698
+ }
699
+
700
+ // Reset the mouseHandled flag
701
+ this.mouseHandled = false;
702
+ }
703
+ });
704
+ },
705
+
706
+ _destroy: function() {
707
+ // Destroy (sub)menus
708
+ this.element
709
+ .removeAttr( "aria-activedescendant" )
710
+ .find( ".ui-menu" ).addBack()
711
+ .removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
712
+ .removeAttr( "role" )
713
+ .removeAttr( "tabIndex" )
714
+ .removeAttr( "aria-labelledby" )
715
+ .removeAttr( "aria-expanded" )
716
+ .removeAttr( "aria-hidden" )
717
+ .removeAttr( "aria-disabled" )
718
+ .removeUniqueId()
719
+ .show();
720
+
721
+ // Destroy menu items
722
+ this.element.find( ".ui-menu-item" )
723
+ .removeClass( "ui-menu-item" )
724
+ .removeAttr( "role" )
725
+ .removeAttr( "aria-disabled" )
726
+ .removeUniqueId()
727
+ .removeClass( "ui-state-hover" )
728
+ .removeAttr( "tabIndex" )
729
+ .removeAttr( "role" )
730
+ .removeAttr( "aria-haspopup" )
731
+ .children().each( function() {
732
+ var elem = $( this );
733
+ if ( elem.data( "ui-menu-submenu-carat" ) ) {
734
+ elem.remove();
735
+ }
736
+ });
737
+
738
+ // Destroy menu dividers
739
+ this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
740
+ },
741
+
742
+ _keydown: function( event ) {
743
+ var match, prev, character, skip,
744
+ preventDefault = true;
745
+
746
+ switch ( event.keyCode ) {
747
+ case $.ui.keyCode.PAGE_UP:
748
+ this.previousPage( event );
749
+ break;
750
+ case $.ui.keyCode.PAGE_DOWN:
751
+ this.nextPage( event );
752
+ break;
753
+ case $.ui.keyCode.HOME:
754
+ this._move( "first", "first", event );
755
+ break;
756
+ case $.ui.keyCode.END:
757
+ this._move( "last", "last", event );
758
+ break;
759
+ case $.ui.keyCode.UP:
760
+ this.previous( event );
761
+ break;
762
+ case $.ui.keyCode.DOWN:
763
+ this.next( event );
764
+ break;
765
+ case $.ui.keyCode.LEFT:
766
+ this.collapse( event );
767
+ break;
768
+ case $.ui.keyCode.RIGHT:
769
+ if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
770
+ this.expand( event );
771
+ }
772
+ break;
773
+ case $.ui.keyCode.ENTER:
774
+ case $.ui.keyCode.SPACE:
775
+ this._activate( event );
776
+ break;
777
+ case $.ui.keyCode.ESCAPE:
778
+ this.collapse( event );
779
+ break;
780
+ default:
781
+ preventDefault = false;
782
+ prev = this.previousFilter || "";
783
+ character = String.fromCharCode( event.keyCode );
784
+ skip = false;
785
+
786
+ clearTimeout( this.filterTimer );
787
+
788
+ if ( character === prev ) {
789
+ skip = true;
790
+ } else {
791
+ character = prev + character;
792
+ }
793
+
794
+ match = this._filterMenuItems( character );
795
+ match = skip && match.index( this.active.next() ) !== -1 ?
796
+ this.active.nextAll( ".ui-menu-item" ) :
797
+ match;
798
+
799
+ // If no matches on the current filter, reset to the last character pressed
800
+ // to move down the menu to the first item that starts with that character
801
+ if ( !match.length ) {
802
+ character = String.fromCharCode( event.keyCode );
803
+ match = this._filterMenuItems( character );
804
+ }
805
+
806
+ if ( match.length ) {
807
+ this.focus( event, match );
808
+ this.previousFilter = character;
809
+ this.filterTimer = this._delay(function() {
810
+ delete this.previousFilter;
811
+ }, 1000 );
812
+ } else {
813
+ delete this.previousFilter;
814
+ }
815
+ }
816
+
817
+ if ( preventDefault ) {
818
+ event.preventDefault();
819
+ }
820
+ },
821
+
822
+ _activate: function( event ) {
823
+ if ( !this.active.is( ".ui-state-disabled" ) ) {
824
+ if ( this.active.is( "[aria-haspopup='true']" ) ) {
825
+ this.expand( event );
826
+ } else {
827
+ this.select( event );
828
+ }
829
+ }
830
+ },
831
+
832
+ refresh: function() {
833
+ var menus, items,
834
+ that = this,
835
+ icon = this.options.icons.submenu,
836
+ submenus = this.element.find( this.options.menus );
837
+
838
+ this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
839
+
840
+ // Initialize nested menus
841
+ submenus.filter( ":not(.ui-menu)" )
842
+ .addClass( "ui-menu ui-widget ui-widget-content ui-front" )
843
+ .hide()
844
+ .attr({
845
+ role: this.options.role,
846
+ "aria-hidden": "true",
847
+ "aria-expanded": "false"
848
+ })
849
+ .each(function() {
850
+ var menu = $( this ),
851
+ item = menu.parent(),
852
+ submenuCarat = $( "<span>" )
853
+ .addClass( "ui-menu-icon ui-icon " + icon )
854
+ .data( "ui-menu-submenu-carat", true );
855
+
856
+ item
857
+ .attr( "aria-haspopup", "true" )
858
+ .prepend( submenuCarat );
859
+ menu.attr( "aria-labelledby", item.attr( "id" ) );
860
+ });
861
+
862
+ menus = submenus.add( this.element );
863
+ items = menus.find( this.options.items );
864
+
865
+ // Initialize menu-items containing spaces and/or dashes only as dividers
866
+ items.not( ".ui-menu-item" ).each(function() {
867
+ var item = $( this );
868
+ if ( that._isDivider( item ) ) {
869
+ item.addClass( "ui-widget-content ui-menu-divider" );
870
+ }
871
+ });
872
+
873
+ // Don't refresh list items that are already adapted
874
+ items.not( ".ui-menu-item, .ui-menu-divider" )
875
+ .addClass( "ui-menu-item" )
876
+ .uniqueId()
877
+ .attr({
878
+ tabIndex: -1,
879
+ role: this._itemRole()
880
+ });
881
+
882
+ // Add aria-disabled attribute to any disabled menu item
883
+ items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
884
+
885
+ // If the active item has been removed, blur the menu
886
+ if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
887
+ this.blur();
888
+ }
889
+ },
890
+
891
+ _itemRole: function() {
892
+ return {
893
+ menu: "menuitem",
894
+ listbox: "option"
895
+ }[ this.options.role ];
896
+ },
897
+
898
+ _setOption: function( key, value ) {
899
+ if ( key === "icons" ) {
900
+ this.element.find( ".ui-menu-icon" )
901
+ .removeClass( this.options.icons.submenu )
902
+ .addClass( value.submenu );
903
+ }
904
+ if ( key === "disabled" ) {
905
+ this.element
906
+ .toggleClass( "ui-state-disabled", !!value )
907
+ .attr( "aria-disabled", value );
908
+ }
909
+ this._super( key, value );
910
+ },
911
+
912
+ focus: function( event, item ) {
913
+ var nested, focused;
914
+ this.blur( event, event && event.type === "focus" );
915
+
916
+ this._scrollIntoView( item );
917
+
918
+ this.active = item.first();
919
+ focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
920
+ // Only update aria-activedescendant if there's a role
921
+ // otherwise we assume focus is managed elsewhere
922
+ if ( this.options.role ) {
923
+ this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
924
+ }
925
+
926
+ // Highlight active parent menu item, if any
927
+ this.active
928
+ .parent()
929
+ .closest( ".ui-menu-item" )
930
+ .addClass( "ui-state-active" );
931
+
932
+ if ( event && event.type === "keydown" ) {
933
+ this._close();
934
+ } else {
935
+ this.timer = this._delay(function() {
936
+ this._close();
937
+ }, this.delay );
938
+ }
939
+
940
+ nested = item.children( ".ui-menu" );
941
+ if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
942
+ this._startOpening(nested);
943
+ }
944
+ this.activeMenu = item.parent();
945
+
946
+ this._trigger( "focus", event, { item: item } );
947
+ },
948
+
949
+ _scrollIntoView: function( item ) {
950
+ var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
951
+ if ( this._hasScroll() ) {
952
+ borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
953
+ paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
954
+ offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
955
+ scroll = this.activeMenu.scrollTop();
956
+ elementHeight = this.activeMenu.height();
957
+ itemHeight = item.outerHeight();
958
+
959
+ if ( offset < 0 ) {
960
+ this.activeMenu.scrollTop( scroll + offset );
961
+ } else if ( offset + itemHeight > elementHeight ) {
962
+ this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
963
+ }
964
+ }
965
+ },
966
+
967
+ blur: function( event, fromFocus ) {
968
+ if ( !fromFocus ) {
969
+ clearTimeout( this.timer );
970
+ }
971
+
972
+ if ( !this.active ) {
973
+ return;
974
+ }
975
+
976
+ this.active.removeClass( "ui-state-focus" );
977
+ this.active = null;
978
+
979
+ this._trigger( "blur", event, { item: this.active } );
980
+ },
981
+
982
+ _startOpening: function( submenu ) {
983
+ clearTimeout( this.timer );
984
+
985
+ // Don't open if already open fixes a Firefox bug that caused a .5 pixel
986
+ // shift in the submenu position when mousing over the carat icon
987
+ if ( submenu.attr( "aria-hidden" ) !== "true" ) {
988
+ return;
989
+ }
990
+
991
+ this.timer = this._delay(function() {
992
+ this._close();
993
+ this._open( submenu );
994
+ }, this.delay );
995
+ },
996
+
997
+ _open: function( submenu ) {
998
+ var position = $.extend({
999
+ of: this.active
1000
+ }, this.options.position );
1001
+
1002
+ clearTimeout( this.timer );
1003
+ this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
1004
+ .hide()
1005
+ .attr( "aria-hidden", "true" );
1006
+
1007
+ submenu
1008
+ .show()
1009
+ .removeAttr( "aria-hidden" )
1010
+ .attr( "aria-expanded", "true" )
1011
+ .position( position );
1012
+ },
1013
+
1014
+ collapseAll: function( event, all ) {
1015
+ clearTimeout( this.timer );
1016
+ this.timer = this._delay(function() {
1017
+ // If we were passed an event, look for the submenu that contains the event
1018
+ var currentMenu = all ? this.element :
1019
+ $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
1020
+
1021
+ // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
1022
+ if ( !currentMenu.length ) {
1023
+ currentMenu = this.element;
1024
+ }
1025
+
1026
+ this._close( currentMenu );
1027
+
1028
+ this.blur( event );
1029
+ this.activeMenu = currentMenu;
1030
+ }, this.delay );
1031
+ },
1032
+
1033
+ // With no arguments, closes the currently active menu - if nothing is active
1034
+ // it closes all menus. If passed an argument, it will search for menus BELOW
1035
+ _close: function( startMenu ) {
1036
+ if ( !startMenu ) {
1037
+ startMenu = this.active ? this.active.parent() : this.element;
1038
+ }
1039
+
1040
+ startMenu
1041
+ .find( ".ui-menu" )
1042
+ .hide()
1043
+ .attr( "aria-hidden", "true" )
1044
+ .attr( "aria-expanded", "false" )
1045
+ .end()
1046
+ .find( ".ui-state-active" ).not( ".ui-state-focus" )
1047
+ .removeClass( "ui-state-active" );
1048
+ },
1049
+
1050
+ _closeOnDocumentClick: function( event ) {
1051
+ return !$( event.target ).closest( ".ui-menu" ).length;
1052
+ },
1053
+
1054
+ _isDivider: function( item ) {
1055
+
1056
+ // Match hyphen, em dash, en dash
1057
+ return !/[^\-\u2014\u2013\s]/.test( item.text() );
1058
+ },
1059
+
1060
+ collapse: function( event ) {
1061
+ var newItem = this.active &&
1062
+ this.active.parent().closest( ".ui-menu-item", this.element );
1063
+ if ( newItem && newItem.length ) {
1064
+ this._close();
1065
+ this.focus( event, newItem );
1066
+ }
1067
+ },
1068
+
1069
+ expand: function( event ) {
1070
+ var newItem = this.active &&
1071
+ this.active
1072
+ .children( ".ui-menu " )
1073
+ .find( this.options.items )
1074
+ .first();
1075
+
1076
+ if ( newItem && newItem.length ) {
1077
+ this._open( newItem.parent() );
1078
+
1079
+ // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
1080
+ this._delay(function() {
1081
+ this.focus( event, newItem );
1082
+ });
1083
+ }
1084
+ },
1085
+
1086
+ next: function( event ) {
1087
+ this._move( "next", "first", event );
1088
+ },
1089
+
1090
+ previous: function( event ) {
1091
+ this._move( "prev", "last", event );
1092
+ },
1093
+
1094
+ isFirstItem: function() {
1095
+ return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
1096
+ },
1097
+
1098
+ isLastItem: function() {
1099
+ return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
1100
+ },
1101
+
1102
+ _move: function( direction, filter, event ) {
1103
+ var next;
1104
+ if ( this.active ) {
1105
+ if ( direction === "first" || direction === "last" ) {
1106
+ next = this.active
1107
+ [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
1108
+ .eq( -1 );
1109
+ } else {
1110
+ next = this.active
1111
+ [ direction + "All" ]( ".ui-menu-item" )
1112
+ .eq( 0 );
1113
+ }
1114
+ }
1115
+ if ( !next || !next.length || !this.active ) {
1116
+ next = this.activeMenu.find( this.options.items )[ filter ]();
1117
+ }
1118
+
1119
+ this.focus( event, next );
1120
+ },
1121
+
1122
+ nextPage: function( event ) {
1123
+ var item, base, height;
1124
+
1125
+ if ( !this.active ) {
1126
+ this.next( event );
1127
+ return;
1128
+ }
1129
+ if ( this.isLastItem() ) {
1130
+ return;
1131
+ }
1132
+ if ( this._hasScroll() ) {
1133
+ base = this.active.offset().top;
1134
+ height = this.element.height();
1135
+ this.active.nextAll( ".ui-menu-item" ).each(function() {
1136
+ item = $( this );
1137
+ return item.offset().top - base - height < 0;
1138
+ });
1139
+
1140
+ this.focus( event, item );
1141
+ } else {
1142
+ this.focus( event, this.activeMenu.find( this.options.items )
1143
+ [ !this.active ? "first" : "last" ]() );
1144
+ }
1145
+ },
1146
+
1147
+ previousPage: function( event ) {
1148
+ var item, base, height;
1149
+ if ( !this.active ) {
1150
+ this.next( event );
1151
+ return;
1152
+ }
1153
+ if ( this.isFirstItem() ) {
1154
+ return;
1155
+ }
1156
+ if ( this._hasScroll() ) {
1157
+ base = this.active.offset().top;
1158
+ height = this.element.height();
1159
+ this.active.prevAll( ".ui-menu-item" ).each(function() {
1160
+ item = $( this );
1161
+ return item.offset().top - base + height > 0;
1162
+ });
1163
+
1164
+ this.focus( event, item );
1165
+ } else {
1166
+ this.focus( event, this.activeMenu.find( this.options.items ).first() );
1167
+ }
1168
+ },
1169
+
1170
+ _hasScroll: function() {
1171
+ return this.element.outerHeight() < this.element.prop( "scrollHeight" );
1172
+ },
1173
+
1174
+ select: function( event ) {
1175
+ // TODO: It should never be possible to not have an active item at this
1176
+ // point, but the tests don't trigger mouseenter before click.
1177
+ this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
1178
+ var ui = { item: this.active };
1179
+ if ( !this.active.has( ".ui-menu" ).length ) {
1180
+ this.collapseAll( event, true );
1181
+ }
1182
+ this._trigger( "select", event, ui );
1183
+ },
1184
+
1185
+ _filterMenuItems: function(character) {
1186
+ var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
1187
+ regex = new RegExp( "^" + escapedCharacter, "i" );
1188
+
1189
+ return this.activeMenu
1190
+ .find( this.options.items )
1191
+
1192
+ // Only match on items, not dividers or other content (#10571)
1193
+ .filter( ".ui-menu-item" )
1194
+ .filter(function() {
1195
+ return regex.test( $.trim( $( this ).text() ) );
1196
+ });
1197
+ }
1198
+ });
1199
+
1200
+
1201
+ /*!
1202
+ * jQuery UI Selectmenu 1.11.2
1203
+ * http://jqueryui.com
1204
+ *
1205
+ * Copyright 2014 jQuery Foundation and other contributors
1206
+ * Released under the MIT license.
1207
+ * http://jquery.org/license
1208
+ *
1209
+ * http://api.jqueryui.com/selectmenu
1210
+ */
1211
+
1212
+
1213
+ var selectmenu = $.widget( "ui.selectmenu", {
1214
+ version: "1.11.2",
1215
+ defaultElement: "<select>",
1216
+ options: {
1217
+ appendTo: null,
1218
+ disabled: null,
1219
+ icons: {
1220
+ button: "ui-icon-triangle-1-s"
1221
+ },
1222
+ position: {
1223
+ my: "left top",
1224
+ at: "left bottom",
1225
+ collision: "none"
1226
+ },
1227
+ width: null,
1228
+
1229
+ // callbacks
1230
+ change: null,
1231
+ close: null,
1232
+ focus: null,
1233
+ open: null,
1234
+ select: null
1235
+ },
1236
+
1237
+ _create: function() {
1238
+ var selectmenuId = this.element.uniqueId().attr( "id" );
1239
+ this.ids = {
1240
+ element: selectmenuId,
1241
+ button: selectmenuId + "-button",
1242
+ menu: selectmenuId + "-menu"
1243
+ };
1244
+
1245
+ this._drawButton();
1246
+ this._drawMenu();
1247
+
1248
+ if ( this.options.disabled ) {
1249
+ this.disable();
1250
+ }
1251
+ },
1252
+
1253
+ _drawButton: function() {
1254
+ var that = this,
1255
+ tabindex = this.element.attr( "tabindex" );
1256
+
1257
+ // Associate existing label with the new button
1258
+ this.label = $( "label[for='" + this.ids.element + "']" ).attr( "for", this.ids.button );
1259
+ this._on( this.label, {
1260
+ click: function( event ) {
1261
+ this.button.focus();
1262
+ event.preventDefault();
1263
+ }
1264
+ });
1265
+
1266
+ // Hide original select element
1267
+ this.element.hide();
1268
+
1269
+ // Create button
1270
+ this.button = $( "<span>", {
1271
+ "class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all",
1272
+ tabindex: tabindex || this.options.disabled ? -1 : 0,
1273
+ id: this.ids.button,
1274
+ role: "combobox",
1275
+ "aria-expanded": "false",
1276
+ "aria-autocomplete": "list",
1277
+ "aria-owns": this.ids.menu,
1278
+ "aria-haspopup": "true"
1279
+ })
1280
+ .insertAfter( this.element );
1281
+
1282
+ $( "<span>", {
1283
+ "class": "ui-icon " + this.options.icons.button
1284
+ })
1285
+ .prependTo( this.button );
1286
+
1287
+ this.buttonText = $( "<span>", {
1288
+ "class": "ui-selectmenu-text"
1289
+ })
1290
+ .appendTo( this.button );
1291
+
1292
+ this._setText( this.buttonText, this.element.find( "option:selected" ).text() );
1293
+ this._resizeButton();
1294
+
1295
+ this._on( this.button, this._buttonEvents );
1296
+ this.button.one( "focusin", function() {
1297
+
1298
+ // Delay rendering the menu items until the button receives focus.
1299
+ // The menu may have already been rendered via a programmatic open.
1300
+ if ( !that.menuItems ) {
1301
+ that._refreshMenu();
1302
+ }
1303
+ });
1304
+ this._hoverable( this.button );
1305
+ this._focusable( this.button );
1306
+ },
1307
+
1308
+ _drawMenu: function() {
1309
+ var that = this;
1310
+
1311
+ // Create menu
1312
+ this.menu = $( "<ul>", {
1313
+ "aria-hidden": "true",
1314
+ "aria-labelledby": this.ids.button,
1315
+ id: this.ids.menu
1316
+ });
1317
+
1318
+ // Wrap menu
1319
+ this.menuWrap = $( "<div>", {
1320
+ "class": "ui-selectmenu-menu ui-front"
1321
+ })
1322
+ .append( this.menu )
1323
+ .appendTo( this._appendTo() );
1324
+
1325
+ // Initialize menu widget
1326
+ this.menuInstance = this.menu
1327
+ .menu({
1328
+ role: "listbox",
1329
+ select: function( event, ui ) {
1330
+ event.preventDefault();
1331
+
1332
+ // support: IE8
1333
+ // If the item was selected via a click, the text selection
1334
+ // will be destroyed in IE
1335
+ that._setSelection();
1336
+
1337
+ that._select( ui.item.data( "ui-selectmenu-item" ), event );
1338
+ },
1339
+ focus: function( event, ui ) {
1340
+ var item = ui.item.data( "ui-selectmenu-item" );
1341
+
1342
+ // Prevent inital focus from firing and check if its a newly focused item
1343
+ if ( that.focusIndex != null && item.index !== that.focusIndex ) {
1344
+ that._trigger( "focus", event, { item: item } );
1345
+ if ( !that.isOpen ) {
1346
+ that._select( item, event );
1347
+ }
1348
+ }
1349
+ that.focusIndex = item.index;
1350
+
1351
+ that.button.attr( "aria-activedescendant",
1352
+ that.menuItems.eq( item.index ).attr( "id" ) );
1353
+ }
1354
+ })
1355
+ .menu( "instance" );
1356
+
1357
+ // Adjust menu styles to dropdown
1358
+ this.menu
1359
+ .addClass( "ui-corner-bottom" )
1360
+ .removeClass( "ui-corner-all" );
1361
+
1362
+ // Don't close the menu on mouseleave
1363
+ this.menuInstance._off( this.menu, "mouseleave" );
1364
+
1365
+ // Cancel the menu's collapseAll on document click
1366
+ this.menuInstance._closeOnDocumentClick = function() {
1367
+ return false;
1368
+ };
1369
+
1370
+ // Selects often contain empty items, but never contain dividers
1371
+ this.menuInstance._isDivider = function() {
1372
+ return false;
1373
+ };
1374
+ },
1375
+
1376
+ refresh: function() {
1377
+ this._refreshMenu();
1378
+ this._setText( this.buttonText, this._getSelectedItem().text() );
1379
+ if ( !this.options.width ) {
1380
+ this._resizeButton();
1381
+ }
1382
+ },
1383
+
1384
+ _refreshMenu: function() {
1385
+ this.menu.empty();
1386
+
1387
+ var item,
1388
+ options = this.element.find( "option" );
1389
+
1390
+ if ( !options.length ) {
1391
+ return;
1392
+ }
1393
+
1394
+ this._parseOptions( options );
1395
+ this._renderMenu( this.menu, this.items );
1396
+
1397
+ this.menuInstance.refresh();
1398
+ this.menuItems = this.menu.find( "li" ).not( ".ui-selectmenu-optgroup" );
1399
+
1400
+ item = this._getSelectedItem();
1401
+
1402
+ // Update the menu to have the correct item focused
1403
+ this.menuInstance.focus( null, item );
1404
+ this._setAria( item.data( "ui-selectmenu-item" ) );
1405
+
1406
+ // Set disabled state
1407
+ this._setOption( "disabled", this.element.prop( "disabled" ) );
1408
+ },
1409
+
1410
+ open: function( event ) {
1411
+ if ( this.options.disabled ) {
1412
+ return;
1413
+ }
1414
+
1415
+ // If this is the first time the menu is being opened, render the items
1416
+ if ( !this.menuItems ) {
1417
+ this._refreshMenu();
1418
+ } else {
1419
+
1420
+ // Menu clears focus on close, reset focus to selected item
1421
+ this.menu.find( ".ui-state-focus" ).removeClass( "ui-state-focus" );
1422
+ this.menuInstance.focus( null, this._getSelectedItem() );
1423
+ }
1424
+
1425
+ this.isOpen = true;
1426
+ this._toggleAttr();
1427
+ this._resizeMenu();
1428
+ this._position();
1429
+
1430
+ this._on( this.document, this._documentClick );
1431
+
1432
+ this._trigger( "open", event );
1433
+ },
1434
+
1435
+ _position: function() {
1436
+ this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
1437
+ },
1438
+
1439
+ close: function( event ) {
1440
+ if ( !this.isOpen ) {
1441
+ return;
1442
+ }
1443
+
1444
+ this.isOpen = false;
1445
+ this._toggleAttr();
1446
+
1447
+ this.range = null;
1448
+ this._off( this.document );
1449
+
1450
+ this._trigger( "close", event );
1451
+ },
1452
+
1453
+ widget: function() {
1454
+ return this.button;
1455
+ },
1456
+
1457
+ menuWidget: function() {
1458
+ return this.menu;
1459
+ },
1460
+
1461
+ _renderMenu: function( ul, items ) {
1462
+ var that = this,
1463
+ currentOptgroup = "";
1464
+
1465
+ $.each( items, function( index, item ) {
1466
+ if ( item.optgroup !== currentOptgroup ) {
1467
+ $( "<li>", {
1468
+ "class": "ui-selectmenu-optgroup ui-menu-divider" +
1469
+ ( item.element.parent( "optgroup" ).prop( "disabled" ) ?
1470
+ " ui-state-disabled" :
1471
+ "" ),
1472
+ text: item.optgroup
1473
+ })
1474
+ .appendTo( ul );
1475
+
1476
+ currentOptgroup = item.optgroup;
1477
+ }
1478
+
1479
+ that._renderItemData( ul, item );
1480
+ });
1481
+ },
1482
+
1483
+ _renderItemData: function( ul, item ) {
1484
+ return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
1485
+ },
1486
+
1487
+ _renderItem: function( ul, item ) {
1488
+ var li = $( "<li>" );
1489
+
1490
+ if ( item.disabled ) {
1491
+ li.addClass( "ui-state-disabled" );
1492
+ }
1493
+ this._setText( li, item.label );
1494
+
1495
+ return li.appendTo( ul );
1496
+ },
1497
+
1498
+ _setText: function( element, value ) {
1499
+ if ( value ) {
1500
+ element.text( value );
1501
+ } else {
1502
+ element.html( "&#160;" );
1503
+ }
1504
+ },
1505
+
1506
+ _move: function( direction, event ) {
1507
+ var item, next,
1508
+ filter = ".ui-menu-item";
1509
+
1510
+ if ( this.isOpen ) {
1511
+ item = this.menuItems.eq( this.focusIndex );
1512
+ } else {
1513
+ item = this.menuItems.eq( this.element[ 0 ].selectedIndex );
1514
+ filter += ":not(.ui-state-disabled)";
1515
+ }
1516
+
1517
+ if ( direction === "first" || direction === "last" ) {
1518
+ next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
1519
+ } else {
1520
+ next = item[ direction + "All" ]( filter ).eq( 0 );
1521
+ }
1522
+
1523
+ if ( next.length ) {
1524
+ this.menuInstance.focus( event, next );
1525
+ }
1526
+ },
1527
+
1528
+ _getSelectedItem: function() {
1529
+ return this.menuItems.eq( this.element[ 0 ].selectedIndex );
1530
+ },
1531
+
1532
+ _toggle: function( event ) {
1533
+ this[ this.isOpen ? "close" : "open" ]( event );
1534
+ },
1535
+
1536
+ _setSelection: function() {
1537
+ var selection;
1538
+
1539
+ if ( !this.range ) {
1540
+ return;
1541
+ }
1542
+
1543
+ if ( window.getSelection ) {
1544
+ selection = window.getSelection();
1545
+ selection.removeAllRanges();
1546
+ selection.addRange( this.range );
1547
+
1548
+ // support: IE8
1549
+ } else {
1550
+ this.range.select();
1551
+ }
1552
+
1553
+ // support: IE
1554
+ // Setting the text selection kills the button focus in IE, but
1555
+ // restoring the focus doesn't kill the selection.
1556
+ this.button.focus();
1557
+ },
1558
+
1559
+ _documentClick: {
1560
+ mousedown: function( event ) {
1561
+ if ( !this.isOpen ) {
1562
+ return;
1563
+ }
1564
+
1565
+ if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + this.ids.button ).length ) {
1566
+ this.close( event );
1567
+ }
1568
+ }
1569
+ },
1570
+
1571
+ _buttonEvents: {
1572
+
1573
+ // Prevent text selection from being reset when interacting with the selectmenu (#10144)
1574
+ mousedown: function() {
1575
+ var selection;
1576
+
1577
+ if ( window.getSelection ) {
1578
+ selection = window.getSelection();
1579
+ if ( selection.rangeCount ) {
1580
+ this.range = selection.getRangeAt( 0 );
1581
+ }
1582
+
1583
+ // support: IE8
1584
+ } else {
1585
+ this.range = document.selection.createRange();
1586
+ }
1587
+ },
1588
+
1589
+ click: function( event ) {
1590
+ this._setSelection();
1591
+ this._toggle( event );
1592
+ },
1593
+
1594
+ keydown: function( event ) {
1595
+ var preventDefault = true;
1596
+ switch ( event.keyCode ) {
1597
+ case $.ui.keyCode.TAB:
1598
+ case $.ui.keyCode.ESCAPE:
1599
+ this.close( event );
1600
+ preventDefault = false;
1601
+ break;
1602
+ case $.ui.keyCode.ENTER:
1603
+ if ( this.isOpen ) {
1604
+ this._selectFocusedItem( event );
1605
+ }
1606
+ break;
1607
+ case $.ui.keyCode.UP:
1608
+ if ( event.altKey ) {
1609
+ this._toggle( event );
1610
+ } else {
1611
+ this._move( "prev", event );
1612
+ }
1613
+ break;
1614
+ case $.ui.keyCode.DOWN:
1615
+ if ( event.altKey ) {
1616
+ this._toggle( event );
1617
+ } else {
1618
+ this._move( "next", event );
1619
+ }
1620
+ break;
1621
+ case $.ui.keyCode.SPACE:
1622
+ if ( this.isOpen ) {
1623
+ this._selectFocusedItem( event );
1624
+ } else {
1625
+ this._toggle( event );
1626
+ }
1627
+ break;
1628
+ case $.ui.keyCode.LEFT:
1629
+ this._move( "prev", event );
1630
+ break;
1631
+ case $.ui.keyCode.RIGHT:
1632
+ this._move( "next", event );
1633
+ break;
1634
+ case $.ui.keyCode.HOME:
1635
+ case $.ui.keyCode.PAGE_UP:
1636
+ this._move( "first", event );
1637
+ break;
1638
+ case $.ui.keyCode.END:
1639
+ case $.ui.keyCode.PAGE_DOWN:
1640
+ this._move( "last", event );
1641
+ break;
1642
+ default:
1643
+ this.menu.trigger( event );
1644
+ preventDefault = false;
1645
+ }
1646
+
1647
+ if ( preventDefault ) {
1648
+ event.preventDefault();
1649
+ }
1650
+ }
1651
+ },
1652
+
1653
+ _selectFocusedItem: function( event ) {
1654
+ var item = this.menuItems.eq( this.focusIndex );
1655
+ if ( !item.hasClass( "ui-state-disabled" ) ) {
1656
+ this._select( item.data( "ui-selectmenu-item" ), event );
1657
+ }
1658
+ },
1659
+
1660
+ _select: function( item, event ) {
1661
+ var oldIndex = this.element[ 0 ].selectedIndex;
1662
+
1663
+ // Change native select element
1664
+ this.element[ 0 ].selectedIndex = item.index;
1665
+ this._setText( this.buttonText, item.label );
1666
+ this._setAria( item );
1667
+ this._trigger( "select", event, { item: item } );
1668
+
1669
+ if ( item.index !== oldIndex ) {
1670
+ this._trigger( "change", event, { item: item } );
1671
+ }
1672
+
1673
+ this.close( event );
1674
+ },
1675
+
1676
+ _setAria: function( item ) {
1677
+ var id = this.menuItems.eq( item.index ).attr( "id" );
1678
+
1679
+ this.button.attr({
1680
+ "aria-labelledby": id,
1681
+ "aria-activedescendant": id
1682
+ });
1683
+ this.menu.attr( "aria-activedescendant", id );
1684
+ },
1685
+
1686
+ _setOption: function( key, value ) {
1687
+ if ( key === "icons" ) {
1688
+ this.button.find( "span.ui-icon" )
1689
+ .removeClass( this.options.icons.button )
1690
+ .addClass( value.button );
1691
+ }
1692
+
1693
+ this._super( key, value );
1694
+
1695
+ if ( key === "appendTo" ) {
1696
+ this.menuWrap.appendTo( this._appendTo() );
1697
+ }
1698
+
1699
+ if ( key === "disabled" ) {
1700
+ this.menuInstance.option( "disabled", value );
1701
+ this.button
1702
+ .toggleClass( "ui-state-disabled", value )
1703
+ .attr( "aria-disabled", value );
1704
+
1705
+ this.element.prop( "disabled", value );
1706
+ if ( value ) {
1707
+ this.button.attr( "tabindex", -1 );
1708
+ this.close();
1709
+ } else {
1710
+ this.button.attr( "tabindex", 0 );
1711
+ }
1712
+ }
1713
+
1714
+ if ( key === "width" ) {
1715
+ this._resizeButton();
1716
+ }
1717
+ },
1718
+
1719
+ _appendTo: function() {
1720
+ var element = this.options.appendTo;
1721
+
1722
+ if ( element ) {
1723
+ element = element.jquery || element.nodeType ?
1724
+ $( element ) :
1725
+ this.document.find( element ).eq( 0 );
1726
+ }
1727
+
1728
+ if ( !element || !element[ 0 ] ) {
1729
+ element = this.element.closest( ".ui-front" );
1730
+ }
1731
+
1732
+ if ( !element.length ) {
1733
+ element = this.document[ 0 ].body;
1734
+ }
1735
+
1736
+ return element;
1737
+ },
1738
+
1739
+ _toggleAttr: function() {
1740
+ this.button
1741
+ .toggleClass( "ui-corner-top", this.isOpen )
1742
+ .toggleClass( "ui-corner-all", !this.isOpen )
1743
+ .attr( "aria-expanded", this.isOpen );
1744
+ this.menuWrap.toggleClass( "ui-selectmenu-open", this.isOpen );
1745
+ this.menu.attr( "aria-hidden", !this.isOpen );
1746
+ },
1747
+
1748
+ _resizeButton: function() {
1749
+ var width = this.options.width;
1750
+
1751
+ if ( !width ) {
1752
+ width = this.element.show().outerWidth();
1753
+ this.element.hide();
1754
+ }
1755
+
1756
+ this.button.outerWidth( width );
1757
+ },
1758
+
1759
+ _resizeMenu: function() {
1760
+ this.menu.outerWidth( Math.max(
1761
+ this.button.outerWidth(),
1762
+
1763
+ // support: IE10
1764
+ // IE10 wraps long text (possibly a rounding bug)
1765
+ // so we add 1px to avoid the wrapping
1766
+ this.menu.width( "" ).outerWidth() + 1
1767
+ ) );
1768
+ },
1769
+
1770
+ _getCreateOptions: function() {
1771
+ return { disabled: this.element.prop( "disabled" ) };
1772
+ },
1773
+
1774
+ _parseOptions: function( options ) {
1775
+ var data = [];
1776
+ options.each(function( index, item ) {
1777
+ var option = $( item ),
1778
+ optgroup = option.parent( "optgroup" );
1779
+ data.push({
1780
+ element: option,
1781
+ index: index,
1782
+ value: option.attr( "value" ),
1783
+ label: option.text(),
1784
+ optgroup: optgroup.attr( "label" ) || "",
1785
+ disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
1786
+ });
1787
+ });
1788
+ this.items = data;
1789
+ },
1790
+
1791
+ _destroy: function() {
1792
+ this.menuWrap.remove();
1793
+ this.button.remove();
1794
+ this.element.show();
1795
+ this.element.removeUniqueId();
1796
+ this.label.attr( "for", this.ids.element );
1797
+ }
1798
+ });
1799
+
1800
+
1801
+
1802
+ })
1803
+
1804
+ );
js/selectmenu.min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(c){var f=0,a=Array.prototype.slice;c.cleanData=(function(g){return function(h){var k,l,j;for(j=0;(l=h[j])!=null;j++){try{k=c._data(l,"events");if(k&&k.remove){c(l).triggerHandler("remove")}}catch(m){}}g(h)}})(c.cleanData);c.widget=function(g,h,o){var l,m,j,n,i={},k=g.split(".")[0];g=g.split(".")[1];l=k+"-"+g;if(!o){o=h;h=c.Widget}c.expr[":"][l.toLowerCase()]=function(p){return !!c.data(p,l)};c[k]=c[k]||{};m=c[k][g];j=c[k][g]=function(p,q){if(!this._createWidget){return new j(p,q)}if(arguments.length){this._createWidget(p,q)}};c.extend(j,m,{version:o.version,_proto:c.extend({},o),_childConstructors:[]});n=new h();n.options=c.widget.extend({},n.options);c.each(o,function(q,p){if(!c.isFunction(p)){i[q]=p;return}i[q]=(function(){var r=function(){return h.prototype[q].apply(this,arguments)},s=function(t){return h.prototype[q].apply(this,t)};return function(){var v=this._super,t=this._superApply,u;this._super=r;this._superApply=s;u=p.apply(this,arguments);this._super=v;this._superApply=t;return u}})()});j.prototype=c.widget.extend(n,{widgetEventPrefix:m?(n.widgetEventPrefix||g):g},i,{constructor:j,namespace:k,widgetName:g,widgetFullName:l});if(m){c.each(m._childConstructors,function(q,r){var p=r.prototype;c.widget(p.namespace+"."+p.widgetName,j,r._proto)});delete m._childConstructors}else{h._childConstructors.push(j)}c.widget.bridge(g,j);return j};c.widget.extend=function(l){var h=a.call(arguments,1),k=0,g=h.length,i,j;for(;k<g;k++){for(i in h[k]){j=h[k][i];if(h[k].hasOwnProperty(i)&&j!==undefined){if(c.isPlainObject(j)){l[i]=c.isPlainObject(l[i])?c.widget.extend({},l[i],j):c.widget.extend({},j)}else{l[i]=j}}}}return l};c.widget.bridge=function(h,g){var i=g.prototype.widgetFullName||h;c.fn[h]=function(l){var j=typeof l==="string",k=a.call(arguments,1),m=this;l=!j&&k.length?c.widget.extend.apply(null,[l].concat(k)):l;if(j){this.each(function(){var o,n=c.data(this,i);if(l==="instance"){m=n;return false}if(!n){return c.error("cannot call methods on "+h+" prior to initialization; attempted to call method '"+l+"'")}if(!c.isFunction(n[l])||l.charAt(0)==="_"){return c.error("no such method '"+l+"' for "+h+" widget instance")}o=n[l].apply(n,k);if(o!==n&&o!==undefined){m=o&&o.jquery?m.pushStack(o.get()):o;return false}})}else{this.each(function(){var n=c.data(this,i);if(n){n.option(l||{});if(n._init){n._init()}}else{c.data(this,i,new g(l,this))}})}return m}};c.Widget=function(){};c.Widget._childConstructors=[];c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:false,create:null},_createWidget:function(g,h){h=c(h||this.defaultElement||this)[0];this.element=c(h);this.uuid=f++;this.eventNamespace="."+this.widgetName+this.uuid;this.bindings=c();this.hoverable=c();this.focusable=c();if(h!==this){c.data(h,this.widgetFullName,this);this._on(true,this.element,{remove:function(i){if(i.target===h){this.destroy()}}});this.document=c(h.style?h.ownerDocument:h.document||h);this.window=c(this.document[0].defaultView||this.document[0].parentWindow)}this.options=c.widget.extend({},this.options,this._getCreateOptions(),g);this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:c.noop,_getCreateEventData:c.noop,_create:c.noop,_init:c.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(c.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:c.noop,widget:function(){return this.element},option:function(k,l){var g=k,m,j,h;if(arguments.length===0){return c.widget.extend({},this.options)}if(typeof k==="string"){g={};m=k.split(".");k=m.shift();if(m.length){j=g[k]=c.widget.extend({},this.options[k]);for(h=0;h<m.length-1;h++){j[m[h]]=j[m[h]]||{};j=j[m[h]]}k=m.pop();if(arguments.length===1){return j[k]===undefined?null:j[k]}j[k]=l}else{if(arguments.length===1){return this.options[k]===undefined?null:this.options[k]}g[k]=l}}this._setOptions(g);return this},_setOptions:function(g){var h;for(h in g){this._setOption(h,g[h])}return this},_setOption:function(g,h){this.options[g]=h;if(g==="disabled"){this.widget().toggleClass(this.widgetFullName+"-disabled",!!h);if(h){this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")}}return this},enable:function(){return this._setOptions({disabled:false})},disable:function(){return this._setOptions({disabled:true})},_on:function(j,i,h){var k,g=this;if(typeof j!=="boolean"){h=i;i=j;j=false}if(!h){h=i;i=this.element;k=this.widget()}else{i=k=c(i);this.bindings=this.bindings.add(i)}c.each(h,function(q,p){function n(){if(!j&&(g.options.disabled===true||c(this).hasClass("ui-state-disabled"))){return}return(typeof p==="string"?g[p]:p).apply(g,arguments)}if(typeof p!=="string"){n.guid=p.guid=p.guid||n.guid||c.guid++}var o=q.match(/^([\w:-]*)\s*(.*)$/),m=o[1]+g.eventNamespace,l=o[2];if(l){k.delegate(l,m,n)}else{i.bind(m,n)}})},_off:function(h,g){g=(g||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;h.unbind(g).undelegate(g);this.bindings=c(this.bindings.not(h).get());this.focusable=c(this.focusable.not(h).get());this.hoverable=c(this.hoverable.not(h).get())},_delay:function(j,i){function h(){return(typeof j==="string"?g[j]:j).apply(g,arguments)}var g=this;return setTimeout(h,i||0)},_hoverable:function(g){this.hoverable=this.hoverable.add(g);this._on(g,{mouseenter:function(h){c(h.currentTarget).addClass("ui-state-hover")},mouseleave:function(h){c(h.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(g){this.focusable=this.focusable.add(g);this._on(g,{focusin:function(h){c(h.currentTarget).addClass("ui-state-focus")},focusout:function(h){c(h.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(g,h,i){var l,k,j=this.options[g];i=i||{};h=c.Event(h);h.type=(g===this.widgetEventPrefix?g:this.widgetEventPrefix+g).toLowerCase();h.target=this.element[0];k=h.originalEvent;if(k){for(l in k){if(!(l in h)){h[l]=k[l]}}}this.element.trigger(h,i);return !(c.isFunction(j)&&j.apply(this.element[0],[h].concat(i))===false||h.isDefaultPrevented())}};c.each({show:"fadeIn",hide:"fadeOut"},function(h,g){c.Widget.prototype["_"+h]=function(k,j,m){if(typeof j==="string"){j={effect:j}}var l,i=!j?h:j===true||typeof j==="number"?g:j.effect||g;j=j||{};if(typeof j==="number"){j={duration:j}}l=!c.isEmptyObject(j);j.complete=m;if(j.delay){k.delay(j.delay)}if(l&&c.effects&&c.effects.effect[i]){k[h](j)}else{if(i!==h&&k[i]){k[i](j.duration,j.easing,m)}else{k.queue(function(n){c(this)[h]();if(m){m.call(k[0])}n()})}}}});var b=c.widget;var e=c.widget("ui.menu",{version:"1.11.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=false;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0});if(this.options.disabled){this.element.addClass("ui-state-disabled").attr("aria-disabled","true")}this._on({"mousedown .ui-menu-item":function(g){g.preventDefault()},"click .ui-menu-item":function(g){var h=c(g.target);if(!this.mouseHandled&&h.not(".ui-state-disabled").length){this.select(g);if(!g.isPropagationStopped()){this.mouseHandled=true}if(h.has(".ui-menu").length){this.expand(g)}else{if(!this.element.is(":focus")&&c(this.document[0].activeElement).closest(".ui-menu").length){this.element.trigger("focus",[true]);if(this.active&&this.active.parents(".ui-menu").length===1){clearTimeout(this.timer)}}}}},"mouseenter .ui-menu-item":function(g){if(this.previousFilter){return}var h=c(g.currentTarget);h.siblings(".ui-state-active").removeClass("ui-state-active");this.focus(g,h)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(i,g){var h=this.active||this.element.find(this.options.items).eq(0);if(!g){this.focus(i,h)}},blur:function(g){this._delay(function(){if(!c.contains(this.element[0],this.document[0].activeElement)){this.collapseAll(g)}})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(g){if(this._closeOnDocumentClick(g)){this.collapseAll(g)}this.mouseHandled=false}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var g=c(this);if(g.data("ui-menu-submenu-carat")){g.remove()}});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(k){var h,j,l,i,g=true;switch(k.keyCode){case c.ui.keyCode.PAGE_UP:this.previousPage(k);break;case c.ui.keyCode.PAGE_DOWN:this.nextPage(k);break;case c.ui.keyCode.HOME:this._move("first","first",k);break;case c.ui.keyCode.END:this._move("last","last",k);break;case c.ui.keyCode.UP:this.previous(k);break;case c.ui.keyCode.DOWN:this.next(k);break;case c.ui.keyCode.LEFT:this.collapse(k);break;case c.ui.keyCode.RIGHT:if(this.active&&!this.active.is(".ui-state-disabled")){this.expand(k)}break;case c.ui.keyCode.ENTER:case c.ui.keyCode.SPACE:this._activate(k);break;case c.ui.keyCode.ESCAPE:this.collapse(k);break;default:g=false;j=this.previousFilter||"";l=String.fromCharCode(k.keyCode);i=false;clearTimeout(this.filterTimer);if(l===j){i=true}else{l=j+l}h=this._filterMenuItems(l);h=i&&h.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):h;if(!h.length){l=String.fromCharCode(k.keyCode);h=this._filterMenuItems(l)}if(h.length){this.focus(k,h);this.previousFilter=l;this.filterTimer=this._delay(function(){delete this.previousFilter},1000)}else{delete this.previousFilter}}if(g){k.preventDefault()}},_activate:function(g){if(!this.active.is(".ui-state-disabled")){if(this.active.is("[aria-haspopup='true']")){this.expand(g)}else{this.select(g)}}},refresh:function(){var k,h,j=this,i=this.options.icons.submenu,g=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length);g.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var n=c(this),m=n.parent(),l=c("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",true);m.attr("aria-haspopup","true").prepend(l);n.attr("aria-labelledby",m.attr("id"))});k=g.add(this.element);h=k.find(this.options.items);h.not(".ui-menu-item").each(function(){var l=c(this);if(j._isDivider(l)){l.addClass("ui-widget-content ui-menu-divider")}});h.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()});h.filter(".ui-state-disabled").attr("aria-disabled","true");if(this.active&&!c.contains(this.element[0],this.active[0])){this.blur()}},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(g,h){if(g==="icons"){this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(h.submenu)}if(g==="disabled"){this.element.toggleClass("ui-state-disabled",!!h).attr("aria-disabled",h)}this._super(g,h)},focus:function(h,g){var j,i;this.blur(h,h&&h.type==="focus");this._scrollIntoView(g);this.active=g.first();i=this.active.addClass("ui-state-focus").removeClass("ui-state-active");if(this.options.role){this.element.attr("aria-activedescendant",i.attr("id"))}this.active.parent().closest(".ui-menu-item").addClass("ui-state-active");if(h&&h.type==="keydown"){this._close()}else{this.timer=this._delay(function(){this._close()},this.delay)}j=g.children(".ui-menu");if(j.length&&h&&(/^mouse/.test(h.type))){this._startOpening(j)}this.activeMenu=g.parent();this._trigger("focus",h,{item:g})},_scrollIntoView:function(j){var m,i,k,g,h,l;if(this._hasScroll()){m=parseFloat(c.css(this.activeMenu[0],"borderTopWidth"))||0;i=parseFloat(c.css(this.activeMenu[0],"paddingTop"))||0;k=j.offset().top-this.activeMenu.offset().top-m-i;g=this.activeMenu.scrollTop();h=this.activeMenu.height();l=j.outerHeight();if(k<0){this.activeMenu.scrollTop(g+k)}else{if(k+l>h){this.activeMenu.scrollTop(g+k-h+l)}}}},blur:function(h,g){if(!g){clearTimeout(this.timer)}if(!this.active){return}this.active.removeClass("ui-state-focus");this.active=null;this._trigger("blur",h,{item:this.active})},_startOpening:function(g){clearTimeout(this.timer);if(g.attr("aria-hidden")!=="true"){return}this.timer=this._delay(function(){this._close();this._open(g)},this.delay)},_open:function(h){var g=c.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(h.parents(".ui-menu")).hide().attr("aria-hidden","true");h.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(g)},collapseAll:function(h,g){clearTimeout(this.timer);this.timer=this._delay(function(){var i=g?this.element:c(h&&h.target).closest(this.element.find(".ui-menu"));if(!i.length){i=this.element}this._close(i);this.blur(h);this.activeMenu=i},this.delay)},_close:function(g){if(!g){g=this.active?this.active.parent():this.element}g.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(g){return !c(g.target).closest(".ui-menu").length},_isDivider:function(g){return !/[^\-\u2014\u2013\s]/.test(g.text())},collapse:function(h){var g=this.active&&this.active.parent().closest(".ui-menu-item",this.element);if(g&&g.length){this._close();this.focus(h,g)}},expand:function(h){var g=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();if(g&&g.length){this._open(g.parent());this._delay(function(){this.focus(h,g)})}},next:function(g){this._move("next","first",g)},previous:function(g){this._move("prev","last",g)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(j,h,i){var g;if(this.active){if(j==="first"||j==="last"){g=this.active[j==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1)}else{g=this.active[j+"All"](".ui-menu-item").eq(0)}}if(!g||!g.length||!this.active){g=this.activeMenu.find(this.options.items)[h]()}this.focus(i,g)},nextPage:function(i){var h,j,g;if(!this.active){this.next(i);return}if(this.isLastItem()){return}if(this._hasScroll()){j=this.active.offset().top;g=this.element.height();this.active.nextAll(".ui-menu-item").each(function(){h=c(this);return h.offset().top-j-g<0});this.focus(i,h)}else{this.focus(i,this.activeMenu.find(this.options.items)[!this.active?"first":"last"]())}},previousPage:function(i){var h,j,g;if(!this.active){this.next(i);return}if(this.isFirstItem()){return}if(this._hasScroll()){j=this.active.offset().top;g=this.element.height();this.active.prevAll(".ui-menu-item").each(function(){h=c(this);return h.offset().top-j+g>0});this.focus(i,h)}else{this.focus(i,this.activeMenu.find(this.options.items).first())}},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(g){this.active=this.active||c(g.target).closest(".ui-menu-item");var h={item:this.active};if(!this.active.has(".ui-menu").length){this.collapseAll(g,true)}this._trigger("select",g,h)},_filterMenuItems:function(i){var g=i.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),h=new RegExp("^"+g,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return h.test(c.trim(c(this).text()))})}});var d=c.widget("ui.selectmenu",{version:"1.11.2",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var g=this.element.uniqueId().attr("id");this.ids={element:g,button:g+"-button",menu:g+"-menu"};this._drawButton();this._drawMenu();if(this.options.disabled){this.disable()}},_drawButton:function(){var h=this,g=this.element.attr("tabindex");this.label=c("label[for='"+this.ids.element+"']").attr("for",this.ids.button);this._on(this.label,{click:function(i){this.button.focus();i.preventDefault()}});this.element.hide();this.button=c("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:g||this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element);c("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button);this.buttonText=c("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button);this._setText(this.buttonText,this.element.find("option:selected").text());this._resizeButton();this._on(this.button,this._buttonEvents);this.button.one("focusin",function(){if(!h.menuItems){h._refreshMenu()}});this._hoverable(this.button);this._focusable(this.button)},_drawMenu:function(){var g=this;this.menu=c("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu});this.menuWrap=c("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo());this.menuInstance=this.menu.menu({role:"listbox",select:function(h,i){h.preventDefault();g._setSelection();g._select(i.item.data("ui-selectmenu-item"),h)},focus:function(i,j){var h=j.item.data("ui-selectmenu-item");if(g.focusIndex!=null&&h.index!==g.focusIndex){g._trigger("focus",i,{item:h});if(!g.isOpen){g._select(h,i)}}g.focusIndex=h.index;g.button.attr("aria-activedescendant",g.menuItems.eq(h.index).attr("id"))}}).menu("instance");this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all");this.menuInstance._off(this.menu,"mouseleave");this.menuInstance._closeOnDocumentClick=function(){return false};this.menuInstance._isDivider=function(){return false}},refresh:function(){this._refreshMenu();this._setText(this.buttonText,this._getSelectedItem().text());if(!this.options.width){this._resizeButton()}},_refreshMenu:function(){this.menu.empty();var h,g=this.element.find("option");if(!g.length){return}this._parseOptions(g);this._renderMenu(this.menu,this.items);this.menuInstance.refresh();this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup");h=this._getSelectedItem();this.menuInstance.focus(null,h);this._setAria(h.data("ui-selectmenu-item"));this._setOption("disabled",this.element.prop("disabled"))},open:function(g){if(this.options.disabled){return}if(!this.menuItems){this._refreshMenu()}else{this.menu.find(".ui-state-focus").removeClass("ui-state-focus");this.menuInstance.focus(null,this._getSelectedItem())}this.isOpen=true;this._toggleAttr();this._resizeMenu();this._position();this._on(this.document,this._documentClick);this._trigger("open",g)},_position:function(){this.menuWrap.position(c.extend({of:this.button},this.options.position))},close:function(g){if(!this.isOpen){return}this.isOpen=false;this._toggleAttr();this.range=null;this._off(this.document);this._trigger("close",g)},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(i,h){var j=this,g="";c.each(h,function(k,l){if(l.optgroup!==g){c("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(l.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:l.optgroup}).appendTo(i);g=l.optgroup}j._renderItemData(i,l)})},_renderItemData:function(g,h){return this._renderItem(g,h).data("ui-selectmenu-item",h)},_renderItem:function(h,i){var g=c("<li>");if(i.disabled){g.addClass("ui-state-disabled")}this._setText(g,i.label);return g.appendTo(h)},_setText:function(g,h){if(h){g.text(h)}else{g.html("&#160;")}},_move:function(k,j){var i,h,g=".ui-menu-item";if(this.isOpen){i=this.menuItems.eq(this.focusIndex)}else{i=this.menuItems.eq(this.element[0].selectedIndex);g+=":not(.ui-state-disabled)"}if(k==="first"||k==="last"){h=i[k==="first"?"prevAll":"nextAll"](g).eq(-1)}else{h=i[k+"All"](g).eq(0)}if(h.length){this.menuInstance.focus(j,h)}},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(g){this[this.isOpen?"close":"open"](g)},_setSelection:function(){var g;if(!this.range){return}if(window.getSelection){g=window.getSelection();g.removeAllRanges();g.addRange(this.range)}else{this.range.select()}this.button.focus()},_documentClick:{mousedown:function(g){if(!this.isOpen){return}if(!c(g.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length){this.close(g)}}},_buttonEvents:{mousedown:function(){var g;if(window.getSelection){g=window.getSelection();if(g.rangeCount){this.range=g.getRangeAt(0)}}else{this.range=document.selection.createRange()}},click:function(g){this._setSelection();this._toggle(g)},keydown:function(h){var g=true;switch(h.keyCode){case c.ui.keyCode.TAB:case c.ui.keyCode.ESCAPE:this.close(h);g=false;break;case c.ui.keyCode.ENTER:if(this.isOpen){this._selectFocusedItem(h)}break;case c.ui.keyCode.UP:if(h.altKey){this._toggle(h)}else{this._move("prev",h)}break;case c.ui.keyCode.DOWN:if(h.altKey){this._toggle(h)}else{this._move("next",h)}break;case c.ui.keyCode.SPACE:if(this.isOpen){this._selectFocusedItem(h)}else{this._toggle(h)}break;case c.ui.keyCode.LEFT:this._move("prev",h);break;case c.ui.keyCode.RIGHT:this._move("next",h);break;case c.ui.keyCode.HOME:case c.ui.keyCode.PAGE_UP:this._move("first",h);break;case c.ui.keyCode.END:case c.ui.keyCode.PAGE_DOWN:this._move("last",h);break;default:this.menu.trigger(h);g=false}if(g){h.preventDefault()}}},_selectFocusedItem:function(h){var g=this.menuItems.eq(this.focusIndex);if(!g.hasClass("ui-state-disabled")){this._select(g.data("ui-selectmenu-item"),h)}},_select:function(h,g){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=h.index;this._setText(this.buttonText,h.label);this._setAria(h);this._trigger("select",g,{item:h});if(h.index!==i){this._trigger("change",g,{item:h})}this.close(g)},_setAria:function(g){var h=this.menuItems.eq(g.index).attr("id");this.button.attr({"aria-labelledby":h,"aria-activedescendant":h});this.menu.attr("aria-activedescendant",h)},_setOption:function(g,h){if(g==="icons"){this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(h.button)}this._super(g,h);if(g==="appendTo"){this.menuWrap.appendTo(this._appendTo())}if(g==="disabled"){this.menuInstance.option("disabled",h);this.button.toggleClass("ui-state-disabled",h).attr("aria-disabled",h);this.element.prop("disabled",h);if(h){this.button.attr("tabindex",-1);this.close()}else{this.button.attr("tabindex",0)}}if(g==="width"){this._resizeButton()}},_appendTo:function(){var g=this.options.appendTo;if(g){g=g.jquery||g.nodeType?c(g):this.document.find(g).eq(0)}if(!g||!g[0]){g=this.element.closest(".ui-front")}if(!g.length){g=this.document[0].body}return g},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen);this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen);this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var g=this.options.width;if(!g){g=this.element.show().outerWidth();this.element.hide()}this.button.outerWidth(g)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(g){var h=[];g.each(function(j,l){var k=c(l),i=k.parent("optgroup");h.push({element:k,index:j,value:k.attr("value"),label:k.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||k.prop("disabled")})});this.items=h},_destroy:function(){this.menuWrap.remove();this.button.remove();this.element.show();this.element.removeUniqueId();this.label.attr("for",this.ids.element)}})}));
lang/chld_thm_cfg.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Child Theme Configurator package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Child Theme Configurator 1.6.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/child-theme-configurator\n"
7
- "POT-Creation-Date: 2014-12-01 02:23:29+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -12,7 +12,7 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #. #-#-#-#-# chld_thm_cfg.pot (Child Theme Configurator 1.6.0) #-#-#-#-#
16
  #. Plugin Name of the plugin/theme
17
  #: child-theme-configurator.php:54 includes/forms/main.php:23
18
  msgid "Child Theme Configurator"
@@ -22,197 +22,197 @@ msgstr ""
22
  msgid "Child Themes"
23
  msgstr ""
24
 
25
- #: includes/class-ctc-ui.php:126
26
  msgid "Child Theme files modified successfully."
27
  msgstr ""
28
 
29
- #: includes/class-ctc-ui.php:128
30
  msgid ""
31
  "Child Theme <strong>%s</strong> has been generated successfully.\n"
32
  " "
33
  msgstr ""
34
 
35
- #: includes/class-ctc-ui.php:131
36
  msgid "IMPORTANT:"
37
  msgstr ""
38
 
39
- #: includes/class-ctc-ui.php:131 includes/forms/themepreview.php:16
40
  #: includes/forms/themepreview.php:17
41
  msgid "Live Preview"
42
  msgstr ""
43
 
44
- #: includes/class-ctc-ui.php:131
45
  msgid "Test your child theme"
46
  msgstr ""
47
 
48
- #: includes/class-ctc-ui.php:131
49
  msgid "before activating."
50
  msgstr ""
51
 
52
- #: includes/class-ctc.php:122
53
  msgid "URL/None"
54
  msgstr ""
55
 
56
- #: includes/class-ctc.php:123
57
  msgid "Origin"
58
  msgstr ""
59
 
60
- #: includes/class-ctc.php:124
61
  msgid "Color 1"
62
  msgstr ""
63
 
64
- #: includes/class-ctc.php:125
65
  msgid "Color 2"
66
  msgstr ""
67
 
68
- #: includes/class-ctc.php:126
69
  msgid "Width"
70
  msgstr ""
71
 
72
- #: includes/class-ctc.php:127
73
  msgid "Style"
74
  msgstr ""
75
 
76
- #: includes/class-ctc.php:128
77
  msgid "Color"
78
  msgstr ""
79
 
80
- #: includes/class-ctc.php:130
81
  msgid "Are you sure? This will replace your current settings."
82
  msgstr ""
83
 
84
- #: includes/class-ctc.php:132 includes/forms/query-selector.php:35
85
  #: includes/forms/rule-value.php:28
86
  msgid "Sample"
87
  msgstr ""
88
 
89
- #: includes/class-ctc.php:133
90
  msgid "<span style=\"font-size:10px\">!</span>"
91
  msgstr ""
92
 
93
- #: includes/class-ctc.php:134 includes/forms/rule-value.php:31
94
  msgid "Selectors"
95
  msgstr ""
96
 
97
- #: includes/class-ctc.php:135
98
  msgid "Close"
99
  msgstr ""
100
 
101
- #: includes/class-ctc.php:136
102
  msgid "Edit"
103
  msgstr ""
104
 
105
- #: includes/class-ctc.php:137
106
  msgid "Cancel"
107
  msgstr ""
108
 
109
- #: includes/class-ctc.php:138
110
  msgid "Rename"
111
  msgstr ""
112
 
113
- #: includes/class-ctc.php:139
114
  msgid "The stylesheet cannot be displayed."
115
  msgstr ""
116
 
117
- #: includes/class-ctc.php:140
118
  msgid "(Child Only)"
119
  msgstr ""
120
 
121
- #: includes/class-ctc.php:141
122
  msgid "Please enter a valid Child Theme"
123
  msgstr ""
124
 
125
- #: includes/class-ctc.php:142
126
  msgid "Please enter a valid Child Theme name"
127
  msgstr ""
128
 
129
- #: includes/class-ctc.php:143
130
  msgid "<strong>%s</strong> exists. Please enter a different Child Theme"
131
  msgstr ""
132
 
133
- #: includes/class-ctc.php:298
134
  msgid "Zip file creation failed."
135
  msgstr ""
136
 
137
- #: includes/class-ctc.php:333
138
  msgid "The Functions file is required and cannot be deleted."
139
  msgstr ""
140
 
141
- #: includes/class-ctc.php:413
142
  msgid "You do not have permission to configure child themes."
143
  msgstr ""
144
 
145
- #: includes/class-ctc.php:437
146
  msgid "%s does not exist. Please select a valid Parent Theme"
147
  msgstr ""
148
 
149
- #: includes/class-ctc.php:440
150
  msgid "Please select a valid Parent Theme"
151
  msgstr ""
152
 
153
- #: includes/class-ctc.php:445
154
  msgid "Please enter a valid Child Theme template name"
155
  msgstr ""
156
 
157
- #: includes/class-ctc.php:450
158
  msgid ""
159
  "<strong>%s</strong> exists. Please enter a different Child Theme template "
160
  "name"
161
  msgstr ""
162
 
163
- #: includes/class-ctc.php:476
164
  msgid "Please enter a valid Child Theme directory"
165
  msgstr ""
166
 
167
- #: includes/class-ctc.php:480 includes/class-ctc.php:997
168
  msgid "Your theme directories are not writable."
169
  msgstr ""
170
 
171
- #: includes/class-ctc.php:514 includes/class-ctc.php:1006
172
  msgid "Your stylesheet is not writable."
173
  msgstr ""
174
 
175
- #: includes/class-ctc.php:687
176
  msgid "Could not copy file."
177
  msgstr ""
178
 
179
- #: includes/class-ctc.php:762
180
  msgid "Could not set write permissions."
181
  msgstr ""
182
 
183
- #: includes/class-ctc.php:833
184
  msgid "There were errors while resetting permissions."
185
  msgstr ""
186
 
187
- #: includes/class-ctc.php:870
188
  msgid "Could not upload file."
189
  msgstr ""
190
 
191
- #: includes/class-ctc.php:950
192
  msgid ""
193
  "Child Theme Configurator is unable to write to the stylesheet. This can be "
194
  "resolved using one of the following options:<ol>"
195
  msgstr ""
196
 
197
- #: includes/class-ctc.php:952
198
  msgid ""
199
  "<li>Temporarily make the stylesheet writable by clicking the button below. "
200
  "You should change this back when you are finished editing for security by "
201
  "clicking \"Make read-only\" under the \"Files\" tab.</li>"
202
  msgstr ""
203
 
204
- #: includes/class-ctc.php:954
205
  msgid "Temporarily make stylesheet writable"
206
  msgstr ""
207
 
208
- #: includes/class-ctc.php:955
209
  msgid ""
210
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/Editing_wp-"
211
  "config.php#WordPress_Upgrade_Constants\" title=\"Editin wp-config.php\">Add "
212
  "your FTP/SSH credentials to the WordPress config file</a>.</li>"
213
  msgstr ""
214
 
215
- #: includes/class-ctc.php:957
216
  msgid ""
217
  "<li><a target=\"_blank\" href=\"http://technet.microsoft.com/en-us/library/"
218
  "cc771170\" title=\"Setting Application Pool Identity\">Assign WordPress to "
@@ -220,7 +220,7 @@ msgid ""
220
  "li>"
221
  msgstr ""
222
 
223
- #: includes/class-ctc.php:958
224
  msgid ""
225
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/"
226
  "Changing_File_Permissions\" title=\"Changing File Permissions\">Set the "
@@ -228,11 +228,11 @@ msgid ""
228
  "li>"
229
  msgstr ""
230
 
231
- #: includes/class-ctc.php:960
232
  msgid "<li>Run PHP under Apache with suEXEC (contact your web host).</li>"
233
  msgstr ""
234
 
235
- #: includes/class-ctc.php:968
236
  msgid ""
237
  "This Child Theme is not owned by your website account. It may have been "
238
  "created by a prior version of this plugin or by another program. Moving "
@@ -241,11 +241,11 @@ msgid ""
241
  "below."
242
  msgstr ""
243
 
244
- #: includes/class-ctc.php:970
245
  msgid "Correct Child Theme Permissions"
246
  msgstr ""
247
 
248
- #: includes/class-ctc.php:977
249
  msgid ""
250
  "Child Theme Configurator has changed the way it handles the parent "
251
  "stylesheet. Please set your preferences below and click \"Generate Child "
@@ -422,7 +422,7 @@ msgid "Copy Parent Theme Menus, Widgets and other Options"
422
  msgstr ""
423
 
424
  #: includes/forms/parent-child.php:95 includes/forms/parent-child.php:110
425
- #: includes/forms/parent-child.php:140
426
  msgid "NOTE:"
427
  msgstr ""
428
 
@@ -440,50 +440,56 @@ msgid ""
440
  "can remove old backup files using the Files tab."
441
  msgstr ""
442
 
443
- #: includes/forms/parent-child.php:118
444
  msgid "Parent stylesheet handling:"
445
  msgstr ""
446
 
447
- #: includes/forms/parent-child.php:124
448
  msgid "&lt;link&gt; (default)"
449
  msgstr ""
450
 
451
- #: includes/forms/parent-child.php:130 includes/forms/tabs.php:22
452
  msgid "@import"
453
  msgstr ""
454
 
455
- #: includes/forms/parent-child.php:136
456
  msgid "none (handled by theme)"
457
  msgstr ""
458
 
459
- #: includes/forms/parent-child.php:142
 
 
 
 
 
 
460
  msgid ""
461
- "Only select @import for older themes that do not enqueue the stylesheet. "
462
- "Select 'none' if core styles are automatically loaded for child themes. "
463
- "Select '&lt;link&gt;' if unsure."
464
  msgstr ""
465
 
466
- #: includes/forms/parent-child.php:148
467
  msgid "Reset/Restore from backup:"
468
  msgstr ""
469
 
470
- #: includes/forms/parent-child.php:154
471
  msgid "Leave unchanged"
472
  msgstr ""
473
 
474
- #: includes/forms/parent-child.php:160
475
  msgid "Reset all"
476
  msgstr ""
477
 
478
- #: includes/forms/parent-child.php:168
479
  msgid "Restore backup from"
480
  msgstr ""
481
 
482
- #: includes/forms/parent-child.php:180
483
  msgid "Parse additional stylesheets:"
484
  msgstr ""
485
 
486
- #: includes/forms/parent-child.php:184
487
  msgid ""
488
  "Stylesheets that are currently being loaded by the parent theme are "
489
  "automatically selected below (except for Bootstrap stylesheets which add a "
@@ -491,7 +497,7 @@ msgid ""
491
  "only the additional stylesheets you wish to customize."
492
  msgstr ""
493
 
494
- #: includes/forms/parent-child.php:203
495
  msgid "Generate/Rebuild Child Theme Files"
496
  msgstr ""
497
 
2
  # This file is distributed under the same license as the Child Theme Configurator package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Child Theme Configurator 1.6.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/child-theme-configurator\n"
7
+ "POT-Creation-Date: 2014-12-06 03:55:35+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #. #-#-#-#-# chld_thm_cfg.pot (Child Theme Configurator 1.6.1) #-#-#-#-#
16
  #. Plugin Name of the plugin/theme
17
  #: child-theme-configurator.php:54 includes/forms/main.php:23
18
  msgid "Child Theme Configurator"
22
  msgid "Child Themes"
23
  msgstr ""
24
 
25
+ #: includes/class-ctc-ui.php:139
26
  msgid "Child Theme files modified successfully."
27
  msgstr ""
28
 
29
+ #: includes/class-ctc-ui.php:141
30
  msgid ""
31
  "Child Theme <strong>%s</strong> has been generated successfully.\n"
32
  " "
33
  msgstr ""
34
 
35
+ #: includes/class-ctc-ui.php:144
36
  msgid "IMPORTANT:"
37
  msgstr ""
38
 
39
+ #: includes/class-ctc-ui.php:144 includes/forms/themepreview.php:16
40
  #: includes/forms/themepreview.php:17
41
  msgid "Live Preview"
42
  msgstr ""
43
 
44
+ #: includes/class-ctc-ui.php:144
45
  msgid "Test your child theme"
46
  msgstr ""
47
 
48
+ #: includes/class-ctc-ui.php:144
49
  msgid "before activating."
50
  msgstr ""
51
 
52
+ #: includes/class-ctc.php:126
53
  msgid "URL/None"
54
  msgstr ""
55
 
56
+ #: includes/class-ctc.php:127
57
  msgid "Origin"
58
  msgstr ""
59
 
60
+ #: includes/class-ctc.php:128
61
  msgid "Color 1"
62
  msgstr ""
63
 
64
+ #: includes/class-ctc.php:129
65
  msgid "Color 2"
66
  msgstr ""
67
 
68
+ #: includes/class-ctc.php:130
69
  msgid "Width"
70
  msgstr ""
71
 
72
+ #: includes/class-ctc.php:131
73
  msgid "Style"
74
  msgstr ""
75
 
76
+ #: includes/class-ctc.php:132
77
  msgid "Color"
78
  msgstr ""
79
 
80
+ #: includes/class-ctc.php:134
81
  msgid "Are you sure? This will replace your current settings."
82
  msgstr ""
83
 
84
+ #: includes/class-ctc.php:136 includes/forms/query-selector.php:35
85
  #: includes/forms/rule-value.php:28
86
  msgid "Sample"
87
  msgstr ""
88
 
89
+ #: includes/class-ctc.php:137
90
  msgid "<span style=\"font-size:10px\">!</span>"
91
  msgstr ""
92
 
93
+ #: includes/class-ctc.php:138 includes/forms/rule-value.php:31
94
  msgid "Selectors"
95
  msgstr ""
96
 
97
+ #: includes/class-ctc.php:139
98
  msgid "Close"
99
  msgstr ""
100
 
101
+ #: includes/class-ctc.php:140
102
  msgid "Edit"
103
  msgstr ""
104
 
105
+ #: includes/class-ctc.php:141
106
  msgid "Cancel"
107
  msgstr ""
108
 
109
+ #: includes/class-ctc.php:142
110
  msgid "Rename"
111
  msgstr ""
112
 
113
+ #: includes/class-ctc.php:143
114
  msgid "The stylesheet cannot be displayed."
115
  msgstr ""
116
 
117
+ #: includes/class-ctc.php:144
118
  msgid "(Child Only)"
119
  msgstr ""
120
 
121
+ #: includes/class-ctc.php:145
122
  msgid "Please enter a valid Child Theme"
123
  msgstr ""
124
 
125
+ #: includes/class-ctc.php:146
126
  msgid "Please enter a valid Child Theme name"
127
  msgstr ""
128
 
129
+ #: includes/class-ctc.php:147
130
  msgid "<strong>%s</strong> exists. Please enter a different Child Theme"
131
  msgstr ""
132
 
133
+ #: includes/class-ctc.php:307
134
  msgid "Zip file creation failed."
135
  msgstr ""
136
 
137
+ #: includes/class-ctc.php:342
138
  msgid "The Functions file is required and cannot be deleted."
139
  msgstr ""
140
 
141
+ #: includes/class-ctc.php:422
142
  msgid "You do not have permission to configure child themes."
143
  msgstr ""
144
 
145
+ #: includes/class-ctc.php:446
146
  msgid "%s does not exist. Please select a valid Parent Theme"
147
  msgstr ""
148
 
149
+ #: includes/class-ctc.php:449
150
  msgid "Please select a valid Parent Theme"
151
  msgstr ""
152
 
153
+ #: includes/class-ctc.php:454
154
  msgid "Please enter a valid Child Theme template name"
155
  msgstr ""
156
 
157
+ #: includes/class-ctc.php:459
158
  msgid ""
159
  "<strong>%s</strong> exists. Please enter a different Child Theme template "
160
  "name"
161
  msgstr ""
162
 
163
+ #: includes/class-ctc.php:485
164
  msgid "Please enter a valid Child Theme directory"
165
  msgstr ""
166
 
167
+ #: includes/class-ctc.php:489 includes/class-ctc.php:1033
168
  msgid "Your theme directories are not writable."
169
  msgstr ""
170
 
171
+ #: includes/class-ctc.php:523 includes/class-ctc.php:1042
172
  msgid "Your stylesheet is not writable."
173
  msgstr ""
174
 
175
+ #: includes/class-ctc.php:723
176
  msgid "Could not copy file."
177
  msgstr ""
178
 
179
+ #: includes/class-ctc.php:798
180
  msgid "Could not set write permissions."
181
  msgstr ""
182
 
183
+ #: includes/class-ctc.php:869
184
  msgid "There were errors while resetting permissions."
185
  msgstr ""
186
 
187
+ #: includes/class-ctc.php:906
188
  msgid "Could not upload file."
189
  msgstr ""
190
 
191
+ #: includes/class-ctc.php:986
192
  msgid ""
193
  "Child Theme Configurator is unable to write to the stylesheet. This can be "
194
  "resolved using one of the following options:<ol>"
195
  msgstr ""
196
 
197
+ #: includes/class-ctc.php:988
198
  msgid ""
199
  "<li>Temporarily make the stylesheet writable by clicking the button below. "
200
  "You should change this back when you are finished editing for security by "
201
  "clicking \"Make read-only\" under the \"Files\" tab.</li>"
202
  msgstr ""
203
 
204
+ #: includes/class-ctc.php:990
205
  msgid "Temporarily make stylesheet writable"
206
  msgstr ""
207
 
208
+ #: includes/class-ctc.php:991
209
  msgid ""
210
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/Editing_wp-"
211
  "config.php#WordPress_Upgrade_Constants\" title=\"Editin wp-config.php\">Add "
212
  "your FTP/SSH credentials to the WordPress config file</a>.</li>"
213
  msgstr ""
214
 
215
+ #: includes/class-ctc.php:993
216
  msgid ""
217
  "<li><a target=\"_blank\" href=\"http://technet.microsoft.com/en-us/library/"
218
  "cc771170\" title=\"Setting Application Pool Identity\">Assign WordPress to "
220
  "li>"
221
  msgstr ""
222
 
223
+ #: includes/class-ctc.php:994
224
  msgid ""
225
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/"
226
  "Changing_File_Permissions\" title=\"Changing File Permissions\">Set the "
228
  "li>"
229
  msgstr ""
230
 
231
+ #: includes/class-ctc.php:996
232
  msgid "<li>Run PHP under Apache with suEXEC (contact your web host).</li>"
233
  msgstr ""
234
 
235
+ #: includes/class-ctc.php:1004
236
  msgid ""
237
  "This Child Theme is not owned by your website account. It may have been "
238
  "created by a prior version of this plugin or by another program. Moving "
241
  "below."
242
  msgstr ""
243
 
244
+ #: includes/class-ctc.php:1006
245
  msgid "Correct Child Theme Permissions"
246
  msgstr ""
247
 
248
+ #: includes/class-ctc.php:1013
249
  msgid ""
250
  "Child Theme Configurator has changed the way it handles the parent "
251
  "stylesheet. Please set your preferences below and click \"Generate Child "
422
  msgstr ""
423
 
424
  #: includes/forms/parent-child.php:95 includes/forms/parent-child.php:110
425
+ #: includes/forms/parent-child.php:143
426
  msgid "NOTE:"
427
  msgstr ""
428
 
440
  "can remove old backup files using the Files tab."
441
  msgstr ""
442
 
443
+ #: includes/forms/parent-child.php:121
444
  msgid "Parent stylesheet handling:"
445
  msgstr ""
446
 
447
+ #: includes/forms/parent-child.php:127
448
  msgid "&lt;link&gt; (default)"
449
  msgstr ""
450
 
451
+ #: includes/forms/parent-child.php:133 includes/forms/tabs.php:22
452
  msgid "@import"
453
  msgstr ""
454
 
455
+ #: includes/forms/parent-child.php:139
456
  msgid "none (handled by theme)"
457
  msgstr ""
458
 
459
+ #: includes/forms/parent-child.php:144
460
+ msgid ""
461
+ "This theme does not currently enqueue the stylesheet and must use the "
462
+ "@import option to render correctly."
463
+ msgstr ""
464
+
465
+ #: includes/forms/parent-child.php:146
466
  msgid ""
467
+ "Select @import for older themes that do not enqueue the stylesheet. Select "
468
+ "'none' if core styles are automatically loaded for child themes. Select '&lt;"
469
+ "link&gt;' if unsure."
470
  msgstr ""
471
 
472
+ #: includes/forms/parent-child.php:152
473
  msgid "Reset/Restore from backup:"
474
  msgstr ""
475
 
476
+ #: includes/forms/parent-child.php:158
477
  msgid "Leave unchanged"
478
  msgstr ""
479
 
480
+ #: includes/forms/parent-child.php:164
481
  msgid "Reset all"
482
  msgstr ""
483
 
484
+ #: includes/forms/parent-child.php:172
485
  msgid "Restore backup from"
486
  msgstr ""
487
 
488
+ #: includes/forms/parent-child.php:184
489
  msgid "Parse additional stylesheets:"
490
  msgstr ""
491
 
492
+ #: includes/forms/parent-child.php:188
493
  msgid ""
494
  "Stylesheets that are currently being loaded by the parent theme are "
495
  "automatically selected below (except for Bootstrap stylesheets which add a "
497
  "only the additional stylesheets you wish to customize."
498
  msgstr ""
499
 
500
+ #: includes/forms/parent-child.php:207
501
  msgid "Generate/Rebuild Child Theme Files"
502
  msgstr ""
503
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: lilaeamedia
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8QE5YJ8WE96AJ
4
  Tags: child theme, customize, CSS, responsive, css editor, theme generator, stylesheet, customizer
5
- Requires at least: 3.7
6
  Tested up to: 4.1
7
- Stable tag: 1.6.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -29,7 +29,7 @@ When you are ready, just activate the Child Theme and your WordPress site takes
29
  * Update themes without losing customizations
30
  * Save hours of development time
31
  * Make modifications above and beyond the theme Customizer
32
- * Load parent theme stylesheet with <link> instead of @import
33
  * Export Child Theme as Zip Archive
34
  * Import web fonts and use them in place of theme fonts
35
  * Apply changes in a child theme without touching the parent theme
@@ -252,14 +252,22 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
252
 
253
  == Screenshots ==
254
 
255
- 1. Example of the Parent/Child Panel.
256
- 2. Example of the Query/Selector Panel.
257
- 3. Example of the Rule/Value Panel.
258
- 4. Example of the @imports Panel.
259
- 5. Example of the Preview CSS Panel.
 
 
260
 
261
  == Changelog ==
262
 
 
 
 
 
 
 
263
  = 1.6.0 =
264
  * New Feature: option to load parent stylesheet using wp_enqueue_style (link), @import or none. Thanks to cmwwebfx and Shapeshifter3 for pushing me on this
265
  * New Feature: automatically-generated child theme slug and name
@@ -432,7 +440,7 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
432
 
433
  == Upgrade Notice ==
434
 
435
- v.1.6.0 You can now choose to externally link the parent stylesheet instead of using @import, or skip the parent stylesheet entirely. Make sure you update your configuration after upgrading (there is a notice). We have also redesigned the theme menus to display a preview of each theme and fixed a few bugs.
436
 
437
  == Override Parent Styles ==
438
 
2
  Contributors: lilaeamedia
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8QE5YJ8WE96AJ
4
  Tags: child theme, customize, CSS, responsive, css editor, theme generator, stylesheet, customizer
5
+ Requires at least: 3.9
6
  Tested up to: 4.1
7
+ Stable tag: 1.6.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
29
  * Update themes without losing customizations
30
  * Save hours of development time
31
  * Make modifications above and beyond the theme Customizer
32
+ * Enqueue (link) parent theme stylesheet instead of using @import
33
  * Export Child Theme as Zip Archive
34
  * Import web fonts and use them in place of theme fonts
35
  * Apply changes in a child theme without touching the parent theme
252
 
253
  == Screenshots ==
254
 
255
+ 1. Parent/Child tab
256
+ 2. Parent/Child tab with parent theme menu open
257
+ 3. Query/Selector tab
258
+ 4. Rule/Value tab
259
+ 5. @import tab
260
+ 6. Parent CSS tab
261
+ 7. Files tab
262
 
263
  == Changelog ==
264
 
265
+ = 1.6.1 =
266
+ * Fix: add check if theme uses hard-wired stylesheet link and alert to use @import instead of link option
267
+ * Fix: conflicts with using jQuery UI from CDN - using local version of 1.11.2 Widget/Menu/Selectmenu instead
268
+ * Fix: using wp-color-picker handle instead of iris as dependency to make sure wpColorPicker() methods are loaded
269
+ * Fix: copy parent theme widgets logic different if child or parent are active theme
270
+
271
  = 1.6.0 =
272
  * New Feature: option to load parent stylesheet using wp_enqueue_style (link), @import or none. Thanks to cmwwebfx and Shapeshifter3 for pushing me on this
273
  * New Feature: automatically-generated child theme slug and name
440
 
441
  == Upgrade Notice ==
442
 
443
+ v.1.6.1 Fixes for bugs that arose due to jQuery conflicts with new features. Corrected copying of widgets to/from active theme.
444
 
445
  == Override Parent Styles ==
446
 
screenshot-1.jpg CHANGED
Binary file
screenshot-2.jpg CHANGED
Binary file
screenshot-3.jpg CHANGED
Binary file
screenshot-4.jpg CHANGED
Binary file
screenshot-5.jpg CHANGED
Binary file
screenshot-6.jpg ADDED
Binary file
screenshot-7.jpg ADDED
Binary file