Contact Form by Supsystic - Version 1.7.5

Version Description

/ 15.09.2020 = * Add support WP 5.5

Download this release

Release Info

Developer supsystic.com
Plugin Icon 128x128 Contact Form by Supsystic
Version 1.7.5
Comparing to
See all releases

Code changes from version 1.7.3 to 1.7.5

cfs.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Contact Form by Supsystic
4
  * Description: Contact Form Builder with drag-and-drop editor to create responsive, mobile ready contact forms in a second. Custom fields and contact form templates
5
- * Version: 1.7.3
6
  * Author: supsystic.com
7
  * Author URI: https://supsystic.com
8
  * Text Domain: contact-form-by-supsystic
@@ -10,7 +10,7 @@
10
  **/
11
  /**
12
  * Base config constants and functions
13
- */
14
  require_once(dirname(__FILE__). DIRECTORY_SEPARATOR. 'config.php');
15
  require_once(dirname(__FILE__). DIRECTORY_SEPARATOR. 'functions.php');
16
  /**
@@ -56,5 +56,5 @@
56
  frameCfs::_()->parseRoute();
57
  frameCfs::_()->init();
58
  frameCfs::_()->exec();
59
-
60
  //var_dump(frameCfs::_()->getActivationErrors()); exit();
2
  /**
3
  * Plugin Name: Contact Form by Supsystic
4
  * Description: Contact Form Builder with drag-and-drop editor to create responsive, mobile ready contact forms in a second. Custom fields and contact form templates
5
+ * Version: 1.7.5
6
  * Author: supsystic.com
7
  * Author URI: https://supsystic.com
8
  * Text Domain: contact-form-by-supsystic
10
  **/
11
  /**
12
  * Base config constants and functions
13
+ */
14
  require_once(dirname(__FILE__). DIRECTORY_SEPARATOR. 'config.php');
15
  require_once(dirname(__FILE__). DIRECTORY_SEPARATOR. 'functions.php');
16
  /**
56
  frameCfs::_()->parseRoute();
57
  frameCfs::_()->init();
58
  frameCfs::_()->exec();
59
+
60
  //var_dump(frameCfs::_()->getActivationErrors()); exit();
classes/html.php CHANGED
@@ -286,7 +286,7 @@ class htmlCfs {
286
  }
287
  }
288
  $out .= '</select>';
289
- return $out;
290
  }
291
  static public function file($name, $params = array()) {
292
  $params['type'] = 'file';
@@ -312,9 +312,9 @@ class htmlCfs {
312
  //console.log("No AjaxUpload lib found!");
313
  return;
314
  }
315
- new AjaxUpload("#'. $butId. '", {
316
- action: "'.$params['url'].'",
317
- name: "'. $name. '" '.
318
  (empty($params['data']) ? '' : ', data: '. $params['data']. '').
319
  (empty($params['autoSubmit']) ? '' : ', autoSubmit: "'. $params['autoSubmit']. '"').
320
  (empty($params['responseType']) ? '' : ', responseType: "'. $params['responseType']. '"').
@@ -386,7 +386,7 @@ class htmlCfs {
386
  $params['action'] = isset($params['action']) ? $params['action'] : '';
387
  $params['method'] = isset($params['method']) ? $params['method'] : 'GET';
388
  if(isset($params['hideMethodInside']) && $params['hideMethodInside']) {
389
- return '<form name="'. $name. '" action="'. $params['action']. '" method="'. $params['method']. '" '. $params['attrs']. '>'.
390
  self::hidden('method', array('value' => $params['method']));
391
  } else {
392
  return '<form name="'. $name. '" action="'. $params['action']. '" method="'. $params['method']. '" '. $params['attrs']. '>';
@@ -398,10 +398,10 @@ class htmlCfs {
398
  static public function statesInput($name, $params = array('value' => '', 'attrs' => '', 'notSelected' => true, 'id' => '', 'selectHtml' => '')) {
399
  if(empty($params['selectHtml']) || !method_exists(html, $params['selectHtml']))
400
  return false;
401
-
402
  $params['notSelected'] = isset($params['notSelected']) ? $params['notSelected'] : true;
403
  $states = fieldAdapterCfs::getStates($params['notSelected']);
404
-
405
  foreach($states as $sid => $s) {
406
  $params['options'][$sid] = $s['name'];
407
  }
@@ -450,7 +450,7 @@ class htmlCfs {
450
  $params['notSelected'] = isset($params['notSelected']) ? $params['notSelected'] : true;
451
  $listBy = isset($params['listBy']) ? $params['listBy'] : 'id';
452
  $params['options'] = fieldAdapterCfs::getCountries($params['notSelected'], $listBy);
453
- if(!isset($params['attrs']))
454
  $params['attrs'] = '';
455
  $params['attrs'] .= ' type="country"';
456
  if(isset($params['disabled']) && $params['disabled']) {
@@ -470,7 +470,7 @@ class htmlCfs {
470
  $params['notSelected'] = isset($params['notSelected']) ? $params['notSelected'] : true;
471
  $listBy = isset($params['listBy']) ? $params['listBy'] : 'id';
472
  $params['options'] = fieldAdapterCfs::getCountries($params['notSelected'], $listBy);
473
- if(!isset($params['attrs']))
474
  $params['attrs'] = '';
475
  $params['attrs'] .= ' type="country"';
476
  if(isset($params['disabled']) && $params['disabled']) {
@@ -490,7 +490,7 @@ class htmlCfs {
490
  $countOptions = count($params['options']);
491
  $remove = '<a href="#" onclick="toeRemoveTextFieldsDynamicTable(this); return false;">remove</a>';
492
  $add = '<a href="#" onclick="toeAddTextFieldsDynamicTable(this, '. $countOptions. '); return false;">add</a>';
493
-
494
  $res = '<div class="toeTextFieldsDynamicTable">';
495
  if(empty($params['value']))
496
  $params['value'] = array();
@@ -504,7 +504,7 @@ class htmlCfs {
504
  foreach($params['options'] as $key => $p) {
505
  switch($countOptions) {
506
  case 1:
507
- if(isset($params['value'][$i]))
508
  $value = is_array($params['value'][$i]) ? $params['value'][$i][$key] : $params['value'][$i];
509
  else
510
  $value = '';
@@ -594,15 +594,15 @@ class htmlCfs {
594
  }
595
  $paramsStr = implode(', ', $paramsArr);
596
  }
597
-
598
  $res = '<div id="toeSliderDisplay_'. $id. '">'. (empty($params['value']) ? '' : $params['value']). '</div>';
599
  $res .= '<div id="'. $id. '"></div>';
600
  $params['attrs'] = 'id="toeSliderInput_'. $id. '"';
601
  $res .= self::hidden($name, $params);
602
- $res .= '<script type="text/javascript"><!--
603
- jQuery(function(){
604
- jQuery("#'. $id. '").slider({'. $paramsStr. '});
605
- });
606
  --></script>';
607
  return $res;
608
  }
@@ -660,7 +660,7 @@ class htmlCfs {
660
  }
661
  static public function fontsList($name, $params = array('value' => '')) {
662
  static $options = array();
663
-
664
  if(empty($options)) { // Fill them only one time per loading
665
  foreach(fieldAdapterCfs::getFontsList() as $font)
666
  $options[ $font ] = $font;
@@ -692,7 +692,7 @@ class htmlCfs {
692
  $out .= '<script type="text/javascript">//<!--
693
  jQuery(function(){
694
  jQuery("#'. $checkId. '").change(function(){
695
- jQuery("#'. $hideId. '").val( (jQuery(this).attr("checked") ? 1 : 0) );
696
  });
697
  });
698
  //--></script>';
@@ -709,7 +709,7 @@ class htmlCfs {
709
  $params['checked'] = isset($params['checked']) ? (int) $params['checked'] : 0;
710
  $params['attrs'] = isset($params['attrs']) && !empty($params['attrs']) ? $params['attrs'] : '';
711
  $params['attrs'] .= ' id="'. $params['id']. '"';
712
-
713
  return '<a class="toeSlideShellCfs" href="#"'. $params['attrs']. '>
714
  <span class="toeSlideButtCfs"></span>
715
  <span class="toeSlideOnCfs">'. __('ON'). '</span>
@@ -784,7 +784,7 @@ class htmlCfs {
784
  static public function recaptcha($name, $params = array()) {
785
  frameCfs::_()->addScript('google.recaptcha', 'https://www.google.com/recaptcha/api.js?render=explicit&onload=cfsInitCaptcha');
786
  frameCfs::_()->addScript('google.recaptcha.frontend', CFS_JS_PATH. 'google.recaptcha.js');
787
-
788
  $res = '<div class="g-recaptcha" '
789
  . 'data-sitekey="'. $params['sitekey']. '" '
790
  . (isset($params['theme']) ? 'data-theme="'. $params['theme']. '" ' : '')
286
  }
287
  }
288
  $out .= '</select>';
289
+ return $out;
290
  }
291
  static public function file($name, $params = array()) {
292
  $params['type'] = 'file';
312
  //console.log("No AjaxUpload lib found!");
313
  return;
314
  }
315
+ new AjaxUpload("#'. $butId. '", {
316
+ action: "'.$params['url'].'",
317
+ name: "'. $name. '" '.
318
  (empty($params['data']) ? '' : ', data: '. $params['data']. '').
319
  (empty($params['autoSubmit']) ? '' : ', autoSubmit: "'. $params['autoSubmit']. '"').
320
  (empty($params['responseType']) ? '' : ', responseType: "'. $params['responseType']. '"').
386
  $params['action'] = isset($params['action']) ? $params['action'] : '';
387
  $params['method'] = isset($params['method']) ? $params['method'] : 'GET';
388
  if(isset($params['hideMethodInside']) && $params['hideMethodInside']) {
389
+ return '<form name="'. $name. '" action="'. $params['action']. '" method="'. $params['method']. '" '. $params['attrs']. '>'.
390
  self::hidden('method', array('value' => $params['method']));
391
  } else {
392
  return '<form name="'. $name. '" action="'. $params['action']. '" method="'. $params['method']. '" '. $params['attrs']. '>';
398
  static public function statesInput($name, $params = array('value' => '', 'attrs' => '', 'notSelected' => true, 'id' => '', 'selectHtml' => '')) {
399
  if(empty($params['selectHtml']) || !method_exists(html, $params['selectHtml']))
400
  return false;
401
+
402
  $params['notSelected'] = isset($params['notSelected']) ? $params['notSelected'] : true;
403
  $states = fieldAdapterCfs::getStates($params['notSelected']);
404
+
405
  foreach($states as $sid => $s) {
406
  $params['options'][$sid] = $s['name'];
407
  }
450
  $params['notSelected'] = isset($params['notSelected']) ? $params['notSelected'] : true;
451
  $listBy = isset($params['listBy']) ? $params['listBy'] : 'id';
452
  $params['options'] = fieldAdapterCfs::getCountries($params['notSelected'], $listBy);
453
+ if(!isset($params['attrs']))
454
  $params['attrs'] = '';
455
  $params['attrs'] .= ' type="country"';
456
  if(isset($params['disabled']) && $params['disabled']) {
470
  $params['notSelected'] = isset($params['notSelected']) ? $params['notSelected'] : true;
471
  $listBy = isset($params['listBy']) ? $params['listBy'] : 'id';
472
  $params['options'] = fieldAdapterCfs::getCountries($params['notSelected'], $listBy);
473
+ if(!isset($params['attrs']))
474
  $params['attrs'] = '';
475
  $params['attrs'] .= ' type="country"';
476
  if(isset($params['disabled']) && $params['disabled']) {
490
  $countOptions = count($params['options']);
491
  $remove = '<a href="#" onclick="toeRemoveTextFieldsDynamicTable(this); return false;">remove</a>';
492
  $add = '<a href="#" onclick="toeAddTextFieldsDynamicTable(this, '. $countOptions. '); return false;">add</a>';
493
+
494
  $res = '<div class="toeTextFieldsDynamicTable">';
495
  if(empty($params['value']))
496
  $params['value'] = array();
504
  foreach($params['options'] as $key => $p) {
505
  switch($countOptions) {
506
  case 1:
507
+ if(isset($params['value'][$i]))
508
  $value = is_array($params['value'][$i]) ? $params['value'][$i][$key] : $params['value'][$i];
509
  else
510
  $value = '';
594
  }
595
  $paramsStr = implode(', ', $paramsArr);
596
  }
597
+
598
  $res = '<div id="toeSliderDisplay_'. $id. '">'. (empty($params['value']) ? '' : $params['value']). '</div>';
599
  $res .= '<div id="'. $id. '"></div>';
600
  $params['attrs'] = 'id="toeSliderInput_'. $id. '"';
601
  $res .= self::hidden($name, $params);
602
+ $res .= '<script type="text/javascript"><!--
603
+ jQuery(function(){
604
+ jQuery("#'. $id. '").slider({'. $paramsStr. '});
605
+ });
606
  --></script>';
607
  return $res;
608
  }
660
  }
661
  static public function fontsList($name, $params = array('value' => '')) {
662
  static $options = array();
663
+
664
  if(empty($options)) { // Fill them only one time per loading
665
  foreach(fieldAdapterCfs::getFontsList() as $font)
666
  $options[ $font ] = $font;
692
  $out .= '<script type="text/javascript">//<!--
693
  jQuery(function(){
694
  jQuery("#'. $checkId. '").change(function(){
695
+ jQuery("#'. $hideId. '").val( (jQuery(this).prop("checked") ? 1 : 0) );
696
  });
697
  });
698
  //--></script>';
709
  $params['checked'] = isset($params['checked']) ? (int) $params['checked'] : 0;
710
  $params['attrs'] = isset($params['attrs']) && !empty($params['attrs']) ? $params['attrs'] : '';
711
  $params['attrs'] .= ' id="'. $params['id']. '"';
712
+
713
  return '<a class="toeSlideShellCfs" href="#"'. $params['attrs']. '>
714
  <span class="toeSlideButtCfs"></span>
715
  <span class="toeSlideOnCfs">'. __('ON'). '</span>
784
  static public function recaptcha($name, $params = array()) {
785
  frameCfs::_()->addScript('google.recaptcha', 'https://www.google.com/recaptcha/api.js?render=explicit&onload=cfsInitCaptcha');
786
  frameCfs::_()->addScript('google.recaptcha.frontend', CFS_JS_PATH. 'google.recaptcha.js');
787
+
788
  $res = '<div class="g-recaptcha" '
789
  . 'data-sitekey="'. $params['sitekey']. '" '
790
  . (isset($params['theme']) ? 'data-theme="'. $params['theme']. '" ' : '')
config.php CHANGED
@@ -48,7 +48,7 @@
48
  define('CFS_EOL', "\n");
49
 
50
  define('CFS_PLUGIN_INSTALLED', true);
51
- define('CFS_VERSION', '1.7.3');
52
  define('CFS_USER', 'user');
53
 
54
  define('CFS_CLASS_PREFIX', 'cfsc');
48
  define('CFS_EOL', "\n");
49
 
50
  define('CFS_PLUGIN_INSTALLED', true);
51
+ define('CFS_VERSION', '1.7.5');
52
  define('CFS_USER', 'user');
53
 
54
  define('CFS_CLASS_PREFIX', 'cfsc');
js/admin.options.js CHANGED
@@ -10,7 +10,7 @@ jQuery(document).ready(function(){
10
  if(typeof(cfsActiveTab) != 'undefined' && cfsActiveTab != 'main_page' && jQuery('#toplevel_page_contact-form-supsystic').hasClass('wp-has-current-submenu')) {
11
  var subMenus = jQuery('#toplevel_page_contact-form-supsystic').find('.wp-submenu li');
12
  subMenus.removeClass('current').each(function(){
13
- if(jQuery(this).find('a[href$="&tab='+ cfsActiveTab+ '"]').size()) {
14
  jQuery(this).addClass('current');
15
  }
16
  });
@@ -35,11 +35,11 @@ jQuery(document).ready(function(){
35
  }
36
  }, 1000);
37
 
38
- if(jQuery('.cfsInputsWithDescrForm').size()) {
39
  jQuery('.cfsInputsWithDescrForm').find('input[type=checkbox][data-optkey]').change(function(){
40
  var optKey = jQuery(this).data('optkey')
41
  , descShell = jQuery('#cfsFormOptDetails_'+ optKey);
42
- if(descShell.size()) {
43
  if(jQuery(this).attr('checked')) {
44
  descShell.slideDown( 300 );
45
  } else {
@@ -72,7 +72,7 @@ jQuery(document).ready(function(){
72
  });
73
  });
74
  // Go to Top button init
75
- if(jQuery('#cfsFormGoToTopBtn').size()) {
76
  jQuery('#cfsFormGoToTopBtn').click(function(){
77
  jQuery('html, body').animate({
78
  scrollTop: 0
@@ -83,7 +83,7 @@ jQuery(document).ready(function(){
83
  }
84
  // Tooltipster initialization
85
  cfsInitTooltips();
86
- if(jQuery('.cfsCopyTextCode').size()) {
87
  var cloneWidthElement = jQuery('<span class="sup-shortcode" />').appendTo('.supsystic-plugin');
88
  jQuery('.cfsCopyTextCode').attr('readonly', 'readonly').bind('click focus', function(){
89
  this.setSelectionRange(0, this.value.length);
@@ -119,7 +119,7 @@ function cfsInitTooltips( selector ) {
119
  for(var k in findPos) {
120
  if(typeof(k) === 'string') {
121
  var $tips = $findIn ? $findIn.find( k ) : jQuery( k ).not('.sup-no-init');
122
- if($tips && $tips.size()) {
123
  tooltipsterSettings.position = findPos[ k ];
124
  // Fallback for case if library was not loaded
125
  if(!$tips.tooltipster) continue;
@@ -168,17 +168,17 @@ function cfsInitStickyItem() {
168
  , wpTollbarHeight = 32
169
  , wndScrollTop = jQuery(window).scrollTop() + wpTollbarHeight
170
  , footer = jQuery('.cfsAdminFooterShell')
171
- , footerHeight = footer && footer.size() ? footer.height() : 0
172
  , docHeight = jQuery(document).height()
173
  , wasSticking = false
174
  , wasUnSticking = false;
175
- /*if(jQuery('#wpbody-content .update-nag').size()) { // Not used for now
176
  wpTollbarHeight += parseInt(jQuery('#wpbody-content .update-nag').outerHeight());
177
  }*/
