User tests: Successful: Unsuccessful:
Hey, y'all, don't accept this PR, it breaks things. Actually, it exposes things that are already broken.
I've wrapped the whole thing in a closure and set it to use strict. Then, because some functions need to be in the global scope, I changed them from function statements to function expressions and attached them to window. Other than those changes, this file hasn't been changed.
Now go ahead and try to use it. You'll need to be in debug mode (so you get the uncompressed file) and then go to the admin and try to do some admin stuff. For example, in any list view you can try:
You'll probably want to have your browser's console open while you do this stuff. You'll likely notice that:
a) it doesn't work
b) the console shows some errors
This is here to start a discussion but I've also got most of the fixes already done which I'll be submitting later.
Labels |
Added:
?
|
That's good. There are also several cases of undeclared variables.
Beyond what's exposed by 'use strict', most of this code violates Joomla's js style rules. Also, a lot of it could simply be better written.
Oh, and line 37 is just plain wrong.
Somehow it must have gotten changed since then. Look again.
Michaels fixed line 37 directly in core!
@okonomiyaki3000
there some more error that need to fix after that, please be aware
you can see some, and copy from my another pull (#6357) Fedik@f670e86#diff-c1b1173fc1376e9afd63e8ec801c711aR102
Category | ⇒ | JavaScript |
#6512 merged, this PR can be closed. Thanks @okonomiyaki3000!
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-07-09 08:47:00 |
Closed_By | ⇒ | Kubik-Rubik |
I have something here that deals with the semi-colons #6106