fix https in skinStatic module
This commit is contained in:
parent
33cd9f3d08
commit
c73143d5b5
@ -4,10 +4,10 @@ if(!defined('_PS_VERSION_')) {
|
||||
}
|
||||
|
||||
class AdminSkinStatic extends AdminTab {
|
||||
|
||||
|
||||
public $_html = '';
|
||||
|
||||
public function postProcess()
|
||||
public function postProcess()
|
||||
{
|
||||
global $cookie;
|
||||
$languages = Language::getLanguages(FALSE);
|
||||
@ -39,7 +39,7 @@ class AdminSkinStatic extends AdminTab {
|
||||
'));
|
||||
}
|
||||
|
||||
if(isset($_FILES['img_'.(int) $i]) && $_FILES['img_'.(int) $i]['name'] != '')
|
||||
if(isset($_FILES['img_'.(int) $i]) && $_FILES['img_'.(int) $i]['name'] != '')
|
||||
{
|
||||
if(!copy($_FILES['img_'.(int) $i]['tmp_name'], _PS_ROOT_DIR_.'/themes/site/skinstatic_cache/skin_'.(int) $i.'_'.(int) $id_lang.'.jpg')) {
|
||||
echo '<p class"error">'.$this->l('An error occured during the image upload.').'</p>';
|
||||
@ -57,8 +57,8 @@ class AdminSkinStatic extends AdminTab {
|
||||
Tools::getValue('right_link_'.(int) $i),
|
||||
Configuration::get('SKINSTATIC_VERSION'),
|
||||
),
|
||||
|
||||
'<style type="text/css">body#index #columns { background: url("http://www.bebeboutik.com/themes/site/skinstatic_cache/skin_'.(int) $i.'_'.(int) $id_lang.'.jpg?v={version}") no-repeat '.(Tools::getValue('fixed_'.(int) $i)? 'fixed center 0px': 'scroll center 0px').' #F1F1F1}</style><a'.((int) Tools::getValue('new_window_'.(int) $i)? ' onclick="window.open(this.href); return false;"': '').' id="skin-left" href="{left_link}"></a><a'.((int) Tools::getValue('new_window_'.(int) $i)? ' onclick="window.open(this.href); return false;"': '').' id="skin-right" href="{right_link}"></a>'.(Tools::getValue('fixed_'.(int) $i)? '
|
||||
|
||||
'<style type="text/css">body#index #columns { background: url("//www.bebeboutik.com/themes/site/skinstatic_cache/skin_'.(int) $i.'_'.(int) $id_lang.'.jpg?v={version}") no-repeat '.(Tools::getValue('fixed_'.(int) $i)? 'fixed center 0px': 'scroll center 0px').' #F1F1F1}</style><a'.((int) Tools::getValue('new_window_'.(int) $i)? ' onclick="window.open(this.href); return false;"': '').' id="skin-left" href="{left_link}"></a><a'.((int) Tools::getValue('new_window_'.(int) $i)? ' onclick="window.open(this.href); return false;"': '').' id="skin-right" href="{right_link}"></a>'.(Tools::getValue('fixed_'.(int) $i)? '
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
$(document).ready(function() { var scrolling = $("#skin-left, #skin-right"); var pos = scrolling.position(); var size = scrolling.height() + 80; var max_size = $(document).height() - $("#footer").height() - 45; $(window).scroll(function(event) { offset = parseFloat(scrolling.css("marginTop").replace("px", "")); margin = 170; height = 750; if($(document).scrollTop()==0){margin = 30;} if($(document).scrollTop()>130){height = $(window).height();} console.log(height); scrolling.css({ "marginTop": Math.min($(document).scrollTop(), max_size)-margin + "px", "height" : height+"px" }); }); '.($i == 0 && substr(Tools::getValue('left_link_'.(int) $i), 0, 28) == 'http://www.privatesportshop.'? '$("#skin-left, #skin-right").unbind("click").removeAttr("href").removeAttr("onclick").click(function(event) { event.stopPropagation(); event.preventDefault(); $("#privatesales_block li > a").first().trigger("click"); });': '').'
|
||||
@ -77,8 +77,8 @@ class AdminSkinStatic extends AdminTab {
|
||||
Tools::getValue('right_link_'.(int) $i),
|
||||
Configuration::get('SKINSTATIC_VERSION'),
|
||||
),
|
||||
|
||||
'<style type="text/css">body#index #columns { background: url("http://www.bebeboutik.com/themes/site/skinstatic_cache/skin_'.(int) $i.'_'.(int) $id_lang.'.jpg?v={version}") no-repeat '.(Tools::getValue('fixed_'.(int) $i)? 'fixed center 0px': 'scroll center 0px').' #F1F1F1}</style><a'.((int) Tools::getValue('new_window_'.(int) $i)? ' onclick="window.open(this.href); return false;"': '').' id="skin-left" href="{left_link}"></a><a'.((int) Tools::getValue('new_window_'.(int) $i)? ' onclick="window.open(this.href); return false;"': '').' id="skin-right" href="{right_link}"></a>'.(Tools::getValue('fixed_'.(int) $i)? '
|
||||
|
||||
'<style type="text/css">body#index #columns { background: url("//www.bebeboutik.com/themes/site/skinstatic_cache/skin_'.(int) $i.'_'.(int) $id_lang.'.jpg?v={version}") no-repeat '.(Tools::getValue('fixed_'.(int) $i)? 'fixed center 0px': 'scroll center 0px').' #F1F1F1}</style><a'.((int) Tools::getValue('new_window_'.(int) $i)? ' onclick="window.open(this.href); return false;"': '').' id="skin-left" href="{left_link}"></a><a'.((int) Tools::getValue('new_window_'.(int) $i)? ' onclick="window.open(this.href); return false;"': '').' id="skin-right" href="{right_link}"></a>'.(Tools::getValue('fixed_'.(int) $i)? '
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
$(document).ready(function() { var scrolling = $("#skin-left, #skin-right"); var pos = scrolling.position(); var size = scrolling.height() + 80; var max_size = $(document).height() - $("#footer").height() - 45; $(window).scroll(function(event) { offset = parseFloat(scrolling.css("marginTop").replace("px", "")); scrolling.css({ "marginTop": Math.min($(document).scrollTop(), max_size) + "px" }); }); '.($i == 0 && substr(Tools::getValue('left_link_'.(int) $i), 0, 28) == 'http://www.privatesportshop.'? '$("#skin-left, #skin-right").unbind("click").removeAttr("href").removeAttr("onclick").click(function(event) { event.stopPropagation(); event.preventDefault(); $("#privatesales_block li > a").first().trigger("click"); });': '').'
|
||||
@ -99,7 +99,7 @@ class AdminSkinStatic extends AdminTab {
|
||||
public function display()
|
||||
{
|
||||
global $cookie;
|
||||
|
||||
|
||||
$languages = Language::getLanguages(FALSE);
|
||||
// $divLangName = 'left_link_0¤right_link_0¤new_window_0¤fixed_0¤img_0¤left_link_1¤right_link_1¤new_window_1¤fixed_1¤img_1¤left_link_2¤right_link_2¤new_window_2¤fixed_2¤img_2';
|
||||
$divLangName = 'left_link_1¤right_link_1¤new_window_1¤fixed_1¤img_1';
|
||||
@ -130,7 +130,7 @@ class AdminSkinStatic extends AdminTab {
|
||||
|
||||
<legend style="display: inline-block;"><img src="../img/admin/prefs.gif" />'.$this->l('Links (logged in)').'</legend>
|
||||
<br />
|
||||
|
||||
|
||||
<div class="text">
|
||||
<label>'.$this->l('Remove actual skin').'</label>
|
||||
<div class="margin-form">
|
||||
@ -174,10 +174,10 @@ class AdminSkinStatic extends AdminTab {
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<legend style="display: inline-block;"><img src="../img/admin/prefs.gif" />'.$this->l('Links (logged out)').'</legend>
|
||||
<br />
|
||||
|
||||
|
||||
<div class="text">
|
||||
<label>'.$this->l('Remove actual skin').'</label>
|
||||
<div class="margin-form">
|
||||
|
Loading…
Reference in New Issue
Block a user