dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29109
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14647: Minor
------------------------------------------------------------
revno: 14647
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-04-03 21:02:51 +0200
message:
Minor
modified:
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataapproval/action/GetCategoryOptionGroupsAction.java
dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataApprovalForm.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataApproval.js
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderDataSetReportHeader.vm
--
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-reporting/src/main/java/org/hisp/dhis/reporting/dataapproval/action/GetCategoryOptionGroupsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataapproval/action/GetCategoryOptionGroupsAction.java 2014-04-03 17:51:13 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataapproval/action/GetCategoryOptionGroupsAction.java 2014-04-03 19:02:51 +0000
@@ -137,6 +137,9 @@
return groupSets;
}
+ /**
+ * Filter for org unit level on data approval levels.
+ */
class DataApprovalLevelOrgUnitLevelFilter
implements Filter<DataApprovalLevel>
{
@@ -154,6 +157,9 @@
}
}
+ /**
+ * Filter for group set on category option groups.
+ */
class CategoryOptionGroupGroupSetFilter
implements Filter<CategoryOptionGroup>
{
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2014-04-03 18:35:34 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2014-04-03 19:02:51 +0000
@@ -262,4 +262,6 @@
confirm_unapproval=Are you sure you want to unapprove this data set?
confirm_accept=Are you sure you want to accept this data set approval?
confirm_unaccept=Are you sure you want to unaccept this data set approval?
-approval_entity=Approval entity
\ No newline at end of file
+approval_entity=Approval entity
+approval_status=Approval status
+please_make_selection=Please make a selection below
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataApprovalForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataApprovalForm.vm 2014-04-03 18:20:05 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataApprovalForm.vm 2014-04-03 19:02:51 +0000
@@ -48,6 +48,11 @@
<h3 id="dataSetReportHeader">$i18n.getString( "data_approval" )</h3>
+<div class="message message-info" style="margin-bottom: 14px">
+<span>$i18n.getString( "approval_status" )</span>:
+<span id="approvalNotification">$i18n.getString( "please_make_selection" )</span>
+</div>
+
<div id="control">
<input type="button" value='$i18n.getString( "data" )' style="width:140px" onclick="dhis2.dsr.showCriteria()">
<input type="button" id="approveButton" value="$i18n.getString( 'approve' )" onclick="dhis2.appr.approveData()" class="approveButton" style="width:120px">
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataApproval.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataApproval.js 2014-04-03 18:20:05 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataApproval.js 2014-04-03 19:02:51 +0000
@@ -126,7 +126,6 @@
{
var data = dhis2.appr.getDataReport();
- $( "#approvalNotification" ).hide();
$( "#approvalDiv" ).hide();
$.getJSON( "../api/dataApprovals", data, function( json ) {
@@ -138,47 +137,47 @@
$( ".approveButton" ).hide();
- switch (json.state) {
+ switch ( json.state ) {
case "UNAPPROVED_WAITING":
- $("#approvalNotification").show().html(i18n_waiting_for_lower_level_approval);
+ $( "#approvalNotification" ).html( i18n_waiting_for_lower_level_approval );
break;
case "UNAPPROVED_READY":
- $("#approvalNotification").show().html(i18n_ready_for_approval);
+ $( "#approvalNotification" ).html( i18n_ready_for_approval );
- if (json.mayApprove) {
- $("#approvalDiv").show();
- $("#approveButton").show();
+ if ( json.mayApprove ) {
+ $( "#approvalDiv" ).show();
+ $( "#approveButton" ).show();
}
break;
case "APPROVED_HERE":
- $("#approvalNotification").show().html(i18n_approved);
+ $( "#approvalNotification" ).html( i18n_approved );
if (json.mayUnapprove) {
- $("#approvalDiv").show();
- $("#unapproveButton").show();
+ $( "#approvalDiv" ).show();
+ $( "#unapproveButton" ).show();
}
if (json.mayAccept) {
- $("#approvalDiv").show();
- $("#acceptButton").show();
+ $( "#approvalDiv" ).show();
+ $( "#acceptButton" ).show();
}
break;
case "ACCEPTED_HERE":
- $("#approvalNotification").show().html(i18n_approved);
+ $( "#approvalNotification" ).html( i18n_approved );
- if (json.mayUnapprove) {
- $("#approvalDiv").show();
- $("#unapproveButton").show();
+ if ( json.mayUnapprove ) {
+ $( "#approvalDiv" ).show();
+ $( "#unapproveButton" ).show();
}
if (json.mayUnccept) {
- $("#approvalDiv").show();
- $("#unacceptButton").show();
+ $( "#approvalDiv" ).show();
+ $( "#unacceptButton" ).show();
}
break;
@@ -249,7 +248,6 @@
$.ajax( {
url: dhis2.appr.getAcceptanceUrl(),
- data: dataReport,
type: "post",
success: function() {
$( "#approvalNotification" ).show().html( i18n_approved_and_accepted );
@@ -280,7 +278,6 @@
$.ajax( {
url: dhis2.appr.getAcceptanceUrl(),
- data: dataReport,
type: "delete",
success: function() {
$( "#approvalNotification" ).show().html( i18n_approved );
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderDataSetReportHeader.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderDataSetReportHeader.vm 2014-04-02 15:07:20 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderDataSetReportHeader.vm 2014-04-03 19:02:51 +0000
@@ -9,7 +9,6 @@
#if( $registration )<div style="margin-bottom:6px">$i18n.getString( "completed_by" ): <a href="javascript:setUserInfo( '${registration.storedBy}' )">${registration.storedBy}</a></div>#end
<div id="shareForm">
-<textarea id="interpretationArea" class="interpretationArea" placeholder="$i18n.getString( 'write_your_interpretation_of_report' )"></textarea>
-<span id="approvalNotification" class="message message-info" style="display:none"></span><br>
+<textarea id="interpretationArea" class="interpretationArea" placeholder="$i18n.getString( 'write_your_interpretation_of_report' )"></textarea><br>
<input type="button" value="$i18n.getString( 'share' )" onclick="dhis2.dsr.shareInterpretation( '${uid}', '$!{ou}' )" style="width:120px">
</div>