User tests: Successful: Unsuccessful:
In the media/jui/js/treeselectmenu.jquery.js file I notice some inefficient silly jQuery selectors:
94: $(this).parent().parent().parent().parent().parent().parent().find('ul.treeselect-sub input').attr('checked', 'checked');
98: $(this).parent().parent().parent().parent().parent().parent().find('ul.treeselect-sub input').attr('checked', false);
104: $parent = $(this).parent().parent().parent().parent().parent().parent().parent();
111: $parent = $(this).parent().parent().parent().parent().parent().parent().parent();
The sollution would be to replace this with .parents().eq() so the resulting code would be
Please instruct me if I'm not doing the pull request correctly since I would really love to contribute in improving this code.
Thank you - this PR is great! We now need two independent testers on the tracker (http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32762&start=0) and then we can merge this!
Thanks again!
Happy to test this if there are some testing requirements / instructions / etc.
This js helps with the 'tree' we use for the menu assignment in the backend of each module.
OK, thanks. I thought that was the purpose but as the code is not in the administrator path I wasn't sure.
There shouldn't be any media in the administrator path! But no worries :) Happy testing!
Hi,
This PR needs to include the treeselectmenu.jquery.min.js as well as the normal version.
The min version is loaded when a site is NOT in debug mode, and that file has not changed, this PR can be tested by placing the test site in debug mode - and that seems to perform fine.
I tested current functionality (before PR applied) by:
I tested the uncompressed changed file from this PR by putting the site into debug mode and repeating the above steps.
In addition, using the inspector, I placed breakpoints at each of the changed lines and repeated the above steps - ensuring that the process halted on the changed code, then clicking run to continue.
All that is needed now is the compressed (minified) js file to be added and tested.
Chris.
Can someone please advise me on how to create the minified version?
Thank you,
Vlad
On Friday, November 22, 2013, Chris Jones-Gill wrote:
Hi,
This PR needs to include the treeselectmenu.jquery.min.js as well as the
normal version.The min version is loaded when a site is NOT in debug mode, and that file
has not changed, this PR can be tested by placing the test site in debug
mode - and that seems to perform fine.I tested current functionality (before PR applied) by:
- navigated to the module manager,
- select any module,
- select the menu assignment tab,
- select "Only on the pages selected" from the dropdown
- select the down arrow next to any menu
- Select "deselect all" from the dropdown
- Select "- Collapse" from the bottom of the dropdown
I tested the uncompressed changed file from this PR by putting the site
into debug mode and repeating the above steps.In addition, using the inspector, I placed breakpoints at each of the
changed lines and repeated the above steps - ensuring that the process
halted on the changed code, then clicking run to continue.All that is needed now is the compressed (minified) js file to be added
and tested.Chris.
—
Reply to this email directly or view it on GitHub#2564 (comment)
.
Vlad Zinculescu
UX Developer
http://vlad.zinculescu.com
I use UglifyJS, but if you don't want to install it locally there is a free online tool called jscompress that you can use.
Chris.
Thanks @KISS-Web-Design for your suggestion. I used jscompress since I see it's built on UglifyJS, though I think it's a good idea to try the real thing in the future.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-07-14 19:12:35 |