Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions media/com_contact/js/admin-contacts-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if (!Joomla.getOptions('xtd-contacts')) {
// Something went wrong!
window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
return false;
}

Expand All @@ -30,7 +30,7 @@
tag = '<a' + hreflang + ' href="' + link + '">' + title + '</a>';

window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
};

document.addEventListener('DOMContentLoaded', function(){
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

if (!window.parent.Joomla.getOptions('xtd-pagebreak')) {
// Something went wrong!
window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
return false;
}

Expand All @@ -25,7 +25,7 @@
tag = '<hr class="system-pagebreak" ' + title + ' ' + alt + '/>';

window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
return false;
};
})();
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.

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
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

if (!Joomla.getOptions('xtd-articles')) {
// Something went wrong!
window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
return false;
}

Expand All @@ -29,7 +29,7 @@
tag = '<a' + hreflang + ' href="' + link + '">' + title + '</a>';

window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
};

document.addEventListener('DOMContentLoaded', function(){
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.

4 changes: 2 additions & 2 deletions media/com_fields/js/admin-fields-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Joomla = window.Joomla || {};
window.parent.jInsertEditorText("{field " + id + "}", editor);
}

window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
};

Joomla.fieldgroupIns = function(id, editor) {
Expand All @@ -25,6 +25,6 @@ Joomla = window.Joomla || {};
window.parent.jInsertEditorText("{fieldgroup " + id + "}", editor);
}

window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
};
})(Joomla);
2 changes: 1 addition & 1 deletion media/com_fields/js/admin-fields-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_menus/js/admin-items-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if (!Joomla.getOptions('xtd-menus')) {
// Something went wrong!
window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
return false;
}

Expand All @@ -31,7 +31,7 @@
tag = '<a href=\"' + uri + thislang + lang + '">' + title + '</a>';

window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
};

document.addEventListener('DOMContentLoaded', function(){
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ document.addEventListener('DOMContentLoaded', function() {
editor = event.target.getAttribute('data-editor');

window.parent.Joomla.editors.instances[editor].replaceSelection("{loadmodule " + type + "," + name + "}");
window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
});
}

Expand All @@ -31,7 +31,7 @@ document.addEventListener('DOMContentLoaded', function() {
editor = event.target.getAttribute('data-editor');

window.parent.Joomla.editors.instances[editor].replaceSelection("{loadposition " + position + "}");
window.parent.jModalClose();
window.parent.Joomla.UI.Modal.close();
});
}
});
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.

114 changes: 51 additions & 63 deletions media/editors/tinymce/js/plugins/dragdrop/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,69 +63,57 @@ tinymce.PluginManager.add('jdragdrop', function(editor) {

}

// Listers for drag and drop
if (typeof FormData != 'undefined'){

// Fix for Chrome
editor.on('dragenter', function(e) {
e.stopPropagation();

return false;
});


// Notify user when file is over the drop area
editor.on('dragover', function(e) {
e.preventDefault();
editor.contentAreaContainer.style.borderStyle = 'dashed';
editor.contentAreaContainer.style.borderWidth = '5px';

return false;
});

// Logic for the dropped file
editor.on('drop', function(e) {

// We override only for files
if (e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files.length > 0) {
for (var i = 0, f; f = e.dataTransfer.files[i]; i++) {

// Only images allowed
if (f.name.toLowerCase().match(/\.(jpg|jpeg|png|gif)$/)) {

// Create and display the progress bar
var container, innerDiv, progressBar = '';
container = document.createElement('div');
container.id = 'jloader';
innerDiv = document.createElement('div');
innerDiv.classList.add('progress');
innerDiv.classList.add('progress-success');
innerDiv.classList.add('progress-striped');
innerDiv.classList.add('active');
innerDiv.style.width = '100%';
innerDiv.style.height = '30px';
progressBar = document.createElement('div');
progressBar.classList.add('bar');
progressBar.style.width = '0';
innerDiv.appendChild(progressBar);
container.appendChild(innerDiv);
document.querySelector('.mce-toolbar-grp').appendChild(container);

// Upload the file(s)
UploadFile(f);
}

e.preventDefault();
// Fix for Chrome
editor.on('dragenter', function(e) {
e.stopPropagation();

return false;
});

// Notify user when file is over the drop area
editor.on('dragover', function(e) {
e.preventDefault();
editor.contentAreaContainer.style.borderStyle = 'dashed';
editor.contentAreaContainer.style.borderWidth = '5px';

return false;
});

// Logic for the dropped file
editor.on('drop', function(e) {

// We override only for files
if (e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files.length > 0) {
for (var i = 0, f; f = e.dataTransfer.files[i]; i++) {

// Only images allowed
if (f.name.toLowerCase().match(/\.(jpg|jpeg|png|gif)$/)) {

// Create and display the progress bar
var container, innerDiv, progressBar = '';
container = document.createElement('div');
container.id = 'jloader';
innerDiv = document.createElement('div');
innerDiv.classList.add('progress');
innerDiv.classList.add('progress-success');
innerDiv.classList.add('progress-striped');
innerDiv.classList.add('active');
innerDiv.style.width = '100%';
innerDiv.style.height = '30px';
progressBar = document.createElement('div');
progressBar.classList.add('bar');
progressBar.style.width = '0';
innerDiv.appendChild(progressBar);
container.appendChild(innerDiv);
document.querySelector('.mce-toolbar-grp').appendChild(container);

// Upload the file(s)
UploadFile(f);
}

e.preventDefault();
}
editor.contentAreaContainer.style.borderWidth = '1px 0 0';
});
} else {
Joomla.renderMessages({'error': [Joomla.JText._("PLG_TINY_ERR_UNSUPPORTEDBROWSER")]});
editor.on('drop', function(e) {
e.preventDefault();

return false;
});
}
}
editor.contentAreaContainer.style.borderWidth = '1px 0 0';
});
});
Loading