? Success
Referenced as Related to: # 6512

User tests: Successful: Unsuccessful:

avatar okonomiyaki3000
okonomiyaki3000
20 Mar 2015

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:

  • Use the 'select all' checkbox
  • Use a single-row checkbox
  • Publish or unpublish items

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.

avatar okonomiyaki3000 okonomiyaki3000 - open - 20 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2015
Labels Added: ?
avatar wilsonge
wilsonge - comment - 20 Mar 2015

I have something here that deals with the semi-colons #6106

avatar okonomiyaki3000
okonomiyaki3000 - comment - 20 Mar 2015

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.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 20 Mar 2015

Oh, and line 37 is just plain wrong.

avatar dgt41
dgt41 - comment - 20 Mar 2015

That line came from #3484, but why do you say it’s wrong?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 20 Mar 2015

Somehow it must have gotten changed since then. Look again.

avatar wilsonge
wilsonge - comment - 21 Mar 2015

Michaels fixed line 37 directly in core!

avatar Fedik
Fedik - comment - 21 Mar 2015

@okonomiyaki3000 :+1:
there some more error that need to fix after that, please be aware :wink:
you can see some, and copy from my another pull (#6357) Fedik@f670e86#diff-c1b1173fc1376e9afd63e8ec801c711aR102

avatar okonomiyaki3000
okonomiyaki3000 - comment - 22 Mar 2015

@Fedik this PR fixes nothing and is not meant to fix anything. It only exposes some of what needs to be fixed. Your points are correct but I won't do anything about them here.

avatar zero-24 zero-24 - change - 22 Mar 2015
Category JavaScript
avatar Kubik-Rubik
Kubik-Rubik - comment - 9 Jul 2015

#6512 merged, this PR can be closed. Thanks @okonomiyaki3000!

avatar Kubik-Rubik Kubik-Rubik - change - 9 Jul 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-07-09 08:47:00
Closed_By Kubik-Rubik
avatar Kubik-Rubik Kubik-Rubik - close - 9 Jul 2015
avatar Kubik-Rubik Kubik-Rubik - close - 9 Jul 2015
avatar okonomiyaki3000 okonomiyaki3000 - head_ref_deleted - 25 Jan 2016

Add a Comment

Login with GitHub to post a comment