User tests: Successful: Unsuccessful:
Pull Request for Issue # .
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.
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'.
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.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | JavaScript |
But anyway, I'll change it back for now.
@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.
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.
What's the status here?
Status | Pending | ⇒ | Information Required |
Title |
|
If this PR get no Response, it will be closed at 23th July 2017.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-07-23 08:26:27 |
Closed_By | ⇒ | franz-wohlkoenig |
closed as stated above.
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/12604
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 singleclick
event. Why make it global?