=== 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-03-19 10:37:49 +0000 +++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/index.html 2014-03-26 14:16:51 +0000 @@ -1,5 +1,6 @@ - + + Event Capture @@ -44,7 +45,7 @@ - + @@ -96,12 +97,13 @@ - +
@@ -330,12 +332,12 @@ -
-

- {{'update_event'| translate}} -

-
-
+ +
+

+ {{'update_event'| translate}} +

+
@@ -418,19 +420,19 @@
- - + +
-
+ -
-

- {{'new_event'| translate}} -

-
-
+ +
+

+ {{'new_event'| translate}} +

+
@@ -517,15 +519,14 @@
-           - - -
-
+ +
+
+
=== 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-03-26 09:44:22 +0000 +++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/controllers.js 2014-03-26 14:16:51 +0000 @@ -13,7 +13,8 @@ DHIS2EventFactory, orderByFilter, ContextMenuSelectedItem, - ModalService, + ModalService, + ColumnsDialogService, DialogService) { //selected org unit @@ -219,7 +220,15 @@ else{ $scope.hiddenGridColumns--; } - } + } + + /*var dialogOptions = { + headerText: 'show_hide_columns', + bodyText: $scope.eventGridColumns + }; + + ColumnsDialogService.showDialog({}, dialogOptions);*/ + }; $scope.searchInGrid = function(gridColumn){ === 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-03-19 08:22:59 +0000 +++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/services.js 2014-03-26 14:16:51 +0000 @@ -254,6 +254,59 @@ }]) +/* Popup dialog for displaying columns show/hide */ +.service('ColumnsDialogService', ['$modal', function($modal) { + + var dialogDefaults = { + backdrop: true, + keyboard: true, + backdropClick: true, + modalFade: true, + templateUrl: 'views/column-modal.html' + }; + + var dialogOptions = { + closeButtonText: 'close', + actionButtonText: 'ok', + headerText: 'dhis2_tracker', + bodyText: 'Perform this action?', + note: 'note', + created_by: 'created_by', + date: 'date' + }; + + this.showDialog = function(customDialogDefaults, customDialogOptions) { + if (!customDialogDefaults) + customDialogDefaults = {}; + customDialogDefaults.backdropClick = false; + return this.show(customDialogDefaults, customDialogOptions); + }; + + this.show = function(customDialogDefaults, customDialogOptions) { + //Create temp objects to work with since we're in a singleton service + var tempDialogDefaults = {}; + var tempDialogOptions = {}; + + //Map angular-ui modal custom defaults to modal defaults defined in service + angular.extend(tempDialogDefaults, dialogDefaults, customDialogDefaults); + + //Map modal.html $scope custom properties to defaults defined in service + angular.extend(tempDialogOptions, dialogOptions, customDialogOptions); + + if (!tempDialogDefaults.controller) { + tempDialogDefaults.controller = function($scope, $modalInstance) { + $scope.dialogOptions = tempDialogOptions; + $scope.dialogOptions.ok = function(result) { + $modalInstance.close(result); + }; + }; + } + + return $modal.open(tempDialogDefaults).result; + }; + +}]) + /* Context menu for grid*/ .service('ContextMenuSelectedItem', function(){ this.selectedItem = ''; === modified file 'dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/styles/style.css' --- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/styles/style.css 2014-03-19 10:37:49 +0000 +++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/styles/style.css 2014-03-26 14:16:51 +0000 @@ -2,8 +2,7 @@ /* Form /*----------------------------------------------------------------------------*/ -input[type="text"] -{ +.fixed-width-text { width: 260px; } @@ -12,8 +11,7 @@ width: 240px; } -select -{ +.fixed-width-select{ width: 264px; } @@ -32,6 +30,12 @@ // App specific // -------------------------------------------------------------- +// Block level inputs +.container-filters { + display: block; + width: 100%; +} + .container-heading { color: white; padding: 12px; @@ -490,7 +494,7 @@ margin-bottom: 20px; background-color: #fff; border: 1px solid transparent; - + -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.05); box-shadow: 0 1px 1px rgba(0,0,0,0.05) } === modified file 'dhis-2/dhis-web/pom.xml' --- dhis-2/dhis-web/pom.xml 2014-03-26 09:44:22 +0000 +++ dhis-2/dhis-web/pom.xml 2014-03-26 14:16:51 +0000 @@ -26,7 +26,6 @@ dhis-web-visualizer dhis-web-pivot dhis-web-dashboard-integration - dhis-web-event-reports dhis-web-caseentry dhis-web-light dhis-web-mobile