------------------------------------------------------------
revno: 18132
committer: Abyot Asalefew Gizaw <[email protected]>
branch nick: dhis2
timestamp: Tue 2015-01-27 23:51:17 +0100
message:
event-capture - bug fix in typeahead when both keyboard and mouse are used
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/directives.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/directives.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/directives.js 2015-01-26 17:47:09 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/directives.js 2015-01-27 22:51:17 +0000
@@ -216,13 +216,13 @@
.directive('d2TypeaheadValidation', function() {
return {
- require: 'ngModel',
+ require: ['typeahead', 'ngModel'],
restrict: 'A',
- link: function (scope, element, attrs, ctrl) {
+ link: function (scope, element, attrs, ctrls) {
element.bind('blur', function () {
- if(ctrl.$viewValue && !ctrl.$modelValue){
- ctrl.$setViewValue();
- ctrl.$render();
+ if(ctrls[1].$viewValue && !ctrls[1].$modelValue && ctrls[0].active === -1){
+ ctrls[1].$setViewValue();
+ ctrls[1].$render();
}
});
}
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp