YITH WooCommerce Catalog Mode - Version 1.3.3

Version Description

Last Stable Tag 1.3.3

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Catalog Mode
Version 1.3.3
Comparing to
See all releases

Code changes from version 1.3.2 to 1.3.3

Files changed (51) hide show
  1. assets/css/yith-catalog-mode.min.css +1 -0
  2. class.yith-woocommerce-catalog-mode.php +14 -3
  3. init.php +2 -2
  4. plugin-fw/assets/css/colorbox.css +66 -0
  5. plugin-fw/assets/css/yit-plugin-panel-sidebar.css +377 -0
  6. plugin-fw/assets/css/yit-plugin-panel.css +386 -337
  7. plugin-fw/assets/css/yit-upgrade-to-pro.css +77 -0
  8. plugin-fw/assets/images/colorbox/border1.png +0 -0
  9. plugin-fw/assets/images/colorbox/border2.png +0 -0
  10. plugin-fw/assets/images/colorbox/loading.gif +0 -0
  11. plugin-fw/assets/images/upgrade-page/01.jpg +0 -0
  12. plugin-fw/assets/images/upgrade-page/02.jpg +0 -0
  13. plugin-fw/assets/images/upgrade-page/03.jpg +0 -0
  14. plugin-fw/assets/images/upgrade-page/04.jpg +0 -0
  15. plugin-fw/assets/images/upgrade-page/05.jpg +0 -0
  16. plugin-fw/assets/images/upgrade-page/06.jpg +0 -0
  17. plugin-fw/assets/images/upgrade-page/07.jpg +0 -0
  18. plugin-fw/assets/images/upgrade-page/08.jpg +0 -0
  19. plugin-fw/assets/images/upgrade-page/09.jpg +0 -0
  20. plugin-fw/assets/images/widgets/box-icon.png +0 -0
  21. plugin-fw/assets/images/widgets/box-white-icon.png +0 -0
  22. plugin-fw/assets/images/widgets/despacho.png +0 -0
  23. plugin-fw/assets/images/widgets/info-icon.png +0 -0
  24. plugin-fw/assets/images/widgets/link-bg.png +0 -0
  25. plugin-fw/assets/images/widgets/link-bg2.png +0 -0
  26. plugin-fw/assets/images/widgets/link-icon.png +0 -0
  27. plugin-fw/assets/images/widgets/membership-bg.png +0 -0
  28. plugin-fw/assets/js/jquery.colorbox.js +1105 -0
  29. plugin-fw/assets/js/yit-plugin-panel-sidebar.js +56 -0
  30. plugin-fw/assets/js/yit-plugin-panel-sidebar.min.js +1 -0
  31. plugin-fw/init.php +1 -1
  32. plugin-fw/languages/yith-plugin-fw-it_IT.mo +0 -0
  33. plugin-fw/languages/yith-plugin-fw-it_IT.po +147 -17
  34. plugin-fw/lib/yit-ajax.php +76 -0
  35. plugin-fw/lib/yit-plugin-panel-sidebar.php +417 -0
  36. plugin-fw/lib/yit-plugin-panel-wc.php +25 -6
  37. plugin-fw/lib/yit-plugin-panel.php +101 -11
  38. plugin-fw/lib/yit-upgrade.php +2 -2
  39. plugin-fw/templates/panel/sidebar/sidebar.php +20 -0
  40. plugin-fw/templates/panel/sidebar/widget.php +53 -0
  41. plugin-fw/templates/panel/sidebar/widgets/badges/badge.php +11 -0
  42. plugin-fw/templates/panel/sidebar/widgets/widget-despacho.php +19 -0
  43. plugin-fw/templates/panel/sidebar/widgets/widget-links.php +34 -0
  44. plugin-fw/templates/panel/sidebar/widgets/widget-membership.php +24 -0
  45. plugin-fw/templates/panel/sidebar/widgets/widgets.php +42 -0
  46. plugin-fw/templates/panel/woocommerce/woocommerce-form.php +28 -13
  47. plugin-fw/templates/upgrade/upgrade-to-pro-version.php +53 -20
  48. plugin-fw/yit-functions.php +1 -1
  49. plugin-fw/yit-plugin-registration-hook.php +6 -0
  50. plugin-fw/yit-plugin.php +2 -0
  51. readme.txt +6 -2
assets/css/yith-catalog-mode.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .widget.woocommerce.widget_shopping_cart{display:none!important}
class.yith-woocommerce-catalog-mode.php CHANGED
@@ -565,15 +565,22 @@ if ( !class_exists( 'YITH_WC_Catalog_Mode' ) ) {
565
  */
566
  public function hide_add_to_cart_loop() {
567
 
 
 
568
  if ( $this->check_hide_add_cart_loop() ) {
569
 
570
- remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
 
 
571
  add_filter( 'woocommerce_loop_add_to_cart_link', '__return_empty_string', 10 );
572
 
573
  }
574
  else {
575
 
576
- add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
 
 
 
577
  remove_filter( 'woocommerce_loop_add_to_cart_link', '__return_empty_string', 10 );
578
 
579
  }
@@ -590,7 +597,11 @@ if ( !class_exists( 'YITH_WC_Catalog_Mode' ) ) {
590
  public function enqueue_styles() {
591
 
592
  if ( get_option( 'ywctm_hide_cart_header' ) == 'yes' ) {
593
- wp_enqueue_style( 'ywctm-style', YWCTM_ASSETS_URL . '/css/yith-catalog-mode.css' );
 
 
 
 
594
  }
595
 
596
  }
565
  */
566
  public function hide_add_to_cart_loop() {
567
 
568
+ $ywctm_modify_woocommerce_after_shop_loop_item = apply_filters( 'ywctm_modify_woocommerce_after_shop_loop_item', true );
569
+
570
  if ( $this->check_hide_add_cart_loop() ) {
571
 
572
+ if ( $ywctm_modify_woocommerce_after_shop_loop_item ) {
573
+ remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
574
+ }
575
  add_filter( 'woocommerce_loop_add_to_cart_link', '__return_empty_string', 10 );
576
 
577
  }
578
  else {
579
 
580
+ if ( $ywctm_modify_woocommerce_after_shop_loop_item ) {
581
+ add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
582
+ }
583
+
584
  remove_filter( 'woocommerce_loop_add_to_cart_link', '__return_empty_string', 10 );
585
 
586
  }
597
  public function enqueue_styles() {
598
 
599
  if ( get_option( 'ywctm_hide_cart_header' ) == 'yes' ) {
600
+
601
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
602
+
603
+ wp_enqueue_style( 'ywctm-style', YWCTM_ASSETS_URL . '/css/yith-catalog-mode' . $suffix . '.css' );
604
+
605
  }
606
 
607
  }
init.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-catalog-mode/
5
  Description: YITH WooCommerce Catalog Mode allows you to disable shop functions.
6
  Author: YITHEMES
7
  Text Domain: yith-woocommerce-catalog-mode
8
- Version: 1.3.2
9
  Author URI: http://yithemes.com/
10
  */
11
 
@@ -34,7 +34,7 @@ function ywctm_install_free_admin_notice() {
34
  }
35
 
36
  if ( !defined( 'YWCTM_VERSION' ) ) {
37
- define( 'YWCTM_VERSION', '1.3.2' );
38
  }
39
 
40
  if ( !defined( 'YWCTM_FREE_INIT' ) ) {
5
  Description: YITH WooCommerce Catalog Mode allows you to disable shop functions.
6
  Author: YITHEMES
7
  Text Domain: yith-woocommerce-catalog-mode
8
+ Version: 1.3.3
9
  Author URI: http://yithemes.com/
10
  */
11
 
34
  }
35
 
36
  if ( !defined( 'YWCTM_VERSION' ) ) {
37
+ define( 'YWCTM_VERSION', '1.3.3' );
38
  }
39
 
40
  if ( !defined( 'YWCTM_FREE_INIT' ) ) {
plugin-fw/assets/css/colorbox.css ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Colorbox Core Style:
3
+ The following CSS is consistent between example themes and should not be altered.
4
+ */
5
+ #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden; -webkit-transform: translate3d(0,0,0);}
6
+ #cboxWrapper {max-width:none;}
7
+ #cboxOverlay{position:fixed; width:100%; height:100%;}
8
+ #cboxMiddleLeft, #cboxBottomLeft{clear:left;}
9
+ #cboxContent{position:relative;}
10
+ #cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
11
+ #cboxTitle{margin:0;}
12
+ #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
13
+ #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
14
+ .cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
15
+ .cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
16
+ #colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
17
+
18
+ /*
19
+ User Style:
20
+ Change the following styles to modify the appearance of Colorbox. They are
21
+ ordered & tabbed in a way that represents the nesting of the generated HTML.
22
+ */
23
+ #cboxOverlay{background:#fff; opacity: 0.9; filter: alpha(opacity = 90);}
24
+ #colorbox{outline:0;}
25
+ #cboxTopLeft{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat 0 0;}
26
+ #cboxTopCenter{height:25px; background:url(../images/colorbox/border1.png) repeat-x 0 -50px;}
27
+ #cboxTopRight{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat -25px 0;}
28
+ #cboxBottomLeft{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat 0 -25px;}
29
+ #cboxBottomCenter{height:25px; background:url(../images/colorbox/border1.png) repeat-x 0 -75px;}
30
+ #cboxBottomRight{width:25px; height:25px; background:url(../images/colorbox/border1.png) no-repeat -25px -25px;}
31
+ #cboxMiddleLeft{width:25px; background:url(../images/colorbox/border2.png) repeat-y 0 0;}
32
+ #cboxMiddleRight{width:25px; background:url(../images/colorbox/border2.png) repeat-y -25px 0;}
33
+ #cboxContent{background:#fff; overflow:hidden;}
34
+ .cboxIframe{background:#fff;}
35
+ #cboxError{padding:50px; border:1px solid #ccc;}
36
+ #cboxLoadedContent{margin-bottom:20px;}
37
+ #cboxTitle{position:absolute; bottom:0px; left:0; text-align:center; width:100%; color:#999;}
38
+ #cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999;}
39
+ #cboxLoadingOverlay{background:#fff url(../images/colorbox/loading.gif) no-repeat 5px 5px;}
40
+
41
+ /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
42
+ #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
43
+
44
+ /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
45
+ #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
46
+
47
+ #cboxSlideshow{position:absolute; bottom:0px; right:42px; color:#444;}
48
+ #cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
49
+ #cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
50
+ #cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}
51
+
52
+ /*
53
+ The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
54
+ when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9.
55
+ See: http://jacklmoore.com/notes/ie-transparency-problems/
56
+ */
57
+ .cboxIE #cboxTopLeft,
58
+ .cboxIE #cboxTopCenter,
59
+ .cboxIE #cboxTopRight,
60
+ .cboxIE #cboxBottomLeft,
61
+ .cboxIE #cboxBottomCenter,
62
+ .cboxIE #cboxBottomRight,
63
+ .cboxIE #cboxMiddleLeft,
64
+ .cboxIE #cboxMiddleRight {
65
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
66
+ }
plugin-fw/assets/css/yit-plugin-panel-sidebar.css ADDED
@@ -0,0 +1,377 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * This file belongs to the YIT Plugin Framework.
3
+ *
4
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
+ * that is bundled with this package in the file LICENSE.txt.
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.gnu.org/licenses/gpl-3.0.txt
8
+ */
9
+
10
+ /* === Panel Sidebar === */
11
+ #yit-panel-sidebar {
12
+ width : 275px;
13
+ float : right;
14
+ margin : 10px 0 0 10px;
15
+ }
16
+
17
+ #yit-panel-sidebar.yith-panel-sidebar-hidden {
18
+ position : absolute;
19
+ top : 0;
20
+ right : 0;
21
+ }
22
+
23
+ #yit-panel-sidebar.yith-panel-sidebar-hidden #yit-panel-sidebar-widgets-container{
24
+ display: none;
25
+ }
26
+
27
+ .yit-panel-sidebar-widget-wrapper {
28
+ position : relative;
29
+ margin : 10px 0 30px 0;
30
+ }
31
+
32
+ .yit-panel-sidebar-widget-container {
33
+ border-radius : 5px;
34
+ border : 1px solid #ddd;
35
+ background : #fff;
36
+ box-shadow : 0 2px 1px -1px #ccc;
37
+ overflow : hidden;
38
+ }
39
+
40
+ .yit-panel-sidebar-widget-container a {
41
+ text-decoration : none;
42
+ }
43
+
44
+ .yit-panel-sidebar-widget-container img.yit-panel-sidebar-widget-image {
45
+ width : 100%;
46
+ position : relative;
47
+ bottom : -5px;
48
+ }
49
+
50
+ .yit-panel-sidebar-widget-title {
51
+ padding : 12px 10px;
52
+ background : #f4f4f4;
53
+ font-size : 10px;
54
+ text-transform : uppercase;
55
+ font-weight : 700;
56
+ }
57
+
58
+ .yit-panel-sidebar-widget-title.dashicons {
59
+ width : auto !important;
60
+ height : auto !important;
61
+ display : block;
62
+ font-family : "Open Sans", sans-serif;
63
+ text-align : left;
64
+ }
65
+
66
+ .yit-panel-sidebar-widget-title.dashicons::before {
67
+ font-family : "Dashicons";
68
+ font-size : 18px;
69
+ display : inline-block;
70
+ vertical-align : middle;
71
+ margin-right : 10px;
72
+ font-weight : normal;
73
+ }
74
+
75
+ .yit-panel-sidebar-widget-title.orange {
76
+ background : #ff643e;
77
+ color : #fff;
78
+ }
79
+
80
+ .yit-panel-sidebar-widget-title.green {
81
+ background : #a3c401;
82
+ color : #fff;
83
+ }
84
+
85
+ .yit-panel-sidebar-widget-title.red {
86
+ background : #e4313c;
87
+ color : #fff;
88
+ }
89
+
90
+ .yit-panel-sidebar-widget-title.yellow {
91
+ background : #ffc400;
92
+ color : #333;
93
+ }
94
+
95
+ .yit-panel-sidebar-widget-title.center {
96
+ text-align : center;
97
+ }
98
+
99
+ .yit-panel-sidebar-widget-title.right {
100
+ text-align : right;
101
+ }
102
+
103
+ .yit-panel-sidebar-widget-content {
104
+ padding : 15px;
105
+ }
106
+
107
+ .yit-panel-sidebar-widget-content p {
108
+ font-size : 11px;
109
+ line-height : 18px;
110
+ margin : 0;
111
+ text-align : justify;
112
+ }
113
+
114
+ .yit-panel-sidebar-widget-badge.gift-tape {
115
+ color : #000;
116
+ font-family : "Open Sans", sans-serif;
117
+ box-sizing : border-box;
118
+ position : absolute;
119
+ background-color : transparent;
120
+ width : 70px;
121
+ height : 70px;
122
+ overflow : hidden;
123
+ top : 0;
124
+ right : 0;
125
+ }
126
+
127
+ .yit-panel-sidebar-widget-badge.gift-tape div.yit-panel-sidebar-widget-badge-text {
128
+ background : #ffd600;
129
+ background : -webkit-linear-gradient(left, #fe8502, #ffe400); /* For Safari 5.1 to 6.0 */
130
+ background : -o-linear-gradient(right, #fe8502, #ffe400); /* For Opera 11.1 to 12.0 */
131
+ background : -moz-linear-gradient(right, #fe8502, #ffe400); /* For Firefox 3.6 to 15 */
132
+ background : linear-gradient(to right, #fe8502, #ffe400); /* Standard syntax */
133
+ font-size : 10px;
134
+ font-weight : bold;
135
+ line-height : 24px;
136
+ position : absolute;
137
+ text-align : center;
138
+ z-index : 100;
139
+ -webkit-transform : rotate(45deg);
140
+ -ms-transform : rotate(45deg);
141
+ transform : rotate(45deg);
142
+ top : 15px;
143
+ left : -6px;
144
+ width : 100px;
145
+ text-shadow : 1px 1px 1px #fff;
146
+ }
147
+
148
+ img.yit-panel-sidebar-widget-despacho-image {
149
+ background : #ffffff;
150
+ background : -webkit-linear-gradient(#ffffff, #a5b7c5); /* For Safari 5.1 to 6.0 */
151
+ background : -o-linear-gradient(#ffffff, #a5b7c5); /* For Opera 11.1 to 12.0 */
152
+ background : -moz-linear-gradient(#ffffff, #a5b7c5); /* For Firefox 3.6 to 15 */
153
+ background : linear-gradient(#ffffff, #a5b7c5); /* Standard syntax */
154
+ }
155
+
156
+ /* ==== Buttons ==== */
157
+ #yit-panel-sidebar .button {
158
+ color : #ffffff;
159
+ border : none;
160
+ background : #666666;
161
+ -webkit-box-shadow : none;
162
+ box-shadow : none;
163
+ vertical-align : middle;
164
+ text-transform : uppercase;
165
+ font-size : 11px;
166
+ font-weight : 700;
167
+ height : 32px;
168
+ line-height : 32px;
169
+ padding : 0 18px 1px;
170
+ }
171
+
172
+ #yit-panel-sidebar .button.orange {
173
+ background : #ff6340;
174
+ }
175
+
176
+ #yit-panel-sidebar .button.green {
177
+ background : #a3c401;
178
+ }
179
+
180
+ #yit-panel-sidebar .button.red {
181
+ background : #e4313c;
182
+ }
183
+
184
+ #yit-panel-sidebar .button.yellow {
185
+ background : #ffc400;
186
+ }
187
+
188
+ /* === Title Icons === */
189
+ #yit-panel-sidebar .yit-panel-sidebar-widget-icon:before {
190
+ content : " ";
191
+ width : 16px;
192
+ height : 16px;
193
+ display : inline-block;
194
+ vertical-align : middle;
195
+ margin-right : 10px;
196
+ }
197
+
198
+ #yit-panel-sidebar .yit-panel-sidebar-widget-icon.link-icon:before {
199
+ background : transparent url('../images/widgets/link-icon.png') no-repeat;
200
+ background-size : contain;
201
+ }
202
+
203
+ #yit-panel-sidebar .yit-panel-sidebar-widget-icon.info-icon:before {
204
+ background : transparent url('../images/widgets/info-icon.png') no-repeat;
205
+ background-size : contain;
206
+ }
207
+
208
+ #yit-panel-sidebar .yit-panel-sidebar-widget-icon.box-icon:before {
209
+ background : transparent url('../images/widgets/box-icon.png') no-repeat;
210
+ background-size : contain;
211
+ }
212
+
213
+ #yit-panel-sidebar .yit-panel-sidebar-widget-icon.box-white-icon:before {
214
+ background : transparent url('../images/widgets/box-white-icon.png') no-repeat;
215
+ background-size : contain;
216
+ }
217
+
218
+ /* ==== Membership Widget ==== */
219
+ #yit-panel-sidebar-membership-widget {
220
+
221
+ }
222
+
223
+ #yit-panel-sidebar-membership-widget .yit-panel-sidebar-widget-title {
224
+ text-align : center;
225
+ }
226
+
227
+ #yit-panel-sidebar-membership-widget .yit-panel-sidebar-widget-content {
228
+ background : transparent url('../images/widgets/membership-bg.png') no-repeat;
229
+ background-position : 100% 180%;
230
+ background-size : 50%;
231
+ }
232
+
233
+ #yit-panel-sidebar-membership-widget .membership-total-price {
234
+ font-size : 25px;
235
+ font-weight : 700;
236
+ display : inline-block;
237
+
238
+ }
239
+
240
+ #yit-panel-sidebar-membership-widget .membership-offer-text {
241
+ display : inline-block;
242
+ font-size : 10px;
243
+ text-transform : uppercase;
244
+ width : 130px;
245
+ line-height : 14px;
246
+ }
247
+
248
+ #yit-panel-sidebar-membership-widget .membership-offer-text2 {
249
+ display : inline-block;
250
+ font-size : 10px;
251
+ text-transform : uppercase;
252
+ width : 36%;
253
+ text-align : right;
254
+ vertical-align : middle;
255
+ margin : 17px 0;
256
+ }
257
+
258
+ #yit-panel-sidebar-membership-widget .membership-offer-sale-text {
259
+ display : inline-block;
260
+ font-size : 24px;
261
+ color : #ff6340;
262
+ text-transform : uppercase;
263
+ width : 55%;
264
+ text-align : left;
265
+ vertical-align : middle;
266
+ margin : 17px 0;
267
+ font-weight : 700;
268
+ }
269
+
270
+ #yit-panel-sidebar-membership-widget .membership-buttons {
271
+ text-align : center;
272
+ margin-bottom : 10px;
273
+ }
274
+
275
+ /* ==== Important Links Widget ==== */
276
+ #yit-panel-sidebar-links-widget .yit-panel-sidebar-widget-content {
277
+ background : transparent url('../images/widgets/link-bg.png') no-repeat;
278
+ background-position : 110% 120%;
279
+ background-size : 50%;
280
+ }
281
+
282
+ ul.yit-panel-sidebar-links-list {
283
+ margin : 0;
284
+ }
285
+
286
+ ul.yit-panel-sidebar-links-list li {
287
+ margin : 0 0 10px 0;
288
+ }
289
+
290
+ ul.yit-panel-sidebar-links-list li:before {
291
+ content : " ";
292
+ width : 15px;
293
+ height : 13px;
294
+ display : inline-block;
295
+ background : transparent url('../images/ui-icons_454545_256x240.png') no-repeat -64px -144px;
296
+ margin-right : 7px;
297
+ }
298
+
299
+ /* === Sidebar Actions ===*/
300
+ #yit-panel-sidebar-actions {
301
+ text-align : right;
302
+ }
303
+
304
+ .yit-panel-sidebar-action-title {
305
+ margin-right : 5px;
306
+ text-transform : uppercase;
307
+ font-size : 11px;
308
+ }
309
+
310
+ #yit-panel-sidebar-action-hide {
311
+ text-align : right;
312
+ cursor : pointer;
313
+ }
314
+
315
+ .yit-panel-sidebar-action-hide-icon {
316
+ color : #f4f4f4;
317
+ background : #565656;
318
+ border-radius : 50%;
319
+ }
320
+
321
+ #yit-panel-sidebar-action-hide:hover .yit-panel-sidebar-action-title{
322
+ color: #000;
323
+ }
324
+
325
+ #yit-panel-sidebar-action-hide:hover .yit-panel-sidebar-action-hide-icon{
326
+ background: #000;
327
+ }
328
+
329
+ .hide-on-click .yit-panel-sidebar-action-hide-icon:before {
330
+ content : "\f139" !important;
331
+ }
332
+
333
+ /* === Responsive === */
334
+
335
+ @media (min-width : 767px) {
336
+ #wpbody-content #yit-panel-sidebar {
337
+ margin-right : 15px;
338
+ }
339
+ }
340
+
341
+ @media (max-width : 767px) {
342
+ #yit-panel-sidebar {
343
+ width : 275px;
344
+ margin : 20px auto 0 auto;
345
+ float : none;
346
+ display : block;
347
+ }
348
+
349
+ #yit-panel-sidebar.yith-panel-sidebar-hidden {
350
+ position : static;
351
+ }
352
+
353
+ #yit-panel-sidebar-actions {
354
+ text-align : center;
355
+ }
356
+
357
+ #yit-panel-sidebar-action-hide {
358
+ text-align : center;
359
+ }
360
+ }
361
+
362
+ @media (max-width : 480px) {
363
+
364
+ }
365
+
366
+ @media (min-width : 768px) and (max-width : 992px) {
367
+ }
368
+
369
+ @media (min-width : 980px) and (max-width : 1199px) {
370
+ }
371
+
372
+ @media (min-width : 1200px) {
373
+
374
+ }
375
+
376
+ @media only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (-o-min-device-pixel-ratio : 3/2), only screen and (min--moz-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5) {
377
+ }
plugin-fw/assets/css/yit-plugin-panel.css CHANGED
@@ -9,599 +9,627 @@
9
 
