Skip to content
Code-Schnipsel Gruppen Projekte
Commit 4a5678bc erstellt von Jan Wennrich's avatar Jan Wennrich
Dateien durchsuchen

refactor: MobileSlidesSetting-Switch now makes use of QUISwitch's new load-event (#88)

Übergeordneter 81ce071f
No related branches found
No related tags found
1 Merge Request!5Feat only desktop slides by default
......@@ -46,19 +46,16 @@ define('package/quiqqer/bricks/bin/Controls/Slider/ToggleMobileSlidesSetting', [
this.$Switch = new QUISwitch({
status: this.getElm().value === "true",
events: {
onChange: this.$switchToggled
onChange: this.$switchToggled,
onLoad: function() {
if (!this.$Switch.getStatus()) {
this.hideMobileSlidesSetting();
}
}.bind(this)
}
}).inject(Wrapper);
Wrapper.wraps(this.getElm());
if (!this.$Switch.getStatus()) {
// Wait for the MobileSlides-control to be loaded before it can be hidden
// TODO: Maybe there is a better way than setTimeout()?
setTimeout(function() {
this.hideMobileSlidesSetting();
}.bind(this), 200);
}
},
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren