dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39613
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20064: bug fix in angular ui-select plugin
------------------------------------------------------------
revno: 20064
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-09-09 17:01:59 +0200
message:
bug fix in angular ui-select plugin
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/directives.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/select.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-apps/src/main/webapp/dhis-web-event-capture/scripts/directives.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/directives.js 2015-06-15 11:04:20 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/directives.js 2015-09-09 15:01:59 +0000
@@ -2,31 +2,4 @@
/* Directives */
-var eventCaptureDirectives = angular.module('eventCaptureDirectives', [])
-
-/*.directive('d2Options', function ($parse) {
- var linker = function (scope, element, attr) {
-
- scope.$watchCollection(['ngModel', 'options'], function () {
- element.trigger('chosen:updated');
- });
-
-
- var allowSingleDeselect = $parse(attr.allowSingleDeselect)(scope);
- var options = {
- no_results_text: "Oops, nothing found!",
- allow_single_deselect: allowSingleDeselect ? allowSingleDeselect : false
- };
-
- element.chosen(options);
- };
-
- return {
- restrict: 'A',
- scope: {// isolate scope
- ngModel: '=',
- options: '='
- },
- link: linker
- };
-})*/;
\ No newline at end of file
+var eventCaptureDirectives = angular.module('eventCaptureDirectives', []);
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/select.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/select.js 2015-06-02 12:23:22 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/select.js 2015-09-09 15:01:59 +0000
@@ -331,7 +331,7 @@
$timeout(function() {
ctrl.search = initSearchValue || ctrl.search;
ctrl.searchInput[0].focus();
- });
+ },100);
}
};
@@ -634,7 +634,12 @@
else if (ctrl.activeIndex > 0 || (ctrl.search.length === 0 && ctrl.tagging.isActivated && ctrl.activeIndex > -1)) { ctrl.activeIndex--; }
break;
case KEY.TAB:
- if (!ctrl.multiple || ctrl.open) ctrl.select(ctrl.items[ctrl.activeIndex], true);
+ /*
+ * changed by abyot
+ * disable automatic selection by default
+ */
+ //if (!ctrl.multiple || ctrl.open) ctrl.select(ctrl.items[ctrl.activeIndex], true);
+ ctrl.close();
break;
case KEY.ENTER:
if(ctrl.open && (ctrl.tagging.isActivated || ctrl.activeIndex >= 0)){