fix conflcit

This commit is contained in:
Marion Muszynski 2016-06-01 12:45:33 +02:00
commit 83ac3dbe3f
6 changed files with 355 additions and 4 deletions

View File

@ -27,5 +27,12 @@ class ProductController extends ProductControllerCore {
global $css_files;
$css_files = array_slice($css_files, 0, 1);
if(!_PS_MOBILE_) {
Tools::addJS(array(
_THEME_JS_DIR_.'jquery.mousewheel.js',
_THEME_JS_DIR_.'jquery.jscrollpane.min.js'
));
}
}
}

View File

@ -1,3 +1,99 @@
/*
* CSS Styles that are needed by jScrollPane for it to operate correctly.
*
* Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane
* may not operate correctly without them.
*/
.jspContainer{
overflow: hidden;
position: relative;
width: 100%!important;
box-sizing: border-box;
}
.jspPane{
position: absolute;
width: 100%!important;
box-sizing: border-box;
}
.jspVerticalBar{
position: absolute;
top: 0;
right: 0;
width: 12px;
height: 100%;
/* background: red; */
}
.jspHorizontalBar{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 12px;
/* background: red; */
}
.jspCap{
display: none;
}
.jspHorizontalBar .jspCap{
float: left;
}
.jspTrack{
background: #CDC8C8;
position: relative;
border-radius: 20px;
}
.jspDrag{
background: #fb5fa6;
position: relative;
top: 0;
left: 0;
cursor: pointer;
border-radius: 20px;
}
.jspHorizontalBar .jspTrack,
.jspHorizontalBar .jspDrag{
float: left;
height: 100%;
}
.jspArrow{
background: #50506d;
text-indent: -20000px;
display: block;
cursor: pointer;
padding: 0;
margin: 0;
}
.jspArrow.jspDisabled{
cursor: default;
background: #80808d;
}
.jspVerticalBar .jspArrow{
height: 16px;
}
.jspHorizontalBar .jspArrow{
width: 16px;
float: left;
height: 100%;
}
.jspVerticalBar .jspArrow:focus{
outline: none;
}
.jspCorner{
background: #eeeef4;
float: left;
height: 100%;
}
/* Yuk! CSS Hack for IE6 3 pixel bug :( */
* html .jspCorner
{
margin: 0 -3px 0 0;
}
/******* End of jsScrollPane css ********/
#order_conf_detail{}
#order_conf_detail .order_conf_left{
float: left;
@ -6059,6 +6155,7 @@ div#giftvoucher_ask_infos_block .gv_customization > .gv_param input {
#product .sheets #idTab1{
overflow-y: auto;
max-height: 500px;
width: 100%!important;
}
#product .product_info {
text-align: center;

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,221 @@
/*!
* jQuery Mousewheel 3.1.12
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
(function (factory) {
if ( typeof define === 'function' && define.amd ) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// Node/CommonJS style for Browserify
module.exports = factory;
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
slice = Array.prototype.slice,
nullLowestDeltaTimeout, lowestDelta;
if ( $.event.fixHooks ) {
for ( var i = toFix.length; i; ) {
$.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
}
}
var special = $.event.special.mousewheel = {
version: '3.1.12',
setup: function() {
if ( this.addEventListener ) {
for ( var i = toBind.length; i; ) {
this.addEventListener( toBind[--i], handler, false );
}
} else {
this.onmousewheel = handler;
}
// Store the line height and page height for this particular element
$.data(this, 'mousewheel-line-height', special.getLineHeight(this));
$.data(this, 'mousewheel-page-height', special.getPageHeight(this));
},
teardown: function() {
if ( this.removeEventListener ) {
for ( var i = toBind.length; i; ) {
this.removeEventListener( toBind[--i], handler, false );
}
} else {
this.onmousewheel = null;
}
// Clean up the data we added to the element
$.removeData(this, 'mousewheel-line-height');
$.removeData(this, 'mousewheel-page-height');
},
getLineHeight: function(elem) {
var $elem = $(elem),
$parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
if (!$parent.length) {
$parent = $('body');
}
return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
},
getPageHeight: function(elem) {
return $(elem).height();
},
settings: {
adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
normalizeOffset: true // calls getBoundingClientRect for each event
}
};
$.fn.extend({
mousewheel: function(fn) {
return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
},
unmousewheel: function(fn) {
return this.unbind('mousewheel', fn);
}
});
function handler(event) {
var orgEvent = event || window.event,
args = slice.call(arguments, 1),
delta = 0,
deltaX = 0,
deltaY = 0,
absDelta = 0,
offsetX = 0,
offsetY = 0;
event = $.event.fix(orgEvent);
event.type = 'mousewheel';
// Old school scrollwheel delta
if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
// Firefox < 17 horizontal scrolling related to DOMMouseScroll event
if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
deltaX = deltaY * -1;
deltaY = 0;
}
// Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
delta = deltaY === 0 ? deltaX : deltaY;
// New school wheel delta (wheel event)
if ( 'deltaY' in orgEvent ) {
deltaY = orgEvent.deltaY * -1;
delta = deltaY;
}
if ( 'deltaX' in orgEvent ) {
deltaX = orgEvent.deltaX;
if ( deltaY === 0 ) { delta = deltaX * -1; }
}
// No change actually happened, no reason to go any further
if ( deltaY === 0 && deltaX === 0 ) { return; }
// Need to convert lines and pages to pixels if we aren't already in pixels
// There are three delta modes:
// * deltaMode 0 is by pixels, nothing to do
// * deltaMode 1 is by lines
// * deltaMode 2 is by pages
if ( orgEvent.deltaMode === 1 ) {
var lineHeight = $.data(this, 'mousewheel-line-height');
delta *= lineHeight;
deltaY *= lineHeight;
deltaX *= lineHeight;
} else if ( orgEvent.deltaMode === 2 ) {
var pageHeight = $.data(this, 'mousewheel-page-height');
delta *= pageHeight;
deltaY *= pageHeight;
deltaX *= pageHeight;
}
// Store lowest absolute delta to normalize the delta values
absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
if ( !lowestDelta || absDelta < lowestDelta ) {
lowestDelta = absDelta;
// Adjust older deltas if necessary
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
lowestDelta /= 40;
}
}
// Adjust older deltas if necessary
if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
// Divide all the things by 40!
delta /= 40;
deltaX /= 40;
deltaY /= 40;
}
// Get a whole, normalized value for the deltas
delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
// Normalise offsetX and offsetY properties
if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
var boundingRect = this.getBoundingClientRect();
offsetX = event.clientX - boundingRect.left;
offsetY = event.clientY - boundingRect.top;
}
// Add information to the event object
event.deltaX = deltaX;
event.deltaY = deltaY;
event.deltaFactor = lowestDelta;
event.offsetX = offsetX;
event.offsetY = offsetY;
// Go ahead and set deltaMode to 0 since we converted to pixels
// Although this is a little odd since we overwrite the deltaX/Y
// properties with normalized deltas.
event.deltaMode = 0;
// Add event and delta to the front of the arguments
args.unshift(event, delta, deltaX, deltaY);
// Clearout lowestDelta after sometime to better
// handle multiple device types that give different
// a different lowestDelta
// Ex: trackpad = 3 and mouse wheel = 120
if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
return ($.event.dispatch || $.event.handle).apply(this, args);
}
function nullLowestDelta() {
lowestDelta = null;
}
function shouldAdjustOldDeltas(orgEvent, absDelta) {
// If this is an older event and the delta is divisable by 120,
// then we are assuming that the browser is treating this as an
// older mouse wheel event and that we should divide the deltas
// by 40 to try and get a more usable deltaFactor.
// Side note, this actually impacts the reported scroll distance
// in older browsers and can cause scrolling to be slower than native.
// Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
}
}));

View File

@ -441,20 +441,20 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
<div id="more_info_sheets" class="sheets align_justify">
{if !empty($product->description_short)}
<!-- full description -->
<div id="idTab1" class="rte">
<div id="idTab1" class="rte scroll-pane" style="height:200px; width:100%;">
{$product->description_short}
</div>
{/if}
{if !empty($product->description)}
<!-- full description -->
<div id="idTab2" class="rte">
<div id="idTab2" class="rte scroll-pane">
{$product->description}
</div>
{/if}
<div id="idTab3" class="rte">
<div id="idTab3" class="rte scroll-pane">
</div>
{if !empty($product->videos)}
<div id="idTab4" class="rte">
<div id="idTab4" class="rte scroll-pane">
{$product->videos}
</div>
{/if}
@ -644,3 +644,8 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
{include file="$tpl_dir./product-add_to_cart.tpl" product=$product}
<script>
$(function() {
$('.scroll-pane').jScrollPane();
});
</script>

View File

@ -4750,3 +4750,16 @@ body#addresses #center_column p.footer_links a.button.back_account {
#address_ac strong {
padding: 0px 1px;
}
body#product #primary_block #more_info_block .sheets ul li,
body#product #primary_block #more_info_block .sheets p {
margin-bottom: 5px;
text-align: justify;
line-height: 16px;
}
body#product .flex-control-nav.flex-control-paging{
display: none;
}
body#product #best-sellers_block_product{
display: none;
}