Version Notes
Added option to activate the zoombox by mouseover event
Download this release
Release Info
| Developer | Matis Matis |
| Extension | Eabi_Zoom |
| Version | 0.1.3 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.2 to 0.1.3
- app/code/community/Eabi/Zoom/Model/Source/Event.php +55 -0
- app/code/community/Eabi/Zoom/etc/config.xml +2 -1
- app/code/community/Eabi/Zoom/etc/system.xml +9 -0
- app/design/frontend/default/default/template/eabi_zoom/media.phtml +6 -1
- app/locale/en_US/Eabi_Zoom.csv +3 -0
- app/locale/et_EE/Eabi_Zoom.csv +3 -0
- js/eabi_js/eabi_bezoom.js +3 -3
- package.xml +8 -7
app/code/community/Eabi/Zoom/Model/Source/Event.php
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* E-Abi (Aktsiamaailm LLC)
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to info@e-abi.ee so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* DISCLAIMER
|
| 16 |
+
*
|
| 17 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
| 18 |
+
* versions in the future.
|
| 19 |
+
*
|
| 20 |
+
* @category Eabi
|
| 21 |
+
* @package Eabi_Zoom
|
| 22 |
+
* @copyright Copyright (c) 2013 Aktsiamaailm LLC (http://en.e-abi.ee/)
|
| 23 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 24 |
+
* @author Matis Halmann <info@e-abi.ee>
|
| 25 |
+
*
|
| 26 |
+
*/
|
| 27 |
+
/**
|
| 28 |
+
* Description of Event
|
| 29 |
+
*
|
| 30 |
+
* @author matishalmann
|
| 31 |
+
*/
|
| 32 |
+
class Eabi_Zoom_Model_Source_Event {
|
| 33 |
+
|
| 34 |
+
public function toOptionArray() {
|
| 35 |
+
|
| 36 |
+
$options = array();
|
| 37 |
+
|
| 38 |
+
$options[] = array(
|
| 39 |
+
'label' => sprintf(Mage::helper('eabi_zoom')->__('When clicking on the large image (%s event)'), 'click'),
|
| 40 |
+
'value' => 'click',
|
| 41 |
+
);
|
| 42 |
+
|
| 43 |
+
$options[] = array(
|
| 44 |
+
'label' => sprintf(Mage::helper('eabi_zoom')->__('When mouse moves over the large image (%s event)'), 'mouseover'),
|
| 45 |
+
'value' => 'mouseover',
|
| 46 |
+
);
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
return $options;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
|
app/code/community/Eabi/Zoom/etc/config.xml
CHANGED
|
@@ -13,7 +13,7 @@
|
|
| 13 |
<config>
|
| 14 |
<modules>
|
| 15 |
<Eabi_Zoom>
|
| 16 |
-
<version>0.1.
|
| 17 |
</Eabi_Zoom>
|
| 18 |
</modules>
|
| 19 |
|
|
@@ -139,6 +139,7 @@
|
|
| 139 |
<zoomTitleMarginTop>0</zoomTitleMarginTop>
|
| 140 |
<zoomImageBorder>#333333</zoomImageBorder>
|
| 141 |
<zoomImageBackground>#ffffff</zoomImageBackground>
|
|
|
|
| 142 |
</eabi_zoom>
|
| 143 |
</eabi_zoom>
|
| 144 |
</default>
|
| 13 |
<config>
|
| 14 |
<modules>
|
| 15 |
<Eabi_Zoom>
|
| 16 |
+
<version>0.1.2</version>
|
| 17 |
</Eabi_Zoom>
|
| 18 |
</modules>
|
| 19 |
|
| 139 |
<zoomTitleMarginTop>0</zoomTitleMarginTop>
|
| 140 |
<zoomImageBorder>#333333</zoomImageBorder>
|
| 141 |
<zoomImageBackground>#ffffff</zoomImageBackground>
|
| 142 |
+
<zoomEventType>click</zoomEventType>
|
| 143 |
</eabi_zoom>
|
| 144 |
</eabi_zoom>
|
| 145 |
</default>
|
app/code/community/Eabi/Zoom/etc/system.xml
CHANGED
|
@@ -185,6 +185,15 @@
|
|
| 185 |
<show_in_website>1</show_in_website>
|
| 186 |
<show_in_store>1</show_in_store>
|
| 187 |
</zoomForceTop>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
|
| 189 |
</fields>
|
| 190 |
|
| 185 |
<show_in_website>1</show_in_website>
|
| 186 |
<show_in_store>1</show_in_store>
|
| 187 |
</zoomForceTop>
|
| 188 |
+
<zoomEventType translate="label comment">
|
| 189 |
+
<label>Zoombox activates from the following event</label>
|
| 190 |
+
<frontend_type>select</frontend_type>
|
| 191 |
+
<source_model>eabi_zoom/source_event</source_model>
|
| 192 |
+
<sort_order>57</sort_order>
|
| 193 |
+
<show_in_default>1</show_in_default>
|
| 194 |
+
<show_in_website>1</show_in_website>
|
| 195 |
+
<show_in_store>1</show_in_store>
|
| 196 |
+
</zoomEventType>
|
| 197 |
|
| 198 |
</fields>
|
| 199 |
|
app/design/frontend/default/default/template/eabi_zoom/media.phtml
CHANGED
|
@@ -68,6 +68,8 @@ if (trim($zoomImageBorder) == '') {
|
|
| 68 |
$zoomTitleMarginLeft = (isset($_zoomConfig['zoomTitleMarginLeft'])) ? (int)$_zoomConfig['zoomTitleMarginLeft'] : 10;
|
| 69 |
$zoomTitleMarginTop = (isset($_zoomConfig['zoomTitleMarginTop'])) ? (int)$_zoomConfig['zoomTitleMarginTop'] : 0;
|
| 70 |
|
|
|
|
|
|
|
| 71 |
|
| 72 |
/* Main Image Size */
|
| 73 |
if (strstr($_zoomConfig['mainImageSize'], '_')) {
|
|
@@ -99,7 +101,9 @@ if (strstr($_zoomConfig['zoomImageSize'], '_')) {
|
|
| 99 |
id="eabi_bezoom_main"
|
| 100 |
><img src="<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize($mainImageSize[0], $mainImageSize[1]); ?>" alt="<?php echo $this->htmlEscape($_product->getImageLabel()); ?>"
|
| 101 |
/></a>
|
|
|
|
| 102 |
<p class="a-center" id="track_hint"><?php echo $this->__('Click on the image to zoom') ?></p>
|
|
|
|
| 103 |
|
| 104 |
|
| 105 |
|
|
@@ -134,7 +138,8 @@ if (strstr($_zoomConfig['zoomImageSize'], '_')) {
|
|
| 134 |
color: '<?php echo $zoomTitleColor; ?>',
|
| 135 |
size: '<?php echo $zoomTitleSize; ?>',
|
| 136 |
hideTitle: <?php echo $zoomHideTitle; ?>,
|
| 137 |
-
forceTop: <?php echo $zoomForceTop;
|
|
|
|
| 138 |
};
|
| 139 |
|
| 140 |
var eabi_bezoom_change_image = function(node) {
|
| 68 |
$zoomTitleMarginLeft = (isset($_zoomConfig['zoomTitleMarginLeft'])) ? (int)$_zoomConfig['zoomTitleMarginLeft'] : 10;
|
| 69 |
$zoomTitleMarginTop = (isset($_zoomConfig['zoomTitleMarginTop'])) ? (int)$_zoomConfig['zoomTitleMarginTop'] : 0;
|
| 70 |
|
| 71 |
+
$zoomEventType = (isset($_zoomConfig['zoomEventType']) && in_array($_zoomConfig['zoomEventType'], array('click', 'mouseover')))?$_zoomConfig['zoomEventType']:'click';
|
| 72 |
+
|
| 73 |
|
| 74 |
/* Main Image Size */
|
| 75 |
if (strstr($_zoomConfig['mainImageSize'], '_')) {
|
| 101 |
id="eabi_bezoom_main"
|
| 102 |
><img src="<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize($mainImageSize[0], $mainImageSize[1]); ?>" alt="<?php echo $this->htmlEscape($_product->getImageLabel()); ?>"
|
| 103 |
/></a>
|
| 104 |
+
<?php if ($zoomEventType == 'click') :?>
|
| 105 |
<p class="a-center" id="track_hint"><?php echo $this->__('Click on the image to zoom') ?></p>
|
| 106 |
+
<?php endif; ?>
|
| 107 |
|
| 108 |
|
| 109 |
|
| 138 |
color: '<?php echo $zoomTitleColor; ?>',
|
| 139 |
size: '<?php echo $zoomTitleSize; ?>',
|
| 140 |
hideTitle: <?php echo $zoomHideTitle; ?>,
|
| 141 |
+
forceTop: <?php echo $zoomForceTop; ?>,
|
| 142 |
+
eventType: '<?php echo $zoomEventType; ?>'
|
| 143 |
};
|
| 144 |
|
| 145 |
var eabi_bezoom_change_image = function(node) {
|
app/locale/en_US/Eabi_Zoom.csv
CHANGED
|
@@ -20,3 +20,6 @@
|
|
| 20 |
"in pixels","in pixels"
|
| 21 |
"Force top position for Zoom window","Force top position for Zoom window"
|
| 22 |
"in pixels, use only when browser detection does not work","in pixels, use only when browser detection does not work"
|
|
|
|
|
|
|
|
|
| 20 |
"in pixels","in pixels"
|
| 21 |
"Force top position for Zoom window","Force top position for Zoom window"
|
| 22 |
"in pixels, use only when browser detection does not work","in pixels, use only when browser detection does not work"
|
| 23 |
+
"Zoombox activates from the following event","Zoombox activates from the following event"
|
| 24 |
+
"When clicking on the large image (%s event)","When clicking on the large image (%s event)"
|
| 25 |
+
"When mouse moves over the large image (%s event)","When mouse moves over the large image (%s event)"
|
app/locale/et_EE/Eabi_Zoom.csv
CHANGED
|
@@ -20,3 +20,6 @@
|
|
| 20 |
"in pixels","pikslites"
|
| 21 |
"Force top position for Zoom window","Kirjuta üle suurnedusklaasi positsioon ülemisest äärest"
|
| 22 |
"in pixels, use only when browser detection does not work","Pikslites, kasuta siis, kui automaatne positsioni arvutus eri brauserites ei toimi"
|
|
|
|
|
|
|
|
|
| 20 |
"in pixels","pikslites"
|
| 21 |
"Force top position for Zoom window","Kirjuta üle suurnedusklaasi positsioon ülemisest äärest"
|
| 22 |
"in pixels, use only when browser detection does not work","Pikslites, kasuta siis, kui automaatne positsioni arvutus eri brauserites ei toimi"
|
| 23 |
+
"Zoombox activates from the following event","Suurendusklaas aktiveerub järgneva sündmuse peale"
|
| 24 |
+
"When clicking on the large image (%s event)","Suure pildi peale klikates (%s sündmus)"
|
| 25 |
+
"When mouse moves over the large image (%s event)","Kursoriga üle suure pildi liikudes (%s sündmus)"
|
js/eabi_js/eabi_bezoom.js
CHANGED
|
@@ -34,8 +34,8 @@ Eabi_Bezoom = Class.create(Abstract, {
|
|
| 34 |
hideTitle: false,
|
| 35 |
imgBorder: '#000000',
|
| 36 |
imgBgColor: '#ffffff',
|
| 37 |
-
forceTop: false
|
| 38 |
-
|
| 39 |
}, options || {});
|
| 40 |
var settings = this.options;
|
| 41 |
|
|
@@ -49,7 +49,7 @@ Eabi_Bezoom = Class.create(Abstract, {
|
|
| 49 |
|
| 50 |
|
| 51 |
//TODO: convert to mouseenter
|
| 52 |
-
i.observe(
|
| 53 |
if ($(settings.identifier)) {
|
| 54 |
$(settings.identifier).remove();
|
| 55 |
}
|
| 34 |
hideTitle: false,
|
| 35 |
imgBorder: '#000000',
|
| 36 |
imgBgColor: '#ffffff',
|
| 37 |
+
forceTop: false,
|
| 38 |
+
eventType: 'click'
|
| 39 |
}, options || {});
|
| 40 |
var settings = this.options;
|
| 41 |
|
| 49 |
|
| 50 |
|
| 51 |
//TODO: convert to mouseenter
|
| 52 |
+
i.observe(settings.eventType, function(e) {
|
| 53 |
if ($(settings.identifier)) {
|
| 54 |
$(settings.identifier).remove();
|
| 55 |
}
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Eabi_Zoom</name>
|
| 4 |
-
<version>0.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -10,11 +10,12 @@
|
|
| 10 |
<description><p>Clicking on product's main image activates the zoombox and moving a mouse changes the part of image being zoomed</p>
|
| 11 |
<p>Clicking on any of the products additional images changes the main image to the one clicked</p>
|
| 12 |
<p>Configurable from the administration panel</p></description>
|
| 13 |
-
<notes>
|
| 14 |
-
|
| 15 |
-
<
|
| 16 |
-
<
|
| 17 |
-
<
|
|
|
|
| 18 |
<compatible/>
|
| 19 |
-
<dependencies
|
| 20 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Eabi_Zoom</name>
|
| 4 |
+
<version>0.1.3</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
|
| 7 |
<channel>community</channel>
|
| 10 |
<description><p>Clicking on product's main image activates the zoombox and moving a mouse changes the part of image being zoomed</p>
|
| 11 |
<p>Clicking on any of the products additional images changes the main image to the one clicked</p>
|
| 12 |
<p>Configurable from the administration panel</p></description>
|
| 13 |
+
<notes>Added option to activate the zoombox by mouseover event
|
| 14 |
+
</notes>
|
| 15 |
+
<authors><author><name>Matis Matis</name><user>mhalmann</user><email>info@e-abi.ee</email></author></authors>
|
| 16 |
+
<date>2013-03-01</date>
|
| 17 |
+
<time>21:48:05</time>
|
| 18 |
+
<contents><target name="magecommunity"><dir name="Eabi"><dir name="Zoom"><file name="CHANGELOG.txt" hash="f8ffcc9b07719e670426d06a78f7cf7e"/><dir name="Helper"><file name="Data.php" hash="97ef94244209f5a13deee59e5691677d"/></dir><file name="LICENCE.txt" hash="0191312e121c0b3e1165619b96efcf9f"/><dir name="Model"><dir name="Source"><file name="Event.php" hash="0c6f31c6ad364c947df376cff993d94f"/></dir></dir><dir name="etc"><file name="config.xml" hash="9b0f93f66140573d665286ba49c13616"/><file name="system.xml" hash="bb6ad01ab4c057ac2522d7858d958849"/></dir><dir name="sql"><dir name="eabi_zoom_setup"><file name="mysql4-install-0.1.0.php" hash="1609ddb62f3980672f6b977af6974f53"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="et_EE"><file name="Eabi_Zoom.csv" hash="696522418ba14946fe1e75e3a41947d7"/></dir><dir name="en_US"><file name="Eabi_Zoom.csv" hash="eb80fe0446b9305e32607fbd3ceb6af1"/></dir></target><target name="mageetc"><dir name="modules"><file name="Eabi_Zoom.xml" hash="e1ce2d901972130ceaba89a60c82e29b"/></dir></target><target name="mageweb"><dir name="js"><dir name="eabi_js"><file name="eabi_bezoom.js" hash="a79dbfa273e93bb5f7421bec289024fb"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="eabi_zoom.xml" hash="8bb781df7f166da385d8b35af64ac724"/></dir><dir name="template"><dir name="eabi_zoom"><file name="media.phtml" hash="9b6a10895ffeadfe44045ea1f17ee37f"/></dir></dir></dir></dir></dir></target></contents>
|
| 19 |
<compatible/>
|
| 20 |
+
<dependencies><required><php><min>5.2.0</min><max>5.4.10</max></php></required></dependencies>
|
| 21 |
</package>
|
