YITH WooCommerce Ajax Search - Version 1.7.7

Version Description

  • Released on 23 April 2020 =
  • New: Support for WooCommerce 4.1
  • Update: Plugin framework
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Ajax Search
Version 1.7.7
Comparing to
See all releases

Code changes from version 1.7.6 to 1.7.7

Files changed (163) hide show
  1. README.txt +5 -1
  2. assets/css/admin.css +0 -0
  3. assets/css/yith_wcas_ajax_search.css +0 -0
  4. assets/images/01.jpg +0 -0
  5. assets/images/02.png +0 -0
  6. assets/images/03.jpg +0 -0
  7. assets/images/ajax-loader.gif +0 -0
  8. assets/images/ajax-search-premium.jpg +0 -0
  9. assets/images/number-eight.png +0 -0
  10. assets/images/number-five.png +0 -0
  11. assets/images/number-fourth.png +0 -0
  12. assets/images/number-one.png +0 -0
  13. assets/images/number-seven.png +0 -0
  14. assets/images/number-six.png +0 -0
  15. assets/images/number-three.png +0 -0
  16. assets/images/number-two.png +0 -0
  17. assets/images/upgrade.png +0 -0
  18. assets/js/devbridge-jquery-autocomplete.js +0 -0
  19. assets/js/devbridge-jquery-autocomplete.min.js +0 -0
  20. assets/js/frontend.js +0 -0
  21. assets/js/frontend.min.js +0 -0
  22. assets/js/yith-autocomplete.js +0 -0
  23. assets/js/yith-autocomplete.min.js +0 -0
  24. class.yith-wcas-admin.php → includes/class.yith-wcas-admin.php +0 -0
  25. class.yith-wcas-frontend.php → includes/class.yith-wcas-frontend.php +0 -0
  26. class.yith-wcas.php → includes/class.yith-wcas.php +0 -0
  27. {compatibility → includes/compatibility}/elementor/class.yith-wcas-elementor.php +0 -0
  28. {compatibility → includes/compatibility}/elementor/class.yith-wcas-search-form-elementor.php +0 -0
  29. functions.yith-wcas.php → includes/functions.yith-wcas.php +0 -0
  30. {widgets → includes/widgets}/class.yith-wcas-ajax-search.php +0 -0
  31. init.php +8 -8
  32. languages/yith-woocommerce-ajax-search-it_IT.mo +0 -0
  33. languages/yith-woocommerce-ajax-search-it_IT.po +0 -0
  34. languages/yith-woocommerce-ajax-search-pt_PT.mo +0 -0
  35. languages/yith-woocommerce-ajax-search-pt_PT.po +0 -0
  36. languages/yith-woocommerce-ajax-search.pot +0 -0
  37. plugin-fw/.jshintrc +0 -0
  38. plugin-fw/Gruntfile.js +0 -0
  39. plugin-fw/assets/css/codemirror/codemirror.css +0 -0
  40. plugin-fw/assets/css/colorbox.css +0 -0
  41. plugin-fw/assets/css/metaboxes.css +0 -0
  42. plugin-fw/assets/css/yit-plugin-panel.css +7 -2
  43. plugin-fw/assets/css/yit-upgrade-to-pro.css +0 -0
  44. plugin-fw/assets/css/yit-upgrader.css +0 -0
  45. plugin-fw/assets/css/yith-fields.css +260 -133
  46. plugin-fw/assets/fonts/yith-icon.eot +0 -0
  47. plugin-fw/assets/fonts/yith-icon.svg +0 -0
  48. plugin-fw/assets/fonts/yith-icon.ttf +0 -0
  49. plugin-fw/assets/fonts/yith-icon.woff +0 -0
  50. plugin-fw/assets/images/arrow_down.svg +0 -0
  51. plugin-fw/assets/images/banner-premium.png +0 -0
  52. plugin-fw/assets/images/colorbox/border1.png +0 -0
  53. plugin-fw/assets/images/colorbox/border2.png +0 -0
  54. plugin-fw/assets/images/colorbox/loading.gif +0 -0
  55. plugin-fw/assets/images/double-sidebar.png +0 -0
  56. plugin-fw/assets/images/licence-error.png +0 -0
  57. plugin-fw/assets/images/no-sidebar.png +0 -0
  58. plugin-fw/assets/images/sidebar-left.png +0 -0
  59. plugin-fw/assets/images/sidebar-right.png +0 -0
  60. plugin-fw/assets/images/sleep.png +0 -0
  61. plugin-fw/assets/images/spinner.png +0 -0
  62. plugin-fw/assets/images/ui-icons_222222_256x240.png +0 -0
  63. plugin-fw/assets/images/ui-icons_2e83ff_256x240.png +0 -0
  64. plugin-fw/assets/images/ui-icons_454545_256x240.png +0 -0
  65. plugin-fw/assets/images/ui-icons_888888_256x240.png +0 -0
  66. plugin-fw/assets/images/x.png +0 -0
  67. plugin-fw/assets/images/yith-icon.svg +0 -0
  68. plugin-fw/assets/images/yithemes-icon.png +0 -0
  69. plugin-fw/assets/js/codemirror/codemirror.js +0 -0
  70. plugin-fw/assets/js/codemirror/javascript.js +0 -0
  71. plugin-fw/assets/js/how-to.js +0 -0
  72. plugin-fw/assets/js/javascript-md5/md5.min.js +0 -0
  73. plugin-fw/assets/js/jquery.colorbox.js +0 -0
  74. plugin-fw/assets/js/metabox.js +0 -0
  75. plugin-fw/assets/js/metabox.min.js +0 -0
  76. plugin-fw/assets/js/multisite-updater.js +0 -0
  77. plugin-fw/assets/js/multisite-updater.min.js +0 -0
  78. plugin-fw/assets/js/wp-pages.js +0 -0
  79. plugin-fw/assets/js/wp-pages.min.js +0 -0
  80. plugin-fw/assets/js/yit-cpt-unlimited.js +0 -0
  81. plugin-fw/assets/js/yit-cpt-unlimited.min.js +0 -0
  82. plugin-fw/assets/js/yit-plugin-panel.js +0 -0
  83. plugin-fw/assets/js/yit-plugin-panel.min.js +0 -0
  84. plugin-fw/assets/js/yit-wp-pointer.js +0 -0
  85. plugin-fw/assets/js/yit-wp-pointer.min.js +0 -0
  86. plugin-fw/assets/js/yith-colorpicker.min.js +0 -0
  87. plugin-fw/assets/js/yith-dashboard.js +0 -0
  88. plugin-fw/assets/js/yith-dashboard.min.js +0 -0
  89. plugin-fw/assets/js/yith-fields.js +794 -728
  90. plugin-fw/assets/js/yith-fields.min.js +1 -1
  91. plugin-fw/assets/js/yith-gutenberg.js +0 -0
  92. plugin-fw/assets/js/yith-gutenberg.min.js +0 -0
  93. plugin-fw/assets/js/yith-system-info.js +0 -0
  94. plugin-fw/assets/js/yith-system-info.min.js +0 -0
  95. plugin-fw/assets/js/yith-update-plugins.js +0 -0
  96. plugin-fw/assets/js/yith-update-plugins.min.js +0 -0
  97. plugin-fw/init.php +2 -2
  98. plugin-fw/languages/yith-plugin-fw-el.mo +0 -0
  99. plugin-fw/languages/yith-plugin-fw-el.po +36 -28
  100. plugin-fw/languages/yith-plugin-fw-es_ES.mo +0 -0
  101. plugin-fw/languages/yith-plugin-fw-es_ES.po +36 -28
  102. plugin-fw/languages/yith-plugin-fw-it_IT.mo +0 -0
  103. plugin-fw/languages/yith-plugin-fw-it_IT.po +35 -27
  104. plugin-fw/languages/yith-plugin-fw-nl_NL.mo +0 -0
  105. plugin-fw/languages/yith-plugin-fw-nl_NL.po +36 -28
  106. plugin-fw/languages/yith-plugin-fw.pot +24 -24
  107. plugin-fw/lib/promo/black.jpg +0 -0
  108. plugin-fw/lib/promo/cyber.jpg +0 -0
  109. plugin-fw/lib/promo/halloween.jpg +0 -0
  110. plugin-fw/lib/promo/yith-promo.php +0 -0
  111. plugin-fw/lib/promo/yith-promo.xml +0 -0
  112. plugin-fw/lib/yit-ajax.php +0 -0
  113. plugin-fw/lib/yit-cpt-unlimited.php +0 -0
  114. plugin-fw/lib/yit-metabox.php +0 -0
  115. plugin-fw/lib/yit-plugin-common.php +0 -0
  116. plugin-fw/lib/yit-plugin-gradients.php +0 -0
  117. plugin-fw/lib/yit-plugin-licence.php +0 -0
  118. plugin-fw/lib/yit-plugin-panel-wc.php +1 -1
  119. plugin-fw/lib/yit-plugin-panel.php +51 -14
  120. plugin-fw/lib/yit-plugin-subpanel.php +0 -0
  121. plugin-fw/lib/yit-pointers.php +0 -0
  122. plugin-fw/lib/yit-theme-licence.php +0 -0
  123. plugin-fw/lib/yit-upgrade.php +0 -0
  124. plugin-fw/lib/yit-video.php +0 -0
  125. plugin-fw/lib/yith-dashboard.php +0 -0
  126. plugin-fw/lib/yith-gutenberg.php +0 -0
  127. plugin-fw/lib/yith-system-status.php +1 -1
  128. plugin-fw/package.json +1 -1
  129. plugin-fw/templates/fields/ajax-customers.php +0 -0
  130. plugin-fw/templates/fields/checkbox-array.php +0 -0
  131. plugin-fw/templates/fields/country-select.php +0 -0
  132. plugin-fw/templates/fields/custom.php +0 -0
  133. plugin-fw/templates/fields/date-format.php +0 -0
  134. plugin-fw/templates/fields/dimensions.php +123 -0
  135. plugin-fw/templates/fields/list-table.php +0 -0
  136. plugin-fw/templates/fields/multi-colorpicker.php +0 -0
  137. plugin-fw/templates/fields/multi-select.php +0 -0
  138. plugin-fw/templates/fields/onoff.php +3 -3
  139. plugin-fw/templates/fields/password.php +0 -0
  140. plugin-fw/templates/fields/select-images.php +5 -4
  141. plugin-fw/templates/fields/toggle-element-fixed.php +0 -0
  142. plugin-fw/templates/fields/toggle-element.php +0 -0
  143. plugin-fw/templates/fields/upload.php +1 -1
  144. plugin-fw/templates/metaboxes/tab.php +0 -0
  145. plugin-fw/templates/metaboxes/types/icon-list.php +0 -0
  146. plugin-fw/templates/panel/infobox.php +0 -0
  147. plugin-fw/templates/panel/sub-tabs-nav.php +0 -0
  148. plugin-fw/templates/panel/woocommerce/woocommerce-form.php +0 -0
  149. plugin-fw/templates/panel/woocommerce/woocommerce-panel.php +0 -0
  150. plugin-fw/templates/panel/woocommerce/woocommerce-upload.php +0 -0
  151. plugin-fw/templates/sysinfo/system-information-panel.php +0 -0
  152. plugin-fw/yit-deactive-plugin.php +0 -0
  153. plugin-fw/yit-functions.php +39 -0
  154. plugin-fw/yit-plugin-registration-hook.php +0 -0
  155. plugin-fw/yit-plugin.php +0 -0
  156. plugin-fw/yit-woocommerce-compatibility.php +0 -0
  157. plugin-options/gutenberg/blocks.php +0 -0
  158. plugin-options/premium-options.php +0 -0
  159. plugin-options/settings-options.php +0 -0
  160. templates/admin/premium.php +0 -0
  161. templates/yith-woocommerce-ajax-search.php +0 -0
  162. uninstall.php +0 -0
  163. wpml-config.xml +0 -0
