Fix problem with radio widget refreshing

print-window-tiddler
Jermolene 2013-12-16 08:52:18 +00:00
rodzic 65e3780cc1
commit 37a46adac8
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -98,7 +98,7 @@ RadioWidget.prototype.execute = function() {
this.radioField = this.getAttribute("field"); this.radioField = this.getAttribute("field");
this.radioValue = this.getAttribute("value"); this.radioValue = this.getAttribute("value");
this.radioClass = this.getAttribute("class",""); this.radioClass = this.getAttribute("class","");
if (this.radioClass !== "") { if(this.radioClass !== "") {
this.radioClass += " "; this.radioClass += " ";
} }
this.radioClass += "tw-radio"; this.radioClass += "tw-radio";
@ -117,7 +117,7 @@ RadioWidget.prototype.refresh = function(changedTiddlers) {
} else { } else {
var refreshed = false; var refreshed = false;
if(changedTiddlers[this.radioTitle]) { if(changedTiddlers[this.radioTitle]) {
this.inputDomNode.checked = this.getValue(); this.inputDomNode.checked = this.getValue() === this.radioValue;
refreshed = true; refreshed = true;
} }
return this.refreshChildren(changedTiddlers) || refreshed; return this.refreshChildren(changedTiddlers) || refreshed;