'out' : function(evt){thisSlider.mouseOutHandler(evt);}
};
- this.resizeSlider();
+ if (browser.isMobile) {
+ this.rail.className = 'hidden';
+ }
+ else {
+ this.resizeSlider();
+ }
this.addEventListeners();
};
-
+if (!browser.isMobile) {
FilmSlider.prototype.resizeSlider = function(evt) {
var filmBarWidth = this.filmBarWidth;
if (!filmBarWidth) { return; }
this.initialized = true;
}
};
+}
+
+else {
+ FilmSlider.prototype.resizeSlider = function(evt) {};
+}
FilmSlider.prototype._checkSizeAfterLoad = function(evt) {
this._barSizes = [];
else if (browser.isIE6up) {
addListener(this.filmBar, 'mousewheel', function(evt){thisSlider.mouseWheelHandler(evt);});
}
+ if (browser.isMobile) {
+ this.filmBar.addEventListener('touchstart', function(evt){thisSlider.touchStartHandler(evt);}, false);
+ this.filmBar.addEventListener('touchmove', function(evt){thisSlider.touchMoveHandler(evt);}, false);
+ this.filmBar.addEventListener('touchend', function(evt){thisSlider.touchEndHandler(evt);}, false);
+ }
addListener(document, 'keydown', function(evt){thisSlider.keyDownHandler(evt);});
addListener(document, 'keypress', function(evt){thisSlider.keyPressHandler(evt);});
};
}
+FilmSlider.prototype.touchStartHandler = function(evt) {
+ this.filmStartX = parseInt(this.film.style.left, 10);
+ this.touchStartX = evt.pageX;
+};
+
+FilmSlider.prototype.touchMoveHandler = function(evt) {
+ var delta = this.touchStartX - evt.pageX;
+ this.film.style.left = String(this.filmStartX - delta) + 'px';
+};
+
+FilmSlider.prototype.touchEndHandler = function(evt) {
+ this.touchStartX = undefined;
+};
+
+
FilmSlider.prototype.keyDownHandler = function(evt) {
evt = getEventObject(evt);
switch (evt.keyCode) {
overflow:hidden;
position:relative;
width:100%;
- height: <dtml-var expr="thumb_size/2 + 12">px;;
+ height: <dtml-var expr="thumb_size/2 + 12">px;
}
#film_bar table {
}
#film_bar a {
- width: <dtml-var expr="thumb_size/2 + 10">px;;
- height: <dtml-var expr="thumb_size/2 + 10">px;;
+ width: <dtml-var expr="thumb_size/2 + 10">px;
+ height: <dtml-var expr="thumb_size/2 + 10">px;
display:block;
text-align:center;
vertical-align:middle;
}
#cart_slide[id] {
- background:no-repeat url(&dtml-portal_url;/cart-slide-background.png);;
+ background:no-repeat url(&dtml-portal_url;/cart-slide-background.png);
}
.wdgt-buyable-items {
border:none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='&dtml-portal_url;/add_to_cart.png');
left:<dtml-var expr="slide_size - 47">px;
- top:2.5em;;
+ top:2.5em;
}
input.add-to-cart-btn[class] {