The rendering of SELECT elements is up to the browser but Bug 16123 CSS code 'style="padding-left: xx' doesn't work on modern browsers (firefox, chrome). This patch replace CSS style attribute with   html entity. On supported platforms TEST PLAN : 1. Go to the Administration module 2. Add a new budget (ie : Budget 2020) 3. Add a fund to this budget (ie : Book) 4. Add a child fund (ie : Adult fiction) You will have this hierarchy : Budget 2020 |____ Book |_____ Adult fiction 5. Go to the Acquisition module 6. Select a vendor and create a new basket 7. Place an order 8. Check the budget dropdown menu BEFORE PATCH Book Adult fiction OR Book Adult fiction AFTER PATCH Book Adult fiction
Created attachment 100688 [details] [review] Bug 24866 - Display budget hierarchy in the budget dropdown menu used when placing a new order The rendering of SELECT elements is up to the browser. But Bug 16123 CSS code 'style="padding-left: xx' doesn't work on modern browsers. This patch replace CSS style attribute with   html entity. On supported platforms TEST PLAN : 1. Go to the Administration module 2. Add a new budget (ie : Budget 2020) 3. Add a fund to this budget (ie : Book) 4. Add a child fund (ie : Adult fiction) You will have this hierarchy : Budget 2020 |____ Book |_____ Adult fiction 5. Go to the Acquisition module 6. Select a vendor and create a new basket 7. Place an order 8. Check the budget dropdown menu BEFORE PATCH Book Adult fiction OR Book Adult fiction AFTER PATCH Book Adult fiction
Created attachment 101633 [details] [review] Bug 24886: Reindent reports template This patch reindents the template for saved reports, replacing tabs with spaces and making indentation consistent. Some lines have been split up. To test, apply the patch and go to Reports -> Use saved. - Test adding, editing, viewing, and running reports - Test filtering by group and subgroup - Test the process of adding a guided report Everything should work as expected. Use your preferred method for checking the differences between files while ignoring whitespace. I use diff with the "-w" flag, but I'm not your dad. The only changes you see should be split lines. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 101634 [details] [review] Bug 24886: (follow-up) Add markup comments This patch adds comments to the template to highlight the markup structure. This patch should have no effect on the interface or functionality. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment on attachment 101633 [details] [review] Bug 24886: Reindent reports template Sorry, wrong bug
Comment on attachment 101634 [details] [review] Bug 24886: (follow-up) Add markup comments wrong bug
Created attachment 102274 [details] [review] Bug 24866: Display budget hierarchy in the budget dropdown menu used when placing a new order The rendering of SELECT elements is up to the browser. But Bug 16123 CSS code 'style="padding-left: xx' doesn't work on modern browsers. This patch replace CSS style attribute with   html entity. On supported platforms TEST PLAN : 1. Go to the Administration module 2. Add a new budget (ie : Budget 2020) 3. Add a fund to this budget (ie : Book) 4. Add a child fund (ie : Adult fiction) You will have this hierarchy : Budget 2020 |____ Book |_____ Adult fiction 5. Go to the Acquisition module 6. Select a vendor and create a new basket 7. Place an order 8. Check the budget dropdown menu BEFORE PATCH Book Adult fiction OR Book Adult fiction AFTER PATCH Book Adult fiction
Created attachment 102399 [details] [review] Bug 24866: Display budget hierarchy in the budget dropdown menu used when placing a new order The rendering of SELECT elements is up to the browser. But Bug 16123 CSS code 'style="padding-left: xx' doesn't work on modern browsers. This patch replace CSS style attribute with   html entity. On supported platforms TEST PLAN : 1. Go to the Administration module 2. Add a new budget (ie : Budget 2020) 3. Add a fund to this budget (ie : Book) 4. Add a child fund (ie : Adult fiction) You will have this hierarchy : Budget 2020 |____ Book |_____ Adult fiction 5. Go to the Acquisition module 6. Select a vendor and create a new basket 7. Place an order 8. Check the budget dropdown menu BEFORE PATCH Book Adult fiction OR Book Adult fiction AFTER PATCH Book Adult fiction Signed-off-by: David Nind <david@davidnind.com>
This patch did not work for us when we applied it, in vagrant environment with Firefox 74 .
Created attachment 102453 [details] [review] Bug 24866: Display budget hierarchy in the budget dropdown menu used when placing a new order The rendering of SELECT elements is up to the browser. But Bug 16123 CSS code 'style="padding-left: xx' doesn't work on modern browsers. This patch replace CSS style attribute with   html entity. On supported platforms TEST PLAN : 1. Go to the Administration module 2. Add a new budget (ie : Budget 2020) 3. Add a fund to this budget (ie : Book) 4. Add a sub-fund to fund Book (ie : Adult fiction) You will have this hierarchy : Budget 2020 |____ Book |_____ Adult fiction 5. Go to the Acquisition module 6. Select a vendor and create a new basket 7. Place an order 8. Check the budget dropdown menu BEFORE PATCH Book Adult fiction OR Book Adult fiction AFTER PATCH Book Adult fiction Signed-off-by: David Nind <david@davidnind.com>
(In reply to Devinim from comment #8) > This patch did not work for us when we applied it, in vagrant environment > with Firefox 74 . Hi Windows/Mac Firefox or Linux? I retested with linux firefox 74.0.1, 2020-04-06 kodadevbox and it works for me. One point, do you remember if you could collapse the fund tree in /cgi-bin/koha/admin/aqbudgets.pl ? I modified the test plan, replaced Add a child fund to fund Book With what is in the option: Book fund Actions: Edit, Delete, Add sub fund Add a sub-fund to fund Book
(In reply to didier from comment #10) > (In reply to Devinim from comment #8) > > This patch did not work for us when we applied it, in vagrant environment > > with Firefox 74 . > > Hi Windows/Mac Firefox or Linux? > I retested with linux firefox 74.0.1, 2020-04-06 kodadevbox and it works for > me. > > One point, do you remember if you could collapse the fund tree in > /cgi-bin/koha/admin/aqbudgets.pl > ? > > I modified the test plan, replaced > Add a child fund to fund Book > With what is in the option: > Book fund Actions: Edit, Delete, Add sub fund > Add a sub-fund to fund Book Hi Didier, We catched the problem. If the size of the name of subfund is larger than the fund's name, it doesn't show indentation correctly.
(In reply to Devinim from comment #11) > > We catched the problem. > If the size of the name of subfund is larger than the fund's name, it > doesn't show indentation correctly. Hi, Good catch. Browser can do whatever they want for rendering dropdown menus. I'm not so sure it's worth going further. It looks more and more like a wack-a-mole game :( Regards Didier
So does this bug still need signing off, or is it being abandoned?
(In reply to Jon Knight from comment #13) > So does this bug still need signing off, or is it being abandoned? I'm closing it, it's too unreliable. I'll try to find another way.
Created attachment 127487 [details] [review] Bug 24866: (follow-up) Replaced tabulations by dashes The rendering of SELECT elements is up to the browser. But Bug 16123 CSS code 'style="padding-left: xx' doesn't work on modern browsers. Based on the previous contribution, this fix replaces CSS style attribute with dashes, creating a leveled structure that should work with most browsers. Tested on Linux Ubuntu with Firefox 94.0, Chromium 95.0.4 and Opera 81.0.1 TEST PLAN : 1. Go to the Administration module 2. Add a new budget (ie : Budget 2022) 3. Add a fund to this budget (ie : Book) 4. Add a sub-fund to fund Book (ie : Fiction) 5. Add another sub-fund, this time to sub-fund Book (ie : Adult fiction) You will have this hierarchy : Budget 2022 |____ Book |_____ Fiction |_____ Adult fiction 6. Go to the Acquisition module 7. Select a vendor and create a new basket 8. Place an order 9. Check the budget dropdown menu BEFORE PATCH Book Fiction Adult fiction OR Book Fiction Adult fiction AFTER PATCH Book -- Fiction -- -- Adult fiction Co-authored-by: Didier Gautheron <didier.gautheron@biblibre.com>
If that new patch could be signed-off by people using Mac/windows, that'd be great.
I'm wondering whether we should convert the select to a select2 input? Then we can go back to using CSS ;) https://stackoverflow.com/questions/30820215/selectable-optgroups-in-select2#30948247
(In reply to Martin Renvoize from comment #17) > I'm wondering whether we should convert the select to a select2 input? Then > we can go back to using CSS ;) > > https://stackoverflow.com/questions/30820215/selectable-optgroups-in- > select2#30948247 We could. But dashes is better for accessibility right ?
Great job Florian :D I suggest you replace : [% level_indent | $raw %] with : [% level_indent | html %] Iven if dashed does not need it. It is more secure.
Created attachment 127997 [details] [review] Bug_24866: Changed $raw for html for extra safety Same test plan as before
Created attachment 128091 [details] [review] Bug 24866: Display budget hierarchy in the budget dropdown menu used when placing a new order The rendering of SELECT elements is up to the browser. But Bug 16123 CSS code 'style="padding-left: xx' doesn't work on modern browsers. This patch replace CSS style attribute with   html entity. On supported platforms TEST PLAN : 1. Go to the Administration module 2. Add a new budget (ie : Budget 2020) 3. Add a fund to this budget (ie : Book) 4. Add a sub-fund to fund Book (ie : Adult fiction) You will have this hierarchy : Budget 2020 |____ Book |_____ Adult fiction 5. Go to the Acquisition module 6. Select a vendor and create a new basket 7. Place an order 8. Check the budget dropdown menu BEFORE PATCH Book Adult fiction OR Book Adult fiction AFTER PATCH Book Adult fiction Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 128092 [details] [review] Bug 24866: (follow-up) Replaced tabulations by dashes The rendering of SELECT elements is up to the browser. But Bug 16123 CSS code 'style="padding-left: xx' doesn't work on modern browsers. Based on the previous contribution, this fix replaces CSS style attribute with dashes, creating a leveled structure that should work with most browsers. Tested on Linux Ubuntu with Firefox 94.0, Chromium 95.0.4 and Opera 81.0.1 TEST PLAN : 1. Go to the Administration module 2. Add a new budget (ie : Budget 2022) 3. Add a fund to this budget (ie : Book) 4. Add a sub-fund to fund Book (ie : Fiction) 5. Add another sub-fund, this time to sub-fund Book (ie : Adult fiction) You will have this hierarchy : Budget 2022 |____ Book |_____ Fiction |_____ Adult fiction 6. Go to the Acquisition module 7. Select a vendor and create a new basket 8. Place an order 9. Check the budget dropdown menu BEFORE PATCH Book Fiction Adult fiction OR Book Fiction Adult fiction AFTER PATCH Book -- Fiction -- -- Adult fiction Co-authored-by: Didier Gautheron <didier.gautheron@biblibre.com> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 128093 [details] [review] Bug_24866: Changed $raw for html for extra safety Same test plan as before Signed-off-by: David Nind <david@davidnind.com>
Next time please provide a change for the different occurrences. We are modifying only 1 dropdown when we have several in the codebase.
Created attachment 129366 [details] [review] Bug 24866: Display budget hierarchy in the budget dropdown menu used when placing a new order The rendering of SELECT elements is up to the browser. But Bug 16123 CSS code 'style="padding-left: xx' doesn't work on modern browsers. This patch replace CSS style attribute with   html entity. On supported platforms TEST PLAN : 1. Go to the Administration module 2. Add a new budget (ie : Budget 2020) 3. Add a fund to this budget (ie : Book) 4. Add a sub-fund to fund Book (ie : Adult fiction) You will have this hierarchy : Budget 2020 |____ Book |_____ Adult fiction 5. Go to the Acquisition module 6. Select a vendor and create a new basket 7. Place an order 8. Check the budget dropdown menu BEFORE PATCH Book Adult fiction OR Book Adult fiction AFTER PATCH Book Adult fiction Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 129367 [details] [review] Bug 24866: (follow-up) Replaced tabulations by dashes The rendering of SELECT elements is up to the browser. But Bug 16123 CSS code 'style="padding-left: xx' doesn't work on modern browsers. Based on the previous contribution, this fix replaces CSS style attribute with dashes, creating a leveled structure that should work with most browsers. Tested on Linux Ubuntu with Firefox 94.0, Chromium 95.0.4 and Opera 81.0.1 TEST PLAN : 1. Go to the Administration module 2. Add a new budget (ie : Budget 2022) 3. Add a fund to this budget (ie : Book) 4. Add a sub-fund to fund Book (ie : Fiction) 5. Add another sub-fund, this time to sub-fund Book (ie : Adult fiction) You will have this hierarchy : Budget 2022 |____ Book |_____ Fiction |_____ Adult fiction 6. Go to the Acquisition module 7. Select a vendor and create a new basket 8. Place an order 9. Check the budget dropdown menu BEFORE PATCH Book Fiction Adult fiction OR Book Fiction Adult fiction AFTER PATCH Book -- Fiction -- -- Adult fiction Co-authored-by: Didier Gautheron <didier.gautheron@biblibre.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 129368 [details] [review] Bug_24866: Changed $raw for html for extra safety Same test plan as before Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 129369 [details] [review] Bug 24866: Changed $raw for html for extra safety Same test plan as before Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Pushed to 21.11.x for 21.11.02
I see that it was pushed to 21.05.x for v21.05.08
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.
Not backported to 19.11.x