mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-27 09:47:20 +08:00
[Common] RadioBox: change caption
This commit is contained in:
@ -71,7 +71,7 @@ define([
|
||||
disabled : 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) {
|
||||
Common.UI.BaseView.prototype.initialize.call(this, options);
|
||||
@ -101,6 +101,7 @@ define([
|
||||
}));
|
||||
|
||||
this.$radio = el.find('input[type=button]');
|
||||
this.$label = el.find('label');
|
||||
this.rendered = true;
|
||||
|
||||
return this;
|
||||
@ -145,6 +146,10 @@ define([
|
||||
|
||||
getValue: function() {
|
||||
return this.$radio.hasClass('checked');
|
||||
},
|
||||
|
||||
setCaption: function(text) {
|
||||
this.$label.find('span').text(text);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user