From 5f586e3d963be70dc1d3b5f55494f40227e43adf Mon Sep 17 00:00:00 2001
From: Owen Leonard
- Print list + Print list | [% END %] @@ -329,29 +327,12 @@ } } - function print_slip(subscriptionid,issue){ - var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue; - window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes'); - } - - function popup(subscriptionid) { - newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes'); - } - function generateNext(subscriptionid) { if(confirm(_("Do you really want to generate next serial?"))){ document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid; } } - function CheckAll( node ) { - $("#"+node).checkCheckboxes(); - return false; - } - function CheckNone( node ) { - $("#"+node).unCheckCheckboxes(); - return false; - } $(document).ready(function() { $('#subscription_years').tabs(); $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, { @@ -367,6 +348,36 @@ "bFilter": false, } )); + $(".CheckAll").on("click", function(e){ + e.preventDefault(); + var years = $(this).data("year"); + $("#subscription-year-" + years ).checkCheckboxes(); + }); + + $(".CheckNone").on("click", function(e){ + e.preventDefault(); + var years = $(this).data("year"); + $("#subscription-year-" + years ).unCheckCheckboxes(); + }); + + $(".generatenext").on("click", function(e){ + e.preventDefault(); + var subscriptionid = $(this).data("subscriptionid"); + generateNext( subscriptionid ); + }); + + $(".subscription_renew").on("click", function(e){ + e.preventDefault(); + var subscriptionid = $(this).data("subscriptionid"); + popup( subscriptionid ); + }); + + $(".print_list").on("click", function(e){ + e.preventDefault(); + var url = $(this).attr("href"); + window.open( url,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes'); + }); + $('#multi_receiving').on('show', function () { $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML); }); -- 2.39.5