dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #06820
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1898: Minor Bugs Fixed in DataLocking GUI
------------------------------------------------------------
revno: 1898
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-08-04 11:44:23 +0530
message:
Minor Bugs Fixed in DataLocking GUI
removed:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingError.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingSuccess.vm
added:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingStatus.vm
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/CollectiveDataLockingAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/datasetLockReport.js
local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/chart/impl/DefaultChartService.java
local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GenerateDataSetLockReportAnalyserFormAction.java
--
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-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java 2010-06-03 09:22:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java 2010-08-04 06:14:23 +0000
@@ -32,6 +32,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Set;
@@ -255,18 +256,19 @@
public List<DataSet> getAssignedDataSetsByPeriodType( PeriodType periodType )
{
- List<DataSet> assignedDataSetListByPeriodType = new ArrayList<DataSet>();
List<DataSet> dataSetListByPeriodType = new ArrayList<DataSet>( getDataSetsByPeriodType( periodType ) );
- for ( DataSet dataSet : dataSetListByPeriodType )
+ Iterator<DataSet> dataSetIterator = dataSetListByPeriodType.iterator();
+ while( dataSetIterator.hasNext() )
{
- if ( dataSet.getSources() != null )
+ DataSet dataSet = dataSetIterator.next();
+ if ( dataSet.getSources() == null || dataSet.getSources().size() == 0 )
{
- assignedDataSetListByPeriodType.add( dataSet );
+ dataSetIterator.remove();
}
}
- return assignedDataSetListByPeriodType;
+ return dataSetListByPeriodType;
}
public Collection<DataElement> getDistinctDataElements( Collection<Integer> dataSetIdentifiers )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/CollectiveDataLockingAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/CollectiveDataLockingAction.java 2010-08-03 12:43:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/java/org/hisp/dhis/dataadmin/action/lock/CollectiveDataLockingAction.java 2010-08-04 06:14:23 +0000
@@ -137,14 +137,14 @@
{
this.dataSetIds = DataSetIds;
}
-
+ /*
private Collection<Integer> organisationUnitIds = new ArrayList<Integer>();
public void setOrganisationUnitIds( Collection<Integer> organisationUnitIds )
{
this.organisationUnitIds = organisationUnitIds;
}
-
+ */
private String selectionValue = new String();
public void setSelectionValue( String selectionValue )
@@ -217,7 +217,7 @@
{
message = i18n.getString( "period_not_selected" );
- return INPUT;
+ return SUCCESS;
}
if ( dataSetIds != null && dataSetIds.size() != 0 )
@@ -231,7 +231,7 @@
{
message = i18n.getString( "dataset_not_selected" );
- return INPUT;
+ return SUCCESS;
}
Collection<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>();
@@ -296,7 +296,7 @@
{
message = i18n.getString( "organisation_not_selected" );
- return INPUT;
+ return SUCCESS;
}
if ( selectionValue.equalsIgnoreCase( selected ) )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties 2010-08-03 12:43:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties 2010-08-04 06:14:23 +0000
@@ -268,6 +268,6 @@
unselect_all_at_level_saved = Unselect All at Level Saved
select_all_in_group_saved = Select All at Group Saved
unselect_all_in_group_saved = Unselect All at Group Saved
-information_successfully_locked = Information Successfully Locked
-information_successfully_unlocked = Information Successfully Unlocked
+information_successfully_locked = Data Successfully Locked
+information_successfully_unlocked = Data Successfully Unlocked
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2010-08-03 12:43:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2010-08-04 06:14:23 +0000
@@ -84,10 +84,9 @@
<!-- advanced Locking-->
<action name="collectiveDataLocking"
class="org.hisp.dhis.dataadmin.action.lock.CollectiveDataLockingAction">
- <result name="success" type="velocity">
- /dhis-web-maintenance-dataadmin/collectiveDataLockingSuccess.vm</result>
- <result name="input" type="velocity">
- /dhis-web-maintenance-dataadmin/collectiveDataLockingError.vm</result>
+ <result name="success" type="velocity">/main.vm </result>
+ <param name="page">/dhis-web-maintenance-dataadmin/collectiveDataLockingStatus.vm</param>
+ <param name="menu">/dhis-web-maintenance-dataadmin/menu.vm</param>
</action>
<action name="getDataSetsForOrguntwiseLocking"
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingError.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingError.vm 2010-07-17 12:46:48 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingError.vm 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-<h2>$message</h2>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingForm.vm 2010-08-03 12:43:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingForm.vm 2010-08-04 06:14:23 +0000
@@ -20,69 +20,71 @@
function validateCollectiveDataLockingForm()
{
- periodIdOptions = document.getElementById("periodId").options;
+ periodIdOptions = document.getElementById("periodId").options;
- if( periodIdOptions.length > 0 )
+ if( periodIdOptions.length > 0 )
+ {
+ var i;
+ for( i=0; i < periodIdOptions.length ; i++ )
{
- var i;
- for( i=0; i < periodIdOptions.length ; i++ )
- {
- if( periodIdOptions[i].selected == true )
+ if( periodIdOptions[i].selected == true )
break;
- }
- if( i == periodIdOptions.length )
- {
- alert(i18n_period_not_selected);
- return false;
- }
}
- else
+ if( i == periodIdOptions.length )
{
alert(i18n_period_not_selected);
return false;
}
+ }
+ else
+ {
+ alert( i18n_period_not_selected );
+ return false;
+ }
- dataSetIdsOptions = document.getElementById("dataSetIds").options;
-
- if(dataSetIdsOptions.length>0)
- {
- var i;
- for( i=0; i < dataSetIdsOptions.length ; i++)
- {
- if(dataSetIdsOptions[i].selected==true)
- break;
- }
- if(i==dataSetIdsOptions.length)
- {
- alert(i18n_dataset_not_selected);
- return false;
- }
- }
- else
- {
- alert(i18n_dataset_not_selected);
- return false;
- }
-
- if( clickedButtonElement == i18n_lock || clickedButtonElement = =i18n_unlock )
- {
- orgUnitSelectValidation();
- return false;
- }
- else if( clickedButtonElement == i18n_select_all_at_level || clickedButtonElement == i18n_unselect_all_at_level )
- {
+ dataSetIdsOptions = document.getElementById("dataSetIds").options;
+
+ if( dataSetIdsOptions.length > 0 )
+ {
+ var i;
+ for( i=0; i < dataSetIdsOptions.length ; i++)
+ {
+ if( dataSetIdsOptions[i].selected == true )
+ break;
+ }
+ if( i==dataSetIdsOptions.length )
+ {
+ alert( i18n_dataset_not_selected );
+ return false;
+ }
+ }
+ else
+ {
+ alert(i18n_dataset_not_selected);
+ return false;
+ }
+
+ if( clickedButtonElement == i18n_lock || clickedButtonElement == i18n_unlock )
+ {
+ orgUnitSelectValidation();
+ return false;
+ }
+ else if( clickedButtonElement == i18n_select_all_at_level || clickedButtonElement == i18n_unselect_all_at_level )
+ {
levelIdOptions = document.getElementById("levelId").options;
if(!levelIdOptions.length>0)
return false;
- }
- else if( clickedButtonElement == i18n_select_all_at_group || clickedButtonElement == i18n_unselect_all_at_group )
- {
+ }
+ else if( clickedButtonElement == i18n_select_all_at_group || clickedButtonElement == i18n_unselect_all_at_group )
+ {
ougGroupOptions = document.getElementById("orgGroup").options;
if( !ougGroupOptions.length > 0 )
return false;
- }
+ }
+
return true;
- }
+ }
+
</script>
<h3>$i18n.getString( "data_locking_form" ) #openHelp( "dataLocking" )</h3>
@@ -162,17 +164,18 @@
<input type="submit" onclick="setClickedButtonElementValue(this)" id="Unlock" name ="Unlock" value="$i18n.getString( "unlock" )" style="width:10em" disabled="true">
</td>
</tr>
- <tr>
- <td>
- <span id="message"></span>
- <input type="hidden" id="selectBetweenLockUnlock" name="selectBetweenLockUnlock">
- </td>
- </tr>
- </table>
- </td>
- </tr>
+ <tr>
+ <td>
+ <span id="message"></span>
+ <input type="hidden" id="selectBetweenLockUnlock" name="selectBetweenLockUnlock">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
</table>
</form>
+
<script type="text/javascript">
var i18n_loading = '$encoder.jsEncode( $i18n.getString( "loading" ) )';
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingStatus.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingStatus.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingStatus.vm 2010-08-04 06:14:23 +0000
@@ -0,0 +1,4 @@
+
+<h3>$i18n.getString( "data_locking_form" ) #openHelp( "dataLocking" )</h3>
+
+<div align="left"><h3>$message</h3></div>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingSuccess.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingSuccess.vm 2010-08-03 12:43:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/collectiveDataLockingSuccess.vm 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-<h2>$message</h2>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/datasetLockReport.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/datasetLockReport.js 2010-08-03 12:43:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/datasetLockReport.js 2010-08-04 06:14:23 +0000
@@ -41,13 +41,17 @@
return false;
}
-function orgUnitSelectValidationCompleted(messageElement) {
+function orgUnitSelectValidationCompleted(messageElement)
+{
var type = messageElement.getAttribute('type');
var message = messageElement.firstChild.nodeValue;
- if (type == 'success') {
+ if (type == 'success')
+ {
document.forms['lockingForm'].submit();
- } else if (type == 'input') {
+ }
+ else if (type == 'input')
+ {
// setMessage( i18n_loading );
document.getElementById('message').innerHTML = message;
document.getElementById('message').style.display = 'block';
=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/chart/impl/DefaultChartService.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/chart/impl/DefaultChartService.java 2010-06-08 08:11:39 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/chart/impl/DefaultChartService.java 2010-08-04 06:14:23 +0000
@@ -71,7 +71,7 @@
* @author Lars Helge Overland
* @version $Id$
*/
-public class DefaultChartService
+public abstract class DefaultChartService
implements ChartService
{
private static final Font titleFont = new Font( "Tahoma", Font.BOLD, 14 );
=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GenerateDataSetLockReportAnalyserFormAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GenerateDataSetLockReportAnalyserFormAction.java 2010-07-23 13:05:37 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GenerateDataSetLockReportAnalyserFormAction.java 2010-08-04 06:14:23 +0000
@@ -1,10 +1,10 @@
package org.hisp.dhis.reports.datasetlock.action;
-import java.util.ArrayList;
+//import java.util.ArrayList;
import java.util.Collection; //import java.util.Iterator;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.period.Period;
+//import org.hisp.dhis.organisationunit.OrganisationUnit;
+//import org.hisp.dhis.organisationunit.OrganisationUnitService;
+//import org.hisp.dhis.period.Period;
import org.hisp.dhis.period.PeriodService;
import org.hisp.dhis.period.PeriodType; //import org.hisp.dhis.reports.util.ReportService;
import com.opensymphony.xwork2.Action;