← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8986: Impl system setting for front page notification

 

------------------------------------------------------------
revno: 8986
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-11-13 09:20:17 +0100
message:
  Impl system setting for front page notification
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css
  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/security/login.vm
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.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-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2012-10-30 15:04:28 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/setting/SystemSettingManager.java	2012-11-13 08:20:17 +0000
@@ -45,7 +45,8 @@
     final String ID = SystemSettingManager.class.getName();
     
     final String KEY_APPLICATION_TITLE = "applicationTitle";
-    final String KEY_APPLICATION_INTRO = "applicationIntro";
+    final String KEY_APPLICATION_INTRO = "keyApplicationIntro";
+    final String KEY_APPLICATION_NOTIFICATION = "keyApplicationNotification";
     final String KEY_FLAG = "keyFlag";
     final String KEY_FLAG_IMAGE = "keyFlagImage";
     final String KEY_START_MODULE = "startModule";

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css	2012-11-01 06:49:12 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/login.css	2012-11-13 08:20:17 +0000
@@ -104,15 +104,13 @@
   border-radius: 2px;
 }
 
-#footerArea
+#notificationArea
 {
-  position: absolute;
-  font-size: 13px;
-  bottom: 20px;
-  width: 100%;
-  margin: 0;
-  padding: 0;
-  text-align: center;
+  background-color: #D0E6FD;
+  color: #1D5288;
+  margin: 40px 0 0 40px;
+  padding: 15px;
+  border-radius: 3px;
 }
 
 .greenButtonLink

=== 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	2012-11-08 19:37:56 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/widgets.css	2012-11-13 08:20:17 +0000
@@ -504,6 +504,12 @@
   width: 25em;
 }
 
+.setting textarea
+{
+  width: 25em;
+  height: 8em;
+}
+
 /*----------------------------------------------------------------------------*/
 /* Paging                                                                     */
 /*----------------------------------------------------------------------------*/

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm	2012-11-01 06:49:12 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm	2012-11-13 08:20:17 +0000
@@ -27,8 +27,8 @@
         #if ( $applicationTitle )
             <span id="titleArea">$encoder.htmlEncode( $applicationTitle )</span>
         #end        
-        #if ( $applicationIntro )
-            <span id="introArea">$encoder.htmlEncode( $applicationIntro )</span>
+        #if ( $keyApplicationIntro )
+            <span id="introArea">$encoder.htmlEncode( $keyApplicationIntro )</span>
         #end
         </div>
         #if ( $keyConfig.selfRegistrationAllowed() )
@@ -73,7 +73,10 @@
             </form>
             #if( $failed == true )
             <span id="loginMessage">Wrong username or password</span>
-            #end            
+            #end
+            #if ( $keyApplicationNotification )
+            <div id="notificationArea">$encoder.htmlEncode( $keyApplicationNotification )</div>
+            #end
         </div>
     </body>
 </html>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java	2012-10-29 20:17:23 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java	2012-11-13 08:20:17 +0000
@@ -32,6 +32,7 @@
 import static org.hisp.dhis.setting.SystemSettingManager.DEFAULT_START_MODULE;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_TITLE;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_INTRO;
+import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_NOTIFICATION;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_CACHE_STRATEGY;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_COMPLETENESS_OFFSET;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_FACTOR_OF_DEVIATION;
@@ -96,6 +97,7 @@
         map.put( KEY_CACHE_STRATEGY, systemSettingManager.getSystemSetting( KEY_CACHE_STRATEGY ) );
         map.put( KEY_APPLICATION_TITLE, systemSettingManager.getSystemSetting( KEY_APPLICATION_TITLE ) );
         map.put( KEY_APPLICATION_INTRO, systemSettingManager.getSystemSetting( KEY_APPLICATION_INTRO ) );
+        map.put( KEY_APPLICATION_NOTIFICATION, systemSettingManager.getSystemSetting( KEY_APPLICATION_NOTIFICATION ) );
         map.put( KEY_FLAG, systemSettingManager.getSystemSetting( KEY_FLAG ) );
         map.put( KEY_FLAG_IMAGE, systemSettingManager.getFlagImage() );
         map.put( KEY_START_MODULE, systemSettingManager.getSystemSetting( KEY_START_MODULE, DEFAULT_START_MODULE ) );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java	2012-10-11 11:56:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/SetAppearanceSettingsAction.java	2012-11-13 08:20:17 +0000
@@ -29,6 +29,7 @@
 
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_TITLE;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_INTRO;
+import static org.hisp.dhis.setting.SystemSettingManager.KEY_APPLICATION_NOTIFICATION;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_FLAG;
 import static org.hisp.dhis.setting.SystemSettingManager.KEY_START_MODULE;
 
@@ -81,6 +82,13 @@
     {
         this.applicationIntro = applicationIntro;
     }
+    
+    private String applicationNotification;
+
+    public void setApplicationNotification( String applicationNotification )
+    {
+        this.applicationNotification = applicationNotification;
+    }
 
     private String flag;
 
@@ -137,6 +145,7 @@
 
         systemSettingManager.saveSystemSetting( KEY_APPLICATION_TITLE, applicationTitle );
         systemSettingManager.saveSystemSetting( KEY_APPLICATION_INTRO, applicationIntro );
+        systemSettingManager.saveSystemSetting( KEY_APPLICATION_NOTIFICATION, applicationNotification );
         systemSettingManager.saveSystemSetting( KEY_FLAG, flag );
         systemSettingManager.saveSystemSetting( KEY_START_MODULE, startModule );
         styleManager.setSystemStyle( currentStyle );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties	2012-11-04 08:37:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties	2012-11-13 08:20:17 +0000
@@ -110,4 +110,5 @@
 self_registration_account_organisation_unit=Self registration account organisation unit
 access=Access
 enable_user_account_recovery=Enable user account recovery
-select_organisation_unit=Select organisation unit
\ No newline at end of file
+select_organisation_unit=Select organisation unit
+application_notification=Application notification
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm	2012-10-22 18:48:19 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemAppearanceSettings.vm	2012-11-13 08:20:17 +0000
@@ -2,9 +2,10 @@
 	jQuery(document).ready(function() {
 		jQuery("input[type=button]").click(function() {
 			jQuery.postUTF8( 'setSystemAppearanceSettings.action', {
-				applicationTitle: getFieldValue( 'applicationTitle' ),
+                applicationTitle: getFieldValue( 'applicationTitle' ),
                 applicationIntro: getFieldValue( 'applicationIntro' ),
-				currentStyle: getFieldValue( 'currentStyle' ),
+                applicationNotification: getFieldValue( 'applicationNotification' ),
+                currentStyle: getFieldValue( 'currentStyle' ),
 				flag: getFieldValue( 'flag' ),
 				startModule: getFieldValue( 'startModule' )
 			}, function( json ) {
@@ -24,7 +25,11 @@
 
 <div class="settingLabel">$i18n.getString( "application_introduction" )</div>
 
-<div class="setting"><input type="text" id="applicationIntro" name="applicationIntro" maxlength="80" value="$!{applicationIntro}"/></div>
+<div class="setting"><input type="text" id="applicationIntro" name="applicationIntro" maxlength="80" value="$!{keyApplicationIntro}"/></div>
+
+<div class="settingLabel">$i18n.getString( "application_notification" )</div>
+
+<div class="setting"><textarea id="applicationNotification" name="applicationNotification">$!{keyApplicationNotification}"</textarea></div>
 
 <div class="settingLabel">$i18n.getString( "style" )</div>