dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04162
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1378: Added a progress indicator animation to the standard message field.
------------------------------------------------------------
revno: 1378
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-02-01 21:21:20 +0100
message:
Added a progress indicator animation to the standard message field.
added:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/ajax-loader-circle-small.gif
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js
dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/javascript/datamart.js
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/import.js
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/process.js
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/webapp/dhis-web-maintenance-dataadmin/javascript/dataArchive.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/duplicateDataElimination.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/maintenance.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/organisationUnitMerge.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/resourceTable.js
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.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-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js 2010-01-26 21:17:32 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js 2010-02-01 20:21:20 +0000
@@ -348,8 +348,13 @@
*/
function setMessage( message )
{
- document.getElementById( 'message' ).innerHTML = message;
- document.getElementById( 'message' ).style.display = 'block';
+ $( '#message' ).html( message );
+ $( '#message' ).slideDown( 'fast' );
+}
+
+function setWaitMessage( message )
+{
+ setMessage( message + " <img src='../../images/ajax-loader-bar-small.gif'>" );
}
/**
@@ -357,18 +362,18 @@
*/
function hideMessage()
{
- document.getElementById( 'message' ).style.display = 'none';
+ $( '#message' ).slideUp( 'fast' );
}
function setInfo( message )
{
- document.getElementById( 'info' ).innerHTML = message;
- document.getElementById( 'info' ).style.display = 'block';
+ $( '#info' ).html( message );
+ $( '#info' ).slideDown( 'fast' );
}
function hideInfo()
{
- document.getElementById( 'info' ).style.display = 'block';
+ $( '#info' ).slideUp( 'fast' );
}
/**
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/ajax-loader-circle-small.gif'
Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/ajax-loader-circle-small.gif 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/ajax-loader-circle-small.gif 2010-02-01 20:21:20 +0000 differ
=== modified file 'dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/javascript/datamart.js'
--- dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/javascript/datamart.js 2009-09-02 10:16:58 +0000
+++ dhis-2/dhis-web/dhis-web-datamart/src/main/webapp/dhis-web-datamart/javascript/datamart.js 2010-02-01 20:21:20 +0000
@@ -309,12 +309,15 @@
{
var message = getElementValue( xmlObject, "message" );
var running = getElementValue( xmlObject, "running" );
-
- setMessage( message );
-
+
if ( running == "true" )
{
- waitAndGetExportStatus( 2000 );
+ setWaitMessage( message );
+ waitAndGetExportStatus( 2000 );
+ }
+ else
+ {
+ setMessage( message );
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/import.js'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/import.js 2009-11-24 13:01:57 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/import.js 2010-02-01 20:21:20 +0000
@@ -5,7 +5,7 @@
function submitImportForm()
{
- setMessage( i18n_importing );
+ setWaitMessage( i18n_importing );
document.getElementById( "importForm" ).submit();
}
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/process.js'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/process.js 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/process.js 2010-02-01 20:21:20 +0000
@@ -21,13 +21,17 @@
var fileMessage = getElementValue( messageElement, "fileMessage" );
var running = getElementValue( messageElement, "running" );
- setMessage( statusMessage );
setInfo( i18n_current_import_file + ": " + fileMessage );
if ( running == "true" )
{
+ setWaitMessage( statusMessage );
waitAndGetImportStatus( 2000 );
}
+ else
+ {
+ setMessage( statusMessage );
+ }
}
else if ( actionType == "preview" )
{
=== 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-02-01 15:30:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/org/hisp/dhis/dataadmin/i18n_module.properties 2010-02-01 20:21:20 +0000
@@ -11,16 +11,16 @@
cancel = Cancel
done = Done
noaction = Please Select Only Assigned or Locked Organisation Unit.
-loading = Loading, please wait...
+loading = Loading, please wait
data_administration = Data Administration
period_type = Period Type
available_periods = Available Periods
select_period_type_all = Select period type / All
select_period_all = Select period / All
select_options = Please select at least one option
-performing_maintenance = Performing maintenance...
+performing_maintenance = Performing maintenance
maintenance_performed = Maintenance performed
-generating_resource_tables = Generating resource tables...
+generating_resource_tables = Generating resource tables
resource_tables_generated = Resource tables generated
maintenance = Maintenance
resource_table = Resource Table
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataArchive.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataArchive.js 2010-02-01 15:30:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataArchive.js 2010-02-01 20:21:20 +0000
@@ -29,7 +29,7 @@
var message = operation == "archive" ? i18n_archiving : i18n_unarchiving;
- setMessage( message );
+ setWaitMessage( message );
$.getJSON(
"archiveData.action",
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/duplicateDataElimination.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/duplicateDataElimination.js 2010-01-25 11:54:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/duplicateDataElimination.js 2010-02-01 20:21:20 +0000
@@ -102,7 +102,7 @@
function eliminate()
{
- setMessage( i18n_eliminating + "..." );
+ setWaitMessage( i18n_eliminating + "..." );
$.ajax({
"url": "eliminateDuplicateData.action",
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/maintenance.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/maintenance.js 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/maintenance.js 2010-02-01 20:21:20 +0000
@@ -10,7 +10,7 @@
if ( hierarchyHistory || aggregatedDataValues || aggregatedIndicatorValues || zeroValues ||dataSetCompleteness || prunePeriods )
{
- setMessage( i18n_performing_maintenance );
+ setWaitMessage( i18n_performing_maintenance );
var params = "hierarchyHistory=" + hierarchyHistory +
"&aggregatedDataValues=" + aggregatedDataValues +
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/organisationUnitMerge.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/organisationUnitMerge.js 2010-01-25 11:54:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/organisationUnitMerge.js 2010-02-01 20:21:20 +0000
@@ -59,7 +59,7 @@
function mergeOrganisationUnits()
{
- setMessage( i18n_merging + "..." );
+ setWaitMessage( i18n_merging + "..." );
$.ajax({
"url": "mergeOrganisationUnits.action",
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/resourceTable.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/resourceTable.js 2010-01-15 11:32:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/resourceTable.js 2010-02-01 20:21:20 +0000
@@ -12,7 +12,7 @@
if ( organisationUnit || groupSet || dataElementGroupSetStructure || indicatorGroupSetStructure ||
organisationUnitGroupSetStructure || categoryStructure || categoryOptionComboName )
{
- setMessage( i18n_generating_resource_tables );
+ setWaitMessage( i18n_generating_resource_tables );
var params = "organisationUnit=" + organisationUnit +
"&groupSet=" + groupSet +
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js 2010-02-01 20:21:20 +0000
@@ -62,7 +62,7 @@
{
if ( validateDataSetReport() )
{
- setMessage( i18n_generating_report + "..." );
+ setWaitMessage( i18n_generating_report + "..." );
tempPreviewReport = previewReport;
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js 2009-03-24 10:31:31 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js 2010-02-01 20:21:20 +0000
@@ -55,13 +55,13 @@
}
else if ( statusMessage == null )
{
- setMessage( i18n_please_wait );
+ setWaitMessage( i18n_please_wait );
waitAndGetReportStatus( 2000 );
}
else
{
- setMessage( i18n_please_wait + ". " + statusMessage + "..." );
+ setWaitMessage( i18n_please_wait + ". " + statusMessage + "..." );
waitAndGetReportStatus( 2000 );
}
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js 2009-12-20 18:25:43 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js 2010-02-01 20:21:20 +0000
@@ -53,11 +53,11 @@
}
else if ( statusMessage == null )
{
- setMessage( i18n_please_wait );
+ setWaitMessage( i18n_please_wait );
}
else
{
- setMessage( i18n_please_wait + ". " + statusMessage + "..." );
+ setWaitMessage( i18n_please_wait + ". " + statusMessage + "..." );
}
waitAndGetTableStatus( 2000 );