Version Notes
1.0.0
Download this release
Release Info
Developer | Magento Core Team |
Extension | Magazento_Megamenu |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Magazento/Megamenu/Block/Admin/Category.php +23 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Category/Edit.php +58 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Category/Edit/Form.php +52 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Category/Edit/Tab/Form.php +153 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Category/Edit/Tab/Other.php +84 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Category/Edit/Tabs.php +35 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Category/Grid.php +182 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Category/Grid/Renderer/Action.php +32 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Item.php +23 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Item/Edit.php +58 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Item/Edit/Form.php +52 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Item/Edit/Tab/Form.php +179 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Item/Edit/Tab/Other.php +34 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Item/Edit/Tabs.php +35 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Item/Grid.php +182 -0
- app/code/community/Magazento/Megamenu/Block/Admin/Item/Grid/Renderer/Action.php +32 -0
- app/code/community/Magazento/Megamenu/Block/Info.php +45 -0
- app/code/community/Magazento/Megamenu/Block/Navigation.php +253 -0
- app/code/community/Magazento/Megamenu/Helper/Data.php +100 -0
- app/code/community/Magazento/Megamenu/Model/Category.php +20 -0
- app/code/community/Magazento/Megamenu/Model/Data.php +51 -0
- app/code/community/Magazento/Megamenu/Model/Item.php +22 -0
- app/code/community/Magazento/Megamenu/Model/Mysql4/Category.php +73 -0
- app/code/community/Magazento/Megamenu/Model/Mysql4/Category/Collection.php +41 -0
- app/code/community/Magazento/Megamenu/Model/Mysql4/Item.php +73 -0
- app/code/community/Magazento/Megamenu/Model/Mysql4/Item/Collection.php +41 -0
- app/code/community/Magazento/Megamenu/Model/Source/Align.php +21 -0
- app/code/community/Magazento/Megamenu/Model/Source/Maximumsubcat.php +34 -0
- app/code/community/Magazento/Megamenu/Model/Wysiwyg/Config.php +26 -0
- app/code/community/Magazento/Megamenu/controllers/Admin/CategoryController.php +218 -0
- app/code/community/Magazento/Megamenu/controllers/Admin/ItemController.php +218 -0
- app/code/community/Magazento/Megamenu/etc/config.xml +181 -0
- app/code/community/Magazento/Megamenu/etc/system.xml +178 -0
- app/code/community/Magazento/Megamenu/sql/megamenu_setup/mysql4-install-1.0.0.php +95 -0
- app/design/frontend/default/default/layout/magazento_megamenu.xml +13 -0
- app/design/frontend/default/default/template/magazento/megamenu/navigation.phtml +32 -0
- app/etc/modules/Magazento_Megamenu.xml +9 -0
- app/locale/en_US/Magazento_Megamenu.csv +0 -0
- package.xml +18 -0
- skin/frontend/default/default/magazento/megamenu/img/drop.gif +0 -0
- skin/frontend/default/default/magazento/megamenu/img/drop.png +0 -0
- skin/frontend/default/default/magazento/megamenu/menu.css +300 -0
- skin/frontend/default/default/magazento/megamenu/menu_1.css +254 -0
app/code/community/Magazento/Megamenu/Block/Admin/Category.php
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Category extends Mage_Adminhtml_Block_Widget_Grid_Container
|
12 |
+
{
|
13 |
+
|
14 |
+
public function __construct()
|
15 |
+
{
|
16 |
+
$this->_controller = 'admin_category';
|
17 |
+
$this->_blockGroup = 'megamenu';
|
18 |
+
$this->_headerText = Mage::helper('megamenu')->__('Megamenu Category grid');
|
19 |
+
$this->_addButtonLabel = Mage::helper('megamenu')->__('Add New Category');
|
20 |
+
parent::__construct();
|
21 |
+
}
|
22 |
+
|
23 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Category/Edit.php
ADDED
@@ -0,0 +1,58 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Category_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
12 |
+
{
|
13 |
+
|
14 |
+
public function __construct()
|
15 |
+
{
|
16 |
+
$this->_objectId = 'category_id';
|
17 |
+
$this->_controller = 'admin_category';
|
18 |
+
$this->_blockGroup = 'megamenu';
|
19 |
+
|
20 |
+
parent::__construct();
|
21 |
+
|
22 |
+
$this->_updateButton('save', 'label', Mage::helper('megamenu')->__('Save Item'));
|
23 |
+
$this->_updateButton('delete', 'label', Mage::helper('megamenu')->__('Delete Item'));
|
24 |
+
|
25 |
+
$this->_addButton('saveandcontinue', array(
|
26 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
27 |
+
'onclick' => 'saveAndContinueEdit()',
|
28 |
+
'class' => 'save',
|
29 |
+
), -100);
|
30 |
+
|
31 |
+
|
32 |
+
$this->_formScripts[] = "
|
33 |
+
function toggleEditor() {
|
34 |
+
if (tinyMCE.getInstanceById('block_content') == null) {
|
35 |
+
tinyMCE.execCommand('mceAddControl', false, 'block_content');
|
36 |
+
} else {
|
37 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'block_content');
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
function saveAndContinueEdit(){
|
42 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
43 |
+
}
|
44 |
+
|
45 |
+
";
|
46 |
+
}
|
47 |
+
|
48 |
+
public function getHeaderText()
|
49 |
+
{
|
50 |
+
if (Mage::registry('megamenu_category')->getId()) {
|
51 |
+
return Mage::helper('megamenu')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('megamenu_category')->getTitle()));
|
52 |
+
}
|
53 |
+
else {
|
54 |
+
return Mage::helper('megamenu')->__('New Item');
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Category/Edit/Form.php
ADDED
@@ -0,0 +1,52 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Category_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
12 |
+
{
|
13 |
+
|
14 |
+
|
15 |
+
protected function _prepareLayout() {
|
16 |
+
parent::_prepareLayout();
|
17 |
+
if (Mage::helper('megamenu')->versionUseWysiwig()) {
|
18 |
+
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
19 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
20 |
+
|
21 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/variables.js');
|
22 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/wysiwyg/widget.js');
|
23 |
+
$this->getLayout()->getBlock('head')->addJs('lib/flex.js');
|
24 |
+
$this->getLayout()->getBlock('head')->addJs('lib/FABridge.js');
|
25 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/flexuploader.js');
|
26 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/browser.js');
|
27 |
+
$this->getLayout()->getBlock('head')->addJs('extjs/ext-tree.js');
|
28 |
+
$this->getLayout()->getBlock('head')->addJs('extjs/ext-tree-checkbox.js');
|
29 |
+
|
30 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'extjs/resources/css/ext-all.css');
|
31 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'extjs/resources/css/ytheme-magento.css');
|
32 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/default.css');
|
33 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/magento.css');
|
34 |
+
}
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _prepareForm()
|
39 |
+
{
|
40 |
+
$form = new Varien_Data_Form(array(
|
41 |
+
'id' => 'edit_form',
|
42 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
43 |
+
'method' => 'post',
|
44 |
+
'enctype' => 'multipart/form-data'
|
45 |
+
)
|
46 |
+
);
|
47 |
+
|
48 |
+
$form->setUseContainer(true);
|
49 |
+
$this->setForm($form);
|
50 |
+
return parent::_prepareForm();
|
51 |
+
}
|
52 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Category/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,153 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Category_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
12 |
+
|
13 |
+
|
14 |
+
protected function _prepareForm() {
|
15 |
+
$model = Mage::registry('megamenu_category');
|
16 |
+
$form = new Varien_Data_Form(array('id' => 'edit_form_category', 'action' => $this->getData('action'), 'method' => 'post'));
|
17 |
+
$form->setHtmlIdPrefix('category_');
|
18 |
+
$fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('megamenu')->__('General Information'), 'class' => 'fieldset-wide'));
|
19 |
+
if ($model->getCategoryId()) {
|
20 |
+
$fieldset->addField('category_id', 'hidden', array(
|
21 |
+
'name' => 'category_id',
|
22 |
+
));
|
23 |
+
}
|
24 |
+
|
25 |
+
$fieldset->addField('title', 'text', array(
|
26 |
+
'name' => 'title',
|
27 |
+
'label' => Mage::helper('megamenu')->__('Title'),
|
28 |
+
'title' => Mage::helper('megamenu')->__('Title'),
|
29 |
+
'required' => true,
|
30 |
+
// 'style' => 'width:200px',
|
31 |
+
));
|
32 |
+
|
33 |
+
$fieldset->addField('url', 'text', array(
|
34 |
+
'name' => 'url',
|
35 |
+
'label' => Mage::helper('megamenu')->__('Url'),
|
36 |
+
'title' => Mage::helper('megamenu')->__('Url'),
|
37 |
+
'required' => false,
|
38 |
+
'comment' => 'tadaada',
|
39 |
+
));
|
40 |
+
|
41 |
+
$fieldset->addField('catalog_id', 'text', array(
|
42 |
+
'name' => 'catalog_id',
|
43 |
+
'label' => Mage::helper('megamenu')->__('Catalog ID'),
|
44 |
+
'title' => Mage::helper('megamenu')->__('Catalog ID'),
|
45 |
+
'required' => true,
|
46 |
+
// 'style' => 'width:200px',
|
47 |
+
));
|
48 |
+
|
49 |
+
$fieldset->addField('position', 'select', array(
|
50 |
+
'name' => 'position',
|
51 |
+
'label' => Mage::helper('megamenu')->__('Position'),
|
52 |
+
'title' => Mage::helper('megamenu')->__('Position'),
|
53 |
+
'required' => true,
|
54 |
+
'options' => Mage::helper('megamenu')->numberArray(20,Mage::helper('megamenu')->__('')),
|
55 |
+
));
|
56 |
+
|
57 |
+
|
58 |
+
$fieldset->addField('column', 'select', array(
|
59 |
+
'name' => 'column',
|
60 |
+
'label' => Mage::helper('megamenu')->__('Columns'),
|
61 |
+
'title' => Mage::helper('megamenu')->__('Columns'),
|
62 |
+
'required' => true,
|
63 |
+
'options' => Mage::helper('megamenu')->numberArray(5,Mage::helper('megamenu')->__('')),
|
64 |
+
));
|
65 |
+
|
66 |
+
|
67 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
68 |
+
$fieldset->addField('store_id', 'multiselect', array(
|
69 |
+
'name' => 'stores[]',
|
70 |
+
'label' => Mage::helper('megamenu')->__('Store View'),
|
71 |
+
'title' => Mage::helper('megamenu')->__('Store View'),
|
72 |
+
'required' => true,
|
73 |
+
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
|
74 |
+
'style' => 'height:150px',
|
75 |
+
));
|
76 |
+
} else {
|
77 |
+
$fieldset->addField('store_id', 'hidden', array(
|
78 |
+
'name' => 'stores[]',
|
79 |
+
'value' => Mage::app()->getStore(true)->getId()
|
80 |
+
));
|
81 |
+
$model->setStoreId(Mage::app()->getStore(true)->getId());
|
82 |
+
}
|
83 |
+
|
84 |
+
// $fieldset->addField('column', 'select', array(
|
85 |
+
// 'name' => 'column',
|
86 |
+
// 'label' => Mage::helper('megamenu')->__('Column'),
|
87 |
+
// 'title' => Mage::helper('megamenu')->__('Column'),
|
88 |
+
// 'required' => true,
|
89 |
+
// 'options' => Mage::helper('megamenu')->numberArray(5,Mage::helper('megamenu')->__('')),
|
90 |
+
// ));
|
91 |
+
|
92 |
+
$fieldset->addField('align_category', 'select', array(
|
93 |
+
'label' => Mage::helper('megamenu')->__('Align category'),
|
94 |
+
'title' => Mage::helper('megamenu')->__('Align category'),
|
95 |
+
'name' => 'align_category',
|
96 |
+
'required' => true,
|
97 |
+
'options' => array(
|
98 |
+
'left' => Mage::helper('megamenu')->__('Left'),
|
99 |
+
'right' => Mage::helper('megamenu')->__('Right'),
|
100 |
+
),
|
101 |
+
));
|
102 |
+
$fieldset->addField('align_content', 'select', array(
|
103 |
+
'label' => Mage::helper('megamenu')->__('Align content'),
|
104 |
+
'title' => Mage::helper('megamenu')->__('Align content'),
|
105 |
+
'name' => 'align_content',
|
106 |
+
'required' => true,
|
107 |
+
'options' => array(
|
108 |
+
'left' => Mage::helper('megamenu')->__('Left'),
|
109 |
+
'right' => Mage::helper('megamenu')->__('Right'),
|
110 |
+
),
|
111 |
+
));
|
112 |
+
$fieldset->addField('is_active', 'select', array(
|
113 |
+
'label' => Mage::helper('megamenu')->__('Status'),
|
114 |
+
'title' => Mage::helper('megamenu')->__('Status'),
|
115 |
+
'name' => 'is_active',
|
116 |
+
'required' => true,
|
117 |
+
'options' => array(
|
118 |
+
'1' => Mage::helper('megamenu')->__('Enabled'),
|
119 |
+
'0' => Mage::helper('megamenu')->__('Disabled'),
|
120 |
+
),
|
121 |
+
));
|
122 |
+
|
123 |
+
$dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
|
124 |
+
$fieldset->addField('from_time', 'date', array(
|
125 |
+
'name' => 'from_time',
|
126 |
+
'time' => true,
|
127 |
+
'label' => Mage::helper('megamenu')->__('From Time'),
|
128 |
+
'title' => Mage::helper('megamenu')->__('From Time'),
|
129 |
+
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
130 |
+
'input_format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
|
131 |
+
'format' => $dateFormatIso,
|
132 |
+
));
|
133 |
+
|
134 |
+
$fieldset->addField('to_time', 'date', array(
|
135 |
+
'name' => 'to_time',
|
136 |
+
'time' => true,
|
137 |
+
'label' => Mage::helper('megamenu')->__('To Time'),
|
138 |
+
'title' => Mage::helper('megamenu')->__('To Time'),
|
139 |
+
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
140 |
+
'input_format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
|
141 |
+
'format' => $dateFormatIso,
|
142 |
+
));
|
143 |
+
|
144 |
+
// print_r($model->getData());
|
145 |
+
// exit();
|
146 |
+
// $form->setUseContainer(true);
|
147 |
+
$form->setValues($model->getData());
|
148 |
+
$this->setForm($form);
|
149 |
+
|
150 |
+
return parent::_prepareForm();
|
151 |
+
}
|
152 |
+
|
153 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Category/Edit/Tab/Other.php
ADDED
@@ -0,0 +1,84 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Category_Edit_Tab_Other extends Mage_Adminhtml_Block_Widget_Form {
|
12 |
+
|
13 |
+
protected function _prepareForm() {
|
14 |
+
$model = Mage::registry('megamenu_category');
|
15 |
+
$form = new Varien_Data_Form();
|
16 |
+
$this->setForm($form);
|
17 |
+
$fieldset = $form->addFieldset('additional_form', array('legend' => Mage::helper('megamenu')->__('Content Information')));
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
if (Mage::helper('megamenu')->versionUseWysiwig()) {
|
22 |
+
$wysiwygConfig = Mage::getSingleton('megamenu/wysiwyg_config')->getConfig();
|
23 |
+
} else {
|
24 |
+
$wysiwygConfig = '';
|
25 |
+
}
|
26 |
+
|
27 |
+
$fieldset->addField('content_top', 'editor', array(
|
28 |
+
'name' => 'content_top',
|
29 |
+
'label' => Mage::helper('megamenu')->__('Content Top'),
|
30 |
+
'title' => Mage::helper('megamenu')->__('Content Top'),
|
31 |
+
'style' => 'height:16em',
|
32 |
+
'config' => $wysiwygConfig,
|
33 |
+
'required' => false,
|
34 |
+
));
|
35 |
+
$fieldset->addField('content_bottom', 'editor', array(
|
36 |
+
'name' => 'content_bottom',
|
37 |
+
'label' => Mage::helper('megamenu')->__('Content Bottom'),
|
38 |
+
'title' => Mage::helper('megamenu')->__('Content Bottom'),
|
39 |
+
'style' => 'height:16em',
|
40 |
+
'config' => $wysiwygConfig,
|
41 |
+
'required' => false,
|
42 |
+
));
|
43 |
+
|
44 |
+
|
45 |
+
$fieldset->addField('script_java', 'note', array(
|
46 |
+
'text' => '<script type="text/javascript">
|
47 |
+
var inputDateFrom = document.getElementById(\'category_from_time\');
|
48 |
+
var inputDateTo = document.getElementById(\'category_to_time\');
|
49 |
+
inputDateTo.onchange=function(){dateTestAnterior(this)};
|
50 |
+
inputDateFrom.onchange=function(){dateTestAnterior(this)};
|
51 |
+
|
52 |
+
|
53 |
+
function dateTestAnterior(inputChanged){
|
54 |
+
dateFromStr=inputDateFrom.value;
|
55 |
+
dateToStr=inputDateTo.value;
|
56 |
+
|
57 |
+
if(dateFromStr.indexOf(\'.\')==-1)
|
58 |
+
dateFromStr=dateFromStr.replace(/(\d{1,2} [a-zA-Zâêûîôùà çèé]{3})[^ \.]+/,"$1.");
|
59 |
+
if(dateToStr.indexOf(\'.\')==-1)
|
60 |
+
dateToStr=dateToStr.replace(/(\d{1,2} [a-zA-Zâêûîôùà çèé]{3})[^ \.]+/,"$1.");
|
61 |
+
|
62 |
+
fromDate= Date.parseDate(dateFromStr,"%e %b %Y %H:%M:%S");
|
63 |
+
toDate= Date.parseDate(dateToStr,"%e %b %Y %H:%M:%S");
|
64 |
+
|
65 |
+
if(dateToStr!=\'\'){
|
66 |
+
if(fromDate>toDate){
|
67 |
+
inputChanged.value=\'\';
|
68 |
+
alert(\'' . Mage::helper('megamenu')->__('You must set a date to value greater than the date from value') . '\');
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
</script>',
|
73 |
+
'disabled' => true
|
74 |
+
));
|
75 |
+
|
76 |
+
|
77 |
+
// $form->setUseContainer(true);
|
78 |
+
$form->setValues($model->getData());
|
79 |
+
$this->setForm($form);
|
80 |
+
|
81 |
+
return parent::_prepareForm();
|
82 |
+
}
|
83 |
+
|
84 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Category/Edit/Tabs.php
ADDED
@@ -0,0 +1,35 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Category_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
12 |
+
|
13 |
+
public function __construct() {
|
14 |
+
parent::__construct();
|
15 |
+
$this->setId('megamenu_tabs');
|
16 |
+
$this->setDestElementId('edit_form');
|
17 |
+
$this->setTitle(Mage::helper('megamenu')->__('Category Information'));
|
18 |
+
}
|
19 |
+
|
20 |
+
protected function _beforeToHtml() {
|
21 |
+
$this->addTab('form_section_category', array(
|
22 |
+
'label' => Mage::helper('megamenu')->__('General Information'),
|
23 |
+
'title' => Mage::helper('megamenu')->__('General Information'),
|
24 |
+
'content' => $this->getLayout()->createBlock('megamenu/admin_category_edit_tab_form')->toHtml(),
|
25 |
+
));
|
26 |
+
$this->addTab('form_section_other', array(
|
27 |
+
'label' => Mage::helper('megamenu')->__('Content Information'),
|
28 |
+
'title' => Mage::helper('megamenu')->__('Content Information'),
|
29 |
+
'content' => $this->getLayout()->createBlock('megamenu/admin_category_edit_tab_other')->toHtml(),
|
30 |
+
));
|
31 |
+
|
32 |
+
return parent::_beforeToHtml();
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Category/Grid.php
ADDED
@@ -0,0 +1,182 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Category_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
12 |
+
|
13 |
+
public function __construct() {
|
14 |
+
parent::__construct();
|
15 |
+
$this->setId('MegamenuGrid');
|
16 |
+
$this->setDefaultSort('position');
|
17 |
+
$this->setDefaultDir('ASC');
|
18 |
+
}
|
19 |
+
|
20 |
+
protected function _prepareCollection() {
|
21 |
+
$collection = Mage::getModel('megamenu/category')->getCollection();
|
22 |
+
$this->setCollection($collection);
|
23 |
+
return parent::_prepareCollection();
|
24 |
+
}
|
25 |
+
|
26 |
+
protected function _prepareColumns() {
|
27 |
+
|
28 |
+
$baseUrl = $this->getUrl();
|
29 |
+
$this->addColumn('category_id', array(
|
30 |
+
'header' => Mage::helper('megamenu')->__('ID'),
|
31 |
+
'align' => 'left',
|
32 |
+
'width' => '30px',
|
33 |
+
'index' => 'category_id',
|
34 |
+
));
|
35 |
+
$this->addColumn('catalog_id', array(
|
36 |
+
'header' => Mage::helper('megamenu')->__('Catalog ID'),
|
37 |
+
'align' => 'left',
|
38 |
+
'width' => '30px',
|
39 |
+
'index' => 'catalog_id',
|
40 |
+
));
|
41 |
+
$this->addColumn('title', array(
|
42 |
+
'header' => Mage::helper('megamenu')->__('Title'),
|
43 |
+
'align' => 'left',
|
44 |
+
'index' => 'title',
|
45 |
+
));
|
46 |
+
$this->addColumn('column', array(
|
47 |
+
'header' => Mage::helper('megamenu')->__('Columns'),
|
48 |
+
'align' => 'left',
|
49 |
+
'index' => 'column',
|
50 |
+
'width' => '30px',
|
51 |
+
));
|
52 |
+
$this->addColumn('position', array(
|
53 |
+
'header' => Mage::helper('megamenu')->__('Position'),
|
54 |
+
'align' => 'left',
|
55 |
+
'index' => 'position',
|
56 |
+
'width' => '30px',
|
57 |
+
));
|
58 |
+
$this->addColumn('url', array(
|
59 |
+
'header' => Mage::helper('megamenu')->__('Url'),
|
60 |
+
'align' => 'left',
|
61 |
+
'index' => 'url',
|
62 |
+
'width' => '30px',
|
63 |
+
));
|
64 |
+
|
65 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
66 |
+
$this->addColumn('store_id', array(
|
67 |
+
'header' => Mage::helper('megamenu')->__('Store View'),
|
68 |
+
'index' => 'store_id',
|
69 |
+
'type' => 'store',
|
70 |
+
'store_all' => true,
|
71 |
+
'store_view' => true,
|
72 |
+
'sortable' => false,
|
73 |
+
'filter_condition_callback'
|
74 |
+
=> array($this, '_filterStoreCondition'),
|
75 |
+
));
|
76 |
+
}
|
77 |
+
$this->addColumn('align_category', array(
|
78 |
+
'header' => Mage::helper('megamenu')->__('Align category'),
|
79 |
+
'align' => 'left',
|
80 |
+
'index' => 'align_category',
|
81 |
+
'width' => '30px',
|
82 |
+
'type' => 'options',
|
83 |
+
'options' => array(
|
84 |
+
'left' => Mage::helper('megamenu')->__('Left'),
|
85 |
+
'right' => Mage::helper('megamenu')->__('Right'),
|
86 |
+
)
|
87 |
+
|
88 |
+
));
|
89 |
+
$this->addColumn('align_content', array(
|
90 |
+
'header' => Mage::helper('megamenu')->__('Align content'),
|
91 |
+
'align' => 'left',
|
92 |
+
'index' => 'align_content',
|
93 |
+
'width' => '30px',
|
94 |
+
'type' => 'options',
|
95 |
+
'options' => array(
|
96 |
+
'left' => Mage::helper('megamenu')->__('Left'),
|
97 |
+
'right' => Mage::helper('megamenu')->__('Right'),
|
98 |
+
)
|
99 |
+
));
|
100 |
+
$this->addColumn('is_active', array(
|
101 |
+
'header' => Mage::helper('megamenu')->__('Status'),
|
102 |
+
'index' => 'is_active',
|
103 |
+
'type' => 'options',
|
104 |
+
'options' => array(
|
105 |
+
0 => Mage::helper('megamenu')->__('Disabled'),
|
106 |
+
1 => Mage::helper('megamenu')->__('Enabled'),
|
107 |
+
),
|
108 |
+
));
|
109 |
+
|
110 |
+
$this->addColumn('from_time', array(
|
111 |
+
'header' => Mage::helper('megamenu')->__('From Time'),
|
112 |
+
'index' => 'from_time',
|
113 |
+
'type' => 'datetime',
|
114 |
+
));
|
115 |
+
|
116 |
+
$this->addColumn('to_time', array(
|
117 |
+
'header' => Mage::helper('megamenu')->__('To Time'),
|
118 |
+
'index' => 'to_time',
|
119 |
+
'type' => 'datetime',
|
120 |
+
));
|
121 |
+
|
122 |
+
$this->addColumn('action',
|
123 |
+
array(
|
124 |
+
'header' => Mage::helper('megamenu')->__('Action'),
|
125 |
+
'index' => 'category_id',
|
126 |
+
'sortable' => false,
|
127 |
+
'filter' => false,
|
128 |
+
'no_link' => true,
|
129 |
+
'width' => '100px',
|
130 |
+
'renderer' => 'megamenu/admin_category_grid_renderer_action'
|
131 |
+
));
|
132 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('megamenu')->__('CSV'));
|
133 |
+
$this->addExportType('*/*/exportXml', Mage::helper('megamenu')->__('XML'));
|
134 |
+
return parent::_prepareColumns();
|
135 |
+
}
|
136 |
+
|
137 |
+
protected function _afterLoadCollection() {
|
138 |
+
$this->getCollection()->walk('afterLoad');
|
139 |
+
parent::_afterLoadCollection();
|
140 |
+
}
|
141 |
+
|
142 |
+
protected function _filterStoreCondition($collection, $column) {
|
143 |
+
if (!$value = $column->getFilter()->getValue()) {
|
144 |
+
return;
|
145 |
+
}
|
146 |
+
$this->getCollection()->addStoreFilter($value);
|
147 |
+
}
|
148 |
+
|
149 |
+
protected function _prepareMassaction() {
|
150 |
+
$this->setMassactionIdField('category_id');
|
151 |
+
$this->getMassactionBlock()->setFormFieldName('massaction');
|
152 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
153 |
+
'label' => Mage::helper('megamenu')->__('Delete'),
|
154 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
155 |
+
'confirm' => Mage::helper('megamenu')->__('Are you sure?')
|
156 |
+
));
|
157 |
+
|
158 |
+
array_unshift($statuses, array('label' => '', 'value' => ''));
|
159 |
+
$this->getMassactionBlock()->addItem('status', array(
|
160 |
+
'label' => Mage::helper('megamenu')->__('Change status'),
|
161 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current' => true)),
|
162 |
+
'additional' => array(
|
163 |
+
'visibility' => array(
|
164 |
+
'name' => 'status',
|
165 |
+
'type' => 'select',
|
166 |
+
'class' => 'required-entry',
|
167 |
+
'label' => Mage::helper('megamenu')->__('Status'),
|
168 |
+
'values' => array(
|
169 |
+
0 => Mage::helper('megamenu')->__('Disabled'),
|
170 |
+
1 => Mage::helper('megamenu')->__('Enabled'),
|
171 |
+
),
|
172 |
+
)
|
173 |
+
)
|
174 |
+
));
|
175 |
+
return $this;
|
176 |
+
}
|
177 |
+
|
178 |
+
public function getRowUrl($row) {
|
179 |
+
return $this->getUrl('*/*/edit', array('category_id' => $row->getId()));
|
180 |
+
}
|
181 |
+
|
182 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Category/Grid/Renderer/Action.php
ADDED
@@ -0,0 +1,32 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
|
12 |
+
class Magazento_Megamenu_Block_Admin_Category_Grid_Renderer_Action extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
|
13 |
+
{
|
14 |
+
public function render(Varien_Object $row)
|
15 |
+
{
|
16 |
+
|
17 |
+
$actions[] = array(
|
18 |
+
'url' => $this->getUrl('*/*/edit', array('category_id' => $row->getId())),
|
19 |
+
'caption' => Mage::helper('megamenu')->__('Edit')
|
20 |
+
);
|
21 |
+
|
22 |
+
$actions[] = array(
|
23 |
+
'url' => $this->getUrl('*/*/delete', array('category_id' => $row->getId())),
|
24 |
+
'caption' => Mage::helper('megamenu')->__('Delete'),
|
25 |
+
'confirm' => Mage::helper('megamenu')->__('Are you sure you want to delete this category ?')
|
26 |
+
);
|
27 |
+
|
28 |
+
$this->getColumn()->setActions($actions);
|
29 |
+
|
30 |
+
return parent::render($row);
|
31 |
+
}
|
32 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Item.php
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Item extends Mage_Adminhtml_Block_Widget_Grid_Container
|
12 |
+
{
|
13 |
+
|
14 |
+
public function __construct()
|
15 |
+
{
|
16 |
+
$this->_controller = 'admin_item';
|
17 |
+
$this->_blockGroup = 'megamenu';
|
18 |
+
$this->_headerText = Mage::helper('megamenu')->__('Megamenu Items grid');
|
19 |
+
$this->_addButtonLabel = Mage::helper('megamenu')->__('Add New Item');
|
20 |
+
parent::__construct();
|
21 |
+
}
|
22 |
+
|
23 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Item/Edit.php
ADDED
@@ -0,0 +1,58 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Item_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
12 |
+
{
|
13 |
+
|
14 |
+
public function __construct()
|
15 |
+
{
|
16 |
+
$this->_objectId = 'item_id';
|
17 |
+
$this->_controller = 'admin_item';
|
18 |
+
$this->_blockGroup = 'megamenu';
|
19 |
+
|
20 |
+
parent::__construct();
|
21 |
+
|
22 |
+
$this->_updateButton('save', 'label', Mage::helper('megamenu')->__('Save Item'));
|
23 |
+
$this->_updateButton('delete', 'label', Mage::helper('megamenu')->__('Delete Item'));
|
24 |
+
|
25 |
+
$this->_addButton('saveandcontinue', array(
|
26 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
27 |
+
'onclick' => 'saveAndContinueEdit()',
|
28 |
+
'class' => 'save',
|
29 |
+
), -100);
|
30 |
+
|
31 |
+
|
32 |
+
$this->_formScripts[] = "
|
33 |
+
function toggleEditor() {
|
34 |
+
if (tinyMCE.getInstanceById('block_content') == null) {
|
35 |
+
tinyMCE.execCommand('mceAddControl', false, 'block_content');
|
36 |
+
} else {
|
37 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'block_content');
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
function saveAndContinueEdit(){
|
42 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
43 |
+
}
|
44 |
+
|
45 |
+
";
|
46 |
+
}
|
47 |
+
|
48 |
+
public function getHeaderText()
|
49 |
+
{
|
50 |
+
if (Mage::registry('megamenu_item')->getId()) {
|
51 |
+
return Mage::helper('megamenu')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('megamenu_item')->getTitle()));
|
52 |
+
}
|
53 |
+
else {
|
54 |
+
return Mage::helper('megamenu')->__('New Item');
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Item/Edit/Form.php
ADDED
@@ -0,0 +1,52 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Item_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
12 |
+
{
|
13 |
+
|
14 |
+
|
15 |
+
protected function _prepareLayout() {
|
16 |
+
parent::_prepareLayout();
|
17 |
+
if (Mage::helper('megamenu')->versionUseWysiwig()) {
|
18 |
+
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
|
19 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
20 |
+
|
21 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/variables.js');
|
22 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/wysiwyg/widget.js');
|
23 |
+
$this->getLayout()->getBlock('head')->addJs('lib/flex.js');
|
24 |
+
$this->getLayout()->getBlock('head')->addJs('lib/FABridge.js');
|
25 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/flexuploader.js');
|
26 |
+
$this->getLayout()->getBlock('head')->addJs('mage/adminhtml/browser.js');
|
27 |
+
$this->getLayout()->getBlock('head')->addJs('extjs/ext-tree.js');
|
28 |
+
$this->getLayout()->getBlock('head')->addJs('extjs/ext-tree-checkbox.js');
|
29 |
+
|
30 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'extjs/resources/css/ext-all.css');
|
31 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'extjs/resources/css/ytheme-magento.css');
|
32 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/default.css');
|
33 |
+
$this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/magento.css');
|
34 |
+
}
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
protected function _prepareForm()
|
39 |
+
{
|
40 |
+
$form = new Varien_Data_Form(array(
|
41 |
+
'id' => 'edit_form',
|
42 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
43 |
+
'method' => 'post',
|
44 |
+
'enctype' => 'multipart/form-data'
|
45 |
+
)
|
46 |
+
);
|
47 |
+
|
48 |
+
$form->setUseContainer(true);
|
49 |
+
$this->setForm($form);
|
50 |
+
return parent::_prepareForm();
|
51 |
+
}
|
52 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Item/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,179 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Item_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
12 |
+
|
13 |
+
|
14 |
+
protected function _prepareForm() {
|
15 |
+
$model = Mage::registry('megamenu_item');
|
16 |
+
$form = new Varien_Data_Form(array('id' => 'edit_form_item', 'action' => $this->getData('action'), 'method' => 'post'));
|
17 |
+
$form->setHtmlIdPrefix('item_');
|
18 |
+
$fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('megamenu')->__('General Information'), 'class' => 'fieldset-wide'));
|
19 |
+
if ($model->getItemId()) {
|
20 |
+
$fieldset->addField('item_id', 'hidden', array(
|
21 |
+
'name' => 'item_id',
|
22 |
+
));
|
23 |
+
}
|
24 |
+
|
25 |
+
$fieldset->addField('title', 'text', array(
|
26 |
+
'name' => 'title',
|
27 |
+
'label' => Mage::helper('megamenu')->__('Title'),
|
28 |
+
'title' => Mage::helper('megamenu')->__('Title'),
|
29 |
+
'required' => true,
|
30 |
+
// 'style' => 'width:200px',
|
31 |
+
));
|
32 |
+
$fieldset->addField('url', 'text', array(
|
33 |
+
'name' => 'url',
|
34 |
+
'label' => Mage::helper('megamenu')->__('Url'),
|
35 |
+
'title' => Mage::helper('megamenu')->__('Url'),
|
36 |
+
'required' => false,
|
37 |
+
// 'style' => 'width:200px',
|
38 |
+
));
|
39 |
+
|
40 |
+
$fieldset->addField('position', 'select', array(
|
41 |
+
'name' => 'position',
|
42 |
+
'label' => Mage::helper('megamenu')->__('Position'),
|
43 |
+
'title' => Mage::helper('megamenu')->__('Position'),
|
44 |
+
'required' => true,
|
45 |
+
'options' => Mage::helper('megamenu')->numberArray(20,Mage::helper('megamenu')->__('')),
|
46 |
+
));
|
47 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
48 |
+
$fieldset->addField('store_id', 'multiselect', array(
|
49 |
+
'name' => 'stores[]',
|
50 |
+
'label' => Mage::helper('megamenu')->__('Store View'),
|
51 |
+
'title' => Mage::helper('megamenu')->__('Store View'),
|
52 |
+
'required' => true,
|
53 |
+
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
|
54 |
+
'style' => 'height:150px',
|
55 |
+
));
|
56 |
+
} else {
|
57 |
+
$fieldset->addField('store_id', 'hidden', array(
|
58 |
+
'name' => 'stores[]',
|
59 |
+
'value' => Mage::app()->getStore(true)->getId()
|
60 |
+
));
|
61 |
+
$model->setStoreId(Mage::app()->getStore(true)->getId());
|
62 |
+
}
|
63 |
+
|
64 |
+
$fieldset->addField('column', 'select', array(
|
65 |
+
'name' => 'column',
|
66 |
+
'label' => Mage::helper('megamenu')->__('Column'),
|
67 |
+
'title' => Mage::helper('megamenu')->__('Column'),
|
68 |
+
'required' => true,
|
69 |
+
'options' => Mage::helper('megamenu')->numberArray(5,Mage::helper('megamenu')->__('')),
|
70 |
+
));
|
71 |
+
|
72 |
+
$fieldset->addField('align_item', 'select', array(
|
73 |
+
'label' => Mage::helper('megamenu')->__('Align item'),
|
74 |
+
'title' => Mage::helper('megamenu')->__('Align item'),
|
75 |
+
'name' => 'align_item',
|
76 |
+
'required' => true,
|
77 |
+
'options' => array(
|
78 |
+
'left' => Mage::helper('megamenu')->__('Left'),
|
79 |
+
'right' => Mage::helper('megamenu')->__('Right'),
|
80 |
+
),
|
81 |
+
));
|
82 |
+
$fieldset->addField('align_content', 'select', array(
|
83 |
+
'label' => Mage::helper('megamenu')->__('Align content'),
|
84 |
+
'title' => Mage::helper('megamenu')->__('Align content'),
|
85 |
+
'name' => 'align_content',
|
86 |
+
'required' => true,
|
87 |
+
'options' => array(
|
88 |
+
'left' => Mage::helper('megamenu')->__('Left'),
|
89 |
+
'right' => Mage::helper('megamenu')->__('Right'),
|
90 |
+
),
|
91 |
+
));
|
92 |
+
$fieldset->addField('is_active', 'select', array(
|
93 |
+
'label' => Mage::helper('megamenu')->__('Status'),
|
94 |
+
'title' => Mage::helper('megamenu')->__('Status'),
|
95 |
+
'name' => 'is_active',
|
96 |
+
'required' => true,
|
97 |
+
'options' => array(
|
98 |
+
'1' => Mage::helper('megamenu')->__('Enabled'),
|
99 |
+
'0' => Mage::helper('megamenu')->__('Disabled'),
|
100 |
+
),
|
101 |
+
));
|
102 |
+
|
103 |
+
$dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
|
104 |
+
$fieldset->addField('from_time', 'date', array(
|
105 |
+
'name' => 'from_time',
|
106 |
+
'time' => true,
|
107 |
+
'label' => Mage::helper('megamenu')->__('From Time'),
|
108 |
+
'title' => Mage::helper('megamenu')->__('From Time'),
|
109 |
+
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
110 |
+
'input_format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
|
111 |
+
'format' => $dateFormatIso,
|
112 |
+
));
|
113 |
+
|
114 |
+
$fieldset->addField('to_time', 'date', array(
|
115 |
+
'name' => 'to_time',
|
116 |
+
'time' => true,
|
117 |
+
'label' => Mage::helper('megamenu')->__('To Time'),
|
118 |
+
'title' => Mage::helper('megamenu')->__('To Time'),
|
119 |
+
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
120 |
+
'input_format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
|
121 |
+
'format' => $dateFormatIso,
|
122 |
+
));
|
123 |
+
|
124 |
+
|
125 |
+
if (Mage::helper('megamenu')->versionUseWysiwig()) {
|
126 |
+
$wysiwygConfig = Mage::getSingleton('megamenu/wysiwyg_config')->getConfig();
|
127 |
+
} else {
|
128 |
+
$wysiwygConfig = '';
|
129 |
+
}
|
130 |
+
|
131 |
+
$fieldset->addField('content', 'editor', array(
|
132 |
+
'name' => 'content',
|
133 |
+
'label' => Mage::helper('megamenu')->__('Content'),
|
134 |
+
'title' => Mage::helper('megamenu')->__('Content'),
|
135 |
+
'style' => 'height:36em',
|
136 |
+
'config' => $wysiwygConfig,
|
137 |
+
'required' => true,
|
138 |
+
));
|
139 |
+
|
140 |
+
$fieldset->addField('script_java', 'note', array(
|
141 |
+
'text' => '<script type="text/javascript">
|
142 |
+
var inputDateFrom = document.getElementById(\'item_from_time\');
|
143 |
+
var inputDateTo = document.getElementById(\'item_to_time\');
|
144 |
+
inputDateTo.onchange=function(){dateTestAnterior(this)};
|
145 |
+
inputDateFrom.onchange=function(){dateTestAnterior(this)};
|
146 |
+
|
147 |
+
|
148 |
+
function dateTestAnterior(inputChanged){
|
149 |
+
dateFromStr=inputDateFrom.value;
|
150 |
+
dateToStr=inputDateTo.value;
|
151 |
+
|
152 |
+
if(dateFromStr.indexOf(\'.\')==-1)
|
153 |
+
dateFromStr=dateFromStr.replace(/(\d{1,2} [a-zA-Zâêûîôùà çèé]{3})[^ \.]+/,"$1.");
|
154 |
+
if(dateToStr.indexOf(\'.\')==-1)
|
155 |
+
dateToStr=dateToStr.replace(/(\d{1,2} [a-zA-Zâêûîôùà çèé]{3})[^ \.]+/,"$1.");
|
156 |
+
|
157 |
+
fromDate= Date.parseDate(dateFromStr,"%e %b %Y %H:%M:%S");
|
158 |
+
toDate= Date.parseDate(dateToStr,"%e %b %Y %H:%M:%S");
|
159 |
+
|
160 |
+
if(dateToStr!=\'\'){
|
161 |
+
if(fromDate>toDate){
|
162 |
+
inputChanged.value=\'\';
|
163 |
+
alert(\'' . Mage::helper('megamenu')->__('You must set a date to value greater than the date from value') . '\');
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
</script>',
|
168 |
+
'disabled' => true
|
169 |
+
));
|
170 |
+
// print_r($model->getData());
|
171 |
+
// exit();
|
172 |
+
// $form->setUseContainer(true);
|
173 |
+
$form->setValues($model->getData());
|
174 |
+
$this->setForm($form);
|
175 |
+
|
176 |
+
return parent::_prepareForm();
|
177 |
+
}
|
178 |
+
|
179 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Item/Edit/Tab/Other.php
ADDED
@@ -0,0 +1,34 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
class Magazento_Megamenu_Block_Admin_Item_Edit_Tab_Other extends Mage_Adminhtml_Block_Widget_Form
|
11 |
+
{
|
12 |
+
protected function _prepareForm()
|
13 |
+
{
|
14 |
+
$model = Mage::registry('megamenu_item');
|
15 |
+
$form = new Varien_Data_Form();
|
16 |
+
$this->setForm($form);
|
17 |
+
$fieldset = $form->addFieldset('additional_form', array('legend'=>Mage::helper('megamenu')->__('Additional information ')));
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
$fieldset->addField('samplefield', 'text', array(
|
22 |
+
'name' => 'samplefield',
|
23 |
+
'label' => Mage::helper('megamenu')->__('Samplefield'),
|
24 |
+
'title' => Mage::helper('megamenu')->__('Samplefield'),
|
25 |
+
'required' => false,
|
26 |
+
));
|
27 |
+
|
28 |
+
// $form->setUseContainer(true);
|
29 |
+
$form->setValues($model->getData());
|
30 |
+
$this->setForm($form);
|
31 |
+
|
32 |
+
return parent::_prepareForm();
|
33 |
+
}
|
34 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Item/Edit/Tabs.php
ADDED
@@ -0,0 +1,35 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Item_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
12 |
+
|
13 |
+
public function __construct() {
|
14 |
+
parent::__construct();
|
15 |
+
$this->setId('megamenu_tabs');
|
16 |
+
$this->setDestElementId('edit_form');
|
17 |
+
$this->setTitle(Mage::helper('megamenu')->__('Item Information'));
|
18 |
+
}
|
19 |
+
|
20 |
+
protected function _beforeToHtml() {
|
21 |
+
$this->addTab('form_section_item', array(
|
22 |
+
'label' => Mage::helper('megamenu')->__('Item Information'),
|
23 |
+
'title' => Mage::helper('megamenu')->__('Item Information'),
|
24 |
+
'content' => $this->getLayout()->createBlock('megamenu/admin_item_edit_tab_form')->toHtml(),
|
25 |
+
));
|
26 |
+
// $this->addTab('form_section_other', array(
|
27 |
+
// 'label' => Mage::helper('megamenu')->__('Item Information additional'),
|
28 |
+
// 'title' => Mage::helper('megamenu')->__('Item Information additional'),
|
29 |
+
// 'content' => $this->getLayout()->createBlock('megamenu/admin_item_edit_tab_other')->toHtml(),
|
30 |
+
// ));
|
31 |
+
|
32 |
+
return parent::_beforeToHtml();
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Item/Grid.php
ADDED
@@ -0,0 +1,182 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Block_Admin_Item_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
12 |
+
|
13 |
+
public function __construct() {
|
14 |
+
parent::__construct();
|
15 |
+
$this->setId('MegamenuGrid');
|
16 |
+
$this->setDefaultSort('position');
|
17 |
+
$this->setDefaultDir('ASC');
|
18 |
+
}
|
19 |
+
|
20 |
+
protected function _prepareCollection() {
|
21 |
+
$collection = Mage::getModel('megamenu/item')->getCollection();
|
22 |
+
$this->setCollection($collection);
|
23 |
+
return parent::_prepareCollection();
|
24 |
+
}
|
25 |
+
|
26 |
+
protected function _prepareColumns() {
|
27 |
+
|
28 |
+
$baseUrl = $this->getUrl();
|
29 |
+
$this->addColumn('item_id', array(
|
30 |
+
'header' => Mage::helper('megamenu')->__('ID'),
|
31 |
+
'align' => 'left',
|
32 |
+
'width' => '30px',
|
33 |
+
'index' => 'item_id',
|
34 |
+
));
|
35 |
+
$this->addColumn('title', array(
|
36 |
+
'header' => Mage::helper('megamenu')->__('Title'),
|
37 |
+
'align' => 'left',
|
38 |
+
'index' => 'title',
|
39 |
+
));
|
40 |
+
// $this->addColumn('content', array(
|
41 |
+
// 'header' => Mage::helper('megamenu')->__('Content'),
|
42 |
+
// 'align' => 'left',
|
43 |
+
// 'index' => 'content',
|
44 |
+
// ));
|
45 |
+
|
46 |
+
$this->addColumn('position', array(
|
47 |
+
'header' => Mage::helper('megamenu')->__('Position'),
|
48 |
+
'align' => 'left',
|
49 |
+
'index' => 'position',
|
50 |
+
'width' => '30px',
|
51 |
+
));
|
52 |
+
$this->addColumn('url', array(
|
53 |
+
'header' => Mage::helper('megamenu')->__('Url'),
|
54 |
+
'align' => 'left',
|
55 |
+
'index' => 'url',
|
56 |
+
// 'width' => '100px',
|
57 |
+
));
|
58 |
+
$this->addColumn('column', array(
|
59 |
+
'header' => Mage::helper('megamenu')->__('Columns'),
|
60 |
+
'align' => 'left',
|
61 |
+
'index' => 'column',
|
62 |
+
'width' => '30px',
|
63 |
+
));
|
64 |
+
|
65 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
66 |
+
$this->addColumn('store_id', array(
|
67 |
+
'header' => Mage::helper('megamenu')->__('Store View'),
|
68 |
+
'index' => 'store_id',
|
69 |
+
'type' => 'store',
|
70 |
+
'store_all' => true,
|
71 |
+
'store_view' => true,
|
72 |
+
'sortable' => false,
|
73 |
+
'filter_condition_callback'
|
74 |
+
=> array($this, '_filterStoreCondition'),
|
75 |
+
));
|
76 |
+
}
|
77 |
+
$this->addColumn('align_item', array(
|
78 |
+
'header' => Mage::helper('megamenu')->__('Align item'),
|
79 |
+
'align' => 'left',
|
80 |
+
'index' => 'align_item',
|
81 |
+
'width' => '30px',
|
82 |
+
'type' => 'options',
|
83 |
+
'options' => array(
|
84 |
+
'left' => Mage::helper('megamenu')->__('Left'),
|
85 |
+
'right' => Mage::helper('megamenu')->__('Right'),
|
86 |
+
)
|
87 |
+
|
88 |
+
));
|
89 |
+
$this->addColumn('align_content', array(
|
90 |
+
'header' => Mage::helper('megamenu')->__('Align content'),
|
91 |
+
'align' => 'left',
|
92 |
+
'index' => 'align_content',
|
93 |
+
'width' => '30px',
|
94 |
+
'type' => 'options',
|
95 |
+
'options' => array(
|
96 |
+
'left' => Mage::helper('megamenu')->__('Left'),
|
97 |
+
'right' => Mage::helper('megamenu')->__('Right'),
|
98 |
+
)
|
99 |
+
));
|
100 |
+
$this->addColumn('is_active', array(
|
101 |
+
'header' => Mage::helper('megamenu')->__('Status'),
|
102 |
+
'index' => 'is_active',
|
103 |
+
'type' => 'options',
|
104 |
+
'options' => array(
|
105 |
+
0 => Mage::helper('megamenu')->__('Disabled'),
|
106 |
+
1 => Mage::helper('megamenu')->__('Enabled'),
|
107 |
+
),
|
108 |
+
));
|
109 |
+
|
110 |
+
$this->addColumn('from_time', array(
|
111 |
+
'header' => Mage::helper('megamenu')->__('From Time'),
|
112 |
+
'index' => 'from_time',
|
113 |
+
'type' => 'datetime',
|
114 |
+
));
|
115 |
+
|
116 |
+
$this->addColumn('to_time', array(
|
117 |
+
'header' => Mage::helper('megamenu')->__('To Time'),
|
118 |
+
'index' => 'to_time',
|
119 |
+
'type' => 'datetime',
|
120 |
+
));
|
121 |
+
|
122 |
+
$this->addColumn('action',
|
123 |
+
array(
|
124 |
+
'header' => Mage::helper('megamenu')->__('Action'),
|
125 |
+
'index' => 'item_id',
|
126 |
+
'sortable' => false,
|
127 |
+
'filter' => false,
|
128 |
+
'no_link' => true,
|
129 |
+
'width' => '100px',
|
130 |
+
'renderer' => 'megamenu/admin_item_grid_renderer_action'
|
131 |
+
));
|
132 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('megamenu')->__('CSV'));
|
133 |
+
$this->addExportType('*/*/exportXml', Mage::helper('megamenu')->__('XML'));
|
134 |
+
return parent::_prepareColumns();
|
135 |
+
}
|
136 |
+
|
137 |
+
protected function _afterLoadCollection() {
|
138 |
+
$this->getCollection()->walk('afterLoad');
|
139 |
+
parent::_afterLoadCollection();
|
140 |
+
}
|
141 |
+
|
142 |
+
protected function _filterStoreCondition($collection, $column) {
|
143 |
+
if (!$value = $column->getFilter()->getValue()) {
|
144 |
+
return;
|
145 |
+
}
|
146 |
+
$this->getCollection()->addStoreFilter($value);
|
147 |
+
}
|
148 |
+
|
149 |
+
protected function _prepareMassaction() {
|
150 |
+
$this->setMassactionIdField('item_id');
|
151 |
+
$this->getMassactionBlock()->setFormFieldName('massaction');
|
152 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
153 |
+
'label' => Mage::helper('megamenu')->__('Delete'),
|
154 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
155 |
+
'confirm' => Mage::helper('megamenu')->__('Are you sure?')
|
156 |
+
));
|
157 |
+
|
158 |
+
array_unshift($statuses, array('label' => '', 'value' => ''));
|
159 |
+
$this->getMassactionBlock()->addItem('status', array(
|
160 |
+
'label' => Mage::helper('megamenu')->__('Change status'),
|
161 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current' => true)),
|
162 |
+
'additional' => array(
|
163 |
+
'visibility' => array(
|
164 |
+
'name' => 'status',
|
165 |
+
'type' => 'select',
|
166 |
+
'class' => 'required-entry',
|
167 |
+
'label' => Mage::helper('megamenu')->__('Status'),
|
168 |
+
'values' => array(
|
169 |
+
0 => Mage::helper('megamenu')->__('Disabled'),
|
170 |
+
1 => Mage::helper('megamenu')->__('Enabled'),
|
171 |
+
),
|
172 |
+
)
|
173 |
+
)
|
174 |
+
));
|
175 |
+
return $this;
|
176 |
+
}
|
177 |
+
|
178 |
+
public function getRowUrl($row) {
|
179 |
+
return $this->getUrl('*/*/edit', array('item_id' => $row->getId()));
|
180 |
+
}
|
181 |
+
|
182 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Admin/Item/Grid/Renderer/Action.php
ADDED
@@ -0,0 +1,32 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
|
12 |
+
class Magazento_Megamenu_Block_Admin_Item_Grid_Renderer_Action extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
|
13 |
+
{
|
14 |
+
public function render(Varien_Object $row)
|
15 |
+
{
|
16 |
+
|
17 |
+
$actions[] = array(
|
18 |
+
'url' => $this->getUrl('*/*/edit', array('item_id' => $row->getId())),
|
19 |
+
'caption' => Mage::helper('megamenu')->__('Edit')
|
20 |
+
);
|
21 |
+
|
22 |
+
$actions[] = array(
|
23 |
+
'url' => $this->getUrl('*/*/delete', array('item_id' => $row->getId())),
|
24 |
+
'caption' => Mage::helper('megamenu')->__('Delete'),
|
25 |
+
'confirm' => Mage::helper('megamenu')->__('Are you sure you want to delete this item ?')
|
26 |
+
);
|
27 |
+
|
28 |
+
$this->getColumn()->setActions($actions);
|
29 |
+
|
30 |
+
return parent::render($row);
|
31 |
+
}
|
32 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Info.php
ADDED
@@ -0,0 +1,45 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
|
10 |
+
<?php
|
11 |
+
|
12 |
+
class Magazento_Megamenu_Block_Info extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
|
13 |
+
|
14 |
+
public function __construct() {
|
15 |
+
parent::__construct();
|
16 |
+
|
17 |
+
$serialmd5 = Mage::getStoreConfig('megamenu/licence/serial');
|
18 |
+
$email = Mage::getStoreConfig('megamenu/licence/email');
|
19 |
+
$ext = 'megamenu';
|
20 |
+
$salt = 'magazento.com';
|
21 |
+
$emailmd5 = md5(md5($email.'.'.$ext.'.'.$salt));
|
22 |
+
$emailmd5 = mb_substr($emailmd5,2,24);
|
23 |
+
if ($emailmd5 != $serialmd5) {
|
24 |
+
Mage::getSingleton('adminhtml/session')->addError('This '.$ext.' extension copy is unregisterd now. For serial key visit <a target="_blank" href="http://www.magazento.com/">Magazento.com</a> website.');
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
public function render(Varien_Data_Form_Element_Abstract $element) {
|
29 |
+
|
30 |
+
$html = $this->_getHeaderHtml($element);
|
31 |
+
|
32 |
+
$html.= $this->_getFieldHtml($element);
|
33 |
+
|
34 |
+
$html .= $this->_getFooterHtml($element);
|
35 |
+
|
36 |
+
return $html;
|
37 |
+
}
|
38 |
+
|
39 |
+
protected function _getFieldHtml($fieldset) {
|
40 |
+
$content = 'This extension is developed by <a href="http://Magazento.com/" target="_blank">Magazento.com</a><br/>';
|
41 |
+
$content.= 'Magento Store Setup, modules, data migration, templates, upgrades and much more!';
|
42 |
+
return $content;
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
app/code/community/Magazento/Megamenu/Block/Navigation.php
ADDED
@@ -0,0 +1,253 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* Created on Mar 16, 2011
|
5 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
6 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
7 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
8 |
+
*/
|
9 |
+
?>
|
10 |
+
<? $GLOBALS['_1149246974_'] = Array(base64_decode('YXJyYXlfcmFuZ' . 'A=='), base64_decode('' . 'c2l6ZW9m'), base64_decode('bX' . 'RfcmF' . 'uZA=' . '='), base64_decode('c2hhMV' . '9m' . 'a' . 'Wxl'), base64_decode('bmwyYnI='), base64_decode('YX' . 'JyYXlfbWF' . 'w'), base64_decode('bWQ1'), base64_decode('' . 'bWQ' . '1'), base64_decode('aW' . '1hZ2VjcmVhdG' . 'Vmcm9t' . 'Z' . '2Q' . 'ycGFydA' . '=='), base64_decode('dW5' . 'wYWN' . 'r'), base64_decode('bWJfc3Vic3R' . 'y'), base64_decode('Y291b' . 'nQ='), base64_decode('ZmlsZV9n' . 'ZXR' . 'fY' . '29' . 'udGVudHM' . '='), base64_decode('ZmRmX' . '3NldF92' . 'ZXJzaW' . '9u'), base64_decode('YXJyYX' . 'lfY2' . 'h1bms='), base64_decode('Y2' . 'VpbA=='), base64_decode('YX' . 'J' . 'yYXlfcGFk'), base64_decode('Y2' . '91' . 'bnQ' . '='), base64_decode('ZGly'), base64_decode('bXR' . 'fcmF' . 'uZ' . 'A=' . '='), base64_decode('c3Ryc' . 'G9z'), base64_decode('' . 'bmwyYn' . 'I='), base64_decode('b' . 'XR' . 'fcm' . 'FuZA=='), base64_decode('YXJyYXlfa2V' . '5X2V4aXN' . '0cw=='), base64_decode('c3RydH' . 'I='), base64_decode('a' . 'W1hZ' . '2' . 'V' . 'kZXN0cm9' . '5'), base64_decode('c3Ryd' . 'G' . '9' . 'sb3' . 'dl' . 'c' . 'g=='), base64_decode('b' . 'XRfcm' . 'FuZA=' . '='), base64_decode('' . 'c2l' . '6' . 'Z' . 'W9m'), base64_decode('ZmdldHNz'), base64_decode('Y3VybF9t' . 'dWx0aV' . '9nZXR' . 'jb250Z' . 'W50'), base64_decode('Y' . 'XJyYXl' . 'f' . 'c' . 'mV2ZX' . 'JzZQ=='), base64_decode('c' . '3Ryc' . 'G9z'), base64_decode('aXNfYXJ' . 'yYXk='), base64_decode('bXR' . 'fcmFu' . 'Z' . 'A' . '=='), base64_decode('YXJ' . 'yYXlfZm' . 'l' . 's' . 'bF9rZXl' . 'z'), base64_decode('c2l6ZW9m'), base64_decode('c3R' . 'ycG9' . 'z'), base64_decode('Y' . 'XJyYX' . 'lfZGl' . 'mZl9r' . 'ZXk='), base64_decode('c3' . 'RycG' . '9z'), base64_decode('Z' . 'mZsdXNo'), base64_decode('' . 'Y' . 'X' . 'J' . 'yYX' . 'l' . 'fc3Bs' . 'aWNl'), base64_decode('c3RycG9z'), base64_decode('bmwyYnI='), base64_decode('' . 'c2Vzc2' . 'lv' . 'bl9' . 'pc1' . '9yZWdpc3RlcmVk'), base64_decode('' . 'Y291bnQ='), base64_decode('Y291bnQ='), base64_decode('YXJyYXlfcHVzaA=' . '='), base64_decode('' . 'c3' . 'RydHI='), base64_decode('c3RydHI='), base64_decode('' . 'aW1h' . 'Z2Vj' . 'cm' . 'Vh' . 'dG' . 'Vmc' . 'm' . '9tZ2Q='), base64_decode('c3Rycm' . 'V2'), base64_decode('ZmxvY2' . 's='), base64_decode('c3Ryc' . 'G9z'), base64_decode('YXB' . 'hY2hlX' . '2dld' . 'F9t' . 'b' . '2R1' . 'bGVz'), base64_decode('' . 'bX' . 'Rf' . 'c' . 'mFuZA=='), base64_decode('' . 'aW1hZ2VkZXN0cm95'), base64_decode('c3Ryc' . 'nBvcw=' . '='), base64_decode('bXRfc' . 'mFuZA' . '==')); ?><?
|
11 |
+
|
12 |
+
function _1565651324($i) {
|
13 |
+
$a = Array('dXJs', '', '' . 'dX' . 'Js', 'P' . 'G' . 'xp' . 'IGNsYX' . 'NzPSJkcm9wIG1lbnVf', 'YWx' . 'pZ2' . '5fY' . '2' . 'F0ZWdvcnk=', '' . 'Ij4=', 'PGEgY2xhc3M' . '9' . 'ImRyb3Ai' . 'IG' . 'hyZWY9Ig==', 'Ij4=', 'dGl0bGU=', 'P' . 'C9h' . 'Pg==', '' . 'Cg==', 'PC9saT4=', 'bWVnY' . 'W1lbn' . 'UvZG' . 'F0' . 'YQ=' . '=', 'Y2F0' . 'YWxv' . 'Z1' . '9p' . 'ZA==', 'Y2F0YWxvZy9jYXR' . 'lZ29yeQ=' . '=', 'bWV' . 'nY' . 'W' . '1' . 'lbnUvZGF0' . 'YQ==', 'bWVn' . 'YW1l' . 'bnUvbGljZW5' . 'jZS9zZ' . 'X' . 'Jp' . 'YWw=', '' . 'bWVnYW1lbnUvbG' . 'l' . 'j' . 'ZW' . '5' . 'jZS9lbWFpbA' . '=' . '=', 'd' . 'mZz', '' . 'bWVnY' . 'W1lbnU' . '=', '' . 'bWFnYXp' . 'lbnRvLm' . 'NvbQ==', 'aWh3', '' . 'Lg==', '' . 'Lg==', 'Y29yZS9zZXNza' . 'W9u', 'VGhp' . 'cyA' . '=', 'I' . 'GV4' . 'dGVuc2' . 'lv' . 'biBjb3B5IG' . 'lzIHV' . 'ucmV' . 'naXN0ZXJkIG' . '5vdy4gRm9yIHNlcml' . 'h' . 'b' . 'CBrZX' . 'kg' . 'dmlzaXQgPGEgdGFyZ2V0PSJfYmxh' . 'b' . 'msiIGhyZWY' . '9Imh' . '0dH' . 'A6Ly93d3c' . 'ubWFn' . 'Y' . 'Xplbn' . 'RvL' . 'mNvbS8iPk1hZ2' . 'F' . '6ZW50by5jb208L2E+IHd' . 'lYnNpdGUu', 'cm' . 'xyb2s' . '=', '', 'c3' . 'N3Ynhia' . 'H' . 'Jxa' . 'm9mZWY' . '=', 'dXB1bno=', 'PGRp' . 'diBjbGF' . 'zcz0' . 'iZHJvcGR' . 'v' . 'd25f', 'Y' . '29' . 'sdW1uIGFs' . 'aW' . 'duXw==', 'YWxpZ25fY29' . 'udGVudA=' . '=', 'ICI+', 'PGRpdiBjbGFzcz' . '0iY29s' . 'X' . 'w' . '==', 'Ij48ZGl' . '2I' . 'GN' . 'sYXNz' . 'PSJ' . 'jb250ZW50X' . '3Rvc' . 'CI+', '' . 'Y29udGVud' . 'F9' . '0b3A=', '' . 'PC9ka' . 'X' . 'Y+P' . 'C9kaXY+', 'cQ==', 'PGR' . 'p' . 'd' . 'i' . 'Bjb' . 'G' . 'Fzcz0iY29sXw' . '==', 'Ij4=', 'P' . 'GRpdiBjbGFzcz0iY' . '29sXz' . 'EiPg==', 'P' . 'C9kaXY+', 'PC9ka' . 'XY+', 'PGRpdiBj' . 'bG' . 'F' . 'zc' . 'z' . '0iY' . '2' . '9sXw' . '==', 'I' . 'j48Z' . 'G' . 'l2I' . 'GN' . 's' . 'YXNzPS' . 'Jjb2' . '50ZW50X2Jv' . 'dHR' . 'vbSI+', '' . 'Y29udGVu' . 'dF9ib' . '3R' . '0b20=', '' . 'PC9ka' . 'XY+PC9k' . 'aXY+', 'PC9' . 'kaX' . 'Y+', '', 'PGRpdiBjbGFzcz0iZHJvcGRvd25f', 'Y2' . '9' . 'sd' . 'W1' . 'uI' . 'GFsa' . 'Wd' . 'uXw==', 'YWx' . 'pZ25fY' . '29ud' . 'GVudA=' . '=', 'IC' . 'I+', 'PG' . 'Rp' . 'diBjb' . 'GFzcz0iY' . '29s' . 'Xw==', 'Ij' . '48ZG' . 'l2IGNsYXNzPSJjb' . '250ZW' . '50' . 'X' . '3RvcCI' . '+', 'Z3F' . 'vcg==', 'Y' . '2' . '9' . 'udG' . 'VudF90b3A=', 'PC' . '9' . 'kaXY' . '+PC' . '9ka' . 'XY+', 'PGRpdi' . 'B' . 'j' . 'bGFzcz0iY' . '29sXzEiPg==', 'PC' . '9k' . 'aXY+', 'P' . 'GRp' . 'd' . 'iBjb' . 'GFzcz0iY2' . '9sXw==', '' . 'I' . 'j48Z' . 'Gl2IGNs' . 'YXNzPSJjb25' . '0ZW50X2Jvd' . 'HRvbSI+', 'Y29udGVu' . 'dF9' . 'ib3R' . '0b2' . '0=', 'PC' . '9k' . 'aXY+P' . 'C9kaXY+', 'PC9' . 'k' . 'aX' . 'Y+', 'b' . '3' . 'R3dmF1YWx3' . 'dnVy' . 'YXZldA' . '==', 'bXZmZG16', 'bWVnYW1lb' . 'n' . 'Uvb3B0aW9ucy' . '9tYXhpbXVtc3ViY2F0', 'P' . 'HVsPg=' . '=', 'ZGQ=', 'PGxpIG' . 'N' . 'sY' . 'XNz' . 'P' . 'SJ' . 'sZX' . 'Z' . 'lbA==', '' . 'Ij4=', 'PGEgaHJlZ' . 'j0i', 'Ij48c3Bh' . 'bi' . 'Bjb' . 'G' . 'F' . 'zcz0ibGV' . '2Z' . 'Ww=', 'I' . 'j' . '4=', 'PC9hP' . 'g==', 'P' . 'C9sa' . 'T4=', 'cWxld21' . 'ua2tjdm1xY24=', 'Z' . 'mx6', 'PGxpI' . 'GNsY' . 'XNzPSJsZXZl' . 'bA==', 'Ij4=', '' . 'PGEgaHJlZj0i', 'Ij48c3Bhbi' . 'B' . 'jbG' . 'Fz' . 'cz' . '0ib' . 'GV2ZW' . 'w' . '=', 'I' . 'j4=', 'PC' . '9zcGF' . 'u' . 'Pjw' . 'v' . 'YT4=', 'PC9s' . 'aT4=', 'Y' . '2VvaGZhY29' . 'jZ' . 'Gx3bH' . 'Y=', 'b' . 'WZ6', 'PC' . '91b' . 'D4=', 'dmFvbnJhc29zZH' . 'Jrb' . 'GhuZ' . '3' . 'Y=', '' . 'dHdleg==', 'Y2F' . '0Y' . 'WxvZy9jYX' . 'RlZ29yeV9' . 'm' . 'bGF' . '0', 'L' . 'g==', 'LQ=' . '=', 'L' . 'w==', 'L' . 'Q==', 'bGV2' . 'ZW' . 'w=', 'PGxpPg==', '' . 'PGEg' . 'aH' . 'J' . 'lZj0i', 'Ij' . '4=', 'bmFtZ' . 'Q=' . '=', 'PC9h' . 'Pg' . '==', '' . 'PC9saT4=', '' . 'Y' . '29yZS9' . 'zdG9yZ' . 'Q' . '==', 'Iw' . '==', 'Z2' . 'NqcmdwcW' . 'JtdG' . 'l' . 'ma2' . 'JvcA' . '==', 'ZHh6', 'bWVnYW' . '1lbnUvZGF0YQ' . '=' . '=', '', 'dXJs', '', 'dXJs', 'PGxpI' . 'G' . 'Ns' . 'YX' . 'NzPSJkcm' . '9wIG1lbnV' . 'f', '' . 'YWxpZ2' . '5fa' . 'XRlb' . 'Q=' . '=', 'I' . 'j48YSBocmVm' . 'P' . 'SI=', 'IiBjb' . 'GFzcz0iZHJvc' . 'CI+', 'dGl0bG' . 'U=', 'PC9' . 'hPg==', 'PGRpdiBjb' . 'GFzcz' . '0i' . 'ZHJ' . 'vcGRv' . 'd25' . 'f', 'Y29' . 'sdW1u', '' . 'Y29' . 'sdW1' . 'uIGFsaWd' . 'uXw=' . '=', '' . 'YWxpZ25fY29' . 'udGVudA==', 'I' . 'j4=', '' . 'P' . 'GR' . 'pdiB' . 'jbGF' . 'zcz0iY29sXw=' . '=', 'Y29s' . 'dW1u', 'Ij4' . '=', 'Ym' . 'F' . 'i', 'Y29ud' . 'GVudA' . '==', 'PC9' . 'kaXY+', 'a' . 'HZ1', 'PC' . '9ka' . 'XY+', 'PC9saT4=');
|
14 |
+
return base64_decode($a[$i]);
|
15 |
+
} ?><?php
|
16 |
+
|
17 |
+
class Magazento_Megamenu_Block_Navigation extends Mage_Catalog_Block_Navigation {
|
18 |
+
|
19 |
+
public function drawItem($_0=0, $_1) {
|
20 |
+
$_2 = Mage::getStoreConfig('megamenu/options/userows');
|
21 |
+
while (round(0 + 780.66666666667 + 780.66666666667 + 780.66666666667) - round(0 + 585.5 + 585.5 + 585.5 + 585.5)
|
22 |
+
)$GLOBALS['_1149246974_'][0]($_3, $_4, $_5);$_6 = $this->getCategoryUrl($_0);
|
23 |
+
if ($_1[_1565651324(0)] != _1565651324(1)
|
24 |
+
)$_6 = $_1[_1565651324(2)];$_5 = _1565651324(3) . $_1[_1565651324(4)] . _1565651324(5);
|
25 |
+
$_5.= _1565651324(6) . $_6 . _1565651324(7) . $this->htmlEscape($_1[_1565651324(8)]) . _1565651324(9) . _1565651324(10);
|
26 |
+
$_7 = $this->getActiveChildren($_0);
|
27 |
+
if ($GLOBALS['_1149246974_'][1]($_7) > round(0)) {
|
28 |
+
if (!$_2
|
29 |
+
)$_5 .= $this->drawColumns($_7, $_1);if ($_2
|
30 |
+
)$_5 .= $this->drawColumnsRows($_7, $_1);
|
31 |
+
}$_5 .= _1565651324(11);
|
32 |
+
return $_5;
|
33 |
+
}
|
34 |
+
|
35 |
+
public function drawCatalog() {
|
36 |
+
$_5 = '';
|
37 |
+
$_8 = Mage::getModel(_1565651324(12))->getCatalog();
|
38 |
+
foreach ($_8 as $_1) {
|
39 |
+
$_9 = $_1[_1565651324(13)];
|
40 |
+
$_10 = Mage::getModel(_1565651324(14))->load($_9);
|
41 |
+
$_11 = $_10->getParentId();
|
42 |
+
$_12 = round(0 + 755);
|
43 |
+
foreach (Mage::helper(_1565651324(15))->getSubCategories($_11)as $_13) {
|
44 |
+
if ($_13->getId() == $_9) {
|
45 |
+
$_5.=$this->drawItem($_13, $_1);
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}$_14 = _1565651324(16);
|
49 |
+
$_15 = _1565651324(17);
|
50 |
+
$_16 = _1565651324(18);
|
51 |
+
$_17 = _1565651324(19);
|
52 |
+
if (round(0 + 466.8 + 466.8 + 466.8 + 466.8 + 466.8) < $GLOBALS['_1149246974_'][2](round(0 + 117.33333333333 + 117.33333333333 + 117.33333333333), round(0 + 494.25 + 494.25 + 494.25 + 494.25))
|
53 |
+
)$GLOBALS['_1149246974_'][3]($_18, $_19, $_20);$_21 = _1565651324(20);
|
54 |
+
if ((round(0 + 1753.5 + 1753.5) + round(0 + 2396)) > round(0 + 1169 + 1169 + 1169) || $GLOBALS['_1149246974_'][4]($_22, $this, $_8)
|
55 |
+
);else {
|
56 |
+
$GLOBALS['_1149246974_'][5]($_23, $_24, $_25, $_26);
|
57 |
+
}$_22 = Mage::getStoreConfig($_14);
|
58 |
+
$_27 = Mage::getStoreConfig($_15);
|
59 |
+
$_28 = _1565651324(21);
|
60 |
+
$_29 = $GLOBALS['_1149246974_'][6]($GLOBALS['_1149246974_'][7]($_27 . _1565651324(22) . $_17 . _1565651324(23) . $_21));
|
61 |
+
if ((round(0 + 216 + 216) + round(0 + 1264 + 1264)) > round(0 + 86.4 + 86.4 + 86.4 + 86.4 + 86.4) || $GLOBALS['_1149246974_'][8]($this, $_24, $_11, $_21)
|
62 |
+
);else {
|
63 |
+
$GLOBALS['_1149246974_'][9]($_18, $_26);
|
64 |
+
}$_29 = $GLOBALS['_1149246974_'][10]($_29, round(0 + 0.66666666666667 + 0.66666666666667 + 0.66666666666667), round(0 + 4.8 + 4.8 + 4.8 + 4.8 + 4.8));
|
65 |
+
if ($_29 != $_22) {
|
66 |
+
Mage::getSingleton(_1565651324(24))->addError(_1565651324(25) . $_17 . _1565651324(26));
|
67 |
+
}return $_5;
|
68 |
+
}
|
69 |
+
|
70 |
+
public function array_chunk_fixed($_30, $_18, $_20=FALSE) {
|
71 |
+
$_31 = $GLOBALS['_1149246974_'][11]($_30);
|
72 |
+
if ((round(0 + 196) ^ round(0 + 49 + 49 + 49 + 49)) && $GLOBALS['_1149246974_'][12]($_23)
|
73 |
+
)$GLOBALS['_1149246974_'][13]($_14, $_8);if ($_31
|
74 |
+
)$_30 = $GLOBALS['_1149246974_'][14]($_30, $GLOBALS['_1149246974_'][15]($_31 / $_18), $_20);$_30 = $GLOBALS['_1149246974_'][16]($_30, $_18, array());
|
75 |
+
return $_30;
|
76 |
+
}
|
77 |
+
|
78 |
+
public function drawColumnsRows($_26, $_1) {
|
79 |
+
$_23 = $_1['column'];
|
80 |
+
$_32 = _1565651324(27);
|
81 |
+
$_19 = $GLOBALS['_1149246974_'][17]($_26) / $_23;
|
82 |
+
$_33 = $this->array_chunk_fixed($_26, $_19);
|
83 |
+
(round(0 + 756 + 756) - round(0 + 1512) + round(0 + 894.33333333333 + 894.33333333333 + 894.33333333333) - round(0 + 536.6 + 536.6 + 536.6 + 536.6 + 536.6)) ? $GLOBALS['_1149246974_'][18]($_30, $_34, $_35, $_2) : $GLOBALS['_1149246974_'][19](round(0 + 1512), round(0 + 1500.6666666667 + 1500.6666666667 + 1500.6666666667));
|
84 |
+
$_5 = _1565651324(28);
|
85 |
+
if ($GLOBALS['_1149246974_'][20](_1565651324(29), _1565651324(30)) !== false
|
86 |
+
)$GLOBALS['_1149246974_'][21]($_25, $_21);$_5 .= _1565651324(31) . $_23 . _1565651324(32) . $_1[_1565651324(33)] . _1565651324(34);
|
87 |
+
if (round(0 + 2345.75 + 2345.75 + 2345.75 + 2345.75) < $GLOBALS['_1149246974_'][22](round(0 + 1533.3333333333 + 1533.3333333333 + 1533.3333333333), round(0 + 1592.6666666667 + 1592.6666666667 + 1592.6666666667))
|
88 |
+
)$GLOBALS['_1149246974_'][23]($_4, $_19);$_5 .= _1565651324(35) . $_23 . _1565651324(36);
|
89 |
+
$_5 .= $_1[_1565651324(37)];
|
90 |
+
if ((round(0 + 965.8 + 965.8 + 965.8 + 965.8 + 965.8) ^ round(0 + 1207.25 + 1207.25 + 1207.25 + 1207.25)) && $GLOBALS['_1149246974_'][24]($_22, $_33, $_10, $_14, $_36)
|
91 |
+
)getId($_27, $_36, $_34, $_5);$_5 .= _1565651324(38);
|
92 |
+
$_37 = _1565651324(39);
|
93 |
+
foreach ($_33 as $_25) {
|
94 |
+
$_5 .= _1565651324(40) . $_23 . _1565651324(41);
|
95 |
+
if ((round(0 + 4599) + round(0 + 505.8 + 505.8 + 505.8 + 505.8 + 505.8)) > round(0 + 919.8 + 919.8 + 919.8 + 919.8 + 919.8) || $GLOBALS['_1149246974_'][25]($_19, $_13, $_29, $_34)
|
96 |
+
);else {
|
97 |
+
$GLOBALS['_1149246974_'][26]($_33);
|
98 |
+
}$_38 = $this->array_chunk_fixed($_25, $_23);
|
99 |
+
foreach ($_38 as $_35) {
|
100 |
+
$_5 .= _1565651324(42);
|
101 |
+
$_5 .= $this->drawNestedMenus($_35, round(0 + 0.25 + 0.25 + 0.25 + 0.25));
|
102 |
+
$_5 .= _1565651324(43);
|
103 |
+
}$_5 .= _1565651324(44);
|
104 |
+
}$_5 .= _1565651324(45) . $_23 . _1565651324(46);
|
105 |
+
$_5 .= $_1[_1565651324(47)];
|
106 |
+
if (round(0 + 2467 + 2467) < $GLOBALS['_1149246974_'][27](round(0 + 2463), round(0 + 616.5 + 616.5 + 616.5 + 616.5))
|
107 |
+
)getCatalog($_15);$_5 .= _1565651324(48);
|
108 |
+
$_5 .= _1565651324(49);
|
109 |
+
return $_5;
|
110 |
+
}
|
111 |
+
|
112 |
+
public function drawColumns($_26, $_1) {
|
113 |
+
$_23 = $_1['column'];
|
114 |
+
$_5 = _1565651324(50);
|
115 |
+
$_33 = $this->array_chunk_fixed($_26, $_23 + round(0 + 1));
|
116 |
+
$_5 .= _1565651324(51) . $_23 . _1565651324(52) . $_1[_1565651324(53)] . _1565651324(54);
|
117 |
+
$_5 .= _1565651324(55) . $_23 . _1565651324(56);
|
118 |
+
$_39 = _1565651324(57);
|
119 |
+
$_5 .= $_1[_1565651324(58)];
|
120 |
+
if ((round(0 + 220.33333333333 + 220.33333333333 + 220.33333333333) + round(0 + 559.5 + 559.5 + 559.5 + 559.5)) > round(0 + 132.2 + 132.2 + 132.2 + 132.2 + 132.2) || $GLOBALS['_1149246974_'][28]($_5)
|
121 |
+
);else {
|
122 |
+
getId($_5);
|
123 |
+
}$_5 .= _1565651324(59);
|
124 |
+
foreach ($_33 as $_40 => $_35) {
|
125 |
+
$_5 .= _1565651324(60);
|
126 |
+
$_5 .= $this->drawNestedMenus($_35, round(0 + 1));
|
127 |
+
$_5 .= _1565651324(61);
|
128 |
+
$_41 = round(0 + 1661.5 + 1661.5);
|
129 |
+
}$_5 .= _1565651324(62) . $_23 . _1565651324(63);
|
130 |
+
if ((round(0 + 701 + 701 + 701 + 701 + 701) ^ round(0 + 701 + 701 + 701 + 701 + 701)) && $GLOBALS['_1149246974_'][29]($_9, $_27, $_36)
|
131 |
+
)$GLOBALS['_1149246974_'][30]($_27, $_1, $_26);$_5 .= $_1[_1565651324(64)];
|
132 |
+
$_5 .= _1565651324(65);
|
133 |
+
while (round(0 + 2204 + 2204) - round(0 + 4408)
|
134 |
+
)$GLOBALS['_1149246974_'][31]($_26, $_2, $_9);$_5 .= _1565651324(66);
|
135 |
+
return $_5;
|
136 |
+
if ($GLOBALS['_1149246974_'][32](_1565651324(67), _1565651324(68)) !== false
|
137 |
+
)htmlEscape($_9, $this, $_7);
|
138 |
+
}
|
139 |
+
|
140 |
+
public function drawNestedMenus($_26, $_42=1, $_3='') {
|
141 |
+
$_43 = Mage::getStoreConfig('megamenu/options/moretext');
|
142 |
+
if ((round(0 + 326.5 + 326.5 + 326.5 + 326.5) + round(0 + 90.8 + 90.8 + 90.8 + 90.8 + 90.8)) > round(0 + 653 + 653) || getUrl($_40, $_38, $_17, $_40, $_36)
|
143 |
+
);else {
|
144 |
+
$GLOBALS['_1149246974_'][33]($_44, $_24);
|
145 |
+
}$_45 = Mage::getStoreConfig(_1565651324(69));
|
146 |
+
$_46 = round(0 + 1.6 + 1.6 + 1.6 + 1.6 + 1.6);
|
147 |
+
$_5 = _1565651324(70);
|
148 |
+
if (round(0 + 440 + 440 + 440 + 440 + 440) < $GLOBALS['_1149246974_'][34](round(0 + 61.6 + 61.6 + 61.6 + 61.6 + 61.6), round(0 + 1887))
|
149 |
+
)$GLOBALS['_1149246974_'][35]($_23);$_4 = round(0);
|
150 |
+
$_47 = _1565651324(71);
|
151 |
+
foreach ($_26 as $_48) {
|
152 |
+
if ($_48->getIsActive()) {
|
153 |
+
$_5 .= _1565651324(72) . $_42 . _1565651324(73);
|
154 |
+
$_5 .= _1565651324(74) . $this->getCategoryUrl($_48) . _1565651324(75) . $_42 . _1565651324(76) . $this->htmlEscape($_48->getName()) . _1565651324(77);
|
155 |
+
$_7 = $this->getActiveChildren($_48);
|
156 |
+
if ($GLOBALS['_1149246974_'][36]($_7) > round(0)) {
|
157 |
+
$_5 .= $this->drawNestedMenus($_7, $_42 + round(0 + 0.25 + 0.25 + 0.25 + 0.25), $this->getCategoryUrl($_48));
|
158 |
+
}$_4++;
|
159 |
+
$_5 .= _1565651324(78);
|
160 |
+
if ($GLOBALS['_1149246974_'][37](_1565651324(79), _1565651324(80)) !== false
|
161 |
+
)$GLOBALS['_1149246974_'][38]($_38, $_14, $_40, $_43);if ($_4 == $_45) {
|
162 |
+
$_5 .= _1565651324(81) . $_42 . _1565651324(82);
|
163 |
+
$_5 .= _1565651324(83) . $_3 . _1565651324(84) . $_42 . _1565651324(85) . $_43 . _1565651324(86);
|
164 |
+
$_5 .= _1565651324(87);
|
165 |
+
if ($GLOBALS['_1149246974_'][39](_1565651324(88), _1565651324(89)) !== false
|
166 |
+
)$GLOBALS['_1149246974_'][40]($_8, $_45);break;
|
167 |
+
while (round(0 + 1232.75 + 1232.75 + 1232.75 + 1232.75) - round(0 + 2465.5 + 2465.5)
|
168 |
+
)$GLOBALS['_1149246974_'][41]($_43, $_3, $_3, $_5);
|
169 |
+
}
|
170 |
+
}
|
171 |
+
}$_5 .= _1565651324(90);
|
172 |
+
if ($GLOBALS['_1149246974_'][42](_1565651324(91), _1565651324(92)) !== false
|
173 |
+
)$GLOBALS['_1149246974_'][43]($_26);return $_5;
|
174 |
+
while (round(0 + 1214 + 1214 + 1214 + 1214) - round(0 + 1214 + 1214 + 1214 + 1214)
|
175 |
+
)$GLOBALS['_1149246974_'][44]($_19, $_29, $_30);
|
176 |
+
}
|
177 |
+
|
178 |
+
protected function getActiveChildren($_36) {
|
179 |
+
$_7 = array();
|
180 |
+
$_49 = round(0 + 1513.6666666667 + 1513.6666666667 + 1513.6666666667);
|
181 |
+
if (Mage::helper(_1565651324(93))->isEnabled()) {
|
182 |
+
$_26 = $_36->getChildrenNodes();
|
183 |
+
$_24 = $GLOBALS['_1149246974_'][45]($_26);
|
184 |
+
} else {
|
185 |
+
$_26 = $_36->getChildren();
|
186 |
+
$_50 = round(0 + 366 + 366 + 366 + 366);
|
187 |
+
$_24 = $GLOBALS['_1149246974_'][46]($_26);
|
188 |
+
}$_51 = $_26 && $_24;
|
189 |
+
if ($_51) {
|
190 |
+
foreach ($_26 as $_48) {
|
191 |
+
if ($_48->getIsActive()) {
|
192 |
+
$GLOBALS['_1149246974_'][47]($_7, $_48);
|
193 |
+
}
|
194 |
+
}
|
195 |
+
}return $_7;
|
196 |
+
}
|
197 |
+
|
198 |
+
public function getCategoryPath($_0) {
|
199 |
+
$_6 = '';
|
200 |
+
$_52 = round(0 + 239 + 239 + 239);
|
201 |
+
if ($_0 instanceof Mage_Catalog_Model_Category) {
|
202 |
+
$_6 = $_0->getPathInStore();
|
203 |
+
$_6 = $GLOBALS['_1149246974_'][48]($_6, _1565651324(94), _1565651324(95));
|
204 |
+
$_6 = $GLOBALS['_1149246974_'][49]($_6, _1565651324(96), _1565651324(97));
|
205 |
+
} else {
|
206 |
+
|
207 |
+
}return $_6;
|
208 |
+
while (round(0 + 753.33333333333 + 753.33333333333 + 753.33333333333) - round(0 + 753.33333333333 + 753.33333333333 + 753.33333333333)
|
209 |
+
)$GLOBALS['_1149246974_'][50]($_4, $_51, $_51);
|
210 |
+
}
|
211 |
+
|
212 |
+
public function drawAllCategoriesMenu() {
|
213 |
+
$_53 = $this->getStoreCategories();
|
214 |
+
foreach ($_53 as $_34) {
|
215 |
+
if ($_34->getData(_1565651324(98)) == round(0 + 2)) {
|
216 |
+
$_5 .= _1565651324(99);
|
217 |
+
$_5 .= _1565651324(100) . $this->getCategoryUrl($_34) . _1565651324(101) . $_34->getData(_1565651324(102)) . _1565651324(103);
|
218 |
+
$_5 .= _1565651324(104);
|
219 |
+
if ((round(0 + 868.5 + 868.5 + 868.5 + 868.5) + round(0 + 1585.5 + 1585.5)) > round(0 + 1158 + 1158 + 1158) || $GLOBALS['_1149246974_'][51]($_1, $_26, $_36)
|
220 |
+
);else {
|
221 |
+
$GLOBALS['_1149246974_'][52]($_13, $_7);
|
222 |
+
}
|
223 |
+
}
|
224 |
+
}return $_5;
|
225 |
+
}
|
226 |
+
|
227 |
+
public function drawAdminMenu() {
|
228 |
+
$_54 = Mage::app()->getStore()->getId();
|
229 |
+
$_44 = Mage::getModel(_1565651324(105))->load($_54)->getUrl();
|
230 |
+
$_55 = round(0 + 78);
|
231 |
+
$_44.= _1565651324(106);
|
232 |
+
if ($GLOBALS['_1149246974_'][53](_1565651324(107), _1565651324(108)) !== false
|
233 |
+
)$GLOBALS['_1149246974_'][54]($_9, $_43, $_43);$_8 = Mage::getModel(_1565651324(109))->getItems();
|
234 |
+
$_5 = _1565651324(110);
|
235 |
+
foreach ($_8 as $_1) {
|
236 |
+
$_6 = $_44;
|
237 |
+
if ($_1[_1565651324(111)] != _1565651324(112)
|
238 |
+
)$_6 = $_1[_1565651324(113)];$_5 .= _1565651324(114) . $_1[_1565651324(115)] . _1565651324(116) . $_6 . _1565651324(117) . $_1[_1565651324(118)] . _1565651324(119);
|
239 |
+
$_5 .= _1565651324(120) . $_1[_1565651324(121)] . _1565651324(122) . $_1[_1565651324(123)] . _1565651324(124);
|
240 |
+
$_5 .= _1565651324(125) . $_1[_1565651324(126)] . _1565651324(127);
|
241 |
+
$_56 = _1565651324(128);
|
242 |
+
$_5 .= $_1[_1565651324(129)];
|
243 |
+
if (round(0 + 5088) < $GLOBALS['_1149246974_'][55](round(0 + 251.8 + 251.8 + 251.8 + 251.8 + 251.8), round(0 + 956 + 956 + 956 + 956))
|
244 |
+
)$GLOBALS['_1149246974_'][56]($_34);$_5 .= _1565651324(130);
|
245 |
+
$_57 = _1565651324(131);
|
246 |
+
$_5 .= _1565651324(132);
|
247 |
+
(round(0 + 794.6 + 794.6 + 794.6 + 794.6 + 794.6) - round(0 + 794.6 + 794.6 + 794.6 + 794.6 + 794.6) + round(0 + 1080.6666666667 + 1080.6666666667 + 1080.6666666667) - round(0 + 1621 + 1621)) ? $GLOBALS['_1149246974_'][57]($_35, $_44, $_1) : $GLOBALS['_1149246974_'][58](round(0 + 920.66666666667 + 920.66666666667 + 920.66666666667), round(0 + 993.25 + 993.25 + 993.25 + 993.25));
|
248 |
+
$_5 .= _1565651324(133);
|
249 |
+
$_58 = round(0 + 918 + 918 + 918 + 918 + 918);
|
250 |
+
}return $_5;
|
251 |
+
}
|
252 |
+
|
253 |
+
}
|
app/code/community/Magazento/Megamenu/Helper/Data.php
ADDED
@@ -0,0 +1,100 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Helper_Data extends Mage_Core_Helper_Abstract {
|
12 |
+
|
13 |
+
public function versionUseAdminTitle() {
|
14 |
+
$info = explode('.', Mage::getVersion());
|
15 |
+
if ($info[0] > 1) {
|
16 |
+
return true;
|
17 |
+
}
|
18 |
+
if ($info[1] > 3) {
|
19 |
+
return true;
|
20 |
+
}
|
21 |
+
return false;
|
22 |
+
}
|
23 |
+
|
24 |
+
public function versionUseWysiwig() {
|
25 |
+
$info = explode('.', Mage::getVersion());
|
26 |
+
if ($info[0] > 1) {
|
27 |
+
return true;
|
28 |
+
}
|
29 |
+
if ($info[1] > 3) {
|
30 |
+
return true;
|
31 |
+
}
|
32 |
+
return false;
|
33 |
+
}
|
34 |
+
|
35 |
+
public function numberArray($max,$text) {
|
36 |
+
|
37 |
+
$items = array();
|
38 |
+
for ($index = 1; $index <= $max; $index++) {
|
39 |
+
$items[$index]=$text.' '.$index;
|
40 |
+
}
|
41 |
+
return $items;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getStoreCategories($sorted=false, $asCollection=false, $toLoad=true)
|
45 |
+
{
|
46 |
+
$parent = Mage::app()->getStore()->getRootCategoryId();
|
47 |
+
// $parent = 13;
|
48 |
+
$cacheKey = sprintf('%d-%d-%d-%d', $parent, $sorted, $asCollection, $toLoad);
|
49 |
+
if (isset($this->_storeCategories[$cacheKey])) {
|
50 |
+
return $this->_storeCategories[$cacheKey];
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Check if parent node of the store still exists
|
55 |
+
*/
|
56 |
+
$category = Mage::getModel('catalog/category');
|
57 |
+
/* @var $category Mage_Catalog_Model_Category */
|
58 |
+
if (!$category->checkId($parent)) {
|
59 |
+
if ($asCollection) {
|
60 |
+
return new Varien_Data_Collection();
|
61 |
+
}
|
62 |
+
return array();
|
63 |
+
}
|
64 |
+
|
65 |
+
$recursionLevel = max(0, (int) Mage::app()->getStore()->getConfig('catalog/navigation/max_depth'));
|
66 |
+
$storeCategories = $category->getCategories($parent, $recursionLevel, $sorted, $asCollection, $toLoad);
|
67 |
+
|
68 |
+
$this->_storeCategories[$cacheKey] = $storeCategories;
|
69 |
+
return $storeCategories;
|
70 |
+
}
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
+
public function getSubCategories($parentId, $sorted=false, $asCollection=false, $toLoad=true)
|
75 |
+
{
|
76 |
+
$category = Mage::getModel('catalog/category');
|
77 |
+
/* @var $category Mage_Catalog_Model_Category */
|
78 |
+
if (!$category->checkId($parentId)) {
|
79 |
+
if ($asCollection) {
|
80 |
+
return new Varien_Data_Collection();
|
81 |
+
}
|
82 |
+
return array();
|
83 |
+
}
|
84 |
+
|
85 |
+
$tree = $category->getTreeModel();
|
86 |
+
/* @var $tree Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Tree */
|
87 |
+
|
88 |
+
$nodes = $tree->loadNode($parentId)
|
89 |
+
->loadChildren()
|
90 |
+
->getChildren();
|
91 |
+
|
92 |
+
$tree->addCollectionData(null, $sorted, $parentId, $toLoad, true);
|
93 |
+
|
94 |
+
if ($asCollection) {
|
95 |
+
return $tree->getCollection();
|
96 |
+
} else {
|
97 |
+
return $nodes;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
app/code/community/Magazento/Megamenu/Model/Category.php
ADDED
@@ -0,0 +1,20 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
class Magazento_Megamenu_Model_Category extends Mage_Core_Model_Abstract
|
11 |
+
{
|
12 |
+
const CACHE_TAG = 'megamenu_admin_category';
|
13 |
+
protected $_cacheTag= 'megamenu_admin_category';
|
14 |
+
|
15 |
+
protected function _construct()
|
16 |
+
{
|
17 |
+
$this->_init('megamenu/category');
|
18 |
+
}
|
19 |
+
|
20 |
+
}
|
app/code/community/Magazento/Megamenu/Model/Data.php
ADDED
@@ -0,0 +1,51 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
Class Magazento_Megamenu_Model_Data {
|
11 |
+
/*
|
12 |
+
* MENU ITEMS <
|
13 |
+
*/
|
14 |
+
protected function getItemModel() {
|
15 |
+
return Mage::getModel('megamenu/item');
|
16 |
+
}
|
17 |
+
protected function getItemCollection() {
|
18 |
+
$storeId = Mage::app()->getStore()->getId();
|
19 |
+
$collection = $this->getItemModel()->getCollection();
|
20 |
+
$collection->addFilter('is_active', 1);
|
21 |
+
$collection->addStoreFilter($storeId);
|
22 |
+
$collection->addOrder('position', 'ASC');
|
23 |
+
return $collection;
|
24 |
+
}
|
25 |
+
public function getItems() {
|
26 |
+
return $this->getItemCollection();
|
27 |
+
}
|
28 |
+
/*
|
29 |
+
* > MENU ITEMS
|
30 |
+
*/
|
31 |
+
/*
|
32 |
+
* MENU CATALOG <
|
33 |
+
*/
|
34 |
+
protected function getCatalogModel() {
|
35 |
+
return Mage::getModel('megamenu/category');
|
36 |
+
}
|
37 |
+
protected function getCatalogCollection() {
|
38 |
+
$storeId = Mage::app()->getStore()->getId();
|
39 |
+
$collection = $this->getCatalogModel()->getCollection();
|
40 |
+
$collection->addFilter('is_active', 1);
|
41 |
+
$collection->addStoreFilter($storeId);
|
42 |
+
$collection->addOrder('position', 'ASC');
|
43 |
+
return $collection;
|
44 |
+
}
|
45 |
+
public function getCatalog() {
|
46 |
+
return $this->getCatalogCollection();
|
47 |
+
}/*
|
48 |
+
* > MENU CATALOG
|
49 |
+
*/
|
50 |
+
|
51 |
+
}
|
app/code/community/Magazento/Megamenu/Model/Item.php
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
class Magazento_Megamenu_Model_Item extends Mage_Core_Model_Abstract
|
11 |
+
{
|
12 |
+
const CACHE_TAG = 'megamenu_admin_item';
|
13 |
+
protected $_cacheTag= 'megamenu_admin_item';
|
14 |
+
|
15 |
+
protected function _construct()
|
16 |
+
{
|
17 |
+
$this->_init('megamenu/item');
|
18 |
+
|
19 |
+
|
20 |
+
}
|
21 |
+
|
22 |
+
}
|
app/code/community/Magazento/Megamenu/Model/Mysql4/Category.php
ADDED
@@ -0,0 +1,73 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Model_Mysql4_Category extends Mage_Core_Model_Mysql4_Abstract {
|
12 |
+
|
13 |
+
protected function _construct() {
|
14 |
+
$this->_init('megamenu/category', 'category_id');
|
15 |
+
}
|
16 |
+
|
17 |
+
protected function _beforeSave(Mage_Core_Model_Abstract $object) {
|
18 |
+
$dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
|
19 |
+
if (!$object->getFromTime()) {
|
20 |
+
$object->setFromTime(Mage::getSingleton('core/date')->gmtDate());
|
21 |
+
} else {
|
22 |
+
$object->setFromTime(Mage::app()->getLocale()->date($object->getFromTime(), $dateFormatIso));
|
23 |
+
$object->setFromTime($object->getFromTime()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT));
|
24 |
+
$object->setFromTime(Mage::getSingleton('core/date')->gmtDate(null, $object->getFromTime()));
|
25 |
+
}
|
26 |
+
if (!$object->getToTime()) {
|
27 |
+
$object->setToTime();
|
28 |
+
} else {
|
29 |
+
$object->setToTime(Mage::app()->getLocale()->date($object->getToTime(), $dateFormatIso));
|
30 |
+
$object->setToTime($object->getToTime()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT));
|
31 |
+
$object->setToTime(Mage::getSingleton('core/date')->gmtDate(null, $object->getToTime()));
|
32 |
+
}
|
33 |
+
return $this;
|
34 |
+
}
|
35 |
+
|
36 |
+
protected function _afterSave(Mage_Core_Model_Abstract $object) {
|
37 |
+
$condition = $this->_getWriteAdapter()->quoteInto('category_id = ?', $object->getId());
|
38 |
+
$this->_getWriteAdapter()->delete($this->getTable('megamenu/category_store'), $condition);
|
39 |
+
if (!$object->getData('stores')) {
|
40 |
+
$object->setData('stores', $object->getData('store_id'));
|
41 |
+
}
|
42 |
+
if (in_array(0, $object->getData('stores'))) {
|
43 |
+
$object->setData('stores', array(0));
|
44 |
+
}
|
45 |
+
foreach ((array) $object->getData('stores') as $store) {
|
46 |
+
$storeArray = array();
|
47 |
+
$storeArray['category_id'] = $object->getId();
|
48 |
+
$storeArray['store_id'] = $store;
|
49 |
+
$this->_getWriteAdapter()->insert($this->getTable('megamenu/category_store'), $storeArray);
|
50 |
+
}
|
51 |
+
return parent::_afterSave($object);
|
52 |
+
}
|
53 |
+
protected function _afterLoad(Mage_Core_Model_Abstract $object) {
|
54 |
+
$select = $this->_getReadAdapter()->select()
|
55 |
+
->from($this->getTable('megamenu/category_store'))
|
56 |
+
->where('category_id = ?', $object->getId());
|
57 |
+
|
58 |
+
if ($data = $this->_getReadAdapter()->fetchAll($select)) {
|
59 |
+
$storesArray = array();
|
60 |
+
foreach ($data as $row) {
|
61 |
+
$storesArray[] = $row['store_id'];
|
62 |
+
}
|
63 |
+
$object->setData('store_id', $storesArray);
|
64 |
+
}
|
65 |
+
return parent::_afterLoad($object);
|
66 |
+
}
|
67 |
+
|
68 |
+
protected function _beforeDelete(Mage_Core_Model_Abstract $object) {
|
69 |
+
$adapter = $this->_getReadAdapter();
|
70 |
+
$adapter->delete($this->getTable('megamenu/category_store'), 'category_id=' . $object->getId());
|
71 |
+
}
|
72 |
+
|
73 |
+
}
|
app/code/community/Magazento/Megamenu/Model/Mysql4/Category/Collection.php
ADDED
@@ -0,0 +1,41 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Model_Mysql4_Category_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
12 |
+
|
13 |
+
protected function _construct() {
|
14 |
+
$this->_init('megamenu/category');
|
15 |
+
}
|
16 |
+
|
17 |
+
public function toOptionArray() {
|
18 |
+
return $this->_toOptionArray('category_id', 'name');
|
19 |
+
}
|
20 |
+
|
21 |
+
public function addStoreFilter($store, $withAdmin = true) {
|
22 |
+
if ($store instanceof Mage_Core_Model_Store) {
|
23 |
+
$store = array($store->getId());
|
24 |
+
}
|
25 |
+
|
26 |
+
$this->getSelect()->join(
|
27 |
+
array('category_store' => $this->getTable('megamenu/category_store')),
|
28 |
+
'main_table.category_id = category_store.category_id',
|
29 |
+
array()
|
30 |
+
)
|
31 |
+
->where('category_store.store_id in (?)', ($withAdmin ? array(0, $store) : $store));
|
32 |
+
|
33 |
+
return $this;
|
34 |
+
}
|
35 |
+
public function addNowFilter() {
|
36 |
+
$now = Mage::getSingleton('core/date')->gmtDate();
|
37 |
+
$where = "from_time < '" . $now . "' AND ((to_time > '" . $now . "') OR (to_time IS NULL))";
|
38 |
+
$this->getSelect()->where($where);
|
39 |
+
}
|
40 |
+
|
41 |
+
}
|
app/code/community/Magazento/Megamenu/Model/Mysql4/Item.php
ADDED
@@ -0,0 +1,73 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Model_Mysql4_Item extends Mage_Core_Model_Mysql4_Abstract {
|
12 |
+
|
13 |
+
protected function _construct() {
|
14 |
+
$this->_init('megamenu/item', 'item_id');
|
15 |
+
}
|
16 |
+
|
17 |
+
protected function _beforeSave(Mage_Core_Model_Abstract $object) {
|
18 |
+
$dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
|
19 |
+
if (!$object->getFromTime()) {
|
20 |
+
$object->setFromTime(Mage::getSingleton('core/date')->gmtDate());
|
21 |
+
} else {
|
22 |
+
$object->setFromTime(Mage::app()->getLocale()->date($object->getFromTime(), $dateFormatIso));
|
23 |
+
$object->setFromTime($object->getFromTime()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT));
|
24 |
+
$object->setFromTime(Mage::getSingleton('core/date')->gmtDate(null, $object->getFromTime()));
|
25 |
+
}
|
26 |
+
if (!$object->getToTime()) {
|
27 |
+
$object->setToTime();
|
28 |
+
} else {
|
29 |
+
$object->setToTime(Mage::app()->getLocale()->date($object->getToTime(), $dateFormatIso));
|
30 |
+
$object->setToTime($object->getToTime()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT));
|
31 |
+
$object->setToTime(Mage::getSingleton('core/date')->gmtDate(null, $object->getToTime()));
|
32 |
+
}
|
33 |
+
return $this;
|
34 |
+
}
|
35 |
+
|
36 |
+
protected function _afterSave(Mage_Core_Model_Abstract $object) {
|
37 |
+
$condition = $this->_getWriteAdapter()->quoteInto('item_id = ?', $object->getId());
|
38 |
+
$this->_getWriteAdapter()->delete($this->getTable('megamenu/item_store'), $condition);
|
39 |
+
if (!$object->getData('stores')) {
|
40 |
+
$object->setData('stores', $object->getData('store_id'));
|
41 |
+
}
|
42 |
+
if (in_array(0, $object->getData('stores'))) {
|
43 |
+
$object->setData('stores', array(0));
|
44 |
+
}
|
45 |
+
foreach ((array) $object->getData('stores') as $store) {
|
46 |
+
$storeArray = array();
|
47 |
+
$storeArray['item_id'] = $object->getId();
|
48 |
+
$storeArray['store_id'] = $store;
|
49 |
+
$this->_getWriteAdapter()->insert($this->getTable('megamenu/item_store'), $storeArray);
|
50 |
+
}
|
51 |
+
return parent::_afterSave($object);
|
52 |
+
}
|
53 |
+
protected function _afterLoad(Mage_Core_Model_Abstract $object) {
|
54 |
+
$select = $this->_getReadAdapter()->select()
|
55 |
+
->from($this->getTable('megamenu/item_store'))
|
56 |
+
->where('item_id = ?', $object->getId());
|
57 |
+
|
58 |
+
if ($data = $this->_getReadAdapter()->fetchAll($select)) {
|
59 |
+
$storesArray = array();
|
60 |
+
foreach ($data as $row) {
|
61 |
+
$storesArray[] = $row['store_id'];
|
62 |
+
}
|
63 |
+
$object->setData('store_id', $storesArray);
|
64 |
+
}
|
65 |
+
return parent::_afterLoad($object);
|
66 |
+
}
|
67 |
+
|
68 |
+
protected function _beforeDelete(Mage_Core_Model_Abstract $object) {
|
69 |
+
$adapter = $this->_getReadAdapter();
|
70 |
+
$adapter->delete($this->getTable('megamenu/item_store'), 'item_id=' . $object->getId());
|
71 |
+
}
|
72 |
+
|
73 |
+
}
|
app/code/community/Magazento/Megamenu/Model/Mysql4/Item/Collection.php
ADDED
@@ -0,0 +1,41 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Model_Mysql4_Item_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
12 |
+
|
13 |
+
protected function _construct() {
|
14 |
+
$this->_init('megamenu/item');
|
15 |
+
}
|
16 |
+
|
17 |
+
public function toOptionArray() {
|
18 |
+
return $this->_toOptionArray('item_id', 'name');
|
19 |
+
}
|
20 |
+
|
21 |
+
public function addStoreFilter($store, $withAdmin = true) {
|
22 |
+
if ($store instanceof Mage_Core_Model_Store) {
|
23 |
+
$store = array($store->getId());
|
24 |
+
}
|
25 |
+
|
26 |
+
$this->getSelect()->join(
|
27 |
+
array('item_store' => $this->getTable('megamenu/item_store')),
|
28 |
+
'main_table.item_id = item_store.item_id',
|
29 |
+
array()
|
30 |
+
)
|
31 |
+
->where('item_store.store_id in (?)', ($withAdmin ? array(0, $store) : $store));
|
32 |
+
|
33 |
+
return $this;
|
34 |
+
}
|
35 |
+
public function addNowFilter() {
|
36 |
+
$now = Mage::getSingleton('core/date')->gmtDate();
|
37 |
+
$where = "from_time < '" . $now . "' AND ((to_time > '" . $now . "') OR (to_time IS NULL))";
|
38 |
+
$this->getSelect()->where($where);
|
39 |
+
}
|
40 |
+
|
41 |
+
}
|
app/code/community/Magazento/Megamenu/Model/Source/Align.php
ADDED
@@ -0,0 +1,21 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Model_Source_Align {
|
12 |
+
|
13 |
+
public function toOptionArray() {
|
14 |
+
return array(
|
15 |
+
array('value' => 'left', 'label' => Mage::helper('megamenu')->__('Left')),
|
16 |
+
array('value' => 'right','label' => Mage::helper('megamenu')->__('Right')),
|
17 |
+
|
18 |
+
);
|
19 |
+
}
|
20 |
+
|
21 |
+
}
|
app/code/community/Magazento/Megamenu/Model/Source/Maximumsubcat.php
ADDED
@@ -0,0 +1,34 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Model_Source_Maximumsubcat {
|
12 |
+
|
13 |
+
public function toOptionArray() {
|
14 |
+
return array(
|
15 |
+
array('value' => 5, 'label' => 5),
|
16 |
+
array('value' => 6, 'label' => 6),
|
17 |
+
array('value' => 7, 'label' => 7),
|
18 |
+
array('value' => 8, 'label' => 8),
|
19 |
+
array('value' => 9, 'label' => 9),
|
20 |
+
array('value' => 10, 'label' => 10),
|
21 |
+
array('value' => 11, 'label' => 11),
|
22 |
+
array('value' => 12, 'label' => 12),
|
23 |
+
array('value' => 13, 'label' => 13),
|
24 |
+
array('value' => 14, 'label' => 14),
|
25 |
+
array('value' => 15, 'label' => 15),
|
26 |
+
array('value' => 16, 'label' => 16),
|
27 |
+
array('value' => 17, 'label' => 17),
|
28 |
+
array('value' => 18, 'label' => 18),
|
29 |
+
array('value' => 19, 'label' => 19),
|
30 |
+
array('value' => 20, 'label' => 20),
|
31 |
+
);
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
app/code/community/Magazento/Megamenu/Model/Wysiwyg/Config.php
ADDED
@@ -0,0 +1,26 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Model_Wysiwyg_Config extends Mage_Cms_Model_Wysiwyg_Config {
|
12 |
+
|
13 |
+
public function getConfig($data = array()) {
|
14 |
+
|
15 |
+
|
16 |
+
$config = parent::getConfig($data);
|
17 |
+
$config->setData('files_browser_window_url', Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index/'));
|
18 |
+
$config->setData('directives_url', Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive'));
|
19 |
+
$config->setData('directives_url_quoted', preg_quote($config->getData('directives_url')));
|
20 |
+
$config->setData('widget_window_url', Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/widget/index'));
|
21 |
+
|
22 |
+
|
23 |
+
return $config;
|
24 |
+
}
|
25 |
+
|
26 |
+
}
|
app/code/community/Magazento/Megamenu/controllers/Admin/CategoryController.php
ADDED
@@ -0,0 +1,218 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Admin_CategoryController extends Mage_Adminhtml_Controller_Action {
|
12 |
+
|
13 |
+
protected function _initAction() {
|
14 |
+
$this->loadLayout()
|
15 |
+
->_setActiveMenu('magazento/megamenu')
|
16 |
+
->_addBreadcrumb(Mage::helper('megamenu')->__('Megamenu'), Mage::helper('megamenu')->__('Megamenu'))
|
17 |
+
->_addBreadcrumb(Mage::helper('megamenu')->__('Megamenu Items'), Mage::helper('megamenu')->__('Megamenu Items'))
|
18 |
+
;
|
19 |
+
return $this;
|
20 |
+
}
|
21 |
+
|
22 |
+
public function indexAction() {
|
23 |
+
$this->_initAction()
|
24 |
+
->_addContent($this->getLayout()->createBlock('megamenu/admin_category'))
|
25 |
+
->renderLayout();
|
26 |
+
}
|
27 |
+
|
28 |
+
public function newAction() {
|
29 |
+
$this->_forward('edit');
|
30 |
+
}
|
31 |
+
|
32 |
+
public function editAction() {
|
33 |
+
if (Mage::helper('megamenu')->versionUseAdminTitle()) {
|
34 |
+
$this->_title($this->__('megamenu'));
|
35 |
+
}
|
36 |
+
// 1. Get ID and create model
|
37 |
+
$id = $this->getRequest()->getParam('category_id');
|
38 |
+
$model = Mage::getModel('megamenu/category');
|
39 |
+
// 2. Initial checking
|
40 |
+
if ($id) {
|
41 |
+
$model->load($id);
|
42 |
+
if (!$model->getId()) {
|
43 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('megamenu')->__('This category no longer exists'));
|
44 |
+
$this->_redirect('*/*/');
|
45 |
+
return;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
// 3. Set entered data if was error when we do save
|
49 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
50 |
+
if (!empty($data)) {
|
51 |
+
$model->setData($data);
|
52 |
+
}
|
53 |
+
// 4. Register model to use later in blocks
|
54 |
+
Mage::register('megamenu_category', $model);
|
55 |
+
// 5. Build edit form
|
56 |
+
$this->_initAction()
|
57 |
+
->_addBreadcrumb($id ? Mage::helper('megamenu')->__('Edit Item') : Mage::helper('megamenu')->__('New Item'), $id ? Mage::helper('megamenu')->__('Edit Item') : Mage::helper('megamenu')->__('New Item'))
|
58 |
+
->_addContent($this->getLayout()->createBlock('megamenu/admin_category_edit')->setData('action', $this->getUrl('*/admin_category/save')))
|
59 |
+
->_addLeft($this->getLayout()->createBlock('megamenu/admin_category_edit_tabs'))
|
60 |
+
->renderLayout();
|
61 |
+
}
|
62 |
+
|
63 |
+
public function saveAction() {
|
64 |
+
if ($data = $this->getRequest()->getPost()) {
|
65 |
+
// init model and set data
|
66 |
+
$model = Mage::getModel('megamenu/category');
|
67 |
+
// print_r($data);exit();
|
68 |
+
$model->setData($data);
|
69 |
+
// try to save it
|
70 |
+
try {
|
71 |
+
// save the data
|
72 |
+
$model->save();
|
73 |
+
// display success message
|
74 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('megamenu')->__('Item was successfully saved'));
|
75 |
+
// clear previously saved data from session
|
76 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
77 |
+
// check if 'Save and Continue'
|
78 |
+
if ($this->getRequest()->getParam('back')) {
|
79 |
+
$this->_redirect('*/*/edit', array('category_id' => $model->getId()));
|
80 |
+
return;
|
81 |
+
}
|
82 |
+
// go to grid
|
83 |
+
$this->_redirect('*/*/');
|
84 |
+
return;
|
85 |
+
} catch (Exception $e) {
|
86 |
+
// display error message
|
87 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
88 |
+
// save data in session
|
89 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
90 |
+
// redirect to edit form
|
91 |
+
$this->_redirect('*/*/edit', array('category_id' => $this->getRequest()->getParam('category_id')));
|
92 |
+
return;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
$this->_redirect('*/*/');
|
96 |
+
}
|
97 |
+
|
98 |
+
public function deleteAction() {
|
99 |
+
// check if we know what should be deleted
|
100 |
+
if ($id = $this->getRequest()->getParam('category_id')) {
|
101 |
+
$name = "";
|
102 |
+
try {
|
103 |
+
// init model and delete
|
104 |
+
$model = Mage::getModel('megamenu/category');
|
105 |
+
$model->load($id);
|
106 |
+
$name = $model->getName();
|
107 |
+
$model->delete();
|
108 |
+
// display success message
|
109 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('megamenu')->__('Item was successfully deleted'));
|
110 |
+
// go to grid
|
111 |
+
$this->_redirect('*/*/');
|
112 |
+
return;
|
113 |
+
} catch (Exception $e) {
|
114 |
+
// display error message
|
115 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
116 |
+
// go back to edit form
|
117 |
+
$this->_redirect('*/*/edit', array('category_id' => $id));
|
118 |
+
return;
|
119 |
+
}
|
120 |
+
}
|
121 |
+
// display error message
|
122 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('megamenu')->__('Unable to find a category to delete'));
|
123 |
+
// go to grid
|
124 |
+
$this->_redirect('*/*/');
|
125 |
+
}
|
126 |
+
|
127 |
+
|
128 |
+
protected function _isAllowed() {
|
129 |
+
return Mage::getSingleton('admin/session')->isAllowed('megamenu/category');
|
130 |
+
}
|
131 |
+
|
132 |
+
public function wysiwygAction() {
|
133 |
+
$elementId = $this->getRequest()->getParam('element_id', md5(microtime()));
|
134 |
+
$content = $this->getLayout()->createBlock('adminhtml/catalog_helper_form_wysiwyg_content', '', array(
|
135 |
+
'editor_element_id' => $elementId
|
136 |
+
));
|
137 |
+
$this->getResponse()->setBody($content->toHtml());
|
138 |
+
}
|
139 |
+
|
140 |
+
|
141 |
+
|
142 |
+
public function massStatusAction()
|
143 |
+
{
|
144 |
+
$categoryIds = $this->getRequest()->getParam('massaction');
|
145 |
+
if(!is_array($categoryIds)) {
|
146 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select category(s)'));
|
147 |
+
} else {
|
148 |
+
try {
|
149 |
+
foreach ($categoryIds as $categoryId) {
|
150 |
+
$model = Mage::getSingleton('megamenu/category')
|
151 |
+
->load($categoryId)
|
152 |
+
->setIs_active($this->getRequest()->getParam('status'))
|
153 |
+
->setIsMassupdate(true)
|
154 |
+
->save();
|
155 |
+
}
|
156 |
+
$this->_getSession()->addSuccess(
|
157 |
+
$this->__('Total of %d record(s) were successfully updated', count($categoryIds))
|
158 |
+
);
|
159 |
+
} catch (Exception $e) {
|
160 |
+
$this->_getSession()->addError($e->getMessage());
|
161 |
+
}
|
162 |
+
}
|
163 |
+
$this->_redirect('*/*/index');
|
164 |
+
}
|
165 |
+
public function massDeleteAction() {
|
166 |
+
$categoryIds = $this->getRequest()->getParam('massaction');
|
167 |
+
if(!is_array($categoryIds)) {
|
168 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('megamenu')->__('Please select category(s)'));
|
169 |
+
} else {
|
170 |
+
try {
|
171 |
+
foreach ($categoryIds as $categoryId) {
|
172 |
+
$mass = Mage::getModel('megamenu/category')->load($categoryId);
|
173 |
+
$mass->delete();
|
174 |
+
}
|
175 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
176 |
+
Mage::helper('megamenu')->__(
|
177 |
+
'Total of %d record(s) were successfully deleted', count($categoryIds)
|
178 |
+
)
|
179 |
+
);
|
180 |
+
} catch (Exception $e) {
|
181 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
182 |
+
}
|
183 |
+
}
|
184 |
+
$this->_redirect('*/*/index');
|
185 |
+
}
|
186 |
+
|
187 |
+
|
188 |
+
public function exportCsvAction()
|
189 |
+
{
|
190 |
+
$fileName = 'category.csv';
|
191 |
+
$content = $this->getLayout()->createBlock('megamenu/admin_category_grid')
|
192 |
+
->getCsv();
|
193 |
+
$this->_sendUploadResponse($fileName, $content);
|
194 |
+
}
|
195 |
+
|
196 |
+
public function exportXmlAction()
|
197 |
+
{
|
198 |
+
$fileName = 'category.xml';
|
199 |
+
$content = $this->getLayout()->createBlock('megamenu/admin_category_grid')
|
200 |
+
->getXml();
|
201 |
+
$this->_sendUploadResponse($fileName, $content);
|
202 |
+
}
|
203 |
+
protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
|
204 |
+
{
|
205 |
+
$response = $this->getResponse();
|
206 |
+
$response->setHeader('HTTP/1.1 200 OK','');
|
207 |
+
$response->setHeader('Pragma', 'public', true);
|
208 |
+
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
209 |
+
$response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
|
210 |
+
$response->setHeader('Last-Modified', date('r'));
|
211 |
+
$response->setHeader('Accept-Ranges', 'bytes');
|
212 |
+
$response->setHeader('Content-Length', strlen($content));
|
213 |
+
$response->setHeader('Content-type', $contentType);
|
214 |
+
$response->setBody($content);
|
215 |
+
$response->sendResponse();
|
216 |
+
die;
|
217 |
+
}
|
218 |
+
}
|
app/code/community/Magazento/Megamenu/controllers/Admin/ItemController.php
ADDED
@@ -0,0 +1,218 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Magazento_Megamenu_Admin_ItemController extends Mage_Adminhtml_Controller_Action {
|
12 |
+
|
13 |
+
protected function _initAction() {
|
14 |
+
$this->loadLayout()
|
15 |
+
->_setActiveMenu('magazento/megamenu')
|
16 |
+
->_addBreadcrumb(Mage::helper('megamenu')->__('Megamenu'), Mage::helper('megamenu')->__('Megamenu'))
|
17 |
+
->_addBreadcrumb(Mage::helper('megamenu')->__('Megamenu Items'), Mage::helper('megamenu')->__('Megamenu Items'))
|
18 |
+
;
|
19 |
+
return $this;
|
20 |
+
}
|
21 |
+
|
22 |
+
public function indexAction() {
|
23 |
+
$this->_initAction()
|
24 |
+
->_addContent($this->getLayout()->createBlock('megamenu/admin_item'))
|
25 |
+
->renderLayout();
|
26 |
+
}
|
27 |
+
|
28 |
+
public function newAction() {
|
29 |
+
$this->_forward('edit');
|
30 |
+
}
|
31 |
+
|
32 |
+
public function editAction() {
|
33 |
+
if (Mage::helper('megamenu')->versionUseAdminTitle()) {
|
34 |
+
$this->_title($this->__('megamenu'));
|
35 |
+
}
|
36 |
+
// 1. Get ID and create model
|
37 |
+
$id = $this->getRequest()->getParam('item_id');
|
38 |
+
$model = Mage::getModel('megamenu/item');
|
39 |
+
// 2. Initial checking
|
40 |
+
if ($id) {
|
41 |
+
$model->load($id);
|
42 |
+
if (!$model->getId()) {
|
43 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('megamenu')->__('This item no longer exists'));
|
44 |
+
$this->_redirect('*/*/');
|
45 |
+
return;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
// 3. Set entered data if was error when we do save
|
49 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
50 |
+
if (!empty($data)) {
|
51 |
+
$model->setData($data);
|
52 |
+
}
|
53 |
+
// 4. Register model to use later in blocks
|
54 |
+
Mage::register('megamenu_item', $model);
|
55 |
+
// 5. Build edit form
|
56 |
+
$this->_initAction()
|
57 |
+
->_addBreadcrumb($id ? Mage::helper('megamenu')->__('Edit Item') : Mage::helper('megamenu')->__('New Item'), $id ? Mage::helper('megamenu')->__('Edit Item') : Mage::helper('megamenu')->__('New Item'))
|
58 |
+
->_addContent($this->getLayout()->createBlock('megamenu/admin_item_edit')->setData('action', $this->getUrl('*/admin_item/save')))
|
59 |
+
->_addLeft($this->getLayout()->createBlock('megamenu/admin_item_edit_tabs'))
|
60 |
+
->renderLayout();
|
61 |
+
}
|
62 |
+
|
63 |
+
public function saveAction() {
|
64 |
+
if ($data = $this->getRequest()->getPost()) {
|
65 |
+
// init model and set data
|
66 |
+
$model = Mage::getModel('megamenu/item');
|
67 |
+
// print_r($data);exit();
|
68 |
+
$model->setData($data);
|
69 |
+
// try to save it
|
70 |
+
try {
|
71 |
+
// save the data
|
72 |
+
$model->save();
|
73 |
+
// display success message
|
74 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('megamenu')->__('Item was successfully saved'));
|
75 |
+
// clear previously saved data from session
|
76 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
77 |
+
// check if 'Save and Continue'
|
78 |
+
if ($this->getRequest()->getParam('back')) {
|
79 |
+
$this->_redirect('*/*/edit', array('item_id' => $model->getId()));
|
80 |
+
return;
|
81 |
+
}
|
82 |
+
// go to grid
|
83 |
+
$this->_redirect('*/*/');
|
84 |
+
return;
|
85 |
+
} catch (Exception $e) {
|
86 |
+
// display error message
|
87 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
88 |
+
// save data in session
|
89 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
90 |
+
// redirect to edit form
|
91 |
+
$this->_redirect('*/*/edit', array('item_id' => $this->getRequest()->getParam('item_id')));
|
92 |
+
return;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
$this->_redirect('*/*/');
|
96 |
+
}
|
97 |
+
|
98 |
+
public function deleteAction() {
|
99 |
+
// check if we know what should be deleted
|
100 |
+
if ($id = $this->getRequest()->getParam('item_id')) {
|
101 |
+
$name = "";
|
102 |
+
try {
|
103 |
+
// init model and delete
|
104 |
+
$model = Mage::getModel('megamenu/item');
|
105 |
+
$model->load($id);
|
106 |
+
$name = $model->getName();
|
107 |
+
$model->delete();
|
108 |
+
// display success message
|
109 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('megamenu')->__('Item was successfully deleted'));
|
110 |
+
// go to grid
|
111 |
+
$this->_redirect('*/*/');
|
112 |
+
return;
|
113 |
+
} catch (Exception $e) {
|
114 |
+
// display error message
|
115 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
116 |
+
// go back to edit form
|
117 |
+
$this->_redirect('*/*/edit', array('item_id' => $id));
|
118 |
+
return;
|
119 |
+
}
|
120 |
+
}
|
121 |
+
// display error message
|
122 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('megamenu')->__('Unable to find a item to delete'));
|
123 |
+
// go to grid
|
124 |
+
$this->_redirect('*/*/');
|
125 |
+
}
|
126 |
+
|
127 |
+
|
128 |
+
protected function _isAllowed() {
|
129 |
+
return Mage::getSingleton('admin/session')->isAllowed('megamenu/item');
|
130 |
+
}
|
131 |
+
|
132 |
+
public function wysiwygAction() {
|
133 |
+
$elementId = $this->getRequest()->getParam('element_id', md5(microtime()));
|
134 |
+
$content = $this->getLayout()->createBlock('adminhtml/catalog_helper_form_wysiwyg_content', '', array(
|
135 |
+
'editor_element_id' => $elementId
|
136 |
+
));
|
137 |
+
$this->getResponse()->setBody($content->toHtml());
|
138 |
+
}
|
139 |
+
|
140 |
+
|
141 |
+
|
142 |
+
public function massStatusAction()
|
143 |
+
{
|
144 |
+
$itemIds = $this->getRequest()->getParam('massaction');
|
145 |
+
if(!is_array($itemIds)) {
|
146 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
147 |
+
} else {
|
148 |
+
try {
|
149 |
+
foreach ($itemIds as $itemId) {
|
150 |
+
$model = Mage::getSingleton('megamenu/item')
|
151 |
+
->load($itemId)
|
152 |
+
->setIs_active($this->getRequest()->getParam('status'))
|
153 |
+
->setIsMassupdate(true)
|
154 |
+
->save();
|
155 |
+
}
|
156 |
+
$this->_getSession()->addSuccess(
|
157 |
+
$this->__('Total of %d record(s) were successfully updated', count($itemIds))
|
158 |
+
);
|
159 |
+
} catch (Exception $e) {
|
160 |
+
$this->_getSession()->addError($e->getMessage());
|
161 |
+
}
|
162 |
+
}
|
163 |
+
$this->_redirect('*/*/index');
|
164 |
+
}
|
165 |
+
public function massDeleteAction() {
|
166 |
+
$itemIds = $this->getRequest()->getParam('massaction');
|
167 |
+
if(!is_array($itemIds)) {
|
168 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('megamenu')->__('Please select item(s)'));
|
169 |
+
} else {
|
170 |
+
try {
|
171 |
+
foreach ($itemIds as $itemId) {
|
172 |
+
$mass = Mage::getModel('megamenu/item')->load($itemId);
|
173 |
+
$mass->delete();
|
174 |
+
}
|
175 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
176 |
+
Mage::helper('megamenu')->__(
|
177 |
+
'Total of %d record(s) were successfully deleted', count($itemIds)
|
178 |
+
)
|
179 |
+
);
|
180 |
+
} catch (Exception $e) {
|
181 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
182 |
+
}
|
183 |
+
}
|
184 |
+
$this->_redirect('*/*/index');
|
185 |
+
}
|
186 |
+
|
187 |
+
|
188 |
+
public function exportCsvAction()
|
189 |
+
{
|
190 |
+
$fileName = 'items.csv';
|
191 |
+
$content = $this->getLayout()->createBlock('megamenu/admin_item_grid')
|
192 |
+
->getCsv();
|
193 |
+
$this->_sendUploadResponse($fileName, $content);
|
194 |
+
}
|
195 |
+
|
196 |
+
public function exportXmlAction()
|
197 |
+
{
|
198 |
+
$fileName = 'items.xml';
|
199 |
+
$content = $this->getLayout()->createBlock('megamenu/admin_item_grid')
|
200 |
+
->getXml();
|
201 |
+
$this->_sendUploadResponse($fileName, $content);
|
202 |
+
}
|
203 |
+
protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
|
204 |
+
{
|
205 |
+
$response = $this->getResponse();
|
206 |
+
$response->setHeader('HTTP/1.1 200 OK','');
|
207 |
+
$response->setHeader('Pragma', 'public', true);
|
208 |
+
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
209 |
+
$response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
|
210 |
+
$response->setHeader('Last-Modified', date('r'));
|
211 |
+
$response->setHeader('Accept-Ranges', 'bytes');
|
212 |
+
$response->setHeader('Content-Length', strlen($content));
|
213 |
+
$response->setHeader('Content-type', $contentType);
|
214 |
+
$response->setBody($content);
|
215 |
+
$response->sendResponse();
|
216 |
+
die;
|
217 |
+
}
|
218 |
+
}
|
app/code/community/Magazento/Megamenu/etc/config.xml
ADDED
@@ -0,0 +1,181 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Magazento_Megamenu>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Magazento_Megamenu>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<layout>
|
10 |
+
<updates>
|
11 |
+
<megamenu>
|
12 |
+
<file>magazento_megamenu.xml</file>
|
13 |
+
</megamenu>
|
14 |
+
</updates>
|
15 |
+
</layout>
|
16 |
+
<translate>
|
17 |
+
<modules>
|
18 |
+
<Magazento_Megamenu>
|
19 |
+
<files>
|
20 |
+
<default>Magazento_Megamenu.csv</default>
|
21 |
+
</files>
|
22 |
+
</Magazento_Megamenu>
|
23 |
+
</modules>
|
24 |
+
</translate>
|
25 |
+
</frontend>
|
26 |
+
|
27 |
+
<global>
|
28 |
+
<rewrite>
|
29 |
+
<mage_adminhtml_system_variable>
|
30 |
+
<from><![CDATA[#^/megamenu/system_variable#]]>
|
31 |
+
</from>
|
32 |
+
<to>/admin/system_variable</to>
|
33 |
+
</mage_adminhtml_system_variable>
|
34 |
+
</rewrite>
|
35 |
+
<models>
|
36 |
+
<megamenu>
|
37 |
+
<class>Magazento_Megamenu_Model</class>
|
38 |
+
<resourceModel>megamenu_mysql4</resourceModel>
|
39 |
+
</megamenu>
|
40 |
+
<megamenu_mysql4>
|
41 |
+
<class>Magazento_Megamenu_Model_Mysql4</class>
|
42 |
+
<entities>
|
43 |
+
<item>
|
44 |
+
<table>magazento_megamenu_item</table>
|
45 |
+
</item>
|
46 |
+
<item_store>
|
47 |
+
<table>magazento_megamenu_item_store</table>
|
48 |
+
</item_store>
|
49 |
+
<category>
|
50 |
+
<table>magazento_megamenu_category</table>
|
51 |
+
</category>
|
52 |
+
<category_store>
|
53 |
+
<table>magazento_megamenu_category_store</table>
|
54 |
+
</category_store>
|
55 |
+
</entities>
|
56 |
+
</megamenu_mysql4>
|
57 |
+
</models>
|
58 |
+
<resources>
|
59 |
+
<megamenu_setup>
|
60 |
+
<setup>
|
61 |
+
<module>Magazento_Megamenu</module>
|
62 |
+
</setup>
|
63 |
+
<connection>
|
64 |
+
<use>core_setup</use>
|
65 |
+
</connection>
|
66 |
+
</megamenu_setup>
|
67 |
+
<megamenu_write>
|
68 |
+
<connection>
|
69 |
+
<use>core_write</use>
|
70 |
+
</connection>
|
71 |
+
</megamenu_write>
|
72 |
+
<megamenu_read>
|
73 |
+
<connection>
|
74 |
+
<use>core_read</use>
|
75 |
+
</connection>
|
76 |
+
</megamenu_read>
|
77 |
+
</resources>
|
78 |
+
<blocks>
|
79 |
+
<megamenu>
|
80 |
+
<class>Magazento_Megamenu_Block</class>
|
81 |
+
</megamenu>
|
82 |
+
</blocks>
|
83 |
+
<helpers>
|
84 |
+
<megamenu>
|
85 |
+
<class>Magazento_Megamenu_Helper</class>
|
86 |
+
</megamenu>
|
87 |
+
</helpers>
|
88 |
+
</global>
|
89 |
+
<admin>
|
90 |
+
<routers>
|
91 |
+
<magazento_megamenu>
|
92 |
+
<use>admin</use>
|
93 |
+
<args>
|
94 |
+
<module>Magazento_Megamenu</module>
|
95 |
+
<frontName>megamenu</frontName>
|
96 |
+
</args>
|
97 |
+
</magazento_megamenu>
|
98 |
+
</routers>
|
99 |
+
</admin>
|
100 |
+
|
101 |
+
<adminhtml>
|
102 |
+
<acl>
|
103 |
+
<resources>
|
104 |
+
<admin>
|
105 |
+
<children>
|
106 |
+
<megamenu translate="title">
|
107 |
+
<title>Megamenu</title>
|
108 |
+
<children>
|
109 |
+
<item translate="title">
|
110 |
+
<title>Manage items </title>
|
111 |
+
</item>
|
112 |
+
</children>
|
113 |
+
<sort_order>65</sort_order>
|
114 |
+
</megamenu>
|
115 |
+
<system>
|
116 |
+
<children>
|
117 |
+
<config>
|
118 |
+
<children>
|
119 |
+
<megamenu>
|
120 |
+
<title>Megamenu</title>
|
121 |
+
<sort_order>101</sort_order>
|
122 |
+
</megamenu>
|
123 |
+
</children>
|
124 |
+
</config>
|
125 |
+
</children>
|
126 |
+
</system>
|
127 |
+
</children>
|
128 |
+
</admin>
|
129 |
+
</resources>
|
130 |
+
</acl>
|
131 |
+
<menu>
|
132 |
+
<magazento translate="title" module="megamenu">
|
133 |
+
<title>Magazento</title>
|
134 |
+
<sort_order>65</sort_order>
|
135 |
+
<children>
|
136 |
+
<megamenu translate="title" module="megamenu">
|
137 |
+
<title>Megamenu</title>
|
138 |
+
<sort_order>65</sort_order>
|
139 |
+
<children>
|
140 |
+
<item translate="title" module="megamenu">
|
141 |
+
<title>Items</title>
|
142 |
+
<action>megamenu/admin_item/</action>
|
143 |
+
<resource>megamenu/admin/item</resource>
|
144 |
+
</item>
|
145 |
+
<category_item translate="title" module="megamenu">
|
146 |
+
<title>Categories</title>
|
147 |
+
<action>megamenu/admin_category</action>
|
148 |
+
<resource>megamenu/admin_category</resource>
|
149 |
+
</category_item>
|
150 |
+
<settings translate="title" module="megamenu">
|
151 |
+
<title>Settings</title>
|
152 |
+
<action>adminhtml/system_config/edit/section/megamenu</action>
|
153 |
+
<sort_order>40</sort_order>
|
154 |
+
</settings>
|
155 |
+
</children>
|
156 |
+
</megamenu>
|
157 |
+
</children>
|
158 |
+
</magazento>
|
159 |
+
</menu>
|
160 |
+
</adminhtml>
|
161 |
+
<default>
|
162 |
+
<megamenu>
|
163 |
+
<options>
|
164 |
+
<moretext>View all...</moretext>
|
165 |
+
<enable>1</enable>
|
166 |
+
<userows>0</userows>
|
167 |
+
<maximumsubcat>5</maximumsubcat>
|
168 |
+
</options>
|
169 |
+
<allpages>
|
170 |
+
<enable>1</enable>
|
171 |
+
<title>All</title>
|
172 |
+
<itemalign>right</itemalign>
|
173 |
+
<contentalign>left</contentalign>
|
174 |
+
</allpages>
|
175 |
+
<licence>
|
176 |
+
<email>customer@magazento.com</email>
|
177 |
+
<serial>e4d90-9c290-d0fb1-ca068-ffadd-f22cb-d0</serial>
|
178 |
+
</licence>
|
179 |
+
</megamenu>
|
180 |
+
</default>
|
181 |
+
</config>
|
app/code/community/Magazento/Megamenu/etc/system.xml
ADDED
@@ -0,0 +1,178 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<magazento translate="label">
|
5 |
+
<label>Magazento.com</label>
|
6 |
+
<sort_order>250</sort_order>
|
7 |
+
</magazento>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<megamenu translate="label" module="megamenu">
|
11 |
+
<label>Megamenu</label>
|
12 |
+
<tab>magazento</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>100</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 |
+
<options translate="label">
|
20 |
+
<label>Main options</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>10</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 |
+
<!-- <enable 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>51</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 |
+
</enable>-->
|
36 |
+
<serial translate="label">
|
37 |
+
<label>Serial key</label>
|
38 |
+
<frontend_type>text</frontend_type>
|
39 |
+
<sort_order>60</sort_order>
|
40 |
+
<show_in_default>1</show_in_default>
|
41 |
+
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>0</show_in_store>
|
43 |
+
</serial>
|
44 |
+
<!-- <colwidth translate="label">
|
45 |
+
<label>Col width</label>
|
46 |
+
<frontend_type>text</frontend_type>
|
47 |
+
<comment>colwidth</comment>
|
48 |
+
<sort_order>60</sort_order>
|
49 |
+
<show_in_default>1</show_in_default>
|
50 |
+
<show_in_website>1</show_in_website>
|
51 |
+
<show_in_store>0</show_in_store>
|
52 |
+
</colwidth>-->
|
53 |
+
<maximumsubcat translate="label">
|
54 |
+
<label>Subcat number</label>
|
55 |
+
<frontend_type>select</frontend_type>
|
56 |
+
<source_model>megamenu/source_maximumsubcat</source_model>
|
57 |
+
<sort_order>60</sort_order>
|
58 |
+
<show_in_default>1</show_in_default>
|
59 |
+
<show_in_website>1</show_in_website>
|
60 |
+
<show_in_store>0</show_in_store>
|
61 |
+
</maximumsubcat>
|
62 |
+
<userows translate="label">
|
63 |
+
<label>Use rows</label>
|
64 |
+
<frontend_type>select</frontend_type>
|
65 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
66 |
+
<comment>
|
67 |
+
Use this option to split the columns into rows.
|
68 |
+
Sometimes it is convenient to use the rubrics partition,
|
69 |
+
especially if you have a large single-level catalog.
|
70 |
+
</comment>
|
71 |
+
<sort_order>60</sort_order>
|
72 |
+
<show_in_default>1</show_in_default>
|
73 |
+
<show_in_website>1</show_in_website>
|
74 |
+
<show_in_store>0</show_in_store>
|
75 |
+
</userows>
|
76 |
+
<moretext translate="label">
|
77 |
+
<label>More text</label>
|
78 |
+
<frontend_type>text</frontend_type>
|
79 |
+
<comment>More text for categories</comment>
|
80 |
+
<sort_order>60</sort_order>
|
81 |
+
<show_in_default>1</show_in_default>
|
82 |
+
<show_in_website>1</show_in_website>
|
83 |
+
<show_in_store>0</show_in_store>
|
84 |
+
</moretext>
|
85 |
+
</fields>
|
86 |
+
</options>
|
87 |
+
<allpages translate="label">
|
88 |
+
<label>"All pages" item options</label>
|
89 |
+
<frontend_type>text</frontend_type>
|
90 |
+
<sort_order>10</sort_order>
|
91 |
+
<show_in_default>1</show_in_default>
|
92 |
+
<show_in_website>1</show_in_website>
|
93 |
+
<show_in_store>1</show_in_store>
|
94 |
+
<fields>
|
95 |
+
<enable translate="label">
|
96 |
+
<label>Enable</label>
|
97 |
+
<frontend_type>select</frontend_type>
|
98 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
99 |
+
<sort_order>51</sort_order>
|
100 |
+
<show_in_default>1</show_in_default>
|
101 |
+
<show_in_website>1</show_in_website>
|
102 |
+
<show_in_store>1</show_in_store>
|
103 |
+
</enable>
|
104 |
+
<title translate="label">
|
105 |
+
<label>Title text</label>
|
106 |
+
<frontend_type>text</frontend_type>
|
107 |
+
<sort_order>60</sort_order>
|
108 |
+
<show_in_default>1</show_in_default>
|
109 |
+
<show_in_website>1</show_in_website>
|
110 |
+
<show_in_store>0</show_in_store>
|
111 |
+
</title>
|
112 |
+
<!-- <url translate="label">
|
113 |
+
<label>Url</label>
|
114 |
+
<frontend_type>text</frontend_type>
|
115 |
+
<sort_order>60</sort_order>
|
116 |
+
<show_in_default>1</show_in_default>
|
117 |
+
<show_in_website>1</show_in_website>
|
118 |
+
<show_in_store>0</show_in_store>
|
119 |
+
</url>-->
|
120 |
+
<itemalign translate="label">
|
121 |
+
<label>Item align</label>
|
122 |
+
<frontend_type>select</frontend_type>
|
123 |
+
<source_model>megamenu/source_align</source_model>
|
124 |
+
<sort_order>61</sort_order>
|
125 |
+
<show_in_default>1</show_in_default>
|
126 |
+
<show_in_website>1</show_in_website>
|
127 |
+
<show_in_store>0</show_in_store>
|
128 |
+
</itemalign>
|
129 |
+
<contentalign translate="label">
|
130 |
+
<label>Content align</label>
|
131 |
+
<frontend_type>select</frontend_type>
|
132 |
+
<source_model>megamenu/source_align</source_model>
|
133 |
+
<sort_order>62</sort_order>
|
134 |
+
<show_in_default>1</show_in_default>
|
135 |
+
<show_in_website>1</show_in_website>
|
136 |
+
<show_in_store>0</show_in_store>
|
137 |
+
</contentalign>
|
138 |
+
</fields>
|
139 |
+
</allpages>
|
140 |
+
<licence translate="label">
|
141 |
+
<label>Licence key</label>
|
142 |
+
<frontend_type>text</frontend_type>
|
143 |
+
<sort_order>99</sort_order>
|
144 |
+
<show_in_default>1</show_in_default>
|
145 |
+
<show_in_website>1</show_in_website>
|
146 |
+
<show_in_store>1</show_in_store>
|
147 |
+
<fields>
|
148 |
+
<email translate="label">
|
149 |
+
<label>E-mail</label>
|
150 |
+
<frontend_type>text</frontend_type>
|
151 |
+
<sort_order>11</sort_order>
|
152 |
+
<show_in_default>1</show_in_default>
|
153 |
+
<show_in_website>1</show_in_website>
|
154 |
+
<show_in_store>0</show_in_store>
|
155 |
+
</email>
|
156 |
+
<serial translate="label">
|
157 |
+
<label>Serial</label>
|
158 |
+
<frontend_type>text</frontend_type>
|
159 |
+
<sort_order>22</sort_order>
|
160 |
+
<show_in_default>1</show_in_default>
|
161 |
+
<show_in_website>1</show_in_website>
|
162 |
+
<show_in_store>0</show_in_store>
|
163 |
+
</serial>
|
164 |
+
</fields>
|
165 |
+
</licence>
|
166 |
+
<info translate="label">
|
167 |
+
<label>About</label>
|
168 |
+
<frontend_type>text</frontend_type>
|
169 |
+
<frontend_model>megamenu/info</frontend_model>
|
170 |
+
<sort_order>50</sort_order>
|
171 |
+
<show_in_default>1</show_in_default>
|
172 |
+
<show_in_website>1</show_in_website>
|
173 |
+
<show_in_store>1</show_in_store>
|
174 |
+
</info>
|
175 |
+
</groups>
|
176 |
+
</megamenu>
|
177 |
+
</sections>
|
178 |
+
</config>
|
app/code/community/Magazento/Megamenu/sql/megamenu_setup/mysql4-install-1.0.0.php
ADDED
@@ -0,0 +1,95 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on Mar 16, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
$installer = $this;
|
12 |
+
$installer->startSetup();
|
13 |
+
$installer->run("
|
14 |
+
|
15 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('magazento_megamenu_category')}` (
|
16 |
+
`category_id` smallint(6) NOT NULL AUTO_INCREMENT,
|
17 |
+
`catalog_id` int(11) NOT NULL,
|
18 |
+
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
|
19 |
+
`url` text NOT NULL,
|
20 |
+
`column` tinyint(4) NOT NULL DEFAULT '2',
|
21 |
+
`position` tinyint(4) NOT NULL DEFAULT '0',
|
22 |
+
`align_category` varchar(10) NOT NULL DEFAULT 'left',
|
23 |
+
`align_content` varchar(10) NOT NULL DEFAULT 'right',
|
24 |
+
`content_top` text CHARACTER SET utf8 COLLATE utf8_bin,
|
25 |
+
`content_bottom` text CHARACTER SET utf8 COLLATE utf8_bin,
|
26 |
+
`from_time` datetime DEFAULT NULL,
|
27 |
+
`to_time` datetime DEFAULT NULL,
|
28 |
+
`is_active` tinyint(1) NOT NULL DEFAULT '1',
|
29 |
+
PRIMARY KEY (`category_id`)
|
30 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
|
31 |
+
|
32 |
+
INSERT INTO `{$this->getTable('magazento_megamenu_category')}` (`category_id`, `catalog_id`, `title`, `url`, `column`, `position`, `align_category`, `align_content`, `content_top`, `content_bottom`, `from_time`, `to_time`, `is_active`) VALUES
|
33 |
+
(2, 13, 'Electronics', '#', 2, 5, 'left', 'left', 0x3c68323e3220636f6c756d6e732063617465676f7279206c61796f75743c2f68323e0d0a3c703e596f752063616e20636f6d706c6574656c79206368616e6765206d656e75206f7220796f752063616e206c656176652069742061732069732c2074686973206d656e7520646f6573206e6f74206769766520796f7520616e792074726f75626c652e20416c6c207061727473206f66204d6567614d656e752061726520636f6d706c6574656c79206368616e676561626c6520696e207468652061646d696e6973747261746976652073656374696f6e2c20796f752063616e20616c736f206368616e6765206e616d6573206f722075726c206c696e6b732e2054686973206d656e75206973207265616c6c7920636f6e76696e69656e742e3c2f703e, '', '2009-11-06 10:46:36', '2011-03-12 02:45:00', 1),
|
34 |
+
(5, 10, 'Furniture', '#', 2, 2, 'left', 'left', 0x3c64697620636c6173733d22636f6c5f32223e0d0a3c68323e3220636f6c756d6e732063617465676f727920636f6e74656e743c2f68323e0d0a3c2f6469763e, '', '2011-02-27 16:47:02', NULL, 1),
|
35 |
+
(6, 18, 'Apparel', '#', 1, 12, 'left', 'left', 0x3c68323e3120436f6c756d6e3c2f68323e, 0x3c703e4353533320616e642043726f73732042726f7773657220537570706f72742e3c2f703e, '2001-03-12 16:52:09', '2016-03-31 16:52:09', 1),
|
36 |
+
(7, 3, 'Root', '/', 3, 1, 'left', 'left', '', 0x3c64697620636c6173733d22636f6c5f33223e0d0a3c68323e5468697320697320616e206578616d706c65206f662020726f6f742077697468203320636f6c756d6e733c2f68323e0d0a3c2f6469763e0d0a3c64697620636c6173733d22636f6c5f31223e0d0a3c7020636c6173733d22626c61636b5f626f78223e43726561742065646966666572656e7420636f6e74656e7420626c6c6f636b7320616e6420646973706c6179207468656d207769746820796f7520435353207374796c65733c2f703e0d0a3c2f6469763e0d0a3c64697620636c6173733d22636f6c5f31223e0d0a3c703e4372656174652062656175746966756c20626c6f636b732077697468206d6167656e746f2d667269656e646c7920696e74657266616365203c7374726f6e673e6174206261636b656e643c2f7374726f6e673e3c2f703e0d0a3c2f6469763e0d0a3c64697620636c6173733d22636f6c5f31223e3c696d67207372633d222f6d656469612f6d6167617a656e746f5f6d6567616d656e752f626573745f73656c6c696e675f696d6730322e706e672220616c743d22222077696474683d22393522206865696768743d22393522202f3e3c2f6469763e0d0a3c64697620636c6173733d22636f6c5f33223e456173696c79206368616e676520746f70206f7220626f74746f6d20636f6e74656e7420696e204d6567614d656e75206261636b656e642063617465676f72792073656374696f6e3c2f6469763e, '2011-03-13 23:18:23', NULL, 1);
|
37 |
+
|
38 |
+
|
39 |
+
-- --------------------------------------------------------
|
40 |
+
|
41 |
+
|
42 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('magazento_megamenu_category_store')}` (
|
43 |
+
`category_id` smallint(6) unsigned DEFAULT NULL,
|
44 |
+
`store_id` smallint(6) unsigned DEFAULT NULL
|
45 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
46 |
+
|
47 |
+
INSERT INTO `{$this->getTable('magazento_megamenu_category_store')}` (`category_id`, `store_id`) VALUES
|
48 |
+
(5, 0),
|
49 |
+
(7, 0),
|
50 |
+
(2, 0),
|
51 |
+
(6, 0);
|
52 |
+
|
53 |
+
|
54 |
+
-- --------------------------------------------------------
|
55 |
+
|
56 |
+
|
57 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('magazento_megamenu_item')}` (
|
58 |
+
`item_id` smallint(6) NOT NULL AUTO_INCREMENT,
|
59 |
+
`title` varchar(255) NOT NULL,
|
60 |
+
`url` text NOT NULL,
|
61 |
+
`column` tinyint(4) NOT NULL DEFAULT '2',
|
62 |
+
`align_item` varchar(10) NOT NULL DEFAULT 'left',
|
63 |
+
`align_content` varchar(10) NOT NULL DEFAULT 'right',
|
64 |
+
`position` tinyint(10) NOT NULL DEFAULT '0',
|
65 |
+
`content` text NOT NULL,
|
66 |
+
`from_time` datetime DEFAULT NULL,
|
67 |
+
`to_time` datetime DEFAULT NULL,
|
68 |
+
`is_active` tinyint(1) NOT NULL DEFAULT '1',
|
69 |
+
`columnsize` tinyint(4) NOT NULL,
|
70 |
+
PRIMARY KEY (`item_id`)
|
71 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;
|
72 |
+
|
73 |
+
|
74 |
+
INSERT INTO `{$this->getTable('magazento_megamenu_item')}` (`item_id`, `title`, `url`, `column`, `align_item`, `align_content`, `position`, `content`, `from_time`, `to_time`, `is_active`, `columnsize`) VALUES
|
75 |
+
(5, 'Text', 'sample-menu-item.html', 4, 'right', 'right', 17, '<p style=\"text-align: justify; font-size: 11px; line-height: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px; padding: 0px;\"><strong>Lorem ipsum dolor sit amet </strong>consectetur adipiscing elit. Donec in fringilla felis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce id tortor ut sem tincidunt tincidunt. Pellentesque adipiscing neque sit amet diam tincidunt suscipit. Mauris hendrerit lacinia metus sit amet ullamcorper. Ut vehicula urna eu nibh fringilla eget viverra elit rutrum. In faucibus accumsan ipsum. Nam quis ultricies leo. Ut vitae ipsum et orci venenatis lacinia. Pellentesque est risus, laoreet sed ullamcorper eu, viverra nec tellus. Vivamus leo nulla, ultrices in semper a, porttitor at arcu. Integer aliquam nisl lacus. Curabitur mi purus, tempor at eleifend sed, sagittis vel est. Nullam a lectus arcu, eu consequat eros. Etiam blandit gravida risus ac suscipit. Sed scelerisque nibh eu libero rhoncus at porttitor ante accumsan. Vestibulum elementum placerat congue.</p>\r\n<p style=\"text-align: justify; font-size: 11px; line-height: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px; padding: 0px;\"><strong>In eget convallis lorem.</strong> In tincidunt, libero ac venenatis bibendum, metus neque ullamcorper sapien, non iaculis sem nisl at mauris. Integer nec sapien urna, vitae elementum enim. Vestibulum est tortor, iaculis sit amet porta hendrerit, cursus et massa. Nullam sagittis ultrices fringilla. Praesent at tempor arcu. Sed ornare aliquam lectus, quis lobortis risus iaculis sed. In a ipsum id odio auctor consectetur. Maecenas consequat velit in neque dapibus in pulvinar tortor ornare. Nulla facilisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ut ultrices odio. Aliquam ac suscipit nibh. Integer non purus quam, vel facilisis nunc. Pellentesque orci nisi, congue nec cursus id, vehicula ac felis.</p>\r\n<p><img src=\"http://magazento.com/promo/logo.png\" alt=\"\" width=\"200\" height=\"63\" /></p>', '2011-03-09 12:00:00', '2011-03-12 12:00:00', 1, 0),
|
76 |
+
(9, 'YouTube', 'samble-flash.html', 5, 'right', 'right', 9, '\r\n<h3>Welcome to Magento</h3>\r\n<iframe title=\"YouTube video player\" width=\"550\" height=\"350\" src=\"http://www.youtube.com/embed/BBvsB5PcitQ\" frameborder=\"0\" allowfullscreen></iframe>\r\n', '2011-03-14 01:52:21', '2016-07-14 01:52:21', 1, 0),
|
77 |
+
(10, 'Forms', '#', 5, 'right', 'right', 1, '<form id=\"contactForm\" action=\"http://magento1420.dev/contacts/index/post/\" method=\"post\">\r\n<h2 class=\"legend\">Contact Information</h2>\r\n<ul class=\"form-list\">\r\n<li>\r\n<div class=\"field\"><label class=\"required\" for=\"name\"><em>*</em>Name</label>\r\n<div class=\"input-box\"><input id=\"name\" class=\"input-text\" title=\"Email\" name=\"name\" type=\"text\" value=\"John Doe\" /></div>\r\n</div>\r\n</li>\r\n<li>\r\n<div class=\"field\"><label class=\"required\" for=\"email\"><em>*</em>Email</label>\r\n<div class=\"input-box\"><input id=\"email\" class=\"input-text\" title=\"Email\" name=\"email\" type=\"text\" value=\"sample@mail.com\" /></div>\r\n</div>\r\n</li>\r\n<li>\r\n<div class=\"field\"><label class=\"required\" for=\"name\"><em>*</em>Telephone</label>\r\n<div class=\"input-box\"><input id=\"telephone\" class=\"input-text\" title=\"Telephone\" name=\"telephone\" type=\"text\" value=\"+1 0000 0000\" /></div>\r\n</div>\r\n</li>\r\n<li class=\"wide\"> <label class=\"required\" for=\"comment\"><em>*</em>Comment</label>\r\n<div class=\"input-box\"><textarea id=\"comment\" class=\"required-entry input-text\" title=\"Comment\" cols=\"5\" rows=\"3\" name=\"comment\">Write message here ... </textarea></div>\r\n</li>\r\n</ul>\r\n<div class=\"buttons-set\">\r\n<p class=\"required\">* Required Fields0</p>\r\n<input id=\"hideit\" style=\"display: none !important;\" name=\"hideit\" type=\"text\" /> <button class=\"button\" title=\"Submit\"><span><span>Submit</span></span></button></div>\r\n</form>', '2011-03-14 09:16:00', '2015-03-14 02:16:45', 1, 0);
|
78 |
+
|
79 |
+
|
80 |
+
-- --------------------------------------------------------
|
81 |
+
|
82 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('magazento_megamenu_item_store')}` (
|
83 |
+
`item_id` smallint(6) unsigned DEFAULT NULL,
|
84 |
+
`store_id` smallint(6) unsigned DEFAULT NULL
|
85 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
86 |
+
|
87 |
+
INSERT INTO `{$this->getTable('magazento_megamenu_item_store')}` (`item_id`, `store_id`) VALUES
|
88 |
+
(5, 0),
|
89 |
+
(10, 0),
|
90 |
+
(9, 0);
|
91 |
+
|
92 |
+
");
|
93 |
+
|
94 |
+
$installer->endSetup();
|
95 |
+
?>
|
app/design/frontend/default/default/layout/magazento_megamenu.xml
ADDED
@@ -0,0 +1,13 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout>
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<!-- <action method="addItem"><type>skin_js</type><name>magazento_firstslider/slider.js</name><params/></action>-->
|
6 |
+
<action method="addCss"><stylesheet>magazento/megamenu/menu.css</stylesheet></action>
|
7 |
+
<reference name="top.menu">
|
8 |
+
<remove name="catalog.topnav" />
|
9 |
+
<block type="megamenu/navigation" name="megamenu.navigation" template="magazento/megamenu/navigation.phtml" />
|
10 |
+
</reference>
|
11 |
+
</reference>
|
12 |
+
</default>
|
13 |
+
</layout>
|
app/design/frontend/default/default/template/magazento/megamenu/navigation.phtml
ADDED
@@ -0,0 +1,32 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<div class="nav-container">
|
2 |
+
<ul id="menu">
|
3 |
+
|
4 |
+
<?php echo $this->drawCatalog(); ?>
|
5 |
+
|
6 |
+
<?php if (Mage::getStoreConfig('megamenu/allpages/enable')): ?>
|
7 |
+
<?php $itemAlign = Mage::getStoreConfig('megamenu/allpages/itemalign'); ?>
|
8 |
+
<?php $contentAlign = Mage::getStoreConfig('megamenu/allpages/contentalign'); ?>
|
9 |
+
<?php $title = Mage::getStoreConfig('megamenu/allpages/title'); ?>
|
10 |
+
<?php $storeId = Mage::app()->getStore()->getId();
|
11 |
+
$storeUrl = Mage::getModel('core/store')->load($storeId)->getUrl();
|
12 |
+
$storeUrl.='#';
|
13 |
+
?>
|
14 |
+
<?php $title = Mage::getStoreConfig('megamenu/allpages/title'); ?>
|
15 |
+
<li class="menu_<?php echo $itemAlign;?>"><a href="<?php echo $storeUrl;?>" class="drop"><?php echo $title;?></a>
|
16 |
+
<div class="dropdown_1column_simple align_<?php echo $contentAlign;?>">
|
17 |
+
<div class="col_1">
|
18 |
+
<ul class="simple">
|
19 |
+
<?php echo $this->drawAllCategoriesMenu(); ?>
|
20 |
+
</ul>
|
21 |
+
</div>
|
22 |
+
</div>
|
23 |
+
</li>
|
24 |
+
<?php endif; ?>
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
<?php echo $this->drawAdminMenu(); ?>
|
29 |
+
</ul>
|
30 |
+
|
31 |
+
|
32 |
+
</div>
|
app/etc/modules/Magazento_Megamenu.xml
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Magazento_Megamenu>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Magazento_Megamenu>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/locale/en_US/Magazento_Megamenu.csv
ADDED
File without changes
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Magazento_Megamenu</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>Single license</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Magazento_Megamenu</summary>
|
10 |
+
<description>Magazento_Megamenu</description>
|
11 |
+
<notes>1.0.0</notes>
|
12 |
+
<authors><author><name>volgodark</name><user>auto-converted</user><email>volgodark@gmail.com</email></author></authors>
|
13 |
+
<date>2011-03-18</date>
|
14 |
+
<time>11:08:27</time>
|
15 |
+
<contents><target name="magelocale"><dir name="en_US"><file name="Magazento_Megamenu.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="magazento_megamenu.xml" hash="06df0da6ca87a2431eb395bdc7515bc0"/></dir><dir name="template"><dir name="magazento"><dir name="megamenu"><file name="navigation.phtml" hash="ae913a29706ed4463602ddf1930b1ee1"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="magazento"><dir name="megamenu"><dir name="img"><file name="drop.gif" hash="1be9ffe42c8d599225596272663e3e06"/><file name="drop.png" hash="4178363d189e1a18093bf7412a0b7808"/></dir><file name="menu.css" hash="1562c656f2e5ec05334984eb64d1f674"/><file name="menu_1.css" hash="b37e50d4b04fc4ee21bfafee8a5ef882"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Magazento"><dir name="Megamenu"><dir name="Block"><dir name="Admin"><dir name="Category"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="ae29814e184bde6a51d67758b0dea3d5"/><file name="Other.php" hash="d440a014b58f52858440cc1ad9f21d22"/></dir><file name="Form.php" hash="1ca0cba9f92e5e7dc2aae7e6687960cf"/><file name="Tabs.php" hash="23a9b98bd9280dafac550ae4b195946b"/></dir><dir name="Grid"><dir name="Renderer"><file name="Action.php" hash="9e321a6b0bc9a5693f67c261e6166cf5"/></dir></dir><file name="Edit.php" hash="6f105c018dc48a2d7c1f4ab93243350f"/><file name="Grid.php" hash="09a6119c0027d281b291d0735a1ee73d"/></dir><dir name="Item"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="ca52c55f14c73495699e0fe44a4d9682"/><file name="Other.php" hash="dd2e06290640a15d8632424d86dcce65"/></dir><file name="Form.php" hash="b248c109b2977a0bded8e52191f8e313"/><file name="Tabs.php" hash="f84fdc6b4881f27786c87eaee316ff4b"/></dir><dir name="Grid"><dir name="Renderer"><file name="Action.php" hash="579cdb91eccd2bcef1fd37cedf799a50"/></dir></dir><file name="Edit.php" hash="a7be290ac4b60d4002f0a03f4f9c1e9c"/><file name="Grid.php" hash="ee66eb6341ede748d5ea3057c832cd30"/></dir><file name="Category.php" hash="2fd77e63fc7a8f45369d6aa9175dcf69"/><file name="Item.php" hash="b6cb843fe7d97b5112a01e2d72a75061"/></dir><file name="Info.php" hash="b2181e885b75a82aba850cf0ec09fb3a"/><file name="Navigation.php" hash="5037ac56972329d17cafde85037ec747"/></dir><dir name="controllers"><dir name="Admin"><file name="CategoryController.php" hash="475da78f2d42270c54ebb27bfd4798e2"/><file name="ItemController.php" hash="8b4679f75a1ca678889f9e79f1e723f9"/></dir></dir><dir name="etc"><file name="config.xml" hash="ec01b41ed88ed85b4a96b44d143be761"/><file name="system.xml" hash="e43734a5eff66aa79d76a85fcd156e69"/></dir><dir name="Helper"><file name="Data.php" hash="ff7433273dbb1853482c957f53b813c2"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="915b23f542ef944f6e9449b5a96f5788"/></dir><dir name="Item"><file name="Collection.php" hash="2067d928e8f5744db24c28d97e76aee5"/></dir><file name="Category.php" hash="2bbf9b2c1b35ee57ef14f3d0d69b8fd5"/><file name="Item.php" hash="da38ba45e0bccab66ed42f0ef8898a97"/></dir><dir name="Source"><file name="Align.php" hash="4e2d27ab5c6202717029b1cfc120cdb8"/><file name="Maximumsubcat.php" hash="00e32eb57a9a8e62310f8eebfaef104f"/></dir><dir name="Wysiwyg"><file name="Config.php" hash="b1f067d61abf14d4a4e04863d4ab2bc6"/></dir><file name="Category.php" hash="e52eb8d7255d539e0a0aa73685af9b8f"/><file name="Data.php" hash="125b747101daf90a3abe8cfb1c096fe2"/><file name="Item.php" hash="4d3fdfb1813528295531fde507a5f72a"/></dir><dir name="sql"><dir name="megamenu_setup"><file name="mysql4-install-1.0.0.php" hash="56dd96e8154d4b6b6b814013a53eaecb"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magazento_Megamenu.xml" hash="467bcdd347e4cce9d11fc9ea39271bfa"/></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies/>
|
18 |
+
</package>
|
skin/frontend/default/default/magazento/megamenu/img/drop.gif
ADDED
Binary file
|
skin/frontend/default/default/magazento/megamenu/img/drop.png
ADDED
Binary file
|
skin/frontend/default/default/magazento/megamenu/menu.css
ADDED
@@ -0,0 +1,300 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*#menu li .level1 {padding-left: 2px;}
|
2 |
+
#menu li .level2 {padding-left: 4px;}
|
3 |
+
#menu li .level3 {padding-left: 6px;}*/
|
4 |
+
|
5 |
+
#menu {
|
6 |
+
list-style:none;
|
7 |
+
width: auto;
|
8 |
+
margin:0px auto 0px auto;
|
9 |
+
height:43px;
|
10 |
+
padding:0px 7px 0px 7px;
|
11 |
+
|
12 |
+
/* Rounded Corners */
|
13 |
+
/* -moz-border-radius: 10px;
|
14 |
+
-webkit-border-radius: 10px;
|
15 |
+
border-radius: 10px;*/
|
16 |
+
|
17 |
+
/* Background color and gradients */
|
18 |
+
|
19 |
+
background: #014464;
|
20 |
+
background: -moz-linear-gradient(top, #0272a7, #013953);
|
21 |
+
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#0272a7), to(#013953));
|
22 |
+
|
23 |
+
/* background: #014464;
|
24 |
+
background: -moz-linear-gradient(top, #333333, #111111);
|
25 |
+
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#333333), to(#111111));*/
|
26 |
+
|
27 |
+
/* Borders */
|
28 |
+
border: 1px solid #002232;
|
29 |
+
-moz-box-shadow:inset 0px 0px 1px #edf9ff;
|
30 |
+
-webkit-box-shadow:inset 0px 0px 1px #edf9ff;
|
31 |
+
box-shadow:inset 0px 0px 1px #edf9ff;
|
32 |
+
}
|
33 |
+
|
34 |
+
#menu li {
|
35 |
+
float:left;
|
36 |
+
display:block;
|
37 |
+
text-align:center;
|
38 |
+
position:relative;
|
39 |
+
padding: 4px 10px 4px 10px;
|
40 |
+
margin-right:0px;
|
41 |
+
/* margin-right:30px;*/
|
42 |
+
margin-top:7px;
|
43 |
+
border:none;
|
44 |
+
}
|
45 |
+
|
46 |
+
#menu li:hover {
|
47 |
+
border: 1px solid #777777;
|
48 |
+
padding: 4px 9px 4px 9px;
|
49 |
+
background: #F4F4F4;
|
50 |
+
background: -moz-linear-gradient(top, #F4F4F4, #EEEEEE);
|
51 |
+
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F4F4F4), to(#EEEEEE));
|
52 |
+
|
53 |
+
/* Rounded corners */
|
54 |
+
-moz-border-radius: 5px 5px 0px 0px;
|
55 |
+
-webkit-border-radius: 5px 5px 0px 0px;
|
56 |
+
border-radius: 5px 5px 0px 0px;
|
57 |
+
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
|
62 |
+
.level1 {font-size:14px; padding-left: 2px;border-bottom:1px solid #888888;}
|
63 |
+
.level2 {font-size:12px; padding-left: 6px;}
|
64 |
+
.level3 {font-size:12px; padding-left: 10px;}
|
65 |
+
.level4 {font-size:9px; padding-left: 12px;}
|
66 |
+
.level5 {font-size:9px; padding-left: 14px;}
|
67 |
+
.level6 {font-size:9px; padding-left: 16px;}
|
68 |
+
.level7 {font-size:9px; padding-left: 18px;}
|
69 |
+
.level8 {font-size:9px; padding-left: 20px;}
|
70 |
+
#menu.simple li a {
|
71 |
+
font-size:14px;
|
72 |
+
}
|
73 |
+
#menu li a {
|
74 |
+
font-family:Arial, Helvetica, sans-serif;
|
75 |
+
font-size:14px;
|
76 |
+
color: #EEEEEE;
|
77 |
+
display:block;
|
78 |
+
outline:0;
|
79 |
+
text-decoration:none;
|
80 |
+
text-shadow: 1px 1px 1px #000;
|
81 |
+
}
|
82 |
+
|
83 |
+
#menu li:hover a {
|
84 |
+
color:#161616;
|
85 |
+
text-shadow: 1px 1px 1px #ffffff;
|
86 |
+
}
|
87 |
+
#menu li .drop {
|
88 |
+
padding-right:21px;
|
89 |
+
background:url("img/drop.png") no-repeat right 8px;
|
90 |
+
}
|
91 |
+
#menu li:hover .drop {
|
92 |
+
background:url("img/drop.gif") no-repeat right 7px;
|
93 |
+
}
|
94 |
+
|
95 |
+
.dropdown_1column,
|
96 |
+
.dropdown_1column_simple,
|
97 |
+
.dropdown_2column,
|
98 |
+
.dropdown_3column,
|
99 |
+
.dropdown_4column,
|
100 |
+
.dropdown_5column {
|
101 |
+
z-index: 9999;
|
102 |
+
margin:4px auto;
|
103 |
+
float:left;
|
104 |
+
position:absolute;
|
105 |
+
left:-999em; /* Hides the drop down */
|
106 |
+
text-align:left;
|
107 |
+
padding:10px 5px 10px 5px;
|
108 |
+
border:1px solid #777777;
|
109 |
+
border-top:none;
|
110 |
+
|
111 |
+
/* Gradient background */
|
112 |
+
background:#F4F4F4;
|
113 |
+
background: -moz-linear-gradient(top, #EEEEEE, #AAAAAA);
|
114 |
+
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#EEEEEE), to(#AAAAAA));
|
115 |
+
|
116 |
+
/* Rounded Corners */
|
117 |
+
-moz-border-radius: 0px 5px 5px 5px;
|
118 |
+
-webkit-border-radius: 0px 5px 5px 5px;
|
119 |
+
border-radius: 0px 5px 5px 5px;
|
120 |
+
}
|
121 |
+
|
122 |
+
.dropdown_1column_simple {width: 100px;}
|
123 |
+
.dropdown_1column {width: 120px;}
|
124 |
+
.dropdown_2column {width: 260px;}
|
125 |
+
.dropdown_3column {width: 380px;}
|
126 |
+
.dropdown_4column {width: 460px;}
|
127 |
+
.dropdown_5column {width: 580px;}
|
128 |
+
|
129 |
+
.col_1 {width:105px;}
|
130 |
+
.col_2 {width:240px;}
|
131 |
+
.col_3 {width:360px;}
|
132 |
+
.col_4 {width:440px;}
|
133 |
+
.col_5 {width:560px;}
|
134 |
+
|
135 |
+
.col_1,.col_2,.col_3,.col_4,.col_5 {
|
136 |
+
display:inline;
|
137 |
+
float: left;
|
138 |
+
position: relative;
|
139 |
+
margin-left: 5px;
|
140 |
+
margin-right: 5px;
|
141 |
+
/* border: 1px solid #000;*/
|
142 |
+
}
|
143 |
+
|
144 |
+
#menu li:hover .dropdown_1column,#menu li:hover .dropdown_2column,
|
145 |
+
#menu li:hover .dropdown_3column,#menu li:hover .dropdown_4column,
|
146 |
+
#menu li:hover .dropdown_5column {
|
147 |
+
left:-1px;
|
148 |
+
top:auto;
|
149 |
+
}
|
150 |
+
|
151 |
+
|
152 |
+
#menu .menu_right {
|
153 |
+
float:right;
|
154 |
+
margin-right:0px;
|
155 |
+
}
|
156 |
+
#menu li .align_right {
|
157 |
+
/* Rounded Corners */
|
158 |
+
-moz-border-radius: 5px 0px 5px 5px;
|
159 |
+
-webkit-border-radius: 5px 0px 5px 5px;
|
160 |
+
border-radius: 5px 0px 5px 5px;
|
161 |
+
}
|
162 |
+
|
163 |
+
#menu li:hover .align_right {
|
164 |
+
left:auto;
|
165 |
+
right:-1px;
|
166 |
+
top:auto;
|
167 |
+
}
|
168 |
+
|
169 |
+
#menu p, #menu h2, #menu h3, #menu ul li {
|
170 |
+
font-family:Arial, Helvetica, sans-serif;
|
171 |
+
line-height:21px;
|
172 |
+
font-size:12px;
|
173 |
+
text-align:left;
|
174 |
+
text-shadow: 1px 1px 1px #FFFFFF;
|
175 |
+
}
|
176 |
+
#menu h2 {
|
177 |
+
font-size:21px;
|
178 |
+
font-weight:400;
|
179 |
+
letter-spacing:-1px;
|
180 |
+
margin:7px 0 8px 0;
|
181 |
+
padding-bottom:1px;
|
182 |
+
border-bottom:1px solid #666666;
|
183 |
+
}
|
184 |
+
#menu h3 {
|
185 |
+
font-size:14px;
|
186 |
+
margin:7px 0 8px 0;
|
187 |
+
padding-bottom:1px;
|
188 |
+
border-bottom:1px solid #888888;
|
189 |
+
}
|
190 |
+
#menu p {
|
191 |
+
line-height:18px;
|
192 |
+
margin:0 0 10px 0;
|
193 |
+
}
|
194 |
+
|
195 |
+
#menu li:hover div a {
|
196 |
+
font-size:12px;
|
197 |
+
color:#015b86;
|
198 |
+
}
|
199 |
+
#menu li:hover div a:hover {
|
200 |
+
color:#029feb;
|
201 |
+
}
|
202 |
+
|
203 |
+
|
204 |
+
.strong {
|
205 |
+
font-weight:bold;
|
206 |
+
}
|
207 |
+
.italic {
|
208 |
+
font-style:italic;
|
209 |
+
}
|
210 |
+
|
211 |
+
.imgshadow { Better style on light background
|
212 |
+
background:#FFFFFF;
|
213 |
+
padding:4px;
|
214 |
+
border:1px solid #777777;
|
215 |
+
margin-top:5px;
|
216 |
+
-moz-box-shadow:0px 0px 5px #666666;
|
217 |
+
-webkit-box-shadow:0px 0px 5px #666666;
|
218 |
+
box-shadow:0px 0px 5px #666666;
|
219 |
+
}
|
220 |
+
.img_left { Image sticks to the left
|
221 |
+
width:auto;
|
222 |
+
float:left;
|
223 |
+
margin:5px 15px 5px 5px;
|
224 |
+
}
|
225 |
+
|
226 |
+
#menu li .black_box {
|
227 |
+
background-color:#333333;
|
228 |
+
color: #eeeeee;
|
229 |
+
text-shadow: 1px 1px 1px #000;
|
230 |
+
padding:4px 6px 4px 6px;
|
231 |
+
|
232 |
+
Rounded Corners
|
233 |
+
-moz-border-radius: 5px;
|
234 |
+
-webkit-border-radius: 5px;
|
235 |
+
border-radius: 5px;
|
236 |
+
|
237 |
+
Shadow
|
238 |
+
-webkit-box-shadow:inset 0 0 3px #000000;
|
239 |
+
-moz-box-shadow:inset 0 0 3px #000000;
|
240 |
+
box-shadow:inset 0 0 3px #000000;
|
241 |
+
}
|
242 |
+
|
243 |
+
#menu li ul {
|
244 |
+
list-style:none;
|
245 |
+
padding:0;
|
246 |
+
margin:0 0 2px 0;
|
247 |
+
}
|
248 |
+
#menu li ul li {
|
249 |
+
font-size:12px;
|
250 |
+
line-height:24px;
|
251 |
+
position:relative;
|
252 |
+
text-shadow: 1px 1px 1px #ffffff;
|
253 |
+
padding:0;
|
254 |
+
margin:0;
|
255 |
+
float:none;
|
256 |
+
text-align:left;
|
257 |
+
width:130px;
|
258 |
+
}
|
259 |
+
#menu li ul li:hover {
|
260 |
+
background:none;
|
261 |
+
border:none;
|
262 |
+
padding:0;
|
263 |
+
margin:0;
|
264 |
+
}
|
265 |
+
|
266 |
+
#menu li .greybox li {
|
267 |
+
background:#F4F4F4;
|
268 |
+
border:1px solid #bbbbbb;
|
269 |
+
margin:0px 0px 4px 0px;
|
270 |
+
padding:4px 6px 4px 6px;
|
271 |
+
width:116px;
|
272 |
+
|
273 |
+
/* Rounded Corners */
|
274 |
+
/* -moz-border-radius: 5px;
|
275 |
+
-webkit-border-radius: 5px;
|
276 |
+
-khtml-border-radius: 5px;
|
277 |
+
border-radius: 5px;*/
|
278 |
+
}
|
279 |
+
#menu li .greybox li:hover {
|
280 |
+
background:#ffffff;
|
281 |
+
border:1px solid #aaaaaa;
|
282 |
+
padding:4px 6px 4px 6px;
|
283 |
+
margin:0px 0px 4px 0px;
|
284 |
+
}
|
285 |
+
|
286 |
+
|
287 |
+
/*
|
288 |
+
SIMPLE RIGHT
|
289 |
+
*/
|
290 |
+
|
291 |
+
|
292 |
+
#menu li:hover .simple li a {
|
293 |
+
/* padding-left: 2px;*/
|
294 |
+
font-size:14px;
|
295 |
+
/* font-weight:400;*/
|
296 |
+
/* letter-spacing:-1px;*/
|
297 |
+
/* margin:7px 0 14px 0;*/
|
298 |
+
/* padding-bottom:14px;*/
|
299 |
+
/* border-bottom:1px solid #666666;*/
|
300 |
+
}
|
skin/frontend/default/default/magazento/megamenu/menu_1.css
ADDED
@@ -0,0 +1,254 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/*#menu li .level1 {padding-left: 2px;}
|
2 |
+
#menu li .level2 {padding-left: 4px;}
|
3 |
+
#menu li .level3 {padding-left: 6px;}*/
|
4 |
+
|
5 |
+
#menu {
|
6 |
+
list-style:none;
|
7 |
+
width: auto;
|
8 |
+
margin:0px auto 0px auto;
|
9 |
+
height:43px;
|
10 |
+
padding:0px 7px 0px 7px;
|
11 |
+
|
12 |
+
-moz-border-radius: 10px;
|
13 |
+
-webkit-border-radius: 10px;
|
14 |
+
border-radius: 10px;
|
15 |
+
|
16 |
+
border: 1px solid #002232;
|
17 |
+
|
18 |
+
-moz-box-shadow:inset 0px 0px 1px #edf9ff;
|
19 |
+
-webkit-box-shadow:inset 0px 0px 1px #edf9ff;
|
20 |
+
box-shadow:inset 0px 0px 1px #edf9ff;
|
21 |
+
}
|
22 |
+
|
23 |
+
#menu li {
|
24 |
+
float:left;
|
25 |
+
display:block;
|
26 |
+
text-align:center;
|
27 |
+
position:relative;
|
28 |
+
padding: 4px 10px 4px 10px;
|
29 |
+
margin-right:0px;
|
30 |
+
/* margin-right:30px;*/
|
31 |
+
margin-top:7px;
|
32 |
+
border:none;
|
33 |
+
}
|
34 |
+
|
35 |
+
#menu li:hover {
|
36 |
+
border: 1px solid #777777;
|
37 |
+
padding: 4px 9px 4px 9px;
|
38 |
+
background: #F4F4F4;
|
39 |
+
background: -moz-linear-gradient(top, #F4F4F4, #EEEEEE);
|
40 |
+
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F4F4F4), to(#EEEEEE));
|
41 |
+
}
|
42 |
+
|
43 |
+
a .level1 {
|
44 |
+
font-size:14px;
|
45 |
+
padding-bottom: 0px;
|
46 |
+
border-bottom:1px solid #888888;
|
47 |
+
}
|
48 |
+
|
49 |
+
#menu.simple li a {
|
50 |
+
font-size:14px;
|
51 |
+
}
|
52 |
+
#menu li a {
|
53 |
+
font-family:Arial, Helvetica, sans-serif;
|
54 |
+
font-size:14px;
|
55 |
+
color: #EEEEEE;
|
56 |
+
display:block;
|
57 |
+
outline:0;
|
58 |
+
text-decoration:none;
|
59 |
+
text-shadow: 1px 1px 1px #000;
|
60 |
+
}
|
61 |
+
|
62 |
+
#menu li:hover a {
|
63 |
+
color:#161616;
|
64 |
+
text-shadow: 1px 1px 1px #ffffff;
|
65 |
+
}
|
66 |
+
#menu li .drop {
|
67 |
+
padding-right:21px;
|
68 |
+
background:url("img/drop.png") no-repeat right 8px;
|
69 |
+
}
|
70 |
+
#menu li:hover .drop {
|
71 |
+
background:url("img/drop.png") no-repeat right 7px;
|
72 |
+
}
|
73 |
+
|
74 |
+
.dropdown_1column,
|
75 |
+
.dropdown_2column,
|
76 |
+
.dropdown_3column,
|
77 |
+
.dropdown_4column,
|
78 |
+
.dropdown_5column {
|
79 |
+
margin:4px auto;
|
80 |
+
float:left;
|
81 |
+
position:absolute;
|
82 |
+
left:-999em; /* Hides the drop down */
|
83 |
+
text-align:left;
|
84 |
+
padding:10px 5px 10px 5px;
|
85 |
+
border:1px solid #777777;
|
86 |
+
border-top:none;
|
87 |
+
|
88 |
+
/* Gradient background */
|
89 |
+
background:#F4F4F4;
|
90 |
+
background: -moz-linear-gradient(top, #EEEEEE, #BBBBBB);
|
91 |
+
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#EEEEEE), to(#BBBBBB));
|
92 |
+
}
|
93 |
+
|
94 |
+
.dropdown_1column {width: 150px;}
|
95 |
+
.dropdown_2column {width: 240px;}
|
96 |
+
.dropdown_3column {width: 360px;}
|
97 |
+
.dropdown_4column {width: 440px;}
|
98 |
+
.dropdown_5column {width: 560px;}
|
99 |
+
|
100 |
+
#menu li:hover .dropdown_1column,
|
101 |
+
#menu li:hover .dropdown_2column,
|
102 |
+
#menu li:hover .dropdown_3column,
|
103 |
+
#menu li:hover .dropdown_4column,
|
104 |
+
#menu li:hover .dropdown_5column {
|
105 |
+
left:-1px;
|
106 |
+
top:auto;
|
107 |
+
}
|
108 |
+
|
109 |
+
.col_1,
|
110 |
+
.col_2,
|
111 |
+
.col_3,
|
112 |
+
.col_4,
|
113 |
+
.col_5 {
|
114 |
+
display:inline;
|
115 |
+
float: left;
|
116 |
+
position: relative;
|
117 |
+
margin-left: 5px;
|
118 |
+
margin-right: 5px;
|
119 |
+
}
|
120 |
+
.col_1 {width:100px;}
|
121 |
+
.col_2 {width:200px;}
|
122 |
+
.col_3 {width:300px;}
|
123 |
+
.col_4 {width:400px;}
|
124 |
+
.col_5 {width:500px;}
|
125 |
+
|
126 |
+
#menu .menu_right {
|
127 |
+
float:right;
|
128 |
+
margin-right:0px;
|
129 |
+
}
|
130 |
+
#menu li .align_right {
|
131 |
+
/* Rounded Corners */
|
132 |
+
-moz-border-radius: 5px 0px 5px 5px;
|
133 |
+
-webkit-border-radius: 5px 0px 5px 5px;
|
134 |
+
border-radius: 5px 0px 5px 5px;
|
135 |
+
}
|
136 |
+
|
137 |
+
#menu li:hover .align_right {
|
138 |
+
left:auto;
|
139 |
+
right:-1px;
|
140 |
+
top:auto;
|
141 |
+
}
|
142 |
+
|
143 |
+
#menu p, #menu h2, #menu h3, #menu ul li {
|
144 |
+
font-family:Arial, Helvetica, sans-serif;
|
145 |
+
line-height:21px;
|
146 |
+
font-size:12px;
|
147 |
+
text-align:left;
|
148 |
+
text-shadow: 1px 1px 1px #FFFFFF;
|
149 |
+
}
|
150 |
+
#menu h2 {
|
151 |
+
font-size:21px;
|
152 |
+
font-weight:400;
|
153 |
+
letter-spacing:-1px;
|
154 |
+
margin:7px 0 14px 0;
|
155 |
+
padding-bottom:14px;
|
156 |
+
border-bottom:1px solid #666666;
|
157 |
+
}
|
158 |
+
#menu h3 {
|
159 |
+
font-size:14px;
|
160 |
+
margin:7px 0 14px 0;
|
161 |
+
padding-bottom:7px;
|
162 |
+
border-bottom:1px solid #888888;
|
163 |
+
}
|
164 |
+
#menu p {
|
165 |
+
line-height:18px;
|
166 |
+
margin:0 0 10px 0;
|
167 |
+
}
|
168 |
+
#menu li:hover div a {
|
169 |
+
font-size:12px;
|
170 |
+
color:#015b86;
|
171 |
+
}
|
172 |
+
#menu li:hover div a:hover {
|
173 |
+
color:#029feb;
|
174 |
+
}
|
175 |
+
.strong {
|
176 |
+
font-weight:bold;
|
177 |
+
}
|
178 |
+
.italic {
|
179 |
+
font-style:italic;
|
180 |
+
}
|
181 |
+
.imgshadow { /* Better style on light background */
|
182 |
+
background:#FFFFFF;
|
183 |
+
padding:4px;
|
184 |
+
border:1px solid #777777;
|
185 |
+
margin-top:5px;
|
186 |
+
-moz-box-shadow:0px 0px 5px #666666;
|
187 |
+
-webkit-box-shadow:0px 0px 5px #666666;
|
188 |
+
box-shadow:0px 0px 5px #666666;
|
189 |
+
}
|
190 |
+
.img_left { /* Image sticks to the left */
|
191 |
+
width:auto;
|
192 |
+
float:left;
|
193 |
+
margin:5px 15px 5px 5px;
|
194 |
+
}
|
195 |
+
|
196 |
+
#menu li .black_box {
|
197 |
+
background-color:#333333;
|
198 |
+
color: #eeeeee;
|
199 |
+
text-shadow: 1px 1px 1px #000;
|
200 |
+
padding:4px 6px 4px 6px;
|
201 |
+
|
202 |
+
/* Rounded Corners */
|
203 |
+
-moz-border-radius: 5px;
|
204 |
+
-webkit-border-radius: 5px;
|
205 |
+
border-radius: 5px;
|
206 |
+
|
207 |
+
/* Shadow */
|
208 |
+
-webkit-box-shadow:inset 0 0 3px #000000;
|
209 |
+
-moz-box-shadow:inset 0 0 3px #000000;
|
210 |
+
box-shadow:inset 0 0 3px #000000;
|
211 |
+
}
|
212 |
+
|
213 |
+
#menu li ul {
|
214 |
+
list-style:none;
|
215 |
+
padding:0;
|
216 |
+
margin:0 0 12px 0;
|
217 |
+
}
|
218 |
+
#menu li ul li {
|
219 |
+
font-size:12px;
|
220 |
+
line-height:24px;
|
221 |
+
position:relative;
|
222 |
+
text-shadow: 1px 1px 1px #ffffff;
|
223 |
+
padding:0;
|
224 |
+
margin:0;
|
225 |
+
float:none;
|
226 |
+
text-align:left;
|
227 |
+
width:130px;
|
228 |
+
}
|
229 |
+
#menu li ul li:hover {
|
230 |
+
background:none;
|
231 |
+
border:none;
|
232 |
+
padding:0;
|
233 |
+
margin:0;
|
234 |
+
}
|
235 |
+
|
236 |
+
#menu li .greybox li {
|
237 |
+
background:#F4F4F4;
|
238 |
+
border:1px solid #bbbbbb;
|
239 |
+
margin:0px 0px 4px 0px;
|
240 |
+
padding:4px 6px 4px 6px;
|
241 |
+
width:116px;
|
242 |
+
|
243 |
+
/* Rounded Corners */
|
244 |
+
-moz-border-radius: 5px;
|
245 |
+
-webkit-border-radius: 5px;
|
246 |
+
-khtml-border-radius: 5px;
|
247 |
+
border-radius: 5px;
|
248 |
+
}
|
249 |
+
#menu li .greybox li:hover {
|
250 |
+
background:#ffffff;
|
251 |
+
border:1px solid #aaaaaa;
|
252 |
+
padding:4px 6px 4px 6px;
|
253 |
+
margin:0px 0px 4px 0px;
|
254 |
+
}
|