10
  /* onoff */
11
  .rm_onoff input {
12
- display: none;
13
  }
14
 
15
  .rm_onoff input + span {
16
- cursor: pointer;
17
- text-indent: -9999px;
18
- display: block;
19
- width: 85px;
20
- height: 37px;
21
- background: transparent url(../images/off.png);
22
  }
23
 
24
  .rm_onoff input:checked + span {
25
- background: transparent url(../images/on.png);
26
  }
27
 
28
  .rm_onoff input.onoffchecked + span {
29
- background: transparent url(../images/on.png);
30
  }
31
 
32
  /* slider */
33
  /*numbers*/
34
  .ui-slider .maxCaption, .ui-slider .minCaption {
35
- margin-bottom: 5px;
36
  }
 
37
  .ui-slider .feedback {
38
- background: url(../images/slider/tooltip.png) no-repeat center top;
39
- position: absolute;
40
- top: -25px;
41
- width: 35px;
42
- height: 43px;
43
- text-align: center;
44
- width: 100%;
45
- display: block;
46
  }
 
47
  .ui-slider .feedback strong {
48
- display: inline-block;
49
- padding-top: 4px;
50
- top: -30px;
51
  }
 
52
  /*handle*/
53
  .yit-options .ui-slider-horizontal .ui-slider-handle,
54
  .yit_options .ui-slider-horizontal .ui-slider-handle {
55
- background: transparent url(../images/slider/handle.png) no-repeat left top !important;
56
- border: 0px !important;
57
- top: -.35em !important;
58
- width: 18px !important;
59
- height: 19px !important;
60
  }
61
 
62
  /*bg on the left:grey*/
63
  .yit-options .ui-slider.ui-widget-content,
64
  .yit_options .ui-slider.ui-widget-content {
65
- background: url(../images/slider/grey.gif) repeat-x left center !important;
66
- border-color: #c1c1c0 !important;
67
- height: 10px !important;
68
  }
69
 
70
  .iris-slider-offset.ui-slider.ui-widget-content {
71
- background: transparent!important;
72
- height: auto!important;
73
  }
74
 
75
  /*bg on the right:orange*/
76
  .ui-slider.ui-widget-content .ui-widget-header {
77
- background: url(../images/slider/orange.gif) repeat-x left center !important;
78
- left: 2px !important;
79
- -webkit-border-radius: 15px;
80
- -moz-border-radius: 15px;
81
- -khtml-border-radius: 15px;
82
- border-radius: 15px;
83
  }
84
 
85
- .plugin-option tr{
86
- border-bottom: 1px solid #ccc;
87
  }
 
88
  .plugin-option .yit_options,
89
- .plugin-option .yit-options{
90
- border-bottom: 0px;
91
  }
 
92
  .plugin-option .yit-options .option,
93
  .plugin-option .yit_options .option {
94
- width: 600px;
95
- float: left;
96
  }
97
 
98
- .plugin-option .form-table td{
99
- padding: 25px 10px;
100
  }
101
 
102
  .yit_options .select_wrapper,
103
  .yit-options .select_wrapper {
104
- background: url("../images/select.png") no-repeat scroll right center #FAFAFA;
105
- border-color: #CCCCCC #EEEEEE #EEEEEE #CCCCCC;
106
- border-radius: 4px 4px 4px 4px;
107
- border-style: solid;
108
- border-width: 1px;
109
- color: #555555;
110
- display: block;
111
- float: left;
112
- font-family: sans-serif;
113
- font-size: 12px;
114
- height: 26px;
115
- margin-bottom: 9px !important;
116
- margin-left: 0;
117
- margin-right: 5px;
118
- margin-top: 0;
119
- width: 400px;
120
  }
 
121
  .chosen .select_wrapper {
122
- background: none;
123
- border: none;
124
  }
125
- .chosen .select_wrapper .chosen-container{
126
- width: 338px!important;
 
127
  }
128
- .chosen .select_wrapper .chosen-container .search-field input{
129
- height: 27px!important;
130
- color: #333;
 
131
  }
132
- .chosen .select_wrapper .chosen-container .chosen-choices{
133
- border: 1px solid #ddd;
134
- box-shadow: none;
 
135
  }
136
- .chosen .select_wrapper .chosen-container .chosen-choices li.search-choice{
137
- height: 15px!important;
138
- min-width: 105px;
 
139
  }
140
- .chosen .select_wrapper .chosen-container .chosen-choices li.search-choice span{
141
- line-height: 15px;
142
- height: 15px;
143
- padding-top: 2px;
 
144
  }
145
- .chosen .select_wrapper .chosen-container .chosen-choices li.search-choice a.search-choice-close{
146
- top: 5px;
 
147
  }
148
- .chosen .select_wrapper .chosen-container .chosen-drop .chosen-search input{
149
- width: 100%!important;
 
150
  }
151
 
152
  /* === Multiple Chosen Customizzation === */
153
 
154
  .yith-choosen .chosen-choices {
155
- line-height: 27px;
156
- min-height: 27px;
157
- border: 1px solid #ddd;
158
  }
159
 
160
- .yith-choosen .chosen-container-active .chosen-choices{
161
- border: 1px solid #5b9dd9;
162
- -webkit-box-shadow: 0 0 2px rgba(30,140,190,.8);
163
- box-shadow: 0 0 2px rgba(30,140,190,.8);
164
  }
165
 
166
  .select_wrapper span {
167
- height: 26px;
168
- line-height: 26px;
169
- padding-left: 6px;
170
- position: absolute;
171
- z-index: 2;
172
- overflow: hidden;
173
  }
 
174
  .ie8 .yit_options select,
175
  .ie8 .yit-options select {
176
- height: 26px;
177
  }
 
178
  .yit_options select, .yit-options select, .the-metabox .select_wrapper select {
179
- cursor: pointer;
180
- height: 28px;
181
- margin: 0;
182
- opacity: 0;
183
- padding: 0;
184
- position: relative;
185
- width: inherit;
186
- z-index: 4;
187
- background-color: #FAFAFA;
188
  }
189
 
190
  /* === Single Chosen Customizzation === */
191
 
192
  .yith-choosen .chosen-container-single .chosen-default {
193
- background: transparent;
194
- border-color: #ddd;
195
  }
196
 
197
- .yith-choosen .chosen-search > input[type=text]{
198
- width: 100% !important;
199
  }
200
 
201
  .yith-choosen .chosen-container-single .chosen-single {
202
- background: transparent;
203
- border-color: #ddd;
204
  }
205
 
206
-
207
  /* Style to woocommerce panel*/
208
 
209
- #plugin-fw-wc{
210
- padding-top: 20px;
211
  }
212
- #plugin-fw-wc table.form-table{
213
- background-color: #fff;
214
- margin-bottom: 20px;
 
215
  }
 
216
  #plugin-fw-wc table.form-table th {
217
- padding: 20px;
218
  }
219
- #plugin-fw-wc h3{
220
- padding:0px 10px 10px ;
221
- border-bottom: 1px solid #eee;
 
222
  }
223
 
224
  /* === VIDEO BOX === */
225
 
226
  .yith-videobox-wrapper {
227
- padding-top: 20px;
228
  }
229
- .yith-videobox-wrapper h3{
230
- padding:0px 10px 10px ;
231
- border-bottom: 1px solid #eee;
 
232
  }
233
 
234
  .yith-videobox-wrapper .postbox {
235
- display: inline-block;
236
  }
 
237
  .yith-videobox-wrapper .yith_videobox .column {
238
- width: 45%;
239
- float: left;
240
- padding-right: 2.5%;
241
- border-right: 1px solid #ebebeb;
242
- padding-bottom: 2em;
243
  }
 
244
  .yith-videobox-wrapper .yith_videobox .column.two {
245
- margin-right: 0;
246
- padding-right: 0;
247
- padding-left: 2.5%;
248
- border: 0;
249
- max-width: 49%;
250
  }
251
- .yith-videobox-wrapper .yith_videobox h2{
252
- font-size: 16px;
253
- margin-bottom: 20px;
 
254
  }
 
255
  .yith-videobox-wrapper .yith-video-link {
256
- width: 100%;
257
- max-width: 200px;
258
- float: left;
259
- margin: 0 1.5em 1.5em 0;
260
  }
 
261
  .yith-videobox-wrapper .yith-video-link {
262
- width: 100%;
263
- max-width: 200px;
264
- float: left;
265
- margin: 0 1.5em 1.5em 0;
266
  }
 
267
  .yith-videobox-wrapper .yith-image-frame img {
268
- max-width: 100%;
269
- height: auto;
270
  }
 
271
  .yith-videobox-wrapper .yith-video-link img {
272
- max-width: 100%;
273
- height: auto;
274
  }
 
275
  .yith-videobox-wrapper .yith-video-iframe {
276
- display: none;
277
 
278
  }
279
 
280
  /* === Plugins Upgrader === */
281
 
282
  .yit-plugin-changelog-wrapper {
283
- display: none;
284
  }
285
 
286
  .yit-plugin-changelog-title {
287
- text-transform: uppercase;
288
  }
289
 
290
  .yit-plugin-changelog {
291
- background: #fcfcfc;
292
- height: 97%;
293
- z-index: 999;
294
- overflow: auto;
295
  }
296
 
297
  /* === Plugins Licence Activation === */
298
 
299
  .yit-container.plugin-licence-activation {
300
- font-family: 'Raleway', sans-serif;
301
  }
302
 
303
  .yit-container.plugin-licence-activation .to-active-wrapper {
304
- margin-bottom: 60px;
305
  }
306
 
307
  .yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form {
308
- position: relative;
309
- border-color: #e1e1e1;
310
- border-style: solid;
311
- border-width: 0;
312
  }
313
 
314
  .yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form:first-child {
315
- border-top-width: 1px;
316
  }
317
 
318
  .yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form:last-child {
319
- border-bottom-width: 1px;
320
  }
321
 
322
  .yit-container.plugin-licence-activation .to-active-wrapper table.to-active-table {
323
- border-width: 0;
324
- border-spacing: 0;
325
- width: 100%;
326
  }
327
 
328
  .yit-container.plugin-licence-activation .message {
329
- display: none;
330
- line-height: normal;
331
- background: #ffffff url(../images/licence-error.png) 15px center no-repeat;
332
- padding-left: 65px;
333
- padding-right: 15px;
334
- width: 150px;
335
  }
336
 
337
  .yit-container.plugin-licence-activation .message-wrapper {
338
- height: 75px;
339
- display: none;
340
- position: absolute;
341
- top: 0;
342
- right: -250px;
343
- border: 1px solid #ff3838;
344
  }
345
 
346
  .yit-container.plugin-licence-activation .message-wrapper.visible {
347
- display: table;
348
  }
349
 
350
  .yit-container.plugin-licence-activation .message {
351
- display: table-cell;
352
- vertical-align: middle;
353
  }
354
 
355
  .yit-container.plugin-licence-activation .arrow-left:after,
356
  .yit-container.plugin-licence-activation .arrow-left:before {
357
- content: "";
358
- display: block;
359
- width: 0;
360
- height: 0;
361
- position: absolute;
362
  }
363
 
364
  .yit-container.plugin-licence-activation .arrow-left:before {
365
- border-top: 9px solid transparent;
366
- border-bottom: 9px solid transparent;
367
- border-right: 9px solid #ff3838;
368
- top: 26px;
369
- left: -9px;
370
  }
371
 
372
  .yit-container.plugin-licence-activation .arrow-left:after {
373
- border-top: 8px solid transparent;
374
- border-bottom: 8px solid transparent;
375
- border-right: 8px solid #fff;
376
- left: -8px;
377
- top: 27px;
378
  }
379
 
380
  .yit-container.plugin-licence-activation h2,
381
  .yit-container.plugin-licence-activation h3 {
382
- text-transform: uppercase;
383
- font-weight: 800;
384
- margin-bottom: 30px;
385
  }
386
 
387
  .yit-container.plugin-licence-activation h2 {
388
- color: #808a97;
389
- font-size: 25px;
390
  }
 
391
  .yit-container.plugin-licence-activation h3 {
392
- color: #313131;
393
- font-size: 15px;
394
- height: 20px;
395
  }
396
 
397
  .yit-container.plugin-licence-activation h3.to-active {
398
- height: 20px;
399
- position: relative;
400
- vertical-align: top;
401
  }
402
 
403
- .yit-container.plugin-licence-activation .spinner.show{
404
- display: inline-block;
405
- vertical-align: middle;
406
- float: none;
407
  }
408
 
409
  .yit-container.plugin-licence-activation h3.to-active > .spinner.show {
410
- display: inline-block;
411
- float: none;
412
- top: -3px;
413
- position: relative;
414
  }
415
 
416
- .yit-container.plugin-licence-activation .licence-check-section{
417
- margin-bottom: 60px;
418
  }
419
 
420
  .yit-container.plugin-licence-activation span.licence-label {
421
- font-weight: 500;
422
- color: #606060;
423
- margin-bottom: 30px;
424
  }
425
 
426
  .yit-container.plugin-licence-activation .button-licence {
427
- border: 0;
428
- font-size: 13px;
429
- text-transform: uppercase;
430
- background-color: #808a97;
431
- color: #fff;
432
- font-weight: 700;
433
- border-radius: 3px;
434
- cursor: pointer;
435
- text-decoration: none;
436
- padding: 5px 7px;
437
- -webkit-transition: background-color 0.3s ease;
438
- -moz-transition: background-color 0.3s ease;
439
- -ms-transition: background-color 0.3s ease;
440
- -o-transition: background-color 0.3s ease;
441
- transition: background-color 0.3s ease;
442
  }
443
 
444
  .yit-container.plugin-licence-activation .button-licence:hover {
445
- background-color: #4d5c6f;
446
  }
447
 
448
  .yit-container.plugin-licence-activation .button-licence.clicked {
449
- cursor: not-allowed;
450
- background-color: #e2e2e2 !important;
451
  }
452
 
453
  .yit-container.plugin-licence-activation .button-licence.licence-check {
454
- font-weight: 400;
455
- padding: 12px 19px;
456
  }
457
 
458
  .yit-container.plugin-licence-activation .button-licence.licence-renew {
459
- text-decoration: none;
460
- padding: 7px 12px;
461
- font-size: 9px;
462
  }
463
 
464
  .yit-container.plugin-licence-activation .button-licence.licence-renew:focus {
465
- box-shadow: none;
466
  }
467
 
468
  .yit-container.plugin-licence-activation table:not(.to-active-table) {
469
- width: 100%;
470
- border: 1px solid #dcdcdc;
471
- border-spacing: 0;
472
- border-radius: 5px;
473
- border-collapse: separate;
474
- overflow: hidden;
475
  }
476
 
477
  .yit-container.plugin-licence-activation table:not(.to-active-table) th {
478
- border-bottom: 1px solid #dcdcdc;
479
  }
480
 
481
  .yit-container.plugin-licence-activation table:not(.to-active-table) td,
482
  .yit-container.plugin-licence-activation table:not(.to-active-table) th {
483
- border-right: 1px solid #dcdcdc;
484
  }
 
485
  .yit-container.plugin-licence-activation table td:last-child,
486
  .yit-container.plugin-licence-activation table th:last-child {
487
- border-right: 0;
488
  }
489
 
490
  .yit-container.plugin-licence-activation table thead tr {
491
- background-color: #f6f4f4;
492
  }
493
 
494
  .yit-container.plugin-licence-activation table tbody tr {
495
- background-color: #ffffff;
496
  }
497
 
498
  .yit-container.plugin-licence-activation table thead tr th {
499
- font-size: 13px;
500
- color: #313131;
501
- text-transform: uppercase;
502
- font-weight: bold;
503
  }
504
 
505
  .yit-container.plugin-licence-activation table thead tr,
506
  .yit-container.plugin-licence-activation table tbody tr {
507
- line-height: 60px;
508
  }
509
 
510
- .yit-container.plugin-licence-activation table tbody tr td{
511
- text-align: center;
512
- line-height: 20px;
513
- padding: 10px 5px;
514
  }
515
 
516
  .yit-container.plugin-licence-activation .button-licence.licence-activation {
517
- padding: 12px 18px;
518
  }
519
 
520
  .yit-container.plugin-licence-activation .to-active-table tr {
521
- line-height: 75px;
522
  }
523
 
524
  .yit-container.plugin-licence-activation .to-active-table tr.plugin-row {
525
- background-color: transparent;
526
- -webkit-transition: all 0.3s ease;
527
- -moz-transition: all 0.3s ease;
528
- -ms-transition: all 0.3s ease;
529
- -o-transition: all 0.3s ease;
530
- transition: all 0.3s ease;
531
  }
532
 
533
  .yit-container.plugin-licence-activation .to-active-table tr.plugin-row.error {
534
- background-color: #ffdcdc;
535
  }
536
 
537
  .yit-container.plugin-licence-activation .to-active-table td {
538
- padding-right: 12px;
539
- width: 33%;
540
  }
541
 
542
-
543
  .yit-container.plugin-licence-activation .to-active-table td.plugin-name {
544
- color: #808a97;
545
- font-size: 12px;
546
- text-transform: uppercase;
547
- font-weight: bold;
548
- line-height: 20px;
549
- width: 20%;
550
- padding-left: 20px;
551
  }
552
 
553
  .yit-container.plugin-licence-activation .to-active-table td.activate-button {
554
- width: 15%;
555
- position: relative;
556
  }
557
 
558
  .yit-container.plugin-licence-activation input[type=text],
559
- .yit-container.plugin-licence-activation input[type=email]{
560
- -webkit-transition: all 0.3s ease;
561
- -moz-transition: all 0.3s ease;
562
- -ms-transition: all 0.3s ease;
563
- -o-transition: all 0.3s ease;
564
- transition: all 0.3s ease;
565
 
566
- border: 1px solid #dcdcdc;
567
- padding: 0 15px;
568
- border-radius: 3px;
569
- height: 41px;
570
- width: 100%;
571
  }
572
 
573
  .yit-container.plugin-licence-activation input[type=text].require,
574
  .yit-container.plugin-licence-activation input[type=email].require {
575
- border: 1px solid #ff3838;
576
  }
577
 
578
  .yit-container.plugin-licence-activation input[type=text]:focus,
579
- .yit-container.plugin-licence-activation input[type=email]:focus{
580
- webkit-box-shadow: 0 0 1px rgba(30,140,190,.8);
581
- box-shadow: 0 0 1px rgba(30,140,190,.8);
582
  }
583
 
584
- .yit-container.plugin-licence-activation input[type=text]{
585
- text-transform: uppercase;
586
- text-align: center;
587
  }
588
 
589
  .yit-container.plugin-licence-activation input[type=email] {
590
- text-align: left;
591
  }
592
 
593
- .yit-container.plugin-licence-activation input[type=submit]:focus{
594
- outline: 0;
595
  }
596
 
597
  /* === Woocommerce panel === */
598
- #plugin-fw-wc .yit_options{
599
- padding: 0;
600
- border: 0;
601
  }
602
- #plugin-fw-wc .yit_options input.upload_button, .yit_options input.button{
603
- background: none;
604
- border: 1px solid #ccc;
 
605
  }
606
 
607
  /* === WP Pointers === */
@@ -609,26 +637,26 @@
609
  #adminmenu li.menu-top.yit-pointer-selected-row,
610
  #adminmenu li.menu-top.yit-pointer-selected-row:hover,
611
  #adminmenu li.yit-pointer-selected-row a.menu-top {
612
- background-color: #acc327;
613
- color: #000;
614
  }
615
 
616
- #adminmenu a.menu-top.toplevel_page_yit_plugin_panel.yit-pointer{
617
- color: #000;
618
  }
619
 
620
  #adminmenu a.menu-top.toplevel_page_yit_plugin_panel.yit-pointer:hover,
621
  #adminmenu .wp-submenu a.yit-pointer-selected-row {
622
- color: #fff;
623
  }
624
 
625
  #adminmenu .wp-submenu a.yit-pointer-selected-row:hover {
626
- color: #45bbe6;
627
  }
628
 
629
  /* WooCommerce 2.4 Support */
630
- .woocommerce table.form-table .colorpick{
631
- width: 6em;
632
  }
633
 
634
  #wpwrap h2.nav-tab-wrapper , #wpbody-content h2.nav-tab-wrapper {
@@ -637,28 +665,49 @@
637
 
638
  /* === YIT FRAMEWORK === */
639
  .plugin-card .plugin-icon img {
640
- max-width: 100%;
641
- width: auto;
642
- height: auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
643
  }
644
 
645
  /* === Responsive === */
646
 
647
- @media (max-width: 767px) {}
 
 
 
 
 
648
 
649
- @media (max-width: 480px) {}
650
 
651
- @media (min-width: 768px) and (max-width: 992px) {}
652
 
653
- @media (min-width: 980px) and (max-width: 1199px) {}
 
654
 
655
- @media (min-width: 1200px) {
656
- .yit-container.plugin-licence-activation{
657
- width: 900px;
 
 
 
658
  }
659
  }
660
 
661
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
662
- only screen and (-o-min-device-pixel-ratio: 3/2),
663
- only screen and (min--moz-device-pixel-ratio: 1.5),
664
- only screen and (min-device-pixel-ratio: 1.5) {}
9
 
10
  /* onoff */
11
  .rm_onoff input {
12
+ display : none;
13
  }
14
 
15
  .rm_onoff input + span {
16
+ cursor : pointer;
17
+ text-indent : -9999px;
18
+ display : block;
19
+ width : 85px;
20
+ height : 37px;
21
+ background : transparent url(../images/off.png);
22
  }
23
 
24
  .rm_onoff input:checked + span {
25
+ background : transparent url(../images/on.png);
26
  }
27
 
28
  .rm_onoff input.onoffchecked + span {
29
+ background : transparent url(../images/on.png);
30
  }
31
 
32
  /* slider */
33
  /*numbers*/
34
  .ui-slider .maxCaption, .ui-slider .minCaption {
35
+ margin-bottom : 5px;
36
  }
37
+
38
  .ui-slider .feedback {
39
+ background : url(../images/slider/tooltip.png) no-repeat center top;
40
+ position : absolute;
41
+ top : -25px;
42
+ width : 35px;
43
+ height : 43px;
44
+ text-align : center;
45
+ width : 100%;
46
+ display : block;
47
  }
48
+
49
  .ui-slider .feedback strong {
50
+ display : inline-block;
51
+ padding-top : 4px;
52
+ top : -30px;
53
  }
54
+
55
  /*handle*/
56
  .yit-options .ui-slider-horizontal .ui-slider-handle,
57
  .yit_options .ui-slider-horizontal .ui-slider-handle {
58
+ background : transparent url(../images/slider/handle.png) no-repeat left top !important;
59
+ border : 0px !important;
60
+ top : -.35em !important;
61
+ width : 18px !important;
62
+ height : 19px !important;
63
  }
64
 
65
  /*bg on the left:grey*/
66
  .yit-options .ui-slider.ui-widget-content,
