diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 9c2e7bcab..829f6de64 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -3,6 +3,7 @@ - rfe #9612: Carousel Wobject (was Widget Wobject) (SDH Consulting Group) - Survey summaries now added. In the Survey edit, select quiz mode, and a summary will be shown to the user at the end of the survey. - fixed #10110: Matrix 2.0 - "Data Error" on Pending Product Listing Updates + - rfe #9965: matrix/pls reverse dropped event variables 7.7.2 - fixed #10056: YUI javascripts included while adminOff (BNC) diff --git a/docs/upgrades/packages-7.7.3/matrix-default-compare-template.wgpkg b/docs/upgrades/packages-7.7.3/matrix-default-compare-template.wgpkg new file mode 100644 index 000000000..7cedad39d Binary files /dev/null and b/docs/upgrades/packages-7.7.3/matrix-default-compare-template.wgpkg differ diff --git a/docs/upgrades/packages-7.7.3/matrix-default-view-template.wgpkg b/docs/upgrades/packages-7.7.3/matrix-default-view-template.wgpkg new file mode 100644 index 000000000..695875af5 Binary files /dev/null and b/docs/upgrades/packages-7.7.3/matrix-default-view-template.wgpkg differ diff --git a/lib/WebGUI/i18n/English/Asset_Matrix.pm b/lib/WebGUI/i18n/English/Asset_Matrix.pm index a8b5b5bf9..4386e0412 100644 --- a/lib/WebGUI/i18n/English/Asset_Matrix.pm +++ b/lib/WebGUI/i18n/English/Asset_Matrix.pm @@ -807,6 +807,17 @@ selectBox.
| message => q|Matrix Fieldtype|, }, + 'too many message' => { + lastUpdated => 0, + message => q|You tried to compare more than your maximum number of listings.|, + context => q|A message shown to the user when they have selected too many listings to compare.|, + }, + + 'too few message' => { + lastUpdated => 0, + message => q|You tried to compare only one listing. If you want to view just one listing, click on its name.|, + context => q|A message shown to the user when they have selected only one listing to compare.|, + } }; 1; diff --git a/www/extras/wobject/Matrix/matrix.js b/www/extras/wobject/Matrix/matrix.js index f68cf25a9..200016420 100644 --- a/www/extras/wobject/Matrix/matrix.js +++ b/www/extras/wobject/Matrix/matrix.js @@ -8,7 +8,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; }; @@ -82,7 +82,7 @@ YAHOO.util.Event.addListener(window, "load", function() { this.onDataReturnAppendRows.apply(this,arguments); }; - window.compareFormButton = function() { + var compareFormButton = function() { var compareCheckBoxes = YAHOO.util.Dom.getElementsByClassName('compareCheckBox','input'); var checked = 0; var checkedCompareBoxes = new Object(); @@ -92,12 +92,12 @@ YAHOO.util.Event.addListener(window, "load", function() { checkedCompareBoxes[compareCheckBoxes[i].value] = true; } } - if (checked > 1 && checked < maxComparisons){ - btnCompare.set("disabled",false); - btnCompare2.set("disabled",false); + if (checked < 2){ + alert(tooFewMessage); + }else if (checked > maxComparisons){ + alert(tooManyMessage); }else{ - btnCompare.set("disabled",true); - btnCompare2.set("disabled",true); + window.document.forms['doCompare'].submit(); } var elements = window.compareDataTable.getRecordSet().getRecords(); for(j=0; j