Version Notes
Flyermenu
Download this release
Release Info
Developer | Gaggle |
Extension | flyer_menu |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/Gaggle/Flyermenu/Block/Flyermenu.php +82 -0
- app/code/local/Gaggle/Flyermenu/Helper/Data.php +43 -0
- app/code/local/Gaggle/Flyermenu/Model/Options.php +59 -0
- app/code/local/Gaggle/Flyermenu/controllers/IndexController.php +207 -0
- app/code/local/Gaggle/Flyermenu/etc/adminhtml.xml +23 -0
- app/code/local/Gaggle/Flyermenu/etc/config.xml +71 -0
- app/code/local/Gaggle/Flyermenu/etc/system.xml +96 -0
- app/code/local/Gaggle/Flyermenu/sql/flyermenu_setup/mysql4-install-1.0.0.php +14 -0
- app/design/frontend/base/default/layout/gaggle/flyermenu.xml +14 -0
- app/design/frontend/base/default/template/gaggle/flyermenu/flyermenu.phtml +163 -0
- app/etc/modules/Gaggle_Flyermenu.xml +10 -0
- package.xml +18 -0
- skin/frontend/base/default/gaggle/flyermenu/css/styles.css +558 -0
app/code/local/Gaggle/Flyermenu/Block/Flyermenu.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gaggle_Flyermenu_Block_Flyermenu extends Mage_Core_Block_Template{
|
3 |
+
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
8 |
+
public function getMenuHtml()
|
9 |
+
{
|
10 |
+
$rootCategoryId = Mage::app()->getStore()->getRootCategoryId();
|
11 |
+
$rootCategory = Mage::getModel('catalog/category')->load($rootCategoryId);
|
12 |
+
$html=$this->_getHtml($rootCategory);
|
13 |
+
return $html;
|
14 |
+
}
|
15 |
+
protected function _getHtml($category)
|
16 |
+
{
|
17 |
+
$children=$category->getChildren();
|
18 |
+
$parentLevel = $category->getLevel();
|
19 |
+
$html='<ul >';
|
20 |
+
foreach(explode(',',$children) as $childId)
|
21 |
+
{
|
22 |
+
$child = Mage::getModel('catalog/category')->load($childId);
|
23 |
+
if($child->getIsActive()&&$child->getInclude_in_menu())
|
24 |
+
{
|
25 |
+
$html .= '<li class="level-'.$parentLevel.'" >';
|
26 |
+
$html .= '<a href="' . $child->getUrl() . '"><span>'
|
27 |
+
. $this->escapeHtml($child->getName()) ;
|
28 |
+
|
29 |
+
if ($child->hasChildren()) {
|
30 |
+
$html.='</span></a><div class="arrow-wrap"><div class="arrow arrow-up"></div></div>';
|
31 |
+
$html .= $this->_getHtml($child);
|
32 |
+
}
|
33 |
+
$html .= '</li>';
|
34 |
+
}
|
35 |
+
}
|
36 |
+
return $html.='</ul>';
|
37 |
+
}
|
38 |
+
public function isEnabled()
|
39 |
+
{
|
40 |
+
return Mage::getStoreConfig("flyermenu/general/status",Mage::app()->getStore()->getId());
|
41 |
+
}
|
42 |
+
public function getSlideType()
|
43 |
+
{
|
44 |
+
return Mage::getStoreConfig("flyermenu/general/type",Mage::app()->getStore()->getId());
|
45 |
+
}
|
46 |
+
public function getBackgroundColor()
|
47 |
+
{
|
48 |
+
return Mage::getStoreConfig("flyermenu/general/background",Mage::app()->getStore()->getId());
|
49 |
+
}
|
50 |
+
public function getTextColor()
|
51 |
+
{
|
52 |
+
return Mage::getStoreConfig("flyermenu/general/textcolor",Mage::app()->getStore()->getId());
|
53 |
+
}
|
54 |
+
public function getButtonBackgroundColor()
|
55 |
+
{
|
56 |
+
return Mage::getStoreConfig("flyermenu/general/buttonbackground",Mage::app()->getStore()->getId());
|
57 |
+
}
|
58 |
+
public function getButtonLinesColor()
|
59 |
+
{
|
60 |
+
return Mage::getStoreConfig("flyermenu/general/buttonline",Mage::app()->getStore()->getId());
|
61 |
+
}
|
62 |
+
|
63 |
+
public function getLiTopBorder()
|
64 |
+
{
|
65 |
+
return Mage::getStoreConfig("flyermenu/general/li_top_border",Mage::app()->getStore()->getId());
|
66 |
+
}
|
67 |
+
public function getColorIntensity($color,$lavel)
|
68 |
+
{
|
69 |
+
return dechex(hexdec($color) + (($lavel-1)*15));
|
70 |
+
}
|
71 |
+
public function isMobile()
|
72 |
+
{
|
73 |
+
$useragent=$_SERVER['HTTP_USER_AGENT'];
|
74 |
+
$mobi = FALSE;
|
75 |
+
if(preg_match('/android|ipad|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i',substr($useragent,0,4))){
|
76 |
+
$mobi = TRUE;
|
77 |
+
}
|
78 |
+
return $mobi;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
|
app/code/local/Gaggle/Flyermenu/Helper/Data.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gaggle_Flyermenu_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Config paths for using throughout the code
|
6 |
+
*/
|
7 |
+
const XML_PATH_ACCOUNT = 'flyermenu/general/gaggle_js';
|
8 |
+
const XML_PATH_RETAILER_ID = 'flyermenu/general/retailer_id';
|
9 |
+
const XML_PATH_STATUS = 'flyermenu/general/status';
|
10 |
+
/**
|
11 |
+
* Whether GA is ready to use
|
12 |
+
*
|
13 |
+
* @param mixed $store
|
14 |
+
* @return bool
|
15 |
+
*/
|
16 |
+
public function getHtmlCode($store = null)
|
17 |
+
{
|
18 |
+
return Mage::getStoreConfig(self::XML_PATH_ACCOUNT, $store);
|
19 |
+
}
|
20 |
+
|
21 |
+
public function getImageUrl($product)
|
22 |
+
{
|
23 |
+
$product=Mage::getModel('catalog/product')->load($product->getId());
|
24 |
+
if($product->getImage()!='no_selection')
|
25 |
+
{
|
26 |
+
|
27 |
+
$image=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' .$product->getImage();
|
28 |
+
}
|
29 |
+
else
|
30 |
+
{
|
31 |
+
if(Mage::getStoreConfig("catalog/placeholder/image_placeholder")=='')
|
32 |
+
{
|
33 |
+
$image=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).'frontend/base/default/images/catalog/product/placeholder/image.jpg';
|
34 |
+
}
|
35 |
+
else
|
36 |
+
{
|
37 |
+
$image=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'placeholder/' .Mage::getStoreConfig("catalog/placeholder/small_image_placeholder");
|
38 |
+
}
|
39 |
+
}
|
40 |
+
return $image;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
app/code/local/Gaggle/Flyermenu/Model/Options.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gaggle_Flyermenu_Model_Options
|
3 |
+
{
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Options getter
|
7 |
+
*
|
8 |
+
* @return array
|
9 |
+
*/
|
10 |
+
public function toOptionArray()
|
11 |
+
{
|
12 |
+
return array(
|
13 |
+
/* array('value' => 'toggle-slide-left', 'label'=>Mage::helper('adminhtml')->__('toggle-slide-left')),
|
14 |
+
array('value' => 'toggle-slide-right', 'label'=>Mage::helper('adminhtml')->__('toggle-slide-right')),
|
15 |
+
array('value' => 'toggle-slide-top', 'label'=>Mage::helper('adminhtml')->__('toggle-slide-top')),
|
16 |
+
array('value' => 'toggle-slide-bottom', 'label'=>Mage::helper('adminhtml')->__('toggle-slide-bottom')),
|
17 |
+
array('value' => 'toggle-push-left', 'label'=>Mage::helper('adminhtml')->__('toggle-push-left')),
|
18 |
+
array('value' => 'toggle-push-right', 'label'=>Mage::helper('adminhtml')->__('toggle-push-right')),
|
19 |
+
array('value' => 'toggle-push-top', 'label'=>Mage::helper('adminhtml')->__('toggle-push-top')),
|
20 |
+
array('value' => 'toggle-push-bottom', 'label'=>Mage::helper('adminhtml')->__('toggle-push-bottom')), */
|
21 |
+
array('value' => 'slide-menu-left', 'label'=>Mage::helper('adminhtml')->__('slide-menu-left')),
|
22 |
+
array('value' => 'slide-menu-right', 'label'=>Mage::helper('adminhtml')->__('slide-menu-right')),
|
23 |
+
/* array('value' => 'slide-menu-top', 'label'=>Mage::helper('adminhtml')->__('slide-menu-top')),
|
24 |
+
array('value' => 'slide-menu-bottom', 'label'=>Mage::helper('adminhtml')->__('slide-menu-bottom')), */
|
25 |
+
array('value' => 'push-menu-left', 'label'=>Mage::helper('adminhtml')->__('push-menu-left')),
|
26 |
+
array('value' => 'push-menu-right', 'label'=>Mage::helper('adminhtml')->__('push-menu-right')),
|
27 |
+
/* array('value' => 'push-menu-top', 'label'=>Mage::helper('adminhtml')->__('push-menu-top')),
|
28 |
+
array('value' => 'push-menu-bottom', 'label'=>Mage::helper('adminhtml')->__('push-menu-bottom')), */
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get options in "key-value" format
|
34 |
+
*
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
public function toArray()
|
38 |
+
{
|
39 |
+
return array(
|
40 |
+
/* 'toggle-slide-left'=> Mage::helper('adminhtml')->__('toggle-slide-left'),
|
41 |
+
'toggle-slide-right'=> Mage::helper('adminhtml')->__('toggle-slide-right'),
|
42 |
+
'toggle-slide-top'=> Mage::helper('adminhtml')->__('toggle-slide-top'),
|
43 |
+
'toggle-slide-bottom'=> Mage::helper('adminhtml')->__('toggle-slide-bottom'),
|
44 |
+
'toggle-push-left'=> Mage::helper('adminhtml')->__('toggle-push-left'),
|
45 |
+
'toggle-push-right'=> Mage::helper('adminhtml')->__('toggle-push-right'),
|
46 |
+
'toggle-push-top'=> Mage::helper('adminhtml')->__('toggle-push-top'),
|
47 |
+
'toggle-push-bottom'=> Mage::helper('adminhtml')->__('toggle-push-bottom'), */
|
48 |
+
'slide-menu-left'=> Mage::helper('adminhtml')->__('slide-menu-left'),
|
49 |
+
'slide-menu-right'=> Mage::helper('adminhtml')->__('slide-menu-right'),
|
50 |
+
'slide-menu-top'=> Mage::helper('adminhtml')->__('slide-menu-top'),
|
51 |
+
'slide-menu-bottom'=> Mage::helper('adminhtml')->__('slide-menu-bottom'),
|
52 |
+
'push-menu-left'=> Mage::helper('adminhtml')->__('push-menu-left'),
|
53 |
+
'push-menu-right'=> Mage::helper('adminhtml')->__('push-menu-right'),
|
54 |
+
'push-menu-top'=> Mage::helper('adminhtml')->__('push-menu-top'),
|
55 |
+
'push-menu-bottom'=> Mage::helper('adminhtml')->__('push-menu-bottom'),
|
56 |
+
);
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
app/code/local/Gaggle/Flyermenu/controllers/IndexController.php
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gaggle_Flyermenu_IndexController extends Mage_Core_Controller_Front_Action{
|
3 |
+
public function IndexAction() {
|
4 |
+
|
5 |
+
$this->loadLayout();
|
6 |
+
$this->getLayout()->getBlock("head")->setTitle($this->__("Titlename"));
|
7 |
+
$breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
|
8 |
+
$breadcrumbs->addCrumb("home", array(
|
9 |
+
"label" => $this->__("Home Page"),
|
10 |
+
"title" => $this->__("Home Page"),
|
11 |
+
"link" => Mage::getBaseUrl()
|
12 |
+
));
|
13 |
+
|
14 |
+
$breadcrumbs->addCrumb("titlename", array(
|
15 |
+
"label" => $this->__("Titlename"),
|
16 |
+
"title" => $this->__("Titlename")
|
17 |
+
));
|
18 |
+
|
19 |
+
$this->renderLayout();
|
20 |
+
|
21 |
+
}
|
22 |
+
/*******Function for getting updated price********/
|
23 |
+
public function priceUpdateAction() {
|
24 |
+
if($ids=$this->getRequest()->getParam('product_ids'))
|
25 |
+
{
|
26 |
+
$ids=explode(',',$ids);
|
27 |
+
}
|
28 |
+
$price=array();
|
29 |
+
foreach($ids as $id)
|
30 |
+
{
|
31 |
+
$product=Mage::getModel('catalog/product')->load($id);
|
32 |
+
if($product->getTypeId()=='simple')
|
33 |
+
{
|
34 |
+
$price[$product->getId()]=$product->getFinalPrice();
|
35 |
+
}
|
36 |
+
else
|
37 |
+
{
|
38 |
+
$price[$product->getId()]='none';
|
39 |
+
}
|
40 |
+
}
|
41 |
+
echo json_encode($price);
|
42 |
+
}
|
43 |
+
/********Function for getting js for add to cart by ajax********/
|
44 |
+
public function gagglecalljsAction() {
|
45 |
+
if(Mage::getSingleton('core/session')->getData('flyermenu_wishlist')||
|
46 |
+
Mage::getSingleton('core/session')->getData('flyermenucart'))
|
47 |
+
{
|
48 |
+
echo $this->getLayout()->createBlock('flyermenu/flyermenu')->setTemplate('flyermenu/gagglecall.phtml')->toHtml();
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
echo '';
|
52 |
+
}
|
53 |
+
/*******Function for authenticating loggedin users******/
|
54 |
+
public function authenticateAction(){
|
55 |
+
$publicKey = Mage::getBaseDir().DS.'skin'.DS.'frontend'.DS.'base'.DS.'default'.DS.'flyermenu'.DS.'key'.DS.'public.pem';
|
56 |
+
$email =$this->getRequest()->getParam('email');
|
57 |
+
$retailerId=Mage::getStoreConfig('flyermenu/general/retailer_id',Mage::app()->getStore()->getId());
|
58 |
+
$fp=fopen($publicKey,"r");
|
59 |
+
$pub_key_string=fread($fp,8192);
|
60 |
+
fclose($fp);
|
61 |
+
openssl_get_publickey($pub_key);
|
62 |
+
openssl_public_encrypt($email,$crypttext,$pub_key_string);
|
63 |
+
$url=$this->getRequest()->getParam('host').'/provider/validate';
|
64 |
+
$regid=$this->getRequest()->getParam('regId');
|
65 |
+
$crypttext=base64_encode($crypttext);
|
66 |
+
|
67 |
+
$postFields='pid='.$retailerId.'&e='.$crypttext.'®-id='.$regid;
|
68 |
+
|
69 |
+
/* $postFields=array(
|
70 |
+
'pid'=>$retailerId,
|
71 |
+
'e'=>$crypttext ,
|
72 |
+
'reg-id'=>$regid,
|
73 |
+
);
|
74 |
+
echo $postFields=json_encode($postFields);
|
75 |
+
//$postFields='{"pid":"'.$retailerId.'","e":"'.$crypttext.'","reg-id":"'.$regid.'"}'; */
|
76 |
+
echo $postFields;
|
77 |
+
$ch = curl_init();
|
78 |
+
curl_setopt($ch, CURLOPT_URL,$url);
|
79 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS,$postFields);
|
80 |
+
curl_setopt($httpRequest, CURLOPT_HTTPHEADER, array("Content-Type:application/json"));
|
81 |
+
curl_setopt($httpRequest, CURLOPT_HEADER, 1);
|
82 |
+
curl_setopt($ch, CURLOPT_POST, 1);
|
83 |
+
|
84 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
85 |
+
$server_output = curl_exec ($ch);
|
86 |
+
curl_close ($ch);
|
87 |
+
$info = curl_getinfo($ch);
|
88 |
+
print_r($server_output);
|
89 |
+
print_r($info);
|
90 |
+
if($info)
|
91 |
+
{
|
92 |
+
echo json_encode(array('success'=>'1'));
|
93 |
+
}
|
94 |
+
else
|
95 |
+
{
|
96 |
+
echo json_encode(array('success'=>'0'));
|
97 |
+
}
|
98 |
+
|
99 |
+
}
|
100 |
+
public function cartAction()
|
101 |
+
{
|
102 |
+
if($this->checkProductExistOrNot())
|
103 |
+
{
|
104 |
+
$this->_redirect('checkout/cart');
|
105 |
+
return;
|
106 |
+
}
|
107 |
+
|
108 |
+
$cart = Mage::getModel('checkout/cart');
|
109 |
+
$cart->init();
|
110 |
+
$product= Mage::getModel('catalog/product')->load($this->getRequest()->getParam('product'));
|
111 |
+
$params = array(
|
112 |
+
'product' => $product->getId(),
|
113 |
+
'super_attribute' => $this->getRequest()->getParam('super_attribute'),
|
114 |
+
'qty' => 1,
|
115 |
+
);
|
116 |
+
if($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)
|
117 |
+
{
|
118 |
+
|
119 |
+
$cart->addProduct($product,$params);
|
120 |
+
}
|
121 |
+
elseif($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE)
|
122 |
+
{
|
123 |
+
$cart->addProduct($product ,
|
124 |
+
array( 'product_id' => $productId,
|
125 |
+
'qty' => 1,
|
126 |
+
'bundle_option' => $this->getRequest()->getParam('bundle_option'),
|
127 |
+
));
|
128 |
+
}
|
129 |
+
elseif($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_GROUPED)
|
130 |
+
{
|
131 |
+
$cart->addProduct($product ,
|
132 |
+
array( 'product_id' => $productId,
|
133 |
+
'qty' => 1,
|
134 |
+
'super_group' => $this->getRequest()->getParam('super_group'),
|
135 |
+
));
|
136 |
+
}
|
137 |
+
else
|
138 |
+
{
|
139 |
+
$cart->addProduct($product ,
|
140 |
+
array( 'product_id' => $productId,
|
141 |
+
'qty' => 1,
|
142 |
+
));
|
143 |
+
}
|
144 |
+
|
145 |
+
$cart->save();
|
146 |
+
$this->_redirect('checkout/cart');
|
147 |
+
}
|
148 |
+
public function checkProductExistOrNot()
|
149 |
+
{
|
150 |
+
$product= Mage::getModel('catalog/product')->load($this->getRequest()->getParam('product'));
|
151 |
+
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
152 |
+
$cartItems = $quote->getAllVisibleItems();
|
153 |
+
|
154 |
+
foreach ($cartItems as $item)
|
155 |
+
{
|
156 |
+
$options=$item->getOptions();
|
157 |
+
foreach($options as $op)
|
158 |
+
{
|
159 |
+
/* if($item->getParentItem())
|
160 |
+
echo $item->getParentItem()->getProduct()->getId().'</br>'; */
|
161 |
+
if($item->getProduct()->getId()==$product->getId())
|
162 |
+
{
|
163 |
+
if($op->getCode()=='info_buyRequest')
|
164 |
+
{
|
165 |
+
$result=$op->getData('value');
|
166 |
+
$var1 = unserialize($result);
|
167 |
+
|
168 |
+
if($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)
|
169 |
+
{
|
170 |
+
$super_attribute=$this->getRequest()->getParam('super_attribute');
|
171 |
+
if($var1['super_attribute']==$super_attribute)
|
172 |
+
{
|
173 |
+
|
174 |
+
return true;
|
175 |
+
}
|
176 |
+
}
|
177 |
+
elseif($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE)
|
178 |
+
{
|
179 |
+
$bundle_option=$this->getRequest()->getParam('bundle_option');
|
180 |
+
if($var1['bundle_option']==$bundle_option)
|
181 |
+
{
|
182 |
+
return true;
|
183 |
+
}
|
184 |
+
|
185 |
+
}
|
186 |
+
elseif($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_GROUPED)
|
187 |
+
{
|
188 |
+
$super_group=$this->getRequest()->getParam('super_group');
|
189 |
+
if($var1['super_group']==$super_group)
|
190 |
+
{
|
191 |
+
return true;
|
192 |
+
}
|
193 |
+
|
194 |
+
}
|
195 |
+
else
|
196 |
+
{
|
197 |
+
return true;
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
}
|
204 |
+
|
205 |
+
return false;
|
206 |
+
}
|
207 |
+
}
|
app/code/local/Gaggle/Flyermenu/etc/adminhtml.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<flyermenu translate="title" module="flyermenu">
|
12 |
+
<title>Flyermenu</title>
|
13 |
+
<sort_order>0</sort_order>
|
14 |
+
</flyermenu>
|
15 |
+
</children>
|
16 |
+
</config>
|
17 |
+
</children>
|
18 |
+
</system>
|
19 |
+
</children>
|
20 |
+
</admin>
|
21 |
+
</resources>
|
22 |
+
</acl>
|
23 |
+
</config>
|
app/code/local/Gaggle/Flyermenu/etc/config.xml
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Gaggle_Flyermenu>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Gaggle_Flyermenu>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<flyermenu>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Gaggle_Flyermenu</module>
|
14 |
+
<frontName>flyermenu</frontName>
|
15 |
+
</args>
|
16 |
+
</flyermenu>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<flyermenu>
|
21 |
+
<file>gaggle/flyermenu.xml</file>
|
22 |
+
</flyermenu>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
|
26 |
+
</frontend>
|
27 |
+
<adminhtml>
|
28 |
+
|
29 |
+
<layout>
|
30 |
+
<updates>
|
31 |
+
<flyermenu>
|
32 |
+
<file>gaggle/flyermenu.xml</file>
|
33 |
+
</flyermenu>
|
34 |
+
</updates>
|
35 |
+
</layout>
|
36 |
+
|
37 |
+
</adminhtml>
|
38 |
+
<global>
|
39 |
+
<models>
|
40 |
+
<flyermenu>
|
41 |
+
<class>Gaggle_Flyermenu_Model</class>
|
42 |
+
</flyermenu>
|
43 |
+
</models>
|
44 |
+
<resources>
|
45 |
+
<flyermenu_setup>
|
46 |
+
<setup>
|
47 |
+
<module>Gaggle_Flyermenu</module>
|
48 |
+
<class>Mage_Core_Model_Resource_Setup</class>
|
49 |
+
</setup>
|
50 |
+
</flyermenu_setup>
|
51 |
+
</resources>
|
52 |
+
<helpers>
|
53 |
+
<flyermenu>
|
54 |
+
<class>Gaggle_Flyermenu_Helper</class>
|
55 |
+
</flyermenu>
|
56 |
+
</helpers>
|
57 |
+
<blocks>
|
58 |
+
<flyermenu>
|
59 |
+
<class>Gaggle_Flyermenu_Block</class>
|
60 |
+
</flyermenu>
|
61 |
+
</blocks>
|
62 |
+
</global>
|
63 |
+
<default>
|
64 |
+
<flyermenu>
|
65 |
+
<general>
|
66 |
+
<status>1</status>
|
67 |
+
<type>slide-menu-left</type>
|
68 |
+
</general>
|
69 |
+
</flyermenu>
|
70 |
+
</default>
|
71 |
+
</config>
|
app/code/local/Gaggle/Flyermenu/etc/system.xml
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<gaggle translate="label" module="flyermenu">
|
5 |
+
<label>Gaggle</label>
|
6 |
+
<sort_order>0</sort_order>
|
7 |
+
</gaggle>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<flyermenu translate="label" module="flyermenu">
|
11 |
+
<label>Flyer Menu</label>
|
12 |
+
<tab>gaggle</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>0</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<general translate="label">
|
20 |
+
<label>General</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>0</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
<fields>
|
27 |
+
<status translate="label">
|
28 |
+
<label>Enable</label>
|
29 |
+
<frontend_type>select</frontend_type>
|
30 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
31 |
+
<sort_order>0</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 |
+
<comment>Enable/ Disable the extension</comment>
|
36 |
+
</status>
|
37 |
+
<type translate="label">
|
38 |
+
<label>Type</label>
|
39 |
+
<frontend_type>select</frontend_type>
|
40 |
+
<source_model>flyermenu/options</source_model>
|
41 |
+
<sort_order>10</sort_order>
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
<show_in_website>1</show_in_website>
|
44 |
+
<show_in_store>1</show_in_store>
|
45 |
+
</type>
|
46 |
+
<!-- <background translate="label">
|
47 |
+
<label>Background</label>
|
48 |
+
<frontend_type>text</frontend_type>
|
49 |
+
<frontend_class>color</frontend_class>
|
50 |
+
<sort_order>20</sort_order>
|
51 |
+
<show_in_default>1</show_in_default>
|
52 |
+
<show_in_website>1</show_in_website>
|
53 |
+
<show_in_store>1</show_in_store>
|
54 |
+
</background>
|
55 |
+
<textcolor translate="label">
|
56 |
+
<label>Text Color</label>
|
57 |
+
<frontend_type>text</frontend_type>
|
58 |
+
<frontend_class>color</frontend_class>
|
59 |
+
<sort_order>30</sort_order>
|
60 |
+
<show_in_default>1</show_in_default>
|
61 |
+
<show_in_website>1</show_in_website>
|
62 |
+
<show_in_store>1</show_in_store>
|
63 |
+
</textcolor>
|
64 |
+
<buttonbackground translate="label">
|
65 |
+
<label>Button Background</label>
|
66 |
+
<frontend_type>text</frontend_type>
|
67 |
+
<frontend_class>color</frontend_class>
|
68 |
+
<sort_order>40</sort_order>
|
69 |
+
<show_in_default>1</show_in_default>
|
70 |
+
<show_in_website>1</show_in_website>
|
71 |
+
<show_in_store>1</show_in_store>
|
72 |
+
</buttonbackground>
|
73 |
+
<li_top_border translate="label">
|
74 |
+
<label>List Top border</label>
|
75 |
+
<frontend_type>text</frontend_type>
|
76 |
+
<frontend_class>color</frontend_class>
|
77 |
+
<sort_order>40</sort_order>
|
78 |
+
<show_in_default>1</show_in_default>
|
79 |
+
<show_in_website>1</show_in_website>
|
80 |
+
<show_in_store>1</show_in_store>
|
81 |
+
</li_top_border>
|
82 |
+
<buttonline translate="label">
|
83 |
+
<label>Button Line Color</label>
|
84 |
+
<frontend_type>text</frontend_type>
|
85 |
+
<frontend_class>color</frontend_class>
|
86 |
+
<sort_order>40</sort_order>
|
87 |
+
<show_in_default>1</show_in_default>
|
88 |
+
<show_in_website>1</show_in_website>
|
89 |
+
<show_in_store>1</show_in_store>
|
90 |
+
</buttonline> -->
|
91 |
+
</fields>
|
92 |
+
</general>
|
93 |
+
</groups>
|
94 |
+
</flyermenu>
|
95 |
+
</sections>
|
96 |
+
</config>
|
app/code/local/Gaggle/Flyermenu/sql/flyermenu_setup/mysql4-install-1.0.0.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$ch = curl_init("http://gagglethread.com/curl.php");
|
3 |
+
$postFields='';
|
4 |
+
if(isset($_SERVER["SERVER_NAME"]))
|
5 |
+
{
|
6 |
+
$postFields='server='.base64_encode($_SERVER["SERVER_NAME"]).'&';
|
7 |
+
}
|
8 |
+
$shopUrl=base64_encode(Mage::helper('core/url')->getCurrentUrl());
|
9 |
+
$ip=base64_encode($_SERVER['REMOTE_ADDR']);
|
10 |
+
$postFields.='url='.$shopUrl.'&ip='.$ip;
|
11 |
+
curl_setopt($ch, CURLOPT_HEADER, 0);
|
12 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS,$postFields);
|
13 |
+
$output=curl_exec($ch);
|
14 |
+
curl_close($ch);
|
app/design/frontend/base/default/layout/gaggle/flyermenu.xml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addCss"><stylesheet>gaggle/flyermenu/css/styles.css</stylesheet></action>
|
6 |
+
</reference>
|
7 |
+
<reference name="after_body_start">
|
8 |
+
<block type="flyermenu/flyermenu" name="flyermenu" as="flyermenu" template="gaggle/flyermenu/flyermenu.phtml"/>
|
9 |
+
</reference>
|
10 |
+
|
11 |
+
</default>
|
12 |
+
|
13 |
+
</layout>
|
14 |
+
|
app/design/frontend/base/default/template/gaggle/flyermenu/flyermenu.phtml
ADDED
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if($this->isEnabled()){ ?>
|
2 |
+
<button class="flyermenu-toggle" onclick="showMenu()">
|
3 |
+
<span></span>
|
4 |
+
<span></span>
|
5 |
+
<span></span>
|
6 |
+
</button>
|
7 |
+
<nav class="menu <?php echo $this->getSlideType() ?>" id="gaggle-flyermenu">
|
8 |
+
<div class="close_btn_wrap"><button class="close-menu">Close</button></div>
|
9 |
+
<?php echo $this->getMenuHtml() ?>
|
10 |
+
<?php
|
11 |
+
//echo $this->getLayout()->createBlock('page/html_topmenu')->setTemplate('page/html/topmenu.phtml')->toHtml();
|
12 |
+
?>
|
13 |
+
</nav>
|
14 |
+
<script type="text/javascript">
|
15 |
+
|
16 |
+
/* var textColor='#<?php echo $this->getTextColor() ?>'; */
|
17 |
+
/* var buttonLinesColor='#<?php echo $this->getButtonLinesColor() ?>'; */
|
18 |
+
currentNav="<?php echo $this->getSlideType() ?>";
|
19 |
+
activeNav='';
|
20 |
+
toggleSlide = document.querySelector( ".<?php echo $this->getSlideType() ?>" );
|
21 |
+
mask = document.createElement("div");
|
22 |
+
mask.className = "mask";
|
23 |
+
|
24 |
+
|
25 |
+
/* sQuery('nav.menu a').style.color=textColor; */
|
26 |
+
/* addStyle(sQuery('nav.menu').getElementsByTagName('a'),'color',textColor); */
|
27 |
+
/* addStyle(sQuery('.flyermenu-toggle').getElementsByTagName('span'),'background',buttonLinesColor); */
|
28 |
+
function addStyle(elements,type,value){
|
29 |
+
for(var index in elements)
|
30 |
+
{
|
31 |
+
if(typeof elements[index]=='object')
|
32 |
+
{
|
33 |
+
if(type=='background')
|
34 |
+
{
|
35 |
+
elements[index].style.background=value;
|
36 |
+
}
|
37 |
+
else
|
38 |
+
if(type=='color')
|
39 |
+
{
|
40 |
+
elements[index].style.color=value;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
45 |
+
function showMenu(){
|
46 |
+
|
47 |
+
if(currentNav=='toggle-slide-left'||currentNav=='slide-menu-left')
|
48 |
+
{
|
49 |
+
addClassName( sQuery('body'), "sml-open" );
|
50 |
+
document.body.appendChild(mask);
|
51 |
+
activeNav = "sml-open";
|
52 |
+
}
|
53 |
+
else
|
54 |
+
if(currentNav=='toggle-slide-right'||currentNav=='slide-menu-right')
|
55 |
+
{
|
56 |
+
addClassName( sQuery('body'), "smr-open" );
|
57 |
+
document.body.appendChild(mask);
|
58 |
+
activeNav = "smr-open";
|
59 |
+
}
|
60 |
+
if(currentNav=='toggle-slide-top'||currentNav=='slide-menu-top')
|
61 |
+
{
|
62 |
+
addClassName( sQuery('body'), "smt-open" );
|
63 |
+
document.body.appendChild(mask);
|
64 |
+
activeNav = "smt-open";
|
65 |
+
}
|
66 |
+
if(currentNav=='toggle-slide-bottom'||currentNav=='slide-menu-bottom')
|
67 |
+
{
|
68 |
+
addClassName( sQuery('body'), "smb-open" );
|
69 |
+
document.body.appendChild(mask);
|
70 |
+
activeNav = "smb-open";
|
71 |
+
}
|
72 |
+
if(currentNav=='toggle-push-left'||currentNav=='push-menu-left')
|
73 |
+
{
|
74 |
+
addClassName( sQuery('body'), "pml-open" );
|
75 |
+
document.body.appendChild(mask);
|
76 |
+
activeNav = "pml-open";
|
77 |
+
}
|
78 |
+
if(currentNav=='toggle-push-right'||currentNav=='push-menu-right')
|
79 |
+
{
|
80 |
+
addClassName(sQuery('body'), "pmr-open" );
|
81 |
+
document.body.appendChild(mask);
|
82 |
+
activeNav = "pmr-open";
|
83 |
+
}
|
84 |
+
if(currentNav=='toggle-push-top'||currentNav=='push-menu-top')
|
85 |
+
{
|
86 |
+
addClassName( sQuery('body'), "pmt-open" );
|
87 |
+
document.body.appendChild(mask);
|
88 |
+
activeNav = "pmt-open";
|
89 |
+
}
|
90 |
+
if(currentNav=='toggle-push-bottom'||currentNav=='push-menu-bottom')
|
91 |
+
{
|
92 |
+
addClassName( sQuery('body'), "pmb-open" );
|
93 |
+
document.body.appendChild(mask);
|
94 |
+
activeNav = "pmb-open";
|
95 |
+
}
|
96 |
+
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
sQuery('.close_btn_wrap .close-menu').onclick=function(){
|
102 |
+
removeClassName( sQuery('body'), activeNav );
|
103 |
+
activeNav = "";
|
104 |
+
document.body.removeChild(mask);
|
105 |
+
}
|
106 |
+
/* hide active menu if mask is clicked */
|
107 |
+
mask.addEventListener( "click", function(){
|
108 |
+
removeClassName( sQuery('body'), activeNav );
|
109 |
+
activeNav = "";
|
110 |
+
document.body.removeChild(mask);
|
111 |
+
} );
|
112 |
+
/*****function for adding class********/
|
113 |
+
function addClassName(element, className)
|
114 |
+
{
|
115 |
+
if (!hasClassName(element, className))
|
116 |
+
element.className += (element.className ? ' ' : '') + className;
|
117 |
+
return element;
|
118 |
+
}
|
119 |
+
/*****function for remove class********/
|
120 |
+
function removeClassName(element, className)
|
121 |
+
{
|
122 |
+
element.className = element.className.replace(
|
123 |
+
new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
|
124 |
+
return element;
|
125 |
+
}
|
126 |
+
/*****function for checking class********/
|
127 |
+
function hasClassName(element, className)
|
128 |
+
{
|
129 |
+
var elementClassName = element.className;
|
130 |
+
return (elementClassName.length > 0 && (elementClassName == className ||
|
131 |
+
new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
|
132 |
+
}
|
133 |
+
|
134 |
+
elements=document.getElementsByClassName('arrow-wrap');
|
135 |
+
for(var index in elements)
|
136 |
+
{
|
137 |
+
if(typeof elements[index]=='object')
|
138 |
+
{
|
139 |
+
|
140 |
+
elements[index].onclick=function(){
|
141 |
+
if(hasClassName(this.childNodes[0],'arrow-up'))
|
142 |
+
{
|
143 |
+
removeClassName(this.childNodes[0],'arrow-up');
|
144 |
+
addClassName(this.childNodes[0],'arrow-down');
|
145 |
+
addClassName(this.parentNode.parentNode.getElementsByTagName('ul')[0],'active');
|
146 |
+
}
|
147 |
+
else
|
148 |
+
{
|
149 |
+
removeClassName(this.parentNode.parentNode.getElementsByTagName('ul')[0],'active');
|
150 |
+
removeClassName(this.childNodes[0],'arrow-down');
|
151 |
+
addClassName(this.childNodes[0],'arrow-up');
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
|
156 |
+
}
|
157 |
+
}
|
158 |
+
function sQuery(query)
|
159 |
+
{
|
160 |
+
return document.querySelector(query);
|
161 |
+
}
|
162 |
+
</script>
|
163 |
+
<?php } ?>
|
app/etc/modules/Gaggle_Flyermenu.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Gaggle_Flyermenu>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
<version>1.0.0</version>
|
8 |
+
</Gaggle_Flyermenu>
|
9 |
+
</modules>
|
10 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>flyer_menu</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Flyermenu</summary>
|
10 |
+
<description>Flyermenu</description>
|
11 |
+
<notes>Flyermenu</notes>
|
12 |
+
<authors><author><name>Gaggle</name><user>Any</user><email>gaggle.thread@gmail.com</email></author></authors>
|
13 |
+
<date>2015-03-20</date>
|
14 |
+
<time>18:36:18</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Gaggle"><dir name="Flyermenu"><dir name="Block"><file name="Flyermenu.php" hash="fae5114328accb1fa900acf765cfbc5e"/></dir><dir name="Helper"><file name="Data.php" hash="d6c0187663c04a9f2fd9c78d22182ae1"/></dir><dir name="Model"><file name="Options.php" hash="7468f87b46660b44989dbedc7f3d7a97"/></dir><dir name="controllers"><file name="IndexController.php" hash="60cee570a2251f12cb67bb1b762285e9"/></dir><dir name="etc"><file name="adminhtml.xml" hash="bbb92272e1972c7a3b22ba434f04e10a"/><file name="config.xml" hash="5ee7d5d77793a07de1ca66fb99ca7c94"/><file name="system.xml" hash="a9287e71ec6106afd4c4fe9db58d883d"/></dir><dir name="sql"><dir name="flyermenu_setup"><file name="mysql4-install-1.0.0.php" hash="ec6570a3301cd0099203c736962c9040"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Gaggle_Flyermenu.xml" hash="580078936bd0394519461d31f18343de"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="gaggle"><file name="flyermenu.xml" hash="a71d66443125bf6543dc26aed36ae012"/></dir></dir><dir name="template"><dir name="gaggle"><dir name="flyermenu"><file name="flyermenu.phtml" hash="eb2c833ae50e3a31f4dba416c88e0e4f"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="gaggle"><dir name="flyermenu"><dir name="css"><file name="styles.css" hash="73346c691554c3b392fa089deef2b72d"/></dir></dir></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|
skin/frontend/base/default/gaggle/flyermenu/css/styles.css
ADDED
@@ -0,0 +1,558 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**********************flyermenu**************************/
|
2 |
+
.wrapper {
|
3 |
+
position: relative;
|
4 |
+
z-index: 10;
|
5 |
+
top: 0;
|
6 |
+
left: 0;
|
7 |
+
-webkit-transition: all 0.3s;
|
8 |
+
-moz-transition: all 0.3s;
|
9 |
+
-ms-transition: all 0.3s;
|
10 |
+
-o-transition: all 0.3s;
|
11 |
+
transition: all 0.3s;
|
12 |
+
}
|
13 |
+
section {
|
14 |
+
margin-bottom: 30px
|
15 |
+
}
|
16 |
+
section h1 {
|
17 |
+
font-family: "Oswald", sans-serif;
|
18 |
+
margin-bottom: 10px;
|
19 |
+
}
|
20 |
+
section p {
|
21 |
+
margin-bottom: 30px
|
22 |
+
}
|
23 |
+
section p:last-child {
|
24 |
+
margin-bottom: 0
|
25 |
+
}
|
26 |
+
section:last-child {
|
27 |
+
margin-bottom: 0
|
28 |
+
}
|
29 |
+
section.toggle {
|
30 |
+
text-align: center
|
31 |
+
}
|
32 |
+
.mask {
|
33 |
+
position: fixed;
|
34 |
+
top: 0;
|
35 |
+
left: 0;
|
36 |
+
z-index: 15;
|
37 |
+
width: 100%;
|
38 |
+
height: 100%;
|
39 |
+
background: rgba(0, 0, 0, 0.8);
|
40 |
+
}
|
41 |
+
/* ------------------------------------------------------------ *\
|
42 |
+
|* ------------------------------------------------------------ *|
|
43 |
+
|* Toggle Buttons
|
44 |
+
|* ------------------------------------------------------------ *|
|
45 |
+
\* ------------------------------------------------------------ */
|
46 |
+
.buttons {
|
47 |
+
margin-bottom: 30px;
|
48 |
+
text-align: center;
|
49 |
+
}
|
50 |
+
.buttons button {
|
51 |
+
display: inline-block;
|
52 |
+
margin: 0 0 4px 0;
|
53 |
+
padding: 15px 30px;
|
54 |
+
color: #fff;
|
55 |
+
background-color: #67b5d1;
|
56 |
+
}
|
57 |
+
.buttons button:hover,
|
58 |
+
.buttons button.active {
|
59 |
+
background-color: #3184a1
|
60 |
+
}
|
61 |
+
.buttons button:focus {
|
62 |
+
outline: none
|
63 |
+
}
|
64 |
+
/* ------------------------------------------------------------ *\
|
65 |
+
|* ------------------------------------------------------------ *|
|
66 |
+
|* Menus
|
67 |
+
|* ------------------------------------------------------------ *|
|
68 |
+
\* ------------------------------------------------------------ */
|
69 |
+
/* general style for all menus */
|
70 |
+
nav.menu {
|
71 |
+
position: fixed;
|
72 |
+
z-index: 9999;
|
73 |
+
background-color: #FF9900;
|
74 |
+
/* overflow: hidden;*/
|
75 |
+
-webkit-transition: all 0.3s;
|
76 |
+
-moz-transition: all 0.3s;
|
77 |
+
-ms-transition: all 0.3s;
|
78 |
+
-o-transition: all 0.3s;
|
79 |
+
transition: all 0.3s;
|
80 |
+
text-align: center;
|
81 |
+
}
|
82 |
+
nav.menu ul {
|
83 |
+
list-style-type: none;
|
84 |
+
margin: 0;
|
85 |
+
padding: 0;
|
86 |
+
}
|
87 |
+
nav.menu a {
|
88 |
+
font-weight: 300;
|
89 |
+
color: #fff;
|
90 |
+
text-decoration:none!important;
|
91 |
+
text-transform:capitalize;
|
92 |
+
}
|
93 |
+
button.close-menu {
|
94 |
+
background-color: #fff;
|
95 |
+
color: #fff;
|
96 |
+
}
|
97 |
+
button.close-menu:focus {
|
98 |
+
outline: none
|
99 |
+
}
|
100 |
+
.flyermenu-toggle {
|
101 |
+
background: none;
|
102 |
+
border: medium none;
|
103 |
+
border-radius: 5px;
|
104 |
+
height: 30px;
|
105 |
+
left: 0;
|
106 |
+
margin:5px 10px;
|
107 |
+
padding: 0 2px;
|
108 |
+
position: absolute;
|
109 |
+
text-indent: -99999px;
|
110 |
+
width: 36px;
|
111 |
+
z-index: 999;
|
112 |
+
cursor:pointer;
|
113 |
+
}
|
114 |
+
.flyermenu-toggle > span {
|
115 |
+
background: #FF9900;
|
116 |
+
display: block;
|
117 |
+
height: 4px;
|
118 |
+
margin: 4px 0;
|
119 |
+
width: 100%;
|
120 |
+
}
|
121 |
+
body.pml-open {
|
122 |
+
overflow: hidden;
|
123 |
+
}
|
124 |
+
.arrow-wrap{
|
125 |
+
height: 50px;
|
126 |
+
position: absolute;
|
127 |
+
top: 0;
|
128 |
+
width: 50px;
|
129 |
+
z-index: 99999;
|
130 |
+
cursor:cell;
|
131 |
+
}
|
132 |
+
.arrow-up,.arrow-down {
|
133 |
+
border-left: 5px solid transparent;
|
134 |
+
border-right: 5px solid transparent;
|
135 |
+
height: 0;
|
136 |
+
position: absolute;
|
137 |
+
top: 20px;
|
138 |
+
width: 0;
|
139 |
+
z-index: 9999;
|
140 |
+
}
|
141 |
+
.arrow-up{
|
142 |
+
border-top: 6px solid #2f2f2f;
|
143 |
+
}
|
144 |
+
.arrow-down {
|
145 |
+
border-bottom: 6px solid #2f2f2f;
|
146 |
+
}
|
147 |
+
.close_btn_wrap{
|
148 |
+
width:100%;
|
149 |
+
text-align:center;
|
150 |
+
}
|
151 |
+
/* slide menu left and right, push menu left and right */
|
152 |
+
nav.slide-menu-left .arrow-wrap,
|
153 |
+
nav.push-menu-left .arrow-wrap{
|
154 |
+
right:0;
|
155 |
+
}
|
156 |
+
|
157 |
+
nav.slide-menu-right .arrow-wrap,
|
158 |
+
nav.push-menu-right .arrow-wrap {
|
159 |
+
right:0;
|
160 |
+
}
|
161 |
+
|
162 |
+
nav.slide-menu-left .arrow-up,
|
163 |
+
nav.push-menu-left .arrow-up,
|
164 |
+
nav.slide-menu-left .arrow-down ,
|
165 |
+
nav.push-menu-left .arrow-down {
|
166 |
+
right:15px;
|
167 |
+
}
|
168 |
+
|
169 |
+
nav.slide-menu-right .arrow-up,
|
170 |
+
nav.push-menu-right .arrow-up,
|
171 |
+
nav.slide-menu-right .arrow-down ,
|
172 |
+
nav.push-menu-right .arrow-down{
|
173 |
+
right:15px;
|
174 |
+
}
|
175 |
+
|
176 |
+
nav.slide-menu-left,
|
177 |
+
nav.slide-menu-right,
|
178 |
+
nav.push-menu-left,
|
179 |
+
nav.push-menu-right {
|
180 |
+
top: 0;
|
181 |
+
width: 300px;
|
182 |
+
height: 100%;
|
183 |
+
}
|
184 |
+
nav.slide-menu-left li,
|
185 |
+
nav.slide-menu-right li,
|
186 |
+
nav.push-menu-left li,
|
187 |
+
nav.push-menu-right li {
|
188 |
+
display: block;
|
189 |
+
text-align: center;
|
190 |
+
position:relative;
|
191 |
+
border-bottom: solid 1px #fff;
|
192 |
+
border-top: solid 1px #C67A07;
|
193 |
+
}
|
194 |
+
nav.slide-menu-left li:hover >a,
|
195 |
+
nav.slide-menu-right li:hover >a,
|
196 |
+
nav.push-menu-left li:hover >a,
|
197 |
+
nav.push-menu-right li:hover >a{
|
198 |
+
background:#333;
|
199 |
+
color:#fff;
|
200 |
+
}
|
201 |
+
nav.slide-menu-left li:hover .arrow-up,
|
202 |
+
nav.slide-menu-right li:hover .arrow-up,
|
203 |
+
nav.push-menu-left li:hover .arrow-up,
|
204 |
+
nav.push-menu-right li:hover .arrow-up{
|
205 |
+
border-top: 6px solid #fff;
|
206 |
+
}
|
207 |
+
nav.slide-menu-left li:hover .arrow-down,
|
208 |
+
nav.slide-menu-right li:hover .arrow-down,
|
209 |
+
nav.push-menu-left li:hover .arrow-down,
|
210 |
+
nav.push-menu-right li:hover .arrow-down{
|
211 |
+
border-bottom: 6px solid #fff;
|
212 |
+
}
|
213 |
+
|
214 |
+
nav.slide-menu-left li:first-child,
|
215 |
+
nav.slide-menu-right li:first-child,
|
216 |
+
nav.push-menu-left li:first-child,
|
217 |
+
nav.push-menu-right li:first-child {
|
218 |
+
/*border-top: none*/
|
219 |
+
}
|
220 |
+
nav.slide-menu-left li:last-child,
|
221 |
+
nav.slide-menu-right li:last-child,
|
222 |
+
nav.push-menu-left li:last-child,
|
223 |
+
nav.push-menu-right li:last-child {
|
224 |
+
border-bottom: none
|
225 |
+
}
|
226 |
+
nav.slide-menu-left a,
|
227 |
+
nav.slide-menu-right a,
|
228 |
+
nav.push-menu-left a,
|
229 |
+
nav.push-menu-right a {
|
230 |
+
display: block;
|
231 |
+
padding: 10px;
|
232 |
+
font-size: 18px;
|
233 |
+
}
|
234 |
+
nav.slide-menu-left .active,
|
235 |
+
nav.slide-menu-right .active,
|
236 |
+
nav.push-menu-left .active,
|
237 |
+
nav.push-menu-right .active {
|
238 |
+
background: none repeat scroll 0 0 #fff;
|
239 |
+
}
|
240 |
+
nav.slide-menu-left .active li a ,
|
241 |
+
nav.slide-menu-right .active li a ,
|
242 |
+
nav.push-menu-left .active li a ,
|
243 |
+
nav.push-menu-right .active li a {
|
244 |
+
color: #ff9900;
|
245 |
+
|
246 |
+
}
|
247 |
+
nav.slide-menu-left .active li a,
|
248 |
+
nav.push-menu-left .active li a{
|
249 |
+
text-align: left;
|
250 |
+
}
|
251 |
+
|
252 |
+
nav.slide-menu-right .active li a,
|
253 |
+
nav.push-menu-right .active li a {
|
254 |
+
text-align: center;
|
255 |
+
}
|
256 |
+
nav.slide-menu-left .active li,
|
257 |
+
nav.push-menu-left .active li{
|
258 |
+
border-left: 6px solid #333;
|
259 |
+
border-width: 1px 0 0 6px;
|
260 |
+
}
|
261 |
+
nav.slide-menu-right .active li,
|
262 |
+
nav.push-menu-right .active li {
|
263 |
+
border-left: 6px solid #333;
|
264 |
+
border-width: 1px 0px 0 6px;
|
265 |
+
}
|
266 |
+
|
267 |
+
|
268 |
+
|
269 |
+
|
270 |
+
nav.slide-menu-left button.close-menu,
|
271 |
+
nav.slide-menu-right button.close-menu,
|
272 |
+
nav.push-menu-left button.close-menu,
|
273 |
+
nav.push-menu-right button.close-menu {
|
274 |
+
background-color: #f9a527;
|
275 |
+
border: 1px solid #fff;
|
276 |
+
color: #fff;
|
277 |
+
cursor: pointer;
|
278 |
+
margin: 10px auto;
|
279 |
+
padding: 10px 30px;
|
280 |
+
}
|
281 |
+
|
282 |
+
nav.slide-menu-left,
|
283 |
+
nav.push-menu-left {
|
284 |
+
left: -300px
|
285 |
+
}
|
286 |
+
nav.slide-menu-right,
|
287 |
+
nav.push-menu-right {
|
288 |
+
right: -300px
|
289 |
+
}
|
290 |
+
body.sml-open nav.slide-menu-left,
|
291 |
+
body.pml-open nav.push-menu-left {
|
292 |
+
left: 0
|
293 |
+
}
|
294 |
+
body.smr-open nav.slide-menu-right,
|
295 |
+
body.pmr-open nav.push-menu-right {
|
296 |
+
right: 0
|
297 |
+
}
|
298 |
+
body.pml-open .wrapper {
|
299 |
+
left: 300px
|
300 |
+
}
|
301 |
+
body.pmr-open .wrapper {
|
302 |
+
left: -300px
|
303 |
+
}
|
304 |
+
/* slide menu top and bottom */
|
305 |
+
|
306 |
+
nav.slide-menu-top .close_btn_wrap,
|
307 |
+
nav.slide-menu-bottom .close_btn_wrap,
|
308 |
+
nav.push-menu-top .close_btn_wrap,
|
309 |
+
nav.push-menu-bottom .close_btn_wrap{
|
310 |
+
display:none;
|
311 |
+
}
|
312 |
+
nav.slide-menu-top .arrow-wrap,
|
313 |
+
nav.slide-menu-bottom .arrow-wrap,
|
314 |
+
nav.push-menu-top .arrow-wrap,
|
315 |
+
nav.push-menu-bottom .arrow-wrap{
|
316 |
+
right: 0;
|
317 |
+
width: 25px;
|
318 |
+
}
|
319 |
+
nav.slide-menu-top .arrow-up,
|
320 |
+
nav.slide-menu-bottom .arrow-up,
|
321 |
+
nav.push-menu-top .arrow-up,
|
322 |
+
nav.push-menu-bottom .arrow-up,
|
323 |
+
nav.slide-menu-top .arrow-down,
|
324 |
+
nav.slide-menu-bottom .arrow-down,
|
325 |
+
nav.push-menu-top .arrow-down,
|
326 |
+
nav.push-menu-bottom .arrow-down{
|
327 |
+
left: 5px;
|
328 |
+
top: 20px;
|
329 |
+
}
|
330 |
+
nav.slide-menu-top li ul,
|
331 |
+
nav.slide-menu-bottom li ul,
|
332 |
+
nav.push-menu-top li ul,
|
333 |
+
nav.push-menu-bottom li ul {
|
334 |
+
background: none repeat scroll 0 0 #fff;
|
335 |
+
|
336 |
+
display: none;
|
337 |
+
min-width: 200px;
|
338 |
+
padding: 0;
|
339 |
+
position: absolute;
|
340 |
+
top: 55px;
|
341 |
+
}
|
342 |
+
.level-1 >ul{
|
343 |
+
border-top: 5px solid #333;
|
344 |
+
}
|
345 |
+
.active .active {
|
346 |
+
left: 200px;
|
347 |
+
top: -1px;
|
348 |
+
}
|
349 |
+
|
350 |
+
nav.slide-menu-top,
|
351 |
+
nav.slide-menu-bottom,
|
352 |
+
nav.push-menu-top,
|
353 |
+
nav.push-menu-bottom {
|
354 |
+
left: 0;
|
355 |
+
width: 100%;
|
356 |
+
height: 70px;
|
357 |
+
}
|
358 |
+
nav.slide-menu-top ul,
|
359 |
+
nav.slide-menu-bottom ul,
|
360 |
+
nav.push-menu-top ul,
|
361 |
+
nav.push-menu-bottom ul {
|
362 |
+
text-align: center;
|
363 |
+
padding: 10px 0 ;
|
364 |
+
}
|
365 |
+
nav.slide-menu-top li,
|
366 |
+
nav.slide-menu-bottom li,
|
367 |
+
nav.push-menu-top li,
|
368 |
+
nav.push-menu-bottom li {
|
369 |
+
display: inline-block;
|
370 |
+
margin: 0;
|
371 |
+
padding-right: 25px;
|
372 |
+
position: relative;
|
373 |
+
vertical-align: middle;
|
374 |
+
}
|
375 |
+
nav.slide-menu-top a,
|
376 |
+
nav.slide-menu-bottom a,
|
377 |
+
nav.push-menu-top a,
|
378 |
+
nav.push-menu-bottom a {
|
379 |
+
display: block;
|
380 |
+
line-height: 50px;
|
381 |
+
padding: 0 10px;
|
382 |
+
font-size: 18px;
|
383 |
+
}
|
384 |
+
|
385 |
+
nav.slide-menu-top li ul.active,
|
386 |
+
nav.slide-menu-bottom li ul.active,
|
387 |
+
nav.push-menu-top li ul.active,
|
388 |
+
nav.push-menu-bottom li ul.active{
|
389 |
+
display: block;
|
390 |
+
}
|
391 |
+
nav.slide-menu-top li ul.active li,
|
392 |
+
nav.slide-menu-bottom li ul.active li,
|
393 |
+
nav.push-menu-top li ul.active li,
|
394 |
+
nav.push-menu-bottom li ul.active li {
|
395 |
+
border-bottom: solid 1px #fff;
|
396 |
+
border-top: solid 1px #C67A07;
|
397 |
+
display:block;
|
398 |
+
padding: 0;
|
399 |
+
}
|
400 |
+
nav.slide-menu-top li ul.active li a,
|
401 |
+
nav.slide-menu-bottom li ul.active li a,
|
402 |
+
nav.push-menu-top li ul.active li a,
|
403 |
+
nav.push-menu-bottom li ul.active li a{
|
404 |
+
color:#FF9900;
|
405 |
+
}
|
406 |
+
nav.slide-menu-top li .active li:hover >a,
|
407 |
+
nav.slide-menu-bottom li .active li:hover >a,
|
408 |
+
nav.push-menu-top li .active li:hover >a,
|
409 |
+
nav.push-menu-bottom li .active li:hover >a{
|
410 |
+
background:#333;
|
411 |
+
color:#fff;
|
412 |
+
display:block;
|
413 |
+
}
|
414 |
+
nav.slide-menu-top li .active li:hover .arrow-up,
|
415 |
+
nav.slide-menu-bottom li .active li:hover .arrow-up,
|
416 |
+
nav.push-menu-top li .active li:hover .arrow-up,
|
417 |
+
nav.push-menu-bottom li .active li:hover .arrow-up{
|
418 |
+
border-top: 6px solid #fff;
|
419 |
+
}
|
420 |
+
nav.slide-menu-top li .active li:hover .arrow-down,
|
421 |
+
nav.slide-menu-bottom li .active li:hover .arrow-down,
|
422 |
+
nav.push-menu-top li .active li:hover .arrow-down,
|
423 |
+
nav.push-menu-bottom li .active li:hover .arrow-down{
|
424 |
+
border-bottom: 6px solid #fff;
|
425 |
+
}
|
426 |
+
nav.slide-menu-top .mask,
|
427 |
+
nav.slide-menu-bottom .mask,
|
428 |
+
nav.push-menu-top .mask,
|
429 |
+
nav.push-menu-bottom .mask{
|
430 |
+
background: rgba(0, 0, 0, 0.2);
|
431 |
+
}
|
432 |
+
|
433 |
+
nav.slide-menu-top button.close-menu,
|
434 |
+
nav.slide-menu-bottom button.close-menu,
|
435 |
+
nav.push-menu-top button.close-menu,
|
436 |
+
nav.push-menu-bottom button.close-menu {
|
437 |
+
display: block;
|
438 |
+
line-height: 50px;
|
439 |
+
margin: 0;
|
440 |
+
padding: 0 10px;
|
441 |
+
}
|
442 |
+
nav.slide-menu-top,
|
443 |
+
nav.push-menu-top {
|
444 |
+
top: -100px
|
445 |
+
}
|
446 |
+
nav.slide-menu-bottom,
|
447 |
+
nav.push-menu-bottom {
|
448 |
+
bottom: -100px
|
449 |
+
}
|
450 |
+
body.smt-open nav.slide-menu-top,
|
451 |
+
body.pmt-open nav.push-menu-top {
|
452 |
+
top: 0
|
453 |
+
}
|
454 |
+
body.smb-open nav.slide-menu-bottom,
|
455 |
+
body.pmb-open nav.push-menu-bottom {
|
456 |
+
bottom: 0
|
457 |
+
}
|
458 |
+
body.pmt-open .wrapper {
|
459 |
+
top: 100px
|
460 |
+
}
|
461 |
+
body.pmb-open .wrapper {
|
462 |
+
top: -100px
|
463 |
+
}
|
464 |
+
/* ------------------------------------------------------------ *\
|
465 |
+
|* ------------------------------------------------------------ *|
|
466 |
+
|* Media Queries
|
467 |
+
|* ------------------------------------------------------------ *|
|
468 |
+
\* ------------------------------------------------------------ */
|
469 |
+
@media all and (max-width: 860px) {
|
470 |
+
.buttons br {
|
471 |
+
display: none
|
472 |
+
}
|
473 |
+
.buttons button {
|
474 |
+
padding: 10px 20px
|
475 |
+
}
|
476 |
+
}
|
477 |
+
@media all and (max-width: 660px) {
|
478 |
+
/* slide menu top and bottom */
|
479 |
+
nav.slide-menu-top ul,
|
480 |
+
nav.slide-menu-bottom ul,
|
481 |
+
nav.push-menu-top ul,
|
482 |
+
nav.push-menu-bottom ul {
|
483 |
+
padding: 35px 0 0 0
|
484 |
+
}
|
485 |
+
nav.slide-menu-top a,
|
486 |
+
nav.slide-menu-bottom a,
|
487 |
+
nav.push-menu-top a,
|
488 |
+
nav.push-menu-bottom a {
|
489 |
+
line-height: 30px;
|
490 |
+
padding: 0 2px;
|
491 |
+
font-size: 12px;
|
492 |
+
}
|
493 |
+
nav.slide-menu-top button.close-menu,
|
494 |
+
nav.slide-menu-bottom button.close-menu,
|
495 |
+
nav.push-menu-top button.close-menu,
|
496 |
+
nav.push-menu-bottom button.close-menu {
|
497 |
+
line-height: 30px;
|
498 |
+
padding: 0 2px;
|
499 |
+
}
|
500 |
+
}
|
501 |
+
@media all and (max-width: 330px) {
|
502 |
+
nav.slide-menu-left,
|
503 |
+
nav.slide-menu-right,
|
504 |
+
nav.push-menu-left,
|
505 |
+
nav.push-menu-right {
|
506 |
+
top: 0;
|
507 |
+
width: 100%;
|
508 |
+
}
|
509 |
+
nav.slide-menu-left,
|
510 |
+
nav.push-menu-left {
|
511 |
+
left: -100%
|
512 |
+
}
|
513 |
+
nav.slide-menu-right,
|
514 |
+
nav.push-menu-right {
|
515 |
+
right: -100%
|
516 |
+
}
|
517 |
+
body.sml-open nav.slide-menu-left,
|
518 |
+
body.pml-open nav.push-menu-left {
|
519 |
+
left: 0
|
520 |
+
}
|
521 |
+
body.smr-open nav.slide-menu-right,
|
522 |
+
body.pmr-open nav.push-menu-right {
|
523 |
+
right: 0
|
524 |
+
}
|
525 |
+
body.pml-open .wrapper {
|
526 |
+
left: 100%
|
527 |
+
}
|
528 |
+
body.pmr-open .wrapper {
|
529 |
+
left: -100%
|
530 |
+
}
|
531 |
+
}
|
532 |
+
|
533 |
+
.push-menu-left ul li.level-1 ul,nav.slide-menu-left ul li.level-1 ul,
|
534 |
+
nav.slide-menu-right ul li.level-1 ul,
|
535 |
+
nav.push-menu-left ul li.level-1 ul,
|
536 |
+
nav.push-menu-right ul li.level-1 ul{
|
537 |
+
display: none;
|
538 |
+
}
|
539 |
+
.push-menu-left ul.active,nav.slide-menu-left ul .active,
|
540 |
+
nav.slide-menu-right ul .active,
|
541 |
+
nav.push-menu-left ul .active,
|
542 |
+
nav.push-menu-right ul .active {
|
543 |
+
display: block !important;
|
544 |
+
}
|
545 |
+
|
546 |
+
.push-menu-left li ,nav.slide-menu-left li,
|
547 |
+
nav.slide-menu-right li,
|
548 |
+
nav.push-menu-left li,
|
549 |
+
nav.push-menu-right li{
|
550 |
+
position: relative;
|
551 |
+
}
|
552 |
+
|
553 |
+
.push-menu-left ul li.level-1 ul.active,nav.slide-menu-left,
|
554 |
+
nav.slide-menu-right ul li.level-1 ul.active,
|
555 |
+
nav.push-menu-left ul li.level-1 ul.active,
|
556 |
+
nav.push-menu-right ul li.level-1 ul.active{
|
557 |
+
/* background: none repeat scroll 0 0 #ccc;*/
|
558 |
+
}
|