[Common] RadioBox: change caption
This commit is contained in:
parent
dfc21b5e2e
commit
f8da0fb273
|
@ -71,7 +71,7 @@ define([
|
||||||
disabled : false,
|
disabled : false,
|
||||||
rendered : false,
|
rendered : false,
|
||||||
|
|
||||||
template : _.template('<label class="radiobox"><input type="button" name="<%= name %>" class="img-commonctrl"><%= labelText %></label>'),
|
template : _.template('<label class="radiobox"><input type="button" name="<%= name %>" class="img-commonctrl"><span><%= labelText %></span></label>'),
|
||||||
|
|
||||||
initialize : function(options) {
|
initialize : function(options) {
|
||||||
Common.UI.BaseView.prototype.initialize.call(this, options);
|
Common.UI.BaseView.prototype.initialize.call(this, options);
|
||||||
|
@ -101,6 +101,7 @@ define([
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.$radio = el.find('input[type=button]');
|
this.$radio = el.find('input[type=button]');
|
||||||
|
this.$label = el.find('label');
|
||||||
this.rendered = true;
|
this.rendered = true;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -145,6 +146,10 @@ define([
|
||||||
|
|
||||||
getValue: function() {
|
getValue: function() {
|
||||||
return this.$radio.hasClass('checked');
|
return this.$radio.hasClass('checked');
|
||||||
|
},
|
||||||
|
|
||||||
|
setCaption: function(text) {
|
||||||
|
this.$label.find('span').text(text);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
Loading…
Reference in a new issue