Child Theme Configurator - Version 1.7.8

Version Description

  • Fix: disable autoload on configuration data options
  • Fix: normalize media query and add to menu when added via raw css
Download this release

Release Info

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

Code changes from version 1.7.7 to 1.7.8

child-theme-configurator.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
6
  Plugin Name: Child Theme Configurator
7
  Plugin URI: http://www.childthemeconfigurator.com
8
  Description: Create child themes and customize styles, templates and functions. Enqueues stylesheets and web fonts. Handles rgba, vendor-prefixes and more.
9
- Version: 1.7.7
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com
12
  Text Domain: chld_thm_cfg
@@ -22,7 +22,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
22
  define( 'CHLD_THM_CFG_DOCS_URL', "http://www.childthemeconfigurator.com" );
23
  defined( 'CHLD_THM_CFG_OPTIONS' ) or
24
  define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
25
- define( 'CHLD_THM_CFG_VERSION', '1.7.7' );
26
  define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
27
  defined( 'CHLD_THM_CFG_BPSEL' ) or
28
  define( 'CHLD_THM_CFG_BPSEL', '2500' );
6
  Plugin Name: Child Theme Configurator
7
  Plugin URI: http://www.childthemeconfigurator.com
8
  Description: Create child themes and customize styles, templates and functions. Enqueues stylesheets and web fonts. Handles rgba, vendor-prefixes and more.
9
+ Version: 1.7.8
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com
12
  Text Domain: chld_thm_cfg
22
  define( 'CHLD_THM_CFG_DOCS_URL', "http://www.childthemeconfigurator.com" );
23
  defined( 'CHLD_THM_CFG_OPTIONS' ) or
24
  define( 'CHLD_THM_CFG_OPTIONS', 'chld_thm_cfg_options' );
25
+ define( 'CHLD_THM_CFG_VERSION', '1.7.8' );
26
  define( 'CHLD_THM_CFG_MIN_WP_VERSION', '3.7' );
27
  defined( 'CHLD_THM_CFG_BPSEL' ) or
28
  define( 'CHLD_THM_CFG_BPSEL', '2500' );
