=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css 2014-09-22 12:02:33 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css 2014-09-28 20:57:54 +0000 @@ -339,7 +339,7 @@ /* Message field */ /*----------------------------------------------------------------------------*/ -span#message +#message { display: none; padding: 1em; @@ -350,7 +350,7 @@ border-radius: 3px; } -span#info +#info { display: block; padding: 1em; === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2014-08-29 08:45:54 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2014-09-28 20:57:54 +0000 @@ -610,10 +610,9 @@ */ function setMessage( message ) { - if ( message && message != '' ) + if ( message ) { - $( '#message' ).html( message ); - $( '#message' ).show(); + $( '#message' ).html( message ).show(); } } === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/saveOrganisationUnitLevelForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/saveOrganisationUnitLevelForm.vm 2014-06-01 11:31:40 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/saveOrganisationUnitLevelForm.vm 2014-09-28 20:57:54 +0000 @@ -5,7 +5,7 @@ validation( 'saveOrganisationUnitLevelsForm', function( form ){ form.submit() } ); jQuery.getJSON( '../api/organisationUnitLevels.json?paging=false', function( data ) { - if ( !data || !data.organisationUnitLevels || !data.organisationUnitLevels ) { + if ( !data || !data.organisationUnitLevels || !data.organisationUnitLevels.length ) { setMessage( 'Organisation unit level is not yet saved, please save' ); } } ); @@ -39,4 +39,4 @@ - \ No newline at end of file +
\ No newline at end of file