Bugzilla – Attachment 2405 Details for
Bug 5048
Error in bottom menu/submenu for select language in intranet
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix for 3.0.x
0001-Fix-for-Bug-5048-Error-in-menu-submenu-for-select-la.patch (text/plain), 4.02 KB, created by
Owen Leonard
on 2010-07-21 19:30:30 UTC
(
hide
)
Description:
Proposed fix for 3.0.x
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-07-21 19:30:30 UTC
Size:
4.02 KB
patch
obsolete
>From 14d76410f5a2ba141418f7149bbf516419e94201 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 21 Jul 2010 15:24:23 -0400 >Subject: [PATCH] Fix for Bug 5048, Error in menu/submenu for select language in intranet >Content-Type: text/plain; charset="utf-8" > >Patch for 3.0.x. This issue was apparently solved quite a while >ago in the OPAC. This patch copies that solution over to the staff client. >--- > .../prog/en/includes/intranet-bottom.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 55 ++++++++++---------- > 2 files changed, 28 insertions(+), 29 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc >index 78334b2..839c176 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc >@@ -7,7 +7,7 @@ > <!-- TMPL_LOOP NAME="languages_loop" --> > <!-- TMPL_IF NAME="group_enabled" --> > <!-- TMPL_IF NAME="plural" --> >- <li class="more"><a id="showlang" href="#"><!-- TMPL_VAR NAME="native_description" --> (<!-- TMPL_VAR NAME="rfc4646_subtag" -->)</a><div id="sublangs"> >+ <li class="more"><a class="sublangs" id="show<!-- TMPL_VAR NAME="rfc4646_subtag" -->" href="#"><!-- TMPL_VAR NAME="native_description" --> (<!-- TMPL_VAR NAME="rfc4646_subtag" -->)</a><div id="sub<!-- TMPL_VAR NAME="rfc4646_subtag" -->"> > <div class="bd"><ul> > <!-- TMPL_LOOP NAME="sublanguages_loop" --> > <!-- TMPL_IF NAME="enabled" --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >index 7810bef..390d0ac 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >@@ -41,35 +41,34 @@ function _(s) { return s } // dummy function for gettext > YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMoremenu); > }); > >+// build Change Language menus > YAHOO.util.Event.onContentReady("changelanguage", function () { >- var oMenu = new YAHOO.widget.Menu("sublangs", { zindex: 2 }); >- >- function positionoMenu() { >- oMenu.align("bl", "tl"); >- } >- >- oMenu.subscribe("beforeShow", function () { >- if (this.getRoot() == this) { >- positionoMenu(); >- } >- }); >- >- oMenu.render(); >- >- oMenu.cfg.setProperty("context", ["showlang", "bl", "tl"]); >- >- function onYahooClick(p_oEvent) { >- // Position and display the menu >- positionoMenu(); >- oMenu.show(); >- // Stop propagation and prevent the default "click" behavior >- YAHOO.util.Event.stopEvent(p_oEvent); >- } >- >- YAHOO.util.Event.addListener("showlang", "click", onYahooClick); >- >- YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu); >- }); >+ $(".sublangs").each(function(){ >+ var menuid = $(this).attr("id"); >+ var menuid = menuid.replace("show",""); >+ >+ var oMenu = new YAHOO.widget.Menu("sub"+menuid, { zindex: 2 }); >+ function positionoMenu() { >+ oMenu.align("bl", "tl"); >+ } >+ oMenu.subscribe("beforeShow", function () { >+ if (this.getRoot() == this) { >+ positionoMenu(); >+ } >+ }); >+ oMenu.render(); >+ oMenu.cfg.setProperty("context", ["show"+menuid, "bl", "tl"]); >+ function onYahooClick(p_oEvent) { >+ // Position and display the menu >+ positionoMenu(); >+ oMenu.show(); >+ // Stop propagation and prevent the default "click" behavior >+ YAHOO.util.Event.stopEvent(p_oEvent); >+ } >+ YAHOO.util.Event.addListener("show"+menuid, "click", onYahooClick); >+ YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu); >+ }); >+}); > > // http://jennifermadden.com/javascript/stringEnterKeyDetector.html > function checkEnter(e){ //e is event object passed from function invocation >-- >1.7.0.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 5048
:
2400
|
2404
| 2405