diff --git a/dashboard/activation.html b/dashboard/activation.html index 6fef8019a..0b911f752 100644 --- a/dashboard/activation.html +++ b/dashboard/activation.html @@ -27,7 +27,6 @@ - diff --git a/dashboard/index.html b/dashboard/index.html index 99446ac5b..fa87e86a8 100644 --- a/dashboard/index.html +++ b/dashboard/index.html @@ -41,7 +41,6 @@ - diff --git a/dashboard/passwordreset.html b/dashboard/passwordreset.html index f29ac8819..a001f0d53 100644 --- a/dashboard/passwordreset.html +++ b/dashboard/passwordreset.html @@ -29,7 +29,6 @@ - diff --git a/dashboard/public/js/autofill-event.js b/dashboard/public/js/autofill-event.js deleted file mode 100644 index 8650fac71..000000000 --- a/dashboard/public/js/autofill-event.js +++ /dev/null @@ -1,132 +0,0 @@ -/** - * Autofill event polyfill ##version:1.0.0## - * (c) 2014 Google, Inc. - * License: MIT - */ -(function(window) { - var $ = window.jQuery || window.angular.element; - var rootElement = window.document.documentElement, - $rootElement = $(rootElement); - - addGlobalEventListener('change', markValue); - addValueChangeByJsListener(markValue); - - $.prototype.checkAndTriggerAutoFillEvent = jqCheckAndTriggerAutoFillEvent; - - // Need to use blur and not change event - // as Chrome does not fire change events in all cases an input is changed - // (e.g. when starting to type and then finish the input by auto filling a username) - addGlobalEventListener('blur', function(target) { - // setTimeout needed for Chrome as it fills other - // form fields a little later... - window.setTimeout(function() { - findParentForm(target).find('input').checkAndTriggerAutoFillEvent(); - }, 20); - }); - - window.document.addEventListener('DOMContentLoaded', function() { - // mark all values that are present when the DOM is ready. - // We don't need to trigger a change event here, - // as js libs start with those values already being set! - forEach(document.getElementsByTagName('input'), markValue); - - // The timeout is needed for Chrome as it auto fills - // login forms some time after DOMContentLoaded! - window.setTimeout(function() { - $rootElement.find('input').checkAndTriggerAutoFillEvent(); - }, 200); - }, false); - - return; - - // ---------- - - function jqCheckAndTriggerAutoFillEvent() { - var i, el; - for (i=0; i 0) { - forEach(this, function(el) { - listener(el, newValue); - }); - } - return res; - }; - } - - function addGlobalEventListener(eventName, listener) { - // Use a capturing event listener so that - // we also get the event when it's stopped! - // Also, the blur event does not bubble. - rootElement.addEventListener(eventName, onEvent, true); - - function onEvent(event) { - var target = event.target; - listener(target); - } - } - - function findParentForm(el) { - while (el) { - if (el.nodeName === 'FORM') { - return $(el); - } - el = el.parentNode; - } - return $(); - } - - function forEach(arr, listener) { - if (arr.forEach) { - return arr.forEach(listener); - } - var i; - for (i=0; i - diff --git a/dashboard/setup.html b/dashboard/setup.html index 1ca937b8f..c6684439c 100644 --- a/dashboard/setup.html +++ b/dashboard/setup.html @@ -27,7 +27,6 @@ - diff --git a/dashboard/setupaccount.html b/dashboard/setupaccount.html index 3a1c3552e..9878c3727 100644 --- a/dashboard/setupaccount.html +++ b/dashboard/setupaccount.html @@ -25,7 +25,6 @@ -