Skip to content

Commit

Permalink
Use polyfill to update model for auto-filled fields (fixes EIS-187)
Browse files Browse the repository at this point in the history
  • Loading branch information
timothykang committed May 29, 2014
1 parent 27002b2 commit 4829abc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module.exports = function(grunt) {
app: [
'<%= buildDir %>js/angular.js',
'<%= buildDir %>js/angular*.js',
'<%= buildDir %>js/autofill-event.js',
'<%= buildDir %>js/tv4.js',
'<%= buildDir %>js/*.js',
],
Expand Down Expand Up @@ -157,6 +158,7 @@ module.exports = function(grunt) {
'bower_components/angular*/angular*.js',
'!bower_components/angular*/angular*.min.js',
'bower_components/ng-file-upload/angular-file-upload.js',
'bower_components/autofill-event/src/autofill-event.js',
'bower_components/tv4/tv4.js',
'js/*.js',
'!js/*.spec.js',
Expand All @@ -172,6 +174,7 @@ module.exports = function(grunt) {
build: {
files: {
'<%= buildDir %>js/app.min.js': [
'bower_components/autofill-event/src/autofill-event.js',
'bower_components/tv4/tv4.js',
'<%= buildDir %>js/app.js',
'<%= buildDir %>js/app.templates.js',
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"inuit-ui-list": "^0.2",
"inuit-widths": "^0.1",
"tv4": "^1.0",
"angular-recursion": "^1.0"
"angular-recursion": "^1.0",
"autofill-event": "^1.0"
},
"devDependencies": {
"angular-mocks": "^1.2"
Expand Down
7 changes: 7 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,11 @@ angular.module('openeis-ui', [

return '';
};
})
.run(function ($rootScope, $rootElement) {
$rootScope.$on('$viewContentLoaded', function () {
window.setTimeout(function() {
$rootElement.find('input').checkAndTriggerAutoFillEvent();
}, 200);
});
});

0 comments on commit 4829abc

Please sign in to comment.