diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt
index 0d40b782c..b9413437e 100644
--- a/docs/changelog/7.x.x.txt
+++ b/docs/changelog/7.x.x.txt
@@ -5,6 +5,7 @@
- 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
- fixed #10141: Matrix 2.0 - Search does not check matching products
+ - fixed #10077: after matrix sort can't return to alphanumeric sort
7.7.3
- fixed #10094: double explanation in thread help
diff --git a/docs/upgrades/packages-7.7.4/matrix-default-view-template.wgpkg b/docs/upgrades/packages-7.7.4/matrix-default-view-template.wgpkg
new file mode 100644
index 000000000..a14d224e6
Binary files /dev/null and b/docs/upgrades/packages-7.7.4/matrix-default-view-template.wgpkg differ
diff --git a/docs/upgrades/packages-7.7.4/new-matrix_matrix.css.wgpkg b/docs/upgrades/packages-7.7.4/new-matrix_matrix.css.wgpkg
new file mode 100644
index 000000000..4bc8beccf
Binary files /dev/null and b/docs/upgrades/packages-7.7.4/new-matrix_matrix.css.wgpkg differ
diff --git a/lib/WebGUI/Asset/Wobject/Matrix.pm b/lib/WebGUI/Asset/Wobject/Matrix.pm
index ab94c7fed..99d66dc60 100644
--- a/lib/WebGUI/Asset/Wobject/Matrix.pm
+++ b/lib/WebGUI/Asset/Wobject/Matrix.pm
@@ -567,6 +567,8 @@ sub view {
$varStatistics = JSON->new->decode($varStatisticsEncoded);
}
else{
+ $varStatistics->{alphanumeric_sortButton} = "
";
+
# Get the MatrixListing with the most views as an object using getLineage.
my ($bestViews_listing) = @{ $self->getLineage(['descendants'], {
includeOnlyClasses => ['WebGUI::Asset::MatrixListing'],
@@ -629,7 +631,7 @@ sub view {
lastUpdated => $self->session->datetime->epochToHuman($lastUpdatedListing->get('lastUpdated'),"%z")
});
}
- $var->{lastUpdated_sortButton} = "
";
+ $varStatistics->{lastUpdated_sortButton} = "
";
# For each category, get the MatrixListings with the best ratings.
diff --git a/www/extras/wobject/Matrix/matrix.js b/www/extras/wobject/Matrix/matrix.js
index 200016420..464742f2c 100644
--- a/www/extras/wobject/Matrix/matrix.js
+++ b/www/extras/wobject/Matrix/matrix.js
@@ -77,6 +77,15 @@ YAHOO.util.Event.addListener(window, "load", function() {
},this,true);
}
+ if(document.getElementById("sortByName")){
+ var btnSortByName = new YAHOO.widget.Button("sortByName");
+ btnSortByName.on("click", function(e) {
+ this.myDataTable.sortColumn(this.myDataTable.getColumn(1));
+ var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=lastUpdated");
+ },this,true);
+ }
+
+
var myCallback = function() {
this.set("sortedBy", null);
this.onDataReturnAppendRows.apply(this,arguments);