Skip to content

Commit

Permalink
Merge branch 'hotfix/v1.0.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
kamal0808 committed Aug 19, 2017
2 parents 8d32391 + 8f22544 commit ef8474f
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 27 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "materializecss-autocomplete",
"version": "1.0.12",
"version": "1.0.13",
"description": "angularjs autocomplete",
"main": [
"dist/js/materializecss-autocomplete.min.js",
Expand Down
15 changes: 10 additions & 5 deletions demo/client/lib/js/materializecss-autocomplete.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* materializecss-autocomplete - v1.0.12 - 2017-08-18 */(function () {
/* materializecss-autocomplete - v1.0.13 - 2017-08-19 */(function () {
'use strict';
angular.module('material.autocomplete', ['material.autocomplete.templates'])
.run(['$templateCache', '$compile', '$rootScope', function ($templateCache, $compile, $rootScope) {
Expand Down Expand Up @@ -147,6 +147,7 @@ angular.module('material.autocomplete.templates', []).run(['$templateCache', fun

$timeout(function () {
self.parentForm = $scope.parentForm;
self.immediateParentForm = $scope.immediateParentForm;
}, 20);


Expand Down Expand Up @@ -335,13 +336,17 @@ angular.module('material.autocomplete.templates', []).run(['$templateCache', fun
}
if(self.checkError()) {
self.parentForm.$setValidity('selection', false);
self.immediateParentForm.$setValidity('selection', false);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', false);
if(self.immediateParentForm) {
self.immediateParentForm.$setValidity('selection', false);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', false);
}
}
else {
self.parentForm.$setValidity('selection', true);
self.immediateParentForm.$setValidity('selection', true);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', true);
if(self.immediateParentForm) {
self.immediateParentForm.$setValidity('selection', true);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', true);
}
}
};

Expand Down
8 changes: 4 additions & 4 deletions demo/client/lib/js/materializecss-autocomplete.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/client/lib/js/materializecss-autocomplete.min.js.map

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions dist/js/materializecss-autocomplete.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* materializecss-autocomplete - v1.0.12 - 2017-08-18 */(function () {
/* materializecss-autocomplete - v1.0.13 - 2017-08-19 */(function () {
'use strict';
angular.module('material.autocomplete', ['material.autocomplete.templates'])
.run(['$templateCache', '$compile', '$rootScope', function ($templateCache, $compile, $rootScope) {
Expand Down Expand Up @@ -147,6 +147,7 @@ angular.module('material.autocomplete.templates', []).run(['$templateCache', fun

$timeout(function () {
self.parentForm = $scope.parentForm;
self.immediateParentForm = $scope.immediateParentForm;
}, 20);


Expand Down Expand Up @@ -335,13 +336,17 @@ angular.module('material.autocomplete.templates', []).run(['$templateCache', fun
}
if(self.checkError()) {
self.parentForm.$setValidity('selection', false);
self.immediateParentForm.$setValidity('selection', false);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', false);
if(self.immediateParentForm) {
self.immediateParentForm.$setValidity('selection', false);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', false);
}
}
else {
self.parentForm.$setValidity('selection', true);
self.immediateParentForm.$setValidity('selection', true);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', true);
if(self.immediateParentForm) {
self.immediateParentForm.$setValidity('selection', true);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', true);
}
}
};

Expand Down
8 changes: 4 additions & 4 deletions dist/js/materializecss-autocomplete.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/materializecss-autocomplete.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "materializecss-autocomplete",
"version": "1.0.12",
"version": "1.0.13",
"description": "angularjs autocomplete",
"main": "dist/js/materializecss-autocomplete.min.js",
"style": "dist/css/materializecss-autocomplete.min.css",
Expand Down
13 changes: 9 additions & 4 deletions src/js/autocomplete.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

$timeout(function () {
self.parentForm = $scope.parentForm;
self.immediateParentForm = $scope.immediateParentForm;
}, 20);


Expand Down Expand Up @@ -194,13 +195,17 @@
}
if(self.checkError()) {
self.parentForm.$setValidity('selection', false);
self.immediateParentForm.$setValidity('selection', false);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', false);
if(self.immediateParentForm) {
self.immediateParentForm.$setValidity('selection', false);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', false);
}
}
else {
self.parentForm.$setValidity('selection', true);
self.immediateParentForm.$setValidity('selection', true);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', true);
if(self.immediateParentForm) {
self.immediateParentForm.$setValidity('selection', true);
self.immediateParentForm[self.inputFieldName].$setValidity('selection', true);
}
}
};

Expand Down

0 comments on commit ef8474f

Please sign in to comment.