css/chld-thm-cfg.css CHANGED
@@ -7,7 +7,6 @@ p {
7
  .wrap h1, .wrap h2 {
8
  font-size: 23px;
9
  font-weight: 400;
10
- padding: 9px 15px 4px 0px;
11
  line-height: 29px;
12
  margin: .5em 0 1em;
13
  }
7
  .wrap h1, .wrap h2 {
8
  font-size: 23px;
9
  font-weight: 400;
 
10
  line-height: 29px;
11
  margin: .5em 0 1em;
12
  }
includes/class-ctc-css.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Handles all CSS input, output, parsing, normalization and storage
9
- Version: 1.7.7
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -166,6 +166,7 @@ class ChildThemeConfiguratorCSS {
166
 
167
  // writes ctc config data to options api
168
  function save_config( $override = NULL ) {
 
169
  if ( isset( $override ) ) $option = $override;
170
  else $option = apply_filters( 'chld_thm_cfg_option', '' );
171
  $option = CHLD_THM_CFG_OPTIONS . $option;
@@ -173,10 +174,35 @@ class ChildThemeConfiguratorCSS {
173
  $configarray = array();
174
  foreach ( $this->configvars as $configkey )
175
  $configarray[ $configkey ] = $this->{$configkey};
176
- update_site_option( $option . '_configvars', $configarray );
177
  $this->ctc()->debug( 'configvars: ' . print_r( $configarray, TRUE ), __FUNCTION__ );
178
- foreach ( $this->dicts as $configkey )
179
- update_site_option( $option . '_' . $configkey, $this->{$configkey} );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  }
181
 
182
  /**
@@ -871,9 +897,10 @@ class ChildThemeConfiguratorCSS {
871
  ) as $regex ): // (((?!\@media).) backreference too memory intensive - rolled back in v 1.4.8.1
872
  preg_match_all( $regex, $this->styles, $matches );
873
  foreach ( $matches[ 1 ] as $segment ):
874
- $ruleset[ trim( $segment ) ] = array_shift( $matches[ 2 ] )
875
- . ( isset( $ruleset[ trim( $segment ) ] ) ?
876
- $ruleset[ trim( $segment ) ] : '' );
 
877
  endforeach;
878
  // stripping rulesets leaves base styles
879
  $this->styles = preg_replace( $regex, '', $this->styles );
@@ -1718,6 +1745,18 @@ class ChildThemeConfiguratorCSS {
1718
  return $value;
1719
  }
1720
 
 
 
 
 
 
 
 
 
 
 
 
 
1721
  // callback for normalize_color regex
1722
  function tolower( $matches ) {
1723
  return '#' . strtolower( $matches[ 1 ] );
6
  Class: ChildThemeConfiguratorCSS
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Handles all CSS input, output, parsing, normalization and storage
9
+ Version: 1.7.8
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
166
 
167
  // writes ctc config data to options api
168
  function save_config( $override = NULL ) {
169
+ global $wpdb;
170
  if ( isset( $override ) ) $option = $override;
171
  else $option = apply_filters( 'chld_thm_cfg_option', '' );
172
  $option = CHLD_THM_CFG_OPTIONS . $option;
174
  $configarray = array();
175
  foreach ( $this->configvars as $configkey )
176
  $configarray[ $configkey ] = $this->{$configkey};
 
177
  $this->ctc()->debug( 'configvars: ' . print_r( $configarray, TRUE ), __FUNCTION__ );
178
+ if ( is_multisite() ):
179
+ update_site_option( $option . '_configvars', $configarray );
180
+ else:
181
+ update_option( $option . '_configvars', $configarray, FALSE );
182
+ // do not autoload ( passing false above only works if value changes
183
+ // we have to turn off autoload for all existing options )
184
+ $result = $wpdb->update(
185
+ // SET 'autoload' = 'no'
186
+ $wpdb->options, array( 'autoload' => 'no' ),
187
+ // WHERE option_name = ?
188
+ array( 'option_name' => $option . '_configvars' )
189
+ );
190
+ endif;
191
+ foreach ( $this->dicts as $configkey ):
192
+ if ( is_multisite() ):
193
+ update_site_option( $option . '_' . $configkey, $this->{$configkey} );
194
+ else:
195
+ update_option( $option . '_' . $configkey, $this->{$configkey}, FALSE );
196
+ // do not autoload ( passing false above only works if value changes
197
+ // we have to turn off autoload for all existing options )
198
+ $result = $wpdb->update(
199
+ // SET 'autoload' = 'no'
200
+ $wpdb->options, array( 'autoload' => 'no' ),
201
+ // WHERE option_name = ?
202
+ array( 'option_name' => $option . '_' . $configkey )
203
+ );
204
+ endif;
205
+ endforeach;
206
  }
207
 
208
  /**
897
  ) as $regex ): // (((?!\@media).) backreference too memory intensive - rolled back in v 1.4.8.1
898
  preg_match_all( $regex, $this->styles, $matches );
899
  foreach ( $matches[ 1 ] as $segment ):
900
+ $segment = $this->normalize_query( $segment );
901
+ $ruleset[ $segment ] = array_shift( $matches[ 2 ] )
902
+ . ( isset( $ruleset[ $segment ] ) ?
903
+ $ruleset[ $segment ] : '' );
904
  endforeach;
905
  // stripping rulesets leaves base styles
906
  $this->styles = preg_replace( $regex, '', $this->styles );
1745
  return $value;
1746
  }
1747
 
1748
+ function normalize_query( $value ) {
1749
+ // space after :
1750
+ $value = str_replace( ':', ': ', trim( $value ) );
1751
+ // remove multiple whitespace
1752
+ $value = preg_replace( "/\s+/s", ' ', $value );
1753
+ // remove space after (
1754
+ $value = str_replace( '( ', '(', $value );
1755
+ // remove space before )
1756
+ $value = str_replace( ' )', ')', $value );
1757
+ return $value;
1758
+ }
1759
+
1760
  // callback for normalize_color regex
1761
  function tolower( $matches ) {
1762
  return '#' . strtolower( $matches[ 1 ] );
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.childthemeconfigurator.com/
7
  Description: Handles the plugin User Interface
8
- Version: 1.7.7
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
@@ -200,6 +200,7 @@ class ChildThemeConfiguratorUI {
200
 
201
  // Add help tabs
202
  if ( isset( $tabs[ 1 ] ) ):
 
203
  while( count( $tabs[ 1 ] ) ):
204
  $id = array_shift( $tabs[ 1 ] );
205
  $title = array_shift( $tabs[ 2 ] );
@@ -208,6 +209,7 @@ class ChildThemeConfiguratorUI {
208
  'id' => $id,
209
  'title' => $title,
210
  'content' => $content,
 
211
  ) );
212
  endwhile;
213
  endif;
5
  Class: Child_Theme_Configurator_UI
6
  Plugin URI: http://www.childthemeconfigurator.com/
7
  Description: Handles the plugin User Interface
8
+ Version: 1.7.8
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
200
 
201
  // Add help tabs
202
  if ( isset( $tabs[ 1 ] ) ):
203
+ $priority = 0;
204
  while( count( $tabs[ 1 ] ) ):
205
  $id = array_shift( $tabs[ 1 ] );
206
  $title = array_shift( $tabs[ 2 ] );
209
  'id' => $id,
210
  'title' => $title,
211
  'content' => $content,
212
+ 'priority' => ++$priority,
213
  ) );
214
  endwhile;
215
  endif;
includes/class-ctc.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Main Controller Class
9
- Version: 1.7.7
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -108,7 +108,7 @@ class ChildThemeConfiguratorAdmin {
108
  }
109
 
110
  function enqueue_scripts() {
111
- wp_enqueue_style( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'css/chld-thm-cfg.min.css', array(), '1.7.7' );
112
 
113
  // we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
114
  // this will be updated in a later release to use WP Core scripts when it is widely adopted
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.childthemeconfigurator.com/
8
  Description: Main Controller Class
9
+ Version: 1.7.8
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
108
  }
109
 
110
  function enqueue_scripts() {
111
+ wp_enqueue_style( 'chld-thm-cfg-admin', CHLD_THM_CFG_URL . 'css/chld-thm-cfg.min.css', array(), '1.7.8' );
112
 
113
  // we need to use local jQuery UI Widget/Menu/Selectmenu 1.11.2 because selectmenu is not included in < 1.11.2
114
  // this will be updated in a later release to use WP Core scripts when it is widely adopted
includes/help/help_en_US.php CHANGED
@@ -36,8 +36,8 @@ This option imports the parent stylesheet from the child stylesheet. This enable
36
  </ol>
37
  <!-- END tab -->
38
  <!-- BEGIN tab -->
39
- <h3 id="ctc_tutorial">Tutorial Video</h3>
40
- <iframe width="560" height="315" src="https://www.youtube.com/embed/NQ1M-ZlRScY?rel=0&modestbranding=1" frameborder="0" allowfullscreen></iframe><!-- END tab -->
41
  <!-- BEGIN tab -->
42
  <h3 id="ctc_query_selector">Query/Selector Tab</h3>
43
  <p>There are two ways to identify and override parent styles. The Child Theme Configurator lets you search styles by <strong>selector</strong> and by <strong>property</strong>. If you wish to change a specific selector (e.g., h1), use the "Query/Selector" tab. If you have a specific value you wish to change site-wide (e.g., the color of the type), use the "Property/Value" tab.</p>
@@ -189,8 +189,6 @@ The plugin only loads the bulk of the code in the admin when you are using the t
189
  <ul class="instructions"><li>Avoiding fixed width and height values. Using max- and min-height values and percentages are ways to make your designs respond to the viewer's browser size.</li>
190
  <li>Combining floats and clears with inline and relative positions allow the elements to adjust gracefully to their container's width.</li>
191
  <li>Showing and hiding content with Javascript.</li></ul>
192
- <p>We've put together a video tutorial that shows how to use Child Theme Configurator to make a fixed-width theme responsive.</p>
193
- <iframe width="560" height="315" src="//www.youtube.com/embed/iBiiAgsK4G4?rel=0&modestbranding=1" frameborder="0" allowfullscreen></iframe>
194
  <!-- END tab -->
195
  <!-- BEGIN tab -->
196
  <h3 id="ctc_glossary">Glossary</h3>
36
  </ol>
37
  <!-- END tab -->
38
  <!-- BEGIN tab -->
39
+ <h3 id="ctc_tutorial">Tutorial Videos</h3>
40
+ <p>We are no longer embedding videos for performance reasons. <a href="http://www.childthemeconfigurator.com/tutorial-videos" target="_blank">Click here to view videos.</a></p><!-- END tab -->
41
  <!-- BEGIN tab -->
42
  <h3 id="ctc_query_selector">Query/Selector Tab</h3>
43
  <p>There are two ways to identify and override parent styles. The Child Theme Configurator lets you search styles by <strong>selector</strong> and by <strong>property</strong>. If you wish to change a specific selector (e.g., h1), use the "Query/Selector" tab. If you have a specific value you wish to change site-wide (e.g., the color of the type), use the "Property/Value" tab.</p>
189
  <ul class="instructions"><li>Avoiding fixed width and height values. Using max- and min-height values and percentages are ways to make your designs respond to the viewer's browser size.</li>
190
  <li>Combining floats and clears with inline and relative positions allow the elements to adjust gracefully to their container's width.</li>
191
  <li>Showing and hiding content with Javascript.</li></ul>
 
 
192
  <!-- END tab -->
193
  <!-- BEGIN tab -->
194
  <h3 id="ctc_glossary">Glossary</h3>
js/chld-thm-cfg.js CHANGED
@@ -2,7 +2,7 @@
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.childthemeconfigurator.com/
4
  * Description: Handles jQuery, AJAX and other UI
5
- * Version: 1.7.7
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
@@ -522,6 +522,7 @@
522
  * isnew is passed true when new rule is selected from menu
523
  */
524
  input_row: function( qsid, rule, seq, data, isnew ) {
 
525
  var self = this,
526
  html = '';
527
  if ( !self.is_empty( data ) && !self.is_empty( data.value ) && !self.is_empty( data.value[ rule ] ) ) {
@@ -745,6 +746,8 @@
745
  n = 1,
746
  row,
747
  first;
 
 
748
  if ( self.is_empty( self.current_qsdata.value ) ) {
749
  self.current_qsdata.value = {};
750
  }
@@ -754,6 +757,8 @@
754
  if ( self.is_empty( self.current_qsdata.value[ ui.item.label ].child ) ) {
755
  self.current_qsdata.value[ ui.item.label ].child = [];
756
  }
 
 
757
  // seed current qsdata with new blank value with id 1
758
  // this will be modified during input_row function to be next id in order
759
  self.current_qsdata.value[ ui.item.label ].child.push( [ '', 0, 1, 1 ] );
@@ -944,7 +949,7 @@
944
  postdata[ 'ctc_query_' + key ] = val;
945
  } );
946
  }
947
- $( '.query-icon' ).remove();
948
  //console.log( status_sel + ' ' + $( status_sel ).length );
949
  $( status_sel + ' .ctc-status-icon' ).remove();
950
  $( status_sel ).append( '<span class="ctc-status-icon spinner query-icon"></span>' );
@@ -974,7 +979,7 @@
974
  // disable the button until ajax returns
975
  $( obj ).prop( 'disabled', true );
976
  // clear previous success/fail icons
977
- $( '.ctc-status-icon' ).remove();
978
  // show spinner
979
  $( obj ).parent( '.ctc-textarea-button-cell, .ctc-button-cell' )
980
  .append( '<span class="ctc-status-icon spinner save-icon"></span>' );
@@ -1027,8 +1032,8 @@
1027
  ajax_post: function( obj, data, datatype ) {
1028
  var self = this,
1029
  url = ctcAjax.ajaxurl;
1030
- //**console.log( 'ajax_post: ' + obj );
1031
- //**console.log( data );
1032
  // get ajax url from localized object
1033
  $.ajax( {
1034
  url: url,
@@ -1124,7 +1129,7 @@
1124
  qsid: function( res ) {
1125
  //console.log( res );
1126
  var self = this,
1127
- id, html, val, selector;
1128
  self.current_qsid = res.key;
1129
  self.current_qsdata = res.data;
1130
  //console.log( 'update.qsid: ' + self.current_qsid );
@@ -1139,9 +1144,12 @@
1139
  $( '#ctc_child_load_order_container' ).html( html );
1140
  }
1141
  if ( self.is_empty( self.current_qsdata.value ) ) {
 
 
1142
  $( '#ctc_sel_ovrd_rule_inputs' ).empty();
1143
- $( '#ctc_sel_ovrd_rule_header' ).hide();
1144
  } else {
 
 
1145
  html = '';
1146
  $.each( self.current_qsdata.value, function( rule, value ) {
1147
  html += self.input_row( self.current_qsid, rule, 'ovrd', self.current_qsdata );
@@ -1150,22 +1158,30 @@
1150
  self.setup_spectrum( this );
1151
  } );
1152
  self.coalesce_inputs( '#ctc_child_all_0_swatch' );
1153
- $( '#ctc_sel_ovrd_rule_header' ).show();
1154
  }
1155
  if ( self.jquery_err.length ) {
1156
  self.jquery_notice( 'update.qsid' );
1157
  } else {
1158
  //console.log( 'reload menus: ' + ( self.reload_menus ? 'true' : 'false' ) );
1159
  if ( self.reload_menus ) {
 
1160
  self.set_query( self.current_qsdata.query );
1161
  self.load_rules();
1162
  }
1163
  $( '#ctc_sel_ovrd_selector_selected' ).text( self.current_qsdata.selector );
1164
  $( '.ctc-rewrite-toggle' ).text( self.getxt( 'rename' ) );
1165
- $( '#ctc_sel_ovrd_new_rule,'
 
 
 
1166
  + '#ctc_sel_ovrd_rule_inputs_container,'
1167
- + '#ctc_sel_ovrd_rule_inputs,'
1168
- + '.ctc-rewrite-toggle' ).show();
 
 
 
 
 
1169
  //self.scrolltop();
1170
  }
1171
  },
@@ -1263,12 +1279,14 @@
1263
 
1264
  // initialize object vars, bind event listeners to elements, load menus and start plugin
1265
  init: function() {
 
1266
  var self = this;
1267
  // auto populate parent/child tab values
1268
  self.autogen_slugs();
1269
  self.set_existing();
1270
  // initialize theme menus
1271
  if ( !$( '#ctc_theme_parnt' ).is( 'input' ) ) {
 
1272
  try {
1273
  $.widget( 'ctc.themeMenu', $.ui.selectmenu, {
1274
  _renderItem: function( ul, item ) {
@@ -1315,6 +1333,7 @@
1315
  }
1316
  }
1317
  if ( self.is_empty( self.jquery_err ) ){
 
1318
  $( '#ctc_main' ).on( 'click', '.ctc-selector-handle', function( e ) {
1319
  //'.ctc-option-panel-container'
1320
  e.preventDefault();
@@ -1341,6 +1360,20 @@
1341
  self.save( this ); // refresh menus after updating data
1342
  return false;
1343
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1344
  $( '#ctc_main' ).on( 'click', '.ctc-selector-edit', function( e ) {
1345
  e.preventDefault();
1346
  if ( $( this ).hasClass( 'ajax-pending' ) ) return false;
@@ -1381,7 +1414,7 @@
1381
  e.preventDefault();
1382
  // clear the notice box
1383
  //set_notice( '' );
1384
- $( '.ctc-status-icon' ).remove();
1385
  var id = '#' + $( this ).attr( 'id' );
1386
  self.focus_panel( id );
1387
  } );
@@ -1403,7 +1436,7 @@
1403
  $( '#ctc_load_form' ).on( 'submit', function() {
1404
  return ( self.validate() ); //&& confirm( self.getxt( 'load' ) ) ) ;
1405
  } );
1406
- $( '#ctc_query_selector_form').on( 'submit', function( e ) {
1407
  e.preventDefault();
1408
  $this = $( '#ctc_save_query_selector' );
1409
  if ( $this.hasClass( 'ajax-pending' ) ) return false;
@@ -1411,6 +1444,11 @@
1411
  self.save( $this ); // refresh menus after updating data
1412
  return false;
1413
  } );
 
 
 
 
 
1414
  $( '#ctc_theme_child, #ctc_theme_child-button, #ctc_child_type_existing' )
1415
  .on( 'focus click', function() {
1416
  // change the inputs to use existing child theme
@@ -1446,15 +1484,19 @@
1446
  document.location = $( this ).prop( 'href' );
1447
  return false;
1448
  } );
 
1449
  // initialize autoselect menus
1450
  self.setup_menus();
 
1451
  // mark additional linked stylesheets for parsing
1452
  self.set_addl_css();
1453
  // show last 25 selectors edited
1454
  // render_recent();
1455
  // turn on submit buttons (disabled until everything is loaded to prevent errors)
 
1456
  $( 'input[type=submit], input[type=button]' ).prop( 'disabled', false );
1457
  self.scrolltop();
 
1458
  // disappear any notices after 20 seconds
1459
  setTimeout( self.fade_update_notice, 20000 );
1460
  } else {
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.childthemeconfigurator.com/
4
  * Description: Handles jQuery, AJAX and other UI
5
+ * Version: 1.7.8
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
522
  * isnew is passed true when new rule is selected from menu
523
  */
524
  input_row: function( qsid, rule, seq, data, isnew ) {
525
+ //console.log( 'in input_row' );
526
  var self = this,
527
  html = '';
528
  if ( !self.is_empty( data ) && !self.is_empty( data.value ) && !self.is_empty( data.value[ rule ] ) ) {
746
  n = 1,
747
  row,
748
  first;
749
+ //console.log( 'current qsdata before:' );
750
+ //console.log( self.current_qsdata );
751
  if ( self.is_empty( self.current_qsdata.value ) ) {
752
  self.current_qsdata.value = {};
753
  }
757
  if ( self.is_empty( self.current_qsdata.value[ ui.item.label ].child ) ) {
758
  self.current_qsdata.value[ ui.item.label ].child = [];
759
  }
760
+ //console.log( 'current qsdata after:' );
761
+ //console.log( self.current_qsdata );
762
  // seed current qsdata with new blank value with id 1
763
  // this will be modified during input_row function to be next id in order
764
  self.current_qsdata.value[ ui.item.label ].child.push( [ '', 0, 1, 1 ] );
949
  postdata[ 'ctc_query_' + key ] = val;
950
  } );
951
  }
952
+ $( '.query-icon,.ctc-status-icon' ).remove();
953
  //console.log( status_sel + ' ' + $( status_sel ).length );
954
  $( status_sel + ' .ctc-status-icon' ).remove();
955
  $( status_sel ).append( '<span class="ctc-status-icon spinner query-icon"></span>' );
979
  // disable the button until ajax returns
980
  $( obj ).prop( 'disabled', true );
981
  // clear previous success/fail icons
982
+ $( '.ctc-query-icon,.ctc-status-icon' ).remove();
983
  // show spinner
984
  $( obj ).parent( '.ctc-textarea-button-cell, .ctc-button-cell' )
985
  .append( '<span class="ctc-status-icon spinner save-icon"></span>' );
1032
  ajax_post: function( obj, data, datatype ) {
1033
  var self = this,
1034
  url = ctcAjax.ajaxurl;
1035
+ //console.log( 'ajax_post: ' + obj );
1036
+ //console.log( data );
1037
  // get ajax url from localized object
1038
  $.ajax( {
1039
  url: url,
1129
  qsid: function( res ) {
1130
  //console.log( res );
1131
  var self = this,
1132
+ id, html, val, selector, empty;
1133
  self.current_qsid = res.key;
1134
  self.current_qsdata = res.data;
1135
  //console.log( 'update.qsid: ' + self.current_qsid );
1144
  $( '#ctc_child_load_order_container' ).html( html );
1145
  }
1146
  if ( self.is_empty( self.current_qsdata.value ) ) {
1147
+ //console.log( 'qsdata is empty' );
1148
+ empty = true;
1149
  $( '#ctc_sel_ovrd_rule_inputs' ).empty();
 
1150
  } else {
1151
+ //console.log( 'qsdata NOT empty' );
1152
+ empty = false;
1153
  html = '';
1154
  $.each( self.current_qsdata.value, function( rule, value ) {
1155
  html += self.input_row( self.current_qsid, rule, 'ovrd', self.current_qsdata );
1158
  self.setup_spectrum( this );
1159
  } );
1160
  self.coalesce_inputs( '#ctc_child_all_0_swatch' );
 
1161
  }
1162
  if ( self.jquery_err.length ) {
1163
  self.jquery_notice( 'update.qsid' );
1164
  } else {
1165
  //console.log( 'reload menus: ' + ( self.reload_menus ? 'true' : 'false' ) );
1166
  if ( self.reload_menus ) {
1167
+ self.load_queries();
1168
  self.set_query( self.current_qsdata.query );
1169
  self.load_rules();
1170
  }
1171
  $( '#ctc_sel_ovrd_selector_selected' ).text( self.current_qsdata.selector );
1172
  $( '.ctc-rewrite-toggle' ).text( self.getxt( 'rename' ) );
1173
+ $( '.ctc-rewrite-toggle' ).show();
1174
+ if ( !empty ){
1175
+ $( '#ctc_sel_ovrd_rule_header,'
1176
+ + '#ctc_sel_ovrd_new_rule,'
1177
  + '#ctc_sel_ovrd_rule_inputs_container,'
1178
+ + '#ctc_sel_ovrd_rule_inputs' ).show();
1179
+ } else {
1180
+ $( '#ctc_sel_ovrd_rule_header,'
1181
+ + '#ctc_sel_ovrd_new_rule,'
1182
+ + '#ctc_sel_ovrd_rule_inputs_container,'
1183
+ + '#ctc_sel_ovrd_rule_inputs' ).hide();
1184
+ }
1185
  //self.scrolltop();
1186
  }
1187
  },
1279
 
1280
  // initialize object vars, bind event listeners to elements, load menus and start plugin
1281
  init: function() {
1282
+ //console.log( 'initializing...' )
1283
  var self = this;
1284
  // auto populate parent/child tab values
1285
  self.autogen_slugs();
1286
  self.set_existing();
1287
  // initialize theme menus
1288
  if ( !$( '#ctc_theme_parnt' ).is( 'input' ) ) {
1289
+ //console.log( 'initializing theme select menus...' )
1290
  try {
1291
  $.widget( 'ctc.themeMenu', $.ui.selectmenu, {
1292
  _renderItem: function( ul, item ) {
1333
  }
1334
  }
1335
  if ( self.is_empty( self.jquery_err ) ){
1336
+ //console.log( 'delegating event bindings...' )
1337
  $( '#ctc_main' ).on( 'click', '.ctc-selector-handle', function( e ) {
1338
  //'.ctc-option-panel-container'
1339
  e.preventDefault();
1360
  self.save( this ); // refresh menus after updating data
1361
  return false;
1362
  } );
1363
+ $( '#ctc_main' ).on( 'keydown', '.ctc-selector-container .ctc-child-value[type=text]', function( e ) {
1364
+ if ( 13 === e.which ) {
1365
+ //console.log( 'return key pressed' );
1366
+ var $obj = $( this ).parents( '.ctc-selector-row' ).find( '.ctc-save-input[type=button]' ).first();
1367
+ if ( $obj.length ) {
1368
+ e.preventDefault();
1369
+ //console.log( $obj.attr( 'id' ) );
1370
+ if ( $obj.hasClass( 'ajax-pending' ) ) return false;
1371
+ $obj.addClass( 'ajax-pending' );
1372
+ self.save( $obj );
1373
+ return false;
1374
+ }
1375
+ }
1376
+ } );
1377
  $( '#ctc_main' ).on( 'click', '.ctc-selector-edit', function( e ) {
1378
  e.preventDefault();
1379
  if ( $( this ).hasClass( 'ajax-pending' ) ) return false;
1414
  e.preventDefault();
1415
  // clear the notice box
1416
  //set_notice( '' );
1417
+ $( '.ctc-query-icon,.ctc-status-icon' ).remove();
1418
  var id = '#' + $( this ).attr( 'id' );
1419
  self.focus_panel( id );
1420
  } );
1436
  $( '#ctc_load_form' ).on( 'submit', function() {
1437
  return ( self.validate() ); //&& confirm( self.getxt( 'load' ) ) ) ;
1438
  } );
1439
+ $( '#ctc_query_selector_form' ).on( 'submit', function( e ) {
1440
  e.preventDefault();
1441
  $this = $( '#ctc_save_query_selector' );
1442
  if ( $this.hasClass( 'ajax-pending' ) ) return false;
1444
  self.save( $this ); // refresh menus after updating data
1445
  return false;
1446
  } );
1447
+ $( '#ctc_rule_value_form' ).on( 'submit', function( e ) {
1448
+ //console.log( 'rule value empty submit' );
1449
+ e.preventDefault();
1450
+ return false;
1451
+ } );
1452
  $( '#ctc_theme_child, #ctc_theme_child-button, #ctc_child_type_existing' )
1453
  .on( 'focus click', function() {
1454
  // change the inputs to use existing child theme
1484
  document.location = $( this ).prop( 'href' );
1485
  return false;
1486
  } );
1487
+ //console.log( 'loading autoselect menus...' )
1488
  // initialize autoselect menus
1489
  self.setup_menus();
1490
+ //console.log( 'checking for additional stylesheets...' )
1491
  // mark additional linked stylesheets for parsing
1492
  self.set_addl_css();
1493
  // show last 25 selectors edited
1494
  // render_recent();
1495
  // turn on submit buttons (disabled until everything is loaded to prevent errors)
1496
+ //console.log( 'releasing submit buttons...' )
1497
  $( 'input[type=submit], input[type=button]' ).prop( 'disabled', false );
1498
  self.scrolltop();
1499
+ //console.log( 'Ready.' )
1500
  // disappear any notices after 20 seconds
1501
  setTimeout( self.fade_update_notice, 20000 );
1502
  } else {
js/chld-thm-cfg.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e.chldthmcfg={esc_quot:function(e){var t=this;return t.is_empty(e)?e:e.toString().replace(/"/g,"&quot;")},getxt:function(e){return(text=ctcAjax[e+"_txt"])?text:""},from_ascii:function(e){var t=parseInt(e),c=String.fromCharCode(t);return c},to_ascii:function(e){var t=e.charCodeAt(0);return t},is_empty:function(e){if("undefined"==typeof e||!1===e||null===e||""===e)return!0;if(!0===e||"string"==typeof e||"number"==typeof e)return!1;if("object"==typeof e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},theme_exists:function(t,c){var n=!1;return e.each(ctcAjax.themes,function(i,a){return e.each(a,function(e,a){return e.toLowerCase()!==t.toLowerCase()||"parnt"!=i&&"new"!=c?void 0:(n=!0,!1)}),n?!1:void 0}),n},validate:function(){var t=this,c=/[^\w\-]/,n=e("#ctc_child_template").length?e("#ctc_child_template").val().toString().replace(c):"",i=e("#ctc_theme_child").length?e("#ctc_theme_child").val().toString().replace(c):n,a=e("input[name=ctc_child_type]:checked").val(),r=[];return"new"==a&&(i=n),t.theme_exists(i,a)&&r.push(t.getxt("theme_exists").toString().replace(/%s/,i)),""===i&&r.push(t.getxt("inval_theme")),""===e("#ctc_child_name").val()&&r.push(t.getxt("inval_name")),r.length?(t.set_notice({error:r}),!1):!0},autogen_slugs:function(){if(e("#ctc_theme_parnt").length){for(var t=this,c=e("#ctc_theme_parnt").val(),n=slugbase=c+"-child",i=ctcAjax.themes.parnt[c].Name+" Child",a="",r="",s="00";t.theme_exists(n,"new");)a=""==a?2:a+1,r=s.substring(0,s.length-a.toString().length)+a.toString(),n=slugbase+r;t.testslug=n,t.testname=i+(r.length?" "+r:"")}},focus_panel:function(t){var c=t+"_panel";e(".nav-tab").removeClass("nav-tab-active"),e(".ctc-option-panel").removeClass("ctc-option-panel-active"),e(t).addClass("nav-tab-active"),e(".ctc-option-panel-container").scrollTop(0),e(c).addClass("ctc-option-panel-active")},selector_input_toggle:function(t){var c,n=this;e("#ctc_rewrite_selector").length?(c=e("#ctc_rewrite_selector_orig").val(),e("#ctc_sel_ovrd_selector_selected").text(c),e(t).text(n.getxt("rename"))):(c=e("#ctc_sel_ovrd_selector_selected").text(),e("#ctc_sel_ovrd_selector_selected").html('<textarea id="ctc_rewrite_selector" name="ctc_rewrite_selector" autocomplete="off"></textarea><input id="ctc_rewrite_selector_orig" name="ctc_rewrite_selector_orig" type="hidden" value="'+n.esc_quot(c)+'"/>'),e("#ctc_rewrite_selector").val(c),e(t).text(n.getxt("cancel")))},fade_update_notice:function(){e(".updated, .error").slideUp("slow",function(){e(".updated").remove()})},coalesce_inputs:function(t){var c=this,n=e(t).attr("id"),i=/^(ctc_(ovrd|\d+)_(parent|child)_([0-9a-z\-]+)_(\d+?)(_(\d+))?)(_\w+)?$/,a=e(t).parents(".ctc-selector-row, .ctc-parent-row").first(),r=a.find(".ctc-swatch").first(),s={parent:{},child:{}},l={parent:{origin:"",start:"",end:""},child:{origin:"",start:"",end:""}},_={child:!1,parent:!1},o={};return a.find(".ctc-parent-value, .ctc-child-value").each(function(){var t,a,r=e(this).attr("id"),u=r.toString().match(i),d=u[2],p=u[3],h="undefined"==typeof u[4]?"":u[4],m=u[7],v=u[5],f="undefined"==typeof u[7]?"":u[8],g="parent"==p?e(this).text().replace(/!$/,""):"seq"!=h&&"ctc_delete_query_selector"==n?"":e(this).val(),y="seq"==h?!1:"ctc_"+d+"_child_"+h+"_i_"+v+"_"+m;if("child"==p&&(c.is_empty(e(this).data("color"))||(g=c.color_text(e(this).data("color")),e(this).data("color",null)),o[r]=g,y&&(o[y]=e("#"+y).is(":checked")?1:0)),""!==g)if(c.is_empty(f))if(t=h.toString().match(/^border(\-(top|right|bottom|left))?$/)&&!g.match(/none/)){var x=new RegExp(c.border_regx+c.color_regx,"i"),a=g.toString().match(x);c.is_empty(a)||(a.shift(),s[p][h+"-width"]=a.shift()||"",a.shift(),s[p][h+"-style"]=a.shift()||"",s[p][h+"-color"]=a.shift()||"")}else if("background-image"!=h||g.match(/none/))"seq"!=h&&(s[p][h]=g);else if(g.toString().match(/url\(/))s[p]["background-image"]=c.image_url(p,g);else{var w=new RegExp(c.grad_regx+c.color_regx+c.color_regx,"i"),a=g.toString().match(w);!c.is_empty(a)&&a.length>2?(a.shift(),l[p].origin=a.shift()||"top",l[p].start=a.shift()||"transparent",l[p].end=a.shift()||"transparent",_[p]=!0):s[p]["background-image"]=g}else switch(f){case"_border_width":s[p][h+"-width"]="none"==g?0:g;break;case"_border_style":s[p][h+"-style"]=g;break;case"_border_color":s[p][h+"-color"]=g;break;case"_background_url":s[p]["background-image"]=c.image_url(p,g);break;case"_background_color":s[p]["background-color"]=g;break;case"_background_color1":l[p].start=g,_[p]=!0;break;case"_background_color2":l[p].end=g,_[p]=!0;break;case"_background_origin":l[p].origin=g,_[p]=!0}}),"undefined"==typeof r||c.is_empty(r.attr("id"))||(r.removeAttr("style"),_.parent&&r.ctcgrad(l.parent.origin,[l.parent.start,l.parent.end]),r.css(s.parent),r.attr("id").toString().match(/parent/)||(_.child&&r.ctcgrad(l.child.origin,[l.child.start,l.child.end]),r.css(s.child)),r.css({"z-index":-1})),o},decode_value:function(e,t){t="undefined"==typeof t?"":t;var c=this,n={orig:t,names:[""],values:[t]};if(e.toString().match(/^border(\-(top|right|bottom|left))?$/)){var i=new RegExp(c.border_regx+"("+c.color_regx+")?","i"),a=t.toString().match(i);c.is_empty(a)&&(a=[]),n.names=["_border_width","_border_style","_border_color"],orig=a.shift(),n.values[0]=a.shift()||"",a.shift(),n.values[1]=a.shift()||"",a.shift(),n.values[2]=a.shift()||""}else if(e.toString().match(/^background\-image/))if(n.names=["_background_url","_background_origin","_background_color1","_background_color2"],n.values=["","","",""],c.is_empty(t)||t.toString().match(/(url|none)/))n.values[0]=t;else{var r,s,a=t.toString().split(/:/);n.values[1]=a.shift()||"",n.values[2]=a.shift()||"",r=a.shift()||"",n.values[3]=a.shift()||"",s=a.shift()||"",n.orig=[n.values[1],n.values[2],n.values[3]].join(" ")}return n},image_url:function(e,t){var c,n=this,i=t.toString().match(/url\(['" ]*(.+?)['" ]*\)/),a=n.is_empty(i)?null:i[1],r=ctcAjax.theme_uri+"/"+("parent"==e?ctcAjax.parnt:ctcAjax.child)+"/";return a?c=a.toString().match(/^(data:|https?:|\/)/)?t:"url("+r+a+")":!1},setup_menus:function(){var e=this;e.setup_query_menu(),e.setup_selector_menu(),e.setup_rule_menu(),e.setup_new_rule_menu(),e.load_queries(),e.load_rules(),e.set_query(e.current_query)},load_queries:function(){var e=this;e.query_css("queries",null)},load_selectors:function(){var e=this;e.query_css("selectors",e.current_query)},load_rules:function(){var e=this;e.query_css("rules",null)},load_selector_values:function(){var e=this;e.query_css("qsid",e.current_qsid)},get_queries:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.each(this.element.data("menu"),function(e,t){i.test(t)&&n.push({label:t,value:t})}),c(n)},get_selectors:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.each(this.element.data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},get_rules:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.each(this.element.data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},get_filtered_rules:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.each(e("#ctc_rule_menu").data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},merge_ruleval_arrays:function(t,c,n){var i=this,a={};return nextval=n?c.child.pop():null,e.each(["parnt","child"],function(t,r){i.is_empty(c[r])||e.each(c[r],function(e,t){n?parseInt(t[2])>=parseInt(nextval[2])&&(nextval[2]=parseInt(t[2])+1):(i.is_empty(a[t[2]])&&(a[t[2]]={}),a[t[2]][r]=t)})}),n&&(a[nextval[2]]={parnt:[],child:nextval}),a},input_row:function(t,c,n,i,a){var r=this,s="";if(!r.is_empty(i)&&!r.is_empty(i.value)&&!r.is_empty(i.value[c])){var l=i.value[c],_=r.merge_ruleval_arrays(c,l,a);e.each(_,function(a,l){var _=r.decode_value(c,r.is_empty(l.parnt)?"":l.parnt[0]),o=r.is_empty(l.parnt)||0==l.parnt[1]?0:1,u=r.decode_value(c,r.is_empty(l.child)?"":l.child[0]),d=r.is_empty(l.child)||0==l.child[1]?0:1;if(s+='<div class="ctc-'+("ovrd"==n?"input":"selector")+'-row clearfix"><div class="ctc-input-cell">',s+="ovrd"==n?c.replace(/\d+/g,r.from_ascii):i.selector+'<br/><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+t+'" >'+r.getxt("edit")+"</a> "+(r.is_empty(_.orig)?r.getxt("child_only"):""),s+='</div><div class="ctc-parent-value ctc-input-cell"'+("ovrd"!=n?' style="display:none"':"")+' id="ctc_'+n+"_parent_"+c+"_"+t+"_"+a+'">'+(r.is_empty(_.orig)?"[no value]":_.orig+(o?r.getxt("important"):""))+'</div><div class="ctc-input-cell">',!r.is_empty(_.names)){e.each(_.names,function(e,i){i=r.is_empty(i)?"":i,s+='<div class="ctc-child-input-cell clear">';var l,_="ctc_"+n+"_child_"+c+"_"+t+"_"+a+i;!1===(l=u.values.shift())&&(l=""),s+=(r.is_empty(i)?"":r.getxt(i)+":<br/>")+'<input type="text" id="'+_+'" name="'+_+'" class="ctc-child-value'+((i+c).toString().match(/color/)?" color-picker":"")+(i.toString().match(/url/)?" ctc-input-wide":"")+'" value="'+r.esc_quot(l)+'" /></div>'});var p="ctc_"+n+"_child_"+c+"_i_"+t+"_"+a;s+='<label for="'+p+'"><input type="checkbox" id="'+p+'" name="'+p+'" value="1" '+(d?"checked":"")+" />"+r.getxt("important")+"</label>"}s+="</div>","ovrd"!=n&&(s+='<div class="ctc-swatch ctc-specific" id="ctc_child_'+c+"_"+t+"_"+a+'_swatch">'+r.getxt("swatch")+'</div><div class="ctc-child-input-cell ctc-button-cell" id="ctc_save_'+c+"_"+t+"_"+a+'_cell"><input type="button" class="button ctc-save-input" id="ctc_save_'+c+"_"+t+"_"+a+'" name="ctc_save_'+c+"_"+t+"_"+a+'" value="Save" /></div>'),s+="</div><!-- end input row -->\n"})}return s},scrolltop:function(){e("html, body, .ctc-option-panel-container").animate({scrollTop:0})},css_preview:function(e){var e,t=this;(e=e.match(/(child|parnt)/)[1])||(e="child"),t.query_css("preview",e)},setup_iris:function(e){var t=this;t.setup_spectrum(e)},setup_spectrum:function(t){var c=this,n=(e(t).attr("id")+"_colortxt",!c.is_empty(ctcAjax.palette));try{e(t).spectrum({showInput:!0,allowEmpty:!0,showAlpha:!0,showInitial:!0,preferredFormat:"hex",clickoutFiresChange:!0,move:function(n){e(t).data("color",n),c.coalesce_inputs(t)},showPalette:n?!0:!1,showSelectionPalette:n?!0:!1,palette:[],maxSelectionSize:36,localStorageKey:"ctc-palette."+ctcAjax.child,hideAfterPaletteSelect:!0}).on("change",function(t){e(this).spectrum("get");c.coalesce_inputs(this)}).on("keyup",function(t){var n=this,i=e(this).val();clearTimeout(e(this).data("spectrumTimer")),e(this).data("spectrumTimer",setTimeout(function(){c.coalesce_inputs(n),e(n).spectrum("set",i)},500))})}catch(i){c.jquery_exception(i,"Spectrum Color Picker")}},color_text:function(e){var t=this;return t.is_empty(e)?"":e.getAlpha()<1?e.toRgbString():e.toHexString()},setup_query_menu:function(){var t=this;try{e("#ctc_sel_ovrd_query").autocomplete({source:t.get_queries,minLength:0,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_query(c.item.value),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Query Menu")}},setup_selector_menu:function(){var t=this;try{e("#ctc_sel_ovrd_selector").autocomplete({source:t.get_selectors,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_selector(c.item.value,c.item.label),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Selector Menu")}},setup_rule_menu:function(){var t=this;try{e("#ctc_rule_menu").autocomplete({source:t.get_rules,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_rule(c.item.value,c.item.label),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Property Menu")}},setup_new_rule_menu:function(){var t=this;try{e("#ctc_new_rule_menu").autocomplete({source:t.get_filtered_rules,selectFirst:!0,autoFocus:!0,select:function(c,n){c.preventDefault();var i,a,r=n.item.label.replace(/[^\w\-]/g,t.to_ascii);return t.is_empty(t.current_qsdata.value)&&(t.current_qsdata.value={}),t.is_empty(t.current_qsdata.value[n.item.label])&&(t.current_qsdata.value[n.item.label]={}),t.is_empty(t.current_qsdata.value[n.item.label].child)&&(t.current_qsdata.value[n.item.label].child=[]),t.current_qsdata.value[n.item.label].child.push(["",0,1,1]),i=e(t.input_row(t.current_qsid,r,"ovrd",t.current_qsdata,!0)),e("#ctc_sel_ovrd_rule_inputs").append(i),e("#ctc_new_rule_menu").val(""),i.find('input[type="text"]').each(function(c,n){a||(a=n),e(n).hasClass("color-picker")&&t.setup_spectrum(n)}),a&&e(a).focus(),t.jquery_err.length&&t.jquery_notice("setup_new_rule_menu"),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"New Property Menu")}},set_existing:function(){var t=this;if(e("#ctc_theme_child").length&&e("#ctc_child_type_existing").is(":checked")){var c=e("#ctc_theme_child").val();t.is_empty(c)||(e("#ctc_child_name").val(ctcAjax.themes.child[c].Name),e("#ctc_child_author").val(ctcAjax.themes.child[c].Author),e("#ctc_child_version").val(ctcAjax.themes.child[c].Version),e("#ctc_child_authoruri").val(ctcAjax.themes.child[c].AuthorURI),e("#ctc_child_themeuri").val(ctcAjax.themes.child[c].ThemeURI),e("#ctc_child_descr").val(ctcAjax.themes.child[c].Descr),e("#ctc_child_tags").val(ctcAjax.themes.child[c].Tags),e("#ctc_duplicate_theme").prop("checked",!1),e("#ctc_duplicate_theme_slug").val(""),e("#input_row_duplicate_theme").show())}},set_notice:function(t){var c=this,n="";c.is_empty(t)||e.each(t,function(t,c){n+='<div class="'+t+'"><ul>\n',e(c).each(function(e,t){n+="<li>"+t.toString()+"</li>\n"}),n+="</ul></div>"}),e("#ctc_error_notice").html(n),e("html, body").animate({scrollTop:0},"slow")},set_parent_menu:function(t){e("#ctc_theme_parnt").parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner"></span>'),e(".spinner").show(),document.location="?page="+ctcAjax.page+"&ctc_parent="+t.value},set_child_menu:function(t){var c,n,i=this;i.is_empty(ctcAjax.themes.child[t.value])||(c=ctcAjax.themes.child[t.value].Template,n=e("#ctc_theme_parnt").val(),c==n?(e("#ctc_child_name").val(ctcAjax.themes.child[t.value].Name),e("#ctc_child_author").val(ctcAjax.themes.child[t.value].Author),e("#ctc_child_version").val(ctcAjax.themes.child[t.value].Version)):(e("#ctc_theme_child").parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner"></span>'),e(".spinner").show(),document.location="?page="+ctcAjax.page+"&ctc_parent="+c+"&ctc_child="+t.value))},set_query:function(t){var c=this;return c.is_empty(t)?!1:(c.current_query=t,e("#ctc_sel_ovrd_query").val(""),e("#ctc_sel_ovrd_query_selected").text(t),e("#ctc_sel_ovrd_selector").val(""),e("#ctc_sel_ovrd_selector_selected").html("&nbsp;"),c.load_selectors(),void c.scrolltop())},set_selector:function(t,c){var n=this;return n.is_empty(t)?!1:(e("#ctc_sel_ovrd_selector").val(""),n.current_qsid=t,n.reload_menus=!1,n.load_selector_values(),void n.scrolltop())},set_rule:function(t,c){var n=this;return n.is_empty(t)?!1:(e("#ctc_rule_menu").val(""),e("#ctc_rule_menu_selected").text(c),e(".ctc-rewrite-toggle").text(n.getxt("rename")),e("#ctc_rule_value_inputs, #ctc_input_row_rule_header").show(),n.query_css("rule_val",t),void n.scrolltop())},set_qsid:function(t){var c=this;c.current_qsid=e(t).attr("id").match(/_(\d+)$/)[1],c.focus_panel("#query_selector_options"),c.reload_menus=!0,c.load_selector_values()},set_addl_css:function(){var t,c=this,n=e("#ctc_theme_parnt").val(),i=ctcAjax.theme_uri.replace(/^https?:\/\//,""),a=ctcAjax.homeurl.replace(/^https?/,ctcAjax.ssl?"https":"http"),r=a+"?preview=1&p=x&template="+n+"&stylesheet="+n,s=new RegExp("<link rel=[\"']stylesheet[\"'][^>]+?"+i+"/"+n+"/(.+?\\.css)[^>]+?>","g");c.is_empty(n)||(n!=ctcAjax.parnt?e.get(r,function(c){for(;(t=s.exec(c))&&"style.css"!=t[1];)t[1].match(/bootstrap/)||e(".ctc_checkbox").each(function(c,n){e(this).val()==t[1]&&e(this).prop("checked",!0)});c=null}):e(ctcAjax.addl_css).each(function(t,c){e("#ctc_stylesheet_files .ctc_checkbox").each(function(t,n){e(this).val()==c&&e(this).prop("checked",!0)})}))},query_css:function(t,c,n){var i=this,a={ctc_query_obj:t,ctc_query_key:c},r="#ctc_status_"+t+("val_qry"==t?"_"+c:"");"object"==typeof n&&e.each(n,function(e,t){a["ctc_query_"+e]=t}),e(".query-icon").remove(),e(r+" .ctc-status-icon").remove(),e(r).append('<span class="ctc-status-icon spinner query-icon"></span>'),e(".spinner").show(),a.action=i.is_empty(e("#ctc_action").val())||"plugin"!=e("#ctc_action").val()?"ctc_query":"ctc_plgqry",a._wpnonce=e("#_wpnonce").val(),i.ajax_post(t,a)},save:function(t){var c,n,i,a,r,s=this,l=(ctcAjax.ajaxurl,{}),_=e(t).attr("id");e(t).prop("disabled",!0),e(".ctc-status-icon").remove(),e(t).parent(".ctc-textarea-button-cell, .ctc-button-cell").append('<span class="ctc-status-icon spinner save-icon"></span>'),_.match(/ctc_configtype/)?(e(t).parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner save-icon"></span>'),l.ctc_configtype=e(t).val()):(c=e("#ctc_new_selectors"))&&"ctc_save_new_selectors"==e(t).attr("id")?(l.ctc_new_selectors=c.val(),(n=e("#ctc_sel_ovrd_query_selected"))&&(l.ctc_sel_ovrd_query=n.text()),s.reload_menus=!0):(i=e("#ctc_child_imports"))&&"ctc_save_imports"==_?l.ctc_child_imports=i.val():"ctc_is_debug"==_?l.ctc_is_debug=e("#ctc_is_debug").is(":checked")?1:0:l=s.coalesce_inputs(t),e(".save-icon").show(),e("#ctc_sel_ovrd_selector_selected").find("#ctc_rewrite_selector").each(function(){a=e("#ctc_rewrite_selector").val(),r=e("#ctc_rewrite_selector_orig").val(),s.is_empty(a)||!a.toString().match(/\w/)?a=r:(l.ctc_rewrite_selector=a,s.reload_menus=!0),e(".ctc-rewrite-toggle").text(s.getxt("rename")),e("#ctc_sel_ovrd_selector_selected").html(a)}),l.action=s.is_empty(e("#ctc_action").val())||"plugin"!=e("#ctc_action").val()?"ctc_update":"ctc_plugin",l._wpnonce=e("#_wpnonce").val(),s.ajax_post("qsid",l)},ajax_post:function(t,c,n){var i=this,a=ctcAjax.ajaxurl;e.ajax({url:a,data:c,dataType:i.is_empty(n)?"json":n,type:"POST"}).done(function(e){i.handle_success(t,e)}).fail(function(){i.handle_failure(t)})},handle_failure:function(t){var c=this;e(".query-icon, .save-icon").removeClass("spinner").addClass("failure"),e("input[type=submit], input[type=button], input[type=checkbox],.ctc-delete-input").prop("disabled",!1),e(".ajax-pending").removeClass("ajax-pending"),"preview"==t&&e("#view_parnt_options_panel,#view_child_options_panel").text(c.getxt("css_fail"))},handle_success:function(t,c){var n=this;e(".query-icon, .save-icon").removeClass("spinner"),e(".ajax-pending").removeClass("ajax-pending"),n.is_empty(c)?n.handle_failure(t):(e("#ctc_new_selectors").val(""),e(".query-icon, .save-icon").addClass("success"),e("input[type=submit], input[type=button], input[type=checkbox],.ctc-delete-input").prop("disabled",!1),e(c).each(function(){"function"==typeof n.update[this.obj]&&n.update[this.obj].call(n,this)}))},jquery_exception:function(e,t){var c=this,n=c.is_empty(e.lineNumber)?"":" line: "+e.lineNumber,i=c.is_empty(e.fileName)?"":" "+e.fileName.split(/\?/)[0];c.jquery_err.push("<code><small>"+t+": "+e.message+i+n+"</small></code>")},jquery_notice:function(t){var c=this,n=[],i=[];e("input[type=submit], input[type=button]").prop("disabled",!0),e("script").each(function(t,i){var a=e(this).prop("src");c.is_empty(a)||!a.match(/jquery(\.min|\.js|\-?ui)/i)||a.match(/load\-scripts.php/)||n.push("<code><small>"+a.split(/\?/)[0]+"</small></code>")}),i.push("<strong>"+c.getxt("js")+"</strong> "+c.getxt("contact")),i.push(c.jquery_err.join("<br/>")),n.length&&i.push(c.getxt("jquery")+"<br/>"+n.join("<br/>")),i.push(c.getxt("plugin")),c.set_notice({error:i})},update:{qsid:function(t){var c,n,i,a=this;a.current_qsid=t.key,a.current_qsdata=t.data,e("#ctc_sel_ovrd_qsid").val(a.current_qsid),a.is_empty(a.current_qsdata.seq)?e("#ctc_child_load_order_container").empty():(c="ctc_ovrd_child_seq_"+a.current_qsid,i=parseInt(a.current_qsdata.seq),n='<input type="text" id="'+c+'" name="'+c+'" class="ctc-child-value" value="'+i+'" />',e("#ctc_child_load_order_container").html(n)),a.is_empty(a.current_qsdata.value)?(e("#ctc_sel_ovrd_rule_inputs").empty(),e("#ctc_sel_ovrd_rule_header").hide()):(n="",e.each(a.current_qsdata.value,function(e,t){n+=a.input_row(a.current_qsid,e,"ovrd",a.current_qsdata)}),e("#ctc_sel_ovrd_rule_inputs").html(n).find(".color-picker").each(function(){a.setup_spectrum(this)}),a.coalesce_inputs("#ctc_child_all_0_swatch"),e("#ctc_sel_ovrd_rule_header").show()),a.jquery_err.length?a.jquery_notice("update.qsid"):(a.reload_menus&&(a.set_query(a.current_qsdata.query),a.load_rules()),e("#ctc_sel_ovrd_selector_selected").text(a.current_qsdata.selector),e(".ctc-rewrite-toggle").text(a.getxt("rename")),e("#ctc_sel_ovrd_new_rule,#ctc_sel_ovrd_rule_inputs_container,#ctc_sel_ovrd_rule_inputs,.ctc-rewrite-toggle").show())},rule_val:function(t){var c=this,n=e("#ctc_rule_menu_selected").text(),i='<div class="ctc-input-row clearfix" id="ctc_rule_row_'+n+'">\n';c.is_empty(t.data)||(e.each(t.data,function(e,t){var a=c.decode_value(n,t);i+='<div class="ctc-parent-row clearfix" id="ctc_rule_row_'+n+"_"+e+'">\n<div class="ctc-input-cell ctc-parent-value" id="ctc_'+e+"_parent_"+n+"_"+e+'">'+a.orig+'</div>\n<div class="ctc-input-cell">\n<div class="ctc-swatch ctc-specific" id="ctc_'+e+"_parent_"+n+"_"+e+'_swatch">'+c.getxt("swatch")+'</div></div>\n<div class="ctc-input-cell"><a href="#" class="ctc-selector-handle" id="ctc_selector_'+n+"_"+e+'">'+c.getxt("selector")+'</a></div>\n<div id="ctc_selector_'+n+"_"+e+'_container" class="ctc-selector-container">\n<a href="#" id="ctc_selector_'+n+"_"+e+'_close" class="ctc-selector-handle ctc-exit" title="'+c.getxt("close")+'"></a><div id="ctc_selector_'+n+"_"+e+'_inner_container" class="ctc-selector-inner-container clearfix">\n<div id="ctc_status_val_qry_'+e+'"></div>\n<div id="ctc_selector_'+n+"_"+e+'_rows"></div>\n</div></div></div>\n'}),i+="</div>\n"),e("#ctc_rule_value_inputs").html(i).find(".ctc-swatch").each(function(){c.coalesce_inputs(this)})},val_qry:function(t){var c=this,n="";c.is_empty(t.data)||e.each(t.data,function(i,a){page_rule=i,e.each(a,function(a,r){n+='<h4 class="ctc-query-heading">'+a+"</h4>\n",c.is_empty(r)||e.each(r,function(e,a){n+=c.input_row(e,i,t.key,a)})})}),selector="#ctc_selector_"+rule+"_"+t.key+"_rows",e(selector).html(n).find(".color-picker").each(function(){c.setup_spectrum(this)}),e(selector).find(".ctc-swatch").each(function(){c.coalesce_inputs(this)}),c.jquery_err.length&&c.jquery_notice("val_qry")},queries:function(t){e("#ctc_sel_ovrd_query").data("menu",t.data)},selectors:function(t){e("#ctc_sel_ovrd_selector").data("menu",t.data)},rules:function(t){e("#ctc_rule_menu").data("menu",t.data)},debug:function(t){e("#ctc_debug_container").html(t.data)},preview:function(t){e("#view_"+t.key+"_options_panel").text(t.data)}},init:function(){var t=this;if(t.autogen_slugs(),t.set_existing(),!e("#ctc_theme_parnt").is("input")){try{e.widget("ctc.themeMenu",e.ui.selectmenu,{_renderItem:function(t,c){var n=e("<li>"),i=c.value.replace(/[^\w\-]/,"");return e("#ctc_theme_option_"+i).detach().appendTo(n),n.appendTo(t)}})}catch(c){t.jquery_exception(c,"Theme Menu")}try{e("#ctc_theme_parnt").themeMenu({select:function(e,c){t.set_parent_menu(c.item)}})}catch(c){"function"==typeof themeMenu?e("#ctc_theme_parnt").themeMenu("destroy"):e("#ctc_theme_parnt-button").remove(),t.jquery_exception(c,"Parent Theme Menu")}if(t.is_empty(ctcAjax.themes.child))e("#ctc_child_name").length&&(e("#ctc_child_name").val(t.testname),e("#ctc_child_template").val(t.testslug));else try{e("#ctc_theme_child").themeMenu({select:function(e,c){t.set_child_menu(c.item)}})}catch(c){"function"==typeof themeMenu?e("#ctc_theme_child").themeMenu("destroy"):e("#ctc_theme_child-button").remove(),t.jquery_exception(c,"Child Theme Menu")}}t.is_empty(t.jquery_err)?(e("#ctc_main").on("click",".ctc-selector-handle",function(c){if(c.preventDefault(),e(this).hasClass("ajax-pending"))return!1;e(this).addClass("ajax-pending");var n=e(this).attr("id").toString().replace("_close",""),i=n.toString().match(/_([^_]+)_(\d+)$/);e("#"+n+"_container").is(":hidden")&&(t.is_empty(i[1])||t.is_empty(i[2])||(rule=i[1],valid=i[2],t.query_css("val_qry",valid,{rule:rule}))),e("#"+n+"_container").fadeToggle("fast"),e(".ctc-selector-container").not("#"+n+"_container").fadeOut("fast")}),e("#ctc_main").on("click",".ctc-save-input[type=button], .ctc-delete-input",function(c){return c.preventDefault(),e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),t.save(this),!1)}),e("#ctc_main").on("click",".ctc-selector-edit",function(c){return c.preventDefault(),e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),void t.set_qsid(this))}),e("#ctc_main").on("click",".ctc-rewrite-toggle",function(e){e.preventDefault(),t.selector_input_toggle(this)}),e("#ctc_main").on("click","#ctc_copy_selector",function(c){var n=e("#ctc_sel_ovrd_selector_selected").text().trim();t.is_empty(n)||e("#ctc_new_selectors").val(e("#ctc_new_selectors").val()+"\n"+n+" {\n\n}")}),e("#ctc_configtype").on("change",function(c){var n=e(this).val();if(t.is_empty(n)||"theme"==n){e(".ctc-theme-only, .ctc-themeonly-container").removeClass("ctc-disabled"),e(".ctc-theme-only, .ctc-themeonly-container input").prop("disabled",!1);try{e("#ctc_theme_parnt, #ctc_theme_child").themeMenu("enable")}catch(i){t.jquery_exception(i,"Theme Menu")}}else{e(".ctc-theme-only, .ctc-themeonly-container").addClass("ctc-disabled"),e(".ctc-theme-only, .ctc-themeonly-container input").prop("disabled",!0);try{e("#ctc_theme_parnt, #ctc_theme_child").themeMenu("disable")}catch(i){t.jquery_exception(i,"Theme Menu")}}}),e(".nav-tab").on("click",function(c){c.preventDefault(),e(".ctc-status-icon").remove();var n="#"+e(this).attr("id");t.focus_panel(n)}),e(".ctc-section-toggle").on("click",function(t){t.preventDefault(),e(this).parents(".ctc-input-row, .update-nag").first().find(".ctc-section-toggle").each(function(){e(this).toggleClass("open")});var c=e(this).attr("id").replace(/\d$/,"")+"_content";return e("#"+c).stop().slideToggle("fast"),!1}),e("#view_child_options, #view_parnt_options").on("click",function(c){return e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),void t.css_preview(e(this).attr("id")))}),e("#ctc_load_form").on("submit",function(){return t.validate()}),e("#ctc_query_selector_form").on("submit",function(c){return c.preventDefault(),$this=e("#ctc_save_query_selector"),$this.hasClass("ajax-pending")?!1:($this.addClass("ajax-pending"),t.save($this),!1)}),e("#ctc_theme_child, #ctc_theme_child-button, #ctc_child_type_existing").on("focus click",function(){e("#ctc_child_type_existing").prop("checked",!0),e("#ctc_child_type_new").prop("checked",!1),e("#ctc_child_template").val(""),t.set_existing()}),e("#ctc_duplicate_theme").on("click",function(){e("#ctc_duplicate_theme").is(":checked")?(e("#ctc_child_name").val(t.testname),e("#ctc_duplicate_theme_slug").val(t.testslug)):t.set_existing()}),e("#ctc_child_type_new, #ctc_child_template").on("focus click",function(){e("#ctc_child_type_existing").prop("checked",!1),e("#ctc_duplicate_theme").prop("checked",!1),e("#ctc_duplicate_theme_slug").val(""),e("#ctc_child_type_new").prop("checked",!0),e("#input_row_duplicate_theme").hide(),e("#ctc_child_name").val(t.testname),e("#ctc_child_template").val(t.testslug)}),e("#ctc_is_debug").on("change",function(e){t.save(this)}),e(".ctc-live-preview").on("click",function(t){return t.stopImmediatePropagation(),t.preventDefault(),document.location=e(this).prop("href"),!1}),t.setup_menus(),t.set_addl_css(),e("input[type=submit], input[type=button]").prop("disabled",!1),t.scrolltop(),setTimeout(t.fade_update_notice,2e4)):t.jquery_notice("init")},testslug:"",testname:"",reload_menus:!1,current_query:"base",current_qsid:null,current_qsdata:{},jquery_err:[],color_regx:"\\s+(\\#[a-f0-9]{3,6}|rgba?\\([\\d., ]+?\\)|hsla?\\([\\d%., ]+?\\)|[a-z]+)",border_regx:"(\\w+)(\\s+(\\w+))?",grad_regx:"(\\w+)"},e.chldthmcfg.init()}(jQuery);
1
+ !function(e){e.chldthmcfg={esc_quot:function(e){var t=this;return t.is_empty(e)?e:e.toString().replace(/"/g,"&quot;")},getxt:function(e){return(text=ctcAjax[e+"_txt"])?text:""},from_ascii:function(e){var t=parseInt(e),c=String.fromCharCode(t);return c},to_ascii:function(e){var t=e.charCodeAt(0);return t},is_empty:function(e){if("undefined"==typeof e||!1===e||null===e||""===e)return!0;if(!0===e||"string"==typeof e||"number"==typeof e)return!1;if("object"==typeof e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},theme_exists:function(t,c){var n=!1;return e.each(ctcAjax.themes,function(i,a){return e.each(a,function(e,a){return e.toLowerCase()!==t.toLowerCase()||"parnt"!=i&&"new"!=c?void 0:(n=!0,!1)}),n?!1:void 0}),n},validate:function(){var t=this,c=/[^\w\-]/,n=e("#ctc_child_template").length?e("#ctc_child_template").val().toString().replace(c):"",i=e("#ctc_theme_child").length?e("#ctc_theme_child").val().toString().replace(c):n,a=e("input[name=ctc_child_type]:checked").val(),r=[];return"new"==a&&(i=n),t.theme_exists(i,a)&&r.push(t.getxt("theme_exists").toString().replace(/%s/,i)),""===i&&r.push(t.getxt("inval_theme")),""===e("#ctc_child_name").val()&&r.push(t.getxt("inval_name")),r.length?(t.set_notice({error:r}),!1):!0},autogen_slugs:function(){if(e("#ctc_theme_parnt").length){for(var t=this,c=e("#ctc_theme_parnt").val(),n=slugbase=c+"-child",i=ctcAjax.themes.parnt[c].Name+" Child",a="",r="",s="00";t.theme_exists(n,"new");)a=""==a?2:a+1,r=s.substring(0,s.length-a.toString().length)+a.toString(),n=slugbase+r;t.testslug=n,t.testname=i+(r.length?" "+r:"")}},focus_panel:function(t){var c=t+"_panel";e(".nav-tab").removeClass("nav-tab-active"),e(".ctc-option-panel").removeClass("ctc-option-panel-active"),e(t).addClass("nav-tab-active"),e(".ctc-option-panel-container").scrollTop(0),e(c).addClass("ctc-option-panel-active")},selector_input_toggle:function(t){var c,n=this;e("#ctc_rewrite_selector").length?(c=e("#ctc_rewrite_selector_orig").val(),e("#ctc_sel_ovrd_selector_selected").text(c),e(t).text(n.getxt("rename"))):(c=e("#ctc_sel_ovrd_selector_selected").text(),e("#ctc_sel_ovrd_selector_selected").html('<textarea id="ctc_rewrite_selector" name="ctc_rewrite_selector" autocomplete="off"></textarea><input id="ctc_rewrite_selector_orig" name="ctc_rewrite_selector_orig" type="hidden" value="'+n.esc_quot(c)+'"/>'),e("#ctc_rewrite_selector").val(c),e(t).text(n.getxt("cancel")))},fade_update_notice:function(){e(".updated, .error").slideUp("slow",function(){e(".updated").remove()})},coalesce_inputs:function(t){var c=this,n=e(t).attr("id"),i=/^(ctc_(ovrd|\d+)_(parent|child)_([0-9a-z\-]+)_(\d+?)(_(\d+))?)(_\w+)?$/,a=e(t).parents(".ctc-selector-row, .ctc-parent-row").first(),r=a.find(".ctc-swatch").first(),s={parent:{},child:{}},l={parent:{origin:"",start:"",end:""},child:{origin:"",start:"",end:""}},_={child:!1,parent:!1},o={};return a.find(".ctc-parent-value, .ctc-child-value").each(function(){var t,a,r=e(this).attr("id"),u=r.toString().match(i),d=u[2],p=u[3],h="undefined"==typeof u[4]?"":u[4],m=u[7],v=u[5],f="undefined"==typeof u[7]?"":u[8],g="parent"==p?e(this).text().replace(/!$/,""):"seq"!=h&&"ctc_delete_query_selector"==n?"":e(this).val(),y="seq"==h?!1:"ctc_"+d+"_child_"+h+"_i_"+v+"_"+m;if("child"==p&&(c.is_empty(e(this).data("color"))||(g=c.color_text(e(this).data("color")),e(this).data("color",null)),o[r]=g,y&&(o[y]=e("#"+y).is(":checked")?1:0)),""!==g)if(c.is_empty(f))if(t=h.toString().match(/^border(\-(top|right|bottom|left))?$/)&&!g.match(/none/)){var x=new RegExp(c.border_regx+c.color_regx,"i"),a=g.toString().match(x);c.is_empty(a)||(a.shift(),s[p][h+"-width"]=a.shift()||"",a.shift(),s[p][h+"-style"]=a.shift()||"",s[p][h+"-color"]=a.shift()||"")}else if("background-image"!=h||g.match(/none/))"seq"!=h&&(s[p][h]=g);else if(g.toString().match(/url\(/))s[p]["background-image"]=c.image_url(p,g);else{var w=new RegExp(c.grad_regx+c.color_regx+c.color_regx,"i"),a=g.toString().match(w);!c.is_empty(a)&&a.length>2?(a.shift(),l[p].origin=a.shift()||"top",l[p].start=a.shift()||"transparent",l[p].end=a.shift()||"transparent",_[p]=!0):s[p]["background-image"]=g}else switch(f){case"_border_width":s[p][h+"-width"]="none"==g?0:g;break;case"_border_style":s[p][h+"-style"]=g;break;case"_border_color":s[p][h+"-color"]=g;break;case"_background_url":s[p]["background-image"]=c.image_url(p,g);break;case"_background_color":s[p]["background-color"]=g;break;case"_background_color1":l[p].start=g,_[p]=!0;break;case"_background_color2":l[p].end=g,_[p]=!0;break;case"_background_origin":l[p].origin=g,_[p]=!0}}),"undefined"==typeof r||c.is_empty(r.attr("id"))||(r.removeAttr("style"),_.parent&&r.ctcgrad(l.parent.origin,[l.parent.start,l.parent.end]),r.css(s.parent),r.attr("id").toString().match(/parent/)||(_.child&&r.ctcgrad(l.child.origin,[l.child.start,l.child.end]),r.css(s.child)),r.css({"z-index":-1})),o},decode_value:function(e,t){t="undefined"==typeof t?"":t;var c=this,n={orig:t,names:[""],values:[t]};if(e.toString().match(/^border(\-(top|right|bottom|left))?$/)){var i=new RegExp(c.border_regx+"("+c.color_regx+")?","i"),a=t.toString().match(i);c.is_empty(a)&&(a=[]),n.names=["_border_width","_border_style","_border_color"],orig=a.shift(),n.values[0]=a.shift()||"",a.shift(),n.values[1]=a.shift()||"",a.shift(),n.values[2]=a.shift()||""}else if(e.toString().match(/^background\-image/))if(n.names=["_background_url","_background_origin","_background_color1","_background_color2"],n.values=["","","",""],c.is_empty(t)||t.toString().match(/(url|none)/))n.values[0]=t;else{var r,s,a=t.toString().split(/:/);n.values[1]=a.shift()||"",n.values[2]=a.shift()||"",r=a.shift()||"",n.values[3]=a.shift()||"",s=a.shift()||"",n.orig=[n.values[1],n.values[2],n.values[3]].join(" ")}return n},image_url:function(e,t){var c,n=this,i=t.toString().match(/url\(['" ]*(.+?)['" ]*\)/),a=n.is_empty(i)?null:i[1],r=ctcAjax.theme_uri+"/"+("parent"==e?ctcAjax.parnt:ctcAjax.child)+"/";return a?c=a.toString().match(/^(data:|https?:|\/)/)?t:"url("+r+a+")":!1},setup_menus:function(){var e=this;e.setup_query_menu(),e.setup_selector_menu(),e.setup_rule_menu(),e.setup_new_rule_menu(),e.load_queries(),e.load_rules(),e.set_query(e.current_query)},load_queries:function(){var e=this;e.query_css("queries",null)},load_selectors:function(){var e=this;e.query_css("selectors",e.current_query)},load_rules:function(){var e=this;e.query_css("rules",null)},load_selector_values:function(){var e=this;e.query_css("qsid",e.current_qsid)},get_queries:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.each(this.element.data("menu"),function(e,t){i.test(t)&&n.push({label:t,value:t})}),c(n)},get_selectors:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.each(this.element.data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},get_rules:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.each(this.element.data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},get_filtered_rules:function(t,c){var n=[],i=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");e.each(e("#ctc_rule_menu").data("menu"),function(e,t){i.test(e)&&n.push({label:e,value:t})}),c(n)},merge_ruleval_arrays:function(t,c,n){var i=this,a={};return nextval=n?c.child.pop():null,e.each(["parnt","child"],function(t,r){i.is_empty(c[r])||e.each(c[r],function(e,t){n?parseInt(t[2])>=parseInt(nextval[2])&&(nextval[2]=parseInt(t[2])+1):(i.is_empty(a[t[2]])&&(a[t[2]]={}),a[t[2]][r]=t)})}),n&&(a[nextval[2]]={parnt:[],child:nextval}),a},input_row:function(t,c,n,i,a){var r=this,s="";if(!r.is_empty(i)&&!r.is_empty(i.value)&&!r.is_empty(i.value[c])){var l=i.value[c],_=r.merge_ruleval_arrays(c,l,a);e.each(_,function(a,l){var _=r.decode_value(c,r.is_empty(l.parnt)?"":l.parnt[0]),o=r.is_empty(l.parnt)||0==l.parnt[1]?0:1,u=r.decode_value(c,r.is_empty(l.child)?"":l.child[0]),d=r.is_empty(l.child)||0==l.child[1]?0:1;if(s+='<div class="ctc-'+("ovrd"==n?"input":"selector")+'-row clearfix"><div class="ctc-input-cell">',s+="ovrd"==n?c.replace(/\d+/g,r.from_ascii):i.selector+'<br/><a href="#" class="ctc-selector-edit" id="ctc_selector_edit_'+t+'" >'+r.getxt("edit")+"</a> "+(r.is_empty(_.orig)?r.getxt("child_only"):""),s+='</div><div class="ctc-parent-value ctc-input-cell"'+("ovrd"!=n?' style="display:none"':"")+' id="ctc_'+n+"_parent_"+c+"_"+t+"_"+a+'">'+(r.is_empty(_.orig)?"[no value]":_.orig+(o?r.getxt("important"):""))+'</div><div class="ctc-input-cell">',!r.is_empty(_.names)){e.each(_.names,function(e,i){i=r.is_empty(i)?"":i,s+='<div class="ctc-child-input-cell clear">';var l,_="ctc_"+n+"_child_"+c+"_"+t+"_"+a+i;!1===(l=u.values.shift())&&(l=""),s+=(r.is_empty(i)?"":r.getxt(i)+":<br/>")+'<input type="text" id="'+_+'" name="'+_+'" class="ctc-child-value'+((i+c).toString().match(/color/)?" color-picker":"")+(i.toString().match(/url/)?" ctc-input-wide":"")+'" value="'+r.esc_quot(l)+'" /></div>'});var p="ctc_"+n+"_child_"+c+"_i_"+t+"_"+a;s+='<label for="'+p+'"><input type="checkbox" id="'+p+'" name="'+p+'" value="1" '+(d?"checked":"")+" />"+r.getxt("important")+"</label>"}s+="</div>","ovrd"!=n&&(s+='<div class="ctc-swatch ctc-specific" id="ctc_child_'+c+"_"+t+"_"+a+'_swatch">'+r.getxt("swatch")+'</div><div class="ctc-child-input-cell ctc-button-cell" id="ctc_save_'+c+"_"+t+"_"+a+'_cell"><input type="button" class="button ctc-save-input" id="ctc_save_'+c+"_"+t+"_"+a+'" name="ctc_save_'+c+"_"+t+"_"+a+'" value="Save" /></div>'),s+="</div><!-- end input row -->\n"})}return s},scrolltop:function(){e("html, body, .ctc-option-panel-container").animate({scrollTop:0})},css_preview:function(e){var e,t=this;(e=e.match(/(child|parnt)/)[1])||(e="child"),t.query_css("preview",e)},setup_iris:function(e){var t=this;t.setup_spectrum(e)},setup_spectrum:function(t){var c=this,n=(e(t).attr("id")+"_colortxt",!c.is_empty(ctcAjax.palette));try{e(t).spectrum({showInput:!0,allowEmpty:!0,showAlpha:!0,showInitial:!0,preferredFormat:"hex",clickoutFiresChange:!0,move:function(n){e(t).data("color",n),c.coalesce_inputs(t)},showPalette:n?!0:!1,showSelectionPalette:n?!0:!1,palette:[],maxSelectionSize:36,localStorageKey:"ctc-palette."+ctcAjax.child,hideAfterPaletteSelect:!0}).on("change",function(t){e(this).spectrum("get");c.coalesce_inputs(this)}).on("keyup",function(t){var n=this,i=e(this).val();clearTimeout(e(this).data("spectrumTimer")),e(this).data("spectrumTimer",setTimeout(function(){c.coalesce_inputs(n),e(n).spectrum("set",i)},500))})}catch(i){c.jquery_exception(i,"Spectrum Color Picker")}},color_text:function(e){var t=this;return t.is_empty(e)?"":e.getAlpha()<1?e.toRgbString():e.toHexString()},setup_query_menu:function(){var t=this;try{e("#ctc_sel_ovrd_query").autocomplete({source:t.get_queries,minLength:0,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_query(c.item.value),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Query Menu")}},setup_selector_menu:function(){var t=this;try{e("#ctc_sel_ovrd_selector").autocomplete({source:t.get_selectors,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_selector(c.item.value,c.item.label),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Selector Menu")}},setup_rule_menu:function(){var t=this;try{e("#ctc_rule_menu").autocomplete({source:t.get_rules,selectFirst:!0,autoFocus:!0,select:function(e,c){return t.set_rule(c.item.value,c.item.label),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"Property Menu")}},setup_new_rule_menu:function(){var t=this;try{e("#ctc_new_rule_menu").autocomplete({source:t.get_filtered_rules,selectFirst:!0,autoFocus:!0,select:function(c,n){c.preventDefault();var i,a,r=n.item.label.replace(/[^\w\-]/g,t.to_ascii);return t.is_empty(t.current_qsdata.value)&&(t.current_qsdata.value={}),t.is_empty(t.current_qsdata.value[n.item.label])&&(t.current_qsdata.value[n.item.label]={}),t.is_empty(t.current_qsdata.value[n.item.label].child)&&(t.current_qsdata.value[n.item.label].child=[]),t.current_qsdata.value[n.item.label].child.push(["",0,1,1]),i=e(t.input_row(t.current_qsid,r,"ovrd",t.current_qsdata,!0)),e("#ctc_sel_ovrd_rule_inputs").append(i),e("#ctc_new_rule_menu").val(""),i.find('input[type="text"]').each(function(c,n){a||(a=n),e(n).hasClass("color-picker")&&t.setup_spectrum(n)}),a&&e(a).focus(),t.jquery_err.length&&t.jquery_notice("setup_new_rule_menu"),!1},focus:function(e){e.preventDefault()}}).data("menu",{})}catch(c){t.jquery_exception(c,"New Property Menu")}},set_existing:function(){var t=this;if(e("#ctc_theme_child").length&&e("#ctc_child_type_existing").is(":checked")){var c=e("#ctc_theme_child").val();t.is_empty(c)||(e("#ctc_child_name").val(ctcAjax.themes.child[c].Name),e("#ctc_child_author").val(ctcAjax.themes.child[c].Author),e("#ctc_child_version").val(ctcAjax.themes.child[c].Version),e("#ctc_child_authoruri").val(ctcAjax.themes.child[c].AuthorURI),e("#ctc_child_themeuri").val(ctcAjax.themes.child[c].ThemeURI),e("#ctc_child_descr").val(ctcAjax.themes.child[c].Descr),e("#ctc_child_tags").val(ctcAjax.themes.child[c].Tags),e("#ctc_duplicate_theme").prop("checked",!1),e("#ctc_duplicate_theme_slug").val(""),e("#input_row_duplicate_theme").show())}},set_notice:function(t){var c=this,n="";c.is_empty(t)||e.each(t,function(t,c){n+='<div class="'+t+'"><ul>\n',e(c).each(function(e,t){n+="<li>"+t.toString()+"</li>\n"}),n+="</ul></div>"}),e("#ctc_error_notice").html(n),e("html, body").animate({scrollTop:0},"slow")},set_parent_menu:function(t){e("#ctc_theme_parnt").parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner"></span>'),e(".spinner").show(),document.location="?page="+ctcAjax.page+"&ctc_parent="+t.value},set_child_menu:function(t){var c,n,i=this;i.is_empty(ctcAjax.themes.child[t.value])||(c=ctcAjax.themes.child[t.value].Template,n=e("#ctc_theme_parnt").val(),c==n?(e("#ctc_child_name").val(ctcAjax.themes.child[t.value].Name),e("#ctc_child_author").val(ctcAjax.themes.child[t.value].Author),e("#ctc_child_version").val(ctcAjax.themes.child[t.value].Version)):(e("#ctc_theme_child").parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner"></span>'),e(".spinner").show(),document.location="?page="+ctcAjax.page+"&ctc_parent="+c+"&ctc_child="+t.value))},set_query:function(t){var c=this;return c.is_empty(t)?!1:(c.current_query=t,e("#ctc_sel_ovrd_query").val(""),e("#ctc_sel_ovrd_query_selected").text(t),e("#ctc_sel_ovrd_selector").val(""),e("#ctc_sel_ovrd_selector_selected").html("&nbsp;"),c.load_selectors(),void c.scrolltop())},set_selector:function(t,c){var n=this;return n.is_empty(t)?!1:(e("#ctc_sel_ovrd_selector").val(""),n.current_qsid=t,n.reload_menus=!1,n.load_selector_values(),void n.scrolltop())},set_rule:function(t,c){var n=this;return n.is_empty(t)?!1:(e("#ctc_rule_menu").val(""),e("#ctc_rule_menu_selected").text(c),e(".ctc-rewrite-toggle").text(n.getxt("rename")),e("#ctc_rule_value_inputs, #ctc_input_row_rule_header").show(),n.query_css("rule_val",t),void n.scrolltop())},set_qsid:function(t){var c=this;c.current_qsid=e(t).attr("id").match(/_(\d+)$/)[1],c.focus_panel("#query_selector_options"),c.reload_menus=!0,c.load_selector_values()},set_addl_css:function(){var t,c=this,n=e("#ctc_theme_parnt").val(),i=ctcAjax.theme_uri.replace(/^https?:\/\//,""),a=ctcAjax.homeurl.replace(/^https?/,ctcAjax.ssl?"https":"http"),r=a+"?preview=1&p=x&template="+n+"&stylesheet="+n,s=new RegExp("<link rel=[\"']stylesheet[\"'][^>]+?"+i+"/"+n+"/(.+?\\.css)[^>]+?>","g");c.is_empty(n)||(n!=ctcAjax.parnt?e.get(r,function(c){for(;(t=s.exec(c))&&"style.css"!=t[1];)t[1].match(/bootstrap/)||e(".ctc_checkbox").each(function(c,n){e(this).val()==t[1]&&e(this).prop("checked",!0)});c=null}):e(ctcAjax.addl_css).each(function(t,c){e("#ctc_stylesheet_files .ctc_checkbox").each(function(t,n){e(this).val()==c&&e(this).prop("checked",!0)})}))},query_css:function(t,c,n){var i=this,a={ctc_query_obj:t,ctc_query_key:c},r="#ctc_status_"+t+("val_qry"==t?"_"+c:"");"object"==typeof n&&e.each(n,function(e,t){a["ctc_query_"+e]=t}),e(".query-icon,.ctc-status-icon").remove(),e(r+" .ctc-status-icon").remove(),e(r).append('<span class="ctc-status-icon spinner query-icon"></span>'),e(".spinner").show(),a.action=i.is_empty(e("#ctc_action").val())||"plugin"!=e("#ctc_action").val()?"ctc_query":"ctc_plgqry",a._wpnonce=e("#_wpnonce").val(),i.ajax_post(t,a)},save:function(t){var c,n,i,a,r,s=this,l=(ctcAjax.ajaxurl,{}),_=e(t).attr("id");e(t).prop("disabled",!0),e(".ctc-query-icon,.ctc-status-icon").remove(),e(t).parent(".ctc-textarea-button-cell, .ctc-button-cell").append('<span class="ctc-status-icon spinner save-icon"></span>'),_.match(/ctc_configtype/)?(e(t).parents(".ctc-input-row").first().append('<span class="ctc-status-icon spinner save-icon"></span>'),l.ctc_configtype=e(t).val()):(c=e("#ctc_new_selectors"))&&"ctc_save_new_selectors"==e(t).attr("id")?(l.ctc_new_selectors=c.val(),(n=e("#ctc_sel_ovrd_query_selected"))&&(l.ctc_sel_ovrd_query=n.text()),s.reload_menus=!0):(i=e("#ctc_child_imports"))&&"ctc_save_imports"==_?l.ctc_child_imports=i.val():"ctc_is_debug"==_?l.ctc_is_debug=e("#ctc_is_debug").is(":checked")?1:0:l=s.coalesce_inputs(t),e(".save-icon").show(),e("#ctc_sel_ovrd_selector_selected").find("#ctc_rewrite_selector").each(function(){a=e("#ctc_rewrite_selector").val(),r=e("#ctc_rewrite_selector_orig").val(),s.is_empty(a)||!a.toString().match(/\w/)?a=r:(l.ctc_rewrite_selector=a,s.reload_menus=!0),e(".ctc-rewrite-toggle").text(s.getxt("rename")),e("#ctc_sel_ovrd_selector_selected").html(a)}),l.action=s.is_empty(e("#ctc_action").val())||"plugin"!=e("#ctc_action").val()?"ctc_update":"ctc_plugin",l._wpnonce=e("#_wpnonce").val(),s.ajax_post("qsid",l)},ajax_post:function(t,c,n){var i=this,a=ctcAjax.ajaxurl;e.ajax({url:a,data:c,dataType:i.is_empty(n)?"json":n,type:"POST"}).done(function(e){i.handle_success(t,e)}).fail(function(){i.handle_failure(t)})},handle_failure:function(t){var c=this;e(".query-icon, .save-icon").removeClass("spinner").addClass("failure"),e("input[type=submit], input[type=button], input[type=checkbox],.ctc-delete-input").prop("disabled",!1),e(".ajax-pending").removeClass("ajax-pending"),"preview"==t&&e("#view_parnt_options_panel,#view_child_options_panel").text(c.getxt("css_fail"))},handle_success:function(t,c){var n=this;e(".query-icon, .save-icon").removeClass("spinner"),e(".ajax-pending").removeClass("ajax-pending"),n.is_empty(c)?n.handle_failure(t):(e("#ctc_new_selectors").val(""),e(".query-icon, .save-icon").addClass("success"),e("input[type=submit], input[type=button], input[type=checkbox],.ctc-delete-input").prop("disabled",!1),e(c).each(function(){"function"==typeof n.update[this.obj]&&n.update[this.obj].call(n,this)}))},jquery_exception:function(e,t){var c=this,n=c.is_empty(e.lineNumber)?"":" line: "+e.lineNumber,i=c.is_empty(e.fileName)?"":" "+e.fileName.split(/\?/)[0];c.jquery_err.push("<code><small>"+t+": "+e.message+i+n+"</small></code>")},jquery_notice:function(t){var c=this,n=[],i=[];e("input[type=submit], input[type=button]").prop("disabled",!0),e("script").each(function(t,i){var a=e(this).prop("src");c.is_empty(a)||!a.match(/jquery(\.min|\.js|\-?ui)/i)||a.match(/load\-scripts.php/)||n.push("<code><small>"+a.split(/\?/)[0]+"</small></code>")}),i.push("<strong>"+c.getxt("js")+"</strong> "+c.getxt("contact")),i.push(c.jquery_err.join("<br/>")),n.length&&i.push(c.getxt("jquery")+"<br/>"+n.join("<br/>")),i.push(c.getxt("plugin")),c.set_notice({error:i})},update:{qsid:function(t){var c,n,i,a,r=this;r.current_qsid=t.key,r.current_qsdata=t.data,e("#ctc_sel_ovrd_qsid").val(r.current_qsid),r.is_empty(r.current_qsdata.seq)?e("#ctc_child_load_order_container").empty():(c="ctc_ovrd_child_seq_"+r.current_qsid,i=parseInt(r.current_qsdata.seq),n='<input type="text" id="'+c+'" name="'+c+'" class="ctc-child-value" value="'+i+'" />',e("#ctc_child_load_order_container").html(n)),r.is_empty(r.current_qsdata.value)?(a=!0,e("#ctc_sel_ovrd_rule_inputs").empty()):(a=!1,n="",e.each(r.current_qsdata.value,function(e,t){n+=r.input_row(r.current_qsid,e,"ovrd",r.current_qsdata)}),e("#ctc_sel_ovrd_rule_inputs").html(n).find(".color-picker").each(function(){r.setup_spectrum(this)}),r.coalesce_inputs("#ctc_child_all_0_swatch")),r.jquery_err.length?r.jquery_notice("update.qsid"):(r.reload_menus&&(r.load_queries(),r.set_query(r.current_qsdata.query),r.load_rules()),e("#ctc_sel_ovrd_selector_selected").text(r.current_qsdata.selector),e(".ctc-rewrite-toggle").text(r.getxt("rename")),e(".ctc-rewrite-toggle").show(),a?e("#ctc_sel_ovrd_rule_header,#ctc_sel_ovrd_new_rule,#ctc_sel_ovrd_rule_inputs_container,#ctc_sel_ovrd_rule_inputs").hide():e("#ctc_sel_ovrd_rule_header,#ctc_sel_ovrd_new_rule,#ctc_sel_ovrd_rule_inputs_container,#ctc_sel_ovrd_rule_inputs").show())},rule_val:function(t){var c=this,n=e("#ctc_rule_menu_selected").text(),i='<div class="ctc-input-row clearfix" id="ctc_rule_row_'+n+'">\n';c.is_empty(t.data)||(e.each(t.data,function(e,t){var a=c.decode_value(n,t);i+='<div class="ctc-parent-row clearfix" id="ctc_rule_row_'+n+"_"+e+'">\n<div class="ctc-input-cell ctc-parent-value" id="ctc_'+e+"_parent_"+n+"_"+e+'">'+a.orig+'</div>\n<div class="ctc-input-cell">\n<div class="ctc-swatch ctc-specific" id="ctc_'+e+"_parent_"+n+"_"+e+'_swatch">'+c.getxt("swatch")+'</div></div>\n<div class="ctc-input-cell"><a href="#" class="ctc-selector-handle" id="ctc_selector_'+n+"_"+e+'">'+c.getxt("selector")+'</a></div>\n<div id="ctc_selector_'+n+"_"+e+'_container" class="ctc-selector-container">\n<a href="#" id="ctc_selector_'+n+"_"+e+'_close" class="ctc-selector-handle ctc-exit" title="'+c.getxt("close")+'"></a><div id="ctc_selector_'+n+"_"+e+'_inner_container" class="ctc-selector-inner-container clearfix">\n<div id="ctc_status_val_qry_'+e+'"></div>\n<div id="ctc_selector_'+n+"_"+e+'_rows"></div>\n</div></div></div>\n'}),i+="</div>\n"),e("#ctc_rule_value_inputs").html(i).find(".ctc-swatch").each(function(){c.coalesce_inputs(this)})},val_qry:function(t){var c=this,n="";c.is_empty(t.data)||e.each(t.data,function(i,a){page_rule=i,e.each(a,function(a,r){n+='<h4 class="ctc-query-heading">'+a+"</h4>\n",c.is_empty(r)||e.each(r,function(e,a){n+=c.input_row(e,i,t.key,a)})})}),selector="#ctc_selector_"+rule+"_"+t.key+"_rows",e(selector).html(n).find(".color-picker").each(function(){c.setup_spectrum(this)}),e(selector).find(".ctc-swatch").each(function(){c.coalesce_inputs(this)}),c.jquery_err.length&&c.jquery_notice("val_qry")},queries:function(t){e("#ctc_sel_ovrd_query").data("menu",t.data)},selectors:function(t){e("#ctc_sel_ovrd_selector").data("menu",t.data)},rules:function(t){e("#ctc_rule_menu").data("menu",t.data)},debug:function(t){e("#ctc_debug_container").html(t.data)},preview:function(t){e("#view_"+t.key+"_options_panel").text(t.data)}},init:function(){var t=this;if(t.autogen_slugs(),t.set_existing(),!e("#ctc_theme_parnt").is("input")){try{e.widget("ctc.themeMenu",e.ui.selectmenu,{_renderItem:function(t,c){var n=e("<li>"),i=c.value.replace(/[^\w\-]/,"");return e("#ctc_theme_option_"+i).detach().appendTo(n),n.appendTo(t)}})}catch(c){t.jquery_exception(c,"Theme Menu")}try{e("#ctc_theme_parnt").themeMenu({select:function(e,c){t.set_parent_menu(c.item)}})}catch(c){"function"==typeof themeMenu?e("#ctc_theme_parnt").themeMenu("destroy"):e("#ctc_theme_parnt-button").remove(),t.jquery_exception(c,"Parent Theme Menu")}if(t.is_empty(ctcAjax.themes.child))e("#ctc_child_name").length&&(e("#ctc_child_name").val(t.testname),e("#ctc_child_template").val(t.testslug));else try{e("#ctc_theme_child").themeMenu({select:function(e,c){t.set_child_menu(c.item)}})}catch(c){"function"==typeof themeMenu?e("#ctc_theme_child").themeMenu("destroy"):e("#ctc_theme_child-button").remove(),t.jquery_exception(c,"Child Theme Menu")}}t.is_empty(t.jquery_err)?(e("#ctc_main").on("click",".ctc-selector-handle",function(c){if(c.preventDefault(),e(this).hasClass("ajax-pending"))return!1;e(this).addClass("ajax-pending");var n=e(this).attr("id").toString().replace("_close",""),i=n.toString().match(/_([^_]+)_(\d+)$/);e("#"+n+"_container").is(":hidden")&&(t.is_empty(i[1])||t.is_empty(i[2])||(rule=i[1],valid=i[2],t.query_css("val_qry",valid,{rule:rule}))),e("#"+n+"_container").fadeToggle("fast"),e(".ctc-selector-container").not("#"+n+"_container").fadeOut("fast")}),e("#ctc_main").on("click",".ctc-save-input[type=button], .ctc-delete-input",function(c){return c.preventDefault(),e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),t.save(this),!1)}),e("#ctc_main").on("keydown",".ctc-selector-container .ctc-child-value[type=text]",function(c){if(13===c.which){var n=e(this).parents(".ctc-selector-row").find(".ctc-save-input[type=button]").first();if(n.length)return c.preventDefault(),n.hasClass("ajax-pending")?!1:(n.addClass("ajax-pending"),t.save(n),!1)}}),e("#ctc_main").on("click",".ctc-selector-edit",function(c){return c.preventDefault(),e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),void t.set_qsid(this))}),e("#ctc_main").on("click",".ctc-rewrite-toggle",function(e){e.preventDefault(),t.selector_input_toggle(this)}),e("#ctc_main").on("click","#ctc_copy_selector",function(c){var n=e("#ctc_sel_ovrd_selector_selected").text().trim();t.is_empty(n)||e("#ctc_new_selectors").val(e("#ctc_new_selectors").val()+"\n"+n+" {\n\n}")}),e("#ctc_configtype").on("change",function(c){var n=e(this).val();if(t.is_empty(n)||"theme"==n){e(".ctc-theme-only, .ctc-themeonly-container").removeClass("ctc-disabled"),e(".ctc-theme-only, .ctc-themeonly-container input").prop("disabled",!1);try{e("#ctc_theme_parnt, #ctc_theme_child").themeMenu("enable")}catch(i){t.jquery_exception(i,"Theme Menu")}}else{e(".ctc-theme-only, .ctc-themeonly-container").addClass("ctc-disabled"),e(".ctc-theme-only, .ctc-themeonly-container input").prop("disabled",!0);try{e("#ctc_theme_parnt, #ctc_theme_child").themeMenu("disable")}catch(i){t.jquery_exception(i,"Theme Menu")}}}),e(".nav-tab").on("click",function(c){c.preventDefault(),e(".ctc-query-icon,.ctc-status-icon").remove();var n="#"+e(this).attr("id");t.focus_panel(n)}),e(".ctc-section-toggle").on("click",function(t){t.preventDefault(),e(this).parents(".ctc-input-row, .update-nag").first().find(".ctc-section-toggle").each(function(){e(this).toggleClass("open")});var c=e(this).attr("id").replace(/\d$/,"")+"_content";return e("#"+c).stop().slideToggle("fast"),!1}),e("#view_child_options, #view_parnt_options").on("click",function(c){return e(this).hasClass("ajax-pending")?!1:(e(this).addClass("ajax-pending"),void t.css_preview(e(this).attr("id")))}),e("#ctc_load_form").on("submit",function(){return t.validate()}),e("#ctc_query_selector_form").on("submit",function(c){return c.preventDefault(),$this=e("#ctc_save_query_selector"),$this.hasClass("ajax-pending")?!1:($this.addClass("ajax-pending"),t.save($this),!1)}),e("#ctc_rule_value_form").on("submit",function(e){return e.preventDefault(),!1}),e("#ctc_theme_child, #ctc_theme_child-button, #ctc_child_type_existing").on("focus click",function(){e("#ctc_child_type_existing").prop("checked",!0),e("#ctc_child_type_new").prop("checked",!1),e("#ctc_child_template").val(""),t.set_existing()}),e("#ctc_duplicate_theme").on("click",function(){e("#ctc_duplicate_theme").is(":checked")?(e("#ctc_child_name").val(t.testname),e("#ctc_duplicate_theme_slug").val(t.testslug)):t.set_existing()}),e("#ctc_child_type_new, #ctc_child_template").on("focus click",function(){e("#ctc_child_type_existing").prop("checked",!1),e("#ctc_duplicate_theme").prop("checked",!1),e("#ctc_duplicate_theme_slug").val(""),e("#ctc_child_type_new").prop("checked",!0),e("#input_row_duplicate_theme").hide(),e("#ctc_child_name").val(t.testname),e("#ctc_child_template").val(t.testslug)}),e("#ctc_is_debug").on("change",function(e){t.save(this)}),e(".ctc-live-preview").on("click",function(t){return t.stopImmediatePropagation(),t.preventDefault(),document.location=e(this).prop("href"),!1}),t.setup_menus(),t.set_addl_css(),e("input[type=submit], input[type=button]").prop("disabled",!1),t.scrolltop(),setTimeout(t.fade_update_notice,2e4)):t.jquery_notice("init")},testslug:"",testname:"",reload_menus:!1,current_query:"base",current_qsid:null,current_qsdata:{},jquery_err:[],color_regx:"\\s+(\\#[a-f0-9]{3,6}|rgba?\\([\\d., ]+?\\)|hsla?\\([\\d%., ]+?\\)|[a-z]+)",border_regx:"(\\w+)(\\s+(\\w+))?",grad_regx:"(\\w+)"},e.chldthmcfg.init()}(jQuery);
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.7.5\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/child-theme-configurator\n"
7
- "POT-Creation-Date: 2015-06-21 07:39:17+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.7.5) #-#-#-#-#
16
  #. Plugin Name of the plugin/theme
17
  #: child-theme-configurator.php:78 child-theme-configurator.php:88
18
  #: includes/forms/main.php:23
@@ -80,142 +80,142 @@ msgstr ""
80
  msgid "before activating."
81
  msgstr ""
82
 
83
- #: includes/class-ctc.php:145
84
  msgid "URL/None"
85
  msgstr ""
86
 
87
- #: includes/class-ctc.php:146
88
  msgid "Origin"
89
  msgstr ""
90
 
91
- #: includes/class-ctc.php:147
92
  msgid "Color 1"
93
  msgstr ""
94
 
95
- #: includes/class-ctc.php:148
96
  msgid "Color 2"
97
  msgstr ""
98
 
99
- #: includes/class-ctc.php:149
100
  msgid "Width/None"
101
  msgstr ""
102
 
103
- #: includes/class-ctc.php:150
104
  msgid "Style"
105
  msgstr ""
106
 
107
- #: includes/class-ctc.php:151
108
  msgid "Color"
109
  msgstr ""
110
 
111
- #: includes/class-ctc.php:153
112
  msgid "Are you sure? This will replace your current settings."
113
  msgstr ""
114
 
115
- #: includes/class-ctc.php:154
116
  msgid "<span style=\"font-size:10px\">!</span>"
117
  msgstr ""
118
 
119
- #: includes/class-ctc.php:155 includes/forms/rule-value.php:32
120
  msgid "Selectors"
121
  msgstr ""
122
 
123
- #: includes/class-ctc.php:156
124
  msgid "Close"
125
  msgstr ""
126
 
127
- #: includes/class-ctc.php:157
128
  msgid "Edit Selector"
129
  msgstr ""
130
 
131
- #: includes/class-ctc.php:158
132
  msgid "Cancel"
133
  msgstr ""
134
 
135
- #: includes/class-ctc.php:159
136
  msgid "Rename"
137
  msgstr ""
138
 
139
- #: includes/class-ctc.php:160
140
  msgid "The stylesheet cannot be displayed."
141
  msgstr ""
142
 
143
- #: includes/class-ctc.php:161
144
  msgid "(Child Only)"
145
  msgstr ""
146
 
147
- #: includes/class-ctc.php:162
148
  msgid "Please enter a valid Child Theme."
149
  msgstr ""
150
 
151
- #: includes/class-ctc.php:163
152
  msgid "Please enter a valid Child Theme name."
153
  msgstr ""
154
 
155
- #: includes/class-ctc.php:164
156
  msgid "<strong>%s</strong> exists. Please enter a different Child Theme"
157
  msgstr ""
158
 
159
- #: includes/class-ctc.php:165
160
  msgid "The page could not be loaded correctly."
161
  msgstr ""
162
 
163
- #: includes/class-ctc.php:167
164
  msgid ""
165
  "Conflicting or out-of-date jQuery libraries were loaded by another plugin:"
166
  msgstr ""
167
 
168
- #: includes/class-ctc.php:169
169
  msgid "Deactivating or replacing plugins may resolve this issue."
170
  msgstr ""
171
 
172
- #: includes/class-ctc.php:170
173
  msgid "%sWhy am I seeing this?%s"
174
  msgstr ""
175
 
176
- #: includes/class-ctc.php:393
177
  msgid "Zip file creation failed."
178
  msgstr ""
179
 
180
- #: includes/class-ctc.php:429
181
  msgid "The Functions file is required and cannot be deleted."
182
  msgstr ""
183
 
184
- #: includes/class-ctc.php:511
185
  msgid "You do not have permission to configure child themes."
186
  msgstr ""
187
 
188
- #: includes/class-ctc.php:558
189
  msgid "%s does not exist. Please select a valid Parent Theme."
190
  msgstr ""
191
 
192
- #: includes/class-ctc.php:562
193
  msgid "Please select a valid Parent Theme."
194
  msgstr ""
195
 
196
- #: includes/class-ctc.php:565
197
  msgid "Please enter a valid Child Theme directory."
198
  msgstr ""
199
 
200
- #: includes/class-ctc.php:573 includes/class-ctc.php:588
201
  msgid "Please enter a valid Child Theme template name."
202
  msgstr ""
203
 
204
- #: includes/class-ctc.php:578 includes/class-ctc.php:592
205
  msgid ""
206
  "<strong>%s</strong> exists. Please enter a different Child Theme template "
207
  "name."
208
  msgstr ""
209
 
210
- #: includes/class-ctc.php:605
211
  msgid "Your theme directories are not writable."
212
  msgstr ""
213
 
214
- #: includes/class-ctc.php:683
215
  msgid "Your stylesheet is not writable."
216
  msgstr ""
217
 
218
- #: includes/class-ctc.php:953
219
  msgid ""
220
  "A closing PHP tag was detected in Child theme functions file so \"Parent "
221
  "Stylesheet Handling\" option was not configured. Closing PHP at the end of "
@@ -224,47 +224,47 @@ msgid ""
224
  "click \"Generate/Rebuild Child Theme Files\" again."
225
  msgstr ""
226
 
227
- #: includes/class-ctc.php:1053
228
  msgid "Could not delete file."
229
  msgstr ""
230
 
231
- #: includes/class-ctc.php:1129
232
  msgid "Could not set write permissions."
233
  msgstr ""
234
 
235
- #: includes/class-ctc.php:1230
236
  msgid "There were errors while resetting permissions."
237
  msgstr ""
238
 
239
- #: includes/class-ctc.php:1272
240
  msgid "Could not upload file."
241
  msgstr ""
242
 
243
- #: includes/class-ctc.php:1355
244
  msgid ""
245
  "The child theme is in read-only mode and Child Theme Configurator cannot "
246
  "apply changes. Click to see options"
247
  msgstr ""
248
 
249
- #: includes/class-ctc.php:1358
250
  msgid ""
251
  "<li>Temporarily set write permissions by clicking the button below. When you "
252
  "are finished editing, revert to read-only by clicking \"Make read-only\" "
253
  "under the \"Files\" tab.</li>"
254
  msgstr ""
255
 
256
- #: includes/class-ctc.php:1361
257
  msgid "Make files writable"
258
  msgstr ""
259
 
260
- #: includes/class-ctc.php:1362
261
  msgid ""
262
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/Editing_wp-"
263
  "config.php#WordPress_Upgrade_Constants\" title=\"Editin wp-config.php\">Add "
264
  "your FTP/SSH credentials to the WordPress config file</a>.</li>"
265
  msgstr ""
266
 
267
- #: includes/class-ctc.php:1364
268
  msgid ""
269
  "<li><a target=\"_blank\" href=\"http://technet.microsoft.com/en-us/library/"
270
  "cc771170\" title=\"Setting Application Pool Identity\">Assign WordPress to "
@@ -272,18 +272,18 @@ msgid ""
272
  "li>"
273
  msgstr ""
274
 
275
- #: includes/class-ctc.php:1365
276
  msgid ""
277
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/"
278
  "Changing_File_Permissions\" title=\"Changing File Permissions\">Set write "
279
  "permissions on the server manually</a> (not recommended).</li>"
280
  msgstr ""
281
 
282
- #: includes/class-ctc.php:1367
283
  msgid "<li>Run PHP under Apache with suEXEC (contact your web host).</li>"
284
  msgstr ""
285
 
286
- #: includes/class-ctc.php:1378
287
  msgid ""
288
  "This Child Theme is not owned by your website account. It may have been "
289
  "created by a prior version of this plugin or by another program. Moving "
@@ -292,25 +292,25 @@ msgid ""
292
  "below."
293
  msgstr ""
294
 
295
- #: includes/class-ctc.php:1381
296
  msgid "Correct Child Theme Permissions"
297
  msgstr ""
298
 
299
- #: includes/class-ctc.php:1388
300
  msgid ""
301
  "Child Theme Configurator needs to update its interal data. Please set your "
302
  "preferences below and click \"Generate Child Theme Files\" to update your "
303
  "configuration."
304
  msgstr ""
305
 
306
- #: includes/class-ctc.php:1394
307
  msgid ""
308
  "<strong>However, some styles could not be parsed due to memory limits.</"
309
  "strong> Try deselecting \"Additional Stylesheets\" below and click "
310
  "\"Generate/Rebuild Child Theme Files\". %sWhy am I seeing this?%s"
311
  msgstr ""
312
 
313
- #: includes/class-ctc.php:1403
314
  msgid ""
315
  "Child Theme Configurator did not detect any configuration data because a "
316
  "previously configured Child Theme has been removed. Please set your "
@@ -329,23 +329,23 @@ msgid ""
329
  "only the additional stylesheets you wish to customize."
330
  msgstr ""
331
 
332
- #: includes/forms/addl_panels.php:9 includes/forms/addl_panels.php:38
333
  msgid "Use coupon code"
334
  msgstr ""
335
 
336
- #: includes/forms/addl_panels.php:9 includes/forms/addl_panels.php:38
337
  msgid "wordpress-org"
338
  msgstr ""
339
 
340
- #: includes/forms/addl_panels.php:9 includes/forms/addl_panels.php:38
341
  msgid "and get <strong>20% off entire order</strong>."
342
  msgstr ""
343
 
344
- #: includes/forms/addl_panels.php:10 includes/forms/addl_panels.php:39
345
  msgid "Order Now"
346
  msgstr ""
347
 
348
- #: includes/forms/addl_panels.php:10 includes/forms/addl_panels.php:39
349
  msgid "*Prices and offers subject to change."
350
  msgstr ""
351
 
@@ -376,7 +376,7 @@ msgid ""
376
  "experience."
377
  msgstr ""
378
 
379
- #: includes/forms/addl_panels.php:19 includes/help/help_en_US.php:217
380
  msgid "Learn more about CTC Pro"
381
  msgstr ""
382
 
@@ -420,50 +420,60 @@ msgid "Test your child theme with a single click."
420
  msgstr ""
421
 
422
  #: includes/forms/addl_panels.php:28
423
- msgid "Find related styles"
424
  msgstr ""
425
 
426
  #: includes/forms/addl_panels.php:28
427
  msgid ""
 
 
 
 
 
 
 
 
 
 
428
  "Use the \"All Styles\" panel to edit groups of selectors from a single "
429
  "combined list."
430
  msgstr ""
431
 
432
- #: includes/forms/addl_panels.php:29
433
  msgid "Find styles by Nav Menu"
434
  msgstr ""
435
 
436
- #: includes/forms/addl_panels.php:29
437
  msgid "Tweak menus quickly and easily."
438
  msgstr ""
439
 
440
- #: includes/forms/addl_panels.php:30
441
  msgid "Most recent edits"
442
  msgstr ""
443
 
444
- #: includes/forms/addl_panels.php:30
445
  msgid "Return to recently edited selectors from a toggleable sidebar."
446
  msgstr ""
447
 
448
- #: includes/forms/addl_panels.php:31
449
  msgid "Genesis Framework Support"
450
  msgstr ""
451
 
452
- #: includes/forms/addl_panels.php:32
453
  msgid ""
454
  "Automatically detects and configures Genesis Child Themes with more "
455
  "frameworks on the way."
456
  msgstr ""
457
 
458
- #: includes/forms/addl_panels.php:33
459
  msgid "Top-rated Online Support"
460
  msgstr ""
461
 
462
- #: includes/forms/addl_panels.php:34
463
  msgid "Online Documentation"
464
  msgstr ""
465
 
466
- #: includes/forms/addl_panels.php:35
467
  msgid "Tutorial Videos"
468
  msgstr ""
469
 
@@ -668,7 +678,7 @@ msgid "Duplicate Theme Slug"
668
  msgstr ""
669
 
670
  #: includes/forms/parent-child.php:118 includes/forms/parent-child.php:212
671
- #: includes/forms/parent-child.php:226
672
  msgid "NOTE:"
673
  msgstr ""
674
 
@@ -777,11 +787,11 @@ msgstr ""
777
  msgid "This will overwrite child theme options you may have already set."
778
  msgstr ""
779
 
780
- #: includes/forms/parent-child.php:219
781
  msgid "Backup current stylesheet"
782
  msgstr ""
783
 
784
- #: includes/forms/parent-child.php:228
785
  msgid ""
786
  "This creates a copy of the current stylesheet before applying changes. You "
787
  "can remove old backup files using the Files tab."
@@ -845,47 +855,47 @@ msgstr ""
845
  msgid "Save Child Values"
846
  msgstr ""
847
 
848
- #: includes/forms/query-selector.php:47
849
  msgid "Delete Child Values"
850
  msgstr ""
851
 
852
- #: includes/forms/query-selector.php:54 includes/forms/rule-value.php:13
853
  msgid "Property"
854
  msgstr ""
855
 
856
- #: includes/forms/query-selector.php:57
857
  msgid "Parent Value"
858
  msgstr ""
859
 
860
- #: includes/forms/query-selector.php:60
861
  msgid "Child Value"
862
  msgstr ""
863
 
864
- #: includes/forms/query-selector.php:66
865
  msgid "New Property"
866
  msgstr ""
867
 
868
- #: includes/forms/query-selector.php:76
869
  msgid "Order"
870
  msgstr ""
871
 
872
- #: includes/forms/query-selector.php:85
873
  msgid "Copy Selector"
874
  msgstr ""
875
 
876
- #: includes/forms/query-selector.php:87 includes/forms/webfonts.php:15
877
  msgid "Save"
878
  msgstr ""
879
 
880
- #: includes/forms/query-selector.php:90
881
  msgid "Raw CSS"
882
  msgstr ""
883
 
884
- #: includes/forms/query-selector.php:92
885
  msgid "Use to enter shorthand CSS or new @media queries and selectors."
886
  msgstr ""
887
 
888
- #: includes/forms/query-selector.php:92
889
  msgid ""
890
  "Values entered here are merged into existing child styles or added to the "
891
  "child stylesheet if they do not exist in the parent."
@@ -977,8 +987,8 @@ msgstr ""
977
 
978
  #. Description of the plugin/theme
979
  msgid ""
980
- "Create a child theme that follows WP best practice to enqueue stylesheets. "
981
- "Easy to use CSS editor lets you find, preview and customize any style."
982
  msgstr ""
983
 
984
  #. Author of the plugin/theme
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.7.8\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/child-theme-configurator\n"
7
+ "POT-Creation-Date: 2015-09-24 00:16:38+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.7.8) #-#-#-#-#
16
  #. Plugin Name of the plugin/theme
17
  #: child-theme-configurator.php:78 child-theme-configurator.php:88
18
  #: includes/forms/main.php:23
80
  msgid "before activating."
81
  msgstr ""
82
 
83
+ #: includes/class-ctc.php:144
84
  msgid "URL/None"
85
  msgstr ""
86
 
87
+ #: includes/class-ctc.php:145
88
  msgid "Origin"
89
  msgstr ""
90
 
91
+ #: includes/class-ctc.php:146
92
  msgid "Color 1"
93
  msgstr ""
94
 
95
+ #: includes/class-ctc.php:147
96
  msgid "Color 2"
97
  msgstr ""
98
 
99
+ #: includes/class-ctc.php:148
100
  msgid "Width/None"
101
  msgstr ""
102
 
103
+ #: includes/class-ctc.php:149
104
  msgid "Style"
105
  msgstr ""
106
 
107
+ #: includes/class-ctc.php:150
108
  msgid "Color"
109
  msgstr ""
110
 
111
+ #: includes/class-ctc.php:152
112
  msgid "Are you sure? This will replace your current settings."
113
  msgstr ""
114
 
115
+ #: includes/class-ctc.php:153
116
  msgid "<span style=\"font-size:10px\">!</span>"
117
  msgstr ""
118
 
119
+ #: includes/class-ctc.php:154 includes/forms/rule-value.php:32
120
  msgid "Selectors"
121
  msgstr ""
122
 
123
+ #: includes/class-ctc.php:155
124
  msgid "Close"
125
  msgstr ""
126
 
127
+ #: includes/class-ctc.php:156
128
  msgid "Edit Selector"
129
  msgstr ""
130
 
131
+ #: includes/class-ctc.php:157
132
  msgid "Cancel"
133
  msgstr ""
134
 
135
+ #: includes/class-ctc.php:158
136
  msgid "Rename"
137
  msgstr ""
138
 
139
+ #: includes/class-ctc.php:159
140
  msgid "The stylesheet cannot be displayed."
141
  msgstr ""
142
 
143
+ #: includes/class-ctc.php:160
144
  msgid "(Child Only)"
145
  msgstr ""
146
 
147
+ #: includes/class-ctc.php:161
148
  msgid "Please enter a valid Child Theme."
149
  msgstr ""
150
 
151
+ #: includes/class-ctc.php:162
152
  msgid "Please enter a valid Child Theme name."
153
  msgstr ""
154
 
155
+ #: includes/class-ctc.php:163
156
  msgid "<strong>%s</strong> exists. Please enter a different Child Theme"
157
  msgstr ""
158
 
159
+ #: includes/class-ctc.php:164
160
  msgid "The page could not be loaded correctly."
161
  msgstr ""
162
 
163
+ #: includes/class-ctc.php:166
164
  msgid ""
165
  "Conflicting or out-of-date jQuery libraries were loaded by another plugin:"
166
  msgstr ""
167
 
168
+ #: includes/class-ctc.php:168
169
  msgid "Deactivating or replacing plugins may resolve this issue."
170
  msgstr ""
171
 
172
+ #: includes/class-ctc.php:169
173
  msgid "%sWhy am I seeing this?%s"
174
  msgstr ""
175
 
176
+ #: includes/class-ctc.php:392
177
  msgid "Zip file creation failed."
178
  msgstr ""
179
 
180
+ #: includes/class-ctc.php:428
181
  msgid "The Functions file is required and cannot be deleted."
182
  msgstr ""
183
 
184
+ #: includes/class-ctc.php:510
185
  msgid "You do not have permission to configure child themes."
186
  msgstr ""
187
 
188
+ #: includes/class-ctc.php:557
189
  msgid "%s does not exist. Please select a valid Parent Theme."
190
  msgstr ""
191
 
192
+ #: includes/class-ctc.php:561
193
  msgid "Please select a valid Parent Theme."
194
  msgstr ""
195
 
196
+ #: includes/class-ctc.php:564
197
  msgid "Please enter a valid Child Theme directory."
198
  msgstr ""
199
 
200
+ #: includes/class-ctc.php:572 includes/class-ctc.php:587
201
  msgid "Please enter a valid Child Theme template name."
202
  msgstr ""
203
 
204
+ #: includes/class-ctc.php:577 includes/class-ctc.php:591
205
  msgid ""
206
  "<strong>%s</strong> exists. Please enter a different Child Theme template "
207
  "name."
208
  msgstr ""
209
 
210
+ #: includes/class-ctc.php:604
211
  msgid "Your theme directories are not writable."
212
  msgstr ""
213
 
214
+ #: includes/class-ctc.php:682
215
  msgid "Your stylesheet is not writable."
216
  msgstr ""
217
 
218
+ #: includes/class-ctc.php:959
219
  msgid ""
220
  "A closing PHP tag was detected in Child theme functions file so \"Parent "
221
  "Stylesheet Handling\" option was not configured. Closing PHP at the end of "
224
  "click \"Generate/Rebuild Child Theme Files\" again."
225
  msgstr ""
226
 
227
+ #: includes/class-ctc.php:1060
228
  msgid "Could not delete file."
229
  msgstr ""
230
 
231
+ #: includes/class-ctc.php:1139
232
  msgid "Could not set write permissions."
233
  msgstr ""
234
 
235
+ #: includes/class-ctc.php:1240
236
  msgid "There were errors while resetting permissions."
237
  msgstr ""
238
 
239
+ #: includes/class-ctc.php:1282
240
  msgid "Could not upload file."
241
  msgstr ""
242
 
243
+ #: includes/class-ctc.php:1365
244
  msgid ""
245
  "The child theme is in read-only mode and Child Theme Configurator cannot "
246
  "apply changes. Click to see options"
247
  msgstr ""
248
 
249
+ #: includes/class-ctc.php:1368
250
  msgid ""
251
  "<li>Temporarily set write permissions by clicking the button below. When you "
252
  "are finished editing, revert to read-only by clicking \"Make read-only\" "
253
  "under the \"Files\" tab.</li>"
254
  msgstr ""
255
 
256
+ #: includes/class-ctc.php:1371
257
  msgid "Make files writable"
258
  msgstr ""
259
 
260
+ #: includes/class-ctc.php:1372
261
  msgid ""
262
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/Editing_wp-"
263
  "config.php#WordPress_Upgrade_Constants\" title=\"Editin wp-config.php\">Add "
264
  "your FTP/SSH credentials to the WordPress config file</a>.</li>"
265
  msgstr ""
266
 
267
+ #: includes/class-ctc.php:1374
268
  msgid ""
269
  "<li><a target=\"_blank\" href=\"http://technet.microsoft.com/en-us/library/"
270
  "cc771170\" title=\"Setting Application Pool Identity\">Assign WordPress to "
272
  "li>"
273
  msgstr ""
274
 
275
+ #: includes/class-ctc.php:1375
276
  msgid ""
277
  "<li><a target=\"_blank\" href=\"http://codex.wordpress.org/"
278
  "Changing_File_Permissions\" title=\"Changing File Permissions\">Set write "
279
  "permissions on the server manually</a> (not recommended).</li>"
280
  msgstr ""
281
 
282
+ #: includes/class-ctc.php:1377
283
  msgid "<li>Run PHP under Apache with suEXEC (contact your web host).</li>"
284
  msgstr ""
285
 
286
+ #: includes/class-ctc.php:1388
287
  msgid ""
288
  "This Child Theme is not owned by your website account. It may have been "
289
  "created by a prior version of this plugin or by another program. Moving "
292
  "below."
293
  msgstr ""
294
 
295
+ #: includes/class-ctc.php:1391
296
  msgid "Correct Child Theme Permissions"
297
  msgstr ""
298
 
299
+ #: includes/class-ctc.php:1398
300
  msgid ""
301
  "Child Theme Configurator needs to update its interal data. Please set your "
302
  "preferences below and click \"Generate Child Theme Files\" to update your "
303
  "configuration."
304
  msgstr ""
305
 
306
+ #: includes/class-ctc.php:1404
307
  msgid ""
308
  "<strong>However, some styles could not be parsed due to memory limits.</"
309
  "strong> Try deselecting \"Additional Stylesheets\" below and click "
310
  "\"Generate/Rebuild Child Theme Files\". %sWhy am I seeing this?%s"
311
  msgstr ""
312
 
313
+ #: includes/class-ctc.php:1413
314
  msgid ""
315
  "Child Theme Configurator did not detect any configuration data because a "
316
  "previously configured Child Theme has been removed. Please set your "
329
  "only the additional stylesheets you wish to customize."
330
  msgstr ""
331
 
332
+ #: includes/forms/addl_panels.php:9 includes/forms/addl_panels.php:39
333
  msgid "Use coupon code"
334
  msgstr ""
335
 
336
+ #: includes/forms/addl_panels.php:9 includes/forms/addl_panels.php:39
337
  msgid "wordpress-org"
338
  msgstr ""
339
 
340
+ #: includes/forms/addl_panels.php:9 includes/forms/addl_panels.php:39
341
  msgid "and get <strong>20% off entire order</strong>."
342
  msgstr ""
343
 
344
+ #: includes/forms/addl_panels.php:10 includes/forms/addl_panels.php:40
345
  msgid "Order Now"
346
  msgstr ""
347
 
348
+ #: includes/forms/addl_panels.php:10 includes/forms/addl_panels.php:40
349
  msgid "*Prices and offers subject to change."
350
  msgstr ""
351
 
376
  "experience."
377
  msgstr ""
378
 
379
+ #: includes/forms/addl_panels.php:19 includes/help/help_en_US.php:215
380
  msgid "Learn more about CTC Pro"
381
  msgstr ""
382
 
420
  msgstr ""
421
 
422
  #: includes/forms/addl_panels.php:28
423
+ msgid "Color Palettes"
424
  msgstr ""
425
 
426
  #: includes/forms/addl_panels.php:28
427
  msgid ""
428
+ "Keep the colors you select just a click away. No more searching for hex "
429
+ "codes and RGB values."
430
+ msgstr ""
431
+
432
+ #: includes/forms/addl_panels.php:29
433
+ msgid "Find related styles"
434
+ msgstr ""
435
+
436
+ #: includes/forms/addl_panels.php:29
437
+ msgid ""
438
  "Use the \"All Styles\" panel to edit groups of selectors from a single "
439
  "combined list."
440
  msgstr ""
441
 
442
+ #: includes/forms/addl_panels.php:30
443
  msgid "Find styles by Nav Menu"
444
  msgstr ""
445
 
446
+ #: includes/forms/addl_panels.php:30
447
  msgid "Tweak menus quickly and easily."
448
  msgstr ""
449
 
450
+ #: includes/forms/addl_panels.php:31
451
  msgid "Most recent edits"
452
  msgstr ""
453
 
454
+ #: includes/forms/addl_panels.php:31
455
  msgid "Return to recently edited selectors from a toggleable sidebar."
456
  msgstr ""
457
 
458
+ #: includes/forms/addl_panels.php:32
459
  msgid "Genesis Framework Support"
460
  msgstr ""
461
 
462
+ #: includes/forms/addl_panels.php:33
463
  msgid ""
464
  "Automatically detects and configures Genesis Child Themes with more "
465
  "frameworks on the way."
466
  msgstr ""
467
 
468
+ #: includes/forms/addl_panels.php:34
469
  msgid "Top-rated Online Support"
470
  msgstr ""
471
 
472
+ #: includes/forms/addl_panels.php:35
473
  msgid "Online Documentation"
474
  msgstr ""
475
 
476
+ #: includes/forms/addl_panels.php:36
477
  msgid "Tutorial Videos"
478
  msgstr ""
479
 
678
  msgstr ""
679
 
680
  #: includes/forms/parent-child.php:118 includes/forms/parent-child.php:212
681
+ #: includes/forms/parent-child.php:227
682
  msgid "NOTE:"
683
  msgstr ""
684
 
787
  msgid "This will overwrite child theme options you may have already set."
788
  msgstr ""
789
 
790
+ #: includes/forms/parent-child.php:220
791
  msgid "Backup current stylesheet"
792
  msgstr ""
793
 
794
+ #: includes/forms/parent-child.php:229
795
  msgid ""
796
  "This creates a copy of the current stylesheet before applying changes. You "
797
  "can remove old backup files using the Files tab."
855
  msgid "Save Child Values"
856
  msgstr ""
857
 
858
+ #: includes/forms/query-selector.php:46
859
  msgid "Delete Child Values"
860
  msgstr ""
861
 
862
+ #: includes/forms/query-selector.php:53 includes/forms/rule-value.php:13
863
  msgid "Property"
864
  msgstr ""
865
 
866
+ #: includes/forms/query-selector.php:56
867
  msgid "Parent Value"
868
  msgstr ""
869
 
870
+ #: includes/forms/query-selector.php:59
871
  msgid "Child Value"
872
  msgstr ""
873
 
874
+ #: includes/forms/query-selector.php:65
875
  msgid "New Property"
876
  msgstr ""
877
 
878
+ #: includes/forms/query-selector.php:75
879
  msgid "Order"
880
  msgstr ""
881
 
882
+ #: includes/forms/query-selector.php:84
883
  msgid "Copy Selector"
884
  msgstr ""
885
 
886
+ #: includes/forms/query-selector.php:86 includes/forms/webfonts.php:15
887
  msgid "Save"
888
  msgstr ""
889
 
890
+ #: includes/forms/query-selector.php:89
891
  msgid "Raw CSS"
892
  msgstr ""
893
 
894
+ #: includes/forms/query-selector.php:91
895
  msgid "Use to enter shorthand CSS or new @media queries and selectors."
896
  msgstr ""
897
 
898
+ #: includes/forms/query-selector.php:91
899
  msgid ""
900
  "Values entered here are merged into existing child styles or added to the "
901
  "child stylesheet if they do not exist in the parent."
987
 
988
  #. Description of the plugin/theme
989
  msgid ""
990
+ "Create child themes and customize styles, templates and functions. Enqueues "
991
+ "stylesheets and web fonts. Handles rgba, vendor-prefixes and more."
992
  msgstr ""
993
 
994
  #. Author of the plugin/theme
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: child theme, child themes, custom styles, customize styles, customize theme, CSS, responsive, css editor, child theme generator, child theme creator, style, stylesheet, customizer
5
  Requires at least: 3.9
6
  Tested up to: 4.4
7
- Stable tag: 1.7.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -276,6 +276,10 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
276
  7. Files tab
277
 
278
  == Changelog ==
 
 
 
 
279
  = 1.7.7 =
280
  * Fix: Margin and Padding shorthand generated incorrectly.
281
 
@@ -542,7 +546,7 @@ https://www.youtube.com/watch?v=iBiiAgsK4G4
542
  * Initial release.
543
 
544
  == Upgrade Notice ==
545
- 1.7.7 Fixed significant issue with shorthand generation.
546
 
547
  == Override Parent Styles ==
548
 
4
  Tags: child theme, child themes, custom styles, customize styles, customize theme, CSS, responsive, css editor, child theme generator, child theme creator, style, stylesheet, customizer
5
  Requires at least: 3.9
6
  Tested up to: 4.4
7
+ Stable tag: 1.7.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
276
  7. Files tab
277
 
278
  == Changelog ==
279
+ = 1.7.8 =
280
+ * Fix: disable autoload on configuration data options
281
+ * Fix: normalize media query and add to menu when added via raw css
282
+
283
  = 1.7.7 =
284
  * Fix: Margin and Padding shorthand generated incorrectly.
285
 
546
  * Initial release.
547
 
548
  == Upgrade Notice ==
549
+ 1.7.8 Disable autoload for configuration options. Display new media queries when added from the Raw CSS input.
550
 
551
  == Override Parent Styles ==
552