The 'Comments' menu item in the Tools menu takes you to the 'Comments awaiting moderation' tab by default, and the menu item is bolded (looks active). When you click the 'Approved comments' tab, the menu item is not bold, but it should be.
Created attachment 58279 [details] [review] Bug 17794: 'Comments' in Tools menu is not showing as active To test: 1) Go to Tools -> Comments 2) Notice that the Comments menu item is not bold when you click on 'Approved comments' tab 3) Apply patch and refresh page 4) Comments menu item should now be bold when on either tab. Sponsored-by: Catalyst IT
I realised that this is actually a problem with the original javascript that is meant to make 'path + params' bold, but doesn't. Affects entire tools-menu and admin-menu. Patch coming
Created attachment 58328 [details] [review] Bug 17794: Menu items in Tools menu and Admin menu not showing bold when active but not on linked page To reproduce: admin-menu 1) Go to a page like admin/categories.pl 2) Click New Category 3) Notice Patron categories in the sidebar menu is no longer bold tools-menu 4) Go to a page like reviews/reviewswaiting.pl 5) Notice bold Comments in sidebar menu 6) Click Approved Comments tab 7) Notice no longer bold in sidebar menu To test: 8) Apply patch and refresh page 9) Follow above steps to reproduce bug, confirm that active links are always bold 10) Test with other links to confirm nothing has broken Special cases 11) Go To admin -> MARC bibliographic frameworks -> Actions for any framework -> MARC structure 12) Confirm sidebar menu link is still bold 13) Go to admin -> Authority types -> Actions for any auth type -> MARC structure 14) Confirm sidebar menu link is still bold 15) Go to admin -> OAI sets config -> Actions for any set -> Define mappings 16) Confirm sidebar menu link is still bold Sponsored-by: Catalyst IT
Created attachment 58330 [details] [review] Bug 17794: Menu items in Tools menu and Admin menu not showing bold when active but not on linked page To reproduce: admin-menu 1) Go to a page like admin/categories.pl 2) Click New Category 3) Notice Patron categories in the sidebar menu is no longer bold tools-menu 4) Go to a page like reviews/reviewswaiting.pl 5) Notice bold Comments in sidebar menu 6) Click Approved Comments tab 7) Notice no longer bold in sidebar menu To test: 8) Apply patch and refresh page 9) Follow above steps to reproduce bug, confirm that active links are always bold 10) Test with other links to confirm nothing has broken Special cases 11) Go To admin -> MARC bibliographic frameworks -> Actions for any framework -> MARC structure 12) Confirm sidebar menu link is still bold 13) Go to admin -> Authority types -> Actions for any auth type -> MARC structure 14) Confirm sidebar menu link is still bold 15) Click Actions for any tag -> Subfields 16) Confirm sidebar menu link is still bold 17) Go to admin -> OAI sets config -> Actions for any set -> Define mappings 18) Confirm sidebar menu link is still bold Sponsored-by: Catalyst IT
Created attachment 58331 [details] [review] Bug 17794: Menu items in Tools menu and Admin menu not showing bold when active but not on linked page To reproduce: admin-menu 1) Go to a page like admin/categories.pl 2) Click New Category 3) Notice Patron categories in the sidebar menu is no longer bold tools-menu 4) Go to a page like reviews/reviewswaiting.pl 5) Notice bold Comments in sidebar menu 6) Click Approved Comments tab 7) Notice no longer bold in sidebar menu To test: 8) Apply patch and refresh page 9) Follow above steps to reproduce bug, confirm that active links are always bold 10) Test with other links to confirm nothing has broken Special cases 11) Go To admin -> MARC bibliographic frameworks -> Actions for any framework -> MARC structure 12) Confirm sidebar menu link is still bold 13) Go to admin -> Authority types -> Actions for any auth type -> MARC structure 14) Confirm sidebar menu link is still bold 15) Click Actions for any tag -> Subfields 16) Confirm sidebar menu link is still bold 17) Go to admin -> OAI sets config -> Actions for any set -> Define mappings 18) Confirm sidebar menu link is still bold Sponsored-by: Catalyst IT
Created attachment 58654 [details] [review] [SIGNED OFF] Bug 17794: Menu items in Tools menu and Admin menu not showing bold when active but not on linked page To reproduce: admin-menu 1) Go to a page like admin/categories.pl 2) Click New Category 3) Notice Patron categories in the sidebar menu is no longer bold tools-menu 4) Go to a page like reviews/reviewswaiting.pl 5) Notice bold Comments in sidebar menu 6) Click Approved Comments tab 7) Notice no longer bold in sidebar menu To test: 8) Apply patch and refresh page 9) Follow above steps to reproduce bug, confirm that active links are always bold 10) Test with other links to confirm nothing has broken Special cases 11) Go To admin -> MARC bibliographic frameworks -> Actions for any framework -> MARC structure 12) Confirm sidebar menu link is still bold 13) Go to admin -> Authority types -> Actions for any auth type -> MARC structure 14) Confirm sidebar menu link is still bold 15) Click Actions for any tag -> Subfields 16) Confirm sidebar menu link is still bold 17) Go to admin -> OAI sets config -> Actions for any set -> Define mappings 18) Confirm sidebar menu link is still bold Sponsored-by: Catalyst IT Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
These comments are not a criticism of this patch, but just something I've been thinking about with regard to this area of the templates: 1. This is starting to get convoluted. At what point should we try to reevaluate how we highlight menu items? Eventually the JavaScript becomes almost as complicated as doing the logic in the template. 2. This way of doing things is going to create a problem for Bug 17858 because these menu templates include jQuery JavaScript which the browser will attempt to run before jQuery has loaded. We will need to figure out a way to make it not break.
Created attachment 58804 [details] [review] Bug 17794: Menu items in Tools menu and Admin menu not showing bold when active but not on linked page To reproduce: admin-menu 1) Go to a page like admin/categories.pl 2) Click New Category 3) Notice Patron categories in the sidebar menu is no longer bold tools-menu 4) Go to a page like reviews/reviewswaiting.pl 5) Notice bold Comments in sidebar menu 6) Click Approved Comments tab 7) Notice no longer bold in sidebar menu To test: 8) Apply patch and refresh page 9) Follow above steps to reproduce bug, confirm that active links are always bold 10) Test with other links to confirm nothing has broken Special cases 11) Go To admin -> MARC bibliographic frameworks -> Actions for any framework -> MARC structure 12) Confirm sidebar menu link is still bold 13) Go to admin -> Authority types -> Actions for any auth type -> MARC structure 14) Confirm sidebar menu link is still bold 15) Click Actions for any tag -> Subfields 16) Confirm sidebar menu link is still bold 17) Go to admin -> OAI sets config -> Actions for any set -> Define mappings 18) Confirm sidebar menu link is still bold Sponsored-by: Catalyst IT Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to Owen Leonard from comment #7) > These comments are not a criticism of this patch, but just something I've > been thinking about with regard to this area of the templates: > > 1. This is starting to get convoluted. At what point should we try to > reevaluate how we highlight menu items? Eventually the JavaScript becomes > almost as complicated as doing the logic in the template. Yes, it's hard to say. We use another method to do that in members-menu.inc, but that requires a new line per script + 1 check per entry in the menu. So much more code to maintain. > 2. This way of doing things is going to create a problem for Bug 17858 > because these menu templates include jQuery JavaScript which the browser > will attempt to run before jQuery has loaded. We will need to figure out a > way to make it not break. Indeed, and it will not be the only one: git grep '$(document).ready' ../includes/ | wc -l => 20 Not all of them are relevant, but some are.
Pushed to master for 17.05, thanks Aleisha!
This patch has been pushed to 16.11.x and will be in 16.11.02.
Pushed to 16.05.x, for 16.05.08 release