Bug 11764 - Move repeatedly redefined function toUC() into staff-global.js
Summary: Move repeatedly redefined function toUC() into staff-global.js
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 11765 11766 11767 11769 11770 11771
  Show dependency treegraph
 
Reported: 2014-02-14 17:21 UTC by Owen Leonard
Modified: 2014-12-07 20:05 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 11764 - Move repeatedly redefined function toUC() into staff-global.js (9.56 KB, patch)
2014-02-14 17:37 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11764 - Move repeatedly redefined function toUC() into staff-global.js (9.73 KB, patch)
2014-02-16 21:11 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 11764 - Move repeatedly redefined function toUC() into staff-global.js (9.85 KB, patch)
2014-02-17 08:43 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2014-02-14 17:21:37 UTC
In many admin templates there is a "toUC" function is redeclared, used to transform input into uppercase. This small function can be moved into staff-global.js to avoid repetition.
Comment 1 Owen Leonard 2014-02-14 17:37:18 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2014-02-16 21:11:53 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2014-02-17 08:43:49 UTC
Created attachment 25336 [details] [review]
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>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
tools/letter.pl declares this js function and don't use it.
Comment 4 Galen Charlton 2014-02-18 20:52:04 UTC
Pushed to master.  Thanks, Owen!
Comment 5 Fridolin Somers 2014-05-19 14:14:12 UTC
Pushed to 3.14.x, will be in 3.14.07.