Sha256: 6ebe99b48483a2d9d76f0495a39f1a4767674b13ef637a6a79c9a2f59d4899f7

Contents?: true

Size: 613 Bytes

Versions: 5

Compression:

Stored size: 613 Bytes

Contents

define([
	"jquery",
	"ui/component"
],
function( jQuery, Component ) {
	/**
	 * Text component type
	 * @class
	 * @extend {Component}
	 */
	var Text = Component.extend({
		/**
		 * Initializes the text component
		 * @override
		 */
		init: function() {
			this._super();
			this.element = jQuery( "<input>" )
				.bind( "change", jQuery.proxy(function( event ) {
					this.setValue( event.target.value );
				}, this ) );
		},

		// invoked when the user has changed the value
		/**
		 * Sets the value of the text field
		 * @param {string} value
		 */
		setValue: function( value ) {}
	});

	return Text;
});

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
olala-0.0.2 vendor/assets/aloha/plugins/common/ui/lib/text.js
olala-0.0.1 vendor/assets/aloha/plugins/common/ui/lib/text.js
gnuside-aloha-rails-0.23.3 vendor/assets/javascripts/aloha/plugins/common/ui/lib/text.js
locomotive-aloha-rails-0.23.2.2 vendor/assets/javascripts/aloha/plugins/common/ui/lib/text.js
locomotive-aloha-rails-0.23.2.1 vendor/assets/javascripts/aloha/plugins/common/ui/lib/text.js