2014-09-04 04:14:36 +00:00
|
|
|
/* globals Gui, Polymer */
|
2014-09-08 01:27:32 +00:00
|
|
|
|
2014-09-04 04:14:36 +00:00
|
|
|
|
2014-09-08 01:31:51 +00:00
|
|
|
Gui.register( 'controller-string', function( value ) {
|
2014-08-27 00:01:15 +00:00
|
|
|
|
2014-09-08 01:31:51 +00:00
|
|
|
return typeof value == 'string';
|
2014-08-27 00:01:15 +00:00
|
|
|
|
2014-09-08 01:31:51 +00:00
|
|
|
} );
|
2014-08-27 00:01:15 +00:00
|
|
|
|
2014-09-08 01:31:51 +00:00
|
|
|
Polymer( 'controller-string', {
|
2014-08-27 00:01:15 +00:00
|
|
|
|
2014-09-08 01:31:51 +00:00
|
|
|
click: function( e ) {
|
2014-09-03 16:52:28 +00:00
|
|
|
|
2014-09-08 01:31:51 +00:00
|
|
|
this.$.input.select();
|
2014-09-03 16:52:28 +00:00
|
|
|
|
2014-09-08 01:31:51 +00:00
|
|
|
},
|
2014-09-03 16:52:28 +00:00
|
|
|
|
2014-09-08 01:31:51 +00:00
|
|
|
keydown: function( e ) {
|
2014-09-03 16:52:28 +00:00
|
|
|
|
2014-09-08 01:31:51 +00:00
|
|
|
if ( e.keyCode == 13 ) {
|
|
|
|
|
|
|
|
this.$.input.blur();
|
|
|
|
|
|
|
|
}
|
2014-09-03 23:33:28 +00:00
|
|
|
|
2014-09-08 01:31:51 +00:00
|
|
|
}
|
2014-09-03 23:33:28 +00:00
|
|
|
|
2014-09-08 01:31:51 +00:00
|
|
|
} );
|