forked from joomla/joomla-cms
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transform com_finder to ES6 and remove inline script [ Part1 ] (jooml…
…a#90) * com_finder es6 1 * make simple
- Loading branch information
1 parent
a823fc7
commit bbcc06b
Showing
3 changed files
with
48 additions
and
18 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,20 @@ | ||
/** | ||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
Joomla = window.Joomla || {}; | ||
|
||
(() => { | ||
'use strict'; | ||
|
||
document.addEventListener('DOMContentLoaded', () => { | ||
Joomla.submitbutton = (pressbutton) => { | ||
if (pressbutton === 'filters.delete' && !window.confirm(Joomla.JText._('COM_FINDER_INDEX_CONFIRM_DELETE_PROMPT'))) { | ||
return false; | ||
} | ||
Joomla.submitform(pressbutton); | ||
return true; | ||
}; | ||
}); | ||
})(); |
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,25 @@ | ||
/** | ||
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION. | ||
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD. | ||
**/ | ||
|
||
/** | ||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
Joomla = window.Joomla || {}; | ||
|
||
(function () { | ||
'use strict'; | ||
|
||
document.addEventListener('DOMContentLoaded', function () { | ||
Joomla.submitbutton = function (pressbutton) { | ||
if (pressbutton === 'filters.delete' && !window.confirm(Joomla.JText._('COM_FINDER_INDEX_CONFIRM_DELETE_PROMPT'))) { | ||
return false; | ||
} | ||
Joomla.submitform(pressbutton); | ||
return true; | ||
}; | ||
}); | ||
})(); |