Permalink
Browse files

Set title on boundingBox

Set htmlType only if defined
  • Loading branch information...
1 parent be1185c commit 0b0d7e14adc9ed278f0857cd8a93503b41a7c119 @juandopazo committed Mar 26, 2012
Showing with 9 additions and 3 deletions.
  1. +6 −3 src/form/js/FormField.js
  2. +3 −0 src/form/js/SelectField.js
View
@@ -83,9 +83,12 @@ $.FormField = $.Base.create('formfield', $.Widget, [$.WidgetChild], {
});
},
renderUI: function(boundingBox, contentBox) {
- var btnId = this.get('id') + '_input'
+ var btnId = this.get('id') + '_input';
+ var htmlType = this.get('htmlType');
+ if ($.Lang.isString(htmlType)) {
+ contentBox.attr('type', htmlType);
+ }
contentBox.attr({
- type: this.get('htmlType'),
id: btnId,
value: this.get('value')
});
@@ -98,7 +101,7 @@ $.FormField = $.Base.create('formfield', $.Widget, [$.WidgetChild], {
},
syncUI: function() {
this._syncLabel({ newVal: this.get('label') });
- this._labelNode.attr('title', this.get('title'));
+ this.get('boundingBox').attr('title', this.get('title'));
this._ffDisabledChange({ newVal: this.get('disabled') });
},
@@ -77,6 +77,9 @@ $.SelectField = $.Base.create('select-field', $.FormField, [], {
var selected = this.get('selected');
return selected && (selected.value ? selected.value : selected.text);
}
+ },
+ htmlType: {
+ value: null
}
}
}, {

0 comments on commit 0b0d7e1

Please sign in to comment.