... | ... | @@ -30,8 +30,6 @@ D.h. besitzt ein Element die Eigenschaften *data-qui* versucht QUI das darin def |
|
|
|
|
|
QUI bindet das Control auf zwei verschiedene Wege ein, ist der Inhalt des HTML Elementes leer wird ein *inject* ausgeführt, ist der Inhalt nicht leer wird ein *import* ausgeführt.
|
|
|
|
|
|
Das JavaScript Control kann auf diese zwei Methoden über Events reagieren. *onInject* und *onImport.*
|
|
|
|
|
|
|
|
|
```html
|
|
|
<!-- inject -->
|
... | ... | @@ -44,6 +42,46 @@ Das JavaScript Control kann auf diese zwei Methoden über Events reagieren. *onI |
|
|
</div>
|
|
|
```
|
|
|
|
|
|
Das JavaScript Control kann auf diese zwei Methoden über Events reagieren. *onInject*, *onImport* oder *onCreate*.
|
|
|
|
|
|
```javascript
|
|
|
|
|
|
// onInject beispiel
|
|
|
|
|
|
define([ 'qui/controls/Control' ], function(QUIControl)
|
|
|
{
|
|
|
"use strict";
|
|
|
|
|
|
return new Class({
|
|
|
Extends : QUIControl,
|
|
|
Type : 'packages/path/to/Control',
|
|
|
|
|
|
Binds : [
|
|
|
'$onInject'
|
|
|
],
|
|
|
|
|
|
initialize : function(options)
|
|
|
{
|
|
|
this.parent( options );
|
|
|
|
|
|
this.addEvents({
|
|
|
onInject : this.$onInject
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* event : on inject
|
|
|
*/
|
|
|
$onInject : function()
|
|
|
{
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
## Aufruf über Smarty
|
|
|
|
... | ... | |