Add JS files
This commit is contained in:
43
modules/EcmReports/javascript/RaportAktywnosci.js
Normal file
43
modules/EcmReports/javascript/RaportAktywnosci.js
Normal file
@@ -0,0 +1,43 @@
|
||||
$(document).ready(function(){
|
||||
$(".rowShowHide").hide();
|
||||
$(".tablesShowHide").hide();
|
||||
// Listener odpowiadający za akcje po kliknięciu na przycisk "Exportuj do programu Excel"
|
||||
|
||||
$(".showTables").bind("click",function(){
|
||||
if($(this).attr("class")=="plusStyle showTables")
|
||||
{
|
||||
//pobieramy następny wiersz tabeli którą chcemy pokazac po czym go wyswietlamy
|
||||
var nextTBody = $(this).parent().parent().parent().next();
|
||||
while($(nextTBody).attr("id")!="stopTables")
|
||||
{
|
||||
//sprawdzamy czy kategoria
|
||||
if($(nextTBody).attr("class")=="tablesorter-infoOnly tablesShowHide")
|
||||
{
|
||||
$(nextTBody).show();
|
||||
}
|
||||
nextTBody=$(nextTBody).next();
|
||||
}
|
||||
$(this).html("[-]");
|
||||
$(this).attr("class","plusStyle hideTables");
|
||||
}else if($(this).attr("class")=="plusStyle hideTables")
|
||||
{
|
||||
//pobieramy następny wiersz tabeli którą chcemy schowac po czym go chowamy
|
||||
var nextTBody = $(this).parent().parent().parent().next();
|
||||
while($(nextTBody).attr("id")!="stopTables")
|
||||
{
|
||||
//tu chowamy wszystko więc nie sprawdzamy kategori
|
||||
$(nextTBody).hide();
|
||||
var changePlusMinus = $(nextTBody).children().children();
|
||||
if($(changePlusMinus[0]).children("a").attr("class")=="hideRows")
|
||||
{
|
||||
$(changePlusMinus[0]).children("a").attr("class","showRows");
|
||||
$(changePlusMinus[0]).children("a").html("[+]");
|
||||
}
|
||||
nextTBody=$(nextTBody).next();
|
||||
}
|
||||
$(this).html("[+]");
|
||||
$(this).attr("class","plusStyle showTables");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user