? Failure

User tests: Successful: Unsuccessful:

avatar okonomiyaki3000
okonomiyaki3000
28 Oct 2016

Pull Request for Issue # .

Summary of Changes

Javscript functions are set to work in strict mode.
JQuery 'ready' function changed to concise format.
Minify some files that hadn't been minified before.
Other minor cleanup.

Testing Instructions

These files are used by many admin pages including the global config, various listing and edit pages, permission forms, etc. A few of these files are only used by the hathor template.

Most are included via some JHtml function. You can usually find which function by searching for the js filename. You can then find where that is used by searching joomla for 'classSuffix.functionName'.

Documentation Changes Required

Nope but it would be great if all future javascript development was required to be in strict mode. Also, if we had some guidelines on minification, that would be great too.

avatar okonomiyaki3000 okonomiyaki3000 - open - 28 Oct 2016
avatar okonomiyaki3000 okonomiyaki3000 - change - 28 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Oct 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 28 Oct 2016
Category JavaScript
avatar okonomiyaki3000
okonomiyaki3000 - comment - 28 Oct 2016

I believe this is a bad test. It requires that sendTestMail be defined on the global scope but there is no reason for that. This is a function that is used only as a handler for a single click event. Why make it global?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 28 Oct 2016

But anyway, I'll change it back for now.

avatar zero-24
zero-24 - comment - 28 Oct 2016

@yvesh can you take a look into the failing Drone Test?

avatar yvesh
yvesh - comment - 29 Oct 2016

@zero-24 @okonomiyaki3000 when we want to use the strict mode, the javascript tests need to be adjusted to that. This should be done before merging that PR.

@okonomiyaki3000 Can you look into fixing the JavaScript tests (we have a documentation on them at docs.joomla.org too)? Ping me when you need any help with that.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 31 Oct 2016

@yvesh I'm not familiar with drone tests and I don't know how to run them locally. Could you point me to more info about that? I couldn't find it on docs.joomla.org.

avatar okonomiyaki3000 okonomiyaki3000 - change - 31 Oct 2016
The description was changed
avatar okonomiyaki3000
okonomiyaki3000 - comment - 31 Oct 2016

So there were basically two problems, one as @dgt41 mentioned and another which required improving the test. The sendPermissions function was relying on this to supply the id and value it needs. That's a bit risky in the best situations but here it was especially silly since this is a select in normal practice but it's window during the test. So I changed the test to work a little bit more like a real situation and used event.target instead this. No more errors.

avatar mbabker
mbabker - comment - 21 May 2017

What's the status here?

avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Jun 2017
The description was changed
Status Pending Information Required
avatar joomla-cms-bot joomla-cms-bot - edited - 13 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - edited - 13 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 13 Jun 2017
Title
Use strict mode whenever possible.
Use strict mode whenever possible.
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Jun 2017

If this PR get no Response, it will be closed at 23th July 2017.

avatar franz-wohlkoenig franz-wohlkoenig - change - 23 Jul 2017
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2017-07-23 08:26:27
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - close - 23 Jul 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 23 Jul 2017

closed as stated above.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12604.

avatar joomla-cms-bot
joomla-cms-bot - comment - 23 Jul 2017

Add a Comment

Login with GitHub to post a comment