README.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
5
Requires at least: 4.0.0
6
Tested up to: 5.4
7
- Stable tag: 1.7.6
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -139,6 +139,10 @@ If you have created your own language pack for YITH WooCommerce Ajax Search, or
139
140
== Changelog ==
141
142
= 1.7.6 - Released on 20 March 2020 =
143
* New: Support for Elementor
144
* Update: Plugin framework
4
Tags: woocommerce search by sku, woocommerce search results, woocommerce search shortcode, woocommerce search page, woocommerce search form, woocommerce search filter, woocommerce search products, woocommerce search content, woocommerce search autocomplete, woocommerce advanced search, woocommerce search category, woocommerce search product attributes, woocommerce search by tag, woocommerce search by brand, woocommerce predictive, woocommerce live search, woocommerce single product search, woocommerce site search, woocommerce search tex, tajax, search, woocommerce, products, themes, yit, e-commerce, shop, yith, ajax search, instant search, premium, yithemes, autocomplete, autosuggest, better search, category search, custom search, highlight terms, Live Search, Predictive Search, product search, relevant search, search highlight, search product, suggest, typeahead, WooCommerce Plugin, woocommerce product search, woocommerce search, wordpress ecommerce
5
Requires at least: 4.0.0
6
Tested up to: 5.4
7
+ Stable tag: 1.7.7
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
139
140
== Changelog ==
141
142
+ = 1.7.7 - Released on 23 April 2020 =
143
+ * New: Support for WooCommerce 4.1
144
+ * Update: Plugin framework
145
+
146
= 1.7.6 - Released on 20 March 2020 =
147
* New: Support for Elementor
148
* Update: Plugin framework
assets/css/admin.css CHANGED
File without changes
assets/css/yith_wcas_ajax_search.css CHANGED
File without changes
assets/images/01.jpg CHANGED
File without changes
assets/images/02.png CHANGED
File without changes
assets/images/03.jpg CHANGED
File without changes
assets/images/ajax-loader.gif CHANGED
File without changes
assets/images/ajax-search-premium.jpg CHANGED
File without changes
assets/images/number-eight.png CHANGED
File without changes
assets/images/number-five.png CHANGED
File without changes
assets/images/number-fourth.png CHANGED
File without changes
assets/images/number-one.png CHANGED
File without changes
assets/images/number-seven.png CHANGED
File without changes
assets/images/number-six.png CHANGED
File without changes
assets/images/number-three.png CHANGED
File without changes
assets/images/number-two.png CHANGED
File without changes
assets/images/upgrade.png CHANGED
File without changes
assets/js/devbridge-jquery-autocomplete.js CHANGED
File without changes
assets/js/devbridge-jquery-autocomplete.min.js CHANGED
File without changes
assets/js/frontend.js CHANGED
File without changes
assets/js/frontend.min.js CHANGED
File without changes
assets/js/yith-autocomplete.js CHANGED
File without changes
assets/js/yith-autocomplete.min.js CHANGED
File without changes
class.yith-wcas-admin.php → includes/class.yith-wcas-admin.php RENAMED
File without changes
class.yith-wcas-frontend.php → includes/class.yith-wcas-frontend.php RENAMED
File without changes
class.yith-wcas.php → includes/class.yith-wcas.php RENAMED
File without changes
{compatibility → includes/compatibility}/elementor/class.yith-wcas-elementor.php RENAMED
File without changes
{compatibility → includes/compatibility}/elementor/class.yith-wcas-search-form-elementor.php RENAMED
File without changes
functions.yith-wcas.php → includes/functions.yith-wcas.php RENAMED
File without changes
{widgets → includes/widgets}/class.yith-wcas-ajax-search.php RENAMED
File without changes
init.php CHANGED
@@ -3,13 +3,13 @@
3
* Plugin Name: YITH WooCommerce Ajax Search
4
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/
5
* Description: <code><strong>YITH WooCommerce Ajax Search</strong></code> is the plugin that allows you to search for a specific product by inserting a few characters. Thanks to <strong>Ajax Search</strong>, users can quickly find the contents they are interested in without wasting time among site pages. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
- * Version: 1.7.6
7
* Author: YITH
8
* Author URI: https://yithemes.com/
9
* Text Domain: yith-woocommerce-ajax-search
10
* Domain Path: /languages/
11
* WC requires at least: 3.0.0
12
- * WC tested up to: 4.0.0
13
*/
14
15
/*
@@ -71,7 +71,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
71
if ( defined( 'YITH_WCAS_VERSION' ) ) {
72
return;
73
} else {
74
- define( 'YITH_WCAS_VERSION', '1.7.6' );
75
}
76
77
if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
@@ -130,11 +130,11 @@ function yith_ajax_search_constructor() {
130
load_plugin_textdomain( 'yith-woocommerce-ajax-search', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
131
132
// Load required classes and functions.
133
- require_once 'functions.yith-wcas.php';
134
- require_once 'class.yith-wcas-admin.php';
135
- require_once 'class.yith-wcas-frontend.php';
136
- require_once 'widgets/class.yith-wcas-ajax-search.php';
137
- require_once 'class.yith-wcas.php';
138
139
// Let's start the game!
140
global $yith_wcas;
3
* Plugin Name: YITH WooCommerce Ajax Search
4
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-ajax-search/
5
* Description: <code><strong>YITH WooCommerce Ajax Search</strong></code> is the plugin that allows you to search for a specific product by inserting a few characters. Thanks to <strong>Ajax Search</strong>, users can quickly find the contents they are interested in without wasting time among site pages. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>.
6
+ * Version: 1.7.7
7
* Author: YITH
8
* Author URI: https://yithemes.com/
9
* Text Domain: yith-woocommerce-ajax-search
10
* Domain Path: /languages/
11
* WC requires at least: 3.0.0
12
+ * WC tested up to: 4.1.0
13
*/
14
15
/*
71
if ( defined( 'YITH_WCAS_VERSION' ) ) {
72
return;
73
} else {
74
+ define( 'YITH_WCAS_VERSION', '1.7.7' );
75
}
76
77
if ( ! defined( 'YITH_WCAS_FREE_INIT' ) ) {
130
load_plugin_textdomain( 'yith-woocommerce-ajax-search', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
131
132
// Load required classes and functions.
133
+ require_once YITH_WCAS_DIR .'includes/functions.yith-wcas.php';
134
+ require_once YITH_WCAS_DIR .'includes/class.yith-wcas-admin.php';
135
+ require_once YITH_WCAS_DIR .'includes/class.yith-wcas-frontend.php';
136
+ require_once YITH_WCAS_DIR .'includes/widgets/class.yith-wcas-ajax-search.php';
137
+ require_once YITH_WCAS_DIR .'includes/class.yith-wcas.php';
138
139
// Let's start the game!
140
global $yith_wcas;
languages/yith-woocommerce-ajax-search-it_IT.mo CHANGED
File without changes
languages/yith-woocommerce-ajax-search-it_IT.po CHANGED
File without changes
languages/yith-woocommerce-ajax-search-pt_PT.mo CHANGED
File without changes
languages/yith-woocommerce-ajax-search-pt_PT.po CHANGED
File without changes
languages/yith-woocommerce-ajax-search.pot CHANGED
File without changes
plugin-fw/.jshintrc CHANGED
File without changes
plugin-fw/Gruntfile.js CHANGED
File without changes
plugin-fw/assets/css/codemirror/codemirror.css CHANGED
File without changes
plugin-fw/assets/css/colorbox.css CHANGED
File without changes
plugin-fw/assets/css/metaboxes.css CHANGED
File without changes
plugin-fw/assets/css/yit-plugin-panel.css CHANGED
@@ -46,7 +46,12 @@
46
margin-right : 15px;
47
}
48
49
- .yith-plugin-fw-panel-custom-tab-container > h2 {
50
border : none;
51
padding : 15px 0;
52
}
@@ -124,7 +129,7 @@
124
cursor : pointer;
125
background-color : #375f6b;
126
color : #fff;
127
- margin-left: 10px !important;
128
}
129
130
.yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:hover {
46
margin-right : 15px;
47
}
48
49
+ .yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container{
50
+ border: 1px solid #ddd;
51
+ border-top : 0;
52
+ }
53
+
54
+ .yith-plugin-ui .yith-plugin-fw-panel-custom-tab-container > h2 {
55
border : none;
56
padding : 15px 0;
57
}
129
cursor : pointer;
130
background-color : #375f6b;
131
color : #fff;
132
+ margin-left : 10px !important;
133
}
134
135
.yith-plugin-fw-wp-page-wrapper .wrap a.page-title-action:hover {
plugin-fw/assets/css/yit-upgrade-to-pro.css CHANGED
File without changes
plugin-fw/assets/css/yit-upgrader.css CHANGED
File without changes
plugin-fw/assets/css/yith-fields.css CHANGED
@@ -28,8 +28,8 @@
28
}
29
30
.yith-plugin-fw-title-field-wrapper h3.title {
31
- width : 100%;
32
- padding: 0 !important;
33
}
34
35
.the-metabox .yith-plugin-fw-title-field-wrapper h3.title {
@@ -37,15 +37,16 @@
37
}
38
39
.yith-plugin-fw span.color-alpha {
40
- height: 100%!important;
41
- width: 100% !important;
42
- border: 1px solid #d9d9d9;
43
- margin: -1px;
44
}
45
46
- .yith-plugin-fw .wp-color-result-text{
47
- height: 100%;
48
}
49
.yith-plugin-fw input[type=email],
50
.yith-plugin-fw input[type=number],
51
.yith-plugin-fw input[type=text]:not(.select2-search__field),
@@ -55,11 +56,11 @@
55
.yith-plugin-ui input[type=password],
56
.woocommerce .yith-plugin-fw table.form-table input[type=text]:not(.select2-search__field),
57
.woocommerce .yith-plugin-fw table.form-table select {
58
- width : 400px;
59
- max-width : 100%;
60
- height : 30px;
61
- padding : 5px;
62
- line-height: 1;
63
}
64
65
.woocommerce .yith-plugin-fw table.form-table input[type=text].wp-color-picker,
@@ -72,8 +73,8 @@
72
padding : 3px 5px;
73
}
74
75
- .wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button{
76
- border-color: #7e8993;
77
}
78
79
.woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
@@ -442,12 +443,12 @@ ul.yit-icons-manager-list li.active {
442
WordPress 5.3 with old panel fixes
443
****************/
444
.yith-plugin-fw-field-wrapper .select2-container .select2-selection--single {
445
- height: auto;
446
- line-height: 1;
447
}
448
449
- .yith-plugin-fw-field-wrapper .select2-container .select2-selection--single .select2-selection__arrow{
450
- height: 100%;
451
}
452
453
/****************
@@ -480,157 +481,192 @@ YITH UI
480
}
481
482
.yith-icon-paypal-svgrepo-com:before {
483
- content: "\e91b";
484
}
485
.yith-icon-check-circle:before {
486
- content: "\e921";
487
- color: #757575;
488
}
489
.yith-icon-info-squared:before {
490
- content: "\e922";
491
- color: #757575;
492
}
493
.yith-icon-warning-triangle:before {
494
- content: "\e923";
495
- color: #757575;
496
}
497
.yith-icon-bank:before {
498
- content: "\e91c";
499
}
500
.yith-icon-accounting:before {
501
- content: "\e91d";
502
}
503
.yith-icon-bank-check:before {
504
- content: "\e91e";
505
}
506
.yith-icon-cash:before {
507
- content: "\e91f";
508
}
509
.yith-icon-credit-card:before {
510
- content: "\e920";
511
}
512
.yith-icon-calendar_add:before {
513
- content: "\e913";
514
- color: #757575;
515
}
516
.yith-icon-calendar_money:before {
517
- content: "\e914";
518
- color: #757575;
519
}
520
.yith-icon-calendar2:before {
521
- content: "\e915";
522
- color: #757575;
523
}
524
.yith-icon-people:before {
525
- content: "\e916";
526
- color: #757575;
527
}
528
.yith-icon-shield_money:before {
529
- content: "\e917";
530
- color: #757575;
531
}
532
.yith-icon-time_check:before {
533
- content: "\e918";
534
- color: #757575;
535
}
536
.yith-icon-world_settings:before {
537
- content: "\e919";
538
- color: #757575;
539
}
540
.yith-icon-arrow_eye_closed:before {
541
- content: "\e912";
542
- color: #757575;
543
}
544
.yith-icon-arrow_eye:before {
545
- content: "\e911";
546
- color: #757575;
547
}
548
.yith-icon-reset:before {
549
- content: "\e910";
550
- color: #757575;
551
}
552
.yith-icon-drag:before {
553
- content: "\e90f";
554
- color: #757575;
555
}
556
.yith-icon-trash:before {
557
- content: "\e90d";
558
- color: #757575;
559
}
560
.yith-icon-info:before {
561
- content: "\e90e";
562
- color: #757575;
563
}
564
.yith-icon-arrow_down:before {
565
- content: "\e900";
566
- color: #757575;
567
}
568
.yith-icon-arrow_left:before {
569
- content: "\e901";
570
- color: #757575;
571
}
572
.yith-icon-arrow_right:before {
573
- content: "\e902";
574
- color: #757575;
575
}
576
.yith-icon-arrow_up:before {
577
- content: "\e903";
578
- color: #757575;
579
}
580
.yith-icon-calendar:before {
581
- content: "\e904";
582
- color: #757575;
583
}
584
.yith-icon-check:before {
585
- content: "\e905";
586
- color: #757575;
587
}
588
.yith-icon-close:before {
589
- content: "\e906";
590
- color: #757575;
591
}
592
.yith-icon-edit:before {
593
- content: "\e907";
594
- color: #757575;
595
}
596
.yith-icon-magnifier:before {
597
- content: "\e908";
598
- color: #757575;
599
}
600
.yith-icon-pencil:before {
601
- content: "\e909";
602
- color: #757575;
603
}
604
.yith-icon-plus:before {
605
- content: "\e90a";
606
- color: #757575;
607
}
608
.yith-icon-update:before {
609
- content: "\e90b";
610
- color: #757575;
611
}
612
.yith-icon-upload:before {
613
- content: "\e90c";
614
- color: #757575;
615
}
616
.yith-icon-reply:before {
617
- content: "\e91a";
618
}
619
620
.yith-plugin-fw-banner {
621
- width : 100%;
622
- height: 45px;
623
- background : url('../images/banner-premium.png');
624
- display: flex;
625
- align-items: center;
626
- padding-right: -23px;
627
}
628
629
.yith-plugin-fw-banner h1 {
630
text-transform : uppercase;
631
color : #0c5777;
632
font-size : 15px;
633
- padding: 0 0 0 110px;
634
font-weight : 700;
635
text-align : left;
636
display : inline-block;
@@ -653,19 +689,20 @@ YITH UI
653
box-shadow : none;
654
}
655
656
- .yith-plugin-fw-rate{
657
- margin: 20px 0;
658
}
659
660
- .yith-plugin-fw-rate .dashicons-star-filled{
661
- font-size: 12px;
662
- margin: 4px -4px;
663
- color: #0c5777;
664
}
665
666
- .yith-plugin-fw-rate a{
667
- text-decoration: none;
668
}
669
.yith-plugin-ui a {
670
outline : none;
671
box-shadow : none;
@@ -784,9 +821,11 @@ YITH UI
784
.yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
785
padding : 30px 20px;
786
}
787
.yith-plugin-ui #plugin-fw-wc table.form-table tr.toggle-element-fixed td, #yith-plugin-fw-panel table.form-table tr.toggle-element-fixed td.forminp {
788
- padding: 0 20px 30px;
789
}
790
.yith-plugin-ui #plugin-fw-wc h2 + div {
791
background : #fff;
792
border-left : 1px solid #d9d9d9;
@@ -863,11 +902,11 @@ YITH UI
863
.yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
864
.yith-plugin-ui table.form-table input[type=text].wp-color-picker,
865
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
866
- border: 0;
867
- height: 30px;
868
- max-width: 121px;
869
- font-size: 11px;
870
- padding: 0;
871
}
872
873
.yith-plugin-ui .search-box input[name="s"] {
@@ -1125,14 +1164,14 @@ YITH UI
1125
.yith-plugin-ui .select2-container.select2-container--focus .select2-selection--single,
1126
.yith-plugin-ui .select2-container.select2-container--focus .select2-selection--multiple,
1127
.yith-plugin-ui .select2-container.select2-container--open .select2-selection--single,
1128
- .yith-plugin-ui .select2-container.select2-container--open .select2-selection--multiple{
1129
- margin : 0;
1130
- border : 0;
1131
box-shadow : none;
1132
}
1133
1134
- .yith-plugin-ui .select2-container .select2-selection--single .select2-selection__arrow{
1135
- background: none;
1136
}
1137
1138
/* old panel*/
@@ -1602,8 +1641,8 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1602
1603
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap,
1604
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap > * {
1605
- display: inline-block !important;
1606
- vertical-align: middle;
1607
}
1608
1609
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .iris-picker,
@@ -1660,7 +1699,7 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1660
}
1661
1662
.yith-plugin-ui .wp-picker-default-custom:before {
1663
- content: "\e91a";
1664
text-indent : 0;
1665
font-family : 'yith-icon';
1666
font-size : 20px;
@@ -1755,7 +1794,7 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1755
cursor : grab;
1756
}
1757
1758
- .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:active:after{
1759
cursor : grabbing;
1760
}
1761
@@ -1787,9 +1826,11 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
1787
cursor : pointer;
1788
transition : all ease 0.5s;
1789
}
1790
.yith-plugin-ui .yith-toggle-row.fixed {
1791
- margin: 0;
1792
}
1793
.yith-plugin-ui .yith-toggle-row.highlight {
1794
transition : all ease 0.5s;
1795
/*box-shadow: 0 0 7px rgb(81, 117, 129);*/
@@ -2098,29 +2139,113 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2098
2099
/** MULTI SELECT **/
2100
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select {
2101
- display: inline-block;
2102
- width: 30%;
2103
- margin-right: 3%;
2104
- max-width: 400px;
2105
}
2106
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select label {
2107
- display: block;
2108
- font-size: 11px;
2109
- font-weight: 600;
2110
- margin: 0 0 10px 0;
2111
}
2112
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select select,
2113
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select span.select2 {
2114
- width: 100% !important;
2115
- min-width: auto !important;
2116
}
2117
2118
/** OVERRIDE WOOCOMMERCE CLASSES FOR 5.3 */
2119
- .branch-5-3 .yith-plugin-fw .select2-container .select2-selection--single .select2-selection__arrow{
2120
- background:none;
2121
}
2122
- .branch-5-3 .yith-plugin-fw .select2-container.select2-container--focus .select2-selection--single, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--multiple, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--single{
2123
- box-shadow: none;
2124
}
2125
2126
@media screen and (max-width : 1440px) {
@@ -2161,10 +2286,12 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2161
.yith-plugin-fw-banner h1 {
2162
line-height : 1.2em;
2163
}
2164
- .yith-plugin-fw-banner h1{
2165
- font-size: 12px;
2166
- padding-right: 10px;
2167
}
2168
.yith-plugin-ui .yith-add-box,
2169
.yith-plugin-ui .yith-toggle-row {
2170
width : 100%;
@@ -2177,7 +2304,7 @@ div#ui-datepicker-div.yith-plugin-fw-datepicker-div {
2177
}
2178
2179
.yith-plugin-ui .wp-picker-container .wp-color-result.button {
2180
- padding: 0;
2181
}
2182
2183
}
28
}
29
30
.yith-plugin-fw-title-field-wrapper h3.title {
31
+ width : 100%;
32
+ padding : 0 !important;
33
}
34
35
.the-metabox .yith-plugin-fw-title-field-wrapper h3.title {
37
}
38
39
.yith-plugin-fw span.color-alpha {
40
+ height : 100% !important;
41
+ width : 100% !important;
42
+ border : 1px solid #d9d9d9;
43
+ margin : -1px;
44
}
45
46
+ .yith-plugin-fw .wp-color-result-text {
47
+ height : 100%;
48
}
49
+
50
.yith-plugin-fw input[type=email],
51
.yith-plugin-fw input[type=number],
52
.yith-plugin-fw input[type=text]:not(.select2-search__field),
56
.yith-plugin-ui input[type=password],
57
.woocommerce .yith-plugin-fw table.form-table input[type=text]:not(.select2-search__field),
58
.woocommerce .yith-plugin-fw table.form-table select {
59
+ width : 400px;
60
+ max-width : 100%;
61
+ height : 30px;
62
+ padding : 5px;
63
+ line-height : 1;
64
}
65
66
.woocommerce .yith-plugin-fw table.form-table input[type=text].wp-color-picker,
73
padding : 3px 5px;
74
}
75
76
+ .wp-core-ui .yith-plugin-fw-colorpicker-field-wrapper button {
77
+ border-color : #7e8993;
78
}
79
80
.woocommerce .yith-plugin-fw table.form-table input[type=text].colorpick,
443
WordPress 5.3 with old panel fixes
444
****************/
445
.yith-plugin-fw-field-wrapper .select2-container .select2-selection--single {
446
+ height : auto;
447
+ line-height : 1;
448
}
449
450
+ .yith-plugin-fw-field-wrapper .select2-container .select2-selection--single .select2-selection__arrow {
451
+ height : 100%;
452
}
453
454
/****************
481
}
482
483
.yith-icon-paypal-svgrepo-com:before {
484
+ content : "\e91b";
485
}
486
+
487
.yith-icon-check-circle:before {
488
+ content : "\e921";
489
+ color : #757575;
490
}
491
+
492
.yith-icon-info-squared:before {
493
+ content : "\e922";
494
+ color : #757575;
495
}
496
+
497
.yith-icon-warning-triangle:before {
498
+ content : "\e923";
499
+ color : #757575;
500
}
501
+
502
.yith-icon-bank:before {
503
+ content : "\e91c";
504
}
505
+
506
.yith-icon-accounting:before {
507
+ content : "\e91d";
508
}
509
+
510
.yith-icon-bank-check:before {
511
+ content : "\e91e";
512
}
513
+
514
.yith-icon-cash:before {
515
+ content : "\e91f";
516
}
517
+
518
.yith-icon-credit-card:before {
519
+ content : "\e920";
520
}
521
+
522
.yith-icon-calendar_add:before {
523
+ content : "\e913";
524
+ color : #757575;
525
}
526
+
527
.yith-icon-calendar_money:before {
528
+ content : "\e914";
529
+ color : #757575;
530
}
531
+
532
.yith-icon-calendar2:before {
533
+ content : "\e915";
534
+ color : #757575;
535
}
536
+
537
.yith-icon-people:before {
538
+ content : "\e916";
539
+ color : #757575;
540
}
541
+
542
.yith-icon-shield_money:before {
543
+ content : "\e917";
544
+ color : #757575;
545
}
546
+
547
.yith-icon-time_check:before {
548
+ content : "\e918";
549
+ color : #757575;
550
}
551
+
552
.yith-icon-world_settings:before {
553
+ content : "\e919";
554
+ color : #757575;
555
}
556
+
557
.yith-icon-arrow_eye_closed:before {
558
+ content : "\e912";
559
+ color : #757575;
560
}
561
+
562
.yith-icon-arrow_eye:before {
563
+ content : "\e911";
564
+ color : #757575;
565
}
566
+
567
.yith-icon-reset:before {
568
+ content : "\e910";
569
+ color : #757575;
570
}
571
+
572
.yith-icon-drag:before {
573
+ content : "\e90f";
574
+ color : #757575;
575
}
576
+
577
.yith-icon-trash:before {
578
+ content : "\e90d";
579
+ color : #757575;
580
}
581
+
582
.yith-icon-info:before {
583
+ content : "\e90e";
584
+ color : #757575;
585
}
586
+
587
.yith-icon-arrow_down:before {
588
+ content : "\e900";
589
+ color : #757575;
590
}
591
+
592
.yith-icon-arrow_left:before {
593
+ content : "\e901";
594
+ color : #757575;
595
}
596
+
597
.yith-icon-arrow_right:before {
598
+ content : "\e902";
599
+ color : #757575;
600
}
601
+
602
.yith-icon-arrow_up:before {
603
+ content : "\e903";
604
+ color : #757575;
605
}
606
+
607
.yith-icon-calendar:before {
608
+ content : "\e904";
609
+ color : #757575;
610
}
611
+
612
.yith-icon-check:before {
613
+ content : "\e905";
614
+ color : #757575;
615
}
616
+
617
.yith-icon-close:before {
618
+ content : "\e906";
619
+ color : #757575;
620
}
621
+
622
.yith-icon-edit:before {
623
+ content : "\e907";
624
+ color : #757575;
625
}
626
+
627
.yith-icon-magnifier:before {
628
+ content : "\e908";
629
+ color : #757575;
630
}
631
+
632
.yith-icon-pencil:before {
633
+ content : "\e909";
634
+ color : #757575;
635
}
636
+
637
.yith-icon-plus:before {
638
+ content : "\e90a";
639
+ color : #757575;
640
}
641
+
642
.yith-icon-update:before {
643
+ content : "\e90b";
644
+ color : #757575;
645
}
646
+
647
.yith-icon-upload:before {
648
+ content : "\e90c";
649
+ color : #757575;
650
}
651
+
652
.yith-icon-reply:before {
653
+ content : "\e91a";
654
}
655
656
.yith-plugin-fw-banner {
657
+ width : 100%;
658
+ height : 45px;
659
+ background : url('../images/banner-premium.png');
660
+ display : flex;
661
+ align-items : center;
662
+ padding-right : -23px;
663
}
664
665
.yith-plugin-fw-banner h1 {
666
text-transform : uppercase;
667
color : #0c5777;
668
font-size : 15px;
669
+ padding : 0 0 0 110px;
670
font-weight : 700;
671
text-align : left;
672
display : inline-block;
689
box-shadow : none;
690
}
691
692
+ .yith-plugin-fw-rate {
693
+ margin : 20px 0;
694
}
695
696
+ .yith-plugin-fw-rate .dashicons-star-filled {
697
+ font-size : 12px;
698
+ margin : 4px -4px;
699
+ color : #0c5777;
700
}
701
702
+ .yith-plugin-fw-rate a {
703
+ text-decoration : none;
704
}
705
+
706
.yith-plugin-ui a {
707
outline : none;
708
box-shadow : none;
821
.yith-plugin-ui #plugin-fw-wc table.form-table th, #yith-plugin-fw-panel table.form-table th.titledesc, .yith-plugin-ui #plugin-fw-wc table.form-table td, #yith-plugin-fw-panel table.form-table td.forminp {
822
padding : 30px 20px;
823
}
824
+
825
.yith-plugin-ui #plugin-fw-wc table.form-table tr.toggle-element-fixed td, #yith-plugin-fw-panel table.form-table tr.toggle-element-fixed td.forminp {
826
+ padding : 0 20px 30px;
827
}
828
+
829
.yith-plugin-ui #plugin-fw-wc h2 + div {
830
background : #fff;
831
border-left : 1px solid #d9d9d9;
902
.yith-plugin-ui input[type=text]:not(.select2-search__field).wp-color-picker,
903
.yith-plugin-ui table.form-table input[type=text].wp-color-picker,
904
.woocommerce.yith-plugin-fw-panel .yith-plugin-ui table.form-table input[type=text].wp-color-picker {
905
+ border : 0;
906
+ height : 30px;
907
+ max-width : 121px;
908
+ font-size : 11px;
909
+ padding : 0;
910
}
911
912
.yith-plugin-ui .search-box input[name="s"] {
1164
.yith-plugin-ui .select2-container.select2-container--focus .select2-selection--single,
1165
.yith-plugin-ui .select2-container.select2-container--focus .select2-selection--multiple,
1166
.yith-plugin-ui .select2-container.select2-container--open .select2-selection--single,
1167
+ .yith-plugin-ui .select2-container.select2-container--open .select2-selection--multiple {
1168
+ margin : 0;
1169
+ border : 0;
1170
box-shadow : none;
1171
}
1172
1173
+ .yith-plugin-ui .select2-container .select2-selection--single .select2-selection__arrow {
1174
+ background : none;
1175
}
1176
1177
/* old panel*/
1641
1642
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap,
1643
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-input-wrap > * {
1644
+ display : inline-block !important;
1645
+ vertical-align : middle;
1646
}
1647
1648
.yith-plugin-ui .yith-plugin-fw-field-wrapper .wp-picker-active .iris-picker,
1699
}
1700
1701
.yith-plugin-ui .wp-picker-default-custom:before {
1702
+ content : "\e91a";
1703
text-indent : 0;
1704
font-family : 'yith-icon';
1705
font-size : 20px;
1794
cursor : grab;
1795
}
1796
1797
+ .yith-plugin-ui .yith-plugin-fw-slider-container .ui-slider-horizontal .ui-slider-handle:active:after {
1798
cursor : grabbing;
1799
}
1800
1826
cursor : pointer;
1827
transition : all ease 0.5s;
1828
}
1829
+
1830
.yith-plugin-ui .yith-toggle-row.fixed {
1831
+ margin : 0;
1832
}
1833
+
1834
.yith-plugin-ui .yith-toggle-row.highlight {
1835
transition : all ease 0.5s;
1836
/*box-shadow: 0 0 7px rgb(81, 117, 129);*/
2139
2140
/** MULTI SELECT **/
2141
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select {
2142
+ display : inline-block;
2143
+ width : 30%;
2144
+ margin-right : 3%;
2145
+ max-width : 400px;
2146
}
2147
+
2148
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select label {
2149
+ display : block;
2150
+ font-size : 11px;
2151
+ font-weight : 600;
2152
+ margin : 0 0 10px 0;
2153
}
2154
+
2155
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select select,
2156
.yith-plugin-ui .yith-plugin-fw-multi-select .yith-single-select span.select2 {
2157
+ width : 100% !important;
2158
+ min-width : auto !important;
2159
+ }
2160
+
2161
+ /**
2162
+ * Dimensions
2163
+ */
2164
+
2165
+ .yith-plugin-fw-dimensions {
2166
+ max-width : 400px;
2167
+ }
2168
+
2169
+ .yith-plugin-fw-dimensions__units {
2170
+ text-align : right;
2171
+ text-transform : uppercase;
2172
+ }
2173
+
2174
+ .yith-plugin-fw-dimensions__unit {
2175
+ display : inline-block;
2176
+ padding : 5px 3px;
2177
+ cursor : pointer;
2178
+ font-weight : 700;
2179
+ }
2180
+
2181
+ .yith-plugin-fw-dimensions__unit--selected {
2182
+ text-decoration : underline;
2183
+ color : #007694;
2184
+ }
2185
+
2186
+ .yith-plugin-fw-dimensions__dimensions {
2187
+ display : flex;
2188
+ margin-top : 3px;
2189
+ }
2190
+
2191
+ .yith-plugin-fw-dimensions__dimension {
2192
+ text-align : center;
2193
+ }
2194
+
2195
+ .yith-plugin-fw-dimensions__dimension > input[type=number].yith-plugin-fw-dimensions__dimension__number {
2196
+ width : 100% !important;
2197
+ min-width : 0 !important;
2198
+ border-radius : 0 !important;
2199
+ border : 1px solid #d8d8d8 !important;
2200
+ border-left : none !important;
2201
+ height : 38px !important;
2202
+ text-align : center;
2203
+ }
2204
+
2205
+ .yith-plugin-fw-dimensions__dimension:first-child > input[type=number].yith-plugin-fw-dimensions__dimension__number {
2206
+ border-left : 1px solid #d8d8d8 !important;
2207
+ border-radius : 6px 0 0 6px !important;
2208
+ }
2209
+
2210
+ .yith-plugin-fw-dimensions__dimension:last-child > input[type=number].yith-plugin-fw-dimensions__dimension__number {
2211
+ border-radius : 0 6px 6px 0 !important;
2212
+ }
2213
+
2214
+ .yith-plugin-fw-dimensions__dimension__label {
2215
+ text-transform : uppercase;
2216
+ font-weight : 700;
2217
+ color : #91959b;
2218
+ font-size : .8em;
2219
+ }
2220
+
2221
+ .yith-plugin-fw-dimensions__linked {
2222
+ cursor : pointer;
2223
}
2224
2225
+ .yith-plugin-fw-dimensions__linked span {
2226
+ border : 1px solid #d8d8d8;
2227
+ border-left : none;
2228
+ height : 38px;
2229
+ border-radius : 0 6px 6px 0;
2230
+ box-sizing : border-box;
2231
+ padding : 8px 10px;
2232
+ width : 100%;
2233
+ }
2234
+
2235
+ .yith-plugin-fw-dimensions--linked-active .yith-plugin-fw-dimensions__linked span {
2236
+ color : #fff;
2237
+ background : #007694;
2238
+ border-color : #007694;
2239
+ }
2240
+
2241
+
2242
/** OVERRIDE WOOCOMMERCE CLASSES FOR 5.3 */
2243
+ .branch-5-3 .yith-plugin-fw .select2-container .select2-selection--single .select2-selection__arrow {
2244
+ background : none;
2245
}
2246
+
2247
+ .branch-5-3 .yith-plugin-fw .select2-container.select2-container--focus .select2-selection--single, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--multiple, .branch-5-3 .yith-plugin-fw .select2-container.select2-container--open .select2-selection--single {
2248
+ box-shadow : none;
2249
}
2250
2251
@media screen and (max-width : 1440px) {
2286
.yith-plugin-fw-banner h1 {
2287
line-height : 1.2em;
2288
}
2289
+
2290
+ .yith-plugin-fw-banner h1 {
2291
+ font-size : 12px;
2292
+ padding-right : 10px;
2293
}
2294
+
2295
.yith-plugin-ui .yith-add-box,
2296
.yith-plugin-ui .yith-toggle-row {
2297
width : 100%;
2304
}
2305
2306
.yith-plugin-ui .wp-picker-container .wp-color-result.button {
2307
+ padding : 0;
2308
}
2309
2310
}
plugin-fw/assets/fonts/yith-icon.eot CHANGED
File without changes
plugin-fw/assets/fonts/yith-icon.svg CHANGED
File without changes
plugin-fw/assets/fonts/yith-icon.ttf CHANGED
File without changes
plugin-fw/assets/fonts/yith-icon.woff CHANGED
File without changes
plugin-fw/assets/images/arrow_down.svg CHANGED
File without changes
plugin-fw/assets/images/banner-premium.png CHANGED
File without changes
plugin-fw/assets/images/colorbox/border1.png CHANGED
File without changes
plugin-fw/assets/images/colorbox/border2.png CHANGED
File without changes
plugin-fw/assets/images/colorbox/loading.gif CHANGED
File without changes
plugin-fw/assets/images/double-sidebar.png CHANGED
File without changes
plugin-fw/assets/images/licence-error.png CHANGED
File without changes
plugin-fw/assets/images/no-sidebar.png CHANGED
File without changes
plugin-fw/assets/images/sidebar-left.png CHANGED
File without changes
plugin-fw/assets/images/sidebar-right.png CHANGED
File without changes
plugin-fw/assets/images/sleep.png CHANGED
File without changes
plugin-fw/assets/images/spinner.png CHANGED
File without changes
plugin-fw/assets/images/ui-icons_222222_256x240.png CHANGED
File without changes
plugin-fw/assets/images/ui-icons_2e83ff_256x240.png CHANGED
File without changes
plugin-fw/assets/images/ui-icons_454545_256x240.png CHANGED
File without changes
plugin-fw/assets/images/ui-icons_888888_256x240.png CHANGED
File without changes
plugin-fw/assets/images/x.png CHANGED
File without changes
plugin-fw/assets/images/yith-icon.svg CHANGED
File without changes
plugin-fw/assets/images/yithemes-icon.png CHANGED
File without changes
plugin-fw/assets/js/codemirror/codemirror.js CHANGED
File without changes
plugin-fw/assets/js/codemirror/javascript.js CHANGED
File without changes
plugin-fw/assets/js/how-to.js CHANGED
File without changes
plugin-fw/assets/js/javascript-md5/md5.min.js CHANGED
File without changes
plugin-fw/assets/js/jquery.colorbox.js CHANGED
File without changes
plugin-fw/assets/js/metabox.js CHANGED
File without changes
plugin-fw/assets/js/metabox.min.js CHANGED
File without changes
plugin-fw/assets/js/multisite-updater.js CHANGED
File without changes
plugin-fw/assets/js/multisite-updater.min.js CHANGED
File without changes
plugin-fw/assets/js/wp-pages.js CHANGED
File without changes
plugin-fw/assets/js/wp-pages.min.js CHANGED
File without changes
plugin-fw/assets/js/yit-cpt-unlimited.js CHANGED
File without changes
plugin-fw/assets/js/yit-cpt-unlimited.min.js CHANGED
File without changes
plugin-fw/assets/js/yit-plugin-panel.js CHANGED
File without changes
plugin-fw/assets/js/yit-plugin-panel.min.js CHANGED
File without changes
plugin-fw/assets/js/yit-wp-pointer.js CHANGED
File without changes
plugin-fw/assets/js/yit-wp-pointer.min.js CHANGED
File without changes
plugin-fw/assets/js/yith-colorpicker.min.js CHANGED
File without changes
plugin-fw/assets/js/yith-dashboard.js CHANGED
File without changes
plugin-fw/assets/js/yith-dashboard.min.js CHANGED
File without changes
plugin-fw/assets/js/yith-fields.js CHANGED
@@ -1,732 +1,798 @@
1
( function ( $ ) {
2
3
- /* global yith_framework_fw_fields*/
4
-
5
- var yith_fields_init = function () {
6
- var $datepicker = $( '.yith-plugin-fw-datepicker' ),
7
- $colorpicker = $( '.yith-plugin-fw-colorpicker' ),
8
- $upload = {
9
- imgPreviewHandler : '.yith-plugin-fw-upload-img-preview',
10
- uploadButtonHandler: '.yith-plugin-fw-upload-button',
11
- imgUrlHandler : '.yith-plugin-fw-upload-img-url',
12
- resetButtonHandler : '.yith-plugin-fw-upload-button-reset',
13
- imgUrl : $( '.yith-plugin-fw-upload-img-url' )
14
- },
15
- $wpAddMedia = $( '.add_media' ),
16
- $imageGallery = {
17
- sliderWrapper: $( '.yith-plugin-fw .image-gallery ul.slides-wrapper' ),
18
- buttonHandler: '.yith-plugin-fw .image-gallery-button'
19
- },
20
- $sidebars = $( '.yith-plugin-fw-sidebar-layout' ),
21
- $slider = $( '.yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal' ),
22
- $codemirror = $( '.codemirror' ),
23
- $icons = $( '.yit-icons-manager-wrapper' ),
24
- $checkgroup = $( ".yith-plugin-ui td.forminp-checkbox" );
25
-
26
- /* Datepicker */
27
- $datepicker.each( function () {
28
- var args = $( this ).data();
29
-
30
- // set animation to false to prevent style 'glitches' when removing class on closing
31
- args.showAnim = false;
32
- args.beforeShow = function ( input, instance ) {
33
- instance.dpDiv.addClass( 'yith-plugin-fw-datepicker-div' );
34
- };
35
- args.onClose = function ( selectedDate, instance ) {
36
- instance.dpDiv.removeClass( 'yith-plugin-fw-datepicker-div' );
37
- };
38
-
39
- $( this ).datepicker( args );
40
- } );
41
-
42
- /* Colorpicker */
43
- $colorpicker.wpColorPicker( {
44
- palettes: false,
45
- width : 200,
46
- mode : 'hsl',
47
- clear : function () {
48
- var input = $( this );
49
- input.val( input.data( 'default-color' ) );
50
- input.change();
51
- }
52
- } );
53
-
54
-
55
- $colorpicker.each( function () {
56
- var select_label = $( this ).data( 'variations-label' ),
57
- wrap_main1 = $( this ).closest( '.yith-plugin-fw-colorpicker-field-wrapper' ),
58
- wrap_main2 = $( this ).closest( '.yith-single-colorpicker' ),
59
- wrap1 = wrap_main1.find( '.wp-picker-input-wrap' ),
60
- wrap2 = wrap_main2.find( '.wp-picker-input-wrap' );
61
-
62
- wrap1.length && wrap_main1.find( 'a.wp-color-result' ).attr( 'title', select_label );
63
- wrap_main2.length && wrap_main2.find( 'a.wp-color-result' ).attr( 'title', select_label );
64
-
65
- if ( !wrap1.find( '.wp-picker-clear-custom' ).length ) {
66
- var button = $( '<span/>' ).attr( {
67
- class: "wp-picker-default-custom"
68
- } );
69
- wrap1.find( '.wp-picker-default' ).wrap( button );
70
- }
71
-
72
- if ( !wrap2.find( '.wp-picker-clear-custom' ).length ) {
73
- var button = $( '<span/>' ).attr( {
74
- class: "wp-picker-default-custom"
75
- } );
76
- wrap2.find( '.wp-picker-default' ).wrap( button );
77
- }
78
- } );
79
-
80
-
81
- /* Upload */
82
- if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
83
- var _custom_media = true;
84
- // preview
85
- $upload.imgUrl.change( function () {
86
- var url = $( this ).val(),
87
- re = new RegExp( "(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico)" ),
88
- preview = $( this ).parent().find( $upload.imgPreviewHandler ).first();
89
-
90
- if ( preview.length < 1 ) {
91
- preview = $( this ).parent().parent().find( $upload.imgPreviewHandler ).first();
92
- }
93
-
94
- if ( re.test( url ) ) {
95
- preview.html( '<img src="' + url + '" style="max-width:100px; max-height:100px;" />' );
96
- } else {
97
- preview.html( '' );
98
- }
99
- } ).trigger( 'change' );
100
-
101
- $( document ).on( 'click', $upload.uploadButtonHandler, function ( e ) {
102
- e.preventDefault();
103
-
104
- var t = $( this ),
105
- custom_uploader,
106
- id = t.attr( 'id' ).replace( /-button#x2F;, '' );
107
-
108
- //If the uploader object has already been created, reopen the dialog
109
- if ( custom_uploader ) {
110
- custom_uploader.open();
111
- return;
112
- }
113
-
114
- var custom_uploader_states = [
115
- // Main states.
116
- new wp.media.controller.Library( {
117
- library : wp.media.query(),
118
- multiple : false,
119
- title : 'Choose Image',
120
- priority : 20,
121
- filterable: 'uploaded'
122
- } )
123
- ];
124
-
125
- // Create the media frame.
126
- custom_uploader = wp.media.frames.downloadable_file = wp.media( {
127
- // Set the title of the modal.
128
- title : 'Choose Image',
129
- library : {
130
- type: ''
131
- },
132
- button : {
133
- text: 'Choose Image'
134
- },
135
- multiple: false,
136
- states : custom_uploader_states
137
- } );
138
-
139
- //When a file is selected, grab the URL and set it as the text field's value
140
- custom_uploader.on( 'select', function () {
141
- var attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
142
-
143
- $( "#" + id ).val( attachment.url );
144
- // Save the id of the selected element to an element which name is the same with a suffix "-yith-attachment-id"
145
- if ( $( "#" + id + "-yith-attachment-id" ) ) {
146
- $( "#" + id + "-yith-attachment-id" ).val( attachment.id );
147
- }
148
- $upload.imgUrl.trigger( 'change' );
149
- } );
150
-
151
- //Open the uploader dialog
152
- custom_uploader.open();
153
- } );
154
-
155
- $( document ).on( 'click', $upload.resetButtonHandler, function ( e ) {
156
- var t = $( this ),
157
- id = t.attr( 'id' ),
158
- input_id = t.attr( 'id' ).replace( /-button-reset#x2F;, '' ),
159
- default_value = $( '#' + id ).data( 'default' );
160
-
161
- $( "#" + input_id ).val( default_value );
162
- $upload.imgUrl.trigger( 'change' );
163
- } );
164
- }
165
-
166
- $wpAddMedia.on( 'click', function () {
167
- _custom_media = false;
168
- } );
169
-
170
- /* Image Gallery */
171
- if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
172
- $( document ).on( 'click', $imageGallery.buttonHandler, function ( e ) {
173
- var $t = $( this ),
174
- $container = $t.closest( '.image-gallery' ),
175
- $image_gallery_ids = $container.find( '.image_gallery_ids' ),
176
- attachment_ids = $image_gallery_ids.val(),
177
- $gallery_images_wrapper = $container.find( 'ul.slides-wrapper' );
178
-
179
- // Create the media frame.
180
- var image_gallery_frame = wp.media.frames.image_gallery = wp.media( {
181
- // Set the title of the modal.
182
- title : $t.data( 'choose' ),
183
- button: {
184
- text: $t.data( 'update' )
185
- },
186
- states: [
187
- new wp.media.controller.Library( {
188
- title : $t.data( 'choose' ),
189
- filterable: 'all',
190
- multiple : true
191
- } )
192
- ]
193
- } );
194
-
195
- // When an image is selected, run a callback.
196
- image_gallery_frame.on( 'select', function () {
197
- var selection = image_gallery_frame.state().get( 'selection' );
198
- selection.map( function ( attachment ) {
199
- attachment = attachment.toJSON();
200
-
201
- if ( attachment.id ) {
202
- attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;
203
- $gallery_images_wrapper.append( '<li class="image" data-attachment_id="' + attachment.id + '"><img src="' + attachment.sizes.thumbnail.url + '"/><ul class="actions"><li><a href="#" class="delete" title="' + $t.data( 'delete' ) + '">x</a></li></ul></li>' );
204
- }
205
- } );
206
-
207
- $image_gallery_ids.val( attachment_ids );
208
- } );
209
-
210
- image_gallery_frame.open();
211
-
212
- } );
213
-
214
- // Image ordering
215
- $imageGallery.sliderWrapper.each( function () {
216
- var $t = $( this );
217
- $t.sortable( {
218
- items : 'li.image',
219
- cursor : 'move',
220
- scrollSensitivity : 40,
221
- forcePlaceholderSize: true,
222
- forceHelperSize : false,
223
- helper : 'clone',
224
- opacity : 0.65,
225
- start : function ( event, ui ) {
226
- ui.item.css( 'background-color', '#f6f6f6' );
227
- },
228
- stop : function ( event, ui ) {
229
- ui.item.removeAttr( 'style' );
230
- },
231
- update : function ( event, ui ) {
232
- var attachment_ids = '';
233
-
234
- $t.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
235
- var attachment_id = $( this ).attr( 'data-attachment_id' );
236
- attachment_ids = attachment_ids + attachment_id + ',';
237
- } );
238
-
239
- $t.closest( '.image-gallery' ).find( '.image_gallery_ids' ).val( attachment_ids );
240
- }
241
- } );
242
- } );
243
-
244
- // Remove images
245
- $imageGallery.sliderWrapper.on( 'click', 'a.delete', function () {
246
- var $wrapper = $( this ).closest( '.image-gallery' ),
247
- $gallery = $( this ).closest( '.image-gallery ul.slides-wrapper' ),
248
- $image_gallery_ids = $wrapper.find( '.image_gallery_ids' ),
249
- attachment_ids = '';
250
-
251
- $( this ).closest( 'li.image' ).remove();
252
-
253
- $gallery.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
254
- var attachment_id = $( this ).attr( 'data-attachment_id' );
255
- attachment_ids = attachment_ids + attachment_id + ',';
256
- } );
257
-
258
- $image_gallery_ids.val( attachment_ids );
259
- } );
260
- }
261
-
262
-
263
- /* Sidebars */
264
- $sidebars.each( function () {
265
- var $images = $( this ).find( 'img' );
266
- $images.on( 'click', function () {
267
- var $container = $( this ).closest( '.yith-plugin-fw-sidebar-layout' ),
268
- $left = $container.find( '.yith-plugin-fw-sidebar-layout-sidebar-left-container' ),
269
- $right = $container.find( '.yith-plugin-fw-sidebar-layout-sidebar-right-container' ),
270
- type = $( this ).data( 'type' );
271
-
272
- $( this ).parent().children( ':radio' ).attr( 'checked', false );
273
- $( this ).prev( ':radio' ).attr( 'checked', true );
274
-
275
- if ( typeof type != 'undefined' ) {
276
- switch ( type ) {
277
- case 'left':
278
- $left.show();
279
- $right.hide();
280
- break;
281
- case 'right':
282
- $right.show();
283
- $left.hide();
284
- break;
285
- case 'double':
286
- $left.show();
287
- $right.show();
288
- break;
289
- default:
290
- $left.hide();
291
- $right.hide();
292
- break;
293
- }
294
- }
295
- } );
296
- } );
297
-
298
- /* Slider */
299
- $slider.each( function () {
300
- var val = $( this ).data( 'val' ),
301
- minValue = $( this ).data( 'min' ),
302
- maxValue = $( this ).data( 'max' ),
303
- step = $( this ).data( 'step' ),
304
- labels = $( this ).data( 'labels' );
305
-
306
- $( this ).slider( {
307
- value: val,
308
- min : minValue,
309
- max : maxValue,
310
- range: 'min',
311
- step : step,
312
-
313
- create: function () {
314
- $( this ).find( '.ui-slider-handle' ).text( $( this ).slider( "value" ) );
315
- },
316
-
317
-
318
- slide: function ( event, ui ) {
319
- $( this ).find( 'input' ).val( ui.value );
320
- $( this ).find( '.ui-slider-handle' ).text( ui.value );
321
- $( this ).siblings( '.feedback' ).find( 'strong' ).text( ui.value + labels );
322
- }
323
- } );
324
- } );
325
-
326
- /* codemirror */
327
- $codemirror.each( function ( i, v ) {
328
- var editor = CodeMirror.fromTextArea( v, {
329
- lineNumbers : 1,
330
- mode : 'javascript',
331
- showCursorWhenSelecting: true
332
- } );
333
-
334
- $( v ).data( 'codemirrorInstance', editor );
335
- } );
336
-
337
- /* Select All - Deselect All */
338
- $( document ).on( 'click', '.yith-plugin-fw-select-all', function () {
339
- var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
340
- $targetSelect.find( 'option' ).prop( 'selected', true ).trigger( 'change' );
341
- } );
342
-
343
- $( document ).on( 'click', '.yith-plugin-fw-deselect-all', function () {
344
- var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
345
- $targetSelect.find( 'option' ).prop( 'selected', false ).trigger( 'change' );
346
- } );
347
-
348
-
349
- $icons.each( function () {
350
- var $container = $( this ),
351
- $preview = $container.find( '.yit-icons-manager-icon-preview' ).first(),
352
- $text = $container.find( '.yit-icons-manager-icon-text' );
353
-
354
- $container.on( 'click', '.yit-icons-manager-list li', function ( event ) {
355
- var $target = $( event.target ).closest( 'li' ),
356
- font = $target.data( 'font' ),
357
- icon = $target.data( 'icon' ),
358
- key = $target.data( 'key' ),
359
- name = $target.data( 'name' );
360
-
361
- $preview.attr( 'data-font', font );
362
- $preview.attr( 'data-icon', icon );
363
- $preview.attr( 'data-key', key );
364
- $preview.attr( 'data-name', name );
365
-
366
- $text.val( font + ':' + name );
367
-
368
- $container.find( '.yit-icons-manager-list li' ).removeClass( 'active' );
369
- $target.addClass( 'active' );
370
- } );
371
-
372
- $container.on( 'click', '.yit-icons-manager-action-set-default', function () {
373
- $container.find( '.yit-icons-manager-list li.default' ).trigger( 'click' );
374
- } );
375
- } );
376
-
377
- /** Select Images */
378
- $( document ).on( 'click', '.yith-plugin-fw-select-images__item', function () {
379
- var item = $( this ),
380
- key = item.data( 'key' ),
381
- wrapper = item.closest( '.yith-plugin-fw-select-images__wrapper' ),
382
- items = wrapper.find( '.yith-plugin-fw-select-images__item' ),
383
- select = wrapper.find( 'select' ).first();
384
-
385
- if ( select.length ) {
386
- select.val( key );
387
- items.removeClass( 'yith-plugin-fw-select-images__item--selected' );
388
- item.addClass( 'yith-plugin-fw-select-images__item--selected' );
389
- }
390
- } );
391
-
392
- $( document.body ).trigger( 'wc-enhanced-select-init' );
393
-
394
- $( document ).find( '.ui-sortable .yith-toggle-elements' ).sortable(
395
- {
396
- cursor : 'move',
397
- axis : 'y',
398
- scrollSensitivity : 40,
399
- forcePlaceholderSize: true,
400
- helper : 'clone',
401
-
402
- stop: function ( event, ui ) {
403
- var keys = jQuery( '.ui-sortable-handle' ),
404
- i = 0,
405
- array_keys = new Array();
406
- for ( i = 0; i < keys.length; i++ ) {
407
- array_keys[ i ] = $( keys[ i ] ).data( 'item_key' );
408
- }
409
- if ( array_keys.length > 0 ) {
410
- var toggle = $( this ).closest( '.toggle-element' );
411
- toggle.saveToggleElement( null, array_keys );
412
- }
413
- }
414
- }
415
- );
416
-
417
- $( document.body ).trigger( 'yith-framework-enhanced-select-init' );
418
- };
419
-
420
- $( document ).on( 'yith_fields_init', yith_fields_init ).trigger( 'yith_fields_init' );
421
-
422
- /* on-off */
423
- $( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
424
- var input = $( this ).prev( 'input' ),
425
- checked = input.prop( 'checked' );
426
-
427
- if ( checked ) {
428
- input.prop( 'checked', false ).attr( 'value', 'no' ).removeClass( 'onoffchecked' );
429
- } else {
430
- input.prop( 'checked', true ).attr( 'value', 'yes' ).addClass( 'onoffchecked' );
431
- }
432
-
433
- input.change();
434
- } );
435
-
436
-
437
- /** Toggle **/
438
-
439
-
440
-
441
- //TOGGLE ELEMENT
442
- $.fn.saveToggleElement = function ( spinner, array_keys ) {
443
- var toggle = $( this ),
444
- action = 'yith_plugin_fw_save_toggle_element',
445
- formdata = toggle.serializeToggleElement(),
446
- wrapper = toggle.find( '.yith-toggle_wrapper' ),
447
- id = wrapper.attr( 'id' ),
448
- current_tab = $.urlParam( 'tab' );
449
-
450
- formdata.append( 'security', wrapper.data( 'nonce' ) );
451
-
452
- if ( typeof array_keys != 'undefined' && array_keys.length > 0 ) {
453
- formdata.append( 'yith_toggle_elements_order_keys', array_keys );
454
- }
455
-
456
- if ( toggle.closest( '.metaboxes-tab.yith-plugin-ui' ).length ) {
457
- action = 'yith_plugin_fw_save_toggle_element_metabox';
458
- post_id = $( this ).closest( 'form#post' ).find( '#post_ID' ).val();
459
- yit_metaboxes_nonce = $( this ).closest( 'form#post' ).find( '#yit_metaboxes_nonce' ).val();
460
- metabox_tab = $( this ).closest( '.tabs-panel' ).attr( 'id' );
461
- url = yith_framework_fw_fields.ajax_url +
462
- '?action=' + action +
463
- "&post_ID=" + post_id +
464
- '&yit_metaboxes_nonce=' + yit_metaboxes_nonce +
465
- "&toggle_id=" + id +
466
- "&metabox_tab=" + metabox_tab;
467
- } else {
468
- url = yith_framework_fw_fields.admin_url + '?action=' + action + '&tab=' + current_tab + "&toggle_id=" + id;
469
- }
470
-
471
- $.ajax( {
472
- type : "POST",
473
- url : url,
474
- data : formdata,
475
- contentType: false,
476
- processData: false,
477
- success : function ( result ) {
478
- if ( spinner ) {
479
- spinner.removeClass( 'show' );
480
- }
481
-
482
- $( document ).trigger( 'yith_save_toggle_element_done', [result, toggle] );
483
- }
484
- } );
485
- };
486
-
487
- $.fn.serializeToggleElement = function () {
488
- var obj = $( this );
489
- /* ADD FILE TO PARAM AJAX */
490
- var formData = new FormData();
491
- var params = $( obj ).find( ":input" ).serializeArray();
492
-
493
- $.each( params, function ( i, val ) {
494
- el_name = val.name;
495
- formData.append( val.name, val.value );
496
- } );
497
-
498
- return formData;
499
- };
500
-
501
- $.fn.formatToggleTitle = function () {
502
- var toggle_el = $( this ),
503
- fields = toggle_el.find( ':input' ),
504
- title = toggle_el.find( 'span.title' ).data( 'title_format' ),
505
- subtitle = toggle_el.find( '.subtitle' ).data( 'subtitle_format' ),
506
- regExp = new RegExp( "[^%%]+(?=[%%])", 'g' );
507
-
508
- if ( typeof title != 'undefined' ) {
509
- var res = title.match( regExp );
510
- }
511
-
512
- if ( typeof subtitle != 'undefined' ) {
513
- var ressub = subtitle.match( regExp );
514
- }
515
-
516
- $.each( fields, function ( i, field ) {
517
- if ( typeof $( field ).attr( 'id' ) != 'undefined' ) {
518
- $field_id = $( field ).attr( 'id' );
519
- $field_array = $field_id.split( '_' );
520
- $field_array.pop();
521
- $field_id = $field_array.join( '_' );
522
- $field_val = $( field ).val();
523
-
524
- if ( res != null && typeof res != 'undefined' && res.indexOf( $field_id ) !== -1 ) {
525
- title = title.replace( '%%' + $field_id + '%%', $field_val );
526
- }
527
- if ( ressub != null && typeof ressub != 'undefined' && ressub.indexOf( $field_id ) !== -1 ) {
528
- subtitle = subtitle.replace( '%%' + $field_id + '%%', $field_val );
529
- }
530
- }
531
- } );
532
-
533
- if ( '' !== title ) {
534
- toggle_el.find( 'span.title' ).html( title );
535
- }
536
-
537
- if ( '' !== subtitle ) {
538
- toggle_el.find( '.subtitle' ).html( subtitle );
539
- }
540
-
541
- $( document ).trigger( 'yith-toggle-element-item-title', [toggle_el] );
542
- };
543
-
544
- $.urlParam = function ( name ) {
545
- var results = new RegExp( '[\?&]' + name + '=([^&#]*)' )
546
- .exec( window.location.search );
547
-
548
- return ( results !== null ) ? results[ 1 ] || 0 : false;
549
- };
550
-
551
- $( document ).on( 'click', '.yith-toggle-title', function ( event ) {
552
- var _toggle = $( event.target ),
553
- _section = _toggle.closest( '.yith-toggle-row' ),
554
- _content = _section.find( '.yith-toggle-content' );
555
-
556
- if ( _toggle.hasClass( 'yith-plugin-fw-onoff' ) || _toggle.hasClass( 'yith-icon-drag' ) ) {
557
- return false;
558
- }
559
-
560
- if ( _section.is( '.yith-toggle-row-opened' ) ) {
561
- _content.slideUp( 400 );
562
- } else {
563
- _content.slideDown( 400 );
564
- }
565
- _section.toggleClass( 'yith-toggle-row-opened' );
566
- } );
567
-
568
- /**Add new box toggle**/
569
- $( document ).on( 'click', '.yith-add-box-button', function ( event ) {
570
- event.preventDefault();
571
- var $this = $( this ),
572
- target_id = $this.data( 'box_id' ),
573
- closed_label = $this.data( 'closed_label' ),
574
- label = $this.data( 'opened_label' ),
575
- id = $this.closest( '.yith-toggle_wrapper' ).attr( 'id' );
576
- template = wp.template( 'yith-toggle-element-add-box-content-' + id );
577
-
578
- if ( '' !== target_id ) {
579
- $( '#' + target_id ).html( template( { index: 'box_id' } ) ).slideToggle();
580
- if ( closed_label !== '' ) {
581
- if ( $this.html() === closed_label ) {
582
- $this.html( label ).removeClass( 'closed' );
583
- } else {
584
- $this.html( closed_label ).addClass( 'closed' );
585
- }
586
- }
587
-
588
- $( document ).trigger( 'yith_fields_init' );
589
- $( document ).trigger( 'yith-add-box-button-toggle', [$this] );
590
- }
591
- } );
592
-
593
- $( document ).on( 'click', '.yith-add-box-buttons .yith-save-button', function ( event ) {
594
-
595
- event.preventDefault();
596
- var add_box = $( this ).parents( '.yith-add-box' ),
597
- id = $( this ).closest( '.yith-toggle_wrapper' ).attr( 'id' ),
598
- spinner = add_box.find( '.spinner' ),
599
- toggle_element = $( this ).parents( '.toggle-element' ),
600
- fields = add_box.find( ':input' ),
601
- counter = toggle_element.find( '.yith-toggle-row' ).length,
602
- hidden_obj = $( '<input type="hidden">' );
603
-
604
- hidden_obj.val( counter );
605
-
606
- $( document ).trigger( 'yith-toggle-change-counter', [hidden_obj, add_box] );
607
-
608
- counter = hidden_obj.val();
609
- var template = wp.template( 'yith-toggle-element-item-' + id ),
610
- toggle_el = $( template( { index: counter } ) );
611
-
612
- spinner.addClass( 'show' );
613
-
614
- $.each( fields, function ( i, field ) {
615
- if ( typeof $( field ).attr( 'id' ) != 'undefined' ) {
616
-
617
- $field_id = $( field ).attr( 'id' );
618
- $field_val = $( field ).val();
619
-
620
- if ( 'radio' == $( field ).attr( 'type' ) ) {
621
- $field_id = $field_id.replace( 'new_', '' );
622
- $field_id = $field_id.replace( '-' + $field_val, '' );
623
- $field_id = $field_id + '_dataindex-' + $field_val;
624
- } else {
625
- $field_id = $field_id.replace( 'new_', '' ) + '_' + counter;
626
- }
627
-
628
- if ( $( field ).is( ':checked' ) ) {
629
- $( toggle_el ).find( '#' + $field_id ).prop( 'checked', true );
630
- }
631
-
632
- if ( $( field ).hasClass( 'yith-post-search' ) || $( field ).hasClass( 'yith-term-search' ) ) {
633
- $( toggle_el ).find( '#' + $field_id ).html( $( '#' + $( field ).attr( 'id' ) ).html() );
634
- }
635
-
636
- $( toggle_el ).find( '#' + $field_id ).val( $field_val );
637
-
638
- }
639
-
640
- } );
641
-
642
- $( toggle_el ).formatToggleTitle();
643
- var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
644
- $( document ).trigger( 'yith-toggle-element-item-before-add', [add_box, toggle_el, form_is_valid] );
645
-
646
- var delayInMilliseconds = 1000; //1 second
647
- setTimeout( function () {
648
- if ( form_is_valid.val() === 'yes' ) {
649
- $( toggle_element ).find( '.yith-toggle-elements' ).append( toggle_el );
650
- $( add_box ).find( '.yith-plugin-fw-datepicker' ).datepicker( 'destroy' );
651
- $( add_box ).html( '' );
652
- $( add_box ).prev( '.yith-add-box-button' ).trigger( 'click' );
653
- toggle_element.saveToggleElement();
654
-
655
- var delayInMilliseconds = 2000; //1 second
656
- setTimeout( function () {
657
- $( toggle_element ).find( '.highlight' ).removeClass( 'highlight' );
658
- }, delayInMilliseconds );
659
-
660
-
661
- $( document ).trigger( 'yith_fields_init' );
662
- }
663
- }, delayInMilliseconds );
664
-
665
-
666
- } );
667
-
668
- $( document ).on( 'click', '.yith-toggle-row .yith-save-button', function ( event ) {
669
- event.preventDefault();
670
- var toggle = $( this ).closest( '.toggle-element' ),
671
- toggle_row = $( this ).closest( '.yith-toggle-row' ),
672
- spinner = toggle_row.find( '.spinner' );
673
- toggle_row.formatToggleTitle();
674
-
675
- var form_is_valid = $( '<input type="hidden">' ).val( 'yes' );
676
- $( document ).trigger( 'yith-toggle-element-item-before-update', [toggle, toggle_row, form_is_valid] );
677
- if ( form_is_valid.val() === 'yes' ) {
678
- spinner.addClass( 'show' );
679
- toggle.saveToggleElement( spinner );
680
- }
681
- } );
682
-
683
- //register remove the dome and save the toggle
684
- $( document ).on( 'click', '.yith-toggle-row .yith-delete-button', function ( event ) {
685
- event.preventDefault();
686
- var toggle = $( this ).closest( '.toggle-element' ),
687
- toggle_row = $( this ).closest( '.yith-toggle-row' );
688
- toggle_row.remove();
689
- toggle.saveToggleElement();
690
- } );
691
-
692
- //register onoff status
693
- $( document ).on( 'click', '.yith-toggle-onoff', function ( event ) {
694
- event.preventDefault();
695
- var toggle = $( this ).closest( '.toggle-element' );
696
- toggle.saveToggleElement();
697
- } );
698
-
699
- // Radio
700
- $( document ).on( 'click', '.yith-plugin-fw-radio input[type=radio]', function () {
701
- $( this ).closest( '.yith-plugin-fw-radio' ).val( $( this ).val() ).trigger( 'change' );
702
- } );
703
-
704
- $( document ).on( 'click', '.yith-password-eye', function () {
705
- var $this = $( this ),
706
- inp = $( this ).closest( '.yith-password-wrapper' ).find( 'input' );
707
- if ( inp.attr( 'type' ) === "password" ) {
708
- inp.attr( 'type', 'text' );
709
- $this.addClass( 'yith-password-eye-closed' );
710
- } else {
711
- inp.attr( 'type', 'password' );
712
- $this.removeClass( 'yith-password-eye-closed' );
713
- }
714
- } );
715
-
716
- $( document.body ).on( 'yith-plugin-fw-init-radio', function () {
717
- $( '.yith-plugin-fw-radio:not(.yith-plugin-fw-radio--initialized)' ).each( function () {
718
- $( this ).val( $( this ).attr( 'value' ) );
719
- $( this ).addClass( 'yith-plugin-fw-radio--initialized' );
720
- } );
721
- } ).trigger( 'yith-plugin-fw-init-radio' );
722
-
723
- /**
724
- * Select2 - add class to stylize it with the new plugin-fw style
725
- */
726
- $( document ).on( 'select2:open', function ( e ) {
727
- if ( $( e.target ).closest( '.yith-plugin-ui' ).length ) {
728
- $( '.select2-results' ).closest( '.select2-container' ).addClass( 'yith-plugin-fw-select2-container' );
729
- }
730
- } );
731
732
} )( jQuery );
1
( function ( $ ) {
2
3
+ /* global yith_framework_fw_fields*/
4
+
5
+ var yith_fields_init = function () {
6
+ var $datepicker = $( '.yith-plugin-fw-datepicker' ),
7
+ $colorpicker = $( '.yith-plugin-fw-colorpicker' ),
8
+ $upload = {
9
+ imgPreviewHandler : '.yith-plugin-fw-upload-img-preview',
10
+ uploadButtonHandler: '.yith-plugin-fw-upload-button',
11
+ imgUrlHandler : '.yith-plugin-fw-upload-img-url',
12
+ resetButtonHandler : '.yith-plugin-fw-upload-button-reset',
13
+ imgUrl : $( '.yith-plugin-fw-upload-img-url' )
14
+ },
15
+ $wpAddMedia = $( '.add_media' ),
16
+ $imageGallery = {
17
+ sliderWrapper: $( '.yith-plugin-fw .image-gallery ul.slides-wrapper' ),
18
+ buttonHandler: '.yith-plugin-fw .image-gallery-button'
19
+ },
20
+ $sidebars = $( '.yith-plugin-fw-sidebar-layout' ),
21
+ $slider = $( '.yith-plugin-fw .yith-plugin-fw-slider-container .ui-slider-horizontal' ),
22
+ $codemirror = $( '.codemirror' ),
23
+ $icons = $( '.yit-icons-manager-wrapper' ),
24
+ $checkgroup = $( ".yith-plugin-ui td.forminp-checkbox" );
25
+
26
+ /* Datepicker */
27
+ $datepicker.each( function () {
28
+ var args = $( this ).data();
29
+
30
+ // set animation to false to prevent style 'glitches' when removing class on closing
31
+ args.showAnim = false;
32
+ args.beforeShow = function ( input, instance ) {
33
+ instance.dpDiv.addClass( 'yith-plugin-fw-datepicker-div' );
34
+ };
35
+ args.onClose = function ( selectedDate, instance ) {
36
+ instance.dpDiv.removeClass( 'yith-plugin-fw-datepicker-div' );
37
+ };
38
+
39
+ $( this ).datepicker( args );
40
+ } );
41
+
42
+ /* Colorpicker */
43
+ $colorpicker.wpColorPicker( {
44
+ palettes: false,
45
+ width : 200,
46
+ mode : 'hsl',
47
+ clear : function () {
48
+ var input = $( this );
49
+ input.val( input.data( 'default-color' ) );
50
+ input.change();
51
+ }
52
+ } );
53
+
54
+
55
+ $colorpicker.each( function () {
56
+ var select_label = $( this ).data( 'variations-label' ),
57
+ wrap_main1 = $( this ).closest( '.yith-plugin-fw-colorpicker-field-wrapper' ),
58
+ wrap_main2 = $( this ).closest( '.yith-single-colorpicker' ),
59
+ wrap1 = wrap_main1.find( '.wp-picker-input-wrap' ),
60
+ wrap2 = wrap_main2.find( '.wp-picker-input-wrap' );
61
+
62
+ wrap1.length && wrap_main1.find( 'a.wp-color-result' ).attr( 'title', select_label );
63
+ wrap_main2.length && wrap_main2.find( 'a.wp-color-result' ).attr( 'title', select_label );
64
+
65
+ if ( !wrap1.find( '.wp-picker-clear-custom' ).length ) {
66
+ var button = $( '<span/>' ).attr( {
67
+ class: "wp-picker-default-custom"
68
+ } );
69
+ wrap1.find( '.wp-picker-default' ).wrap( button );
70
+ }
71
+
72
+ if ( !wrap2.find( '.wp-picker-clear-custom' ).length ) {
73
+ var button = $( '<span/>' ).attr( {
74
+ class: "wp-picker-default-custom"
75
+ } );
76
+ wrap2.find( '.wp-picker-default' ).wrap( button );
77
+ }
78
+ } );
79
+
80
+
81
+ /* Upload */
82
+ if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
83
+ var _custom_media = true;
84
+ // preview
85
+ $upload.imgUrl.change( function () {
86
+ var url = $( this ).val(),
87
+ re = new RegExp( "(http|ftp|https)://[a-zA-Z0-9@?^=%&amp;:/~+#-_.]*.(gif|jpg|jpeg|png|ico|svg)" ),
88
+ preview = $( this ).parent().find( $upload.imgPreviewHandler ).first();
89
+
90
+ if ( preview.length < 1 ) {
91
+ preview = $( this ).parent().parent().find( $upload.imgPreviewHandler ).first();
92
+ }
93
+
94
+ if ( re.test( url ) ) {
95
+ preview.html( '<img src="' + url + '" style="max-width:100px; max-height:100px;" />' );
96
+ } else {
97
+ preview.html( '' );
98
+ }
99
+ } ).trigger( 'change' );
100
+
101
+ $( document ).on( 'click', $upload.uploadButtonHandler, function ( e ) {
102
+ e.preventDefault();
103
+
104
+ var t = $( this ),
105
+ custom_uploader,
106
+ id = t.attr( 'id' ).replace( /-button#x2F;, '' );
107
+
108
+ //If the uploader object has already been created, reopen the dialog
109
+ if ( custom_uploader ) {
110
+ custom_uploader.open();
111
+ return;
112
+ }
113
+
114
+ var custom_uploader_states = [
115
+ // Main states.
116
+ new wp.media.controller.Library( {
117
+ library : wp.media.query(),
118
+ multiple : false,
119
+ title : 'Choose Image',
120
+ priority : 20,
121
+ filterable: 'uploaded'
122
+ } )
123
+ ];
124
+
125
+ // Create the media frame.
126
+ custom_uploader = wp.media.frames.downloadable_file = wp.media( {
127
+ // Set the title of the modal.
128
+ title : 'Choose Image',
129
+ library : {
130
+ type: ''
131
+ },
132
+ button : {
133
+ text: 'Choose Image'
134
+ },
135
+ multiple: false,
136
+ states : custom_uploader_states
137
+ } );
138
+
139
+ //When a file is selected, grab the URL and set it as the text field's value
140
+ custom_uploader.on( 'select', function () {
141
+ var attachment = custom_uploader.state().get( 'selection' ).first().toJSON();
142
+
143
+ $( "#" + id ).val( attachment.url );
144
+ // Save the id of the selected element to an element which name is the same with a suffix "-yith-attachment-id"
145
+ if ( $( "#" + id + "-yith-attachment-id" ) ) {
146
+ $( "#" + id + "-yith-attachment-id" ).val( attachment.id );
147
+ }
148
+ $upload.imgUrl.trigger( 'change' );
149
+ } );
150
+
151
+ //Open the uploader dialog
152
+ custom_uploader.open();
153
+ } );
154
+
155
+ $( document ).on( 'click', $upload.resetButtonHandler, function ( e ) {
156
+ var t = $( this ),
157
+ id = t.attr( 'id' ),
158
+ input_id = t.attr( 'id' ).replace( /-button-reset#x2F;, '' ),
159
+ default_value = $( '#' + id ).data( 'default' );
160
+
161
+ $( "#" + input_id ).val( default_value );
162
+ $upload.imgUrl.trigger( 'change' );
163
+ } );
164
+ }
165
+
166
+ $wpAddMedia.on( 'click', function () {
167
+ _custom_media = false;
168
+ } );
169
+
170
+ /* Image Gallery */
171
+ if ( typeof wp !== 'undefined' && typeof wp.media !== 'undefined' ) {
172
+ $( document ).on( 'click', $imageGallery.buttonHandler, function ( e ) {
173
+ var $t = $( this ),
174
+ $container = $t.closest( '.image-gallery' ),
175
+ $image_gallery_ids = $container.find( '.image_gallery_ids' ),
176
+ attachment_ids = $image_gallery_ids.val(),
177
+ $gallery_images_wrapper = $container.find( 'ul.slides-wrapper' );
178
+
179
+ // Create the media frame.
180
+ var image_gallery_frame = wp.media.frames.image_gallery = wp.media( {
181
+ // Set the title of the modal.
182
+ title : $t.data( 'choose' ),
183
+ button: {
184
+ text: $t.data( 'update' )
185
+ },
186
+ states: [
187
+ new wp.media.controller.Library( {
188
+ title : $t.data( 'choose' ),
189
+ filterable: 'all',
190
+ multiple : true
191
+ } )
192
+ ]
193
+ } );
194
+
195
+ // When an image is selected, run a callback.
196
+ image_gallery_frame.on( 'select', function () {
197
+ var selection = image_gallery_frame.state().get( 'selection' );
198
+ selection.map( function ( attachment ) {
199
+ attachment = attachment.toJSON();
200
+
201
+ if ( attachment.id ) {
202
+ attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;
203
+ $gallery_images_wrapper.append( '<li class="image" data-attachment_id="' + attachment.id + '"><img src="' + attachment.sizes.thumbnail.url + '"/><ul class="actions"><li><a href="#" class="delete" title="' + $t.data( 'delete' ) + '">x</a></li></ul></li>' );
204
+ }
205
+ } );
206
+
207
+ $image_gallery_ids.val( attachment_ids );
208
+ } );
209
+
210
+ image_gallery_frame.open();
211
+
212
+ } );
213
+
214
+ // Image ordering
215
+ $imageGallery.sliderWrapper.each( function () {
216
+ var $t = $( this );
217
+ $t.sortable( {
218
+ items : 'li.image',
219
+ cursor : 'move',
220
+ scrollSensitivity : 40,
221
+ forcePlaceholderSize: true,
222
+ forceHelperSize : false,
223
+ helper : 'clone',
224
+ opacity : 0.65,
225
+ start : function ( event, ui ) {
226
+ ui.item.css( 'background-color', '#f6f6f6' );
227
+ },
228
+ stop : function ( event, ui ) {
229
+ ui.item.removeAttr( 'style' );
230
+ },
231
+ update : function ( event, ui ) {
232
+ var attachment_ids = '';
233
+
234
+ $t.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
235
+ var attachment_id = $( this ).attr( 'data-attachment_id' );
236
+ attachment_ids = attachment_ids + attachment_id + ',';
237
+ } );
238
+
239
+ $t.closest( '.image-gallery' ).find( '.image_gallery_ids' ).val( attachment_ids );
240
+ }
241
+ } );
242
+ } );
243
+
244
+ // Remove images
245
+ $imageGallery.sliderWrapper.on( 'click', 'a.delete', function () {
246
+ var $wrapper = $( this ).closest( '.image-gallery' ),
247
+ $gallery = $( this ).closest( '.image-gallery ul.slides-wrapper' ),
248
+ $image_gallery_ids = $wrapper.find( '.image_gallery_ids' ),
249
+ attachment_ids = '';
250
+
251
+ $( this ).closest( 'li.image' ).remove();
252
+
253
+ $gallery.find( 'li.image' ).css( 'cursor', 'default' ).each( function () {
254
+ var attachment_id = $( this ).attr( 'data-attachment_id' );
255
+ attachment_ids = attachment_ids + attachment_id + ',';
256
+ } );
257
+
258
+ $image_gallery_ids.val( attachment_ids );
259
+ } );
260
+ }
261
+
262
+
263
+ /* Sidebars */
264
+ $sidebars.each( function () {
265
+ var $images = $( this ).find( 'img' );
266
+ $images.on( 'click', function () {
267
+ var $container = $( this ).closest( '.yith-plugin-fw-sidebar-layout' ),
268
+ $left = $container.find( '.yith-plugin-fw-sidebar-layout-sidebar-left-container' ),
269
+ $right = $container.find( '.yith-plugin-fw-sidebar-layout-sidebar-right-container' ),
270
+ type = $( this ).data( 'type' );
271
+
272
+ $( this ).parent().children( ':radio' ).attr( 'checked', false );
273
+ $( this ).prev( ':radio' ).attr( 'checked', true );
274
+
275
+ if ( typeof type != 'undefined' ) {
276
+ switch ( type ) {
277
+ case 'left':
278
+ $left.show();
279
+ $right.hide();
280
+ break;
281
+ case 'right':
282
+ $right.show();
283
+ $left.hide();
284
+ break;
285
+ case 'double':
286
+ $left.show();
287
+ $right.show();
288
+ break;
289
+ default:
290
+ $left.hide();
291
+ $right.hide();
292
+ break;
293
+ }
294
+ }
295
+ } );
296
+ } );
297
+
298
+ /* Slider */
299
+ $slider.each( function () {
300
+ var val = $( this ).data( 'val' ),
301
+ minValue = $( this ).data( 'min' ),
302
+ maxValue = $( this ).data( 'max' ),
303
+ step = $( this ).data( 'step' ),
304
+ labels = $( this ).data( 'labels' );
305
+
306
+ $( this ).slider( {
307
+ value: val,
308
+ min : minValue,
309
+ max : maxValue,
310
+ range: 'min',
311
+ step : step,
312
+
313
+ create: function () {
314
+ $( this ).find( '.ui-slider-handle' ).text( $( this ).slider( "value" ) );
315
+ },
316
+
317
+
318
+ slide: function ( event, ui ) {
319
+ $( this ).find( 'input' ).val( ui.value );
320
+ $( this ).find( '.ui-slider-handle' ).text( ui.value );
321
+ $( this ).siblings( '.feedback' ).find( 'strong' ).text( ui.value + labels );
322
+ }
323
+ } );
324
+ } );
325
+
326
+ /* codemirror */
327
+ $codemirror.each( function ( i, v ) {
328
+ var editor = CodeMirror.fromTextArea( v, {
329
+ lineNumbers : 1,
330
+ mode : 'javascript',
331
+ showCursorWhenSelecting: true
332
+ } );
333
+
334
+ $( v ).data( 'codemirrorInstance', editor );
335
+ } );
336
+
337
+ /* Select All - Deselect All */
338
+ $( document ).on( 'click', '.yith-plugin-fw-select-all', function () {
339
+ var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
340
+ $targetSelect.find( 'option' ).prop( 'selected', true ).trigger( 'change' );
341
+ } );
342
+
343
+ $( document ).on( 'click', '.yith-plugin-fw-deselect-all', function () {
344
+ var $targetSelect = $( '#' + $( this ).data( 'select-id' ) );
345
+ $targetSelect.find( 'option' ).prop( 'selected', false ).trigger( 'change' );
346
+ } );
347
+
348
+
349
+ $icons.each( function () {
350
+ var $container = $( this ),
351
+ $preview = $container.find( '.yit-icons-manager-icon-preview' ).first(),
352
+ $text = $container.find( '.yit-icons-manager-icon-text' );
353
+
354
+ $container.on( 'click', '.yit-icons-manager-list li', function ( event ) {
355
+ var $target = $( event.target ).closest( 'li' ),
356
+ font = $target.data( 'font' ),
357
+ icon = $target.data( 'icon' ),
358
+ key = $target.data( 'key' ),
359
+ name = $target.data( 'name' );
360
+
361
+ $preview.attr( 'data-font', font );
362
+ $preview.attr( 'data-icon', icon );
363
+ $preview.attr( 'data-key', key );
364
+ $preview.attr( 'data-name', name );
365
+
366
+ $text.val( font + ':' + name );
367
+
368
+ $container.find( '.yit-icons-manager-list li' ).removeClass( 'active' );
369
+ $target.addClass( 'active' );
370
+ } );
371
+
372
+ $container.on( 'click', '.yit-icons-manager-action-set-default', function () {
373
+ $container.find( '.yit-icons-manager-list li.default' ).trigger( 'click' );
374
+ } );
375
+ } );
376
+
377
+ /** Select Images */
378
+ $( document ).on( 'click', '.yith-plugin-fw-select-images__item', function () {
379
+ var item = $( this ),
380
+ key = item.data( 'key' ),
381
+ wrapper = item.closest( '.yith-plugin-fw-select-images__wrapper' ),
382
+ items = wrapper.find( '.yith-plugin-fw-select-images__item' ),
383
+ select = wrapper.find( 'select' ).first();
384
+
385
+ if ( select.length ) {
386
+ select.val( key );
387
+ items.removeClass( 'yith-plugin-fw-select-images__item--selected' );
388
+ item.addClass( 'yith-plugin-fw-select-images__item--selected' );
389
+ }
390
+ } );
391
+
392
+ $( document.body ).trigger( 'wc-enhanced-select-init' );
393
+
394
+ $( document ).find( '.ui-sortable .yith-toggle-elements' ).sortable(
395
+ {
396
+ cursor : 'move',
397
+ axis : 'y',
398
+ scrollSensitivity : 40,
399
+ forcePlaceholderSize: true,
400
+ helper : 'clone',
401
+
402
+ stop: function ( event, ui ) {
403
+ var keys = jQuery( '.ui-sortable-handle' ),
404
+ i = 0,
405
+ array_keys = new Array();
406
+ for ( i = 0; i < keys.length; i++ ) {
407
+ array_keys[ i ] = $( keys[ i ] ).data( 'item_key' );
408
+ }
409
+ if ( array_keys.length > 0 ) {
410
+ var toggle = $( this ).closest( '.toggle-element' );
411
+ toggle.saveToggleElement( null, array_keys );
412
+ }
413
+ }
414
+ }
415
+ );
416
+
417
+ $( document.body ).trigger( 'yith-framework-enhanced-select-init' );
418
+ };
419
+
420
+ $( document ).on( 'yith_fields_init', yith_fields_init ).trigger( 'yith_fields_init' );
421
+
422
+ /* on-off */
423
+ $( document ).on( 'click', '.yith-plugin-fw-onoff-container span', function () {
424
+ var input = $( this ).prev( 'input' ),
425
+ checked = input.prop( 'checked' );
426
+
427
+ if ( checked ) {
428
+ input.prop( 'checked', false ).attr( 'value', 'no' ).removeClass( 'onoffchecked' );
429
+ } else {
430
+ input.prop( 'checked', true ).attr( 'value', 'yes' ).addClass( 'onoffchecked' );
431
+ }
432
+
433
+ input.change();
434
+ } );
435
+
436
+
437
+ /** Toggle **/
438
+
439
+
440
+
441
+ //TOGGLE ELEMENT
442
+ $.fn.saveToggleElement = function ( spinner, array_keys ) {
443
+ var toggle = $( this ),
444
+ action = 'yith_plugin_fw_save_toggle_element',
445
+ formdata = toggle.serializeToggleElement(),
446
+ wrapper = toggle.find( '.yith-toggle_wrapper' ),
447
+ id = wrapper.attr( 'id' ),
448
+ current_tab = $.urlParam( 'tab' );
449
+
450
+ formdata.append( 'security', wrapper.data( 'nonce' ) );
451
+
452
+ if ( typeof array_keys != 'undefined' && array_keys.length > 0 ) {
453
+ formdata.append( 'yith_toggle_elements_order_keys', array_keys );
454
+ }
455
+
456
+ if ( toggle.closest( '.metaboxes-tab.yith-plugin-ui' ).length ) {
457
+ action = 'yith_plugin_fw_save_toggle_element_metabox';
458
+ post_id = $( this ).closest( 'form#post' ).find( '#post_ID' ).val();
459
+ yit_metaboxes_nonce = $( this ).closest( 'form#post' ).find( '#yit_metaboxes_nonce' ).val();
460
+ metabox_tab = $( this ).closest( '.tabs-panel' ).attr( 'id' );
461
+ url = yith_framework_fw_fields.ajax_url +
462
+ '?action=' + action +
463
+ "&post_ID=" + post_id +
464
+ '&yit_metaboxes_nonce=' + yit_metaboxes_nonce +
465
+ "&toggle_id=" + id +
466
+ "&metabox_tab=" + metabox_tab;
467
+ } else {
468
+ url = yith_framework_fw_fields.admin_url + '?action=' + action + '&tab=' + current_tab + "&toggle_id=" + id;
469
+ }
470
+
471
+ $.ajax( {
472
+ type : "POST",
473
+ url : url,
474
+ data : formdata,
475
+ contentType: false,
476
+ processData: false,
477
+ success : function ( result ) {
478
+ if ( spinner ) {
479
+ spinner.removeClass( 'show' );
480
+ }
481
+
482
+ $( document ).trigger( 'yith_save_toggle_element_done', [result, toggle] );
483
+ }
484
+ } );
485
+ };
486
+
487
+ $.fn.serializeToggleElement = function () {
488
+ var obj = $( this );
489
+ /* ADD FILE TO PARAM AJAX */
490
+ var formData = new FormData();
491
+ var params = $( obj ).find( ":input" ).serializeArray();
492
+
493
+ $.each( params, function ( i, val ) {
494
+ el_name = val.name;
495
+ formData.append( val.name, val.value );
496
+ } );
497
+
498
+ return formData;
499
+ };
500
+
501
+ $.fn.formatToggleTitle = function () {
502
+ var toggle_el = $( this ),
503
+ fields = toggle_el.find( ':input' ),
504
+ title = toggle_el.find( 'span.title' ).data( 'title_format' ),
505
+ subtitle = toggle_el.find( '.subtitle' ).data( 'subtitle_format' ),
506
+ regExp = new RegExp( "[^%%]+(?=[%%])", 'g' );
507
+
508
+ if ( typeof title != 'undefined' ) {
509
+ var res = title.match( regExp );
510
+ }
511
+
512
+ if ( typeof subtitle != 'undefined' ) {
513
+ var ressub = subtitle.match( regExp );
514
+ }
515
+
516
+ $.each( fields, function ( i, field ) {
517
+ if ( typeof $( field ).attr( 'id' ) != 'undefined' ) {
518
+ $field_id = $( field ).attr( 'id' );
519
+ $field_array = $field_id.split( '_' );
520
+ $field_array.pop();
521
+ $field_id = $field_array.join( '_' );
522
+ $field_val = $( field ).val();
523
+
524
+ if ( res != null && typeof res != 'undefined' && res.indexOf( $field_id ) !== -1 ) {
525
+ title = title.replace( '%%' + $field_id + '%%', $field_val );
526
+ }
527
+ if ( ressub != null && typeof ressub != 'undefined' && ressub.indexOf( $field_id ) !== -1 ) {
528
+ subtitle = subtitle.replace( '%%' + $field_id + '%%', $field_val );
529
+ }
530
+ }
531
+ } );
532
+
533
+ if ( '' !== title ) {
534
+ toggle_el.find( 'span.title' ).html( title );
535
+ }
536
+
537
+ if ( '' !== subtitle ) {
538
+ toggle_el.find( '.subtitle' ).html( subtitle );
539
+ }
540
+
541
+ $( document ).trigger( 'yith-toggle-element-item-title', [toggle_el] );
542
+ };
543
+
544
+ $.urlParam = function ( name ) {
545
+ var results = new RegExp( '[\?&]' + name + '=([^&#]*)' )
546
+ .exec( window.location.search );
547
+
548
+ return ( results !== null ) ? results[ 1 ] || 0 : false;
549
+ };
550
+
551
+ $( document ).on( 'click', '.yith-toggle-title', function ( event ) {
552
+ var _toggle = $( event.target ),
553
+ _section = _toggle.closest( '.yith-toggle-row' ),
554
+ _content = _section.find( '.yith-toggle-content' );
555
+
556
+ if ( _toggle.hasClass( 'yith-plugin-fw-onoff' ) || _toggle.hasClass( 'yith-icon-drag' ) ) {
557
+ return false;
558
+ }
559
+
560
+ if ( _section.is( '.yith-toggle-row-opened' ) ) {
561
+ _content.slideUp( 400 );
562
+ } else {
563
+ _content.slideDown( 400 );
564
+ }
565
+ _section.toggleClass( 'yith-toggle-row-opened' );
566
+ } );
567
+
568
+ /**Add new box toggle**/
569
+ $( document ).on( 'click', '.yith-add-box-button', function ( event ) {
570
+ event.preventDefault();
571
+ var $this = $( this ),
572
+ target_id = $this.data( 'box_id' ),
573