dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30266
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15364: minor ui adjustments in event capture
------------------------------------------------------------
revno: 15364
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Thu 2014-05-22 14:58:32 +0200
message:
minor ui adjustments in event capture
modified:
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/event-capture.appcache
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.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-event-capture/src/main/webapp/dhis-web-event-capture/event-capture.appcache'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/event-capture.appcache 2014-05-06 12:52:00 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/event-capture.appcache 2014-05-22 12:58:32 +0000
@@ -84,6 +84,7 @@
scripts/directives.js
scripts/controllers.js
scripts/filters.js
+scripts/orgunitTreeSearch.js
views/serverside-pagination.html
views/modal.html
@@ -93,4 +94,4 @@
i18n/en.json
NETWORK:
-*
\ No newline at end of file
+*
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json 2014-05-22 10:22:11 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/i18n/en.json 2014-05-22 12:58:32 +0000
@@ -62,15 +62,14 @@
"please_select": "[Please Select]",
"not_selected": "NOT_SELECTED",
"search": "Search",
+ "locate_organisation_unit_by_name": "Locate organisation unit by name",
"register_new": "Register New",
"empty_event_list": "There are no events",
"empty_search_result": "Empty Search Result",
"no": "NO",
"yes": "YES",
"offline_notification": "You are offline, data will be stored locally",
- "online_nofification": "You are online"
-
- ,
+ "online_nofification": "You are online",
"profile": "Profile",
"applications": "Apps",
"more_applications": "More apps",
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html 2014-05-22 10:22:11 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html 2014-05-22 12:58:32 +0000
@@ -59,6 +59,7 @@
<script type="text/javascript" src="scripts/directives.js"></script>
<script type="text/javascript" src="scripts/controllers.js"></script>
<script type="text/javascript" src="scripts/filters.js"></script>
+ <script type="text/javascript" src="scripts/orgunitTreeSearch.js"></script>
<!-- Menu scripts -->
<script type="text/javascript" src="../dhis-web-commons/javascripts/dhis2/dhis2.translate.js"></script>
@@ -153,15 +154,27 @@
<div ng-controller="MainController">
- <div id="leftBar">
- <div id="orgUnitTree" style="margin-top:20px">
+ <div id="leftBar">
+
+ <div style="margin-top:20px">
+
+
+ <img id="searchIcon" src="../images/search.png" style="cursor: pointer" title="{{ 'locate_organisation_unit_by_name' | translate}}">
+
+ <span id="searchSpan" style="width:100%;display:none;">
+ <input type="text" id="searchField" name="key" style="width:160px" />
+ <input type="button" value="Find" onclick="selection.findByName()" />
+ </span>
+ </div>
+
+ <div id="orgUnitTree">
<ul>
</ul>
</div>
<img id="ouwt_loader" src="../images/ajax-loader-bar.gif"/>
</div>
- <div class="page" id="mainPage">
+ <div class="page" id="mainPage" ng-show="selectedOrgUnit">
<h3>
{{'event_capture'| translate}}
</h3>
@@ -171,15 +184,7 @@
<table>
<tr>
<td><label>{{'registering_unit'| translate}}</label></td>
- <td><input type="text" class="fixed-width-text" selected-org-unit ng-model="selectedOrgUnit.name" value="{{selectedOrgUnit.name || 'please_select'| translate}}" disabled="" style="height:14px"></td>
- <td style='padding-left: 10px;'>
- <button class="button button-std"
- ng-show="dhis2Events.length"
- ng-disabled="eventRegistration || editingEventInFull || editingEventInGrid"
- ng-click="showHideColumns()">
- {{'show_hide_columns'| translate}}
- </button>
- </td>
+ <td><input type="text" class="fixed-width-text" selected-org-unit ng-model="selectedOrgUnit.name" value="{{selectedOrgUnit.name || 'please_select'| translate}}" disabled="" style="height:14px"></td>
</tr>
<tr>
<td><label>{{'program'| translate}}</label></td>
@@ -201,7 +206,7 @@
ng-disabled="eventRegistration || editingEventInFull || editingEventInGrid">
{{'register_event'| translate}}
</button>
- </td>
+ </td>
</tr>
</table>
</div>
@@ -223,7 +228,13 @@
</div>
<div ng-switch-default>
<h4>
- {{'registered_events'| translate}}
+ {{'registered_events'| translate}}
+ <button class="button button-std pull-right"
+ ng-show="dhis2Events.length"
+ ng-disabled="eventRegistration || editingEventInFull || editingEventInGrid"
+ ng-click="showHideColumns()">
+ {{'show_hide_columns'| translate}}
+ </button>
</h4>
<!-- context menu for event grid -->
@@ -238,7 +249,7 @@
<!-- grid begins -->
<form name="outerForm" novalidate>
-
+
<table class="listTable dhis2-table-striped-border dhis2-table-hover">
<thead>
<tr>
@@ -595,4 +606,4 @@
</div>
</body>
-</html>
\ No newline at end of file
+</html>
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2014-04-23 11:57:39 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2014-05-22 12:58:32 +0000
@@ -12,7 +12,6 @@
TranslationService,
storage,
DHIS2EventFactory,
- orderByFilter,
ContextMenuSelectedItem,
ModalService,
DialogService) {
@@ -74,7 +73,7 @@
if($scope.programs.length === 1){
$scope.selectedProgram = $scope.programs[0];
$scope.pr = $scope.selectedProgram;
- $scope.loadEvents($scope.pr, $scope.pager);
+ $scope.loadEvents($scope.pr);
}
}
}
@@ -82,7 +81,9 @@
};
//get events for the selected program (and org unit)
- $scope.loadEvents = function(program, pager){
+ $scope.loadEvents = function(program){
+
+ $scope.selectedProgramStage = null;
//Filtering
$scope.reverse = false;
@@ -125,7 +126,7 @@
});
//Load events for the selected program stage and orgunit
- DHIS2EventFactory.getByStage($scope.selectedOrgUnit.id, $scope.selectedProgramStage.id, pager ).then(function(data){
+ DHIS2EventFactory.getByStage($scope.selectedOrgUnit.id, $scope.selectedProgramStage.id, $scope.pager ).then(function(data){
if(data.events){
$scope.eventLength = data.events.length;
@@ -144,7 +145,6 @@
}
//process event list for easier tabular sorting
- //angular.forEach($scope.dhis2Events, function(dhis2Event){
if( angular.isObject( $scope.dhis2Events ) ) {
for(var i=0; i < $scope.dhis2Events.length; i++){
@@ -568,4 +568,4 @@
$scope.hiddenGridColumns++;
}
};
-});
\ No newline at end of file
+});
=== modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js 2014-05-12 17:25:52 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js 2014-05-22 12:58:32 +0000
@@ -356,4 +356,4 @@
}
};
-});
\ No newline at end of file
+});