%PDF- %PDF-
Direktori : /www/varak.net/wiki.varak.net/vendor/oojs/oojs-ui/demos/classes/ |
Current File : //www/varak.net/wiki.varak.net/vendor/oojs/oojs-ui/demos/classes/DynamicLabelTextInputWidget.js |
Demo.DynamicLabelTextInputWidget = function DemoDynamicLabelTextInputWidget( config ) { // Configuration initialization config = $.extend( { getLabelText: $.noop }, config ); // Parent constructor Demo.DynamicLabelTextInputWidget.parent.call( this, config ); // Properties this.getLabelText = config.getLabelText; // Events this.connect( this, { change: 'onChange' } ); // Initialization this.setLabel( this.getLabelText( this.getValue() ) ); }; OO.inheritClass( Demo.DynamicLabelTextInputWidget, OO.ui.TextInputWidget ); Demo.DynamicLabelTextInputWidget.prototype.onChange = function ( value ) { this.setLabel( this.getLabelText( value ) ); };