integration new theme standard
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8169 b9a71923-0436-4b27-9f14-aed3839534dd
@@ -0,0 +1,443 @@
|
||||
<?php
|
||||
include _PS_MODULE_DIR_.'blocktopmenu/menutoplinks.class.php';
|
||||
class blocktopmenu extends Module
|
||||
{
|
||||
private $_menu = '';
|
||||
private $_html = '';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'blocktopmenu';
|
||||
$this->tab = 'Julien Breux Developpement';
|
||||
$this->version = 1.3;
|
||||
parent::__construct();
|
||||
$this->displayName = $this->l('Top horizontal menu');
|
||||
$this->description = $this->l('Add a new menu on top of your shop.');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
if(!parent::install() ||
|
||||
!$this->registerHook('top') ||
|
||||
!Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT1,CMS1,CMS2,PRD1') ||
|
||||
!Configuration::updateValue('MOD_BLOCKTOPMENU_SEARCH', '1') ||
|
||||
!$this->installDB())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function installDb()
|
||||
{
|
||||
Db::getInstance()->ExecuteS('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop` (
|
||||
`id_link` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
|
||||
`new_window` TINYINT( 1 ) NOT NULL,
|
||||
`link` VARCHAR( 128 ) NOT NULL
|
||||
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;');
|
||||
Db::getInstance()->ExecuteS('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop_lang` (
|
||||
`id_link` INT NOT NULL ,
|
||||
`id_lang` INT NOT NULL ,
|
||||
`label` VARCHAR( 128 ) NOT NULL ,
|
||||
INDEX ( `id_link` , `id_lang` )
|
||||
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;');
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
if(!parent::uninstall() ||
|
||||
!Configuration::deleteByName('MOD_BLOCKTOPMENU_ITEMS') ||
|
||||
!Configuration::deleteByName('MOD_BLOCKTOPMENU_SEARCH') ||
|
||||
!$this->uninstallDB())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private function uninstallDb()
|
||||
{
|
||||
Db::getInstance()->ExecuteS('DROP TABLE `'._DB_PREFIX_.'linksmenutop`');
|
||||
Db::getInstance()->ExecuteS('DROP TABLE `'._DB_PREFIX_.'linksmenutop_lang`');
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
global $cookie;
|
||||
|
||||
if(Tools::isSubmit('submitBlocktopmenu'))
|
||||
{
|
||||
if(Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', Tools::getValue('items')))
|
||||
$this->_html .= $this->displayConfirmation($this->l('Settings Updated'));
|
||||
else
|
||||
$this->_html .= $this->displayError($this->l('Unable to update settings'));
|
||||
Configuration::updateValue('MOD_BLOCKTOPMENU_SEARCH', (bool)Tools::getValue('search'));
|
||||
}
|
||||
if(Tools::isSubmit('submitBlocktopmenuLinks'))
|
||||
{
|
||||
if(Tools::getValue('link') == '')
|
||||
{
|
||||
$this->_html .= $this->displayError($this->l('Unable to add this link'));
|
||||
}
|
||||
else
|
||||
{
|
||||
MenuTopLinks::add(Tools::getValue('link'), Tools::getValue('label'), Tools::getValue('new_window', 0));
|
||||
$this->_html .= $this->displayConfirmation($this->l('The link has been added'));
|
||||
}
|
||||
}
|
||||
if(Tools::isSubmit('submitBlocktopmenuRemove'))
|
||||
{
|
||||
$id_link = Tools::getValue('id_link', 0);
|
||||
MenuTopLinks::remove($id_link);
|
||||
Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', str_replace(array('LNK'.$id_link.',', 'LNK'.$id_link), '', Configuration::get('MOD_BLOCKTOPMENU_ITEMS')));
|
||||
$this->_html .= $this->displayConfirmation($this->l('The link has been removed'));
|
||||
}
|
||||
$this->_html .= '
|
||||
<fieldset>
|
||||
<legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend>
|
||||
<form action="'.$_SERVER['REQUEST_URI'].'" method="post" id="form">
|
||||
<div style="display: none">
|
||||
<label>'.$this->l('Items').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="items" id="itemsInput" value="'.Configuration::get('MOD_BLOCKTOPMENU_ITEMS').'" size="70" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"> </div>
|
||||
<table style="margin-left: 130px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<select multiple="multiple" id="items" style="width: 300px; height: 160px;">';
|
||||
$this->makeMenuOption();
|
||||
$this->_html .= '</select><br/>
|
||||
<br/>
|
||||
<a href="#" id="removeItem" style="border: 1px solid rgb(170, 170, 170); margin: 2px; padding: 2px; text-align: center; display: block; text-decoration: none; background-color: rgb(250, 250, 250); color: rgb(18, 52, 86);">'.$this->l('Remove').' >></a>
|
||||
</td>
|
||||
<td style="padding-left: 20px;">
|
||||
<select multiple="multiple" id="availableItems" style="width: 300px; height: 160px;">';
|
||||
// BEGIN CMS
|
||||
$this->_html .= '<optgroup label="'.$this->l('CMS').'">';
|
||||
$_cms = CMS::listCms($cookie->id_lang);
|
||||
foreach($_cms as $cms)
|
||||
$this->_html .= '<option value="CMS'.$cms['id_cms'].'" style="margin-left:10px;">'.$cms['meta_title'].'</option>';
|
||||
$this->_html .= '</optgroup>';
|
||||
// END CMS
|
||||
// BEGIN SUPPLIER
|
||||
$this->_html .= '<optgroup label="'.$this->l('Supplier').'">';
|
||||
$suppliers = Supplier::getSuppliers(false, $cookie->id_lang);
|
||||
foreach($suppliers as $supplier)
|
||||
$this->_html .= '<option value="SUP'.$supplier['id_supplier'].'" style="margin-left:10px;">'.$supplier['name'].'</option>';
|
||||
$this->_html .= '</optgroup>';
|
||||
// END SUPPLIER
|
||||
// BEGIN Manufacturer
|
||||
$this->_html .= '<optgroup label="'.$this->l('Manufacturer').'">';
|
||||
$manufacturers = Manufacturer::getManufacturers(false, $cookie->id_lang);
|
||||
foreach($manufacturers as $manufacturer)
|
||||
$this->_html .= '<option value="MAN'.$manufacturer['id_manufacturer'].'" style="margin-left:10px;">'.$manufacturer['name'].'</option>';
|
||||
$this->_html .= '</optgroup>';
|
||||
// END Manufacturer
|
||||
// BEGIN Categories
|
||||
$this->_html .= '<optgroup label="'.$this->l('Categories').'">';
|
||||
$this->getCategoryOption(1, $cookie->id_lang);
|
||||
$this->_html .= '</optgroup>';
|
||||
// END Categories
|
||||
// BEGIN Products
|
||||
$this->_html .= '<optgroup label="'.$this->l('Products').'">';
|
||||
$this->_html .= '<option value="PRODUCT" style="margin-left:10px;font-style:italic">'.$this->l('Choose ID product').'</option>';
|
||||
$this->_html .= '</optgroup>';
|
||||
// END Products
|
||||
// BEGIN Menu Top Links
|
||||
$this->_html .= '<optgroup label="'.$this->l('Menu Top Links').'">';
|
||||
$links = MenuTopLinks::gets($cookie->id_lang);
|
||||
foreach($links as $link)
|
||||
$this->_html .= '<option value="LNK'.$link['id_link'].'" style="margin-left:10px;">'.$link['label'].'</option>';
|
||||
$this->_html .= '</optgroup>';
|
||||
// END Menu Top Links
|
||||
$this->_html .= '</select><br />
|
||||
<br />
|
||||
<a href="#" id="addItem" style="border: 1px solid rgb(170, 170, 170); margin: 2px; padding: 2px; text-align: center; display: block; text-decoration: none; background-color: rgb(250, 250, 250); color: rgb(18, 52, 86);"><< '.$this->l('Add').'</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="clear"> </div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#addItem").click(add);
|
||||
$("#availableItems").dblclick(add);
|
||||
$("#removeItem").click(remove);
|
||||
$("#items").dblclick(remove);
|
||||
function add()
|
||||
{
|
||||
$("#availableItems option:selected").each(function(i){
|
||||
var val = $(this).val();
|
||||
var text = $(this).text();
|
||||
if(val == "PRODUCT")
|
||||
{
|
||||
val = prompt("'.$this->l('Set ID product').'");
|
||||
if(val == null || val == "" || isNaN(val))
|
||||
return;
|
||||
text = "'.$this->l('Product ID').' "+val;
|
||||
val = "PRD"+val;
|
||||
}
|
||||
$("#items").append("<option value=\""+val+"\">"+text+"</option>");
|
||||
});
|
||||
serialize();
|
||||
return false;
|
||||
}
|
||||
function remove()
|
||||
{
|
||||
$("#items option:selected").each(function(i){
|
||||
$(this).remove();
|
||||
});
|
||||
serialize();
|
||||
return false;
|
||||
}
|
||||
function serialize()
|
||||
{
|
||||
var options = "";
|
||||
$("#items option").each(function(i){
|
||||
options += $(this).val()+",";
|
||||
});
|
||||
$("#itemsInput").val(options.substr(0, options.length - 1));
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<label for="s">'.$this->l('Search Bar').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="checkbox" name="search" id="s" value="1"'.((Configuration::get('MOD_BLOCKTOPMENU_SEARCH')) ? ' checked=""': '').'/>
|
||||
</div>
|
||||
<p class="center">
|
||||
<input type="submit" name="submitBlocktopmenu" value="'.$this->l(' Save ').'" class="button" />
|
||||
</p>
|
||||
</form>
|
||||
</fieldset><br />';
|
||||
|
||||
$defaultLanguage = intval(Configuration::get('PS_LANG_DEFAULT'));
|
||||
$languages = Language::getLanguages();
|
||||
$iso = Language::getIsoById($defaultLanguage);
|
||||
$divLangName = 'link_label';
|
||||
$this->_html .= '
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/add.gif" alt="" title="" />'.$this->l('Add Menu Top Link').'</legend>
|
||||
<form action="'.$_SERVER['REQUEST_URI'].'" method="post" id="form">
|
||||
<label>'.$this->l('Label').'</label>
|
||||
<div class="margin-form">';
|
||||
foreach ($languages as $language)
|
||||
{
|
||||
$this->_html .= '
|
||||
<div id="link_label_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $defaultLanguage ? 'block' : 'none').';float: left;">
|
||||
<input type="text" name="label['.$language['id_lang'].']" id="label_'.$language['id_lang'].'" size="70" value="" />
|
||||
</div>';
|
||||
}
|
||||
$this->_html .= $this->displayFlags($languages, $defaultLanguage, $divLangName, 'link_label', true);
|
||||
|
||||
$this->_html .= '</div><p class="clear"> </p>
|
||||
<label>'.$this->l('Link').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" name="link" value="" size="70" />
|
||||
</div>
|
||||
<label>'.$this->l('New Window').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="checkbox" name="new_window" value="1" />
|
||||
</div>
|
||||
<p class="center">
|
||||
<input type="submit" name="submitBlocktopmenuLinks" value="'.$this->l(' Add ').'" class="button" />
|
||||
</p>
|
||||
</form>
|
||||
</fieldset><br />';
|
||||
|
||||
$this->_html .= '
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/details.gif" alt="" title="" />'.$this->l('List Menu Top Link').'</legend>
|
||||
<table style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$this->l('Id Link').'</th>
|
||||
<th>'.$this->l('Label').'</th>
|
||||
<th>'.$this->l('Link').'</th>
|
||||
<th>'.$this->l('New Window').'</th>
|
||||
<th>'.$this->l('Action').'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
$links = MenuTopLinks::gets($cookie->id_lang);
|
||||
foreach($links as $link)
|
||||
{
|
||||
$this->_html .= '
|
||||
<tr>
|
||||
<td>'.$link['id_link'].'</td>
|
||||
<td>'.$link['label'].'</td>
|
||||
<td>'.$link['link'].'</td>
|
||||
<td>'.(($link['new_window']) ? $this->l('Yes') : $this->l('No')).'</td>
|
||||
<td>
|
||||
<form action="'.$_SERVER['REQUEST_URI'].'" method="post">
|
||||
<input type="hidden" name="id_link" value="'.$link['id_link'].'" />
|
||||
<input type="submit" name="submitBlocktopmenuRemove" value="'.$this->l('Remove').'" class="button" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
$this->_html .= '</tbody>
|
||||
</table>
|
||||
</fieldset>';
|
||||
echo $this->_html;
|
||||
}
|
||||
|
||||
private function getMenuItems()
|
||||
{
|
||||
$items = Configuration::get('MOD_BLOCKTOPMENU_ITEMS');
|
||||
$items = explode(',', $items);
|
||||
return $items;
|
||||
}
|
||||
|
||||
private function makeMenuOption()
|
||||
{
|
||||
global $cookie;
|
||||
foreach($this->getMenuItems() as $item)
|
||||
{
|
||||
$id = (int)substr($item, 3, strlen($item));
|
||||
switch(substr($item, 0, 3))
|
||||
{
|
||||
case'CAT':
|
||||
$this->getCategoryOption($id, $cookie->id_lang, false);
|
||||
break;
|
||||
case'PRD':
|
||||
$product = new Product($id, true, $cookie->id_lang);
|
||||
if(!is_null($product->id))
|
||||
$this->_html .= '<option value="PRD'.$id.'">'.$product->name.'</option>'.PHP_EOL;
|
||||
break;
|
||||
case'CMS':
|
||||
$cms = CMS::getLinks($cookie->id_lang, array($id));
|
||||
if(count($cms))
|
||||
$this->_html .= '<option value="CMS'.$id.'">'.$cms[0]['meta_title'].'</option>'.PHP_EOL;
|
||||
break;
|
||||
case'MAN':
|
||||
$manufacturer = new Manufacturer($id, $cookie->id_lang);
|
||||
if(!is_null($manufacturer->id))
|
||||
$this->_html .= '<option value="MAN'.$id.'">'.$manufacturer->name.'</option>'.PHP_EOL;
|
||||
break;
|
||||
case'SUP':
|
||||
$supplier = new Supplier($id, $cookie->id_lang);
|
||||
if(!is_null($supplier->id))
|
||||
$this->_html .= '<option value="SUP'.$id.'">'.$supplier->name.'</option>'.PHP_EOL;
|
||||
break;
|
||||
case'LNK':
|
||||
$link = MenuTopLinks::get($id, $cookie->id_lang);
|
||||
if(count($link))
|
||||
$this->_html .= '<option value="LNK'.$id.'">'.$link[0]['label'].'</option>'.PHP_EOL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function makeMenu()
|
||||
{
|
||||
global $cookie, $page_name;
|
||||
foreach($this->getMenuItems() as $item)
|
||||
{
|
||||
$id = (int)substr($item, 3, strlen($item));
|
||||
switch(substr($item, 0, 3))
|
||||
{
|
||||
case'CAT':
|
||||
$this->getCategory($id, $cookie->id_lang);
|
||||
break;
|
||||
case'PRD':
|
||||
$selected = ($page_name == 'product' && (Tools::getValue('id_product') == $id)) ? ' class="sfHover"' : '';
|
||||
$product = new Product($id, true, $cookie->id_lang);
|
||||
if(!is_null($product->id))
|
||||
$this->_menu .= '<li'.$selected.'><a href="'.$product->getLink().'">'.$product->name.'</a></li>'.PHP_EOL;
|
||||
break;
|
||||
case'CMS':
|
||||
$selected = ($page_name == 'cms' && (Tools::getValue('id_cms') == $id)) ? ' class="sfHover"' : '';
|
||||
$cms = CMS::getLinks($cookie->id_lang, array($id));
|
||||
if(count($cms))
|
||||
$this->_menu .= '<li'.$selected.'><a href="'.$cms[0]['link'].'">'.$cms[0]['meta_title'].'</a></li>'.PHP_EOL;
|
||||
break;
|
||||
case'MAN':
|
||||
$selected = ($page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : '';
|
||||
$manufacturer = new Manufacturer($id, $cookie->id_lang);
|
||||
if(!is_null($manufacturer->id))
|
||||
{
|
||||
if (intval(Configuration::get('PS_REWRITING_SETTINGS')))
|
||||
$manufacturer->link_rewrite = Tools::link_rewrite($manufacturer->name, false);
|
||||
else
|
||||
$manufacturer->link_rewrite = 0;
|
||||
$link = new Link;
|
||||
$this->_menu .= '<li'.$selected.'><a href="'.$link->getManufacturerLink($id, $manufacturer->link_rewrite).'">'.$manufacturer->name.'</a></li>'.PHP_EOL;
|
||||
}
|
||||
break;
|
||||
case'SUP':
|
||||
$selected = ($page_name == 'supplier' && (Tools::getValue('id_supplier') == $id)) ? ' class="sfHover"' : '';
|
||||
$supplier = new Supplier($id, $cookie->id_lang);
|
||||
if(!is_null($supplier->id))
|
||||
{
|
||||
$link = new Link;
|
||||
$this->_menu .= '<li'.$selected.'><a href="'.$link->getSupplierLink($id, $supplier->link_rewrite).'">'.$supplier->name.'</a></li>'.PHP_EOL;
|
||||
}
|
||||
break;
|
||||
case'LNK':
|
||||
$link = MenuTopLinks::get($id, $cookie->id_lang);
|
||||
if(count($link))
|
||||
$this->_menu .= '<li><a href="'.$link[0]['link'].'"'.(($link[0]['new_window']) ? ' target="_blank"': '').'>'.$link[0]['label'].'</a></li>'.PHP_EOL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function getCategoryOption($id_category, $id_lang, $children = true)
|
||||
{
|
||||
$categorie = new Category($id_category, $id_lang);
|
||||
if(is_null($categorie->id))
|
||||
return;
|
||||
if(count(explode('.', $categorie->name)) > 1)
|
||||
$name = str_replace('.', '', strstr($categorie->name, '.'));
|
||||
else
|
||||
$name = $categorie->name;
|
||||
$this->_html .= '<option value="CAT'.$categorie->id.'" style="margin-left:'.(($children) ? round(15+(15*(int)$categorie->level_depth)) : 0).'px;">'.$name.'</option>';
|
||||
if($children)
|
||||
{
|
||||
$childrens = Category::getChildren($id_category, $id_lang);
|
||||
if(count($childrens))
|
||||
foreach($childrens as $children)
|
||||
$this->getCategoryOption($children['id_category'], $id_lang);
|
||||
}
|
||||
}
|
||||
|
||||
private function getCategory($id_category, $id_lang)
|
||||
{
|
||||
global $page_name;
|
||||
|
||||
$categorie = new Category($id_category, $id_lang);
|
||||
if(is_null($categorie->id))
|
||||
return;
|
||||
$selected = ($page_name == 'category' && ((int)Tools::getValue('id_category') == $id_category)) ? ' class="sfHoverForce"' : '';
|
||||
$this->_menu .= '<li'.$selected.'>';
|
||||
if(count(explode('.', $categorie->name)) > 1)
|
||||
$name = str_replace('.', '', strstr($categorie->name, '.'));
|
||||
else
|
||||
$name = $categorie->name;
|
||||
$this->_menu .= '<a href="'.$categorie->getLink().'">'.$name.'</a>';
|
||||
$childrens = Category::getChildren($id_category, $id_lang);
|
||||
if(count($childrens))
|
||||
{
|
||||
$this->_menu .= '<ul>';
|
||||
foreach($childrens as $children)
|
||||
$this->getCategory($children['id_category'], $id_lang);
|
||||
$this->_menu .= '</ul>';
|
||||
}
|
||||
$this->_menu .= '</li>';
|
||||
}
|
||||
|
||||
public function hooktop($param)
|
||||
{
|
||||
global $smarty;
|
||||
$this->makeMenu();
|
||||
$smarty->assign('MENU_SEARCH', Configuration::get('MOD_BLOCKTOPMENU_SEARCH'));
|
||||
$smarty->assign('MENU', $this->_menu);
|
||||
$smarty->assign('this_path', $this->_path);
|
||||
return $this->display(__FILE__, 'blocktopmenu.tpl');
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,22 @@
|
||||
{if $MENU != ''}
|
||||
</div>
|
||||
<!-- Menu -->
|
||||
<div class="sf-contener clearfix">
|
||||
<ul class="sf-menu clearfix">
|
||||
{$MENU}
|
||||
{if $MENU_SEARCH}
|
||||
<li class="sf-search noBack" style="float:right">
|
||||
<form id="searchbox" action="search.php" method="get">
|
||||
<input type="hidden" value="position" name="orderby"/>
|
||||
<input type="hidden" value="desc" name="orderway"/>
|
||||
<input type="text" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query}{/if}" />
|
||||
</form>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
<div class="sf-right"> </div>
|
||||
<script type="text/javascript" src="{$this_path}js/hoverIntent.js"></script>
|
||||
<script type="text/javascript" src="{$this_path}js/superfish-modified.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{$this_path}css/superfish-modified.css" media="screen">
|
||||
<!--/ Menu -->
|
||||
{/if}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blocktopmenu</name>
|
||||
<displayName><![CDATA[Top horizontal menu]]></displayName>
|
||||
<version><![CDATA[1.3]]></version>
|
||||
<description><![CDATA[Add a new menu on top of your shop.]]></description>
|
||||
<author><![CDATA[]]></author>
|
||||
<tab><![CDATA[Julien Breux Developpement]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
?>
|
||||
@@ -0,0 +1,171 @@
|
||||
|
||||
/*** ESSENTIAL STYLES ***/
|
||||
.sf-contener {
|
||||
clear: both;
|
||||
}
|
||||
.sf-right {
|
||||
margin-right: 14px;
|
||||
float: right;
|
||||
width: 7px;
|
||||
}
|
||||
.sf-menu, .sf-menu * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.sf-menu {
|
||||
margin: 10px 0;
|
||||
padding:0 5px;
|
||||
width:970px;/* 980 */
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background: transparent url(../img/bg_blocktopmenu.png) repeat-x 0 0;
|
||||
-moz-box-shadow: 0px 1px 2px #c6c6c6;
|
||||
-webkit-box-shadow: 0px 1px 2px #c6c6c6;
|
||||
box-shadow: 0px 1px 2px #c6c6c6;
|
||||
}
|
||||
.sf-menu ul {
|
||||
position: absolute;
|
||||
top: -999em;
|
||||
width: 10em; /* left offset of submenus need to match (see below) */
|
||||
}
|
||||
.sf-menu ul li {
|
||||
width: 100%;
|
||||
}
|
||||
.sf-menu li:hover {
|
||||
visibility: inherit; /* fixes IE7 'sticky bug' */
|
||||
}
|
||||
.sf-menu li {
|
||||
float: left;
|
||||
position: relative;
|
||||
background: transparent url(../img/bg_li_blocktopmenu.png) no-repeat 100% 0;
|
||||
}
|
||||
.sf-menu a {
|
||||
display: block;
|
||||
position: relative;
|
||||
color:#fff;
|
||||
text-shadow:0 1px 0 #333;
|
||||
}
|
||||
.sf-menu li:hover ul,
|
||||
.sf-menu li.sfHover ul {
|
||||
left: 0;
|
||||
top: 34px; /* match top ul list item height */
|
||||
z-index: 99;
|
||||
width:auto
|
||||
}
|
||||
ul.sf-menu li:hover li ul,
|
||||
ul.sf-menu li.sfHover li ul {
|
||||
top: -999em;
|
||||
}
|
||||
ul.sf-menu li li:hover ul,
|
||||
ul.sf-menu li li.sfHover ul {
|
||||
left: 10em; /* match ul width */
|
||||
top: 0;
|
||||
}
|
||||
ul.sf-menu li li:hover li ul,
|
||||
ul.sf-menu li li.sfHover li ul {
|
||||
top: -999em;
|
||||
}
|
||||
ul.sf-menu li li li:hover ul,
|
||||
ul.sf-menu li li li.sfHover ul {
|
||||
left: 10em; /* match ul width */
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/*** DEMO SKIN ***/
|
||||
.sf-menu {
|
||||
float: left;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.sf-menu a {
|
||||
display:block;
|
||||
margin-right:2px;
|
||||
padding: 0 22px 0 20px;
|
||||
line-height:34px;
|
||||
border: 0;
|
||||
text-decoration:none;
|
||||
}
|
||||
.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/
|
||||
color: #fff;
|
||||
white-space:nowrap;
|
||||
}
|
||||
.sf-menu li li {
|
||||
background: rgba(113, 113, 113, 0.9);
|
||||
}
|
||||
.sf-menu li li li {
|
||||
background: #ebebed;
|
||||
}
|
||||
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
|
||||
background: transparent url(../img/bg_blocktopmenu_li_hover.png) repeat-x 0 0;
|
||||
}
|
||||
.sf-menu ul li:hover, .sf-menu ul li.sfHover,
|
||||
.sf-menu ul li a:focus, .sf-menu ul li a:hover, .sf-menu ul li a:active {
|
||||
background: #4e4e4e;
|
||||
outline: 0;
|
||||
}
|
||||
/*** arrows **/
|
||||
.sf-menu a.sf-with-ul {
|
||||
padding-right: 2.25em;
|
||||
min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */
|
||||
}
|
||||
.sf-sub-indicator {
|
||||
position: absolute;
|
||||
display: block;
|
||||
right: 10px;
|
||||
top: 1.05em; /* IE6 only */
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
text-indent: -999em;
|
||||
overflow: hidden;
|
||||
background: url('../img/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
|
||||
}
|
||||
a > .sf-sub-indicator { /* give all except IE6 the correct values */
|
||||
top: 11px;
|
||||
background-position: 0 -100px; /* use translucent arrow for modern browsers*/
|
||||
}
|
||||
/* apply hovers to modern browsers */
|
||||
a:focus > .sf-sub-indicator,
|
||||
a:hover > .sf-sub-indicator,
|
||||
a:active > .sf-sub-indicator,
|
||||
li:hover > a > .sf-sub-indicator,
|
||||
li.sfHover > a > .sf-sub-indicator {
|
||||
background-position: -10px -100px; /* arrow hovers for modern browsers*/
|
||||
}
|
||||
|
||||
/* point right for anchors in subs */
|
||||
.sf-menu ul .sf-sub-indicator { background-position: -10px 0; }
|
||||
.sf-menu ul a > .sf-sub-indicator { background-position: 0 0; }
|
||||
/* apply hovers to modern browsers */
|
||||
.sf-menu ul a:focus > .sf-sub-indicator,
|
||||
.sf-menu ul a:hover > .sf-sub-indicator,
|
||||
.sf-menu ul a:active > .sf-sub-indicator,
|
||||
.sf-menu ul li:hover > a > .sf-sub-indicator,
|
||||
.sf-menu ul li.sfHover > a > .sf-sub-indicator {
|
||||
background-position: -10px 0; /* arrow hovers for modern browsers*/
|
||||
}
|
||||
|
||||
/*** shadows for all but IE6 ***/
|
||||
.sf-shadow ul {
|
||||
background: url('../img/shadow.png') no-repeat bottom right;
|
||||
padding: 0 8px 9px 0;
|
||||
-moz-border-radius-bottomleft: 17px;
|
||||
-moz-border-radius-topright: 17px;
|
||||
-webkit-border-top-right-radius: 17px;
|
||||
-webkit-border-bottom-left-radius: 17px;
|
||||
}
|
||||
.sf-shadow ul.sf-shadow-off {
|
||||
background: transparent;
|
||||
}
|
||||
li.sf-search {
|
||||
background: inherit;
|
||||
float: right;
|
||||
line-height: 25px;
|
||||
}
|
||||
li.sf-search input {
|
||||
-moz-border-radius: 0 5px 5px 0;
|
||||
padding: 3px 0;
|
||||
padding-left: 20px;
|
||||
margin-top: 4px;
|
||||
background: #fff url(../img/search.gif) no-repeat left center;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_e5b7525b4214a759876af4448bd6b87d'] = 'Menu Haut Horizontal';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_925a8a825a28f69e7a96f5996f9cfcc5'] = 'Ajouter un nouveau menu en haut de votre boutique.';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_597582c140dd691b522fe42299a24d34'] = 'Paramètres mis à jour';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_b9129c167a73844d16d28b0949719155'] = 'Impossible de mettre à jour les paramètres';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_5eef1a8aef991f41dc621dd69e97ad80'] = 'Impossible d\'ajouter ce lien';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_11ad009c1b7c0615be18fe91185c179a'] = 'Le lien a été ajouté';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_15772d25000bce9fc3a2a2fd7d41a717'] = 'Le lien a été supprimé';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_9dea4016dbcc290b773ab2fae678aaa8'] = 'Elements';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_1063e38cb53d94d386f21227fcd84717'] = 'Supprimer';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_c7da501f54544eba6787960200d9efdb'] = 'CMS';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_ec136b444eede3bc85639fac0dd06229'] = 'Fournisseurs';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_c0bd7654d5b278e65f21cf4e9153fdb4'] = 'Fabricants';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_af1b98adf7f686b84cd0b443e022b7a0'] = 'Catégories';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_068f80c7519d0528fb08e82137a72131'] = 'Produits';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_ac3b3f2d1984171e48eaa3d0bc56d75f'] = 'Choisissez un ID produit';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_56e8bf6c54f1638e7bce5a2fcd5b20fe'] = 'Liens du menu';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_ec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_fcd7ab4061bb3846392cc34376902165'] = 'ID du produit';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_97f08a40f22a625d0cbfe03db3349108'] = 'Produit ID';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_8cc149b77eaece54cee2e7e02f40018a'] = 'Barre de recherche';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_c436854b135c3dd00ab95b2d4344b0ed'] = 'Enregistrer';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_9f1b01ac44ff287d5b8ed20ec8ee180b'] = 'Ajouter un lien';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_b021df6aac4654c454f46c77646e745f'] = 'Label';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_97e7c9a7d06eac006a28bf05467fcc8b'] = 'Lien';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_7a115fe2bd8b94ead1550a2da953cf87'] = 'Nouvelle fenêtre';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_19488f2956dc859eb635dbb0deaa15e1'] = 'Ajouter';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_814579fdad9baf2cdcac456468265384'] = 'Liste des liens';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_4443702c8a13a65ac66d074b7a82af9a'] = 'ID Lien';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_004bf6c9a40003140292e97330236c53'] = 'Action';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_93cba07454f06a4a960172bbd6e2a435'] = 'Oui';
|
||||
$_MODULE['<{blocktopmenu}prestashop>blocktopmenu_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Non';
|
||||
|
After Width: | Height: | Size: 244 B |
|
After Width: | Height: | Size: 265 B |
|
After Width: | Height: | Size: 247 B |
|
After Width: | Height: | Size: 247 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 839 B |
|
After Width: | Height: | Size: 155 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 946 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 345 B |
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
?>
|
||||
|
After Width: | Height: | Size: 662 B |
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
?>
|
||||
@@ -0,0 +1,84 @@
|
||||
(function($){
|
||||
/* hoverIntent by Brian Cherne */
|
||||
$.fn.hoverIntent = function(f,g) {
|
||||
// default configuration options
|
||||
var cfg = {
|
||||
sensitivity: 7,
|
||||
interval: 100,
|
||||
timeout: 0
|
||||
};
|
||||
// override configuration options with user supplied object
|
||||
cfg = $.extend(cfg, g ? { over: f, out: g } : f );
|
||||
|
||||
// instantiate variables
|
||||
// cX, cY = current X and Y position of mouse, updated by mousemove event
|
||||
// pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
|
||||
var cX, cY, pX, pY;
|
||||
|
||||
// A private function for getting mouse position
|
||||
var track = function(ev) {
|
||||
cX = ev.pageX;
|
||||
cY = ev.pageY;
|
||||
};
|
||||
|
||||
// A private function for comparing current and previous mouse position
|
||||
var compare = function(ev,ob) {
|
||||
ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
|
||||
// compare mouse positions to see if they've crossed the threshold
|
||||
if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
|
||||
$(ob).unbind("mousemove",track);
|
||||
// set hoverIntent state to true (so mouseOut can be called)
|
||||
ob.hoverIntent_s = 1;
|
||||
return cfg.over.apply(ob,[ev]);
|
||||
} else {
|
||||
// set previous coordinates for next time
|
||||
pX = cX; pY = cY;
|
||||
// use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
|
||||
ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
|
||||
}
|
||||
};
|
||||
|
||||
// A private function for delaying the mouseOut function
|
||||
var delay = function(ev,ob) {
|
||||
ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
|
||||
ob.hoverIntent_s = 0;
|
||||
return cfg.out.apply(ob,[ev]);
|
||||
};
|
||||
|
||||
// A private function for handling mouse 'hovering'
|
||||
var handleHover = function(e) {
|
||||
// next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut
|
||||
var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
|
||||
while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } }
|
||||
if ( p == this ) { return false; }
|
||||
|
||||
// copy objects to be passed into t (required for event object to be passed in IE)
|
||||
var ev = jQuery.extend({},e);
|
||||
var ob = this;
|
||||
|
||||
// cancel hoverIntent timer if it exists
|
||||
if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
|
||||
|
||||
// else e.type == "onmouseover"
|
||||
if (e.type == "mouseover") {
|
||||
// set "previous" X and Y position based on initial entry point
|
||||
pX = ev.pageX; pY = ev.pageY;
|
||||
// update "current" X and Y position based on mousemove
|
||||
$(ob).bind("mousemove",track);
|
||||
// start polling interval (self-calling timeout) to compare mouse coordinates over time
|
||||
if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
|
||||
|
||||
// else e.type == "onmouseout"
|
||||
} else {
|
||||
// unbind expensive mousemove event
|
||||
$(ob).unbind("mousemove",track);
|
||||
// if hoverIntent state is true, then call the mouseOut function after the specified delay
|
||||
if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
|
||||
}
|
||||
};
|
||||
|
||||
// bind the function to the two event listeners
|
||||
return this.mouseover(handleHover).mouseout(handleHover);
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
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;
|
||||
?>
|
||||
@@ -0,0 +1,124 @@
|
||||
|
||||
/*
|
||||
* Superfish v1.4.8 - jQuery menu widget
|
||||
* Copyright (c) 2008 Joel Birch
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
|
||||
*/
|
||||
|
||||
;(function($){
|
||||
$.fn.superfish = function(op){
|
||||
|
||||
var sf = $.fn.superfish,
|
||||
c = sf.c,
|
||||
$arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')),
|
||||
over = function(){
|
||||
var $$ = $(this), menu = getMenu($$);
|
||||
clearTimeout(menu.sfTimer);
|
||||
$$.showSuperfishUl().siblings().hideSuperfishUl();
|
||||
},
|
||||
out = function(){
|
||||
var $$ = $(this), menu = getMenu($$), o = sf.op;
|
||||
clearTimeout(menu.sfTimer);
|
||||
menu.sfTimer=setTimeout(function(){
|
||||
o.retainPath=($.inArray($$[0],o.$path)>-1);
|
||||
$$.hideSuperfishUl();
|
||||
if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
|
||||
},o.delay);
|
||||
},
|
||||
getMenu = function($menu){
|
||||
var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
|
||||
sf.op = sf.o[menu.serial];
|
||||
return menu;
|
||||
},
|
||||
addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
|
||||
|
||||
return this.each(function() {
|
||||
var s = this.serial = sf.o.length;
|
||||
var o = $.extend({},sf.defaults,op);
|
||||
o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
|
||||
$(this).addClass([o.hoverClass,c.bcClass].join(' '))
|
||||
.filter('li:has(ul)').removeClass(o.pathClass);
|
||||
});
|
||||
sf.o[s] = sf.op = o;
|
||||
|
||||
$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
|
||||
if (o.autoArrows) addArrow( $('>a:first-child',this) );
|
||||
})
|
||||
.not('.'+c.bcClass)
|
||||
.hideSuperfishUl();
|
||||
|
||||
var $a = $('a',this);
|
||||
$a.each(function(i){
|
||||
var $li = $a.eq(i).parents('li');
|
||||
$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
|
||||
});
|
||||
o.onInit.call(this);
|
||||
|
||||
}).each(function() {
|
||||
menuClasses = [c.menuClass];
|
||||
if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
|
||||
$(this).addClass(menuClasses.join(' '));
|
||||
});
|
||||
};
|
||||
|
||||
var sf = $.fn.superfish;
|
||||
sf.o = [];
|
||||
sf.op = {};
|
||||
sf.IE7fix = function(){
|
||||
var o = sf.op;
|
||||
if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
|
||||
this.toggleClass(sf.c.shadowClass+'-off');
|
||||
};
|
||||
sf.c = {
|
||||
bcClass : 'sf-breadcrumb',
|
||||
menuClass : 'sf-js-enabled',
|
||||
anchorClass : 'sf-with-ul',
|
||||
arrowClass : 'sf-sub-indicator',
|
||||
shadowClass : 'sf-shadow'
|
||||
};
|
||||
sf.defaults = {
|
||||
hoverClass : 'sfHover',
|
||||
pathClass : 'overideThisToUse',
|
||||
pathLevels : 1,
|
||||
delay : 800,
|
||||
animation : {opacity:'show'},
|
||||
speed : 'fast',
|
||||
autoArrows : true,
|
||||
dropShadows : true,
|
||||
disableHI : false, // true disables hoverIntent detection
|
||||
onInit : function(){}, // callback functions
|
||||
onBeforeShow: function(){},
|
||||
onShow : function(){},
|
||||
onHide : function(){}
|
||||
};
|
||||
$.fn.extend({
|
||||
hideSuperfishUl : function(){
|
||||
var o = sf.op,
|
||||
not = (o.retainPath===true) ? o.$path : '';
|
||||
o.retainPath = false;
|
||||
var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
|
||||
.find('>ul').hide().css('visibility','hidden');
|
||||
o.onHide.call($ul);
|
||||
return this;
|
||||
},
|
||||
showSuperfishUl : function(){
|
||||
var o = sf.op,
|
||||
sh = sf.c.shadowClass+'-off',
|
||||
$ul = this.addClass(o.hoverClass)
|
||||
.find('>ul:hidden').css('visibility','visible');
|
||||
sf.IE7fix.call($ul);
|
||||
o.onBeforeShow.call($ul);
|
||||
$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
jQuery(function(){
|
||||
jQuery('ul.sf-menu').superfish();
|
||||
});
|
||||
|
After Width: | Height: | Size: 595 B |
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
class MenuTopLinks
|
||||
{
|
||||
public static function gets($id_lang, $id_link = null)
|
||||
{
|
||||
return Db::getInstance()->ExecuteS('
|
||||
SELECT l.id_link, l.new_window, l.link, ll.label
|
||||
FROM '._DB_PREFIX_.'linksmenutop l
|
||||
LEFT JOIN '._DB_PREFIX_.'linksmenutop_lang ll ON (l.id_link = ll.id_link AND ll.id_lang = "'.$id_lang.'")
|
||||
'.((!is_null($id_link)) ? 'WHERE l.id_link = "'.$id_link.'"' : '').'
|
||||
');
|
||||
}
|
||||
|
||||
public static function get($id_link, $id_lang)
|
||||
{
|
||||
return self::gets($id_lang, $id_link);
|
||||
}
|
||||
|
||||
public static function add($link, $label, $newWindow = 0)
|
||||
{
|
||||
if(!is_array($label))
|
||||
return false;
|
||||
|
||||
Db::getInstance()->autoExecute(
|
||||
_DB_PREFIX_.'linksmenutop',
|
||||
array(
|
||||
'new_window'=>(int)$newWindow,
|
||||
'link'=>$link
|
||||
),
|
||||
'INSERT'
|
||||
);
|
||||
$id_link = Db::getInstance()->Insert_ID();
|
||||
foreach($label as $id_lang=>$label)
|
||||
{
|
||||
Db::getInstance()->autoExecute(
|
||||
_DB_PREFIX_.'linksmenutop_lang',
|
||||
array(
|
||||
'id_link'=>$id_link,
|
||||
'id_lang'=>$id_lang,
|
||||
'label'=>$label
|
||||
),
|
||||
'INSERT'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static function remove($id_link)
|
||||
{
|
||||
Db::getInstance()->delete(_DB_PREFIX_.'linksmenutop', "id_link = '{$id_link}'");
|
||||
Db::getInstance()->delete(_DB_PREFIX_.'linksmenutop_lang', "id_link = '{$id_link}'");
|
||||
}
|
||||
}
|
||||
?>
|
||||