added alphanumeric sort button to Matrix defaul view

This commit is contained in:
Yung Han Khoe 2009-04-12 21:06:12 +00:00
parent 4c7e1b4cfd
commit a2540ddbfd
5 changed files with 13 additions and 1 deletions

View file

@ -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);