fixed #10142: Matrix 2.0 - Search screen compare button not functional

This commit is contained in:
Yung Han Khoe 2009-04-10 20:04:18 +00:00
parent 234914c3e2
commit 4086723a70
3 changed files with 10 additions and 10 deletions

View file

@ -1,6 +1,7 @@
7.7.4
- Default Survey Question bundles now store full answer information in json. Everything configured in an answer will be saved in a default configuration.
- Survey [[question variable]] now returns the shown answer text for multiple choice questions, and the recorded value for non-multiple choice questions.
- fixed #10142: Matrix 2.0 - Search screen compare button not functional
7.7.3
- fixed #10094: double explanation in thread help

View file

@ -10,7 +10,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
if(typeof(oRecord.getData("checked")) != 'undefined' && oRecord.getData("checked") == 'checked'){
innerHTML = innerHTML + " checked='checked'";
}
innerHTML = innerHTML + " onchange='javascript:compareFormButton()' class='compareCheckBox'>";
innerHTML = innerHTML + " class='compareCheckBox'>";
elCell.innerHTML = innerHTML;
};
@ -72,12 +72,8 @@ YAHOO.util.Event.addListener(window, "load", function() {
attributeSelects[i].onchange = reloadCompareForm;
}
var btnCompare = new YAHOO.widget.Button("compare",{disabled:true,id:"compareButton"});
var btnCompare = new YAHOO.widget.Button("compare",{id:"compareButton"});
btnCompare.on("click", function(e) {
window.document.forms['doCompare'].submit();
},this,true);
window.compareFormButton = function() {
var compareCheckBoxes = YAHOO.util.Dom.getElementsByClassName('compareCheckBox','input');
var checked = 0;
for (var i = compareCheckBoxes.length; i--; ) {
@ -85,12 +81,15 @@ YAHOO.util.Event.addListener(window, "load", function() {
checked++;
}
}
if (checked > 1 && checked < maxComparisons){
btnCompare.set("disabled",false);
if (checked < 2){
alert(tooFewMessage);
}else if (checked > maxComparisons){
alert(tooManyMessage);
}else{
btnCompare.set("disabled",true);
window.document.forms['doCompare'].submit();
}
}
},this,true);
};
});