芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/media.9/com_languages/js/admin-language-edit-change-flag-es5.js
(function () { 'use strict'; /** * @copyright (C) 2018 Open Source Matters, Inc.
* @license GNU General Public License version 2 or later; see LICENSE.txt */ document.addEventListener('DOMContentLoaded', function () { document.getElementById('jform_image').addEventListener('change', function (_ref) { var currentTarget = _ref.currentTarget; var flagSelectedValue = currentTarget.value; var flagimage = document.getElementById('flag').querySelector('img'); var src = Joomla.getOptions('system.paths').rootFull + "/media/mod_languages/images/" + flagSelectedValue + ".gif"; if (flagSelectedValue) { flagimage.setAttribute('src', src); flagimage.setAttribute('alt', flagSelectedValue); } else { flagimage.removeAttribute('src'); flagimage.setAttribute('alt', ''); } }, false); }); }());