static.js.ReportLibrary.js Maven / Gradle / Ivy
The newest version!
(function(jq){
jq.fn.jqTreeTable=function(map, options){
var opts = jq.extend({openImg:"",shutImg:"",leafImg:"",lastOpenImg:"",lastShutImg:"",lastLeafImg:"",vertLineImg:"",blankImg:"",collapse:false,column:0,striped:false,highlight:false,state:true},options),
mapa=[],mapb=[],tid=this.attr("id"),collarr=[],
stripe=function(){
//if(opts.striped){
//$("#"+tid+" tr:visible").filter(":even").addClass("even").end().filter(":odd").removeClass("even");
//}
},
buildText = function(parno, preStr){//Recursively build up the text for the images that make it work
var mp=mapa[parno], ro=0, pre="", pref, img;
for (var y=0,yl=mp.length;y';
pref = preStr + '';
arguments.callee(ro, pref);
}else{//it's a childz
img = (y==yl-1)? opts.lastLeafImg: opts.leafImg;//It's the last child, It's child will have a blank field behind it
mapb[ro-1] = preStr + '';
}
}
},
expandKids = function(num, last){//Expands immediate children, and their uncollapsed children
jq("#"+tid+num).attr("src", (last)? opts.lastOpenImg: opts.openImg);//
for (var x=0, xl=mapa[num].length;x=0) {
s+=n.length+2; //c=" treet1=;"
v=(c.substring(s,c.indexOf(';',s))).split("|");
}
return v||0;
},
cset = function (n,v) {
jq.unique(v);
document.cookie = n+"="+v.join("|")+";";
};
for (var x=0,xl=map.length; x tr.method', $table);
$rows.sort(function(a, b) {
var keyA = $('td:eq(1)', a).text();
var keyB = $('td:eq(1)', b).text();
var keyAres = $(a).attr('met');
var keyBres = $(b).attr('met');
if ($($sort).hasClass('asc')) {
return (keyA > keyB) ? 1 : -1;
} else {
if ($($sort).hasClass('desc')) {
return (keyA < keyB) ? 1 : -1;
} else {
return (keyAres > keyBres) ? 1 : -1;
}
}
})
$.each($rows, function(index, row){
var $myrow = $(row);
var $rows2 = $("tbody > tr[met='" + $myrow.attr('met') +"']",$table);
$table.append($rows2);
});
e.preventDefault();
});
});
var sBrowser;
var sVersion;
function setBrowserType(){
var aBrowFull = new Array("opera", "msie", "netscape", "gecko", "mozilla");
var aBrowVers = new Array("opera", "msie", "netscape", "rv", "mozilla" );
var aBrowAbrv = new Array("op", "ie", "ns", "mo", "ns" );
var sInfo = navigator.userAgent.toLowerCase();;
sBrowser = "";
for (var i = 0; i < aBrowFull.length; i++){
if ((sBrowser == "") && (sInfo.indexOf(aBrowFull[i]) != -1)){
sBrowser = aBrowAbrv[i];
sVersion = String(parseFloat(sInfo.substr(sInfo.indexOf(aBrowVers[i]) + aBrowVers[i].length + 1)));
}
}
}
function getBrowserName(){
return sBrowser;
}
function getBrowserVersion(){
return sVersion;
}
var sTableOrigin;
function setSizeTable() {
sTableOrigin = (document.getElementById('tableMain').scrollWidth);
}
function show_hide_all(id_table, do_show, pathScripts) {
var tbl = document.getElementById(id_table);
var rows = tbl.getElementsByTagName('tr');
var imagesRow = null;
var imgOpen = pathScripts + "/static/images/fopen.gif";
var imgShut = pathScripts + "/static/images/fshut.gif";
for (var row=0; rowHide All';
else
document.getElementById('divShow').innerHTML = 'Show All';
}
//JORGE'S MODIFICATION - FIN