67
  .yit_options .ui-slider.ui-widget-content {
68
+ background : url(../images/slider/grey.gif) repeat-x left center !important;
69
+ border-color : #c1c1c0 !important;
70
+ height : 10px !important;
71
  }
72
 
73
  .iris-slider-offset.ui-slider.ui-widget-content {
74
+ background : transparent !important;
75
+ height : auto !important;
76
  }
77
 
78
  /*bg on the right:orange*/
79
  .ui-slider.ui-widget-content .ui-widget-header {
80
+ background : url(../images/slider/orange.gif) repeat-x left center !important;
81
+ left : 2px !important;
82
+ -webkit-border-radius : 15px;
83
+ -moz-border-radius : 15px;
84
+ -khtml-border-radius : 15px;
85
+ border-radius : 15px;
86
  }
87
 
88
+ .plugin-option tr {
89
+ border-bottom : 1px solid #ccc;
90
  }
91
+
92
  .plugin-option .yit_options,
93
+ .plugin-option .yit-options {
94
+ border-bottom : 0px;
95
  }
96
+
97
  .plugin-option .yit-options .option,
98
  .plugin-option .yit_options .option {
99
+ width : 600px;
100
+ float : left;
101
  }
102
 
103
+ .plugin-option .form-table td {
104
+ padding : 25px 10px;
105
  }
106
 
107
  .yit_options .select_wrapper,
108
  .yit-options .select_wrapper {
109
+ background : url("../images/select.png") no-repeat scroll right center #FAFAFA;
110
+ border-color : #CCCCCC #EEEEEE #EEEEEE #CCCCCC;
111
+ border-radius : 4px 4px 4px 4px;
112
+ border-style : solid;
113
+ border-width : 1px;
114
+ color : #555555;
115
+ display : block;
116
+ float : left;
117
+ font-family : sans-serif;
118
+ font-size : 12px;
119
+ height : 26px;
120
+ margin-bottom : 9px !important;
121
+ margin-left : 0;
122
+ margin-right : 5px;
123
+ margin-top : 0;
124
+ width : 400px;
125
  }
126
+
127
  .chosen .select_wrapper {
128
+ background : none;
129
+ border : none;
130
  }
131
+
132
+ .chosen .select_wrapper .chosen-container {
133
+ width : 338px !important;
134
  }
135
+
136
+ .chosen .select_wrapper .chosen-container .search-field input {
137
+ height : 27px !important;
138
+ color : #333;
139
  }
140
+
141
+ .chosen .select_wrapper .chosen-container .chosen-choices {
142
+ border : 1px solid #ddd;
143
+ box-shadow : none;
144
  }
145
+
146
+ .chosen .select_wrapper .chosen-container .chosen-choices li.search-choice {
147
+ height : 15px !important;
148
+ min-width : 105px;
149
  }
150
+
151
+ .chosen .select_wrapper .chosen-container .chosen-choices li.search-choice span {
152
+ line-height : 15px;
153
+ height : 15px;
154
+ padding-top : 2px;
155
  }
156
+
157
+ .chosen .select_wrapper .chosen-container .chosen-choices li.search-choice a.search-choice-close {
158
+ top : 5px;
159
  }
160
+
161
+ .chosen .select_wrapper .chosen-container .chosen-drop .chosen-search input {
162
+ width : 100% !important;
163
  }
164
 
165
  /* === Multiple Chosen Customizzation === */
166
 
167
  .yith-choosen .chosen-choices {
168
+ line-height : 27px;
169
+ min-height : 27px;
170
+ border : 1px solid #ddd;
171
  }
172
 
173
+ .yith-choosen .chosen-container-active .chosen-choices {
174
+ border : 1px solid #5b9dd9;
175
+ -webkit-box-shadow : 0 0 2px rgba(30, 140, 190, .8);
176
+ box-shadow : 0 0 2px rgba(30, 140, 190, .8);
177
  }
178
 
179
  .select_wrapper span {
180
+ height : 26px;
181
+ line-height : 26px;
182
+ padding-left : 6px;
183
+ position : absolute;
184
+ z-index : 2;
185
+ overflow : hidden;
186
  }
187
+
188
  .ie8 .yit_options select,
189
  .ie8 .yit-options select {
190
+ height : 26px;
191
  }
192
+
193
  .yit_options select, .yit-options select, .the-metabox .select_wrapper select {
194
+ cursor : pointer;
195
+ height : 28px;
196
+ margin : 0;
197
+ opacity : 0;
198
+ padding : 0;
199
+ position : relative;
200
+ width : inherit;
201
+ z-index : 4;
202
+ background-color : #FAFAFA;
203
  }
204
 
205
  /* === Single Chosen Customizzation === */
206
 
207
  .yith-choosen .chosen-container-single .chosen-default {
208
+ background : transparent;
209
+ border-color : #ddd;
210
  }
211
 
212
+ .yith-choosen .chosen-search > input[type=text] {
213
+ width : 100% !important;
214
  }
215
 
216
  .yith-choosen .chosen-container-single .chosen-single {
217
+ background : transparent;
218
+ border-color : #ddd;
219
  }
220
 
 
221
  /* Style to woocommerce panel*/
222
 
223
+ #plugin-fw-wc {
224
+ padding-top : 20px;
225
  }
226
+
227
+ #plugin-fw-wc table.form-table {
228
+ background-color : #fff;
229
+ margin-bottom : 20px;
230
  }
231
+
232
  #plugin-fw-wc table.form-table th {
233
+ padding : 20px;
234
  }
235
+
236
+ #plugin-fw-wc h3 {
237
+ padding : 0px 10px 10px;
238
+ border-bottom : 1px solid #eee;
239
  }
240
 
241
  /* === VIDEO BOX === */
242
 
243
  .yith-videobox-wrapper {
244
+ padding-top : 20px;
245
  }
246
+
247
+ .yith-videobox-wrapper h3 {
248
+ padding : 0px 10px 10px;
249
+ border-bottom : 1px solid #eee;
250
  }
251
 
252
  .yith-videobox-wrapper .postbox {
253
+ display : inline-block;
254
  }
255
+
256
  .yith-videobox-wrapper .yith_videobox .column {
257
+ width : 45%;
258
+ float : left;
259
+ padding-right : 2.5%;
260
+ border-right : 1px solid #ebebeb;
261
+ padding-bottom : 2em;
262
  }
263
+
264
  .yith-videobox-wrapper .yith_videobox .column.two {
265
+ margin-right : 0;
266
+ padding-right : 0;
267
+ padding-left : 2.5%;
268
+ border : 0;
269
+ max-width : 49%;
270
  }
271
+
272
+ .yith-videobox-wrapper .yith_videobox h2 {
273
+ font-size : 16px;
274
+ margin-bottom : 20px;
275
  }
276
+
277
  .yith-videobox-wrapper .yith-video-link {
278
+ width : 100%;
279
+ max-width : 200px;
280
+ float : left;
281
+ margin : 0 1.5em 1.5em 0;
282
  }
283
+
284
  .yith-videobox-wrapper .yith-video-link {
285
+ width : 100%;
286
+ max-width : 200px;
287
+ float : left;
288
+ margin : 0 1.5em 1.5em 0;
289
  }
290
+
291
  .yith-videobox-wrapper .yith-image-frame img {
292
+ max-width : 100%;
293
+ height : auto;
294
  }
295
+
296
  .yith-videobox-wrapper .yith-video-link img {
297
+ max-width : 100%;
298
+ height : auto;
299
  }
300
+
301
  .yith-videobox-wrapper .yith-video-iframe {
302
+ display : none;
303
 
304
  }
305
 
306
  /* === Plugins Upgrader === */
307
 
308
  .yit-plugin-changelog-wrapper {
309
+ display : none;
310
  }
311
 
312
  .yit-plugin-changelog-title {
313
+ text-transform : uppercase;
314
  }
315
 
316
  .yit-plugin-changelog {
317
+ background : #fcfcfc;
318
+ height : 97%;
319
+ z-index : 999;
320
+ overflow : auto;
321
  }
322
 
323
  /* === Plugins Licence Activation === */
324
 
325
  .yit-container.plugin-licence-activation {
326
+ font-family : 'Raleway', sans-serif;
327
  }
328
 
329
  .yit-container.plugin-licence-activation .to-active-wrapper {
330
+ margin-bottom : 60px;
331
  }
332
 
333
  .yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form {
334
+ position : relative;
335
+ border-color : #e1e1e1;
336
+ border-style : solid;
337
+ border-width : 0;
338
  }
339
 
340
  .yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form:first-child {
341
+ border-top-width : 1px;
342
  }
343
 
344
  .yit-container.plugin-licence-activation .to-active-wrapper form.to-active-form:last-child {
345
+ border-bottom-width : 1px;
346
  }
347
 
348
  .yit-container.plugin-licence-activation .to-active-wrapper table.to-active-table {
349
+ border-width : 0;
350
+ border-spacing : 0;
351
+ width : 100%;
352
  }
353
 
354
  .yit-container.plugin-licence-activation .message {
355
+ display : none;
356
+ line-height : normal;
357
+ background : #ffffff url(../images/licence-error.png) 15px center no-repeat;
358
+ padding-left : 65px;
359
+ padding-right : 15px;
360
+ width : 150px;
361
  }
362
 
363
  .yit-container.plugin-licence-activation .message-wrapper {
364
+ height : 75px;
365
+ display : none;
366
+ position : absolute;
367
+ top : 0;
368
+ right : -250px;
369
+ border : 1px solid #ff3838;
370
  }
371
 
372
  .yit-container.plugin-licence-activation .message-wrapper.visible {
373
+ display : table;
374
  }
375
 
376
  .yit-container.plugin-licence-activation .message {
377
+ display : table-cell;
378
+ vertical-align : middle;
379
  }
380
 
381
  .yit-container.plugin-licence-activation .arrow-left:after,
382
  .yit-container.plugin-licence-activation .arrow-left:before {
383
+ content : "";
384
+ display : block;
385
+ width : 0;
386
+ height : 0;
387
+ position : absolute;
388
  }
389
 
390
  .yit-container.plugin-licence-activation .arrow-left:before {
391
+ border-top : 9px solid transparent;
392
+ border-bottom : 9px solid transparent;
393
+ border-right : 9px solid #ff3838;
394
+ top : 26px;
395
+ left : -9px;
396
  }
397
 
398
  .yit-container.plugin-licence-activation .arrow-left:after {
399
+ border-top : 8px solid transparent;
400
+ border-bottom : 8px solid transparent;
401
+ border-right : 8px solid #fff;
402
+ left : -8px;
403
+ top : 27px;
404
  }
405
 
406
  .yit-container.plugin-licence-activation h2,
407
  .yit-container.plugin-licence-activation h3 {
408
+ text-transform : uppercase;
409
+ font-weight : 800;
410
+ margin-bottom : 30px;
411
  }
412
 
413
  .yit-container.plugin-licence-activation h2 {
414
+ color : #808a97;
415
+ font-size : 25px;
416
  }
417
+
418
  .yit-container.plugin-licence-activation h3 {
419
+ color : #313131;
420
+ font-size : 15px;
421
+ height : 20px;
422
  }
423
 
424
  .yit-container.plugin-licence-activation h3.to-active {
425
+ height : 20px;
426
+ position : relative;
427
+ vertical-align : top;
428
  }
429
 
430
+ .yit-container.plugin-licence-activation .spinner.show {
431
+ display : inline-block;
432
+ vertical-align : middle;
433
+ float : none;
434
  }
435
 
436
  .yit-container.plugin-licence-activation h3.to-active > .spinner.show {
437
+ display : inline-block;
438
+ float : none;
439
+ top : -3px;
440
+ position : relative;
441
  }
442
 
443
+ .yit-container.plugin-licence-activation .licence-check-section {
444
+ margin-bottom : 60px;
445
  }
446
 
447
  .yit-container.plugin-licence-activation span.licence-label {
448
+ font-weight : 500;
449
+ color : #606060;
450
+ margin-bottom : 30px;
451
  }
452
 
453
  .yit-container.plugin-licence-activation .button-licence {
454
+ border : 0;
455
+ font-size : 13px;
456
+ text-transform : uppercase;
457
+ background-color : #808a97;
458
+ color : #fff;
459
+ font-weight : 700;
460
+ border-radius : 3px;
461
+ cursor : pointer;
462
+ text-decoration : none;
463
+ padding : 5px 7px;
464
+ -webkit-transition : background-color 0.3s ease;
465
+ -moz-transition : background-color 0.3s ease;
466
+ -ms-transition : background-color 0.3s ease;
467
+ -o-transition : background-color 0.3s ease;
468
+ transition : background-color 0.3s ease;
469
  }
470
 
471
  .yit-container.plugin-licence-activation .button-licence:hover {
472
+ background-color : #4d5c6f;
473
  }
474
 
475
  .yit-container.plugin-licence-activation .button-licence.clicked {
476
+ cursor : not-allowed;
477
+ background-color : #e2e2e2 !important;
478
  }
479
 
480
  .yit-container.plugin-licence-activation .button-licence.licence-check {
481
+ font-weight : 400;
482
+ padding : 12px 19px;
483
  }
484
 
485
  .yit-container.plugin-licence-activation .button-licence.licence-renew {
486
+ text-decoration : none;
487
+ padding : 7px 12px;
488
+ font-size : 9px;
489
  }
490
 
491
  .yit-container.plugin-licence-activation .button-licence.licence-renew:focus {
492
+ box-shadow : none;
493
  }
494
 
495
  .yit-container.plugin-licence-activation table:not(.to-active-table) {
496
+ width : 100%;
497
+ border : 1px solid #dcdcdc;
498
+ border-spacing : 0;
499
+ border-radius : 5px;
500
+ border-collapse : separate;
501
+ overflow : hidden;
502
  }
503
 
504
  .yit-container.plugin-licence-activation table:not(.to-active-table) th {
505
+ border-bottom : 1px solid #dcdcdc;
506
  }
507
 
508
  .yit-container.plugin-licence-activation table:not(.to-active-table) td,
509
  .yit-container.plugin-licence-activation table:not(.to-active-table) th {
510
+ border-right : 1px solid #dcdcdc;
511
  }
512
+
513
  .yit-container.plugin-licence-activation table td:last-child,
514
  .yit-container.plugin-licence-activation table th:last-child {
515
+ border-right : 0;
516
  }
517
 
518
  .yit-container.plugin-licence-activation table thead tr {
519
+ background-color : #f6f4f4;
520
  }
521
 
522
  .yit-container.plugin-licence-activation table tbody tr {
523
+ background-color : #ffffff;
524
  }
525
 
526
  .yit-container.plugin-licence-activation table thead tr th {
527
+ font-size : 13px;
528
+ color : #313131;
529
+ text-transform : uppercase;
530
+ font-weight : bold;
531
  }
532
 
533
  .yit-container.plugin-licence-activation table thead tr,
534
  .yit-container.plugin-licence-activation table tbody tr {
535
+ line-height : 60px;
536
  }
537
 
538
+ .yit-container.plugin-licence-activation table tbody tr td {
539
+ text-align : center;
540
+ line-height : 20px;
541
+ padding : 10px 5px;
542
  }
543
 
544
  .yit-container.plugin-licence-activation .button-licence.licence-activation {
545
+ padding : 12px 18px;
546
  }
547
 
548
  .yit-container.plugin-licence-activation .to-active-table tr {
549
+ line-height : 75px;
550
  }
551
 
552
  .yit-container.plugin-licence-activation .to-active-table tr.plugin-row {
553
+ background-color : transparent;
554
+ -webkit-transition : all 0.3s ease;
555
+ -moz-transition : all 0.3s ease;
556
+ -ms-transition : all 0.3s ease;
557
+ -o-transition : all 0.3s ease;
558
+ transition : all 0.3s ease;
559
  }
560
 
561
  .yit-container.plugin-licence-activation .to-active-table tr.plugin-row.error {
562
+ background-color : #ffdcdc;
563
  }
564
 
565
  .yit-container.plugin-licence-activation .to-active-table td {
566
+ padding-right : 12px;
567
+ width : 33%;
568
  }
569
 
 
570
  .yit-container.plugin-licence-activation .to-active-table td.plugin-name {
571
+ color : #808a97;
572
+ font-size : 12px;
573
+ text-transform : uppercase;
574
+ font-weight : bold;
575
+ line-height : 20px;
576
+ width : 20%;
577
+ padding-left : 20px;
578
  }
579
 
580
  .yit-container.plugin-licence-activation .to-active-table td.activate-button {
581
+ width : 15%;
582
+ position : relative;
583
  }
584
 
585
  .yit-container.plugin-licence-activation input[type=text],
586
+ .yit-container.plugin-licence-activation input[type=email] {
587
+ -webkit-transition : all 0.3s ease;
588
+ -moz-transition : all 0.3s ease;
589
+ -ms-transition : all 0.3s ease;
590
+ -o-transition : all 0.3s ease;
591
+ transition : all 0.3s ease;
592
 
593
+ border : 1px solid #dcdcdc;
594
+ padding : 0 15px;
595
+ border-radius : 3px;
596
+ height : 41px;
597
+ width : 100%;
598
  }
599
 
600
  .yit-container.plugin-licence-activation input[type=text].require,
601
  .yit-container.plugin-licence-activation input[type=email].require {
602
+ border : 1px solid #ff3838;
603
  }
604
 
605
  .yit-container.plugin-licence-activation input[type=text]:focus,
606
+ .yit-container.plugin-licence-activation input[type=email]:focus {
607
+ webkit-box-shadow : 0 0 1px rgba(30, 140, 190, .8);
608
+ box-shadow : 0 0 1px rgba(30, 140, 190, .8);
609
  }
610
 
611
+ .yit-container.plugin-licence-activation input[type=text] {
612
+ text-transform : uppercase;
613
+ text-align : center;
614
  }
615
 
616
  .yit-container.plugin-licence-activation input[type=email] {
617
+ text-align : left;
618
  }
619
 
620
+ .yit-container.plugin-licence-activation input[type=submit]:focus {
621
+ outline : 0;
622
  }
623
 
624
  /* === Woocommerce panel === */
625
+ #plugin-fw-wc .yit_options {
626
+ padding : 0;
627
+ border : 0;
628
  }
629
+
630
+ #plugin-fw-wc .yit_options input.upload_button, .yit_options input.button {
631
+ background : none;
632
+ border : 1px solid #ccc;
633
  }
634
 
635
  /* === WP Pointers === */
637
  #adminmenu li.menu-top.yit-pointer-selected-row,
638
  #adminmenu li.menu-top.yit-pointer-selected-row:hover,
639
  #adminmenu li.yit-pointer-selected-row a.menu-top {
640
+ background-color : #acc327;
641
+ color : #000;
642
  }
643
 
644
+ #adminmenu a.menu-top.toplevel_page_yit_plugin_panel.yit-pointer {
645
+ color : #000;
646
  }
647
 
648
  #adminmenu a.menu-top.toplevel_page_yit_plugin_panel.yit-pointer:hover,
649
  #adminmenu .wp-submenu a.yit-pointer-selected-row {
650
+ color : #fff;
651
  }
652
 
653
  #adminmenu .wp-submenu a.yit-pointer-selected-row:hover {
654
+ color : #45bbe6;
655
  }
656
 
657
  /* WooCommerce 2.4 Support */
658
+ .woocommerce table.form-table .colorpick {
659
+ width : 6em;
660
  }
661
 
662
  #wpwrap h2.nav-tab-wrapper , #wpbody-content h2.nav-tab-wrapper {
665
 
666
  /* === YIT FRAMEWORK === */
667
  .plugin-card .plugin-icon img {
668
+ max-width : 100%;
669
+ width : auto;
670
+ height : auto;
671
+ }
672
+
673
+ /* === Panel Content and Container === */
674
+ .yit-admin-panel-container{
675
+ position:relative;
676
+ }
677
+ .yit-admin-panel-content-wrap {
678
+ width : calc(100% - 300px);
679
+ display : inline-block;
680
+ }
681
+
682
+ .yit-admin-panel-content-wrap.yit-admin-panel-content-wrap-full {
683
+ width : 100%;
684
+ display : block;
685
  }
686
 
687
  /* === Responsive === */
688
 
689
+ @media (max-width : 767px) {
690
+ .yit-admin-panel-content-wrap {
691
+ width : 100%;
692
+ display : block;
693
+ }
694
+ }
695
 
696
+ @media (max-width : 480px) {
697
 
698
+ }
699
 
700
+ @media (min-width : 768px) and (max-width : 992px) {
701
+ }
702
 
703
+ @media (min-width : 980px) and (max-width : 1199px) {
704
+ }
705
+
706
+ @media (min-width : 1200px) {
707
+ .yit-container.plugin-licence-activation {
708
+ width : 900px;
709
  }
710
  }
711
 
712
+ @media only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (-o-min-device-pixel-ratio : 3/2), only screen and (min--moz-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5) {
713
+ }
 
 
plugin-fw/assets/css/yit-upgrade-to-pro.css ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* === Upgrade to Premium Landing page === */
2
+
3
+ #upgrade-to-premium{
4
+ width: 900px;
5
+ }
6
+ #upgrade-to-premium h1{
7
+ font-family: 'Raleway',san-serif;
8
+ text-transform: uppercase;
9
+ font-size: 30px;
10
+ font-weight: 700;
11
+ color: #808a97;
12
+ }
13
+
14
+ #upgrade-to-premium h3{
15
+ font-family: 'Raleway',san-serif;
16
+ font-size: 20px;
17
+ line-height: 29px;
18
+ font-weight: 700;
19
+ color: #808a97;
20
+ }
21
+
22
+ #upgrade-to-premium p{
23
+ font-family: 'Open Sans',san-serif;
24
+ font-size: 15px;
25
+ line-height: 29px;
26
+ font-weight: 400;
27
+ color: #6a6a6b;
28
+ }
29
+ #upgrade-to-premium p.highlighted{
30
+ font-family: 'Raleway',san-serif;
31
+ font-size: 20px;
32
+ line-height: 27px;
33
+ color: #808a97;
34
+ font-weight: 400;
35
+ }
36
+ #upgrade-to-premium ol{
37
+ counter-reset: item;
38
+ list-style-type: none;
39
+ margin-left: 0;
40
+ }
41
+ #upgrade-to-premium li.step{
42
+ font-family: 'open sans',san-serif;
43
+ font-size: 15px;
44
+ color: #6a6a6b;
45
+ font-weight: 400;
46
+ position: relative;
47
+ padding-left: 50px;
48
+ line-height: 25px;
49
+ margin-bottom: 25px;
50
+ }
51
+ #upgrade-to-premium li.step:before{
52
+ content: counters(item, ".") " ";
53
+ counter-increment: item;
54
+ position: absolute;
55
+ left: 0;
56
+ top: 0;
57
+ border: 1px solid #808a97;
58
+ width: 30px;
59
+ height: 30px;
60
+ border-radius: 16px;
61
+ background-color: #808a97;
62
+ color: #ffffff;
63
+ font-weight: 700;
64
+ font-size: 18px;
65
+ text-align: center;
66
+ line-height: 27px;
67
+ }
68
+ #upgrade-to-premium li.step img{
69
+ border: 1px solid #b8b8b8;
70
+ width: 600px;
71
+ display: block;
72
+ margin: 15px 0 25px 0;
73
+ }
74
+
75
+ #cboxLoadedContent {
76
+ margin-bottom: 60px!important;
77
+ }
plugin-fw/assets/images/colorbox/border1.png ADDED
Binary file
plugin-fw/assets/images/colorbox/border2.png ADDED
Binary file
plugin-fw/assets/images/colorbox/loading.gif ADDED
Binary file
plugin-fw/assets/images/upgrade-page/01.jpg ADDED
Binary file
plugin-fw/assets/images/upgrade-page/02.jpg ADDED
Binary file
plugin-fw/assets/images/upgrade-page/03.jpg ADDED
Binary file
plugin-fw/assets/images/upgrade-page/04.jpg ADDED
Binary file
plugin-fw/assets/images/upgrade-page/05.jpg ADDED
Binary file
plugin-fw/assets/images/upgrade-page/06.jpg ADDED
Binary file
plugin-fw/assets/images/upgrade-page/07.jpg ADDED
Binary file
plugin-fw/assets/images/upgrade-page/08.jpg ADDED
Binary file
plugin-fw/assets/images/upgrade-page/09.jpg ADDED
Binary file
plugin-fw/assets/images/widgets/box-icon.png ADDED
Binary file
plugin-fw/assets/images/widgets/box-white-icon.png ADDED
Binary file
plugin-fw/assets/images/widgets/despacho.png ADDED
Binary file
plugin-fw/assets/images/widgets/info-icon.png ADDED
Binary file
plugin-fw/assets/images/widgets/link-bg.png ADDED
Binary file
plugin-fw/assets/images/widgets/link-bg2.png ADDED
Binary file
plugin-fw/assets/images/widgets/link-icon.png ADDED
Binary file
plugin-fw/assets/images/widgets/membership-bg.png ADDED
Binary file
plugin-fw/assets/js/jquery.colorbox.js ADDED
@@ -0,0 +1,1105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ Colorbox 1.6.3
3
+ license: MIT
4
+ http://www.jacklmoore.com/colorbox
5
+ */
6
+ (function ($, document, window) {
7
+ var
8
+ // Default settings object.
9
+ // See http://jacklmoore.com/colorbox for details.
10
+ defaults = {
11
+ // data sources
12
+ html: false,
13
+ photo: false,
14
+ iframe: false,
15
+ inline: false,
16
+
17
+ // behavior and appearance
18
+ transition: "elastic",
19
+ speed: 300,
20
+ fadeOut: 300,
21
+ width: false,
22
+ initialWidth: "600",
23
+ innerWidth: false,
24
+ maxWidth: false,
25
+ height: false,
26
+ initialHeight: "450",
27
+ innerHeight: false,
28
+ maxHeight: false,
29
+ scalePhotos: true,
30
+ scrolling: true,
31
+ opacity: 0.9,
32
+ preloading: true,
33
+ className: false,
34
+ overlayClose: true,
35
+ escKey: true,
36
+ arrowKey: true,
37
+ top: false,
38
+ bottom: false,
39
+ left: false,
40
+ right: false,
41
+ fixed: false,
42
+ data: undefined,
43
+ closeButton: true,
44
+ fastIframe: true,
45
+ open: false,
46
+ reposition: true,
47
+ loop: true,
48
+ slideshow: false,
49
+ slideshowAuto: true,
50
+ slideshowSpeed: 2500,
51
+ slideshowStart: "start slideshow",
52
+ slideshowStop: "stop slideshow",
53
+ photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
54
+
55
+ // alternate image paths for high-res displays
56
+ retinaImage: false,
57
+ retinaUrl: false,
58
+ retinaSuffix: '@2x.$1',
59
+
60
+ // internationalization
61
+ current: "image {current} of {total}",
62
+ previous: "previous",
63
+ next: "next",
64
+ close: "close",
65
+ xhrError: "This content failed to load.",
66
+ imgError: "This image failed to load.",
67
+
68
+ // accessbility
69
+ returnFocus: true,
70
+ trapFocus: true,
71
+
72
+ // callbacks
73
+ onOpen: false,
74
+ onLoad: false,
75
+ onComplete: false,
76
+ onCleanup: false,
77
+ onClosed: false,
78
+
79
+ rel: function() {
80
+ return this.rel;
81
+ },
82
+ href: function() {
83
+ // using this.href would give the absolute url, when the href may have been inteded as a selector (e.g. '#container')
84
+ return $(this).attr('href');
85
+ },
86
+ title: function() {
87
+ return this.title;
88
+ },
89
+ createImg: function() {
90
+ var img = new Image();
91
+ var attrs = $(this).data('cbox-img-attrs');
92
+
93
+ if (typeof attrs === 'object') {
94
+ $.each(attrs, function(key, val){
95
+ img[key] = val;
96
+ });
97
+ }
98
+
99
+ return img;
100
+ },
101
+ createIframe: function() {
102
+ var iframe = document.createElement('iframe');
103
+ var attrs = $(this).data('cbox-iframe-attrs');
104
+
105
+ if (typeof attrs === 'object') {
106
+ $.each(attrs, function(key, val){
107
+ iframe[key] = val;
108
+ });
109
+ }
110
+
111
+ if ('frameBorder' in iframe) {
112
+ iframe.frameBorder = 0;
113
+ }
114
+ if ('allowTransparency' in iframe) {
115
+ iframe.allowTransparency = "true";
116
+ }
117
+ iframe.name = (new Date()).getTime(); // give the iframe a unique name to prevent caching
118
+ iframe.allowFullscreen = true;
119
+
120
+ return iframe;
121
+ }
122
+ },
123
+
124
+ // Abstracting the HTML and event identifiers for easy rebranding
125
+ colorbox = 'colorbox',
126
+ prefix = 'cbox',
127
+ boxElement = prefix + 'Element',
128
+
129
+ // Events
130
+ event_open = prefix + '_open',
131
+ event_load = prefix + '_load',
132
+ event_complete = prefix + '_complete',
133
+ event_cleanup = prefix + '_cleanup',
134
+ event_closed = prefix + '_closed',
135
+ event_purge = prefix + '_purge',
136
+
137
+ // Cached jQuery Object Variables
138
+ $overlay,
139
+ $box,
140
+ $wrap,
141
+ $content,
142
+ $topBorder,
143
+ $leftBorder,
144
+ $rightBorder,
145
+ $bottomBorder,
146
+ $related,
147
+ $window,
148
+ $loaded,
149
+ $loadingBay,
150
+ $loadingOverlay,
151
+ $title,
152
+ $current,
153
+ $slideshow,
154
+ $next,
155
+ $prev,
156
+ $close,
157
+ $groupControls,
158
+ $events = $('<a/>'), // $({}) would be prefered, but there is an issue with jQuery 1.4.2
159
+
160
+ // Variables for cached values or use across multiple functions
161
+ settings,
162
+ interfaceHeight,
163
+ interfaceWidth,
164
+ loadedHeight,
165
+ loadedWidth,
166
+ index,
167
+ photo,
168
+ open,
169
+ active,
170
+ closing,
171
+ loadingTimer,
172
+ publicMethod,
173
+ div = "div",
174
+ requests = 0,
175
+ previousCSS = {},
176
+ init;
177
+
178
+ // ****************
179
+ // HELPER FUNCTIONS
180
+ // ****************
181
+
182
+ // Convenience function for creating new jQuery objects
183
+ function $tag(tag, id, css) {
184
+ var element = document.createElement(tag);
185
+
186
+ if (id) {
187
+ element.id = prefix + id;
188
+ }
189
+
190
+ if (css) {
191
+ element.style.cssText = css;
192
+ }
193
+
194
+ return $(element);
195
+ }
196
+
197
+ // Get the window height using innerHeight when available to avoid an issue with iOS
198
+ // http://bugs.jquery.com/ticket/6724
199
+ function winheight() {
200
+ return window.innerHeight ? window.innerHeight : $(window).height();
201
+ }
202
+
203
+ function Settings(element, options) {
204
+ if (options !== Object(options)) {
205
+ options = {};
206
+ }
207
+
208
+ this.cache = {};
209
+ this.el = element;
210
+
211
+ this.value = function(key) {
212
+ var dataAttr;
213
+
214
+ if (this.cache[key] === undefined) {
215
+ dataAttr = $(this.el).attr('data-cbox-'+key);
216
+
217
+ if (dataAttr !== undefined) {
218
+ this.cache[key] = dataAttr;
219
+ } else if (options[key] !== undefined) {
220
+ this.cache[key] = options[key];
221
+ } else if (defaults[key] !== undefined) {
222
+ this.cache[key] = defaults[key];
223
+ }
224
+ }
225
+
226
+ return this.cache[key];
227
+ };
228
+
229
+ this.get = function(key) {
230
+ var value = this.value(key);
231
+ return $.isFunction(value) ? value.call(this.el, this) : value;
232
+ };
233
+ }
234
+
235
+ // Determine the next and previous members in a group.
236
+ function getIndex(increment) {
237
+ var
238
+ max = $related.length,
239
+ newIndex = (index + increment) % max;
240
+
241
+ return (newIndex < 0) ? max + newIndex : newIndex;
242
+ }
243
+
244
+ // Convert '%' and 'px' values to integers
245
+ function setSize(size, dimension) {
246
+ return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));
247
+ }
248
+
249
+ // Checks an href to see if it is a photo.
250
+ // There is a force photo option (photo: true) for hrefs that cannot be matched by the regex.
251
+ function isImage(settings, url) {
252
+ return settings.get('photo') || settings.get('photoRegex').test(url);
253
+ }
254
+
255
+ function retinaUrl(settings, url) {
256
+ return settings.get('retinaUrl') && window.devicePixelRatio > 1 ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url;
257
+ }
258
+
259
+ function trapFocus(e) {
260
+ if ('contains' in $box[0] && !$box[0].contains(e.target) && e.target !== $overlay[0]) {
261
+ e.stopPropagation();
262
+ $box.focus();
263
+ }
264
+ }
265
+
266
+ function setClass(str) {
267
+ if (setClass.str !== str) {
268
+ $box.add($overlay).removeClass(setClass.str).addClass(str);
269
+ setClass.str = str;
270
+ }
271
+ }
272
+
273
+ function getRelated(rel) {
274
+ index = 0;
275
+
276
+ if (rel && rel !== false && rel !== 'nofollow') {
277
+ $related = $('.' + boxElement).filter(function () {
278
+ var options = $.data(this, colorbox);
279
+ var settings = new Settings(this, options);
280
+ return (settings.get('rel') === rel);
281
+ });
282
+ index = $related.index(settings.el);
283
+
284
+ // Check direct calls to Colorbox.
285
+ if (index === -1) {
286
+ $related = $related.add(settings.el);
287
+ index = $related.length - 1;
288
+ }
289
+ } else {
290
+ $related = $(settings.el);
291
+ }
292
+ }
293
+
294
+ function trigger(event) {
295
+ // for external use
296
+ $(document).trigger(event);
297
+ // for internal use
298
+ $events.triggerHandler(event);
299
+ }
300
+
301
+ var slideshow = (function(){
302
+ var active,
303
+ className = prefix + "Slideshow_",
304
+ click = "click." + prefix,
305
+ timeOut;
306
+
307
+ function clear () {
308
+ clearTimeout(timeOut);
309
+ }
310
+
311
+ function set() {
312
+ if (settings.get('loop') || $related[index + 1]) {
313
+ clear();
314
+ timeOut = setTimeout(publicMethod.next, settings.get('slideshowSpeed'));
315
+ }
316
+ }
317
+
318
+ function start() {
319
+ $slideshow
320
+ .html(settings.get('slideshowStop'))
321
+ .unbind(click)
322
+ .one(click, stop);
323
+
324
+ $events
325
+ .bind(event_complete, set)
326
+ .bind(event_load, clear);
327
+
328
+ $box.removeClass(className + "off").addClass(className + "on");
329
+ }
330
+
331
+ function stop() {
332
+ clear();
333
+
334
+ $events
335
+ .unbind(event_complete, set)
336
+ .unbind(event_load, clear);
337
+
338
+ $slideshow
339
+ .html(settings.get('slideshowStart'))
340
+ .unbind(click)
341
+ .one(click, function () {
342
+ publicMethod.next();
343
+ start();
344
+ });
345
+
346
+ $box.removeClass(className + "on").addClass(className + "off");
347
+ }
348
+
349
+ function reset() {
350
+ active = false;
351
+ $slideshow.hide();
352
+ clear();
353
+ $events
354
+ .unbind(event_complete, set)
355
+ .unbind(event_load, clear);
356
+ $box.removeClass(className + "off " + className + "on");
357
+ }
358
+
359
+ return function(){
360
+ if (active) {
361
+ if (!settings.get('slideshow')) {
362
+ $events.unbind(event_cleanup, reset);
363
+ reset();
364
+ }
365
+ } else {
366
+ if (settings.get('slideshow') && $related[1]) {
367
+ active = true;
368
+ $events.one(event_cleanup, reset);
369
+ if (settings.get('slideshowAuto')) {
370
+ start();
371
+ } else {
372
+ stop();
373
+ }
374
+ $slideshow.show();
375
+ }
376
+ }
377
+ };
378
+
379
+ }());
380
+
381
+
382
+ function launch(element) {
383
+ var options;
384
+
385
+ if (!closing) {
386
+
387
+ options = $(element).data(colorbox);
388
+
389
+ settings = new Settings(element, options);
390
+
391
+ getRelated(settings.get('rel'));
392
+
393
+ if (!open) {
394
+ open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
395
+
396
+ setClass(settings.get('className'));
397
+
398
+ // Show colorbox so the sizes can be calculated in older versions of jQuery
399
+ $box.css({visibility:'hidden', display:'block', opacity:''});
400
+
401
+ $loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden; visibility:hidden');
402
+ $content.css({width:'', height:''}).append($loaded);
403
+
404
+ // Cache values needed for size calculations
405
+ interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
406
+ interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
407
+ loadedHeight = $loaded.outerHeight(true);
408
+ loadedWidth = $loaded.outerWidth(true);
409
+
410
+ // Opens inital empty Colorbox prior to content being loaded.
411
+ var initialWidth = setSize(settings.get('initialWidth'), 'x');
412
+ var initialHeight = setSize(settings.get('initialHeight'), 'y');
413
+ var maxWidth = settings.get('maxWidth');
414
+ var maxHeight = settings.get('maxHeight');
415
+
416
+ settings.w = Math.max((maxWidth !== false ? Math.min(initialWidth, setSize(maxWidth, 'x')) : initialWidth) - loadedWidth - interfaceWidth, 0);
417
+ settings.h = Math.max((maxHeight !== false ? Math.min(initialHeight, setSize(maxHeight, 'y')) : initialHeight) - loadedHeight - interfaceHeight, 0);
418
+
419
+ $loaded.css({width:'', height:settings.h});
420
+ publicMethod.position();
421
+
422
+ trigger(event_open);
423
+ settings.get('onOpen');
424
+
425
+ $groupControls.add($title).hide();
426
+
427
+ $box.focus();
428
+
429
+ if (settings.get('trapFocus')) {
430
+ // Confine focus to the modal
431
+ // Uses event capturing that is not supported in IE8-
432
+ if (document.addEventListener) {
433
+
434
+ document.addEventListener('focus', trapFocus, true);
435
+
436
+ $events.one(event_closed, function () {
437
+ document.removeEventListener('focus', trapFocus, true);
438
+ });
439
+ }
440
+ }
441
+
442
+ // Return focus on closing
443
+ if (settings.get('returnFocus')) {
444
+ $events.one(event_closed, function () {
445
+ $(settings.el).focus();
446
+ });
447
+ }
448
+ }
449
+
450
+ var opacity = parseFloat(settings.get('opacity'));
451
+ $overlay.css({
452
+ opacity: opacity === opacity ? opacity : '',
453
+ cursor: settings.get('overlayClose') ? 'pointer' : '',
454
+ visibility: 'visible'
455
+ }).show();
456
+
457
+ if (settings.get('closeButton')) {
458
+ $close.html(settings.get('close')).appendTo($content);
459
+ } else {
460
+ $close.appendTo('<div/>'); // replace with .detach() when dropping jQuery < 1.4
461
+ }
462
+
463
+ load();
464
+ }
465
+ }
466
+
467
+ // Colorbox's markup needs to be added to the DOM prior to being called
468
+ // so that the browser will go ahead and load the CSS background images.
469
+ function appendHTML() {
470
+ if (!$box) {
471
+ init = false;
472
+ $window = $(window);
473
+ $box = $tag(div).attr({
474
+ id: colorbox,
475
+ 'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS.
476
+ role: 'dialog',
477
+ tabindex: '-1'
478
+ }).hide();
479
+ $overlay = $tag(div, "Overlay").hide();
480
+ $loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]);
481
+ $wrap = $tag(div, "Wrapper");
482
+ $content = $tag(div, "Content").append(
483
+ $title = $tag(div, "Title"),
484
+ $current = $tag(div, "Current"),
485
+ $prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
486
+ $next = $('<button type="button"/>').attr({id:prefix+'Next'}),
487
+ $slideshow = $tag('button', "Slideshow"),
488
+ $loadingOverlay
489
+ );
490
+
491
+ $close = $('<button type="button"/>').attr({id:prefix+'Close'});
492
+
493
+ $wrap.append( // The 3x3 Grid that makes up Colorbox
494
+ $tag(div).append(
495
+ $tag(div, "TopLeft"),
496
+ $topBorder = $tag(div, "TopCenter"),
497
+ $tag(div, "TopRight")
498
+ ),
499
+ $tag(div, false, 'clear:left').append(
500
+ $leftBorder = $tag(div, "MiddleLeft"),
501
+ $content,
502
+ $rightBorder = $tag(div, "MiddleRight")
503
+ ),
504
+ $tag(div, false, 'clear:left').append(
505
+ $tag(div, "BottomLeft"),
506
+ $bottomBorder = $tag(div, "BottomCenter"),
507
+ $tag(div, "BottomRight")
508
+ )
509
+ ).find('div div').css({'float': 'left'});
510
+
511
+ $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');
512
+
513
+ $groupControls = $next.add($prev).add($current).add($slideshow);
514
+ }
515
+ if (document.body && !$box.parent().length) {
516
+ $(document.body).append($overlay, $box.append($wrap, $loadingBay));
517
+ }
518
+ }
519
+
520
+ // Add Colorbox's event bindings
521
+ function addBindings() {
522
+ function clickHandler(e) {
523
+ // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
524
+ // See: http://jacklmoore.com/notes/click-events/
525
+ if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
526
+ e.preventDefault();
527
+ launch(this);
528
+ }
529
+ }
530
+
531
+ if ($box) {
532
+ if (!init) {
533
+ init = true;
534
+
535
+ // Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
536
+ $next.click(function () {
537
+ publicMethod.next();
538
+ });
539
+ $prev.click(function () {
540
+ publicMethod.prev();
541
+ });
542
+ $close.click(function () {
543
+ publicMethod.close();
544
+ });
545
+ $overlay.click(function () {
546
+ if (settings.get('overlayClose')) {
547
+ publicMethod.close();
548
+ }
549
+ });
550
+
551
+ // Key Bindings
552
+ $(document).bind('keydown.' + prefix, function (e) {
553
+ var key = e.keyCode;
554
+ if (open && settings.get('escKey') && key === 27) {
555
+ e.preventDefault();
556
+ publicMethod.close();
557
+ }
558
+ if (open && settings.get('arrowKey') && $related[1] && !e.altKey) {
559
+ if (key === 37) {
560
+ e.preventDefault();
561
+ $prev.click();
562
+ } else if (key === 39) {
563
+ e.preventDefault();
564
+ $next.click();
565
+ }
566
+ }
567
+ });
568
+
569
+ if ($.isFunction($.fn.on)) {
570
+ // For jQuery 1.7+
571
+ $(document).on('click.'+prefix, '.'+boxElement, clickHandler);
572
+ } else {
573
+ // For jQuery 1.3.x -> 1.6.x
574
+ // This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
575
+ // This is not here for jQuery 1.9, it's here for legacy users.
576
+ $('.'+boxElement).live('click.'+prefix, clickHandler);
577
+ }
578
+ }
579
+ return true;
580
+ }
581
+ return false;
582
+ }
583
+
584
+ // Don't do anything if Colorbox already exists.
585
+ if ($[colorbox]) {
586
+ return;
587
+ }
588
+
589
+ // Append the HTML when the DOM loads
590
+ $(appendHTML);
591
+
592
+
593
+ // ****************
594
+ // PUBLIC FUNCTIONS
595
+ // Usage format: $.colorbox.close();
596
+ // Usage from within an iframe: parent.jQuery.colorbox.close();
597
+ // ****************
598
+
599
+ publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
600
+ var settings;
601
+ var $obj = this;
602
+
603
+ options = options || {};
604
+
605
+ if ($.isFunction($obj)) { // assume a call to $.colorbox
606
+ $obj = $('<a/>');
607
+ options.open = true;
608
+ }
609
+
610
+ if (!$obj[0]) { // colorbox being applied to empty collection
611
+ return $obj;
612
+ }
613
+
614
+ appendHTML();
615
+
616
+ if (addBindings()) {
617
+
618
+ if (callback) {
619
+ options.onComplete = callback;
620
+ }
621
+
622
+ $obj.each(function () {
623
+ var old = $.data(this, colorbox) || {};
624
+ $.data(this, colorbox, $.extend(old, options));
625
+ }).addClass(boxElement);
626
+
627
+ settings = new Settings($obj[0], options);
628
+
629
+ if (settings.get('open')) {
630
+ launch($obj[0]);
631
+ }
632
+ }
633
+
634
+ return $obj;
635
+ };
636
+
637
+ publicMethod.position = function (speed, loadedCallback) {
638
+ var
639
+ css,
640
+ top = 0,
641
+ left = 0,
642
+ offset = $box.offset(),
643
+ scrollTop,
644
+ scrollLeft;
645
+
646
+ $window.unbind('resize.' + prefix);
647
+
648
+ // remove the modal so that it doesn't influence the document width/height
649
+ $box.css({top: -9e4, left: -9e4});
650
+
651
+ scrollTop = $window.scrollTop();
652
+ scrollLeft = $window.scrollLeft();
653
+
654
+ if (settings.get('fixed')) {
655
+ offset.top -= scrollTop;
656
+ offset.left -= scrollLeft;
657
+ $box.css({position: 'fixed'});
658
+ } else {
659
+ top = scrollTop;
660
+ left = scrollLeft;
661
+ $box.css({position: 'absolute'});
662
+ }
663
+
664
+ // keeps the top and left positions within the browser's viewport.
665
+ if (settings.get('right') !== false) {
666
+ left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.get('right'), 'x'), 0);
667
+ } else if (settings.get('left') !== false) {
668
+ left += setSize(settings.get('left'), 'x');
669
+ } else {
670
+ left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
671
+ }
672
+
673
+ if (settings.get('bottom') !== false) {
674
+ top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.get('bottom'), 'y'), 0);
675
+ } else if (settings.get('top') !== false) {
676
+ top += setSize(settings.get('top'), 'y');
677
+ } else {
678
+ top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
679
+ }
680
+
681
+ $box.css({top: offset.top, left: offset.left, visibility:'visible'});
682
+
683
+ // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
684
+ // but it has to be shrank down around the size of div#colorbox when it's done. If not,
685
+ // it can invoke an obscure IE bug when using iframes.
686
+ $wrap[0].style.width = $wrap[0].style.height = "9999px";
687
+
688
+ function modalDimensions() {
689
+ $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px';
690
+ $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px';
691
+ }
692
+
693
+ css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
694
+
695
+ // setting the speed to 0 if the content hasn't changed size or position
696
+ if (speed) {
697
+ var tempSpeed = 0;
698
+ $.each(css, function(i){
699
+ if (css[i] !== previousCSS[i]) {
700
+ tempSpeed = speed;
701
+ return;
702
+ }
703
+ });
704
+ speed = tempSpeed;
705
+ }
706
+
707
+ previousCSS = css;
708
+
709
+ if (!speed) {
710
+ $box.css(css);
711
+ }
712
+
713
+ $box.dequeue().animate(css, {
714
+ duration: speed || 0,
715
+ complete: function () {
716
+ modalDimensions();
717
+
718
+ active = false;
719
+
720
+ // shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
721
+ $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
722
+ $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
723
+
724
+ if (settings.get('reposition')) {
725
+ setTimeout(function () { // small delay before binding onresize due to an IE8 bug.
726
+ $window.bind('resize.' + prefix, publicMethod.position);
727
+ }, 1);
728
+ }
729
+
730
+ if ($.isFunction(loadedCallback)) {
731
+ loadedCallback();
732
+ }
733
+ },
734
+ step: modalDimensions
735
+ });
736
+ };
737
+
738
+ publicMethod.resize = function (options) {
739
+ var scrolltop;
740
+
741
+ if (open) {
742
+ options = options || {};
743
+
744
+ if (options.width) {
745
+ settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
746
+ }
747
+
748
+ if (options.innerWidth) {
749
+ settings.w = setSize(options.innerWidth, 'x');
750
+ }
751
+
752
+ $loaded.css({width: settings.w});
753
+
754
+ if (options.height) {
755
+ settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
756
+ }
757
+
758
+ if (options.innerHeight) {
759
+ settings.h = setSize(options.innerHeight, 'y');
760
+ }
761
+
762
+ if (!options.innerHeight && !options.height) {
763
+ scrolltop = $loaded.scrollTop();
764
+ $loaded.css({height: "auto"});
765
+ settings.h = $loaded.height();
766
+ }
767
+
768
+ $loaded.css({height: settings.h});
769
+
770
+ if(scrolltop) {
771
+ $loaded.scrollTop(scrolltop);
772
+ }
773
+
774
+ publicMethod.position(settings.get('transition') === "none" ? 0 : settings.get('speed'));
775
+ }
776
+ };
777
+
778
+ publicMethod.prep = function (object) {
779
+ if (!open) {
780
+ return;
781
+ }
782
+
783
+ var callback, speed = settings.get('transition') === "none" ? 0 : settings.get('speed');
784
+
785
+ $loaded.remove();
786
+
787
+ $loaded = $tag(div, 'LoadedContent').append(object);
788
+
789
+ function getWidth() {
790
+ settings.w = settings.w || $loaded.width();
791
+ settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
792
+ return settings.w;
793
+ }
794
+ function getHeight() {
795
+ settings.h = settings.h || $loaded.height();
796
+ settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
797
+ return settings.h;
798
+ }
799
+
800
+ $loaded.hide()
801
+ .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
802
+ .css({width: getWidth(), overflow: settings.get('scrolling') ? 'auto' : 'hidden'})
803
+ .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
804
+ .prependTo($content);
805
+
806
+ $loadingBay.hide();
807
+
808
+ // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
809
+
810
+ $(photo).css({'float': 'none'});
811
+
812
+ setClass(settings.get('className'));
813
+
814
+ callback = function () {
815
+ var total = $related.length,
816
+ iframe,
817
+ complete;
818
+
819
+ if (!open) {
820
+ return;
821
+ }
822
+
823
+ function removeFilter() { // Needed for IE8 in versions of jQuery prior to 1.7.2
824
+ if ($.support.opacity === false) {
825
+ $box[0].style.removeAttribute('filter');
826
+ }
827
+ }
828
+
829
+ complete = function () {
830
+ clearTimeout(loadingTimer);
831
+ $loadingOverlay.hide();
832
+ trigger(event_complete);
833
+ settings.get('onComplete');
834
+ };
835
+
836
+
837
+ $title.html(settings.get('title')).show();
838
+ $loaded.show();
839
+
840
+ if (total > 1) { // handle grouping
841
+ if (typeof settings.get('current') === "string") {
842
+ $current.html(settings.get('current').replace('{current}', index + 1).replace('{total}', total)).show();
843
+ }
844
+
845
+ $next[(settings.get('loop') || index < total - 1) ? "show" : "hide"]().html(settings.get('next'));
846
+ $prev[(settings.get('loop') || index) ? "show" : "hide"]().html(settings.get('previous'));
847
+
848
+ slideshow();
849
+
850
+ // Preloads images within a rel group
851
+ if (settings.get('preloading')) {
852
+ $.each([getIndex(-1), getIndex(1)], function(){
853
+ var img,
854
+ i = $related[this],
855
+ settings = new Settings(i, $.data(i, colorbox)),
856
+ src = settings.get('href');
857
+
858
+ if (src && isImage(settings, src)) {
859
+ src = retinaUrl(settings, src);
860
+ img = document.createElement('img');
861
+ img.src = src;
862
+ }
863
+ });
864
+ }
865
+ } else {
866
+ $groupControls.hide();
867
+ }
868
+
869
+ if (settings.get('iframe')) {
870
+
871
+ iframe = settings.get('createIframe');
872
+
873
+ if (!settings.get('scrolling')) {
874
+ iframe.scrolling = "no";
875
+ }
876
+
877
+ $(iframe)
878
+ .attr({
879
+ src: settings.get('href'),
880
+ 'class': prefix + 'Iframe'
881
+ })
882
+ .one('load', complete)
883
+ .appendTo($loaded);
884
+
885
+ $events.one(event_purge, function () {
886
+ iframe.src = "//about:blank";
887
+ });
888
+
889
+ if (settings.get('fastIframe')) {
890
+ $(iframe).trigger('load');
891
+ }
892
+ } else {
893
+ complete();
894
+ }
895
+
896
+ if (settings.get('transition') === 'fade') {
897
+ $box.fadeTo(speed, 1, removeFilter);
898
+ } else {
899
+ removeFilter();
900
+ }
901
+ };
902
+
903
+ if (settings.get('transition') === 'fade') {
904
+ $box.fadeTo(speed, 0, function () {
905
+ publicMethod.position(0, callback);
906
+ });
907
+ } else {
908
+ publicMethod.position(speed, callback);
909
+ }
910
+ };
911
+
912
+ function load () {
913
+ var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
914
+
915
+ active = true;
916
+
917
+ photo = false;
918
+
919
+ trigger(event_purge);
920
+ trigger(event_load);
921
+ settings.get('onLoad');
922
+
923
+ settings.h = settings.get('height') ?
924
+ setSize(settings.get('height'), 'y') - loadedHeight - interfaceHeight :
925
+ settings.get('innerHeight') && setSize(settings.get('innerHeight'), 'y');
926
+
927
+ settings.w = settings.get('width') ?
928
+ setSize(settings.get('width'), 'x') - loadedWidth - interfaceWidth :
929
+ settings.get('innerWidth') && setSize(settings.get('innerWidth'), 'x');
930
+
931
+ // Sets the minimum dimensions for use in image scaling
932
+ settings.mw = settings.w;
933
+ settings.mh = settings.h;
934
+
935
+ // Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
936
+ // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
937
+ if (settings.get('maxWidth')) {
938
+ settings.mw = setSize(settings.get('maxWidth'), 'x') - loadedWidth - interfaceWidth;
939
+ settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
940
+ }
941
+ if (settings.get('maxHeight')) {
942
+ settings.mh = setSize(settings.get('maxHeight'), 'y') - loadedHeight - interfaceHeight;
943
+ settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
944
+ }
945
+
946
+ href = settings.get('href');
947
+
948
+ loadingTimer = setTimeout(function () {
949
+ $loadingOverlay.show();
950
+ }, 100);
951
+
952
+ if (settings.get('inline')) {
953
+ var $target = $(href);
954
+ // Inserts an empty placeholder where inline content is being pulled from.
955
+ // An event is bound to put inline content back when Colorbox closes or loads new content.
956
+ $inline = $('<div>').hide().insertBefore($target);
957
+
958
+ $events.one(event_purge, function () {
959
+ $inline.replaceWith($target);
960
+ });
961
+
962
+ prep($target);
963
+ } else if (settings.get('iframe')) {
964
+ // IFrame element won't be added to the DOM until it is ready to be displayed,
965
+ // to avoid problems with DOM-ready JS that might be trying to run in that iframe.
966
+ prep(" ");
967
+ } else if (settings.get('html')) {
968
+ prep(settings.get('html'));
969
+ } else if (isImage(settings, href)) {
970
+
971
+ href = retinaUrl(settings, href);
972
+
973
+ photo = settings.get('createImg');
974
+
975
+ $(photo)
976
+ .addClass(prefix + 'Photo')
977
+ .bind('error.'+prefix,function () {
978
+ prep($tag(div, 'Error').html(settings.get('imgError')));
979
+ })
980
+ .one('load', function () {
981
+ if (request !== requests) {
982
+ return;
983
+ }
984
+
985
+ // A small pause because some browsers will occassionaly report a
986
+ // img.width and img.height of zero immediately after the img.onload fires
987
+ setTimeout(function(){
988
+ var percent;
989
+
990
+ if (settings.get('retinaImage') && window.devicePixelRatio > 1) {
991
+ photo.height = photo.height / window.devicePixelRatio;
992
+ photo.width = photo.width / window.devicePixelRatio;
993
+ }
994
+
995
+ if (settings.get('scalePhotos')) {
996
+ setResize = function () {
997
+ photo.height -= photo.height * percent;
998
+ photo.width -= photo.width * percent;
999
+ };
1000
+ if (settings.mw && photo.width > settings.mw) {
1001
+ percent = (photo.width - settings.mw) / photo.width;
1002
+ setResize();
1003
+ }
1004
+ if (settings.mh && photo.height > settings.mh) {
1005
+ percent = (photo.height - settings.mh) / photo.height;
1006
+ setResize();
1007
+ }
1008
+ }
1009
+
1010
+ if (settings.h) {
1011
+ photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px';
1012
+ }
1013
+
1014
+ if ($related[1] && (settings.get('loop') || $related[index + 1])) {
1015
+ photo.style.cursor = 'pointer';
1016
+
1017
+ $(photo).bind('click.'+prefix, function () {
1018
+ publicMethod.next();
1019
+ });
1020
+ }
1021
+
1022
+ photo.style.width = photo.width + 'px';
1023
+ photo.style.height = photo.height + 'px';
1024
+ prep(photo);
1025
+ }, 1);
1026
+ });
1027
+
1028
+ photo.src = href;
1029
+
1030
+ } else if (href) {
1031
+ $loadingBay.load(href, settings.get('data'), function (data, status) {
1032
+ if (request === requests) {
1033
+ prep(status === 'error' ? $tag(div, 'Error').html(settings.get('xhrError')) : $(this).contents());
1034
+ }
1035
+ });
1036
+ }
1037
+ }
1038
+
1039
+ // Navigates to the next page/image in a set.
1040
+ publicMethod.next = function () {
1041
+ if (!active && $related[1] && (settings.get('loop') || $related[index + 1])) {
1042
+ index = getIndex(1);
1043
+ launch($related[index]);
1044
+ }
1045
+ };
1046
+
1047
+ publicMethod.prev = function () {
1048
+ if (!active && $related[1] && (settings.get('loop') || index)) {
1049
+ index = getIndex(-1);
1050
+ launch($related[index]);
1051
+ }
1052
+ };
1053
+
1054
+ // Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close();
1055
+ publicMethod.close = function () {
1056
+ if (open && !closing) {
1057
+
1058
+ closing = true;
1059
+ open = false;
1060
+ trigger(event_cleanup);
1061
+ settings.get('onCleanup');
1062
+ $window.unbind('.' + prefix);
1063
+ $overlay.fadeTo(settings.get('fadeOut') || 0, 0);
1064
+
1065
+ $box.stop().fadeTo(settings.get('fadeOut') || 0, 0, function () {
1066
+ $box.hide();
1067
+ $overlay.hide();
1068
+ trigger(event_purge);
1069
+ $loaded.remove();
1070
+
1071
+ setTimeout(function () {
1072
+ closing = false;
1073
+ trigger(event_closed);
1074
+ settings.get('onClosed');
1075
+ }, 1);
1076
+ });
1077
+ }
1078
+ };
1079
+
1080
+ // Removes changes Colorbox made to the document, but does not remove the plugin.
1081
+ publicMethod.remove = function () {
1082
+ if (!$box) { return; }
1083
+
1084
+ $box.stop();
1085
+ $[colorbox].close();
1086
+ $box.stop(false, true).remove();
1087
+ $overlay.remove();
1088
+ closing = false;
1089
+ $box = null;
1090
+ $('.' + boxElement)
1091
+ .removeData(colorbox)
1092
+ .removeClass(boxElement);
1093
+
1094
+ $(document).unbind('click.'+prefix).unbind('keydown.'+prefix);
1095
+ };
1096
+
1097
+ // A method for fetching the current element Colorbox is referencing.
1098
+ // returns a jQuery object.
1099
+ publicMethod.element = function () {
1100
+ return $(settings.el);
1101
+ };
1102
+
1103
+ publicMethod.settings = defaults;
1104
+
1105
+ }(jQuery, document, window));
plugin-fw/assets/js/yit-plugin-panel-sidebar.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This file belongs to the YIT Plugin Framework.
3
+ *
4
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
5
+ * that is bundled with this package in the file LICENSE.txt.
6
+ * It is also available through the world-wide-web at this URL:
7
+ * http://www.gnu.org/licenses/gpl-3.0.txt
8
+ */
9
+
10
+
11
+ (function ( $ ) {
12
+ var hide_sidebar_btn = $( '#yit-panel-sidebar-action-hide' ),
13
+ hide_sidebar_text = hide_sidebar_btn.find( '.yit-panel-sidebar-action-title' ),
14
+ sidebar = $( '#yit-panel-sidebar' ),
15
+ panel_wrapper = $( '.' + sidebar_labels.wrapper_class ),
16
+ ajax_hide_option_save_call,
17
+ ajax_hide_option_save = function ( option ) {
18
+ if ( ajax_hide_option_save_call ) {
19
+ ajax_hide_option_save_call.abort();
20
+ }
21
+
22
+ var post_data = {
23
+ option: option,
24
+ action: 'yith_plugin_panel_sidebar_set_collapse_option'
25
+ };
26
+
27
+ ajax_hide_option_save_call = $.ajax( {
28
+ type: "POST",
29
+ data: post_data,
30
+ url: ajaxurl
31
+ } );
32
+ },
33
+ hide_sidebar = function () {
34
+ hide_sidebar_btn.removeClass( 'hide-on-click' );
35
+ hide_sidebar_text.html( sidebar_labels.show_sidebar );
36
+ sidebar.addClass( 'yith-panel-sidebar-hidden' );
37
+ panel_wrapper.addClass( 'yit-admin-panel-content-wrap-full' );
38
+ ajax_hide_option_save( 'yes' );
39
+ },
40
+ show_sidebar = function () {
41
+ hide_sidebar_btn.addClass( 'hide-on-click' );
42
+ hide_sidebar_text.html( sidebar_labels.hide_sidebar );
43
+ sidebar.removeClass( 'yith-panel-sidebar-hidden' );
44
+ panel_wrapper.removeClass( 'yit-admin-panel-content-wrap-full' );
45
+ ajax_hide_option_save( 'no' );
46
+ };
47
+
48
+ hide_sidebar_btn.on( 'click', function () {
49
+ if ( $( this ).is( '.hide-on-click' ) ) {
50
+ hide_sidebar();
51
+ } else {
52
+ show_sidebar();
53
+ }
54
+ } );
55
+
56
+ })( jQuery );
plugin-fw/assets/js/yit-plugin-panel-sidebar.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){var i,e=a("#yit-panel-sidebar-action-hide"),n=e.find(".yit-panel-sidebar-action-title"),l=a("#yit-panel-sidebar"),s=a("."+sidebar_labels.wrapper_class),t=function(e){i&&i.abort();var n={option:e,action:"yith_plugin_panel_sidebar_set_collapse_option"};i=a.ajax({type:"POST",data:n,url:ajaxurl})},d=function(){e.removeClass("hide-on-click"),n.html(sidebar_labels.show_sidebar),l.addClass("yith-panel-sidebar-hidden"),s.addClass("yit-admin-panel-content-wrap-full"),t("yes")},o=function(){e.addClass("hide-on-click"),n.html(sidebar_labels.hide_sidebar),l.removeClass("yith-panel-sidebar-hidden"),s.removeClass("yit-admin-panel-content-wrap-full"),t("no")};e.on("click",function(){a(this).is(".hide-on-click")?d():o()})}(jQuery);
plugin-fw/init.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 2.9.13
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 2.9.21
5
  * Author: Yithemes
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
plugin-fw/languages/yith-plugin-fw-it_IT.mo CHANGED
Binary file
plugin-fw/languages/yith-plugin-fw-it_IT.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: Your Inspiration Themes <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2016-03-07 15:11+0100\n"
8
- "PO-Revision-Date: 2016-03-07 15:11+0100\n"
9
  "Last-Translator: \n"
10
  "Language-Team: YIThemes <plugins@yithemes.com>\n"
11
  "Language: it_IT\n"
@@ -224,7 +224,7 @@ msgstr "Aggiungi %s dalla immagini"
224
  msgid "Upload multiple files"
225
  msgstr ""
226
 
227
- #: lib/yit-plugin-panel-wc.php:341
228
  msgid "The changes you have made will be lost if you leave this page."
229
  msgstr "Perderai tutti i cambiamenti effettuati se lasci questa pagina."
230
 
@@ -236,63 +236,67 @@ msgstr "Impostazioni plugin"
236
  msgid "YITH Plugins"
237
  msgstr "YITH Plugins"
238
 
239
- #: lib/yit-plugin-panel.php:297 lib/yit-plugin-subpanel.php:146
 
 
 
 
240
  #: templates/panel/woocommerce/woocommerce-form.php:5
241
  msgid "Save Changes"
242
  msgstr "Salva modifiche"
243
 
244
- #: lib/yit-plugin-panel.php:300 templates/panel/woocommerce/woocommerce-form.php:8
245
  msgid "If you continue with this action, you will reset all options in this page."
246
  msgstr ""
247
  "Se prosegui con questa azione, tutte le opzioni di questa pagina saranno "
248
  "reimpostate."
249
 
250
- #: lib/yit-plugin-panel.php:302 lib/yit-plugin-subpanel.php:151
251
  msgid "Reset to default"
252
  msgstr ""
253
 
254
- #: lib/yit-plugin-panel.php:302 lib/yit-plugin-subpanel.php:151
255
  #: templates/panel/woocommerce/woocommerce-form.php:11
256
  msgid "Are you sure?"
257
  msgstr "Sei sicuro?"
258
 
259
- #: lib/yit-plugin-panel.php:436
260
  msgid "The element you have entered already exists. Please, enter another name."
261
  msgstr "L'elemento inserito esiste già. Per favore, inserisci un altro nome."
262
 
263
- #: lib/yit-plugin-panel.php:437
264
  msgid "Settings saved"
265
  msgstr "Impostazioni salvate"
266
 
267
- #: lib/yit-plugin-panel.php:438
268
  msgid "Settings reset"
269
  msgstr "Impostazioni azzerate"
270
 
271
- #: lib/yit-plugin-panel.php:439
272
  msgid "Element deleted correctly."
273
  msgstr "Elemento rimosso correttamente."
274
 
275
- #: lib/yit-plugin-panel.php:440 lib/yit-plugin-panel.php:441
276
  msgid "Element updated correctly."
277
  msgstr "Elemento aggiornato correttamente."
278
 
279
- #: lib/yit-plugin-panel.php:442
280
  msgid "Database imported correctly."
281
  msgstr "Database importato correttamente."
282
 
283
- #: lib/yit-plugin-panel.php:443
284
  msgid "An error has occurred during import. Please try again."
285
  msgstr "Si è verificato un errore durante l'importazione. Prova di nuovo."
286
 
287
- #: lib/yit-plugin-panel.php:444
288
  msgid "The added file is not valid."
289
  msgstr "Il file aggiunto non è valido."
290
 
291
- #: lib/yit-plugin-panel.php:445
292
  msgid "Sorry, import is disabled."
293
  msgstr "Ci dispiace, l'importazione è disabilitata."
294
 
295
- #: lib/yit-plugin-panel.php:446
296
  msgid "Sorting successful."
297
  msgstr "Ordinamento effettuato con successo."
298
 
@@ -1007,6 +1011,132 @@ msgstr ""
1007
  msgid "Reset Defaults"
1008
  msgstr "Ripristina impostazioni iniziali"
1009
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1010
  #~ msgid "YIT Plugins"
1011
  #~ msgstr "YIT Plugins"
1012
 
4
  msgstr ""
5
  "Project-Id-Version: YITH Plugin Starter 1.0.0 Plugin FW\n"
6
  "Report-Msgid-Bugs-To: Your Inspiration Themes <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2016-03-18 15:29+0100\n"
8
+ "PO-Revision-Date: 2016-03-18 15:34+0100\n"
9
  "Last-Translator: \n"
10
  "Language-Team: YIThemes <plugins@yithemes.com>\n"
11
  "Language: it_IT\n"
224
  msgid "Upload multiple files"
225
  msgstr ""
226
 
227
+ #: lib/yit-plugin-panel-wc.php:345
228
  msgid "The changes you have made will be lost if you leave this page."
229
  msgstr "Perderai tutti i cambiamenti effettuati se lasci questa pagina."
230
 
236
  msgid "YITH Plugins"
237
  msgstr "YITH Plugins"
238
 
239
+ #: lib/yit-plugin-panel.php:276
240
+ msgid "Premium version upgrade"
241
+ msgstr ""
242
+
243
+ #: lib/yit-plugin-panel.php:322 lib/yit-plugin-subpanel.php:146
244
  #: templates/panel/woocommerce/woocommerce-form.php:5
245
  msgid "Save Changes"
246
  msgstr "Salva modifiche"
247
 
248
+ #: lib/yit-plugin-panel.php:325 templates/panel/woocommerce/woocommerce-form.php:8
249
  msgid "If you continue with this action, you will reset all options in this page."
250
  msgstr ""
251
  "Se prosegui con questa azione, tutte le opzioni di questa pagina saranno "
252
  "reimpostate."
253
 
254
+ #: lib/yit-plugin-panel.php:327 lib/yit-plugin-subpanel.php:151
255
  msgid "Reset to default"
256
  msgstr ""
257
 
258
+ #: lib/yit-plugin-panel.php:327 lib/yit-plugin-subpanel.php:151
259
  #: templates/panel/woocommerce/woocommerce-form.php:11
260
  msgid "Are you sure?"
261
  msgstr "Sei sicuro?"
262
 
263
+ #: lib/yit-plugin-panel.php:461
264
  msgid "The element you have entered already exists. Please, enter another name."
265
  msgstr "L'elemento inserito esiste già. Per favore, inserisci un altro nome."
266
 
267
+ #: lib/yit-plugin-panel.php:462
268
  msgid "Settings saved"
269
  msgstr "Impostazioni salvate"
270
 
271
+ #: lib/yit-plugin-panel.php:463
272
  msgid "Settings reset"
273
  msgstr "Impostazioni azzerate"
274
 
275
+ #: lib/yit-plugin-panel.php:464
276
  msgid "Element deleted correctly."
