...
 
Commits (3)
......@@ -3,11 +3,6 @@
*
* @module package/quiqqer/gallery/bin/controls/Component
* @author www.pcsg.de (Henning Leutz)
*
* @require qui/QUI
* @require qui/controls/Control
* @require qui/controls/loader/Loader
* @require qui/utils/Math
*/
define('package/quiqqer/gallery/bin/controls/Component', [
......
......@@ -5,7 +5,6 @@
* @module package/quiqqer/gallery/bin/controls/Grid
* @author www.pcsg.de (Henning Leutz)
*/
define('package/quiqqer/gallery/bin/controls/Grid', [
'qui/QUI',
......
......@@ -2,12 +2,9 @@
* Children listing
*
* @module package/quiqqer/gallery/bin/controls/Slider/ImageSlider
*
* @author www.pcsg.de (Henning Leutz)
* @author www.pcsg.de (Michael Danielczok)
*
* @require qui/QUI
* @require qui/controls/Control
* @require qui/utils/Functions
*/
define('package/quiqqer/gallery/bin/controls/ImageSlider', [
......
......@@ -4,13 +4,6 @@
*
* @module package/quiqqer/gallery/bin/controls/Popup
* @author www.pcsg.de (Henning Leutz)
*
* @require qui/QUI
* @require qui/controls/windows/Popup
* @require qui/utils/Math
* @require URL_OPT_DIR + bin/hammerjs/hammer.min.js
* @require text!package/quiqqer/gallery/bin/controls/Popup.html
* @require css!package/quiqqer/gallery/bin/controls/Popup.css
*/
define('package/quiqqer/gallery/bin/controls/Popup', [
......@@ -34,6 +27,7 @@ define('package/quiqqer/gallery/bin/controls/Popup', [
'$onOpen',
'$onClose',
'$keyup',
'$onPopState',
'showNextImage',
'showPrevImage',
......@@ -271,6 +265,7 @@ define('package/quiqqer/gallery/bin/controls/Popup', [
// bind keys
window.addEvent('keyup', this.$keyup);
window.addEvent('popstate', this.$onPopState);
if (!this.__$current) {
this.showFirstImage();
......@@ -327,6 +322,7 @@ define('package/quiqqer/gallery/bin/controls/Popup', [
}
window.removeEvent('keyup', this.$keyup);
window.removeEvent('popstate', this.$onPopState);
},
/**
......@@ -631,6 +627,13 @@ define('package/quiqqer/gallery/bin/controls/Popup', [
if (event.key === 'esc') {
this.close();
}
},
/**
* on popup state
*/
$onPopState: function () {
this.close();
}
});
});
......@@ -4,16 +4,6 @@
* @module package/quiqqer/gallery/bin/controls/Slider
* @author www.pcsg.de (Henning Leutz)
*
* @require qui/QUI
* @require qui/controls/Control
* @require qui/controls/loader/Loader
* @require qui/controls/loader/Progress
* @require qui/utils/Math
* @require qui/utils/Functions
* @require package/quiqqer/gallery/bin/controls/Popup
* @require URL_OPT_DIR + bin/hammerjs/hammer.min.js
* @require css!package/quiqqer/gallery/bin/controls/Slider.css
*
* @event animateOutBegin [self, Element]
* @event animateOutEnd [self, Element]
* @event animateInBegin [self, Element]
......@@ -82,24 +72,24 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
this.Loader = new QUILoader();
this.$Progress = new QUIProgress();
this.$Progress = new QUIProgress();
this.$Container = null;
this.$Next = null;
this.$Prev = null;
this.$Title = null;
this.$List = null;
this.$Next = null;
this.$Prev = null;
this.$Title = null;
this.$List = null;
this.$Previews = null;
this.$Previews = null;
this.$PreviewsContainer = null;
this.$PreviewsSlider = null;
this.$PreviewsFX = null;
this.$PreviewsSlider = null;
this.$PreviewsFX = null;
this.$images = [];
this.$images = [];
this.$current = 0;
// sizes
this.$pcSize = {};
this.$mainSize = {};
this.$pcSize = {};
this.$mainSize = {};
this.$oldResize = {};
this.$autoplayInterval = false;
......@@ -125,7 +115,7 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
$onImport: function () {
var i, len, Entry;
var self = this;
var self = this;
var Template = this.$Elm.getElement('template');
Template = new Element('div', {
......@@ -185,7 +175,7 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
this.$Elm.addClass('quiqqer-gallery-slider');
}
var Header = this.$Elm.getElement('.control-header');
var Header = this.$Elm.getElement('.control-header');
var Content = this.$Elm.getElement('.control-content');
this.$Elm.set({
......@@ -213,11 +203,11 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
this.$Progress.inject(Container);
this.$Container = this.$Elm.getElement('.quiqqer-gallery-slider-content');
this.$Next = this.$Elm.getElement('.quiqqer-gallery-slider-next');
this.$Prev = this.$Elm.getElement('.quiqqer-gallery-slider-prev');
this.$Title = this.$Elm.getElement('.quiqqer-gallery-slider-title');
this.$Controls = this.$Elm.getElement('.quiqqer-gallery-slider-controls');
this.$Previews = this.$Elm.getElement('.quiqqer-gallery-slider-previews');
this.$Next = this.$Elm.getElement('.quiqqer-gallery-slider-next');
this.$Prev = this.$Elm.getElement('.quiqqer-gallery-slider-prev');
this.$Title = this.$Elm.getElement('.quiqqer-gallery-slider-title');
this.$Controls = this.$Elm.getElement('.quiqqer-gallery-slider-controls');
this.$Previews = this.$Elm.getElement('.quiqqer-gallery-slider-previews');
this.$Previews.setStyles({
background: this.getAttribute('preview-background-color'),
......@@ -229,9 +219,9 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
this.$Elm.addClass('quiqqer-gallery-slider-previewOutside');
}
this.$Play = this.$Elm.getElement('.fa-play');
this.$Play = this.$Elm.getElement('.fa-play');
this.$Random = this.$Elm.getElement('.fa-random');
this.$Zoom = this.$Elm.getElement('.fa-search');
this.$Zoom = this.$Elm.getElement('.fa-search');
this.$Controls.setStyle('display', 'none');
......@@ -464,7 +454,7 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
}).then(function () {
self.setText(data.title, data.text);
self.$current = next;
self.$current = next;
self.$__animate = false;
self.$showPreviewImage();
......@@ -526,7 +516,7 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
}).then(function () {
self.setText(data.title, data.text);
self.$current = next;
self.$current = next;
self.$__animate = false;
self.$showPreviewImage();
......@@ -681,7 +671,7 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
*/
setText: function (title, text) {
title = title || '';
text = text || '';
text = text || '';
this.$Title.set(
'html',
......@@ -753,7 +743,7 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
// set width
pc = QUIMath.percent(listSize.x, width);
width = listSize.x;
width = listSize.x;
height = (height * (pc / 100)).round();
// set height?
......@@ -761,7 +751,7 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
pc = QUIMath.percent(listSize.y, height);
height = listSize.y;
width = (width * (pc / 100)).round();
width = (width * (pc / 100)).round();
}
return new Element('img', {
......@@ -1016,7 +1006,7 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
}).inject(self.$PreviewsSlider);
//console.log(Container.getComputedSize());
size = Container.getComputedSize();
size = Container.getComputedSize();
imgSize = Container.getElement('img').getComputedSize();
if (!size.totalWidth) {
......@@ -1024,9 +1014,9 @@ define('package/quiqqer/gallery/bin/controls/Slider', [
}
width = width +
size.totalWidth +
imgSize['padding-left'] +
imgSize['padding-right'];
size.totalWidth +
imgSize['padding-left'] +
imgSize['padding-right'];
width = width + Container.getStyle('marginLeft').toInt();
width = width + Container.getStyle('marginRight').toInt();
......