Version Description
Download this release
Release Info
Developer | yithemes |
Plugin | YITH WooCommerce Zoom Magnifier |
Version | 1.2.20 |
Comparing to | |
See all releases |
Code changes from version 1.2.19 to 1.2.20
- README.txt +9 -3
- assets/js/yith_magnifier.js +790 -790
- init.php +3 -3
- languages/yith-woocommerce-zoom-magnifier-es_ES.mo +0 -0
- languages/yith-woocommerce-zoom-magnifier-es_ES.po +489 -0
- languages/yith-woocommerce-zoom-magnifier.pot +1 -1
- plugin-fw/assets/css/yit-plugin-panel-sidebar.css +29 -18
- plugin-fw/assets/images/upgrade-page/01.jpg +0 -0
- plugin-fw/assets/images/upgrade-page/02.jpg +0 -0
- plugin-fw/assets/images/upgrade-page/03.jpg +0 -0
- plugin-fw/assets/images/upgrade-page/04.jpg +0 -0
- plugin-fw/assets/images/upgrade-page/05.jpg +0 -0
- plugin-fw/assets/images/upgrade-page/06.jpg +0 -0
- plugin-fw/assets/images/upgrade-page/07.jpg +0 -0
- plugin-fw/assets/images/upgrade-page/08.jpg +0 -0
- plugin-fw/assets/images/upgrade-page/09.jpg +0 -0
- plugin-fw/assets/js/how-to.js +6 -0
- plugin-fw/assets/js/multisite-updater.js +1 -1
- plugin-fw/assets/js/multisite-updater.min.js +1 -4
- plugin-fw/init.php +19 -2
- plugin-fw/languages/yith-plugin-fw-es_ES.mo +0 -0
- plugin-fw/languages/yith-plugin-fw-es_ES.po +1170 -0
- plugin-fw/languages/yith-plugin-fw-it_IT.mo +0 -0
- plugin-fw/languages/yith-plugin-fw-it_IT.po +64 -34
- plugin-fw/languages/yith-plugin-fw.pot +139 -25
- plugin-fw/lib/yit-plugin-panel-sidebar.php +1 -1
- plugin-fw/lib/yit-plugin-panel-wc.php +22 -7
- plugin-fw/lib/yit-plugin-panel.php +12 -16
- plugin-fw/lib/yit-plugin-subpanel.php +1 -1
- plugin-fw/lib/yit-upgrade.php +534 -528
- plugin-fw/lib/yit-video.php +6 -2
- plugin-fw/templates/panel/sidebar/widgets/widget-membership.php +12 -7
- plugin-fw/templates/upgrade/upgrade-to-pro-version.php +0 -75
- plugin-fw/yit-functions.php +19 -6
README.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Contributors: yithemes
|
4 |
Tags: zoom, magnifier, woocommerce, product image, themes, yit, e-commerce, shop, thumbnail, thumbnail slider, zoom image, carousel, image carousel
|
5 |
Requires at least: 3.5.1
|
6 |
-
Tested up to: 4.5
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -59,6 +59,11 @@ The size of the Zoom Image is automatically setted. If you want to change these
|
|
59 |
|
60 |
== Changelog ==
|
61 |
|
|
|
|
|
|
|
|
|
|
|
62 |
= Version 1.2.19 - Released: May 04, 2016 =
|
63 |
|
64 |
* Fixed: missing YITH Plugin FW files
|
@@ -235,7 +240,8 @@ If you have suggestions about how to improve YITH WooCommerce Zoom Magnifier, yo
|
|
235 |
|
236 |
= Available Languages =
|
237 |
* English (Default)
|
238 |
-
*
|
|
|
239 |
|
240 |
If you have created your own language pack, or have an update for an existing one, you can send [gettext PO and MO file](http://codex.wordpress.org/Translating_WordPress "Translating WordPress")
|
241 |
[use](http://yithemes.com/contact/ "Your Inspiration Themes") so we can bundle it into YITH WooCommerce Zoom Magnfier Languages.
|
3 |
Contributors: yithemes
|
4 |
Tags: zoom, magnifier, woocommerce, product image, themes, yit, e-commerce, shop, thumbnail, thumbnail slider, zoom image, carousel, image carousel
|
5 |
Requires at least: 3.5.1
|
6 |
+
Tested up to: 4.5.2
|
7 |
+
Stable tag: 1.2.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
59 |
|
60 |
== Changelog ==
|
61 |
|
62 |
+
= Version 1.2.20 - Released: Jun 13, 2016 =
|
63 |
+
|
64 |
+
* Added: spanish localization
|
65 |
+
* Updated: WooCommerce 2.6 100% compatible
|
66 |
+
|
67 |
= Version 1.2.19 - Released: May 04, 2016 =
|
68 |
|
69 |
* Fixed: missing YITH Plugin FW files
|
240 |
|
241 |
= Available Languages =
|
242 |
* English (Default)
|
243 |
+
* Italian
|
244 |
+
* Spanish
|
245 |
|
246 |
If you have created your own language pack, or have an update for an existing one, you can send [gettext PO and MO file](http://codex.wordpress.org/Translating_WordPress "Translating WordPress")
|
247 |
[use](http://yithemes.com/contact/ "Your Inspiration Themes") so we can bundle it into YITH WooCommerce Zoom Magnfier Languages.
|
assets/js/yith_magnifier.js
CHANGED
@@ -1,791 +1,791 @@
|
|
1 |
-
/**
|
2 |
-
* YITH Magnifier
|
3 |
-
*
|
4 |
-
* @version 0.1
|
5 |
-
* @author Your Inspiration Themes Team <info@yithemes.com>
|
6 |
-
*
|
7 |
-
* MIT License.
|
8 |
-
*/
|
9 |
-
|
10 |
-
;
|
11 |
-
(function (window, $, undefined) {
|
12 |
-
'use strict';
|
13 |
-
|
14 |
-
//include imagesLoaded plugin
|
15 |
-
if ($.fn.imagesLoaded === undefined) {
|
16 |
-
/*!
|
17 |
-
* jQuery imagesLoaded plugin v2.1.1
|
18 |
-
* http://github.com/desandro/imagesloaded
|
19 |
-
*
|
20 |
-
* MIT License. by Paul Irish et al.
|
21 |
-
*/
|
22 |
-
|
23 |
-
/*jshint curly: true, eqeqeq: true, noempty: true, strict: true, undef: true, browser: true */
|
24 |
-
/*global jQuery: false */
|
25 |
-
|
26 |
-
;
|
27 |
-
(function ($, undefined) {
|
28 |
-
'use strict';
|
29 |
-
|
30 |
-
// blank image data-uri bypasses webkit log warning (thx doug jones)
|
31 |
-
var BLANK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
|
32 |
-
|
33 |
-
$.fn.imagesLoaded = function (callback) {
|
34 |
-
var $this = this,
|
35 |
-
deferred = $.isFunction($.Deferred) ? $.Deferred() : 0,
|
36 |
-
hasNotify = $.isFunction(deferred.notify),
|
37 |
-
$images = $this.find('img').add($this.filter('img')),
|
38 |
-
loaded = [],
|
39 |
-
proper = [],
|
40 |
-
broken = [];
|
41 |
-
|
42 |
-
// Register deferred callbacks
|
43 |
-
if ($.isPlainObject(callback)) {
|
44 |
-
$.each(callback, function (key, value) {
|
45 |
-
if (key === 'callback') {
|
46 |
-
callback = value;
|
47 |
-
} else if (deferred) {
|
48 |
-
deferred[key](value);
|
49 |
-
}
|
50 |
-
});
|
51 |
-
}
|
52 |
-
|
53 |
-
function doneLoading() {
|
54 |
-
var $proper = $(proper),
|
55 |
-
$broken = $(broken);
|
56 |
-
|
57 |
-
if (deferred) {
|
58 |
-
if (broken.length) {
|
59 |
-
deferred.reject($images, $proper, $broken);
|
60 |
-
} else {
|
61 |
-
deferred.resolve($images);
|
62 |
-
}
|
63 |
-
}
|
64 |
-
|
65 |
-
if ($.isFunction(callback)) {
|
66 |
-
callback.call($this, $images, $proper, $broken);
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
-
function imgLoadedHandler(event) {
|
71 |
-
imgLoaded(event.target, event.type === 'error');
|
72 |
-
}
|
73 |
-
|
74 |
-
function imgLoaded(img, isBroken) {
|
75 |
-
// don't proceed if BLANK image, or image is already loaded
|
76 |
-
if (img.src === BLANK || $.inArray(img, loaded) !== -1) {
|
77 |
-
return;
|
78 |
-
}
|
79 |
-
|
80 |
-
// store element in loaded images array
|
81 |
-
loaded.push(img);
|
82 |
-
|
83 |
-
// keep track of broken and properly loaded images
|
84 |
-
if (isBroken) {
|
85 |
-
broken.push(img);
|
86 |
-
} else {
|
87 |
-
proper.push(img);
|
88 |
-
}
|
89 |
-
|
90 |
-
// cache image and its state for future calls
|
91 |
-
$.data(img, 'imagesLoaded', {isBroken: isBroken, src: img.src});
|
92 |
-
|
93 |
-
// trigger deferred progress method if present
|
94 |
-
if (hasNotify) {
|
95 |
-
deferred.notifyWith($(img), [isBroken, $images, $(proper), $(broken)]);
|
96 |
-
}
|
97 |
-
|
98 |
-
// call doneLoading and clean listeners if all images are loaded
|
99 |
-
if ($images.length === loaded.length) {
|
100 |
-
setTimeout(doneLoading);
|
101 |
-
$images.unbind('.imagesLoaded', imgLoadedHandler);
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
// if no images, trigger immediately
|
106 |
-
if (!$images.length) {
|
107 |
-
doneLoading();
|
108 |
-
} else {
|
109 |
-
$images.bind('load.imagesLoaded error.imagesLoaded', imgLoadedHandler)
|
110 |
-
.each(function (i, el) {
|
111 |
-
var src = el.src;
|
112 |
-
|
113 |
-
// find out if this image has been already checked for status
|
114 |
-
// if it was, and src has not changed, call imgLoaded on it
|
115 |
-
var cached = $.data(el, 'imagesLoaded');
|
116 |
-
if (cached && cached.src === src) {
|
117 |
-
imgLoaded(el, cached.isBroken);
|
118 |
-
return;
|
119 |
-
}
|
120 |
-
|
121 |
-
// if complete is true and browser supports natural sizes, try
|
122 |
-
// to check for image status manually
|
123 |
-
if (el.complete && el.naturalWidth !== undefined) {
|
124 |
-
imgLoaded(el, el.naturalWidth === 0 || el.naturalHeight === 0);
|
125 |
-
return;
|
126 |
-
}
|
127 |
-
|
128 |
-
// cached images don't fire load sometimes, so we reset src, but only when
|
129 |
-
// dealing with IE, or image is complete (loaded) and failed manual check
|
130 |
-
// webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
|
131 |
-
if (el.readyState || el.complete) {
|
132 |
-
el.src = BLANK;
|
133 |
-
el.src = src;
|
134 |
-
}
|
135 |
-
});
|
136 |
-
}
|
137 |
-
|
138 |
-
return deferred ? deferred.promise($this) : $this;
|
139 |
-
};
|
140 |
-
|
141 |
-
})(jQuery);
|
142 |
-
}
|
143 |
-
|
144 |
-
$.yith_magnifier = function (options, element) {
|
145 |
-
this.t = element;
|
146 |
-
this.element = $(element);
|
147 |
-
this._init(options);
|
148 |
-
};
|
149 |
-
|
150 |
-
$.yith_magnifier.defaults = {
|
151 |
-
zoomWidth: 'auto',
|
152 |
-
zoomHeight: 'auto',
|
153 |
-
position: 'right',
|
154 |
-
tint: false,
|
155 |
-
tintOpacity: 0.5,
|
156 |
-
lensOpacity: 0.5,
|
157 |
-
softFocus: false,
|
158 |
-
smoothMove: 3,
|
159 |
-
showTitle: true,
|
160 |
-
titleOpacity: 0.5,
|
161 |
-
adjustX: 0,
|
162 |
-
adjustY: 0,
|
163 |
-
|
164 |
-
phoneBehavior: 'inside', //allowed values: inside, disable, default
|
165 |
-
loadingLabel: 'Loading...',
|
166 |
-
|
167 |
-
enableSlider: true,
|
168 |
-
slider: 'carouFredSel',
|
169 |
-
sliderOptions: {},
|
170 |
-
|
171 |
-
onLoad: function () {
|
172 |
-
return false;
|
173 |
-
},
|
174 |
-
onEnter: function () {
|
175 |
-
return false
|
176 |
-
},
|
177 |
-
onLeave: function () {
|
178 |
-
return false
|
179 |
-
},
|
180 |
-
onMove: function () {
|
181 |
-
return false
|
182 |
-
},
|
183 |
-
onClick: function () {
|
184 |
-
return false;
|
185 |
-
},
|
186 |
-
|
187 |
-
elements: {
|
188 |
-
zoom: $('.yith_magnifier_zoom'),
|
189 |
-
zoomImage: $('.yith_magnifier_zoom img'),
|
190 |
-
gallery: $('.yith_magnifier_gallery li a')
|
191 |
-
}
|
192 |
-
};
|
193 |
-
|
194 |
-
$.yith_magnifier.prototype = {
|
195 |
-
/**
|
196 |
-
* Let's start the magnifier
|
197 |
-
*
|
198 |
-
* @param {Object} options
|
199 |
-
*
|
200 |
-
* @private
|
201 |
-
*/
|
202 |
-
_init: function (options) {
|
203 |
-
var self = this;
|
204 |
-
|
205 |
-
$(document).trigger('yith_magnifier_before_init');
|
206 |
-
|
207 |
-
$.each($.yith_magnifier.defaults.elements, function (i, v) {
|
208 |
-
var el = $.yith_magnifier.defaults.elements;
|
209 |
-
el[i] = $(v, self);
|
210 |
-
});
|
211 |
-
self.options = $.extend(true, {}, $.yith_magnifier.defaults, options);
|
212 |
-
self.isPhone = self._isPhone();
|
213 |
-
|
214 |
-
self._loading();
|
215 |
-
|
216 |
-
self.element.imagesLoaded(function () {
|
217 |
-
self.options.onLoad();
|
218 |
-
self._initZoom();
|
219 |
-
self._initGallery();
|
220 |
-
});
|
221 |
-
|
222 |
-
$(document).trigger('yith_magnifier_after_init');
|
223 |
-
},
|
224 |
-
|
225 |
-
|
226 |
-
/**
|
227 |
-
* Init gallery handlers
|
228 |
-
*
|
229 |
-
* @private
|
230 |
-
*
|
231 |
-
*/
|
232 |
-
_initGallery: function () {
|
233 |
-
var self = this;
|
234 |
-
var elements = self.options.elements;
|
235 |
-
|
236 |
-
var gallery = elements.gallery;
|
237 |
-
var zoom = elements.zoom;
|
238 |
-
var zoomImage = elements.zoomImage;
|
239 |
-
|
240 |
-
if (gallery.length > 0) {
|
241 |
-
gallery.on('click', function (e) {
|
242 |
-
e.preventDefault();
|
243 |
-
|
244 |
-
var t = $(this);
|
245 |
-
self.destroy();
|
246 |
-
|
247 |
-
zoom.attr('href', this.href);
|
248 |
-
zoomImage.attr('src', t.data('small'))
|
249 |
-
.attr('srcset', t.data('small'))
|
250 |
-
.attr('src-orig', t.data('small'))
|
251 |
-
.attr('title', '')
|
252 |
-
.attr('title', t.attr('title'));
|
253 |
-
|
254 |
-
$.data(self.t, 'yith_magnifier', new $.yith_magnifier(self.options, self.element));
|
255 |
-
});
|
256 |
-
|
257 |
-
//gallery.filter(':first').trigger('click');
|
258 |
-
|
259 |
-
if (self.options.enableSlider) {
|
260 |
-
gallery.closest('ul').trigger('yith_magnifier_slider_destroy');
|
261 |
-
gallery.closest('ul')[self.options.slider](self.options.sliderOptions);
|
262 |
-
}
|
263 |
-
|
264 |
-
} else {
|
265 |
-
gallery.on('click', function (e) {
|
266 |
-
e.preventDefault();
|
267 |
-
return false;
|
268 |
-
})
|
269 |
-
}
|
270 |
-
},
|
271 |
-
|
272 |
-
/**
|
273 |
-
* Show a loading icon while image isn't properly loaded
|
274 |
-
*
|
275 |
-
* @private
|
276 |
-
*/
|
277 |
-
_loading: function () {
|
278 |
-
if (this.options.disableRightClick) {
|
279 |
-
$(document).on('contextmenu', function (e) {
|
280 |
-
return false;
|
281 |
-
});
|
282 |
-
}
|
283 |
-
|
284 |
-
if (this.mouseTrap === undefined) {
|
285 |
-
var w = this.options.elements.zoom.width();
|
286 |
-
|
287 |
-
if (this.options.loadingLabel) {
|
288 |
-
$('<div class="yith_magnifier_loading">' + this.options.loadingLabel + '</div>').css({
|
289 |
-
'width': w,
|
290 |
-
'text-align': 'center',
|
291 |
-
opacity: .5
|
292 |
-
}).appendTo(this.options.elements.zoom.parent());
|
293 |
-
}
|
294 |
-
}
|
295 |
-
},
|
296 |
-
|
297 |
-
/**
|
298 |
-
* Initialize the zoom images
|
299 |
-
*
|
300 |
-
* @private
|
301 |
-
*/
|
302 |
-
_initZoom: function () {
|
303 |
-
var self = this;
|
304 |
-
|
305 |
-
self.zoom = self.options.elements.zoom;
|
306 |
-
self.zoomImage = self.options.elements.zoomImage;
|
307 |
-
|
308 |
-
//wrap the zoom image with a div
|
309 |
-
var zoom_wrap_css_class = "yith_magnifier_zoom_wrap";
|
310 |
-
|
311 |
-
|
312 |
-
if (self.options.zoom_wrap_additional_css) {
|
313 |
-
if ( !$('.' + zoom_wrap_css_class).length ) {
|
314 |
-
|
315 |
-
zoom_wrap_css_class += " " + self.options.zoom_wrap_additional_css;
|
316 |
-
}
|
317 |
-
}
|
318 |
-
|
319 |
-
self.zoom.wrap('<div class="' + zoom_wrap_css_class + '"></div>');
|
320 |
-
|
321 |
-
self.IMG_zoomImage = new Image();
|
322 |
-
self.IMG_zoomImage.src = self.zoom.attr('href');
|
323 |
-
|
324 |
-
self.IMG_smallImage = new Image();
|
325 |
-
self.IMG_smallImage.src = self.zoomImage.attr('src');
|
326 |
-
|
327 |
-
if ($.browser.msie && $.browser.version == 8) {
|
328 |
-
$(self.IMG_zoomImage).load(function () {
|
329 |
-
|
330 |
-
self._initTrap();
|
331 |
-
});
|
332 |
-
} else {
|
333 |
-
|
334 |
-
$([self.IMG_zoomImage, self.IMG_smallImage]).imagesLoaded(function () {
|
335 |
-
|
336 |
-
self._initTrap();
|
337 |
-
});
|
338 |
-
}
|
339 |
-
|
340 |
-
$(document).trigger('yith_magnifier_after_init_zoom')
|
341 |
-
},
|
342 |
-
|
343 |
-
/**
|
344 |
-
* Create the mouse trap
|
345 |
-
*
|
346 |
-
* @private
|
347 |
-
*/
|
348 |
-
_initTrap: function () {
|
349 |
-
var self = this;
|
350 |
-
var zoomImg = self.IMG_zoomImage,
|
351 |
-
thumbImg = self.IMG_smallImage;
|
352 |
-
|
353 |
-
self.mx = 0;
|
354 |
-
self.my = 0;
|
355 |
-
self.controlTimer = 0;
|
356 |
-
self.lens = null;
|
357 |
-
self.tint = null;
|
358 |
-
self.softFocus = null;
|
359 |
-
self.zoomDiv = null;
|
360 |
-
self.cw = 0;
|
361 |
-
self.ch = 0;
|
362 |
-
self.zw = 0;
|
363 |
-
self.destU = 0;
|
364 |
-
self.destV = 0;
|
365 |
-
self.currU = 0;
|
366 |
-
self.currV = 0;
|
367 |
-
self.mouseTrap = null;
|
368 |
-
|
369 |
-
var zoom = self.options.elements.zoom;
|
370 |
-
var zoomImage = self.options.elements.zoomImage;
|
371 |
-
|
372 |
-
//remove loading div
|
373 |
-
//this.zoom.parent().siblings('.yith_magnifier_loading').remove();
|
374 |
-
$('.yith_magnifier_loading').remove();
|
375 |
-
|
376 |
-
if (this.element.find('.yith_magnifier_mousetrap')) {
|
377 |
-
this.element.find('.yith_magnifier_mousetrap').remove();
|
378 |
-
}
|
379 |
-
|
380 |
-
this.mouseTrap = $('<div class="yith_magnifier_mousetrap" />').css({
|
381 |
-
width: '100%', //zoomImage.outerWidth(),
|
382 |
-
height: '100%', //zoomImage.outerHeight(),
|
383 |
-
top: 0,
|
384 |
-
left: 0
|
385 |
-
}).appendTo(zoom.parent());
|
386 |
-
|
387 |
-
// Detect device type, normal mouse or touchy(ipad android) by albanx
|
388 |
-
var touchy = ("ontouchstart" in document.documentElement) ? true : false;
|
389 |
-
var event_move = 'touchmove mousemove';
|
390 |
-
var event_end = 'touchend mouseleave';
|
391 |
-
var event_ent = 'touchstart mouseenter';
|
392 |
-
var event_click = 'touchstart click';
|
393 |
-
|
394 |
-
this.mouseTrap.on(event_move, this, function (e) {
|
395 |
-
self.options.onMove();
|
396 |
-
|
397 |
-
self.mx = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageX : e.pageX;
|
398 |
-
self.my = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageY : e.pageY;
|
399 |
-
|
400 |
-
}).on(event_end, this, function (e) {
|
401 |
-
|
402 |
-
clearTimeout(self.controlTimer);
|
403 |
-
//event.data.removeBits();
|
404 |
-
if (self.lens) {
|
405 |
-
self.lens.fadeOut(299);
|
406 |
-
}
|
407 |
-
if (self.tint) {
|
408 |
-
self.tint.fadeOut(299);
|
409 |
-
}
|
410 |
-
if (self.softFocus) {
|
411 |
-
self.softFocus.fadeOut(299);
|
412 |
-
}
|
413 |
-
self.zoomDiv.fadeOut(300, function () {
|
414 |
-
self._onLeave();
|
415 |
-
});
|
416 |
-
|
417 |
-
return false;
|
418 |
-
|
419 |
-
}).on(event_click, this, function (e) {
|
420 |
-
self.options.onClick();
|
421 |
-
}).on(event_ent, this, function (e) {
|
422 |
-
self.options.onEnter();
|
423 |
-
|
424 |
-
if (touchy) {
|
425 |
-
e.preventDefault();
|
426 |
-
}
|
427 |
-
|
428 |
-
self.mx = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageX : e.pageX;
|
429 |
-
self.my = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageY : e.pageY;
|
430 |
-
|
431 |
-
self.zw = e.data;
|
432 |
-
if (self.zoomDiv) {
|
433 |
-
self.zoomDiv.stop(true, false);
|
434 |
-
self.zoomDiv.remove();
|
435 |
-
}
|
436 |
-
|
437 |
-
var xPos = self.options.adjustX,
|
438 |
-
yPos = self.options.adjustY;
|
439 |
-
|
440 |
-
var siw = zoomImage.outerWidth();
|
441 |
-
var sih = zoomImage.outerHeight();
|
442 |
-
|
443 |
-
var w = self.options.zoomWidth;
|
444 |
-
var h = self.options.zoomHeight;
|
445 |
-
|
446 |
-
if (self.options.zoomWidth == 'auto') {
|
447 |
-
w = siw;
|
448 |
-
}
|
449 |
-
|
450 |
-
if (self.options.zoomHeight == 'auto') {
|
451 |
-
h = sih;
|
452 |
-
}
|
453 |
-
|
454 |
-
var appendTo = zoom.parent();
|
455 |
-
switch (self.options.position) {
|
456 |
-
case 'top':
|
457 |
-
yPos -= h;
|
458 |
-
break;
|
459 |
-
case 'right':
|
460 |
-
xPos += siw;
|
461 |
-
break;
|
462 |
-
case 'bottom':
|
463 |
-
yPos += sih;
|
464 |
-
break;
|
465 |
-
case 'left':
|
466 |
-
xPos -= w;
|
467 |
-
break;
|
468 |
-
case 'inside':
|
469 |
-
w = siw;
|
470 |
-
h = sih;
|
471 |
-
break;
|
472 |
-
|
473 |
-
// All other values, try and find an id in the dom to attach to.
|
474 |
-
default:
|
475 |
-
appendTo = $('#' + self.options.position);
|
476 |
-
// If dom element doesn't exit, just use 'right' position as default.
|
477 |
-
if (!appendTo.length) {
|
478 |
-
appendTo = zoom;
|
479 |
-
xPos += siw; //+ opts.adjustX;
|
480 |
-
yPos += sih; // + opts.adjustY;
|
481 |
-
} else {
|
482 |
-
w = appendTo.innerWidth();
|
483 |
-
h = appendTo.innerHeight();
|
484 |
-
}
|
485 |
-
}
|
486 |
-
|
487 |
-
if (self.isPhone && self.options.phoneBehavior == 'inside') {
|
488 |
-
w = siw;
|
489 |
-
h = sih;
|
490 |
-
xPos = 0;
|
491 |
-
yPos = 0;
|
492 |
-
}
|
493 |
-
|
494 |
-
self.zoomDiv = $('<div class="yith_magnifier_zoom_magnifier" />').css({
|
495 |
-
left: xPos,
|
496 |
-
top: yPos,
|
497 |
-
width: w,
|
498 |
-
height: h,
|
499 |
-
'background-repeat': 'no-repeat',
|
500 |
-
backgroundImage: 'url(' + zoomImg.src + ')'
|
501 |
-
}).appendTo(appendTo);
|
502 |
-
|
503 |
-
// Add the title from title tag.
|
504 |
-
if (zoomImage.attr('title') && self.options.showTitle) {
|
505 |
-
$('<div class="yith_magnifier_title">' + zoomImage.attr('title') + '</div>').appendTo(self.zoomDiv);
|
506 |
-
}
|
507 |
-
|
508 |
-
if (self.isPhone) {
|
509 |
-
if (self.options.phoneBehavior != 'disable') {
|
510 |
-
self.zoomDiv.fadeIn(500);
|
511 |
-
} else {
|
512 |
-
self.lens.fadeOut(299);
|
513 |
-
}
|
514 |
-
} else {
|
515 |
-
self.zoomDiv.fadeIn(500);
|
516 |
-
}
|
517 |
-
|
518 |
-
if (self.lens) {
|
519 |
-
self.lens.remove();
|
520 |
-
self.lens = null;
|
521 |
-
}
|
522 |
-
|
523 |
-
if (zoomImg.width <= 1) {
|
524 |
-
self.cw = (zoomImage.outerWidth() / zoomImg.naturalWidth) * self.zoomDiv.width();
|
525 |
-
} else {
|
526 |
-
self.cw = (zoomImage.outerWidth() / zoomImg.width) * self.zoomDiv.width();
|
527 |
-
}
|
528 |
-
|
529 |
-
if (zoomImg.height <= 1) {
|
530 |
-
self.ch = (zoomImage.outerHeight() / zoomImg.naturalHeight) * self.zoomDiv.height();
|
531 |
-
} else {
|
532 |
-
self.ch = (zoomImage.outerHeight() / zoomImg.height) * self.zoomDiv.height();
|
533 |
-
}
|
534 |
-
|
535 |
-
// Attach mouse, initially invisible to prevent first frame glitch
|
536 |
-
self.lens = $('<div class="yith_magnifier_lens" />').css({
|
537 |
-
width: self.cw,
|
538 |
-
height: self.ch
|
539 |
-
}).appendTo(zoom);
|
540 |
-
|
541 |
-
self.mouseTrap.css('cursor', self.lens.css('cursor'));
|
542 |
-
|
543 |
-
var noTrans = false;
|
544 |
-
|
545 |
-
|
546 |
-
// Init tint layer if needed. (Not relevant if using inside mode)
|
547 |
-
if (self.options.tint) {
|
548 |
-
//self.lens.css('background', 'url("' + zoomImage.attr('src') + '")');
|
549 |
-
self.tint = $('<div />').css({
|
550 |
-
display: 'none',
|
551 |
-
position: 'absolute',
|
552 |
-
left: 0,
|
553 |
-
top: 0,
|
554 |
-
width: zoomImage.outerWidth(),
|
555 |
-
height: zoomImage.outerHeight(),
|
556 |
-
backgroundColor: self.options.tint,
|
557 |
-
opacity: self.options.tintOpacity
|
558 |
-
}).appendTo(zoom);
|
559 |
-
|
560 |
-
|
561 |
-
self.lens.append($('<img />', {
|
562 |
-
src: zoomImage.attr('src')
|
563 |
-
}));
|
564 |
-
|
565 |
-
noTrans = true;
|
566 |
-
self.tint.fadeIn(500);
|
567 |
-
}
|
568 |
-
|
569 |
-
if (self.options.softFocus) {
|
570 |
-
//self.lens.css('background', 'url("' + zoomImage.attr('src') + '")');
|
571 |
-
self.softFocus = $('<div />').css({
|
572 |
-
position: 'absolute',
|
573 |
-
display: 'none',
|
574 |
-
top: '1px',
|
575 |
-
left: '1px',
|
576 |
-
width: zoomImage.outerWidth(),
|
577 |
-
height: zoomImage.outerHeight(),
|
578 |
-
//background: 'url("' + zoomImage.attr('src') + '")',
|
579 |
-
//backgroundSize: '100%',
|
580 |
-
opacity: .5
|
581 |
-
}).appendTo(zoom);
|
582 |
-
|
583 |
-
self.softFocus.append($('<img />', {
|
584 |
-
src: zoomImage.attr('src')
|
585 |
-
}));
|
586 |
-
|
587 |
-
if (self.lens.find('img').length == 0) {
|
588 |
-
self.lens.append($('<img />', {
|
589 |
-
src: zoomImage.attr('src')
|
590 |
-
}));
|
591 |
-
}
|
592 |
-
|
593 |
-
noTrans = true;
|
594 |
-
self.softFocus.fadeIn(500);
|
595 |
-
}
|
596 |
-
|
597 |
-
|
598 |
-
if (!noTrans) {
|
599 |
-
self.lens.css('opacity', self.options.lensOpacity);
|
600 |
-
}
|
601 |
-
if (self.options.position !== 'inside') {
|
602 |
-
self.lens.fadeIn(500);
|
603 |
-
}
|
604 |
-
|
605 |
-
// Start processing.
|
606 |
-
self.zw._controlLoop();
|
607 |
-
|
608 |
-
return; // Don't return false here otherwise opera will not detect change of the mouse pointer type.
|
609 |
-
});
|
610 |
-
},
|
611 |
-
|
612 |
-
/**
|
613 |
-
*
|
614 |
-
*
|
615 |
-
* @private
|
616 |
-
*/
|
617 |
-
_controlLoop: function () {
|
618 |
-
var self = this;
|
619 |
-
|
620 |
-
if (this.lens) {
|
621 |
-
var x = (this.mx - this.zoomImage.offset().left - (this.cw * 0.5)) >> 0;
|
622 |
-
var y = (this.my - this.zoomImage.offset().top - (this.ch * 0.5)) >> 0;
|
623 |
-
|
624 |
-
if (x < 0) {
|
625 |
-
x = 0;
|
626 |
-
} else if (x > (this.zoomImage.outerWidth() - this.cw)) {
|
627 |
-
x = (this.zoomImage.outerWidth() - this.cw);
|
628 |
-
}
|
629 |
-
|
630 |
-
if (y < 0) {
|
631 |
-
y = 0;
|
632 |
-
} else if (y > (this.zoomImage.outerHeight() - this.ch)) {
|
633 |
-
y = (this.zoomImage.outerHeight() - this.ch);
|
634 |
-
}
|
635 |
-
|
636 |
-
this.lens.css({
|
637 |
-
left: x - 2,
|
638 |
-
top: y - 1
|
639 |
-
});
|
640 |
-
|
641 |
-
//this.lens.css('background-position', (-x) + 'px ' + (-y) + 'px');
|
642 |
-
|
643 |
-
|
644 |
-
this.lens.find('img').css({
|
645 |
-
width: this.zoomImage.outerWidth(),
|
646 |
-
height: this.zoomImage.outerHeight(),
|
647 |
-
marginLeft: (-x) + 'px ',
|
648 |
-
marginTop: (-y) + 'px'
|
649 |
-
});
|
650 |
-
|
651 |
-
|
652 |
-
if (this.IMG_zoomImage.width <= 1) {
|
653 |
-
this.destU = (((x) / this.zoomImage.outerWidth()) * this.IMG_zoomImage.naturalWidth) >> 0;
|
654 |
-
} else {
|
655 |
-
this.destU = (((x) / this.zoomImage.outerWidth()) * this.IMG_zoomImage.width) >> 0;
|
656 |
-
}
|
657 |
-
|
658 |
-
if (this.IMG_zoomImage.height <= 1) {
|
659 |
-
this.destV = (((y) / this.zoomImage.outerHeight()) * this.IMG_zoomImage.naturalHeight) >> 0;
|
660 |
-
} else {
|
661 |
-
this.destV = (((y) / this.zoomImage.outerHeight()) * this.IMG_zoomImage.height) >> 0;
|
662 |
-
}
|
663 |
-
|
664 |
-
|
665 |
-
this.currU += (this.destU - this.currU) / this.options.smoothMove;
|
666 |
-
this.currV += (this.destV - this.currV) / this.options.smoothMove;
|
667 |
-
|
668 |
-
this.zoomDiv.css('background-position', (-(this.currU >> 0) + 'px ') + (-(this.currV >> 0) + 'px'));
|
669 |
-
}
|
670 |
-
|
671 |
-
this.controlTimer = setTimeout(function () {
|
672 |
-
self._controlLoop();
|
673 |
-
}, 30);
|
674 |
-
},
|
675 |
-
|
676 |
-
/**
|
677 |
-
* This method is called when the mouse leave the image
|
678 |
-
*
|
679 |
-
* @private
|
680 |
-
*/
|
681 |
-
_onLeave: function () {
|
682 |
-
this.options.onLeave();
|
683 |
-
|
684 |
-
if (this.zoomDiv) {
|
685 |
-
this.zoomDiv.remove();
|
686 |
-
this.zoomDiv = null;
|
687 |
-
}
|
688 |
-
|
689 |
-
this._removeElements();
|
690 |
-
},
|
691 |
-
|
692 |
-
/**
|
693 |
-
* Remove lens, tint and softfocus
|
694 |
-
*
|
695 |
-
* @private
|
696 |
-
*/
|
697 |
-
_removeElements: function () {
|
698 |
-
if (this.lens) {
|
699 |
-
this.lens.remove();
|
700 |
-
this.lens = null;
|
701 |
-
}
|
702 |
-
|
703 |
-
if (this.tint) {
|
704 |
-
this.tint.remove();
|
705 |
-
this.tint = null;
|
706 |
-
}
|
707 |
-
|
708 |
-
if (this.softFocus) {
|
709 |
-
this.softFocus.remove();
|
710 |
-
this.softFocus = null;
|
711 |
-
}
|
712 |
-
|
713 |
-
if (this.element.find('.yith_magnifier_loading').length > 0) {
|
714 |
-
this.element.find('.yith_magnifier_loading').remove();
|
715 |
-
}
|
716 |
-
},
|
717 |
-
|
718 |
-
/**
|
719 |
-
* Detect if user is using a phone device (eg iPhone)
|
720 |
-
*
|
721 |
-
* @private
|
722 |
-
*/
|
723 |
-
_isPhone: function () {
|
724 |
-
var userAgent = navigator.userAgent.toLowerCase();
|
725 |
-
|
726 |
-
return ( userAgent.match(/iphone/i) || userAgent.match(/ipod/i) || userAgent.match(/android/i) );
|
727 |
-
},
|
728 |
-
|
729 |
-
/**
|
730 |
-
* Destroy the instance
|
731 |
-
*
|
732 |
-
*/
|
733 |
-
destroy: function () {
|
734 |
-
if (this.zoom) {
|
735 |
-
this.zoom.unwrap();
|
736 |
-
}
|
737 |
-
|
738 |
-
if (this.mouseTrap) {
|
739 |
-
this.mouseTrap.unbind();
|
740 |
-
this.mouseTrap.remove();
|
741 |
-
this.mouseTrap = null;
|
742 |
-
}
|
743 |
-
|
744 |
-
if (this.zoomDiv) {
|
745 |
-
this.zoomDiv.remove();
|
746 |
-
this.zoomDiv = null;
|
747 |
-
}
|
748 |
-
|
749 |
-
if (this.options.disableRightClick) {
|
750 |
-
$(document).unbind();
|
751 |
-
}
|
752 |
-
|
753 |
-
this._removeElements();
|
754 |
-
this.options.elements.gallery.unbind();
|
755 |
-
this.element.removeData('yith_magnifier');
|
756 |
-
}
|
757 |
-
};
|
758 |
-
|
759 |
-
$.fn.yith_magnifier = function (options) {
|
760 |
-
|
761 |
-
if (typeof options === 'string') {
|
762 |
-
var args = Array.prototype.slice.call(arguments, 1);
|
763 |
-
|
764 |
-
this.each(function () {
|
765 |
-
var instance = $.data(this, 'yith_magnifier');
|
766 |
-
if (!instance) {
|
767 |
-
$.error("cannot call methods on yith_magnifier prior to initialization; " +
|
768 |
-
"attempted to call method '" + options + "'");
|
769 |
-
return;
|
770 |
-
}
|
771 |
-
if (!$.isFunction(instance[options]) || options.charAt(0) === "_") {
|
772 |
-
$.error("no such method '" + options + "' for yith_magnifier instance");
|
773 |
-
return;
|
774 |
-
}
|
775 |
-
instance[options].apply(instance, args);
|
776 |
-
});
|
777 |
-
} else {
|
778 |
-
this.each(function () {
|
779 |
-
var instance = $.data(this, 'yith_magnifier');
|
780 |
-
if (!instance) {
|
781 |
-
$.data(this, 'yith_magnifier', new $.yith_magnifier(options, this));
|
782 |
-
} else {
|
783 |
-
$.error('yith_magnifier already istantiated.');
|
784 |
-
}
|
785 |
-
});
|
786 |
-
}
|
787 |
-
return this;
|
788 |
-
};
|
789 |
-
|
790 |
-
|
791 |
})(window, jQuery);
|
1 |
+
/**
|
2 |
+
* YITH Magnifier
|
3 |
+
*
|
4 |
+
* @version 0.1
|
5 |
+
* @author Your Inspiration Themes Team <info@yithemes.com>
|
6 |
+
*
|
7 |
+
* MIT License.
|
8 |
+
*/
|
9 |
+
|
10 |
+
;
|
11 |
+
(function (window, $, undefined) {
|
12 |
+
'use strict';
|
13 |
+
|
14 |
+
//include imagesLoaded plugin
|
15 |
+
if ($.fn.imagesLoaded === undefined) {
|
16 |
+
/*!
|
17 |
+
* jQuery imagesLoaded plugin v2.1.1
|
18 |
+
* http://github.com/desandro/imagesloaded
|
19 |
+
*
|
20 |
+
* MIT License. by Paul Irish et al.
|
21 |
+
*/
|
22 |
+
|
23 |
+
/*jshint curly: true, eqeqeq: true, noempty: true, strict: true, undef: true, browser: true */
|
24 |
+
/*global jQuery: false */
|
25 |
+
|
26 |
+
;
|
27 |
+
(function ($, undefined) {
|
28 |
+
'use strict';
|
29 |
+
|
30 |
+
// blank image data-uri bypasses webkit log warning (thx doug jones)
|
31 |
+
var BLANK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
|
32 |
+
|
33 |
+
$.fn.imagesLoaded = function (callback) {
|
34 |
+
var $this = this,
|
35 |
+
deferred = $.isFunction($.Deferred) ? $.Deferred() : 0,
|
36 |
+
hasNotify = $.isFunction(deferred.notify),
|
37 |
+
$images = $this.find('img').add($this.filter('img')),
|
38 |
+
loaded = [],
|
39 |
+
proper = [],
|
40 |
+
broken = [];
|
41 |
+
|
42 |
+
// Register deferred callbacks
|
43 |
+
if ($.isPlainObject(callback)) {
|
44 |
+
$.each(callback, function (key, value) {
|
45 |
+
if (key === 'callback') {
|
46 |
+
callback = value;
|
47 |
+
} else if (deferred) {
|
48 |
+
deferred[key](value);
|
49 |
+
}
|
50 |
+
});
|
51 |
+
}
|
52 |
+
|
53 |
+
function doneLoading() {
|
54 |
+
var $proper = $(proper),
|
55 |
+
$broken = $(broken);
|
56 |
+
|
57 |
+
if (deferred) {
|
58 |
+
if (broken.length) {
|
59 |
+
deferred.reject($images, $proper, $broken);
|
60 |
+
} else {
|
61 |
+
deferred.resolve($images);
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
if ($.isFunction(callback)) {
|
66 |
+
callback.call($this, $images, $proper, $broken);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
function imgLoadedHandler(event) {
|
71 |
+
imgLoaded(event.target, event.type === 'error');
|
72 |
+
}
|
73 |
+
|
74 |
+
function imgLoaded(img, isBroken) {
|
75 |
+
// don't proceed if BLANK image, or image is already loaded
|
76 |
+
if (img.src === BLANK || $.inArray(img, loaded) !== -1) {
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
+
// store element in loaded images array
|
81 |
+
loaded.push(img);
|
82 |
+
|
83 |
+
// keep track of broken and properly loaded images
|
84 |
+
if (isBroken) {
|
85 |
+
broken.push(img);
|
86 |
+
} else {
|
87 |
+
proper.push(img);
|
88 |
+
}
|
89 |
+
|
90 |
+
// cache image and its state for future calls
|
91 |
+
$.data(img, 'imagesLoaded', {isBroken: isBroken, src: img.src});
|
92 |
+
|
93 |
+
// trigger deferred progress method if present
|
94 |
+
if (hasNotify) {
|
95 |
+
deferred.notifyWith($(img), [isBroken, $images, $(proper), $(broken)]);
|
96 |
+
}
|
97 |
+
|
98 |
+
// call doneLoading and clean listeners if all images are loaded
|
99 |
+
if ($images.length === loaded.length) {
|
100 |
+
setTimeout(doneLoading);
|
101 |
+
$images.unbind('.imagesLoaded', imgLoadedHandler);
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
// if no images, trigger immediately
|
106 |
+
if (!$images.length) {
|
107 |
+
doneLoading();
|
108 |
+
} else {
|
109 |
+
$images.bind('load.imagesLoaded error.imagesLoaded', imgLoadedHandler)
|
110 |
+
.each(function (i, el) {
|
111 |
+
var src = el.src;
|
112 |
+
|
113 |
+
// find out if this image has been already checked for status
|
114 |
+
// if it was, and src has not changed, call imgLoaded on it
|
115 |
+
var cached = $.data(el, 'imagesLoaded');
|
116 |
+
if (cached && cached.src === src) {
|
117 |
+
imgLoaded(el, cached.isBroken);
|
118 |
+
return;
|
119 |
+
}
|
120 |
+
|
121 |
+
// if complete is true and browser supports natural sizes, try
|
122 |
+
// to check for image status manually
|
123 |
+
if (el.complete && el.naturalWidth !== undefined) {
|
124 |
+
imgLoaded(el, el.naturalWidth === 0 || el.naturalHeight === 0);
|
125 |
+
return;
|
126 |
+
}
|
127 |
+
|
128 |
+
// cached images don't fire load sometimes, so we reset src, but only when
|
129 |
+
// dealing with IE, or image is complete (loaded) and failed manual check
|
130 |
+
// webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
|
131 |
+
if (el.readyState || el.complete) {
|
132 |
+
el.src = BLANK;
|
133 |
+
el.src = src;
|
134 |
+
}
|
135 |
+
});
|
136 |
+
}
|
137 |
+
|
138 |
+
return deferred ? deferred.promise($this) : $this;
|
139 |
+
};
|
140 |
+
|
141 |
+
})(jQuery);
|
142 |
+
}
|
143 |
+
|
144 |
+
$.yith_magnifier = function (options, element) {
|
145 |
+
this.t = element;
|
146 |
+
this.element = $(element);
|
147 |
+
this._init(options);
|
148 |
+
};
|
149 |
+
|
150 |
+
$.yith_magnifier.defaults = {
|
151 |
+
zoomWidth: 'auto',
|
152 |
+
zoomHeight: 'auto',
|
153 |
+
position: 'right',
|
154 |
+
tint: false,
|
155 |
+
tintOpacity: 0.5,
|
156 |
+
lensOpacity: 0.5,
|
157 |
+
softFocus: false,
|
158 |
+
smoothMove: 3,
|
159 |
+
showTitle: true,
|
160 |
+
titleOpacity: 0.5,
|
161 |
+
adjustX: 0,
|
162 |
+
adjustY: 0,
|
163 |
+
|
164 |
+
phoneBehavior: 'inside', //allowed values: inside, disable, default
|
165 |
+
loadingLabel: 'Loading...',
|
166 |
+
|
167 |
+
enableSlider: true,
|
168 |
+
slider: 'carouFredSel',
|
169 |
+
sliderOptions: {},
|
170 |
+
|
171 |
+
onLoad: function () {
|
172 |
+
return false;
|
173 |
+
},
|
174 |
+
onEnter: function () {
|
175 |
+
return false
|
176 |
+
},
|
177 |
+
onLeave: function () {
|
178 |
+
return false
|
179 |
+
},
|
180 |
+
onMove: function () {
|
181 |
+
return false
|
182 |
+
},
|
183 |
+
onClick: function () {
|
184 |
+
return false;
|
185 |
+
},
|
186 |
+
|
187 |
+
elements: {
|
188 |
+
zoom: $('.yith_magnifier_zoom'),
|
189 |
+
zoomImage: $('.yith_magnifier_zoom img').first(),
|
190 |
+
gallery: $('.yith_magnifier_gallery li a')
|
191 |
+
}
|
192 |
+
};
|
193 |
+
|
194 |
+
$.yith_magnifier.prototype = {
|
195 |
+
/**
|
196 |
+
* Let's start the magnifier
|
197 |
+
*
|
198 |
+
* @param {Object} options
|
199 |
+
*
|
200 |
+
* @private
|
201 |
+
*/
|
202 |
+
_init: function (options) {
|
203 |
+
var self = this;
|
204 |
+
|
205 |
+
$(document).trigger('yith_magnifier_before_init');
|
206 |
+
|
207 |
+
$.each($.yith_magnifier.defaults.elements, function (i, v) {
|
208 |
+
var el = $.yith_magnifier.defaults.elements;
|
209 |
+
el[i] = $(v, self);
|
210 |
+
});
|
211 |
+
self.options = $.extend(true, {}, $.yith_magnifier.defaults, options);
|
212 |
+
self.isPhone = self._isPhone();
|
213 |
+
|
214 |
+
self._loading();
|
215 |
+
|
216 |
+
self.element.imagesLoaded(function () {
|
217 |
+
self.options.onLoad();
|
218 |
+
self._initZoom();
|
219 |
+
self._initGallery();
|
220 |
+
});
|
221 |
+
|
222 |
+
$(document).trigger('yith_magnifier_after_init');
|
223 |
+
},
|
224 |
+
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Init gallery handlers
|
228 |
+
*
|
229 |
+
* @private
|
230 |
+
*
|
231 |
+
*/
|
232 |
+
_initGallery: function () {
|
233 |
+
var self = this;
|
234 |
+
var elements = self.options.elements;
|
235 |
+
|
236 |
+
var gallery = elements.gallery;
|
237 |
+
var zoom = elements.zoom;
|
238 |
+
var zoomImage = elements.zoomImage;
|
239 |
+
|
240 |
+
if (gallery.length > 0) {
|
241 |
+
gallery.on('click', function (e) {
|
242 |
+
e.preventDefault();
|
243 |
+
|
244 |
+
var t = $(this);
|
245 |
+
self.destroy();
|
246 |
+
|
247 |
+
zoom.attr('href', this.href);
|
248 |
+
zoomImage.attr('src', t.data('small'))
|
249 |
+
.attr('srcset', t.data('small'))
|
250 |
+
.attr('src-orig', t.data('small'))
|
251 |
+
.attr('title', '')
|
252 |
+
.attr('title', t.attr('title'));
|
253 |
+
|
254 |
+
$.data(self.t, 'yith_magnifier', new $.yith_magnifier(self.options, self.element));
|
255 |
+
});
|
256 |
+
|
257 |
+
//gallery.filter(':first').trigger('click');
|
258 |
+
|
259 |
+
if (self.options.enableSlider) {
|
260 |
+
gallery.closest('ul').trigger('yith_magnifier_slider_destroy');
|
261 |
+
gallery.closest('ul')[self.options.slider](self.options.sliderOptions);
|
262 |
+
}
|
263 |
+
|
264 |
+
} else {
|
265 |
+
gallery.on('click', function (e) {
|
266 |
+
e.preventDefault();
|
267 |
+
return false;
|
268 |
+
})
|
269 |
+
}
|
270 |
+
},
|
271 |
+
|
272 |
+
/**
|
273 |
+
* Show a loading icon while image isn't properly loaded
|
274 |
+
*
|
275 |
+
* @private
|
276 |
+
*/
|
277 |
+
_loading: function () {
|
278 |
+
if (this.options.disableRightClick) {
|
279 |
+
$(document).on('contextmenu', function (e) {
|
280 |
+
return false;
|
281 |
+
});
|
282 |
+
}
|
283 |
+
|
284 |
+
if (this.mouseTrap === undefined) {
|
285 |
+
var w = this.options.elements.zoom.width();
|
286 |
+
|
287 |
+
if (this.options.loadingLabel) {
|
288 |
+
$('<div class="yith_magnifier_loading">' + this.options.loadingLabel + '</div>').css({
|
289 |
+
'width': w,
|
290 |
+
'text-align': 'center',
|
291 |
+
opacity: .5
|
292 |
+
}).appendTo(this.options.elements.zoom.parent());
|
293 |
+
}
|
294 |
+
}
|
295 |
+
},
|
296 |
+
|
297 |
+
/**
|
298 |
+
* Initialize the zoom images
|
299 |
+
*
|
300 |
+
* @private
|
301 |
+
*/
|
302 |
+
_initZoom: function () {
|
303 |
+
var self = this;
|
304 |
+
|
305 |
+
self.zoom = self.options.elements.zoom;
|
306 |
+
self.zoomImage = self.options.elements.zoomImage;
|
307 |
+
|
308 |
+
//wrap the zoom image with a div
|
309 |
+
var zoom_wrap_css_class = "yith_magnifier_zoom_wrap";
|
310 |
+
|
311 |
+
|
312 |
+
if (self.options.zoom_wrap_additional_css) {
|
313 |
+
if ( !$('.' + zoom_wrap_css_class).length ) {
|
314 |
+
|
315 |
+
zoom_wrap_css_class += " " + self.options.zoom_wrap_additional_css;
|
316 |
+
}
|
317 |
+
}
|
318 |
+
|
319 |
+
self.zoom.wrap('<div class="' + zoom_wrap_css_class + '"></div>');
|
320 |
+
|
321 |
+
self.IMG_zoomImage = new Image();
|
322 |
+
self.IMG_zoomImage.src = self.zoom.attr('href');
|
323 |
+
|
324 |
+
self.IMG_smallImage = new Image();
|
325 |
+
self.IMG_smallImage.src = self.zoomImage.attr('src');
|
326 |
+
|
327 |
+
if ($.browser.msie && $.browser.version == 8) {
|
328 |
+
$(self.IMG_zoomImage).load(function () {
|
329 |
+
|
330 |
+
self._initTrap();
|
331 |
+
});
|
332 |
+
} else {
|
333 |
+
|
334 |
+
$([self.IMG_zoomImage, self.IMG_smallImage]).imagesLoaded(function () {
|
335 |
+
|
336 |
+
self._initTrap();
|
337 |
+
});
|
338 |
+
}
|
339 |
+
|
340 |
+
$(document).trigger('yith_magnifier_after_init_zoom')
|
341 |
+
},
|
342 |
+
|
343 |
+
/**
|
344 |
+
* Create the mouse trap
|
345 |
+
*
|
346 |
+
* @private
|
347 |
+
*/
|
348 |
+
_initTrap: function () {
|
349 |
+
var self = this;
|
350 |
+
var zoomImg = self.IMG_zoomImage,
|
351 |
+
thumbImg = self.IMG_smallImage;
|
352 |
+
|
353 |
+
self.mx = 0;
|
354 |
+
self.my = 0;
|
355 |
+
self.controlTimer = 0;
|
356 |
+
self.lens = null;
|
357 |
+
self.tint = null;
|
358 |
+
self.softFocus = null;
|
359 |
+
self.zoomDiv = null;
|
360 |
+
self.cw = 0;
|
361 |
+
self.ch = 0;
|
362 |
+
self.zw = 0;
|
363 |
+
self.destU = 0;
|
364 |
+
self.destV = 0;
|
365 |
+
self.currU = 0;
|
366 |
+
self.currV = 0;
|
367 |
+
self.mouseTrap = null;
|
368 |
+
|
369 |
+
var zoom = self.options.elements.zoom;
|
370 |
+
var zoomImage = self.options.elements.zoomImage;
|
371 |
+
|
372 |
+
//remove loading div
|
373 |
+
//this.zoom.parent().siblings('.yith_magnifier_loading').remove();
|
374 |
+
$('.yith_magnifier_loading').remove();
|
375 |
+
|
376 |
+
if (this.element.find('.yith_magnifier_mousetrap')) {
|
377 |
+
this.element.find('.yith_magnifier_mousetrap').remove();
|
378 |
+
}
|
379 |
+
|
380 |
+
this.mouseTrap = $('<div class="yith_magnifier_mousetrap" />').css({
|
381 |
+
width: '100%', //zoomImage.outerWidth(),
|
382 |
+
height: '100%', //zoomImage.outerHeight(),
|
383 |
+
top: 0,
|
384 |
+
left: 0
|
385 |
+
}).appendTo(zoom.parent());
|
386 |
+
|
387 |
+
// Detect device type, normal mouse or touchy(ipad android) by albanx
|
388 |
+
var touchy = ("ontouchstart" in document.documentElement) ? true : false;
|
389 |
+
var event_move = 'touchmove mousemove';
|
390 |
+
var event_end = 'touchend mouseleave';
|
391 |
+
var event_ent = 'touchstart mouseenter';
|
392 |
+
var event_click = 'touchstart click';
|
393 |
+
|
394 |
+
this.mouseTrap.on(event_move, this, function (e) {
|
395 |
+
self.options.onMove();
|
396 |
+
|
397 |
+
self.mx = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageX : e.pageX;
|
398 |
+
self.my = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageY : e.pageY;
|
399 |
+
|
400 |
+
}).on(event_end, this, function (e) {
|
401 |
+
|
402 |
+
clearTimeout(self.controlTimer);
|
403 |
+
//event.data.removeBits();
|
404 |
+
if (self.lens) {
|
405 |
+
self.lens.fadeOut(299);
|
406 |
+
}
|
407 |
+
if (self.tint) {
|
408 |
+
self.tint.fadeOut(299);
|
409 |
+
}
|
410 |
+
if (self.softFocus) {
|
411 |
+
self.softFocus.fadeOut(299);
|
412 |
+
}
|
413 |
+
self.zoomDiv.fadeOut(300, function () {
|
414 |
+
self._onLeave();
|
415 |
+
});
|
416 |
+
|
417 |
+
return false;
|
418 |
+
|
419 |
+
}).on(event_click, this, function (e) {
|
420 |
+
self.options.onClick();
|
421 |
+
}).on(event_ent, this, function (e) {
|
422 |
+
self.options.onEnter();
|
423 |
+
|
424 |
+
if (touchy) {
|
425 |
+
e.preventDefault();
|
426 |
+
}
|
427 |
+
|
428 |
+
self.mx = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageX : e.pageX;
|
429 |
+
self.my = ( typeof(e.originalEvent.touches) != 'undefined' ) ? e.originalEvent.touches[0].pageY : e.pageY;
|
430 |
+
|
431 |
+
self.zw = e.data;
|
432 |
+
if (self.zoomDiv) {
|
433 |
+
self.zoomDiv.stop(true, false);
|
434 |
+
self.zoomDiv.remove();
|
435 |
+
}
|
436 |
+
|
437 |
+
var xPos = self.options.adjustX,
|
438 |
+
yPos = self.options.adjustY;
|
439 |
+
|
440 |
+
var siw = zoomImage.outerWidth();
|
441 |
+
var sih = zoomImage.outerHeight();
|
442 |
+
|
443 |
+
var w = self.options.zoomWidth;
|
444 |
+
var h = self.options.zoomHeight;
|
445 |
+
|
446 |
+
if (self.options.zoomWidth == 'auto') {
|
447 |
+
w = siw;
|
448 |
+
}
|
449 |
+
|
450 |
+
if (self.options.zoomHeight == 'auto') {
|
451 |
+
h = sih;
|
452 |
+
}
|
453 |
+
|
454 |
+
var appendTo = zoom.parent();
|
455 |
+
switch (self.options.position) {
|
456 |
+
case 'top':
|
457 |
+
yPos -= h;
|
458 |
+
break;
|
459 |
+
case 'right':
|
460 |
+
xPos += siw;
|
461 |
+
break;
|
462 |
+
case 'bottom':
|
463 |
+
yPos += sih;
|
464 |
+
break;
|
465 |
+
case 'left':
|
466 |
+
xPos -= w;
|
467 |
+
break;
|
468 |
+
case 'inside':
|
469 |
+
w = siw;
|
470 |
+
h = sih;
|
471 |
+
break;
|
472 |
+
|
473 |
+
// All other values, try and find an id in the dom to attach to.
|
474 |
+
default:
|
475 |
+
appendTo = $('#' + self.options.position);
|
476 |
+
// If dom element doesn't exit, just use 'right' position as default.
|
477 |
+
if (!appendTo.length) {
|
478 |
+
appendTo = zoom;
|
479 |
+
xPos += siw; //+ opts.adjustX;
|
480 |
+
yPos += sih; // + opts.adjustY;
|
481 |
+
} else {
|
482 |
+
w = appendTo.innerWidth();
|
483 |
+
h = appendTo.innerHeight();
|
484 |
+
}
|
485 |
+
}
|
486 |
+
|
487 |
+
if (self.isPhone && self.options.phoneBehavior == 'inside') {
|
488 |
+
w = siw;
|
489 |
+
h = sih;
|
490 |
+
xPos = 0;
|
491 |
+
yPos = 0;
|
492 |
+
}
|
493 |
+
|
494 |
+
self.zoomDiv = $('<div class="yith_magnifier_zoom_magnifier" />').css({
|
495 |
+
left: xPos,
|
496 |
+
top: yPos,
|
497 |
+
width: w,
|
498 |
+
height: h,
|
499 |
+
'background-repeat': 'no-repeat',
|
500 |
+
backgroundImage: 'url(' + zoomImg.src + ')'
|
501 |
+
}).appendTo(appendTo);
|
502 |
+
|
503 |
+
// Add the title from title tag.
|
504 |
+
if (zoomImage.attr('title') && self.options.showTitle) {
|
505 |
+
$('<div class="yith_magnifier_title">' + zoomImage.attr('title') + '</div>').appendTo(self.zoomDiv);
|
506 |
+
}
|
507 |
+
|
508 |
+
if (self.isPhone) {
|
509 |
+
if (self.options.phoneBehavior != 'disable') {
|
510 |
+
self.zoomDiv.fadeIn(500);
|
511 |
+
} else {
|
512 |
+
self.lens.fadeOut(299);
|
513 |
+
}
|
514 |
+
} else {
|
515 |
+
self.zoomDiv.fadeIn(500);
|
516 |
+
}
|
517 |
+
|
518 |
+
if (self.lens) {
|
519 |
+
self.lens.remove();
|
520 |
+
self.lens = null;
|
521 |
+
}
|
522 |
+
|
523 |
+
if (zoomImg.width <= 1) {
|
524 |
+
self.cw = (zoomImage.outerWidth() / zoomImg.naturalWidth) * self.zoomDiv.width();
|
525 |
+
} else {
|
526 |
+
self.cw = (zoomImage.outerWidth() / zoomImg.width) * self.zoomDiv.width();
|
527 |
+
}
|
528 |
+
|
529 |
+
if (zoomImg.height <= 1) {
|
530 |
+
self.ch = (zoomImage.outerHeight() / zoomImg.naturalHeight) * self.zoomDiv.height();
|
531 |
+
} else {
|
532 |
+
self.ch = (zoomImage.outerHeight() / zoomImg.height) * self.zoomDiv.height();
|
533 |
+
}
|
534 |
+
|
535 |
+
// Attach mouse, initially invisible to prevent first frame glitch
|
536 |
+
self.lens = $('<div class="yith_magnifier_lens" />').css({
|
537 |
+
width: self.cw,
|
538 |
+
height: self.ch
|
539 |
+
}).appendTo(zoom);
|
540 |
+
|
541 |
+
self.mouseTrap.css('cursor', self.lens.css('cursor'));
|
542 |
+
|
543 |
+
var noTrans = false;
|
544 |
+
|
545 |
+
|
546 |
+
// Init tint layer if needed. (Not relevant if using inside mode)
|
547 |
+
if (self.options.tint) {
|
548 |
+
//self.lens.css('background', 'url("' + zoomImage.attr('src') + '")');
|
549 |
+
self.tint = $('<div />').css({
|
550 |
+
display: 'none',
|
551 |
+
position: 'absolute',
|
552 |
+
left: 0,
|
553 |
+
top: 0,
|
554 |
+
width: zoomImage.outerWidth(),
|
555 |
+
height: zoomImage.outerHeight(),
|
556 |
+
backgroundColor: self.options.tint,
|
557 |
+
opacity: self.options.tintOpacity
|
558 |
+
}).appendTo(zoom);
|
559 |
+
|
560 |
+
|
561 |
+
self.lens.append($('<img />', {
|
562 |
+
src: zoomImage.attr('src')
|
563 |
+
}));
|
564 |
+
|
565 |
+
noTrans = true;
|
566 |
+
self.tint.fadeIn(500);
|
567 |
+
}
|
568 |
+
|
569 |
+
if (self.options.softFocus) {
|
570 |
+
//self.lens.css('background', 'url("' + zoomImage.attr('src') + '")');
|
571 |
+
self.softFocus = $('<div />').css({
|
572 |
+
position: 'absolute',
|
573 |
+
display: 'none',
|
574 |
+
top: '1px',
|
575 |
+
left: '1px',
|
576 |
+
width: zoomImage.outerWidth(),
|
577 |
+
height: zoomImage.outerHeight(),
|
578 |
+
//background: 'url("' + zoomImage.attr('src') + '")',
|
579 |
+
//backgroundSize: '100%',
|
580 |
+
opacity: .5
|
581 |
+
}).appendTo(zoom);
|
582 |
+
|
583 |
+
self.softFocus.append($('<img />', {
|
584 |
+
src: zoomImage.attr('src')
|
585 |
+
}));
|
586 |
+
|
587 |
+
if (self.lens.find('img').length == 0) {
|
588 |
+
self.lens.append($('<img />', {
|
589 |
+
src: zoomImage.attr('src')
|
590 |
+
}));
|
591 |
+
}
|
592 |
+
|
593 |
+
noTrans = true;
|
594 |
+
self.softFocus.fadeIn(500);
|
595 |
+
}
|
596 |
+
|
597 |
+
|
598 |
+
if (!noTrans) {
|
599 |
+
self.lens.css('opacity', self.options.lensOpacity);
|
600 |
+
}
|
601 |
+
if (self.options.position !== 'inside') {
|
602 |
+
self.lens.fadeIn(500);
|
603 |
+
}
|
604 |
+
|
605 |
+
// Start processing.
|
606 |
+
self.zw._controlLoop();
|
607 |
+
|
608 |
+
return; // Don't return false here otherwise opera will not detect change of the mouse pointer type.
|
609 |
+
});
|
610 |
+
},
|
611 |
+
|
612 |
+
/**
|
613 |
+
*
|
614 |
+
*
|
615 |
+
* @private
|
616 |
+
*/
|
617 |
+
_controlLoop: function () {
|
618 |
+
var self = this;
|
619 |
+
|
620 |
+
if (this.lens) {
|
621 |
+
var x = (this.mx - this.zoomImage.offset().left - (this.cw * 0.5)) >> 0;
|
622 |
+
var y = (this.my - this.zoomImage.offset().top - (this.ch * 0.5)) >> 0;
|
623 |
+
|
624 |
+
if (x < 0) {
|
625 |
+
x = 0;
|
626 |
+
} else if (x > (this.zoomImage.outerWidth() - this.cw)) {
|
627 |
+
x = (this.zoomImage.outerWidth() - this.cw);
|
628 |
+
}
|
629 |
+
|
630 |
+
if (y < 0) {
|
631 |
+
y = 0;
|
632 |
+
} else if (y > (this.zoomImage.outerHeight() - this.ch)) {
|
633 |
+
y = (this.zoomImage.outerHeight() - this.ch);
|
634 |
+
}
|
635 |
+
|
636 |
+
this.lens.css({
|
637 |
+
left: x - 2,
|
638 |
+
top: y - 1
|
639 |
+
});
|
640 |
+
|
641 |
+
//this.lens.css('background-position', (-x) + 'px ' + (-y) + 'px');
|
642 |
+
|
643 |
+
|
644 |
+
this.lens.find('img').css({
|
645 |
+
width: this.zoomImage.outerWidth(),
|
646 |
+
height: this.zoomImage.outerHeight(),
|
647 |
+
marginLeft: (-x) + 'px ',
|
648 |
+
marginTop: (-y) + 'px'
|
649 |
+
});
|
650 |
+
|
651 |
+
|
652 |
+
if (this.IMG_zoomImage.width <= 1) {
|
653 |
+
this.destU = (((x) / this.zoomImage.outerWidth()) * this.IMG_zoomImage.naturalWidth) >> 0;
|
654 |
+
} else {
|
655 |
+
this.destU = (((x) / this.zoomImage.outerWidth()) * this.IMG_zoomImage.width) >> 0;
|
656 |
+
}
|
657 |
+
|
658 |
+
if (this.IMG_zoomImage.height <= 1) {
|
659 |
+
this.destV = (((y) / this.zoomImage.outerHeight()) * this.IMG_zoomImage.naturalHeight) >> 0;
|
660 |
+
} else {
|
661 |
+
this.destV = (((y) / this.zoomImage.outerHeight()) * this.IMG_zoomImage.height) >> 0;
|
662 |
+
}
|
663 |
+
|
664 |
+
|
665 |
+
this.currU += (this.destU - this.currU) / this.options.smoothMove;
|
666 |
+
this.currV += (this.destV - this.currV) / this.options.smoothMove;
|
667 |
+
|
668 |
+
this.zoomDiv.css('background-position', (-(this.currU >> 0) + 'px ') + (-(this.currV >> 0) + 'px'));
|
669 |
+
}
|
670 |
+
|
671 |
+
this.controlTimer = setTimeout(function () {
|
672 |
+
self._controlLoop();
|
673 |
+
}, 30);
|
674 |
+
},
|
675 |
+
|
676 |
+
/**
|
677 |
+
* This method is called when the mouse leave the image
|
678 |
+
*
|
679 |
+
* @private
|
680 |
+
*/
|
681 |
+
_onLeave: function () {
|
682 |
+
this.options.onLeave();
|
683 |
+
|
684 |
+
if (this.zoomDiv) {
|
685 |
+
this.zoomDiv.remove();
|
686 |
+
this.zoomDiv = null;
|
687 |
+
}
|
688 |
+
|
689 |
+
this._removeElements();
|
690 |
+
},
|
691 |
+
|
692 |
+
/**
|
693 |
+
* Remove lens, tint and softfocus
|
694 |
+
*
|
695 |
+
* @private
|
696 |
+
*/
|
697 |
+
_removeElements: function () {
|
698 |
+
if (this.lens) {
|
699 |
+
this.lens.remove();
|
700 |
+
this.lens = null;
|
701 |
+
}
|
702 |
+
|
703 |
+
if (this.tint) {
|
704 |
+
this.tint.remove();
|
705 |
+
this.tint = null;
|
706 |
+
}
|
707 |
+
|
708 |
+
if (this.softFocus) {
|
709 |
+
this.softFocus.remove();
|
710 |
+
this.softFocus = null;
|
711 |
+
}
|
712 |
+
|
713 |
+
if (this.element.find('.yith_magnifier_loading').length > 0) {
|
714 |
+
this.element.find('.yith_magnifier_loading').remove();
|
715 |
+
}
|
716 |
+
},
|
717 |
+
|
718 |
+
/**
|
719 |
+
* Detect if user is using a phone device (eg iPhone)
|
720 |
+
*
|
721 |
+
* @private
|
722 |
+
*/
|
723 |
+
_isPhone: function () {
|
724 |
+
var userAgent = navigator.userAgent.toLowerCase();
|
725 |
+
|
726 |
+
return ( userAgent.match(/iphone/i) || userAgent.match(/ipod/i) || userAgent.match(/android/i) );
|
727 |
+
},
|
728 |
+
|
729 |
+
/**
|
730 |
+
* Destroy the instance
|
731 |
+
*
|
732 |
+
*/
|
733 |
+
destroy: function () {
|
734 |
+
if (this.zoom) {
|
735 |
+
this.zoom.unwrap();
|
736 |
+
}
|
737 |
+
|
738 |
+
if (this.mouseTrap) {
|
739 |
+
this.mouseTrap.unbind();
|
740 |
+
this.mouseTrap.remove();
|
741 |
+
this.mouseTrap = null;
|
742 |
+
}
|
743 |
+
|
744 |
+
if (this.zoomDiv) {
|
745 |
+
this.zoomDiv.remove();
|
746 |
+
this.zoomDiv = null;
|
747 |
+
}
|
748 |
+
|
749 |
+
if (this.options.disableRightClick) {
|
750 |
+
$(document).unbind();
|
751 |
+
}
|
752 |
+
|
753 |
+
this._removeElements();
|
754 |
+
this.options.elements.gallery.unbind();
|
755 |
+
this.element.removeData('yith_magnifier');
|
756 |
+
}
|
757 |
+
};
|
758 |
+
|
759 |
+
$.fn.yith_magnifier = function (options) {
|
760 |
+
|
761 |
+
if (typeof options === 'string') {
|
762 |
+
var args = Array.prototype.slice.call(arguments, 1);
|
763 |
+
|
764 |
+
this.each(function () {
|
765 |
+
var instance = $.data(this, 'yith_magnifier');
|
766 |
+
if (!instance) {
|
767 |
+
$.error("cannot call methods on yith_magnifier prior to initialization; " +
|
768 |
+
"attempted to call method '" + options + "'");
|
769 |
+
return;
|
770 |
+
}
|
771 |
+
if (!$.isFunction(instance[options]) || options.charAt(0) === "_") {
|
772 |
+
$.error("no such method '" + options + "' for yith_magnifier instance");
|
773 |
+
return;
|
774 |
+
}
|
775 |
+
instance[options].apply(instance, args);
|
776 |
+
});
|
777 |
+
} else {
|
778 |
+
this.each(function () {
|
779 |
+
var instance = $.data(this, 'yith_magnifier');
|
780 |
+
if (!instance) {
|
781 |
+
$.data(this, 'yith_magnifier', new $.yith_magnifier(options, this));
|
782 |
+
} else {
|
783 |
+
$.error('yith_magnifier already istantiated.');
|
784 |
+
}
|
785 |
+
});
|
786 |
+
}
|
787 |
+
return this;
|
788 |
+
};
|
789 |
+
|
790 |
+
|
791 |
})(window, jQuery);
|
init.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: YITH WooCommerce Zoom Magnifier
|
4 |
* Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
|
5 |
* Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images and a thumbnail slider for the product image gallery.
|
6 |
-
* Version: 1.2.
|
7 |
* Author: YITHEMES
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-zoom-magnifier
|
@@ -11,7 +11,7 @@
|
|
11 |
*
|
12 |
* @author Your Inspiration Themes
|
13 |
* @package YITH WooCommerce Magnifier
|
14 |
-
* @version 1.2.
|
15 |
*/
|
16 |
/* Copyright 2013-2015 Your Inspiration Themes (email : plugins@yithemes.com)
|
17 |
|
@@ -76,7 +76,7 @@ if ( ! function_exists ( 'yith_plugin_registration_hook' ) ) {
|
|
76 |
register_activation_hook ( __FILE__, 'yith_plugin_registration_hook' );
|
77 |
|
78 |
defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
|
79 |
-
defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.2.
|
80 |
defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
|
81 |
defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
|
82 |
defined ( 'YITH_YWZM_URL' ) || define ( 'YITH_YWZM_URL', plugins_url ( '/', __FILE__ ) );
|
3 |
* Plugin Name: YITH WooCommerce Zoom Magnifier
|
4 |
* Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-zoom-magnifier/
|
5 |
* Description: YITH WooCommerce Zoom Magnifier enables you to add a zoom effect to product images and a thumbnail slider for the product image gallery.
|
6 |
+
* Version: 1.2.20
|
7 |
* Author: YITHEMES
|
8 |
* Author URI: http://yithemes.com/
|
9 |
* Text Domain: yith-woocommerce-zoom-magnifier
|
11 |
*
|
12 |
* @author Your Inspiration Themes
|
13 |
* @package YITH WooCommerce Magnifier
|
14 |
+
* @version 1.2.20
|
15 |
*/
|
16 |
/* Copyright 2013-2015 Your Inspiration Themes (email : plugins@yithemes.com)
|
17 |
|
76 |
register_activation_hook ( __FILE__, 'yith_plugin_registration_hook' );
|
77 |
|
78 |
defined ( 'YITH_YWZM_FREE_INIT' ) || define ( 'YITH_YWZM_FREE_INIT', plugin_basename ( __FILE__ ) );
|
79 |
+
defined ( 'YITH_YWZM_VERSION' ) || define ( 'YITH_YWZM_VERSION', '1.2.20' );
|
80 |
defined ( 'YITH_YWZM_FILE' ) || define ( 'YITH_YWZM_FILE', __FILE__ );
|
81 |
defined ( 'YITH_YWZM_DIR' ) || define ( 'YITH_YWZM_DIR', plugin_dir_path ( __FILE__ ) );
|
82 |
defined ( 'YITH_YWZM_URL' ) || define ( 'YITH_YWZM_URL', plugins_url ( '/', __FILE__ ) );
|
languages/yith-woocommerce-zoom-magnifier-es_ES.mo
ADDED
Binary file
|
languages/yith-woocommerce-zoom-magnifier-es_ES.po
ADDED
@@ -0,0 +1,489 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: YITH WooCommerce Order Tracking\n"
|
4 |
+
"POT-Creation-Date: 2016-06-13 16:57+0200\n"
|
5 |
+
"PO-Revision-Date: 2016-06-13 16:57+0200\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
|
8 |
+
"Language: es_ES\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.8.4\n"
|
13 |
+
"X-Poedit-Basepath: ..\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=n!=1;\n"
|
15 |
+
"X-Poedit-KeywordsList: __ ;_e;_n:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
|
16 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
17 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SearchPathExcluded-0: plugin-fw\n"
|
20 |
+
|
21 |
+
#: class.yith-wcmg-admin.php:81
|
22 |
+
msgid "Image Size"
|
23 |
+
msgstr "Tamaño de la imagen"
|
24 |
+
|
25 |
+
#: class.yith-wcmg-admin.php:82 plugin-options/general-options.php:17
|
26 |
+
msgid "The size of the images used within the magnifier box"
|
27 |
+
msgstr "El tamaño de las imágenes usadas dentro de la caja de zoom"
|
28 |
+
|
29 |
+
#: init.php:50
|
30 |
+
msgid ""
|
31 |
+
"YITH WooCommerce Zoom Magnifier is enabled but not effective. It requires "
|
32 |
+
"WooCommerce in order to work."
|
33 |
+
msgstr ""
|
34 |
+
"YITH WooCommerce Zoom Magnifier está habilitado pero no es efectivo. "
|
35 |
+
"Requiere WooCommerce para funcionar."
|
36 |
+
|
37 |
+
#: init.php:66
|
38 |
+
msgid ""
|
39 |
+
"You can't activate the free version of YITH WooCommerce Zoom Magnifier while "
|
40 |
+
"you are using the premium one."
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: lib/class.yith-ywzm-custom-types.php:159
|
44 |
+
msgid "Do you want to hard crop the image?"
|
45 |
+
msgstr "¿Quieres recortar la imagen?"
|
46 |
+
|
47 |
+
#: lib/class.yith-ywzm-plugin-fw-loader.php:124
|
48 |
+
msgid "General"
|
49 |
+
msgstr "General"
|
50 |
+
|
51 |
+
#: lib/class.yith-ywzm-plugin-fw-loader.php:127
|
52 |
+
#: lib/class.yith-ywzm-plugin-fw-loader.php:191
|
53 |
+
msgid "Premium Version"
|
54 |
+
msgstr "Versión Premium"
|
55 |
+
|
56 |
+
#: lib/class.yith-ywzm-plugin-fw-loader.php:129
|
57 |
+
msgid "Product exclusion list"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: lib/class.yith-ywzm-plugin-fw-loader.php:188
|
61 |
+
msgid "Settings"
|
62 |
+
msgstr "Ajustes"
|
63 |
+
|
64 |
+
#: lib/class.yith-ywzm-plugin-fw-loader.php:216
|
65 |
+
msgid "Plugin Documentation"
|
66 |
+
msgstr "Documentación del Plugin"
|
67 |
+
|
68 |
+
#: lib/class.yith-ywzm-plugin-fw-loader.php:229
|
69 |
+
msgid ""
|
70 |
+
"YITH WooCommerce Zoom Magnifier is available in an outstanding PREMIUM "
|
71 |
+
"version with many new options, discover it now."
|
72 |
+
msgstr ""
|
73 |
+
"YITH WooCommerce Zoom Magnifier está disponible en una espectacular versión "
|
74 |
+
"PREMIUM con muchas nuevas opciones, descúbrela ahora."
|
75 |
+
|
76 |
+
#: lib/class.yith-ywzm-plugin-fw-loader.php:230
|
77 |
+
msgid "Premium version"
|
78 |
+
msgstr "Versión Pemium"
|
79 |
+
|
80 |
+
#: lib/class.yith-ywzm-plugin-fw-loader.php:237
|
81 |
+
#: plugin-options/general-options.php:217
|
82 |
+
msgid "YITH WooCommerce Zoom Magnifier"
|
83 |
+
msgstr "YITH WooCommerce Zoom Magnifier"
|
84 |
+
|
85 |
+
#: lib/class.yith-ywzm-plugin-fw-loader.php:238
|
86 |
+
msgid ""
|
87 |
+
"In YIT Plugins tab you can find YITH WooCommerce Zoom Magnifier options."
|
88 |
+
"<br> From this menu you can access all settings of the YITH plugins "
|
89 |
+
"activated."
|
90 |
+
msgstr ""
|
91 |
+
"En la pestaña YITH Plugins puedes encontrar opciones de YITH WooCommerce "
|
92 |
+
"Zoom Magnifier. <br> Desde este menú puedes acceder a todos los ajustes de "
|
93 |
+
"los plugin YITH activados."
|
94 |
+
|
95 |
+
#: plugin-options/general-options.php:16
|
96 |
+
msgid "Image size"
|
97 |
+
msgstr "Tamaño de imagen"
|
98 |
+
|
99 |
+
#: plugin-options/general-options.php:36
|
100 |
+
msgid "General Settings"
|
101 |
+
msgstr "Ajustes Generales"
|
102 |
+
|
103 |
+
#: plugin-options/general-options.php:42
|
104 |
+
msgid "Activate YITH WooCommerce Zoom Magnifier"
|
105 |
+
msgstr "Activar YITH WooCommerce Zoom Magnifier"
|
106 |
+
|
107 |
+
#: plugin-options/general-options.php:43
|
108 |
+
msgid "Activate the plugin or use the WooCommerce default product image."
|
109 |
+
msgstr ""
|
110 |
+
"Activar el plugin o usar la imagen de producto por defecto de WooComerce."
|
111 |
+
|
112 |
+
#: plugin-options/general-options.php:50
|
113 |
+
msgid "Activate on mobile device"
|
114 |
+
msgstr "Activar en dispositivos móviles"
|
115 |
+
|
116 |
+
#: plugin-options/general-options.php:51
|
117 |
+
msgid ""
|
118 |
+
"Set if zoom and slider functionalities should be shown also on mobile "
|
119 |
+
"devices."
|
120 |
+
msgstr ""
|
121 |
+
"Establecer si las funcionalidades del zoom y el deslizador deberían "
|
122 |
+
"mostrarse también en dispositivos móviles."
|
123 |
+
|
124 |
+
#: plugin-options/general-options.php:59
|
125 |
+
msgid "Forced Image Size"
|
126 |
+
msgstr "Tamaño de imagen obligatiorio"
|
127 |
+
|
128 |
+
#: plugin-options/general-options.php:60
|
129 |
+
msgid ""
|
130 |
+
"If disabled, you will able to customize the sizes of the zoomed images. "
|
131 |
+
"Disable it at your own risk; the magnifier could not properly work with "
|
132 |
+
"images out of proportion."
|
133 |
+
msgstr ""
|
134 |
+
"Si está deshabilitado, podrás personalizar los tamaños de las imágenes "
|
135 |
+
"aumentadas. Desactívalo bajo tu propio riesgo, la lupa no funciona "
|
136 |
+
"correctamente con imágenes desproporcionadas."
|
137 |
+
|
138 |
+
#: plugin-options/general-options.php:74
|
139 |
+
msgid "Magnifier Settings"
|
140 |
+
msgstr "Ajustes del xoom"
|
141 |
+
|
142 |
+
#: plugin-options/general-options.php:80
|
143 |
+
msgid "Zoom Box Width"
|
144 |
+
msgstr "Ancho del cuadro de zoom"
|
145 |
+
|
146 |
+
#: plugin-options/general-options.php:81
|
147 |
+
msgid "The width of the magnifier box (default: auto)"
|
148 |
+
msgstr "El ancho del cuadro de zoom (por defecto: auto)"
|
149 |
+
|
150 |
+
#: plugin-options/general-options.php:88
|
151 |
+
msgid "Zoom Box Height"
|
152 |
+
msgstr "Altura del cuadro de zoom"
|
153 |
+
|
154 |
+
#: plugin-options/general-options.php:89
|
155 |
+
msgid "The height of the magnifier box (default: auto)"
|
156 |
+
msgstr "La altura del cuadro de zoom (por defecto: auto)"
|
157 |
+
|
158 |
+
#: plugin-options/general-options.php:97
|
159 |
+
msgid "Zoom Box Position"
|
160 |
+
msgstr "Posición del cuadro de zoom"
|
161 |
+
|
162 |
+
#: plugin-options/general-options.php:98
|
163 |
+
msgid "The magnifier position"
|
164 |
+
msgstr "La posición del cuadro de zoom"
|
165 |
+
|
166 |
+
#: plugin-options/general-options.php:104
|
167 |
+
msgid "Right"
|
168 |
+
msgstr "Derecha"
|
169 |
+
|
170 |
+
#: plugin-options/general-options.php:105
|
171 |
+
#: plugin-options/general-options.php:117
|
172 |
+
msgid "Inside"
|
173 |
+
msgstr "Dentro"
|
174 |
+
|
175 |
+
#: plugin-options/general-options.php:109
|
176 |
+
msgid "Zoom Box Position for mobile devices"
|
177 |
+
msgstr "Posición del cuadro de zoom en dispositivos móviles"
|
178 |
+
|
179 |
+
#: plugin-options/general-options.php:110
|
180 |
+
msgid "The magnifier position for the mobile devices (iPhone, Android, etc.)"
|
181 |
+
msgstr "La posición del zoom en dispositivos móviles (iPhone, Android, etc.)"
|
182 |
+
|
183 |
+
#: plugin-options/general-options.php:116
|
184 |
+
msgid "Default"
|
185 |
+
msgstr "Por defecto"
|
186 |
+
|
187 |
+
#: plugin-options/general-options.php:118
|
188 |
+
msgid "Disable"
|
189 |
+
msgstr "Deshabilitar"
|
190 |
+
|
191 |
+
#: plugin-options/general-options.php:122
|
192 |
+
msgid "Loading label"
|
193 |
+
msgstr "Etiqueta de cargando"
|
194 |
+
|
195 |
+
#: plugin-options/general-options.php:125
|
196 |
+
#: plugin-options/general-options.php:126
|
197 |
+
msgid "Loading..."
|
198 |
+
msgstr "Cargando..."
|
199 |
+
|
200 |
+
#: plugin-options/general-options.php:131
|
201 |
+
msgid "Lens Opacity"
|
202 |
+
msgstr "Opacidad de la lente"
|
203 |
+
|
204 |
+
#: plugin-options/general-options.php:142
|
205 |
+
msgid "Blur"
|
206 |
+
msgstr "Difuminar"
|
207 |
+
|
208 |
+
#: plugin-options/general-options.php:143
|
209 |
+
msgid "Add a blur effect to the small image on mouse hover."
|
210 |
+
msgstr ""
|
211 |
+
"Añadir un efecto de disolverse a la imagen pequeña con el evento hover del "
|
212 |
+
"ratón."
|
213 |
+
|
214 |
+
#: plugin-options/general-options.php:154
|
215 |
+
msgid "Slider Settings"
|
216 |
+
msgstr "Ajustes de Deslizador"
|
217 |
+
|
218 |
+
#: plugin-options/general-options.php:160
|
219 |
+
msgid "Activate Slider"
|
220 |
+
msgstr "Activar Deslizador"
|
221 |
+
|
222 |
+
#: plugin-options/general-options.php:161
|
223 |
+
msgid "Activate Thumbnail Slider."
|
224 |
+
msgstr "Activar miniatura de Deslizador."
|
225 |
+
|
226 |
+
#: plugin-options/general-options.php:168
|
227 |
+
msgid "Activate Responsive Slider"
|
228 |
+
msgstr "Activar Deslizador Responsive"
|
229 |
+
|
230 |
+
#: plugin-options/general-options.php:169
|
231 |
+
msgid ""
|
232 |
+
"This option fits the thumbnails within the available space. Disable it if "
|
233 |
+
"you want to manage freely the thumbnails (eg. add margins, paddings, etc.)"
|
234 |
+
msgstr ""
|
235 |
+
"Esta opción ajusta las miniaturas dentro del espacio disponible. "
|
236 |
+
"Deshabilítala si quieres administrar libremente las miniaturas (p.ej.: "
|
237 |
+
"añadir márgenes, rellenos, etc.)"
|
238 |
+
|
239 |
+
#: plugin-options/general-options.php:176
|
240 |
+
msgid "Items"
|
241 |
+
msgstr "Elementos"
|
242 |
+
|
243 |
+
#: plugin-options/general-options.php:177
|
244 |
+
msgid "Number of items to show"
|
245 |
+
msgstr "Número de elementos que se muestran"
|
246 |
+
|
247 |
+
#: plugin-options/general-options.php:187
|
248 |
+
msgid "Circular carousel"
|
249 |
+
msgstr "Carrusel circular"
|
250 |
+
|
251 |
+
#: plugin-options/general-options.php:188
|
252 |
+
msgid "It defines whether the carousel should be circular."
|
253 |
+
msgstr "Define si el carrusel debe ser circular"
|
254 |
+
|
255 |
+
#: plugin-options/general-options.php:195
|
256 |
+
msgid "Infinite carousel"
|
257 |
+
msgstr "Carrusel infinito"
|
258 |
+
|
259 |
+
#: plugin-options/general-options.php:196
|
260 |
+
msgid ""
|
261 |
+
"It defines whether the carousel should be infinite. Note: It is possible to "
|
262 |
+
"create a non-circular, infinite carousel, but it is not possible to create a "
|
263 |
+
"circular, non-infinite carousel."
|
264 |
+
msgstr ""
|
265 |
+
"Define si el carrusel debe ser infinito. Nota: es posible crear un carrusel "
|
266 |
+
"infinito no circular, pero no es posible crear un carrusel circular no "
|
267 |
+
"infinito."
|
268 |
+
|
269 |
+
#: plugin-options/general-options.php:214
|
270 |
+
msgid "Upgrade to the PREMIUM VERSION"
|
271 |
+
msgstr "Actualiza a la VERSIÓN PREMIUM"
|
272 |
+
|
273 |
+
#: plugin-options/general-options.php:218
|
274 |
+
msgid "Discover The Advanced Features"
|
275 |
+
msgstr "Descubre las características avanzadas"
|
276 |
+
|
277 |
+
#: plugin-options/general-options.php:219
|
278 |
+
msgid ""
|
279 |
+
"Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit "
|
280 |
+
"from all features!"
|
281 |
+
msgstr ""
|
282 |
+
"¡Actualiza a la VERSIÓN PREMIUM de YITH WOOCOMMERCE ZOOM MAGNIFIER para "
|
283 |
+
"beneficiarte de todas las características!"
|
284 |
+
|
285 |
+
#: plugin-options/general-options.php:223
|
286 |
+
msgid ""
|
287 |
+
"See YITH WooCommerce Zoom Magnifier plugin with full premium features in "
|
288 |
+
"action"
|
289 |
+
msgstr ""
|
290 |
+
"Ver cómo es el plugin YITH WooCommerce Zoom Magnifier con todas sus "
|
291 |
+
"características premium en acción"
|
292 |
+
|
293 |
+
#: plugin-options/general-options.php:225
|
294 |
+
msgid "Get Support and Pro Features"
|
295 |
+
msgstr "Hazte con Características Pro y Soporte"
|
296 |
+
|
297 |
+
#: plugin-options/general-options.php:226
|
298 |
+
msgid ""
|
299 |
+
"Purchasing the premium version of the plugin, you will take advantage of the "
|
300 |
+
"advanced features of the product, and you will get one year of free updates "
|
301 |
+
"and support through our platform available 24h/24."
|
302 |
+
msgstr ""
|
303 |
+
"Comprando la versión premium del plugin, obtendrás las ventajas de las "
|
304 |
+
"características avanzadas del producto, y tendrás un año de actualizaciones "
|
305 |
+
"gratuitas y de soporte a través de nuestra plataforma disponible 24h/24."
|
306 |
+
|
307 |
+
#: templates/admin/premium.php:193
|
308 |
+
#, php-format
|
309 |
+
msgid ""
|
310 |
+
"Upgrade to the %1$s premium version %2$s of %1$s YITH WooCommerce Zoom "
|
311 |
+
"Magnifier %2$s to benefit from all features!"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: templates/admin/premium.php:196
|
315 |
+
#, php-format
|
316 |
+
msgid "%1$sUPGRADE%2$s%3$sto the premium version%2$s"
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
#: templates/admin/premium.php:202
|
320 |
+
#, php-format
|
321 |
+
msgid "%1$sPremium Features%2$s"
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
#: templates/admin/premium.php:210
|
325 |
+
msgid "ZOOM BOX POSITION"
|
326 |
+
msgstr ""
|
327 |
+
|
328 |
+
#: templates/admin/premium.php:213
|
329 |
+
#, php-format
|
330 |
+
msgid ""
|
331 |
+
"Choose where you want to show the %1$szoomed version%2$s of the image of "
|
332 |
+
"your products. Place it above or below the original image, on its left or "
|
333 |
+
"its right, or you can even place it over it.$2$s"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: templates/admin/premium.php:223
|
337 |
+
msgid "ENLARGE THE IMAGES"
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: templates/admin/premium.php:225
|
341 |
+
msgid ""
|
342 |
+
"Just one click and the product image will appear in a bigger size in a modal "
|
343 |
+
"window. A further chance to let users analyze in a better way what you sell."
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: templates/admin/premium.php:240
|
347 |
+
msgid "EXCLUDE PRODUCTS"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: templates/admin/premium.php:242
|
351 |
+
msgid ""
|
352 |
+
"Tailored options to limit the plugin features only to certain products. Some "
|
353 |
+
"of these could have too small images to be zoomed, or maybe being part of "
|
354 |
+
"categories that do not imply zoomed images. Select the products and the "
|
355 |
+
"categories to exclude and delete all your problems"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: templates/admin/premium.php:251
|
359 |
+
#, php-format
|
360 |
+
msgid ""
|
361 |
+
"Upgrade to the %1$spremium version%2$s of %1$sYITH WooCommerce Zoom Magnifier"
|
362 |
+
"%2$s to benefit from all features!"
|
363 |
+
msgstr ""
|
364 |
+
|
365 |
+
#: templates/admin/premium.php:254
|
366 |
+
#, php-format
|
367 |
+
msgid "%1$sUPGRADE%2$s %3$sto the premium version%2$s"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: yit-common/yith-panel.php:429
|
371 |
+
msgid "Select a date"
|
372 |
+
msgstr "Selecciona una fecha"
|
373 |
+
|
374 |
+
#: yit-common/yith-panel.php:430
|
375 |
+
msgid "Hours"
|
376 |
+
msgstr "Horas"
|
377 |
+
|
378 |
+
#: yit-common/yith-panel.php:431 yit-common/yith-panel.php:432
|
379 |
+
msgid "Minutes"
|
380 |
+
msgstr "Minutos"
|
381 |
+
|
382 |
+
#: yit-common/yith-panel.php:440
|
383 |
+
msgid "Upload"
|
384 |
+
msgstr "Actualizar"
|
385 |
+
|
386 |
+
#: yit-common/yith-panel.php:477
|
387 |
+
msgid "px"
|
388 |
+
msgstr "px"
|
389 |
+
|
390 |
+
#: yit-common/yith-panel.php:479
|
391 |
+
msgid "em"
|
392 |
+
msgstr "em"
|
393 |
+
|
394 |
+
#: yit-common/yith-panel.php:481
|
395 |
+
msgid "pt"
|
396 |
+
msgstr "pt"
|
397 |
+
|
398 |
+
#: yit-common/yith-panel.php:483
|
399 |
+
msgid "rem"
|
400 |
+
msgstr "rem"
|
401 |
+
|
402 |
+
#: yit-common/yith-panel.php:495
|
403 |
+
msgid "Select a font family"
|
404 |
+
msgstr "Selecciona un tipo de fuente"
|
405 |
+
|
406 |
+
#: yit-common/yith-panel.php:505
|
407 |
+
msgid "Regular"
|
408 |
+
msgstr "Normal"
|
409 |
+
|
410 |
+
#: yit-common/yith-panel.php:507
|
411 |
+
msgid "Bold"
|
412 |
+
msgstr "Negrita"
|
413 |
+
|
414 |
+
#: yit-common/yith-panel.php:509
|
415 |
+
msgid "Extra bold"
|
416 |
+
msgstr "Extra negrita"
|
417 |
+
|
418 |
+
#: yit-common/yith-panel.php:511
|
419 |
+
msgid "Italic"
|
420 |
+
msgstr "Cursiva"
|
421 |
+
|
422 |
+
#: yit-common/yith-panel.php:513
|
423 |
+
msgid "Italic bold"
|
424 |
+
msgstr "Negrita cursiva"
|
425 |
+
|
426 |
+
#: yit-common/yith-panel.php:529
|
427 |
+
msgid "Click to preview"
|
428 |
+
msgstr "Haz click para previsualizar"
|
429 |
+
|
430 |
+
#~ msgid "product"
|
431 |
+
#~ msgstr "praducto"
|
432 |
+
|
433 |
+
#~ msgid "products"
|
434 |
+
#~ msgstr "productos"
|
435 |
+
|
436 |
+
#~ msgid "Remove from exclusions"
|
437 |
+
#~ msgstr "Quitar de las exclusiones"
|
438 |
+
|
439 |
+
#~ msgid "Edit product"
|
440 |
+
#~ msgstr "Editar producto"
|
441 |
+
|
442 |
+
#~ msgid "Remove from list"
|
443 |
+
#~ msgstr "Eliminar de la lista"
|
444 |
+
|
445 |
+
#~ msgid "%s product removed successfully"
|
446 |
+
#~ msgid_plural "%s products removed successfully"
|
447 |
+
#~ msgstr[0] "El producto %s ha sido eliminado con éxito"
|
448 |
+
#~ msgstr[1] "Los productos %s han sido eliminados con éxito"
|
449 |
+
|
450 |
+
#~ msgid "%s product added successfully"
|
451 |
+
#~ msgid_plural "%s products added successfully"
|
452 |
+
#~ msgstr[0] "El producto %s ha sido añadido con éxito"
|
453 |
+
#~ msgstr[1] "Los productos %s han sido añadidos con éxito"
|
454 |
+
|
455 |
+
#~ msgid "Product updated successfully"
|
456 |
+
#~ msgstr "Producto actualizado con éxito"
|
457 |
+
|
458 |
+
#~ msgid "Single Product Exclusion List"
|
459 |
+
#~ msgstr "Lista de Exclusión de Productos"
|
460 |
+
|
461 |
+
#~ msgid "Add Products"
|
462 |
+
#~ msgstr "Añadir productos"
|
463 |
+
|
464 |
+
#~ msgid "Products to exclude"
|
465 |
+
#~ msgstr "Productos para excluir"
|
466 |
+
|
467 |
+
#~ msgid "Add product exclusion"
|
468 |
+
#~ msgstr "Añadir exclusión de producto"
|
469 |
+
|
470 |
+
#~ msgid "Return to exclusion list"
|
471 |
+
#~ msgstr "Devolver a la lista de exclusión"
|
472 |
+
|
473 |
+
#~ msgid "Select at least one product"
|
474 |
+
#~ msgstr "Selecciona al menos un producto"
|
475 |
+
|
476 |
+
#~ msgid "Exclude product categories"
|
477 |
+
#~ msgstr "Excluir categorías de productos"
|
478 |
+
|
479 |
+
#~ msgid "Top"
|
480 |
+
#~ msgstr "Arriba"
|
481 |
+
|
482 |
+
#~ msgid "Bottom"
|
483 |
+
#~ msgstr "Abajo"
|
484 |
+
|
485 |
+
#~ msgid "Left"
|
486 |
+
#~ msgstr "Izquierda"
|
487 |
+
|
488 |
+
#~ msgid "Product"
|
489 |
+
#~ msgstr "Producto"
|
languages/yith-woocommerce-zoom-magnifier.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: YITH WooCommerce Order Tracking\n"
|
5 |
-
"POT-Creation-Date: 2016-
|
6 |
"PO-Revision-Date: 2015-04-22 12:25+0100\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: YITH WooCommerce Order Tracking\n"
|
5 |
+
"POT-Creation-Date: 2016-06-13 16:57+0200\n"
|
6 |
"PO-Revision-Date: 2015-04-22 12:25+0100\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: Your Inspiration Themes <plugins@yithemes.com>\n"
|
plugin-fw/assets/css/yit-plugin-panel-sidebar.css
CHANGED
@@ -20,8 +20,8 @@
|
|
20 |
right : 0;
|
21 |
}
|
22 |
|
23 |
-
#yit-panel-sidebar.yith-panel-sidebar-hidden #yit-panel-sidebar-widgets-container{
|
24 |
-
display: none;
|
25 |
}
|
26 |
|
27 |
.yit-panel-sidebar-widget-wrapper {
|
@@ -226,45 +226,56 @@ img.yit-panel-sidebar-widget-despacho-image {
|
|
226 |
|
227 |
#yit-panel-sidebar-membership-widget .yit-panel-sidebar-widget-content {
|
228 |
background : transparent url('../images/widgets/membership-bg.png') no-repeat;
|
229 |
-
background-position :
|
230 |
background-size : 50%;
|
231 |
}
|
232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
#yit-panel-sidebar-membership-widget .membership-total-price {
|
234 |
font-size : 25px;
|
235 |
font-weight : 700;
|
236 |
-
display :
|
|
|
|
|
|
|
|
|
237 |
|
238 |
}
|
239 |
|
240 |
#yit-panel-sidebar-membership-widget .membership-offer-text {
|
241 |
-
display :
|
242 |
font-size : 10px;
|
243 |
text-transform : uppercase;
|
244 |
-
width :
|
245 |
line-height : 14px;
|
|
|
|
|
246 |
}
|
247 |
|
248 |
#yit-panel-sidebar-membership-widget .membership-offer-text2 {
|
249 |
-
display :
|
250 |
font-size : 10px;
|
251 |
text-transform : uppercase;
|
252 |
-
width : 36%;
|
253 |
text-align : right;
|
254 |
vertical-align : middle;
|
255 |
-
|
256 |
}
|
257 |
|
258 |
#yit-panel-sidebar-membership-widget .membership-offer-sale-text {
|
259 |
-
display :
|
260 |
-
font-size :
|
261 |
color : #ff6340;
|
262 |
text-transform : uppercase;
|
263 |
-
width : 55%;
|
264 |
text-align : left;
|
265 |
vertical-align : middle;
|
266 |
-
margin
|
267 |
-
font-weight :
|
|
|
268 |
}
|
269 |
|
270 |
#yit-panel-sidebar-membership-widget .membership-buttons {
|
@@ -318,12 +329,12 @@ ul.yit-panel-sidebar-links-list li:before {
|
|
318 |
border-radius : 50%;
|
319 |
}
|
320 |
|
321 |
-
#yit-panel-sidebar-action-hide:hover .yit-panel-sidebar-action-title{
|
322 |
-
color: #000;
|
323 |
}
|
324 |
|
325 |
-
#yit-panel-sidebar-action-hide:hover .yit-panel-sidebar-action-hide-icon{
|
326 |
-
background: #000;
|
327 |
}
|
328 |
|
329 |
.hide-on-click .yit-panel-sidebar-action-hide-icon:before {
|
20 |
right : 0;
|
21 |
}
|
22 |
|
23 |
+
#yit-panel-sidebar.yith-panel-sidebar-hidden #yit-panel-sidebar-widgets-container {
|
24 |
+
display : none;
|
25 |
}
|
26 |
|
27 |
.yit-panel-sidebar-widget-wrapper {
|
226 |
|
227 |
#yit-panel-sidebar-membership-widget .yit-panel-sidebar-widget-content {
|
228 |
background : transparent url('../images/widgets/membership-bg.png') no-repeat;
|
229 |
+
background-position : 105% 160%;
|
230 |
background-size : 50%;
|
231 |
}
|
232 |
|
233 |
+
#yit-panel-sidebar-membership-widget .membership-row {
|
234 |
+
margin-bottom: 20px;
|
235 |
+
clear : both;
|
236 |
+
overflow: hidden;
|
237 |
+
}
|
238 |
+
|
239 |
#yit-panel-sidebar-membership-widget .membership-total-price {
|
240 |
font-size : 25px;
|
241 |
font-weight : 700;
|
242 |
+
display : block;
|
243 |
+
width : 50%;
|
244 |