277
  msgstr "Elemento rimosso correttamente."
278
 
279
+ #: lib/yit-plugin-panel.php:465 lib/yit-plugin-panel.php:466
280
  msgid "Element updated correctly."
281
  msgstr "Elemento aggiornato correttamente."
282
 
283
+ #: lib/yit-plugin-panel.php:467
284
  msgid "Database imported correctly."
285
  msgstr "Database importato correttamente."
286
 
287
+ #: lib/yit-plugin-panel.php:468
288
  msgid "An error has occurred during import. Please try again."
289
  msgstr "Si è verificato un errore durante l'importazione. Prova di nuovo."
290
 
291
+ #: lib/yit-plugin-panel.php:469
292
  msgid "The added file is not valid."
293
  msgstr "Il file aggiunto non è valido."
294
 
295
+ #: lib/yit-plugin-panel.php:470
296
  msgid "Sorry, import is disabled."
297
  msgstr "Ci dispiace, l'importazione è disabilitata."
298
 
299
+ #: lib/yit-plugin-panel.php:471
300
  msgid "Sorting successful."
301
  msgstr "Ordinamento effettuato con successo."
302
 
1011
  msgid "Reset Defaults"
1012
  msgstr "Ripristina impostazioni iniziali"
1013
 
1014
+ #: templates/upgrade/upgrade-to-pro-version.php:2
1015
+ msgid "Upgrade to Premium Version"
1016
+ msgstr ""
1017
+
1018
+ #: templates/upgrade/upgrade-to-pro-version.php:3
1019
+ msgid ""
1020
+ "Have you purchased the premium version of a plugin? Don't you know how to activate "
1021
+ "the license after the purchase?"
1022
+ msgstr ""
1023
+ "Hai comprato la versione premium di un plugin ? Dopo l'acquisto non trovi dove "
1024
+ "attivare la licenza del tuo plugin premium ? "
1025
+
1026
+ #: templates/upgrade/upgrade-to-pro-version.php:5
1027
+ msgid ""
1028
+ "To upgrade from a FREE to a PREMIUM plugin is not suffice to insert the license "
1029
+ "key provided after the purchase.\n"
1030
+ " The reason is that they are two distinct products, with significant "
1031
+ "differences both for available options and for number of files included in the "
1032
+ "plugin package.\n"
1033
+ " To start to use the PREMIUM version of the plugin, you simply need to "
1034
+ "download the PREMIUM packet and install it on your site."
1035
+ msgstr ""
1036
+ "Per passare da un plugin FREE ad uno PREMIUM non basta semplicemnete inserire la "
1037
+ "chiave di licenza che ti è stata fornita dopo aver completato l'acquisto. Questo "
1038
+ "perchè fisicamente si tratta di due prodotti diversi, con differenze sostanziali "
1039
+ "sia nelle opzioni disponibili sia sul numero di file presenti all'interno del "
1040
+ "pacchetto del plugin stesso. \n"
1041
+ "Per iniziare ad usare il plugin PREMIUM che hai appena acquistato devi "
1042
+ "semplicemente scaricare il pacchetto PREMIUM ed installarlo sul tuo sito."
1043
+
1044
+ #: templates/upgrade/upgrade-to-pro-version.php:9
1045
+ #, php-format
1046
+ msgid ""
1047
+ "%1$sDo you need to know how to do it?%2$s Easy! %1$sFollow this list of steps%2$s "
1048
+ "and in a few minutes the plugin you purchased will be installed on your site"
1049
+ msgstr ""
1050
+ "%1$sNon sai come fare ?%2$s Non è un problema%1$s, segui i passi elencati qui sotto"
1051
+ "%2$s ed in pochi minuti avrai il plugin acquistato correttamente installato sul "
1052
+ "tuo sito."
1053
+
1054
+ #: templates/upgrade/upgrade-to-pro-version.php:12
1055
+ msgid "Go to yithemes.com and login to \"My Account\" page"
1056
+ msgstr "Vai su yithemes.com ed effettua il login alla sezione \"My Account \""
1057
+
1058
+ #: templates/upgrade/upgrade-to-pro-version.php:18
1059
+ msgid ""
1060
+ "From the menu on the left, click on \"My Downloads\", look for the plugin you want "
1061
+ "to install among the available downloads and click on \"Download\" button"
1062
+ msgstr ""
1063
+ "Dal menù di sinistra clicca su \"My Downloads\" e cerca tra i download disponibili "
1064
+ "il plugin che vuoi installare, e clicca su \"Download\""
1065
+
1066
+ #: templates/upgrade/upgrade-to-pro-version.php:24
1067
+ msgid ""
1068
+ "After downloading the packet, go to your website and login to WordPress "
1069
+ "administration area."
1070
+ msgstr ""
1071
+ "Non appena il download del pacchetto sarà completato recati sul tuo sito web ed "
1072
+ "effettua il login all'area amministrazione di WordPress."
1073
+
1074
+ #: templates/upgrade/upgrade-to-pro-version.php:30
1075
+ msgid ""
1076
+ "From the menu on the left, click on \"Plugins\". You will be redirected to the "
1077
+ "page where you will find the complete list of all the plugins available on your "
1078
+ "site. Click on \"Add New\" button that you find above on the left to add a new "
1079
+ "plugin"
1080
+ msgstr ""
1081
+ "Dal menù di sinistra clicca sulla voce Plugins. Verrai indirizzato su una pagina "
1082
+ "con la lista dei plugin disponibili sul tuo sito. Clicca sul pulsante \"Add New\" "
1083
+ "che trovi in alto a sinistra vicino al titolo della pagina."
1084
+
1085
+ #: templates/upgrade/upgrade-to-pro-version.php:36
1086
+ msgid ""
1087
+ "You will be redirected to a new page where you will find, above on the left next "
1088
+ "to the page title, the \"Upload Plugin\" button."
1089
+ msgstr ""
1090
+ "Verrai indirizzato su una nuova pagina dove trovi, in alto a sinistra vicino al "
1091
+ "titolo della pagina, il pulsante \"Upload Plugin\"."
1092
+
1093
+ #: templates/upgrade/upgrade-to-pro-version.php:42
1094
+ msgid ""
1095
+ "Click on \"Upload Plugins\" button to start the upload of the PREMIUM version of "
1096
+ "the plugin previously downloaded. Click on \"Select File\", search for the "
1097
+ "download folder related to the plugin and upload the package. Now you only need to "
1098
+ "wait a few minutes for the upload and the installation on your site. (We used YITH "
1099
+ "Live Chat plugin by way of example)"
1100
+ msgstr ""
1101
+ "Cliccando su \"Upload Plugins\", ti troverai in una pagina dove poter effettuare "
1102
+ "l'upload del pacchetto del plugin PREMIUM da te precedentemente scaricato. Clicca "
1103
+ "quindi su \"Scegli File\", cerca la cartella di download dove hai scaricato il "
1104
+ "plugin ed effettua il caricamento del pacchetto. A questo punto ti basta attendere "
1105
+ "qualche minuto che il pacchetto venga caricato ed installato sul tuo sito. "
1106
+ "(Abbiamo usato YITH Live Chat come esempio) "
1107
+
1108
+ #: templates/upgrade/upgrade-to-pro-version.php:48
1109
+ msgid "After completing the installation, click on \"Activate plugin\""
1110
+ msgstr "Al termine della procedura di installazione clicca su \"Attiva\""
1111
+
1112
+ #: templates/upgrade/upgrade-to-pro-version.php:52
1113
+ msgid ""
1114
+ "If everything worked allright, your plugin is now correctly installed on your "
1115
+ "website. Enjoy it :-)"
1116
+ msgstr ""
1117
+ "Se tutto è andato per il meglio il tuo plugin è correttamente installato sul tuo "
1118
+ "sito web. Enjoy it :-)"
1119
+
1120
+ #: templates/upgrade/upgrade-to-pro-version.php:55
1121
+ msgid ""
1122
+ "The last step is the activation of the plugin through its license key you received "
1123
+ "after the purchase. Click on \"License Activation\" that you find in \"YITH Plugins"
1124
+ "\" and insert the license key and the email address you used during the purchas."
1125
+ msgstr ""
1126
+ "Ultimo step è attivare il plugin con la chiave di licenza che hai ricevuto dopo "
1127
+ "l'acquisto. Clicca quindi sul link \"License Activation\" che trovi sotto \"YITH "
1128
+ "Plugins\" ed inserisci la license key in tuo possesso ed email utilizzata in fase "
1129
+ "di acquisto."
1130
+
1131
+ #: templates/upgrade/upgrade-to-pro-version.php:61
1132
+ msgid ""
1133
+ "In case you had difficulty to recover the license key we sent you by email, you "
1134
+ "can easily find it in \"My Licenses\" section of your account on yithemes.com"
1135
+ msgstr ""
1136
+ "Se non trovi l'email che ti abbiamo inviato contenete la license key puoi "
1137
+ "facilmente recuperarla dalla sezione \"My Licenses\" all'interno della sezione My "
1138
+ "Account del nostro sito yithemes.com."
1139
+
1140
  #~ msgid "YIT Plugins"
1141
  #~ msgstr "YIT Plugins"
1142
 
plugin-fw/lib/yit-ajax.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ *
5
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.txt
9
+ */
10
+
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ } // Exit if accessed directly
14
+
15
+ if ( !class_exists( 'YIT_Ajax' ) ) {
16
+ /**
17
+ * YIT Ajax
18
+ *
19
+ * @class YIT_Ajax
20
+ * @package Yithemes
21
+ * @since 1.0
22
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
23
+ */
24
+ class YIT_Ajax {
25
+ /**
26
+ * @var string version of class
27
+ */
28
+ public $version = '1.0.0';
29
+
30
+ /**
31
+ * @var object The single instance of the class
32
+ * @since 1.0
33
+ */
34
+ protected static $_instance = null;
35
+
36
+ /**
37
+ * Constructor
38
+ *
39
+ * @since 1.0
40
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
41
+ */
42
+ private function __construct() {
43
+ add_action( 'wp_ajax_yith_plugin_panel_sidebar_set_collapse_option', array( $this, 'set_ajax_sidebar_collapse_option' ) );
44
+ }
45
+
46
+ /**
47
+ * get single instance
48
+ *
49
+ * @static
50
+ * @return YIT_Ajax
51
+ *
52
+ * @since 1.0
53
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
54
+ */
55
+ public static function instance() {
56
+ if ( is_null( self::$_instance ) ) {
57
+ self::$_instance = new self();
58
+ }
59
+
60
+ return self::$_instance;
61
+ }
62
+
63
+ /**
64
+ * Set Sidebar collapse option [AJAX]
65
+ */
66
+ public function set_ajax_sidebar_collapse_option() {
67
+ if ( isset( $_REQUEST[ 'option' ] ) ) {
68
+ $option = $_REQUEST[ 'option' ];
69
+ update_option( YIT_Plugin_Panel_Sidebar::$collapse_option, $option );
70
+ }
71
+ die();
72
+ }
73
+ }
74
+ }
75
+
76
+ YIT_Ajax::instance();
plugin-fw/lib/yit-plugin-panel-sidebar.php ADDED
@@ -0,0 +1,417 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ *
5
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.txt
9
+ */
10
+
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ } // Exit if accessed directly
14
+
15
+ if ( !class_exists( 'YIT_Plugin_Panel_Sidebar' ) ) {
16
+ /**
17
+ * YIT Plugin Panel Sidebar
18
+ *
19
+ * @class YIT_Plugin_Panel_Sidebar
20
+ * @package Yithemes
21
+ * @since 1.0
22
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
23
+ */
24
+ class YIT_Plugin_Panel_Sidebar {
25
+ /**
26
+ * @var string version of class
27
+ */
28
+ public $version = '1.0.1';
29
+
30
+
31
+ /**
32
+ * @var array array of widgets
33
+ */
34
+ public $widgets = array();
35
+
36
+ /**
37
+ * @type string
38
+ */
39
+ protected $_remote_widget_xml = 'http://bit.ly/1UJ83xN';
40
+
41
+ /**
42
+ * default priority for Remote Widgets
43
+ * @type int
44
+ */
45
+ public $default_remote_widget_priority = 40;
46
+
47
+ /**
48
+ * parent panel
49
+ * @var YIT_Plugin_Panel
50
+ */
51
+ public $panel;
52
+
53
+ private $_is_collapsed;
54
+
55
+ /**
56
+ * @type string
57
+ */
58
+ public static $transient_remote_widgets = 'yit_panel_sidebar_remote_widgets';
59
+
60
+ /**
61
+ * @type string
62
+ */
63
+ public static $transient_updated_remote_widgets = 'yit_panel_sidebar_remote_widgets_update';
64
+
65
+ /**
66
+ * @type string
67
+ */
68
+ public static $collapse_option = 'yith_plugin_panel_sidebar_collapse';
69
+
70
+ /**
71
+ * Constructor
72
+ *
73
+ * @param YIT_Plugin_Panel $panel the parent panel
74
+ *
75
+ * @since 1.0
76
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
77
+ */
78
+ private function __construct( $panel ) {
79
+ $this->panel = $panel;
80
+
81
+ /* load and sort default widgets and remote widgets */
82
+ $this->load_widgets();
83
+
84
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
85
+ add_filter( 'yit_admin_panel_content_class', array( $this, 'filter_admin_panel_content_class' ) );
86
+ }
87
+
88
+ /**
89
+ * get instance
90
+ *
91
+ * @static
92
+ * @return YIT_Plugin_Panel_Sidebar
93
+ *
94
+ * @since 1.0
95
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
96
+ */
97
+ public static function instance( $panel ) {
98
+ return new self( $panel );
99
+ }
100
+
101
+ /**
102
+ * return true if is collapsed by option
103
+ *
104
+ * @return bool
105
+ */
106
+ public function is_collapsed() {
107
+ if ( !isset( $this->_is_collapsed ) ) {
108
+ $this->_is_collapsed = get_option( self::$collapse_option, 'no' ) === 'yes';
109
+ }
110
+
111
+ return $this->_is_collapsed;
112
+ }
113
+
114
+ /**
115
+ * if is collapsed add a class to panel wrapper
116
+ *
117
+ * @param $class
118
+ *
119
+ * @return string
120
+ */
121
+ public function filter_admin_panel_content_class( $class ) {
122
+ if ( $this->is_collapsed() ) {
123
+ $class .= ' yit-admin-panel-content-wrap-full';
124
+ }
125
+
126
+ return $class;
127
+ }
128
+
129
+ /**
130
+ * Add one or more widgets to $this->widgets
131
+ *
132
+ * @param array $widgets
133
+ */
134
+ public function add_widgets( $widgets ) {
135
+ $this->widgets = array_merge( $this->widgets, $widgets );
136
+ }
137
+
138
+ /**
139
+ * delete transients
140
+ */
141
+ public static function delete_transients() {
142
+ delete_transient( self::$transient_remote_widgets );
143
+ delete_transient( self::$transient_updated_remote_widgets );
144
+ }
145
+
146
+ /**
147
+ * filter and sort widgets
148
+ */
149
+ private function _filter_and_sort_widgets() {
150
+ /* filter widgets */
151
+ $page_name = isset( $this->panel->settings[ 'page' ] ) ? $this->panel->settings[ 'page' ] : '';
152
+ $this->widgets = apply_filters( 'yit_plugin_panel_sidebar_widgets', $this->widgets, $page_name );
153
+
154
+ /*sort widgets*/
155
+ uasort( $this->widgets, array( $this, 'sort_widgets' ) );
156
+ }
157
+
158
+ /**
159
+ * get Remote Widget by XML from YIThemes
160
+ *
161
+ * @return array
162
+ *
163
+ * @since 1.0
164
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
165
+ */
166
+ public function get_remote_widgets() {
167
+ $remote_widgets = get_transient( self::$transient_remote_widgets );
168
+ $updated = get_transient( self::$transient_updated_remote_widgets );
169
+ $is_debug = defined( 'YIT_FW_REMOTE_WIDGETS_DEBUG' ) && YIT_FW_REMOTE_WIDGETS_DEBUG;
170
+
171
+ if ( $is_debug || $updated === false || $remote_widgets === false ) {
172
+ $remote_widgets = array();
173
+ } else {
174
+ return $remote_widgets;
175
+ }
176
+
177
+ $expiration = 1 * DAY_IN_SECONDS;
178
+ $updated_expiration = DAY_IN_SECONDS; // update frequency
179
+
180
+ $remote_xml = wp_remote_get( $this->_remote_widget_xml );
181
+ if ( !is_wp_error( $remote_xml ) && isset( $remote_xml[ 'response' ][ 'code' ] ) && '200' == $remote_xml[ 'response' ][ 'code' ] ) {
182
+ $xml_data = new SimpleXmlElement( $remote_xml[ 'body' ] );
183
+ $xml_remote_widgets = isset( $xml_data->widget ) ? $xml_data->widget : array();
184
+
185
+ $enabled_args = array(
186
+ 'title',
187
+ 'icon',
188
+ 'content',
189
+ 'class',
190
+ 'title_class',
191
+ 'badge',
192
+ 'badge_text',
193
+ 'image',
194
+ 'image_class',
195
+ 'priority',
196
+ 'starting',
197
+ 'expiration',
198
+ );
199
+
200
+ $last_remote_priority = $this->default_remote_widget_priority;
201
+
202
+ foreach ( $xml_remote_widgets as $xml_widget ) {
203
+ if ( !isset( $xml_widget->id ) )
204
+ continue;
205
+
206
+ $widget_id = (string)$xml_widget->id;
207
+ $widget_array = array();
208
+ foreach ( $enabled_args as $key ) {
209
+ if ( isset( $xml_widget->$key ) ) {
210
+ $widget_array[ $key ] = (string)$xml_widget->$key;
211
+ } else {
212
+ if ( $key == 'priority' ) {
213
+ $widget_array[ $key ] = $last_remote_priority;
214
+ $last_remote_priority += 10;
215
+ }
216
+ }
217
+ }
218
+ $remote_widgets[ $widget_id ] = $widget_array;
219
+ }
220
+
221
+ $xml_expiration = isset( $xml_data->expiration ) ? (string)$xml_data->expiration : '';
222
+ if ( !empty( $xml_expiration ) ) {
223
+ $expiration = strtotime( $xml_expiration ) - strtotime( 'now' );
224
+ // if the XML is expired removes widgets
225
+ if ( $expiration < 1 )
226
+ $remote_widgets = array();
227
+
228
+ $is_urgent = isset( $xml_data->urgent ) ? !!$xml_data->urgent : false;
229
+ $is_urgent = true;
230
+ if ( !$is_urgent ) {
231
+ $four_days_random = mt_rand( 0, 4 * DAY_IN_SECONDS );
232
+ $expiration += $four_days_random;
233
+ } else {
234
+ /**
235
+ * - - - - - U R G E N T - - - - -
236
+ * it will be updated the exact day, BUT in different time! :)
237
+ * [to prevent too many request at the same time]
238
+ */
239
+ $one_day_random = mt_rand( 0, DAY_IN_SECONDS );
240
+ $expiration += $one_day_random;
241
+ }
242
+ }
243
+
244
+ $four_days_random = mt_rand( 0, 4 * DAY_IN_SECONDS );
245
+
246
+ /* to prevent multiple request if it's expired */
247
+ if ( $expiration < 1 ) {
248
+ $expiration = 1 * DAY_IN_SECONDS + $four_days_random;
249
+ }
250
+
251
+ //$updated_expiration = 30 * DAY_IN_SECONDS + $four_days_random;
252
+ }
253
+
254
+ set_transient( self::$transient_remote_widgets, $remote_widgets, $expiration );
255
+ set_transient( self::$transient_updated_remote_widgets, true, $updated_expiration );
256
+
257
+ return $remote_widgets;
258
+ }
259
+
260
+ /**
261
+ * load and sort default widgets and remote widgets
262
+ *
263
+ * @since 1.0
264
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
265
+ */
266
+ public function load_widgets() {
267
+ /* get static widgets */
268
+ $this->widgets = include( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/sidebar/widgets/widgets.php' );
269
+
270
+ /* get remote widgets */
271
+ $remote_widgets = $this->get_remote_widgets();
272
+ $this->add_widgets( $remote_widgets );
273
+ }
274
+
275
+ /**
276
+ * Print the panel sidebar
277
+ *
278
+ * @return void
279
+ *
280
+ * @since 1.0
281
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
282
+ */
283
+ public function print_panel_sidebar() {
284
+ do_action( 'yit_panel_before_sidebar' );
285
+
286
+ include( YIT_CORE_PLUGIN_TEMPLATE_PATH . '/panel/sidebar/sidebar.php' );
287
+
288
+ do_action( 'yit_panel_after_sidebar' );
289
+ }
290
+
291
+ /**
292
+ * Print the panel sidebar widgets
293
+ *
294
+ * @return void
295
+ *
296
+ * @since 1.0
297
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
298
+ */
299
+ public function print_panel_sidebar_widgets() {
300
+ $basename = YIT_CORE_PLUGIN_PATH;
301
+ $path = '/panel/sidebar/widget.php';
302
+
303
+ $default_args = array(
304
+ 'id' => '',
305
+ 'title' => '',
306
+ 'icon' => '',
307
+ 'content' => '',
308
+ 'class' => '',
309
+ 'title_class' => '',
310
+ 'template' => '',
311
+ 'badge' => '',
312
+ 'badge_text' => '',
313
+ 'image' => '',
314
+ 'image_class' => '',
315
+ 'args' => array(),
316
+ 'hide_if_empty_args' => '',
317
+ 'priority' => 10,
318
+ 'starting' => '',
319
+ 'expiration' => '',
320
+ );
321
+
322
+ $this->_filter_and_sort_widgets();
323
+
324
+ foreach ( $this->widgets as $widget_id => $widget ) {
325
+ $args = array_merge( $widget, array( 'id' => $widget_id ) );
326
+ $args = wp_parse_args( $args, $default_args );
327
+
328
+ $is_started = empty( $args[ 'starting' ] ) || strtotime( $args[ 'starting' ] . ' midnight' ) <= strtotime( 'midnight' );
329
+ $is_expired = !empty( $args[ 'expiration' ] ) && strtotime( $args[ 'expiration' ] . ' midnight' ) < strtotime( 'midnight' );
330
+
331
+ if ( $is_expired || !$is_started )
332
+ continue;
333
+
334
+ if ( !empty( $args[ 'hide_if_empty_args' ] ) ) {
335
+ $hide_if_empty_args = $args[ 'hide_if_empty_args' ];
336
+ $continue = false;
337
+ foreach ( $hide_if_empty_args as $hide_if_empty_arg ) {
338
+ if ( empty( $args[ 'args' ][ $hide_if_empty_arg ] ) ) {
339
+ $continue = true;
340
+ break;
341
+ }
342
+ }
343
+ if ( $continue )
344
+ continue;
345
+ }
346
+
347
+ do_action( 'yit_panel_sidebar_before_widget', $widget_id, $widget );
348
+
349
+ yit_plugin_get_template( $basename, $path, $args );
350
+
351
+ do_action( 'yit_panel_sidebar_after_widget', $widget_id, $widget );
352
+ }
353
+ }
354
+
355
+ /**
356
+ * set transient for first activation
357
+ * to prevent too many calls to YIThemes
358
+ */
359
+ public static function set_transient_for_first_activation() {
360
+ $remote_widgets = get_transient( self::$transient_remote_widgets );
361
+ $updated = get_transient( self::$transient_updated_remote_widgets );
362
+
363
+ $first_activation = $updated === false && $remote_widgets === false;
364
+ if ( $first_activation ) {
365
+ $seven_days_random = mt_rand( 0, 7 * DAY_IN_SECONDS );
366
+ $expiration = 1 * DAY_IN_SECONDS + $seven_days_random;
367
+
368
+ set_transient( self::$transient_remote_widgets, array(), $expiration );
369
+ set_transient( self::$transient_updated_remote_widgets, true, $expiration );
370
+ }
371
+ }
372
+
373
+ /**
374
+ * Sort widgets by priority
375
+ *
376
+ * @param $a
377
+ * @param $b
378
+ *
379
+ * @return bool
380
+ *
381
+ * @since 1.0
382
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
383
+ */
384
+ public function sort_widgets( $a, $b ) {
385
+ $priority_a = isset( $a[ 'priority' ] ) ? intval( $a[ 'priority' ] ) : $this->default_remote_widget_priority;
386
+ $priority_b = isset( $b[ 'priority' ] ) ? intval( $b[ 'priority' ] ) : $this->default_remote_widget_priority;
387
+ if ( $priority_a == $priority_b ) {
388
+ return 0;
389
+ } elseif ( $priority_a > $priority_b ) {
390
+ return 1;
391
+ } else {
392
+ return -1;
393
+ }
394
+ }
395
+
396
+ /**
397
+ * Add Admin WC Style and Scripts
398
+ *
399
+ * @return void
400
+ *
401
+ * @since 1.0
402
+ * @author Leanza Francesco <leanzafrancesco@gmail.com
403
+ */
404
+ public function admin_enqueue_scripts() {
405
+ $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
406
+
407
+ wp_enqueue_style( 'opensans-font', '//fonts.googleapis.com/css?family=Open+Sans:400,500,600,700,800,100,200,300,900' );
408
+ wp_enqueue_style( 'yit-plugin-sidebar-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel-sidebar.css', $this->version );
409
+ wp_enqueue_script( 'yit-plugin-sidebar-js', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel-sidebar' . $min . '.js', array( 'jquery' ), $this->version, true );
410
+ wp_localize_script( 'yit-plugin-sidebar-js', 'sidebar_labels', array(
411
+ 'hide_sidebar' => __( 'Hide sidebar', 'yith-plugin-fw' ),
412
+ 'show_sidebar' => __( 'Show sidebar', 'yith-plugin-fw' ),
413
+ 'wrapper_class' => 'yit-admin-panel-content-wrap',
414
+ ) );
415
+ }
416
+ }
417
+ }
plugin-fw/lib/yit-plugin-panel-wc.php CHANGED
@@ -71,8 +71,14 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
71
  if( isset( $this->settings['create_menu_page'] ) && $this->settings[ 'create_menu_page'] ){
72
  $this->add_menu_page();
73
  }
 
 
 
 
 
74
  add_action( 'admin_init', array( $this, 'set_default_options') );
75
  add_action( 'admin_menu', array( $this, 'add_setting_page' ) );
 
76
  add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
77
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
78
  add_action( 'admin_init', array( $this, 'woocommerce_update_options' ) );
@@ -86,6 +92,9 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
86
  /* WooCommerce 2.4 Support */
87
  add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) );
