Add JS files
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
$(document).ready(function(){
|
||||
// call the tablesorter plugin
|
||||
$("#MainTable").tablesorter({
|
||||
theme: 'blue',
|
||||
// initialize zebra striping of the table
|
||||
widgets: ['zebra','staticRow'],
|
||||
// change the default striping class names
|
||||
// updated in v2.1 to use widgetOptions.zebra = ["even", "odd"]
|
||||
// widgetZebra: { css: [ "normal-row", "alt-row" ] } still works
|
||||
widgetOptions : {
|
||||
zebra : [ "normal-row", "alt-row" ]
|
||||
},
|
||||
headers: {
|
||||
// disable sorting of the first & second column - before we would have to had made two entries
|
||||
// note that "first-name" is a class on the span INSIDE the first column th cell
|
||||
'.tiggers' : {
|
||||
// disable it by setting the property sorter to false
|
||||
sorter: false
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var ShowHideDocDetails = function(prod_id) {
|
||||
if ($('.doc_'+prod_id).css('display') == 'none') {
|
||||
$('.doc_'+prod_id).show('slow');
|
||||
$('#doc_trigger_'+prod_id).attr('src', 'modules/EcmReports/mz_tpl/img/up.png');
|
||||
} else {
|
||||
$('.doc_'+prod_id).hide('slow');
|
||||
$('#doc_trigger_'+prod_id).attr('src', 'modules/EcmReports/mz_tpl/img/down.png');
|
||||
}
|
||||
}
|
||||
|
||||
var ShowHideDetails = function() {
|
||||
$.blockUI({ css: {
|
||||
border: 'none',
|
||||
padding: '15px',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius': '10px',
|
||||
'-moz-border-radius': '10px',
|
||||
opacity: .5,
|
||||
'font-weight': 'bold',
|
||||
'font-size': '16px',
|
||||
color: '#fff',
|
||||
},
|
||||
message: "Proszę czekać..."
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
if ($('#MainTable td:nth-child(4)').css('display') == 'none') {
|
||||
for (i=4; i<($("#MainTable").find("th").length-2); i++) {
|
||||
$('#MainTable td:nth-child('+i+')').show('slow');
|
||||
$('#MainTable th:nth-child('+i+')').show('slow');
|
||||
}
|
||||
$('#details_trigger').attr('src', 'modules/EcmReports/mz_tpl/img/left.png');
|
||||
} else {
|
||||
for (i=4; i<($("#MainTable").find("th").length-2); i++) {
|
||||
$('#MainTable td:nth-child('+i+')').hide('slow');
|
||||
$('#MainTable th:nth-child('+i+')').hide('slow');
|
||||
}
|
||||
$('#details_trigger').attr('src', 'modules/EcmReports/mz_tpl/img/right.png');
|
||||
}
|
||||
$.unblockUI();
|
||||
}, 200);
|
||||
}
|
||||
Reference in New Issue
Block a user