primo commit
This commit is contained in:
4
media/system/js/fields/passwordview.min.js
vendored
Normal file
4
media/system/js/fields/passwordview.min.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/(l=>{function c(){[].slice.call(l.querySelectorAll('input[type="password"]')).forEach(e=>{const s=e.parentNode.querySelector(".input-password-toggle"),i=s.getAttribute("clickListener")==="true";s&&!i&&(s.setAttribute("clickListener","true"),s.addEventListener("click",()=>{const o=s.firstElementChild,a=s.lastElementChild;e.type==="password"?(o.classList.remove("icon-eye"),o.classList.add("icon-eye-slash"),e.type="text",e.focus(),a.innerText=Joomla.Text._("JHIDEPASSWORD")):e.type==="text"&&(o.classList.add("icon-eye"),o.classList.remove("icon-eye-slash"),e.type="password",e.focus(),a.innerText=Joomla.Text._("JSHOWPASSWORD"))}));const t=e.parentNode.querySelector(".input-password-modify");t&&t.addEventListener("click",()=>{!t.classList.contains("locked")===!0?(t.classList.add("locked"),e.value="",e.setAttribute("disabled",""),t.innerText=Joomla.Text._("JMODIFY")):(t.classList.remove("locked"),e.removeAttribute("disabled"),e.focus(),t.innerText=Joomla.Text._("JCANCEL"))})})}l.addEventListener("joomla:updated",c),l.addEventListener("DOMContentLoaded",c)})(document);
|
||||
Reference in New Issue
Block a user