From 3637818a94eb58776b9196b0a999a70a50376132 Mon Sep 17 00:00:00 2001 From: Indranil Das Gupta Date: Thu, 28 Aug 2014 00:24:36 +0000 Subject: [PATCH] Bug 12815 [ENH] Patch 4 of 4 - Add jQuery.IME support to staff client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fourth patch in the set and should be applied in that sequence. Adds UsejQueryIMEonStaff syspref and updates sysprefs.sql and updatedatabase.pl accordingly. Also updates i18n_l10n.pref, by adding UsejQueryIMEonStaff under Multi-lingual keyboard sub-section. Test Plan: 1) Apply patch 2) Update the database (so that the new system preference is inserted) 3) Go to Administration -> System Preferences -> I18N/L10N in the staff client. 4) Under "Multi-Lingual keyboard", "Enable" the UsejQueryIMEonStaff system preference. Open the refresh the staff client window and click inside any input text or textarea field after the page loads. You should see small keyboard graphics attached to the bottom right edge of the text field. 5) Click on the keyboard graphics to expand the drop-down. Select your language. The drop-down will close. 6) Click again on the keyboard icon, it should now offer the list of input methods available for the language selected in step 5. 7) You should be able to type in your chosen input method. To switch back to English while on that page press CTRL+M. This toggles between input methods while on the page. 8) Repeating step #4 about to select "Do not enable", should disable jQuery.IME support for the staff client. NOTE 1: For a language to work, the operating system should have UTF-8 support and in the case of Indic and other asian languages Complex layout rendering support and the necessary fonts. Followed test plan. Behaves as expected. Small typo in preferences (i18n_l10n.pref): It should read "Do not enable" (missing t). Can this be fixed with a follow up? Signed-off-by: Marc VĂ©ron --- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 7 +++++++ .../intranet-tmpl/prog/en/includes/doc-head-close.inc | 17 +++++++++++++++++ .../prog/en/modules/admin/preferences/i18n_l10n.pref | 8 ++++++++ 4 files changed, 33 insertions(+) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 0244f45..b9eb808 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -426,6 +426,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('useDaysMode','Calendar','Calendar|Days|Datedue','Choose the method for calculating due date: select Calendar to use the holidays module, and Days to ignore the holidays module','Choice'), ('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'), ('UsejQueryIMEonOPAC','0','','If ON, enables browser based, multi-lingual jQuery.ime based input methods on the OPAC','YesNo'), +('UsejQueryIMEonStaff','0','','If ON, enables browser based, multi-lingual jQuery.ime based input methods on the staff client','YesNo'), ('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'), ('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'), ('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9e479c5..81ffa4a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8676,6 +8676,13 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.17.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('UsejQueryIMEonStaff','0','','If ON, enables browser based, multi-lingual jQuery.ime based input methods on the Staff client','YesNo')"); + print "Upgrade to $DBversion done (Bug 12815 - Adding support of jquery.ime to Koha staff client)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc index f6269de..83a3efa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc @@ -3,6 +3,12 @@ + +[% USE Koha %] +[% IF ( Koha.Preference('UsejQueryIMEonStaff') ) %] + +[% END %] + [% INCLUDE intranetstylesheet.inc %] [% IF ( bidi ) %] @@ -16,6 +22,17 @@ +[% IF ( Koha.Preference('UsejQueryIMEonStaff') ) %] + + +[% END %] + [% IF ( login ) %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref index 411bca8..95227a7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref @@ -58,3 +58,11 @@ I18N/L10N: yes: Enable no: "Do no enable" - on the OPAC. + - + - "Enable jQuery.IME " + - pref: UsejQueryIMEonStaff + default: 0 + choices: + yes: Enable + no: "Do no enable" + - on the staff client. -- 1.7.10.4