fixed a matrix search/compare button problem
This commit is contained in:
parent
97759d92a0
commit
8a412312d3
1 changed files with 34 additions and 18 deletions
|
|
@ -45,51 +45,43 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
||||||
this.myDataTable.hideColumn(this.myDataTable.getColumn(4));
|
this.myDataTable.hideColumn(this.myDataTable.getColumn(4));
|
||||||
this.myDataTable.hideColumn(this.myDataTable.getColumn(5));
|
this.myDataTable.hideColumn(this.myDataTable.getColumn(5));
|
||||||
|
|
||||||
|
if(document.getElementById("sortByViews")){
|
||||||
var btnSortByViews = new YAHOO.widget.Button("sortByViews");
|
var btnSortByViews = new YAHOO.widget.Button("sortByViews");
|
||||||
btnSortByViews.on("click", function(e) {
|
btnSortByViews.on("click", function(e) {
|
||||||
this.myDataTable.sortColumn(this.myDataTable.getColumn(2));
|
this.myDataTable.sortColumn(this.myDataTable.getColumn(2));
|
||||||
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=views");
|
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=views");
|
||||||
},this,true);
|
},this,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.getElementById("sortByClicks")){
|
||||||
var btnSortByClicks = new YAHOO.widget.Button("sortByClicks");
|
var btnSortByClicks = new YAHOO.widget.Button("sortByClicks");
|
||||||
btnSortByClicks.on("click", function(e) {
|
btnSortByClicks.on("click", function(e) {
|
||||||
this.myDataTable.sortColumn(this.myDataTable.getColumn(3));
|
this.myDataTable.sortColumn(this.myDataTable.getColumn(3));
|
||||||
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=clicks");
|
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=clicks");
|
||||||
},this,true);
|
},this,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.getElementById("sortByCompares")){
|
||||||
var btnSortByCompares = new YAHOO.widget.Button("sortByCompares");
|
var btnSortByCompares = new YAHOO.widget.Button("sortByCompares");
|
||||||
btnSortByCompares.on("click", function(e) {
|
btnSortByCompares.on("click", function(e) {
|
||||||
this.myDataTable.sortColumn(this.myDataTable.getColumn(4));
|
this.myDataTable.sortColumn(this.myDataTable.getColumn(4));
|
||||||
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=compares");
|
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=compares");
|
||||||
},this,true);
|
},this,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.getElementById("sortByUpdated")){
|
||||||
var btnSortByUpdated = new YAHOO.widget.Button("sortByUpdated");
|
var btnSortByUpdated = new YAHOO.widget.Button("sortByUpdated");
|
||||||
btnSortByUpdated.on("click", function(e) {
|
btnSortByUpdated.on("click", function(e) {
|
||||||
this.myDataTable.sortColumn(this.myDataTable.getColumn(5));
|
this.myDataTable.sortColumn(this.myDataTable.getColumn(5));
|
||||||
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=lastUpdated");
|
var request = YAHOO.util.Connect.asyncRequest('POST', matrixUrl + "?func=setSort;sort=lastUpdated");
|
||||||
},this,true);
|
},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);
|
||||||
};
|
};
|
||||||
|
|
||||||
var btnCompare = new YAHOO.widget.Button("compare",{disabled:true,id:"compareButton"});
|
|
||||||
btnCompare.on("click", function(e) {
|
|
||||||
window.document.forms['doCompare'].submit();
|
|
||||||
},this,true);
|
|
||||||
var btnCompare2 = new YAHOO.widget.Button("compare2",{disabled:true,id:"compareButton2"});
|
|
||||||
btnCompare2.on("click", function(e) {
|
|
||||||
window.document.forms['doCompare'].submit();
|
|
||||||
},this,true);
|
|
||||||
|
|
||||||
var btnSearch = new YAHOO.widget.Button("search");
|
|
||||||
btnSearch.on("click", function(e) {
|
|
||||||
window.location.href = matrixUrl + '?func=search';
|
|
||||||
},this,true);
|
|
||||||
|
|
||||||
window.compareDataTable = this.myDataTable;
|
|
||||||
|
|
||||||
window.compareFormButton = function() {
|
window.compareFormButton = function() {
|
||||||
var compareCheckBoxes = YAHOO.util.Dom.getElementsByClassName('compareCheckBox','input');
|
var compareCheckBoxes = YAHOO.util.Dom.getElementsByClassName('compareCheckBox','input');
|
||||||
var checked = 0;
|
var checked = 0;
|
||||||
|
|
@ -117,6 +109,30 @@ YAHOO.util.Event.addListener(window, "load", function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(document.getElementById("compare")){
|
||||||
|
var btnCompare = new YAHOO.widget.Button("compare",{disabled:true,id:"compareButton"});
|
||||||
|
btnCompare.on("click", function(e) {
|
||||||
|
window.document.forms['doCompare'].submit();
|
||||||
|
},this,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.getElementById("compare2")){
|
||||||
|
var btnCompare2 = new YAHOO.widget.Button("compare2",{disabled:true,id:"compareButton2"});
|
||||||
|
btnCompare2.on("click", function(e) {
|
||||||
|
window.document.forms['doCompare'].submit();
|
||||||
|
},this,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.getElementById("search")){
|
||||||
|
var btnSearch = new YAHOO.widget.Button("search");
|
||||||
|
btnSearch.on("click", function(e) {
|
||||||
|
window.location.href = matrixUrl + '?func=search';
|
||||||
|
},this,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
window.compareDataTable = this.myDataTable;
|
||||||
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue