Version Notes
First Release
Download this release
Release Info
Developer | JoomlArt |
Extension | JoomlartMegaMenu |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu.php +33 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu/Edit.php +261 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu/Edit/Form.php +26 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu/Edit/Tab/Form.php +314 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu/Edit/Tabs.php +29 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu/Grid.php +141 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup.php +30 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup/Edit.php +62 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup/Edit/Form.php +26 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup/Edit/Tab/Form.php +71 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup/Edit/Tabs.php +29 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup/Grid.php +76 -0
- app/code/local/Wavethemes/Jmmegamenu/Block/Jmmegamenu.php +94 -0
- app/code/local/Wavethemes/Jmmegamenu/Helper/Data.php +232 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Jmmegamenu.php +18 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Jmmegamenugroup.php +18 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Jmmegamenustoregroup.php +18 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Listmenugroup.php +23 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenu.php +17 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenu/Collection.php +18 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenugroup.php +28 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenugroup/Collection.php +29 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenustoregroup.php +17 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenustoregroup/Collection.php +18 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Observer.php +88 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/Status.php +24 -0
- app/code/local/Wavethemes/Jmmegamenu/Model/System/Config/Source/ListAnimationType.php +34 -0
- app/code/local/Wavethemes/Jmmegamenu/controllers/Adminhtml/JmmegamenuController.php +450 -0
- app/code/local/Wavethemes/Jmmegamenu/controllers/IndexController.php +20 -0
- app/code/local/Wavethemes/Jmmegamenu/etc/adminhtml.xml +31 -0
- app/code/local/Wavethemes/Jmmegamenu/etc/config.xml +191 -0
- app/code/local/Wavethemes/Jmmegamenu/etc/system.xml +51 -0
- app/code/local/Wavethemes/Jmmegamenu/sql/jmmegamenu_setup/mysql4-install-0.1.0.php +73 -0
- app/code/local/Wavethemes/Jmmegamenu/sql/jmmegamenu_setup/mysql4-upgrade-0.1.0-0.1.1.php +9 -0
- app/design/adminhtml/default/default/layout/jmmegamenu.xml +18 -0
- app/design/adminhtml/default/default/template/widget/gridmenu.phtml +229 -0
- app/design/frontend/base/default/template/joomlart/jmmegamenu/output.phtml +4 -0
- app/design/frontend/default/default/layout/jmmegamenu.xml +14 -0
- app/etc/modules/Wavethemes_Jmmegamenu.xml +10 -0
- app/locale/en_US/Wavethemes_Jmmegamenu.csv +6 -0
- js/joomlart/jmmegamenu/event.simulate.js +66 -0
- lib/megamenu/mega.class.php +485 -0
- package.xml +22 -0
- skin/frontend/default/default/joomlart/jmmegamenu/css/jmmegamenu.css +788 -0
- skin/frontend/default/default/joomlart/jmmegamenu/images/arrow.gif +0 -0
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu.php
ADDED
@@ -0,0 +1,33 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenu extends Mage_Adminhtml_Block_Widget_Grid_Container
|
12 |
+
{
|
13 |
+
public function __construct()
|
14 |
+
{
|
15 |
+
$this->_controller = 'adminhtml_jmmegamenu';
|
16 |
+
$this->_blockGroup = 'jmmegamenu';
|
17 |
+
$groupid = $this->getRequest()->getParam('groupid');
|
18 |
+
$group = Mage::getModel('jmmegamenu/jmmegamenugroup')->load($groupid);
|
19 |
+
$this->_headerText = Mage::helper('jmmegamenu')->__('Item Manager for '.$group->gettitle());
|
20 |
+
$this->_addButtonLabel = Mage::helper('jmmegamenu')->__('Add Menu Item');
|
21 |
+
|
22 |
+
parent::__construct();
|
23 |
+
}
|
24 |
+
|
25 |
+
public function getCreateUrl()
|
26 |
+
{
|
27 |
+
$groupid = $this->getRequest()->getParam('groupid');
|
28 |
+
|
29 |
+
return $this->getUrl('*/*/new/',array("groupid" => $groupid));
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
|
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu/Edit.php
ADDED
@@ -0,0 +1,261 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
|
12 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenu_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
13 |
+
{
|
14 |
+
public function __construct()
|
15 |
+
{
|
16 |
+
parent::__construct();
|
17 |
+
$this->_objectId = 'id';
|
18 |
+
$this->_blockGroup = 'jmmegamenu';
|
19 |
+
$this->_controller = 'adminhtml_jmmegamenu';
|
20 |
+
$this->_updateButton('save', 'label', Mage::helper('jmmegamenu')->__('Save Menu Item'));
|
21 |
+
$this->_updateButton('delete', 'label', Mage::helper('jmmegamenu')->__('Delete Menu Item'));
|
22 |
+
$this->_updateButton('back', array('label' => Mage::helper('jmmegamenu')->__('back to group')));
|
23 |
+
$this->_addButton('saveandcontinue', array(
|
24 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
25 |
+
'onclick' => 'saveAndContinueEdit()',
|
26 |
+
'class' => 'save',
|
27 |
+
), -100);
|
28 |
+
|
29 |
+
//The root category id of default store
|
30 |
+
$parent = Mage::app()->getWebsite(true)->getDefaultStore()->getRootCategoryId();
|
31 |
+
$helper = Mage::helper('jmmegamenu');
|
32 |
+
/**
|
33 |
+
* Check if parent node of the store still exists
|
34 |
+
*/
|
35 |
+
$category = Mage::getModel('catalog/category');
|
36 |
+
/* @var $category Mage_Catalog_Model_Category */
|
37 |
+
if ($category->checkId($parent)) {
|
38 |
+
|
39 |
+
$recursionLevel = max(0, (int) Mage::app()->getWebsite(true)->getDefaultStore()->getConfig('catalog/navigation/max_depth'));
|
40 |
+
$storeCategories = $category->getCategories($parent, $recursionLevel, false, true, true);
|
41 |
+
|
42 |
+
$storeCategories = $storeCategories->load()->addAttributeToSelect("*");
|
43 |
+
|
44 |
+
//categories list
|
45 |
+
$catlist = $helper->getoutputList($parent,$storeCategories,"name","entity_id","parent_id");
|
46 |
+
$clist = "var mycats = new Array(); \n";
|
47 |
+
|
48 |
+
foreach($catlist as $id => $cat){
|
49 |
+
$category = Mage::getModel('catalog/category')->load($id);
|
50 |
+
$url = $category->getUrl();
|
51 |
+
|
52 |
+
$clist .= "mycats['".$url."'] = ".$id."\n";
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
if(Mage::getStoreConfig("web/secure/use_in_adminhtml")){
|
57 |
+
$baseurl = Mage::getStoreConfig("web/secure/base_url");
|
58 |
+
}else{
|
59 |
+
$baseurl = Mage::getBaseUrl();
|
60 |
+
}
|
61 |
+
if(!strpos($baseurl,"index.php")) $baseurl .= "index.php/";
|
62 |
+
$this->getUrl('*/*/index', array('groupid' => $this->getRequest()->getParam('id')));
|
63 |
+
// print_r(Mage::registry('jmmegamenu_data')->getData());die();
|
64 |
+
|
65 |
+
$this->_formScripts[] = "
|
66 |
+
var baseurl = '".$baseurl."';
|
67 |
+
".$clist.";
|
68 |
+
function saveAndContinueEdit(){
|
69 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
70 |
+
}
|
71 |
+
|
72 |
+
function updateurl(url){
|
73 |
+
url = url.replace(baseurl,'');
|
74 |
+
$('url').setValue(url);
|
75 |
+
}
|
76 |
+
|
77 |
+
function updatecatid(id){
|
78 |
+
$('catid').setValue(id);
|
79 |
+
}
|
80 |
+
|
81 |
+
function getStatics()
|
82 |
+
{
|
83 |
+
var Form = document.forms.edit_form;
|
84 |
+
|
85 |
+
var statics = '';
|
86 |
+
var x = 0;
|
87 |
+
var first = 1;
|
88 |
+
for (x=0;x<Form.staticblocks.length;x++)
|
89 |
+
{
|
90 |
+
|
91 |
+
if (Form.staticblocks[x].selected)
|
92 |
+
{
|
93 |
+
if(first) {
|
94 |
+
first = 0;
|
95 |
+
}else{
|
96 |
+
statics = statics + ',';
|
97 |
+
}
|
98 |
+
statics = statics + Form.staticblocks[x].value ;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
return statics;
|
103 |
+
}
|
104 |
+
|
105 |
+
function setStatics(exstring)
|
106 |
+
{
|
107 |
+
|
108 |
+
var Form = document.forms.edit_form;
|
109 |
+
var y = 0;
|
110 |
+
var arr = exstring.split(',');
|
111 |
+
|
112 |
+
for(y=0;y<$('staticblocks').length;y++)
|
113 |
+
{
|
114 |
+
arr.each(function(value){
|
115 |
+
if($('staticblocks')[y].value == value) $('staticblocks')[y].selected = true
|
116 |
+
})
|
117 |
+
}
|
118 |
+
|
119 |
+
return true;
|
120 |
+
}
|
121 |
+
|
122 |
+
|
123 |
+
var first = 1;
|
124 |
+
$('menugroup').observe('change',function(){
|
125 |
+
|
126 |
+
group = $('menugroup');
|
127 |
+
category = $('category');
|
128 |
+
cms = $('cms');
|
129 |
+
order = $('parent');
|
130 |
+
groupurl = baseurl+'/jmmegamenu/adminhtml_jmmegamenu/ajax?menugroup='+group.getValue()+'&menuid='+$('menu_id').getValue();
|
131 |
+
groupurl = groupurl+'&activecat='+category.getValue();
|
132 |
+
new Ajax.Request(groupurl, {
|
133 |
+
onSuccess: function(response) {
|
134 |
+
// Handle the response content...
|
135 |
+
var response = response.responseText.evalJSON();
|
136 |
+
|
137 |
+
parentcategory = category.up('td');
|
138 |
+
parentcms = cms.up('td');
|
139 |
+
parentorder = order.up('td');
|
140 |
+
Element.remove(category);
|
141 |
+
Element.remove(cms);
|
142 |
+
Element.remove(order);
|
143 |
+
parentcategory.insert(response.category);
|
144 |
+
parentcms.insert(response.cmspage);
|
145 |
+
parentorder.insert(response.parent);
|
146 |
+
//rebind change event for the category select
|
147 |
+
|
148 |
+
$('category').observe('change',function(){
|
149 |
+
$('link').setValue($('category').getValue());
|
150 |
+
updatecatid(mycats[$('link').getValue()]);
|
151 |
+
updateurl($('link').getValue());
|
152 |
+
});
|
153 |
+
|
154 |
+
$('cms').observe('change',function(){
|
155 |
+
$('link').setValue($('cms').getValue());
|
156 |
+
updateurl($('link').getValue());
|
157 |
+
});
|
158 |
+
},
|
159 |
+
'Content-type':'application/json'
|
160 |
+
});
|
161 |
+
|
162 |
+
});
|
163 |
+
$('menutype').observe('change',function(){
|
164 |
+
|
165 |
+
type = $('menutype');
|
166 |
+
if(first){
|
167 |
+
first = 0;
|
168 |
+
}else{
|
169 |
+
$('link').value = '';
|
170 |
+
}
|
171 |
+
$('link').setStyle({'opacity':0.3});
|
172 |
+
if($(type).getValue() == 2){
|
173 |
+
$('category').up('tr').setStyle({'display':'none'});
|
174 |
+
$('cms').up('tr').setStyle({'display':'none'});
|
175 |
+
$('link').removeAttribute('readonly');
|
176 |
+
$('link').setStyle({'opacity':1});
|
177 |
+
}else if($(type).getValue() == 0){
|
178 |
+
$('cms').up('tr').setStyle({'display':'none'});
|
179 |
+
$('category').up('tr').setStyle({'display':''});
|
180 |
+
$('category').simulate('change');
|
181 |
+
$('link').setAttribute('readonly','true');
|
182 |
+
}else if($(type).getValue() == 1){
|
183 |
+
$('category').up('tr').setStyle({'display':'none'});
|
184 |
+
$('cms').up('tr').setStyle({'display':''});
|
185 |
+
$('cms').simulate('change');
|
186 |
+
$('link').setAttribute('readonly','true');
|
187 |
+
}
|
188 |
+
|
189 |
+
});
|
190 |
+
$('category').observe('change',function(){
|
191 |
+
$('link').setValue($('category').getValue());
|
192 |
+
updatecatid(mycats[$('link').getValue()]);
|
193 |
+
updateurl($('link').getValue());
|
194 |
+
});
|
195 |
+
$('menugroup').simulate('change');
|
196 |
+
$('cms').observe('change',function(){
|
197 |
+
$('link').setValue($('cms').getValue());
|
198 |
+
updateurl($('link').getValue());
|
199 |
+
});
|
200 |
+
$('menutype').simulate('change');
|
201 |
+
|
202 |
+
$('staticblocks').observe('change',function(){
|
203 |
+
$('static_block').setValue(getStatics());
|
204 |
+
});
|
205 |
+
|
206 |
+
setStatics($('static_block').getValue());
|
207 |
+
$$('.mega_subcontent').each(function(item){
|
208 |
+
|
209 |
+
|
210 |
+
$(item).observe('click',function(){
|
211 |
+
var itemvalue = $(item).getValue();
|
212 |
+
if(itemvalue == 1){
|
213 |
+
$('staticblocks').up('tr').setStyle({'display':'none'});
|
214 |
+
$('contentxml').up('tr').setStyle({'display':'none'});
|
215 |
+
}else if(itemvalue == 2){
|
216 |
+
$('staticblocks').up('tr').setStyle({'display':'none'});
|
217 |
+
$('contentxml').up('tr').setStyle({'display':''});
|
218 |
+
}else{
|
219 |
+
$('staticblocks').up('tr').setStyle({'display':''});
|
220 |
+
$('contentxml').up('tr').setStyle({'display':'none'});
|
221 |
+
}
|
222 |
+
|
223 |
+
});
|
224 |
+
|
225 |
+
if($(item).getValue() !== null){
|
226 |
+
$(item).simulate('click');
|
227 |
+
}
|
228 |
+
|
229 |
+
})
|
230 |
+
|
231 |
+
";
|
232 |
+
}
|
233 |
+
|
234 |
+
public function getHeaderText()
|
235 |
+
{
|
236 |
+
if( Mage::registry('jmmegamenu_data') && Mage::registry('jmmegamenu_data')->getId() ) {
|
237 |
+
return Mage::helper('jmmegamenu')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('jmmegamenu_data')->getTitle()));
|
238 |
+
} else {
|
239 |
+
return Mage::helper('jmmegamenu')->__('Add Menu Item');
|
240 |
+
}
|
241 |
+
|
242 |
+
}
|
243 |
+
|
244 |
+
public function getBackUrl()
|
245 |
+
{
|
246 |
+
|
247 |
+
if(Mage::registry('jmmegamenu_data')){
|
248 |
+
$groupid = Mage::registry('jmmegamenu_data')->getData("menugroup");
|
249 |
+
}
|
250 |
+
if(!$groupid) $groupid = Mage::app()->getRequest()->getParam('groupid');
|
251 |
+
return $this->getUrl('*/*/index/groupid/'.$groupid);
|
252 |
+
}
|
253 |
+
public function getDeleteUrl()
|
254 |
+
{
|
255 |
+
if(Mage::registry('jmmegamenu_data')){
|
256 |
+
$groupid = Mage::registry('jmmegamenu_data')->getData("menugroup");
|
257 |
+
}
|
258 |
+
if(!$groupid) $groupid = Mage::app()->getRequest()->getParam('groupid');
|
259 |
+
return $this->getUrl('*/*/delete', array($this->_objectId => $this->getRequest()->getParam($this->_objectId),"group" => $groupid));
|
260 |
+
}
|
261 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu/Edit/Form.php
ADDED
@@ -0,0 +1,26 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenu_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
12 |
+
{
|
13 |
+
protected function _prepareForm()
|
14 |
+
{
|
15 |
+
$form = new Varien_Data_Form(array(
|
16 |
+
'id' => 'edit_form',
|
17 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
18 |
+
'method' => 'post',
|
19 |
+
'enctype' => 'multipart/form-data'
|
20 |
+
)
|
21 |
+
);
|
22 |
+
$form->setUseContainer(true);
|
23 |
+
$this->setForm($form);
|
24 |
+
return parent::_prepareForm();
|
25 |
+
}
|
26 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,314 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
|
12 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenu_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
13 |
+
{
|
14 |
+
|
15 |
+
protected function _prepareForm()
|
16 |
+
{
|
17 |
+
|
18 |
+
$form = new Varien_Data_Form(array(
|
19 |
+
'id' => 'edit_form',
|
20 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
21 |
+
'method' => 'post',
|
22 |
+
'enctype' => 'multipart/form-data'
|
23 |
+
));
|
24 |
+
|
25 |
+
$collections = Mage::getModel('jmmegamenu/jmmegamenu')->getCollection()->addFieldToFilter("menu_id",array("neq" => $this->getRequest()->getParam('id')));
|
26 |
+
|
27 |
+
|
28 |
+
$helper = Mage::helper('jmmegamenu');
|
29 |
+
|
30 |
+
$statics = Mage::getResourceModel('cms/block_collection')->load()->toOptionArray();
|
31 |
+
$menugroup = Mage::getModel('jmmegamenu/jmmegamenugroup')->getCollection()->toOptionArray();
|
32 |
+
//get out the orders array
|
33 |
+
if($this->getRequest()->getParam('id')) {
|
34 |
+
$orders = $helper->getorders($this->getRequest()->getParam('id'));
|
35 |
+
}
|
36 |
+
//Get the menu items list
|
37 |
+
$parents = $helper->getoutputList(0,$collections,"title","menu_id","parent",true);
|
38 |
+
|
39 |
+
//The root category id of default store
|
40 |
+
$parent = Mage::app()->getWebsite(true)->getDefaultStore()->getRootCategoryId();
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Check if parent node of the store still exists
|
44 |
+
*/
|
45 |
+
$category = Mage::getModel('catalog/category');
|
46 |
+
/* @var $category Mage_Catalog_Model_Category */
|
47 |
+
if (!$category->checkId($parent)) {
|
48 |
+
|
49 |
+
return array();
|
50 |
+
}
|
51 |
+
|
52 |
+
$recursionLevel = max(0, (int) Mage::app()->getWebsite(true)->getDefaultStore()->getConfig('catalog/navigation/max_depth'));
|
53 |
+
$storeCategories = $category->getCategories($parent, $recursionLevel, false, true, true);
|
54 |
+
|
55 |
+
$storeCategories = $storeCategories->load()->addAttributeToSelect("*");
|
56 |
+
|
57 |
+
//categories list
|
58 |
+
$catlist = $helper->getoutputList($parent,$storeCategories,"name","entity_id","parent_id");
|
59 |
+
$clist = array();
|
60 |
+
foreach($catlist as $id => $cat){
|
61 |
+
$category = Mage::getModel('catalog/category')->load($id);
|
62 |
+
$url = $category->getUrl();
|
63 |
+
$clist[$url] = $cat;
|
64 |
+
}
|
65 |
+
|
66 |
+
if(Mage::getStoreConfig("web/secure/use_in_adminhtml")){
|
67 |
+
$baseurl = Mage::getStoreConfig("web/secure/base_url");
|
68 |
+
}else{
|
69 |
+
$baseurl = Mage::getBaseUrl();
|
70 |
+
}
|
71 |
+
if(!strpos($baseurl,"index.php")) $baseurl .= "index.php/";
|
72 |
+
//cmspages list
|
73 |
+
$cmspages = array();
|
74 |
+
foreach($helper->getListcms() as $page){
|
75 |
+
$url = $baseurl.$page;
|
76 |
+
$cmspages[$url] = $page;
|
77 |
+
}
|
78 |
+
|
79 |
+
$this->setForm($form);
|
80 |
+
$fieldset = $form->addFieldset('jmmegamenu_form', array('legend'=>Mage::helper('jmmegamenu')->__('jmmegamenu information')));
|
81 |
+
|
82 |
+
$fieldset->addField('title', 'text', array(
|
83 |
+
'label' => Mage::helper('jmmegamenu')->__('Menu title'),
|
84 |
+
'class' => 'required-entry',
|
85 |
+
'required' => true,
|
86 |
+
'name' => 'title',
|
87 |
+
));
|
88 |
+
$fieldset->addField('image', 'image', array(
|
89 |
+
'label' => Mage::helper('jmmegamenu')->__('Image File'),
|
90 |
+
'required' => false,
|
91 |
+
'name' => 'image',
|
92 |
+
));
|
93 |
+
$fieldset->addField('menualias', 'text', array(
|
94 |
+
'label' => Mage::helper('jmmegamenu')->__('Alias'),
|
95 |
+
'required' => false,
|
96 |
+
'name' => 'menualias',
|
97 |
+
));
|
98 |
+
|
99 |
+
$fieldset->addField('showtitle', 'radios', array(
|
100 |
+
'label' => Mage::helper('jmmegamenu')->__('Show title'),
|
101 |
+
'name' => 'showtitle',
|
102 |
+
'values' => array(
|
103 |
+
array('value'=>'1','label'=>'Yes'),
|
104 |
+
array('value'=>'0','label'=>'No'),
|
105 |
+
),
|
106 |
+
'disabled' => false,
|
107 |
+
'readonly' => false,
|
108 |
+
'tabindex' => 0
|
109 |
+
));
|
110 |
+
|
111 |
+
$fieldset->addField('menugroup', 'select', array(
|
112 |
+
'label' => Mage::helper('jmmegamenu')->__('Display In'),
|
113 |
+
'required' => true,
|
114 |
+
'size' => 10,
|
115 |
+
'name' => 'menugroup',
|
116 |
+
'values' => $menugroup,
|
117 |
+
));
|
118 |
+
|
119 |
+
$fieldset->addField('status', 'select', array(
|
120 |
+
'label' => Mage::helper('jmmegamenu')->__('Status'),
|
121 |
+
'name' => 'status',
|
122 |
+
'values' => array(
|
123 |
+
array(
|
124 |
+
'value' => 1,
|
125 |
+
'label' => Mage::helper('jmmegamenu')->__('Active'),
|
126 |
+
),
|
127 |
+
array(
|
128 |
+
'value' => 0,
|
129 |
+
'label' => Mage::helper('jmmegamenu')->__('Inactive'),
|
130 |
+
),
|
131 |
+
),
|
132 |
+
));
|
133 |
+
if($this->getRequest()->getParam('id') ) {
|
134 |
+
$fieldset->addField('ordering', 'select', array(
|
135 |
+
'label' => Mage::helper('jmmegamenu')->__('Order'),
|
136 |
+
'required' => false,
|
137 |
+
'size' => 10,
|
138 |
+
'name' => 'ordering',
|
139 |
+
'values' => $orders,
|
140 |
+
));
|
141 |
+
}
|
142 |
+
$fieldset->addField('parent', 'select', array(
|
143 |
+
'label' => Mage::helper('jmmegamenu')->__('Parent'),
|
144 |
+
'required' => false,
|
145 |
+
'size' => 10,
|
146 |
+
'name' => 'parent',
|
147 |
+
'values' => $parents,
|
148 |
+
));
|
149 |
+
|
150 |
+
|
151 |
+
$fieldset->addField('menutype', 'select', array(
|
152 |
+
'label' => Mage::helper('jmmegamenu')->__('Menu type'),
|
153 |
+
'required' => false,
|
154 |
+
'name' => 'menutype',
|
155 |
+
'values' => array('0' => "Categories",'1' => "Cms pages",'2' => "Custom link"),
|
156 |
+
'value' => 2,
|
157 |
+
));
|
158 |
+
|
159 |
+
$fieldset->addField('link', 'text', array(
|
160 |
+
'label' => Mage::helper('jmmegamenu')->__('Link'),
|
161 |
+
'class' => 'required-entry',
|
162 |
+
'required' => true,
|
163 |
+
'name' => 'link',
|
164 |
+
));
|
165 |
+
$fieldset->addField('category', 'select', array(
|
166 |
+
'label' => Mage::helper('jmmegamenu')->__('Select a category'),
|
167 |
+
'required' => false,
|
168 |
+
'size' => 10,
|
169 |
+
'name' => 'category',
|
170 |
+
'values' => $clist,
|
171 |
+
));
|
172 |
+
|
173 |
+
$fieldset->addField('cms', 'select', array(
|
174 |
+
'label' => Mage::helper('jmmegamenu')->__('Select a cms Page'),
|
175 |
+
'required' => false,
|
176 |
+
'size' => 10,
|
177 |
+
'name' => 'cms',
|
178 |
+
'values' => $cmspages,
|
179 |
+
));
|
180 |
+
$fieldset->addField('mega_cols', 'text', array(
|
181 |
+
'label' => Mage::helper('jmmegamenu')->__('Columns'),
|
182 |
+
'required' => false,
|
183 |
+
'width' => '100px',
|
184 |
+
'value' => '1',
|
185 |
+
'name' => 'mega_cols',
|
186 |
+
));
|
187 |
+
|
188 |
+
$fieldset->addField('mega_group', 'radios', array(
|
189 |
+
'label' => Mage::helper('jmmegamenu')->__('Group'),
|
190 |
+
|
191 |
+
'required' => false,
|
192 |
+
'name' => 'mega_group',
|
193 |
+
'values' => array(
|
194 |
+
array('value'=>'0','label'=>'No'),
|
195 |
+
array('value'=>'1','label'=>'Yes'),
|
196 |
+
|
197 |
+
),
|
198 |
+
));
|
199 |
+
$fieldset->addField('mega_width', 'text', array(
|
200 |
+
'label' => Mage::helper('jmmegamenu')->__('Submenu Width'),
|
201 |
+
'required' => false,
|
202 |
+
'name' => 'mega_width',
|
203 |
+
));
|
204 |
+
$fieldset->addField('mega_colw', 'text', array(
|
205 |
+
'label' => Mage::helper('jmmegamenu')->__('Submenu Column Width'),
|
206 |
+
'required' => false,
|
207 |
+
'name' => 'mega_colw',
|
208 |
+
));
|
209 |
+
$fieldset->addField('mega_colxw', 'textarea', array(
|
210 |
+
'label' => Mage::helper('jmmegamenu')->__('Submenu Column[i] Width'),
|
211 |
+
'required' => false,
|
212 |
+
'style' => 'width:300px; height:100px;',
|
213 |
+
'name' => 'mega_colxw',
|
214 |
+
));
|
215 |
+
$fieldset->addField('mega_class', 'text', array(
|
216 |
+
'label' => Mage::helper('jmmegamenu')->__('Additional class'),
|
217 |
+
'required' => false,
|
218 |
+
'name' => 'mega_class',
|
219 |
+
));
|
220 |
+
$fieldset->addField('browserNav', 'select', array(
|
221 |
+
'label' => Mage::helper('jmmegamenu')->__('Target Window'),
|
222 |
+
'required' => false,
|
223 |
+
'size' => 10,
|
224 |
+
'name' => 'browserNav',
|
225 |
+
'values' => array(
|
226 |
+
array('value'=>'0','label'=>'Parent'),
|
227 |
+
array('value'=>'1','label'=>'New window With Navigation'),
|
228 |
+
array('value'=>'2','label'=>'New without navigation'),
|
229 |
+
),
|
230 |
+
));
|
231 |
+
|
232 |
+
$fieldset->addField('mega_subcontent', 'radios', array(
|
233 |
+
'label' => Mage::helper('jmmegamenu')->__('Submenu Content'),
|
234 |
+
'name' => 'mega_subcontent',
|
235 |
+
'onclick' => "",
|
236 |
+
'onchange' => "",
|
237 |
+
'class' => "mega_subcontent",
|
238 |
+
'value' => '2',
|
239 |
+
'values' => array(
|
240 |
+
array('value'=>'1','label'=>Mage::helper('jmmegamenu')->__('Child menu items'),'selected' => 'true'),
|
241 |
+
array('value'=>'2','label'=>Mage::helper('jmmegamenu')->__('Custom xml block')),
|
242 |
+
array('value'=>'3','label'=>Mage::helper('jmmegamenu')->__('Satic blocks')),
|
243 |
+
),
|
244 |
+
'disabled' => false,
|
245 |
+
'readonly' => false,
|
246 |
+
'tabindex' => 0
|
247 |
+
));
|
248 |
+
|
249 |
+
$fieldset->addField('staticblocks', 'multiselect', array(
|
250 |
+
'label' => Mage::helper('jmmegamenu')->__('Select Blocks'),
|
251 |
+
'required' => false,
|
252 |
+
'size' => 10,
|
253 |
+
'name' => 'staticblocks',
|
254 |
+
'values' => $statics,
|
255 |
+
));
|
256 |
+
|
257 |
+
$fieldset->addField('url', 'hidden', array(
|
258 |
+
'required' => false,
|
259 |
+
'size' => 10,
|
260 |
+
'name' => 'url',
|
261 |
+
|
262 |
+
));
|
263 |
+
|
264 |
+
$fieldset->addField('catid', 'hidden', array(
|
265 |
+
'required' => false,
|
266 |
+
'size' => 10,
|
267 |
+
'name' => 'catid',
|
268 |
+
|
269 |
+
));
|
270 |
+
|
271 |
+
$fieldset->addField('static_block', 'hidden', array(
|
272 |
+
'required' => false,
|
273 |
+
'size' => 10,
|
274 |
+
'name' => 'static_block',
|
275 |
+
|
276 |
+
));
|
277 |
+
|
278 |
+
$fieldset->addField('menu_id', 'hidden', array(
|
279 |
+
'required' => false,
|
280 |
+
'size' => 10,
|
281 |
+
'name' => 'menu_id',
|
282 |
+
|
283 |
+
));
|
284 |
+
|
285 |
+
$fieldset->addField('contentxml', 'editor', array(
|
286 |
+
'name' => 'contentxml',
|
287 |
+
'label' => Mage::helper('jmmegamenu')->__('Custom block xml'),
|
288 |
+
'title' => Mage::helper('jmmegamenu')->__('Custom block xml'),
|
289 |
+
'style' => 'width:400px; height:200px;',
|
290 |
+
'wysiwyg' => false,
|
291 |
+
'required' => false,
|
292 |
+
));
|
293 |
+
$fieldset->addField('description', 'editor', array(
|
294 |
+
'label' => Mage::helper('jmmegamenu')->__('Description'),
|
295 |
+
'title' => Mage::helper('jmmegamenu')->__('Description'),
|
296 |
+
'style' => 'width:400px; height:200px;',
|
297 |
+
'required' => false,
|
298 |
+
'wysiwyg' => false,
|
299 |
+
'name' => 'description',
|
300 |
+
));
|
301 |
+
|
302 |
+
if ( Mage::getSingleton('adminhtml/session')->getJmMegamenuData() )
|
303 |
+
{
|
304 |
+
|
305 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getJmMegamenuData());
|
306 |
+
Mage::getSingleton('adminhtml/session')->setJmMegamenuData(null);
|
307 |
+
} elseif ( Mage::registry('jmmegamenu_data') ) {
|
308 |
+
|
309 |
+
$form->setValues(Mage::registry('jmmegamenu_data')->getData());
|
310 |
+
}
|
311 |
+
return parent::_prepareForm();
|
312 |
+
}
|
313 |
+
|
314 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu/Edit/Tabs.php
ADDED
@@ -0,0 +1,29 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenu_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
12 |
+
{
|
13 |
+
public function __construct()
|
14 |
+
{
|
15 |
+
parent::__construct();
|
16 |
+
$this->setId('jmmegamenu_tabs');
|
17 |
+
$this->setDestElementId('edit_form');
|
18 |
+
$this->setTitle(Mage::helper('jmmegamenu')->__('Menu Item Configuration'));
|
19 |
+
}
|
20 |
+
protected function _beforeToHtml()
|
21 |
+
{
|
22 |
+
$this->addTab('form_section', array(
|
23 |
+
'label' => Mage::helper('jmmegamenu')->__('Menu Item Configuration'),
|
24 |
+
'title' => Mage::helper('jmmegamenu')->__('Menu Item Configuration'),
|
25 |
+
'content' => $this->getLayout()->createBlock('jmmegamenu/adminhtml_jmmegamenu_edit_tab_form')->toHtml(),
|
26 |
+
));
|
27 |
+
return parent::_beforeToHtml();
|
28 |
+
}
|
29 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenu/Grid.php
ADDED
@@ -0,0 +1,141 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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SION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenu_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
12 |
+
{
|
13 |
+
|
14 |
+
var $CurPage = 1;
|
15 |
+
var $LastPage = 1;
|
16 |
+
var $groupid;
|
17 |
+
public function __construct()
|
18 |
+
{
|
19 |
+
parent::__construct();
|
20 |
+
$groupid = $this->getRequest()->getParam('groupid')?$this->getRequest()->getParam('groupid'):0;
|
21 |
+
$this->groupid = $groupid;
|
22 |
+
$this->setId('jmmegamenuGrid');
|
23 |
+
$this->setDefaultSort('menu_id');
|
24 |
+
$this->setDefaultDir('ASC');
|
25 |
+
$this->setSaveParametersInSession(true);
|
26 |
+
$this->setTemplate('widget/gridmenu.phtml');
|
27 |
+
}
|
28 |
+
protected function _preparePage()
|
29 |
+
{
|
30 |
+
|
31 |
+
$this->setCurPage((int) $this->getParam($this->getVarNamePage(), $this->_defaultPage));
|
32 |
+
$collections = Mage::getModel('jmmegamenu/jmmegamenu')->getCollection()->addFieldToFilter("menugroup",array('eq'=>$this->groupid))->setOrder("parent", "DESC");
|
33 |
+
$this->setLastPage(ceil(count($collections)/$this->getParam($this->getVarNameLimit(), $this->_defaultLimit)));
|
34 |
+
}
|
35 |
+
|
36 |
+
protected function setCurPage($page)
|
37 |
+
{
|
38 |
+
$this->CurPage = $page;
|
39 |
+
}
|
40 |
+
|
41 |
+
protected function setLastPage($page)
|
42 |
+
{
|
43 |
+
$this->LastPage = $page;
|
44 |
+
}
|
45 |
+
|
46 |
+
protected function getCurPage($page)
|
47 |
+
{
|
48 |
+
return $this->CurPage;
|
49 |
+
}
|
50 |
+
|
51 |
+
protected function getLastPage($page)
|
52 |
+
{
|
53 |
+
return $this->LastPage;
|
54 |
+
}
|
55 |
+
protected function _prepareCollection()
|
56 |
+
{
|
57 |
+
|
58 |
+
$collections = Mage::getModel('jmmegamenu/jmmegamenu')->getCollection()->addFieldToFilter("menugroup",array('eq'=>$this->groupid))->setOrder("parent", "DESC")->setOrder("ordering","ASC");
|
59 |
+
|
60 |
+
$this->setCollection($collections);
|
61 |
+
parent::_prepareCollection();
|
62 |
+
$limitstart = $this->getParam($this->getVarNameLimit(), $this->_defaultLimit)*($this->getParam($this->getVarNamePage(), $this->_defaultPage) - 1);
|
63 |
+
$limit = $this->getParam($this->getVarNameLimit(), $this->_defaultLimit);
|
64 |
+
if(count($this->getCollection())){
|
65 |
+
$collections = $this->getCollection();
|
66 |
+
$helper = Mage::helper('jmmegamenu');
|
67 |
+
$list = $helper->prepareGridCollection(0,$collections,"title","menu_id","parent",true);
|
68 |
+
$list = array_slice($list,$limitstart,$limit);
|
69 |
+
$this->setCollectionfake($listfake);
|
70 |
+
foreach($collections as $collection){
|
71 |
+
$collections->removeItemByKey($collection->menu_id);
|
72 |
+
}
|
73 |
+
foreach($list as $collection){
|
74 |
+
$collections->addItem($collection);
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
78 |
+
$this->setCollection($collections);
|
79 |
+
return $this;
|
80 |
+
}
|
81 |
+
protected function setCollectionfake($list){
|
82 |
+
$this->collectionfake = $list;
|
83 |
+
}
|
84 |
+
protected function getCollectionfake(){
|
85 |
+
if($this->collectionfake) return $this->collectionfake;
|
86 |
+
}
|
87 |
+
protected function _prepareColumns()
|
88 |
+
{
|
89 |
+
|
90 |
+
$this->addColumn('menu_id', array(
|
91 |
+
'header' => Mage::helper('jmmegamenu')->__('ID'),
|
92 |
+
'align' =>'right',
|
93 |
+
'width' => '50px',
|
94 |
+
'index' => 'menu_id',
|
95 |
+
));
|
96 |
+
$this->addColumn('title', array(
|
97 |
+
'header' => Mage::helper('jmmegamenu')->__('Title'),
|
98 |
+
'align' =>'left',
|
99 |
+
'index' => 'title',
|
100 |
+
));
|
101 |
+
$this->addColumn('ordering', array(
|
102 |
+
'header' => Mage::helper('jmmegamenu')->__('Order'),
|
103 |
+
'align' =>'left',
|
104 |
+
'index' => 'ordering',
|
105 |
+
));
|
106 |
+
$this->addColumn('status', array(
|
107 |
+
'header' => Mage::helper('jmmegamenu')->__('Status'),
|
108 |
+
'align' => 'left',
|
109 |
+
'width' => '80px',
|
110 |
+
'index' => 'status',
|
111 |
+
'type' => 'options',
|
112 |
+
'options' => array(
|
113 |
+
1 => 'Enabled',
|
114 |
+
0 => 'Disabled',
|
115 |
+
),
|
116 |
+
));
|
117 |
+
$this->addColumn('action',
|
118 |
+
array(
|
119 |
+
'header' => Mage::helper('jmmegamenu')->__('Action'),
|
120 |
+
'width' => '100',
|
121 |
+
'type' => 'action',
|
122 |
+
'getter' => 'getId',
|
123 |
+
'actions' => array(
|
124 |
+
array(
|
125 |
+
'caption' => Mage::helper('jmmegamenu')->__('Edit'),
|
126 |
+
'url' => array('base'=> '*/*/edit'),
|
127 |
+
'field' => 'id'
|
128 |
+
)
|
129 |
+
),
|
130 |
+
'filter' => false,
|
131 |
+
'sortable' => false,
|
132 |
+
'index' => 'stores',
|
133 |
+
'is_system' => true,
|
134 |
+
));
|
135 |
+
return parent::_prepareColumns();
|
136 |
+
}
|
137 |
+
public function getRowUrl($row)
|
138 |
+
{
|
139 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
140 |
+
}
|
141 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup.php
ADDED
@@ -0,0 +1,30 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenugroup extends Mage_Adminhtml_Block_Widget_Grid_Container
|
12 |
+
{
|
13 |
+
public function __construct()
|
14 |
+
{
|
15 |
+
$this->_controller = 'adminhtml_jmmegamenugroup';
|
16 |
+
$this->_blockGroup = 'jmmegamenu';
|
17 |
+
$this->_headerText = Mage::helper('jmmegamenu')->__('Group Manager');
|
18 |
+
$this->_addButtonLabel = Mage::helper('jmmegamenu')->__('Add Menu Group');
|
19 |
+
|
20 |
+
parent::__construct();
|
21 |
+
|
22 |
+
}
|
23 |
+
|
24 |
+
public function getCreateUrl()
|
25 |
+
{
|
26 |
+
return $this->getUrl('*/*/newgroup');
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
?>
|
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup/Edit.php
ADDED
@@ -0,0 +1,62 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
|
12 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenugroup_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
13 |
+
{
|
14 |
+
public function __construct()
|
15 |
+
{
|
16 |
+
parent::__construct();
|
17 |
+
$this->_objectId = 'id';
|
18 |
+
$this->_blockGroup = 'jmmegamenu';
|
19 |
+
$this->_controller = 'adminhtml_jmmegamenugroup';
|
20 |
+
$this->_updateButton('save', 'label', Mage::helper('jmmegamenu')->__('Save Menu Group'));
|
21 |
+
$this->_updateButton('delete', 'label', Mage::helper('jmmegamenu')->__('Delete Menu Group'));
|
22 |
+
$this->_addButton('saveandcontinue', array(
|
23 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
24 |
+
'onclick' => 'saveAndContinueEdit()',
|
25 |
+
'class' => 'save',
|
26 |
+
), -100);
|
27 |
+
$objId = $this->getRequest()->getParam($this->_objectId);
|
28 |
+
|
29 |
+
if (! empty($objId)) {
|
30 |
+
$this->_addButton('delete', array(
|
31 |
+
'label' => Mage::helper('adminhtml')->__('Delete'),
|
32 |
+
'class' => 'delete',
|
33 |
+
'onclick' => 'deleteConfirm(\''. Mage::helper('adminhtml')->__('Are you sure you want to remove this menu group and menu items belong to it?')
|
34 |
+
.'\', \'' . $this->getDeleteUrl() . '\')',
|
35 |
+
));
|
36 |
+
}
|
37 |
+
|
38 |
+
|
39 |
+
$this->_formScripts[] = "
|
40 |
+
|
41 |
+
function saveAndContinueEdit(){
|
42 |
+
editForm.submit($('edit_form').action+'back/editgroup/');
|
43 |
+
};
|
44 |
+
|
45 |
+
";
|
46 |
+
}
|
47 |
+
|
48 |
+
public function getHeaderText()
|
49 |
+
{
|
50 |
+
if( Mage::registry('jmmegamenugroup_data') && Mage::registry('jmmegamenugroup_data')->getId() ) {
|
51 |
+
return Mage::helper('jmmegamenu')->__("Edit Group '%s'", $this->htmlEscape(Mage::registry('jmmegamenugroup_data')->getTitle()));
|
52 |
+
} else {
|
53 |
+
return Mage::helper('jmmegamenu')->__('Add Menu Group');
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
}
|
58 |
+
public function getDeleteUrl()
|
59 |
+
{
|
60 |
+
return $this->getUrl('*/*/deletegroup', array($this->_objectId => $this->getRequest()->getParam($this->_objectId)));
|
61 |
+
}
|
62 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup/Edit/Form.php
ADDED
@@ -0,0 +1,26 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenugroup_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
12 |
+
{
|
13 |
+
protected function _prepareForm()
|
14 |
+
{
|
15 |
+
$form = new Varien_Data_Form(array(
|
16 |
+
'id' => 'edit_form',
|
17 |
+
'action' => $this->getUrl('*/*/savegroup', array('id' => $this->getRequest()->getParam('id'))),
|
18 |
+
'method' => 'post',
|
19 |
+
)
|
20 |
+
);
|
21 |
+
$form->setUseContainer(true);
|
22 |
+
$this->setForm($form);
|
23 |
+
return parent::_prepareForm();
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,71 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
|
12 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenugroup_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
13 |
+
{
|
14 |
+
|
15 |
+
protected function _prepareForm()
|
16 |
+
{
|
17 |
+
|
18 |
+
$form = new Varien_Data_Form(array(
|
19 |
+
'id' => 'edit_form',
|
20 |
+
'action' => $this->getUrl('*/*/savegroup', array('id' => $this->getRequest()->getParam('id'))),
|
21 |
+
'method' => 'post',
|
22 |
+
'enctype' => 'multipart/form-data'
|
23 |
+
));
|
24 |
+
|
25 |
+
$helper = Mage::helper('jmmegamenu');
|
26 |
+
|
27 |
+
$this->setForm($form);
|
28 |
+
$fieldset = $form->addFieldset('jmmegamenugroup_form', array('legend'=>Mage::helper('jmmegamenu')->__('jmmegamenu group information')));
|
29 |
+
|
30 |
+
$fieldset->addField('title', 'text', array(
|
31 |
+
'label' => Mage::helper('jmmegamenu')->__('Group title'),
|
32 |
+
'class' => 'required-entry',
|
33 |
+
'required' => true,
|
34 |
+
'name' => 'title',
|
35 |
+
));
|
36 |
+
|
37 |
+
|
38 |
+
$fieldset->addField('menutype', 'text', array(
|
39 |
+
'label' => Mage::helper('jmmegamenu')->__('Group Unique'),
|
40 |
+
'class' => 'required-entry',
|
41 |
+
'required' => true,
|
42 |
+
'name' => 'menutype',
|
43 |
+
));
|
44 |
+
$stores = Mage::app()->getStores();
|
45 |
+
|
46 |
+
$fieldset->addField('description', 'textarea', array(
|
47 |
+
'label' => Mage::helper('jmmegamenu')->__('Group Description'),
|
48 |
+
'name' => 'description',
|
49 |
+
));
|
50 |
+
|
51 |
+
$fieldset->addField('storeid', 'select', array(
|
52 |
+
'name' => 'storeid',
|
53 |
+
'label' => Mage::helper('cms')->__('Store View'),
|
54 |
+
'title' => Mage::helper('cms')->__('Store View'),
|
55 |
+
'required' => true,
|
56 |
+
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, false),
|
57 |
+
'disabled' => false
|
58 |
+
));
|
59 |
+
if ( Mage::getSingleton('adminhtml/session')->getJmMegamenugroupData() )
|
60 |
+
{
|
61 |
+
|
62 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getJmMegamenugroupData());
|
63 |
+
Mage::getSingleton('adminhtml/session')->setJmMegamenugroupData(null);
|
64 |
+
} elseif ( Mage::registry('jmmegamenugroup_data') ) {
|
65 |
+
|
66 |
+
$form->setValues(Mage::registry('jmmegamenugroup_data')->getData());
|
67 |
+
}
|
68 |
+
return parent::_prepareForm();
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup/Edit/Tabs.php
ADDED
@@ -0,0 +1,29 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenugroup_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
12 |
+
{
|
13 |
+
public function __construct()
|
14 |
+
{
|
15 |
+
parent::__construct();
|
16 |
+
$this->setId('jmmegamenugroup_tabs');
|
17 |
+
$this->setDestElementId('edit_form');
|
18 |
+
$this->setTitle(Mage::helper('jmmegamenu')->__('Menu Group Configuration'));
|
19 |
+
}
|
20 |
+
protected function _beforeToHtml()
|
21 |
+
{
|
22 |
+
$this->addTab('form_section', array(
|
23 |
+
'label' => Mage::helper('jmmegamenu')->__('Menu Group Configuration'),
|
24 |
+
'title' => Mage::helper('jmmegamenu')->__('Menu Group Configuration'),
|
25 |
+
'content' => $this->getLayout()->createBlock('jmmegamenu/adminhtml_jmmegamenugroup_edit_tab_form')->toHtml(),
|
26 |
+
));
|
27 |
+
return parent::_beforeToHtml();
|
28 |
+
}
|
29 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Block/Adminhtml/Jmmegamenugroup/Grid.php
ADDED
@@ -0,0 +1,76 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Block_Adminhtml_Jmmegamenugroup_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
12 |
+
{
|
13 |
+
|
14 |
+
var $CurPage = 1;
|
15 |
+
var $LastPage = 1;
|
16 |
+
|
17 |
+
public function __construct()
|
18 |
+
{
|
19 |
+
parent::__construct();
|
20 |
+
$this->setId('jmmegamenugroupGrid');
|
21 |
+
$this->setDefaultSort('id');
|
22 |
+
$this->setDefaultDir('ASC');
|
23 |
+
$this->setSaveParametersInSession(true);
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
protected function _prepareCollection()
|
28 |
+
{
|
29 |
+
|
30 |
+
$collections = Mage::getModel('jmmegamenu/jmmegamenugroup')->getCollection()->setOrder("id", "DESC");
|
31 |
+
|
32 |
+
$this->setCollection($collections);
|
33 |
+
parent::_prepareCollection();
|
34 |
+
return $this;
|
35 |
+
}
|
36 |
+
|
37 |
+
protected function _prepareColumns()
|
38 |
+
{
|
39 |
+
|
40 |
+
$this->addColumn('id', array(
|
41 |
+
'header' => Mage::helper('jmmegamenu')->__('ID'),
|
42 |
+
'align' =>'right',
|
43 |
+
'width' => '50px',
|
44 |
+
'index' => 'id',
|
45 |
+
));
|
46 |
+
$this->addColumn('title', array(
|
47 |
+
'header' => Mage::helper('jmmegamenu')->__('Title'),
|
48 |
+
'align' =>'left',
|
49 |
+
'index' => 'title',
|
50 |
+
));
|
51 |
+
|
52 |
+
$this->addColumn('action',
|
53 |
+
array(
|
54 |
+
'header' => Mage::helper('jmmegamenu')->__('Action'),
|
55 |
+
'width' => '100',
|
56 |
+
'type' => 'action',
|
57 |
+
'getter' => 'getId',
|
58 |
+
'actions' => array(
|
59 |
+
array(
|
60 |
+
'caption' => Mage::helper('jmmegamenu')->__('Edit'),
|
61 |
+
'url' => array('base'=> '*/*/editgroup'),
|
62 |
+
'field' => 'id'
|
63 |
+
)
|
64 |
+
),
|
65 |
+
'filter' => false,
|
66 |
+
'sortable' => false,
|
67 |
+
'index' => 'stores',
|
68 |
+
'is_system' => true,
|
69 |
+
));
|
70 |
+
return parent::_prepareColumns();
|
71 |
+
}
|
72 |
+
public function getRowUrl($row)
|
73 |
+
{
|
74 |
+
return $this->getUrl('*/*/index', array('groupid' => $row->getId()));
|
75 |
+
}
|
76 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Block/Jmmegamenu.php
ADDED
@@ -0,0 +1,94 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
require_once "megamenu/mega.class.php";
|
12 |
+
class Wavethemes_Jmmegamenu_Block_Jmmegamenu extends Mage_Page_Block_Html_Topmenu
|
13 |
+
{
|
14 |
+
|
15 |
+
var $children = null;
|
16 |
+
var $items = null;
|
17 |
+
var $menu = null;
|
18 |
+
var $open = null;
|
19 |
+
public function __construct($attributes = array()) {
|
20 |
+
|
21 |
+
parent::__construct ();
|
22 |
+
|
23 |
+
|
24 |
+
$this->addData(array(
|
25 |
+
'cache_lifetime' => null,
|
26 |
+
));
|
27 |
+
|
28 |
+
$this->menu = new JAMenuMega();
|
29 |
+
$this->params = new stdclass();
|
30 |
+
|
31 |
+
$this->params->megamenu = 1;
|
32 |
+
$this->params->startlevel = 0;
|
33 |
+
$this->params->endlevel = 10;
|
34 |
+
}
|
35 |
+
|
36 |
+
public function _prepareLayout()
|
37 |
+
{
|
38 |
+
|
39 |
+
$headBlock = $this->getLayout()->getBlock('head');
|
40 |
+
//$headBlock->addJs('joomlart/jmmegamenu/js/jmmegamenu.js');
|
41 |
+
return parent::_prepareLayout();
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
public function _toHtml(){
|
46 |
+
|
47 |
+
if(!Mage::helper('jmmegamenu')->get('show')){
|
48 |
+
return parent::_toHtml();
|
49 |
+
}
|
50 |
+
$this->setTemplate("joomlart/jmmegamenu/output.phtml");
|
51 |
+
$storeid = Mage::app()->getStore()->getStoreId();
|
52 |
+
$resource = Mage::getSingleton('core/resource');
|
53 |
+
$read= $resource->getConnection('core_read');
|
54 |
+
|
55 |
+
|
56 |
+
$menutable = $resource->getTableName('jmmegamenu_store_menugroup');
|
57 |
+
$query = 'SELECT menugroupid '
|
58 |
+
. ' FROM '.$menutable
|
59 |
+
. ' WHERE store_id = '.(int) $storeid
|
60 |
+
|
61 |
+
. ' ORDER BY id';
|
62 |
+
$rows = $read->fetchRow($query);
|
63 |
+
|
64 |
+
if(!$rows["menugroupid"]){
|
65 |
+
$rows["menugroupid"] = 0;
|
66 |
+
}
|
67 |
+
$collections = Mage::getModel('jmmegamenu/jmmegamenu')->getCollection()->setOrder("parent", "ASC")->setOrder("ordering","ASC")->addFilter("status",1,"eq")->addFilter("menugroup",$rows["menugroupid"]);
|
68 |
+
|
69 |
+
$tree = array();
|
70 |
+
foreach($collections as $collection){
|
71 |
+
$collection->tree = array();
|
72 |
+
$parent_tree = array();
|
73 |
+
if(isset($tree[$collection->parent])){
|
74 |
+
$parent_tree = $tree[$collection->parent];
|
75 |
+
}
|
76 |
+
//Create tree
|
77 |
+
array_push($parent_tree, $collection->menu_id);
|
78 |
+
$tree[$collection->menu_id] = $parent_tree;
|
79 |
+
|
80 |
+
$collection->tree = $parent_tree;
|
81 |
+
}
|
82 |
+
$this->menu->getList($collections);
|
83 |
+
//$this->menu->genMenu();
|
84 |
+
ob_start();
|
85 |
+
$this->menu->genMenu();
|
86 |
+
$menuoutput = ob_get_contents();
|
87 |
+
$this->assign ( 'menuoutput', $menuoutput );
|
88 |
+
ob_end_clean();
|
89 |
+
return parent::_toHtml ();
|
90 |
+
}
|
91 |
+
|
92 |
+
}
|
93 |
+
|
94 |
+
?>
|
app/code/local/Wavethemes/Jmmegamenu/Helper/Data.php
ADDED
@@ -0,0 +1,232 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Helper_Data extends Mage_Core_Helper_Abstract
|
12 |
+
{
|
13 |
+
|
14 |
+
function get($var, $attributes=array()){
|
15 |
+
if(isset($attributes[$var])){
|
16 |
+
return $attributes[$var];
|
17 |
+
}
|
18 |
+
return Mage::getStoreConfig("wavethemes_jmmegamenu/wavethemes_jmmegamenu/$var");
|
19 |
+
}
|
20 |
+
|
21 |
+
public function treemenu($id, $indent, $list, &$children, $maxlevel=9999, $level=0,$label,$key,$parent){
|
22 |
+
|
23 |
+
if (@$children[$id] && $level <= $maxlevel)
|
24 |
+
{
|
25 |
+
foreach ($children[$id] as $v)
|
26 |
+
{
|
27 |
+
|
28 |
+
$id = $v->$key;
|
29 |
+
$pre = '- ';
|
30 |
+
$spacer = '---';
|
31 |
+
if ( $v->$parent == 0 ) {
|
32 |
+
$txt = $v->$label;
|
33 |
+
} else {
|
34 |
+
$txt = $pre . $v->$label;
|
35 |
+
}
|
36 |
+
$pt = $v->$parent;
|
37 |
+
$list[$id] = $v;
|
38 |
+
$list[$id]->$label = "$indent$txt";
|
39 |
+
$list[$id]->children = count(@$children[$id] );
|
40 |
+
$list = $this->treemenu( $id, $indent . $spacer, $list,$children, $maxlevel, $level+1,$label,$key,$parent );
|
41 |
+
}
|
42 |
+
}
|
43 |
+
return $list;
|
44 |
+
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
+
public function getoutputList($root = 0,$collections,$labelfield = "title",$keyfield = "id",$parentfield = "parent",$addtop = false){
|
51 |
+
|
52 |
+
foreach($collections as $collection){
|
53 |
+
|
54 |
+
$pt = $collection->$parentfield;
|
55 |
+
$list = @$children[$pt] ? $children[$pt] : array();
|
56 |
+
array_push( $list, $collection );
|
57 |
+
$children[$pt] = $list;
|
58 |
+
}
|
59 |
+
|
60 |
+
$lists = $this->treemenu($root, '', array(),$children,9999, 0,$labelfield,$keyfield,$parentfield );
|
61 |
+
if($addtop){
|
62 |
+
$outputs = array('0' => "Top");
|
63 |
+
}
|
64 |
+
foreach($lists as $id => $list){
|
65 |
+
|
66 |
+
$lists[$id]->$labelfield = "--".$lists[$id]->$labelfield;
|
67 |
+
$outputs[$lists[$id]->$keyfield] = $lists[$id]->$labelfield;
|
68 |
+
|
69 |
+
}
|
70 |
+
return $outputs;
|
71 |
+
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
+
public function prepareGridCollection($root = 0,&$collections,$labelfield = "title",$keyfield = "id",$parentfield = "parent",$addtop = false){
|
76 |
+
|
77 |
+
foreach($collections as $collection){
|
78 |
+
|
79 |
+
$pt = $collection->$parentfield;
|
80 |
+
$list = @$children[$pt] ? $children[$pt] : array();
|
81 |
+
array_push( $list, $collection );
|
82 |
+
$children[$pt] = $list;
|
83 |
+
}
|
84 |
+
|
85 |
+
$lists = $this->treemenu($root, '', array(),$children,9999, 0,$labelfield,$keyfield,$parentfield );
|
86 |
+
if($addtop){
|
87 |
+
$outputs = array('0' => "Top");
|
88 |
+
}
|
89 |
+
foreach($lists as $id => $list){
|
90 |
+
|
91 |
+
$lists[$id]->$labelfield = $lists[$id]->$labelfield;
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
return $lists;
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
public function getActivemenu($collections){
|
100 |
+
$baseurl = Mage::getBaseUrl();
|
101 |
+
$currenturl = Mage::helper('core/url')->getCurrentUrl();
|
102 |
+
$alias = "";
|
103 |
+
$currenturls = explode("?alias=",$currenturl);
|
104 |
+
$currenturl = $currenturls[0];
|
105 |
+
if(isset($currenturls[1])){
|
106 |
+
$alias = $currenturls[1];
|
107 |
+
}
|
108 |
+
|
109 |
+
$websiteId= Mage::app()->getStore()->getWebsiteId();
|
110 |
+
$CurrentPage = Mage::app()->getWebsite($websiteId)->getConfig('web/default/cms_home_page');
|
111 |
+
|
112 |
+
//homepage with or without index.php
|
113 |
+
if($currenturl == $baseurl || $currenturl."index.php".DS == $baseurl) $currenturl = $baseurl.$CurrentPage;
|
114 |
+
|
115 |
+
//find a menu item whose link match curent url
|
116 |
+
foreach($collections as $collection){
|
117 |
+
|
118 |
+
if($collection->menutype == 2) {
|
119 |
+
if($collection->link == $currenturl) { return $collection; }
|
120 |
+
}else{
|
121 |
+
if(strpos($currenturl,$baseurl.$collection->url) !== false && $collection->menualias == $alias) { return $collection; }
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
|
126 |
+
// search for a category menu item that match current category
|
127 |
+
$catcollection = false;
|
128 |
+
foreach($collections as $collection){
|
129 |
+
//check categories items only
|
130 |
+
if(!$collection->menutype) {
|
131 |
+
if($this->isCategoryActive($collection->catid)){
|
132 |
+
$catcollection = $collection;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
return $catcollection;
|
137 |
+
}
|
138 |
+
|
139 |
+
public function isCategoryActive($catid){
|
140 |
+
if (Mage::getSingleton('catalog/layer')) {
|
141 |
+
$currentcat = Mage::getSingleton('catalog/layer')->getCurrentCategory();
|
142 |
+
return in_array($catid, $currentcat->getPathIds());
|
143 |
+
}
|
144 |
+
|
145 |
+
return false;
|
146 |
+
|
147 |
+
}
|
148 |
+
|
149 |
+
public function getListcms($storeid = null){
|
150 |
+
|
151 |
+
if($storeid == null){
|
152 |
+
$storeid = Mage::app()->getWebsite(true)->getDefaultStore()->getId();
|
153 |
+
}
|
154 |
+
|
155 |
+
$links = array();
|
156 |
+
$cms_pages = Mage::getModel('cms/page')->getCollection()->addStoreFilter($storeid);
|
157 |
+
$cms_pages->load();
|
158 |
+
foreach($cms_pages as $_page)
|
159 |
+
{
|
160 |
+
$data = $_page->getData();
|
161 |
+
if($data['identifier']=='no-route')
|
162 |
+
continue;
|
163 |
+
$links[$data['identifier']] = $data['identifier'];
|
164 |
+
}
|
165 |
+
|
166 |
+
return $links;
|
167 |
+
|
168 |
+
|
169 |
+
}
|
170 |
+
|
171 |
+
public function getorders($id){
|
172 |
+
|
173 |
+
$item = Mage::getModel('jmmegamenu/jmmegamenu')->load($id);
|
174 |
+
$resource = Mage::getSingleton('core/resource');
|
175 |
+
$read= $resource->getConnection('core_read');
|
176 |
+
$menutable = $resource->getTableName('jmmegamenu');
|
177 |
+
$query = 'SELECT ordering AS value, title AS label'
|
178 |
+
. ' FROM '.$menutable
|
179 |
+
. ' WHERE parent = '.(int) $item->parent
|
180 |
+
|
181 |
+
. ' AND status >= 0'
|
182 |
+
. ' ORDER BY ordering';
|
183 |
+
$rows = $read->fetchAll($query);
|
184 |
+
$rows = array_values($rows);
|
185 |
+
$rows[] = array('value' => count($rows)+1,"label" => "Last");
|
186 |
+
array_unshift($rows,array('value' => 0,"label" => "First"));
|
187 |
+
foreach($rows as $k => $v){
|
188 |
+
$rows[$k]['label'] = $rows[$k]['value']." ".$rows[$k]['label'];
|
189 |
+
}
|
190 |
+
return $rows;
|
191 |
+
}
|
192 |
+
|
193 |
+
function reorder( $where='' )
|
194 |
+
{
|
195 |
+
$k = "menu_id";
|
196 |
+
$resource = Mage::getSingleton('core/resource');
|
197 |
+
$read= $resource->getConnection('core_read');
|
198 |
+
$write = $resource->getConnection('core_write');
|
199 |
+
$menutable = $resource->getTableName('jmmegamenu');
|
200 |
+
$query = 'SELECT menu_id, ordering'
|
201 |
+
. ' FROM '. $menutable
|
202 |
+
. ' WHERE ordering >= 0' . ( $where ? ' AND '. $where : '' )
|
203 |
+
. ' ORDER BY ordering'
|
204 |
+
;
|
205 |
+
if (!($orders = $read->fetchAll($query)))
|
206 |
+
{
|
207 |
+
return false;
|
208 |
+
}
|
209 |
+
// compact the ordering numbers
|
210 |
+
for ($i=0, $n=count( $orders ); $i < $n; $i++)
|
211 |
+
{
|
212 |
+
if ($orders[$i]['ordering'] >= 0)
|
213 |
+
{
|
214 |
+
if ($orders[$i]['ordering'] != $i+1)
|
215 |
+
{
|
216 |
+
|
217 |
+
$orders[$i]['ordering'] = $i+1;
|
218 |
+
$query = 'UPDATE '.$menutable
|
219 |
+
. ' SET ordering = '. (int) $orders[$i]['ordering']
|
220 |
+
. ' WHERE '. $k .' = \''. $orders[$i][$k].'\''
|
221 |
+
;
|
222 |
+
|
223 |
+
$write->query($query);
|
224 |
+
}
|
225 |
+
}
|
226 |
+
}
|
227 |
+
return true;
|
228 |
+
}
|
229 |
+
|
230 |
+
}
|
231 |
+
|
232 |
+
?>
|
app/code/local/Wavethemes/Jmmegamenu/Model/Jmmegamenu.php
ADDED
@@ -0,0 +1,18 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Model_Jmmegamenu extends Mage_Core_Model_Abstract
|
12 |
+
{
|
13 |
+
public function _construct()
|
14 |
+
{
|
15 |
+
parent::_construct();
|
16 |
+
$this->_init('jmmegamenu/jmmegamenu');
|
17 |
+
}
|
18 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Model/Jmmegamenugroup.php
ADDED
@@ -0,0 +1,18 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Model_Jmmegamenugroup extends Mage_Core_Model_Abstract
|
12 |
+
{
|
13 |
+
public function _construct()
|
14 |
+
{
|
15 |
+
parent::_construct();
|
16 |
+
$this->_init('jmmegamenu/jmmegamenugroup');
|
17 |
+
}
|
18 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Model/Jmmegamenustoregroup.php
ADDED
@@ -0,0 +1,18 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Model_Jmmegamenustoregroup extends Mage_Core_Model_Abstract
|
12 |
+
{
|
13 |
+
public function _construct()
|
14 |
+
{
|
15 |
+
parent::_construct();
|
16 |
+
$this->_init('jmmegamenu/jmmegamenustoregroup');
|
17 |
+
}
|
18 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Model/Listmenugroup.php
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Model_Listmenugroup extends Varien_Object
|
12 |
+
{
|
13 |
+
static public function getOptionArray()
|
14 |
+
{
|
15 |
+
$collections = Mage::getModel('jmmegamenu/jmmegamenugroup')->getCollection();
|
16 |
+
$ar= array();
|
17 |
+
foreach ($collections as $collection){
|
18 |
+
$ar[$collection->getId()] = $collection->getTitle();
|
19 |
+
}
|
20 |
+
|
21 |
+
return $ar;
|
22 |
+
}
|
23 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenu.php
ADDED
@@ -0,0 +1,17 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Model_Mysql4_Jmmegamenu extends Mage_Core_Model_Mysql4_Abstract
|
12 |
+
{
|
13 |
+
public function _construct()
|
14 |
+
{
|
15 |
+
$this->_init('jmmegamenu/jmmegamenu', 'menu_id');
|
16 |
+
}
|
17 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenu/Collection.php
ADDED
@@ -0,0 +1,18 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Model_Mysql4_Jmmegamenu_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
12 |
+
{
|
13 |
+
public function _construct()
|
14 |
+
{
|
15 |
+
|
16 |
+
$this->_init('jmmegamenu/jmmegamenu');
|
17 |
+
}
|
18 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenugroup.php
ADDED
@@ -0,0 +1,28 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Model_Mysql4_Jmmegamenugroup extends Mage_Core_Model_Mysql4_Abstract
|
12 |
+
{
|
13 |
+
public function _construct()
|
14 |
+
{
|
15 |
+
$this->_init('jmmegamenu/jmmegamenu_types', 'id');
|
16 |
+
}
|
17 |
+
/**
|
18 |
+
* Returns pairs block_id - title
|
19 |
+
*
|
20 |
+
* @return array
|
21 |
+
*/
|
22 |
+
public function toOptionArray()
|
23 |
+
{
|
24 |
+
return $this->_toOptionArray('block_id', 'title');
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
28 |
+
|
app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenugroup/Collection.php
ADDED
@@ -0,0 +1,29 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Model_Mysql4_Jmmegamenugroup_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
12 |
+
{
|
13 |
+
public function _construct()
|
14 |
+
{
|
15 |
+
|
16 |
+
$this->_init('jmmegamenu/jmmegamenugroup');
|
17 |
+
}
|
18 |
+
/**
|
19 |
+
* Returns pairs block_id - title
|
20 |
+
*
|
21 |
+
* @return array
|
22 |
+
*/
|
23 |
+
|
24 |
+
public function toOptionArray()
|
25 |
+
{
|
26 |
+
return $this->_toOptionArray('id', 'title');
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenustoregroup.php
ADDED
@@ -0,0 +1,17 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Model_Mysql4_Jmmegamenustoregroup extends Mage_Core_Model_Mysql4_Abstract
|
12 |
+
{
|
13 |
+
public function _construct()
|
14 |
+
{
|
15 |
+
$this->_init('jmmegamenu/jmmegamenu_store_menugroup', 'id');
|
16 |
+
}
|
17 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Model/Mysql4/Jmmegamenustoregroup/Collection.php
ADDED
@@ -0,0 +1,18 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Model_Mysql4_Jmmegamenustoregroup_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
12 |
+
{
|
13 |
+
public function _construct()
|
14 |
+
{
|
15 |
+
|
16 |
+
$this->_init('jmmegamenu/jmmegamenustoregroup');
|
17 |
+
}
|
18 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Model/Observer.php
ADDED
@@ -0,0 +1,88 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
class Wavethemes_Jmmegamenu_Model_Observer
|
3 |
+
{
|
4 |
+
|
5 |
+
public function prefarestoreForm($block){
|
6 |
+
if(Mage::registry('store_type') == 'store'){
|
7 |
+
$form = $block["block"]->getForm();
|
8 |
+
$storeid = Mage::app()->getRequest()->getParam("store_id");
|
9 |
+
|
10 |
+
$collections = Mage::getModel('jmmegamenu/jmmegamenugroup')->getCollection()->addFieldToFilter("storeid",array("eq" => $storeid))->setOrder("id", "DESC");
|
11 |
+
$listgroup = array();
|
12 |
+
|
13 |
+
foreach ($collections as $collection) {
|
14 |
+
$listgroup[$collection->id] = $collection->title;
|
15 |
+
}
|
16 |
+
|
17 |
+
//add the menugoup field
|
18 |
+
if(!empty($listgroup)){
|
19 |
+
|
20 |
+
$resource = Mage::getSingleton('core/resource');
|
21 |
+
$read= $resource->getConnection('core_read');
|
22 |
+
$menutable = $resource->getTableName('jmmegamenu_store_menugroup');
|
23 |
+
$query = 'SELECT menugroupid '
|
24 |
+
. ' FROM '.$menutable
|
25 |
+
. ' WHERE store_id = '.(int) $storeid
|
26 |
+
|
27 |
+
. ' ORDER BY id';
|
28 |
+
$rows = $read->fetchRow($query);
|
29 |
+
$fieldset = $form->addFieldset('jmmegamenu_fieldset', array(
|
30 |
+
'legend' => Mage::helper('core')->__('Jm megamenu Information')
|
31 |
+
));
|
32 |
+
|
33 |
+
//print_r($listgroup);die();
|
34 |
+
$fieldset->addField('menugroup', 'select', array(
|
35 |
+
'name' => 'menugroup',
|
36 |
+
'label' => Mage::helper('jmmegamenu')->__('Menu Group'),
|
37 |
+
'no_span' => true,
|
38 |
+
'values' => $listgroup
|
39 |
+
));
|
40 |
+
$menugroup = $form->getElement("menugroup");
|
41 |
+
$menugroup->setValue($rows['menugroupid']);
|
42 |
+
if($rows['menugroupid']){
|
43 |
+
//die($rows['menugroupid']);
|
44 |
+
$form->setValue("menugroup",$rows['menugroupid']);
|
45 |
+
}
|
46 |
+
$block["block"]->setForm($form);
|
47 |
+
// print_r($block);die();
|
48 |
+
}
|
49 |
+
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
public function storeedit($store){
|
57 |
+
|
58 |
+
if(Mage::app()->getRequest()->isPost() && $postData = Mage::app()->getRequest()->getPost() ){
|
59 |
+
if($postData['store_type'] == 'store'){
|
60 |
+
|
61 |
+
$storegroupmodel = Mage::getModel('jmmegamenu/jmmegamenustoregroup');
|
62 |
+
$storecollection = Mage::getModel('jmmegamenu/jmmegamenustoregroup')->getCollection()->addFieldToFilter("store_id",array("eq" => $postData['store']['store_id']));
|
63 |
+
|
64 |
+
foreach($storecollection as $collection){
|
65 |
+
$id = $collection->id;
|
66 |
+
break;
|
67 |
+
}
|
68 |
+
if($id){
|
69 |
+
$storegroupmodel->load($id);
|
70 |
+
}
|
71 |
+
|
72 |
+
|
73 |
+
$save['menugroupid'] = $postData['menugroup'];
|
74 |
+
$save['store_id'] = $postData['store']['store_id'];
|
75 |
+
|
76 |
+
$storegroupmodel->setData('menugroupid',$postData['menugroup']);
|
77 |
+
$storegroupmodel->setData('store_id',$postData['store']['store_id']);
|
78 |
+
$storegroupmodel->save();
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
?>
|
app/code/local/Wavethemes/Jmmegamenu/Model/Status.php
ADDED
@@ -0,0 +1,24 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Model_Status extends Varien_Object
|
12 |
+
{
|
13 |
+
const STATUS_ENABLED = 1;
|
14 |
+
const STATUS_DISABLED = 0;
|
15 |
+
static public function getOptionArray()
|
16 |
+
{
|
17 |
+
return array(
|
18 |
+
self::STATUS_ENABLED => Mage::helper('jmmegamenu')->__
|
19 |
+
('Enabled'),
|
20 |
+
self::STATUS_DISABLED => Mage::helper('jmmegamenu')->__
|
21 |
+
('Disabled')
|
22 |
+
);
|
23 |
+
}
|
24 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/Model/System/Config/Source/ListAnimationType.php
ADDED
@@ -0,0 +1,34 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# JM Fabian - Version 1.0 - Licence Owner JA155256
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
|
12 |
+
|
13 |
+
class Wavethemes_Jmmegamenu_Model_System_Config_Source_ListAnimationType
|
14 |
+
{
|
15 |
+
public function toOptionArray()
|
16 |
+
{
|
17 |
+
return array(
|
18 |
+
array('value'=>'none', 'label'=>Mage::helper('jmmegamenu')->__('None')),
|
19 |
+
array('value'=>'jaws', 'label'=>Mage::helper('jmmegamenu')->__('Fade')),
|
20 |
+
array('value'=>'fence', 'label'=>Mage::helper('jmmegamenu')->__('fence')),
|
21 |
+
array('value'=>'venitian', 'label'=>Mage::helper('jmmegamenu')->__('venitian')),
|
22 |
+
array('value'=>'fly', 'label'=>Mage::helper('jmmegamenu')->__('fly')),
|
23 |
+
array('value'=>'papercut', 'label'=>Mage::helper('jmmegamenu')->__('papercut')),
|
24 |
+
array('value'=>'fan', 'label'=>Mage::helper('jmmegamenu')->__('fan')),
|
25 |
+
array('value'=>'wave', 'label'=>Mage::helper('jmmegamenu')->__('wave')),
|
26 |
+
array('value'=>'helix', 'label'=>Mage::helper('jmmegamenu')->__('helix')),
|
27 |
+
array('value'=>'pop', 'label'=>Mage::helper('jmmegamenu')->__('pop')),
|
28 |
+
array('value'=>'linear', 'label'=>Mage::helper('jmmegamenu')->__('linear')),
|
29 |
+
array('value'=>'bounce', 'label'=>Mage::helper('jmmegamenu')->__('bounce')),
|
30 |
+
array('value'=>'winding', 'label'=>Mage::helper('jmmegamenu')->__('winding')),
|
31 |
+
array('value'=>'shield', 'label'=>Mage::helper('jmmegamenu')->__('shield'))
|
32 |
+
);
|
33 |
+
}
|
34 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/controllers/Adminhtml/JmmegamenuController.php
ADDED
@@ -0,0 +1,450 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|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|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_Adminhtml_JmmegamenuController extends Mage_Adminhtml_Controller_Action
|
12 |
+
{
|
13 |
+
|
14 |
+
protected function _initAction()
|
15 |
+
{
|
16 |
+
|
17 |
+
|
18 |
+
$this->loadLayout()->_setActiveMenu('jmmegamenu/items')->_addBreadcrumb(Mage::helper('adminhtml')->__('Menu Manager'),
|
19 |
+
Mage::helper('adminhtml')->__('Menu Manager'));
|
20 |
+
|
21 |
+
return $this;
|
22 |
+
}
|
23 |
+
public function indexAction() {
|
24 |
+
|
25 |
+
$this->_initAction();
|
26 |
+
$this->renderLayout();
|
27 |
+
}
|
28 |
+
public function groupAction(){
|
29 |
+
$this->_initAction();
|
30 |
+
$this->renderLayout();
|
31 |
+
}
|
32 |
+
|
33 |
+
public function editAction()
|
34 |
+
{
|
35 |
+
$Id = $this->getRequest()->getParam('id');
|
36 |
+
|
37 |
+
$menuModel = Mage::getModel('jmmegamenu/jmmegamenu')->load($Id);
|
38 |
+
|
39 |
+
if ($menuModel->getId() || $Id == 0) {
|
40 |
+
|
41 |
+
if($Id == 0){
|
42 |
+
$menuModel->setData("menutype",2);
|
43 |
+
$menuModel->setData("mega_subcontent",1);
|
44 |
+
$menuModel->setData("mega_group",0);
|
45 |
+
$menuModel->setData("mega_cols",1);
|
46 |
+
$menuModel->setData("showtitle",1);
|
47 |
+
}
|
48 |
+
|
49 |
+
Mage::register('jmmegamenu_data', $menuModel);
|
50 |
+
|
51 |
+
$this->loadLayout();
|
52 |
+
$this->_setActiveMenu('jmmegamenu/items');
|
53 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Menu Manager'), Mage::helper('adminhtml')->__('Menu Manager'));
|
54 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Menu Description'), Mage::helper('adminhtml')->__('Menu Description'));
|
55 |
+
|
56 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
57 |
+
|
58 |
+
$this->_addContent($this->getLayout()->createBlock('jmmegamenu/adminhtml_jmmegamenu_edit'))
|
59 |
+
->_addLeft($this->getLayout()->createBlock('jmmegamenu/adminhtml_jmmegamenu_edit_tabs'));
|
60 |
+
|
61 |
+
$this->renderLayout();
|
62 |
+
|
63 |
+
} else {
|
64 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('jmmegamenu')->__('Menu Item does not exist'));
|
65 |
+
$this->_redirect('*/*/');
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
public function newAction()
|
70 |
+
{
|
71 |
+
$this->_forward('edit');
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
+
public function editgroupAction()
|
76 |
+
{
|
77 |
+
$Id = $this->getRequest()->getParam('id');
|
78 |
+
|
79 |
+
$groupModel = Mage::getModel('jmmegamenu/jmmegamenugroup')->load($Id);
|
80 |
+
|
81 |
+
if ($groupModel->getId() || $Id == 0) {
|
82 |
+
|
83 |
+
/*
|
84 |
+
if($Id == 0){
|
85 |
+
$menuModel->setData("menutype",2);
|
86 |
+
$menuModel->setData("mega_subcontent",1);
|
87 |
+
$menuModel->setData("mega_group",0);
|
88 |
+
$menuModel->setData("mega_cols",1);
|
89 |
+
$menuModel->setData("showtitle",1);
|
90 |
+
}
|
91 |
+
*/
|
92 |
+
|
93 |
+
Mage::register('jmmegamenugroup_data', $groupModel);
|
94 |
+
$this->loadLayout();
|
95 |
+
$this->_setActiveMenu('jmmegamenu/group');
|
96 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Menu Group Configuration'), Mage::helper('adminhtml')->__('Menu Group Configuration'));
|
97 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Menu Group Configuration'), Mage::helper('adminhtml')->__('Menu Group Configuration'));
|
98 |
+
|
99 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
100 |
+
|
101 |
+
$this->_addContent($this->getLayout()->createBlock('jmmegamenu/adminhtml_jmmegamenugroup_edit'))
|
102 |
+
->_addLeft($this->getLayout()->createBlock('jmmegamenu/adminhtml_jmmegamenugroup_edit_tabs'));
|
103 |
+
|
104 |
+
$this->renderLayout();
|
105 |
+
|
106 |
+
} else {
|
107 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('jmmegamenu')->__('Menu Group does not exist'));
|
108 |
+
$this->_redirect('*/*/');
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
|
113 |
+
public function newgroupAction()
|
114 |
+
{
|
115 |
+
$this->_forward('editgroup');
|
116 |
+
}
|
117 |
+
protected function getNextorder($where){
|
118 |
+
|
119 |
+
$resource = Mage::getSingleton('core/resource');
|
120 |
+
$read= $resource->getConnection('core_read');
|
121 |
+
$menutable = $resource->getTableName('jmmegamenu');
|
122 |
+
$sqlquery = 'SELECT MAX(ordering) From '.$menutable.' where '.$where;
|
123 |
+
$rows = $read->fetchAll($sqlquery);
|
124 |
+
if($rows){
|
125 |
+
return $rows[0]['MAX(ordering)'] + 1;
|
126 |
+
}
|
127 |
+
|
128 |
+
}
|
129 |
+
|
130 |
+
public function saveAction()
|
131 |
+
{
|
132 |
+
if ( $this->getRequest()->getPost() ) {
|
133 |
+
if(isset($_FILES['image']['name']) && $_FILES['image']['name'] != '') {
|
134 |
+
try {
|
135 |
+
/* Starting upload */
|
136 |
+
$uploader = new Varien_File_Uploader('image');
|
137 |
+
// Any extention would work
|
138 |
+
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
|
139 |
+
$uploader->setAllowRenameFiles(false);
|
140 |
+
// Set the file upload mode
|
141 |
+
// false -> get the file directly in the specified folder
|
142 |
+
// true -> get the file in the product like folders
|
143 |
+
// (file.jpg will go in something like /media/f/i/file.jpg)
|
144 |
+
$uploader->setFilesDispersion(false);
|
145 |
+
// We set media as the upload dir
|
146 |
+
$path = Mage::getBaseDir('media') . DS ."jmmegamenu".DS;
|
147 |
+
$uploader->save($path, $_FILES['image']['name'] );
|
148 |
+
} catch (Exception $e) {
|
149 |
+
}
|
150 |
+
//this way the name is saved in DB
|
151 |
+
$image = "jmmegamenu/".$_FILES['image']['name'];
|
152 |
+
}
|
153 |
+
try {
|
154 |
+
$postData = $this->getRequest()->getPost();
|
155 |
+
if(isset($postData['image']['delete']) && $postData['image']['delete']==1) {
|
156 |
+
$path = Mage::getBaseDir('media') .DS. $postData['image']['value'];
|
157 |
+
$path= preg_replace("/\//", "\\", $path);
|
158 |
+
unlink($path);
|
159 |
+
$postData['image']="";
|
160 |
+
}else{
|
161 |
+
if (isset($image)) $postData['image']= $image;
|
162 |
+
else unset($postData['image']);
|
163 |
+
}
|
164 |
+
$resource = Mage::getSingleton('core/resource');
|
165 |
+
$read= $resource->getConnection('core_read');
|
166 |
+
$menutable = $resource->getTableName('jmmegamenu');
|
167 |
+
if($postData["menualias"] && $postData["menualias"] !== ""){
|
168 |
+
$query = 'SELECT tblmega.menu_id'
|
169 |
+
. ' FROM '.$menutable
|
170 |
+
. ' as tblmega WHERE tblmega.menualias = "'.$postData["menualias"]
|
171 |
+
. '" and tblmega.menu_id != "'.$this->getRequest()->getParam('id')
|
172 |
+
.'" ORDER BY tblmega.menu_id';
|
173 |
+
|
174 |
+
$rows = $read->fetchAll($query);
|
175 |
+
|
176 |
+
if(count($rows)){
|
177 |
+
throw new Exception('The alias already used by another menu item.');
|
178 |
+
}
|
179 |
+
}
|
180 |
+
$menuModel = Mage::getModel('jmmegamenu/jmmegamenu');
|
181 |
+
$helper = Mage::helper('jmmegamenu');
|
182 |
+
if( $this->getRequest()->getParam('id') <= 0 ) {
|
183 |
+
$menuModel->setCreatedTime(Mage::getSingleton('core/date')->gmtDate());
|
184 |
+
$where = " status >= 0 AND parent = ".(int) $postData['parent'];
|
185 |
+
$postData['ordering'] = $this->getNextorder($where);
|
186 |
+
}
|
187 |
+
$menuModel
|
188 |
+
->addData($postData)
|
189 |
+
->setUpdateTime(Mage::getSingleton('core/date')->gmtDate())
|
190 |
+
->setId($this->getRequest()->getParam('id'))
|
191 |
+
->save();
|
192 |
+
|
193 |
+
$helper->reorder(' parent= '.(int)$postData['parent']);
|
194 |
+
|
195 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Menu Item was successfully saved'));
|
196 |
+
Mage::getSingleton('adminhtml/session')->setJmMegamenuData(false);
|
197 |
+
if ($this->getRequest()->getParam('back')) {
|
198 |
+
$this->_redirect('*/*/edit', array('id' => $menuModel->getId()));
|
199 |
+
return;
|
200 |
+
}
|
201 |
+
$this->_redirect('*/*/index/groupid/'.$postData['menugroup']);
|
202 |
+
return;
|
203 |
+
} catch (Exception $e) {
|
204 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
205 |
+
Mage::getSingleton('adminhtml/session')->setJmMegamenuData($this->getRequest()->getPost());
|
206 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
207 |
+
return;
|
208 |
+
}
|
209 |
+
}
|
210 |
+
$this->_redirect('*/*/');
|
211 |
+
}
|
212 |
+
|
213 |
+
public function savegroupAction()
|
214 |
+
{
|
215 |
+
if ( $this->getRequest()->getPost() ) {
|
216 |
+
try {
|
217 |
+
$postData = $this->getRequest()->getPost();
|
218 |
+
|
219 |
+
|
220 |
+
$groupModel = Mage::getModel('jmmegamenu/jmmegamenugroup');
|
221 |
+
$helper = Mage::helper('jmmegamenu');
|
222 |
+
if( $this->getRequest()->getParam('id') <= 0 ) {
|
223 |
+
$groupModel->setCreatedTime(Mage::getSingleton('core/date')->gmtDate());
|
224 |
+
}
|
225 |
+
$oldstoreid = $groupModel->load($this->getRequest()->getParam('id'))->getstoreid();
|
226 |
+
|
227 |
+
$resource = Mage::getSingleton('core/resource');
|
228 |
+
$read= $resource->getConnection('core_read');
|
229 |
+
$write = $resource->getConnection('core_write');
|
230 |
+
|
231 |
+
//remove assigning this menu group for the old store
|
232 |
+
if($oldstoreid !== $postData['storeid']){
|
233 |
+
$storegrouptable = $resource->getTableName('jmmegamenu_store_menugroup');
|
234 |
+
$query = 'Delete '
|
235 |
+
. ' FROM '.$storegrouptable
|
236 |
+
. ' WHERE store_id = "'.$oldstoreid
|
237 |
+
. '" and menugroupid = "'.$this->getRequest()->getParam('id').'"';
|
238 |
+
|
239 |
+
$write->query($query);
|
240 |
+
}
|
241 |
+
$query = 'SELECT store_id'
|
242 |
+
. ' FROM '.$resource->getTableName('jmmegamenu_store_menugroup')
|
243 |
+
. ' WHERE store_id = "'.$oldstoreid
|
244 |
+
.'" ORDER BY store_id';
|
245 |
+
$storegroups = $read->fetchRow($query);
|
246 |
+
|
247 |
+
|
248 |
+
$query = 'SELECT id,storeid'
|
249 |
+
. ' FROM '.$resource->getTableName('jmmegamenu_types')
|
250 |
+
. ' WHERE storeid = "'.$oldstoreid
|
251 |
+
.'" ORDER BY storeid';
|
252 |
+
$groupstores = $read->fetchRow($query);
|
253 |
+
|
254 |
+
|
255 |
+
if(empty($storegroups) and $groupstores){
|
256 |
+
$adds = array();
|
257 |
+
$adds["store_id"] = $groupstores["storeid"];
|
258 |
+
$adds["menugroupid"] = $groupstores["id"];
|
259 |
+
$write->insert($resource->getTableName('jmmegamenu_store_menugroup'),$adds);
|
260 |
+
$write->commit();
|
261 |
+
}
|
262 |
+
|
263 |
+
$groupModel
|
264 |
+
->addData($postData)
|
265 |
+
->setUpdateTime(Mage::getSingleton('core/date')->gmtDate())
|
266 |
+
->setId($this->getRequest()->getParam('id'))
|
267 |
+
->save();
|
268 |
+
|
269 |
+
//check to see if there are any menu group associated with this store
|
270 |
+
$storegroupModel = Mage::getModel('jmmegamenu/jmmegamenustoregroup');
|
271 |
+
$storecollection = $storegroupModel->getCollection()->addFieldToFilter("store_id",array('eq' => $postData['storeid']));
|
272 |
+
if(!count($storecollection)){
|
273 |
+
$storegroupModel->setstore_id($postData['storeid'])
|
274 |
+
->setmenugroupid($groupModel->getId())
|
275 |
+
->save();
|
276 |
+
}
|
277 |
+
|
278 |
+
|
279 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Menu Group was successfully saved'));
|
280 |
+
Mage::getSingleton('adminhtml/session')->setJmMegamenugroupData(false);
|
281 |
+
if ($this->getRequest()->getParam('back')) {
|
282 |
+
$this->_redirect('*/*/editgroup', array('id' => $groupModel->getId()));
|
283 |
+
return;
|
284 |
+
}
|
285 |
+
$this->_redirect('*/*/group');
|
286 |
+
return;
|
287 |
+
} catch (Exception $e) {
|
288 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
289 |
+
Mage::getSingleton('adminhtml/session')->setJmMegamenugroupData($this->getRequest()->getPost());
|
290 |
+
$this->_redirect('*/*/editgroup', array('id' => $this->getRequest()->getParam('id')));
|
291 |
+
return;
|
292 |
+
}
|
293 |
+
}
|
294 |
+
$this->_redirect('*/*/');
|
295 |
+
}
|
296 |
+
|
297 |
+
|
298 |
+
public function deleteAction()
|
299 |
+
{
|
300 |
+
if( $this->getRequest()->getParam('id') > 0 ) {
|
301 |
+
try {
|
302 |
+
|
303 |
+
$this->deleteitems($this->getRequest()->getParam('id'));
|
304 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Brand was successfully deleted'));
|
305 |
+
$groupid = $this->getRequest()->getParam('group') ;
|
306 |
+
$this->_redirect('*/*/index', array('groupid' => $groupid));
|
307 |
+
} catch (Exception $e) {
|
308 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
309 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
310 |
+
}
|
311 |
+
}
|
312 |
+
//$this->_redirect('*/*/');
|
313 |
+
}
|
314 |
+
|
315 |
+
public function deletegroupAction()
|
316 |
+
{
|
317 |
+
|
318 |
+
if( $this->getRequest()->getParam('id') > 0 ) {
|
319 |
+
$groupid = $this->getRequest()->getParam('id');
|
320 |
+
$storeid = $this->getRequest()->getParam('storeid');
|
321 |
+
$resource = Mage::getSingleton('core/resource');
|
322 |
+
$read= $resource->getConnection('core_read');
|
323 |
+
$write = $resource->getConnection('core_write');
|
324 |
+
|
325 |
+
try {
|
326 |
+
$groupModel = Mage::getModel('jmmegamenu/jmmegamenugroup');
|
327 |
+
$groupModel->setId($groupid)->delete();
|
328 |
+
$storegrouptable = $resource->getTableName('jmmegamenu_store_menugroup');
|
329 |
+
$query = 'Delete '
|
330 |
+
. ' FROM '.$storegrouptable
|
331 |
+
. ' WHERE menugroupid = "'.$groupid.'"';
|
332 |
+
|
333 |
+
$write->query($query);
|
334 |
+
|
335 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('The menu group was successfully deleted'));
|
336 |
+
$this->_forward('group');
|
337 |
+
} catch (Exception $e) {
|
338 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
339 |
+
$this->_redirect('*/*/editgroup', array('id' => $this->getRequest()->getParam('id')));
|
340 |
+
}
|
341 |
+
|
342 |
+
}
|
343 |
+
|
344 |
+
}
|
345 |
+
|
346 |
+
protected function deleteitems($id){
|
347 |
+
if($id){
|
348 |
+
$menuModel = Mage::getModel('jmmegamenu/jmmegamenu');
|
349 |
+
$menuModel->setId($id)->delete();
|
350 |
+
$collections = $menuModel->getCollection()->addFilter("parent",$id,"eq");
|
351 |
+
foreach($collections as $collection){
|
352 |
+
$this->deleteitems($collection->menu_id);
|
353 |
+
}
|
354 |
+
}
|
355 |
+
}
|
356 |
+
|
357 |
+
|
358 |
+
|
359 |
+
public function ajaxAction(){
|
360 |
+
|
361 |
+
$groupid = $this->getRequest()->getParam('menugroup');
|
362 |
+
$activecat = $this->getRequest()->getParam('activecat');
|
363 |
+
$helper = Mage::helper('jmmegamenu');
|
364 |
+
|
365 |
+
$groupModel = Mage::getModel('jmmegamenu/jmmegamenugroup')->load($groupid);
|
366 |
+
$storeid = $groupModel->getData("storeid");
|
367 |
+
$store = Mage::app()->getStore($storeid);
|
368 |
+
//The root category id of this store
|
369 |
+
$parent = $store->getRootCategoryId();
|
370 |
+
/**
|
371 |
+
* Check if parent node of the store still exists
|
372 |
+
*/
|
373 |
+
$category = Mage::getModel('catalog/category');
|
374 |
+
/* @var $category Mage_Catalog_Model_Category */
|
375 |
+
if (!$category->checkId($parent)) {
|
376 |
+
return array();
|
377 |
+
}
|
378 |
+
|
379 |
+
$recursionLevel = max(0, $store->getConfig('catalog/navigation/max_depth'));
|
380 |
+
$storeCategories = $category->getCategories($parent, $recursionLevel, false, true, true);
|
381 |
+
|
382 |
+
$storeCategories = $storeCategories->load()->addAttributeToSelect("*");
|
383 |
+
|
384 |
+
//categories list
|
385 |
+
$catlist = $helper->getoutputList($parent,$storeCategories,"name","entity_id","parent_id");
|
386 |
+
$clist = array();
|
387 |
+
foreach($catlist as $id => $cat){
|
388 |
+
$category = Mage::getModel('catalog/category')->load($id);
|
389 |
+
$url = $category->getUrl();
|
390 |
+
$clist[$url] = $cat;
|
391 |
+
}
|
392 |
+
$response = array();
|
393 |
+
$categories = '<select class=" select" name="category" id="category">';
|
394 |
+
|
395 |
+
foreach($clist as $url => $catname){
|
396 |
+
if($activecat == $url){
|
397 |
+
$categories .= '<option selected value="'.$url.'">'.$catname.'</option>';
|
398 |
+
}else{
|
399 |
+
$categories .= '<option value="'.$url.'">'.$catname.'</option>';
|
400 |
+
}
|
401 |
+
}
|
402 |
+
$categories .= '</select>';
|
403 |
+
$response["category"] = $categories;
|
404 |
+
|
405 |
+
//cmspages list
|
406 |
+
$cmspages = array();
|
407 |
+
$cmspages = '<select class=" select" name="cms" id="cms">';
|
408 |
+
if(Mage::getStoreConfig("web/secure/use_in_adminhtml")){
|
409 |
+
$baseurl = Mage::getStoreConfig("web/secure/base_url");
|
410 |
+
}else{
|
411 |
+
$baseurl = Mage::getBaseUrl();
|
412 |
+
}
|
413 |
+
if(!strpos($baseurl,"index.php")) $baseurl .= "index.php/";
|
414 |
+
foreach($helper->getListcms($storeid) as $page){
|
415 |
+
$url = $baseurl.$page;
|
416 |
+
$cmspages .= '<option value="'.$url.'">'.$page.'</option>';
|
417 |
+
}
|
418 |
+
$cmspages .= "</select>";
|
419 |
+
$response["cmspage"] = $cmspages;
|
420 |
+
|
421 |
+
//get collections of all menu item filter by the requested menu group
|
422 |
+
if($this->getRequest()->getParam('menuid')){
|
423 |
+
$menumodle = Mage::getModel('jmmegamenu/jmmegamenu')->load($this->getRequest()->getParam('menuid'));
|
424 |
+
$parentid = $menumodle->getData("parent");
|
425 |
+
$collections = Mage::getModel('jmmegamenu/jmmegamenu')->getCollection()->addFieldToFilter("menu_id",array("neq" => $this->getRequest()->getParam('menuid')))
|
426 |
+
->addFieldToFilter("menugroup",array('eq' => $groupid ));
|
427 |
+
} else{
|
428 |
+
$collections = Mage::getModel('jmmegamenu/jmmegamenu')->getCollection()->addFieldToFilter("menugroup",array('eq' => $groupid ));
|
429 |
+
}
|
430 |
+
|
431 |
+
$parent = '<select class=" select" name="parent" id="parent">';
|
432 |
+
//Get the parent list
|
433 |
+
$parents = $helper->getoutputList(0,$collections,"title","menu_id","parent",true);
|
434 |
+
foreach($parents as $paid => $palabel){
|
435 |
+
$parent .= '<option value="'.$paid;
|
436 |
+
if($paid == $parentid){
|
437 |
+
$parent .= '" selected="selected"';
|
438 |
+
}else{
|
439 |
+
$parent .= '" ';
|
440 |
+
}
|
441 |
+
$parent .= ' >'.$palabel.'</option>';
|
442 |
+
}
|
443 |
+
$parent .= '</select>';
|
444 |
+
$response['parent'] = $parent;
|
445 |
+
|
446 |
+
echo json_encode($response);
|
447 |
+
|
448 |
+
}
|
449 |
+
|
450 |
+
}
|
app/code/local/Wavethemes/Jmmegamenu/controllers/IndexController.php
ADDED
@@ -0,0 +1,20 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
class Wavethemes_Jmmegamenu_IndexController extends Mage_Core_Controller_Front_Action
|
12 |
+
{
|
13 |
+
public function indexAction()
|
14 |
+
{
|
15 |
+
$this->loadLayout();
|
16 |
+
$this->renderLayout();
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
?>
|
app/code/local/Wavethemes/Jmmegamenu/etc/adminhtml.xml
ADDED
@@ -0,0 +1,31 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<wavethemes_jmmegamenu>
|
12 |
+
<title>JM Megamenu List</title>
|
13 |
+
</wavethemes_jmmegamenu>
|
14 |
+
</children>
|
15 |
+
</config>
|
16 |
+
</children>
|
17 |
+
</system>
|
18 |
+
</children>
|
19 |
+
</admin>
|
20 |
+
</resources>
|
21 |
+
</acl>
|
22 |
+
<translate>
|
23 |
+
<modules>
|
24 |
+
<Wavethemes_Jmmegamenu>
|
25 |
+
<files>
|
26 |
+
<default>Wavethemes_Jmmegamenu.csv</default>
|
27 |
+
</files>
|
28 |
+
</Wavethemes_Jmmegamenu>
|
29 |
+
</modules>
|
30 |
+
</translate>
|
31 |
+
</config>
|
app/code/local/Wavethemes/Jmmegamenu/etc/config.xml
ADDED
@@ -0,0 +1,191 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
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|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Wavethemes_Jmmegamenu>
|
5 |
+
<version>0.1.1</version>
|
6 |
+
</Wavethemes_Jmmegamenu>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<jmmegamenu>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Wavethemes_Jmmegamenu</module>
|
14 |
+
<frontName>jmmegamenu</frontName>
|
15 |
+
</args>
|
16 |
+
</jmmegamenu>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<jmmegamenu>
|
21 |
+
<file>jmmegamenu.xml</file>
|
22 |
+
</jmmegamenu>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<admin>
|
27 |
+
<routers>
|
28 |
+
<jmmegamenu>
|
29 |
+
<use>admin</use>
|
30 |
+
<args>
|
31 |
+
<module>Wavethemes_Jmmegamenu</module>
|
32 |
+
<frontName>jmmegamenu</frontName>
|
33 |
+
</args>
|
34 |
+
</jmmegamenu>
|
35 |
+
</routers>
|
36 |
+
</admin>
|
37 |
+
<adminhtml>
|
38 |
+
<menu>
|
39 |
+
<joomlart>
|
40 |
+
<title>Joomlart</title>
|
41 |
+
<sort_order>100</sort_order>
|
42 |
+
<children>
|
43 |
+
<jmmegamenu module="jmmegamenu">
|
44 |
+
<title>JM Mega Menu</title>
|
45 |
+
<sort_order>0</sort_order>
|
46 |
+
<children>
|
47 |
+
<groups module="jmmegamenu">
|
48 |
+
<title>Manage Menu Groups</title>
|
49 |
+
<sort_order>0</sort_order>
|
50 |
+
<action>jmmegamenu/adminhtml_jmmegamenu/group</action>
|
51 |
+
</groups>
|
52 |
+
<setting module="admin">
|
53 |
+
<title>Settings</title>
|
54 |
+
<sort_order>2</sort_order>
|
55 |
+
<action>adminhtml/system_config/edit/section/wavethemes_jmmegamenu</action>
|
56 |
+
</setting>
|
57 |
+
</children>
|
58 |
+
</jmmegamenu>
|
59 |
+
</children>
|
60 |
+
</joomlart>
|
61 |
+
</menu>
|
62 |
+
<acl>
|
63 |
+
<resources>
|
64 |
+
<all>
|
65 |
+
<title>Allow Everything</title>
|
66 |
+
</all>
|
67 |
+
<admin>
|
68 |
+
<children>
|
69 |
+
<jmmegamenu translate="title" module="jmmegamenu">
|
70 |
+
<title>Jmmegamenu</title>
|
71 |
+
<sort_order>1000</sort_order>
|
72 |
+
<children>
|
73 |
+
<jmbasethemebackend translate="title">
|
74 |
+
<title>Backend Page Title</title>
|
75 |
+
</jmbasethemebackend>
|
76 |
+
</children>
|
77 |
+
</jmmegamenu>
|
78 |
+
</children>
|
79 |
+
</admin>
|
80 |
+
</resources>
|
81 |
+
</acl>
|
82 |
+
<layout>
|
83 |
+
<updates>
|
84 |
+
<jmmegamenu>
|
85 |
+
<file>jmmegamenu.xml</file>
|
86 |
+
</jmmegamenu>
|
87 |
+
</updates>
|
88 |
+
</layout>
|
89 |
+
<translate>
|
90 |
+
<modules>
|
91 |
+
<Wavethemes_Jmmegamenu>
|
92 |
+
<files>
|
93 |
+
<default>Wavethemes_Jmmegamenu.csv</default>
|
94 |
+
</files>
|
95 |
+
</Wavethemes_Jmmegamenu>
|
96 |
+
</modules>
|
97 |
+
</translate>
|
98 |
+
</adminhtml>
|
99 |
+
<default>
|
100 |
+
<wavethemes_jmmegamenu>
|
101 |
+
<wavethemes_jmmegamenu>
|
102 |
+
<show>1</show>
|
103 |
+
</wavethemes_jmmegamenu>
|
104 |
+
</wavethemes_jmmegamenu>
|
105 |
+
</default>
|
106 |
+
<global>
|
107 |
+
<models>
|
108 |
+
<jmmegamenu>
|
109 |
+
<class>Wavethemes_Jmmegamenu_Model</class>
|
110 |
+
<resourceModel>jmmegamenu_mysql4</resourceModel>
|
111 |
+
</jmmegamenu>
|
112 |
+
<jmmegamenugroup>
|
113 |
+
<class>Wavethemes_Jmmegamenu_Model_Jmmegamenugroup</class>
|
114 |
+
<resourceModel>jmmegamenu_mysql4_Jmmegamenugroup</resourceModel>
|
115 |
+
</jmmegamenugroup>
|
116 |
+
<jmmegamenustoregroup>
|
117 |
+
<class>Wavethemes_Jmmegamenu_Model_Jmmegamenustoregroup</class>
|
118 |
+
<resourceModel>jmmegamenu_mysql4_Jmmegamenustoregroup</resourceModel>
|
119 |
+
</jmmegamenustoregroup>
|
120 |
+
<jmmegamenu_mysql4>
|
121 |
+
<class>Wavethemes_Jmmegamenu_Model_Mysql4</class>
|
122 |
+
<entities>
|
123 |
+
<jmmegamenu>
|
124 |
+
<table>jmmegamenu</table>
|
125 |
+
</jmmegamenu>
|
126 |
+
<jmmegamenu_types>
|
127 |
+
<table>jmmegamenu_types</table>
|
128 |
+
</jmmegamenu_types>
|
129 |
+
<jmmegamenu_store_menugroup>
|
130 |
+
<table>jmmegamenu_store_menugroup</table>
|
131 |
+
</jmmegamenu_store_menugroup>
|
132 |
+
</entities>
|
133 |
+
</jmmegamenu_mysql4>
|
134 |
+
|
135 |
+
|
136 |
+
</models>
|
137 |
+
<resources>
|
138 |
+
<jmmegamenu_setup>
|
139 |
+
<setup>
|
140 |
+
<module>Wavethemes_Jmmegamenu</module>
|
141 |
+
</setup>
|
142 |
+
<connection>
|
143 |
+
<use>core_setup</use>
|
144 |
+
</connection>
|
145 |
+
</jmmegamenu_setup>
|
146 |
+
<jmmegamenu_write>
|
147 |
+
<connection>
|
148 |
+
<use>core_write</use>
|
149 |
+
</connection>
|
150 |
+
</jmmegamenu_write>
|
151 |
+
<jmmegamenu_read>
|
152 |
+
<connection>
|
153 |
+
<use>core_read</use>
|
154 |
+
</connection>
|
155 |
+
</jmmegamenu_read>
|
156 |
+
</resources>
|
157 |
+
<blocks>
|
158 |
+
<jmmegamenu>
|
159 |
+
<class>Wavethemes_Jmmegamenu_Block</class>
|
160 |
+
</jmmegamenu>
|
161 |
+
<page>
|
162 |
+
<rewrite>
|
163 |
+
<html_topmenu>Wavethemes_Jmmegamenu_Block_Jmmegamenu</html_topmenu>
|
164 |
+
</rewrite>
|
165 |
+
</page>
|
166 |
+
</blocks>
|
167 |
+
<helpers>
|
168 |
+
<jmmegamenu>
|
169 |
+
<class>Wavethemes_Jmmegamenu_Helper</class>
|
170 |
+
</jmmegamenu>
|
171 |
+
</helpers>
|
172 |
+
<events>
|
173 |
+
<adminhtml_store_edit_form_prepare_form>
|
174 |
+
<observers>
|
175 |
+
<wavethemes_jmmegamenu>
|
176 |
+
<class>Wavethemes_Jmmegamenu_Model_Observer</class>
|
177 |
+
<method>prefarestoreForm</method>
|
178 |
+
</wavethemes_jmmegamenu>
|
179 |
+
</observers>
|
180 |
+
</adminhtml_store_edit_form_prepare_form>
|
181 |
+
<store_edit>
|
182 |
+
<observers>
|
183 |
+
<wavethemes_jmmegamenu>
|
184 |
+
<class>Wavethemes_Jmmegamenu_Model_Observer</class>
|
185 |
+
<method>storeedit</method>
|
186 |
+
</wavethemes_jmmegamenu>
|
187 |
+
</observers>
|
188 |
+
</store_edit>
|
189 |
+
</events>
|
190 |
+
</global>
|
191 |
+
</config>
|
app/code/local/Wavethemes/Jmmegamenu/etc/system.xml
ADDED
@@ -0,0 +1,51 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<joomlart translate="label" module="jmmegamenu">
|
5 |
+
<label>JoomlArt</label>
|
6 |
+
<sort_order>210</sort_order>
|
7 |
+
</joomlart>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<wavethemes_jmmegamenu>
|
11 |
+
<label>JM Mega menu</label>
|
12 |
+
<tab>joomlart</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>10</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 |
+
<wavethemes_jmmegamenu translate="label">
|
20 |
+
<label>JM Mega Menu: Config General</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>2000</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 |
+
<show translate="label" module="core">
|
28 |
+
<label>Enabled</label>
|
29 |
+
<sort_order>10</sort_order>
|
30 |
+
<frontend_type>select</frontend_type>
|
31 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
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 |
+
</show>
|
36 |
+
<animation translate="label">
|
37 |
+
<label>Animation Type</label>
|
38 |
+
<frontend_type>select</frontend_type>
|
39 |
+
<source_model>jmmegamenu/system_config_source_listAnimationType</source_model>
|
40 |
+
<sort_order>10</sort_order>
|
41 |
+
<comment>Animation effect you want to display sub-menu items</comment>
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
<show_in_website>1</show_in_website>
|
44 |
+
<show_in_store>1</show_in_store>
|
45 |
+
</animation>
|
46 |
+
</fields>
|
47 |
+
</wavethemes_jmmegamenu>
|
48 |
+
</groups>
|
49 |
+
</wavethemes_jmmegamenu>
|
50 |
+
</sections>
|
51 |
+
</config>
|
app/code/local/Wavethemes/Jmmegamenu/sql/jmmegamenu_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,73 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
$installer = $this;
|
12 |
+
$installer->startSetup();
|
13 |
+
$installer->run("
|
14 |
+
DROP TABLE IF EXISTS {$this->getTable('jmmegamenu')};
|
15 |
+
CREATE TABLE {$this->getTable('jmmegamenu')} (
|
16 |
+
`menu_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
17 |
+
`title` varchar(255) NOT NULL DEFAULT '',
|
18 |
+
`link` text,
|
19 |
+
`url` varchar(255) DEFAULT NULL,
|
20 |
+
`catid` int(11) DEFAULT NULL,
|
21 |
+
`menualias` varchar(255) DEFAULT NULL,
|
22 |
+
`menutype` varchar(50) NOT NULL DEFAULT '',
|
23 |
+
`category` varchar(255) DEFAULT NULL,
|
24 |
+
`cms` varchar(255) DEFAULT NULL,
|
25 |
+
`parent` int(11) unsigned NOT NULL DEFAULT '0',
|
26 |
+
`lft` int(11) unsigned NOT NULL DEFAULT '0',
|
27 |
+
`rgt` int(11) unsigned NOT NULL DEFAULT '0',
|
28 |
+
`mega_cols` int(11) unsigned NOT NULL DEFAULT '0',
|
29 |
+
`mega_group` smallint(6) NOT NULL DEFAULT '0',
|
30 |
+
`mega_class` varchar(255) NOT NULL DEFAULT '',
|
31 |
+
`status` smallint(6) NOT NULL DEFAULT '0',
|
32 |
+
`ordering` int(11) DEFAULT '0',
|
33 |
+
`showtitle` tinyint(6) NOT NULL DEFAULT '1',
|
34 |
+
`menugroup` int(11) unsigned NOT NULL,
|
35 |
+
`created_time` datetime DEFAULT NULL,
|
36 |
+
`update_time` datetime DEFAULT NULL,
|
37 |
+
`static_block` varchar(255) DEFAULT NULL,
|
38 |
+
`mega_subcontent` int(11) NOT NULL DEFAULT '1',
|
39 |
+
`mega_width` int(11) DEFAULT NULL,
|
40 |
+
`mega_colw` int(11) DEFAULT NULL,
|
41 |
+
`mega_colxw` varchar(255) DEFAULT NULL,
|
42 |
+
`desc` text,
|
43 |
+
`browserNav` tinyint(4) NOT NULL DEFAULT '0',
|
44 |
+
`contentxml` text,
|
45 |
+
PRIMARY KEY (`menu_id`)
|
46 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
47 |
+
|
48 |
+
DROP TABLE IF EXISTS {$this->getTable('jmmegamenu_store_menugroup')};
|
49 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('jmmegamenu_store_menugroup')}` (
|
50 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
51 |
+
`store_id` int(11) unsigned NOT NULL,
|
52 |
+
`menugroupid` int(11) NOT NULL,
|
53 |
+
PRIMARY KEY (`id`),
|
54 |
+
UNIQUE KEY `store_id` (`store_id`)
|
55 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
|
56 |
+
|
57 |
+
|
58 |
+
DROP TABLE IF EXISTS {$this->getTable('jmmegamenu_types')};
|
59 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('jmmegamenu_types')}` (
|
60 |
+
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
61 |
+
`menutype` varchar(75) NOT NULL DEFAULT '',
|
62 |
+
`title` varchar(255) NOT NULL DEFAULT '',
|
63 |
+
`description` varchar(255) NOT NULL DEFAULT '',
|
64 |
+
`storeid` int(10) NOT NULL,
|
65 |
+
PRIMARY KEY (`id`),
|
66 |
+
UNIQUE KEY `menutype` (`menutype`)
|
67 |
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
|
68 |
+
|
69 |
+
|
70 |
+
");
|
71 |
+
|
72 |
+
$installer->endSetup();
|
73 |
+
|
app/code/local/Wavethemes/Jmmegamenu/sql/jmmegamenu_setup/mysql4-upgrade-0.1.0-0.1.1.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
|
4 |
+
$installer->startSetup();
|
5 |
+
$installer->run("
|
6 |
+
ALTER TABLE {$this->getTable('jmmegamenu')} ADD COLUMN `image` varchar(255) DEFAULT '';
|
7 |
+
ALTER TABLE {$this->getTable('jmmegamenu')} ADD COLUMN `description` text DEFAULT ''
|
8 |
+
");
|
9 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/jmmegamenu.xml
ADDED
@@ -0,0 +1,18 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<jmmegamenu_adminhtml_jmmegamenu_index>
|
4 |
+
<reference name="content">
|
5 |
+
<block type="jmmegamenu/adminhtml_jmmegamenu" name="jmmegamenu" />
|
6 |
+
</reference>
|
7 |
+
</jmmegamenu_adminhtml_jmmegamenu_index>
|
8 |
+
<jmmegamenu_adminhtml_jmmegamenu_group>
|
9 |
+
<reference name="content">
|
10 |
+
<block type="jmmegamenu/adminhtml_jmmegamenugroup" name="jmmegamenugroup" />
|
11 |
+
</reference>
|
12 |
+
</jmmegamenu_adminhtml_jmmegamenu_group>
|
13 |
+
<jmmegamenu_adminhtml_jmmegamenu_edit>
|
14 |
+
<reference name="head">
|
15 |
+
<action method="addItem" ><type>js</type><name>joomlart/jmmegamenu/event.simulate.js</name></action>
|
16 |
+
</reference>
|
17 |
+
</jmmegamenu_adminhtml_jmmegamenu_edit>
|
18 |
+
</layout>
|
app/design/adminhtml/default/default/template/widget/gridmenu.phtml
ADDED
@@ -0,0 +1,229 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â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
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Template for Mage_Adminhtml_Block_Widget_Grid
|
30 |
+
*
|
31 |
+
* getId()
|
32 |
+
* getCollection()
|
33 |
+
* getColumns()
|
34 |
+
* getPagerVisibility()
|
35 |
+
* getVarNamePage()
|
36 |
+
*/
|
37 |
+
$numColumns = sizeof($this->getColumns());
|
38 |
+
?>
|
39 |
+
<?php if($this->getCollection()): ?>
|
40 |
+
<?php if($this->canDisplayContainer()): ?>
|
41 |
+
<?php if($this->getGridHeader()): ?>
|
42 |
+
<div class="content-header">
|
43 |
+
<table cellspacing="0">
|
44 |
+
<tr>
|
45 |
+
<td style="width:50%;"><h2><?php //echo $this->getGridHeader(); ?></h2></td>
|
46 |
+
</tr>
|
47 |
+
</table>
|
48 |
+
</div>
|
49 |
+
<?php endif ?>
|
50 |
+
|
51 |
+
<div id="<?php echo $this->getId() ?>">
|
52 |
+
<?php else: ?>
|
53 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
54 |
+
<?php endif; ?>
|
55 |
+
<?php if($this->getPagerVisibility() || $this->getExportTypes() || $this->getFilterVisibility()): ?>
|
56 |
+
<table cellspacing="0" class="actions">
|
57 |
+
<tr>
|
58 |
+
<?php if($this->getPagerVisibility()): ?>
|
59 |
+
<td class="pager">
|
60 |
+
<?php echo $this->__('Page') ?>
|
61 |
+
|
62 |
+
<?php $_curPage = $this->getCurPage() ?>
|
63 |
+
<?php $_lastPage = $this->getLastPage() ?>
|
64 |
+
<?php if($_curPage>1): ?>
|
65 |
+
<a href="#" title="<?php echo $this->__('Previous page') ?>" onclick="<?php echo $this->getJsObjectName() ?>.setPage('<?php echo ($_curPage-1) ?>');return false;"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a>
|
66 |
+
<?php else: ?>
|
67 |
+
<img src="<?php echo $this->getSkinUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/>
|
68 |
+
<?php endif; ?>
|
69 |
+
|
70 |
+
<input type="text" name="<?php echo $this->getVarNamePage() ?>" value="<?php echo $_curPage ?>" class="input-text page" onkeypress="<?php echo $this->getJsObjectName() ?>.inputPage(event, '<?php echo $_lastPage ?>')"/>
|
71 |
+
|
72 |
+
<?php if($_curPage < $_lastPage): ?>
|
73 |
+
<a href="#" title="<?php echo $this->__('Next page') ?>" onclick="<?php echo $this->getJsObjectName() ?>.setPage('<?php echo ($_curPage+1) ?>');return false;"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a>
|
74 |
+
<?php else: ?>
|
75 |
+
<img src="<?php echo $this->getSkinUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/>
|
76 |
+
<?php endif; ?>
|
77 |
+
|
78 |
+
<?php echo $this->__('of %s pages', $this->getLastPage()) ?>
|
79 |
+
<span class="separator">|</span>
|
80 |
+
<?php echo $this->__('View') ?>
|
81 |
+
<select name="<?php echo $this->getVarNameLimit() ?>" onchange="<?php echo $this->getJsObjectName() ?>.loadByElement(this)">
|
82 |
+
<option value="20"<?php if($this->getCollection()->getPageSize()==20): ?> selected="selected"<?php endif; ?>>20</option>
|
83 |
+
<option value="30"<?php if($this->getCollection()->getPageSize()==30): ?> selected="selected"<?php endif; ?>>30</option>
|
84 |
+
<option value="50"<?php if($this->getCollection()->getPageSize()==50): ?> selected="selected"<?php endif; ?>>50</option>
|
85 |
+
<option value="100"<?php if($this->getCollection()->getPageSize()==100): ?> selected="selected"<?php endif; ?>>100</option>
|
86 |
+
<option value="200"<?php if($this->getCollection()->getPageSize()==200): ?> selected="selected"<?php endif; ?>>200</option>
|
87 |
+
</select>
|
88 |
+
<?php echo $this->__('per page') ?><span class="separator">|</span>
|
89 |
+
<?php echo $this->__('Total %d records found', $this->getCollection()->getSize()) ?>
|
90 |
+
<span id="<?php echo $this->getHtmlId() ?>-total-count" class="no-display"><?php echo $this->getCollection()->getSize() ?></span>
|
91 |
+
<?php if($this->getRssLists()): ?>
|
92 |
+
<?php foreach ($this->getRssLists() as $_rss): ?>
|
93 |
+
<span class="separator">|</span><a href="<?php echo $_rss->getUrl() ?>" class="link-feed"><?php echo $_rss->getLabel() ?></a>
|
94 |
+
<?php endforeach ?>
|
95 |
+
<?php endif; ?>
|
96 |
+
</td>
|
97 |
+
<?php endif ?>
|
98 |
+
<?php if($this->getExportTypes()): ?>
|
99 |
+
<td class="export a-right">
|
100 |
+
<img src="<?php echo $this->getSkinUrl('images/icon_export.gif') ?>" alt="" class="v-middle"/> <?php echo $this->__('Export to:') ?>
|
101 |
+
<select name="<?php echo $this->getId() ?>_export" id="<?php echo $this->getId() ?>_export" style="width:8em;">
|
102 |
+
<?php foreach ($this->getExportTypes() as $_type): ?>
|
103 |
+
<option value="<?php echo $_type->getUrl() ?>"><?php echo $_type->getLabel() ?></option>
|
104 |
+
<?php endforeach; ?>
|
105 |
+
</select>
|
106 |
+
<?php echo $this->getExportButtonHtml() ?>
|
107 |
+
</td>
|
108 |
+
<?php endif; ?>
|
109 |
+
<td class="filter-actions a-right">
|
110 |
+
<?php echo $this->getMainButtonsHtml() ?>
|
111 |
+
</td>
|
112 |
+
</tr>
|
113 |
+
</table>
|
114 |
+
<?php endif; ?>
|
115 |
+
<?php if($this->getMassactionBlock()->isAvailable()): ?>
|
116 |
+
<?php echo $this->getMassactionBlockHtml() ?>
|
117 |
+
<?php endif ?>
|
118 |
+
<div class="grid">
|
119 |
+
<div class="hor-scroll">
|
120 |
+
<table cellspacing="0" class="data" id="<?php echo $this->getId() ?>_table">
|
121 |
+
<?php foreach ($this->getColumns() as $_column): ?>
|
122 |
+
<col <?php echo $_column->getHtmlProperty() ?> />
|
123 |
+
<?php endforeach; ?>
|
124 |
+
<?php if ($this->getHeadersVisibility() || $this->getFilterVisibility()): ?>
|
125 |
+
<thead>
|
126 |
+
<?php if ($this->getHeadersVisibility()): ?>
|
127 |
+
<tr class="headings">
|
128 |
+
<?php foreach ($this->getColumns() as $_column): ?>
|
129 |
+
<th<?php echo $_column->getHeaderHtmlProperty() ?>><span class="nobr"><?php echo $_column->getHeaderHtml() ?></span></th>
|
130 |
+
<?php endforeach; ?>
|
131 |
+
</tr>
|
132 |
+
<?php endif; ?>
|
133 |
+
<?php if ($this->getFilterVisibility()): ?>
|
134 |
+
<tr class="filter">
|
135 |
+
<?php $i=0;foreach ($this->getColumns() as $_column): ?>
|
136 |
+
<th<?php echo $_column->getHeaderHtmlProperty() ?>><?php echo $_column->getFilterHtml() ?></th>
|
137 |
+
<?php endforeach; ?>
|
138 |
+
</tr>
|
139 |
+
<?php endif ?>
|
140 |
+
</thead>
|
141 |
+
<?php endif; ?>
|
142 |
+
<?php if ($this->getCountTotals()): ?>
|
143 |
+
<tfoot>
|
144 |
+
<tr class="totals">
|
145 |
+
<?php foreach ($this->getColumns() as $_column): ?>
|
146 |
+
<th class="<?php echo $_column->getCssProperty() ?>"><?php echo ($_column->hasTotalsLabel()) ? $_column->getTotalsLabel() : $_column->getRowField($_column->getGrid()->getTotals()) ?> </th>
|
147 |
+
<?php endforeach; ?>
|
148 |
+
</tr>
|
149 |
+
</tfoot>
|
150 |
+
<?php endif; ?>
|
151 |
+
|
152 |
+
<tbody>
|
153 |
+
<?php if (($this->getCollection()->getSize()>0) && (!$this->getIsCollapsed())): ?>
|
154 |
+
<?php foreach ($this->getCollection() as $_index=>$_item): ?>
|
155 |
+
<tr title="<?php echo $this->getRowUrl($_item) ?>"<?php if ($_class = $this->getRowClass($_item)):?> class="<?php echo $_class; ?>"<?php endif;?> >
|
156 |
+
<?php $i=0;foreach ($this->getColumns() as $_column): ?>
|
157 |
+
|
158 |
+
<?php if ($this->shouldRenderCell($_item, $_column)):?>
|
159 |
+
<?php $_rowspan = $this->getRowspan($_item, $_column);?>
|
160 |
+
<td <?php echo ($_rowspan ? 'rowspan="' . $_rowspan . '" ' : '') ?>class="<?php echo $_column->getCssProperty() ?> <?php echo ++$i==$numColumns?'last':'' ?>">
|
161 |
+
<?php echo (($_html = $_column->getRowField($_item)) != '' ? $_html : ' ') ?>
|
162 |
+
</td>
|
163 |
+
<?php if ($this->shouldRenderEmptyCell($_item, $_column)):?>
|
164 |
+
<td colspan="<?php echo $this->getEmptyCellColspan($_item)?>" class="last"><?php echo $this->getEmptyCellLabel()?></td>
|
165 |
+
<?php endif;?>
|
166 |
+
<?php endif;?>
|
167 |
+
|
168 |
+
<?php endforeach; ?>
|
169 |
+
</tr>
|
170 |
+
<?php if ($_multipleRows = $this->getMultipleRows($_item)):?>
|
171 |
+
<?php foreach ($_multipleRows as $_i):?>
|
172 |
+
<tr>
|
173 |
+
<?php $i=0;foreach ($this->getMultipleRowColumns($_i) as $_column): ?>
|
174 |
+
<td class="<?php echo $_column->getCssProperty() ?> <?php echo ++$i==$numColumns-1?'last':'' ?>">
|
175 |
+
<?php echo (($_html = $_column->getRowField($_i)) != '' ? $_html : ' ') ?>
|
176 |
+
</td>
|
177 |
+
<?php endforeach; ?>
|
178 |
+
</tr>
|
179 |
+
<?php endforeach;?>
|
180 |
+
<?php endif;?>
|
181 |
+
|
182 |
+
<?php if ($this->shouldRenderSubTotal($_item)): ?>
|
183 |
+
<tr class="subtotals">
|
184 |
+
<?php $i = 0; foreach ($this->getSubTotalColumns() as $_column): ?>
|
185 |
+
<td class="<?php echo $_column->getCssProperty() ?> <?php echo ++$i == $numColumns ? 'last' : '' ?>">
|
186 |
+
<?php echo ($_column->hasSubtotalsLabel() ? $_column->getSubtotalsLabel() :
|
187 |
+
$_column->getRowField($this->getSubTotalItem($_item))
|
188 |
+
);
|
189 |
+
?>
|
190 |
+
</td>
|
191 |
+
<?php endforeach; ?>
|
192 |
+
</tr>
|
193 |
+
<?php endif; ?>
|
194 |
+
<?php endforeach; ?>
|
195 |
+
|
196 |
+
<?php elseif ($this->getEmptyText()): ?>
|
197 |
+
<tr>
|
198 |
+
<td class="empty-text <?php echo $this->getEmptyTextClass() ?>" colspan="<?php echo $numColumns ?>"><?php echo $this->getEmptyText() ?></td>
|
199 |
+
</tr>
|
200 |
+
<?php endif; ?>
|
201 |
+
</tbody>
|
202 |
+
|
203 |
+
</table>
|
204 |
+
</div>
|
205 |
+
</div>
|
206 |
+
<?php if($this->canDisplayContainer()): ?>
|
207 |
+
</div>
|
208 |
+
<script type="text/javascript">
|
209 |
+
//<![CDATA[
|
210 |
+
<?php echo $this->getJsObjectName() ?> = new varienGrid('<?php echo $this->getId() ?>', '<?php echo $this->getGridUrl() ?>', '<?php echo $this->getVarNamePage() ?>', '<?php echo $this->getVarNameSort() ?>', '<?php echo $this->getVarNameDir() ?>', '<?php echo $this->getVarNameFilter() ?>');
|
211 |
+
<?php echo $this->getJsObjectName() ?>.useAjax = '<?php echo $this->getUseAjax() ?>';
|
212 |
+
<?php if($this->getRowClickCallback()): ?>
|
213 |
+
<?php echo $this->getJsObjectName() ?>.rowClickCallback = <?php echo $this->getRowClickCallback() ?>;
|
214 |
+
<?php endif; ?>
|
215 |
+
<?php if($this->getCheckboxCheckCallback()): ?>
|
216 |
+
<?php echo $this->getJsObjectName() ?>.checkboxCheckCallback = <?php echo $this->getCheckboxCheckCallback() ?>;
|
217 |
+
<?php endif; ?>
|
218 |
+
<?php if($this->getRowInitCallback()): ?>
|
219 |
+
<?php echo $this->getJsObjectName() ?>.initRowCallback = <?php echo $this->getRowInitCallback() ?>;
|
220 |
+
<?php echo $this->getJsObjectName() ?>.initGridRows();
|
221 |
+
<?php endif; ?>
|
222 |
+
<?php if($this->getMassactionBlock()->isAvailable()): ?>
|
223 |
+
<?php echo $this->getMassactionBlock()->getJavaScript() ?>
|
224 |
+
<?php endif ?>
|
225 |
+
<?php echo $this->getAdditionalJavaScript(); ?>
|
226 |
+
//]]>
|
227 |
+
</script>
|
228 |
+
<?php endif; ?>
|
229 |
+
<?php endif ?>
|
app/design/frontend/base/default/template/joomlart/jmmegamenu/output.phtml
ADDED
@@ -0,0 +1,4 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
echo $menuoutput;
|
3 |
+
|
4 |
+
?>
|
app/design/frontend/default/default/layout/jmmegamenu.xml
ADDED
@@ -0,0 +1,14 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<jmmegamenu_index_index>
|
4 |
+
<reference name="content">
|
5 |
+
<block type="jmmegamenu/jmmegamenu" name="jmmegamenu" />
|
6 |
+
</reference>
|
7 |
+
</jmmegamenu_index_index>
|
8 |
+
<default>
|
9 |
+
<reference name="head">
|
10 |
+
<action method="addCss"><stylesheet>joomlart/jmmegamenu/css/jmmegamenu.css</stylesheet></action>
|
11 |
+
</reference>
|
12 |
+
|
13 |
+
</default>
|
14 |
+
</layout>
|
app/etc/modules/Wavethemes_Jmmegamenu.xml
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<Wavethemes_Jmmegamenu>
|
6 |
+
<active>true</active>
|
7 |
+
<codePool>local</codePool>
|
8 |
+
</Wavethemes_Jmmegamenu>
|
9 |
+
</modules>
|
10 |
+
</config>
|
app/locale/en_US/Wavethemes_Jmmegamenu.csv
ADDED
@@ -0,0 +1,6 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
"jmmegamenu information","Menu Item Settings"
|
2 |
+
"Menu Item Configuration","Menu Item Configuration"
|
3 |
+
"Child menu items","Child menu items"
|
4 |
+
"Custom xml block","Custom block"
|
5 |
+
"Satic blocks","Static blocks"
|
6 |
+
"Custom block xml", "Custom block"
|
js/joomlart/jmmegamenu/event.simulate.js
ADDED
@@ -0,0 +1,66 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* Event.simulate(@element, eventName[, options]) -> Element
|
3 |
+
*
|
4 |
+
* - @element: element to fire event on
|
5 |
+
* - eventName: name of event to fire (only MouseEvents and HTMLEvents interfaces are supported)
|
6 |
+
* - options: optional object to fine-tune event properties - pointerX, pointerY, ctrlKey, etc.
|
7 |
+
*
|
8 |
+
* $('foo').simulate('click'); // => fires "click" event on an element with id=foo
|
9 |
+
*
|
10 |
+
**/
|
11 |
+
(function(){
|
12 |
+
|
13 |
+
var eventMatchers = {
|
14 |
+
'HTMLEvents': /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
|
15 |
+
'MouseEvents': /^(?:click|dblclick|mouse(?:down|up|over|move|out))$/
|
16 |
+
}
|
17 |
+
var defaultOptions = {
|
18 |
+
pointerX: 0,
|
19 |
+
pointerY: 0,
|
20 |
+
button: 0,
|
21 |
+
ctrlKey: false,
|
22 |
+
altKey: false,
|
23 |
+
shiftKey: false,
|
24 |
+
metaKey: false,
|
25 |
+
bubbles: true,
|
26 |
+
cancelable: true
|
27 |
+
}
|
28 |
+
|
29 |
+
Event.simulate = function(element, eventName) {
|
30 |
+
|
31 |
+
var options = Object.extend(Object.clone(defaultOptions), arguments[2] || { });
|
32 |
+
var oEvent, eventType = null;
|
33 |
+
|
34 |
+
element = $(element);
|
35 |
+
|
36 |
+
for (var name in eventMatchers) {
|
37 |
+
if (eventMatchers[name].test(eventName)) { eventType = name; break; }
|
38 |
+
}
|
39 |
+
|
40 |
+
if (!eventType)
|
41 |
+
throw new SyntaxError('Only HTMLEvents and MouseEvents interfaces are supported');
|
42 |
+
|
43 |
+
if (document.createEvent) {
|
44 |
+
oEvent = document.createEvent(eventType);
|
45 |
+
if (eventType == 'HTMLEvents') {
|
46 |
+
oEvent.initEvent(eventName, options.bubbles, options.cancelable);
|
47 |
+
}
|
48 |
+
else {
|
49 |
+
oEvent.initMouseEvent(eventName, options.bubbles, options.cancelable, document.defaultView,
|
50 |
+
options.button, options.pointerX, options.pointerY, options.pointerX, options.pointerY,
|
51 |
+
options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, options.button, element);
|
52 |
+
}
|
53 |
+
|
54 |
+
element.dispatchEvent(oEvent);
|
55 |
+
}
|
56 |
+
else {
|
57 |
+
options.clientX = options.pointerX;
|
58 |
+
options.clientY = options.pointerY;
|
59 |
+
oEvent = Object.extend(document.createEventObject(), options);
|
60 |
+
element.fireEvent('on' + eventName, oEvent);
|
61 |
+
}
|
62 |
+
return element;
|
63 |
+
}
|
64 |
+
|
65 |
+
Element.addMethods({ simulate: Event.simulate });
|
66 |
+
})();
|
lib/megamenu/mega.class.php
ADDED
@@ -0,0 +1,485 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
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Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/*------------------------------------------------------------------------
|
3 |
+
# $JA#PRODUCT_NAME$ - Version $JA#VERSION$ - Licence Owner $JA#OWNER$
|
4 |
+
# ------------------------------------------------------------------------
|
5 |
+
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
|
6 |
+
# @license - Copyrighted Commercial Software
|
7 |
+
# Author: J.O.O.M Solutions Co., Ltd
|
8 |
+
# Websites: http://www.joomlart.com - http://www.joomlancers.com
|
9 |
+
# This file may not be redistributed in whole or significant part.
|
10 |
+
-------------------------------------------------------------------------*/
|
11 |
+
|
12 |
+
class JAMenuMega
|
13 |
+
{
|
14 |
+
var $children = null;
|
15 |
+
var $items = null;
|
16 |
+
var $open = null;
|
17 |
+
public function __construct($attributes = array()) {
|
18 |
+
|
19 |
+
$this->params = new stdclass();
|
20 |
+
|
21 |
+
$this->params->megamenu = 1;
|
22 |
+
$this->params->startlevel = 0;
|
23 |
+
$this->params->endlevel = 5;
|
24 |
+
}
|
25 |
+
|
26 |
+
|
27 |
+
public function genMenu(){
|
28 |
+
$pid = 0;
|
29 |
+
if (!isset($this->children[$pid])) return; //generate nothing
|
30 |
+
|
31 |
+
$this->beginMenu();
|
32 |
+
|
33 |
+
$this->genMenuItems ($pid, 0);
|
34 |
+
|
35 |
+
$this->endMenu();
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
public function getList($collections){
|
40 |
+
$active = Mage::helper("jmmegamenu")->getActivemenu($collections);
|
41 |
+
if($active){
|
42 |
+
$this->open = $active->tree;
|
43 |
+
}
|
44 |
+
|
45 |
+
foreach($collections as $item){
|
46 |
+
$item->megaparam = new stdclass();
|
47 |
+
$pt = $item->parent;
|
48 |
+
$list = @$children[$pt] ? $children[$pt] : array ();
|
49 |
+
$item->megaparam->cols = $item->mega_cols?$item->mega_cols:1;
|
50 |
+
$item->megaparam->group = $item->mega_group;
|
51 |
+
$item->megaparam->class = $item->mega_class;
|
52 |
+
$item->megaparam->width = $item->mega_width;
|
53 |
+
$item->megaparam->subcontent = $item->mega_subcontent;
|
54 |
+
$item->megaparam->colw = $item->mega_colw;
|
55 |
+
if (preg_match_all('/([^\s]+)=([^\s]+)/', $item->mega_colxw, $colwmatches)) {
|
56 |
+
for ($i=0;$i<count($colwmatches[0]);$i++) {
|
57 |
+
$item->megaparam->$colwmatches[1][$i] = $colwmatches[2][$i];
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
$blocks = $this->loadBlocks($item);
|
62 |
+
if(is_array($blocks) && count($blocks) > 0){
|
63 |
+
|
64 |
+
$item->content = "";
|
65 |
+
$total = count($blocks);
|
66 |
+
|
67 |
+
$cols = min($item->megaparam->cols,$total);
|
68 |
+
|
69 |
+
for ($col=0;$col<$cols;$col++) {
|
70 |
+
$pos = ($col == 0 ) ? 'first' : (($col == $cols-1) ? 'last' :'');
|
71 |
+
if ($cols > 1) $item->content .= $this->beginSubMenuModules($item->menu_id, 1, $pos, $col, true);
|
72 |
+
$i = $col;
|
73 |
+
while ($i<$total) {
|
74 |
+
$block = $blocks[$i];
|
75 |
+
$i += $cols;
|
76 |
+
$item->content .= $block->toHtml();
|
77 |
+
}
|
78 |
+
if ($cols > 1) $item->content .= $this->endSubMenuModules($item->menu_id, 1, true);
|
79 |
+
}
|
80 |
+
|
81 |
+
$item->cols = $cols;
|
82 |
+
$item->content = trim($item->content);
|
83 |
+
$this->items[$item->menu_id] = $item;
|
84 |
+
}else if($blocks){
|
85 |
+
$item->content = $blocks;
|
86 |
+
}
|
87 |
+
|
88 |
+
if ($item->megaparam->cols) {
|
89 |
+
$item->cols = $item->megaparam->cols;
|
90 |
+
//$item->col = array();
|
91 |
+
for ($i=0;$i<$item->cols;$i++) {
|
92 |
+
if (isset($item->megaparam->{"col$i"}) && $item->megaparam->{"col$i"}) $item->col[$i]=$item->megaparam->{"col$i"};
|
93 |
+
}
|
94 |
+
}
|
95 |
+
$item->_idx = count($list);
|
96 |
+
array_push($list, $item);
|
97 |
+
$children[$pt] = $list;
|
98 |
+
|
99 |
+
$this->items[$item->menu_id] = $item;
|
100 |
+
|
101 |
+
}
|
102 |
+
$this->children = $children;
|
103 |
+
|
104 |
+
return true;
|
105 |
+
}
|
106 |
+
/*
|
107 |
+
$pid: parent id
|
108 |
+
$level: menu level
|
109 |
+
$pos: position of parent
|
110 |
+
*/
|
111 |
+
|
112 |
+
function genMenuItems($pid, $level) {
|
113 |
+
|
114 |
+
if (isset($this->children[$pid])&&$this->children[$pid]) {
|
115 |
+
$cols = ($pid && $this->items[$pid]->cols) ? $this->items[$pid]->cols : 1;
|
116 |
+
|
117 |
+
$total = count($this->children[$pid]);
|
118 |
+
|
119 |
+
$tmp= isset($this->items[$pid])?$this->items[$pid]:new stdclass();
|
120 |
+
|
121 |
+
|
122 |
+
|
123 |
+
// calculate number of menu items per column
|
124 |
+
if ($cols > 1) {
|
125 |
+
|
126 |
+
$fixitems = 0;
|
127 |
+
if ($fixitems < $cols) {
|
128 |
+
$leftitem = $total-$fixitems;
|
129 |
+
$col = array();
|
130 |
+
$items = ceil($leftitem/($cols-$fixitems));
|
131 |
+
|
132 |
+
for ($m=0;$m<$cols && $leftitem > 0;$m++) {
|
133 |
+
|
134 |
+
if (!isset($tmp->col[$m]) || !$tmp->col[$m]) {
|
135 |
+
|
136 |
+
if ($leftitem > $items) {
|
137 |
+
|
138 |
+
$col[$m] = $items;
|
139 |
+
$leftitem -= $items;
|
140 |
+
} else {
|
141 |
+
$col[$m] = $leftitem;
|
142 |
+
$leftitem = 0;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
}
|
146 |
+
$tmp->col = $col;
|
147 |
+
$cols = count($tmp->col);
|
148 |
+
$tmp->cols = $cols;
|
149 |
+
|
150 |
+
}
|
151 |
+
} else {
|
152 |
+
$tmp->col = array($total);
|
153 |
+
}
|
154 |
+
|
155 |
+
//recalculate the colw for this column if the first child is group
|
156 |
+
for ($col=0,$j=0;$col<$cols && $j<$total;$col++) {
|
157 |
+
$i = 0;
|
158 |
+
$colw = 0;
|
159 |
+
while ($i < $tmp->col[$col] && $j<$total) {
|
160 |
+
$row = $this->children[$pid][$j];
|
161 |
+
if ($row->megaparam->group && $row->megaparam->width > $colw) {
|
162 |
+
$colw = $row->megaparam->width;
|
163 |
+
}
|
164 |
+
$j++;$i++;
|
165 |
+
}
|
166 |
+
if ($colw) $this->items[$pid]->megaparam->{'colw'.($col+1)} = $colw;
|
167 |
+
}
|
168 |
+
$this->beginMenuItems($pid, $level);
|
169 |
+
|
170 |
+
for ($col=0,$j=0;$col<$cols && $j<$total;$col++) {
|
171 |
+
|
172 |
+
$pos = ($col == 0 ) ? 'first' : (($col == $cols-1) ? 'last' :'');
|
173 |
+
//recalculate the colw for this column if the first child is group
|
174 |
+
if ($this->children[$pid][$j]->megaparam->group && $this->children[$pid][$j]->megaparam->width)
|
175 |
+
$this->items[$pid]->megaparam->{'colw'.($col+1)} = $this->children[$pid][$j]->megaparam->width;
|
176 |
+
|
177 |
+
$this->beginSubMenuItems($pid, $level, $pos, $col);
|
178 |
+
$i = 0;
|
179 |
+
while ($i < $tmp->col[$col] && $j<$total) {
|
180 |
+
//foreach ($this->children[$pid] as $row) {
|
181 |
+
$row = $this->children[$pid][$j];
|
182 |
+
$pos = ($i == 0 ) ? 'first' : (($i == count($this->children[$pid])-1) ? 'last' :'');
|
183 |
+
|
184 |
+
$this->beginMenuItem($row, $level, $pos);
|
185 |
+
$this->genMenuItem($row, $level, $pos);
|
186 |
+
|
187 |
+
// show menu with menu expanded - submenus visible
|
188 |
+
|
189 |
+
if (isset($row->megaparams->group)&&$row->megaparams->group) {
|
190 |
+
|
191 |
+
$this->genMenuItems($row->menu_id, $level ); //not increase level
|
192 |
+
}
|
193 |
+
else if($level < $this->params->endlevel) {
|
194 |
+
|
195 |
+
$this->genMenuItems($row->menu_id, $level+1 );
|
196 |
+
}
|
197 |
+
|
198 |
+
$this->endMenuItem($row, $level, $pos);
|
199 |
+
$j++;$i++;
|
200 |
+
}
|
201 |
+
$this->endSubMenuItems($pid, $level);
|
202 |
+
}
|
203 |
+
$this->endMenuItems($pid, $level);
|
204 |
+
|
205 |
+
|
206 |
+
|
207 |
+
}
|
208 |
+
|
209 |
+
}
|
210 |
+
public function loadBlocks($item){
|
211 |
+
$blocks = array();
|
212 |
+
switch($item->megaparam->subcontent){
|
213 |
+
case 3:
|
214 |
+
$ids = $item->static_block;
|
215 |
+
$ids = preg_split ('/,/', $ids);
|
216 |
+
foreach ($ids as $id) {
|
217 |
+
if ($id && $block = Mage::getModel('cms/block')->load($id)) {
|
218 |
+
$block = Mage::app()->getLayout()->createBlock('cms/block')->setBlockId($block->identifier);
|
219 |
+
$blocks[] = $block;
|
220 |
+
}
|
221 |
+
}
|
222 |
+
return $blocks;
|
223 |
+
|
224 |
+
case 2:
|
225 |
+
$block = new stdclass();
|
226 |
+
$helper = Mage::helper('cms');
|
227 |
+
$processor = $helper->getBlockTemplateProcessor();
|
228 |
+
$block = $processor->filter($item->contentxml);
|
229 |
+
return $block;
|
230 |
+
default:
|
231 |
+
return null;
|
232 |
+
}
|
233 |
+
}
|
234 |
+
|
235 |
+
public function getActive(){
|
236 |
+
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
|
237 |
+
|
238 |
+
foreach($this->getList() as $list){
|
239 |
+
|
240 |
+
if($list->link == $currentUrl) {
|
241 |
+
break;
|
242 |
+
return $list;
|
243 |
+
}
|
244 |
+
}
|
245 |
+
}
|
246 |
+
|
247 |
+
function beginSubMenuModules($item, $level=0, $pos, $i, $return = false){
|
248 |
+
$data = '';
|
249 |
+
|
250 |
+
if ($level) {
|
251 |
+
|
252 |
+
if ($item->megaparam->get('group')) {
|
253 |
+
}else {
|
254 |
+
$colw = $item->megaparam->{'colw'.($i+1)};
|
255 |
+
if (!$colw) $colw = $this->items[$pid]->megaparam->colw ? $this->items[$pid]->megaparam->colw : 200;
|
256 |
+
$style = $colw?" style=\"width: {$colw}px;\"":"";
|
257 |
+
$data .= "<div class=\"megacol column".($i+1).($pos?" $pos":"")."\"$style>";
|
258 |
+
}
|
259 |
+
}
|
260 |
+
if ($return) return $data; else echo $data;
|
261 |
+
}
|
262 |
+
|
263 |
+
function endSubMenuModules($item, $level=0, $return = false){
|
264 |
+
$data = '';
|
265 |
+
if ($level) {
|
266 |
+
if ($item->megaparam->get('group')) {
|
267 |
+
}else
|
268 |
+
$data .= "</div>";
|
269 |
+
}
|
270 |
+
if ($return) return $data; else echo $data;
|
271 |
+
}
|
272 |
+
|
273 |
+
function beginMenuItems($pid=0, $level=0, $return=false){
|
274 |
+
if ($level) {
|
275 |
+
if ($this->items[$pid]->megaparam->group) {
|
276 |
+
$cols = $pid && isset($this->items[$pid]->cols) && $this->items[$pid]->cols ? $this->items[$pid]->cols : 1;
|
277 |
+
$cols_cls = ($cols > 1)?" cols$cols":'';
|
278 |
+
$data = "<div class=\"group-content$cols_cls\">";
|
279 |
+
} else {
|
280 |
+
$style = 1;
|
281 |
+
$data = call_user_func_array(array($this, "beginMenuItems$style"), array ($pid, $level, true));
|
282 |
+
}
|
283 |
+
if ($return) return $data; else echo $data;
|
284 |
+
}
|
285 |
+
}
|
286 |
+
|
287 |
+
function endMenuItems($pid=0, $level=0, $return=false){
|
288 |
+
if ($level) {
|
289 |
+
if ($this->items[$pid]->megaparam->group) {
|
290 |
+
$data = "</div>";
|
291 |
+
}else{
|
292 |
+
$style = 1;
|
293 |
+
$data = call_user_func_array(array($this, "endMenuItems$style"), array ($pid, $level, true));
|
294 |
+
}
|
295 |
+
if ($return) return $data; else echo $data;
|
296 |
+
}
|
297 |
+
}
|
298 |
+
function beginSubMenuItems($pid=0, $level=0, $pos, $i, $return = false){
|
299 |
+
$level = (int) $level;
|
300 |
+
$data = '';
|
301 |
+
|
302 |
+
if (isset ($this->items[$pid]) && $level) {
|
303 |
+
$cols = $pid && isset($this->items[$pid]->megaparam->cols) && $this->items[$pid]->megaparam->cols ? $this->items[$pid]->megaparam->cols : 1;
|
304 |
+
if ($this->items[$pid]->megaparam->group && $cols < 2) {
|
305 |
+
}else {
|
306 |
+
$colw=0;
|
307 |
+
if (isset($this->items[$pid]->megaparam->{'colw'.($i+1)}))
|
308 |
+
$colw = $this->items[$pid]->megaparam->{'colw'.($i+1)};
|
309 |
+
if (!$colw) $colw = $this->items[$pid]->megaparam->colw ? $this->items[$pid]->megaparam->colw : 200;
|
310 |
+
$style = $colw?" style=\"width: {$colw}px;\"":"";
|
311 |
+
$data .= "<div class=\"megacol column".($i+1).($pos?" $pos":"")."\"$style>";
|
312 |
+
}
|
313 |
+
}
|
314 |
+
if (@$this->children[$pid]) $data .= "<ul class=\"megamenu level$level\">";
|
315 |
+
if ($return) return $data; else echo $data;
|
316 |
+
}
|
317 |
+
function endSubMenuItems($pid=0, $level=0, $return = false){
|
318 |
+
$data = '';
|
319 |
+
if (@$this->children[$pid]) $data .= "</ul>";
|
320 |
+
if (isset ($this->items[$pid]) && $level) {
|
321 |
+
$cols = $pid && isset($this->items[$pid]->megaparam->cols) && $this->items[$pid]->megaparam->cols ? $this->items[$pid]->megaparam->cols : 1;
|
322 |
+
if ($this->items[$pid]->megaparam->group && $cols < 2) {
|
323 |
+
}else
|
324 |
+
$data .= "</div>";
|
325 |
+
}
|
326 |
+
if ($return) return $data; else echo $data;
|
327 |
+
}
|
328 |
+
/*Sub nav style - 1 - basic (default)*/
|
329 |
+
function beginMenuItems1($pid=0, $level=0, $return=false){
|
330 |
+
$cols = $pid && isset($this->items[$pid]->megaparam->cols) && $this->items[$pid]->megaparam->cols ? $this->items[$pid]->megaparam->cols : 1;
|
331 |
+
|
332 |
+
|
333 |
+
$width = $this->items[$pid]->megaparam->width;
|
334 |
+
if (!$width) {
|
335 |
+
for ($col=0;$col<$cols;$col++) {
|
336 |
+
$colw = $this->items[$pid]->megaparam->{'colw'.($col+1)};
|
337 |
+
if (!$colw) $colw = $this->items[$pid]->megaparam->colw ? $this->items[$pid]->megaparam->colw : 200;
|
338 |
+
$width += $colw;
|
339 |
+
}
|
340 |
+
}
|
341 |
+
$style = $width?" style=\"width: {$width}px;\"":"";
|
342 |
+
$right = isset($this->items[$pid]->megaparam->right)? 'right':'';
|
343 |
+
$data = "<div class=\"childcontent cols$cols $right\">\n";
|
344 |
+
$data .= "<div class=\"childcontent-inner-wrap\" id=\"childcontent$pid\">\n"; //Add wrapper
|
345 |
+
$data .= "<div class=\"childcontent-inner clearfix\"$style>"; //Move width into inner
|
346 |
+
if ($return) return $data; else echo $data;
|
347 |
+
}
|
348 |
+
function endMenuItems1($pid=0, $level=0, $return=false){
|
349 |
+
$data = "</div>\n"; //Close of childcontent-inner
|
350 |
+
$data .= "</div></div>"; //Close wrapper and childcontent
|
351 |
+
if ($return) return $data; else echo $data;
|
352 |
+
}
|
353 |
+
|
354 |
+
function beginMenuItem($mitem=null, $level = 0, $pos = ''){
|
355 |
+
$active = $this->genClass ($mitem, $level, $pos);
|
356 |
+
if ($active) $active = " class=\"$active\"";
|
357 |
+
echo "<li $active>";
|
358 |
+
if ($mitem->megaparam->group) echo "<div class=\"group\">";
|
359 |
+
|
360 |
+
/* $path = Mage::getBaseDir('media') .DS. $postData['image']['value'];
|
361 |
+
$path= preg_replace("/\//", "\\", $path); */
|
362 |
+
//add item icon
|
363 |
+
}
|
364 |
+
function endMenuItem($mitem=null, $level = 0, $pos = ''){
|
365 |
+
if ($mitem->megaparam->group) echo "</div>";
|
366 |
+
echo "</li>";
|
367 |
+
}
|
368 |
+
function beginMenu(){
|
369 |
+
$effect = Mage::helper("jmmegamenu")->get("animation");
|
370 |
+
echo "<div class=\"$effect jm-megamenu clearfix\" id=\"jm-megamenu\">\n";
|
371 |
+
}
|
372 |
+
function endMenu(){
|
373 |
+
echo "\n</div>";
|
374 |
+
//Create menu
|
375 |
+
}
|
376 |
+
function genClass ($mitem, $level, $pos) {
|
377 |
+
$cls = "mega".($pos?" $pos":"");
|
378 |
+
if (@$this->children[$mitem->menu_id] || (isset($mitem->content) && $mitem->content)) {
|
379 |
+
if (isset($mitem->megaparams->group)) $cls .= " group";
|
380 |
+
else if ($level < $this->params->endlevel) $cls .= " haschild";
|
381 |
+
}
|
382 |
+
|
383 |
+
if (isset($mitem->menu_id)&&isset($this->open))
|
384 |
+
$active = in_array($mitem->menu_id, $this->open);
|
385 |
+
else $active = false;
|
386 |
+
if (!preg_match ('/group/', $cls)) $cls .= ($active?" active":"");
|
387 |
+
if ($mitem->megaparam->class) $cls .= " ".$mitem->megaparam->class;
|
388 |
+
return $cls;
|
389 |
+
}
|
390 |
+
|
391 |
+
function genMenuItem($item, $level = 0, $pos = '', $ret = 0)
|
392 |
+
{
|
393 |
+
$data = '';
|
394 |
+
$tmp = $item;
|
395 |
+
$tmpname = ($this->params->megamenu && !$tmp->showtitle)?'':$tmp->title;
|
396 |
+
// Print a link if it exists
|
397 |
+
$active = $this->genClass ($tmp, $level, $pos);
|
398 |
+
if ($active) $active = " class=\"$active\"";
|
399 |
+
$id='id="menu' . $tmp->menu_id . '"';
|
400 |
+
|
401 |
+
$itembg = '';
|
402 |
+
//Add icon to item
|
403 |
+
$icon='';
|
404 |
+
if ($tmp->image !=""){
|
405 |
+
$image= preg_replace("/jmmegamenu\//", "", $tmp->image);
|
406 |
+
$icon = "<img class='icon-image' src='".Mage::getBaseUrl('media')."jmmegamenu/".$image."' alt='".$image."'/>";
|
407 |
+
}
|
408 |
+
|
409 |
+
$txt = $icon . '<span class="menu-title">' . $tmpname . '</span>';
|
410 |
+
|
411 |
+
//Add page title to item
|
412 |
+
if (isset($tmp->megaparams->desc)&&$tmp->megaparams->desc) {
|
413 |
+
$txt .= '<span class="menu-desc">'. JText::_($tmp->megaparams->desc).'</span>';
|
414 |
+
}
|
415 |
+
//Add description to item
|
416 |
+
if ($tmp->description !=""){
|
417 |
+
$txt.= "<span class='mega-item-des' >";
|
418 |
+
$txt.= ($tmp->description);
|
419 |
+
$txt.= "</span>";
|
420 |
+
}
|
421 |
+
//replace base_url by real base url
|
422 |
+
if($tmp->menutype == 2 && (strpos($tmp->link,"base_url") >= 0)){
|
423 |
+
$tmp->link = str_replace('base_url',Mage::getBaseUrl(),$tmp->link);
|
424 |
+
}
|
425 |
+
|
426 |
+
$title = "title=\"$tmpname\"";
|
427 |
+
$title = strip_tags($title);
|
428 |
+
$tmp->link = ($tmp->menutype == 2)?$tmp->link:Mage::getBaseUrl().$tmp->url.(($tmp->menualias != " " && $tmp->menualias != null)?"?alias=".$tmp->menualias:"");
|
429 |
+
|
430 |
+
if ($tmpname) {
|
431 |
+
|
432 |
+
if ($tmp->link != null)
|
433 |
+
{
|
434 |
+
switch ($tmp->browserNav) {
|
435 |
+
default:
|
436 |
+
case 0:
|
437 |
+
// _top
|
438 |
+
$data = '<a href="' . $tmp->link . '" ' . $active . ' ' . $id . ' ' . $title . '>' . $txt . '</a>';
|
439 |
+
break;
|
440 |
+
case 1:
|
441 |
+
// _blank
|
442 |
+
$data = '<a href="' . $tmp->link . '" target="_blank" ' . $active . ' ' . $id . ' ' . $title . '>' . $txt . '</a>';
|
443 |
+
break;
|
444 |
+
case 2:
|
445 |
+
// window.open
|
446 |
+
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,' . $this->getParam('window_open');
|
447 |
+
|
448 |
+
// hrm...this is a bit dickey
|
449 |
+
|
450 |
+
$data = '<a href="' . $tmp->link . '" onclick="window.open(this.href,\'targetWindow\',\'' . $attribs . '\');return false;" ' . $active . ' ' . $id . ' ' . $title . '>' . $txt . '</a>';
|
451 |
+
break;
|
452 |
+
}
|
453 |
+
} else {
|
454 |
+
$data = '<a '.$active.' '.$id.' '.$title.'>'.$txt.'</a>';
|
455 |
+
}
|
456 |
+
|
457 |
+
}
|
458 |
+
|
459 |
+
//for megamenu
|
460 |
+
if ($this->params->megamenu) {
|
461 |
+
|
462 |
+
//For group
|
463 |
+
if (($tmp->megaparam->group) && $data){
|
464 |
+
$data = "<div class=\"group-title\">$data</div>";
|
465 |
+
}
|
466 |
+
// die($item->menu_id."---".$item->content);
|
467 |
+
if ($item->content) {
|
468 |
+
|
469 |
+
if ($item->megaparam->group){
|
470 |
+
$data .= "<div class=\"group-content\">{$item->content}</div>";
|
471 |
+
}else{
|
472 |
+
$data .= $this->beginMenuItems($item->id, $level+1, true);
|
473 |
+
$data .= $item->content;
|
474 |
+
$data .= $this->endMenuItems($item->id, $level+1, true);
|
475 |
+
}
|
476 |
+
}
|
477 |
+
}
|
478 |
+
|
479 |
+
if ($ret) return $data; else echo $data;
|
480 |
+
}
|
481 |
+
|
482 |
+
|
483 |
+
}
|
484 |
+
|
485 |
+
?>
|
package.xml
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>JoomlartMegaMenu</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>Custom License</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>If you want to improve your online store usability and navigation, JM Mega Menu extension is exactly what you need. It offers the most effective way to organize the products and categories.</summary>
|
10 |
+
<description>JM Mega Menu now gives you the ability to dynamically get your categories from your Catalog and display them within the navigation. Besides, the menu can be targeted and styled via css easily.
|
11 |
+

|
12 |
+
Essential to eCommerce success is allowing shoppers to quickly and easily navigate a website’s content. With JM Mega Menu, featured products or promotional image can be shown within the menu itself.
|
13 |
+

|
14 |
+
JM Mega Menu also brings you the convenient way of showing multiple contents like contact form and banner. Besides, you can embed your video directly inside the menus for sharing services like Youtube, Vimeo, etc.</description>
|
15 |
+
<notes>First Release</notes>
|
16 |
+
<authors><author><name>JoomlArt</name><user>arvind1</user><email>arvind@joomsolutions.com</email></author><author><name>m_joomlart</name><user>m_joomlart</user><email>jm@joomsolutions.com</email></author></authors>
|
17 |
+
<date>2013-12-13</date>
|
18 |
+
<time>10:53:55</time>
|
19 |
+
<contents><target name="magelocal"><dir name="Wavethemes"><dir name="Jmmegamenu"><dir name="Block"><dir name="Adminhtml"><dir name="Jmmegamenu"><dir name="Edit"><file name="Form.php" hash="cb7420b6a220012244efadd9643c83d9"/><dir name="Tab"><file name="Form.php" hash="4514e87dc1271b0f159add7bf0af000e"/></dir><file name="Tabs.php" hash="0c872e37ee95c98b89d15682fcae49b6"/></dir><file name="Edit.php" hash="58e64eeaee47022b4af91dd629c5a73b"/><file name="Grid.php" hash="1d9e0091e76527f656695152dd6b61a7"/></dir><file name="Jmmegamenu.php" hash="45a00108b97a3c1f5b5776fae1e10f88"/><dir name="Jmmegamenugroup"><dir name="Edit"><file name="Form.php" hash="20da4e8ee30b0597d4b8d0a5654fb0ad"/><dir name="Tab"><file name="Form.php" hash="de4017b4501f8ea870ffde7c4a7ac07f"/></dir><file name="Tabs.php" hash="2ab1830599f7124f77d645c9e933529e"/></dir><file name="Edit.php" hash="58b7dc88ef68432d4c3da803649b69fe"/><file name="Grid.php" hash="1359d3ada2ffa0b2b81b2d514388c693"/></dir><file name="Jmmegamenugroup.php" hash="02196f75f141ffe9d3e0aebe6a94dfab"/></dir><file name="Jmmegamenu.php" hash="fb18db443b2fe512120ce2c41c8ae396"/></dir><dir name="Helper"><file name="Data.php" hash="0f4d633820c1efbaa508be9d30a69b29"/></dir><dir name="Model"><file name="Jmmegamenu.php" hash="5b6d85a037ee52a00c02cefd6d927db0"/><file name="Jmmegamenugroup.php" hash="e3f15f2d39176f30bf7cba55694a497f"/><file name="Jmmegamenustoregroup.php" hash="f60cc817f40d26c901bf720ae7ea5ade"/><file name="Listmenugroup.php" hash="e78a019a79ef61dd6105cbfba9eec5e7"/><dir name="Mysql4"><dir name="Jmmegamenu"><file name="Collection.php" hash="7cf491855e7ef57f211b183d64cf38a9"/></dir><file name="Jmmegamenu.php" hash="daf639ff9a0b81fc304a7fa0808545a1"/><dir name="Jmmegamenugroup"><file name="Collection.php" hash="a5f9345d14be29f870bf3672a0ebfb10"/></dir><file name="Jmmegamenugroup.php" hash="2415999d3993981ad80c2b0f98864b02"/><dir name="Jmmegamenustoregroup"><file name="Collection.php" hash="c92ab9f5e8966dc92524d4018bf727f7"/></dir><file name="Jmmegamenustoregroup.php" hash="33ee115b3f56467d85eb7f1435c6526d"/></dir><file name="Observer.php" hash="a2faf7fb6f3fbeb4c859be43d2e1dcdd"/><file name="Status.php" hash="74cf2ec44f9e5a0335699f65646d1ba8"/><dir name="System"><dir name="Config"><dir name="Source"><file name="ListAnimationType.php" hash="318340f739fffec214b13ba786a605c9"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="JmmegamenuController.php" hash="c810062c23560d6f9e7507f5c4fbea06"/></dir><file name="IndexController.php" hash="754aea64f2d471af4f99168058128244"/></dir><dir name="etc"><file name="adminhtml.xml" hash="4536ab2518e972a9296229f4859ed653"/><file name="config.xml" hash="88cb60991fa9a39981361fc768b60c83"/><file name="system.xml" hash="db01277427ad403629a43405a8a1ab57"/></dir><dir name="sql"><dir name="jmmegamenu_setup"><file name="mysql4-install-0.1.0.php" hash="6eb5093f2d650e34da028c17bd5ba678"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="8f489401aca12a18aeb8302d835662a7"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="jmmegamenu.xml" hash="02eac58ec95083f8fb65dd80df1190af"/></dir><dir name="template"><dir name="widget"><file name="gridmenu.phtml" hash="c76c461515003fecfee82231c6e762ee"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="joomlart"><dir name="jmmegamenu"><file name="output.phtml" hash="a6793a5ef3734e3d8e4383e1168a9355"/></dir></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><file name="jmmegamenu.xml" hash="e6f429ff0c70b152835f7a7fa747edda"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Wavethemes_Jmmegamenu.xml" hash="ca11f74dafd6891f3687554be1ba211b"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Wavethemes_Jmmegamenu.csv" hash="c91d6dbbfbaba6eaf012d1da860ad6f0"/></dir></target><target name="mage"><dir name="js"><dir name="joomlart"><dir name="jmmegamenu"><file name="event.simulate.js" hash="bf5d4bbfadaa1da3999dfa6d964d96e2"/></dir></dir></dir></target><target name="magelib"><dir name="megamenu"><file name="mega.class.php" hash="c6b5cb58e0d4d1ed3446da173832d084"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="joomlart"><dir name="jmmegamenu"><dir name="css"><file name="jmmegamenu.css" hash="5c0cd542eaa49b0f082718c2cd42e6cc"/></dir><dir name="images"><file name="arrow.gif" hash="de3ee75c895656dcec90cf5b95e92ecb"/></dir></dir></dir></dir></dir></dir></target></contents>
|
20 |
+
<compatible/>
|
21 |
+
<dependencies><required><php><min>5.1.0</min><max>6.1.0</max></php></required></dependencies>
|
22 |
+
</package>
|
skin/frontend/default/default/joomlart/jmmegamenu/css/jmmegamenu.css
ADDED
@@ -0,0 +1,788 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
.jm-megamenu {
|
2 |
+
background: #0A263D;
|
3 |
+
margin: 0;
|
4 |
+
padding: 0;
|
5 |
+
text-align: left;
|
6 |
+
}
|
7 |
+
|
8 |
+
ul.megamenu {
|
9 |
+
margin: 15px 0 0 20px;
|
10 |
+
height: 100%;
|
11 |
+
}
|
12 |
+
|
13 |
+
.column3 ul.megamenu {
|
14 |
+
border-right: 0;
|
15 |
+
}
|
16 |
+
|
17 |
+
ul.megamenu.level2 {
|
18 |
+
border-right: 0;
|
19 |
+
}
|
20 |
+
|
21 |
+
ul.megamenu li {
|
22 |
+
overflow: visible
|
23 |
+
}
|
24 |
+
/* lv - 0
|
25 |
+
-----------------------------------*/
|
26 |
+
/* Styling ---*/
|
27 |
+
.jm-megamenu ul.level0 {
|
28 |
+
margin: 0;
|
29 |
+
padding: 0
|
30 |
+
}
|
31 |
+
|
32 |
+
.jm-megamenu ul.level0 li.mega {
|
33 |
+
display: block;
|
34 |
+
float: left;
|
35 |
+
margin: 0;
|
36 |
+
padding: 0;
|
37 |
+
position: relative;
|
38 |
+
width: auto
|
39 |
+
}
|
40 |
+
|
41 |
+
.jm-megamenu ul.level0 li.mega a.mega {
|
42 |
+
color: #A7C6DD;
|
43 |
+
display: block;
|
44 |
+
font-size: 107%;
|
45 |
+
font-style: normal;
|
46 |
+
line-height: 28px;
|
47 |
+
font-weight: bold;
|
48 |
+
min-height: 44px;
|
49 |
+
padding: 0 20px 0 19px;
|
50 |
+
text-decoration: none;
|
51 |
+
text-transform: capitalize;
|
52 |
+
}
|
53 |
+
|
54 |
+
.jm-megamenu ul.level0 li.mega a.mega span.titlecolors {
|
55 |
+
padding: 0;
|
56 |
+
color: #F26432;
|
57 |
+
}
|
58 |
+
.jm-megamenu ul.level0 li.mega a.mega:hover,
|
59 |
+
.jm-megamenu ul.level0 li.mega:hover > a.mega {
|
60 |
+
color: #E26703;
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
.jm-megamenu ul.level0 li.mega a.active{
|
65 |
+
}
|
66 |
+
|
67 |
+
.jm-megamenu ul.level0 li.mega .has-image {
|
68 |
+
background-position: left top;
|
69 |
+
background-repeat: no-repeat;
|
70 |
+
cursor: pointer;
|
71 |
+
display: block;
|
72 |
+
padding-left: 25px
|
73 |
+
}
|
74 |
+
|
75 |
+
.jm-megamenu ul.level0 li.mega .icon-image {
|
76 |
+
float: left;
|
77 |
+
height: auto;
|
78 |
+
margin: 5px 3px 0 0;
|
79 |
+
max-width: 20px;
|
80 |
+
vertical-align: middle;
|
81 |
+
}
|
82 |
+
|
83 |
+
.jm-megamenu ul.level0 li.mega .menu-title{
|
84 |
+
|
85 |
+
}
|
86 |
+
|
87 |
+
.jm-megamenu ul.level0 li.mega .mega-item-des {
|
88 |
+
float: left;
|
89 |
+
font-size: 11px;
|
90 |
+
font-weight: normal;
|
91 |
+
line-height: 140%;
|
92 |
+
margin: -5px 0 0 25px;
|
93 |
+
overflow: hidden;
|
94 |
+
padding: 0;
|
95 |
+
text-overflow: ellipsis;
|
96 |
+
white-space: nowrap;
|
97 |
+
width: 100%;
|
98 |
+
}
|
99 |
+
|
100 |
+
.jm-megamenu ul.level1 li.mega .mega-item-des {
|
101 |
+
margin: 0;
|
102 |
+
color: #333;
|
103 |
+
}
|
104 |
+
|
105 |
+
.jm-megamenu ul.level0 li.mega a.mega.haschild:hover span.menu-title ,
|
106 |
+
.jm-megamenu ul.level0 li.mega.haschild:hover > a.mega span.menu-title {
|
107 |
+
background: url('../images/bg-arrow-menu.png') no-repeat center bottom;
|
108 |
+
}
|
109 |
+
|
110 |
+
|
111 |
+
.jm-megamenu ul.level0 li.mega span.menu-desc {
|
112 |
+
display: block;
|
113 |
+
font-size: 92%;
|
114 |
+
font-weight: normal
|
115 |
+
}
|
116 |
+
|
117 |
+
/* lv - 1 */
|
118 |
+
.jm-megamenu ul.level1 li.mega a.mega {
|
119 |
+
color: #333;
|
120 |
+
}
|
121 |
+
|
122 |
+
.jm-megamenu li.mega .childcontent{
|
123 |
+
display: block;
|
124 |
+
height: auto;
|
125 |
+
left: 0;
|
126 |
+
max-height: 0;
|
127 |
+
overflow: hidden;
|
128 |
+
position: absolute;
|
129 |
+
box-shadow: 0 0 3px #666;
|
130 |
+
-box-shadow: 0 0 3px #666;
|
131 |
+
-moz-box-shadow: 0 0 3px #666;
|
132 |
+
-webkit-box-shadow: 0 0 3px #666;
|
133 |
+
-moz-transition: all .3s linear;
|
134 |
+
-o-transition: all .3s linear;
|
135 |
+
transition: all .3s linear;
|
136 |
+
-webkit-transition: all .3s linear;
|
137 |
+
border-radius: 0 0 5px 5px;
|
138 |
+
-moz-border-radius: 0 0 5px 5px;
|
139 |
+
-webkit-border-radius: 0 0 5px 5px;
|
140 |
+
}
|
141 |
+
|
142 |
+
.jm-megamenu li.haschild:hover > .childcontent{
|
143 |
+
max-height: 1000px;
|
144 |
+
overflow: hidden;
|
145 |
+
-moz-transition: all 0.8s linear;
|
146 |
+
-o-transition: all 0.8s linear;
|
147 |
+
transition: all 0.8s linear;
|
148 |
+
-webkit-transition: all 0.8s linear
|
149 |
+
}
|
150 |
+
|
151 |
+
.jm-megamenu ul.level1 li.haschild:hover > .childcontent {
|
152 |
+
left: 150px
|
153 |
+
}
|
154 |
+
|
155 |
+
.jm-megamenu ul.level1 li.mega {
|
156 |
+
float: none;
|
157 |
+
text-align: left
|
158 |
+
}
|
159 |
+
|
160 |
+
.jm-megamenu ul.level1 li.mega a {
|
161 |
+
border-left: 0 !important;
|
162 |
+
}
|
163 |
+
|
164 |
+
.jm-megamenu ul.level1 .childcontent {
|
165 |
+
margin: -2em 0 0 0
|
166 |
+
}
|
167 |
+
|
168 |
+
/*lv 2*/
|
169 |
+
.jm-megamenu ul.level2 li.mega {
|
170 |
+
border-bottom: 1px dotted #e5e5e5;
|
171 |
+
padding: 3px 0;
|
172 |
+
}
|
173 |
+
|
174 |
+
.jm-megamenu ul.level2 li.mega.last {
|
175 |
+
border-bottom: 0 none;
|
176 |
+
padding: 3px 0 0 0;
|
177 |
+
}
|
178 |
+
|
179 |
+
.jm-megamenu ul.level2 li.mega a.mega {
|
180 |
+
color: #333;
|
181 |
+
font-size: 100%;
|
182 |
+
font-weight: normal;
|
183 |
+
min-height: 13px;
|
184 |
+
padding: 0 10px;
|
185 |
+
text-decoration: none;
|
186 |
+
}
|
187 |
+
|
188 |
+
.jm-megamenu ul.level2 li.mega.active a.mega,
|
189 |
+
.jm-megamenu ul.level2 li.mega a.mega:active,
|
190 |
+
.jm-megamenu ul.level2 li.mega a.mega:focus,
|
191 |
+
.jm-megamenu ul.level2 li.mega a.mega:hover {
|
192 |
+
color: #E26703;
|
193 |
+
text-decoration: underline;
|
194 |
+
}
|
195 |
+
|
196 |
+
/* Columns ---*/
|
197 |
+
.jm-megamenu .megacol {
|
198 |
+
float: left
|
199 |
+
}
|
200 |
+
|
201 |
+
|
202 |
+
/* CHILD CONTENT
|
203 |
+
-----------------------------------*/
|
204 |
+
.jm-megamenu .childcontent {
|
205 |
+
z-index: 88
|
206 |
+
}
|
207 |
+
.jm-megamenu .childcontent-inner {
|
208 |
+
background: #fff;
|
209 |
+
box-shadow: 0 5px 3px 0 #666
|
210 |
+
}
|
211 |
+
.jm-megamenu .level1 .childcontent-inner,
|
212 |
+
.jm-megamenu .level2 .childcontent-inner {
|
213 |
+
box-shadow: 0 0 10px 0 #666
|
214 |
+
}
|
215 |
+
.jm-megamenu .childcontent .block {
|
216 |
+
line-height: 1.5;
|
217 |
+
margin: 10px 0;
|
218 |
+
padding: 0
|
219 |
+
}
|
220 |
+
.jm-megamenu .childcontent .block h3 {
|
221 |
+
background: none;
|
222 |
+
margin-left: 10px;
|
223 |
+
margin-right: 10px;
|
224 |
+
text-indent: 5px;
|
225 |
+
text-transform: none
|
226 |
+
}
|
227 |
+
.jm-megamenu .childcontent .block .ja-box-ct {
|
228 |
+
padding: 0 5px
|
229 |
+
}
|
230 |
+
.jm-megamenu .childcontent .block a {
|
231 |
+
text-decoration: none
|
232 |
+
}
|
233 |
+
.jm-megamenu .childcontent .block a:hover,
|
234 |
+
.jm-megamenu .childcontent .block a:focus,
|
235 |
+
.jm-megamenu .childcontent .block a:active {
|
236 |
+
text-decoration: none
|
237 |
+
}
|
238 |
+
.jm-megamenu .childcontent .block ul:first-child {
|
239 |
+
margin-top: 0 !important
|
240 |
+
}
|
241 |
+
.jm-megamenu .childcontent .block li {
|
242 |
+
margin-bottom: 5px
|
243 |
+
}
|
244 |
+
.jm-megamenu .menu-adv {
|
245 |
+
margin-top: 20px;
|
246 |
+
margin-bottom: 20px;
|
247 |
+
width: 100%;
|
248 |
+
float: left;
|
249 |
+
}
|
250 |
+
/* Grouped --- */
|
251 |
+
.jm-megamenu .group {
|
252 |
+
}
|
253 |
+
.jm-megamenu .group-title {
|
254 |
+
border-bottom: 1px solid #e5e5e5;
|
255 |
+
margin: 0 0 10px 0;
|
256 |
+
padding: 0 0 5px;
|
257 |
+
overflow: hidden
|
258 |
+
}
|
259 |
+
.jm-megamenu .group-content{
|
260 |
+
padding: 0 10px 10px;
|
261 |
+
}
|
262 |
+
.jm-megamenu ul.level1 li.mega div.group-title a.mega {}
|
263 |
+
.jm-megamenu .group-title .menu-desc {
|
264 |
+
padding-left: 0 !important
|
265 |
+
}
|
266 |
+
.jm-megamenu .group-content .block,
|
267 |
+
.jm-megamenu .group-content ul.megamenu {
|
268 |
+
margin: 0
|
269 |
+
}
|
270 |
+
|
271 |
+
/* override --- */
|
272 |
+
.jm-megamenu .childcontent ul.megamenu .block {
|
273 |
+
padding: 0
|
274 |
+
}
|
275 |
+
.jm-megamenu .childcontent ul.megamenu .block h3 {
|
276 |
+
margin-left: 0;
|
277 |
+
margin-right: 0
|
278 |
+
}
|
279 |
+
|
280 |
+
.jm-megamenu .products-grid div.item .inner {
|
281 |
+
margin: 0;
|
282 |
+
min-height: 0;
|
283 |
+
width: auto
|
284 |
+
}
|
285 |
+
.jm-megamenu .products-grid .product-name {
|
286 |
+
margin: 0 0 10px;
|
287 |
+
min-height: 100%;
|
288 |
+
}
|
289 |
+
|
290 |
+
.jm-megamenu .products-grid .product-name a{
|
291 |
+
color: #dddddd;
|
292 |
+
}
|
293 |
+
.jm-megamenu .products-grid .product-name a:active,
|
294 |
+
.jm-megamenu .products-grid .product-name a:focus,
|
295 |
+
.jm-megamenu .products-grid .product-name a:hover {
|
296 |
+
color: #E26703;
|
297 |
+
text-decoration: none;
|
298 |
+
}
|
299 |
+
|
300 |
+
|
301 |
+
.jm-megamenu .products-grid .product-image {
|
302 |
+
float: left;
|
303 |
+
margin: 9px 0 10px;
|
304 |
+
}
|
305 |
+
.jm-megamenu .products-grid .ratings{
|
306 |
+
|
307 |
+
}
|
308 |
+
|
309 |
+
.jm-megamenu .products-grid {
|
310 |
+
margin: 0 !important;
|
311 |
+
padding: 0 20px 0 0 !important;
|
312 |
+
}
|
313 |
+
|
314 |
+
.jm-megamenu .products-grid .price-box .price {
|
315 |
+
color: #E26703;
|
316 |
+
}
|
317 |
+
|
318 |
+
/* Clearfix
|
319 |
+
-------------------------------------------------------------*/
|
320 |
+
* html .clearfix {
|
321 |
+
height: 1% /* IE5-6 */
|
322 |
+
}
|
323 |
+
.clearfix {
|
324 |
+
display: inline-block /* IE7xhtml*/
|
325 |
+
}
|
326 |
+
html[xmlns] .clearfix {
|
327 |
+
display: block /* O */
|
328 |
+
}
|
329 |
+
.clearfix:after {
|
330 |
+
clear: both;
|
331 |
+
/* FF, O, etc. */
|
332 |
+
content: ".";
|
333 |
+
display: block;
|
334 |
+
height: 0;
|
335 |
+
visibility: hidden
|
336 |
+
}
|
337 |
+
.clearer {
|
338 |
+
clear: both;
|
339 |
+
display: block;
|
340 |
+
font-size: 0;
|
341 |
+
height: 0;
|
342 |
+
line-height: 0;
|
343 |
+
overflow: hidden
|
344 |
+
}
|
345 |
+
/*menu effect*/
|
346 |
+
/*jaws*/
|
347 |
+
.jaws.jm-megamenu li.mega .childcontent{
|
348 |
+
left: 0;
|
349 |
+
max-height: 0;
|
350 |
+
-moz-transform: rotate(90deg);
|
351 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
352 |
+
-ms-transform: rotate(90deg);
|
353 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
354 |
+
opacity: 0;
|
355 |
+
-o-transform: rotate(90deg);
|
356 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
357 |
+
overflow: hidden;
|
358 |
+
transform: rotate(90deg);
|
359 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
360 |
+
-webkit-transform: rotate(90deg);
|
361 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s
|
362 |
+
}
|
363 |
+
.jaws.jm-megamenu li.haschild:hover > .childcontent{
|
364 |
+
max-height: 1000px;
|
365 |
+
-moz-transform: none;
|
366 |
+
-ms-transform: none;
|
367 |
+
opacity: 1;
|
368 |
+
-o-transform: none;
|
369 |
+
overflow: hidden;
|
370 |
+
transform: none;
|
371 |
+
-webkit-transform: none
|
372 |
+
}
|
373 |
+
/*fence*/
|
374 |
+
.fence.jm-megamenu li.mega .childcontent{
|
375 |
+
left: 0;
|
376 |
+
max-height: 0;
|
377 |
+
-moz-transform: rotateY(-90deg);
|
378 |
+
-moz-transform-origin: 100% 50%;
|
379 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
380 |
+
-ms-transform: rotateY(-90deg);
|
381 |
+
-ms-transform-origin: 100% 50%;
|
382 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
383 |
+
opacity: 0;
|
384 |
+
-o-transform: rotateY(-90deg);
|
385 |
+
-o-transform-origin: 100% 50%;
|
386 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
387 |
+
overflow: hidden;
|
388 |
+
transform: rotateY(-90deg);
|
389 |
+
transform-origin: 100% 50%;
|
390 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
391 |
+
-webkit-transform: rotateY(-90deg);
|
392 |
+
-webkit-transform-origin: 100% 50%;
|
393 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s
|
394 |
+
}
|
395 |
+
.fence.jm-megamenu li.haschild:hover > .childcontent{
|
396 |
+
max-height: 1000px;
|
397 |
+
-moz-transform: none;
|
398 |
+
-ms-transform: none;
|
399 |
+
opacity: 1;
|
400 |
+
-o-transform: none;
|
401 |
+
overflow: hidden;
|
402 |
+
transform: none;
|
403 |
+
-webkit-transform: none
|
404 |
+
}
|
405 |
+
/*venitian*/
|
406 |
+
.venitian.jm-megamenu li.mega .childcontent{
|
407 |
+
left: 0;
|
408 |
+
max-height: 0;
|
409 |
+
-moz-transform: scale(1,0);
|
410 |
+
-moz-transform-origin: 50% 0;
|
411 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
412 |
+
-ms-transform: scale(1,0);
|
413 |
+
-ms-transform-origin: 50% 0;
|
414 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
415 |
+
opacity: 0;
|
416 |
+
-o-transform: scale(1,0);
|
417 |
+
-o-transform-origin: 50% 0;
|
418 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
419 |
+
overflow: hidden;
|
420 |
+
transform: scale(1,0);
|
421 |
+
transform-origin: 50% 0;
|
422 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
423 |
+
-webkit-transform: scale(1,0);
|
424 |
+
-webkit-transform-origin: 50% 0;
|
425 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s
|
426 |
+
}
|
427 |
+
.venitian.jm-megamenu li.haschild:hover > .childcontent{
|
428 |
+
max-height: 1000px;
|
429 |
+
-moz-transform: none;
|
430 |
+
-ms-transform: none;
|
431 |
+
opacity: 1;
|
432 |
+
-o-transform: none;
|
433 |
+
overflow: hidden;
|
434 |
+
transform: none;
|
435 |
+
-webkit-transform: none
|
436 |
+
}
|
437 |
+
/*fly*/
|
438 |
+
.fly.jm-megamenu li.mega .childcontent{
|
439 |
+
left: 0;
|
440 |
+
max-height: 0;
|
441 |
+
-moz-transform: rotateX( -180deg );
|
442 |
+
-moz-transform-origin: 50% 50% -50px;
|
443 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
444 |
+
-ms-transform: rotateX( -180deg );
|
445 |
+
-ms-transform-origin: 50% 50% -50px;
|
446 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
447 |
+
opacity: 0;
|
448 |
+
-o-transform: rotateX( -180deg );
|
449 |
+
-o-transform-origin: 50% 50% -50px;
|
450 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
451 |
+
overflow: hidden;
|
452 |
+
transform: rotateX( -180deg );
|
453 |
+
transform-origin: 50% 50% -50px;
|
454 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
455 |
+
-webkit-transform: rotateX( -180deg );
|
456 |
+
-webkit-transform-origin: 50% 50% -50px;
|
457 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s
|
458 |
+
}
|
459 |
+
.fly.jm-megamenu li.haschild:hover > .childcontent{
|
460 |
+
max-height: 1000px;
|
461 |
+
-moz-transform: none;
|
462 |
+
-ms-transform: none;
|
463 |
+
opacity: 1;
|
464 |
+
-o-transform: none;
|
465 |
+
overflow: hidden;
|
466 |
+
transform: none;
|
467 |
+
-webkit-transform: none
|
468 |
+
}
|
469 |
+
/*papercut*/
|
470 |
+
.papercut.jm-megamenu li.mega .childcontent{
|
471 |
+
left: 0;
|
472 |
+
max-height: 0;
|
473 |
+
-moz-transform: skewY(30deg);
|
474 |
+
-moz-transform-origin: 0% 0%;
|
475 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
476 |
+
-ms-transform: skewY(30deg);
|
477 |
+
-ms-transform-origin: 0% 0%;
|
478 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
479 |
+
opacity: 0;
|
480 |
+
-o-transform: skewY(30deg);
|
481 |
+
-o-transform-origin: 0% 0%;
|
482 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
483 |
+
overflow: hidden;
|
484 |
+
transform: skewY(30deg);
|
485 |
+
transform-origin: 0% 0%;
|
486 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
487 |
+
-webkit-transform: skewY(30deg);
|
488 |
+
-webkit-transform-origin: 0% 0%;
|
489 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s
|
490 |
+
}
|
491 |
+
.papercut.jm-megamenu li.haschild:hover > .childcontent{
|
492 |
+
max-height: 1000px;
|
493 |
+
-moz-transform: none;
|
494 |
+
-ms-transform: none;
|
495 |
+
opacity: 1;
|
496 |
+
-o-transform: none;
|
497 |
+
overflow: hidden;
|
498 |
+
transform: none;
|
499 |
+
-webkit-transform: none
|
500 |
+
}
|
501 |
+
/*fan*/
|
502 |
+
.fan.jm-megamenu li.mega .childcontent{
|
503 |
+
left: 0;
|
504 |
+
max-height: 0;
|
505 |
+
-moz-transform: rotate(90deg);
|
506 |
+
-moz-transform-origin: 0% 0%;
|
507 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
508 |
+
-ms-transform: rotate(90deg);
|
509 |
+
-ms-transform-origin: 0% 0%;
|
510 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
511 |
+
opacity: 0;
|
512 |
+
-o-transform: rotate(90deg);
|
513 |
+
-o-transform-origin: 0% 0%;
|
514 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
515 |
+
overflow: hidden;
|
516 |
+
transform: rotate(90deg);
|
517 |
+
transform-origin: 0% 0%;
|
518 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
519 |
+
-webkit-transform: rotate(90deg);
|
520 |
+
-webkit-transform-origin: 0% 0%;
|
521 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s
|
522 |
+
}
|
523 |
+
.fan.jm-megamenu li.haschild:hover > .childcontent{
|
524 |
+
max-height: 1000px;
|
525 |
+
-moz-transform: none;
|
526 |
+
-ms-transform: none;
|
527 |
+
opacity: 1;
|
528 |
+
-o-transform: none;
|
529 |
+
overflow: hidden;
|
530 |
+
transform: none;
|
531 |
+
-webkit-transform: none
|
532 |
+
}
|
533 |
+
/*wave*/
|
534 |
+
.wave.jm-megamenu li.mega .childcontent{
|
535 |
+
left: 0;
|
536 |
+
max-height: 0;
|
537 |
+
-moz-transform: skewY(-90deg);
|
538 |
+
-moz-transform-origin: 0% 0%;
|
539 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
540 |
+
-ms-transform: skewY(-90deg);
|
541 |
+
-ms-transform-origin: 0% 0%;
|
542 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
543 |
+
opacity: 0;
|
544 |
+
-o-transform: skewY(-90deg);
|
545 |
+
-o-transform-origin: 0% 0%;
|
546 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
547 |
+
overflow: hidden;
|
548 |
+
transform: skewY(-90deg);
|
549 |
+
transform-origin: 0% 0%;
|
550 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
551 |
+
-webkit-transform: skewY(-90deg);
|
552 |
+
-webkit-transform-origin: 0% 0%;
|
553 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s
|
554 |
+
}
|
555 |
+
.wave.jm-megamenu li.haschild:hover > .childcontent{
|
556 |
+
max-height: 1000px;
|
557 |
+
-moz-transform: none;
|
558 |
+
-ms-transform: none;
|
559 |
+
opacity: 1;
|
560 |
+
-o-transform: none;
|
561 |
+
overflow: hidden;
|
562 |
+
transform: none;
|
563 |
+
-webkit-transform: none
|
564 |
+
}
|
565 |
+
/*helix*/
|
566 |
+
.helix.jm-megamenu li.mega .childcontent{
|
567 |
+
left: 0;
|
568 |
+
max-height: 0;
|
569 |
+
-moz-transform: rotateY(90deg);
|
570 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
571 |
+
-ms-transform: rotateY(90deg);
|
572 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
573 |
+
opacity: 0;
|
574 |
+
-o-transform: rotateY(90deg);
|
575 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
576 |
+
overflow: hidden;
|
577 |
+
transform: rotateY(90deg);
|
578 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
579 |
+
-webkit-transform: rotateY(90deg);
|
580 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s
|
581 |
+
}
|
582 |
+
.helix.jm-megamenu li.haschild:hover > .childcontent{
|
583 |
+
max-height: 1000px;
|
584 |
+
-moz-transform: none;
|
585 |
+
-ms-transform: none;
|
586 |
+
opacity: 1;
|
587 |
+
-o-transform: none;
|
588 |
+
overflow: hidden;
|
589 |
+
transform: none;
|
590 |
+
-webkit-transform: none
|
591 |
+
}
|
592 |
+
/*pop*/
|
593 |
+
.pop.jm-megamenu li.mega .childcontent{
|
594 |
+
left: 0;
|
595 |
+
max-height: 0;
|
596 |
+
-moz-transform: scale(.2);
|
597 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
598 |
+
-moz-transition-timing-function: cubic-bezier(0, .35, .5, 1.5);
|
599 |
+
-ms-transform: translateX(-80%);
|
600 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
601 |
+
-ms-transition-timing-function: cubic-bezier(0, .35, .5, 1.5);
|
602 |
+
opacity: 0;
|
603 |
+
-o-transform: translateX(-80%);
|
604 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
605 |
+
-o-transition-timing-function: cubic-bezier(0, .35, .5, 1.5);
|
606 |
+
overflow: hidden;
|
607 |
+
transform: translateX(-80%);
|
608 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
609 |
+
transition-timing-function: cubic-bezier(0, .35, .5, 1.5);
|
610 |
+
-webkit-transform: scale(.2);
|
611 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s;
|
612 |
+
-webkit-transition-timing-function: cubic-bezier(0, .35, .5, 1.5)
|
613 |
+
}
|
614 |
+
.pop.jm-megamenu li.haschild:hover > .childcontent{
|
615 |
+
max-height: 1000px;
|
616 |
+
-moz-transform: none;
|
617 |
+
-ms-transform: none;
|
618 |
+
opacity: 1;
|
619 |
+
-o-transform: none;
|
620 |
+
overflow: hidden;
|
621 |
+
transform: none;
|
622 |
+
-webkit-transform: none
|
623 |
+
}
|
624 |
+
/*linear*/
|
625 |
+
.linear.jm-megamenu li.mega .childcontent{
|
626 |
+
left: 0;
|
627 |
+
max-height: 0;
|
628 |
+
-moz-transform: translateX(-40%);
|
629 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
630 |
+
-moz-transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
631 |
+
-ms-transform: translateX(-40%);
|
632 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
633 |
+
-ms-transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
634 |
+
opacity: 0;
|
635 |
+
-o-transform: translateX(-40%);
|
636 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
637 |
+
-o-transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
638 |
+
overflow: hidden;
|
639 |
+
transform: translateX(-40%);
|
640 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
641 |
+
transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
642 |
+
-webkit-transform: translateX(-40%);
|
643 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s;
|
644 |
+
-webkit-transition-timing-function: cubic-bezier(0, .35, .5, 1.7)
|
645 |
+
}
|
646 |
+
.linear.jm-megamenu li.haschild:hover > .childcontent{
|
647 |
+
max-height: 1000px;
|
648 |
+
-moz-transform: none;
|
649 |
+
-ms-transform: none;
|
650 |
+
opacity: 1;
|
651 |
+
-o-transform: none;
|
652 |
+
overflow: hidden;
|
653 |
+
transform: none;
|
654 |
+
-webkit-transform: none
|
655 |
+
}
|
656 |
+
/*bounce*/
|
657 |
+
.bounce.jm-megamenu li.mega .childcontent {
|
658 |
+
left: 0;
|
659 |
+
max-height: 0;
|
660 |
+
-moz-transform: translateX(-40%);
|
661 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
662 |
+
-moz-transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
663 |
+
-ms-transform: translateX(-40%);
|
664 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
665 |
+
-ms-transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
666 |
+
opacity: 0;
|
667 |
+
-o-transform: translateX(-40%);
|
668 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
669 |
+
-o-transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
670 |
+
overflow: hidden;
|
671 |
+
transform: translateX(-40%);
|
672 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
673 |
+
transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
674 |
+
-webkit-transform: translateX(-40%);
|
675 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s;
|
676 |
+
-webkit-transition-timing-function: cubic-bezier(0, .35, .5, 1.7)
|
677 |
+
}
|
678 |
+
.bounce.jm-megamenu li.haschild:hover > .childcontent {
|
679 |
+
max-height: 1000px;
|
680 |
+
-moz-transform: none;
|
681 |
+
-ms-transform: none;
|
682 |
+
opacity: 1;
|
683 |
+
-o-transform: none;
|
684 |
+
overflow: hidden;
|
685 |
+
transform: none;
|
686 |
+
-webkit-transform: none
|
687 |
+
}
|
688 |
+
/*Radial*/
|
689 |
+
.radial.jm-megamenu li.mega .childcontent{
|
690 |
+
left: 0;
|
691 |
+
max-height: 0;
|
692 |
+
-moz-transform: translateY(-120px) rotate(70deg);
|
693 |
+
-moz-transform-origin: 0 0;
|
694 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
695 |
+
-ms-transform: translateY(-120px) rotate(70deg);
|
696 |
+
-ms-transform-origin: 0 0;
|
697 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
698 |
+
opacity: 0;
|
699 |
+
-o-transform: translateY(-120px) rotate(70deg);
|
700 |
+
-o-transform-origin: 0 0;
|
701 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
702 |
+
overflow: hidden;
|
703 |
+
transform: translateY(-120px) rotate(70deg);
|
704 |
+
transform-origin: 0 0;
|
705 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
706 |
+
-webkit-transform: translateY(-120px) rotate(70deg);
|
707 |
+
-webkit-transform-origin: 0 0;
|
708 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s
|
709 |
+
}
|
710 |
+
.radial.jm-megamenu li.haschild:hover > .childcontent {
|
711 |
+
max-height: 1000px;
|
712 |
+
-moz-transform: none;
|
713 |
+
-ms-transform: none;
|
714 |
+
opacity: 1;
|
715 |
+
-o-transform: none;
|
716 |
+
overflow: hidden;
|
717 |
+
transform: none;
|
718 |
+
-webkit-transform: none
|
719 |
+
}
|
720 |
+
/*winding*/
|
721 |
+
.winding.jm-megamenu li.mega .childcontent{
|
722 |
+
left: 0;
|
723 |
+
max-height: 0;
|
724 |
+
-moz-transform: rotateY(90deg);
|
725 |
+
-moz-transform-origin: 0 0;
|
726 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
727 |
+
-ms-transform: rotateY(90deg);
|
728 |
+
-ms-transform-origin: 0 0;
|
729 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
730 |
+
opacity: 0;
|
731 |
+
-o-transform: rotateY(90deg);
|
732 |
+
-o-transform-origin: 0 0;
|
733 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
734 |
+
overflow: hidden;
|
735 |
+
transform: rotateY(90deg);
|
736 |
+
transform-origin: 0 0;
|
737 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
738 |
+
-webkit-transform: rotateY(90deg);
|
739 |
+
-webkit-transform-origin: 0 0;
|
740 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s
|
741 |
+
}
|
742 |
+
.winding.jm-megamenu li.haschild:hover > .childcontent{
|
743 |
+
max-height: 1000px;
|
744 |
+
-moz-transform: none;
|
745 |
+
-ms-transform: none;
|
746 |
+
opacity: 1;
|
747 |
+
-o-transform: none;
|
748 |
+
overflow: hidden;
|
749 |
+
transform: none;
|
750 |
+
-webkit-transform: none
|
751 |
+
}
|
752 |
+
/*shield*/
|
753 |
+
.shield.jm-megamenu li.mega .childcontent{
|
754 |
+
left: 0;
|
755 |
+
max-height: 0;
|
756 |
+
-moz-transform: rotateX(90deg);
|
757 |
+
-moz-transform-origin: 0 0;
|
758 |
+
-moz-transition: opacity .4s, -moz-transform .6s, max-height .6s;
|
759 |
+
-moz-transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
760 |
+
-ms-transform: rotateX(90deg);
|
761 |
+
-ms-transform-origin: 0 0;
|
762 |
+
-ms-transition: opacity .4s, -ms-transform .6s, max-height .6s;
|
763 |
+
-ms-transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
764 |
+
opacity: 0;
|
765 |
+
-o-transform: rotateX(90deg);
|
766 |
+
-o-transform-origin: 0 0;
|
767 |
+
-o-transition: opacity .4s, -o-transform .6s, max-height .6s;
|
768 |
+
-o-transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
769 |
+
overflow: hidden;
|
770 |
+
transform: rotateX(90deg);
|
771 |
+
transform-origin: 0 0;
|
772 |
+
transition: opacity .4s, transform .6s, max-height .6s;
|
773 |
+
transition-timing-function: cubic-bezier(0, .35, .5, 1.7);
|
774 |
+
-webkit-transform: rotateX(90deg);
|
775 |
+
-webkit-transform-origin: 0 0;
|
776 |
+
-webkit-transition: opacity .4s, -webkit-transform .6s, max-height .6s;
|
777 |
+
-webkit-transition-timing-function: cubic-bezier(0, .35, .5, 1.7)
|
778 |
+
}
|
779 |
+
.shield.jm-megamenu li.haschild:hover > .childcontent{
|
780 |
+
max-height: 1000px;
|
781 |
+
-moz-transform: none;
|
782 |
+
-ms-transform: none;
|
783 |
+
opacity: 1;
|
784 |
+
-o-transform: none;
|
785 |
+
overflow: hidden;
|
786 |
+
transform: none;
|
787 |
+
-webkit-transform: none
|
788 |
+
}
|
skin/frontend/default/default/joomlart/jmmegamenu/images/arrow.gif
ADDED
Binary file
|