first commit
This commit is contained in:
21
media/com_content/js/articles-list.js
Normal file
21
media/com_content/js/articles-list.js
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
(document => {
|
||||
|
||||
const onClick = () => {
|
||||
const form = document.getElementById('adminForm');
|
||||
document.getElementById('filter-search').value = '';
|
||||
form.submit();
|
||||
};
|
||||
const onBoot = () => {
|
||||
const form = document.getElementById('adminForm');
|
||||
const element = form.querySelector('button[type="reset"]');
|
||||
if (element) {
|
||||
element.addEventListener('click', onClick);
|
||||
}
|
||||
document.removeEventListener('DOMContentLoaded', onBoot);
|
||||
};
|
||||
document.addEventListener('DOMContentLoaded', onBoot);
|
||||
})(document);
|
||||
Reference in New Issue
Block a user