NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
9 Jun 2019

Alternative to #24369

Summary of Changes

Adding a new com_contenthistory js to prevent the modal from being hidden by back.
Loading the js ONLY when necessary (i.e. in edit views)
com_banner banner
com_banner client
com_categories category
com_contacts contact
com_content article
com_newsfeeds newsfeed
com_tags tag
com_users note

Testing Instructions

patch and npm ci

Before patch

Screen Shot 2019-06-09 at 09 12 20

After patch

Screen Shot 2019-06-09 at 09 10 10

Note

did it as es5.js Welcome help doing it as es6.js

avatar infograf768 infograf768 - open - 9 Jun 2019
avatar infograf768 infograf768 - change - 9 Jun 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Jun 2019
Category Administration com_banners com_categories com_contact com_content com_newsfeeds com_tags com_users JavaScript Repository NPM Change
avatar infograf768 infograf768 - change - 9 Jun 2019
The description was changed
avatar infograf768 infograf768 - edited - 9 Jun 2019
avatar richard67
richard67 - comment - 9 Jun 2019

I have tested this item successfully on af6a152


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

avatar richard67
richard67 - comment - 9 Jun 2019

I have tested this item successfully on af6a152


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

avatar richard67 richard67 - test_item - 9 Jun 2019 - Tested successfully
avatar wilsonge wilsonge - close - 9 Jun 2019
avatar wilsonge wilsonge - merge - 9 Jun 2019
avatar wilsonge wilsonge - change - 9 Jun 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-06-09 09:18:09
Closed_By wilsonge
Labels Added: NPM Resource Changed ?
avatar wilsonge
wilsonge - comment - 9 Jun 2019

Thanks!

avatar C-Lodder
C-Lodder - comment - 9 Jun 2019

@infograf768 @wilsonge The name of the file should be .es6, not .es5

avatar infograf768
infograf768 - comment - 9 Jun 2019

@C-Lodder
that’s why I asked in the note above. Would the code be the same?

avatar C-Lodder
C-Lodder - comment - 9 Jun 2019

Everything except the function, which should use a fat arrow instead.

avatar infograf768
infograf768 - comment - 9 Jun 2019

@C-Lodder
Would that fit?

window.addEventListener('DOMContentLoaded', () => {
	document.body.appendChild(document.getElementById('versionsModal'));
});
avatar C-Lodder
C-Lodder - comment - 9 Jun 2019

@infograf768 perfect

Maybe add a sanity check too, just incase the element doesn't exist:

window.addEventListener('DOMContentLoaded', () => {
    const versionsModal = document.getElementById('versionsModal');
    if (versionsModal) {
        document.body.appendChild(versionsModal);
    }
});
avatar infograf768
infograf768 - comment - 9 Jun 2019

Please test #25151

Add a Comment

Login with GitHub to post a comment