From 76966a6eebdb696c3f9fd9b1d0b369820c093cc2 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 14 Feb 2014 12:52:34 -0500 Subject: [PATCH] Bug 11765 - Remove unused function isDate from templates Content-Type: text/plain; charset="utf-8" Several administration templates declare but do not use the JavaScript function isDate(). This patch removes the declarations. To test, apply the patch and search for instances of "isDate" in Koha templates, includes, and JavaScript files. There should be no results. --- .../prog/en/modules/admin/auth_tag_structure.tt | 7 ------- .../prog/en/modules/admin/categorie.tt | 7 ------- .../prog/en/modules/admin/itemtypes.tt | 7 ------- .../prog/en/modules/admin/printers.tt | 7 ------- .../prog/en/modules/admin/roadtype.tt | 7 ------- .../prog/en/modules/admin/systempreferences.tt | 7 ------- .../prog/en/modules/admin/z3950servers.tt | 7 ------- .../intranet-tmpl/prog/en/modules/tools/letter.tt | 17 ++--------------- 8 files changed, 2 insertions(+), 64 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt index 7ecb565..f8c3910 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt @@ -39,13 +39,6 @@ return false; return true; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - function isDate(f) { - var t = Date.parse(f.value); - if (isNaN(t)) { - return false; - } - } - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// function Check(f) { var ok=1; var _alertString=""; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt index 49b359a..b9e6740 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt @@ -45,13 +45,6 @@ } return true; } - // - function isDate(f) { - var t = Date.parse(f.value); - if (isNaN(t)) { - return false; - } - } // to check if the data are correctly entered. function Check(ff) { var ok=0; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt index 2e25cdc..0c1d368 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -41,13 +41,6 @@ if (maybenull==0 && v.value=='') { return true; } -function isDate(f) { - var t = Date.parse(f.value); - if (isNaN(t)) { - return false; - } -} - function Check(f) { var ok=1; var _alertString=""; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt index 5206eab..151e8d6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt @@ -27,13 +27,6 @@ return true; } // - function isDate(f) { - var t = Date.parse(f.value); - if (isNaN(t)) { - return false; - } - } - // function Check(f) { var ok=1; var _alertString=""; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt index b542682..526b445 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt @@ -22,13 +22,6 @@ return true; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// - function isDate(f) { - var t = Date.parse(f.value); - if (isNaN(t)) { - return false; - } - } - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// function Check(f) { var ok=1; var _alertString=""; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt index 0adab30..6ca3274 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt @@ -47,13 +47,6 @@ return true; } // - function isDate(f) { - var t = Date.parse(f.value); - if (isNaN(t)) { - return false; - } - } - // function Check(f) { var ok=1; var _alertString=""; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt index 1f5bbdd..a1dc45f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt @@ -32,13 +32,6 @@ return true; } // - function isDate(f) { - var t = Date.parse(f.value); - if (isNaN(t)) { - return false; - } - } - // function Check(f) { var ok=1; var _alertString=""; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 95c55e5..d4c864b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -38,13 +38,7 @@ $(document).ready(function() { } return true; } - - function toUC(f) { - var x=f.value.toUpperCase(); - f.value=x; - return true; - } - + function isNum(v,maybenull) { var n = new Number(v.value); if (isNaN(n)) { @@ -55,14 +49,7 @@ $(document).ready(function() { } return true; } - - function isDate(f) { - var t = Date.parse(f.value); - if (isNaN(t)) { - return false; - } - } - + function Check(f) { var ok=1; var _alertString=""; -- 1.7.9.5