Skip to content
Code-Schnipsel Gruppen Projekte
Commit 415c4007 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

feat: Popup -> hideButton and showButton -> animated;

Übergeordneter f11132d1
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -290,7 +290,6 @@ define('qui/controls/desktop/panels/Sheet', [
return new Promise(function (resolve) {
var button_size = this.getButtons().getSize(),
header_size = this.$Header.getSize();
......@@ -305,8 +304,7 @@ define('qui/controls/desktop/panels/Sheet', [
left : 0,
opacity: 1
}, {
duration: 300,
equation: 'ease-out',
duration: 250,
callback: function () {
self.$fxComplete();
......
......@@ -594,7 +594,7 @@ define('qui/controls/windows/Popup', needle, function (QUI,
Elm.inject(this.$Buttons, 'top');
if (typeOf(Elm) != 'element') {
if (typeOf(Elm) !== 'element') {
Node = Elm.getElm();
}
......@@ -614,28 +614,68 @@ define('qui/controls/windows/Popup', needle, function (QUI,
* hide the button line
*
* @method qui/controls/windows/Popup#hideButtons
* @return {Object} qui/controls/windows/Popup
* @return {Promise}
*/
hideButtons: function () {
if (!this.$Buttons) {
return this;
}
var self = this;
return new Promise(function (resolve) {
var buttonHeight = self.$Buttons.getSize().y;
self.$Buttons.setStyle('bottom', 0);
self.$Buttons.setStyle('position', 'absolute');
this.$Buttons.setStyle('display', 'none');
var containerHeight = self.$Title.getSize().y;
self.$Content.setStyle(
'height',
'calc(100% - ' + containerHeight + 'px)'
);
moofx(self.$Buttons).animate({
bottom: buttonHeight * -1
}, {
duration: 200,
callback: function () {
self.$Buttons.setStyle('display', 'none');
resolve();
}
});
});
},
/**
* show the button line
*
* @method qui/controls/windows/Popup#showButtons
* @return {Object} qui/controls/windows/Popup
* @return {Promise}
*/
showButtons: function () {
if (!this.$Buttons) {
return this;
}
var self = this;
return new Promise(function (resolve) {
self.$Buttons.setStyle('display', null);
self.$Buttons.setStyle('display', null);
this.$Buttons.setStyle('display', '');
var containerHeight = self.$Buttons.getSize().y + self.$Title.getSize().y;
moofx(self.$Content).animate({
height: 'calc(100% - ' + containerHeight + 'px)'
}, {
duration: 200,
callback: function () {
self.$Buttons.setStyle('position', 'absolute');
moofx(self.$Buttons).animate({
bottom: 0
}, {
callback: function () {
resolve();
}
});
}
});
});
},
/**
......@@ -650,7 +690,7 @@ define('qui/controls/windows/Popup', needle, function (QUI,
for (var i = 0, len = list.length; i < len; i++) {
Control = QUI.Controls.getById(list[i].get('data-quiid'));
if (Control && Control.getAttribute('name') == name) {
if (Control && Control.getAttribute('name') === name) {
return Control;
}
}
......
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