? Pending

User tests: Successful: Unsuccessful:

avatar astridx
astridx
11 Jan 2018

Pull Request for Issue # #19318.

Summary of Changes

I've corrected the assignment of the selected folder and added a minimized JS

Testing Instructions

Go to Template - Customize, click "new file", choose file-type, enter name, choose directory where new file should be stored. (See #19318)

Expected result

Ability to choose a directory.

Actual result

Clicking a directory takes you back to the Template-Customize screen.
Clicking "create" will put the new file in the template's root.

After applying this patch the new file is saved in the selected directory.

Documentation Changes Required

No

avatar astridx astridx - open - 11 Jan 2018
avatar astridx astridx - change - 11 Jan 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Jan 2018
Category JavaScript
avatar brianteeman brianteeman - change - 11 Jan 2018
Title
fixErrorInTemplateJS
[4.0] fixErrorInTemplateJS
avatar brianteeman brianteeman - edited - 11 Jan 2018
avatar brianteeman
brianteeman - comment - 11 Jan 2018

Updated title to show its for j4

5e768ea 12 Jan 2018 avatar astridx wip
avatar astridx astridx - change - 12 Jan 2018
Labels Added: ?
avatar astridx
astridx - comment - 12 Jan 2018

@dgt41
I have changed it. But I'm not happy with it because there are many other for loops in the file that use the other syntax. Should not we unify that?

avatar dgt41
dgt41 - comment - 12 Jan 2018

@astridx yes the whole file should be unified, the forEach() is better for J4

avatar astridx
astridx - comment - 12 Jan 2018

@astridx yes the whole file should be unified, the forEach() is better for J4

Should I open a new issue for this? This would complicate the testing of this PR

avatar Fedik
Fedik - comment - 12 Jan 2018

yes the whole file should be unified, the forEach() is better for J4

Should I open a new issue for this? This would complicate the testing of this PR

I would not bother with it, it has not much profit over simple for loop https://jsperf.com/for-vs-foreach/75

avatar astridx
astridx - comment - 13 Jan 2018

Here someone summarized the advantages and disadvantages very well:
https://stackoverflow.com/questions/43031988/javascript-efficiency-for-vs-foreach

First of all, I leave everything as it is, because I also prefer foreach.

avatar wilsonge wilsonge - change - 13 Jan 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-01-13 17:03:34
Closed_By wilsonge
avatar wilsonge wilsonge - close - 13 Jan 2018
avatar wilsonge wilsonge - merge - 13 Jan 2018

Add a Comment

Login with GitHub to post a comment