? Success

User tests: Successful: Unsuccessful:

avatar dgt41
dgt41
8 Nov 2014

Executive summary

This PR converts the form validation on com_languages to use plain jquery (no mootools call on every form).
Also NO MORE INLINE SCRIPTS!

Testing

  1. Apply first PR #4888 (!important)
  2. Apply this PR
  3. In the admin area go to com_languages and try to submit any form.

If no javascript errors are logged in your browser and the functionality remains the same your test is a pass in any other case please report the errors here

Please also check these:
administrator/index.php?option=com_checkin should demonstrate multiselect without mt
administrator/index.php?option=com_users&view=mail should demonstrate form sent and validate without mt
administrator/index.php?option=com_modules should demonstrate multiselect and combobox without mt
http://localhost/administrator/index.php?option=com_admin&view=sysinfo should demonstrate highlighter.js without mt
Logout and log in to demonstrate the use of noframes without mt.

avatar dgt41 dgt41 - open - 8 Nov 2014
avatar jissues-bot jissues-bot - change - 8 Nov 2014
The description was changed
Labels Added: ?
avatar brianteeman brianteeman - change - 8 Nov 2014
Category JavaScript
avatar dgt41 dgt41 - change - 8 Nov 2014
The description was changed
avatar smanzi
smanzi - comment - 11 Nov 2014

@dgt41
Buttons (Save -> Cancel) inactive in &view=override&layout=edit
OK in &view=language&layout=edit

29c8df4 11 Nov 2014 avatar dgt41 fix
avatar dgt41
dgt41 - comment - 11 Nov 2014

@smanzi It should be ok ok now!

avatar smanzi
smanzi - comment - 11 Nov 2014

@dgt41 Travis is crying... should I test anyway?

avatar dgt41
dgt41 - comment - 11 Nov 2014

@smanzi Travis hasn’t finished yet but he should be ok with this change i made! Go ahead!

avatar smanzi
smanzi - comment - 12 Nov 2014

@test success

avatar anibalsanchez
anibalsanchez - comment - 13 Nov 2014

@test success

avatar roland-d roland-d - alter_testresult - 19 Nov 2014 - smanzi: Tested successfully
avatar roland-d roland-d - alter_testresult - 19 Nov 2014 - anibalsanchez: Tested successfully
avatar roland-d roland-d - change - 19 Nov 2014
Status Pending Ready to Commit
avatar roland-d
roland-d - comment - 19 Nov 2014

Moving to RTC as we have 2 successful tests.

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

avatar jissues-bot jissues-bot - change - 21 Nov 2014
Labels Added: ?
avatar dgt41
dgt41 - comment - 21 Nov 2014

@phproberto can you review this dgt41@82b6a29

2a14685 21 Nov 2014 avatar dgt41 JS CS
avatar anibalsanchez
anibalsanchez - comment - 21 Nov 2014

Creating an Override, it is OK. However, when the same page is accessed after saving, it loads the Override and generates this error:

SyntaxError: syntax error
var expired = ;
index.p...SERNAME (line 37, col 18)

The error is coming from here:

$expired = ($this->state->get("cache_expired") == 1 ) ? '1' : '';
var expired = ' . $expired . ';
avatar dgt41
dgt41 - comment - 21 Nov 2014

@anibalsanchez stupid mistake, I pushed a correction, sorry about that

avatar anibalsanchez
anibalsanchez - comment - 21 Nov 2014

@test success!

avatar Fedik Fedik - test_item - 21 Nov 2014 - Tested successfully
avatar phproberto
phproberto - comment - 29 Nov 2014

I was merging your PRs but I totally agree with @Fedik here:

  • Functions do not require to wait until DOM is ready
  • We are adding here a jQuery dependency not needed

We should try to get as much code in plain JS as possible. I just checked it and we have some jQuery code inside core.js (and it makes jQuery required) but that's an error IMO. Probably we won't remove jQuery until v4.0 but we should keep it clean and independent.

In fact we officially support Mootools and jQuery and using jQuery on core makes it mandatory for everybody.

avatar dgt41
dgt41 - comment - 29 Nov 2014

@phproberto You want me to remove all the jQuery(document).ready(…);
from all the functions not mandatory to have it?
Can do that! gimme some time...

avatar phproberto
phproberto - comment - 29 Nov 2014

The most important part is not to tie core to other libraries and do not transmit that to other developers as something recommended.

In our code we are loading jQuery and that's done in our own views so that wouldn't be a big problem. But yes, I'd like to see core not mixed with jQuery.

I've created an issue for the existing jQuery code in core.js #5254

avatar dgt41
dgt41 - comment - 29 Nov 2014

Check #5039 #5041

avatar dgt41
dgt41 - comment - 29 Nov 2014

Dammit for the closed ones the changes don’t come thru

avatar phproberto
phproberto - comment - 29 Nov 2014

Yes they are now merged so we need a new PR for that :(

avatar dgt41
dgt41 - comment - 29 Nov 2014

Shall I do it in one PR or break it down for every component?

avatar phproberto
phproberto - comment - 29 Nov 2014

One PR is ok as we only need to check that submitform works and it's only 5 components merged.

Thank you @dgt41 :)

avatar dgt41
dgt41 - comment - 29 Nov 2014

Check #5255

avatar dgt41
dgt41 - comment - 30 Nov 2014

I think I cleared the superfluous jQuery calls wherever not necessary!

avatar phproberto
phproberto - comment - 30 Nov 2014

Thanks!! I'll test it ASAP. I think it's easy because all the toolbar buttons fire them. I'll also add a list of views to test.

avatar smanzi
smanzi - comment - 30 Nov 2014

Guys, what a great job! I'm ready to test whatever you need. My small contribution...

avatar dgt41
dgt41 - comment - 30 Nov 2014

@smanzi we can help @phproberto with a test #5255, but also I removed some redundant jquery all over those requests...

avatar smanzi
smanzi - comment - 30 Nov 2014

OK. I'll start testing that everything is working in:

com_admin
com_banners
com_categories
com_contact
com_content
com_finder

If I'm not mistaken I must first sync with latest staging and then apply this and #5255. Correct? Backend is enough, right?

avatar dgt41
dgt41 - comment - 30 Nov 2014

Yep, Sergio those are all backend

avatar dgt41
dgt41 - comment - 30 Nov 2014
avatar smanzi
smanzi - comment - 30 Nov 2014

Oh yes... small mistake... forgot about #5048 #5049 #5050 #5051 #5052 #5053 #5054 #5056 #5058 & #5113 :smile:

@dgt41 I'm going to test the bunch of them (and this and #5255) all applied and then report to each. Is that OK?

avatar dgt41
dgt41 - comment - 30 Nov 2014

Actually if you see the last commit in each of all these you will realize that i just deleted 2 lines

jQuery(document).ready(function() {

and

});

So basically is not that bad as it seems

avatar smanzi
smanzi - comment - 30 Nov 2014

Yeah, but it is always better be safe than sorry... I'll give a run on all of them...

avatar smanzi
smanzi - comment - 30 Nov 2014

#5113 is front-end (will test)
#5047 (not in your list) cannot be applied:

The patch could not be applied because it conflicts with a previously applied patch: administrator/components/com_menus/views/item/tmpl/edit_modules.php
avatar dgt41
dgt41 - comment - 30 Nov 2014

Thnks Sergio, #5047 is not touched so no need to test it again and the #5113 is front end (create article)

avatar smanzi
smanzi - comment - 30 Nov 2014

@test success for this PR
Tested the set of: #5046 #5048 #5049 #5050 #5051 #5052 #5053 #5054 #5056 #5058 #5113 #5255

avatar smanzi
smanzi - comment - 30 Nov 2014

@phproberto This is still open...

avatar phproberto phproberto - close - 30 Nov 2014
avatar zero-24 zero-24 - close - 30 Nov 2014
avatar phproberto phproberto - change - 30 Nov 2014
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2014-11-30 03:13:30
avatar infograf768
infograf768 - comment - 30 Nov 2014

Folks, I had to commit cd70e94

as editing or creating an override was broken

avatar smanzi
smanzi - comment - 30 Nov 2014

@infograf768 You're right! Sorry, I didn't test that view; I tried installing a new language, but that is not com_languages but com_installer :no_mouth:

Is it normal that when I first try to install a new language I find the available languages list populated only by the following?

Albanian
Bahasa Indonesia
Bosnian
EnglishCA
Finnish
FrenchCA
Montenegrin
Portuguese Brazil
Serbian Cyrillic
Serbian Latin
Sinhala
Spanish
Swahili
Tamil
Thai
Turkish
Ukrainian
Uyghur
Vietnamese
Welsh

I find it confusing... I would expect either all available languages or none at all...

avatar infograf768
infograf768 - comment - 1 Dec 2014

Please click on "Find languages". It solves this issue. No idea why we get a limited list. I even get a pkg_weblinks.xml sometimes in that list.

avatar smanzi
smanzi - comment - 1 Dec 2014

@infograf768 yep, I know I have to click "Find languages" but I find weird to have the languages list "somehow" populated...

avatar smanzi
smanzi - comment - 1 Dec 2014

Should I open an issue for this?

avatar dgt41
dgt41 - comment - 1 Dec 2014

@smanzi I am on it...

avatar smanzi
smanzi - comment - 1 Dec 2014

OMG, you are on... EVERYTHING! :smile:

avatar dgt41
dgt41 - comment - 1 Dec 2014

@smanzi actually this is my bad...

avatar smanzi
smanzi - comment - 1 Dec 2014

@dgt41 BTW, I have another that it is surely for you: get in touch on Skype when you have a second...

avatar dgt41
dgt41 - comment - 1 Dec 2014

I am on Skype

avatar dgt41
dgt41 - comment - 1 Dec 2014

@smanzi Actually my previous comment wasn’t supposed to be here. Of course I am not on this one, so go on and open an issue…

avatar smanzi
smanzi - comment - 1 Dec 2014

ah, OK!! :smile:

avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment