netflexity
Newbie
Posts: 1
Registered: 5/5/2006
Location: Philadelphia, PA
Member Is Offline
|
| posted on 5/5/2006 at 10:29 AM |
|
|
Advanced Tigra Table PRO (extension)
Below is a script that will help many to programatically interact with Tigra Tables. I simply extended default behaviour of Tigra Table. Enjoy! BTW,
if this is not legal please remove this post.
Thank you.
-Max
// AdvancedTable(), a Tigra Table wrapper
function AdvancedTTable (headers, contents, styles) {
// Inherit methods and properties from TTable()
this.table = new TTable(headers, contents, styles);
// Inherit all properties.
for (sProperty in this.table) {
this[sProperty] = this.table[sProperty];
}
// Function that will check or uncheck all rows.
// If this function gets ivoked after the search, only
// found rows will be selected.
this.exeSelect = function(checkFlag){
for (i in this.TTPa) {
if(this.TTPc){
for (j in this.TTPc) {
if(this.TTPc[j][this.TTPd] == this.TTPa[this.TTPd]){
this.TTPa[this.TTPd + 1] = (checkFlag ? 1 : 0);
break;
}
}
}
else{
this.TTPa[this.TTPd + 1] = (checkFlag ? 1 : 0);
}
}
};
// Function that will retrieve a whole data row by id.
this.exeGetRow = function(rowId){
return this.TTPa[rowId];
};
// Function that retrieves all rows.
this.exeGetRows = function(){
return this.TTPa;
};
// Function that retrieves all selected rows.
this.exeGetSelectedRows = function(){
var j = 0;
var selectedRows = new Array();
for (i in this.TTPa) {
if(this.TTPa[this.TTPd + 1] == 1){
selectedRows[j++] = this.TTPa;
}
}
return selectedRows;
};
}
|
|
|
|