From 8f8b6a4b36a995c66979ac69f3d198a8d794f48f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 1 Aug 2016 10:20:00 -0400 Subject: [PATCH] Bug 17011 - Remove "onblur" event attribute from some templates Content-Type: text/plain; charset="utf-8" Several templates have an "onblur" event attribute in the markup. This patch moves the onblur event definition into the JavaScript. To test, apply the patch and clear your browser cache if necessary. In Administration -> Authority types: - Choose "New authority type." - Enter any text into the "Authority type" field. - Moving the cursor focus away from this field should convert your text to uppercase. In Administration -> MARC bibliographic framework: - Choose "New framework." - Enter any text into the "Framework code" field. - Moving the cursor focus away from this field should convert your text to uppercase. In Administration -> Currencies and exchange rates: - Choose "New currency." - Enter any text into the "Currency" field. - Moving the cursor focus away from this field should convert your text to uppercase. In Administration -> Item types - Choose "New item type." - Enter any text into the "Item type" field. - Moving the cursor focus away from this field should convert your text to uppercase. --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt | 5 ++++- koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt | 5 ++++- koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt | 5 ++++- koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js | 5 ++++- 5 files changed, 17 insertions(+), 5 deletions(-) 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 9c7d419..7cad110 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt @@ -18,6 +18,9 @@ ], "sPaginationType": "four_button" })); + $("#authtypecode").on("blur",function(){ + toUC(this); + }); }); //]]> @@ -85,7 +88,7 @@ [% authority_type.authtypecode %] [% ELSE %] - + Required [% END %] 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 ebf449c..50cd4b2 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 @@ -86,7 +86,7 @@ [% ELSE %]
  • - + Required
  • [% END %] 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 90c828b..1bbacf2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt @@ -38,6 +38,9 @@ check_currency( $(this).val() ); }); check_currency( $("#rate").val() ); + $("#currency_code").on("blur",function(){ + toUC(this); + }); }); //]]> @@ -108,7 +111,7 @@ [% currency.currency %] [% ELSE %] - Required + Required [% END %]
  • 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 9a8f431..95bbb7b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -43,6 +43,9 @@ Data deleted rentalcharge: { number: true } } }); + $("#itemtype").on("blur",function(){ + toUC(this); + }); }); //]]> @@ -134,7 +137,7 @@ Item types administration [% ELSE %]
  • - Required + Required
  • [% END %]
  • diff --git a/koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js b/koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js index 581c392..171cb83 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js +++ b/koha-tmpl/intranet-tmpl/prog/js/biblio_framework.js @@ -73,4 +73,7 @@ obj.css("background-color","white"); return false; }); - }); \ No newline at end of file + $("#frameworkcode").on("blur",function(){ + toUC(this); + }); + }); -- 2.1.4