From 8696f833c2f4667ba5eb812a09bd870983d5e114 Mon Sep 17 00:00:00 2001 From: Gunther Brunner Date: Thu, 31 Jul 2014 16:54:09 +0900 Subject: [PATCH] Added native auto-fill support for URL input in Chrome. --- .../stf/common-ui/enable-autofill/README.md | 28 ++ .../enable-autofill-directive.js | 34 ++ .../enable-autofill/enable-autofill-spec.js | 23 ++ .../stf/common-ui/enable-autofill/index.js | 4 + res/app/components/stf/common-ui/index.js | 3 +- .../navigation/navigation-controller.js | 39 +-- .../dashboard/navigation/navigation.jade | 18 +- res/app/layout/stf-styles.css | 295 +++++++++--------- 8 files changed, 254 insertions(+), 190 deletions(-) create mode 100644 res/app/components/stf/common-ui/enable-autofill/README.md create mode 100644 res/app/components/stf/common-ui/enable-autofill/enable-autofill-directive.js create mode 100644 res/app/components/stf/common-ui/enable-autofill/enable-autofill-spec.js create mode 100644 res/app/components/stf/common-ui/enable-autofill/index.js diff --git a/res/app/components/stf/common-ui/enable-autofill/README.md b/res/app/components/stf/common-ui/enable-autofill/README.md new file mode 100644 index 00000000..e225eb0b --- /dev/null +++ b/res/app/components/stf/common-ui/enable-autofill/README.md @@ -0,0 +1,28 @@ +# enable-autofill + +This directive enables autofill (HTML5 autocomplete) on the selected form. + +Currently this is only needed in `Chrome` because `autofill` only works on form `POST` method. + +Based on [this](http://stackoverflow.com/questions/16445463/how-to-get-chrome-to-autofill-with-asynchronous-post/22191041#22191041). + +## Usage + +```html +
+ +
+``` + +This will create the following DOM: + +```html +