[+] 🎉 Introducing Main menu v1.0.0
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
/config_*.xml
|
||||
/translations/*.php
|
||||
@@ -1,4 +0,0 @@
|
||||
2014-04-22 18:57:57 +0200 // Changelog updated
|
||||
2014-03-24 11:43:29 +0100 / MO blocktopmenu : ps_versions_compliancy modified (1.5.6.1 => 1.6)
|
||||
2014-03-24 11:04:46 +0100 / MO blocktopmenu : ps_versions_compliancy added
|
||||
2014-03-20 14:28:17 +0100 Initial commit
|
||||
@@ -1,4 +1,4 @@
|
||||
# Top horizontal menu
|
||||
# Main Menu
|
||||
|
||||
## About
|
||||
|
||||
@@ -34,4 +34,3 @@ That's it: you have contributed to this open-source project! Congratulations!
|
||||
[1]: http://doc.prestashop.com/display/PS16/Coding+Standards
|
||||
[2]: http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message
|
||||
[3]: https://help.github.com/articles/using-pull-requests
|
||||
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "prestashop/blocktopmenu",
|
||||
"description": "PrestaShop module blocktopmenu",
|
||||
"homepage": "https://github.com/PrestaShop/blocktopmenu",
|
||||
"name": "prestashop/ps_mainmenu",
|
||||
"description": "PrestaShop - Main menu",
|
||||
"homepage": "https://github.com/PrestaShop/ps_mainmenu",
|
||||
"license": "AFL - Academic Free License (AFL 3.0)",
|
||||
"authors": [
|
||||
{
|
||||
@@ -10,7 +10,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.2"
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist"
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blocktopmenu</name>
|
||||
<displayName><![CDATA[Top horizontal menu]]></displayName>
|
||||
<version><![CDATA[2.2.3]]></version>
|
||||
<description><![CDATA[Adds a new horizontal menu to the top of your e-commerce website.]]></description>
|
||||
<name>ps_mainmenu</name>
|
||||
<displayName><![CDATA[Main menu]]></displayName>
|
||||
<version><![CDATA[1.0.0]]></version>
|
||||
<description><![CDATA[Adds a new menu to the top of your e-commerce website.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 732 B After Width: | Height: | Size: 264 B |
@@ -28,7 +28,7 @@ use PrestaShop\PrestaShop\Core\Module\WidgetInterface;
|
||||
|
||||
require(dirname(__FILE__).'/menutoplinks.class.php');
|
||||
|
||||
class Blocktopmenu extends Module implements WidgetInterface
|
||||
class Ps_MainMenu extends Module implements WidgetInterface
|
||||
{
|
||||
const MENU_JSON_CACHE_KEY = 'MOD_BLOCKTOPMENU_MENU_JSON';
|
||||
|
||||
@@ -54,16 +54,16 @@ class Blocktopmenu extends Module implements WidgetInterface
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'blocktopmenu';
|
||||
$this->name = 'ps_mainmenu';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '4.0.0';
|
||||
$this->version = '1.0.0';
|
||||
$this->author = 'PrestaShop';
|
||||
|
||||
$this->bootstrap = true;
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Top horizontal menu');
|
||||
$this->description = $this->l('Adds a new horizontal menu to the top of your e-commerce website.');
|
||||
$this->displayName = $this->l('Main menu');
|
||||
$this->description = $this->l('Adds a new menu to the top of your e-commerce website.');
|
||||
$this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_);
|
||||
}
|
||||
|
||||
@@ -788,15 +788,6 @@ class Blocktopmenu extends Module implements WidgetInterface
|
||||
return parent::getCacheId().'|'.$page_name.($page_name != 'index' ? '|'.(int)Tools::getValue('id_'.$page_name) : '');
|
||||
}
|
||||
|
||||
public function hookHeader()
|
||||
{
|
||||
$this->context->controller->addJS($this->_path.'js/hoverIntent.js');
|
||||
$this->context->controller->addJS($this->_path.'js/superfish-modified.js');
|
||||
$this->context->controller->addJS($this->_path.'js/blocktopmenu.js');
|
||||
$this->context->controller->addCSS($this->_path.'css/blocktopmenu.css');
|
||||
$this->context->controller->addCSS($this->_path.'css/superfish-modified.css');
|
||||
}
|
||||
|
||||
protected function getCMSCategories($recursive = false, $parent = 1, $id_lang = false, $id_shop = false)
|
||||
{
|
||||
$id_lang = $id_lang ? (int)$id_lang : (int)Context::getContext()->language->id;
|
||||
@@ -952,7 +943,7 @@ class Blocktopmenu extends Module implements WidgetInterface
|
||||
|
||||
protected function getCacheDirectory()
|
||||
{
|
||||
return _PS_CACHE_DIR_ . DIRECTORY_SEPARATOR . 'blocktopmenu';
|
||||
return _PS_CACHE_DIR_ . DIRECTORY_SEPARATOR . 'ps_mainmenu';
|
||||
}
|
||||
|
||||
protected function clearMenuCache()
|
||||
@@ -1430,6 +1421,6 @@ class Blocktopmenu extends Module implements WidgetInterface
|
||||
$this->smarty->assign([
|
||||
'menu' => $this->getWidgetVariables($hookName, $configuration)
|
||||
]);
|
||||
return $this->display(__FILE__, 'blocktopmenu.tpl');
|
||||
return $this->display(__FILE__, 'ps_mainmenu.tpl');
|
||||
}
|
||||
}
|
||||
@@ -23,11 +23,13 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function upgrade_module_2_1_1($object)
|
||||
{
|
||||
return ($object->registerHook('header'));
|
||||
}
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function upgrade_module_1_6($object)
|
||||
{
|
||||
return ($object->registerHook('actionObjectCategoryAddAfter'));
|
||||
}
|
||||
@@ -50,10 +50,10 @@ function add()
|
||||
text = text.replace(/(^\s*)|(\s*$)/gi,"");
|
||||
if (val == "PRODUCT")
|
||||
{
|
||||
val = prompt('{l s="Indicate the ID number for the product" mod='blocktopmenu' js=1}');
|
||||
val = prompt('{l s="Indicate the ID number for the product" mod='ps_mainmenu' js=1}');
|
||||
if (val == null || val == "" || isNaN(val))
|
||||
return;
|
||||
text = '{l s="Product ID #" mod='blocktopmenu' js=1}'+val;
|
||||
text = '{l s="Product ID #" mod='ps_mainmenu' js=1}'+val;
|
||||
val = "PRD"+val;
|
||||
}
|
||||
$("#items").append('<option value="'+val+'" selected="selected">'+text+'</option>');
|
||||
@@ -82,7 +82,7 @@ function move(up)
|
||||
var tomove = $('#items option:selected');
|
||||
if (tomove.length >1)
|
||||
{
|
||||
alert('{l s="Please select just one item" mod='blocktopmenu'}');
|
||||
alert('{l s="Please select just one item" mod='ps_mainmenu'}');
|
||||
return false;
|
||||
}
|
||||
if (up)
|
||||
@@ -99,25 +99,25 @@ function move(up)
|
||||
{if $input.type == 'link_choice'}
|
||||
<div class="row">
|
||||
<div class="col-lg-1">
|
||||
<h4 style="margin-top:5px;">{l s='Change position' mod='blocktopmenu'}</h4>
|
||||
<h4 style="margin-top:5px;">{l s='Change position' mod='ps_mainmenu'}</h4>
|
||||
<a href="#" id="menuOrderUp" class="btn btn-default" style="font-size:20px;display:block;"><i class="icon-chevron-up"></i></a><br/>
|
||||
<a href="#" id="menuOrderDown" class="btn btn-default" style="font-size:20px;display:block;"><i class="icon-chevron-down"></i></a><br/>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<h4 style="margin-top:5px;">{l s='Selected items' mod='blocktopmenu'}</h4>
|
||||
<h4 style="margin-top:5px;">{l s='Selected items' mod='ps_mainmenu'}</h4>
|
||||
{$selected_links}
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<h4 style="margin-top:5px;">{l s='Available items' mod='blocktopmenu'}</h4>
|
||||
<h4 style="margin-top:5px;">{l s='Available items' mod='ps_mainmenu'}</h4>
|
||||
{$choices}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-lg-1"></div>
|
||||
<div class="col-lg-4"><a href="#" id="removeItem" class="btn btn-default"><i class="icon-arrow-right"></i> {l s='Remove' mod='blocktopmenu'}</a></div>
|
||||
<div class="col-lg-4"><a href="#" id="addItem" class="btn btn-default"><i class="icon-arrow-left"></i> {l s='Add' mod='blocktopmenu'}</a></div>
|
||||
<div class="col-lg-4"><a href="#" id="removeItem" class="btn btn-default"><i class="icon-arrow-right"></i> {l s='Remove' mod='ps_mainmenu'}</a></div>
|
||||
<div class="col-lg-4"><a href="#" id="addItem" class="btn btn-default"><i class="icon-arrow-left"></i> {l s='Add' mod='ps_mainmenu'}</a></div>
|
||||
</div>
|
||||
{else}
|
||||
{$smarty.block.parent}
|
||||
|
||||
Reference in New Issue
Block a user