. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 94.23.64.18 / Your IP :
216.73.216.185 [
Web Server : Apache System : Linux webm005.cluster107.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : villadal ( 6036) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/villadal/www/old/booked/Web/scripts/reports/ |
Upload File : |
function CannedReports(reportOptions) {
var opts = reportOptions;
var elements = {
indicator:$('#indicator'),
resultsDiv:$('#resultsDiv')
};
this.init = function () {
wireUpReportLinks();
$(document).on('click', '#btnPrint',function (e) {
e.preventDefault();
var url = opts.printUrl + reportId;
window.open(url);
});
$(document).on('click', '#btnCsv', function (e) {
e.preventDefault();
var url = opts.csvUrl + reportId;
window.open(url);
});
$(document).on('click', '#btnChart', function(e) {
e.preventDefault();
var chart = new Chart();
chart.generate();
$('#report-results').hide();
});
$('.cancel').click(function (e) {
e.preventDefault();
$(this).closest('.dialog').dialog('close');
});
// elements.sendEmailButton.click(function (e) {
// e.preventDefault();
// var before = function () {
// elements.sendEmailButton.hide();
// elements.emailIndicator.show()
// };
// var after = function (data) {
// $('#emailSent').show().delay(3000).fadeOut(1000);
// elements.emailIndicator.hide();
// elements.sendEmailButton.show();
// $('#emailDiv').dialog('close');
// };
//
// ajaxPost(elements.emailForm, opts.emailUrl + reportId, before, after);
// });
};
var wireUpReportLinks = function () {
$('#report-list a.report').click(function (e) {
e.preventDefault();
reportId = $(this).attr('reportId');
});
$('.runNow').click(function (e) {
var before = function () {
elements.indicator.show().insertBefore(elements.resultsDiv);
elements.resultsDiv.html('');
};
var after = function (data) {
elements.indicator.hide();
elements.resultsDiv.html(data)
};
ajaxGet(opts.generateUrl + reportId, before, after);
});
$('.emailNow').click(function (e) {
$('#emailDiv').dialog({modal:true});
});
};
}