Open a new article of a multilingual site. Got to Tab Associations.
There are as many alerts as you have content languages.
One info-alert for content languages
As many alerts as languages
Joomla V4.0 dev.
The message is used in media/com_associations/js/associations.edit.js: Joomla.showAssociationMessage = function(),
Title |
|
Title |
|
Issue confirmed.
@dgrammatiko
This happened when you modified the file to not use JQuery
I think I found the reason:
Joomla.showAssociationMessage = function()
is adding the message for each Control group.
Can you set debug on (which will use the non minified js version) and then edit /media/com_associations/js/associations-edit.js
and replace the function with this code:
Joomla.showAssociationMessage = function()
{
var controlGroup = document.querySelectorAll('#associations .control-group');
for (var i = 0, l = controlGroup.length; i < l; i++) {
controlGroup[i].style.display = 'none';
}
var associations = document.getElementById('associations');
if (associations) {
var html = document.createElement('div');
html.classList.add('alert')
html.classList.add('alert-info')
html.id = 'associations-notice';
html.innerHTML = Joomla.JText._('JGLOBAL_ASSOC_NOT_POSSIBLE');
associations.insertAdjacentElement('afterbegin', html);
}
}
Yes, works! Great :)
Sorry there are no div ALERTS anymore, use joomla-alert
Also we have a helper to create alerts...
That's another scope. Here it is a loop in the js over content languages. But thank you for the hint. @infograf768 would you make a PR?
@dgrammatiko
It was not my intention to make a PR. I just checked were the error was in the js (which still uses div alerts).
As I would not know how to code <joomla-alert
in a js, please do PR yourself.
Labels |
Added:
J4 Issue
|
Status | New | ⇒ | Discussion |
I have a patch ready using joomla-alert
. Waiting for @dgrammatiko to correct a bug when compiling the js files.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-28 09:52:48 |
Closed_By | ⇒ | infograf768 |
changed Title to make clear its about 4.0