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

feat: added load event to qui/controls/buttons/Switch

Übergeordneter bf9b2ebb
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
...@@ -2,18 +2,15 @@ ...@@ -2,18 +2,15 @@
* QUI Control - On / Off Slide Button * QUI Control - On / Off Slide Button
* *
* @module qui/controls/buttons/Switch * @module qui/controls/buttons/Switch
* @author www.pcsg.de ( Michael Danielczok ) * @author www.pcsg.de (Michael Danielczok)
* @author www.pcsg.de ( Henning Leutz ) * @author www.pcsg.de (Henning Leutz)
*
* @require qui/controls/Control
* @require css!qui/controls/buttons/Switch.css
* *
* @event onCreate * @event onCreate
* @event onStatusOff * @event onStatusOff
* @event onStatusOn * @event onStatusOn
* @event onChange * @event onChange
* @event onLoad
*/ */
define('qui/controls/buttons/Switch', [ define('qui/controls/buttons/Switch', [
'qui/controls/Control', 'qui/controls/Control',
...@@ -101,15 +98,15 @@ define('qui/controls/buttons/Switch', [ ...@@ -101,15 +98,15 @@ define('qui/controls/buttons/Switch', [
this.$Elm = new Element('div', { this.$Elm = new Element('div', {
'class' : 'qui-switch', 'class' : 'qui-switch',
html : '<div class="qui-switch-off">' + html : '<div class="qui-switch-off">' +
'<div class="qui-switch-icon-off"></div>' + '<div class="qui-switch-icon-off"></div>' +
'<div class="qui-switch-text-off"></div>' + '<div class="qui-switch-text-off"></div>' +
'</div>' + '</div>' +
'<div class="qui-switch-on">' + '<div class="qui-switch-on">' +
'<div class="qui-switch-icon-on"></div>' + '<div class="qui-switch-icon-on"></div>' +
'<div class="qui-switch-text-on"></div>' + '<div class="qui-switch-text-on"></div>' +
'</div>' + '</div>' +
'<div class="qui-switch-button"></div>' + '<div class="qui-switch-button"></div>' +
'<input type="hidden" />', '<input type="hidden" />',
styles : { styles : {
background: this.$activeColor, background: this.$activeColor,
opacity : 0 opacity : 0
...@@ -187,6 +184,8 @@ define('qui/controls/buttons/Switch', [ ...@@ -187,6 +184,8 @@ define('qui/controls/buttons/Switch', [
if (wasDisabled) { if (wasDisabled) {
this.disable(); this.disable();
} }
this.fireEvent('load', [this]);
}.bind(this); }.bind(this);
this.enable(); this.enable();
......
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