forked from joomla/joomla-cms
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from joomla-projects/remove-inline-scripts/com…
…ponents/com_tags/tmpl/tags/default_items.php remove-inline-scripts/components/com_tags/tmpl/tags/default_items.php
- Loading branch information
Showing
2 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
(function (document) { | ||
'use strict'; | ||
|
||
// selectors used in this scirpt | ||
var formId = 'adminForm'; | ||
var searchFilterId = 'filter-search'; | ||
|
||
document.addEventListener('DOMContentLoaded', function () { | ||
var form = document.getElementById(formId); | ||
form.querySelector('button[type="reset"]').addEventListener('click', function(event) { | ||
document.getElementById(searchFilterId).value = ''; | ||
form.submit(); | ||
}) | ||
}); | ||
})(document); |