diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c301a3a41..e27ef7fcc 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -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 diff --git a/docs/upgrades/packages-7.7.4/matrix-search-template.wgpkg b/docs/upgrades/packages-7.7.4/matrix-search-template.wgpkg new file mode 100644 index 000000000..1b7176412 Binary files /dev/null and b/docs/upgrades/packages-7.7.4/matrix-search-template.wgpkg differ diff --git a/www/extras/wobject/Matrix/matrixSearch.js b/www/extras/wobject/Matrix/matrixSearch.js index e4d36c871..0e83ae86c 100644 --- a/www/extras/wobject/Matrix/matrixSearch.js +++ b/www/extras/wobject/Matrix/matrixSearch.js @@ -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); + }; });