Bugzilla – Attachment 69795 Details for
Bug 19753
Move template JavaScript to the footer: Acquisitions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19753: Move template JavaScript to the footer: Acquisitions
Bug-19753-Move-template-JavaScript-to-the-footer-A.patch (text/plain), 56.93 KB, created by
Simon Pouchol
on 2017-12-14 09:58:07 UTC
(
hide
)
Description:
Bug 19753: Move template JavaScript to the footer: Acquisitions
Filename:
MIME Type:
Creator:
Simon Pouchol
Created:
2017-12-14 09:58:07 UTC
Size:
56.93 KB
patch
obsolete
>From 4c1486b3741c0edb690c6267a59156ae8a35f44d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 5 Dec 2017 14:20:11 +0000 >Subject: [PATCH] Bug 19753: Move template JavaScript to the footer: > Acquisitions > >This patch modifies some staff client acquisitions templates so that >JavaScript is included in the footer instead of the header. > >This patch adds a JavaScript file, acquisitions-menu.js, which controls >the highlighting of the current page in the sidebar. Highlighting will >be temporarily broken for pages which have not been modified to include >this file > >To test, apply the patch and test the JavaScript-driven features of the >modified templates: All button controls, DataTables functionality, tabs, >etc. > >- Acquisitions home page > - Datatable, Inactive budget controls >- Vendor search results > - Acquisitions -> Vendor search > - Datatables, "Show all" links >- Basket > - Acquisitions -> Vendor -> Basket > - Datatables, button controls, add managing user >- Add to basket from a staged file > - Acquisitions -> Vendor -> Basket -> Add to basket from a staged file > - Datatables, tabs, selection controls >- Edit basket > - Acquisitions -> Vendor -> Edit basket > - Form validation >- EDIFACT messages > - Acquisitions -> EDIFACT messages > - Datatables, message preview >- Orders search > - Acquisitions -> Order search > - Full orders search form > - Patron autocomplete in "Basket created by" field > - Datepickers > - Orders search results > - Datatables, column visibility >- Invoices > - Acquisitions -> Vendor -> Invoices -> Invoice > - Form validation, datepickers, datatables > - Invoice files (enable AcqEnableFiles preference) > - Manage invoice files > - File list datatable > >Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com> >--- > .../prog/en/modules/acqui/acqui-home.tt | 160 +++++----- > .../prog/en/modules/acqui/addorderiso2709.tt | 332 +++++++++++---------- > .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 324 ++++++++++---------- > .../prog/en/modules/acqui/basketheader.tt | 8 +- > .../prog/en/modules/acqui/booksellers.tt | 88 +++--- > .../prog/en/modules/acqui/edifactmsgs.tt | 73 +++-- > .../prog/en/modules/acqui/histsearch.tt | 63 ++-- > .../prog/en/modules/acqui/invoice-files.tt | 46 +-- > .../intranet-tmpl/prog/en/modules/acqui/invoice.tt | 98 +++--- > 9 files changed, 610 insertions(+), 582 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >index f64a60b..a046181 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >@@ -1,90 +1,13 @@ > [% USE Price %] > [% USE Branches %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions</title> > [% INCLUDE 'doc-head-close.inc' %] > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] > <link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css" rel="stylesheet" type="text/css" /> >-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable.js"></script> >- >-<script type="text/javascript"> >-//<![CDATA[ >- >-dt_overwrite_html_sorting_localeCompare(); >- >-$(document).ready(function() { >- >- var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, { >- "fnDrawCallback": function ( oSettings ) { >- if ( oSettings.aiDisplay.length == 0 ) >- { >- return; >- } >- >- var nTrs = $('#accounts tbody tr'); >- var iColspan = nTrs[0].getElementsByTagName('td').length; >- var sLastGroup = ""; >- for ( var i=0 ; i<nTrs.length ; i++ ) >- { >- var iDisplayIndex = oSettings._iDisplayStart + i; >- var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1]; >- if ( sGroup != sLastGroup ) >- { >- var nGroup = document.createElement( 'tr' ); >- var nCell = document.createElement( 'td' ); >- nCell.colSpan = iColspan; >- nCell.className = "group"; >- nCell.innerHTML = sGroup; >- nGroup.appendChild( nCell ); >- nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] ); >- sLastGroup = sGroup; >- } >- } >- }, >- "footerCallback": function ( row, data, start, end, display ) { >- var api = this.api(), data; >- footer_column_sum( api, [ 6, 7, 8, 9 ] ); >- }, >- "aoColumnDefs": [ >- { "bVisible": false, "aTargets": [ 0, 1 ] }, >- { "bSortable": false, "aTargets": ["_all"] } >- ], >- 'dom': '<"top pager"ilpf>tr<"bottom pager"ip>', >- 'bSort': true, >- 'aaSortingFixed': [[ 1, 'asc' ]], >- 'bPaginate': false, >- "bAutoWidth": false >- })); >- >- $(oTable).treetable({ >- expandable: true >- }); >- $(oTable).treetable('expandAll'); >- $("#expand_all").click(function(e){ >- e.preventDefault(); >- $(oTable).treetable('expandAll'); >- }); >- $("#collapse_all").click(function(e){ >- e.preventDefault(); >- $(oTable).treetable('collapseAll'); >- }); >- >- $("#hide_inactive").click(function(e){ >- e.preventDefault(); >- oTable.fnFilter( 1, 0 ); // Show only active=1 >- }); >- $("#show_inactive").click(function(e){ >- e.preventDefault(); >- oTable.fnFilter( '', 0 ); >- }); >- $("#hide_inactive").click(); >- >-}); >-//]]> >-</script> >- > </head> >+ > <body id="acq_acqui-home" class="acq"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'acquisitions-search.inc' %] >@@ -243,4 +166,83 @@ $(document).ready(function() { > [% INCLUDE 'acquisitions-menu.inc' %] > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable.js"></script> >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script> >+ <script type="text/javascript"> >+ dt_overwrite_html_sorting_localeCompare(); >+ >+ $(document).ready(function() { >+ >+ var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "fnDrawCallback": function ( oSettings ) { >+ if ( oSettings.aiDisplay.length == 0 ) >+ { >+ return; >+ } >+ >+ var nTrs = $('#accounts tbody tr'); >+ var iColspan = nTrs[0].getElementsByTagName('td').length; >+ var sLastGroup = ""; >+ for ( var i=0 ; i<nTrs.length ; i++ ) >+ { >+ var iDisplayIndex = oSettings._iDisplayStart + i; >+ var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1]; >+ if ( sGroup != sLastGroup ) >+ { >+ var nGroup = document.createElement( 'tr' ); >+ var nCell = document.createElement( 'td' ); >+ nCell.colSpan = iColspan; >+ nCell.className = "group"; >+ nCell.innerHTML = sGroup; >+ nGroup.appendChild( nCell ); >+ nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] ); >+ sLastGroup = sGroup; >+ } >+ } >+ }, >+ "footerCallback": function ( row, data, start, end, display ) { >+ var api = this.api(), data; >+ footer_column_sum( api, [ 6, 7, 8, 9 ] ); >+ }, >+ "aoColumnDefs": [ >+ { "bVisible": false, "aTargets": [ 0, 1 ] }, >+ { "bSortable": false, "aTargets": ["_all"] } >+ ], >+ 'dom': '<"top pager"ilpf>tr<"bottom pager"ip>', >+ 'bSort': true, >+ 'aaSortingFixed': [[ 1, 'asc' ]], >+ 'bPaginate': false, >+ "bAutoWidth": false >+ })); >+ >+ $(oTable).treetable({ >+ expandable: true >+ }); >+ $(oTable).treetable('expandAll'); >+ $("#expand_all").click(function(e){ >+ e.preventDefault(); >+ $(oTable).treetable('expandAll'); >+ }); >+ $("#collapse_all").click(function(e){ >+ e.preventDefault(); >+ $(oTable).treetable('collapseAll'); >+ }); >+ >+ $("#hide_inactive").click(function(e){ >+ e.preventDefault(); >+ oTable.fnFilter( 1, 0 ); // Show only active=1 >+ }); >+ $("#show_inactive").click(function(e){ >+ e.preventDefault(); >+ oTable.fnFilter( '', 0 ); >+ }); >+ $("#hide_inactive").click(); >+ >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index 42bb4ef..5cbfc8d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -1,5 +1,6 @@ > [% USE KohaDates %] > [% USE Branches %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › Order staged MARC records > [% IF ( batch_details ) %] >@@ -11,169 +12,8 @@ > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > <style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> >-<script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script> >-<script type="text/JavaScript"> >-//<![CDATA[ >- $(document).ready(function() { >- $("#files").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumnDefs": [ >- { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, >- { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] } >- ], >- "sPaginationType": "four_button", >- "aaSorting": [] >- } ) ); >- >- // keep copy of the inactive budgets >- disabledBudgetsCopy = $("select[name='all_budget_id']").html(); >- $("select[name='all_budget_id'] .b_inactive").remove(); >- $("select[name='budget_id'] .b_inactive").remove(); >- >- $("#showallbudgets").click(function() { >- if ($(this).is(":checked")) { >- $("select[name='budget_id']").html(disabledBudgetsCopy) >- } >- else { >- $("select[name='budget_id'] .b_inactive").remove(); >- } >- }); >- >- $("#all_showallbudgets").click(function() { >- if ($(this).is(":checked")) { >- $("select[name='all_budget_id']").html(disabledBudgetsCopy); >- } >- else { >- $("select[name='all_budget_id'] .b_inactive").remove(); >- } >- }); >- >- $("select[name='budget_id']").change(function(){ >- var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); >- var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); >- var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]'); >- var sort1 = $(destination_sort1).val() || ""; >- if ( destination_sort1.length < 1 ) { >- destination_sort1 = $(this).parents('fieldset').find('li.sort1 > select[name="sort1"]'); >- } >- var destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('input[name="sort2"]'); >- var sort2 = $(destination_sort2).val() || ""; >- if ( destination_sort2.length < 1 ) { >- destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('select[name="sort2"]'); >- } >- getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 ); >- >- getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 ); >- } ); >- >- $("select[name='budget_id']").change(); >- >- $("select[name='all_budget_id']").change(function(){ >- var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); >- var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); >- var destination_sort1 = $(this).parent().siblings('li').find('input[name="all_sort1"]'); >- if ( destination_sort1.length < 1 ) { >- destination_sort1 = $(this).parent().siblings('li').find('select[name="all_sort1"]'); >- } >- var destination_sort2 = $(this).parent().siblings('li').find('input[name="all_sort2"]'); >- if ( destination_sort2.length < 1 ) { >- destination_sort2 = $(this).parent().siblings('li').find('select[name="all_sort2"]'); >- } >- getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1 ); >- getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2 ); >- $(this).parent().siblings('li').find('select[name="sort1"]').attr('name', 'all_sort1'); >- $(this).parent().siblings('li').find('input[name="sort1"]').attr('name', 'all_sort1'); >- $(this).parent().siblings('li').find('select[name="sort2"]').attr('name', 'all_sort2'); >- $(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2'); >- } ); >- >- $("select[name='all_budget_id']").change(); >- >- $("#records_to_import fieldset.rows div").hide(); >- $('input:checkbox[name="import_record_id"]').change(function(){ >- var container = $(this).parents("fieldset"); >- if ( $(this).is(':checked') ) { >- $(container).addClass("selected"); >- $(container).removeClass("unselected"); >- $(container).find("div").toggle(true); >- } else { >- $(container).addClass("unselected"); >- $(container).removeClass("selected"); >- $(container).find("div").toggle(false); >- } >- } ); >- >- $("input:checkbox").prop("checked", false); >- $("div.biblio.unselected select").prop('disabled', false); >- $("div.biblio.unselected input").prop('disabled', false); >- >- $("#checkAll").click(function(){ >- $("#Aform").checkCheckboxes(); >- $("input:checkbox[name='import_record_id']").change(); >- return false; >- }); >- $("#unCheckAll").click(function(){ >- $("#Aform").unCheckCheckboxes(); >- $("input:checkbox[name='import_record_id']").change(); >- return false; >- }); >- >- $("#Aform").on("submit", function(){ >- if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) { >- alert(_("There is no record selected")); >- return false; >- } >- >- var error = 0; >- $("input:checkbox[name='import_record_id']:checked").parents('fieldset').find('input[name="quantity"]').each(function(){ >- if ( $(this).val().length < 1 || isNaN( $(this).val() ) ) { >- error++; >- } >- }); >- if ( error > 0 ) { >- alert(error + " " + _("quantity values are not filled in or are not numbers")); >- return false; >- >- } >- var error = 0; >- $("select[name='budget_id']").each(function() { >- if (!$(this).val()) { >- error++; >- } >- }); >- if ( error > 0 ) { >- alert(_("Some budgets are not defined in item records")); >- return false; >- } >- >- return disableUnchecked($(this)); >- }); >- $('#tabs').tabs(); >- $(".previewData").on("click", function(e){ >- e.preventDefault(); >- var ltitle = $(this).text(); >- var page = $(this).attr("href"); >- $("#dataPreviewLabel").text(ltitle); >- $("#dataPreview .modal-body").load(page + " div"); >- $('#dataPreview').modal({show:true}); >- }); >- $("#dataPreview").on("hidden", function(){ >- $("#dataPreviewLabel").html(""); >- $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); >- }); >- }); >- >- function disableUnchecked(form){ >- $("fieldset.biblio.unselected").each(function(){ >- $(this).remove(); >- }); >- return 1; >- } >-//]]> >-</script> > </head> >+ > <body id="acq_addorderiso2709" class="acq"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'acquisitions-search.inc' %] >@@ -583,5 +423,169 @@ > </div> > </div> > </div> >-</body> >-</html> >+ >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script> >+[% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script> >+ <script type="text/JavaScript"> >+ $(document).ready(function() { >+ $("#files").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >+ { "sType": "title-string", "aTargets" : [ "title-string" ] } >+ ], >+ "sPaginationType": "four_button", >+ "aaSorting": [] >+ } ) ); >+ >+ // keep copy of the inactive budgets >+ disabledBudgetsCopy = $("select[name='all_budget_id']").html(); >+ $("select[name='all_budget_id'] .b_inactive").remove(); >+ $("select[name='budget_id'] .b_inactive").remove(); >+ >+ $("#showallbudgets").click(function() { >+ if ($(this).is(":checked")) { >+ $("select[name='budget_id']").html(disabledBudgetsCopy) >+ } >+ else { >+ $("select[name='budget_id'] .b_inactive").remove(); >+ } >+ }); >+ >+ $("#all_showallbudgets").click(function() { >+ if ($(this).is(":checked")) { >+ $("select[name='all_budget_id']").html(disabledBudgetsCopy); >+ } >+ else { >+ $("select[name='all_budget_id'] .b_inactive").remove(); >+ } >+ }); >+ >+ $("select[name='budget_id']").change(function(){ >+ var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); >+ var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); >+ var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]'); >+ var sort1 = $(destination_sort1).val() || ""; >+ if ( destination_sort1.length < 1 ) { >+ destination_sort1 = $(this).parents('fieldset').find('li.sort1 > select[name="sort1"]'); >+ } >+ var destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('input[name="sort2"]'); >+ var sort2 = $(destination_sort2).val() || ""; >+ if ( destination_sort2.length < 1 ) { >+ destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('select[name="sort2"]'); >+ } >+ getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 ); >+ >+ getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 ); >+ } ); >+ >+ $("select[name='budget_id']").change(); >+ >+ $("select[name='all_budget_id']").change(function(){ >+ var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); >+ var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); >+ var destination_sort1 = $(this).parent().siblings('li').find('input[name="all_sort1"]'); >+ if ( destination_sort1.length < 1 ) { >+ destination_sort1 = $(this).parent().siblings('li').find('select[name="all_sort1"]'); >+ } >+ var destination_sort2 = $(this).parent().siblings('li').find('input[name="all_sort2"]'); >+ if ( destination_sort2.length < 1 ) { >+ destination_sort2 = $(this).parent().siblings('li').find('select[name="all_sort2"]'); >+ } >+ getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1 ); >+ getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2 ); >+ $(this).parent().siblings('li').find('select[name="sort1"]').attr('name', 'all_sort1'); >+ $(this).parent().siblings('li').find('input[name="sort1"]').attr('name', 'all_sort1'); >+ $(this).parent().siblings('li').find('select[name="sort2"]').attr('name', 'all_sort2'); >+ $(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2'); >+ } ); >+ >+ $("select[name='all_budget_id']").change(); >+ >+ $("#records_to_import fieldset.rows div").hide(); >+ $('input:checkbox[name="import_record_id"]').change(function(){ >+ var container = $(this).parents("fieldset"); >+ if ( $(this).is(':checked') ) { >+ $(container).addClass("selected"); >+ $(container).removeClass("unselected"); >+ $(container).find("div").toggle(true); >+ } else { >+ $(container).addClass("unselected"); >+ $(container).removeClass("selected"); >+ $(container).find("div").toggle(false); >+ } >+ } ); >+ >+ $("input:checkbox").prop("checked", false); >+ $("div.biblio.unselected select").prop('disabled', false); >+ $("div.biblio.unselected input").prop('disabled', false); >+ >+ $("#checkAll").click(function(){ >+ $("#Aform").checkCheckboxes(); >+ $("input:checkbox[name='import_record_id']").change(); >+ return false; >+ }); >+ $("#unCheckAll").click(function(){ >+ $("#Aform").unCheckCheckboxes(); >+ $("input:checkbox[name='import_record_id']").change(); >+ return false; >+ }); >+ >+ $("#Aform").on("submit", function(){ >+ if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) { >+ alert(_("There is no record selected")); >+ return false; >+ } >+ >+ var error = 0; >+ $("input:checkbox[name='import_record_id']:checked").parents('fieldset').find('input[name="quantity"]').each(function(){ >+ if ( $(this).val().length < 1 || isNaN( $(this).val() ) ) { >+ error++; >+ } >+ }); >+ if ( error > 0 ) { >+ alert(error + " " + _("quantity values are not filled in or are not numbers")); >+ return false; >+ >+ } >+ var error = 0; >+ $("select[name='budget_id']").each(function() { >+ if (!$(this).val()) { >+ error++; >+ } >+ }); >+ if ( error > 0 ) { >+ alert(_("Some budgets are not defined in item records")); >+ return false; >+ } >+ >+ return disableUnchecked($(this)); >+ }); >+ $('#tabs').tabs(); >+ $(".previewData").on("click", function(e){ >+ e.preventDefault(); >+ var ltitle = $(this).text(); >+ var page = $(this).attr("href"); >+ $("#dataPreviewLabel").text(ltitle); >+ $("#dataPreview .modal-body").load(page + " div"); >+ $('#dataPreview').modal({show:true}); >+ }); >+ $("#dataPreview").on("hidden", function(){ >+ $("#dataPreviewLabel").html(""); >+ $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); >+ }); >+ }); >+ >+ function disableUnchecked(form){ >+ $("fieldset.biblio.unselected").each(function(){ >+ $(this).remove(); >+ }); >+ return 1; >+ } >+ </script> >+[% END %] >+ >+[% INCLUDE 'intranet-bottom.inc' %] >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index 08aa656..81d07ff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -16,178 +16,16 @@ > [% USE Branches %] > [% USE Price %] > [% USE AuthorisedValues %] >- >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %]</title> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script> >-<script type="text/javascript"> >-//<![CDATA[ >- function updateColumnsVisibility(visible) { >- if ( visible ) { >- $("table .tax_excluded, .tax_included").show(); >- } else { >- [% IF ( listincgst ) %] >- $("table .tax_excluded").hide(); >- [% ELSE %] >- $("table .tax_included").hide(); >- [% END %] >- } >- } >- >- $(document).ready(function() { >- if ( $('#toolbar').length ) {$('#toolbar').fixFloat();} >- $("#show_all_details").click(function(){ >- updateColumnsVisibility($(this).is(":checked")); >- }); >- >- $("#show_all_details").prop('checked', false); >- updateColumnsVisibility(false); >- [% UNLESS ( closedate ) %] >- $('#addtoBasket').on('show', function () { >- $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML); >- }); >- [% END %] >- >- $("body").on("click", ".del_user", function(e){ >- e.preventDefault(); >- del_user( $(this).data("borrowernumber") ); >- }); >- >- $("#add_user").on("click",function(e){ >- e.preventDefault(); >- UserSearchPopup(); >- }); >- >- $(".transfer_order").on("click",function(e){ >- e.preventDefault(); >- transfer_order_popup( $(this).data("ordernumber")); >- }); >- }); >-//]]> >-</script> >- >-[% UNLESS ( closedate ) %] >-<script type="text/javascript"> >-//<![CDATA[ >- >- function transfer_order_popup(ordernumber) { >- var url = "/cgi-bin/koha/acqui/transferorder.pl?" >- + "ordernumber=" + ordernumber >- window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes'); >- } >- >- function confirm_ediorder() { >- var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?")); >- if (is_confirmed) { >- window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno |html %]"; >- } >- } >- >-//]]> >-</script> >-[% ELSE %] >-<script type="text/javascript"> >-//<![CDATA[ >- $(document).ready(function(){ >- $("#basketgroupid").change(function(){ >- if($(this).val() == "new"){ >- location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]"; >- } >- }); >- }); >-//]]> >-</script> >-[% UNLESS ( grouped ) %] >-<script type="text/javascript"> >-//<![CDATA[ >- function confirm_reopen() { >- var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %]; >- var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?")); >- if (is_confirmed) { >- window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno |html %]"; >- } >- } >-//]]> >-</script> >-[% END %] >-[% END %] >-<script type="text/javascript"> >-//<![CDATA[ >- $(document).ready(function() { >- var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sPaginationType": "four_button", >- [% IF ( active ) %] >- "aoColumnDefs": [ >- [% UNLESS ( closedate ) %] >- { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, >- [% END %] >- { "sType": "anti-the", "aTargets": [ "anti-the" ] } >- ], >- [% END %] >- } ) ); >- var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sPaginationType": "four_button" >- } ) ); >- $("#reopenbutton").on("click",function(e){ >- e.preventDefault(); >- confirm_reopen(); >- }); >- // Generates a dynamic link for exporting the selections data as CSV >- $("#exportbutton, #export-csv-menu a").click(function() { >- // Building the url from currently checked boxes >- var url = '/cgi-bin/koha/acqui/basket.pl'; >- url += $('#exportbutton').attr('href'); >- if($(this).attr("data-value")) { >- url += '&csv_profile=' + $(this).attr("data-value"); >- } >- // And redirecting to the CSV page >- location.href = url; >- return false; >- }); >- }); >- >- function UserSearchPopup(f) { >- window.open( >- "/cgi-bin/koha/acqui/add_user_search.pl", >- 'UserSearchPopup', >- 'width=840, height=500, scrollbars=yes, toolbar=no,' >- ); >- } >- >- function add_user(borrowernumber, borrowername) { >- var ids = $("#users_ids").val(); >- if(ids.length > 0) { >- ids = ids.split(':'); >- } else { >- ids = new Array; >- } >- if (ids.indexOf(borrowernumber) < 0) { >- ids.push(borrowernumber); >- $("#users_ids").val(ids.join(':')); >- var li = '<li id="user_'+borrowernumber+'">'+borrowername >- + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> ' >- + _("Delete user") + '</a></li>'; >- $("#users_names").append(li); >- return 0; >- } >- return -1; >- } >- >- function del_user(borrowernumber) { >- $("#user_"+borrowernumber).remove(); >- var ids = $("#users_ids").val().split(':'); >- ids.splice(ids.indexOf(borrowernumber.toString()), 1); >- $("#users_ids").val(ids.join(':')); >- } >-//]]> >-</script> > <style type="text/css"> >-.sortmsg {font-size: 80%;} >+ .sortmsg {font-size: 80%;} > </style> > </head> >+ > <body id="acq_basket" class="acq"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'acquisitions-search.inc' %] >@@ -842,4 +680,160 @@ > [% INCLUDE 'acquisitions-menu.inc' %] > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script> >+[% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script> >+ <script type="text/javascript"> >+ function updateColumnsVisibility(visible) { >+ if ( visible ) { >+ $("table .tax_excluded, .tax_included").show(); >+ } else { >+ [% IF ( listincgst ) %] >+ $("table .tax_excluded").hide(); >+ [% ELSE %] >+ $("table .tax_included").hide(); >+ [% END %] >+ } >+ } >+ >+ $(document).ready(function() { >+ if ( $('#toolbar').length ) {$('#toolbar').fixFloat();} >+ $("#show_all_details").click(function(){ >+ updateColumnsVisibility($(this).is(":checked")); >+ }); >+ >+ $("#show_all_details").prop('checked', false); >+ updateColumnsVisibility(false); >+ [% UNLESS ( closedate ) %] >+ $('#addtoBasket').on('show', function () { >+ $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML); >+ }); >+ [% END %] >+ >+ $("body").on("click", ".del_user", function(e){ >+ e.preventDefault(); >+ del_user( $(this).data("borrowernumber") ); >+ }); >+ >+ $("#add_user").on("click",function(e){ >+ e.preventDefault(); >+ UserSearchPopup(); >+ }); >+ >+ $(".transfer_order").on("click",function(e){ >+ e.preventDefault(); >+ transfer_order_popup( $(this).data("ordernumber")); >+ }); >+ }); >+ </script> >+ >+ [% UNLESS ( closedate ) %] >+ <script type="text/javascript"> >+ function transfer_order_popup(ordernumber) { >+ var url = "/cgi-bin/koha/acqui/transferorder.pl?" >+ + "ordernumber=" + ordernumber >+ window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes'); >+ } >+ >+ function confirm_ediorder() { >+ var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?")); >+ if (is_confirmed) { >+ window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno |html %]"; >+ } >+ } >+ </script> >+ [% ELSE %] >+ <script type="text/javascript"> >+ $(document).ready(function(){ >+ $("#basketgroupid").change(function(){ >+ if($(this).val() == "new"){ >+ location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]"; >+ } >+ }); >+ }); >+ </script> >+ [% UNLESS ( grouped ) %] >+ <script type="text/javascript"> >+ function confirm_reopen() { >+ var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %]; >+ var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?")); >+ if (is_confirmed) { >+ window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno |html %]"; >+ } >+ } >+ </script> >+ [% END %] >+ [% END %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sPaginationType": "four_button", >+ [% IF ( active ) %] >+ "aoColumnDefs": [ >+ [% UNLESS ( closedate ) %] >+ { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, >+ [% END %] >+ { "sType": "anti-the", "aTargets": [ "anti-the" ] } >+ ], >+ [% END %] >+ } ) ); >+ var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sPaginationType": "four_button" >+ } ) ); >+ $("#reopenbutton").on("click",function(e){ >+ e.preventDefault(); >+ confirm_reopen(); >+ }); >+ // Generates a dynamic link for exporting the selections data as CSV >+ $("#exportbutton, #export-csv-menu a").click(function() { >+ // Building the url from currently checked boxes >+ var url = '/cgi-bin/koha/acqui/basket.pl'; >+ url += $('#exportbutton').attr('href'); >+ if($(this).attr("data-value")) { >+ url += '&csv_profile=' + $(this).attr("data-value"); >+ } >+ // And redirecting to the CSV page >+ location.href = url; >+ return false; >+ }); >+ }); >+ >+ function UserSearchPopup(f) { >+ window.open( >+ "/cgi-bin/koha/acqui/add_user_search.pl", >+ 'UserSearchPopup', >+ 'width=840, height=500, scrollbars=yes, toolbar=no,' >+ ); >+ } >+ >+ function add_user(borrowernumber, borrowername) { >+ var ids = $("#users_ids").val(); >+ if(ids.length > 0) { >+ ids = ids.split(':'); >+ } else { >+ ids = new Array; >+ } >+ if (ids.indexOf(borrowernumber) < 0) { >+ ids.push(borrowernumber); >+ $("#users_ids").val(ids.join(':')); >+ var li = '<li id="user_'+borrowernumber+'">'+borrowername >+ + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> ' >+ + _("Delete user") + '</a></li>'; >+ $("#users_names").append(li); >+ return 0; >+ } >+ return -1; >+ } >+ >+ function del_user(borrowernumber) { >+ $("#user_"+borrowernumber).remove(); >+ var ids = $("#users_ids").val().split(':'); >+ ids.splice(ids.indexOf(borrowernumber.toString()), 1); >+ $("#users_ids").val(ids.join(':')); >+ } >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt >index 13917cf..351e525 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt >@@ -1,5 +1,6 @@ > [% USE Branches %] > [% USE Koha %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › > [% IF ( add_form ) %] >@@ -9,8 +10,8 @@ > [% END %] > </title> > [% INCLUDE 'doc-head-close.inc' %] >-<script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script> > </head> >+ > <body id="acq_basketheader" class="acq"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'acquisitions-search.inc' %] >@@ -139,4 +140,9 @@ > </div> > </div> > >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script> >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >index e8acf39..ec756f3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >@@ -1,4 +1,5 @@ > [% USE KohaDates %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Search for vendor [% supplier %]</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -8,49 +9,8 @@ > } > </style> > <link rel="stylesheet" href="[% interface %]/[% theme %]/css/datatables.css" /> >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript"> >-//<![CDATA[ >-$(document).ready(function() { >- $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, { >- 'sDom': 't', >- 'bPaginate': false, >- 'bFilter': false, >- 'bInfo': false, >- "aaSorting": [[ 1, "asc" ]], >- "aoColumnDefs": [ >- { "sType": "title-string", "aTargets" : [ "title-string" ] }, >- { "sType": "title-numeric", "aTargets" : [ "title-numeric" ] }, >- { 'aTargets': [-1], 'bSortable': false } >- ] >- })); >- $("#supplierlist").change(function() { >- var id = $(this).find("option:selected").val(); >- window.location.href = "#" + id; >- }); >- $(".modal").on("show", function(){ >- var basket = $(this).data("basketno"); >- var legend = _("Add order to basket %s").format(basket); >- $(this).find("legend").html(legend); >- }); >- $("#show_all_vendors").hide(); >- $("#show_active_vendors").on('click', function(e){ >- e.preventDefault(); >- $(".inactive").hide(); >- $("#show_active_vendors").hide(); >- $("#show_all_vendors").show(); >- }); >- $("#show_all_vendors").on('click', function(e){ >- e.preventDefault(); >- $(".inactive").show(); >- $("#show_all_vendors").hide(); >- $("#show_active_vendors").show(); >- }); >-}); >-//]]> >-</script> >- > </head> >+ > <body id="acq_booksellers" class="acq"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'acquisitions-search.inc' %] >@@ -222,4 +182,48 @@ $(document).ready(function() { > [% INCLUDE 'acquisitions-menu.inc' %] > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script> >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, { >+ 'sDom': 't', >+ 'bPaginate': false, >+ 'bFilter': false, >+ 'bInfo': false, >+ "aaSorting": [[ 1, "asc" ]], >+ "aoColumnDefs": [ >+ { "sType": "title-string", "aTargets" : [ "title-string" ] }, >+ { "sType": "title-numeric", "aTargets" : [ "title-numeric" ] }, >+ { 'aTargets': [-1], 'bSortable': false } >+ ] >+ })); >+ $("#supplierlist").change(function() { >+ var id = $(this).find("option:selected").val(); >+ window.location.href = "#" + id; >+ }); >+ $(".modal").on("show", function(){ >+ var basket = $(this).data("basketno"); >+ var legend = _("Add order to basket %s").format(basket); >+ $(this).find("legend").html(legend); >+ }); >+ $("#show_all_vendors").hide(); >+ $("#show_active_vendors").on('click', function(e){ >+ e.preventDefault(); >+ $(".inactive").hide(); >+ $("#show_active_vendors").hide(); >+ $("#show_all_vendors").show(); >+ }); >+ $("#show_all_vendors").on('click', function(e){ >+ e.preventDefault(); >+ $(".inactive").show(); >+ $("#show_all_vendors").hide(); >+ $("#show_active_vendors").show(); >+ }); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt >index 80affbe..b1e4eed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt >@@ -1,45 +1,14 @@ > [% USE KohaDates %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › EDIFACT messages</title> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript"> >-$(document).ready(function() { >- $('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, { >- 'aaSorting': [[1, "desc" ]], >- 'sPaginationType': "four_button", >- "aoColumnDefs": [ >- { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] } >- ] >- })); >- >- var EDIModal = $("#EDI_modal"); >- var EDIModalBody = $("#EDI_modal .modal-body"); >- >- $(".view_message").on("click", function(e){ >- e.preventDefault(); >- var page = $(this).attr("href"); >- EDIModalBody.load(page + " #edimsg"); >- EDIModal.modal("show"); >- }); >- EDIModal.on("click",".closebtn",function(e){ >- e.preventDefault(); >- EDIModal.modal("hide"); >- }); >- EDIModal.on("hidden", function(){ >- EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); >- }); >- $(".delete_msg").on("click",function(){ >- return confirm(_("Are you sure you want to delete this message?")); >- }); >-}); >-</script> > <style type="text/css"> > #EDI_modal { width : 80%; } @media (max-width: 767px) { #EDI_modal { margin: 0; width : auto; } } > </style> > </head> >+ > <body id="acq_edifactmsgs" class="acq"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'acquisitions-search.inc' %] >@@ -139,4 +108,42 @@ $(document).ready(function() { > [% INCLUDE 'acquisitions-menu.inc' %] > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script> >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ $('#edi_msgs').dataTable($.extend(true, {}, dataTablesDefaults, { >+ 'aaSorting': [[1, "desc" ]], >+ 'sPaginationType': "four_button", >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ { "sType": "title-string", "aTargets" : [ "title-string" ] } >+ ] >+ })); >+ >+ var EDIModal = $("#EDI_modal"); >+ var EDIModalBody = $("#EDI_modal .modal-body"); >+ >+ $(".view_message").on("click", function(e){ >+ e.preventDefault(); >+ var page = $(this).attr("href"); >+ EDIModalBody.load(page + " #edimsg"); >+ EDIModal.modal("show"); >+ }); >+ EDIModal.on("click",".closebtn",function(e){ >+ e.preventDefault(); >+ EDIModal.modal("hide"); >+ }); >+ EDIModal.on("hidden", function(){ >+ EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); >+ }); >+ $(".delete_msg").on("click",function(){ >+ return confirm(_("Are you sure you want to delete this message?")); >+ }); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >index a3ef54a..2b07a3f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >@@ -1,40 +1,12 @@ > [% USE KohaDates %] > [% USE ColumnsSettings %] >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › [% IF ( order_loop ) %]Orders search › Search results[% ELSE %]Order search[% END %]</title> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'calendar.inc' %] >-[% INCLUDE 'datatables.inc' %] >-[% INCLUDE 'columns_settings.inc' %] >- >-<script type="text/javascript" src="[% interface %]/js/autocomplete/patrons.js"></script> >-<script type="text/javascript"> >-//<![CDATA[ >-var MSG_REMOVE_PATRON = _("Remove"); >- $(document).ready(function() { >- var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) %]; >- KohaTable("#histsearcht", { >- "aoColumnDefs": [ >- { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] } >- ], >- "sPaginationType": "four_button" >- }, columns_settings ); >- >- [% UNLESS order_loop %] >- patron_autocomplete({ >- patron_container: $("#basket_creators"), >- input_autocomplete: $("#find_patron"), >- patron_input_name: 'created_by', >- field_to_retrieve: 'borrowernumber' >- }); >- [% END %] >-}); >- >- //]]> >-</script> > </head> >+ > <body id="acq_histsearch" class="acq"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'acquisitions-search.inc' %] >@@ -233,4 +205,35 @@ var MSG_REMOVE_PATRON = _("Remove"); > [% INCLUDE 'acquisitions-menu.inc' %] > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script> >+[% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] >+ <script type="text/javascript" src="[% interface %]/js/autocomplete/patrons.js"></script> >+ <script type="text/javascript"> >+ var MSG_REMOVE_PATRON = _("Remove"); >+ $(document).ready(function() { >+ var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) %]; >+ KohaTable("#histsearcht", { >+ "aoColumnDefs": [ >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >+ { "sType": "title-string", "aTargets" : [ "title-string" ] } >+ ], >+ "sPaginationType": "four_button" >+ }, columns_settings ); >+ >+ [% UNLESS order_loop %] >+ patron_autocomplete({ >+ patron_container: $("#basket_creators"), >+ input_autocomplete: $("#find_patron"), >+ patron_input_name: 'created_by', >+ field_to_retrieve: 'borrowernumber' >+ }); >+ [% END %] >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >index 92c31fe..49ecac7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >@@ -1,30 +1,11 @@ > [% USE KohaDates %] >- >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › Invoice › Files</title> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript"> >-//<![CDATA[ >- $(document).ready(function() { >- $("#invoice_files_details_table").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumnDefs": [ >- { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, >- { "aTargets": [ "title-string" ], "sType": "title-string" } >- ], >- bInfo: false, >- bPaginate: false, >- bFilter: false, >- sDom: "t" >- })); >- $("a.delete_file").click(function(){ >- return ( confirm( _("Are you sure you want to delete this file ?") ) ); >- }); >- }); >-//]]> >-</script> > </head> >+ > <body id="acq_invoice_files" class="acq"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'acquisitions-search.inc' %] >@@ -102,4 +83,27 @@ > [% INCLUDE 'acquisitions-menu.inc' %] > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script> >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript"> >+ $(document).ready(function() { >+ $("#invoice_files_details_table").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, >+ { "aTargets": [ "title-string" ], "sType": "title-string" } >+ ], >+ bInfo: false, >+ bPaginate: false, >+ bFilter: false, >+ sDom: "t" >+ })); >+ $("a.delete_file").click(function(){ >+ return ( confirm( _("Are you sure you want to delete this file ?") ) ); >+ }); >+ }); >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >index ba56547..3f61443 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >@@ -1,57 +1,11 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE Price %] >- >+[% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › Invoice</title> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > [% INCLUDE 'doc-head-close.inc' %] >-[% INCLUDE 'calendar.inc' %] >-[% INCLUDE 'datatables.inc' %] >-<script type="text/javascript"> >-//<![CDATA[ >- function updateColumnsVisibility(visible) { >- if ( visible ) { >- $("table .tax_excluded, .tax_included").show(); >- } else { >- [% IF ( invoiceincgst ) %] >- $("table .tax_excluded").hide(); >- [% ELSE %] >- $("table .tax_included").hide(); >- [% END %] >- } >- } >- >- $(document).ready(function() { >- $("#orderst").dataTable($.extend(true, {}, dataTablesDefaults, { >- bInfo: false, >- bPaginate: false, >- bFilter: false, >- sDom: "t", >- "aoColumnDefs": [ >- { "sType": "anti-the", "aTargets": [ "anti-the" ] } >- ] >- })); >-[% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %] >- $("#invoice_files_table").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumnDefs": [ >- { "aTargets": [ "title-string" ], "sType": "title-string" } >- ], >- bInfo: false, >- bPaginate: false, >- bFilter: false, >- sDom: "t" >- })); >-[% END %] >- $("#show_all_details").click(function(){ >- updateColumnsVisibility( $(this).is(":checked") ); >- }); >- >- $("#show_all_details").prop('checked', false); >- updateColumnsVisibility(false); >- }); >-//]]> >-</script> > </head> > > <body id="acq_invoice" class="acq"> >@@ -254,4 +208,54 @@ > [% INCLUDE 'acquisitions-menu.inc' %] > </div> > </div> >+ >+[% MACRO jsinclude BLOCK %] >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script> >+ [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'datatables.inc' %] >+ <script type="text/javascript"> >+ function updateColumnsVisibility(visible) { >+ if ( visible ) { >+ $("table .tax_excluded, .tax_included").show(); >+ } else { >+ [% IF ( invoiceincgst ) %] >+ $("table .tax_excluded").hide(); >+ [% ELSE %] >+ $("table .tax_included").hide(); >+ [% END %] >+ } >+ } >+ >+ $(document).ready(function() { >+ $("#orderst").dataTable($.extend(true, {}, dataTablesDefaults, { >+ bInfo: false, >+ bPaginate: false, >+ bFilter: false, >+ sDom: "t", >+ "aoColumnDefs": [ >+ { "sType": "anti-the", "aTargets": [ "anti-the" ] } >+ ] >+ })); >+ [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %] >+ $("#invoice_files_table").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ "title-string" ], "sType": "title-string" } >+ ], >+ bInfo: false, >+ bPaginate: false, >+ bFilter: false, >+ sDom: "t" >+ })); >+ [% END %] >+ $("#show_all_details").click(function(){ >+ updateColumnsVisibility( $(this).is(":checked") ); >+ }); >+ >+ $("#show_all_details").prop('checked', false); >+ updateColumnsVisibility(false); >+ }); >+ >+ </script> >+[% END %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.7.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 19753
:
69532
|
69795
|
70081
|
70082
|
70123
|
70124
|
70128
|
70129
|
70130