Skip to content
Code-Schnipsel Gruppen Projekte
Commit 0cf47b0e erstellt von gerd's avatar gerd
Dateien durchsuchen

Merge branch 'dev' of https://dev.quiqqer.com/quiqqer/package-bricks into dev

Übergeordnete ff7bce7a 7c39ecc1
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -18,7 +18,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
return new Class({
Extends: QUIControl,
Type: 'package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper',
Type : 'package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper',
Binds: [
'onResize',
......@@ -31,14 +31,14 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
],
options: {
autostart: true,
delay: 5000,
autostart : true,
delay : 5000,
shownavigation: true,
shownarrows: true,
shownarrows : true,
height: false,
pagefit: false,
pagefitcut: 0,
height : false,
pagefit : false,
pagefitcut : 0,
pagefitcutmobile: 0
},
......@@ -46,22 +46,22 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
this.parent(options);
this.$Container = null;
this.$Next = null;
this.$Previous = null;
this.$Dots = null;
this.$List = null;
this.$Next = null;
this.$Previous = null;
this.$Dots = null;
this.$List = null;
this.$width = 0;
this.$width = 0;
this.$maxScroll = 0;
this.$scrolling = false;
this.$mobile = (QUI.getWindowSize().x <= 768);
this.$mobile = (QUI.getWindowSize().x <= 768);
this.$childrenCount = 0;
this.$childrenCount = 0;
this.$scrollOnMouseMove = false;
this.$orientation = false; // landscape / portrait
this.$orientation = false; // landscape / portrait
this.addEvents({
onImport: this.$onImport,
onImport : this.$onImport,
onDestroy: function () {
QUI.removeEvent('resize', this.$onWindowResize);
}.bind(this)
......@@ -80,10 +80,10 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
this.$width = Elm.getSize().x;
this.$Container = Elm.getElement('.quiqqer-bricks-promoslider-wallpaper-container');
this.$Next = Elm.getElement('.quiqqer-bricks-promoslider-wallpaper-next');
this.$Previous = Elm.getElement('.quiqqer-bricks-promoslider-wallpaper-prev');
this.$Dots = Elm.getElement('.quiqqer-bricks-promoslider-wallpaper-dots');
this.$List = this.$setCurrentSlideList();
this.$Next = Elm.getElement('.quiqqer-bricks-promoslider-wallpaper-next');
this.$Previous = Elm.getElement('.quiqqer-bricks-promoslider-wallpaper-prev');
this.$Dots = Elm.getElement('.quiqqer-bricks-promoslider-wallpaper-dots');
this.$List = this.$setCurrentSlideList();
this.$Scroll = moofx(this.$List, {
duration: 250
......@@ -97,10 +97,10 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
this.$Container.set('tabindex', -1);
// dragable scroll
var startScroll = 0,
var startScroll = 0,
lastScrollLeft = 0,
lastClientX = 0,
musewheelRuns = false;
lastClientX = 0,
musewheelRuns = false;
this.$Container.addEvents({
touchstart: function (event) {
......@@ -122,17 +122,17 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
this.$scrolling = true;
startScroll = event.page.x;
startScroll = event.page.x;
lastScrollLeft = this.$getYPosition() * -1;
var transition = 'all 0s';
this.$List.setStyles({
"-webkit-transition": transition,
"-moz-transition": transition,
"-o-transition": transition,
"-ms-transition": transition,
transition: transition
"-moz-transition" : transition,
"-o-transition" : transition,
"-ms-transition" : transition,
transition : transition
});
this.stop();
......@@ -152,7 +152,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
musewheelRuns = true;
event.stop();
this.$scrollOnMouseMove = false;
this.$scrolling = true;
this.$scrolling = true;
this.stop();
this.next().then(function () {
musewheelRuns = false;
......@@ -164,7 +164,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
event.stop();
this.$scrollOnMouseMove = false;
this.$scrolling = true;
this.$scrolling = true;
this.stop();
this.previous().then(function () {
musewheelRuns = false;
......@@ -175,7 +175,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
keyup: function (event) {
if (event.key === 'left') {
event.stop();
this.$scrolling = true;
this.$scrolling = true;
this.$scrollOnMouseMove = false;
this.previous().then(function () {
......@@ -187,7 +187,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
if (event.key === 'right') {
event.stop();
this.$scrolling = true;
this.$scrolling = true;
this.$scrollOnMouseMove = false;
this.next().then(function () {
......@@ -221,7 +221,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
event.stop();
this.$scrolling = false;
this.$scrolling = false;
this.$scrollOnMouseMove = false;
lastClientX = 0;
......@@ -270,7 +270,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
return;
}
var diff = event.page.x - startScroll;
var diff = event.page.x - startScroll;
var value = Math.round(-lastScrollLeft + diff);
if (Math.abs(diff) < 10) {
......@@ -281,15 +281,15 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
this.$List.setStyles({
"-webkit-transform": transform,
"-moz-transform": transform,
"-o-transform": transform,
"-ms-transform": transform,
transform: transform
"-moz-transform" : transform,
"-o-transform" : transform,
"-ms-transform" : transform,
transform : transform
});
}.bind(this),
mouseup: function (event) {
if (startScroll == event.page.x) {
if (startScroll === event.page.x) {
return;
}
document.body.fireEvent('touchend', [event]);
......@@ -322,7 +322,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
this.$Next.addEvent('click', function (event) {
event.stop();
this.$scrollOnMouseMove = false;
this.$scrolling = true;
this.$scrolling = true;
this.stop();
this.next();
}.bind(this));
......@@ -332,7 +332,7 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
this.$Previous.addEvent('click', function (event) {
event.stop();
this.$scrollOnMouseMove = false;
this.$scrolling = true;
this.$scrolling = true;
this.stop();
this.previous();
}.bind(this));
......@@ -368,10 +368,10 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
var oldMobileStatus = this.$mobile;
this.$width = this.getElm().getSize().x;
this.$width = this.getElm().getSize().x;
this.$mobile = (QUI.getWindowSize().x <= 768);
if (oldMobileStatus != this.$mobile) {
if (oldMobileStatus !== this.$mobile) {
// mobile desktop switched
this.$setCurrentSlideList();
this.$refreshDots();
......@@ -387,10 +387,10 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
* @returns {Promise}
*/
onResize: function () {
var orientation = this.$orientation,
var orientation = this.$orientation,
newOritentation = this.$getOrientation();
if (this.getAttribute('pagefit') && orientation != newOritentation) {
if (this.getAttribute('pagefit') && orientation !== newOritentation) {
var winSize = QUI.getWindowSize();
var pagefit = this.getAttribute('pagefitcut');
......@@ -497,10 +497,10 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
return this.show(this.$childrenCount - 1).then(resolve);
}
var left = this.$getYPosition(),
var left = this.$getYPosition(),
scrollTo = slideNo * this.$width * -1;
if (left == scrollTo) {
if (left === scrollTo) {
this.$scrolling = false;
resolve();
return;
......@@ -520,21 +520,21 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
}
var transduration = Math.round(duration * 10 / 10) / 1000;
var transform = 'translate3d(' + scrollTo + 'px, 0, 0)';
var transition = 'all ' + transduration + 's ease-out 0s';
var transform = 'translate3d(' + scrollTo + 'px, 0, 0)';
var transition = 'all ' + transduration + 's ease-out 0s';
this.$List.setStyles({
"-webkit-transition": transition,
"-moz-transition": transition,
"-o-transition": transition,
"-ms-transition": transition,
transition: transition,
"-moz-transition" : transition,
"-o-transition" : transition,
"-ms-transition" : transition,
transition : transition,
"-webkit-transform": transform,
"-moz-transform": transform,
"-o-transform": transform,
"-ms-transform": transform,
transform: transform
"-moz-transform" : transform,
"-o-transform" : transform,
"-ms-transform" : transform,
transform : transform
});
(function () {
......@@ -550,9 +550,24 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
* shows the correct dot
*/
$checkdotPosition: function () {
var left = this.$List.getBoundingClientRect().left * -1;
var left = 0;
var transform = this.$List.getStyle('transform');
if (transform.match('translate3d')) {
var transValues = transform.replace('translate3d(', '')
.replace(')', '')
.split(',');
left = parseInt(transValues[0].trim().replace('px'));
left = left * -1;
}
var count = Math.round(left / this.$width);
var Dot = this.$Dots.getElement(':nth-child(' + (count + 1) + ')');
var Dot = this.$Dots.getElement(':nth-child(' + (count + 1) + ')');
if (count === -1) {
Dot = this.$Dots.getFirst();
}
if (!Dot || Dot.hasClass('quiqqer-bricks-promoslider-wallpaper-dot-active')) {
return;
......@@ -570,14 +585,14 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
*/
$showSheet: function (slideNo) {
var liCount = parseInt(slideNo) + 1;
var Slide = this.$List.getElement('li:nth-child(' + liCount + ')');
var Slide = this.$List.getElement('li:nth-child(' + liCount + ')');
if (!Slide) {
return;
}
var Background = Slide.getElement('.quiqqer-bricks-promoslider-wallpaper-image');
var display = Background.getStyle('display');
var display = Background.getStyle('display');
if (display !== 'none') {
return;
......@@ -678,9 +693,9 @@ define('package/quiqqer/bricks/bin/Controls/Slider/PromosliderWallpaper', [
for (var i = 0, len = liList.length; i < len; i++) {
new Element('span', {
'class': 'quiqqer-bricks-promoslider-wallpaper-dot',
'class' : 'quiqqer-bricks-promoslider-wallpaper-dot',
'data-index': i,
events: {
events : {
click: dotClick
}
}).inject(this.$Dots);
......
......@@ -969,6 +969,9 @@
<option value="authorTop">
<locale group="quiqqer/bricks" var="brick.listTemplate.authorTop"/>
</option>
<option value="grid3x3">
<locale group="quiqqer/bricks" var="brick.listTemplate.grid3x3"/>
</option>
</setting>
<setting name="max" type="number">
......@@ -1004,6 +1007,11 @@
var="brick.showTime"/>
</setting>
<setting name="showSheets" type="checkbox">
<locale group="quiqqer/bricks"
var="brick.showSheets"/>
</setting>
</settings>
</brick>
......
<!-- @ToDo Seitenliste. Genau wie Seitentyps -->
{$ChildrenList->create()}
\ No newline at end of file
......@@ -59,6 +59,7 @@ public function getBody()
$Control->setAttribute('display', $this->getAttribute('template'));
$Control->setAttribute('limit', $this->getAttribute('max'));
$Control->setAttribute('showShort', $this->getAttribute('showShort'));
$Control->setAttribute('showSheets', $this->getAttribute('showSheets'));
$Control->setAttribute('showImages', $this->getAttribute('showImages'));
$Control->setAttribute('showTime', $this->getAttribute('showTime'));
$Control->setAttribute('showDate', $this->getAttribute('showDate'));
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren