From 2d8d39e2053b48ab44f47ac7e47c7b7b688a61b5 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 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. Signed-off-by: Chris Cormack --- .../prog/en/modules/admin/auth_tag_structure.tt | 7 ------- .../intranet-tmpl/prog/en/modules/admin/categorie.tt | 7 ------- .../intranet-tmpl/prog/en/modules/admin/itemtypes.tt | 7 ------- .../intranet-tmpl/prog/en/modules/admin/printers.tt | 7 ------- .../intranet-tmpl/prog/en/modules/admin/roadtype.tt | 7 ------- .../prog/en/modules/admin/systempreferences.tt | 7 ------- .../intranet-tmpl/prog/en/modules/admin/z3950servers.tt | 7 ------- koha-tmpl/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 aed41b6..40ea853 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 @@ -45,13 +45,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 ce7f014..b8a41b8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt @@ -51,13 +51,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 57847eb..ea9c7ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -47,13 +47,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 6edc88f..4f96690 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt @@ -33,13 +33,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 ad491fd..20d37f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt @@ -28,13 +28,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 e903038..c41dc5e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt @@ -53,13 +53,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 915e531..7c28ab5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt @@ -38,13 +38,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.8.5.3