Skip to content

Commit

Permalink
fixes (#14902)
Browse files Browse the repository at this point in the history
* fixes

* grrr

* Joomla object is needed :(
  • Loading branch information
Dimitri Grammatikogianni authored and wilsonge committed Mar 26, 2017
1 parent 3f899cd commit 2dcfcd8
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions media/com_contact/js/admin-contacts-modal.js
Expand Up @@ -30,8 +30,8 @@
tag = '<a' + hreflang + ' href="' + link + '">' + title + '</a>';

/** Use the API, if editor supports it **/
if (window.Joomla && window.Joomla.editors && Joomla.editors.instances && Joomla.editors.instances.hasOwnProperty(editor)) {
Joomla.editors.instances[editor].replaceSelection(tag)
if (window.parent.Joomla && window.parent.Joomla.editors && window.parent.Joomla.editors.instances && window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
window.parent.Joomla.editors.instances[editor].replaceSelection(tag)
} else {
window.parent.jInsertEditorText(tag, editor);
}
Expand Down
2 changes: 1 addition & 1 deletion media/com_contact/js/admin-contacts-modal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions media/com_content/js/admin-article-pagebreak.js
Expand Up @@ -25,8 +25,8 @@
tag = '<hr class="system-pagebreak" ' + title + ' ' + alt + '/>';

/** Use the API, if editor supports it **/
if (window.Joomla && window.Joomla.editors && Joomla.editors.instances && Joomla.editors.instances.hasOwnProperty(editor)) {
Joomla.editors.instances[editor].replaceSelection(tag)
if (window.parent.Joomla && window.parent.Joomla.editors && window.parent.Joomla.editors.instances && window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
window.parent.Joomla.editors.instances[editor].replaceSelection(tag)
} else {
window.parent.jInsertEditorText(tag, editor);
}
Expand Down
2 changes: 1 addition & 1 deletion media/com_content/js/admin-article-pagebreak.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions media/com_content/js/admin-article-readmore.js
Expand Up @@ -21,8 +21,8 @@ window.insertReadmore = function(editor) {
return false;
} else {
/** Use the API, if editor supports it **/
if (window.Joomla && window.Joomla.editors && Joomla.editors.instances && Joomla.editors.instances.hasOwnProperty(editor)) {
Joomla.editors.instances[editor].replaceSelection('<hr id="system-readmore" />')
if (window.parent.Joomla && window.parent.Joomla.editors && window.parent.Joomla.editors.instances && window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
window.parent.Joomla.editors.instances[editor].replaceSelection('<hr id="system-readmore" />')
} else {
window.parent.jInsertEditorText('<hr id="system-readmore" />', editor);
}
Expand Down
2 changes: 1 addition & 1 deletion media/com_content/js/admin-article-readmore.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions media/com_content/js/admin-articles-modal.js
Expand Up @@ -29,8 +29,8 @@
tag = '<a' + hreflang + ' href="' + link + '">' + title + '</a>';

/** Use the API, if editor supports it **/
if (window.Joomla && window.Joomla.editors && Joomla.editors.instances && Joomla.editors.instances.hasOwnProperty(editor)) {
Joomla.editors.instances[editor].replaceSelection(tag)
if (window.parent.Joomla && window.parent.Joomla.editors && window.parent.Joomla.editors.instances && window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
window.parent.Joomla.editors.instances[editor].replaceSelection(tag)
} else {
window.parent.jInsertEditorText(tag, editor);
}
Expand Down
2 changes: 1 addition & 1 deletion media/com_content/js/admin-articles-modal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions media/com_menus/js/admin-items-modal.js
Expand Up @@ -31,8 +31,8 @@
tag = '<a href=\"' + uri + thislang + lang + '">' + title + '</a>';

/** Use the API, if editor supports it **/
if (window.Joomla && window.Joomla.editors && Joomla.editors.instances && Joomla.editors.instances.hasOwnProperty(editor)) {
Joomla.editors.instances[editor].replaceSelection(tag)
if (window.parent.Joomla && window.parent.Joomla.editors && window.parent.Joomla.editors.instances && window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
window.parent.Joomla.editors.instances[editor].replaceSelection(tag)
} else {
window.parent.jInsertEditorText(tag, editor);
}
Expand All @@ -52,7 +52,7 @@

if (functionName === 'jSelectMenuItem') {
// Used in xtd_contacts
window[functionName](event.target.getAttribute('data-id'), event.target.getAttribute('data-title'), null, null, event.target.getAttribute('data-uri'), event.target.getAttribute('data-language'), null);
window[functionName](event.target.getAttribute('data-id'), event.target.getAttribute('data-title'), event.target.getAttribute('data-uri'), null, null, event.target.getAttribute('data-language'));
} else {
// Used in com_menus
window.parent[functionName](event.target.getAttribute('data-id'), event.target.getAttribute('data-title'), null, null, event.target.getAttribute('data-uri'), event.target.getAttribute('data-language'), null);
Expand Down
2 changes: 1 addition & 1 deletion media/com_menus/js/admin-items-modal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions media/com_modules/js/admin-modules-modal.js
Expand Up @@ -19,8 +19,8 @@ document.addEventListener('DOMContentLoaded', function() {
editor = event.target.getAttribute('data-editor');

/** Use the API, if editor supports it **/
if (window.Joomla && window.Joomla.editors && Joomla.editors.instances && Joomla.editors.instances.hasOwnProperty(editor)) {
Joomla.editors.instances[editor].replaceSelection("{loadmodule " + type + "," + name + "}")
if (window.parent.Joomla && window.parent.Joomla.editors && window.parent.Joomla.editors.instances && window.parent.Joomla.editors.instances.hasOwnProperty(editor)) {
window.parent.Joomla.editors.instances[editor].replaceSelection("{loadmodule " + type + "," + name + "}")
} else {
window.parent.jInsertEditorText("{loadmodule " + type + "," + name + "}", editor);
}
Expand Down
2 changes: 1 addition & 1 deletion media/com_modules/js/admin-modules-modal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2dcfcd8

Please sign in to comment.