Bugzilla – Attachment 31223 Details for
Bug 12815
Adding browser based multi-lingual jquery.ime input method support to Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12815 [ENH] Patch 4 of 4 - Add jQuery.IME support to staff client
Bug-12815-ENH-Patch-4-of-4---Add-jQueryIME-support.patch (text/plain), 6.39 KB, created by
Marc Véron
on 2014-08-28 06:42:05 UTC
(
hide
)
Description:
Bug 12815 [ENH] Patch 4 of 4 - Add jQuery.IME support to staff client
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2014-08-28 06:42:05 UTC
Size:
6.39 KB
patch
obsolete
>From 3637818a94eb58776b9196b0a999a70a50376132 Mon Sep 17 00:00:00 2001 >From: Indranil Das Gupta <indradg@gmail.com> >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 <veron@veron.ch> >--- > 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 @@ > <link rel="stylesheet" type="text/css" href="[% interface %]/lib/jquery/jquery-ui.css" /> > <link rel="stylesheet" type="text/css" href="[% interface %]/lib/bootstrap/bootstrap.min.css" /> > <link rel="stylesheet" type="text/css" media="print" href="[% themelang %]/css/print.css" /> >+ >+[% USE Koha %] >+[% IF ( Koha.Preference('UsejQueryIMEonStaff') ) %] >+<link rel="stylesheet" type="text/css" href="[% interface %]/lib/jquery.ime/css/jquery.ime.css" /> >+[% END %] >+ > [% INCLUDE intranetstylesheet.inc %] > [% IF ( bidi ) %] > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/right-to-left.css" /> >@@ -16,6 +22,17 @@ > <script type="text/javascript" src="[% interface %]/lib/bootstrap/bootstrap.min.js"></script> > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.validate.min.js"></script> > >+[% IF ( Koha.Preference('UsejQueryIMEonStaff') ) %] >+<script type="text/javascript" src="[% interface %]/lib/jquery.ime/jquery.ime.min.js"></script> >+<script type="text/javascript"> >+//<![CDATA[ >+ $( document ).ready( function () { >+ $( "input:text, textarea" ).ime(); >+ } ); >+//]]> >+</script> >+[% END %] >+ > [% IF ( login ) %] > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/login.css" /> > [% 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
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 12815
:
31152
|
31173
|
31174
|
31175
|
31176
|
31177
|
31179
|
31218
|
31219
|
31220
|
31221
|
31223
|
31231
|
31232
|
31233
|
31238