Version Notes
Initial release
Download this release
Release Info
Developer | Matis Matis |
Extension | Eabi_Zoom |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/community/Eabi/Zoom/CHANGELOG.txt +3 -0
- app/code/community/Eabi/Zoom/Helper/Data.php +28 -0
- app/code/community/Eabi/Zoom/LICENCE.txt +1 -0
- app/code/community/Eabi/Zoom/etc/config.xml +145 -0
- app/code/community/Eabi/Zoom/etc/system.xml +187 -0
- app/code/community/Eabi/Zoom/sql/eabi_zoom_setup/mysql4-install-0.1.0.php +37 -0
- app/design/frontend/default/default/layout/eabi_zoom.xml +46 -0
- app/design/frontend/default/default/template/eabi_zoom/media.phtml +150 -0
- app/etc/modules/Eabi_Zoom.xml +21 -0
- app/locale/en_US/Eabi_Zoom.csv +20 -0
- app/locale/et_EE/Eabi_Zoom.csv +20 -0
- js/eabi_js/eabi_bezoom.js +122 -0
- package.xml +20 -0
app/code/community/Eabi/Zoom/CHANGELOG.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
0.1.0
|
2 |
+
- Initial release
|
3 |
+
|
app/code/community/Eabi/Zoom/Helper/Data.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2012 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 |
+
class Eabi_Zoom_Helper_Data extends Mage_Core_Helper_Abstract {
|
28 |
+
}
|
app/code/community/Eabi/Zoom/LICENCE.txt
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
http://opensource.org/licenses/osl-3.0.php
|
app/code/community/Eabi/Zoom/etc/config.xml
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
@category Eabi
|
5 |
+
@package Eabi_Zoom
|
6 |
+
@author Aktsiamaailm OU
|
7 |
+
@licence http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
8 |
+
|
9 |
+
*/
|
10 |
+
-->
|
11 |
+
|
12 |
+
|
13 |
+
<config>
|
14 |
+
<modules>
|
15 |
+
<Eabi_Zoom>
|
16 |
+
<version>0.1.0</version>
|
17 |
+
</Eabi_Zoom>
|
18 |
+
</modules>
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
<global>
|
23 |
+
<models>
|
24 |
+
<eabi_zoom>
|
25 |
+
<class>Eabi_Zoom_Model</class>
|
26 |
+
</eabi_zoom>
|
27 |
+
</models>
|
28 |
+
<blocks>
|
29 |
+
<eabi_zoom>
|
30 |
+
<class>Eabi_Zoom_Block</class>
|
31 |
+
</eabi_zoom>
|
32 |
+
</blocks>
|
33 |
+
<resources>
|
34 |
+
<eabi_zoom_setup>
|
35 |
+
<setup>
|
36 |
+
<module>Eabi_Zoom</module>
|
37 |
+
</setup>
|
38 |
+
<connection>
|
39 |
+
<use>core_setup</use>
|
40 |
+
</connection>
|
41 |
+
</eabi_zoom_setup>
|
42 |
+
<eabi_zoom_write>
|
43 |
+
<setup>
|
44 |
+
<module>Eabi_Zoom</module>
|
45 |
+
</setup>
|
46 |
+
<connection>
|
47 |
+
<use>core_write</use>
|
48 |
+
</connection>
|
49 |
+
</eabi_zoom_write>
|
50 |
+
<eabi_zoom_read>
|
51 |
+
<setup>
|
52 |
+
<module>Eabi_Zoom</module>
|
53 |
+
</setup>
|
54 |
+
<connection>
|
55 |
+
<use>core_read</use>
|
56 |
+
</connection>
|
57 |
+
</eabi_zoom_read>
|
58 |
+
</resources>
|
59 |
+
<helpers>
|
60 |
+
<eabi_zoom>
|
61 |
+
<class>Eabi_Zoom_Helper</class>
|
62 |
+
</eabi_zoom>
|
63 |
+
</helpers>
|
64 |
+
<translate>
|
65 |
+
<modules>
|
66 |
+
<eabi_zoom>
|
67 |
+
<files>
|
68 |
+
<default>Eabi_Zoom.csv</default>
|
69 |
+
</files>
|
70 |
+
</eabi_zoom>
|
71 |
+
</modules>
|
72 |
+
</translate>
|
73 |
+
</global>
|
74 |
+
|
75 |
+
<frontend>
|
76 |
+
<layout>
|
77 |
+
<updates>
|
78 |
+
<eabi_zoom module="Eabi_Zoom">
|
79 |
+
<file>eabi_zoom.xml</file>
|
80 |
+
</eabi_zoom>
|
81 |
+
</updates>
|
82 |
+
</layout>
|
83 |
+
<translate>
|
84 |
+
<modules>
|
85 |
+
<eabi_zoom>
|
86 |
+
<files>
|
87 |
+
<default>Eabi_Zoom.csv</default>
|
88 |
+
</files>
|
89 |
+
</eabi_zoom>
|
90 |
+
</modules>
|
91 |
+
</translate>
|
92 |
+
</frontend>
|
93 |
+
|
94 |
+
<adminhtml>
|
95 |
+
<translate>
|
96 |
+
<modules>
|
97 |
+
<eabi_zoom>
|
98 |
+
<files>
|
99 |
+
<default>Eabi_Zoom.csv</default>
|
100 |
+
</files>
|
101 |
+
</eabi_zoom>
|
102 |
+
</modules>
|
103 |
+
</translate>
|
104 |
+
<acl>
|
105 |
+
<resources>
|
106 |
+
<admin>
|
107 |
+
<children>
|
108 |
+
<system>
|
109 |
+
<children>
|
110 |
+
<config>
|
111 |
+
<children>
|
112 |
+
<eabi_zoom translate="title">
|
113 |
+
<title>E-Abi Bezoom plugin</title>
|
114 |
+
<sort_order>50</sort_order>
|
115 |
+
</eabi_zoom>
|
116 |
+
</children>
|
117 |
+
</config>
|
118 |
+
</children>
|
119 |
+
</system>
|
120 |
+
</children>
|
121 |
+
</admin>
|
122 |
+
</resources>
|
123 |
+
</acl>
|
124 |
+
|
125 |
+
</adminhtml>
|
126 |
+
|
127 |
+
<default>
|
128 |
+
<eabi_zoom>
|
129 |
+
<eabi_zoom>
|
130 |
+
<enabled>1</enabled>
|
131 |
+
<mainImageSize>265_265</mainImageSize>
|
132 |
+
<additionalImageSize>60_60</additionalImageSize>
|
133 |
+
<zoomImageSize>500_500</zoomImageSize>
|
134 |
+
<zoomHideTitle>0</zoomHideTitle>
|
135 |
+
<zoomTitleSize>0.8 em</zoomTitleSize>
|
136 |
+
<zoomTitleColor>#ffffff</zoomTitleColor>
|
137 |
+
<zoomTitleBackground>#5398EE</zoomTitleBackground>
|
138 |
+
<zoomTitleMarginLeft>10</zoomTitleMarginLeft>
|
139 |
+
<zoomTitleMarginTop>0</zoomTitleMarginTop>
|
140 |
+
<zoomImageBorder>#333333</zoomImageBorder>
|
141 |
+
<zoomImageBackground>#ffffff</zoomImageBackground>
|
142 |
+
</eabi_zoom>
|
143 |
+
</eabi_zoom>
|
144 |
+
</default>
|
145 |
+
</config>
|
app/code/community/Eabi/Zoom/etc/system.xml
ADDED
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
@category Eabi
|
5 |
+
@package Eabi_Zoom
|
6 |
+
@author Aktsiamaailm OU
|
7 |
+
@licence http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
8 |
+
|
9 |
+
*/
|
10 |
+
-->
|
11 |
+
|
12 |
+
|
13 |
+
<config>
|
14 |
+
<tabs>
|
15 |
+
<eabi translate="label">
|
16 |
+
<label>Eabi Moodulid</label>
|
17 |
+
<sort_order>300</sort_order>
|
18 |
+
</eabi>
|
19 |
+
</tabs>
|
20 |
+
<sections>
|
21 |
+
<eabi_zoom translate="label" module="eabi_zoom">
|
22 |
+
<label>Bezoom plugin from E-Abi</label>
|
23 |
+
<tab>eabi</tab>
|
24 |
+
<sort_order>340</sort_order>
|
25 |
+
<show_in_default>1</show_in_default>
|
26 |
+
<show_in_website>1</show_in_website>
|
27 |
+
<show_in_store>1</show_in_store>
|
28 |
+
<groups>
|
29 |
+
<eabi_zoom translate="label" module="eabi_zoom">
|
30 |
+
<label>Bezoom plugin from E-Abi</label>
|
31 |
+
<tab>eabi</tab>
|
32 |
+
<sort_order>340</sort_order>
|
33 |
+
<show_in_default>1</show_in_default>
|
34 |
+
<show_in_website>1</show_in_website>
|
35 |
+
<show_in_store>1</show_in_store>
|
36 |
+
<comment><![CDATA[
|
37 |
+
<a href="http://www.e-abi.ee" target="_blank"><IMG border="0" src="http://www.e-abi.ee/skin/frontend/default/electronics3/images/logo-web.png"></a>
|
38 |
+
<div style="margin-top:4px;margin-bottom:4px; color:gray;"></div>
|
39 |
+
<div style="margin-top:4px;"><b>Aktsiamaailm OÜ, <a href="mailto:info@e-abi.ee">info@e-abi.ee</a>, <a href="http://en.e-abi.ee/">http://en.e-abi.ee/</a>, <a href="http://www.e-abi.ee/">http://www.e-abi.ee/</a></b></div>
|
40 |
+
<script type="text/javascript">
|
41 |
+
document.observe('dom:loaded', function() {
|
42 |
+
|
43 |
+
if (!$('fb-root')) {
|
44 |
+
var eabi_interface_locale = $('interface_locale').getValue();
|
45 |
+
if (!eabi_interface_locale) {
|
46 |
+
eabi_interface_locale = 'en_US';
|
47 |
+
}
|
48 |
+
$$('body').first().insert('<div id="fb-root"></div>', { position: 'top'});
|
49 |
+
(function(d, s, id) {
|
50 |
+
var js, fjs = d.getElementsByTagName(s)[0];
|
51 |
+
if (d.getElementById(id)) return;
|
52 |
+
js = d.createElement(s); js.id = id;
|
53 |
+
js.src = "//connect.facebook.net/" + eabi_interface_locale + "/all.js#xfbml=1";
|
54 |
+
fjs.parentNode.insertBefore(js, fjs);
|
55 |
+
}(document, 'script', 'facebook-jssdk'));
|
56 |
+
}
|
57 |
+
var eabi_interface_site = 'en';
|
58 |
+
if (eabi_interface_locale == 'et_EE') {
|
59 |
+
eabi_interface_site = 'www';
|
60 |
+
}
|
61 |
+
$('eabi_attributeadder_configurator').update('<fb:like href="http://' + eabi_interface_site +'.e-abi.ee/" send="true" width="450" show_faces="false" action="recommend"></fb:like>');
|
62 |
+
});
|
63 |
+
</script>
|
64 |
+
|
65 |
+
|
66 |
+
<div id="eabi_attributeadder_configurator" style="">
|
67 |
+
|
68 |
+
|
69 |
+
</div>
|
70 |
+
<hr /><br />
|
71 |
+
|
72 |
+
]]>
|
73 |
+
</comment>
|
74 |
+
<fields>
|
75 |
+
<enabled translate="label">
|
76 |
+
<label>Enabled</label>
|
77 |
+
<frontend_type>select</frontend_type>
|
78 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
79 |
+
<sort_order>1</sort_order>
|
80 |
+
<show_in_default>1</show_in_default>
|
81 |
+
<show_in_website>1</show_in_website>
|
82 |
+
<show_in_store>1</show_in_store>
|
83 |
+
</enabled>
|
84 |
+
<mainImageSize translate="label comment">
|
85 |
+
<label>Size of main image</label>
|
86 |
+
<comment>Size in pixels width_height. (Default 265_265).</comment>
|
87 |
+
<frontend_type>text</frontend_type>
|
88 |
+
<sort_order>5</sort_order>
|
89 |
+
<show_in_default>1</show_in_default>
|
90 |
+
<show_in_website>1</show_in_website>
|
91 |
+
<show_in_store>1</show_in_store>
|
92 |
+
</mainImageSize>
|
93 |
+
<additionalImageSize translate="label comment">
|
94 |
+
<label>Size of additional images</label>
|
95 |
+
<comment>Size in pixels width_height. (Default 60_60)</comment>
|
96 |
+
<frontend_type>text</frontend_type>
|
97 |
+
<sort_order>10</sort_order>
|
98 |
+
<show_in_default>1</show_in_default>
|
99 |
+
<show_in_website>1</show_in_website>
|
100 |
+
<show_in_store>1</show_in_store>
|
101 |
+
</additionalImageSize>
|
102 |
+
<zoomImageSize translate="label comment">
|
103 |
+
<label>Size of Zoombox image</label>
|
104 |
+
<comment>Size in pixels width_height. (Default 500_500)</comment>
|
105 |
+
<frontend_type>text</frontend_type>
|
106 |
+
<sort_order>15</sort_order>
|
107 |
+
<show_in_default>1</show_in_default>
|
108 |
+
<show_in_website>1</show_in_website>
|
109 |
+
<show_in_store>1</show_in_store>
|
110 |
+
</zoomImageSize>
|
111 |
+
|
112 |
+
<zoomHideTitle translate="label">
|
113 |
+
<label>Hide title from Zoombox</label>
|
114 |
+
<frontend_type>select</frontend_type>
|
115 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
116 |
+
<sort_order>20</sort_order>
|
117 |
+
<show_in_default>1</show_in_default>
|
118 |
+
<show_in_website>1</show_in_website>
|
119 |
+
<show_in_store>1</show_in_store>
|
120 |
+
</zoomHideTitle>
|
121 |
+
<zoomTitleSize translate="label">
|
122 |
+
<label>Size of Zoombox image title (CSS)</label>
|
123 |
+
<frontend_type>text</frontend_type>
|
124 |
+
<sort_order>25</sort_order>
|
125 |
+
<show_in_default>1</show_in_default>
|
126 |
+
<show_in_website>1</show_in_website>
|
127 |
+
<show_in_store>1</show_in_store>
|
128 |
+
</zoomTitleSize>
|
129 |
+
<zoomTitleColor translate="label">
|
130 |
+
<label>Color of Zoombox image title (CSS)</label>
|
131 |
+
<frontend_type>text</frontend_type>
|
132 |
+
<sort_order>30</sort_order>
|
133 |
+
<show_in_default>1</show_in_default>
|
134 |
+
<show_in_website>1</show_in_website>
|
135 |
+
<show_in_store>1</show_in_store>
|
136 |
+
</zoomTitleColor>
|
137 |
+
<zoomTitleBackground translate="label">
|
138 |
+
<label>Color of Zoombox image title background (CSS)</label>
|
139 |
+
<frontend_type>text</frontend_type>
|
140 |
+
<sort_order>35</sort_order>
|
141 |
+
<show_in_default>1</show_in_default>
|
142 |
+
<show_in_website>1</show_in_website>
|
143 |
+
<show_in_store>1</show_in_store>
|
144 |
+
</zoomTitleBackground>
|
145 |
+
<zoomImageBackground translate="label">
|
146 |
+
<label>Color of Zoombox image background (CSS)</label>
|
147 |
+
<frontend_type>text</frontend_type>
|
148 |
+
<sort_order>36</sort_order>
|
149 |
+
<show_in_default>1</show_in_default>
|
150 |
+
<show_in_website>1</show_in_website>
|
151 |
+
<show_in_store>1</show_in_store>
|
152 |
+
</zoomImageBackground>
|
153 |
+
<zoomImageBorder translate="label">
|
154 |
+
<label>Color of Zoombox border (CSS)</label>
|
155 |
+
<frontend_type>text</frontend_type>
|
156 |
+
<sort_order>37</sort_order>
|
157 |
+
<show_in_default>1</show_in_default>
|
158 |
+
<show_in_website>1</show_in_website>
|
159 |
+
<show_in_store>1</show_in_store>
|
160 |
+
</zoomImageBorder>
|
161 |
+
<zoomTitleMarginLeft translate="label comment">
|
162 |
+
<label>Left Margin for the Zoombox</label>
|
163 |
+
<comment>in pixels</comment>
|
164 |
+
<frontend_type>text</frontend_type>
|
165 |
+
<sort_order>50</sort_order>
|
166 |
+
<show_in_default>1</show_in_default>
|
167 |
+
<show_in_website>1</show_in_website>
|
168 |
+
<show_in_store>1</show_in_store>
|
169 |
+
</zoomTitleMarginLeft>
|
170 |
+
<zoomTitleMarginTop translate="label comment">
|
171 |
+
<label>Top Margin for the Zoombox</label>
|
172 |
+
<comment>in pixels</comment>
|
173 |
+
<frontend_type>text</frontend_type>
|
174 |
+
<sort_order>55</sort_order>
|
175 |
+
<show_in_default>1</show_in_default>
|
176 |
+
<show_in_website>1</show_in_website>
|
177 |
+
<show_in_store>1</show_in_store>
|
178 |
+
</zoomTitleMarginTop>
|
179 |
+
|
180 |
+
</fields>
|
181 |
+
|
182 |
+
</eabi_zoom>
|
183 |
+
</groups>
|
184 |
+
</eabi_zoom>
|
185 |
+
</sections>
|
186 |
+
|
187 |
+
</config>
|
app/code/community/Eabi/Zoom/sql/eabi_zoom_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2012 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 |
+
$installer = $this;
|
28 |
+
|
29 |
+
$installer->startSetup();
|
30 |
+
|
31 |
+
$installer->run("
|
32 |
+
|
33 |
+
|
34 |
+
");
|
35 |
+
|
36 |
+
|
37 |
+
$installer->endSetup();
|
app/design/frontend/default/default/layout/eabi_zoom.xml
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
@category Eabi
|
5 |
+
@package Eabi_Zoom
|
6 |
+
@author Aktsiamaailm OU
|
7 |
+
@licence http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
8 |
+
|
9 |
+
*/
|
10 |
+
-->
|
11 |
+
|
12 |
+
<layout version="0.1.0">
|
13 |
+
<catalog_product_view>
|
14 |
+
<reference name="head">
|
15 |
+
<action method="addItem" ifconfig="eabi_zoom/eabi_zoom/enabled">
|
16 |
+
<type>js</type>
|
17 |
+
<name>eabi_js/eabi_bezoom.js</name>
|
18 |
+
</action>
|
19 |
+
|
20 |
+
</reference>
|
21 |
+
<reference name="product.info.media">
|
22 |
+
<action method="setTemplate" ifconfig="eabi_zoom/eabi_zoom/enabled">
|
23 |
+
<template>eabi_zoom/media.phtml</template>
|
24 |
+
</action>
|
25 |
+
</reference>
|
26 |
+
|
27 |
+
</catalog_product_view>
|
28 |
+
|
29 |
+
<review_product_list>
|
30 |
+
<reference name="head">
|
31 |
+
<action method="addItem" ifconfig="eabi_zoom/eabi_zoom/enabled">
|
32 |
+
<type>js</type>
|
33 |
+
<name>js/eabi_js/eabi_bezoom.js</name>
|
34 |
+
</action>
|
35 |
+
|
36 |
+
</reference>
|
37 |
+
<reference name="product.info.media">
|
38 |
+
<action method="setTemplate" ifconfig="eabi_zoom/eabi_zoom/enabled">
|
39 |
+
<template>eabi_zoom/media.phtml</template>
|
40 |
+
</action>
|
41 |
+
</reference>
|
42 |
+
|
43 |
+
</review_product_list>
|
44 |
+
|
45 |
+
|
46 |
+
</layout>
|
app/design/frontend/default/default/template/eabi_zoom/media.phtml
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 2012 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 |
+
?><?php
|
28 |
+
$_product = $this->getProduct();
|
29 |
+
|
30 |
+
$_zoomConfig = Mage::getStoreConfig('eabi_zoom/eabi_zoom');
|
31 |
+
|
32 |
+
$zoomHideTitle = (isset($_zoomConfig['zoomHideTitle']) && $_zoomConfig['zoomHideTitle'] == '1') ? 'true' : 'false';
|
33 |
+
|
34 |
+
$zoomTitleSize = (isset($_zoomConfig['zoomTitleSize'])) ? $_zoomConfig['zoomTitleSize'] : '0.8 em';
|
35 |
+
|
36 |
+
if (is_numeric($zoomTitleSize)) {
|
37 |
+
$zoomTitleSize .= 'px';
|
38 |
+
}
|
39 |
+
|
40 |
+
$zoomTitleColor = (isset($_zoomConfig['zoomTitleColor'])) ? $_zoomConfig['zoomTitleColor'] : '#ffffff';
|
41 |
+
|
42 |
+
$zoomTitleBackground = (isset($_zoomConfig['zoomTitleBackground'])) ? $_zoomConfig['zoomTitleBackground'] : '#5398EE';
|
43 |
+
$zoomImageBackground = (isset($_zoomConfig['zoomImageBackground'])) ? $_zoomConfig['zoomImageBackground'] : '#ffffff';
|
44 |
+
$zoomImageBorder = (isset($_zoomConfig['zoomImageBorder'])) ? $_zoomConfig['zoomImageBorder'] : '#333333';
|
45 |
+
|
46 |
+
if (trim($zoomTitleColor) == '') {
|
47 |
+
$zoomTitleColor = '#ffffff';
|
48 |
+
}
|
49 |
+
|
50 |
+
if (trim($zoomTitleBackground) == '') {
|
51 |
+
$zoomTitleBackground = '#5398EE';
|
52 |
+
}
|
53 |
+
if (trim($zoomImageBackground) == '') {
|
54 |
+
$zoomImageBackground = '#ffffff';
|
55 |
+
}
|
56 |
+
if (trim($zoomImageBorder) == '') {
|
57 |
+
$zoomImageBorder = '#333333';
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
$zoomTitleMarginLeft = (isset($_zoomConfig['zoomTitleMarginLeft'])) ? (int)$_zoomConfig['zoomTitleMarginLeft'] : 10;
|
62 |
+
$zoomTitleMarginTop = (isset($_zoomConfig['zoomTitleMarginTop'])) ? (int)$_zoomConfig['zoomTitleMarginTop'] : 0;
|
63 |
+
|
64 |
+
|
65 |
+
/* Main Image Size */
|
66 |
+
if (strstr($_zoomConfig['mainImageSize'], '_')) {
|
67 |
+
$mainImageSize = explode('_', $_zoomConfig['mainImageSize'], 2);
|
68 |
+
} else {
|
69 |
+
$mainImageSize = array(265, 265);
|
70 |
+
}
|
71 |
+
/* Additional Images Size */
|
72 |
+
if (strstr($_zoomConfig['additionalImageSize'], '_')) {
|
73 |
+
$additionalImageSize = explode('_', $_zoomConfig['additionalImageSize'], 2);
|
74 |
+
} else {
|
75 |
+
$additionalImageSize = array(60, 60);
|
76 |
+
}
|
77 |
+
|
78 |
+
/* Zoombox Image Size */
|
79 |
+
if (strstr($_zoomConfig['zoomImageSize'], '_')) {
|
80 |
+
$zoomImageSize = explode('_', $_zoomConfig['zoomImageSize'], 2);
|
81 |
+
} else {
|
82 |
+
$zoomImageSize = array(500, 500);
|
83 |
+
}
|
84 |
+
?>
|
85 |
+
|
86 |
+
|
87 |
+
<a href="<?php echo $this->helper('catalog/image')->init($_product, 'image'); ?>"
|
88 |
+
rel="eabi_bezoom"
|
89 |
+
class="eabi_bezoom"
|
90 |
+
title="<?php echo $this->htmlEscape($_product->getName()); ?>"
|
91 |
+
onclick="return false;"
|
92 |
+
id="eabi_bezoom_main"
|
93 |
+
><img src="<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize($mainImageSize[0], $mainImageSize[1]); ?>" alt="<?php echo $this->htmlEscape($_product->getImageLabel()); ?>"
|
94 |
+
/></a>
|
95 |
+
<p class="a-center" id="track_hint"><?php echo $this->__('Click on the image to zoom') ?></p>
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
+
<?php if (count($this->getGalleryImages()) > 0): ?>
|
100 |
+
<div class="more-views">
|
101 |
+
<h4><?php echo $this->__('More Views') ?></h4>
|
102 |
+
<ul>
|
103 |
+
<?php foreach ($this->getGalleryImages() as $_image): ?>
|
104 |
+
<li>
|
105 |
+
<a href="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile()); ?>"
|
106 |
+
title="<?php echo $this->htmlEscape($_image->getLabel()) ?>"
|
107 |
+
onclick="eabi_bezoom_change_image(this); return false;"
|
108 |
+
rel="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->resize($mainImageSize[0], $mainImageSize[1]); ?>"
|
109 |
+
><img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize($additionalImageSize[0], $additionalImageSize[1]); ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>"
|
110 |
+
/></a>
|
111 |
+
</li>
|
112 |
+
<?php endforeach; ?>
|
113 |
+
</ul>
|
114 |
+
</div>
|
115 |
+
<?php endif; ?>
|
116 |
+
|
117 |
+
<script type="text/javascript">
|
118 |
+
|
119 |
+
var eabi_bezoom_options = {
|
120 |
+
height: <?php echo (int)$zoomImageSize[0]; ?>,
|
121 |
+
width: <?php echo (int)$zoomImageSize[1]; ?>,
|
122 |
+
marginLeft: <?php echo $zoomTitleMarginLeft; ?>,
|
123 |
+
marginTop: <?php echo $zoomTitleMarginTop; ?>,
|
124 |
+
bgColor: '<?php echo $zoomTitleBackground; ?>',
|
125 |
+
imgBgColor: '<?php echo $zoomImageBackground; ?>',
|
126 |
+
imgBorder: '<?php echo $zoomImageBorder; ?>',
|
127 |
+
color: '<?php echo $zoomTitleColor; ?>',
|
128 |
+
size: '<?php echo $zoomTitleSize; ?>',
|
129 |
+
hideTitle: <?php echo $zoomHideTitle; ?>
|
130 |
+
};
|
131 |
+
|
132 |
+
var eabi_bezoom_change_image = function(node) {
|
133 |
+
var aNode = $('eabi_bezoom_main'),
|
134 |
+
imgNode = $('eabi_bezoom_main').select('img').first(),
|
135 |
+
img = $(node).select('img').first();
|
136 |
+
aNode.href = node.href;
|
137 |
+
aNode.title = node.title;
|
138 |
+
imgNode.src = node.rel;
|
139 |
+
}
|
140 |
+
|
141 |
+
if (Prototype.Browser.IE) {
|
142 |
+
Event.observe(window, 'load', function(){ //KB927917 fix
|
143 |
+
var el = new Eabi_Bezoom($$('.eabi_bezoom'), eabi_bezoom_options);
|
144 |
+
});
|
145 |
+
} else {
|
146 |
+
document.observe("dom:loaded", function(){
|
147 |
+
var el = new Eabi_Bezoom($$('.eabi_bezoom'), eabi_bezoom_options);
|
148 |
+
});
|
149 |
+
}
|
150 |
+
</script>
|
app/etc/modules/Eabi_Zoom.xml
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
@category Eabi
|
5 |
+
@package Eabi_Zoom
|
6 |
+
@author Aktsiamaailm OU
|
7 |
+
@licence http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
8 |
+
|
9 |
+
*/
|
10 |
+
-->
|
11 |
+
|
12 |
+
|
13 |
+
<config>
|
14 |
+
<modules>
|
15 |
+
<Eabi_Zoom>
|
16 |
+
<active>true</active>
|
17 |
+
<codePool>community</codePool>
|
18 |
+
<version>0.1.0</version>
|
19 |
+
</Eabi_Zoom>
|
20 |
+
</modules>
|
21 |
+
</config>
|
app/locale/en_US/Eabi_Zoom.csv
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Enabled","Enabled"
|
2 |
+
"Click on the image to zoom","Click on the image to zoom"
|
3 |
+
"More Views","More Views"
|
4 |
+
"Eabi Moodulid","E-Abi Extensions"
|
5 |
+
"Bezoom plugin from E-Abi","Bezoom image plugin from E-Abi"
|
6 |
+
"Size of main image","Size of main image"
|
7 |
+
"Size in pixels width_height. (Default 265_265).","Size in pixels width_height. (Default 265_265)."
|
8 |
+
"Size of additional images","Size of additional images"
|
9 |
+
"Size in pixels width_height. (Default 60_60)","Size in pixels width_height. (Default 60_60)"
|
10 |
+
"Size of Zoombox image","Size of Zoombox image"
|
11 |
+
"Size in pixels width_height. (Default 500_500)","Size in pixels width_height. (Default 500_500)"
|
12 |
+
"Hide title from Zoombox","Hide title from Zoombox"
|
13 |
+
"Size of Zoombox image title (CSS)","Size of Zoombox image title (CSS)"
|
14 |
+
"Color of Zoombox image title (CSS)","Color of Zoombox image title (CSS)"
|
15 |
+
"Color of Zoombox image title background (CSS)","Color of Zoombox image title background (CSS)"
|
16 |
+
"Color of Zoombox image background (CSS)","Color of Zoombox image background (CSS)"
|
17 |
+
"Color of Zoombox border (CSS)","Color of Zoombox border (CSS)"
|
18 |
+
"Left Margin for the Zoombox","Left Margin for the Zoombox"
|
19 |
+
"Top Margin for the Zoombox","Top Margin for the Zoombox"
|
20 |
+
"in pixels","in pixels"
|
app/locale/et_EE/Eabi_Zoom.csv
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Enabled","Lubatud"
|
2 |
+
"Click on the image to zoom","Suurendamiseks kliki pildil"
|
3 |
+
"More Views","Rohkem pilte"
|
4 |
+
"Eabi Moodulid","E-Abi Moodulid"
|
5 |
+
"Bezoom plugin from E-Abi","Tootepildi suurendus (E-Abi)"
|
6 |
+
"Size of main image","Põhipildi suurus"
|
7 |
+
"Size in pixels width_height. (Default 265_265).","Pikslites, laius_kõrgus. (Vaikimisi 265_265)"
|
8 |
+
"Size of additional images","Täiendavate piltide suurus"
|
9 |
+
"Size in pixels width_height. (Default 60_60)","Pikslites, laius_kõrgus. (Vaikimisi 60_60)"
|
10 |
+
"Size of Zoombox image","Suurendatud pilti sisaldava kasti suurus"
|
11 |
+
"Size in pixels width_height. (Default 500_500)","Pikslites, laius_kõrgus. (Vaikimisi 500_500)"
|
12 |
+
"Hide title from Zoombox","Peida pildi suurendamisel pealkiri."
|
13 |
+
"Size of Zoombox image title (CSS)","Suurendatud pildi pealkirja suurus pikslites (CSS)"
|
14 |
+
"Color of Zoombox image title (CSS)","Suurendatud pildi pealkirja teksti värvikood (CSS)"
|
15 |
+
"Color of Zoombox image title background (CSS)","Suurendatud pildi pealkirja tausta värvikood (CSS)"
|
16 |
+
"Color of Zoombox image background (CSS)","Suurendatud pildi taustavärv (CSS)"
|
17 |
+
"Color of Zoombox border (CSS)","Suurendatud pildi raamivärv (CSS)"
|
18 |
+
"Left Margin for the Zoombox","Vasakpoolne suurendatud pildi lisavahe"
|
19 |
+
"Top Margin for the Zoombox","Ülemine suurendatud pildi lisavahe"
|
20 |
+
"in pixels","pikslites"
|
js/eabi_js/eabi_bezoom.js
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
*
|
3 |
+
*
|
4 |
+
* This is plugin was originally BeZoom 0.2 jQuery Plugin:
|
5 |
+
* Original author: Benjamin Mock
|
6 |
+
* http://benjaminmock.de/bezoom-jquery-plugin/
|
7 |
+
*
|
8 |
+
* Conversation to JS Prototype was done by E-Abi
|
9 |
+
* (Matis Halmann, Aktsiamaailm LLC)
|
10 |
+
*
|
11 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
12 |
+
* and GPL (GPL-LICENSE.txt) licenses.
|
13 |
+
*
|
14 |
+
* Requires http://prototypejs.org library.
|
15 |
+
*
|
16 |
+
*
|
17 |
+
*
|
18 |
+
* */
|
19 |
+
|
20 |
+
Eabi_Bezoom = Class.create(Abstract, {
|
21 |
+
initialize: function(selection, options) {
|
22 |
+
this.selection = selection;
|
23 |
+
this.options = Object.extend({
|
24 |
+
marginLeft: 10,
|
25 |
+
marginTop: 0,
|
26 |
+
identifier: 'bezoom',
|
27 |
+
height: 200,
|
28 |
+
width: 200,
|
29 |
+
titleSource: 'title',
|
30 |
+
imgSource: 'href',
|
31 |
+
bgColor: '#5398EE',
|
32 |
+
color: '#ffffff',
|
33 |
+
size: '0.8em',
|
34 |
+
hideTitle: false,
|
35 |
+
imgBorder: '#000000',
|
36 |
+
imgBgColor: '#ffffff'
|
37 |
+
}, options || {});
|
38 |
+
var settings = this.options;
|
39 |
+
|
40 |
+
|
41 |
+
this.selection.each(function(i, index) {
|
42 |
+
|
43 |
+
var title = i.readAttribute(settings.titleSource);
|
44 |
+
var imgBig = i.readAttribute(settings.imgSource);
|
45 |
+
var titleAttribute = i.readAttribute('title');
|
46 |
+
|
47 |
+
var img = i.select('img').first();
|
48 |
+
|
49 |
+
//TODO: convert to mouseenter
|
50 |
+
i.observe('click', function(e) {
|
51 |
+
if ($(settings.identifier)) {
|
52 |
+
$(settings.identifier).remove();
|
53 |
+
}
|
54 |
+
title = i.readAttribute(settings.titleSource);
|
55 |
+
imgBig = i.readAttribute(settings.imgSource);
|
56 |
+
titleAttribute = i.readAttribute('title');
|
57 |
+
|
58 |
+
i.writeAttribute('title', '');
|
59 |
+
|
60 |
+
var imgSmallDimensions = i.select('img').first().getDimensions();
|
61 |
+
|
62 |
+
var pos = i.cumulativeOffset();
|
63 |
+
var y = Math.ceil(pos.top - 0) + settings.marginTop; // - imgSmallDimensions.height;
|
64 |
+
if (Prototype.Browser.IE) {
|
65 |
+
y -= imgSmallDimensions.height;
|
66 |
+
}
|
67 |
+
var x = Math.ceil(pos.left - 0) + imgSmallDimensions.width + settings.marginLeft;
|
68 |
+
var titleDiv = '<div style="background-color:'+settings.bgColor+';color:'+settings.color+';font-size:'+settings.size+';">'+title+'</div>';
|
69 |
+
|
70 |
+
if (settings.hideTitle) {
|
71 |
+
titleDiv = '';
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
+
$$('body').first().insert('<div id="'+settings.identifier+'" style="border:1px solid ' + settings.imgBorder + '; background: ' + settings.imgBgColor + '; position:absolute; top:'+y+'px;left:'+x+'px;width:'+settings.width+'px;">' + titleDiv + '<div style="width:'+settings.width+'px;height:'+settings.height+'px;overflow:hidden;position:relative;"><img id="'+settings.identifier+'_img" src="'+imgBig+'" style="position:relative;"></div></div>');
|
76 |
+
return e.stop();
|
77 |
+
|
78 |
+
});
|
79 |
+
|
80 |
+
//TODO: convert to mouseenter
|
81 |
+
i.observe('mouseout', function(e) {
|
82 |
+
if ($(settings.identifier)) {
|
83 |
+
$(settings.identifier).remove();
|
84 |
+
}
|
85 |
+
i.writeAttribute('title', titleAttribute);
|
86 |
+
});
|
87 |
+
|
88 |
+
i.observe('mousemove', function(e) {
|
89 |
+
if (!$(settings.identifier)) {
|
90 |
+
return e;
|
91 |
+
}
|
92 |
+
var imgSmallDimensions = i.select('img').first().getDimensions();
|
93 |
+
var imgBigDimensions = $(settings.identifier + '_img').getDimensions();
|
94 |
+
|
95 |
+
var rels = {
|
96 |
+
height: (imgSmallDimensions.height / imgBigDimensions.height),
|
97 |
+
width: (imgSmallDimensions.width / imgBigDimensions.width)
|
98 |
+
};
|
99 |
+
var offset = img.positionedOffset();
|
100 |
+
|
101 |
+
var mouseX = e.pageX - offset.left;
|
102 |
+
var mouseY = e.pageY - offset.top;
|
103 |
+
var imgBigX = Math.ceil((mouseX / rels.width) - (settings.width / 2)) * (-1);
|
104 |
+
imgBigX = Math.max((-1 * imgBigDimensions.width) + settings.width, imgBigX);
|
105 |
+
imgBigX = Math.min(0, imgBigX);
|
106 |
+
|
107 |
+
var imgBigY = Math.ceil((mouseY / rels.height) - (settings.height * 0.5)) * (-1);
|
108 |
+
imgBigY = Math.max((-1 * imgBigDimensions.height) + settings.height, imgBigY);
|
109 |
+
imgBigY = Math.min(0, imgBigY);
|
110 |
+
|
111 |
+
$(settings.identifier + '_img').setStyle({left: imgBigX + 'px', top: imgBigY + 'px'});
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
});
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
+
});
|
120 |
+
|
121 |
+
}
|
122 |
+
});
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Eabi_Zoom</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL 3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Replaces image in product detail view with clickable zoombox.</summary>
|
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>Initial release</notes>
|
14 |
+
<authors><author><name>Matis Matis</name><user>mhalmann</user><email>info@e-abi.ee</email></author></authors>
|
15 |
+
<date>2012-07-20</date>
|
16 |
+
<time>21:55:55</time>
|
17 |
+
<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="etc"><file name="config.xml" hash="6327af8da94d29039bf969b8d1d13e0d"/><file name="system.xml" hash="fee4b99e3dc156051a0f994bb2e549db"/></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="f683b961275321c188b16d98c4cd2a88"/></dir><dir name="en_US"><file name="Eabi_Zoom.csv" hash="5d17af6f3ff3c4c25c3d238c47c7ae0e"/></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="47fb6eaa447e65cfb42b949c6f72a0bb"/></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="9b9c0536a5a8b0b30b133ee3ebe1b818"/></dir></dir></dir></dir></dir></target></contents>
|
18 |
+
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.2.0</min><max>5.4.10</max></php></required></dependencies>
|
20 |
+
</package>
|