From 6d4a87f7122d420fc9390b13c1ca8f5f8b57d8a4 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Frédéric Demians Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 7293d812904ec0bae78d5ced5afd6c879063912f) Signed-off-by: Frédéric Demians --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt | 5 ++++- .../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 9c7d4196e3..7cad110280 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 ebf449c1c7..50cd4b2133 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 90c828ba8d..1bbacf2d6e 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 9a8f43171c..95bbb7b04b 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 581c392bfd..171cb8381a 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.39.5