178
  for(var i = 0; i < stickiItemsSelectors.length; i++) {
179
  jQuery(stickiItemsSelectors[ i ]).each(function(){
180
  var element = jQuery(this);
181
- if(element && element.size() && !element.hasClass('sticky-ignore')) {
182
  var scrollMinPos = element.offset().top
183
  , prevScrollMinPos = parseInt(element.data('scrollMinPos'))
184
  , useNextElementPadding = toeInArray(stickiItemsSelectors[ i ], elementsUsePaddingNext) !== -1 || element.hasClass('sticky-padd-next')
@@ -201,7 +201,7 @@ function cfsInitStickyItem() {
201
  if(useNextElementPadding) {
202
  //element.addClass('supsystic-sticky-active-bordered');
203
  var nextElement = element.next();
204
- if(nextElement && nextElement.size()) {
205
  nextElement.data('prevPaddingTop', nextElement.css('padding-top'));
206
  var addToNextPadding = parseInt(element.data('next-padding-add'));
207
  addToNextPadding = addToNextPadding ? addToNextPadding : 0;
@@ -225,7 +225,7 @@ function cfsInitStickyItem() {
225
  if(useNextElementPadding) {
226
  //element.removeClass('supsystic-sticky-active-bordered');
227
  var nextElement = element.next();
228
- if(nextElement && nextElement.size()) {
229
  var nextPrevPaddingTop = parseInt(nextElement.data('prevPaddingTop'));
230
  if(isNaN(nextPrevPaddingTop))
231
  nextPrevPaddingTop = 0;
@@ -260,10 +260,10 @@ function cfsInitStickyItem() {
260
  });
261
  }
262
  if(wasSticking) {
263
- if(jQuery('#cfsFormGoToTop').size())
264
  jQuery('#cfsFormGoToTop').show();
265
  } else if(wasUnSticking) {
266
- if(jQuery('#cfsFormGoToTop').size())
267
  jQuery('#cfsFormGoToTop').hide();
268
  }
269
  });
@@ -284,13 +284,13 @@ function cfsInitCustomCheckRadio(selector) {
284
  jQuery(this).trigger('change');
285
  if(jQuery(this).hasClass('cbox')) {
286
  var parentRow = jQuery(this).parents('.jqgrow:first');
287
- if(parentRow && parentRow.size()) {
288
  jQuery(this).parents('td:first').trigger('click');
289
  } else {
290
  var checkId = jQuery(this).attr('id');
291
  if(checkId && checkId != '' && strpos(checkId, 'cb_') === 0) {
292
  var parentTblId = str_replace(checkId, 'cb_', '');
293
- if(parentTblId && parentTblId != '' && jQuery('#'+ parentTblId).size()) {
294
  jQuery('#'+ parentTblId).find('input[type=checkbox]').iCheck('update');
295
  }
296
  }
@@ -385,7 +385,7 @@ function prepareToPlotDate(data) {
385
  }
386
  function cfsInitPlugNotices() {
387
  var $notices = jQuery('.supsystic-admin-notice');
388
- if($notices && $notices.size()) {
389
  $notices.each(function(){
390
  jQuery(this).find('.notice-dismiss').click(function(){
391
  var $notice = jQuery(this).parents('.supsystic-admin-notice');
@@ -455,7 +455,7 @@ function cfsInitMainPromoWnd() {
455
  }
456
  if(isRadio) {
457
  jQuery('input[name="'+ jQuery(this).attr('name')+ '"]:first').parents('label:first').click();
458
- if(jQuery(this).parents('.iradio_minimal:first').size()) {
459
  var self = this;
460
  setTimeout(function(){
461
  jQuery(self).parents('.iradio_minimal:first').removeClass('checked');
@@ -463,14 +463,14 @@ function cfsInitMainPromoWnd() {
463
  }
464
  }
465
  var parent = null;
466
- if(jQuery(this).parents('#cfsFormMainOpts').size()) {
467
  parent = jQuery(this).parents('label:first');
468
- } else if(jQuery(this).parents('.cfsFormOptRow:first').size()) {
469
  parent = jQuery(this).parents('.cfsFormOptRow:first');
470
  } else {
471
  parent = jQuery(this).parents('tr:first');
472
  }
473
- if(!parent.size()) return;
474
  cfsFillInMainPromoWnd(parent);
475
  $proOptWnd.dialog('open');
476
  }
10
  if(typeof(cfsActiveTab) != 'undefined' && cfsActiveTab != 'main_page' && jQuery('#toplevel_page_contact-form-supsystic').hasClass('wp-has-current-submenu')) {
11
  var subMenus = jQuery('#toplevel_page_contact-form-supsystic').find('.wp-submenu li');
12
  subMenus.removeClass('current').each(function(){
13
+ if(jQuery(this).find('a[href$="&tab='+ cfsActiveTab+ '"]').length) {
14
  jQuery(this).addClass('current');
15
  }
16
  });
35
  }
36
  }, 1000);
37
 
38
+ if(jQuery('.cfsInputsWithDescrForm').length) {
39
  jQuery('.cfsInputsWithDescrForm').find('input[type=checkbox][data-optkey]').change(function(){
40
  var optKey = jQuery(this).data('optkey')
41
  , descShell = jQuery('#cfsFormOptDetails_'+ optKey);
42
+ if(descShell.length) {
43
  if(jQuery(this).attr('checked')) {
44
  descShell.slideDown( 300 );
45
  } else {
72
  });
73
  });
74
  // Go to Top button init
75
+ if(jQuery('#cfsFormGoToTopBtn').length) {
76
  jQuery('#cfsFormGoToTopBtn').click(function(){
77
  jQuery('html, body').animate({
78
  scrollTop: 0
83
  }
84
  // Tooltipster initialization
85
  cfsInitTooltips();
86
+ if(jQuery('.cfsCopyTextCode').length) {
87
  var cloneWidthElement = jQuery('<span class="sup-shortcode" />').appendTo('.supsystic-plugin');
88
  jQuery('.cfsCopyTextCode').attr('readonly', 'readonly').bind('click focus', function(){
89
  this.setSelectionRange(0, this.value.length);
119
  for(var k in findPos) {
120
  if(typeof(k) === 'string') {
121
  var $tips = $findIn ? $findIn.find( k ) : jQuery( k ).not('.sup-no-init');
122
+ if($tips && $tips.length) {
123
  tooltipsterSettings.position = findPos[ k ];
124
  // Fallback for case if library was not loaded
125
  if(!$tips.tooltipster) continue;
168
  , wpTollbarHeight = 32
169
  , wndScrollTop = jQuery(window).scrollTop() + wpTollbarHeight
170
  , footer = jQuery('.cfsAdminFooterShell')
171
+ , footerHeight = footer && footer.length ? footer.height() : 0
172
  , docHeight = jQuery(document).height()
173
  , wasSticking = false
174
  , wasUnSticking = false;
175
+ /*if(jQuery('#wpbody-content .update-nag').length) { // Not used for now
176
  wpTollbarHeight += parseInt(jQuery('#wpbody-content .update-nag').outerHeight());
177
  }*/
178
  for(var i = 0; i < stickiItemsSelectors.length; i++) {
179
  jQuery(stickiItemsSelectors[ i ]).each(function(){
180
  var element = jQuery(this);
181
+ if(element && element.length && !element.hasClass('sticky-ignore')) {
182
  var scrollMinPos = element.offset().top
183
  , prevScrollMinPos = parseInt(element.data('scrollMinPos'))
184
  , useNextElementPadding = toeInArray(stickiItemsSelectors[ i ], elementsUsePaddingNext) !== -1 || element.hasClass('sticky-padd-next')
201
  if(useNextElementPadding) {
202
  //element.addClass('supsystic-sticky-active-bordered');
203
  var nextElement = element.next();
204
+ if(nextElement && nextElement.length) {
205
  nextElement.data('prevPaddingTop', nextElement.css('padding-top'));
206
  var addToNextPadding = parseInt(element.data('next-padding-add'));
207
  addToNextPadding = addToNextPadding ? addToNextPadding : 0;
225
  if(useNextElementPadding) {
226
  //element.removeClass('supsystic-sticky-active-bordered');
227
  var nextElement = element.next();
228
+ if(nextElement && nextElement.length) {
229
  var nextPrevPaddingTop = parseInt(nextElement.data('prevPaddingTop'));
230
  if(isNaN(nextPrevPaddingTop))
231
  nextPrevPaddingTop = 0;
260
  });
261
  }
262
  if(wasSticking) {
263
+ if(jQuery('#cfsFormGoToTop').length)
264
  jQuery('#cfsFormGoToTop').show();
265
  } else if(wasUnSticking) {
266
+ if(jQuery('#cfsFormGoToTop').length)
267
  jQuery('#cfsFormGoToTop').hide();
268
  }
269
  });
284
  jQuery(this).trigger('change');
285
  if(jQuery(this).hasClass('cbox')) {
286
  var parentRow = jQuery(this).parents('.jqgrow:first');
287
+ if(parentRow && parentRow.length) {
288
  jQuery(this).parents('td:first').trigger('click');
289
  } else {
290
  var checkId = jQuery(this).attr('id');
291
  if(checkId && checkId != '' && strpos(checkId, 'cb_') === 0) {
292
  var parentTblId = str_replace(checkId, 'cb_', '');
293
+ if(parentTblId && parentTblId != '' && jQuery('#'+ parentTblId).length) {
294
  jQuery('#'+ parentTblId).find('input[type=checkbox]').iCheck('update');
295
  }
296
  }
385
  }
386
  function cfsInitPlugNotices() {
387
  var $notices = jQuery('.supsystic-admin-notice');
388
+ if($notices && $notices.length) {
389
  $notices.each(function(){
390
  jQuery(this).find('.notice-dismiss').click(function(){
391
  var $notice = jQuery(this).parents('.supsystic-admin-notice');
455
  }
456
  if(isRadio) {
457
  jQuery('input[name="'+ jQuery(this).attr('name')+ '"]:first').parents('label:first').click();
458
+ if(jQuery(this).parents('.iradio_minimal:first').length) {
459
  var self = this;
460
  setTimeout(function(){
461
  jQuery(self).parents('.iradio_minimal:first').removeClass('checked');
463
  }
464
  }
465
  var parent = null;
466
+ if(jQuery(this).parents('#cfsFormMainOpts').length) {
467
  parent = jQuery(this).parents('label:first');
468
+ } else if(jQuery(this).parents('.cfsFormOptRow:first').length) {
469
  parent = jQuery(this).parents('.cfsFormOptRow:first');
470
  } else {
471
  parent = jQuery(this).parents('tr:first');
472
  }
473
+ if(!parent.length) return;
474
  cfsFillInMainPromoWnd(parent);
475
  $proOptWnd.dialog('open');
476
  }
js/common.js CHANGED
@@ -27,7 +27,7 @@ jQuery.fn.tagName = function() {
27
  return this.get(0).tagName;
28
  }
29
  jQuery.fn.exists = function(){
30
- return (jQuery(this).size() > 0 ? true : false);
31
  }
32
  function isNumber(val) {
33
  return /^\d+/.test(val);
@@ -202,7 +202,7 @@ function toeReload(url) {
202
  }
203
  jQuery.fn.toeRebuildSelect = function(data, useIdAsValue, val) {
204
  if(jQuery(this).tagName() == 'SELECT' && typeof(data) == 'object') {
205
- if(jQuery(data).size() > 0) {
206
  if(typeof(val) == 'undefined')
207
  val = false;
208
  if(jQuery(this).children('option').length) {
@@ -402,7 +402,7 @@ function toeListableCfs(params) {
402
  var newRow = exampleRow.clone();
403
  for(var key in list[i]) {
404
  var element = newRow.find('.'+ key);
405
- if(element.size()) {
406
  var valueTo = element.attr('valueTo');
407
  if(valueTo) {
408
  var newValue = list[i][key];
27
  return this.get(0).tagName;
28
  }
29
  jQuery.fn.exists = function(){
30
+ return (jQuery(this).length > 0 ? true : false);
31
  }
32
  function isNumber(val) {
33
  return /^\d+/.test(val);
202
  }
203
  jQuery.fn.toeRebuildSelect = function(data, useIdAsValue, val) {
204
  if(jQuery(this).tagName() == 'SELECT' && typeof(data) == 'object') {
205
+ if(jQuery(data).length > 0) {
206
  if(typeof(val) == 'undefined')
207
  val = false;
208
  if(jQuery(this).children('option').length) {
402
  var newRow = exampleRow.clone();
403
  for(var key in list[i]) {
404
  var element = newRow.find('.'+ key);
405
+ if(element.length) {
406
  var valueTo = element.attr('valueTo');
407
  if(valueTo) {
408
  var newValue = list[i][key];
js/common.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- jQuery.fn.nextInArray=function(b){var c=0;for(var a=0;a<this.length;a++){if(this[a]==b){c=a+1;break}}if(c>this.length-1){c=0}return this[c]};jQuery.fn.clearForm=function(){return this.each(function(){var b=this.type,a=this.tagName.toLowerCase();if(a=="form"){return jQuery(":input",this).clearForm()}if(b=="text"||b=="password"||a=="textarea"){this.value=""}else{if(b=="checkbox"||b=="radio"){this.checked=false}else{if(a=="select"){this.selectedIndex=-1}}}})};jQuery.fn.tagName=function(){return this.get(0).tagName};jQuery.fn.exists=function(){return(jQuery(this).size()>0?true:false)};function isNumber(a){return/^\d+/.test(a)}function pushDataToParam(e,a){a=a?a:"";var d=[];for(var c in e){var b=a&&a!=""?a+"["+c+"]":c;if(typeof(e[c])==="array"||typeof(e[c])==="object"){d=jQuery.merge(d,pushDataToParam(e[c],b))}else{d.push(b+"="+e[c])}}return d}jQuery.fn.serializeAnythingDeepCfs=function(){var c=[],b=jQuery(this).find(":input").get(),a=function(d,f){for(var e=0;e<d.length;e++){switch(e){case 0:if(!c[d[e]]){c[d[e]]=[]}break;case 1:if(!c[d[e-1]][d[e]]){c[d[e-1]][d[e]]=[]}break;case 2:if(!c[d[e-2]][d[e-1]][d[e]]){c[d[e-2]][d[e-1]][d[e]]=[]}break;case 3:if(!c[d[e-3]][d[e-2]][d[e-1]][d[e]]){c[d[e-3]][d[e-2]][d[e-1]][d[e]]=[]}break;case 4:if(!c[d[e-4]][d[e-3]][d[e-2]][d[e-1]][d[e]]){c[d[e-4]][d[e-3]][d[e-2]][d[e-1]][d[e]]=[]}break}}switch(d.length){case 4:c[d[0]][d[1]][d[2]][d[3]]=f;break;case 4:c[d[0]][d[1]][d[2]]=f;break;case 4:c[d[0]][d[1]]=f;break;case 4:c[d[0]]=f;break}};jQuery.each(b,function(){if(this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))){var f=jQuery(this).val(),e=this.name;if(/\[/.test(e)){e=e.replace(new RegExp("]","g"),"");var d=e.split("[");a(d,f)}else{c[this.name]=f}}});return c};jQuery.fn.serializeAnythingCfs=function(d,b){var c=b?{}:[],a=jQuery(this).find(":input").get();jQuery.each(a,function(){if(this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|number/i.test(this.type))){var e=jQuery(this).val();if(b){c[this.name]=e}else{c.push(encodeURIComponent(this.name)+"="+encodeURIComponent(e))}}});if(typeof(d)!="undefined"&&d){c=jQuery.merge(c,pushDataToParam(d))}return b?c:c.join("&").replace(/%20/g,"+")};jQuery.fn.serializeAssoc=function(){var a=[];jQuery.each(this.serializeArray(),function(c,e){var b=e.name.match(/(.*?)\[(.*?)\]/);if(b!==null){var d=b[1];var f=b[2];if(!a[d]){a[d]=[]}if(a[d][f]){if(jQuery.isArray(a[d][f])){a[d][f].push(e.value)}else{a[d][f]=[];a[d][f].push(e.value)}}else{a[d][f]=e.value}}else{if(a[e.name]){if(jQuery.isArray(a[e.name])){a[e.name].push(e.value)}else{a[e.name]=[];a[e.name].push(e.value)}}else{a[e.name]=e.value}}});return a};function str_replace(c,d,b){var a=c.split(d);return a.join(b)}function cfs_str_replace(c,d,b){var a=c.split(d);return a.join(b)}function cfsStrReplaceGlob(b,c,a){return b.replace(new RegExp(c,"g"),a)}function nameToClassId(a){return str_replace(str_replace(a,"]",""),"[","")}function strpos(b,c,d){var a=b.indexOf(c,d);return a>=0?a:false}function extend(b,a){var c=function(){};c.prototype=a.prototype;b.prototype=new c();b.prototype.constructor=b;b.superclass=a.prototype}function toeRedirect(b,a){if(a){var c=window.open(b,"_blank");if(c){c.focus()}else{document.location.href=b}}else{document.location.href=b}}function toeReload(a){if(a){toeRedirect(a)}document.location.reload()}jQuery.fn.toeRebuildSelect=function(b,c,d){if(jQuery(this).tagName()=="SELECT"&&typeof(b)=="object"){if(jQuery(b).size()>0){if(typeof(d)=="undefined"){d=false}if(jQuery(this).children("option").length){jQuery(this).children("option").remove()}if(typeof(c)=="undefined"){c=false}var a="";for(var e in b){a="";if(d&&((c&&e==d)||(b[e]==d))){a="selected"}jQuery(this).append('<option value="'+(c?e:b[e])+'" '+a+">"+b[e]+"</option>")}}}};function toeInArray(c,b){if(typeof(b)=="object"){for(var a in b){if(b[a]==c){return a}}}else{if(typeof(b)=="array"){return jQuery.inArray(c,b)}}return -1}jQuery.fn.setReadonly=function(){jQuery(this).addClass("toeReadonly").attr("readonly","readonly")};jQuery.fn.unsetReadonly=function(){jQuery(this).removeClass("toeReadonly").removeAttr("readonly","readonly")};jQuery.fn.getClassId=function(a,c){var b=jQuery(this).attr("class");b=b.substr(strpos(b,a+"_"));if(strpos(b," ")){b=b.substr(0,strpos(b," "))}b=b.split("_");b=b[1];return b};function toeTextIncDec(a,c){var b=parseInt(jQuery("#"+a).val());if(isNaN(b)){b=0}if(!(c<0&&b<1)){b+=c}jQuery("#"+a).val(b)}function toeStrFirstUp(b){b+="";var a=b.charAt(0).toUpperCase();return a+b.substr(1)}function parseStr(q,g){var a=String(q).replace(/^&/,"").replace(/&$/,"").split("&"),h=a.length,t,r,e,n,v,l,k,c,s,u,w,o,d,m,f,b=function(i){return decodeURIComponent(i.replace(/\+/g,"%20"))};if(!g){g={}}for(t=0;t<h;t++){u=a[t].split("=");w=b(u[0]);o=(u.length<2)?"":b(u[1]);while(w.charAt(0)===" "){w=w.slice(1)}if(w.indexOf("\x00")>-1){w=w.slice(0,w.indexOf("\x00"))}if(w&&w.charAt(0)!=="["){m=[];d=0;for(r=0;r<w.length;r++){if(w.charAt(r)==="["&&!d){d=r+1}else{if(w.charAt(r)==="]"){if(d){if(!m.length){m.push(w.slice(0,d-1))}m.push(w.substr(d,r-d));d=0;if(w.charAt(r+1)!=="["){break}}}}}if(!m.length){m=[w]}for(r=0;r<m[0].length;r++){s=m[0].charAt(r);if(s===" "||s==="."||s==="["){m[0]=m[0].substr(0,r)+"_"+m[0].substr(r+1)}if(s==="["){break}}l=g;for(r=0,f=m.length;r<f;r++){w=m[r].replace(/^['"]/,"").replace(/['"]$/,"");k=r!==m.length-1;v=l;if((w!==""&&w!==" ")||r===0){if(l[w]===c){l[w]={}}l=l[w]}else{e=-1;for(n in l){if(l.hasOwnProperty(n)){if(+n>e&&n.match(/^\d+$/g)){e=+n}}}w=e+1}}v[w]=o}}return g}function toeListableCfs(b){this.params=jQuery.extend({},b);this.table=jQuery(this.params.table);this.paging=jQuery(this.params.paging);this.perPage=this.params.perPage;this.list=this.params.list;this.count=this.params.count;this.page=this.params.page;this.pagingCallback=this.params.pagingCallback;var a=this;this.draw=function(k,j){this.table.find("tr").not(".cfsExample, .cfsTblHeader").remove();var n=this.table.find(".cfsExample");for(var e in k){var o=n.clone();for(var l in k[e]){var f=o.find("."+l);if(f.size()){var m=f.attr("valueTo");if(m){var c=k[e][l];var h=f.attr(m);if(h){c=h+" "+c}f.attr(m,c)}else{f.html(k[e][l])}}}o.removeClass("cfsExample").show();this.table.append(o)}if(this.paging){this.paging.html("");if(j&&j>k.length&&this.perPage){for(var e=1;e<=Math.ceil(j/this.perPage);e++){var d=e-1,g=(d==this.page)?jQuery("<b/>"):jQuery("<a/>");if(d!=this.page){g.attr("href","#"+d).click(function(){if(a.pagingCallback&&typeof(a.pagingCallback)=="function"){a.pagingCallback(parseInt(jQuery(this).attr("href").replace("#","")));return false}})}g.addClass("toePagingElement").html(e);this.paging.append(g);if(e%20==0&&e){this.paging.append("<br />")}}}}};if(this.list){this.draw(this.list,this.count)}}function setCookieCfs(a,e,b){var f=new Date();f.setDate(f.getDate()+b);var c="";if(typeof(e)=="array"||typeof(e)=="object"){c="_JSON:"+JSON.stringify(e)}else{c=e}var d=escape(c)+((b==null)?"":"; expires="+f.toUTCString())+"; path=/";document.cookie=a+"="+d}function getCookieCfs(a){var c=document.cookie.split(a+"=");if(c.length==2){var b=unescape(c.pop().split(";").shift());if(b.indexOf("_JSON:")===0){b=JSON.parse(b.split("_JSON:").pop())}return b}return null}function delCookieCfs(a){document.cookie=a+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}function callUserFuncArray(cb,parameters){var func;if(typeof cb==="string"){func=(typeof this[cb]==="function")?this[cb]:func=(new Function(null,"return "+cb))()}else{if(Object.prototype.toString.call(cb)==="[object Array]"){func=(typeof cb[0]=="string")?eval(cb[0]+"['"+cb[1]+"']"):func=cb[0][cb[1]]}else{if(typeof cb==="function"){func=cb}}}if(typeof func!=="function"){throw new Error(func+" is not a valid function")}return(typeof cb[0]==="string")?func.apply(eval(cb[0]),parameters):(typeof cb[0]!=="object")?func.apply(null,parameters):func.apply(cb[0],parameters)}jQuery.fn.zoom=function(b,a){a=a?a:"center center";jQuery(this).data("zoom",b);return jQuery(this).css({"-moz-transform":"scale("+b+")","-moz-transform-origin":a,"-o-transform":"scale("+b+")","-o-transform-origin":a,"-webkit-transform":"scale("+b+")","-webkit-transform-origin":a,transform:"scale("+b+")","transform-origin":a})};jQuery.fn.scrollWidth=function(){var c=document.createElement("p");c.style.width="100%";c.style.height="200px";var d=document.createElement("div");d.style.position="absolute";d.style.top="0px";d.style.left="0px";d.style.visibility="hidden";d.style.width="200px";d.style.height="150px";d.style.overflow="hidden";d.appendChild(c);document.body.appendChild(d);var b=c.offsetWidth;d.style.overflow="scroll";var a=c.offsetWidth;if(b==a){a=d.clientWidth}document.body.removeChild(d);return(b-a)};function toeGetImgAttachId(a){var d=jQuery(a).attr("class"),c=0;if(d&&d!=""){var b=d.match(/wp-image-(\d+)/);if(b&&b[1]){c=parseInt(b[1])}}return c}function toeGetHashParams(){var a=window.location.hash.split("#"),c=[];for(var b in a){if(a[b]&&a[b]!=""){c.push(a[b])}}return c}function getDataLcs(a){this.data,this.dataChecked;if(!this.dataChecked){if(window.location.search){this.data=parseStr(window.location.search.substr(1))}this.dataChecked=true}return typeof(a)!=="undefined"&&this.data?this.data[a]:this.data}function traverseElement(a,b,c,e){if(!/^(script|style)$/.test(a.tagName)){var d=a.lastChild;while(d){if(d.nodeType==1){traverseElement(d,b,c,e)}else{if(d.nodeType==3){c(d,b,e)}}d=d.previousSibling}}}function textReplacerFunc(b,a,c){b.data=b.data.replace(a,c)}function replaceWords(c,d){var a=document.createElement("div");a.innerHTML=c;for(var b in d){traverseElement(a,new RegExp(b,"g"),textReplacerFunc,d[b])}return a.innerHTML}function toeSelectText(b){var d=document,e=jQuery(b).get(0),a,c;if(d.body.createTextRange){a=d.body.createTextRange();a.moveToElementText(e);a.select()}else{if(window.getSelection){c=window.getSelection();a=d.createRange();a.selectNodeContents(e);c.removeAllRanges();c.addRange(a)}}}jQuery.fn.animationDuration=function(c,a){if(a){c=parseFloat(c)/1000}var b=c+"s";return jQuery(this).css({"webkit-animation-duration":b,"-moz-animation-duration":b,"-o-animation-duration":b,"animation-duration":b})};function cfsStrToMs(e){var f=e.split(" ");if(f.length==2){e=f[0]+" ";var d=f[1].split(":");for(var c=0;c<3;c++){e+=d[c]?d[c]:"00";if(c<2){e+=":"}}}var a=new Date(str_replace(e,"-","/")),b=0;if(a){b=a.getTime()}return b}Date.prototype.format=function(d){var b="";var f=Date.replaceChars;for(var c=0;c<d.length;c++){var a=d.charAt(c);if(c-1>=0&&d.charAt(c-1)=="\\"){b+=a}else{if(f[a]){b+=f[a].call(this)}else{if(a!="\\"){b+=a}}}}return b};Date.replaceChars={shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d:function(){return(this.getDate()<10?"0":"")+this.getDate()},D:function(){return Date.replaceChars.shortDays[this.getDay()]},j:function(){return this.getDate()},l:function(){return Date.replaceChars.longDays[this.getDay()]},N:function(){return this.getDay()+1},S:function(){return this.getDate()%10==1&&this.getDate()!=11?"st":this.getDate()%10==2&&this.getDate()!=12?"nd":this.getDate()%10==3&&this.getDate()!=13?"rd":"th"},w:function(){return this.getDay()},z:function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil((this-a)/86400000)},W:function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil(((this-a)/86400000+a.getDay()+1)/7)},F:function(){return Date.replaceChars.longMonths[this.getMonth()]},m:function(){return(this.getMonth()<9?"0":"")+(this.getMonth()+1)},M:function(){return Date.replaceChars.shortMonths[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){var a=new Date;return(new Date(a.getFullYear(),a.getMonth(),0)).getDate()},L:function(){var a=this.getFullYear();return a%400==0||a%100!=0&&a%4==0},o:function(){var a=new Date(this.valueOf());a.setDate(a.getDate()-(this.getDay()+6)%7+3);return a.getFullYear()},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).substr(2)},a:function(){return this.getHours()<12?"am":"pm"},A:function(){return this.getHours()<12?"AM":"PM"},B:function(){return Math.floor(((this.getUTCHours()+1)%24+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)*1000/24)},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){return((this.getHours()%12||12)<10?"0":"")+(this.getHours()%12||12)},H:function(){return(this.getHours()<10?"0":"")+this.getHours()},i:function(){return(this.getMinutes()<10?"0":"")+this.getMinutes()},s:function(){return(this.getSeconds()<10?"0":"")+this.getSeconds()},u:function(){var a=this.getMilliseconds();return(a<10?"00":a<100?"0":"")+a},e:function(){return"Not Yet Supported"},I:function(){var c=null;for(var a=0;a<12;++a){var d=new Date(this.getFullYear(),a,1);var b=d.getTimezoneOffset();if(c===null){c=b}else{if(b<c){c=b;break}else{if(b>c){break}}}}return this.getTimezoneOffset()==c|0},O:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+"00"},P:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+":00"},T:function(){var b=this.getMonth();this.setMonth(0);var a=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,"$1");this.setMonth(b);return a},Z:function(){return -this.getTimezoneOffset()*60},c:function(){return this.format("Y-m-d\\TH:i:sP")},r:function(){return this.toString()},U:function(){return this.getTime()/1000}};function isMobileCfs(){var a=false;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))){a=true}return a}function isNumericCfs(a){if(jQuery.isNumeric){return jQuery.isNumeric(a)}return !isNaN(parseFloat(a))&&isFinite(a)}function toNumberCsf(b){var a=Number(b);return a}function toNumberCurrencyCfs(c){if(!c){return false}var a=/[+-]?\d+(\.\d+)?/,b=c.match(a).map(function(d){return parseFloat(d)});if(!isNaN(b[0])){return{num:b[0],strPattern:cfs_str_replace(c,b[0],"{{NUM}}")}}return false}function numberCurrencyToStrCfs(a){return cfs_str_replace(a.strPattern,"{{NUM}}",a.num)}function randCfs(b,a,d){var c=(Math.random()*(a-b))+b;return d?c:Math.round(c)}function cfsGetTxtEditorVal(a){if(typeof(tinyMCE)!=="undefined"&&tinyMCE.get(a)&&!jQuery("#"+a).is(":visible")&&tinyMCE.get(a).getDoc&&typeof(tinyMCE.get(a).getDoc)=="function"&&tinyMCE.get(a).getDoc()){return tinyMCE.get(a).getContent()}else{return jQuery("#"+a).val()}}function cfsSetTxtEditorVal(b,a){if(typeof(tinyMCE)!=="undefined"&&tinyMCE&&tinyMCE.get(b)&&!jQuery("#"+b).is(":visible")&&tinyMCE.get(b).getDoc&&typeof(tinyMCE.get(b).getDoc)=="function"&&tinyMCE.get(b).getDoc()){tinyMCE.get(b).setContent(a)}else{jQuery("#"+b).val(a)}}function cfsGetTxtEditor(a){if(typeof(tinyMCE)!=="undefined"&&tinyMCE&&tinyMCE.get(a)&&!jQuery("#"+a).is(":visible")&&tinyMCE.get(a).getDoc&&typeof(tinyMCE.get(a).getDoc)=="function"&&tinyMCE.get(a).getDoc()){return tinyMCE.get(a)}return null};
1
 
2
+ jQuery.fn.nextInArray=function(b){var c=0;for(var a=0;a<this.length;a++){if(this[a]==b){c=a+1;break}}if(c>this.length-1){c=0}return this[c]};jQuery.fn.clearForm=function(){return this.each(function(){var b=this.type,a=this.tagName.toLowerCase();if(a=="form"){return jQuery(":input",this).clearForm()}if(b=="text"||b=="password"||a=="textarea"){this.value=""}else{if(b=="checkbox"||b=="radio"){this.checked=false}else{if(a=="select"){this.selectedIndex=-1}}}})};jQuery.fn.tagName=function(){return this.get(0).tagName};jQuery.fn.exists=function(){return(jQuery(this).length>0?true:false)};function isNumber(a){return/^\d+/.test(a)}function pushDataToParam(e,a){a=a?a:"";var d=[];for(var c in e){var b=a&&a!=""?a+"["+c+"]":c;if(typeof(e[c])==="array"||typeof(e[c])==="object"){d=jQuery.merge(d,pushDataToParam(e[c],b))}else{d.push(b+"="+e[c])}}return d}jQuery.fn.serializeAnythingDeepCfs=function(){var c=[],b=jQuery(this).find(":input").get(),a=function(d,f){for(var e=0;e<d.length;e++){switch(e){case 0:if(!c[d[e]]){c[d[e]]=[]}break;case 1:if(!c[d[e-1]][d[e]]){c[d[e-1]][d[e]]=[]}break;case 2:if(!c[d[e-2]][d[e-1]][d[e]]){c[d[e-2]][d[e-1]][d[e]]=[]}break;case 3:if(!c[d[e-3]][d[e-2]][d[e-1]][d[e]]){c[d[e-3]][d[e-2]][d[e-1]][d[e]]=[]}break;case 4:if(!c[d[e-4]][d[e-3]][d[e-2]][d[e-1]][d[e]]){c[d[e-4]][d[e-3]][d[e-2]][d[e-1]][d[e]]=[]}break}}switch(d.length){case 4:c[d[0]][d[1]][d[2]][d[3]]=f;break;case 4:c[d[0]][d[1]][d[2]]=f;break;case 4:c[d[0]][d[1]]=f;break;case 4:c[d[0]]=f;break}};jQuery.each(b,function(){if(this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))){var f=jQuery(this).val(),e=this.name;if(/\[/.test(e)){e=e.replace(new RegExp("]","g"),"");var d=e.split("[");a(d,f)}else{c[this.name]=f}}});return c};jQuery.fn.serializeAnythingCfs=function(d,b){var c=b?{}:[],a=jQuery(this).find(":input").get();jQuery.each(a,function(){if(this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|number/i.test(this.type))){var e=jQuery(this).val();if(b){c[this.name]=e}else{c.push(encodeURIComponent(this.name)+"="+encodeURIComponent(e))}}});if(typeof(d)!="undefined"&&d){c=jQuery.merge(c,pushDataToParam(d))}return b?c:c.join("&").replace(/%20/g,"+")};jQuery.fn.serializeAssoc=function(){var a=[];jQuery.each(this.serializeArray(),function(c,e){var b=e.name.match(/(.*?)\[(.*?)\]/);if(b!==null){var d=b[1];var f=b[2];if(!a[d]){a[d]=[]}if(a[d][f]){if(jQuery.isArray(a[d][f])){a[d][f].push(e.value)}else{a[d][f]=[];a[d][f].push(e.value)}}else{a[d][f]=e.value}}else{if(a[e.name]){if(jQuery.isArray(a[e.name])){a[e.name].push(e.value)}else{a[e.name]=[];a[e.name].push(e.value)}}else{a[e.name]=e.value}}});return a};function str_replace(c,d,b){var a=c.split(d);return a.join(b)}function cfs_str_replace(c,d,b){var a=c.split(d);return a.join(b)}function cfsStrReplaceGlob(b,c,a){return b.replace(new RegExp(c,"g"),a)}function nameToClassId(a){return str_replace(str_replace(a,"]",""),"[","")}function strpos(b,c,d){var a=b.indexOf(c,d);return a>=0?a:false}function extend(b,a){var c=function(){};c.prototype=a.prototype;b.prototype=new c();b.prototype.constructor=b;b.superclass=a.prototype}function toeRedirect(b,a){if(a){var c=window.open(b,"_blank");if(c){c.focus()}else{document.location.href=b}}else{document.location.href=b}}function toeReload(a){if(a){toeRedirect(a)}document.location.reload()}jQuery.fn.toeRebuildSelect=function(b,c,d){if(jQuery(this).tagName()=="SELECT"&&typeof(b)=="object"){if(jQuery(b).length>0){if(typeof(d)=="undefined"){d=false}if(jQuery(this).children("option").length){jQuery(this).children("option").remove()}if(typeof(c)=="undefined"){c=false}var a="";for(var e in b){a="";if(d&&((c&&e==d)||(b[e]==d))){a="selected"}jQuery(this).append('<option value="'+(c?e:b[e])+'" '+a+">"+b[e]+"</option>")}}}};function toeInArray(c,b){if(typeof(b)=="object"){for(var a in b){if(b[a]==c){return a}}}else{if(typeof(b)=="array"){return jQuery.inArray(c,b)}}return -1}jQuery.fn.setReadonly=function(){jQuery(this).addClass("toeReadonly").attr("readonly","readonly")};jQuery.fn.unsetReadonly=function(){jQuery(this).removeClass("toeReadonly").removeAttr("readonly","readonly")};jQuery.fn.getClassId=function(a,c){var b=jQuery(this).attr("class");b=b.substr(strpos(b,a+"_"));if(strpos(b," ")){b=b.substr(0,strpos(b," "))}b=b.split("_");b=b[1];return b};function toeTextIncDec(a,c){var b=parseInt(jQuery("#"+a).val());if(isNaN(b)){b=0}if(!(c<0&&b<1)){b+=c}jQuery("#"+a).val(b)}function toeStrFirstUp(b){b+="";var a=b.charAt(0).toUpperCase();return a+b.substr(1)}function parseStr(q,g){var a=String(q).replace(/^&/,"").replace(/&$/,"").split("&"),h=a.length,t,r,e,n,v,l,k,c,s,u,w,o,d,m,f,b=function(i){return decodeURIComponent(i.replace(/\+/g,"%20"))};if(!g){g={}}for(t=0;t<h;t++){u=a[t].split("=");w=b(u[0]);o=(u.length<2)?"":b(u[1]);while(w.charAt(0)===" "){w=w.slice(1)}if(w.indexOf("\x00")>-1){w=w.slice(0,w.indexOf("\x00"))}if(w&&w.charAt(0)!=="["){m=[];d=0;for(r=0;r<w.length;r++){if(w.charAt(r)==="["&&!d){d=r+1}else{if(w.charAt(r)==="]"){if(d){if(!m.length){m.push(w.slice(0,d-1))}m.push(w.substr(d,r-d));d=0;if(w.charAt(r+1)!=="["){break}}}}}if(!m.length){m=[w]}for(r=0;r<m[0].length;r++){s=m[0].charAt(r);if(s===" "||s==="."||s==="["){m[0]=m[0].substr(0,r)+"_"+m[0].substr(r+1)}if(s==="["){break}}l=g;for(r=0,f=m.length;r<f;r++){w=m[r].replace(/^['"]/,"").replace(/['"]$/,"");k=r!==m.length-1;v=l;if((w!==""&&w!==" ")||r===0){if(l[w]===c){l[w]={}}l=l[w]}else{e=-1;for(n in l){if(l.hasOwnProperty(n)){if(+n>e&&n.match(/^\d+$/g)){e=+n}}}w=e+1}}v[w]=o}}return g}function toeListableCfs(b){this.params=jQuery.extend({},b);this.table=jQuery(this.params.table);this.paging=jQuery(this.params.paging);this.perPage=this.params.perPage;this.list=this.params.list;this.count=this.params.count;this.page=this.params.page;this.pagingCallback=this.params.pagingCallback;var a=this;this.draw=function(k,j){this.table.find("tr").not(".cfsExample, .cfsTblHeader").remove();var n=this.table.find(".cfsExample");for(var e in k){var o=n.clone();for(var l in k[e]){var f=o.find("."+l);if(f.length){var m=f.attr("valueTo");if(m){var c=k[e][l];var h=f.attr(m);if(h){c=h+" "+c}f.attr(m,c)}else{f.html(k[e][l])}}}o.removeClass("cfsExample").show();this.table.append(o)}if(this.paging){this.paging.html("");if(j&&j>k.length&&this.perPage){for(var e=1;e<=Math.ceil(j/this.perPage);e++){var d=e-1,g=(d==this.page)?jQuery("<b/>"):jQuery("<a/>");if(d!=this.page){g.attr("href","#"+d).click(function(){if(a.pagingCallback&&typeof(a.pagingCallback)=="function"){a.pagingCallback(parseInt(jQuery(this).attr("href").replace("#","")));return false}})}g.addClass("toePagingElement").html(e);this.paging.append(g);if(e%20==0&&e){this.paging.append("<br />")}}}}};if(this.list){this.draw(this.list,this.count)}}function setCookieCfs(a,e,b){var f=new Date();f.setDate(f.getDate()+b);var c="";if(typeof(e)=="array"||typeof(e)=="object"){c="_JSON:"+JSON.stringify(e)}else{c=e}var d=escape(c)+((b==null)?"":"; expires="+f.toUTCString())+"; path=/";document.cookie=a+"="+d}function getCookieCfs(a){var c=document.cookie.split(a+"=");if(c.length==2){var b=unescape(c.pop().split(";").shift());if(b.indexOf("_JSON:")===0){b=JSON.parse(b.split("_JSON:").pop())}return b}return null}function delCookieCfs(a){document.cookie=a+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}function callUserFuncArray(cb,parameters){var func;if(typeof cb==="string"){func=(typeof this[cb]==="function")?this[cb]:func=(new Function(null,"return "+cb))()}else{if(Object.prototype.toString.call(cb)==="[object Array]"){func=(typeof cb[0]=="string")?eval(cb[0]+"['"+cb[1]+"']"):func=cb[0][cb[1]]}else{if(typeof cb==="function"){func=cb}}}if(typeof func!=="function"){throw new Error(func+" is not a valid function")}return(typeof cb[0]==="string")?func.apply(eval(cb[0]),parameters):(typeof cb[0]!=="object")?func.apply(null,parameters):func.apply(cb[0],parameters)}jQuery.fn.zoom=function(b,a){a=a?a:"center center";jQuery(this).data("zoom",b);return jQuery(this).css({"-moz-transform":"scale("+b+")","-moz-transform-origin":a,"-o-transform":"scale("+b+")","-o-transform-origin":a,"-webkit-transform":"scale("+b+")","-webkit-transform-origin":a,transform:"scale("+b+")","transform-origin":a})};jQuery.fn.scrollWidth=function(){var c=document.createElement("p");c.style.width="100%";c.style.height="200px";var d=document.createElement("div");d.style.position="absolute";d.style.top="0px";d.style.left="0px";d.style.visibility="hidden";d.style.width="200px";d.style.height="150px";d.style.overflow="hidden";d.appendChild(c);document.body.appendChild(d);var b=c.offsetWidth;d.style.overflow="scroll";var a=c.offsetWidth;if(b==a){a=d.clientWidth}document.body.removeChild(d);return(b-a)};function toeGetImgAttachId(a){var d=jQuery(a).attr("class"),c=0;if(d&&d!=""){var b=d.match(/wp-image-(\d+)/);if(b&&b[1]){c=parseInt(b[1])}}return c}function toeGetHashParams(){var a=window.location.hash.split("#"),c=[];for(var b in a){if(a[b]&&a[b]!=""){c.push(a[b])}}return c}function getDataLcs(a){this.data,this.dataChecked;if(!this.dataChecked){if(window.location.search){this.data=parseStr(window.location.search.substr(1))}this.dataChecked=true}return typeof(a)!=="undefined"&&this.data?this.data[a]:this.data}function traverseElement(a,b,c,e){if(!/^(script|style)$/.test(a.tagName)){var d=a.lastChild;while(d){if(d.nodeType==1){traverseElement(d,b,c,e)}else{if(d.nodeType==3){c(d,b,e)}}d=d.previousSibling}}}function textReplacerFunc(b,a,c){b.data=b.data.replace(a,c)}function replaceWords(c,d){var a=document.createElement("div");a.innerHTML=c;for(var b in d){traverseElement(a,new RegExp(b,"g"),textReplacerFunc,d[b])}return a.innerHTML}function toeSelectText(b){var d=document,e=jQuery(b).get(0),a,c;if(d.body.createTextRange){a=d.body.createTextRange();a.moveToElementText(e);a.select()}else{if(window.getSelection){c=window.getSelection();a=d.createRange();a.selectNodeContents(e);c.removeAllRanges();c.addRange(a)}}}jQuery.fn.animationDuration=function(c,a){if(a){c=parseFloat(c)/1000}var b=c+"s";return jQuery(this).css({"webkit-animation-duration":b,"-moz-animation-duration":b,"-o-animation-duration":b,"animation-duration":b})};function cfsStrToMs(e){var f=e.split(" ");if(f.length==2){e=f[0]+" ";var d=f[1].split(":");for(var c=0;c<3;c++){e+=d[c]?d[c]:"00";if(c<2){e+=":"}}}var a=new Date(str_replace(e,"-","/")),b=0;if(a){b=a.getTime()}return b}Date.prototype.format=function(d){var b="";var f=Date.replaceChars;for(var c=0;c<d.length;c++){var a=d.charAt(c);if(c-1>=0&&d.charAt(c-1)=="\\"){b+=a}else{if(f[a]){b+=f[a].call(this)}else{if(a!="\\"){b+=a}}}}return b};Date.replaceChars={shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d:function(){return(this.getDate()<10?"0":"")+this.getDate()},D:function(){return Date.replaceChars.shortDays[this.getDay()]},j:function(){return this.getDate()},l:function(){return Date.replaceChars.longDays[this.getDay()]},N:function(){return this.getDay()+1},S:function(){return this.getDate()%10==1&&this.getDate()!=11?"st":this.getDate()%10==2&&this.getDate()!=12?"nd":this.getDate()%10==3&&this.getDate()!=13?"rd":"th"},w:function(){return this.getDay()},z:function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil((this-a)/86400000)},W:function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil(((this-a)/86400000+a.getDay()+1)/7)},F:function(){return Date.replaceChars.longMonths[this.getMonth()]},m:function(){return(this.getMonth()<9?"0":"")+(this.getMonth()+1)},M:function(){return Date.replaceChars.shortMonths[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){var a=new Date;return(new Date(a.getFullYear(),a.getMonth(),0)).getDate()},L:function(){var a=this.getFullYear();return a%400==0||a%100!=0&&a%4==0},o:function(){var a=new Date(this.valueOf());a.setDate(a.getDate()-(this.getDay()+6)%7+3);return a.getFullYear()},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).substr(2)},a:function(){return this.getHours()<12?"am":"pm"},A:function(){return this.getHours()<12?"AM":"PM"},B:function(){return Math.floor(((this.getUTCHours()+1)%24+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)*1000/24)},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){return((this.getHours()%12||12)<10?"0":"")+(this.getHours()%12||12)},H:function(){return(this.getHours()<10?"0":"")+this.getHours()},i:function(){return(this.getMinutes()<10?"0":"")+this.getMinutes()},s:function(){return(this.getSeconds()<10?"0":"")+this.getSeconds()},u:function(){var a=this.getMilliseconds();return(a<10?"00":a<100?"0":"")+a},e:function(){return"Not Yet Supported"},I:function(){var c=null;for(var a=0;a<12;++a){var d=new Date(this.getFullYear(),a,1);var b=d.getTimezoneOffset();if(c===null){c=b}else{if(b<c){c=b;break}else{if(b>c){break}}}}return this.getTimezoneOffset()==c|0},O:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+"00"},P:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+":00"},T:function(){var b=this.getMonth();this.setMonth(0);var a=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,"$1");this.setMonth(b);return a},Z:function(){return -this.getTimezoneOffset()*60},c:function(){return this.format("Y-m-d\\TH:i:sP")},r:function(){return this.toString()},U:function(){return this.getTime()/1000}};function isMobileCfs(){var a=false;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))){a=true}return a}function isNumericCfs(a){if(jQuery.isNumeric){return jQuery.isNumeric(a)}return !isNaN(parseFloat(a))&&isFinite(a)}function toNumberCsf(b){var a=Number(b);return a}function toNumberCurrencyCfs(c){if(!c){return false}var a=/[+-]?\d+(\.\d+)?/,b=c.match(a).map(function(d){return parseFloat(d)});if(!isNaN(b[0])){return{num:b[0],strPattern:cfs_str_replace(c,b[0],"{{NUM}}")}}return false}function numberCurrencyToStrCfs(a){return cfs_str_replace(a.strPattern,"{{NUM}}",a.num)}function randCfs(b,a,d){var c=(Math.random()*(a-b))+b;return d?c:Math.round(c)}function cfsGetTxtEditorVal(a){if(typeof(tinyMCE)!=="undefined"&&tinyMCE.get(a)&&!jQuery("#"+a).is(":visible")&&tinyMCE.get(a).getDoc&&typeof(tinyMCE.get(a).getDoc)=="function"&&tinyMCE.get(a).getDoc()){return tinyMCE.get(a).getContent()}else{return jQuery("#"+a).val()}}function cfsSetTxtEditorVal(b,a){if(typeof(tinyMCE)!=="undefined"&&tinyMCE&&tinyMCE.get(b)&&!jQuery("#"+b).is(":visible")&&tinyMCE.get(b).getDoc&&typeof(tinyMCE.get(b).getDoc)=="function"&&tinyMCE.get(b).getDoc()){tinyMCE.get(b).setContent(a)}else{jQuery("#"+b).val(a)}}function cfsGetTxtEditor(a){if(typeof(tinyMCE)!=="undefined"&&tinyMCE&&tinyMCE.get(a)&&!jQuery("#"+a).is(":visible")&&tinyMCE.get(a).getDoc&&typeof(tinyMCE.get(a).getDoc)=="function"&&tinyMCE.get(a).getDoc()){return tinyMCE.get(a)}return null};
js/core.js CHANGED
@@ -85,8 +85,8 @@ jQuery.fn.sendFormCfs = function(params) {
85
  if(params.btn) {
86
  jQuery(params.btn).attr('disabled', 'disabled');
87
  // Font awesome usage
88
- params.btnIconElement = jQuery(params.btn).find('.fa').size() ? jQuery(params.btn).find('.fa') : jQuery(params.btn);
89
- if(jQuery(params.btn).find('.fa').size()) {
90
  params.btnIconElement
91
  .data('prev-class', params.btnIconElement.attr('class'))
92
  .attr('class', 'fa fa-spinner fa-spin');
@@ -248,7 +248,7 @@ function toeOptTimeoutHideDescriptionCfs() {
248
  */
249
  function toeOptShowDescriptionCfs(description, x, y, moveToLeft) {
250
  if(typeof(description) != 'undefined' && description != '') {
251
- if(!jQuery('#cfsOptDescription').size()) {
252
  jQuery('body').append('<div id="cfsOptDescription"></div>');
253
  }
254
  if(moveToLeft)
85
  if(params.btn) {
86
  jQuery(params.btn).attr('disabled', 'disabled');
87
  // Font awesome usage
88
+ params.btnIconElement = jQuery(params.btn).find('.fa').length ? jQuery(params.btn).find('.fa') : jQuery(params.btn);
89
+ if(jQuery(params.btn).find('.fa').length) {
90
  params.btnIconElement
91
  .data('prev-class', params.btnIconElement.attr('class'))
92
  .attr('class', 'fa fa-spinner fa-spin');
248
  */
249
  function toeOptShowDescriptionCfs(description, x, y, moveToLeft) {
250
  if(typeof(description) != 'undefined' && description != '') {
251
+ if(!jQuery('#cfsOptDescription').length) {
252
  jQuery('body').append('<div id="cfsOptDescription"></div>');
253
  }
254
  if(moveToLeft)
js/core.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- if(typeof(CFS_DATA)=="undefined"){var CFS_DATA={}}if(isNumber(CFS_DATA.animationSpeed)){CFS_DATA.animationSpeed=parseInt(CFS_DATA.animationSpeed)}else{if(jQuery.inArray(CFS_DATA.animationSpeed,["fast","slow"])==-1){CFS_DATA.animationSpeed="fast"}}CFS_DATA.showSubscreenOnCenter=parseInt(CFS_DATA.showSubscreenOnCenter);var sdLoaderImgCfs='<img src="'+CFS_DATA.loader+'" />';var g_cfsAnimationSpeed=300;jQuery.fn.showLoaderCfs=function(){return jQuery(this).html(sdLoaderImgCfs)};jQuery.fn.appendLoaderCfs=function(){jQuery(this).append(sdLoaderImgCfs)};jQuery.sendFormCfs=function(a){return jQuery("<br />").sendFormCfs(a)};jQuery.fn.sendFormCfs=function(e){var b=null;if(!e){e={fid:false,msgElID:false,onSuccess:false}}if(e.fid){b=jQuery("#"+fid)}else{b=jQuery(this)}var c=(jQuery(b).tagName()=="FORM");var f=new Array();if(e.data){f=e.data}else{if(c){f=jQuery(b).serialize()}}if(e.appendData){var h=typeof(f)=="string";var k=[];for(var g in e.appendData){if(h){k.push(g+"="+e.appendData[g])}else{f[g]=e.appendData[g]}}if(h){f+="&"+k.join("&")}}var d=null;if(e.msgElID){if(e.msgElID=="noMessages"){d=false}else{if(typeof(e.msgElID)=="object"){d=e.msgElID}else{d=jQuery("#"+e.msgElID)}}}if(typeof(e.inputsWraper)=="string"){b=jQuery("#"+e.inputsWraper);c=true}if(c&&b){jQuery(b).find("*").removeClass("cfsInputError")}if(d&&!e.btn){jQuery(d).removeClass("cfsSuccessMsg").removeClass("cfsErrorMsg");if(!e.btn){jQuery(d).showLoaderCfs()}}if(e.btn){jQuery(e.btn).attr("disabled","disabled");e.btnIconElement=jQuery(e.btn).find(".fa").size()?jQuery(e.btn).find(".fa"):jQuery(e.btn);if(jQuery(e.btn).find(".fa").size()){e.btnIconElement.data("prev-class",e.btnIconElement.attr("class")).attr("class","fa fa-spinner fa-spin")}}var a="";if(typeof(e.url)!="undefined"){a=e.url}else{if(typeof(ajaxurl)=="undefined"){a=CFS_DATA.ajaxurl}else{a=ajaxurl}}jQuery(".cfsErrorForField").hide(CFS_DATA.animationSpeed);var j=e.dataType?e.dataType:"json";if(typeof(f)=="string"){f+="&pl="+CFS_DATA.CFS_CODE;f+="&reqType=ajax"}else{f.pl=CFS_DATA.CFS_CODE;f.reqType="ajax"}jQuery.ajax({url:a,data:f,type:"POST",dataType:j,success:function(i){toeProcessAjaxResponseCfs(i,d,b,c,e);if(e.clearMsg){setTimeout(function(){if(d){jQuery(d).animateClear()}},typeof(e.clearMsg)=="boolean"?5000:e.clearMsg)}}})};jQuery.fn.animateClear=function(){var a=jQuery("<span>"+jQuery(this).html()+"</span>");jQuery(this).html(a);jQuery(a).hide(CFS_DATA.animationSpeed,function(){jQuery(a).remove()})};jQuery.fn.animateRemoveCfs=function(a,b){a=a==undefined?CFS_DATA.animationSpeed:a;jQuery(this).hide(a,function(){jQuery(this).remove();if(typeof(b)==="function"){b()}})};function toeProcessAjaxResponseCfs(h,e,c,d,f){if(typeof(f)=="undefined"){f={}}if(typeof(e)=="string"){e=jQuery("#"+e)}if(e){jQuery(e).html("")}if(f.btn){jQuery(f.btn).removeAttr("disabled");if(f.btnIconElement){f.btnIconElement.attr("class",f.btnIconElement.data("prev-class"))}}if(typeof(h)=="object"){if(h.error){if(e){jQuery(e).removeClass("cfsSuccessMsg").addClass("cfsErrorMsg")}var j=[];for(var a in h.errors){if(d){var b=jQuery(c).find('[name*="'+a+'"]');b.addClass("cfsInputError");if(b.attr("placeholder")){}if(!b.data("keyup-error-remove-binded")){b.keydown(function(){jQuery(this).removeClass("cfsInputError")}).data("keyup-error-remove-binded",1)}}if(jQuery(".cfsErrorForField.toe_"+nameToClassId(a)+"").exists()){jQuery(".cfsErrorForField.toe_"+nameToClassId(a)+"").show().html(h.errors[a])}else{if(e){jQuery(e).append(h.errors[a]).append("<br />")}else{j.push(h.errors[a])}}}if(j.length&&f.btn&&jQuery.fn.dialog&&!e){jQuery('<div title="'+toeLangCfs("Really small warning :)")+'" />').html(j.join("<br />")).appendTo("body").dialog({modal:true,width:"500px"})}}else{if(h.messages.length){if(e){jQuery(e).removeClass("cfsErrorMsg").addClass("cfsSuccessMsg");for(var g=0;g<h.messages.length;g++){jQuery(e).append(h.messages[g]).append("<br />")}}}}}if(f.onSuccess&&typeof(f.onSuccess)=="function"){f.onSuccess(h)}}function getDialogElementCfs(){return jQuery("<div/>").appendTo(jQuery("body"))}function toeOptionCfs(a){if(CFS_DATA.options&&CFS_DATA.options[a]){return CFS_DATA.options[a]}return false}function toeLangCfs(a){if(CFS_DATA.siteLang&&CFS_DATA.siteLang[a]){return CFS_DATA.siteLang[a]}return a}function toePagesCfs(a){if(typeof(CFS_DATA)!="undefined"&&CFS_DATA[a]){return CFS_DATA[a]}return false}function toeOptTimeoutHideDescriptionCfs(){jQuery("#cfsOptDescription").removeAttr("toeFixTip");setTimeout(function(){if(!jQuery("#cfsOptDescription").attr("toeFixTip")){toeOptHideDescriptionCfs()}},500)}function toeOptShowDescriptionCfs(b,a,d,c){if(typeof(b)!="undefined"&&b!=""){if(!jQuery("#cfsOptDescription").size()){jQuery("body").append('<div id="cfsOptDescription"></div>')}if(c){jQuery("#cfsOptDescription").css("right",jQuery(window).width()-(a-10))}else{jQuery("#cfsOptDescription").css("left",a+10)}jQuery("#cfsOptDescription").css("top",d);jQuery("#cfsOptDescription").show(200);jQuery("#cfsOptDescription").html(b)}}function toeOptHideDescriptionCfs(){jQuery("#cfsOptDescription").removeAttr("toeFixTip");jQuery("#cfsOptDescription").hide(200)}function toeInArrayCfs(c,b){if(b){for(var a in b){if(b[a]==c){return true}}}return false}function toeShowDialogCustomized(b,a){a=jQuery.extend({resizable:false,width:500,height:300,closeOnEscape:true,open:function(c,d){jQuery(".ui-dialog-titlebar").css({"background-color":"#222222","background-image":"none",border:"none",margin:"0",padding:"0","border-radius":"0",color:"#CFCFCF",height:"27px"});jQuery(".ui-dialog-titlebar-close").css({background:'url("'+CFS_DATA.cssPath+'img/tb-close.png") no-repeat scroll 0 0 transparent',border:"0",width:"15px",height:"15px",padding:"0","border-radius":"0",margin:"7px 7px 0"}).html("");jQuery(".ui-dialog").css({"border-radius":"3px","background-color":"#FFFFFF","background-image":"none",padding:"1px","z-index":"300000",position:"fixed",top:"60px"});jQuery(".ui-dialog-buttonpane").css({"background-color":"#FFFFFF"});jQuery(".ui-dialog-title").css({color:"#CFCFCF",font:"12px sans-serif",padding:"6px 10px 0"});if(a.openCallback&&typeof(a.openCallback)=="function"){a.openCallback(c,d)}jQuery(".ui-widget-overlay").css({"z-index":jQuery(c.target).parents(".ui-dialog:first").css("z-index")-1,"background-image":"none"});if(a.modal&&a.closeOnBg){jQuery(".ui-widget-overlay").unbind("click").bind("click",function(){jQuery(b).dialog("close")})}}},a);return jQuery(b).dialog(a)}function toeSliderMove(a,b){var c=jQuery(a.target).attr("id");jQuery("#toeSliderDisplay_"+c).html(b.value);jQuery("#toeSliderInput_"+c).val(b.value).change()}function cfsCorrectJqueryUsed(){return(typeof(jQuery.fn.sendFormCfs)==="function")}function cfsReloadCoreJs(d,e){var c="",b=["common.js","core.js"];for(var a=0;a<b.length;a++){c+='<script type="text/javascript" class="cfsReloadedScript" src="'+CFS_DATA.jsPath+b[a]+'"><\/script>'}jQuery("head").append(c);if(d){_cfsRunClbAfterCoreReload(d,e)}}function _cfsRunClbAfterCoreReload(a,b){if(cfsCorrectJqueryUsed()){callUserFuncArray(a,b);return}setTimeout(function(){cfsCorrectJqueryUsed(a,b)},500)}function base64_decode(d){var b="";var l,j,g="";var k,h,f,e="";var c=0;var a=/[^A-Za-z0-9\+\/\=]/g;if(a.exec(d)){alert("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding.")}d=d.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{k=keyStr.indexOf(d.charAt(c++));h=keyStr.indexOf(d.charAt(c++));f=keyStr.indexOf(d.charAt(c++));e=keyStr.indexOf(d.charAt(c++));l=(k<<2)|(h>>4);j=((h&15)<<4)|(f>>2);g=((f&3)<<6)|e;b=b+String.fromCharCode(l);if(f!=64){b=b+String.fromCharCode(j)}if(e!=64){b=b+String.fromCharCode(g)}l=j=g="";k=h=f=e=""}while(c<d.length);return unescape(b)};
1
 
2
+ if(typeof(CFS_DATA)=="undefined"){var CFS_DATA={}}if(isNumber(CFS_DATA.animationSpeed)){CFS_DATA.animationSpeed=parseInt(CFS_DATA.animationSpeed)}else{if(jQuery.inArray(CFS_DATA.animationSpeed,["fast","slow"])==-1){CFS_DATA.animationSpeed="fast"}}CFS_DATA.showSubscreenOnCenter=parseInt(CFS_DATA.showSubscreenOnCenter);var sdLoaderImgCfs='<img src="'+CFS_DATA.loader+'" />';var g_cfsAnimationSpeed=300;jQuery.fn.showLoaderCfs=function(){return jQuery(this).html(sdLoaderImgCfs)};jQuery.fn.appendLoaderCfs=function(){jQuery(this).append(sdLoaderImgCfs)};jQuery.sendFormCfs=function(a){return jQuery("<br />").sendFormCfs(a)};jQuery.fn.sendFormCfs=function(e){var b=null;if(!e){e={fid:false,msgElID:false,onSuccess:false}}if(e.fid){b=jQuery("#"+fid)}else{b=jQuery(this)}var c=(jQuery(b).tagName()=="FORM");var f=new Array();if(e.data){f=e.data}else{if(c){f=jQuery(b).serialize()}}if(e.appendData){var h=typeof(f)=="string";var k=[];for(var g in e.appendData){if(h){k.push(g+"="+e.appendData[g])}else{f[g]=e.appendData[g]}}if(h){f+="&"+k.join("&")}}var d=null;if(e.msgElID){if(e.msgElID=="noMessages"){d=false}else{if(typeof(e.msgElID)=="object"){d=e.msgElID}else{d=jQuery("#"+e.msgElID)}}}if(typeof(e.inputsWraper)=="string"){b=jQuery("#"+e.inputsWraper);c=true}if(c&&b){jQuery(b).find("*").removeClass("cfsInputError")}if(d&&!e.btn){jQuery(d).removeClass("cfsSuccessMsg").removeClass("cfsErrorMsg");if(!e.btn){jQuery(d).showLoaderCfs()}}if(e.btn){jQuery(e.btn).attr("disabled","disabled");e.btnIconElement=jQuery(e.btn).find(".fa").length?jQuery(e.btn).find(".fa"):jQuery(e.btn);if(jQuery(e.btn).find(".fa").length){e.btnIconElement.data("prev-class",e.btnIconElement.attr("class")).attr("class","fa fa-spinner fa-spin")}}var a="";if(typeof(e.url)!="undefined"){a=e.url}else{if(typeof(ajaxurl)=="undefined"){a=CFS_DATA.ajaxurl}else{a=ajaxurl}}jQuery(".cfsErrorForField").hide(CFS_DATA.animationSpeed);var j=e.dataType?e.dataType:"json";if(typeof(f)=="string"){f+="&pl="+CFS_DATA.CFS_CODE;f+="&reqType=ajax"}else{f.pl=CFS_DATA.CFS_CODE;f.reqType="ajax"}jQuery.ajax({url:a,data:f,type:"POST",dataType:j,success:function(i){toeProcessAjaxResponseCfs(i,d,b,c,e);if(e.clearMsg){setTimeout(function(){if(d){jQuery(d).animateClear()}},typeof(e.clearMsg)=="boolean"?5000:e.clearMsg)}}})};jQuery.fn.animateClear=function(){var a=jQuery("<span>"+jQuery(this).html()+"</span>");jQuery(this).html(a);jQuery(a).hide(CFS_DATA.animationSpeed,function(){jQuery(a).remove()})};jQuery.fn.animateRemoveCfs=function(a,b){a=a==undefined?CFS_DATA.animationSpeed:a;jQuery(this).hide(a,function(){jQuery(this).remove();if(typeof(b)==="function"){b()}})};function toeProcessAjaxResponseCfs(h,e,c,d,f){if(typeof(f)=="undefined"){f={}}if(typeof(e)=="string"){e=jQuery("#"+e)}if(e){jQuery(e).html("")}if(f.btn){jQuery(f.btn).removeAttr("disabled");if(f.btnIconElement){f.btnIconElement.attr("class",f.btnIconElement.data("prev-class"))}}if(typeof(h)=="object"){if(h.error){if(e){jQuery(e).removeClass("cfsSuccessMsg").addClass("cfsErrorMsg")}var j=[];for(var a in h.errors){if(d){var b=jQuery(c).find('[name*="'+a+'"]');b.addClass("cfsInputError");if(b.attr("placeholder")){}if(!b.data("keyup-error-remove-binded")){b.keydown(function(){jQuery(this).removeClass("cfsInputError")}).data("keyup-error-remove-binded",1)}}if(jQuery(".cfsErrorForField.toe_"+nameToClassId(a)+"").exists()){jQuery(".cfsErrorForField.toe_"+nameToClassId(a)+"").show().html(h.errors[a])}else{if(e){jQuery(e).append(h.errors[a]).append("<br />")}else{j.push(h.errors[a])}}}if(j.length&&f.btn&&jQuery.fn.dialog&&!e){jQuery('<div title="'+toeLangCfs("Really small warning :)")+'" />').html(j.join("<br />")).appendTo("body").dialog({modal:true,width:"500px"})}}else{if(h.messages.length){if(e){jQuery(e).removeClass("cfsErrorMsg").addClass("cfsSuccessMsg");for(var g=0;g<h.messages.length;g++){jQuery(e).append(h.messages[g]).append("<br />")}}}}}if(f.onSuccess&&typeof(f.onSuccess)=="function"){f.onSuccess(h)}}function getDialogElementCfs(){return jQuery("<div/>").appendTo(jQuery("body"))}function toeOptionCfs(a){if(CFS_DATA.options&&CFS_DATA.options[a]){return CFS_DATA.options[a]}return false}function toeLangCfs(a){if(CFS_DATA.siteLang&&CFS_DATA.siteLang[a]){return CFS_DATA.siteLang[a]}return a}function toePagesCfs(a){if(typeof(CFS_DATA)!="undefined"&&CFS_DATA[a]){return CFS_DATA[a]}return false}function toeOptTimeoutHideDescriptionCfs(){jQuery("#cfsOptDescription").removeAttr("toeFixTip");setTimeout(function(){if(!jQuery("#cfsOptDescription").attr("toeFixTip")){toeOptHideDescriptionCfs()}},500)}function toeOptShowDescriptionCfs(b,a,d,c){if(typeof(b)!="undefined"&&b!=""){if(!jQuery("#cfsOptDescription").length){jQuery("body").append('<div id="cfsOptDescription"></div>')}if(c){jQuery("#cfsOptDescription").css("right",jQuery(window).width()-(a-10))}else{jQuery("#cfsOptDescription").css("left",a+10)}jQuery("#cfsOptDescription").css("top",d);jQuery("#cfsOptDescription").show(200);jQuery("#cfsOptDescription").html(b)}}function toeOptHideDescriptionCfs(){jQuery("#cfsOptDescription").removeAttr("toeFixTip");jQuery("#cfsOptDescription").hide(200)}function toeInArrayCfs(c,b){if(b){for(var a in b){if(b[a]==c){return true}}}return false}function toeShowDialogCustomized(b,a){a=jQuery.extend({resizable:false,width:500,height:300,closeOnEscape:true,open:function(c,d){jQuery(".ui-dialog-titlebar").css({"background-color":"#222222","background-image":"none",border:"none",margin:"0",padding:"0","border-radius":"0",color:"#CFCFCF",height:"27px"});jQuery(".ui-dialog-titlebar-close").css({background:'url("'+CFS_DATA.cssPath+'img/tb-close.png") no-repeat scroll 0 0 transparent',border:"0",width:"15px",height:"15px",padding:"0","border-radius":"0",margin:"7px 7px 0"}).html("");jQuery(".ui-dialog").css({"border-radius":"3px","background-color":"#FFFFFF","background-image":"none",padding:"1px","z-index":"300000",position:"fixed",top:"60px"});jQuery(".ui-dialog-buttonpane").css({"background-color":"#FFFFFF"});jQuery(".ui-dialog-title").css({color:"#CFCFCF",font:"12px sans-serif",padding:"6px 10px 0"});if(a.openCallback&&typeof(a.openCallback)=="function"){a.openCallback(c,d)}jQuery(".ui-widget-overlay").css({"z-index":jQuery(c.target).parents(".ui-dialog:first").css("z-index")-1,"background-image":"none"});if(a.modal&&a.closeOnBg){jQuery(".ui-widget-overlay").unbind("click").bind("click",function(){jQuery(b).dialog("close")})}}},a);return jQuery(b).dialog(a)}function toeSliderMove(a,b){var c=jQuery(a.target).attr("id");jQuery("#toeSliderDisplay_"+c).html(b.value);jQuery("#toeSliderInput_"+c).val(b.value).change()}function cfsCorrectJqueryUsed(){return(typeof(jQuery.fn.sendFormCfs)==="function")}function cfsReloadCoreJs(d,e){var c="",b=["common.js","core.js"];for(var a=0;a<b.length;a++){c+='<script type="text/javascript" class="cfsReloadedScript" src="'+CFS_DATA.jsPath+b[a]+'"><\/script>'}jQuery("head").append(c);if(d){_cfsRunClbAfterCoreReload(d,e)}}function _cfsRunClbAfterCoreReload(a,b){if(cfsCorrectJqueryUsed()){callUserFuncArray(a,b);return}setTimeout(function(){cfsCorrectJqueryUsed(a,b)},500)}function base64_decode(d){var b="";var l,j,g="";var k,h,f,e="";var c=0;var a=/[^A-Za-z0-9\+\/\=]/g;if(a.exec(d)){alert("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding.")}d=d.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{k=keyStr.indexOf(d.charAt(c++));h=keyStr.indexOf(d.charAt(c++));f=keyStr.indexOf(d.charAt(c++));e=keyStr.indexOf(d.charAt(c++));l=(k<<2)|(h>>4);j=((h&15)<<4)|(f>>2);g=((f&3)<<6)|e;b=b+String.fromCharCode(l);if(f!=64){b=b+String.fromCharCode(j)}if(e!=64){b=b+String.fromCharCode(g)}l=j=g="";k=h=f=e=""}while(c<d.length);return unescape(b)};
js/google.recaptcha.js CHANGED
@@ -11,7 +11,7 @@ function cfsInitCaptcha( $elements ) {
11
  return;
12
  }
13
  $elements = $elements ? $elements : jQuery(document).find('.g-recaptcha');
14
- if($elements && $elements.size()) {
15
  $elements.each(function(){
16
  var $this = jQuery(this);
17
  if(typeof $this.data('recaptcha-widget-id') == 'undefined') {
11
  return;
12
  }
13
  $elements = $elements ? $elements : jQuery(document).find('.g-recaptcha');
14
+ if($elements && $elements.length) {
15
  $elements.each(function(){
16
  var $this = jQuery(this);
17
  if(typeof $this.data('recaptcha-widget-id') == 'undefined') {
js/wp.tabs.js CHANGED
@@ -17,11 +17,11 @@
17
  });
18
  });
19
  var locationHash = document.location.hash;
20
- if(locationHash && locationHash != '' && $this.find(locationHash) && $this.find(locationHash).size()) {
21
  $this.wpTabs('activate', locationHash);
22
- if(jQuery(locationHash).size()) {
23
  // Avoid scrolling to hashes
24
- jQuery(window).load(function(){
25
  setTimeout(function(){
26
  jQuery('html, body').animate({
27
  scrollTop: 0
@@ -38,7 +38,7 @@
38
  , activate: function(selector) {
39
  return this.each(function(){
40
  var $this = $(this);
41
- if($this.find(selector).size()) {
42
  this._activeTab = selector;
43
  var navigations = $this.find('.nav-tab-wrapper:first').find('a.nav-tab:not(.notTab)');
44
  if(!this._firstInit) {
@@ -46,7 +46,7 @@
46
  $this.find('.cfsTabContent').attr('data-tabs-for', this._options.uniqId);
47
  this._firstInit = 1;
48
  }
49
- var allTabsContent = this._options.uniqId
50
  ? $this.find('.cfsTabContent[data-tabs-for="'+ this._options.uniqId + '"]')
51
  : $this.find('.cfsTabContent');
52
  //console.log();
@@ -77,4 +77,4 @@
77
  $.error( 'There are no method with name: '+ method);
78
  }
79
  };
80
- })( jQuery );
17
  });
18
  });
19
  var locationHash = document.location.hash;
20
+ if(locationHash && locationHash != '' && $this.find(locationHash) && $this.find(locationHash).length) {
21
  $this.wpTabs('activate', locationHash);
22
+ if(jQuery(locationHash).length) {
23
  // Avoid scrolling to hashes
24
+ jQuery(window).on('load',function(){
25
  setTimeout(function(){
26
  jQuery('html, body').animate({
27
  scrollTop: 0
38
  , activate: function(selector) {
39
  return this.each(function(){
40
  var $this = $(this);
41
+ if($this.find(selector).length) {
42
  this._activeTab = selector;
43
  var navigations = $this.find('.nav-tab-wrapper:first').find('a.nav-tab:not(.notTab)');
44
  if(!this._firstInit) {
46
  $this.find('.cfsTabContent').attr('data-tabs-for', this._options.uniqId);
47
  this._firstInit = 1;
48
  }
49
+ var allTabsContent = this._options.uniqId
50
  ? $this.find('.cfsTabContent[data-tabs-for="'+ this._options.uniqId + '"]')
51
  : $this.find('.cfsTabContent');
52
  //console.log();
77
  $.error( 'There are no method with name: '+ method);
78
  }
79
  };
80
+ })( jQuery );
modules/forms/js/admin.forms.edit.js CHANGED
@@ -35,7 +35,7 @@ jQuery(document).ready(function(){
35
  jQuery('#enableForMembership').on('change', function() {
36
  jQuery('#inpMembershipEnable').val(jQuery('#enableForMembership').val());
37
  });
38
-
39
  jQuery('#cfsFormEditForm').submit(function(){
40
  if(!cfsValidateFormSave()) {
41
  return false;
@@ -60,7 +60,7 @@ jQuery(document).ready(function(){
60
  , htmlEditor = jQuery('#cfsFormHtmlEditor').get(0).CodeMirrorEditor
61
  , cssSet = false
62
  , htmlSet = false;
63
-
64
  if(cssEditor) {
65
  if(cssEditor._cfsChanged) {
66
  jQuery('#cfsFormCssEditor').val( cssEditor.getValue() );
@@ -105,7 +105,7 @@ jQuery(document).ready(function(){
105
  });
106
  return false;
107
  });
108
-
109
  jQuery('.cfsBgTypeSelect').change(function(){
110
  var iter = jQuery(this).data('iter');
111
  jQuery('.cfsBgTypeShell_'+ iter).hide();
@@ -179,7 +179,7 @@ jQuery(document).ready(function(){
179
  // Fallback for case if library was not loaded
180
  if(!jQuery.fn.chosen) {
181
  jQuery.fn.chosen = function() {
182
-
183
  };
184
  }
185
  jQuery('.chosen').chosen({
@@ -314,8 +314,8 @@ jQuery(document).ready(function(){
314
  var $this = jQuery(this)
315
  , key = $this.data('key')
316
  , filesKey = 'sub_attach_'+ key;
317
- if(cfsForm.params
318
- && cfsForm.params.tpl
319
  && cfsForm.params.tpl[ filesKey ]
320
  ) {
321
  for(var i in cfsForm.params.tpl[ filesKey ]) {
@@ -398,7 +398,7 @@ function _cfsShowSaveFormErrorWnd( code ) {
398
  _setFileClb( params.file );
399
  }
400
  }*/
401
- jQuery(window).load(function(){
402
  cfsAdjustFormsEditTabs();
403
  });
404
  function cfsFinishEditFormLabel(label) {
@@ -429,7 +429,7 @@ function cfsAdjustFormsEditTabs(requring) {
429
  jQuery('#cfsFormEditTabs .supsystic-always-top')
430
  .outerWidth( jQuery('#cfsFormEditTabs').width() )
431
  .attr('data-code-tip', 'Width was set in admin.forms.edit.js - cfsAdjustFormsEditTabs()');
432
-
433
  var checkTabsNavs = ['#cfsFormEditTabs .nav-tab-wrapper:first'];
434
  for(var i = 0; i < checkTabsNavs.length; i++) {
435
  var tabs = jQuery(checkTabsNavs[i])
@@ -556,7 +556,7 @@ function cfsFormCheckSwitchActiveBtn() {
556
  jQuery('.cfsFormSwitchActive span').html( jQuery('.cfsFormSwitchActive').data('txt-off') )
557
  } else {
558
  jQuery('.cfsFormSwitchActive .fa').removeClass('fa-toggle-off').addClass('fa-toggle-on');
559
- jQuery('.cfsFormSwitchActive span').html( jQuery('.cfsFormSwitchActive').data('txt-on') );
560
  }
561
  }
562
  function cfsSaveForm() {
35
  jQuery('#enableForMembership').on('change', function() {
36
  jQuery('#inpMembershipEnable').val(jQuery('#enableForMembership').val());
37
  });
38
+
39
  jQuery('#cfsFormEditForm').submit(function(){
40
  if(!cfsValidateFormSave()) {
41
  return false;
60
  , htmlEditor = jQuery('#cfsFormHtmlEditor').get(0).CodeMirrorEditor
61
  , cssSet = false
62
  , htmlSet = false;
63
+
64
  if(cssEditor) {
65
  if(cssEditor._cfsChanged) {
66
  jQuery('#cfsFormCssEditor').val( cssEditor.getValue() );
105
  });
106
  return false;
107
  });
108
+
109
  jQuery('.cfsBgTypeSelect').change(function(){
110
  var iter = jQuery(this).data('iter');
111
  jQuery('.cfsBgTypeShell_'+ iter).hide();
179
  // Fallback for case if library was not loaded
180
  if(!jQuery.fn.chosen) {
181
  jQuery.fn.chosen = function() {
182
+
183
  };
184
  }
185
  jQuery('.chosen').chosen({
314
  var $this = jQuery(this)
315
  , key = $this.data('key')
316
  , filesKey = 'sub_attach_'+ key;
317
+ if(cfsForm.params
318
+ && cfsForm.params.tpl
319
  && cfsForm.params.tpl[ filesKey ]
320
  ) {
321
  for(var i in cfsForm.params.tpl[ filesKey ]) {
398
  _setFileClb( params.file );
399
  }
400
  }*/
401
+ jQuery(window).on('load',function(){
402
  cfsAdjustFormsEditTabs();
403
  });
404
  function cfsFinishEditFormLabel(label) {
429
  jQuery('#cfsFormEditTabs .supsystic-always-top')
430
  .outerWidth( jQuery('#cfsFormEditTabs').width() )
431
  .attr('data-code-tip', 'Width was set in admin.forms.edit.js - cfsAdjustFormsEditTabs()');
432
+
433
  var checkTabsNavs = ['#cfsFormEditTabs .nav-tab-wrapper:first'];
434
  for(var i = 0; i < checkTabsNavs.length; i++) {
435
  var tabs = jQuery(checkTabsNavs[i])
556
  jQuery('.cfsFormSwitchActive span').html( jQuery('.cfsFormSwitchActive').data('txt-off') )
557
  } else {
558
  jQuery('.cfsFormSwitchActive .fa').removeClass('fa-toggle-off').addClass('fa-toggle-on');
559
+ jQuery('.cfsFormSwitchActive span').html( jQuery('.cfsFormSwitchActive').data('txt-on') );
560
  }
561
  }
562
  function cfsSaveForm() {
modules/forms/js/admin.forms.fields.js CHANGED
@@ -164,7 +164,7 @@ var g_cfsFieldsFrame = {
164
  // Add new fields - right before last submit or button, as this should be desired by users.
165
  // In any case - there are always possibility to drag field in any other place
166
  var $shells = self._$mainShell.find('.cfsFieldShell');
167
- if($shells && $shells.size()) {
168
  $shells.each(function(){
169
  var html = jQuery(this).data('html');
170
  if(toeInArrayCfs(html, ['submit', 'button'])) {
@@ -245,7 +245,7 @@ var g_cfsFieldsFrame = {
245
  this._$editWnd.find('.nav-tab').show();
246
  for(var i = 0; i < tabsIds.length; i++) {
247
  var $tab = this._$editWnd.find('#'+ tabsIds[ i ]);
248
- if(!$tab.find('.cfsFieldParamRow[data-show-for-field=1]').size()) {
249
  $tab.hide();
250
  this._$editWnd.find('.nav-tab[href="#'+ tabsIds[ i ]+ '"]').hide();
251
  }
@@ -435,7 +435,7 @@ var g_cfsFieldsFrame = {
435
  this._hideEditFieldErrors();
436
  // Clear all color pickers
437
  var $colorPickers = this._$editWnd.find('.wp-color-picker');
438
- if($colorPickers && $colorPickers.size() && $colorPickers.wpColorPicker) {
439
  $colorPickers.each(function(){
440
  var $this = jQuery(this);
441
  if( $this.wpColorPicker ) {
@@ -451,7 +451,7 @@ var g_cfsFieldsFrame = {
451
  , fillInEditWnd: function( field, isCreate ) {
452
  for(var key in field) {
453
  var $input = this._$editWnd.find('[name="'+ key+ '"]');
454
- if($input && $input.size()) {
455
  if(this._fields[ key ]) {
456
  switch(this._fields[ key ].html) {
457
  case 'checkbox':
@@ -590,7 +590,7 @@ var g_cfsFieldsFrame = {
590
  var $input = $shell.find('[name*="['+ k+ ']"]')
591
  , value = data[ k ];
592
 
593
- if(!$input || !$input.size()) {
594
  $input = this._createShellFieldField( $shell, k );
595
  }
596
  switch(fieldFields[ k ].html) {
@@ -671,7 +671,7 @@ var g_cfsFieldsFrame = {
671
  var forArr = this._cfsFor
672
  , notForArr = this._cfsNotFor
673
  , $inputs = jQuery(this).find(':input');
674
- if((forArr || notForArr) && $inputs && $inputs.size() > 0) {
675
  $inputs.each(function(){
676
  var inputName = jQuery(this).attr('name');
677
  // Those should be present at all
@@ -734,7 +734,7 @@ var g_cfsFieldsFrame = {
734
  }
735
  , _assignRowShellsClasses: function( $row, newBsClassId ) {
736
  var $shells = $row.find('.cfsFieldShell')
737
- , shellsNum = $shells.size();
738
  if(!shellsNum) { // No fields in this row - we don't need this anymore. Cruel world.........
739
  $row.remove();
740
  return;
@@ -958,8 +958,8 @@ var g_cfsFieldsFrame = {
958
  });
959
  }
960
  , haveSubmitField: function() {
961
- return (this._$mainShell.find('input[name*="[html]"][value="submit"]').size()
962
- || this._$mainShell.find('input[name*="[html]"][value="button"]').size());
963
  }
964
  , getFieldsList: function() {
965
  var htmlData = this._$mainShell.serializeAnythingDeepCfs();
164
  // Add new fields - right before last submit or button, as this should be desired by users.
165
  // In any case - there are always possibility to drag field in any other place
166
  var $shells = self._$mainShell.find('.cfsFieldShell');
167
+ if($shells && $shells.length) {
168
  $shells.each(function(){
169
  var html = jQuery(this).data('html');
170
  if(toeInArrayCfs(html, ['submit', 'button'])) {
245
  this._$editWnd.find('.nav-tab').show();
246
  for(var i = 0; i < tabsIds.length; i++) {
247
  var $tab = this._$editWnd.find('#'+ tabsIds[ i ]);
248
+ if(!$tab.find('.cfsFieldParamRow[data-show-for-field=1]').length) {
249
  $tab.hide();
250
  this._$editWnd.find('.nav-tab[href="#'+ tabsIds[ i ]+ '"]').hide();
251
  }
435
  this._hideEditFieldErrors();
436
  // Clear all color pickers
437
  var $colorPickers = this._$editWnd.find('.wp-color-picker');
438
+ if($colorPickers && $colorPickers.length && $colorPickers.wpColorPicker) {
439
  $colorPickers.each(function(){
440
  var $this = jQuery(this);
441
  if( $this.wpColorPicker ) {
451
  , fillInEditWnd: function( field, isCreate ) {
452
  for(var key in field) {
453
  var $input = this._$editWnd.find('[name="'+ key+ '"]');
454
+ if($input && $input.length) {
455
  if(this._fields[ key ]) {
456
  switch(this._fields[ key ].html) {
457
  case 'checkbox':
590
  var $input = $shell.find('[name*="['+ k+ ']"]')
591
  , value = data[ k ];
592
 
593
+ if(!$input || !$input.length) {
594
  $input = this._createShellFieldField( $shell, k );
595
  }
596
  switch(fieldFields[ k ].html) {
671
  var forArr = this._cfsFor
672
  , notForArr = this._cfsNotFor
673
  , $inputs = jQuery(this).find(':input');
674
+ if((forArr || notForArr) && $inputs && $inputs.length > 0) {
675
  $inputs.each(function(){
676
  var inputName = jQuery(this).attr('name');
677
  // Those should be present at all
734
  }
735
  , _assignRowShellsClasses: function( $row, newBsClassId ) {
736
  var $shells = $row.find('.cfsFieldShell')
737
+ , shellsNum = $shells.length;
738
  if(!shellsNum) { // No fields in this row - we don't need this anymore. Cruel world.........
739
  $row.remove();
740
  return;
958
  });
959
  }
960
  , haveSubmitField: function() {
961
+ return (this._$mainShell.find('input[name*="[html]"][value="submit"]').length
962
+ || this._$mainShell.find('input[name*="[html]"][value="button"]').length);
963
  }
964
  , getFieldsList: function() {
965
  var htmlData = this._$mainShell.serializeAnythingDeepCfs();
modules/forms/js/admin.forms.js CHANGED
@@ -5,7 +5,7 @@ jQuery(document).ready(function(){
5
  } else { // Creating new forms
6
  cfsInitCreateFormDialog();
7
  }
8
- if(jQuery('.cfsTplPrevImg').size()) { // If on creation page
9
  cfsAdjustPreviewSize();
10
  jQuery(window).resize(function(){
11
  cfsAdjustPreviewSize();
5
  } else { // Creating new forms
6
  cfsInitCreateFormDialog();
7
  }
8
+ if(jQuery('.cfsTplPrevImg').length) { // If on creation page
9
  cfsAdjustPreviewSize();
10
  jQuery(window).resize(function(){
11
  cfsAdjustPreviewSize();
modules/forms/js/admin.forms.statistics.js CHANGED
@@ -5,7 +5,7 @@ jQuery(document).ready(function(){
5
  return false;
6
  }
7
  cfsInitChartsControls();
8
- google.charts.load('current', {'packages':['corechart']});
9
  google.charts.setOnLoadCallback(cfsInitCharts);
10
  });
11
  function cfsInitCharts() {
@@ -45,7 +45,7 @@ function cfsDrawChart( data, elmId, params ) {
45
  , dateFromTs = 0
46
  , dateToTs = 0
47
  , $chartTypeBtn = jQuery('#cfsFormStatistics').find('.cfsStatChartTypeBtn[data-chart="'+ elmId +'"].focus')
48
- , chartType = $chartTypeBtn && $chartTypeBtn.size() ? $chartTypeBtn.data('type') : 'line';
49
  if(dateFrom) {
50
  dateFromTs = new Date( dateFrom ).getTime();
51
  }
@@ -75,7 +75,7 @@ function cfsDrawChart( data, elmId, params ) {
75
  isPointsOnly = datesExistsSorted.length < 2;
76
  for(var i = 0; i < data.length; i++) {
77
  for(var k = 0; k < datesExistsSorted.length; k++) {
78
-
79
  var dateFound = false
80
  , date = datesExistsSorted[ k ].str
81
  , chartDate = isPointsOnly ? _cfsFormatDate(datesExistsSorted[ k ].dateObj) : datesExistsSorted[ k ].dateObj
@@ -115,7 +115,7 @@ function cfsDrawChart( data, elmId, params ) {
115
  } else {
116
  // The explorer option allows users to pan and zoom Google charts. This feature is experimental and may change in future releases.
117
  // see https://developers.google.com/chart/interactive/docs/gallery/linechart#configuration-options
118
- // Note: The explorer only works with continuous axes (such as numbers or dates).
119
  // On practice: this featureis not work if there are only points on chart.
120
  options.explorer = {
121
  actions: ['dragToZoom', 'rightClickToReset']
@@ -135,8 +135,8 @@ function cfsDrawChart( data, elmId, params ) {
135
  }
136
  function cfsRefreshCharts() {
137
  for(var elmId in g_cfsChart) {
138
- if(g_cfsChart[ elmId ]
139
- && g_cfsChart[ elmId ].chart
140
  && g_cfsChart[ elmId ].tbl
141
  && !g_cfsChart[ elmId ].viewportRefreshed
142
  ) {
@@ -270,4 +270,4 @@ function cfsGetStats(chartId, clb, btn, addData) {
270
  }
271
  }
272
  });
273
- }
5
  return false;
6
  }
7
  cfsInitChartsControls();
8
+ google.charts.on('load','current', {'packages':['corechart']});
9
  google.charts.setOnLoadCallback(cfsInitCharts);
10
  });
11
  function cfsInitCharts() {
45
  , dateFromTs = 0
46
  , dateToTs = 0
47
  , $chartTypeBtn = jQuery('#cfsFormStatistics').find('.cfsStatChartTypeBtn[data-chart="'+ elmId +'"].focus')
48
+ , chartType = $chartTypeBtn && $chartTypeBtn.length ? $chartTypeBtn.data('type') : 'line';
49
  if(dateFrom) {
50
  dateFromTs = new Date( dateFrom ).getTime();
51
  }
75
  isPointsOnly = datesExistsSorted.length < 2;
76
  for(var i = 0; i < data.length; i++) {
77
  for(var k = 0; k < datesExistsSorted.length; k++) {
78
+
79
  var dateFound = false
80
  , date = datesExistsSorted[ k ].str
81
  , chartDate = isPointsOnly ? _cfsFormatDate(datesExistsSorted[ k ].dateObj) : datesExistsSorted[ k ].dateObj
115
  } else {
116
  // The explorer option allows users to pan and zoom Google charts. This feature is experimental and may change in future releases.
117
  // see https://developers.google.com/chart/interactive/docs/gallery/linechart#configuration-options
118
+ // Note: The explorer only works with continuous axes (such as numbers or dates).
119
  // On practice: this featureis not work if there are only points on chart.
120
  options.explorer = {
121
  actions: ['dragToZoom', 'rightClickToReset']
135
  }
136
  function cfsRefreshCharts() {
137
  for(var elmId in g_cfsChart) {
138
+ if(g_cfsChart[ elmId ]
139
+ && g_cfsChart[ elmId ].chart
140
  && g_cfsChart[ elmId ].tbl
141
  && !g_cfsChart[ elmId ].viewportRefreshed
142
  ) {
270
  }
271
  }
272
  });
273
+ }
modules/forms/js/admin.forms.submit.js CHANGED
@@ -79,7 +79,7 @@ var g_cfsFormsSubmit = {
79
  , fillInSubmitOpts: function( data, $shell ) {
80
  for(var key in data) {
81
  var $input = $shell.find('[name*="['+ key+ ']"]');
82
- if($input && $input.size()) {
83
  var value = data[ key ];
84
  if(key == 'to' && value == 'admin@mail.com') continue;
85
  $input.val( value );
@@ -99,7 +99,7 @@ var g_cfsFormsSubmit = {
99
  });
100
  }
101
  , haveSubmitData: function() {
102
- return this._$mainShell.find('.cfsFormSubmitToShell:not(#cfsFormSubmitToShellEx)').size();
103
  }
104
  };
105
  jQuery(document).ready(function(){
79
  , fillInSubmitOpts: function( data, $shell ) {
80
  for(var key in data) {
81
  var $input = $shell.find('[name*="['+ key+ ']"]');
82
+ if($input && $input.length) {
83
  var value = data[ key ];
84
  if(key == 'to' && value == 'admin@mail.com') continue;
85
  $input.val( value );
99
  });
100
  }
101
  , haveSubmitData: function() {
102
+ return this._$mainShell.find('.cfsFormSubmitToShell:not(#cfsFormSubmitToShellEx)').length;
103
  }
104
  };
105
  jQuery(document).ready(function(){
modules/forms/js/frontend.forms.js CHANGED
@@ -109,7 +109,7 @@ cfsForm.prototype.getFieldInput = function( name ) {
109
  };
110
  cfsForm.prototype._bindFieldsMatchValidation = function() {
111
  var $bindToFields = this._$.find('[data-equal-to]');
112
- if($bindToFields && $bindToFields.size()) {
113
  var self = this;
114
  $bindToFields.change(function(){ // Validate on field change itself
115
  var $this = jQuery(this)
@@ -141,7 +141,7 @@ cfsForm.prototype._bindHtml5Support = function() {
141
  var key = checkTypes[ i ];
142
  if(typeof(key) === 'string' && !ModernizrCfs.inputtypes[ key ]) {
143
  var $inputs = this._$.find('[type="'+ key+ '"]');
144
- if($inputs && $inputs.size()) {
145
  g_cfsFieldsAdapt[ key ]( $inputs );
146
  }
147
  }
@@ -156,7 +156,7 @@ cfsForm.prototype._checkTimePickers = function() {
156
  && fields[ i ].time_format != 'am_pm'
157
  ) {
158
  var $input = this.getFieldInput( fields[ i ].name );
159
- if($input && $input.size()) {
160
  if( $input.hasClass() ) { // Time input was inited
161
  $input.timepicker('option', {timeFormat: 'H:i:s'});
162
  } else {
@@ -200,7 +200,7 @@ cfsForm.prototype._setFieldInvalidMsg = function( fieldHtml ) {
200
  };
201
  cfsForm.prototype.getFieldHtml = function( name ) {
202
  var $field = this._$.find('[name="fields['+ name+ ']"]');
203
- return $field && $field.size() ? $field : false;
204
  };
205
  cfsForm.prototype._bindLove = function() {
206
  if(parseInt(toeOptionCfs('add_love_link'))) {
@@ -214,7 +214,7 @@ cfsForm.prototype._addStat = function( action, isUnique ) {
214
  });
215
  };
216
  cfsForm.prototype.getShell = function( checkExists ) {
217
- if(!this._$ || (checkExists && !this._$.size())) {
218
  this._$ = jQuery('#'+ this._data.view_html_id);
219
  }
220
  return this._$;
@@ -257,7 +257,7 @@ cfsForm.prototype._bindSubmit = function() {
257
  var afterRemoveClb = false;
258
  // If form is in PopUp - let's relocate it correctly after form html will be removed
259
  // so PopUp will be still in the center of the screen
260
- if($inPopup && $inPopup.size()) {
261
  afterRemoveClb = function() {
262
  if(typeof(ppsGetPopupByViewId) === 'function') {
263
  _ppsPositionPopup({
@@ -285,7 +285,7 @@ cfsForm.prototype._bindSubmit = function() {
285
  toeRedirect(res.data.redirect, parseInt(self._data.params.tpl.redirect_on_submit_new_wnd));
286
  }
287
  jQuery(document).trigger('cfsAfterFormSubmitSuccess', self);
288
- if($inPopup && $inPopup.size()) {
289
  if(typeof(ppsGetPopupByViewId) === 'function') {
290
  jQuery(document).trigger('ppsAfterPopupsActionDone', {
291
  popup: ppsGetPopupByViewId( $inPopup.data('view-id') )
@@ -430,7 +430,7 @@ var g_cfsForms = {
430
  function cfsCheckInitForms(selector) {
431
  // New way to pass data - pass it from the form HTML to avoid multiple adding in JS
432
  var $formsData = selector ? jQuery(selector).find('.cfsFormDesc') : jQuery('.cfsFormDesc');
433
- if($formsData && $formsData.size()) {
434
  var newFormsData = [];
435
  $formsData.each(function(){
436
  var formData = typeof(atob) === 'function' ? atob(jQuery(this).text()) : base64_decode(jQuery(this).text());
109
  };
110
  cfsForm.prototype._bindFieldsMatchValidation = function() {
111
  var $bindToFields = this._$.find('[data-equal-to]');
112
+ if($bindToFields && $bindToFields.length) {
113
  var self = this;
114
  $bindToFields.change(function(){ // Validate on field change itself
115
  var $this = jQuery(this)
141
  var key = checkTypes[ i ];
142
  if(typeof(key) === 'string' && !ModernizrCfs.inputtypes[ key ]) {
143
  var $inputs = this._$.find('[type="'+ key+ '"]');
144
+ if($inputs && $inputs.length) {
145
  g_cfsFieldsAdapt[ key ]( $inputs );
146
  }
147
  }
156
  && fields[ i ].time_format != 'am_pm'
157
  ) {
158
  var $input = this.getFieldInput( fields[ i ].name );
159
+ if($input && $input.length) {
160
  if( $input.hasClass() ) { // Time input was inited
161
  $input.timepicker('option', {timeFormat: 'H:i:s'});
162
  } else {
200
  };
201
  cfsForm.prototype.getFieldHtml = function( name ) {
202
  var $field = this._$.find('[name="fields['+ name+ ']"]');
203
+ return $field && $field.length ? $field : false;
204
  };
205
  cfsForm.prototype._bindLove = function() {
206
  if(parseInt(toeOptionCfs('add_love_link'))) {
214
  });
215
  };
216
  cfsForm.prototype.getShell = function( checkExists ) {
217
+ if(!this._$ || (checkExists && !this._$.length)) {
218
  this._$ = jQuery('#'+ this._data.view_html_id);
219
  }
220
  return this._$;
257
  var afterRemoveClb = false;
258
  // If form is in PopUp - let's relocate it correctly after form html will be removed
259
  // so PopUp will be still in the center of the screen
260
+ if($inPopup && $inPopup.length) {
261
  afterRemoveClb = function() {
262
  if(typeof(ppsGetPopupByViewId) === 'function') {
263
  _ppsPositionPopup({
285
  toeRedirect(res.data.redirect, parseInt(self._data.params.tpl.redirect_on_submit_new_wnd));
286
  }
287
  jQuery(document).trigger('cfsAfterFormSubmitSuccess', self);
288
+ if($inPopup && $inPopup.length) {
289
  if(typeof(ppsGetPopupByViewId) === 'function') {
290
  jQuery(document).trigger('ppsAfterPopupsActionDone', {
291
  popup: ppsGetPopupByViewId( $inPopup.data('view-id') )
430
  function cfsCheckInitForms(selector) {
431
  // New way to pass data - pass it from the form HTML to avoid multiple adding in JS
432
  var $formsData = selector ? jQuery(selector).find('.cfsFormDesc') : jQuery('.cfsFormDesc');
433
+ if($formsData && $formsData.length) {
434
  var newFormsData = [];
435
  $formsData.each(function(){
436
  var formData = typeof(atob) === 'function' ? atob(jQuery(this).text()) : base64_decode(jQuery(this).text());
modules/forms/views/tpl/formsEditAdmin.php CHANGED
@@ -43,7 +43,7 @@
43
  <div id="cfsFormPreview" style="">
44
  <iframe id="cfsFormPreviewFrame" width="" height="" frameborder="0" src="" style=""></iframe>
45
  <script type="text/javascript">
46
- jQuery('#cfsFormPreviewFrame').load(function(){
47
  if(typeof(cfsHidePreviewUpdating) === 'function')
48
  cfsHidePreviewUpdating();
49
  var $contentDoc = jQuery(this).contents()
@@ -68,7 +68,7 @@
68
  if(typeof(cfsForm) !== 'undefined') {
69
  var addMoveForms = []; // Nothing here for now
70
  for(var i = 0; i < addMoveForms.length; i++) {
71
- if(cfsForm.id == addMoveForms[i].id
72
  || cfsForm.original_id == addMoveForms[i].id
73
  ) {
74
  if(addMoveForms[i].top) {
@@ -117,4 +117,4 @@
117
  <div class="cfsSaveFormErrorEx" data-code="submit_data">
118
  <?php _e('You have no data to submit to in your form - in this case all form data will not be send anywhere. Go to Submit Options tab - and add there at least one data submit block - and then save your form.', CFS_LANG_CODE)?>
119
  </div>
120
- </div>
43
  <div id="cfsFormPreview" style="">
44
  <iframe id="cfsFormPreviewFrame" width="" height="" frameborder="0" src="" style=""></iframe>
45
  <script type="text/javascript">
46
+ jQuery('#cfsFormPreviewFrame').on('load',function(){
47
  if(typeof(cfsHidePreviewUpdating) === 'function')
48
  cfsHidePreviewUpdating();
49
  var $contentDoc = jQuery(this).contents()
68
  if(typeof(cfsForm) !== 'undefined') {
69
  var addMoveForms = []; // Nothing here for now
70
  for(var i = 0; i < addMoveForms.length; i++) {
71
+ if(cfsForm.id == addMoveForms[i].id
72
  || cfsForm.original_id == addMoveForms[i].id
73
  ) {
74
  if(addMoveForms[i].top) {
117
  <div class="cfsSaveFormErrorEx" data-code="submit_data">
118
  <?php _e('You have no data to submit to in your form - in this case all form data will not be send anywhere. Go to Submit Options tab - and add there at least one data submit block - and then save your form.', CFS_LANG_CODE)?>
119
  </div>
120
+ </div>
modules/mail/mod.php CHANGED
@@ -70,9 +70,17 @@ class mailCfs extends moduleCfs {
70
  return $this->_sendMailMailer;
71
  }
72
  private function _connectPhpMailer() {
73
- if(!function_exists('PHPMailerAutoload')) {
74
- require_once( $this->getModDir(). 'engines'. DS. 'PHPMailerAutoload.php');
75
- }
 
 
 
 
 
 
 
 
76
  }
77
  public function sendSendMailMail($to, $subject, $message, $fromName = '', $fromEmail = '', $replyToName = '', $replyToEmail = '', $additionalHeaders = array(), $additionalParameters = array()) {
78
  $this->_getSendMailMailer();
70
  return $this->_sendMailMailer;
71
  }
72
  private function _connectPhpMailer() {
73
+ global $wp_version;
74
+ if ( version_compare( $wp_version, '5.5', '>=' ) ) {
75
+ if (!class_exists('PHPMailer', false)) {
76
+ require_once ( ABSPATH . WPINC . '/PHPMailer/PHPMailer.php' );
77
+ require_once ( ABSPATH . WPINC . '/PHPMailer/Exception.php' );
78
+ }
79
+ } else {
80
+ if(!function_exists('PHPMailerAutoload')) {
81
+ require_once( $this->getModDir(). 'engines'. DS. 'PHPMailerAutoload.php');
82
+ }
83
+ }
84
  }
85
  public function sendSendMailMail($to, $subject, $message, $fromName = '', $fromEmail = '', $replyToName = '', $replyToEmail = '', $additionalHeaders = array(), $additionalParameters = array()) {
86
  $this->_getSendMailMailer();
modules/options/js/admin.settings.js CHANGED
@@ -11,7 +11,7 @@ jQuery(document).ready(function(){
11
  });
12
  /*Connected options: some options need to be visible only if in other options selected special value (e.g. if send engine SMTP - show SMTP options)*/
13
  var $connectOpts = jQuery('#cfsSettingsForm').find('[data-connect]');
14
- if($connectOpts && $connectOpts.size()) {
15
  var $connectedTo = {};
16
  $connectOpts.each(function(){
17
  var connectToData = jQuery(this).data('connect').split(':')
11
  });
12
  /*Connected options: some options need to be visible only if in other options selected special value (e.g. if send engine SMTP - show SMTP options)*/
13
  var $connectOpts = jQuery('#cfsSettingsForm').find('[data-connect]');
14
+ if($connectOpts && $connectOpts.length) {
15
  var $connectedTo = {};
16
  $connectOpts.each(function(){
17
  var connectToData = jQuery(this).data('connect').split(':')
modules/supsystic_promo/js/admin.tour.js CHANGED
@@ -46,7 +46,7 @@ function _cfsOpenPointerAndFormTab(tourId, pointId, tab) {
46
  function _cfsOpenPointer(tourId, pointId) {
47
  var pointer = cfsAdminTourData.tour[ tourId ].points[ pointId ];
48
  var $content = cfsAdminTourData._$.find('#supsystic-'+ tourId+ '-'+ pointId);
49
- if(!jQuery(pointer.target) || !jQuery(pointer.target).size())
50
  return;
51
  if(g_cfsCurrTour) {
52
  _cfsTourSendNext(g_cfsCurrTour._tourId, g_cfsCurrTour._pointId);
@@ -70,7 +70,7 @@ function _cfsOpenPointer(tourId, pointId) {
70
  , $closeBtn = $btnsShell.find('.close')
71
  , $finishBtn = $btnsShell.find('.supsystic-tour-finish-btn');
72
 
73
- if($finishBtn && $finishBtn.size()) {
74
  $finishBtn.click(function(e){
75
  e.preventDefault();
76
  jQuery.sendFormCfs({
@@ -80,7 +80,7 @@ function _cfsOpenPointer(tourId, pointId) {
80
  g_cfsCurrTour.element.pointer('close');
81
  });
82
  }
83
- if($closeBtn && $closeBtn.size()) {
84
  $closeBtn.bind( 'click.pointer', function(e) {
85
  e.preventDefault();
86
  jQuery.sendFormCfs({
46
  function _cfsOpenPointer(tourId, pointId) {
47
  var pointer = cfsAdminTourData.tour[ tourId ].points[ pointId ];
48
  var $content = cfsAdminTourData._$.find('#supsystic-'+ tourId+ '-'+ pointId);
49
+ if(!jQuery(pointer.target) || !jQuery(pointer.target).length)
50
  return;
51
  if(g_cfsCurrTour) {
52
  _cfsTourSendNext(g_cfsCurrTour._tourId, g_cfsCurrTour._pointId);
70
  , $closeBtn = $btnsShell.find('.close')
71
  , $finishBtn = $btnsShell.find('.supsystic-tour-finish-btn');
72
 
73
+ if($finishBtn && $finishBtn.length) {
74
  $finishBtn.click(function(e){
75
  e.preventDefault();
76
  jQuery.sendFormCfs({
80
  g_cfsCurrTour.element.pointer('close');
81
  });
82
  }
83
+ if($closeBtn && $closeBtn.length) {
84
  $closeBtn.bind( 'click.pointer', function(e) {
85
  e.preventDefault();
86
  jQuery.sendFormCfs({
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === Contact Form by Supsystic ===
2
  Contributors: supsystic.com
3
  Tags: captcha, contact, contact form, contact form builder, contact form maker, contact form manager, contact form plugin, contact forms, contact us, custom form, feedback form, form, forms, forms creator, forms plugin, survey, quiz, subscription form, popup form
4
- Tested up to: 5.3
5
- Stable tag: 1.7.3
6
 
7
  Contact Form Builder with drag-and-drop editor to create responsive, mobile ready contact forms in a second. Custom fields and contact form templates
8
 
@@ -202,6 +202,13 @@ Using Contact Form plugin on your WordPress site, you start a really responsive
202
 
203
  Contact Form admin interface
204
  == Changelog ==
 
 
 
 
 
 
 
205
  = 1.7.3 / 23.01.2020 =
206
  * Broken images on open
207
 
1
  === Contact Form by Supsystic ===
2
  Contributors: supsystic.com
3
  Tags: captcha, contact, contact form, contact form builder, contact form maker, contact form manager, contact form plugin, contact forms, contact us, custom form, feedback form, form, forms, forms creator, forms plugin, survey, quiz, subscription form, popup form
4
+ Tested up to: 5.5
5
+ Stable tag: 1.7.5
6
 
7
  Contact Form Builder with drag-and-drop editor to create responsive, mobile ready contact forms in a second. Custom fields and contact form templates
8
 
202
 
203
  Contact Form admin interface
204
  == Changelog ==
205
+
206
+ = 1.7.5 / 15.09.2020 =
207
+ * Add support WP 5.5
208
+
209
+ = 1.7.4 / 23.06.2020 =
210
+ * Migrate to PHP 7.4
211
+
212
  = 1.7.3 / 23.01.2020 =
213
  * Broken images on open
214