added alphanumeric sort button to Matrix defaul view
This commit is contained in:
parent
4c7e1b4cfd
commit
a2540ddbfd
5 changed files with 13 additions and 1 deletions
|
|
@ -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.
|
- 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 #10142: Matrix 2.0 - Search screen compare button not functional
|
||||||
- fixed #10141: Matrix 2.0 - Search does not check matching products
|
- 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
|
7.7.3
|
||||||
- fixed #10094: double explanation in thread help
|
- fixed #10094: double explanation in thread help
|
||||||
|
|
|
||||||
BIN
docs/upgrades/packages-7.7.4/matrix-default-view-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.4/matrix-default-view-template.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.7.4/new-matrix_matrix.css.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.4/new-matrix_matrix.css.wgpkg
Normal file
Binary file not shown.
|
|
@ -567,6 +567,8 @@ sub view {
|
||||||
$varStatistics = JSON->new->decode($varStatisticsEncoded);
|
$varStatistics = JSON->new->decode($varStatisticsEncoded);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
$varStatistics->{alphanumeric_sortButton} = "<span id='sortByName'><button type='button'>Sort by name</button></span><br />";
|
||||||
|
|
||||||
# Get the MatrixListing with the most views as an object using getLineage.
|
# Get the MatrixListing with the most views as an object using getLineage.
|
||||||
my ($bestViews_listing) = @{ $self->getLineage(['descendants'], {
|
my ($bestViews_listing) = @{ $self->getLineage(['descendants'], {
|
||||||
includeOnlyClasses => ['WebGUI::Asset::MatrixListing'],
|
includeOnlyClasses => ['WebGUI::Asset::MatrixListing'],
|
||||||
|
|
@ -629,7 +631,7 @@ sub view {
|
||||||
lastUpdated => $self->session->datetime->epochToHuman($lastUpdatedListing->get('lastUpdated'),"%z")
|
lastUpdated => $self->session->datetime->epochToHuman($lastUpdatedListing->get('lastUpdated'),"%z")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$var->{lastUpdated_sortButton} = "<span id='sortByUpdated'><button type='button'>Sort by updated</button></span><br />";
|
$varStatistics->{lastUpdated_sortButton} = "<span id='sortByUpdated'><button type='button'>Sort by updated</button></span><br />";
|
||||||
|
|
||||||
# For each category, get the MatrixListings with the best ratings.
|
# For each category, get the MatrixListings with the best ratings.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,15 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
||||||
},this,true);
|
},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() {
|
var myCallback = function() {
|
||||||
this.set("sortedBy", null);
|
this.set("sortedBy", null);
|
||||||
this.onDataReturnAppendRows.apply(this,arguments);
|
this.onDataReturnAppendRows.apply(this,arguments);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue