From 2c1f73624954ba8d0da76fa3a2f56be05dce9443 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 14 Mar 2013 14:42:07 +0100 Subject: [PATCH] Bug 9294 [Follow-up] Move JavaScript out of circulation template Content-Type: text/plain; charset="utf-8" This patch corrects a JavaScript error in the original patch caused by an incorrectly named variable. Instead of correcting the name I'm removing the error-handling around missing CSV profiles alltogether in favor of Jonathan's suggestion to simply hide the CSV option if no formats are specified. To test this follow-up perform exports of checkouts with ExportRemoveFields filled and with ExportWithCsvProfile both empty and not empty. --- .../intranet-tmpl/prog/en/js/pages/circulation.js | 3 --- .../prog/en/modules/circ/circulation.tt | 6 ++---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js index 8285cde..b64d7f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js @@ -112,9 +112,6 @@ function export_checkouts(format) { $("#dont_export_item").val(0); } else if (format == 'iso2709') { $("#dont_export_item").val(1); - } else if (format === '') { - alert(MSG_DEFINE_CSV_FORMAT); - return false; } document.issues.action="/cgi-bin/koha/tools/export.pl"; document.getElementById("export_format").value = format; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index f83fe25..fcd87d3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -16,7 +16,7 @@ // CSV export profiles) and fill the 'ExportWithCsvProfile' system preference"); + [% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %] [% IF ( UseTablesortForCirc ) %]$.tablesorter.addParser({ id: 'articles', @@ -813,9 +813,7 @@ No patron matched [% message %] [% IF ( export_with_csv_profile ) %] - - [% ELSE %] - + [% END %] -- 1.7.9.5