Merge branch '1.6' of https://github.com/PrestaShop/PrestaShop into 1.6
This commit is contained in:
@@ -435,6 +435,7 @@ class FrontControllerCore extends Controller
|
||||
$this->context->smarty->assign(array(
|
||||
'HOOK_HEADER' => Hook::exec('displayHeader'),
|
||||
'HOOK_TOP' => Hook::exec('displayTop'),
|
||||
'HOOK_TOP_COLUMN' => ($this->display_column_left ? Hook::exec('displayTopColumn') : ''),
|
||||
'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),
|
||||
'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''),
|
||||
));
|
||||
|
||||
@@ -517,6 +517,9 @@ class AdminImportControllerCore extends AdminController
|
||||
.'template'))
|
||||
$bo_theme = 'default';
|
||||
|
||||
// We need to set parent media first, so that jQuery is loaded before the dependant plugins
|
||||
parent::setMedia();
|
||||
|
||||
$this->addJs(__PS_BASE_URI__.$admin_webpath.'/themes/'.$bo_theme.'/js/vendor/jquery.ui.widget.js');
|
||||
$this->addJs(__PS_BASE_URI__.$admin_webpath.'/themes/'.$bo_theme.'/js/jquery.iframe-transport.js');
|
||||
$this->addJs(__PS_BASE_URI__.$admin_webpath.'/themes/'.$bo_theme.'/js/jquery.fileupload.js');
|
||||
@@ -524,8 +527,6 @@ class AdminImportControllerCore extends AdminController
|
||||
$this->addJs(__PS_BASE_URI__.$admin_webpath.'/themes/'.$bo_theme.'/js/jquery.fileupload-validate.js');
|
||||
$this->addJs(__PS_BASE_URI__.'js/vendor/spin.js');
|
||||
$this->addJs(__PS_BASE_URI__.'js/vendor/ladda.js');
|
||||
|
||||
return parent::setMedia();
|
||||
}
|
||||
|
||||
public function renderForm()
|
||||
|
||||
@@ -279,6 +279,9 @@
|
||||
</hook>
|
||||
<hook id="displayHomeTabContent" live_edit="1">
|
||||
<name>displayHomeTabContent</name><title>Home Page Tabs Content</title><description>This hook displays new elements on the homepage tabs content</description>
|
||||
</hook>
|
||||
<hook id="displayTopColumn" live_edit="1">
|
||||
<name>displayTopColumn</name><title>Top column blocks</title><description>This hook displays new elements in the top of columns</description>
|
||||
</hook>
|
||||
<hook id="displayBackOfficeCategory" live_edit="0">
|
||||
<name>displayBackOfficeCategory</name><title>Display new elements in the Back Office, tab AdminCategories</title><description>This hook launches modules when the AdminCategories tab is displayed in the Back Office</description>
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
* To change the color scheme of slider change each
|
||||
* background property for each of the five styles below
|
||||
*/
|
||||
|
||||
.bx-window {margin-bottom:20px;}
|
||||
.bx-wrapper {
|
||||
margin-bottom:20px;
|
||||
height:300px
|
||||
}
|
||||
|
||||
/*next button*/
|
||||
.bx-next {
|
||||
display:none;
|
||||
@@ -21,11 +19,9 @@
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-indent: -999999px;
|
||||
background: url(gray_next.png) no-repeat 0 -30px;
|
||||
background: url(../images/gray_next.png) no-repeat 0 -30px;
|
||||
}
|
||||
|
||||
/*previous button*/
|
||||
|
||||
.bx-prev {
|
||||
display:none;
|
||||
position:absolute;
|
||||
@@ -35,9 +31,8 @@
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-indent: -999999px;
|
||||
background: url(gray_prev.png) no-repeat 0 -30px;
|
||||
background: url(../images/gray_prev.png) no-repeat 0 -30px;
|
||||
}
|
||||
|
||||
/*pager links*/
|
||||
.bx-pager {
|
||||
position: absolute;
|
||||
@@ -60,20 +55,17 @@
|
||||
font-size: 11px;
|
||||
color:#000;
|
||||
text-decoration:none;
|
||||
background:url(gray_pager.png) no-repeat 0 -20px;
|
||||
background:url(../images/gray_pager.png) no-repeat 0 -20px;
|
||||
}
|
||||
|
||||
/*
|
||||
* End color scheme styles
|
||||
*/
|
||||
|
||||
|
||||
/*next/prev button hover state*/
|
||||
.bx-next:hover,
|
||||
.bx-prev:hover {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
/*pager links hover and active states*/
|
||||
.bx-pager .pager-active,
|
||||
.bx-pager a:hover {
|
||||
@@ -81,7 +73,6 @@
|
||||
text-decoration:none;
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
/*captions*/
|
||||
.bx-captions {
|
||||
text-align:center;
|
||||
@@ -89,14 +80,12 @@
|
||||
padding: 7px 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/*auto controls*/
|
||||
.bx-auto {
|
||||
text-align: center;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.bx-auto a {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<module>
|
||||
<name>homeslider</name>
|
||||
<displayName><![CDATA[Image slider for your homepage.]]></displayName>
|
||||
<version><![CDATA[1.2.2]]></version>
|
||||
<version><![CDATA[1.2.3]]></version>
|
||||
<description><![CDATA[Adds an image slider to your homepage.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/**
|
||||
* @since 1.5.0
|
||||
* @version 1.2 (2012-03-14)
|
||||
* @version 1.3 (2012-03-14)
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
@@ -42,7 +42,7 @@ class HomeSlider extends Module
|
||||
{
|
||||
$this->name = 'homeslider';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '1.2.2';
|
||||
$this->version = '1.2.3';
|
||||
$this->author = 'PrestaShop';
|
||||
$this->need_instance = 0;
|
||||
$this->secure_key = Tools::encrypt($this->name);
|
||||
@@ -60,7 +60,7 @@ class HomeSlider extends Module
|
||||
public function install()
|
||||
{
|
||||
/* Adds Module */
|
||||
if (parent::install() && $this->registerHook('displayTop') && $this->registerHook('actionShopDataDuplication'))
|
||||
if (parent::install() && $this->registerHook('displayTopColumn') && $this->registerHook('actionShopDataDuplication'))
|
||||
{
|
||||
/* Sets up configuration */
|
||||
$res = Configuration::updateValue('HOMESLIDER_WIDTH', '779');
|
||||
@@ -660,18 +660,17 @@ class HomeSlider extends Module
|
||||
return true;
|
||||
}
|
||||
|
||||
public function hookDisplayTop()
|
||||
public function hookdisplayTopColumn()
|
||||
{
|
||||
if(!$this->_prepareHook())
|
||||
return;
|
||||
|
||||
// Check if not a mobile theme
|
||||
if ($this->context->getMobileDevice() != false)
|
||||
if ($this->context->smarty->tpl_vars['page_name'] != 'index' || $this->context->getMobileDevice() != false)
|
||||
return false;
|
||||
|
||||
if(!$this->_prepareHook())
|
||||
return false;
|
||||
$this->context->controller->addJS($this->_path.'js/jquery.bxSlider.min.js');
|
||||
$this->context->controller->addCSS($this->_path.'bx_styles.css');
|
||||
$this->context->controller->addJS($this->_path.'js/homeslider.js');
|
||||
|
||||
return $this->display(__FILE__, 'homeslider.tpl', $this->getCacheId());
|
||||
}
|
||||
|
||||
|
||||
@@ -23,34 +23,37 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $page_name =='index'}
|
||||
<!-- Module HomeSlider -->
|
||||
{if isset($homeslider_slides)}
|
||||
<div id="homepage-slider">
|
||||
<ul id="homeslider">
|
||||
{foreach from=$homeslider_slides item=slide}
|
||||
{if $slide.active}
|
||||
<li>
|
||||
<a href="{$slide.url|escape:'html':'UTF-8'}" title="{$slide.description|escape:'html':'UTF-8'}">
|
||||
<img src="{$smarty.const._MODULE_DIR_}homeslider/images/{$slide.image|escape:'html':'UTF-8'}" alt="{$slide.legend|escape:'html':'UTF-8'}" />
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{if isset($homeslider)}
|
||||
<script type="text/javascript">
|
||||
{if isset($homeslider_slides) && $homeslider_slides|@count > 1}
|
||||
{if $homeslider.loop == 1}
|
||||
var homeslider_loop = true;
|
||||
{else}
|
||||
var homeslider_loop = false;
|
||||
{/if}
|
||||
{if $homeslider_slides|@count > 1}
|
||||
{if $homeslider.loop == 1}
|
||||
var homeslider_loop = true;
|
||||
{else}
|
||||
var homeslider_loop = false;
|
||||
{/if}
|
||||
var homeslider_speed = {$homeslider.speed};
|
||||
var homeslider_pause = {$homeslider.pause};
|
||||
{else}
|
||||
var homeslider_loop = false;
|
||||
{/if}
|
||||
var homeslider_speed = {$homeslider.speed};
|
||||
var homeslider_pause = {$homeslider.pause};
|
||||
</script>
|
||||
{/if}
|
||||
{if isset($homeslider_slides)}
|
||||
<ul id="homeslider">
|
||||
{foreach from=$homeslider_slides item=slide}
|
||||
{if $slide.active}
|
||||
<li>
|
||||
<a href="{$slide.url|escape:'html':'UTF-8'}" title="{$slide.description|escape:'html':'UTF-8'}">
|
||||
<img src="{$smarty.const._MODULE_DIR_}homeslider/images/{$slide.image|escape:'html':'UTF-8'}" alt="{$slide.legend|escape:'html':'UTF-8'}" height="{$homeslider.height|intval}" width="{$homeslider.width|intval}" />
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
<!-- /Module HomeSlider -->
|
||||
{/if}
|
||||
Executable → Regular
|
Before Width: | Height: | Size: 869 B After Width: | Height: | Size: 869 B |
Executable → Regular
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Executable → Regular
|
Before Width: | Height: | Size: 845 B After Width: | Height: | Size: 845 B |
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_2_3($object)
|
||||
{
|
||||
return ($object->unregisterHook('displayHome') && $object->registerHook('displayTopColumn'));
|
||||
}
|
||||
@@ -73,7 +73,7 @@ class ThemeConfigurator extends Module
|
||||
!$this->installDB() ||
|
||||
!$this->installFixtures() ||
|
||||
!$this->registerHook('displayHeader') ||
|
||||
!$this->registerHook('displayTop') ||
|
||||
!$this->registerHook('displayTopColumn') ||
|
||||
!$this->registerHook('displayLeftColumn') ||
|
||||
!$this->registerHook('displayRightColumn') ||
|
||||
!$this->registerHook('displayHome') ||
|
||||
@@ -203,7 +203,7 @@ class ThemeConfigurator extends Module
|
||||
}
|
||||
}
|
||||
|
||||
public function hookDisplayTop()
|
||||
public function hookdisplayTopColumn()
|
||||
{
|
||||
if ((int)Tools::getValue('live_configurator', 0) == 1)
|
||||
{
|
||||
@@ -285,8 +285,8 @@ class ThemeConfigurator extends Module
|
||||
protected function deleteImage($image)
|
||||
{
|
||||
$file_name = $this->uploads_path.$image;
|
||||
if (realpath(dirname($file_name)) != $this->uploads_path)
|
||||
die;
|
||||
if (realpath(dirname($file_name)).DIRECTORY_SEPARATOR != $this->uploads_path)
|
||||
Tools::dieOrLog(sprintf('Could not find upload directory'));
|
||||
|
||||
if ($image != '' && is_file($file_name))
|
||||
unlink($file_name);
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
|
||||
/* Top hook CSS */
|
||||
#htmlcontent_top {
|
||||
float: left;
|
||||
padding-top: 40px;
|
||||
width: 33.4%;
|
||||
max-width: 391px;
|
||||
padding-left: 10px;
|
||||
float: left;
|
||||
padding-top: 40px;
|
||||
width: 33.4%;
|
||||
max-width: 391px;
|
||||
padding-left: 10px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
#htmlcontent_top {
|
||||
|
||||
@@ -116,7 +116,6 @@
|
||||
<a class="login" href="{$link->getPageLink('my-account', true)|escape:'html'}" rel="nofollow" title="{l s='Login to your customer account'}">{l s='Sign in'}</a>
|
||||
{/if}
|
||||
</div> <!-- #header_user_info -->
|
||||
|
||||
{if count($languages) > 1}
|
||||
<div id="languages-block-top">
|
||||
<div id="countries">
|
||||
@@ -136,7 +135,6 @@
|
||||
<a href="{$lang_rewrite_urls.$indice_lang|escape:htmlall}" title="{$language.name}">
|
||||
{else}
|
||||
<a href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}" title="{$language.name}">
|
||||
|
||||
{/if}
|
||||
{/if}
|
||||
<span>{$language.name}</span>
|
||||
@@ -148,7 +146,6 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div> <!-- #languages-block-top -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#countries .current span, #countries .countries_ul li span').each(function() {
|
||||
@@ -162,7 +159,6 @@
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
{if count($currencies) > 1}
|
||||
<div id="currencies-block-top">
|
||||
<form id="setCurrency" action="{$request_uri}" method="post">
|
||||
@@ -184,20 +180,16 @@
|
||||
</form>
|
||||
</div> <!-- #currencies-block-top -->
|
||||
{/if}
|
||||
|
||||
<div id="contact-link">
|
||||
<a href="{$link->getPageLink('contact', true)|escape:'html'}" title="{l s='contact'}">{l s='Contact Us'}</a>
|
||||
</div> <!-- #contact-link -->
|
||||
|
||||
{if $shop_phone}
|
||||
<span class="shop-phone">
|
||||
<i class="icon-phone"></i>{l s='Call us now toll free:'} <strong>{$shop_phone}</strong>
|
||||
</span>
|
||||
{/if}
|
||||
|
||||
</nav><!-- .container-row -->
|
||||
</div> <!-- .header-row -->
|
||||
|
||||
<div class="container header-row-2">
|
||||
<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
|
||||
<img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if}/>
|
||||
@@ -206,16 +198,17 @@
|
||||
{$HOOK_TOP}
|
||||
</div>
|
||||
</div> <!-- .header-row-2 -->
|
||||
|
||||
</header> <!-- #header -->
|
||||
</div> <!-- .header-container -->
|
||||
|
||||
<div class="columns-container">
|
||||
<div id="columns" class="container">
|
||||
{if $page_name !='index' && $page_name !='pagenotfound'}
|
||||
{include file="$tpl_dir./breadcrumb.tpl"}
|
||||
{/if}
|
||||
<div class="row">
|
||||
<div id="top_column" class="center_column col-xs-12 col-sm-12">
|
||||
{$HOOK_TOP_COLUMN}
|
||||
</div>
|
||||
{if isset($left_column_size) && !empty($left_column_size)}
|
||||
<!-- Left -->
|
||||
<div id="left_column" class="column col-xs-12 col-sm-3">
|
||||
|
||||
@@ -57,14 +57,12 @@ function addToCompare(productId){
|
||||
}
|
||||
|
||||
function compareButtonsStatusRefresh(){
|
||||
$('.addToCompare').each(function() {
|
||||
console.log($(this).data('id-product'));
|
||||
if ($.inArray(parseInt($(this).data('id-product')),comparedProductsIds)!= -1){
|
||||
$('.addToCompare').each(function()
|
||||
{
|
||||
if ($.inArray(parseInt($(this).data('id-product')),comparedProductsIds)!= -1)
|
||||
$(this).addClass('checked');
|
||||
}
|
||||
else {
|
||||
else
|
||||
$(this).removeClass('checked');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -25,21 +25,6 @@
|
||||
*}
|
||||
{if $page_name =='index'}
|
||||
<!-- Module HomeSlider -->
|
||||
{if isset($homeslider)}
|
||||
<script type="text/javascript">
|
||||
{if isset($homeslider_slides) && $homeslider_slides|@count > 1}
|
||||
{if $homeslider.loop == 1}
|
||||
var homeslider_loop = true;
|
||||
{else}
|
||||
var homeslider_loop = false;
|
||||
{/if}
|
||||
{else}
|
||||
var homeslider_loop = false;
|
||||
{/if}
|
||||
var homeslider_speed = {$homeslider.speed};
|
||||
var homeslider_pause = {$homeslider.pause};
|
||||
</script>
|
||||
{/if}
|
||||
{if isset($homeslider_slides)}
|
||||
<div id="homepage-slider">
|
||||
<ul id="homeslider">
|
||||
@@ -54,6 +39,21 @@ var homeslider_pause = {$homeslider.pause};
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{if isset($homeslider)}
|
||||
<script type="text/javascript">
|
||||
{if $homeslider_slides|@count > 1}
|
||||
{if $homeslider.loop == 1}
|
||||
var homeslider_loop = true;
|
||||
{else}
|
||||
var homeslider_loop = false;
|
||||
{/if}
|
||||
{else}
|
||||
var homeslider_loop = false;
|
||||
{/if}
|
||||
var homeslider_speed = {$homeslider.speed};
|
||||
var homeslider_pause = {$homeslider.pause};
|
||||
</script>
|
||||
{/if}
|
||||
{/if}
|
||||
<!-- /Module HomeSlider -->
|
||||
{/if}
|
||||
{/if}
|
||||
Reference in New Issue
Block a user