88
  }
 
 
 
89
  }
90
 
91
 
@@ -234,14 +243,16 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
234
  * @since 1.0
235
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
236
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
 
237
  */
238
  public function print_panel_content() {
239
  $yit_options = $this->get_main_array_options();
240
  $current_tab = $this->get_current_tab();
241
  $custom_tab_action = $this->is_custom_tab( $yit_options, $current_tab );
 
242
 
243
  if ( $custom_tab_action ) {
244
- $this->print_custom_tab( $custom_tab_action );
245
  return;
246
  }
247
  else {
@@ -291,7 +302,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
291
  );
292
  }
293
  }
294
-
295
  woocommerce_update_options( $yit_options[ $current_tab ] );
296
 
297
  do_action( 'yit_panel_wc_after_update' );
@@ -318,7 +329,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
318
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
319
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
320
  */
321
- public function admin_enqueue_scripts() {
322
  global $woocommerce, $pagenow;
323
 
324
  wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
@@ -326,6 +337,8 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
326
  wp_enqueue_media();
327
  wp_enqueue_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css', array(), $woocommerce->version );
328
  wp_register_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $woocommerce->version );
 
 
329
 
330
  if ( 'customize.php' != $pagenow ){
331
 
@@ -336,14 +349,20 @@ if ( ! class_exists( 'YIT_Plugin_Panel_WooCommerce' ) ) {
336
  wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
337
  wp_enqueue_script( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/js/chosen/chosen.jquery.js', array( 'jquery' ), '1.1.0', true );
338
  wp_enqueue_script( 'woocommerce_settings', $woocommerce->plugin_url() . '/assets/js/admin/settings.min.js', array( 'jquery', 'jquery-ui-datepicker','jquery-ui-dialog', 'jquery-ui-sortable', 'iris', 'chosen' ), $woocommerce->version, true );
 
339
  wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel.min.js', array( 'jquery', 'jquery-chosen' ), $this->version, true );
340
  wp_localize_script( 'woocommerce_settings', 'woocommerce_settings_params', array(
341
  'i18n_nav_warning' => __( 'The changes you have made will be lost if you leave this page.', 'yith-plugin-fw' )
342
  ) );
343
 
344
- if( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yit-plugins_page' ) !== false ){
345
- wp_enqueue_style( 'yit-plugin-style' );
346
- wp_enqueue_script( 'yit-plugin-panel' );
 
 
 
 
 
347
  }
348
  }
349
 
71
  if( isset( $this->settings['create_menu_page'] ) && $this->settings[ 'create_menu_page'] ){
72
  $this->add_menu_page();
73
  }
74
+
75
+ if ( !empty( $this->settings[ 'links' ] ) ) {
76
+ $this->links = $this->settings[ 'links' ];
77
+ }
78
+
79
  add_action( 'admin_init', array( $this, 'set_default_options') );
80
  add_action( 'admin_menu', array( $this, 'add_setting_page' ) );
81
+ add_action( 'admin_menu', array( $this, 'add_premium_version_upgrade_to_menu' ), 100 );
82
  add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
83
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
84
  add_action( 'admin_init', array( $this, 'woocommerce_update_options' ) );
92
  /* WooCommerce 2.4 Support */
93
  add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) );
94
  }
95
+
96
+ /* add YIT Plugin sidebar */
97
+ $this->sidebar = YIT_Plugin_Panel_Sidebar::instance( $this );
98
  }
99
 
100
 
243
  * @since 1.0
244
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
245
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
246
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
247
  */
248
  public function print_panel_content() {
249
  $yit_options = $this->get_main_array_options();
250
  $current_tab = $this->get_current_tab();
251
  $custom_tab_action = $this->is_custom_tab( $yit_options, $current_tab );
252
+ $hide_sidebar = $this->hide_sidebar( $yit_options, $current_tab );
253
 
254
  if ( $custom_tab_action ) {
255
+ $this->print_custom_tab( $custom_tab_action, $hide_sidebar );
256
  return;
257
  }
258
  else {
302
  );
303
  }
304
  }
305
+
306
  woocommerce_update_options( $yit_options[ $current_tab ] );
307
 
308
  do_action( 'yit_panel_wc_after_update' );
329
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
330
  * @author Antonio La Rocca <antonio.larocca@yithemes.com>
331
  */
332
+ public function admin_enqueue_scripts() {
333
  global $woocommerce, $pagenow;
334
 
335
  wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
337
  wp_enqueue_media();
338
  wp_enqueue_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css', array(), $woocommerce->version );
339
  wp_register_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $woocommerce->version );
340
+ wp_register_style( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/css/colorbox.css', array(), $woocommerce->version );
341
+ wp_register_style( 'yit-upgrade-to-pro', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrade-to-pro.css', array( 'colorbox' ), $woocommerce->version );
342
 
343
  if ( 'customize.php' != $pagenow ){
344
 
349
  wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
350
  wp_enqueue_script( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/js/chosen/chosen.jquery.js', array( 'jquery' ), '1.1.0', true );
351
  wp_enqueue_script( 'woocommerce_settings', $woocommerce->plugin_url() . '/assets/js/admin/settings.min.js', array( 'jquery', 'jquery-ui-datepicker','jquery-ui-dialog', 'jquery-ui-sortable', 'iris', 'chosen' ), $woocommerce->version, true );
352
+ wp_register_script( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/js/jquery.colorbox.js', array( 'jquery' ), '1.6.3', true );
353
  wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel.min.js', array( 'jquery', 'jquery-chosen' ), $this->version, true );
354
  wp_localize_script( 'woocommerce_settings', 'woocommerce_settings_params', array(
355
  'i18n_nav_warning' => __( 'The changes you have made will be lost if you leave this page.', 'yith-plugin-fw' )
356
  ) );
357
 
358
+ if( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith-plugins_page' ) !== false ){
359
+ wp_enqueue_style( 'yit-plugin-style' );
360
+ wp_enqueue_script( 'yit-plugin-panel' );
361
+ }
362
+
363
+ if( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith_upgrade_premium_version' ) !== false ){
364
+ wp_enqueue_style( 'yit-upgrade-to-pro' );
365
+ wp_enqueue_script( 'colorbox' );
366
  }
367
  }
368
 
plugin-fw/lib/yit-plugin-panel.php CHANGED
@@ -46,6 +46,16 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
46
  */
47
  private $_main_array_options = array();
48
 
 
 
 
 
 
 
 
 
 
 
49
  /**
50
  * Constructor
51
  *
@@ -74,15 +84,20 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
74
  $this->add_menu_page();
75
  }
76
 
 
 
 
 
77
  add_action( 'admin_init', array( $this, 'register_settings' ) );
78
  add_action( 'admin_menu', array( $this, 'add_setting_page' ), 20 );
79
  add_action( 'admin_menu', array( $this, 'add_premium_version_upgrade_to_menu' ), 100 );
80
  add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
81
  add_action( 'admin_init', array( $this, 'add_fields' ) );
82
- add_filter( 'yit_show_upgrade_to_premium_version', '__return_false' );
83
-
84
  }
85
 
 
 
 
86
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
87
  }
88
 
@@ -111,7 +126,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
111
  * @since 1.0
112
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
113
  */
114
- public function remove_duplicate_submenu_page() {
115
  /* === Duplicate Items Hack === */
116
  remove_submenu_page( 'yit_plugin_panel', 'yit_plugin_panel' );
117
  }
@@ -139,20 +154,28 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
139
  wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel.js', array( 'jquery', 'jquery-chosen' ), $this->version, true );
140
  wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), $this->version, true );
141
  wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), $this->version, true );
 
142
 
143
  //styles
144
  $jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
145
  wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
146
  wp_enqueue_style( 'jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-custom/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all' );
147
- wp_register_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', $this->version );
148
  wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
149
  wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
150
  wp_enqueue_style( 'yit-jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
 
 
151
 
152
  if( ( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith-plugins_page' ) !== false ) || apply_filters( 'yit_plugin_panel_asset_loading', false ) ){
153
  wp_enqueue_style( 'yit-plugin-style' );
154
  wp_enqueue_script( 'yit-plugin-panel' );
155
  }
 
 
 
 
 
156
  }
157
 
158
  /**
@@ -298,14 +321,19 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
298
  </h2>
299
  <?php
300
  $custom_tab_action = $this->is_custom_tab( $yit_options, $current_tab );
 
301
  if ( $custom_tab_action ) {
302
- $this->print_custom_tab( $custom_tab_action );
303
  return;
304
  }
305
  ?>
306
  <?php $this->print_video_box(); ?>
307
- <div id="wrap" class="plugin-option">
 
 
 
308
  <?php $this->message(); ?>
 
309
  <h2><?php echo $this->get_tab_title() ?></h2>
310
  <?php if ( $this->is_show_form() ) : ?>
311
  <form method="post" action="options.php">
@@ -322,6 +350,14 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
322
  </form>
323
  <p>&nbsp;</p>
324
  <?php endif ?>
 
 
 
 
 
 
 
 
325
  </div>
326
  <?php
327
  }
@@ -335,20 +371,74 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
335
  return false;
336
  }
337
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  }
339
 
340
  /**
341
  * Fire the action to print the custom tab
342
  *
343
  *
344
- * @param $action Action to fire
 
345
  *
346
  * @return void
347
  * @since 1.0
348
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
 
349
  */
350
- public function print_custom_tab( $action ) {
351
- do_action( $action );
 
 
 
 
 
 
 
 
 
 
 
 
352
  }
353
 
354
  /**
@@ -825,7 +915,7 @@ if ( ! class_exists( 'YIT_Plugin_Panel' ) ) {
825
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
826
  */
827
  public function show_premium_version_upgrade() {
828
- yit_plugin_get_template ( YIT_CORE_PLUGIN_PATH, 'upgrade/upgrade-to-pro-version.php' ) ;
829
- }
830
  }
831
  }
46
  */
47
  private $_main_array_options = array();
48
 
49
+ /**
50
+ * @var YIT_Plugin_Panel_Sidebar
51
+ */
52
+ public $sidebar;
53
+
54
+ /**
55
+ * @var array
56
+ */
57
+ public $links;
58
+
59
  /**
60
  * Constructor
61
  *
84
  $this->add_menu_page();
85
  }
86
 
87
+ if ( !empty( $this->settings[ 'links' ] ) ) {
88
+ $this->links = $this->settings[ 'links' ];
89
+ }
90
+
91
  add_action( 'admin_init', array( $this, 'register_settings' ) );
92
  add_action( 'admin_menu', array( $this, 'add_setting_page' ), 20 );
93
  add_action( 'admin_menu', array( $this, 'add_premium_version_upgrade_to_menu' ), 100 );
94
  add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), 100 );
95
  add_action( 'admin_init', array( $this, 'add_fields' ) );
 
 
96
  }
97
 
98
+ /* add YIT Plugin sidebar */
99
+ $this->sidebar = YIT_Plugin_Panel_Sidebar::instance( $this );
100
+
101
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
102
  }
103
 
126
  * @since 1.0
127
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
128
  */
129
+ public function remove_duplicate_submenu_page() {
130
  /* === Duplicate Items Hack === */
131
  remove_submenu_page( 'yit_plugin_panel', 'yit_plugin_panel' );
132
  }
154
  wp_register_script( 'yit-plugin-panel', YIT_CORE_PLUGIN_URL . '/assets/js/yit-plugin-panel.js', array( 'jquery', 'jquery-chosen' ), $this->version, true );
155
  wp_register_script( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/codemirror.js', array( 'jquery' ), $this->version, true );
156
  wp_register_script( 'codemirror-javascript', YIT_CORE_PLUGIN_URL . '/assets/js/codemirror/javascript.js', array( 'jquery', 'codemirror' ), $this->version, true );
157
+ wp_register_script( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/js/jquery.colorbox.js', array( 'jquery' ), '1.6.3', true );
158
 
159
  //styles
160
  $jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
161
  wp_register_style( 'codemirror', YIT_CORE_PLUGIN_URL . '/assets/css/codemirror/codemirror.css' );
162
  wp_enqueue_style( 'jquery-ui-overcast', YIT_CORE_PLUGIN_URL . '/assets/css/overcast/jquery-ui-custom/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all' );
163
+ wp_register_style( 'yit-plugin-style', YIT_CORE_PLUGIN_URL . '/assets/css/yit-plugin-panel.css', array(), $this->version );
164
  wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,800,100,200,300,900' );
165
  wp_enqueue_style( 'jquery-chosen', YIT_CORE_PLUGIN_URL . '/assets/css/chosen/chosen.css' );
166
  wp_enqueue_style( 'yit-jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
167
+ wp_register_style( 'colorbox', YIT_CORE_PLUGIN_URL . '/assets/css/colorbox.css', array(), $this->version );
168
+ wp_register_style( 'yit-upgrade-to-pro', YIT_CORE_PLUGIN_URL . '/assets/css/yit-upgrade-to-pro.css', array( 'colorbox' ), $this->version );
169
 
170
  if( ( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith-plugins_page' ) !== false ) || apply_filters( 'yit_plugin_panel_asset_loading', false ) ){
171
  wp_enqueue_style( 'yit-plugin-style' );
172
  wp_enqueue_script( 'yit-plugin-panel' );
173
  }
174
+
175
+ if( 'admin.php' == $pagenow && strpos( get_current_screen()->id, 'yith_upgrade_premium_version' ) !== false ){
176
+ wp_enqueue_style( 'yit-upgrade-to-pro' );
177
+ wp_enqueue_script( 'colorbox' );
178
+ }
179
  }
180
 
181
  /**
321
  </h2>
322
  <?php
323
  $custom_tab_action = $this->is_custom_tab( $yit_options, $current_tab );
324
+ $hide_sidebar = $this->hide_sidebar();
325
  if ( $custom_tab_action ) {
326
+ $this->print_custom_tab( $custom_tab_action, $hide_sidebar );
327
  return;
328
  }
329
  ?>
330
  <?php $this->print_video_box(); ?>
331
+ <?php
332
+ $panel_content_class = !$hide_sidebar ? apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' ) : 'yit-admin-panel-content-wrap-no-sidebar';
333
+ ?>
334
+ <div id="wrap" class="plugin-option yit-admin-panel-container">
335
  <?php $this->message(); ?>
336
+ <div class="<?php echo $panel_content_class; ?>">
337
  <h2><?php echo $this->get_tab_title() ?></h2>
338
  <?php if ( $this->is_show_form() ) : ?>
339
  <form method="post" action="options.php">
350
  </form>
351
  <p>&nbsp;</p>
352
  <?php endif ?>
353
+ </div>
354
+ <?php
355
+ /**
356
+ * Add panel Sidebar
357
+ */
358
+ if ( !$hide_sidebar )
359
+ $this->print_panel_sidebar();
360
+ ?>
361
  </div>
362
  <?php
363
  }
371
  return false;
372
  }
373
  }
374
+ return false;
375
+ }
376
+
377
+ /**
378
+ * Print the panel sidebar
379
+ *
380
+ * @return void
381
+ * @since 1.0
382
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
383
+ */
384
+ public function print_panel_sidebar() {
385
+ $this->sidebar->print_panel_sidebar();
386
+ }
387
+
388
+ /**
389
+ * @param $options
390
+ * @param $current_tab
391
+ *
392
+ * @return bool
393
+ *
394
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
395
+ */
396
+ public function hide_sidebar( $options = '', $current_tab = '' ) {
397
+ if ( $options === '' )
398
+ $options = $this->get_main_array_options();
399
+ if ( $current_tab === '' )
400
+ $current_tab = $this->get_current_tab();
401
+
402
+ $hide = false;
403
+
404
+ foreach ( $options[ $current_tab ] as $section => $option ) {
405
+ if ( isset( $option[ 'hide_sidebar' ] ) ) {
406
+ $hide = !!$option[ 'hide_sidebar' ];
407
+ }
408
+ break;
409
+ }
410
+
411
+ $page = isset( $this->settings[ 'page' ] ) ? $this->settings[ 'page' ] : '';
412
+
413
+ return apply_filters( 'yit_panel_hide_sidebar', $hide, $page );
414
  }
415
 
416
  /**
417
  * Fire the action to print the custom tab
418
  *
419
  *
420
+ * @param string $action Action to fire
421
+ * @param bool $hide_sidebar
422
  *
423
  * @return void
424
  * @since 1.0
425
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
426
+ * @author Leanza Francesco <leanzafrancesco@gmail.com>
427
  */
428
+ public function print_custom_tab( $action, $hide_sidebar = false ) {
429
+ if ( !$hide_sidebar ) {
430
+ $panel_content_class = apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' ) ;
431
+ echo "<div class='yit-admin-panel-container'>";
432
+ echo "<div class='$panel_content_class'>";
433
+
434
+ do_action( $action );
435
+
436
+ echo "</div>";
437
+ $this->print_panel_sidebar();
438
+ echo "</div>";
439
+ } else {
440
+ do_action( $action );
441
+ }
442
  }
443
 
444
  /**
915
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
916
  */
917
  public function show_premium_version_upgrade() {
918
+ yit_plugin_get_template ( YIT_CORE_PLUGIN_PATH, 'upgrade/upgrade-to-pro-version.php', array( 'core_plugin_url' => YIT_CORE_PLUGIN_URL ) ) ;
919
+ }
920
  }
921
  }
