dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38200
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19502: added a feedback widget for giving user feedback with program rules
------------------------------------------------------------
revno: 19502
committer: Markus Bekken <markus.bekken@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-06-23 15:17:50 +0200
message:
added a feedback widget for giving user feedback with program rules
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound-controller.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app_ar.properties
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-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-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js 2015-06-21 22:18:40 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dashboard/dashboard-controller.js 2015-06-23 13:17:50 +0000
@@ -83,6 +83,11 @@
$rootScope.dashboardWidgets.push($rootScope.indicatorWidget);
$scope.dashboardStatus[widget.title] = angular.copy(widget);
break;
+ case 'feedback':
+ $rootScope.feedbackWidget = widget;
+ $rootScope.dashboardWidgets.push($rootScope.feedbackWidget);
+ $scope.dashboardStatus[widget.title] = angular.copy(widget);
+ break;
case 'dataentry':
$rootScope.dataentryWidget = widget;
$rootScope.dashboardWidgets.push($rootScope.dataentryWidget);
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js 2015-06-22 08:45:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js 2015-06-23 13:17:50 +0000
@@ -220,7 +220,7 @@
sortEventsByStage(null);
$scope.showDataEntry($scope.currentEvent, true);
- }
+ }
};
var setEventEditing = function(dhis2Event, stage){
@@ -250,14 +250,14 @@
});
};
- $scope.stageNeedsEvent = function(stage){
+ $scope.stageNeedsEvent = function(stage){
//In case the event is a table, we sould always allow adding more events(rows)
if(stage.displayEventsInTable) {
return true;
}
- if($scope.eventsByStage[stage.id].length < 1){
+ if($scope.eventsByStage[stage.id].length < 1){
return true;
}
@@ -266,7 +266,7 @@
if(!$scope.eventsByStage[stage.id][j].eventDate && $scope.eventsByStage[stage.id][j].status !== 'SKIPPED'){
return false;
}
- }
+ }
return true;
}
return false;
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound-controller.js 2015-06-14 13:07:10 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound-controller.js 2015-06-23 13:17:50 +0000
@@ -8,7 +8,7 @@
$scope.widget = $scope.$parent.$parent.biggerWidget ? $scope.$parent.$parent.biggerWidget
: $scope.$parent.$parent.smallerWidget ? $scope.$parent.$parent.smallerWidget : null;
$scope.widgetTitle = $scope.widget.title;
- $scope.widgetCode = $scope.widget.code;
+
$scope.displayTextEffects = {};
@@ -21,7 +21,7 @@
//Bind non-bound rule effects, if any.
angular.forEach($rootScope.ruleeffects[args.event], function(effect) {
- if(effect.location === $scope.widgetCode){
+ if(effect.location === $scope.widgetTitle){
//This effect is affecting the local widget
if(effect.action === "DISPLAYTEXT") {
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties 2015-06-21 22:18:40 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties 2015-06-23 13:17:50 +0000
@@ -139,6 +139,7 @@
name=Name
dataentry=Data Entry
indicators=Indicators
+feedback=Feedback
custom_form=Custom form
default_form=Default form
menu=Menu
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app_ar.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app_ar.properties 2015-06-21 22:18:40 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app_ar.properties 2015-06-23 13:17:50 +0000
@@ -115,6 +115,7 @@
name=\u0627\u0633\u0645
dataentry=\u0627\u062f\u062e\u0627\u0644 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a
indicators=\u0627\u0644\u0645\u0624\u0634\u0631\u0627\u062a ( \u062c\u0648\u062c\u0644 \u062a\u0631\u062c\u0645\u0629 )
+feedback=\u0631\u062f\u0648\u062f \u0627\u0644\u0641\u0639\u0644 (\u062c\u0648\u062c\u0644 \u062a\u0631\u062c\u0645\u0629 )
custom_form=\u0627\u0633\u062a\u0645\u0627\u0631\u0629 \u0645\u062e\u0635\u0635\u0629
default_form=\u0627\u0633\u062a\u0645\u0627\u0631\u0629 \u0627\u0641\u062a\u0631\u0627\u0636\u064a\u0629
menu=\u0642\u0627\u0626\u0645\u0629
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2015-06-22 12:07:24 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2015-06-23 13:17:50 +0000
@@ -22,13 +22,14 @@
var w = {};
w.enrollmentWidget = {title: 'enrollment', view: "components/enrollment/enrollment.html", show: true, expand: true, parent: 'biggerWidget', order: 0};
- w.indicatorWidget = {title: 'indicators', view: "components/rulebound/rulebound.html", show: true, expand: true, parent: 'biggerWidget', order: 1, code:'indicators'};
+ w.indicatorWidget = {title: 'indicators', view: "components/rulebound/rulebound.html", show: true, expand: true, parent: 'biggerWidget', order: 1};
w.dataentryWidget = {title: 'dataentry', view: "components/dataentry/dataentry.html", show: true, expand: true, parent: 'biggerWidget', order: 2};
w.reportWidget = {title: 'report', view: "components/report/tei-report.html", show: true, expand: true, parent: 'biggerWidget', order: 3};
w.selectedWidget = {title: 'current_selections', view: "components/selected/selected.html", show: false, expand: true, parent: 'smallerWidget', order: 0};
- w.profileWidget = {title: 'profile', view: "components/profile/profile.html", show: true, expand: true, parent: 'smallerWidget', order: 1};
- w.relationshipWidget = {title: 'relationships', view: "components/relationship/relationship.html", show: true, expand: true, parent: 'smallerWidget', order: 2};
- w.notesWidget = {title: 'notes', view: "components/notes/notes.html", show: true, expand: true, parent: 'smallerWidget', order: 3};
+ w.feedbackWidget = {title: 'feedback', view: "components/rulebound/rulebound.html", show: true, expand: true, parent: 'smallerWidget', order: 1};
+ w.profileWidget = {title: 'profile', view: "components/profile/profile.html", show: true, expand: true, parent: 'smallerWidget', order: 2};
+ w.relationshipWidget = {title: 'relationships', view: "components/relationship/relationship.html", show: true, expand: true, parent: 'smallerWidget', order: 3};
+ w.notesWidget = {title: 'notes', view: "components/notes/notes.html", show: true, expand: true, parent: 'smallerWidget', order: 4};
var defaultLayout = new Object();
defaultLayout['DEFAULT'] = {widgets: w, program: 'DEFAULT'};