Skip to content

Commit

Permalink
Set title on boundingBox
Browse files Browse the repository at this point in the history
Set htmlType only if defined
  • Loading branch information
juandopazo committed Mar 26, 2012
1 parent be1185c commit 0b0d7e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/form/js/FormField.js
Expand Up @@ -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')
});
Expand All @@ -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') });
},

Expand Down
3 changes: 3 additions & 0 deletions src/form/js/SelectField.js
Expand Up @@ -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
}
}
}, {
Expand Down

0 comments on commit 0b0d7e1

Please sign in to comment.