Bugzilla – Attachment 25327 Details for
Bug 11764
Move repeatedly redefined function toUC() into staff-global.js
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11764 - Move repeatedly redefined function toUC() into staff-global.js
Bug-11764---Move-repeatedly-redefined-function-toU.patch (text/plain), 9.73 KB, created by
Chris Cormack
on 2014-02-16 21:11:53 UTC
(
hide
)
Description:
Bug 11764 - Move repeatedly redefined function toUC() into staff-global.js
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2014-02-16 21:11:53 UTC
Size:
9.73 KB
patch
obsolete
>From 031791e57af9a0d2f6e5257c1c32aebc8abcc405 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 14 Feb 2014 12:22:19 -0500 >Subject: [PATCH] Bug 11764 - Move repeatedly redefined function toUC() into > staff-global.js > >toUC() is repeatedly declared on many administration templates. This >function, used to transform user input to uppercase, can be added to >staff-global.js to prevent repetition. > >To test, confirm that transformation to uppercase is working on the >following Administration pages when text is entered in a form field and >focus is moved to the next field: > >- Authority types -> New: Test the "Authority type" field. >- MARC bibliographic framework -> New framework: Test the "Framework > code" field. >- Patron types and categories -> New category: Test the "Category code" > field. >- Currencies and exchange rates -> New currency: Test the "Currency" > field. >- Item types -> New item type: Test the "Item type" field. >- Z39.50 client targets -> New Z39.50 server: Test the "Z39.50 server" > field. > >The following pages do not call the toUC function despite the fact that >they included it: > >auth_tag_structure.tt >printers.tt >roadtype.tt >stopwords.tt >systempreferences.tt > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 6 ++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt | 6 ------ > koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt | 6 ------ > koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt | 4 ---- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt | 6 ------ > koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt | 5 ----- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt | 6 ------ > koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt | 6 ------ > koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt | 6 ------ > koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tt | 5 ----- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt | 6 ------ > koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt | 6 ------ > 12 files changed, 6 insertions(+), 62 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >index 234a871..c97007f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >@@ -86,3 +86,9 @@ function openWindow(link,name,width,height) { > function removeFocus() { > $(':focus').blur(); > } >+ >+function toUC(f) { >+ var x=f.value.toUpperCase(); >+ f.value=x; >+ return true; >+} >\ No newline at end of file >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..7ecb565 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 >@@ -28,12 +28,6 @@ return false; > 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)) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt >index dab813e..7823108 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt >@@ -17,12 +17,6 @@ function isNotNull(f,noalert) { > return true; > } > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// >-function toUC(f) { >- var x=f.value.toUpperCase(); >- f.value=x; >- return true; >-} >-///////////////////////////////////////////////////////////////////////////////////////////////////////////////// > function Check(f) { > var _alertString=""; > var alertString2; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >index e6ce9d8..ec458b3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >@@ -16,10 +16,6 @@ function isNotNull(f,noalert) { > } > return true; > } >-function toUC(f) { >- f.value = f.value.toUpperCase(); >- return true; >-} > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// > function Check(f) { > var ok=1; >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..49b359a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt >@@ -35,12 +35,6 @@ > 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)) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt >index 99f693b..def9a02 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt >@@ -7,11 +7,6 @@ > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript"> > //<![CDATA[ >- function toUC(f) { >- var x=f.value.toUpperCase(); >- f.value=x; >- return true; >- } > function Check(f) { > var _alertString=""; > var alertString2; >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..2e25cdc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >@@ -30,12 +30,6 @@ function isNotNull(f,noalert) { > 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)) { >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..5206eab 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt >@@ -16,12 +16,6 @@ > 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)) { >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..b542682 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt >@@ -11,12 +11,6 @@ > 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)) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tt >index 5b53dc0..6ba5697 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tt >@@ -12,11 +12,6 @@ > $(document).ready(function() { > new YAHOO.widget.Button("newstopword"); > }); >- function toUC(f) { >- var x=f.value.toUpperCase(); >- f.value=x; >- return true; >- } > function Check(f) { > if (f.word.value.length==0) { > alert(_("Form not submitted: word missing")); >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..0adab30 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tt >@@ -36,12 +36,6 @@ > 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)) { >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..1f5bbdd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >@@ -21,12 +21,6 @@ > 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)) { >-- >1.8.5.3
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 11764
:
25283
|
25327
|
25336