Version Description
- 12/18/2020
- Enable the "Custom CSS" field for the Avia page builder elements
- Declare incompatibility with the Product Gallery Slider for WooCommerce plugin
- Test with PHP 8.0, WordPress 5.6, WooCommerce 4.8, jQuery 3.5.1
Download this release
Release Info
Developer | diana_burduja |
Plugin | WP Image Zoom |
Version | 1.45 |
Comparing to | |
See all releases |
Code changes from version 1.44 to 1.45
- assets/css/style.css +437 -0
- assets/css/style.min.css +1 -146
- assets/js/image_zoom-init.js +9 -9
- assets/js/image_zoom.settings.js +9 -9
- assets/js/jquery.image_zoom.min.js +1 -1
- image-zoooom.php +4 -4
- includes/admin-side.php +7 -1
- includes/class-iz-compatibilities.php +12 -0
- includes/frm/class-form-fields.php +1 -1
- includes/frm/premium-tooltips.php +1 -1
- readme.txt +9 -2
assets/css/style.css
ADDED
@@ -0,0 +1,437 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@font-face{
|
2 |
+
font-family:Raleway;
|
3 |
+
font-style:normal;
|
4 |
+
font-weight:400;
|
5 |
+
src:local('Raleway'),local('Raleway-Regular'),url(https://fonts.gstatic.com/s/raleway/v11/0dTEPzkLWceF7z0koJaX1A.woff2) format('woff2');
|
6 |
+
unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000
|
7 |
+
}
|
8 |
+
body{
|
9 |
+
font-family:"Open Sans",sans-serif;
|
10 |
+
background-color:#f1f1f1
|
11 |
+
}
|
12 |
+
.container_title,.steps,h2,label{
|
13 |
+
font-family:Raleway
|
14 |
+
}
|
15 |
+
.wrap{
|
16 |
+
float:left;
|
17 |
+
width:70%;
|
18 |
+
margin-right:3%
|
19 |
+
}
|
20 |
+
h2{
|
21 |
+
font-weight:400,
|
22 |
+
font-size:26px!important
|
23 |
+
}
|
24 |
+
h2 a{
|
25 |
+
color:#23282d
|
26 |
+
}
|
27 |
+
h2 a:hover,h3 a.nav-tab:hover{
|
28 |
+
text-decoration:none,
|
29 |
+
color:#0073aa
|
30 |
+
}
|
31 |
+
h2 img{
|
32 |
+
margin-bottom:4px
|
33 |
+
}
|
34 |
+
h3{
|
35 |
+
margin-top:0!important;
|
36 |
+
padding:16px 16px 16px 20px;
|
37 |
+
text-align:center;
|
38 |
+
color:#fff;
|
39 |
+
font-size:1.3em;
|
40 |
+
margin:1em 0
|
41 |
+
}
|
42 |
+
h3 .nav-tab{
|
43 |
+
font-size:14px;
|
44 |
+
line-height:22px;
|
45 |
+
padding:10px 15px;
|
46 |
+
border-radius:4px 4px 0 0;
|
47 |
+
font-weight:400
|
48 |
+
}
|
49 |
+
a.nav-tab:focus,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:active {
|
50 |
+
outline: none;
|
51 |
+
-webkit-box-shadow: none;
|
52 |
+
box-shadow: none;
|
53 |
+
text-decoration: none;
|
54 |
+
}
|
55 |
+
|
56 |
+
.btn-icon{
|
57 |
+
height:50px
|
58 |
+
}
|
59 |
+
.btn-group>.btn.active,.input-group .form-control{
|
60 |
+
z-index:auto
|
61 |
+
}
|
62 |
+
.btn-group-no-margin{
|
63 |
+
margin-left:-15px!important
|
64 |
+
}
|
65 |
+
input[type=checkbox]{
|
66 |
+
margin-top:0
|
67 |
+
}
|
68 |
+
input[type=color]{
|
69 |
+
padding:0;
|
70 |
+
width:50px
|
71 |
+
}
|
72 |
+
.control-label{
|
73 |
+
text-align:right;
|
74 |
+
padding:15px 10px 10px 0;
|
75 |
+
height:50px
|
76 |
+
}
|
77 |
+
.margin-10{
|
78 |
+
margin-top:10px
|
79 |
+
}
|
80 |
+
.icon-style-rect-1 .ndd-icon-main-element{
|
81 |
+
width:44px;
|
82 |
+
height:44px;
|
83 |
+
border-radius:8px;
|
84 |
+
background:rgba(0,0,0,.2)
|
85 |
+
}
|
86 |
+
.tab-pane{
|
87 |
+
width:90%;
|
88 |
+
padding-top:10px
|
89 |
+
}
|
90 |
+
.input-group{
|
91 |
+
width:200px
|
92 |
+
}
|
93 |
+
.tooltip-inner{
|
94 |
+
width:150px;
|
95 |
+
background-color:#000;
|
96 |
+
opacity:.8
|
97 |
+
}
|
98 |
+
.tooltip-arrow{
|
99 |
+
opacity:.8
|
100 |
+
}
|
101 |
+
.panel-default{
|
102 |
+
margin-top:8px
|
103 |
+
}
|
104 |
+
#right_column_metaboxes{
|
105 |
+
width:25%;
|
106 |
+
float:left;
|
107 |
+
margin-top:70px
|
108 |
+
}
|
109 |
+
.main_container{
|
110 |
+
background-color:#fff;
|
111 |
+
margin-bottom:20px;
|
112 |
+
border:1px solid #ddd;
|
113 |
+
border-radius:5px;
|
114 |
+
box-shadow:0 2px 1px -1px #ccc
|
115 |
+
}
|
116 |
+
.container_title{
|
117 |
+
border-radius:5px 5px 0 0;
|
118 |
+
background:#474747
|
119 |
+
}
|
120 |
+
#wpbody-content .metabox-holder{
|
121 |
+
font-family:Raleway;
|
122 |
+
padding:10px 15px 15px
|
123 |
+
}
|
124 |
+
#wpbody-content .metabox-holder.discount{
|
125 |
+
background:url(../images/discount.png) 102% 102% no-repeat;
|
126 |
+
background-size:50%
|
127 |
+
}
|
128 |
+
#wpbody-content .metabox-holder.rating{
|
129 |
+
background:url(../images/rating.png) 100% 80% no-repeat;
|
130 |
+
background-size:50%
|
131 |
+
}
|
132 |
+
#wpbody-content .metabox-holder.product-gallery-plugin{
|
133 |
+
background:url(../images/product-gallery-zoom.png) 142% 102% no-repeat;
|
134 |
+
background-size:70%;
|
135 |
+
}
|
136 |
+
.postbox{
|
137 |
+
min-width:0;
|
138 |
+
border-radius:5px;
|
139 |
+
position:relative;
|
140 |
+
box-shadow:0 1px 1px rgba(0,0,0,.04);
|
141 |
+
background:#fff;
|
142 |
+
margin-bottom:20px;
|
143 |
+
padding:0;
|
144 |
+
line-height:1
|
145 |
+
}
|
146 |
+
.postbox .inside{
|
147 |
+
margin:11px 0;
|
148 |
+
position:relative;
|
149 |
+
padding:0 12px 12px;
|
150 |
+
line-height:1.4em;
|
151 |
+
font-size:13px
|
152 |
+
}
|
153 |
+
#wpbody-content .metabox-holder p,.steps,label{
|
154 |
+
font-size:15px
|
155 |
+
}
|
156 |
+
.form-horizontal{
|
157 |
+
padding:20px
|
158 |
+
}
|
159 |
+
.form-horizontal .form-group{
|
160 |
+
margin-left:0;
|
161 |
+
margin-right:0
|
162 |
+
}
|
163 |
+
.form-group.disabled label,.form-group.disabled-short label{
|
164 |
+
color:grey
|
165 |
+
}
|
166 |
+
#demo{
|
167 |
+
border: 1px solid white;
|
168 |
+
box-shadow: 0 5px 0.5em grey;
|
169 |
+
}
|
170 |
+
.steps{
|
171 |
+
margin-bottom:4px
|
172 |
+
}
|
173 |
+
.steps .steps_nr{
|
174 |
+
font-weight:700;
|
175 |
+
padding-right:8px;
|
176 |
+
color:#EF3D4A
|
177 |
+
}
|
178 |
+
.dashicons-yes{
|
179 |
+
color:green
|
180 |
+
}
|
181 |
+
.image_zoom_promo{
|
182 |
+
background-color:#bc1117;
|
183 |
+
border:5px double #fff;
|
184 |
+
text-align:center;
|
185 |
+
margin:5px auto;
|
186 |
+
width:96%;
|
187 |
+
border-radius:10px;
|
188 |
+
opacity:1!important
|
189 |
+
}
|
190 |
+
.input-group.input-group-checkbox{
|
191 |
+
width:20px
|
192 |
+
}
|
193 |
+
.form-horizontal{
|
194 |
+
float:left;
|
195 |
+
width:100%
|
196 |
+
}
|
197 |
+
label{
|
198 |
+
font-weight:400
|
199 |
+
}
|
200 |
+
.container_title:before{
|
201 |
+
background:url(../images/icon.svg) no-repeat!important
|
202 |
+
}
|
203 |
+
#right_column_metaboxes a.button{
|
204 |
+
color:#fff!important;
|
205 |
+
border:none;
|
206 |
+
box-shadow:none;
|
207 |
+
vertical-align:middle;
|
208 |
+
font-size:14px;
|
209 |
+
height:32px;
|
210 |
+
line-height:32px;
|
211 |
+
padding:0 18px 1px;
|
212 |
+
background:#bc1117!important;
|
213 |
+
display:block-inline;
|
214 |
+
text-align:center;
|
215 |
+
margin:10px auto
|
216 |
+
}
|
217 |
+
@font-face {
|
218 |
+
font-family: 'iz_fontello';
|
219 |
+
src: url('../fonts/fontello.eot?94869691');
|
220 |
+
src: url('../fonts/fontello.eot?94869691#iefix') format('embedded-opentype'), url('../fonts/fontello.woff2?94869691') format('woff2'), url('../fonts/fontello.woff?94869691') format('woff'), url('../fonts/fontello.ttf?94869691') format('truetype'), url('../fonts/fontello.svg?94869691#fontello') format('svg');
|
221 |
+
font-weight: normal;
|
222 |
+
font-style: normal;
|
223 |
+
}
|
224 |
+
[class^="icon-"]:before, [class*=" icon-"]:before {
|
225 |
+
font-family: "iz_fontello";
|
226 |
+
font-style: normal;
|
227 |
+
font-weight: normal;
|
228 |
+
speak: none;
|
229 |
+
display: inline-block;
|
230 |
+
text-decoration: inherit;
|
231 |
+
width: 1em;
|
232 |
+
text-align: center;
|
233 |
+
font-variant: normal;
|
234 |
+
text-transform: none;
|
235 |
+
line-height: 1em;
|
236 |
+
font-size: 32px;
|
237 |
+
color: #000;
|
238 |
+
/* Font smoothing. That was taken from TWBS */
|
239 |
+
-webkit-font-smoothing: antialiased;
|
240 |
+
-moz-osx-font-smoothing: grayscale;
|
241 |
+
}
|
242 |
+
[class^="icon-type_zoom_window"]:before, [class*=" icon-type_zoom_window"]:before {
|
243 |
+
font-size: 32px;
|
244 |
+
width: 60px;
|
245 |
+
}
|
246 |
+
[class^="icon-text_align"]:before, [class*=" icon-text_align"]:before {
|
247 |
+
font-size: 38px;
|
248 |
+
}
|
249 |
+
.icon-cursor_type_crosshair:before {
|
250 |
+
content: '\e802';
|
251 |
+
}
|
252 |
+
/* '' */
|
253 |
+
.icon-cursor_type_default:before {
|
254 |
+
content: '\e803';
|
255 |
+
}
|
256 |
+
/* '' */
|
257 |
+
.icon-cursor_type_move:before {
|
258 |
+
content: '\e807';
|
259 |
+
}
|
260 |
+
/* '' */
|
261 |
+
.icon-cursor_type_zoom:before {
|
262 |
+
content: '\e808';
|
263 |
+
}
|
264 |
+
/* '' */
|
265 |
+
.icon-lens_shape_circle:before {
|
266 |
+
content: '\e809';
|
267 |
+
}
|
268 |
+
/* '' */
|
269 |
+
.icon-lens_shape_square:before {
|
270 |
+
content: '\e80a';
|
271 |
+
}
|
272 |
+
/* '' */
|
273 |
+
.icon-question_mark:before {
|
274 |
+
content: '\e80b';
|
275 |
+
}
|
276 |
+
/* '' */
|
277 |
+
.icon-text_align_bottom_center:before {
|
278 |
+
content: '\e80c';
|
279 |
+
}
|
280 |
+
/* '' */
|
281 |
+
.icon-text_align_bottom_left:before {
|
282 |
+
content: '\e80d';
|
283 |
+
}
|
284 |
+
/* '' */
|
285 |
+
.icon-text_align_bottom_right:before {
|
286 |
+
content: '\e80e';
|
287 |
+
}
|
288 |
+
/* '' */
|
289 |
+
.icon-text_align_top_center:before {
|
290 |
+
content: '\e80f';
|
291 |
+
}
|
292 |
+
/* '' */
|
293 |
+
.icon-text_align_top_left:before {
|
294 |
+
content: '\e810';
|
295 |
+
}
|
296 |
+
/* '' */
|
297 |
+
.icon-text_align_top_right:before {
|
298 |
+
content: '\e811';
|
299 |
+
}
|
300 |
+
/* '' */
|
301 |
+
.icon-type_image_inline:before {
|
302 |
+
content: '\e812';
|
303 |
+
}
|
304 |
+
/* '' */
|
305 |
+
.icon-type_zoom_window:before {
|
306 |
+
content: '\e813';
|
307 |
+
}
|
308 |
+
/* '' */
|
309 |
+
.icon-type_zoom_window_left_bottom:before {
|
310 |
+
content: '\e814';
|
311 |
+
}
|
312 |
+
/* '' */
|
313 |
+
.icon-type_zoom_window_left_center:before {
|
314 |
+
content: '\e815';
|
315 |
+
}
|
316 |
+
/* '' */
|
317 |
+
.icon-type_zoom_window_left_top:before {
|
318 |
+
content: '\e816';
|
319 |
+
}
|
320 |
+
/* '' */
|
321 |
+
.icon-type_zoom_window_right_bottom:before {
|
322 |
+
content: '\e817';
|
323 |
+
}
|
324 |
+
/* '' */
|
325 |
+
.icon-type_zoom_window_right_center:before {
|
326 |
+
content: '\e818';
|
327 |
+
}
|
328 |
+
/* '' */
|
329 |
+
.icon-type_zoom_window_right_top:before {
|
330 |
+
content: '\e819';
|
331 |
+
}
|
332 |
+
/* '' */
|
333 |
+
.icon-zoom_level_2:before {
|
334 |
+
content: '\e81a';
|
335 |
+
}
|
336 |
+
/* '' */
|
337 |
+
.icon-zoom_level_3:before {
|
338 |
+
content: '\e81b';
|
339 |
+
}
|
340 |
+
/* '' */
|
341 |
+
.icon-zoom_level_15:before {
|
342 |
+
content: '\e81c';
|
343 |
+
}
|
344 |
+
/* '' */
|
345 |
+
.icon-zoom_level_25:before {
|
346 |
+
content: '\e81d';
|
347 |
+
}
|
348 |
+
/* '' */
|
349 |
+
.icon-zoom_level_default:before {
|
350 |
+
content: '\e81e';
|
351 |
+
}
|
352 |
+
/* '' */
|
353 |
+
.icon-cursor_type_pointer:before {
|
354 |
+
content: '\e81f';
|
355 |
+
}
|
356 |
+
/* '' */
|
357 |
+
.icon-lens_shape_none:before {
|
358 |
+
content: '\e820';
|
359 |
+
}
|
360 |
+
/* '' */
|
361 |
+
.icon-zoom-in:before {
|
362 |
+
content: '\e821' !important;
|
363 |
+
}
|
364 |
+
/* '' */
|
365 |
+
.ribbon {
|
366 |
+
position: absolute;
|
367 |
+
z-index: 100;
|
368 |
+
width: 90px;
|
369 |
+
height: 90px;
|
370 |
+
overflow: hidden;
|
371 |
+
}
|
372 |
+
.ribbon.bottom-left {
|
373 |
+
bottom: -3px;
|
374 |
+
left: -6px;
|
375 |
+
}
|
376 |
+
.ribbon.bottom-left.ribbon-danger > small {
|
377 |
+
*zoom: 1;
|
378 |
+
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFD9534F', endColorstr='#FFB52B27');
|
379 |
+
background-image: url('data:image/svg+xml;
|
380 |
+
base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Q5NTM0ZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2I1MmIyNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
|
381 |
+
background-size: 100%;
|
382 |
+
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b52b27), color-stop(100%, #bc1117));
|
383 |
+
background-image: -moz-linear-gradient(top, #b52b27 0%, #bc1117 100%);
|
384 |
+
background-image: -webkit-linear-gradient(top, #b52b27 0%, #bc1117 100%);
|
385 |
+
background-image: linear-gradient(to bottom, #b52b27 0%, #bc1117 100%);
|
386 |
+
background-image: linear-gradient(to bottom, #bc1117 0%, #bc1117 100%);
|
387 |
+
position: absolute;
|
388 |
+
display: block;
|
389 |
+
width: 100%;
|
390 |
+
padding: 4px 8px;
|
391 |
+
text-align: center;
|
392 |
+
text-transform: uppercase;
|
393 |
+
text-shadow: 0 2px 0 #bc1117;
|
394 |
+
font-weight: bold;
|
395 |
+
font-size: 65%;
|
396 |
+
color: #fff;
|
397 |
+
background-color: #b52b27;
|
398 |
+
-moz-transform: rotate(50deg);
|
399 |
+
-ms-transform: rotate(50deg);
|
400 |
+
-webkit-transform: rotate(50deg);
|
401 |
+
transform: rotate(50deg);
|
402 |
+
-moz-box-shadow: 0 -3px 6px -3px rgba(0, 0, 0, 0.5);
|
403 |
+
-webkit-box-shadow: 0 -3px 6px -3px rgba(0, 0, 0, 0.5);
|
404 |
+
box-shadow: 0 -3px 6px -3px rgba(0, 0, 0, 0.5);
|
405 |
+
bottom: 18px;
|
406 |
+
left: -22px;
|
407 |
+
}
|
408 |
+
.ribbon.bottom-left.ribbon-danger > small:before, .ribbon.bottom-left.ribbon-danger > small:after {
|
409 |
+
position: absolute;
|
410 |
+
content: " ";
|
411 |
+
}
|
412 |
+
.ribbon.bottom-left.ribbon-danger > small:before {
|
413 |
+
left: 0;
|
414 |
+
}
|
415 |
+
.ribbon.bottom-left.ribbon-danger > small:after {
|
416 |
+
right: 0;
|
417 |
+
}
|
418 |
+
.ribbon.bottom-left.ribbon-danger > small:before, .ribbon.bottom-left.ribbon-danger > small:after {
|
419 |
+
top: -3px;
|
420 |
+
border-bottom: 3px solid #4c1210;
|
421 |
+
border-left: 3px solid transparent;
|
422 |
+
border-right: 3px solid transparent;
|
423 |
+
}
|
424 |
+
.form-group .input-group-text, .form-group .input-group-buttons {
|
425 |
+
width: auto;
|
426 |
+
}
|
427 |
+
.form-group input[type="checkbox"] {
|
428 |
+
width: 1.4rem;
|
429 |
+
height: 1.4rem;
|
430 |
+
border-radius: 0;
|
431 |
+
line-height: 2rem;
|
432 |
+
padding-left: 0.1rem !important;
|
433 |
+
}
|
434 |
+
.form-group label[for=zwPositioning] + div {
|
435 |
+
float: left;
|
436 |
+
}
|
437 |
+
|
assets/css/style.min.css
CHANGED
@@ -1,146 +1 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
@font-face {
|
4 |
-
font-family: 'iz_fontello';
|
5 |
-
src: url('../fonts/fontello.eot?94869691');
|
6 |
-
src: url('../fonts/fontello.eot?94869691#iefix') format('embedded-opentype'),
|
7 |
-
url('../fonts/fontello.woff2?94869691') format('woff2'),
|
8 |
-
url('../fonts/fontello.woff?94869691') format('woff'),
|
9 |
-
url('../fonts/fontello.ttf?94869691') format('truetype'),
|
10 |
-
url('../fonts/fontello.svg?94869691#fontello') format('svg');
|
11 |
-
font-weight: normal;
|
12 |
-
font-style: normal;
|
13 |
-
}
|
14 |
-
|
15 |
-
|
16 |
-
[class^="icon-"]:before, [class*=" icon-"]:before {
|
17 |
-
font-family: "iz_fontello";
|
18 |
-
font-style: normal;
|
19 |
-
font-weight: normal;
|
20 |
-
speak: none;
|
21 |
-
display: inline-block;
|
22 |
-
text-decoration: inherit;
|
23 |
-
width: 1em;
|
24 |
-
text-align: center;
|
25 |
-
font-variant: normal;
|
26 |
-
text-transform: none;
|
27 |
-
line-height: 1em;
|
28 |
-
font-size: 32px;
|
29 |
-
color: #000;
|
30 |
-
|
31 |
-
/* Font smoothing. That was taken from TWBS */
|
32 |
-
-webkit-font-smoothing: antialiased;
|
33 |
-
-moz-osx-font-smoothing: grayscale;
|
34 |
-
|
35 |
-
}
|
36 |
-
|
37 |
-
[class^="icon-type_zoom_window"]:before, [class*=" icon-type_zoom_window"]:before {
|
38 |
-
font-size: 32px;
|
39 |
-
width: 60px;
|
40 |
-
}
|
41 |
-
[class^="icon-text_align"]:before, [class*=" icon-text_align"]:before {
|
42 |
-
font-size: 38px;
|
43 |
-
}
|
44 |
-
|
45 |
-
.icon-cursor_type_crosshair:before { content: '\e802'; } /* '' */
|
46 |
-
.icon-cursor_type_default:before { content: '\e803'; } /* '' */
|
47 |
-
.icon-cursor_type_move:before { content: '\e807'; } /* '' */
|
48 |
-
.icon-cursor_type_zoom:before { content: '\e808'; } /* '' */
|
49 |
-
.icon-lens_shape_circle:before { content: '\e809'; } /* '' */
|
50 |
-
.icon-lens_shape_square:before { content: '\e80a'; } /* '' */
|
51 |
-
.icon-question_mark:before { content: '\e80b'; } /* '' */
|
52 |
-
.icon-text_align_bottom_center:before { content: '\e80c'; } /* '' */
|
53 |
-
.icon-text_align_bottom_left:before { content: '\e80d'; } /* '' */
|
54 |
-
.icon-text_align_bottom_right:before { content: '\e80e'; } /* '' */
|
55 |
-
.icon-text_align_top_center:before { content: '\e80f'; } /* '' */
|
56 |
-
.icon-text_align_top_left:before { content: '\e810'; } /* '' */
|
57 |
-
.icon-text_align_top_right:before { content: '\e811'; } /* '' */
|
58 |
-
.icon-type_image_inline:before { content: '\e812'; } /* '' */
|
59 |
-
.icon-type_zoom_window:before { content: '\e813'; } /* '' */
|
60 |
-
.icon-type_zoom_window_left_bottom:before { content: '\e814'; } /* '' */
|
61 |
-
.icon-type_zoom_window_left_center:before { content: '\e815'; } /* '' */
|
62 |
-
.icon-type_zoom_window_left_top:before { content: '\e816'; } /* '' */
|
63 |
-
.icon-type_zoom_window_right_bottom:before { content: '\e817'; } /* '' */
|
64 |
-
.icon-type_zoom_window_right_center:before { content: '\e818'; } /* '' */
|
65 |
-
.icon-type_zoom_window_right_top:before { content: '\e819'; } /* '' */
|
66 |
-
.icon-zoom_level_2:before { content: '\e81a'; } /* '' */
|
67 |
-
.icon-zoom_level_3:before { content: '\e81b'; } /* '' */
|
68 |
-
.icon-zoom_level_15:before { content: '\e81c'; } /* '' */
|
69 |
-
.icon-zoom_level_25:before { content: '\e81d'; } /* '' */
|
70 |
-
.icon-zoom_level_default:before { content: '\e81e'; } /* '' */
|
71 |
-
.icon-cursor_type_pointer:before { content: '\e81f'; } /* '' */
|
72 |
-
.icon-lens_shape_none:before { content: '\e820'; } /* '' */
|
73 |
-
.icon-zoom-in:before { content: '\e821' !important; } /* '' */
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
.ribbon {
|
79 |
-
position: absolute;
|
80 |
-
z-index: 100;
|
81 |
-
width: 90px;
|
82 |
-
height: 90px;
|
83 |
-
overflow: hidden;
|
84 |
-
}
|
85 |
-
.ribbon.bottom-left {
|
86 |
-
bottom: -3px;
|
87 |
-
left: -6px;
|
88 |
-
}
|
89 |
-
.ribbon.bottom-left.ribbon-danger > small {
|
90 |
-
*zoom: 1;
|
91 |
-
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFD9534F', endColorstr='#FFB52B27');
|
92 |
-
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Q5NTM0ZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2I1MmIyNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
|
93 |
-
background-size: 100%;
|
94 |
-
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b52b27), color-stop(100%, #bc1117));
|
95 |
-
background-image: -moz-linear-gradient(top, #b52b27 0%, #bc1117 100%);
|
96 |
-
background-image: -webkit-linear-gradient(top, #b52b27 0%, #bc1117 100%);
|
97 |
-
background-image: linear-gradient(to bottom, #b52b27 0%, #bc1117 100%);
|
98 |
-
background-image: linear-gradient(to bottom, #bc1117 0%, #bc1117 100%);
|
99 |
-
position: absolute;
|
100 |
-
display: block;
|
101 |
-
width: 100%;
|
102 |
-
padding: 4px 8px;
|
103 |
-
text-align: center;
|
104 |
-
text-transform: uppercase;
|
105 |
-
text-shadow: 0 2px 0 #bc1117;
|
106 |
-
font-weight: bold;
|
107 |
-
font-size: 65%;
|
108 |
-
color: #fff;
|
109 |
-
background-color: #b52b27;
|
110 |
-
-moz-transform: rotate(50deg);
|
111 |
-
-ms-transform: rotate(50deg);
|
112 |
-
-webkit-transform: rotate(50deg);
|
113 |
-
transform: rotate(50deg);
|
114 |
-
-moz-box-shadow: 0 -3px 6px -3px rgba(0, 0, 0, 0.5);
|
115 |
-
-webkit-box-shadow: 0 -3px 6px -3px rgba(0, 0, 0, 0.5);
|
116 |
-
box-shadow: 0 -3px 6px -3px rgba(0, 0, 0, 0.5);
|
117 |
-
bottom: 18px;
|
118 |
-
left: -22px;
|
119 |
-
}
|
120 |
-
.ribbon.bottom-left.ribbon-danger > small:before, .ribbon.bottom-left.ribbon-danger > small:after {
|
121 |
-
position: absolute;
|
122 |
-
content: " ";
|
123 |
-
}
|
124 |
-
.ribbon.bottom-left.ribbon-danger > small:before {
|
125 |
-
left: 0;
|
126 |
-
}
|
127 |
-
.ribbon.bottom-left.ribbon-danger > small:after {
|
128 |
-
right: 0;
|
129 |
-
}
|
130 |
-
.ribbon.bottom-left.ribbon-danger > small:before, .ribbon.bottom-left.ribbon-danger > small:after {
|
131 |
-
top: -3px;
|
132 |
-
border-bottom: 3px solid #4c1210;
|
133 |
-
border-left: 3px solid transparent;
|
134 |
-
border-right: 3px solid transparent;
|
135 |
-
}
|
136 |
-
.form-group .input-group-text, .form-group .input-group-buttons {
|
137 |
-
width: auto;
|
138 |
-
}
|
139 |
-
.form-group input[type="checkbox"] {
|
140 |
-
width: 1.4rem;
|
141 |
-
height: 1.4rem;
|
142 |
-
border-radius: 0;
|
143 |
-
line-height: 2rem;
|
144 |
-
padding-left: 0.1rem !important;
|
145 |
-
}
|
146 |
-
.form-group label[for=zwPositioning] + div { float: left; }
|
1 |
+
@font-face{font-family:Raleway;font-style:normal;font-weight:400;src:local('Raleway'),local('Raleway-Regular'),url(https://fonts.gstatic.com/s/raleway/v11/0dTEPzkLWceF7z0koJaX1A.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}body{font-family:"Open Sans",sans-serif;background-color:#f1f1f1}.container_title,.steps,h2,label{font-family:Raleway}.wrap{float:left;width:70%;margin-right:3%}h2{font-weight:400,font-size:26px !important}h2 a{color:#23282d}h2 a:hover,h3 a.nav-tab:hover{text-decoration:none,color:#0073aa}h2 img{margin-bottom:4px}h3{margin-top:0 !important;padding:16px 16px 16px 20px;text-align:center;color:#fff;font-size:1.3em;margin:1em 0}h3 .nav-tab{font-size:14px;line-height:22px;padding:10px 15px;border-radius:4px 4px 0 0;font-weight:400}a.nav-tab:focus,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:active{outline:0;-webkit-box-shadow:none;box-shadow:none;text-decoration:none}.btn-icon{height:50px}.btn-group>.btn.active,.input-group .form-control{z-index:auto}.btn-group-no-margin{margin-left:-15px !important}input[type=checkbox]{margin-top:0}input[type=color]{padding:0;width:50px}.control-label{text-align:right;padding:15px 10px 10px 0;height:50px}.margin-10{margin-top:10px}.icon-style-rect-1 .ndd-icon-main-element{width:44px;height:44px;border-radius:8px;background:rgba(0,0,0,.2)}.tab-pane{width:90%;padding-top:10px}.input-group{width:200px}.tooltip-inner{width:150px;background-color:#000;opacity:.8}.tooltip-arrow{opacity:.8}.panel-default{margin-top:8px}#right_column_metaboxes{width:25%;float:left;margin-top:70px}.main_container{background-color:#fff;margin-bottom:20px;border:1px solid #ddd;border-radius:5px;box-shadow:0 2px 1px -1px #ccc}.container_title{border-radius:5px 5px 0 0;background:#474747}#wpbody-content .metabox-holder{font-family:Raleway;padding:10px 15px 15px}#wpbody-content .metabox-holder.discount{background:url(../images/discount.png) 102% 102% no-repeat;background-size:50%}#wpbody-content .metabox-holder.rating{background:url(../images/rating.png) 100% 80% no-repeat;background-size:50%}#wpbody-content .metabox-holder.product-gallery-plugin{background:url(../images/product-gallery-zoom.png) 142% 102% no-repeat;background-size:70%}.postbox{min-width:0;border-radius:5px;position:relative;box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;margin-bottom:20px;padding:0;line-height:1}.postbox .inside{margin:11px 0;position:relative;padding:0 12px 12px;line-height:1.4em;font-size:13px}#wpbody-content .metabox-holder p,.steps,label{font-size:15px}.form-horizontal{padding:20px}.form-horizontal .form-group{margin-left:0;margin-right:0}.form-group.disabled label,.form-group.disabled-short label{color:grey}#demo{border:1px solid white;box-shadow:0 5px .5em grey}.steps{margin-bottom:4px}.steps .steps_nr{font-weight:700;padding-right:8px;color:#ef3d4a}.dashicons-yes{color:green}.image_zoom_promo{background-color:#bc1117;border:5px double #fff;text-align:center;margin:5px auto;width:96%;border-radius:10px;opacity:1 !important}.input-group.input-group-checkbox{width:20px}.form-horizontal{float:left;width:100%}label{font-weight:400}.container_title:before{background:url(../images/icon.svg) no-repeat !important}#right_column_metaboxes a.button{color:#fff !important;border:0;box-shadow:none;vertical-align:middle;font-size:14px;height:32px;line-height:32px;padding:0 18px 1px;background:#bc1117 !important;display:block-inline;text-align:center;margin:10px auto}@font-face{font-family:'iz_fontello';src:url('../fonts/fontello.eot?94869691');src:url('../fonts/fontello.eot?94869691#iefix') format('embedded-opentype'),url('../fonts/fontello.woff2?94869691') format('woff2'),url('../fonts/fontello.woff?94869691') format('woff'),url('../fonts/fontello.ttf?94869691') format('truetype'),url('../fonts/fontello.svg?94869691#fontello') format('svg');font-weight:normal;font-style:normal}[class^="icon-"]:before,[class*=" icon-"]:before{font-family:"iz_fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;font-size:32px;color:#000;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[class^="icon-type_zoom_window"]:before,[class*=" icon-type_zoom_window"]:before{font-size:32px;width:60px}[class^="icon-text_align"]:before,[class*=" icon-text_align"]:before{font-size:38px}.icon-cursor_type_crosshair:before{content:'\e802'}.icon-cursor_type_default:before{content:'\e803'}.icon-cursor_type_move:before{content:'\e807'}.icon-cursor_type_zoom:before{content:'\e808'}.icon-lens_shape_circle:before{content:'\e809'}.icon-lens_shape_square:before{content:'\e80a'}.icon-question_mark:before{content:'\e80b'}.icon-text_align_bottom_center:before{content:'\e80c'}.icon-text_align_bottom_left:before{content:'\e80d'}.icon-text_align_bottom_right:before{content:'\e80e'}.icon-text_align_top_center:before{content:'\e80f'}.icon-text_align_top_left:before{content:'\e810'}.icon-text_align_top_right:before{content:'\e811'}.icon-type_image_inline:before{content:'\e812'}.icon-type_zoom_window:before{content:'\e813'}.icon-type_zoom_window_left_bottom:before{content:'\e814'}.icon-type_zoom_window_left_center:before{content:'\e815'}.icon-type_zoom_window_left_top:before{content:'\e816'}.icon-type_zoom_window_right_bottom:before{content:'\e817'}.icon-type_zoom_window_right_center:before{content:'\e818'}.icon-type_zoom_window_right_top:before{content:'\e819'}.icon-zoom_level_2:before{content:'\e81a'}.icon-zoom_level_3:before{content:'\e81b'}.icon-zoom_level_15:before{content:'\e81c'}.icon-zoom_level_25:before{content:'\e81d'}.icon-zoom_level_default:before{content:'\e81e'}.icon-cursor_type_pointer:before{content:'\e81f'}.icon-lens_shape_none:before{content:'\e820'}.icon-zoom-in:before{content:'\e821' !important}.ribbon{position:absolute;z-index:100;width:90px;height:90px;overflow:hidden}.ribbon.bottom-left{bottom:-3px;left:-6px}.ribbon.bottom-left.ribbon-danger>small{*zoom:1;filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='#FFD9534F',endColorstr='#FFB52B27');background-image:url('data:image/svg+xml; base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Q5NTM0ZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2I1MmIyNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#b52b27),color-stop(100%,#bc1117));background-image:-moz-linear-gradient(top,#b52b27 0,#bc1117 100%);background-image:-webkit-linear-gradient(top,#b52b27 0,#bc1117 100%);background-image:linear-gradient(to bottom,#b52b27 0,#bc1117 100%);background-image:linear-gradient(to bottom,#bc1117 0,#bc1117 100%);position:absolute;display:block;width:100%;padding:4px 8px;text-align:center;text-transform:uppercase;text-shadow:0 2px 0 #bc1117;font-weight:bold;font-size:65%;color:#fff;background-color:#b52b27;-moz-transform:rotate(50deg);-ms-transform:rotate(50deg);-webkit-transform:rotate(50deg);transform:rotate(50deg);-moz-box-shadow:0 -3px 6px -3px rgba(0,0,0,0.5);-webkit-box-shadow:0 -3px 6px -3px rgba(0,0,0,0.5);box-shadow:0 -3px 6px -3px rgba(0,0,0,0.5);bottom:18px;left:-22px}.ribbon.bottom-left.ribbon-danger>small:before,.ribbon.bottom-left.ribbon-danger>small:after{position:absolute;content:" "}.ribbon.bottom-left.ribbon-danger>small:before{left:0}.ribbon.bottom-left.ribbon-danger>small:after{right:0}.ribbon.bottom-left.ribbon-danger>small:before,.ribbon.bottom-left.ribbon-danger>small:after{top:-3px;border-bottom:3px solid #4c1210;border-left:3px solid transparent;border-right:3px solid transparent}.form-group .input-group-text,.form-group .input-group-buttons{width:auto}.form-group input[type="checkbox"]{width:1.4rem;height:1.4rem;border-radius:0;line-height:2rem;padding-left:.1rem !important}.form-group label[for=zwPositioning]+div{float:left}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/image_zoom-init.js
CHANGED
@@ -79,9 +79,9 @@ jQuery(document).ready(function( $ ){
|
|
79 |
|
80 |
|
81 |
// Resize the zoom windows when resizing the page
|
82 |
-
$(window).
|
83 |
window.resizeEvt;
|
84 |
-
$(window).resize
|
85 |
clearTimeout(window.resizeEvt);
|
86 |
window.resizeEvt = setTimeout(function() {
|
87 |
$(".zoomContainer").remove();
|
@@ -100,13 +100,13 @@ jQuery(document).ready(function( $ ){
|
|
100 |
|
101 |
// Remove the zoom when hovering on the submenu
|
102 |
function restart_on_hover( elem ) {
|
103 |
-
elem.
|
104 |
if ( $('.zoomContainer').length === 0 ) {
|
105 |
$(this).image_zoom(IZ.options);
|
106 |
}
|
107 |
});
|
108 |
};
|
109 |
-
$('.sub-menu li').
|
110 |
$('.zoomContainer').remove();
|
111 |
});
|
112 |
restart_on_hover($('img.zoooom'));
|
@@ -118,7 +118,7 @@ jQuery(document).ready(function( $ ){
|
|
118 |
restart_on_hover($('.attachment-shop_single'));
|
119 |
|
120 |
$("a[data-rel^='zoomImage']").each(function(index){
|
121 |
-
$(this).click
|
122 |
// If there are more than one WooCommerce gallery, exchange the thumbnail with the closest .attachment-shop_single
|
123 |
var obj1 = $(".attachment-shop_single");
|
124 |
if ( obj1.length > 1 ) {
|
@@ -231,7 +231,7 @@ jQuery(document).ready(function( $ ){
|
|
231 |
|
232 |
|
233 |
// Resize the zoom windows when resizing the page
|
234 |
-
$(window).
|
235 |
window.resizeEvt;
|
236 |
$(window).resize(function() {
|
237 |
clearTimeout(window.resizeEvt);
|
@@ -243,7 +243,7 @@ jQuery(document).ready(function( $ ){
|
|
243 |
});
|
244 |
|
245 |
// Remove the click action on the images
|
246 |
-
$(".woocommerce-product-gallery img").click
|
247 |
e.preventDefault();
|
248 |
});
|
249 |
|
@@ -262,7 +262,7 @@ jQuery(document).ready(function( $ ){
|
|
262 |
restart_on_hover(first_img);
|
263 |
|
264 |
// Remove the click action on the images
|
265 |
-
$('.woocommerce-product-gallery__image img').click
|
266 |
e.preventDefault();
|
267 |
});
|
268 |
|
@@ -277,7 +277,7 @@ jQuery(document).ready(function( $ ){
|
|
277 |
|
278 |
// Switch the thumbnail with the main image
|
279 |
$(".woocommerce-product-gallery__image:nth-child(n+2) img").each(function(i){
|
280 |
-
$(this).click
|
281 |
var this_thumb = $(this);
|
282 |
// Exchange the attributes
|
283 |
$.each(['alt', 'title', 'data-src'], function(key,attr) {
|
79 |
|
80 |
|
81 |
// Resize the zoom windows when resizing the page
|
82 |
+
$(window).on('resize', function(e) {
|
83 |
window.resizeEvt;
|
84 |
+
$(window).on('resize', function() {
|
85 |
clearTimeout(window.resizeEvt);
|
86 |
window.resizeEvt = setTimeout(function() {
|
87 |
$(".zoomContainer").remove();
|
100 |
|
101 |
// Remove the zoom when hovering on the submenu
|
102 |
function restart_on_hover( elem ) {
|
103 |
+
elem.on('mouseenter', function(){
|
104 |
if ( $('.zoomContainer').length === 0 ) {
|
105 |
$(this).image_zoom(IZ.options);
|
106 |
}
|
107 |
});
|
108 |
};
|
109 |
+
$('.sub-menu li').on('mouseenter', function(){
|
110 |
$('.zoomContainer').remove();
|
111 |
});
|
112 |
restart_on_hover($('img.zoooom'));
|
118 |
restart_on_hover($('.attachment-shop_single'));
|
119 |
|
120 |
$("a[data-rel^='zoomImage']").each(function(index){
|
121 |
+
$(this).on('click', function(event){
|
122 |
// If there are more than one WooCommerce gallery, exchange the thumbnail with the closest .attachment-shop_single
|
123 |
var obj1 = $(".attachment-shop_single");
|
124 |
if ( obj1.length > 1 ) {
|
231 |
|
232 |
|
233 |
// Resize the zoom windows when resizing the page
|
234 |
+
$(window).on('resize', function(e) {
|
235 |
window.resizeEvt;
|
236 |
$(window).resize(function() {
|
237 |
clearTimeout(window.resizeEvt);
|
243 |
});
|
244 |
|
245 |
// Remove the click action on the images
|
246 |
+
$(".woocommerce-product-gallery img").on('click', function(e){
|
247 |
e.preventDefault();
|
248 |
});
|
249 |
|
262 |
restart_on_hover(first_img);
|
263 |
|
264 |
// Remove the click action on the images
|
265 |
+
$('.woocommerce-product-gallery__image img').on('click', function(e){
|
266 |
e.preventDefault();
|
267 |
});
|
268 |
|
277 |
|
278 |
// Switch the thumbnail with the main image
|
279 |
$(".woocommerce-product-gallery__image:nth-child(n+2) img").each(function(i){
|
280 |
+
$(this).on('click', function(e){
|
281 |
var this_thumb = $(this);
|
282 |
// Exchange the attributes
|
283 |
$.each(['alt', 'title', 'data-src'], function(key,attr) {
|
assets/js/image_zoom.settings.js
CHANGED
@@ -6,7 +6,7 @@ jQuery(document).ready(function($) {
|
|
6 |
function updateZoomer() {
|
7 |
$(".zoomContainer").remove();
|
8 |
|
9 |
-
$("#demo").
|
10 |
|
11 |
var zoom_options = {};
|
12 |
|
@@ -136,13 +136,13 @@ jQuery(document).ready(function($) {
|
|
136 |
$("#tab_lens, #tab_zoom_window").removeClass('disabled');
|
137 |
$("#tab_lens a").attr('href', '#lens_settings');
|
138 |
$("#tab_zoom_window a").attr('href', '#zoom_window_settings');
|
139 |
-
$("#lensSize").
|
140 |
-
$("#lensColour").
|
141 |
-
$("#lensBgImage").
|
142 |
-
$("#tintColor").
|
143 |
-
$("#tintOpacity").
|
144 |
-
$("#lensColour").
|
145 |
-
$("#lensOverlay").
|
146 |
|
147 |
// Enable/disable fields
|
148 |
switch ( settings['lensShape'] ) {
|
@@ -181,6 +181,6 @@ jQuery(document).ready(function($) {
|
|
181 |
|
182 |
}
|
183 |
|
184 |
-
$(".form-group input").change
|
185 |
|
186 |
});
|
6 |
function updateZoomer() {
|
7 |
$(".zoomContainer").remove();
|
8 |
|
9 |
+
$("#demo").off( 'touchstart touchmove touchend click mouseenter' );
|
10 |
|
11 |
var zoom_options = {};
|
12 |
|
136 |
$("#tab_lens, #tab_zoom_window").removeClass('disabled');
|
137 |
$("#tab_lens a").attr('href', '#lens_settings');
|
138 |
$("#tab_zoom_window a").attr('href', '#zoom_window_settings');
|
139 |
+
$("#lensSize").prop('disabled', false);
|
140 |
+
$("#lensColour").prop('disabled', false);
|
141 |
+
$("#lensBgImage").prop('disabled', false);
|
142 |
+
$("#tintColor").prop('disabled', false);
|
143 |
+
$("#tintOpacity").prop('disabled', false);
|
144 |
+
$("#lensColour").prop('disabled', false);
|
145 |
+
$("#lensOverlay").prop('disabled', false);
|
146 |
|
147 |
// Enable/disable fields
|
148 |
switch ( settings['lensShape'] ) {
|
181 |
|
182 |
}
|
183 |
|
184 |
+
$(".form-group input").on('change', updateZoomer);
|
185 |
|
186 |
});
|
assets/js/jquery.image_zoom.min.js
CHANGED
@@ -2,4 +2,4 @@
|
|
2 |
* Copyright (c) 2016 Diana Burduja; Licensed MIT license
|
3 |
|
4 |
This is a very strongly modified version of the https://github.com/elevateweb/elevatezoom jQuery plugin. */
|
5 |
-
(function($,window,document,undefined){"use strict";var ImageZoooom={init:function(options,elem){var self=this;self.elem=elem;self.$elem=$(elem);self.options=options;self.img_big={src:self.$elem.attr("src")};if(self.$elem.data("zoom-image")){self.img_big.src=self.$elem.data("zoom-image")}else if(self.$elem.attr("srcset")){var set=self.$elem.attr("srcset").split(", ");var max_width=0;var max_src="";$.each(set,function(i,src){var parts=$.trim(src).split(" ");if(parseInt(parts[1])>max_width){max_width=parseInt(parts[1]);max_src=parts[0]}});if(max_src!==""){self.img_big.src=max_src}}self.ratio={width:1,height:1};self.zw={height:parseInt(self.options.zoomWindowHeight),width:parseInt(self.options.zoomWindowWidth)};self.lens={height:self.options.lensSize,width:self.options.lensSize};self.screen={height:$(document).height(),width:$(document).width()};if(self.options.tint){self.options.lensColour="none";self.options.lensOpacity="1"}if(self.options.zoomType==="inner"){self.options.showLens=false}self.$elem.parent().removeAttr("title").removeAttr("alt");if(self.options.responsive===true&&self.screen.width<=self.options.responsiveThreshold){self.options.zoomType="inner";self.options.showLens=false}setTimeout(function(){var newImg=new Image;newImg.onload=function(){self.img_big.width=newImg.width;self.img_big.height=newImg.height;self.startZoom()};newImg.src=self.img_big.src},1)},buildZoomContainer:function(){var self=this;self.zoomContainer=$("<div />").addClass("zoomContainer").css({"-webkit-transform":"translateZ(0)",position:"absolute",left:self.img_small.offset.left+"px",top:self.img_small.offset.top+"px",height:self.img_small.height+"px",width:self.img_small.width+"px","z-index":"999"}).appendTo("body")},buildZoomLens:function(){var self=this;if(self.options.containLensZoom){self.zoomContainer.css("overflow","hidden")}var lensStyle={"background-position":"0px 0px","float":"left",display:"none",border:self.options.borderSize+"px solid "+self.options.borderColour,width:self.options.lensSize+"px",height:self.options.lensSize+"px","border-radius":self.options.borderRadius+"px",cursor:self.options.cursor,"background-repeat":"no-repeat",position:"absolute",overflow:"hidden","z-index":"999"};if(self.options.tint===true){lensStyle["-webkit-transform"]="translateZ(0)";lensStyle["opacity"]=self.options.lensOpacity;lensStyle["-ms-filter"]="progid:DXImageTransform.Microsoft.Alpha(Opacity="+self.options.lensOpacity*100+")";lensStyle["filter"]="alpha(opacity= "+self.options.lensOpacity*100+")"}if(self.options.lensShape==="round"){var lensRadius=self.options.lensSize/2+self.options.borderSize+"px";lensStyle["-webkit-border-radius"]=lensRadius;lensStyle["-moz-border-radius"]=lensRadius;lensStyle["border-radius"]=lensRadius}self.zoomLens=$("<div />").addClass("zoomLens").css(lensStyle).appendTo(self.zoomContainer).click(function(){self.$elem.trigger("click")})},buildZoomWindow:function(){var self=this;self.lens.height=self.zw.height/self.ratio.height;if(self.img_big.height<self.zw.height){self.lens.height=self.img_small.height}self.lens.width=self.zw.width/self.ratio.width;if(self.img_big.width<self.zw.width){self.lens.width=self.img_small.width}var lensStyle={"background-position":"0px 0px",display:"none",overflow:"hidden","z-index":"999","-webkit-transform":"translateZ(0)",opacity:self.options.lensOpacity,"-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity="+self.options.lensOpacity*100+")",filter:"alpha(opacity= "+self.options.lensOpacity*100+")",zoom:1,width:self.lens.width+"px",height:self.lens.height+"px","background-color":self.options.lensColour,cursor:self.options.cursor,"border-radius":self.options.borderRadius+"px",border:self.options.lensBorderSize+"px solid "+self.options.lensBorderColour,"background-repeat":"no-repeat",position:"absolute","box-shadow":"-0px -0px 10px rgba(0, 0, 0, 0.4)"};if(self.options.lensOverlay!==false){lensStyle["background"]="url("+self.options.lensOverlay+") "+self.options.lensColour}self.zoomLens=$("<div />").addClass("zoomLens").css(lensStyle).appendTo(self.zoomContainer).click(function(){self.$elem.trigger("click")});var zoomWindowStyle={overflow:"hidden","background-position":"0px 0px","text-align":"center","background-color":self.options.zoomWindowBgColour,width:self.zw.width+"px",height:self.zw.height+"px","float":"left","border-radius":self.options.borderRadius+"px","background-size":self.img_big.width/self.currentZoomLevel+"px "+self.img_big.height/self.currentZoomLevel+"px",display:"none","z-index":"999",border:self.options.borderSize+"px solid "+self.options.borderColour,"background-repeat":"no-repeat",position:"absolute"};if(self.options.zoomWindowShadow>0){var zoomWindowShadowText=self.options.zoomWindowShadow*2+"px "+self.options.zoomWindowShadow*2+"px "+self.options.zoomWindowShadow+"px #ccc";zoomWindowStyle["box-shadow"]=zoomWindowShadowText;zoomWindowStyle["-moz-box-shadow"]=zoomWindowShadowText;zoomWindowStyle["-webkit-box-shadow"]=zoomWindowShadowText;zoomWindowStyle["-khtml-box-shadow"]=zoomWindowShadowText}return zoomWindowStyle},buildZoomInner:function(){var self=this;var borderWidth=self.$elem.css("border-left-width");var innerStyle={overflow:"hidden","margin-left":borderWidth,"margin-top":borderWidth,"background-position":"0px 0px",width:self.img_small.width+"px",height:self.img_small.height+"px","float":"left","border-radius":self.options.borderRadius+"px",display:"none",cursor:self.options.cursor,"background-repeat":"no-repeat",position:"absolute","z-index":"999"};return innerStyle},buildTint:function(){var self=this;if(!self.options.tint){return}var tintStyle={display:"block",position:"absolute","background-color":self.options.tintColour,filter:"alpha(opacity=0)",border:"none",opacity:0,"z-index":250,width:self.img_small.width+"px",height:self.img_small.height+"px"};self.tintContainer=$("<div />").addClass("tintContainer");self.zoomTint=$("<div />").addClass("zoomTint").css(tintStyle);self.zoomLens.wrap(self.tintContainer);self.zoomLens.after(self.zoomTint);var zoomTintImageCss={position:"absolute",left:"0px",top:"0px","z-index":"250",opacity:"0","max-width":"none",width:self.img_small.width+"px",height:self.img_small.height+"px"};if(self.options.zoomType==="window"){zoomTintImageCss.opacity=1}self.zoomTintImage=$("<img />").css(zoomTintImageCss).attr("src",self.img_big.src).appendTo(self.zoomLens).click(function(){self.$elem.trigger("click")})},startZoom:function(){var self=this;self.isWindowActive=false;self.isLensActive=false;self.isTintActive=false;self.zoomLock=1;self.scrollingLock=false;self.changeBgSize=false;self.currentZoomLevel=self.options.zoomLevel;self.img_small={src:self.$elem.attr("src"),width:self.$elem.width(),height:self.$elem.height(),offset:self.$elem.offset()};self.ratio={width:self.img_big.width/self.img_small.width/self.currentZoomLevel,height:self.img_big.height/self.img_small.height/self.currentZoomLevel};if((self.ratio.height<1||self.ratio.width<1)&&self.options.scrollZoom!==true){return false}self.img_small.offset=self.$elem.offset();self.buildZoomContainer();var zoomWindowStyle={};switch(self.options.zoomType){case"lens":self.buildZoomLens();self.buildTint();break;case"window":zoomWindowStyle=self.buildZoomWindow();self.buildTint();break;case"inner":zoomWindowStyle=self.buildZoomInner();break}var appendTo="body";if(!isNaN(self.options.zoomWindowPosition)){appendTo=self.zoomContainer}self.zoomWindow=$("<div />").addClass("zoomWindow").css(zoomWindowStyle).appendTo(appendTo).click(function(){self.$elem.trigger("click")});var customText=$("<div />").addClass("iz_watermark").css({width:self.img_small.width+"px",height:self.img_small.height+"px","vertical-align":self.options.customTextVAlign,display:"table-cell","text-align":self.options.customTextAlign,color:self.options.customTextColor,"font-size":self.options.customTextSize+"px",padding:"3px"}).html(self.options.customText);if($(".iz_watermark").length>0){$(".iz_watermark").remove()}self.zoomWindow.after(customText);self.zoomWindowContainer=$("<div/>").addClass("zoomWindowContainer").css("width",self.zw.width);self.zoomWindow.wrap(self.zoomWindowContainer);var backgroundImage={backgroundImage:"url('"+self.img_big.src+"')"};if(self.options.zoomType==="lens"){self.zoomLens.css(backgroundImage)}else{self.zoomWindow.css(backgroundImage)}self.registerTouchEvents();self.registerMouseEvents();self.registerScrollZoom();self.zoomContainer.add(self.$elem).mouseenter(function(){self.setElements(true)}).mouseleave(function(){if(!self.scrollLock){self.setElements(false)}});if(self.options.zoomType!=="inner"){self.zoomWindow.mouseenter(function(){self.setElements(false)})}else{self.showZoomWindow(false)}},registerTouchEvents:function(){var self=this;self.zoomContainer.bind("touchstart",function(e){e.preventDefault();var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];self.mouse={left:parseInt(touch.pageX-self.img_small.offset.left),top:parseInt(touch.pageY-self.img_small.offset.top)};self.setPosition(touch);self.setElements(true)});self.zoomContainer.bind("touchend",function(){if(!self.scrollLock){self.setElements(false)}});self.zoomContainer.bind("touchmove",function(e){e.preventDefault();var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];self.mouse={left:parseInt(touch.pageX-self.img_small.offset.left),top:parseInt(touch.pageY-self.img_small.offset.top)};self.setPosition(touch)})},registerMouseEvents:function(){var self=this;var registerMouseMove=function(e){self.mouse={left:parseInt(e.pageX-self.img_small.offset.left),top:parseInt(e.pageY-self.img_small.offset.top)};if(self.lastX!==e.clientX||self.lastY!==e.clientY){self.setPosition(e);self.currentLoc=e}self.lastX=e.clientX;self.lastY=e.clientY};var registerMouseAndShowWindow=function(e){if(self.outOfBound===false){self.setElements(true)}registerMouseMove(e)};self.$elem.bind("mousemove",registerMouseAndShowWindow);self.zoomContainer.bind("mousemove",registerMouseAndShowWindow);if(self.options.zoomType==="inner"){self.zoomWindow.bind("mousemove",registerMouseMove)}else{self.zoomLens.bind("mousemove",registerMouseMove);if(self.options.tint){self.zoomTint.bind("mousemove",registerMouseMove)}}},registerScrollZoom:function(){var self=this;if(!self.options.scrollZoom){return false}if(self.options.zoomLevel!==1){self.changeZoomLevel(self.currentZoomLevel)}var minZoomLevel=self.options.scrollZoomIncrement*2;if(self.options.minZoomLevel){minZoomLevel=self.options.minZoomLevel}var registerScrollZoomEvent=function(e){self.scrollLock=true;clearTimeout($.data(this,"timer"));$.data(this,"timer",setTimeout(function(){self.scrollLock=false},250));var theEvent=e.originalEvent.wheelDelta||e.originalEvent.detail*-1;e.stopImmediatePropagation();e.stopPropagation();e.preventDefault();var changeZoom=0;self.currentZoomLevel=parseFloat(self.currentZoomLevel);if(theEvent>0){if(self.currentZoomLevel>=minZoomLevel){changeZoom=self.currentZoomLevel-self.options.scrollZoomIncrement}}else{changeZoom=self.currentZoomLevel+self.options.scrollZoomIncrement}self.changeZoomLevel(changeZoom);return false};self.zoomContainer.add(self.$elem).bind("mousewheel DOMMouseScroll MozMousePixelScroll",registerScrollZoomEvent)},setElements:function(type){var self=this;if(!self.options.zoomEnabled){return false}if(!self.isWindowSet){return}self.showZoomWindow(type);self.showLens(type);self.showTint(type)},setPosition:function(e){var self=this;if(!self.options.zoomEnabled){return false}if(self.options.tint&&self.options.zoomType!=="inner"){self.zoomTint.css({top:0,left:0})}if(self.options.responsive&&!self.options.scrollZoom&&self.options.showLens){if(self.options.zoomType==="lens"){self.zoomLens.css({width:self.options.lensSize+"px",height:self.options.lensSize+"px"})}else{var lensHeight=self.zw.height/self.ratio.height;if(self.img_small.height<self.zw.width/self.ratio.width){lensHeight=self.img_small.height}var lensWidth=self.zw.width/self.ratio.width;if(self.img_small.width<self.zw.width/self.ratio.height){lensWidth=self.img_small.width}self.zoomLens.css({width:lensWidth+"px",height:lensHeight+"px"});if(self.options.tint){self.zoomTintImage.css({width:self.img_small.width+"px",height:self.img_small.height+"px"})}}}self.zoomContainer.css({top:self.img_small.offset.top,left:self.img_small.offset.left});var bound={top:false,bottom:false,left:false,right:false};if(self.options.zoomType==="window"){bound.height=self.zoomLens.height()/2;bound.width=self.zoomLens.width()/2}if(self.options.zoomType==="inner"){bound.height=self.img_small.height/2/self.ratio.height;bound.width=self.img_small.width/2/self.ratio.width}bound.top=self.mouse.top<bound.height;bound.bottom=self.mouse.top>self.img_small.height-bound.height-self.options.lensBorderSize*2;bound.left=self.mouse.left<bound.width;bound.right=self.mouse.left>self.img_small.width-bound.width-self.options.lensBorderSize*2;self.bound=bound;if(self.mouse.left<=0||self.mouse.top<0||self.mouse.left>self.img_small.width||self.mouse.top>self.img_small.height){self.outOfBound=true;self.setElements(false);return}else{self.outOfBound=false;var lensLeftPos=0;var lensTopPos=0;if(self.options.showLens){lensLeftPos=self.mouse.left-self.zoomLens.width()/2;lensTopPos=self.mouse.top-self.zoomLens.height()/2}if(bound.top){lensTopPos=0}if(bound.left){self.windowLeftPos=0;lensLeftPos=0;self.tintpos=0}switch(self.options.zoomType){case"window":if(bound.bottom){lensTopPos=Math.max(self.img_small.height-self.zoomLens.height()-self.options.lensBorderSize*2,0)}if(bound.right){lensLeftPos=self.img_small.width-self.zoomLens.width()-self.options.lensBorderSize*2}if(self.options.tint){self.setTintPosition(e)}break;case"inner":if(bound.bottom){lensTopPos=Math.max(self.img_small.height-self.options.lensBorderSize*2,0)}if(bound.right){lensLeftPos=-self.options.lensBorderSize*2}break;case"lens":self.windowLeftPos=self.zoomLens.width()/2-self.mouse.left*self.ratio.width;self.windowTopPos=self.zoomLens.height()/2-self.mouse.top*self.ratio.height;self.zoomLens.css({backgroundPosition:self.windowLeftPos+"px "+self.windowTopPos+"px"});self.changeBackgroundSize();if(self.options.tint){self.setTintPosition(e)}break}self.setWindowPosition(e);if(self.options.showLens){if(self.fullwidth&&self.options.zoomType!=="lens"){lensLeftPos=0}self.zoomLens.css({left:lensLeftPos+"px",top:lensTopPos+"px"})}}},showZoomWindow:function(on){var self=this;if(self.isWindowActive===on){return}self.fadeEffect(self.zoomWindow,on,self.options.zoomWindowFadeIn,self.options.zoomWindowFadeOut);self.isWindowActive=on},showLens:function(on){var self=this;if(!self.options.showLens){return}if(self.isLensActive===on){return}self.fadeEffect(self.zoomLens,on,self.options.lensFadeIn,self.options.lensFadeOut);self.isLensActive=on},showTint:function(on){var self=this;if(!self.options.tint||self.options.zoomType==="inner"){return}if(self.isTintActive===on){return}if(on){self.zoomTint.css({opacity:self.options.tintOpacity}).animate()}self.fadeEffect(self.zoomTint,on,"slow","slow");self.isTintActive=on},fadeEffect:function(element,action,time_in,time_out){if(action){if(time_in>0){element.stop(true,true,false).fadeIn(time_in)}else{element.show()}}else{if(time_out>0){element.stop(true,true).fadeOut(time_out)}else{element.hide()}}},setWindowPosition:function(e){var self=this;if(self.options.zoomType==="inner"){self.options.zoomWindowPosition=1}self.options.zoomWindowOffsetx=parseInt(self.options.zoomWindowOffsetx);self.options.zoomWindowOffsety=parseInt(self.options.zoomWindowOffsety);var windowOffsetTop=self.options.zoomWindowOffsety;var windowOffsetLeft=self.img_small.width;if(!isNaN(self.options.zoomWindowPosition)){switch(self.options.zoomWindowPosition){case 4:case 5:case 6:case 7:case 8:windowOffsetTop=self.img_small.height;break;case 12:case 13:case 14:case 15:case 16:windowOffsetTop=-self.zoomWindow.height()-self.options.borderSize*2;break;case 1:case 11:windowOffsetTop=self.options.zoomWindowOffsety;break;case 2:case 10:windowOffsetTop=self.img_small.height/2-self.zw.height/2;break;case 3:case 9:windowOffsetTop=self.img_small.height-self.zoomWindow.height()-self.options.borderSize*2;break}switch(self.options.zoomWindowPosition){case 1:case 2:case 3:case 4:case 16:windowOffsetLeft=self.img_small.width+self.options.zoomWindowOffsetx;if(self.options.responsive===true&&self.options.zoomType==="window"){if(self.$elem.offset().left+windowOffsetLeft+self.zw.width>=self.screen.width){self.zw.width=self.screen.width-self.$elem.offset().left-windowOffsetLeft-20;self.zoomWindow.css({width:self.zw.width});self.zoomLens.css({width:self.zw.width/self.ratio.width})}}break;case 8:case 9:case 10:case 11:case 12:if(self.options.responsive===true&&self.options.zoomType==="window"){if(self.zw.width+self.options.borderSize*2+self.options.zoomWindowOffsetx>=self.$elem.offset().left){self.zw.width=self.$elem.offset().left-self.options.borderSize*2-self.options.zoomWindowOffsetx-20;self.zoomWindow.css({width:self.zw.width});self.zoomLens.css({width:self.zw.width/self.ratio.width})}}windowOffsetLeft=-self.zw.width-self.options.borderSize*2-self.options.zoomWindowOffsetx*2;break;case 5:case 15:windowOffsetLeft=self.img_small.width-self.zoomWindow.width()-self.options.borderSize*2;break;case 6:case 14:windowOffsetLeft=self.img_small.width/2-self.zw.width/2-self.options.borderSize*2;break;case 7:case 13:windowOffsetLeft=0;break}}else{var externalContainer=$("#"+self.options.zoomWindowPosition).offset();windowOffsetTop=externalContainer.top;windowOffsetLeft=externalContainer.left}self.isWindowSet=true;windowOffsetTop=windowOffsetTop+self.options.zoomWindowOffsety;windowOffsetLeft=windowOffsetLeft+self.options.zoomWindowOffsetx;self.zoomWindow.css({top:windowOffsetTop,left:windowOffsetLeft});if(self.options.zoomType==="inner"){self.zoomWindow.css({top:0,left:0})}self.windowLeftPos=self.zoomWindow.width()/2-self.mouse.left*self.ratio.width;self.windowTopPos=self.zoomWindow.height()/2-self.mouse.top*self.ratio.height;if(self.bound.top){self.windowTopPos=0}if(self.bound.left){self.windowLeftPos=0}if(self.bound.bottom){self.windowTopPos=(self.img_big.height/self.currentZoomLevel-self.zoomWindow.height())*-1}if(self.bound.right){self.windowLeftPos=(self.img_big.width/self.currentZoomLevel-self.zoomWindow.width())*-1}if(self.fullheight){self.windowTopPos=0}if(self.fullwidth){self.windowLeftPos=0}if(self.options.zoomType==="window"||self.options.zoomType==="inner"){if(self.zoomLock===1){if(self.ratio.width<=1){self.windowLeftPos=0}if(self.ratio.height<=1){self.windowTopPos=0}}if(self.img_big.height<self.zw.height){self.windowTopPos=0}if(self.img_big.width<self.zw.width){self.windowLeftPos=0}if(self.options.easingAmount>0){self.easingEffect(e)}else{self.changeBackgroundSize();self.zoomWindow.css({backgroundPosition:self.windowLeftPos+"px "+self.windowTopPos+"px"})}}},changeBackgroundSize:function(){var self=this;if(!self.changeBgSize){return}var newvalue=self.newvaluewidth;if(self.img_small.height>self.img_small.width){newvalue=self.newvalueheight}var bgSize={"background-size":self.img_big.width/self.newvalue+"px "+self.img_big.height/self.newvalue+"px"};if(self.options.zoomType==="lens"){self.zoomLens.css(bgSize)}self.zoomWindow.css(bgSize);self.changeBgSize=false},easingEffect:function(){var self=this;if(!self.xp){self.xp=0}if(!self.yp){self.yp=0}if(!self.loop){self.loop=setInterval(function(){self.xp+=(self.windowLeftPos-self.xp)/self.options.easingAmount;self.yp+=(self.windowTopPos-self.yp)/self.options.easingAmount;if(self.scrollingLock){clearInterval(self.loop);self.xp=self.zoomWindow.width()/2-self.mouse.left*self.ratio.width;self.yp=self.zoomWindow.height()/2-self.mouse.top*self.ratio.height;self.changeBackgroundSize();self.zoomWindow.css({backgroundPosition:self.windowLeftPos+"px "+self.windowTopPos+"px"});self.scrollingLock=false;self.loop=false}else{self.changeBackgroundSize();self.zoomWindow.css({backgroundPosition:self.xp+"px "+self.yp+"px"})}},16)}},setTintPosition:function(){var self=this;if(!self.options.tint){return}self.tintpos=self.zoomLens.width()/2-self.mouse.left;self.tintposy=self.zoomLens.height()/2-self.mouse.top;if(self.bound.top||self.fullheight){self.tintposy=0}if(self.bound.left||self.fullwidth){self.tintpos=0}if(self.bound.bottom){self.tintposy=(self.img_small.height-self.zoomLens.height()-self.options.lensBorderSize*2)*-1}if(self.bound.right){self.tintpos=(self.img_small.width-self.zoomLens.width()-self.options.lensBorderSize*2)*-1}self.zoomTintImage.css({left:self.tintpos+"px",top:self.tintposy+"px"})},changeZoomLevel:function(value){var self=this;self.scrollingLock=true;var newvalue=parseFloat(value).toFixed(2);self.newvalue=newvalue;var maxHeight=self.img_big.height/self.zw.height;var maxWidth=self.img_big.width/self.zw.width;if(self.options.zoomType!=="inner"){if(maxHeight<=newvalue){self.newvalueheight=maxHeight;self.fullheight=true}else{self.newvalueheight=newvalue;self.fullheight=false}self.ratio.height=self.img_big.height/self.newvalueheight/self.img_small.height;if(maxWidth<=newvalue){self.newvaluewidth=maxWidth;self.fullwidth=true}else{self.newvaluewidth=newvalue;self.fullwidth=false}self.ratio.width=self.img_big.width/self.newvaluewidth/self.img_small.width}else{maxHeight=parseFloat(self.img_big.height/self.img_small.height).toFixed(2);maxWidth=parseFloat(self.img_big.width/self.img_small.width).toFixed(2);newvalue=Math.min(maxHeight,maxWidth,newvalue);self.newvalueheight=newvalue;self.ratio.height=self.img_big.height/newvalue/self.img_small.height;if(maxHeight<=newvalue){self.fullheight=true}else{self.fullheight=false}self.ratio.width=self.img_big.width/newvalue/self.img_small.width;if(maxWidth<=newvalue){self.newvaluewidth=maxWidth;self.fullwidth=true}else{self.newvaluewidth=newvalue;self.fullwidth=false}}var scrcontinue=true;if(self.options.zoomType==="inner"&&self.newvaluewidth>maxWidth){scrcontinue=false;self.fullheight=true;self.fullwidth=true}if(scrcontinue){self.zoomLock=0;self.changeZoom=true;if(self.zw.height/self.ratio.height<=self.img_small.height){self.currentZoomLevel=self.newvalueheight;self.changeBgSize=true;if(self.options.zoomType==="window"){self.zoomLens.css({height:String(self.zw.height/self.ratio.height)+"px"})}}if(self.zw.width/self.ratio.width<=self.img_small.width){if(self.options.zoomType!=="inner"&&self.newvaluewidth>self.newvalueheight){self.currentZoomLevel=self.newvaluewidth}self.changeBgSize=true;if(self.options.zoomType==="window"){self.zoomLens.css({width:String(self.zw.width/self.ratio.width)+"px"})}}if(self.options.zoomType==="inner"){self.changeBgSize=true;if(self.img_small.width!==self.img_small.height){self.currentZoomLevel=self.newvaluewidth}}}self.setPosition(self.currentLoc)}};$.fn.image_zoom=function(options){return this.each(function(){function F(){}var settings=$.extend(true,{},$.fn.image_zoom.options,options);F.prototype=ImageZoooom;var zoom=new F;zoom.init(settings,this)})};$.fn.image_zoom.options={zoomEnabled:true,zoomLevel:1,scrollZoom:false,scrollZoomIncrement:.1,minZoomLevel:false,maxZoomLevel:false,easingAmount:12,lensSize:200,zoomWindowWidth:400,zoomWindowHeight:360,zoomWindowOffsetx:0,zoomWindowOffsety:0,zoomWindowPosition:1,zoomWindowBgColour:"#fff",zoomWindowShadow:4,lensFadeIn:false,lensFadeOut:false,lensOverlay:false,zoomWindowFadeIn:false,zoomWindowFadeOut:false,zoomWindowAlwaysShow:false,zoomTintFadeIn:false,zoomTintFadeOut:false,borderSize:4,showLens:true,borderColour:"#888",borderRadius:0,lensBorderSize:1,lensBorderColour:"#000",lensShape:"square",zoomType:"window",containLensZoom:false,lensColour:"white",lensOpacity:.4,lenszoom:false,tint:false,tintColour:"#333",tintOpacity:.4,cursor:"default",responsive:false,responsiveThreshold:550,customText:"",customTextSize:12,customTextColor:"#ccc",customTextAlign:"bottom",customTextVAlign:"right",onComplete:$.noop}})(jQuery,window,document);
|
2 |
* Copyright (c) 2016 Diana Burduja; Licensed MIT license
|
3 |
|
4 |
This is a very strongly modified version of the https://github.com/elevateweb/elevatezoom jQuery plugin. */
|
5 |
+
(function($,window,document,undefined){"use strict";var ImageZoooom={init:function(options,elem){var self=this;self.elem=elem;self.$elem=$(elem);self.options=options;self.img_big={src:self.$elem.attr("src")};if(self.$elem.data("zoom-image")){self.img_big.src=self.$elem.data("zoom-image")}else if(self.$elem.attr("srcset")){var set=self.$elem.attr("srcset").split(", ");var max_width=0;var max_src="";$.each(set,function(i,src){var parts=String.prototype.trim(src).split(" ");if(parseInt(parts[1])>max_width){max_width=parseInt(parts[1]);max_src=parts[0]}});if(max_src!==""){self.img_big.src=max_src}}self.ratio={width:1,height:1};self.zw={height:parseInt(self.options.zoomWindowHeight),width:parseInt(self.options.zoomWindowWidth)};self.lens={height:self.options.lensSize,width:self.options.lensSize};self.screen={height:$(document).height(),width:$(document).width()};if(self.options.tint){self.options.lensColour="none";self.options.lensOpacity="1"}if(self.options.zoomType==="inner"){self.options.showLens=false}self.$elem.parent().removeAttr("title").removeAttr("alt");if(self.options.responsive===true&&self.screen.width<=self.options.responsiveThreshold){self.options.zoomType="inner";self.options.showLens=false}setTimeout(function(){var newImg=new Image;newImg.onload=function(){self.img_big.width=newImg.width;self.img_big.height=newImg.height;self.startZoom()};newImg.src=self.img_big.src},1)},buildZoomContainer:function(){var self=this;self.zoomContainer=$("<div />").addClass("zoomContainer").css({"-webkit-transform":"translateZ(0)",position:"absolute",left:self.img_small.offset.left+"px",top:self.img_small.offset.top+"px",height:self.img_small.height+"px",width:self.img_small.width+"px","z-index":"999"}).appendTo("body")},buildZoomLens:function(){var self=this;if(self.options.containLensZoom){self.zoomContainer.css("overflow","hidden")}var lensStyle={"background-position":"0px 0px","float":"left",display:"none",border:self.options.borderSize+"px solid "+self.options.borderColour,width:self.options.lensSize+"px",height:self.options.lensSize+"px","border-radius":self.options.borderRadius+"px",cursor:self.options.cursor,"background-repeat":"no-repeat",position:"absolute",overflow:"hidden","z-index":"999"};if(self.options.tint===true){lensStyle["-webkit-transform"]="translateZ(0)";lensStyle["opacity"]=self.options.lensOpacity;lensStyle["-ms-filter"]="progid:DXImageTransform.Microsoft.Alpha(Opacity="+self.options.lensOpacity*100+")";lensStyle["filter"]="alpha(opacity= "+self.options.lensOpacity*100+")"}if(self.options.lensShape==="round"){var lensRadius=self.options.lensSize/2+self.options.borderSize+"px";lensStyle["-webkit-border-radius"]=lensRadius;lensStyle["-moz-border-radius"]=lensRadius;lensStyle["border-radius"]=lensRadius}self.zoomLens=$("<div />").addClass("zoomLens").css(lensStyle).appendTo(self.zoomContainer).on('click',function(){self.$elem.trigger("click")})},buildZoomWindow:function(){var self=this;self.lens.height=self.zw.height/self.ratio.height;if(self.img_big.height<self.zw.height){self.lens.height=self.img_small.height}self.lens.width=self.zw.width/self.ratio.width;if(self.img_big.width<self.zw.width){self.lens.width=self.img_small.width}var lensStyle={"background-position":"0px 0px",display:"none",overflow:"hidden","z-index":"999","-webkit-transform":"translateZ(0)",opacity:self.options.lensOpacity,"-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity="+self.options.lensOpacity*100+")",filter:"alpha(opacity= "+self.options.lensOpacity*100+")",zoom:1,width:self.lens.width+"px",height:self.lens.height+"px","background-color":self.options.lensColour,cursor:self.options.cursor,"border-radius":self.options.borderRadius+"px",border:self.options.lensBorderSize+"px solid "+self.options.lensBorderColour,"background-repeat":"no-repeat",position:"absolute","box-shadow":"-0px -0px 10px rgba(0, 0, 0, 0.4)"};if(self.options.lensOverlay!==false){lensStyle["background"]="url("+self.options.lensOverlay+") "+self.options.lensColour}self.zoomLens=$("<div />").addClass("zoomLens").css(lensStyle).appendTo(self.zoomContainer).on('click',function(){self.$elem.trigger("click")});var zoomWindowStyle={overflow:"hidden","background-position":"0px 0px","text-align":"center","background-color":self.options.zoomWindowBgColour,width:self.zw.width+"px",height:self.zw.height+"px","float":"left","border-radius":self.options.borderRadius+"px","background-size":self.img_big.width/self.currentZoomLevel+"px "+self.img_big.height/self.currentZoomLevel+"px",display:"none","z-index":"999",border:self.options.borderSize+"px solid "+self.options.borderColour,"background-repeat":"no-repeat",position:"absolute"};if(self.options.zoomWindowShadow>0){var zoomWindowShadowText=self.options.zoomWindowShadow*2+"px "+self.options.zoomWindowShadow*2+"px "+self.options.zoomWindowShadow+"px #ccc";zoomWindowStyle["box-shadow"]=zoomWindowShadowText;zoomWindowStyle["-moz-box-shadow"]=zoomWindowShadowText;zoomWindowStyle["-webkit-box-shadow"]=zoomWindowShadowText;zoomWindowStyle["-khtml-box-shadow"]=zoomWindowShadowText}return zoomWindowStyle},buildZoomInner:function(){var self=this;var borderWidth=self.$elem.css("border-left-width");var innerStyle={overflow:"hidden","margin-left":borderWidth,"margin-top":borderWidth,"background-position":"0px 0px",width:self.img_small.width+"px",height:self.img_small.height+"px","float":"left","border-radius":self.options.borderRadius+"px",display:"none",cursor:self.options.cursor,"background-repeat":"no-repeat",position:"absolute","z-index":"999"};return innerStyle},buildTint:function(){var self=this;if(!self.options.tint){return}var tintStyle={display:"block",position:"absolute","background-color":self.options.tintColour,filter:"alpha(opacity=0)",border:"none",opacity:0,"z-index":250,width:self.img_small.width+"px",height:self.img_small.height+"px"};self.tintContainer=$("<div />").addClass("tintContainer");self.zoomTint=$("<div />").addClass("zoomTint").css(tintStyle);self.zoomLens.wrap(self.tintContainer);self.zoomLens.after(self.zoomTint);var zoomTintImageCss={position:"absolute",left:"0px",top:"0px","z-index":"250",opacity:"0","max-width":"none",width:self.img_small.width+"px",height:self.img_small.height+"px"};if(self.options.zoomType==="window"){zoomTintImageCss.opacity=1}self.zoomTintImage=$("<img />").css(zoomTintImageCss).attr("src",self.img_big.src).appendTo(self.zoomLens).on('click',function(){self.$elem.trigger("click")})},startZoom:function(){var self=this;self.isWindowActive=false;self.isLensActive=false;self.isTintActive=false;self.zoomLock=1;self.scrollingLock=false;self.changeBgSize=false;self.currentZoomLevel=self.options.zoomLevel;self.img_small={src:self.$elem.attr("src"),width:self.$elem.width(),height:self.$elem.height(),offset:self.$elem.offset()};self.ratio={width:self.img_big.width/self.img_small.width/self.currentZoomLevel,height:self.img_big.height/self.img_small.height/self.currentZoomLevel};if((self.ratio.height<1||self.ratio.width<1)&&self.options.scrollZoom!==true){return false}self.img_small.offset=self.$elem.offset();self.buildZoomContainer();var zoomWindowStyle={};switch(self.options.zoomType){case"lens":self.buildZoomLens();self.buildTint();break;case"window":zoomWindowStyle=self.buildZoomWindow();self.buildTint();break;case"inner":zoomWindowStyle=self.buildZoomInner();break}var appendTo="body";if(!isNaN(self.options.zoomWindowPosition)){appendTo=self.zoomContainer}self.zoomWindow=$("<div />").addClass("zoomWindow").css(zoomWindowStyle).appendTo(appendTo).on('click',function(){self.$elem.trigger("click")});var customText=$("<div />").addClass("iz_watermark").css({width:self.img_small.width+"px",height:self.img_small.height+"px","vertical-align":self.options.customTextVAlign,display:"table-cell","text-align":self.options.customTextAlign,color:self.options.customTextColor,"font-size":self.options.customTextSize+"px",padding:"3px"}).html(self.options.customText);if($(".iz_watermark").length>0){$(".iz_watermark").remove()}self.zoomWindow.after(customText);self.zoomWindowContainer=$("<div/>").addClass("zoomWindowContainer").css("width",self.zw.width);self.zoomWindow.wrap(self.zoomWindowContainer);var backgroundImage={backgroundImage:"url('"+self.img_big.src+"')"};if(self.options.zoomType==="lens"){self.zoomLens.css(backgroundImage)}else{self.zoomWindow.css(backgroundImage)}self.registerTouchEvents();self.registerMouseEvents();self.registerScrollZoom();self.zoomContainer.add(self.$elem).on('mouseenter',function(){self.setElements(true)}).on('mouseleave',function(){if(!self.scrollLock){self.setElements(false)}});if(self.options.zoomType!=="inner"){self.zoomWindow.on('mouseenter',function(){self.setElements(false)})}else{self.showZoomWindow(false)}},registerTouchEvents:function(){var self=this;self.zoomContainer.on("touchstart",function(e){e.preventDefault();var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];self.mouse={left:parseInt(touch.pageX-self.img_small.offset.left),top:parseInt(touch.pageY-self.img_small.offset.top)};self.setPosition(touch);self.setElements(true)});self.zoomContainer.on("touchend",function(){if(!self.scrollLock){self.setElements(false)}});self.zoomContainer.on("touchmove",function(e){e.preventDefault();var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];self.mouse={left:parseInt(touch.pageX-self.img_small.offset.left),top:parseInt(touch.pageY-self.img_small.offset.top)};self.setPosition(touch)})},registerMouseEvents:function(){var self=this;var registerMouseMove=function(e){self.mouse={left:parseInt(e.pageX-self.img_small.offset.left),top:parseInt(e.pageY-self.img_small.offset.top)};if(self.lastX!==e.clientX||self.lastY!==e.clientY){self.setPosition(e);self.currentLoc=e}self.lastX=e.clientX;self.lastY=e.clientY};var registerMouseAndShowWindow=function(e){if(self.outOfBound===false){self.setElements(true)}registerMouseMove(e)};self.$elem.on("mousemove",registerMouseAndShowWindow);self.zoomContainer.on("mousemove",registerMouseAndShowWindow);if(self.options.zoomType==="inner"){self.zoomWindow.on("mousemove",registerMouseMove)}else{self.zoomLens.on("mousemove",registerMouseMove);if(self.options.tint){self.zoomTint.on("mousemove",registerMouseMove)}}},registerScrollZoom:function(){var self=this;if(!self.options.scrollZoom){return false}if(self.options.zoomLevel!==1){self.changeZoomLevel(self.currentZoomLevel)}var minZoomLevel=self.options.scrollZoomIncrement*2;if(self.options.minZoomLevel){minZoomLevel=self.options.minZoomLevel}var registerScrollZoomEvent=function(e){self.scrollLock=true;clearTimeout($.data(this,"timer"));$.data(this,"timer",setTimeout(function(){self.scrollLock=false},250));var theEvent=e.originalEvent.wheelDelta||e.originalEvent.detail*-1;e.stopImmediatePropagation();e.stopPropagation();e.preventDefault();var changeZoom=0;self.currentZoomLevel=parseFloat(self.currentZoomLevel);if(theEvent>0){if(self.currentZoomLevel>=minZoomLevel){changeZoom=self.currentZoomLevel-self.options.scrollZoomIncrement}}else{changeZoom=self.currentZoomLevel+self.options.scrollZoomIncrement}self.changeZoomLevel(changeZoom);return false};self.zoomContainer.add(self.$elem).on("mousewheel DOMMouseScroll MozMousePixelScroll",registerScrollZoomEvent)},setElements:function(type){var self=this;if(!self.options.zoomEnabled){return false}if(!self.isWindowSet){return}self.showZoomWindow(type);self.showLens(type);self.showTint(type)},setPosition:function(e){var self=this;if(!self.options.zoomEnabled){return false}if(self.options.tint&&self.options.zoomType!=="inner"){self.zoomTint.css({top:0,left:0})}if(self.options.responsive&&!self.options.scrollZoom&&self.options.showLens){if(self.options.zoomType==="lens"){self.zoomLens.css({width:self.options.lensSize+"px",height:self.options.lensSize+"px"})}else{var lensHeight=self.zw.height/self.ratio.height;if(self.img_small.height<self.zw.width/self.ratio.width){lensHeight=self.img_small.height}var lensWidth=self.zw.width/self.ratio.width;if(self.img_small.width<self.zw.width/self.ratio.height){lensWidth=self.img_small.width}self.zoomLens.css({width:lensWidth+"px",height:lensHeight+"px"});if(self.options.tint){self.zoomTintImage.css({width:self.img_small.width+"px",height:self.img_small.height+"px"})}}}self.zoomContainer.css({top:self.img_small.offset.top,left:self.img_small.offset.left});var bound={top:false,bottom:false,left:false,right:false};if(self.options.zoomType==="window"){bound.height=self.zoomLens.height()/2;bound.width=self.zoomLens.width()/2}if(self.options.zoomType==="inner"){bound.height=self.img_small.height/2/self.ratio.height;bound.width=self.img_small.width/2/self.ratio.width}bound.top=self.mouse.top<bound.height;bound.bottom=self.mouse.top>self.img_small.height-bound.height-self.options.lensBorderSize*2;bound.left=self.mouse.left<bound.width;bound.right=self.mouse.left>self.img_small.width-bound.width-self.options.lensBorderSize*2;self.bound=bound;if(self.mouse.left<=0||self.mouse.top<0||self.mouse.left>self.img_small.width||self.mouse.top>self.img_small.height){self.outOfBound=true;self.setElements(false);return}else{self.outOfBound=false;var lensLeftPos=0;var lensTopPos=0;if(self.options.showLens){lensLeftPos=self.mouse.left-self.zoomLens.width()/2;lensTopPos=self.mouse.top-self.zoomLens.height()/2}if(bound.top){lensTopPos=0}if(bound.left){self.windowLeftPos=0;lensLeftPos=0;self.tintpos=0}switch(self.options.zoomType){case"window":if(bound.bottom){lensTopPos=Math.max(self.img_small.height-self.zoomLens.height()-self.options.lensBorderSize*2,0)}if(bound.right){lensLeftPos=self.img_small.width-self.zoomLens.width()-self.options.lensBorderSize*2}if(self.options.tint){self.setTintPosition(e)}break;case"inner":if(bound.bottom){lensTopPos=Math.max(self.img_small.height-self.options.lensBorderSize*2,0)}if(bound.right){lensLeftPos=-self.options.lensBorderSize*2}break;case"lens":self.windowLeftPos=self.zoomLens.width()/2-self.mouse.left*self.ratio.width;self.windowTopPos=self.zoomLens.height()/2-self.mouse.top*self.ratio.height;self.zoomLens.css({backgroundPosition:self.windowLeftPos+"px "+self.windowTopPos+"px"});self.changeBackgroundSize();if(self.options.tint){self.setTintPosition(e)}break}self.setWindowPosition(e);if(self.options.showLens){if(self.fullwidth&&self.options.zoomType!=="lens"){lensLeftPos=0}self.zoomLens.css({left:lensLeftPos+"px",top:lensTopPos+"px"})}}},showZoomWindow:function(on){var self=this;if(self.isWindowActive===on){return}self.fadeEffect(self.zoomWindow,on,self.options.zoomWindowFadeIn,self.options.zoomWindowFadeOut);self.isWindowActive=on},showLens:function(on){var self=this;if(!self.options.showLens){return}if(self.isLensActive===on){return}self.fadeEffect(self.zoomLens,on,self.options.lensFadeIn,self.options.lensFadeOut);self.isLensActive=on},showTint:function(on){var self=this;if(!self.options.tint||self.options.zoomType==="inner"){return}if(self.isTintActive===on){return}if(on){self.zoomTint.css({opacity:self.options.tintOpacity}).animate()}self.fadeEffect(self.zoomTint,on,"slow","slow");self.isTintActive=on},fadeEffect:function(element,action,time_in,time_out){if(action){if(time_in>0){element.stop(true,true,false).fadeIn(time_in)}else{element.show()}}else{if(time_out>0){element.stop(true,true).fadeOut(time_out)}else{element.hide()}}},setWindowPosition:function(e){var self=this;if(self.options.zoomType==="inner"){self.options.zoomWindowPosition=1}self.options.zoomWindowOffsetx=parseInt(self.options.zoomWindowOffsetx);self.options.zoomWindowOffsety=parseInt(self.options.zoomWindowOffsety);var windowOffsetTop=self.options.zoomWindowOffsety;var windowOffsetLeft=self.img_small.width;if(!isNaN(self.options.zoomWindowPosition)){switch(self.options.zoomWindowPosition){case 4:case 5:case 6:case 7:case 8:windowOffsetTop=self.img_small.height;break;case 12:case 13:case 14:case 15:case 16:windowOffsetTop=-self.zoomWindow.height()-self.options.borderSize*2;break;case 1:case 11:windowOffsetTop=self.options.zoomWindowOffsety;break;case 2:case 10:windowOffsetTop=self.img_small.height/2-self.zw.height/2;break;case 3:case 9:windowOffsetTop=self.img_small.height-self.zoomWindow.height()-self.options.borderSize*2;break}switch(self.options.zoomWindowPosition){case 1:case 2:case 3:case 4:case 16:windowOffsetLeft=self.img_small.width+self.options.zoomWindowOffsetx;if(self.options.responsive===true&&self.options.zoomType==="window"){if(self.$elem.offset().left+windowOffsetLeft+self.zw.width>=self.screen.width){self.zw.width=self.screen.width-self.$elem.offset().left-windowOffsetLeft-20;self.zoomWindow.css({width:self.zw.width});self.zoomLens.css({width:self.zw.width/self.ratio.width})}}break;case 8:case 9:case 10:case 11:case 12:if(self.options.responsive===true&&self.options.zoomType==="window"){if(self.zw.width+self.options.borderSize*2+self.options.zoomWindowOffsetx>=self.$elem.offset().left){self.zw.width=self.$elem.offset().left-self.options.borderSize*2-self.options.zoomWindowOffsetx-20;self.zoomWindow.css({width:self.zw.width});self.zoomLens.css({width:self.zw.width/self.ratio.width})}}windowOffsetLeft=-self.zw.width-self.options.borderSize*2-self.options.zoomWindowOffsetx*2;break;case 5:case 15:windowOffsetLeft=self.img_small.width-self.zoomWindow.width()-self.options.borderSize*2;break;case 6:case 14:windowOffsetLeft=self.img_small.width/2-self.zw.width/2-self.options.borderSize*2;break;case 7:case 13:windowOffsetLeft=0;break}}else{var externalContainer=$("#"+self.options.zoomWindowPosition).offset();windowOffsetTop=externalContainer.top;windowOffsetLeft=externalContainer.left}self.isWindowSet=true;windowOffsetTop=windowOffsetTop+self.options.zoomWindowOffsety;windowOffsetLeft=windowOffsetLeft+self.options.zoomWindowOffsetx;self.zoomWindow.css({top:windowOffsetTop,left:windowOffsetLeft});if(self.options.zoomType==="inner"){self.zoomWindow.css({top:0,left:0})}self.windowLeftPos=self.zoomWindow.width()/2-self.mouse.left*self.ratio.width;self.windowTopPos=self.zoomWindow.height()/2-self.mouse.top*self.ratio.height;if(self.bound.top){self.windowTopPos=0}if(self.bound.left){self.windowLeftPos=0}if(self.bound.bottom){self.windowTopPos=(self.img_big.height/self.currentZoomLevel-self.zoomWindow.height())*-1}if(self.bound.right){self.windowLeftPos=(self.img_big.width/self.currentZoomLevel-self.zoomWindow.width())*-1}if(self.fullheight){self.windowTopPos=0}if(self.fullwidth){self.windowLeftPos=0}if(self.options.zoomType==="window"||self.options.zoomType==="inner"){if(self.zoomLock===1){if(self.ratio.width<=1){self.windowLeftPos=0}if(self.ratio.height<=1){self.windowTopPos=0}}if(self.img_big.height<self.zw.height){self.windowTopPos=0}if(self.img_big.width<self.zw.width){self.windowLeftPos=0}if(self.options.easingAmount>0){self.easingEffect(e)}else{self.changeBackgroundSize();self.zoomWindow.css({backgroundPosition:self.windowLeftPos+"px "+self.windowTopPos+"px"})}}},changeBackgroundSize:function(){var self=this;if(!self.changeBgSize){return}var newvalue=self.newvaluewidth;if(self.img_small.height>self.img_small.width){newvalue=self.newvalueheight}var bgSize={"background-size":self.img_big.width/self.newvalue+"px "+self.img_big.height/self.newvalue+"px"};if(self.options.zoomType==="lens"){self.zoomLens.css(bgSize)}self.zoomWindow.css(bgSize);self.changeBgSize=false},easingEffect:function(){var self=this;if(!self.xp){self.xp=0}if(!self.yp){self.yp=0}if(!self.loop){self.loop=setInterval(function(){self.xp+=(self.windowLeftPos-self.xp)/self.options.easingAmount;self.yp+=(self.windowTopPos-self.yp)/self.options.easingAmount;if(self.scrollingLock){clearInterval(self.loop);self.xp=self.zoomWindow.width()/2-self.mouse.left*self.ratio.width;self.yp=self.zoomWindow.height()/2-self.mouse.top*self.ratio.height;self.changeBackgroundSize();self.zoomWindow.css({backgroundPosition:self.windowLeftPos+"px "+self.windowTopPos+"px"});self.scrollingLock=false;self.loop=false}else{self.changeBackgroundSize();self.zoomWindow.css({backgroundPosition:self.xp+"px "+self.yp+"px"})}},16)}},setTintPosition:function(){var self=this;if(!self.options.tint){return}self.tintpos=self.zoomLens.width()/2-self.mouse.left;self.tintposy=self.zoomLens.height()/2-self.mouse.top;if(self.bound.top||self.fullheight){self.tintposy=0}if(self.bound.left||self.fullwidth){self.tintpos=0}if(self.bound.bottom){self.tintposy=(self.img_small.height-self.zoomLens.height()-self.options.lensBorderSize*2)*-1}if(self.bound.right){self.tintpos=(self.img_small.width-self.zoomLens.width()-self.options.lensBorderSize*2)*-1}self.zoomTintImage.css({left:self.tintpos+"px",top:self.tintposy+"px"})},changeZoomLevel:function(value){var self=this;self.scrollingLock=true;var newvalue=parseFloat(value).toFixed(2);self.newvalue=newvalue;var maxHeight=self.img_big.height/self.zw.height;var maxWidth=self.img_big.width/self.zw.width;if(self.options.zoomType!=="inner"){if(maxHeight<=newvalue){self.newvalueheight=maxHeight;self.fullheight=true}else{self.newvalueheight=newvalue;self.fullheight=false}self.ratio.height=self.img_big.height/self.newvalueheight/self.img_small.height;if(maxWidth<=newvalue){self.newvaluewidth=maxWidth;self.fullwidth=true}else{self.newvaluewidth=newvalue;self.fullwidth=false}self.ratio.width=self.img_big.width/self.newvaluewidth/self.img_small.width}else{maxHeight=parseFloat(self.img_big.height/self.img_small.height).toFixed(2);maxWidth=parseFloat(self.img_big.width/self.img_small.width).toFixed(2);newvalue=Math.min(maxHeight,maxWidth,newvalue);self.newvalueheight=newvalue;self.ratio.height=self.img_big.height/newvalue/self.img_small.height;if(maxHeight<=newvalue){self.fullheight=true}else{self.fullheight=false}self.ratio.width=self.img_big.width/newvalue/self.img_small.width;if(maxWidth<=newvalue){self.newvaluewidth=maxWidth;self.fullwidth=true}else{self.newvaluewidth=newvalue;self.fullwidth=false}}var scrcontinue=true;if(self.options.zoomType==="inner"&&self.newvaluewidth>maxWidth){scrcontinue=false;self.fullheight=true;self.fullwidth=true}if(scrcontinue){self.zoomLock=0;self.changeZoom=true;if(self.zw.height/self.ratio.height<=self.img_small.height){self.currentZoomLevel=self.newvalueheight;self.changeBgSize=true;if(self.options.zoomType==="window"){self.zoomLens.css({height:String(self.zw.height/self.ratio.height)+"px"})}}if(self.zw.width/self.ratio.width<=self.img_small.width){if(self.options.zoomType!=="inner"&&self.newvaluewidth>self.newvalueheight){self.currentZoomLevel=self.newvaluewidth}self.changeBgSize=true;if(self.options.zoomType==="window"){self.zoomLens.css({width:String(self.zw.width/self.ratio.width)+"px"})}}if(self.options.zoomType==="inner"){self.changeBgSize=true;if(self.img_small.width!==self.img_small.height){self.currentZoomLevel=self.newvaluewidth}}}self.setPosition(self.currentLoc)}};$.fn.image_zoom=function(options){return this.each(function(){function F(){}var settings=$.extend(true,{},$.fn.image_zoom.options,options);F.prototype=ImageZoooom;var zoom=new F;zoom.init(settings,this)})};$.fn.image_zoom.options={zoomEnabled:true,zoomLevel:1,scrollZoom:false,scrollZoomIncrement:.1,minZoomLevel:false,maxZoomLevel:false,easingAmount:12,lensSize:200,zoomWindowWidth:400,zoomWindowHeight:360,zoomWindowOffsetx:0,zoomWindowOffsety:0,zoomWindowPosition:1,zoomWindowBgColour:"#fff",zoomWindowShadow:4,lensFadeIn:false,lensFadeOut:false,lensOverlay:false,zoomWindowFadeIn:false,zoomWindowFadeOut:false,zoomWindowAlwaysShow:false,zoomTintFadeIn:false,zoomTintFadeOut:false,borderSize:4,showLens:true,borderColour:"#888",borderRadius:0,lensBorderSize:1,lensBorderColour:"#000",lensShape:"square",zoomType:"window",containLensZoom:false,lensColour:"white",lensOpacity:.4,lenszoom:false,tint:false,tintColour:"#333",tintOpacity:.4,cursor:"default",responsive:false,responsiveThreshold:550,customText:"",customTextSize:12,customTextColor:"#ccc",customTextAlign:"bottom",customTextVAlign:"right",onComplete:$.noop}})(jQuery,window,document);
|
image-zoooom.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WP Image Zoom
|
4 |
* Plugin URI: https://wordpress.org/plugins/wp-image-zoooom/
|
5 |
* Description: Add zoom effect over the an image, whether it is an image in a post/page or the featured image of a product in a WooCommerce shop
|
6 |
-
* Version: 1.
|
7 |
* Author: SilkyPress
|
8 |
* Author URI: https://www.silkypress.com
|
9 |
* License: GPL2
|
@@ -11,8 +11,8 @@
|
|
11 |
* Text Domain: wp-image-zoooom
|
12 |
* Domain Path: /languages/
|
13 |
*
|
14 |
-
* WC requires at least:
|
15 |
-
* WC tested up to: 4.
|
16 |
*/
|
17 |
|
18 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -26,7 +26,7 @@ if ( ! class_exists( 'ImageZoooom' ) ) :
|
|
26 |
* @class ImageZoooom
|
27 |
*/
|
28 |
final class ImageZoooom {
|
29 |
-
public $version = '1.
|
30 |
public $theme = '';
|
31 |
protected static $_instance = null;
|
32 |
|
3 |
* Plugin Name: WP Image Zoom
|
4 |
* Plugin URI: https://wordpress.org/plugins/wp-image-zoooom/
|
5 |
* Description: Add zoom effect over the an image, whether it is an image in a post/page or the featured image of a product in a WooCommerce shop
|
6 |
+
* Version: 1.45
|
7 |
* Author: SilkyPress
|
8 |
* Author URI: https://www.silkypress.com
|
9 |
* License: GPL2
|
11 |
* Text Domain: wp-image-zoooom
|
12 |
* Domain Path: /languages/
|
13 |
*
|
14 |
+
* WC requires at least: 3.0.0
|
15 |
+
* WC tested up to: 4.9
|
16 |
*/
|
17 |
|
18 |
if ( ! defined( 'ABSPATH' ) ) {
|
26 |
* @class ImageZoooom
|
27 |
*/
|
28 |
final class ImageZoooom {
|
29 |
+
public $version = '1.45';
|
30 |
public $theme = '';
|
31 |
protected static $_instance = null;
|
32 |
|
includes/admin-side.php
CHANGED
@@ -267,6 +267,7 @@ class ImageZoooom_Admin {
|
|
267 |
'iz_dismiss_flatsome_theme',
|
268 |
'iz_dismiss_smart_image_resize',
|
269 |
'iz_dismiss_gallery_video',
|
|
|
270 |
);
|
271 |
|
272 |
$w = new SilkyPress_Warnings( $allowed_actions );
|
@@ -359,7 +360,12 @@ class ImageZoooom_Admin {
|
|
359 |
$w->add_notice( 'iz_dismiss_gallery_video', $message );
|
360 |
}
|
361 |
|
362 |
-
|
|
|
|
|
|
|
|
|
|
|
363 |
|
364 |
$w->show_warnings();
|
365 |
}
|
267 |
'iz_dismiss_flatsome_theme',
|
268 |
'iz_dismiss_smart_image_resize',
|
269 |
'iz_dismiss_gallery_video',
|
270 |
+
'iz_dismiss_woo_product_gallery_slider',
|
271 |
);
|
272 |
|
273 |
$w = new SilkyPress_Warnings( $allowed_actions );
|
360 |
$w->add_notice( 'iz_dismiss_gallery_video', $message );
|
361 |
}
|
362 |
|
363 |
+
// Warning about the Product Gallery Slider for WooCommerce plugin.
|
364 |
+
if ( is_plugin_active( 'woo-product-gallery-slider/woo-product-gallery-slider.php' ) && $w->is_url( 'zoooom_settings' ) ) {
|
365 |
+
$gallery_plugin_url = 'https://wordpress.org/plugins/woo-product-gallery-slider/';
|
366 |
+
$message = sprintf( __( 'The <a href="%1$s" target="_blank">Product Gallery Slider for WooCommerce</a> plugin replaces the default WooCommerce gallery with a custom implementation, which, unfortunately, is not compatible with the <b>WP Image Zoom</b> plugin. You can try the image zoom plugin with the default WooCommerce gallery by deactivating the <b>Product Gallery Slider for WooCommerce</b> plugin.' ), $gallery_plugin_url );
|
367 |
+
$w->add_notice( 'iz_dismiss_woo_product_gallery_slider', $message );
|
368 |
+
}
|
369 |
|
370 |
$w->show_warnings();
|
371 |
}
|
includes/class-iz-compatibilities.php
CHANGED
@@ -19,6 +19,7 @@ class IZ_Compatibilities {
|
|
19 |
add_action( 'wp_head', 'IZ_Compatibilities::wp_head', 40 );
|
20 |
add_action( 'vc_after_init', 'IZ_Compatibilities::vc_after_init' );
|
21 |
add_action( 'after_setup_theme', 'IZ_Compatibilities::after_setup_theme' );
|
|
|
22 |
}
|
23 |
|
24 |
|
@@ -206,6 +207,17 @@ class IZ_Compatibilities {
|
|
206 |
vc_update_shortcode_param( 'vc_single_image', $param );
|
207 |
}
|
208 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
210 |
|
211 |
IZ_Compatibilities::init();
|
19 |
add_action( 'wp_head', 'IZ_Compatibilities::wp_head', 40 );
|
20 |
add_action( 'vc_after_init', 'IZ_Compatibilities::vc_after_init' );
|
21 |
add_action( 'after_setup_theme', 'IZ_Compatibilities::after_setup_theme' );
|
22 |
+
add_action( 'init', 'IZ_Compatibilities::admin_side' );
|
23 |
}
|
24 |
|
25 |
|
207 |
vc_update_shortcode_param( 'vc_single_image', $param );
|
208 |
}
|
209 |
}
|
210 |
+
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Admin side modifications.
|
214 |
+
*/
|
215 |
+
public static function admin_side() {
|
216 |
+
if ( ! is_admin() ) return;
|
217 |
+
if ( strpos( strtolower( get_template() ), 'enfold' ) !== false ) {
|
218 |
+
add_theme_support( 'avia_template_builder_custom_css' );
|
219 |
+
}
|
220 |
+
}
|
221 |
}
|
222 |
|
223 |
IZ_Compatibilities::init();
|
includes/frm/class-form-fields.php
CHANGED
@@ -332,7 +332,7 @@ if ( ! class_exists( '\SilkyPressFrm\Form_Fields' ) ) {
|
|
332 |
* @param string $type The message type.
|
333 |
* @param string $message The message.
|
334 |
*/
|
335 |
-
public function add_message( $type = '', $message ) {
|
336 |
$this->messages[] = array( $type, $message );
|
337 |
}
|
338 |
|
332 |
* @param string $type The message type.
|
333 |
* @param string $message The message.
|
334 |
*/
|
335 |
+
public function add_message( $type = '', $message = '' ) {
|
336 |
$this->messages[] = array( $type, $message );
|
337 |
}
|
338 |
|
includes/frm/premium-tooltips.php
CHANGED
@@ -81,7 +81,7 @@ class SilkyPress_PremiumTooltips {
|
|
81 |
?>
|
82 |
<script type="text/javascript">
|
83 |
jQuery(document).ready(function($){
|
84 |
-
$(".form-group.disabled-short, .form-group.disabled").click
|
85 |
if(typeof window.tooltip != "undefined"){
|
86 |
clearTimeout(window.tooltip);
|
87 |
}
|
81 |
?>
|
82 |
<script type="text/javascript">
|
83 |
jQuery(document).ready(function($){
|
84 |
+
$(".form-group.disabled-short, .form-group.disabled").on('click', function(e){
|
85 |
if(typeof window.tooltip != "undefined"){
|
86 |
clearTimeout(window.tooltip);
|
87 |
}
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Contributors: diana_burduja
|
|
4 |
Email: diana@burduja.eu
|
5 |
Tags: e-commerce, featured image, hover over image zoom, image, image zoom, image zoom plugin, image magnification, image magnifier, jquery picture zoom, magnifier, magnify image, magnifying glass, mouse over image zoom, panorama, picture zoom, product image, product zoom, product magnification, product magnifier, responsive, woocommerce product zoom, woocommerce zoom, woocommerce magnifying glass, zoom, zoom image, zoom plugin, woocommerce image zoom, woocommerce product image zoom, woocommerce zoom magnifier
|
6 |
Requires at least: 3.0.1
|
7 |
-
Tested up to: 5.
|
8 |
-
Stable tag: 1.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
Requires PHP: 5.2.4
|
@@ -42,6 +42,7 @@ For applying the zoom on an image on a page/post from within a page builder, you
|
|
42 |
* Avia Layout Builder - [screenshot](https://www.silkypress.com/wp-content/uploads/2019/04/enfold-apply-zoooom.png) (used by the Enfold theme)
|
43 |
* Fusion Page Builder - [screenshot](https://www.silkypress.com/wp-content/uploads/2020/04/fusion-zoooom.png)
|
44 |
* Brizy Page Builder - [screenshot](https://www.silkypress.com/wp-content/uploads/2019/01/zoom-brizy.png)
|
|
|
45 |
The zoom works alright only with Image elements. Unfortunately, trying to apply the zoom on an image gallery will make the zoom work only on the first image of the gallery. With the WP Image Zoom Pro the zoom can also be applied on image galleries.
|
46 |
|
47 |
= Why should you upgrade to WP Image Zoom Pro? =
|
@@ -154,6 +155,12 @@ Alternatively you can upgrade to the Pro version, as there the zoom lens is buil
|
|
154 |
|
155 |
== Changelog ==
|
156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
= 1.44 =
|
158 |
* 09/26/2020
|
159 |
* Disable the Images Lazy Loading functionality from the Litespeed Cache plugin
|
4 |
Email: diana@burduja.eu
|
5 |
Tags: e-commerce, featured image, hover over image zoom, image, image zoom, image zoom plugin, image magnification, image magnifier, jquery picture zoom, magnifier, magnify image, magnifying glass, mouse over image zoom, panorama, picture zoom, product image, product zoom, product magnification, product magnifier, responsive, woocommerce product zoom, woocommerce zoom, woocommerce magnifying glass, zoom, zoom image, zoom plugin, woocommerce image zoom, woocommerce product image zoom, woocommerce zoom magnifier
|
6 |
Requires at least: 3.0.1
|
7 |
+
Tested up to: 5.6
|
8 |
+
Stable tag: 1.45
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
Requires PHP: 5.2.4
|
42 |
* Avia Layout Builder - [screenshot](https://www.silkypress.com/wp-content/uploads/2019/04/enfold-apply-zoooom.png) (used by the Enfold theme)
|
43 |
* Fusion Page Builder - [screenshot](https://www.silkypress.com/wp-content/uploads/2020/04/fusion-zoooom.png)
|
44 |
* Brizy Page Builder - [screenshot](https://www.silkypress.com/wp-content/uploads/2019/01/zoom-brizy.png)
|
45 |
+
* Tatsu Page Builder - [screencast](https://www.dropbox.com/h?preview=tatsu-builder-zoom.flv)
|
46 |
The zoom works alright only with Image elements. Unfortunately, trying to apply the zoom on an image gallery will make the zoom work only on the first image of the gallery. With the WP Image Zoom Pro the zoom can also be applied on image galleries.
|
47 |
|
48 |
= Why should you upgrade to WP Image Zoom Pro? =
|
155 |
|
156 |
== Changelog ==
|
157 |
|
158 |
+
= 1.45 =
|
159 |
+
* 12/18/2020
|
160 |
+
* Enable the "Custom CSS" field for the Avia page builder elements
|
161 |
+
* Declare incompatibility with the Product Gallery Slider for WooCommerce plugin
|
162 |
+
* Test with PHP 8.0, WordPress 5.6, WooCommerce 4.8, jQuery 3.5.1
|
163 |
+
|
164 |
= 1.44 =
|
165 |
* 09/26/2020
|
166 |
* Disable the Images Lazy Loading functionality from the Litespeed Cache plugin
|