=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-05-21 15:55:51 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-05-26 08:08:05 +0000 @@ -63,6 +63,7 @@ "show_hide_widgets": "Show/Hide widgets", "select_widgets_to_show": "Select widgets to show", "close": "Close", + "list_programs": "List programs", "program_stage": "Program stage", "scheduled_date": "Scheduled date", "scheduling": "Scheduling", === modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/index.html' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/index.html 2014-05-16 11:32:21 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/index.html 2014-05-26 08:08:05 +0000 @@ -63,7 +63,7 @@ - + === modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-05-21 16:21:54 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-05-26 08:08:05 +0000 @@ -37,8 +37,8 @@ $scope.showSearchDiv = false; $scope.searchText = null; $scope.emptySearchText = false; - $scope.searchFilterExists = false; - $scope.attributes = AttributesFactory.getWithoutProgram(); + $scope.searchFilterExists = false; + $scope.searchMode = { listAll: 'LIST_ALL', freeText: 'FREE_TEXT', @@ -51,6 +51,8 @@ //watch for selection of org unit from tree $scope.$watch('selectedOrgUnit', function() { + $scope.attributes = AttributesFactory.getWithoutProgram(); + if( angular.isObject($scope.selectedOrgUnit)){ storage.set('SELECTED_OU', $scope.selectedOrgUnit); @@ -60,8 +62,9 @@ //apply translation - by now user's profile is fetched from server. TranslationService.translate(); - $scope.loadPrograms($scope.selectedOrgUnit); + $scope.loadPrograms($scope.selectedOrgUnit); $scope.search($scope.searchMode.listAll); + } }); @@ -91,7 +94,8 @@ if( !angular.isUndefined($scope.programs)){ if($scope.programs.length === 1){ $scope.selectedProgram = $scope.programs[0]; - $scope.pr = $scope.selectedProgram; + $scope.pr = $scope.selectedProgram; + $scope.attributes = AttributesFactory.getByProgram($scope.selectedProgram); } } } @@ -101,16 +105,19 @@ $scope.getProgramAttributes = function(program){ $scope.trackedEntityList = null; $scope.selectedProgram = program; + if($scope.selectedProgram){ $scope.attributes = AttributesFactory.getByProgram($scope.selectedProgram); } else{ $scope.attributes = AttributesFactory.getWithoutProgram(); } + + $scope.search($scope.searchMode); }; $scope.search = function(mode){ - + $scope.emptySearchText = false; $scope.emptySearchAttribute = false; $scope.showSearchDiv = false; @@ -148,6 +155,8 @@ else if( mode === $scope.searchMode.listAll ){ $scope.showTrackedEntityDiv = true; } + + $scope.gridColumns = $scope.generateGridColumns($scope.attributes); //get events for the specified parameters TEIService.search($scope.selectedOrgUnit.id, @@ -155,12 +164,7 @@ queryUrl, programUrl, attributeUrl.url).then(function(data){ - $scope.trackedEntityList = data; - - if($scope.trackedEntityList){ - $scope.gridColumns = $scope.generateGridColumns($scope.attributes); - } - + $scope.trackedEntityList = data; }); }; === modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-05-21 16:13:41 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-05-26 08:08:05 +0000 @@ -124,6 +124,23 @@ //dhis2.availability.startAvailabilityCheck(); + //drop down menus for program selection and advanced search + $( "#searchDropDown" ).width($( "#searchDropDownParent" ).width()); + $( "#selectDropDown" ).width($( "#selectDropDownParent" ).width()); + + $(".select-drop-down-button").on('click', function(e){ + e.stopPropagation(); + $("#selectDropDown").dropdown('toggle'); + }); + +}); + +$(window).resize(function() { + $( "#selectDropDown" ).width($( "#selectDropDownParent" ).width()); + $( "#searchDropDown" ).width($( "#searchDropDownParent" ).width()); + + console.log('select parent width is-r: ', $( "#selectDropDownParent" ).width()); + console.log('select width is-r: ', $( "#selectDropDown" ).width()); }); function ajax_login() === modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-05-22 13:19:01 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-05-26 08:08:05 +0000 @@ -849,4 +849,14 @@ .underline{ text-decoration: underline; +} + +.select-drop-down-button{ + text-align: left; + padding: 6px 12px; + color: #999; +} + +.dropdown-menu { + margin-top: -5px; } \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html 2014-05-22 13:19:01 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html 2014-05-26 08:08:05 +0000 @@ -21,11 +21,15 @@
-
+
- - - +
+ + +
+
+
- - + +
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/search.html' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/search.html 2014-05-22 13:19:01 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/search.html 2014-05-26 08:08:05 +0000 @@ -1,53 +1,49 @@ -
- -
- - - - - - - - - -
{{'org_unit_mode'| translate}} - {{'use_selected'| translate}}
- {{'use_immediate_children'| translate}}
- {{'use_all_children'| translate}} -
- {{attribute.name}} - {{attribute.valueType}} - -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
- + + + + + + + + + + +
{{'org_unit_mode'| translate}} + {{'use_selected'| translate}}
+ {{'use_immediate_children'| translate}}
+ {{'use_all_children'| translate}} +
+ {{attribute.name}} - {{attribute.valueType}} + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
@@ -68,4 +64,4 @@
- \ No newline at end of file +