Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ PLG_QUICKICON_EXTENSIONUPDATE_ERROR="Unknown extensions ..."
PLG_QUICKICON_EXTENSIONUPDATE_GROUP_DESC="The group of this plugin (this value is compared with the group value used in <strong>Quick Icons</strong> modules to inject icons)."
PLG_QUICKICON_EXTENSIONUPDATE_GROUP_LABEL="Group"
PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND="Updates are available! %s"
PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND_BUTTON="View Updates"
PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND_MESSAGE="%s Extension Update(s) are available."
PLG_QUICKICON_EXTENSIONUPDATE_UPTODATE="Extensions are up to date."
PLG_QUICKICON_EXTENSIONUPDATE_XML_DESCRIPTION="Checks for updates of your installed third-party extensions and notifies you when you visit the Control Panel page."
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ PLG_QUICKICON_JOOMLAUPDATE_ERROR="Unknown Joomla ..."
PLG_QUICKICON_JOOMLAUPDATE_GROUP_DESC="The group of this plugin (this value is compared with the group value used in <strong>Quick Icons</strong> modules to inject icons)."
PLG_QUICKICON_JOOMLAUPDATE_GROUP_LABEL="Group"
PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND="Joomla %s Update now!"
PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND_BUTTON="Update Now"
PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND_MESSAGE="Joomla %s is available."
PLG_QUICKICON_JOOMLAUPDATE_UPTODATE="Joomla is up to date."
PLG_QUICKICON_JOOMLAUPDATE_XML_DESCRIPTION="Checks for Joomla updates and notifies you when you visit the Control Panel page."
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ PLG_QUICKICON_OVERRIDECHECK_ERROR="Error on checking overrides."
PLG_QUICKICON_OVERRIDECHECK_ERROR_ENABLE="Enable <strong>Installer - override</strong> plugin."
PLG_QUICKICON_OVERRIDECHECK_GROUP_DESC="The group of this plugin (this value is compared with the group value used in <strong>Quick Icons</strong> modules to inject icons)."
PLG_QUICKICON_OVERRIDECHECK_GROUP_LABEL="Group"
PLG_QUICKICON_OVERRIDECHECK_OVERRIDEFOUND="%s Override(s) to check."
PLG_QUICKICON_OVERRIDECHECK_OVERRIDEFOUND="Override(s) to check! %s"
PLG_QUICKICON_OVERRIDECHECK_UPTODATE="Overrides are up to date."
PLG_QUICKICON_OVERRIDECHECK_XML_DESCRIPTION="Checks overrides on update and enables notifications when you visit the Control Panel page.<br><strong>Warning! You must have installer override plugin enabled to see results.</strong>"
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ PLG_QUICKICON_PRIVACYCHECK_CHECKING="Checking requests ..."
PLG_QUICKICON_PRIVACYCHECK_ERROR="Unknown requests ..."
PLG_QUICKICON_PRIVACYCHECK_GROUP_DESC="The group of this plugin (this value is compared with the group value used in <strong>Quick Icons</strong> modules to inject icons)."
PLG_QUICKICON_PRIVACYCHECK_GROUP_LABEL="Group"
PLG_QUICKICON_PRIVACYCHECK_REQUESTFOUND="Urgent Privacy Requests"
PLG_QUICKICON_PRIVACYCHECK_REQUESTFOUND_BUTTON="View Requests"
PLG_QUICKICON_PRIVACYCHECK_REQUESTFOUND_MESSAGE="%s Urgent Privacy Request(s) to manage."
PLG_QUICKICON_PRIVACYCHECK_NOREQUEST="No Urgent Requests."
PLG_QUICKICON_PRIVACYCHECK_REQUESTFOUND="Urgent privacy requests!"
PLG_QUICKICON_PRIVACYCHECK_NOREQUEST="No urgent privacy requests."
PLG_QUICKICON_PRIVACYCHECK_XML_DESCRIPTION="Checks for privacy requests that need to be handled and notifies you when you visit the Control Panel page."
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,7 @@
// No updates
update('success', Joomla.Text._('PLG_QUICKICON_EXTENSIONUPDATE_UPTODATE'));
} else {
const messages = {
warning: [
`<div class="message-alert">
${Joomla.Text._('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND_MESSAGE').replace('%s', `<span class="badge badge-pill badge-danger">${updateInfoList.length}</span>`)}
<button type="button" class="btn btn-sm btn-primary" onclick="document.location='${options.url}'">
${Joomla.Text._('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND_BUTTON')}
</button>
</div>`,
],
};

// Render the message
Joomla.renderMessages(messages);

// Scroll to page top
window.scrollTo(0, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're removing the scroll to top here (which is fine). Then we can remove the 'requirement' on windows from the top/bottom of the file for the anonymous function as we aren't using it anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry you will have to explain in dummy terms as I really dont understand js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you just mean change references of (window, document, Joomla); to (document, Joomla);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes top and bottom of the file


update('warning', Joomla.Text._('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND').replace('%s', `<span class="badge badge-light">${updateInfoList.length}</span>`));
update('danger', Joomla.Text._('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND').replace('%s', `<span class="badge badge-light">${updateInfoList.length}</span>`));
}
} else {
// An error occurred
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,7 @@
const updateInfo = updateInfoList.shift();

if (updateInfo.version !== options.version) {
const messages = {
warning: [
`<div class="message-alert">
${Joomla.Text._('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND_MESSAGE').replace('%s', `<span class="badge badge-danger"> \u200E ${updateInfo.version}</span>`)}
<button type="button" class="btn btn-sm btn-primary" onclick="document.location='${options.url}'">
${Joomla.Text._('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND_BUTTON')}
</button>
</div>`,
],
};

// Render the message
Joomla.renderMessages(messages);

// Scroll to page top
window.scrollTo(0, 0);

update('warning', Joomla.Text._('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND').replace('%s', `<span class="badge badge-light"> \u200E ${updateInfo.version}</span>`));
update('danger', Joomla.Text._('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND').replace('%s', `<span class="badge badge-light"> \u200E ${updateInfo.version}</span>`));
} else {
update('success', Joomla.Text._('PLG_QUICKICON_JOOMLAUPDATE_UPTODATE'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,6 @@
update('success', languageStrings.NOREQUEST, '');
} else {
// Requests
const messages = {
warning: [
`<div class="message-alert">
${languageStrings.REQUESTFOUND_MESSAGE.replace('%s', `<span class="badge badge-pill badge-danger">${privacyRequestsList.data.number_urgent_requests}</span>`)}
<button class="btn btn-sm btn-primary" onclick="document.location='${options.plg_quickicon_privacycheck_url}'">
${languageStrings.REQUESTFOUND_BUTTON}
</button>
</div>`,
],
};

Joomla.renderMessages(messages);

update(
'danger',
`${languageStrings.REQUESTFOUND}&nbsp;<span class="badge badge-light">${privacyRequestsList.data.number_urgent_requests}</span>`,
Expand Down
2 changes: 0 additions & 2 deletions plugins/quickicon/extensionupdate/extensionupdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ public function onGetIcons($context)

Text::script('PLG_QUICKICON_EXTENSIONUPDATE_UPTODATE');
Text::script('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND');
Text::script('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND_MESSAGE');
Text::script('PLG_QUICKICON_EXTENSIONUPDATE_UPDATEFOUND_BUTTON');
Text::script('PLG_QUICKICON_EXTENSIONUPDATE_ERROR');
Text::script('MESSAGE');
Text::script('ERROR');
Expand Down
2 changes: 0 additions & 2 deletions plugins/quickicon/privacycheck/privacycheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ public function onGetIcons($context)
'plg_quickicon_privacycheck_text' => array(
"NOREQUEST" => Text::_('PLG_QUICKICON_PRIVACYCHECK_NOREQUEST'),
"REQUESTFOUND" => Text::_('PLG_QUICKICON_PRIVACYCHECK_REQUESTFOUND'),
"REQUESTFOUND_MESSAGE" => Text::_('PLG_QUICKICON_PRIVACYCHECK_REQUESTFOUND_MESSAGE'),
"REQUESTFOUND_BUTTON" => Text::_('PLG_QUICKICON_PRIVACYCHECK_REQUESTFOUND_BUTTON'),
"ERROR" => Text::_('PLG_QUICKICON_PRIVACYCHECK_ERROR'),
)
);
Expand Down