IG_FloatingMenu - Version 1.0.0

Version Notes

Enjoy it ;)

Download this release

Release Info

Developer Magento Core Team
Extension IG_FloatingMenu
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/IG/FloatingMenu/Block/Floating.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IDEALIAGroup srl
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
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://www.idealiagroup.com/magento-ext-license.html
11
+ *
12
+ * @category IG
13
+ * @package IG_FloatingMenu
14
+ * @copyright Copyright (c) 2011-2012 IDEALIAGroup srl (http://www.idealiagroup.com)
15
+ * @license http://www.idealiagroup.com/magento-ext-license.html
16
+ */
17
+
18
+ class IG_FloatingMenu_Block_Floating extends Mage_Core_Block_Template
19
+ {
20
+ const XML_PATH_ENABLED = 'ig_floatingmenu/general/enabled';
21
+
22
+ protected function _toHtml()
23
+ {
24
+ if (!Mage::getStoreConfig(self::XML_PATH_ENABLED))
25
+ return '';
26
+
27
+ return parent::_toHtml();
28
+ }
29
+ }
app/code/community/IG/FloatingMenu/COMPATIBILITY.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ This file reports the compatibility table for this extension.
2
+ If your Magento version is not included in this list you may try
3
+ using the extension but AT YOUR OWN RISK.
4
+
5
+ CE 1.4.2
6
+ CE 1.5.0
7
+ CE 1.5.1
8
+ CE 1.6.0
9
+ CE 1.6.1
app/code/community/IG/FloatingMenu/Helper/Data.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IDEALIAGroup srl
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
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://www.idealiagroup.com/magento-ext-license.html
11
+ *
12
+ * @category IG
13
+ * @package IG_FloatingMenu
14
+ * @copyright Copyright (c) 2011-2012 IDEALIAGroup srl (http://www.idealiagroup.com)
15
+ * @license http://www.idealiagroup.com/magento-ext-license.html
16
+ */
17
+
18
+ class IG_FloatingMenu_Helper_Data extends Mage_Core_Helper_Abstract
19
+ {
20
+
21
+ }
app/code/community/IG/FloatingMenu/etc/config.xml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * IDEALIAGroup srl
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the EULA
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://www.idealiagroup.com/magento-ext-license.html
12
+ *
13
+ * @category IG
14
+ * @package IG_FloatingMenu
15
+ * @copyright Copyright (c) 2011-2012 IDEALIAGroup srl (http://www.idealiagroup.com)
16
+ * @license http://www.idealiagroup.com/magento-ext-license.html
17
+ */
18
+ -->
19
+ <config>
20
+ <modules>
21
+ <IG_FloatingMenu>
22
+ <version>1.0.0</version>
23
+ </IG_FloatingMenu>
24
+ </modules>
25
+ <global>
26
+ <helpers>
27
+ <ig_floatingmenu>
28
+ <class>IG_FloatingMenu_Helper</class>
29
+ </ig_floatingmenu>
30
+ </helpers>
31
+ <blocks>
32
+ <ig_floatingmenu>
33
+ <class>IG_FloatingMenu_Block</class>
34
+ </ig_floatingmenu>
35
+ </blocks>
36
+ </global>
37
+
38
+ <frontend>
39
+ <layout>
40
+ <updates>
41
+ <ig_floatingmenu module="IG_FloatingMenu">
42
+ <file>ig_floatingmenu.xml</file>
43
+ </ig_floatingmenu>
44
+ </updates>
45
+ </layout>
46
+ </frontend>
47
+
48
+ <adminhtml>
49
+ <acl>
50
+ <resources>
51
+ <admin>
52
+ <children>
53
+ <system>
54
+ <children>
55
+ <config>
56
+ <children>
57
+ <ig_floatingmenu translate="title" module="ig_floatingmenu">
58
+ <title>IG FloatingMenu</title>
59
+ <sort_order>50</sort_order>
60
+ </ig_floatingmenu>
61
+ </children>
62
+ </config>
63
+ </children>
64
+ </system>
65
+ </children>
66
+ </admin>
67
+ </resources>
68
+ </acl>
69
+ </adminhtml>
70
+
71
+ <default>
72
+ <ig_floatingmenu>
73
+ <general>
74
+ <enabled>1</enabled>
75
+ </general>
76
+ </ig_floatingmenu>
77
+ </default>
78
+ </config>
app/code/community/IG/FloatingMenu/etc/system.xml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * IDEALIAGroup srl
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the EULA
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://www.idealiagroup.com/magento-ext-license.html
12
+ *
13
+ * @category IG
14
+ * @package IG_FloatingMenu
15
+ * @copyright Copyright (c) 2011-2012 IDEALIAGroup srl (http://www.idealiagroup.com)
16
+ * @license http://www.idealiagroup.com/magento-ext-license.html
17
+ */
18
+ -->
19
+ <config>
20
+ <tabs>
21
+ <ig translate="label" module="ig_floatingmenu">
22
+ <label>IdealiaGroup</label>
23
+ <sort_order>200</sort_order>
24
+ </ig>
25
+ </tabs>
26
+ <sections>
27
+ <ig_floatingmenu translate="label" module="ig_floatingmenu">
28
+ <label>IG FloatingMenu</label>
29
+ <tab>ig</tab>
30
+ <frontend_type>text</frontend_type>
31
+ <sort_order>10</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ <groups>
36
+ <general translate="label">
37
+ <label>General</label>
38
+ <frontend_type>text</frontend_type>
39
+ <sort_order>10</sort_order>
40
+ <show_in_default>1</show_in_default>
41
+ <show_in_website>1</show_in_website>
42
+ <show_in_store>1</show_in_store>
43
+ <fields>
44
+ <enabled translate="label">
45
+ <label>Enabled</label>
46
+ <frontend_type>select</frontend_type>
47
+ <source_model>adminhtml/system_config_source_yesno</source_model>
48
+ <sort_order>10</sort_order>
49
+ <show_in_default>1</show_in_default>
50
+ <show_in_website>1</show_in_website>
51
+ <show_in_store>1</show_in_store>
52
+ </enabled>
53
+ </fields>
54
+ </general>
55
+ </groups>
56
+ </ig_floatingmenu>
57
+ </sections>
58
+ </config>
app/design/frontend/base/default/layout/ig_floatingmenu.xml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * IDEALIAGroup srl
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the EULA
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://www.idealiagroup.com/magento-ext-license.html
12
+ *
13
+ * @category IG
14
+ * @package IG_FloatingMenu
15
+ * @copyright Copyright (c) 2011-2012 IDEALIAGroup srl (http://www.idealiagroup.com)
16
+ * @license http://www.idealiagroup.com/magento-ext-license.html
17
+ */
18
+ -->
19
+ <layout version="0.1.0">
20
+ <default>
21
+ <reference name="head" ifconfig="ig_floatingmenu/general/enabled">
22
+ <action method="addItem"><type>skin_js</type><name>ig_floatingmenu/floatingmenu.js</name></action>
23
+ <action method="addItem"><type>skin_css</type><name>ig_floatingmenu/floatingmenu.css</name></action>
24
+ </reference>
25
+
26
+ <reference name="before_body_end" ifconfig="ig_floatingmenu/general/enabled">
27
+ <block type="ig_floatingmenu/floating" name="floating.menu" as="floatingMenu" translate="label" template="ig_floatingmenu/floating.phtml">
28
+ <!--block type="catalog/navigation" name="floating.top.menu" as="floatingTopMenu" template="ig_floatingmenu/navigation.phtml"/-->
29
+ </block>
30
+ </reference>
31
+ </default>
32
+ </layout>
app/design/frontend/base/default/template/ig_floatingmenu/floating.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IDEALIAGroup srl
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
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://www.idealiagroup.com/magento-ext-license.html
11
+ *
12
+ * @category IG
13
+ * @package IG_FloatingMenu
14
+ * @copyright Copyright (c) 2011-2012 IDEALIAGroup srl (http://www.idealiagroup.com)
15
+ * @license http://www.idealiagroup.com/magento-ext-license.html
16
+ */
17
+ ?>
18
+ <div id="ig-floatingmenu-container" class="header">
19
+ <div class="ig-floatingmenu-wrapper">
20
+ <div id="ig-floatingmenu-quick"></div>
21
+ <div id="ig-floatingmenu-search"></div>
22
+
23
+ <div style="clear:both"></div>
24
+ <div id="ig-floatingmenu-nav"></div>
25
+ </div>
26
+ </div>
27
+ <script type="text/javascript">igFloatingMenuStart()</script>
app/design/frontend/base/default/template/ig_floatingmenu/navigation.phtml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IDEALIAGroup srl
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the EULA
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://www.idealiagroup.com/magento-ext-license.html
11
+ *
12
+ * @category IG
13
+ * @package IG_FloatingMenu
14
+ * @copyright Copyright (c) 2011-2012 IDEALIAGroup srl (http://www.idealiagroup.com)
15
+ * @license http://www.idealiagroup.com/magento-ext-license.html
16
+ */
17
+ ?>
app/etc/modules/IG_FloatingMenu.xml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * IDEALIAGroup srl
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the EULA
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://www.idealiagroup.com/magento-ext-license.html
12
+ *
13
+ * @category IG
14
+ * @package IG_FloatingMenu
15
+ * @copyright Copyright (c) 2011-2012 IDEALIAGroup srl (http://www.idealiagroup.com)
16
+ * @license http://www.idealiagroup.com/magento-ext-license.html
17
+ */
18
+ -->
19
+ <config>
20
+ <modules>
21
+ <IG_FloatingMenu>
22
+ <active>true</active>
23
+ <codePool>community</codePool>
24
+ </IG_FloatingMenu>
25
+ </modules>
26
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>IG_FloatingMenu</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.idealiagroup.com/magento-ext-license.html">Commercial</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>IDEALIAGroup Floating Menu</summary>
10
+ <description>IDEALIAGroup Floating Menu</description>
11
+ <notes>Enjoy it ;)</notes>
12
+ <authors><author><name>Riccardo Tempesta</name><user>auto-converted</user><email>tempesta@idealiagroup.com</email></author><author><name>Marco Giorgetti</name><user>auto-converted</user><email>giorgetti@idealiagroup.com</email></author></authors>
13
+ <date>2012-01-03</date>
14
+ <time>18:00:03</time>
15
+ <contents><target name="magecommunity"><dir name="IG"><dir name="FloatingMenu"><dir name="Block"><file name="Floating.php" hash="7374d5ea40de05b28a3f6c0645ab410c"/></dir><dir name="Helper"><file name="Data.php" hash="bef9702590e3500628b9c95be1f5eb56"/></dir><dir name="etc"><file name="config.xml" hash="77efcb2d32879cc592f04b84a388a4c2"/><file name="system.xml" hash="d6fca0feba6f9154390c407b53236dd4"/></dir><file name="COMPATIBILITY.txt" hash="d3b64c7bb51137148e6b0feed3224af5"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="IG_FloatingMenu.xml" hash="65164c468bd6462362505fb6b60599ff"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="ig_floatingmenu"><file name="floatingmenu.css" hash="454fe0ed19f80b8a3c6dcad32481062b"/><file name="floatingmenu.js" hash="b6e408a07a19d88df19116517f9e4746"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="ig_floatingmenu"><file name="floating.phtml" hash="f0e72a3cbb836c41d83f94019db5add4"/><file name="navigation.phtml" hash="d22ae02c3f5300c0a3dd18f43ce9254d"/></dir></dir><dir name="layout"><file name="ig_floatingmenu.xml" hash="7da0be664543388996a977b5dfe3d7d6"/></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>
skin/frontend/base/default/ig_floatingmenu/floatingmenu.css ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * IDEALIAGroup srl
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the EULA
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://www.idealiagroup.com/magento-ext-license.html
10
+ *
11
+ * @category IG
12
+ * @package IG_FloatingMenu
13
+ * @copyright Copyright (c) 2011-2012 IDEALIAGroup srl (http://www.idealiagroup.com)
14
+ * @license http://www.idealiagroup.com/magento-ext-license.html
15
+ */
16
+
17
+ #ig-floatingmenu-container {
18
+ position: fixed;
19
+ top: 0;
20
+ left: 0;
21
+ width: 100%;
22
+ background: #415966;
23
+ display: none;
24
+
25
+ -moz-box-shadow: 0 3px 5px #333333;
26
+ -webkit-box-shadow: 0 3px 5px #333333;
27
+ box-shadow: 0 3px 5px #333333;
28
+
29
+ opacity: .9;
30
+
31
+ }
32
+
33
+ #ig-floatingmenu-container {
34
+ width: 100%;
35
+ padding: 5px;
36
+ }
37
+
38
+ #ig-floatingmenu-container #nav {
39
+ width: 960px;
40
+ padding: 0;
41
+ }
42
+
43
+ #ig-floatingmenu-container .quick-access {
44
+ margin: 0;
45
+ padding: 0;
46
+ float: left;
47
+ }
48
+
49
+ #ig-floatingmenu-container .welcome-msg {
50
+ float: left;
51
+ margin-right: 2em;
52
+ }
53
+ #ig-floatingmenu-container .links {
54
+ float: left;
55
+ }
56
+
57
+ #ig-floatingmenu-container .form-search {
58
+ background: none;
59
+ position: relative;
60
+ margin: 0;
61
+ float: right;
62
+ height: auto;
63
+ }
64
+
65
+ #ig-floatingmenu-container .ig-floatingmenu-wrapper {
66
+ width: 960px;
67
+ margin: auto;
68
+ }
69
+
70
+ #ig-floatingmenu-search {
71
+
72
+ }
skin/frontend/base/default/ig_floatingmenu/floatingmenu.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * IDEALIAGroup srl
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the EULA
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://www.idealiagroup.com/magento-ext-license.html
10
+ *
11
+ * @category IG
12
+ * @package IG_FloatingMenu
13
+ * @copyright Copyright (c) 2011-2012 IDEALIAGroup srl (http://www.idealiagroup.com)
14
+ * @license http://www.idealiagroup.com/magento-ext-license.html
15
+ */
16
+
17
+ function igFloatingMenuStart() {
18
+ var igFloatingMenuStatus = false;
19
+
20
+ // Make placeholders
21
+ var igFloatingMenuNavPlaceholder = document.createElement('div');
22
+ igFloatingMenuNavPlaceholder.setAttribute('id', 'ig-floatingmenu-nav-placeholder');
23
+ $('nav').parentNode.insertBefore(igFloatingMenuNavPlaceholder, $('nav'));
24
+
25
+ var igFloatingMenuSearchPlaceholder = document.createElement('div');
26
+ igFloatingMenuSearchPlaceholder.setAttribute('id', 'ig-floatingmenu-search-placeholder');
27
+ $('search_mini_form').parentNode.insertBefore(igFloatingMenuSearchPlaceholder, $('search_mini_form'));
28
+
29
+ $$('.quick-access')[0].setAttribute('id', 'quick-access');
30
+ var igFloatingMenuQuickPlaceholder = document.createElement('div');
31
+ igFloatingMenuQuickPlaceholder.setAttribute('id', 'ig-floatingmenu-quick-placeholder');
32
+ $('quick-access').parentNode.insertBefore(igFloatingMenuQuickPlaceholder, $('quick-access'));
33
+
34
+ var navMenuPosition = $('nav').cumulativeOffset().top;
35
+
36
+ function igFloatingMenuOnScroll()
37
+ {
38
+ var scrollTop = document.viewport.getScrollOffsets().top;
39
+
40
+ if ((scrollTop > navMenuPosition) && !igFloatingMenuStatus) // Show
41
+ {
42
+ igFloatingMenuStatus = true;
43
+ $('ig-floatingmenu-container').setStyle({display: 'block'});
44
+ $('ig-floatingmenu-nav').insert($('nav'));
45
+ $('ig-floatingmenu-search').insert($('search_mini_form'));
46
+ $('ig-floatingmenu-quick').insert($('quick-access'));
47
+
48
+ }
49
+ else if ((scrollTop <= navMenuPosition) && igFloatingMenuStatus) // Hide
50
+ {
51
+ igFloatingMenuStatus = false;
52
+ $('ig-floatingmenu-container').setStyle({display: 'none'});
53
+ $('ig-floatingmenu-nav-placeholder').parentNode.insertBefore($('nav'), $('ig-floatingmenu-nav-placeholder'));
54
+ $('ig-floatingmenu-search-placeholder').parentNode.insertBefore($('search_mini_form'), $('ig-floatingmenu-search-placeholder'));
55
+ $('ig-floatingmenu-quick-placeholder').parentNode.insertBefore($('quick-access'), $('ig-floatingmenu-quick-placeholder'));
56
+ }
57
+ }
58
+
59
+ // Activate on window scroll
60
+ Event.observe(document, 'scroll', function() {
61
+ igFloatingMenuOnScroll();
62
+ });
63
+
64
+ igFloatingMenuOnScroll();
65
+ };