plugin-fw/lib/yit-upgrade.php CHANGED
@@ -196,7 +196,7 @@ if ( ! class_exists( 'YIT_Upgrade' ) ) {
196
  parse_str( rawurldecode( htmlspecialchars_decode( $action_url['query'] ) ) );
197
  $plugins = explode( ',', $plugins );
198
  foreach( $plugins as $plugin_init ){
199
- $to_upgrade = get_plugin_data( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $plugin_init );
200
  if( $to_upgrade['Name'] == $upgrader->skin->plugin_info['Name'] ){
201
  $plugin = $plugin_init;
202
  }
@@ -541,7 +541,7 @@ if ( ! function_exists( 'YIT_Upgrade' ) ) {
541
  /**
542
  * Main instance of plugin
543
  *
544
- * @return object
545
  * @since 1.0
546
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
547
  */
196
  parse_str( rawurldecode( htmlspecialchars_decode( $action_url['query'] ) ) );
197
  $plugins = explode( ',', $plugins );
198
  foreach( $plugins as $plugin_init ){
199
+ $to_upgrade = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_init );
200
  if( $to_upgrade['Name'] == $upgrader->skin->plugin_info['Name'] ){
201
  $plugin = $plugin_init;
202
  }
541
  /**
542
  * Main instance of plugin
543
  *
544
+ * @return YIT_Upgrade
545
  * @since 1.0
546
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
547
  */
plugin-fw/templates/panel/sidebar/sidebar.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $sidebar_action_hide_class = $this->is_collapsed() ? '' : 'hide-on-click';
3
+ $sidebar_action_hide_title = $this->is_collapsed() ? __( 'Show sidebar', 'yith-plugin-fw' ) : __( 'Hide sidebar', 'yith-plugin-fw' );
4
+ $sidebar_class = $this->is_collapsed() ? 'yith-panel-sidebar-hidden' : '';
5
+ ?>
6
+
7
+
8
+ <div id="yit-panel-sidebar" class="<?php echo $sidebar_class; ?>">
9
+ <div id="yit-panel-sidebar-actions">
10
+ <div id="yit-panel-sidebar-action-hide" class="<?php echo $sidebar_action_hide_class; ?>">
11
+ <span class="yit-panel-sidebar-action-title"><?php echo $sidebar_action_hide_title; ?></span>
12
+ <span class="yit-panel-sidebar-action-hide-icon dashicons dashicons-arrow-left"></span>
13
+ </div>
14
+ </div>
15
+ <div id="yit-panel-sidebar-widgets-container">
16
+ <?php
17
+ $this->print_panel_sidebar_widgets();
18
+ ?>
19
+ </div>
20
+ </div>
plugin-fw/templates/panel/sidebar/widget.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var string $id
4
+ * @var string $title
5
+ * @var string $content
6
+ * @var string $class
7
+ * @var string $title_class
8
+ * @var string $template
9
+ * @var string $badge
10
+ * @var string $badge_text
11
+ * @var string $image
12
+ * @var array $args
13
+ * @var string $icon
14
+ *
15
+ */
16
+
17
+ if ( !empty( $template ) ) {
18
+ ob_start();
19
+ $basename = YIT_CORE_PLUGIN_PATH;
20
+ $path = '/panel/sidebar/widgets/widget-' . $template . '.php';
21
+ yit_plugin_get_template( $basename, $path, $args );
22
+ $content = ob_get_clean();
23
+ }
24
+
25
+ if ( !empty( $icon ) ) {
26
+ $title_class .= ' yit-panel-sidebar-widget-icon ' . $icon . '-icon';
27
+ }
28
+
29
+ ?>
30
+
31
+ <div id="yit-panel-sidebar-<?php echo $id ?>-widget" class="yit-panel-sidebar-widget-wrapper <?php echo $class; ?>">
32
+ <div class="yit-panel-sidebar-widget-container">
33
+ <?php if ( !empty( $title ) ): ?>
34
+ <div class="yit-panel-sidebar-widget-title <?php echo $title_class; ?>">
35
+ <?php echo $title; ?>
36
+ </div>
37
+ <?php endif; ?>
38
+ <div class="yit-panel-sidebar-widget-content"><?php echo $content; ?></div>
39
+ <?php
40
+ if ( !empty( $image ) ) {
41
+ $path = YIT_CORE_PLUGIN_URL . '/assets/images/widgets/' . $image;
42
+ echo "<img class='yit-panel-sidebar-widget-image $image_class' src='{$path}' alt='' width='100%'/>";
43
+ }
44
+ ?>
45
+ </div>
46
+ <?php
47
+ if ( !empty( $badge ) ) {
48
+ $basename = YIT_CORE_PLUGIN_PATH;
49
+ $path = '/panel/sidebar/widgets/badges/badge.php';
50
+ yit_plugin_get_template( $basename, $path, array( 'text' => $badge_text, 'type' => $badge ) );
51
+ }
52
+ ?>
53
+ </div>
plugin-fw/templates/panel/sidebar/widgets/badges/badge.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var string $type
4
+ */
5
+ ?>
6
+
7
+ <div class="yit-panel-sidebar-widget-badge <?php echo $type; ?>">
8
+ <div class="yit-panel-sidebar-widget-badge-s1"></div>
9
+ <div class="yit-panel-sidebar-widget-badge-s2"></div>
10
+ <div class="yit-panel-sidebar-widget-badge-text"><?php echo $text ?></div>
11
+ </div>
plugin-fw/templates/panel/sidebar/widgets/widget-despacho.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ *
5
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.txt
9
+ */
10
+
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ } // Exit if accessed directly
14
+ ?>
15
+ <p>We are happy to present Despacho, our new cutting edge WordPress theme for e-commerce sites.
16
+ Conceived to include all the best and hi-quality features for shops,
17
+ this powerful theme offers a wide range of options to
18
+ <strong>easily customize and shape the appearande of your site. <a href="//despacho.yithemes.com" target="_blank">Discover More ></a></strong>
19
+ </p>
plugin-fw/templates/panel/sidebar/widgets/widget-links.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ *
5
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.txt
9
+ */
10
+
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ } // Exit if accessed directly
14
+
15
+ /**
16
+ * @var array $links
17
+ */
18
+ $links = !empty( $links ) ? $links : array();
19
+
20
+ $link_default_args = array(
21
+ 'url' => '',
22
+ 'title' => '',
23
+ 'target' => '_blank'
24
+ );
25
+ ?>
26
+
27
+ <ul class="yit-panel-sidebar-links-list">
28
+ <?php foreach ( $links as $link ) {
29
+ $link = wp_parse_args( $link, $link_default_args );
30
+ $link = (object)$link;
31
+ echo "<li><a href='$link->url' target='$link->target'>$link->title</a></li>";
32
+ }
33
+ ?>
34
+ </ul>
plugin-fw/templates/panel/sidebar/widgets/widget-membership.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ *
5
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.txt
9
+ */
10
+
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ } // Exit if accessed directly
14
+ ?>
15
+
16
+ <div class="membership-wrapper">
17
+ <div class="membership-total-price">$10.000+</div>
18
+ <div class="membership-offer-text">of themes and plugins for WooCommerce</div>
19
+ <div class="membership-offer-text2">with a</div>
20
+ <div class="membership-offer-sale-text">95% OFF</div>
21
+ <div class="membership-buttons">
22
+ <a class="button green" href="//yithemes.com/themes/membership/annual-yithemes-club-subscription/" target="_blank">Discover More!</a>
23
+ </div>
24
+ </div>
plugin-fw/templates/panel/sidebar/widgets/widgets.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file belongs to the YIT Plugin Framework.
4
+ *
5
+ * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://www.gnu.org/licenses/gpl-3.0.txt
9
+ */
10
+
11
+ /**
12
+ * @var YIT_Plugin_Panel_Sidebar $this
13
+ */
14
+
15
+ $widgets = array(
16
+ 'membership' => array(
17
+ 'title' => __( 'Join the club', 'yit' ),
18
+ 'title_class' => 'orange',
19
+ 'icon' => 'box-white',
20
+ 'template' => 'membership',
21
+ 'priority' => 10,
22
+ ),
23
+ 'despacho' => array(
24
+ 'title' => __( 'Despacho Theme - 100% FREE', 'yit' ),
25
+ 'icon' => 'info',
26
+ 'template' => 'despacho',
27
+ 'badge' => 'gift-tape',
28
+ 'badge_text' => __( 'FREE!', 'yit' ),
29
+ 'image' => 'despacho.png',
30
+ 'image_class' => 'yit-panel-sidebar-widget-despacho-image',
31
+ 'priority' => 20,
32
+ ),
33
+ 'links' => array(
34
+ 'title' => __( 'Important Links', 'yit' ),
35
+ 'icon' => 'link',
36
+ 'template' => 'links',
37
+ 'args' => array( 'links' => $this->panel->links ),
38
+ 'hide_if_empty_args' => array( 'links' ),
39
+ 'priority' => 30,
40
+ ),
41
+ );
42
+ return apply_filters( 'yit_panel_widgets_array', $widgets );
plugin-fw/templates/panel/woocommerce/woocommerce-form.php CHANGED
@@ -1,13 +1,28 @@
1
- <div id="<?php echo $this->settings['page']?>_<?php echo $this->get_current_tab()?>">
2
- <form id="plugin-fw-wc" method="post">
3
- <?php $this->add_fields() ?>
4
- <?php wp_nonce_field( 'yit_panel_wc_options_'.$this->settings['page'], 'yit_panel_wc_options_nonce' ); ?>
5
- <input style="float: left; margin-right: 10px;" class="button-primary" type="submit" value="<?php _e( 'Save Changes', 'yith-plugin-fw' )?>"/>
6
- </form>
7
- <form id="plugin-fw-wc-reset" method="post">
8
- <?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
9
- <input type="hidden" name="yit-action" value="wc-options-reset" />
10
- <?php wp_nonce_field( 'yith_wc_reset_options_'.$this->settings['page'], 'yith_wc_reset_options_nonce' ); ?>
11
- <input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset Defaults', 'yith-plugin-fw' ) ?>" onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');" />
12
- </form>
13
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $hide_sidebar = $this->hide_sidebar();
3
+ $panel_content_class = !$hide_sidebar ? apply_filters( 'yit_admin_panel_content_class', 'yit-admin-panel-content-wrap' ) : 'yit-admin-panel-content-wrap-no-sidebar';
4
+ ?>
5
+
6
+ <div id="<?php echo $this->settings[ 'page' ] ?>_<?php echo $this->get_current_tab() ?>" class="yit-admin-panel-container">
7
+ <div class="<?php echo $panel_content_class; ?>">
8
+ <form id="plugin-fw-wc" method="post">
9
+ <?php $this->add_fields() ?>
10
+ <?php wp_nonce_field( 'yit_panel_wc_options_' . $this->settings[ 'page' ], 'yit_panel_wc_options_nonce' ); ?>
11
+ <input style="float: left; margin-right: 10px;" class="button-primary" type="submit" value="<?php _e( 'Save Changes', 'yith-plugin-fw' ) ?>"/>
12
+ </form>
13
+ <form id="plugin-fw-wc-reset" method="post">
14
+ <?php $warning = __( 'If you continue with this action, you will reset all options in this page.', 'yith-plugin-fw' ) ?>
15
+ <input type="hidden" name="yit-action" value="wc-options-reset"/>
16
+ <?php wp_nonce_field( 'yith_wc_reset_options_' . $this->settings[ 'page' ], 'yith_wc_reset_options_nonce' ); ?>
17
+ <input type="submit" name="yit-reset" class="button-secondary" value="<?php _e( 'Reset Defaults', 'yith-plugin-fw' ) ?>"
18
+ onclick="return confirm('<?php echo $warning . '\n' . __( 'Are you sure?', 'yith-plugin-fw' ) ?>');"/>
19
+ </form>
20
+ </div>
21
+ <?php
22
+ /**
23
+ * Add panel Sidebar
24
+ */
25
+ if ( !$hide_sidebar )
26
+ $this->print_panel_sidebar();
27
+ ?>
28
+ </div>
plugin-fw/templates/upgrade/upgrade-to-pro-version.php CHANGED
@@ -1,42 +1,75 @@
1
- <style>
2
- #upgrade-to-premium h1{text-transform: uppercase; }
3
- </style>
4
  <div id="upgrade-to-premium">
5
  <h1><?php _e( 'Upgrade to Premium Version', 'yith-plugin-fw' ) ?></h1>
6
- <h3><?php _e( "Hai comprato la versione premium di un plugin ? Dopo l'acquisto non trovi dove attivare la licenza del tuo plugin premium ?", 'yith-plugin-fw' ) ?></h3>
7
  <p class="upgrade-how-to">
8
- <?php _e( "Per passare da un plugin FREE ad uno PREMIUM non basta semplicemnete inserire la chiave di licenza che ti è stata fornita dopo aver completato l'acquisto.
9
- Questo perchè fisicamente si tratta di due prodotti diversi, con differenze sostanziali sia nelle opzioni disponibili sia sul numero di file presenti all'interno del pacchetto del plugin stesso.
10
- Per iniziare ad usare il plugin PREMIUM che hai appena acquistato devi semplicemente scaricare il pacchetto PREMIUM ed installarlo sul tuo sito.", 'yith-plugin-fw' ); ?>
11
  </p>
12
- <p><?php _e( 'Non sai come fare ? Non è un problema, segui i passi elencati qui sotto ed in pochi minuti avrai il plugin acquistato correttamente installato sul tuo sito.', 'yith-plugin-fw' ) ?></p>
13
- <ul class="upgrade-steps">
14
  <li class="step">
15
- 1. <?php _e( 'Vai su yithemes.com ed effettua il login alla sezione My Account ', 'yith-plugin-fw' ); ?>
 
 
 
16
  </li>
17
  <li class="step">
18
- 2. <?php _e( 'Dal menù di sinistra clicca su "My Downloads" e cerca tra i download disponibili il plugin che vuoi installare, e clicca su "Download"', 'yith-plugin-fw' ); ?>
 
 
 
19
  </li>
20
  <li class="step">
21
- 3. <?php _e( "Non appena il download del pacchetto sarà completato recati sul tuo sito web ed effettua il login all'area amministrazione di WordPress.", 'yith-plugin-fw' ); ?>
 
 
 
22
  </li>
23
  <li class="step">
24
- 4. <?php _e( 'Dal menù di sinistra clicca sulla voce Plugins. Verrai indirizzato su una pagina con la lista dei plugin disponibili sul tuo sito. Clicca sul pulsante "Add New" che trovi in alto a sinistra vicino al titolo della pagina.', 'yith-plugin-fw' ); ?>
 
 
 
25
  </li>
26
  <li class="step">
27
- 5. <?php _e( 'Verrai indirizzato su una nuova pagina dove trovi, in alto a sinistra vicino al titolo della pagina, il pulsante "Upload Plugin".', 'yith-plugin-fw' ); ?>
 
 
 
28
  </li>
29
  <li class="step">
30
- 6. <?php _e( 'Cliccando su "Upload Plugins", ti troverai in una pagina dove poter effettuare l\'upload del pacchetto del plugin PREMIUM da te precedentemente scaricato. Clicca quindi su "Scegli File", cerca la cartella di download dove hai scaricato il plugin ed effettua il caricamneto del pacchetto. A questo punto ti basta attendere qualche minuto che il pacchetto venga caricato ed installato sul tuo sito.', 'yith-plugin-fw' ); ?>
 
 
 
31
  </li>
32
  <li class="step">
33
- 7. <?php _e( 'Al termine della procedura di installazione clicca su "Attiva"', 'yith-plugin-fw' ); ?>
 
 
 
 
34
  </li>
35
  <li class="step">
36
- 8. <?php _e( 'Se tutto è andato per il meglio il tuo plugin è correttamente installato sul tuo sito web. Enjoy it :-)', 'yith-plugin-fw' ); ?>
 
 
 
37
  </li>
38
  <li class="step">
39
- 9. <?php _e( 'Ultimo step è attivare il plugin con la chiave di licenza che hai ricevuto dopo l\'acquisto. Clicca quindi sul link "License Activation" che trovi sotto "YITH Plugins" ed inserisci la license key in tuo possesso ed email utilizzata in fase di acquisto. Se non trovi l\'email che ti abbiamo inviato contenete la license key puoi facilmente recuperarla dalla sezione "My Licenses" all\'interno della sezione My Account del nostro sito yithemes.com.', 'yith-plugin-fw' ); ?>
 
 
 
40
  </li>
41
- </ul>
42
- </div>
 
 
 
 
 
 
 
 
 
 
 
1
  <div id="upgrade-to-premium">
2
  <h1><?php _e( 'Upgrade to Premium Version', 'yith-plugin-fw' ) ?></h1>
3
+ <h3><?php _e( "Have you purchased the premium version of a plugin? Don't you know how to activate the license after the purchase?", 'yith-plugin-fw' ) ?></h3>
4
  <p class="upgrade-how-to">
5
+ <?php echo _e( "To upgrade from a FREE to a PREMIUM plugin is not suffice to insert the license key provided after the purchase.
6
+ The reason is that they are two distinct products, with significant differences both for available options and for number of files included in the plugin package.
7
+ To start to use the PREMIUM version of the plugin, you simply need to download the PREMIUM packet and install it on your site.", 'yith-plugin-fw' ); ?>
8
  </p>
9
+ <p class="highlighted"><?php echo sprintf( __( '%1$sDo you need to know how to do it?%2$s Easy! %1$sFollow this list of steps%2$s and in a few minutes the plugin you purchased will be installed on your site', 'yith-plugin-fw' ),'<b>','</b>' ); ?></p>
10
+ <ol class="upgrade-steps">
11
  <li class="step">
12
+ <?php _e( 'Go to yithemes.com and login to "My Account" page', 'yith-plugin-fw' ); ?>
13
+ <a class="image-lightbox" href="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/01.jpg" title="YIThemes - Login">
14
+ <img class="img-responsive" src="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/01.jpg" alt="YIThemes - Login">
15
+ </a>
16
  </li>
17
  <li class="step">
18
+ <?php _e( 'From the menu on the left, click on "My Downloads", look for the plugin you want to install among the available downloads and click on "Download" button' , 'yith-plugin-fw' ); ?>
19
+ <a class="image-lightbox" href="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/02.jpg" title="My Account -> My Downloads">
20
+ <img class="img-responsive" src="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/02.jpg" alt="My Account -> My Downloads">
21
+ </a>
22
  </li>
23
  <li class="step">
24
+ <?php _e( "After downloading the packet, go to your website and login to WordPress administration area.", 'yith-plugin-fw' ); ?>
25
+ <a class="image-lightbox" href="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/03.jpg" title="Login to WordPress">
26
+ <img class="img-responsive" src="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/03.jpg" alt="Login to WordPress">
27
+ </a>
28
  </li>
29
  <li class="step">
30
+ <?php _e( 'From the menu on the left, click on "Plugins". You will be redirected to the page where you will find the complete list of all the plugins available on your site. Click on "Add New" button that you find above on the left to add a new plugin', 'yith-plugin-fw' ); ?>
31
+ <a class="image-lightbox" href="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/04.jpg" title="Add new plugin">
32
+ <img class="img-responsive" src="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/04.jpg" alt="Add new plugin">
33
+ </a>
34
  </li>
35
  <li class="step">
36
+ <?php _e( 'You will be redirected to a new page where you will find, above on the left next to the page title, the "Upload Plugin" button.', 'yith-plugin-fw' ); ?>
37
+ <a class="image-lightbox" href="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/05.jpg" title="Upload plugin">
38
+ <img class="img-responsive" src="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/05.jpg" alt="Upload plugin">
39
+ </a>
40
  </li>
41
  <li class="step">
42
+ <?php _e( 'Click on "Upload Plugins" button to start the upload of the PREMIUM version of the plugin previously downloaded. Click on "Select File", search for the download folder related to the plugin and upload the package. Now you only need to wait a few minutes for the upload and the installation on your site. (We used YITH Live Chat plugin by way of example)', 'yith-plugin-fw' ); ?>
43
+ <a class="image-lightbox" href="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/06.jpg" title="Select plugin package">
44
+ <img class="img-responsive" src="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/06.jpg" alt="Select plugin package">
45
+ </a>
46
  </li>
47
  <li class="step">
48
+ <?php _e( 'After completing the installation, click on "Activate plugin"', 'yith-plugin-fw' ); ?>
49
+ <a class="image-lightbox" href="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/07.jpg" title="Activate plugin">
50
+ <img class="img-responsive" src="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/07.jpg" alt="Activate plugin">
51
+ </a>
52
+ <?php _e( 'If everything worked allright, your plugin is now correctly installed on your website. Enjoy it :-)', 'yith-plugin-fw' ); ?>
53
  </li>
54
  <li class="step">
55
+ <?php _e( 'The last step is the activation of the plugin through its license key you received after the purchase. Click on "License Activation" that you find in "YITH Plugins" and insert the license key and the email address you used during the purchase.', 'yith-plugin-fw' ); ?>
56
+ <a class="image-lightbox" href="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/08.jpg" title="Activate license">
57
+ <img class="img-responsive" src="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/08.jpg" alt="Activate license">
58
+ </a>
59
  </li>
60
  <li class="step">
61
+ <?php _e( 'In case you had difficulty to recover the license key we sent you by email, you can easily find it in "My Licenses" section of your account on yithemes.com', 'yith-plugin-fw' ); ?>
62
+ <a class="image-lightbox" href="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/09.jpg" title="Section My License">
63
+ <img class="img-responsive" src="<?php echo $core_plugin_url; ?>/assets/images/upgrade-page/09.jpg" alt="Section My License">
64
+ </a>
65
  </li>
66
+ </ol>
67
+ </div>
68
+
69
+ <script>
70
+ // Lightbox image
71
+ jQuery('document').ready(function($){
72
+ $(".image-lightbox").colorbox({rel:'image-lightbox'});
73
+ });
74
+
75
+ </script>
plugin-fw/yit-functions.php CHANGED
@@ -809,7 +809,7 @@ if ( ! function_exists ( 'yit_load_js_file' ) ) {
809
  */
810
  function yit_load_js_file ( $filename ) {
811
 
812
- if ( ! ( ( defined ( 'WP_DEBUG' ) && WP_DEBUG ) || ( defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ) ) {
813
  $filename = str_replace ( '.js', '.min.js', $filename );
814
  }
815
 
809
  */
810
  function yit_load_js_file ( $filename ) {
811
 
812
+ if ( ! ( ( defined ( 'WP_DEBUG' ) && WP_DEBUG ) || ( defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || isset( $_GET['yith_script_debug'] ) ) ) {
813
  $filename = str_replace ( '.js', '.min.js', $filename );
814
  }
815
 
plugin-fw/yit-plugin-registration-hook.php CHANGED
@@ -19,5 +19,11 @@ if( ! function_exists( 'yith_plugin_registration_hook' ) ){
19
  $option = get_option( 'yit_recently_activated', array() );
20
  $option[] = $hook;
21
  update_option( 'yit_recently_activated', $option );
 
 
 
 
 
 
22
  }
23
  }
19
  $option = get_option( 'yit_recently_activated', array() );
20
  $option[] = $hook;
21
  update_option( 'yit_recently_activated', $option );
22
+
23
+ /* set remote widget transient for first activation */
24
+ if ( !class_exists( 'YIT_Plugin_Panel_Sidebar' ) ) {
25
+ require_once 'lib/yit-plugin-panel-sidebar.php';
26
+ }
27
+ YIT_Plugin_Panel_Sidebar::set_transient_for_first_activation();
28
  }
29
  }
plugin-fw/yit-plugin.php CHANGED
@@ -23,6 +23,8 @@ include_once( 'yit-plugin-registration-hook.php' );
23
  include_once( 'lib/yit-metabox.php' );
24
  include_once( 'lib/yit-plugin-panel.php' );
25
  include_once( 'lib/yit-plugin-panel-wc.php' );
 
 
26
  include_once( 'lib/yit-plugin-subpanel.php' );
27
  include_once( 'lib/yit-plugin-common.php' );
28
  include_once( 'lib/yit-plugin-gradients.php');
23
  include_once( 'lib/yit-metabox.php' );
24
  include_once( 'lib/yit-plugin-panel.php' );
25
  include_once( 'lib/yit-plugin-panel-wc.php' );
26
+ include_once( 'lib/yit-ajax.php' );
27
+ include_once( 'lib/yit-plugin-panel-sidebar.php' );
28
  include_once( 'lib/yit-plugin-subpanel.php' );
29
  include_once( 'lib/yit-plugin-common.php' );
30
  include_once( 'lib/yit-plugin-gradients.php');
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: woocommerce catalog mode plugin, woocommerce catalog only, woocommerce, products, themes, yit, yith, yithemes, e-commerce, shop, catalog mode, catalogue mode, remove add to cart, ask for price, ask price, asking for price, asking price, button remove, call, call for price, call me, call us, contact, email, hide add to cart, hide price
5
  Requires at least: 4.0
6
  Tested up to: 4.4.2
7
- Stable tag: 1.3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -113,6 +113,10 @@ yith-woocommerce-catalog-mode-<WORDPRESS LOCALE >.mo
113
 
114
  == Changelog ==
115
 
 
 
 
 
116
  = Version 1.3.2 - Released: Mar 09, 2016 =
117
 
118
  * Updated: plugin core framework
@@ -217,7 +221,7 @@ yith-woocommerce-catalog-mode-<WORDPRESS LOCALE >.mo
217
 
218
  == Upgrade Notice ==
219
 
220
- Last Stable Tag 1.3.2
221
 
222
  == Suggestions ==
223
 
4
  Tags: woocommerce catalog mode plugin, woocommerce catalog only, woocommerce, products, themes, yit, yith, yithemes, e-commerce, shop, catalog mode, catalogue mode, remove add to cart, ask for price, ask price, asking for price, asking price, button remove, call, call for price, call me, call us, contact, email, hide add to cart, hide price
5
  Requires at least: 4.0
6
  Tested up to: 4.4.2
7
+ Stable tag: 1.3.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
113
 
114
  == Changelog ==
115
 
116
+ = Version 1.3.3 - Released: Apr 08, 2016 =
117
+
118
+ * Added: minified versions of CSS files
119
+
120
  = Version 1.3.2 - Released: Mar 09, 2016 =
121
 
122
  * Updated: plugin core framework
221
 
222
  == Upgrade Notice ==
223
 
224
+ Last Stable Tag 1.3.3
225
 
226
  == Suggestions ==
227