Bugzilla – Attachment 69481 Details for
Bug 19700
Move template JavaScript to the footer: Some circulation pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19700: Move template JavaScript to the footer: Some circulation pages
Bug-19700-Move-template-JavaScript-to-the-footer-S.patch (text/plain), 57.16 KB, created by
Owen Leonard
on 2017-12-04 16:14:02 UTC
(
hide
)
Description:
Bug 19700: Move template JavaScript to the footer: Some circulation pages
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2017-12-04 16:14:02 UTC
Size:
57.16 KB
patch
obsolete
>From e9a8ba2dce4f9266258daef9478a18c9e4cf659f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 27 Nov 2017 15:15:06 +0000 >Subject: [PATCH] Bug 19700: Move template JavaScript to the footer: Some > circulation pages > >This patch modifies some staff client circulation templates so that >JavaScript is included in the footer instead of the header. > >To test, apply the patch and test the JavaScript-driven features of the >modified templates: All button controls, DataTables functionality, tabs, >etc. > >- Article requests (enable ArticleRequests system preference, have at > least one outstanding article request) > - Request article (Bibliographic detail page -> Request article). >- Item circulation statistics (Bibliographic detail page -> Items -> > View item's checkout history). >- On-site checkouts (enable OnSiteCheckouts system preference; Check out > some items as on-site checkouts; Go to Circulation -> > Pending on-site checkouts >- Overdues report (Circulation -> Overdues). >- Holds to pull (Circulation -> Holds to pull). >- Renew >- Holds ratios (Circulation -> Holds ratios). >- Check in >- Transfers to receive (Circulation -> Transfers to receive). >- Holds queue (Circulation -> Holds queue). >- Holds awaiting pickup (Circulation -> Holds awaiting pickup). >--- > .../prog/en/modules/circ/article-requests.tt | 191 ++++++++-------- > .../prog/en/modules/circ/bookcount.tt | 16 +- > .../en/modules/circ/circulation_batch_checkouts.tt | 48 ++-- > .../prog/en/modules/circ/on-site_checkouts.tt | 52 +++-- > .../intranet-tmpl/prog/en/modules/circ/overdue.tt | 140 ++++++------ > .../prog/en/modules/circ/pendingreserves.tt | 131 +++++------ > .../intranet-tmpl/prog/en/modules/circ/renew.tt | 24 +- > .../prog/en/modules/circ/request-article.tt | 171 +++++++------- > .../prog/en/modules/circ/reserveratios.tt | 50 ++-- > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 252 +++++++++++---------- > .../prog/en/modules/circ/transferstoreceive.tt | 40 ++-- > .../prog/en/modules/circ/view_holdsqueue.tt | 71 +++--- > .../prog/en/modules/circ/waitingreserves.tt | 38 ++-- > 13 files changed, 633 insertions(+), 591 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >index b695dc6..eefc912 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >@@ -2,7 +2,7 @@ > [% USE ItemTypes %] > [% USE Branches %] > [% USE AuthorisedValues %] >- >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Article requests</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -13,99 +13,6 @@ > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] > >- <script type="text/javascript">//<![CDATA[ >- $(document).ready(function() { >- $('#article-request-tabs').tabs(); >- >- [% IF article_requests_pending.count %] >- $(".ar-pending-none").hide(); >- [% END %] >- >- [% IF article_requests_processing.count %] >- $(".ar-processing-none").hide(); >- [% END %] >- }); >- >- function PrintSlip(link) { >- window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); >- } >- >- function Cancel( id, a ) { >- notes = prompt(_("Reason for cancellation:")); >- if ( notes == null ) { >- return; >- } >- >- a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>'); >- a.closest('div').hide(); >- $.ajax({ >- type: "POST", >- url: '/cgi-bin/koha/svc/article_request', >- data: { >- action: 'cancel', >- id: id, >- notes: notes >- }, >- success: function( data ) { >- a.closest('tr').remove(); >- UpdateTabCounts() >- }, >- dataType: 'json' >- }); >- } >- >- function Process( id, a ) { >- var table_row = a.closest('tr').clone(); >- table_row.find('.ar-process-request').remove(); >- >- a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>'); >- a.closest('div').hide(); >- $.ajax({ >- type: "POST", >- url: '/cgi-bin/koha/svc/article_request', >- data: { >- action: 'process', >- id: id, >- }, >- success: function( data ) { >- a.closest('tr').remove(); >- $("#article-requests-processing-table").append( table_row ); >- $("#article-requests-processing-table .ar-processing-none").hide(); >- UpdateTabCounts() >- }, >- dataType: 'json' >- }); >- } >- >- function Complete( id, a ) { >- a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>'); >- a.closest('div').hide(); >- $.ajax({ >- type: "POST", >- url: '/cgi-bin/koha/svc/article_request', >- data: { >- action: 'complete', >- id: id, >- }, >- success: function( data ) { >- a.closest('tr').remove(); >- UpdateTabCounts() >- }, >- dataType: 'json' >- }); >- } >- >- function UpdateTabCounts() { >- var pending_count = $('#article-requests-pending-table tbody tr.ar-row').length; >- $("#ar_pending_count").html( pending_count ); >- if ( pending_count == 0 ) $(".ar-pending-none").show(); >- >- var processing_count = $('#article-requests-processing-table tbody tr.ar-row').length; >- $("#ar_processing_count").html( processing_count ); >- if ( processing_count == 0 ) $(".ar-processing-none").show(); >- } >- //]]></script> >- > <div id="breadcrumbs"> > <a href="/cgi-bin/koha/mainpage.pl">Home</a> > › >@@ -406,4 +313,100 @@ > </div> > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ $('#article-request-tabs').tabs(); >+ >+ [% IF article_requests_pending.count %] >+ $(".ar-pending-none").hide(); >+ [% END %] >+ >+ [% IF article_requests_processing.count %] >+ $(".ar-processing-none").hide(); >+ [% END %] >+ }); >+ >+ function PrintSlip(link) { >+ window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); >+ } >+ >+ function Cancel( id, a ) { >+ notes = prompt(_("Reason for cancellation:")); >+ if ( notes == null ) { >+ return; >+ } >+ >+ a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>'); >+ a.closest('div').hide(); >+ $.ajax({ >+ type: "POST", >+ url: '/cgi-bin/koha/svc/article_request', >+ data: { >+ action: 'cancel', >+ id: id, >+ notes: notes >+ }, >+ success: function( data ) { >+ a.closest('tr').remove(); >+ UpdateTabCounts() >+ }, >+ dataType: 'json' >+ }); >+ } >+ >+ function Process( id, a ) { >+ var table_row = a.closest('tr').clone(); >+ table_row.find('.ar-process-request').remove(); >+ >+ a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>'); >+ a.closest('div').hide(); >+ $.ajax({ >+ type: "POST", >+ url: '/cgi-bin/koha/svc/article_request', >+ data: { >+ action: 'process', >+ id: id, >+ }, >+ success: function( data ) { >+ a.closest('tr').remove(); >+ $("#article-requests-processing-table").append( table_row ); >+ $("#article-requests-processing-table .ar-processing-none").hide(); >+ UpdateTabCounts() >+ }, >+ dataType: 'json' >+ }); >+ } >+ >+ function Complete( id, a ) { >+ a.closest('td').prepend('<img src="[% interface %]/[% theme %]/img/spinner-small.gif"/>'); >+ a.closest('div').hide(); >+ $.ajax({ >+ type: "POST", >+ url: '/cgi-bin/koha/svc/article_request', >+ data: { >+ action: 'complete', >+ id: id, >+ }, >+ success: function( data ) { >+ a.closest('tr').remove(); >+ UpdateTabCounts() >+ }, >+ dataType: 'json' >+ }); >+ } >+ >+ function UpdateTabCounts() { >+ var pending_count = $('#article-requests-pending-table tbody tr.ar-row').length; >+ $("#ar_pending_count").html( pending_count ); >+ if ( pending_count == 0 ) $(".ar-pending-none").show(); >+ >+ var processing_count = $('#article-requests-processing-table tbody tr.ar-row').length; >+ $("#ar_processing_count").html( processing_count ); >+ if ( processing_count == 0 ) $(".ar-processing-none").show(); >+ } >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt >index 9257027..2211a98 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt >@@ -1,14 +1,11 @@ > [% USE KohaDates %] > [% USE Branches %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Circulation statistics for [% title |html %]</title> > [% INCLUDE 'doc-head-close.inc' %] >-<script type="text/javascript"> >-$(document).ready(function(){ >- $("tr.mybranch td").css("background-color", "#CFE7FF"); >-}); >-</script> > </head> >+ > <body id="circ_bookcount" class="circ"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'circ-search.inc' %] >@@ -63,4 +60,13 @@ $(document).ready(function(){ > [% INCLUDE 'biblio-view-menu.inc' %] > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript"> >+ $(document).ready(function(){ >+ $("tr.mybranch td").css("background-color", "#CFE7FF"); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >index 1fc917f..5975117 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >@@ -2,6 +2,7 @@ > [% USE KohaDates %] > [% USE Price %] > [% USE AuthorisedValues %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > [% SET destination = "circ" %] > <title>Koha › Circulation >@@ -10,30 +11,9 @@ > [% END %] > </title> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'calendar.inc' %] > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript"> >-//<![CDATA[ >-$(document).ready(function() { >- if($('#barcodelist').length) { >- $('#barcodelist').focus(); >- } else if ($('#checkoutrenew').length) { >- $('#checkoutrenew').focus(); >- } >- $("#checkout_infos").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sDom": 't', >- "aaSorting": [], >- "aoColumnDefs": [ >- { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, >- { "sType": "anti-the", "aTargets" : [ "anti-the" ] } >- ], >- "bPaginate": false >- })); >- }); >-//]]> >-</script> > </head> >+ > <body id="circ_circulation_batch_checkouts" class="circ"> > > [% INCLUDE 'header.inc' %] >@@ -307,4 +287,28 @@ $(document).ready(function() { > </div> > [% END %] > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ if($('#barcodelist').length) { >+ $('#barcodelist').focus(); >+ } else if ($('#checkoutrenew').length) { >+ $('#checkoutrenew').focus(); >+ } >+ $("#checkout_infos").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sDom": 't', >+ "aaSorting": [], >+ "aoColumnDefs": [ >+ { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] } >+ ], >+ "bPaginate": false >+ })); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt >index 648225c..d3d939d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt >@@ -2,36 +2,13 @@ > [% USE Branches %] > [% USE KohaDates %] > [% USE AuthorisedValues %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Pending on-site checkouts</title> > [% INCLUDE 'doc-head-close.inc' %] > <link rel="stylesheet" href="[% interface %]/[% theme %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript"> >-//<![CDATA[ >- >-$(document).ready(function(){ >- if ( $("#pending_onsite_checkout").length ) { >- $("#pending_onsite_checkout").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], >- "aoColumns": [ >- { "sType": "title-string" }, >- { "sType": "html" }, >- { "sType": "html" }, >- null, >- { "sType": "html" }, >- null, >- null, >- ], >- 'bAutoWidth': false, >- "sPaginationType": "four_button" >- })); >- } >-}); >-//]]> >-</script> >- > </head> >+ > <body id="circ_stats" class="circ"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'circ-search.inc' %] >@@ -83,4 +60,29 @@ $(document).ready(function(){ > [% IF Koha.Preference('CircSidebar') %][% INCLUDE 'circ-nav.inc' %][% END %] > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript"> >+ $(document).ready(function(){ >+ if ( $("#pending_onsite_checkout").length ) { >+ $("#pending_onsite_checkout").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]], >+ "aoColumns": [ >+ { "sType": "title-string" }, >+ { "sType": "html" }, >+ { "sType": "html" }, >+ null, >+ { "sType": "html" }, >+ null, >+ null, >+ ], >+ 'bAutoWidth': false, >+ "sPaginationType": "four_button" >+ })); >+ } >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >index 8bc2cee..afde83d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >@@ -1,82 +1,15 @@ > [% USE KohaDates %] >+[%- USE Branches -%] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Items overdue as of [% todaysdate %]</title> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'calendar.inc' %] >-[% INCLUDE 'datatables.inc' %] > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >-[%- USE Branches -%] >-<script type="text/javascript"> >- //<![CDATA[ >- function clone_parent(node) { >- var parent = node.parentNode; >- var clone = parent.cloneNode(true); >- parent.parentNode.insertBefore(clone, parent.nextSibling); >- $("a", clone).attr("style", "visibility: visible"); >- $("input", clone).attr("value", ""); >- >- >- var theid = $("span", clone).attr("id") || ""; >- var theid = $("span", clone).attr("id") || ""; >- var parts = theid.match(/^pattrodue-getready-(.*)$/); >- if (parts && parts.length > 1) >- { >- var appendid = "-" + Math.floor(Math.random()*1000+1); >- $("span", clone).attr("id",theid+appendid); >- >- theid = $("input", clone).attr("id"); >- $("input", clone).attr("id",theid+appendid); >- >- theid = $("div[id]", clone).attr("id"); >- $("div[id]", clone).attr("id",theid+appendid); >- >- var attrcode = $("script", clone).attr("x-code"); >- var newsuffix = parts[1] + appendid; >- create_auto_completion_responder(newsuffix,attrcode); >- } >- >- } >- >- >- function delete_parent(node) { >- var parent = node.parentNode; >- parent.parentNode.removeChild(parent); >- } >- >- function create_auto_completion_responder(uniqueid,attrcode) { >- $("#pattrodue-getready-" + uniqueid).ready(function(){ >- $( "#pattrodue-input-" + uniqueid ).autocomplete({ >- source: "/cgi-bin/koha/circ/ypattrodue-attr-search-authvalue.pl/"+attrcode, >- select: function( event, ui ) { >- $( "#pattrodue-input-"+uniqueid ).val( ui.item.description ); >- return false; >- } >- }) >- .data( "ui-autocomplete" )._renderItem = function( ul, item ) { >- return $( "<li></li>" ) >- .data( "ui-autocomplete-item", item ) >- .append( "<a>" + item.description + " (" + item.authorised_value + ")</a>" ) >- .appendTo( ul ) >- .css("font-size","90%").css("width","13em"); >- }; >- }); >- } >- >- $(document).ready(function(){ >- $("#overduest").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sPaginationType": "four_button", >- "aaSorting": [[0, 'asc']], >- "aoColumnDefs": [ >- { "sType": "title-string", "aTargets": [ "title-string" ] } >- ] >- })); >- }); >-//]]> >-</script> > <style type="text/css"> > .sql {display:none;} > </style> > </head> >+ > <body id="circ_overdue" class="circ"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'circ-search.inc' %] >@@ -262,4 +195,71 @@ > </div> > </div> > >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript"> >+ function clone_parent(node) { >+ var parent = node.parentNode; >+ var clone = parent.cloneNode(true); >+ parent.parentNode.insertBefore(clone, parent.nextSibling); >+ $("a", clone).attr("style", "visibility: visible"); >+ $("input", clone).attr("value", ""); >+ >+ var theid = $("span", clone).attr("id") || ""; >+ var theid = $("span", clone).attr("id") || ""; >+ var parts = theid.match(/^pattrodue-getready-(.*)$/); >+ if (parts && parts.length > 1){ >+ var appendid = "-" + Math.floor(Math.random()*1000+1); >+ $("span", clone).attr("id",theid+appendid); >+ >+ theid = $("input", clone).attr("id"); >+ $("input", clone).attr("id",theid+appendid); >+ >+ theid = $("div[id]", clone).attr("id"); >+ $("div[id]", clone).attr("id",theid+appendid); >+ >+ var attrcode = $("script", clone).attr("x-code"); >+ var newsuffix = parts[1] + appendid; >+ create_auto_completion_responder(newsuffix,attrcode); >+ } >+ } >+ >+ >+ function delete_parent(node) { >+ var parent = node.parentNode; >+ parent.parentNode.removeChild(parent); >+ } >+ >+ function create_auto_completion_responder(uniqueid,attrcode) { >+ $("#pattrodue-getready-" + uniqueid).ready(function(){ >+ $( "#pattrodue-input-" + uniqueid ).autocomplete({ >+ source: "/cgi-bin/koha/circ/ypattrodue-attr-search-authvalue.pl/"+attrcode, >+ select: function( event, ui ) { >+ $( "#pattrodue-input-"+uniqueid ).val( ui.item.description ); >+ return false; >+ } >+ }) >+ .data( "ui-autocomplete" )._renderItem = function( ul, item ) { >+ return $( "<li></li>" ) >+ .data( "ui-autocomplete-item", item ) >+ .append( "<a>" + item.description + " (" + item.authorised_value + ")</a>" ) >+ .appendTo( ul ) >+ .css("font-size","90%").css("width","13em"); >+ }; >+ }); >+ } >+ >+ $(document).ready(function(){ >+ $("#overduest").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sPaginationType": "four_button", >+ "aaSorting": [[0, 'asc']], >+ "aoColumnDefs": [ >+ { "sType": "title-string", "aTargets": [ "title-string" ] } >+ ] >+ })); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index 62cdc26..f2e443d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -3,75 +3,13 @@ > [% USE AuthorisedValues %] > [%- USE Branches -%] > [%- USE ItemTypes -%] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Holds to pull</title> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'calendar.inc' %] >-<!-- Plugin datatables --> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >-[% INCLUDE 'columns_settings.inc' %] >-<script type="text/JavaScript"> >-//<![CDATA[ >-$(document).ready(function() { >- var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') %]; >- var holdst = KohaTable("#holdst", { >- "aoColumnDefs": [ >- { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] }, >- { "sType": "string", "aTargets": [ "string-sort" ] } //Target columns that use <br> separators and pull-down menus. >- ], >- "sPaginationType": "full_numbers" >- }, columns_settings); >- holdst.fnAddFilters("filter"); >- [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %] >- function separateData ( ColumnData ){ >- var cD = ColumnData; >- var new_array = new Array(); >- for ( j=0 ; j<cD.length ; j++ ) { >- var split_array = cD[j].split(/<br>/gi); >- for ( k=0 ; k<split_array.length ; k++ ){ >- var str = $.trim(split_array[k].replace(/[\n\r]/g, '')); >- if ($.inArray(str, new_array) == -1 && str.length > 0 ) { >- new_array.push(str); >- } >- } >- } >- new_array.sort(); >- return new_array; >- } >- [%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %] >- function createSelect( data ) { >- data = separateData(data); >- var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length; >- for ( i=0 ; i<len ; i++ ) { >- r += '<option value="'+data[i]+'">'+data[i]+'</option>'; >- } >- return r+'</select>'; >- } >- $("#homebranchfilter").each( function () { >- $(this).html( createSelect( holdst.fnGetColumnData(5) ) ); >- $('select', this).change( function () { >- var filter_value = $(this).val(); >- holdst.fnFilter( filter_value, 5, true ); >- } ); >- } ); >- $("#itypefilter").each( function () { >- $(this).html( createSelect( holdst.fnGetColumnData(9) ) ); >- $('select', this).change( function () { >- holdst.fnFilter( $(this).val(), 9 ); >- } ); >- } ); >- $("#locationfilter").each( function () { >- $(this).html( createSelect( holdst.fnGetColumnData(10) ) ); >- $('select', this).change( function () { >- holdst.fnFilter( $(this).val(), 10 ); >- } ); >- } ); >-}); >-//]]> >-</script> > </head> >+ > <body id="circ_pendingreserves" class="circ"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'circ-search.inc' %] >@@ -209,4 +147,69 @@ $(document).ready(function() { > </div> > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') %]; >+ var holdst = KohaTable("#holdst", { >+ "aoColumnDefs": [ >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >+ { "sType": "title-string", "aTargets" : [ "title-string" ] }, >+ { "sType": "string", "aTargets": [ "string-sort" ] } //Target columns that use <br> separators and pull-down menus. >+ ], >+ "sPaginationType": "full_numbers" >+ }, columns_settings); >+ holdst.fnAddFilters("filter"); >+ [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %] >+ function separateData ( ColumnData ){ >+ var cD = ColumnData; >+ var new_array = new Array(); >+ for ( j=0 ; j<cD.length ; j++ ) { >+ var split_array = cD[j].split(/<br>/gi); >+ for ( k=0 ; k<split_array.length ; k++ ){ >+ var str = $.trim(split_array[k].replace(/[\n\r]/g, '')); >+ if ($.inArray(str, new_array) == -1 && str.length > 0 ) { >+ new_array.push(str); >+ } >+ } >+ } >+ new_array.sort(); >+ return new_array; >+ } >+ [%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %] >+ function createSelect( data ) { >+ data = separateData(data); >+ var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length; >+ for ( i=0 ; i<len ; i++ ) { >+ r += '<option value="'+data[i]+'">'+data[i]+'</option>'; >+ } >+ return r+'</select>'; >+ } >+ $("#homebranchfilter").each( function () { >+ $(this).html( createSelect( holdst.fnGetColumnData(5) ) ); >+ $('select', this).change( function () { >+ var filter_value = $(this).val(); >+ holdst.fnFilter( filter_value, 5, true ); >+ }); >+ }); >+ $("#itypefilter").each( function () { >+ $(this).html( createSelect( holdst.fnGetColumnData(9) ) ); >+ $('select', this).change( function () { >+ holdst.fnFilter( $(this).val(), 9 ); >+ }); >+ }); >+ $("#locationfilter").each( function () { >+ $(this).html( createSelect( holdst.fnGetColumnData(10) ) ); >+ $('select', this).change( function () { >+ holdst.fnFilter( $(this).val(), 10 ); >+ }); >+ }); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >index 1008727..66b0ee7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >@@ -1,22 +1,10 @@ > [% USE Koha %] > [% USE KohaDates %] >- >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > > <title>Koha › Circulation › Renew [% title |html %]</title> >- > [% INCLUDE 'doc-head-close.inc' %] >- >-[% IF error %] >- <script type="text/javascript"> >- //<![CDATA[ >- $( document ).ready(function() { >- removeFocus() >- }); >- //]]> >- </script> >-[% END %] >- > </head> > > <body id="circ_renew" class="circ"> >@@ -174,4 +162,14 @@ > [% END %] > <div> > >+[% MACRO jsinclude BLOCK %] >+ [% IF error %] >+ <script type="text/javascript"> >+ $( document ).ready(function() { >+ removeFocus(); >+ }); >+ </script> >+ [% END %] >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >index 0a6d6f6..1ca4a66 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >@@ -1,96 +1,13 @@ > [% USE KohaDates %] > [% USE Branches %] > [% USE ItemTypes %] >+[% SET footerjs = 1 %] > [% SET article_requests_view = 1 %] > [% SET biblionumber = biblio.biblionumber %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Request article</title> > [% INCLUDE 'doc-head-close.inc' %] > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >- >-<script type="text/javascript"> >-// <![CDATA[ >-$('#current-article-requests').ready(function() { >- $(".hide").hide(); >-}); >- >-$(document).ready(function() { >- $( "#patron" ).autocomplete({ >- source: "/cgi-bin/koha/circ/ysearch.pl", >- minLength: 3, >- select: function( event, ui ) { >- $( "#patron" ).val( ui.item.cardnumber ); >- $( "#holds_patronsearch" ).submit(); >- return false; >- } >- }) >- .data( "ui-autocomplete" )._renderItem = function( ul, item ) { >- return $( "<li></li>" ) >- .data( "ui-autocomplete-item", item ) >- .append( "<a>" + item.surname + ", " + item.firstname + >- " (" + item.cardnumber + ") <small>" + item.address + >- " " + item.city + " " + item.zipcode + " " + >- item.country + "</small></a>" ) >- .appendTo( ul ); >- }; >- >- $( ".ar-update-branchcode" ).on('focus', function(){ >- previous_branchcode = this.value; >- }).on('change', function(){ >- var branchcode = this.value; >- var c = confirm(_("Are you sure you want to change the pickup library from %s to %s for this request?").format( previous_branchcode, branchcode )); >- >- if ( c ) { >- var id = this.id.split("branchcode-")[1]; >- $("#update-processing-" + id ).css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 200); >- >- $.ajax({ >- type: "POST", >- url: '/cgi-bin/koha/svc/article_request', >- data: { >- action: 'update_branchcode', >- id: id, >- branchcode: branchcode, >- }, >- success: function( data ) { >- $("#update-processing-" + id ).css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200); >- }, >- dataType: 'json' >- }); >- >- } else { >- this.value = previous_branchcode; >- } >- }); >- >- $(".ar-cancel-request").on("click", function(){ >- var a = $(this); >- var notes = prompt(_("Reason for cancellation:")); >- >- if ( notes != null ) { >- var id = this.id.split("cancel-")[1]; >- $("#cancel-processing-" + id ).hide('slow'); >- $("#cancel-processing-spinner-" + id ).show('slow'); >- >- $.ajax({ >- type: "POST", >- url: '/cgi-bin/koha/svc/article_request', >- data: { >- action: 'cancel', >- id: id, >- notes: notes >- }, >- success: function( data ) { >- a.parents('tr').hide('slow'); >- }, >- dataType: 'json' >- }); >- } >- }); >-}); >-// ]]> >-</script> > </head> > > <body id="circ_request-article" class="circ"> >@@ -377,4 +294,90 @@ $(document).ready(function() { > </div> > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] >+ >+ <script type="text/javascript"> >+ $('#current-article-requests').ready(function() { >+ $(".hide").hide(); >+ }); >+ >+ $(document).ready(function() { >+ $( "#patron" ).autocomplete({ >+ source: "/cgi-bin/koha/circ/ysearch.pl", >+ minLength: 3, >+ select: function( event, ui ) { >+ $( "#patron" ).val( ui.item.cardnumber ); >+ $( "#holds_patronsearch" ).submit(); >+ return false; >+ } >+ }) >+ .data( "ui-autocomplete" )._renderItem = function( ul, item ) { >+ return $( "<li></li>" ) >+ .data( "ui-autocomplete-item", item ) >+ .append( "<a>" + item.surname + ", " + item.firstname + >+ " (" + item.cardnumber + ") <small>" + item.address + >+ " " + item.city + " " + item.zipcode + " " + >+ item.country + "</small></a>" ) >+ .appendTo( ul ); >+ }; >+ >+ $( ".ar-update-branchcode" ).on('focus', function(){ >+ previous_branchcode = this.value; >+ }).on('change', function(){ >+ var branchcode = this.value; >+ var c = confirm(_("Are you sure you want to change the pickup library from %s to %s for this request?").format( previous_branchcode, branchcode )); >+ >+ if ( c ) { >+ var id = this.id.split("branchcode-")[1]; >+ $("#update-processing-" + id ).css({opacity: 0, visibility: "visible"}).animate({opacity: 1.0}, 200); >+ >+ $.ajax({ >+ type: "POST", >+ url: '/cgi-bin/koha/svc/article_request', >+ data: { >+ action: 'update_branchcode', >+ id: id, >+ branchcode: branchcode, >+ }, >+ success: function( data ) { >+ $("#update-processing-" + id ).css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0}, 200); >+ }, >+ dataType: 'json' >+ }); >+ >+ } else { >+ this.value = previous_branchcode; >+ } >+ }); >+ >+ $(".ar-cancel-request").on("click", function(){ >+ var a = $(this); >+ var notes = prompt(_("Reason for cancellation:")); >+ >+ if ( notes != null ) { >+ var id = this.id.split("cancel-")[1]; >+ $("#cancel-processing-" + id ).hide('slow'); >+ $("#cancel-processing-spinner-" + id ).show('slow'); >+ >+ $.ajax({ >+ type: "POST", >+ url: '/cgi-bin/koha/svc/article_request', >+ data: { >+ action: 'cancel', >+ id: id, >+ notes: notes >+ }, >+ success: function( data ) { >+ a.parents('tr').hide('slow'); >+ }, >+ dataType: 'json' >+ }); >+ } >+ }); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >index ec92cb7..dc6cfe4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >@@ -2,33 +2,11 @@ > [% USE AuthorisedValues %] > [% USE Branches %] > [% USE ItemTypes %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Hold ratios</title> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'calendar.inc' %] > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript"> >-//<![CDATA[ >- $(document).ready(function() { >- $(".ratiolimit").click(function () { >- $("#ratio").val($(this).html()); >- }); >- $(".ratiolimit").hover( >- function () { $(this).toggleClass("ulined") }, >- function () { $(this).toggleClass("ulined") } >- ); >- $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aaSorting": [ [2,'desc'], [3,'asc'] ], >- "aoColumnDefs": [ >- { "aTargets": [ 0,1,2,8 ], "sType": "natural" }, >- { "aTargets": [ 3 ], "sType": "anti-the" }, >- ], >- "sPaginationType": "four_button" >- })); >- }); >-//]]> >-</script> > <style type="text/css"> > .sql { display: none; } > .ulined { text-decoration: underline; } >@@ -36,6 +14,7 @@ > #holdst ul li { list-style: outside url("[% interface %]/[% theme %]/img/item-bullet.gif") disc; } > </style> > </head> >+ > <body id="circ_reserveratios" class="circ"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'circ-search.inc' %] >@@ -163,4 +142,29 @@ > > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ $(".ratiolimit").click(function () { >+ $("#ratio").val($(this).html()); >+ }); >+ $(".ratiolimit").hover( >+ function () { $(this).toggleClass("ulined") }, >+ function () { $(this).toggleClass("ulined") } >+ ); >+ $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aaSorting": [ [2,'desc'], [3,'asc'] ], >+ "aoColumnDefs": [ >+ { "aTargets": [ 0,1,2,8 ], "sType": "natural" }, >+ { "aTargets": [ 3 ], "sType": "anti-the" }, >+ ], >+ "sPaginationType": "four_button" >+ })); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index 9f439b2..5fe673c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -5,7 +5,7 @@ > [% USE ItemTypes %] > [% USE AuthorisedValues %] > [% USE ColumnsSettings %] >- >+[% SET footerjs = 1 %] > [% BLOCK display_bormessagepref %] > [% IF ( bormessagepref ) %] > <li>Patron notification: >@@ -33,129 +33,8 @@ > <title>Koha › Circulation › Check in [% title |html %]</title> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'datatables.inc' %] >-[% INCLUDE 'columns_settings.inc' %] >-[% INCLUDE 'calendar.inc' %] >-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script> >-[% INCLUDE 'timepicker.inc' %] >- >-<script type="text/javascript"> >-//<![CDATA[ >-function Dopop(link) { >- var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); >- $("#barcode").focus(); >-} >-$(document).ready(function () { >- $(".modal").modal({ backdrop: 'static' }).on('shown', function() { >- $("#barcode").prop("disabled", true); >- }).on('hidden', function() { >- $("#barcode").prop("disabled", false).focus(); >- }); >- >- $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); }); >- >- [% IF print_slip %] >- Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&biblionumber=[% biblionumber %]'); >- [% END %] >- >- var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %] >- var returns_table = KohaTable("#checkedintable", { >- "bFilter":false, >- "bPaginate":false, >- "bInfo":false, >- "bSort":false, >- "dom": 'B<"clearfix">t', >- }, columns_settings); >- >- $("#return_date_override").datetimepicker({ >- onClose: function(dateText, inst) { >- if (validate_date(dateText, inst) ) { >- $("#barcode").focus(); >- } >- }, >- defaultDate: -1, >- hour: 23, >- minute: 59, >- maxDate: 0 >- }).on("change", function(e, value) { >- if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} >- }); >- $("#return_date_override").on("blur", function() { >- check_valid_return_date(); >- }); >- $("#checkin-form").submit(function( event ) { >- if ( !check_valid_return_date() ) { >- event.preventDefault(); >- } >- }); >- >- function check_valid_return_date() { >- if ( $("#return_date_override").val() ) { >- var datetime = DateTime_from_syspref( $("#return_date_override").val() ); >- var now = new Date(); >- if ( !datetime || datetime > now ) { >- alert("Invalid return date/time!"); >- $("#return_date_override").val("") >- return false; >- } >- } >- return true; >- } >- >- $("#exemptcheck").change(function () { >- if (this.checked == true) { >- $("#barcode").addClass("alert"); >- $("#exemptfines").show(); >- } else { >- $("#barcode").removeClass("alert"); >- $("#exemptfines").hide(); >- } >- $("#barcode").focus(); >- }); >- $("#dropboxcheck").change(function () { >- if (this.checked == true) { >- $("#barcode").addClass("alert"); >- $("#dropboxmode").show(); >- >- $("#return_date_override_fields :input").prop('disabled', true); >- $("#return_date_override").datetimepicker("disable"); >- } else { >- $("#barcode").removeClass("alert"); >- $("#dropboxmode").hide(); >- >- $("#return_date_override_fields :input").prop('disabled', false); >- $("#return_date_override").datetimepicker("enable"); >- } >- $("#barcode").focus(); >- }); >- $("#forgivemanualholdsexpire").change(function () { >- if (this.checked == true) { >- $("#barcode").addClass("alert"); >- $("#forgivemanualholdsexpire-alert").show(); >- } else { >- $("#barcode").removeClass("alert"); >- $("#forgivemanualholdsexpire-alert").hide(); >- } >- $("#barcode").focus(); >- }); >- [% IF(overduecharges) %] $("#barcode").focus(function () { >- if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) { >- $("#barcode").addClass("alert"); >- } else { >- $("#barcode").removeClass("alert"); >- } >- }); >- $("#barcode").blur(function () { >- $("#barcode").removeClass("alert"); >- }); >- [% END %] >- $('.openWin').on("click",function(e){ >- Dopop( $(this).data("url") ); >- }); >-}); >-//]]> >-</script> > </head> >+ > <body id="circ_returns" class="circ"> > <span class="audio-alert-success"></span> > >@@ -809,4 +688,131 @@ $(document).ready(function () { > </div> > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] >+ [% INCLUDE 'calendar.inc' %] >+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script> >+ [% INCLUDE 'timepicker.inc' %] >+ >+ <script type="text/javascript"> >+ function Dopop(link) { >+ var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); >+ $("#barcode").focus(); >+ } >+ $(document).ready(function () { >+ $(".modal").modal({ backdrop: 'static' }).on('shown', function() { >+ $("#barcode").prop("disabled", true); >+ }).on('hidden', function() { >+ $("#barcode").prop("disabled", false).focus(); >+ }); >+ >+ $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); }); >+ >+ [% IF print_slip %] >+ Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&biblionumber=[% biblionumber %]'); >+ [% END %] >+ >+ var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %] >+ var returns_table = KohaTable("#checkedintable", { >+ "bFilter":false, >+ "bPaginate":false, >+ "bInfo":false, >+ "bSort":false, >+ "dom": 'B<"clearfix">t', >+ }, columns_settings); >+ >+ $("#return_date_override").datetimepicker({ >+ onClose: function(dateText, inst) { >+ if (validate_date(dateText, inst) ) { >+ $("#barcode").focus(); >+ } >+ }, >+ defaultDate: -1, >+ hour: 23, >+ minute: 59, >+ maxDate: 0 >+ }).on("change", function(e, value) { >+ if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} >+ }); >+ $("#return_date_override").on("blur", function() { >+ check_valid_return_date(); >+ }); >+ $("#checkin-form").submit(function( event ) { >+ if ( !check_valid_return_date() ) { >+ event.preventDefault(); >+ } >+ }); >+ >+ function check_valid_return_date() { >+ if ( $("#return_date_override").val() ) { >+ var datetime = DateTime_from_syspref( $("#return_date_override").val() ); >+ var now = new Date(); >+ if ( !datetime || datetime > now ) { >+ alert("Invalid return date/time!"); >+ $("#return_date_override").val("") >+ return false; >+ } >+ } >+ return true; >+ } >+ >+ $("#exemptcheck").change(function () { >+ if (this.checked == true) { >+ $("#barcode").addClass("alert"); >+ $("#exemptfines").show(); >+ } else { >+ $("#barcode").removeClass("alert"); >+ $("#exemptfines").hide(); >+ } >+ $("#barcode").focus(); >+ }); >+ $("#dropboxcheck").change(function () { >+ if (this.checked == true) { >+ $("#barcode").addClass("alert"); >+ $("#dropboxmode").show(); >+ >+ $("#return_date_override_fields :input").prop('disabled', true); >+ $("#return_date_override").datetimepicker("disable"); >+ } else { >+ $("#barcode").removeClass("alert"); >+ $("#dropboxmode").hide(); >+ >+ $("#return_date_override_fields :input").prop('disabled', false); >+ $("#return_date_override").datetimepicker("enable"); >+ } >+ $("#barcode").focus(); >+ }); >+ $("#forgivemanualholdsexpire").change(function () { >+ if (this.checked == true) { >+ $("#barcode").addClass("alert"); >+ $("#forgivemanualholdsexpire-alert").show(); >+ } else { >+ $("#barcode").removeClass("alert"); >+ $("#forgivemanualholdsexpire-alert").hide(); >+ } >+ $("#barcode").focus(); >+ }); >+ >+ [% IF(overduecharges) %] >+ $("#barcode").focus(function () { >+ if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) { >+ $("#barcode").addClass("alert"); >+ } else { >+ $("#barcode").removeClass("alert"); >+ } >+ }); >+ $("#barcode").blur(function () { >+ $("#barcode").removeClass("alert"); >+ }); >+ [% END %] >+ >+ $('.openWin').on("click",function(e){ >+ Dopop( $(this).data("url") ); >+ }); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >index 8b82028..6d99682 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >@@ -1,29 +1,13 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE Branches %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Transfers to receive</title> > [% INCLUDE 'doc-head-close.inc' %] > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript"> >-//<![CDATA[ >-$(document).ready(function() { >- [% FOREACH branchesloo IN branchesloop %] >- $("#transferst[% branchesloo.branchcode %]").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumnDefs": [ >- { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >- { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] } >- ], >- "sDom": 't', >- "bPaginate": false >- })); >- [% END %] >-}); >-//]]> >-</script> > </head> >+ > <body id="circ_transferstoreceive" class="circ"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'circ-search.inc' %] >@@ -104,4 +88,24 @@ $(document).ready(function() { > </div> > [% END %] > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ [% FOREACH branchesloo IN branchesloop %] >+ $("#transferst[% branchesloo.branchcode %]").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >+ { "sType": "title-string", "aTargets" : [ "title-string" ] } >+ ], >+ "sDom": 't', >+ "bPaginate": false >+ })); >+ [% END %] >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >index 75411cc..5cae4d1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >@@ -5,45 +5,14 @@ > [% USE AuthorisedValues %] > [% USE ColumnsSettings %] > [% USE Koha %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Holds queue</title> > [% INCLUDE 'doc-head-close.inc' %] > <style type="text/css"> p { margin-top: 0; }</style> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >-[% INCLUDE 'columns_settings.inc' %] >-<script type="text/javascript">//<![CDATA[ >-$(document).ready(function() { >- var holdst; >- >- // Setup filters before DataTables initialisation, in case some columns are >- // hidden by default >- var filterColumnTimeoutId; >- var filterColumn = function(e) { >- clearTimeout(filterColumnTimeoutId); >- filterColumnTimeoutId = setTimeout(function() { >- var input = $(e.target); >- var idx = input.parents('td').index(); >- holdst.api().column(idx + ':visible').search(input.val()).draw(); >- }, 200); >- }; >- $('#holdst thead input').on('change keyup keydown', filterColumn); >- >- var columns_settings = [% ColumnsSettings.GetColumns('circ', 'view_holdsqueue', 'holds-table', 'json') %]; >- var holdst = KohaTable("#holdst", { >- "aaSorting": [[ 3, "asc" ]], >- "aoColumns": [ >- { "sType": "anti-the" },null,null,null,null,null,null,null,null,{ "sType": "title-string" },null >- ], >- "sDom": 'B<"clearfix">t', >- "bSortCellsTop": true, >- "bPaginate": false >- }, columns_settings); >- >-}); >-//]]> >-</script> > </head> >+ > <body id="circ_view_holdsqueue" class="circ"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] >@@ -224,4 +193,40 @@ $(document).ready(function() { > </div> > [% END %] > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ var holdst; >+ >+ // Setup filters before DataTables initialisation, in case some columns are >+ // hidden by default >+ var filterColumnTimeoutId; >+ var filterColumn = function(e) { >+ clearTimeout(filterColumnTimeoutId); >+ filterColumnTimeoutId = setTimeout(function() { >+ var input = $(e.target); >+ var idx = input.parents('td').index(); >+ holdst.api().column(idx + ':visible').search(input.val()).draw(); >+ }, 200); >+ }; >+ $('#holdst thead input').on('change keyup keydown', filterColumn); >+ >+ var columns_settings = [% ColumnsSettings.GetColumns('circ', 'view_holdsqueue', 'holds-table', 'json') %]; >+ var holdst = KohaTable("#holdst", { >+ "aaSorting": [[ 3, "asc" ]], >+ "aoColumns": [ >+ { "sType": "anti-the" },null,null,null,null,null,null,null,null,{ "sType": "title-string" },null >+ ], >+ "sDom": 'B<"clearfix">t', >+ "bSortCellsTop": true, >+ "bPaginate": false >+ }, columns_settings); >+ >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >index e0f7169..215d058 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >@@ -1,28 +1,13 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE Branches %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Holds awaiting pickup</title> > [% INCLUDE 'doc-head-close.inc' %] > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript"> >-//<![CDATA[ >- $(document).ready(function() { >- $('#resultlist').tabs(); >- $("th a").hide(); >- $("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumnDefs": [ >- { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >- { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] } >- ], >- "sPaginationType": "four_button" >- })); >- }); >-//]]> >-</script> > </head> >+ > <body id="circ_waitingreserves" class="circ"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'circ-search.inc' %] >@@ -213,4 +198,23 @@ > </div> > [% END %] > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ $('#resultlist').tabs(); >+ $("th a").hide(); >+ $("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >+ { "sType": "title-string", "aTargets" : [ "title-string" ] } >+ ], >+ "sPaginationType": "four_button" >+ })); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19700
:
69395
|
69481
|
69554
|
69599