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 #33 from joomla-projects/mod_multilangstatus
transform admin-multilangstatus.js to es6
- Loading branch information
Showing
2 changed files
with
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
(() => { | ||
'use strict'; | ||
|
||
document.addEventListener('DOMContentLoaded', () => { | ||
// We need to use JS to move the modal before the closing body tag to avoid stacking issues | ||
const multilangueModal = document.getElementById('multiLangModal'); | ||
|
||
if (multilangueModal) { | ||
// Clone the modal element | ||
const clone = multilangueModal.cloneNode(true); | ||
|
||
// Remove the original modal element | ||
multilangueModal.parentNode.removeChild(multilangueModal); | ||
|
||
// Append clone before closing body tag | ||
document.body.appendChild(clone); | ||
} | ||
}); | ||
})(); |
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 |
---|---|---|
@@ -1,27 +1,29 @@ | ||
/** | ||
* 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 | ||
*/ | ||
|
||
(function() { | ||
'use strict'; | ||
|
||
document.addEventListener('DOMContentLoaded', function() { | ||
|
||
// We need to use JS to move the modal before the closing body tag to avoid stacking issues | ||
var multilangueModal = document.getElementById('multiLangModal'); | ||
|
||
if (multilangueModal) { | ||
// Clone the modal element | ||
var clone = multilangueModal.cloneNode(true); | ||
(function () { | ||
'use strict'; | ||
|
||
// Remove the original modal element | ||
multilangueModal.parentNode.removeChild(multilangueModal); | ||
document.addEventListener('DOMContentLoaded', function () { | ||
// We need to use JS to move the modal before the closing body tag to avoid stacking issues | ||
var multilangueModal = document.getElementById('multiLangModal'); | ||
|
||
// Append clone before closing body tag | ||
document.body.appendChild(clone); | ||
} | ||
if (multilangueModal) { | ||
// Clone the modal element | ||
var clone = multilangueModal.cloneNode(true); | ||
|
||
}); | ||
// Remove the original modal element | ||
multilangueModal.parentNode.removeChild(multilangueModal); | ||
|
||
})(); | ||
// Append clone before closing body tag | ||
document.body.appendChild(clone); | ||
} | ||
}); | ||
})(); |