Bugzilla – Attachment 25337 Details for
Bug 11765
Remove unused function isDate from templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11765 - Remove unused function isDate from templates
Bug-11765---Remove-unused-function-isDate-from-tem.patch (text/plain), 6.68 KB, created by
Jonathan Druart
on 2014-02-17 08:49:38 UTC
(
hide
)
Description:
Bug 11765 - Remove unused function isDate from templates
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-02-17 08:49:38 UTC
Size:
6.68 KB
patch
obsolete
>From 4d0d87864886964429257ea0adb732c0b5ea68af Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <chris@bigballofwax.co.nz> >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >I'm not sure this function has ever been used. >This patch removes the toUC in tools/letter.tt too. >--- > .../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 ------- > .../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 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.7.10.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 11765
:
25288
|
25328
| 25337