From 2653f6a943a6ed74e2b72246ba8211c5fb699a7f Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sun, 7 Aug 2016 02:17:47 +0200 Subject: restructured ;) --- js/components/form-password.js | 67 ------------------------------------------ 1 file changed, 67 deletions(-) delete mode 100755 js/components/form-password.js (limited to 'js/components/form-password.js') diff --git a/js/components/form-password.js b/js/components/form-password.js deleted file mode 100755 index b0b0e60..0000000 --- a/js/components/form-password.js +++ /dev/null @@ -1,67 +0,0 @@ -/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -(function(addon) { - - var component; - - if (window.UIkit) { - component = addon(UIkit); - } - - if (typeof define == "function" && define.amd) { - define("uikit-form-password", ["uikit"], function(){ - return component || addon(UIkit); - }); - } - -})(function(UI){ - - "use strict"; - - UI.component('formPassword', { - - defaults: { - "lblShow": "Show", - "lblHide": "Hide" - }, - - boot: function() { - // init code - UI.$html.on("click.formpassword.uikit", "[data-uk-form-password]", function(e) { - - var ele = UI.$(this); - - if (!ele.data("formPassword")) { - - e.preventDefault(); - - UI.formPassword(ele, UI.Utils.options(ele.attr("data-uk-form-password"))); - ele.trigger("click"); - } - }); - }, - - init: function() { - - var $this = this; - - this.on("click", function(e) { - - e.preventDefault(); - - if($this.input.length) { - var type = $this.input.attr("type"); - $this.input.attr("type", type=="text" ? "password":"text"); - $this.element.html($this.options[type=="text" ? "lblShow":"lblHide"]); - } - }); - - this.input = this.element.next("input").length ? this.element.next("input") : this.element.prev("input"); - this.element.html(this.options[this.input.is("[type='password']") ? "lblShow":"lblHide"]); - - - this.element.data("formPassword", this); - } - }); - - return UI.formPassword; -}); -- cgit v1.2.3