=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/jdbc/JdbcAggregatedDataValueStore.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/jdbc/JdbcAggregatedDataValueStore.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/jdbc/JdbcAggregatedDataValueStore.java 2013-09-03 18:28:38 +0000 @@ -257,7 +257,7 @@ " AND ous.idlevel" + rootOrgunit.getLevel() + "=" + rootOrgunit.getId() + " AND adv.periodid IN (" + periodids + ") "; - return jdbcTemplate.queryForInt( sql ); + return jdbcTemplate.queryForObject( sql, Integer.class ); } public void deleteAggregatedDataValues( Collection dataElementIds, Collection periodIds, Collection organisationUnitIds ) === modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/event/DefaultEventStore.java' --- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/event/DefaultEventStore.java 2013-09-03 09:40:41 +0000 +++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/event/DefaultEventStore.java 2013-09-03 18:28:38 +0000 @@ -138,16 +138,6 @@ return events; } - private List getIdList( IdentifiableObject identifiableObject ) - { - if ( identifiableObject != null ) - { - return Arrays.asList( identifiableObject.getId() ); - } - - return new ArrayList(); - } - private List getIdList( List identifiableObjects ) { List integers = new ArrayList(); === modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/hibernate/HibernateImportDataValueStore.java' --- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/hibernate/HibernateImportDataValueStore.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/hibernate/HibernateImportDataValueStore.java 2013-09-03 18:28:38 +0000 @@ -125,6 +125,6 @@ { String sql = "SELECT COUNT(*) FROM importdatavalue WHERE status = '" + status.name() + "'"; - return jdbcTemplate.queryForInt( sql ); + return jdbcTemplate.queryForObject( sql, Integer.class ); } } === modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java' --- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2013-09-03 15:24:51 +0000 +++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java 2013-09-03 18:28:38 +0000 @@ -101,10 +101,6 @@ private static final String PROGRAM_STAGE_SECTION_UPLOADED = "program_stage_section_uploaded"; - private static final String ANONYMOUS_PROGRAM_UPLOADED = "anonymous_program_uploaded"; - - private static final String PATIENT_REGISTERED = "patient_registered"; - private static final String SINGLE_EVENT_UPLOADED = "single_event_uploaded"; private ActivityComparator activityComparator = new ActivityComparator(); === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java 2013-09-02 12:36:55 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SystemController.java 2013-09-03 18:28:38 +0000 @@ -107,7 +107,8 @@ } @RequestMapping( value = "/tasks/{category}", method = RequestMethod.GET, produces = { "*/*", "application/json" } ) - public void getTaskJson( HttpServletResponse response, @PathVariable("category") String category ) throws IOException + public void getTaskJson( @PathVariable("category") String category, + @RequestParam(required=false) String lastId, HttpServletResponse response ) throws IOException { List notifications = new ArrayList(); @@ -117,7 +118,7 @@ TaskId taskId = new TaskId( taskCategory, currentUserService.getCurrentUser() ); - notifications = notifier.getNotifications( taskId, null ); + notifications = notifier.getNotifications( taskId, lastId ); } JacksonUtils.toJson( response.getOutputStream(), notifications ); === removed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/htmlNotifications.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/htmlNotifications.vm 2012-04-11 09:02:06 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/htmlNotifications.vm 1970-01-01 00:00:00 +0000 @@ -1,13 +0,0 @@ -#if( $notifications.size() > 0 ) - ---#foreach( $notification in $notifications ) - - - - -#end -
${format.formatDateTime( $notification.time )}:${encoder.htmlEncode( $notification.message )} #if( $velocityCount == 1 )  - #if( $notification.completed )#else#end#end
-#end \ No newline at end of file === 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 2013-08-23 16:11:13 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2013-09-03 18:28:38 +0000 @@ -1824,9 +1824,9 @@ { var lastUid = $( '#' + tableId ).prop( 'lastUid' ); // Store on table property - var param = lastUid ? '&lastUid=' + lastUid : ''; + var param = ( undefined !== lastUid ) ? '?lastId=' + lastUid : ''; - $.getJSON( '../dhis-web-commons-ajax-json/getNotifications.action?category=' + category + param, function( notifications ) + $.getJSON( '../api/system/tasks/' + category + param, function( notifications ) { var html = '', isComplete = false; @@ -1850,7 +1850,9 @@ $( '#loaderSpan' ).replaceWith ( '' ); // Hide previous loader bar } - html += '' + notification.time + '' + notification.message + '  '; + var time = ( undefined != notification.time ) ? notification.time.replace( 'T', ' ' ).substring( 0, 19 ) : ''; + + html += '' + time + '' + notification.message + '  '; html += notification.completed == 'true' ? '' : loaderHtml; html += ''; } ); === removed file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetNotificationsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetNotificationsAction.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetNotificationsAction.java 1970-01-01 00:00:00 +0000 @@ -1,103 +0,0 @@ -package org.hisp.dhis.commons.action; - -/* - * Copyright (c) 2004-2013, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import java.util.ArrayList; -import java.util.List; - -import org.hisp.dhis.scheduling.TaskCategory; -import org.hisp.dhis.scheduling.TaskId; -import org.hisp.dhis.system.notification.Notification; -import org.hisp.dhis.system.notification.Notifier; -import org.hisp.dhis.user.CurrentUserService; -import org.springframework.beans.factory.annotation.Autowired; - -import com.opensymphony.xwork2.Action; - -/** - * @author Lars Helge Overland - */ -public class GetNotificationsAction - implements Action -{ - @Autowired - private Notifier notifier; - - @Autowired - private CurrentUserService currentUserService; - - // ------------------------------------------------------------------------- - // Input - // ------------------------------------------------------------------------- - - private String category; - - public void setCategory( String category ) - { - this.category = category; - } - - private String lastUid; - - public void setLastUid( String lastUid ) - { - this.lastUid = lastUid; - } - - // ------------------------------------------------------------------------- - // Output - // ------------------------------------------------------------------------- - - private List notifications = new ArrayList(); - - public List getNotifications() - { - return notifications; - } - - // ------------------------------------------------------------------------- - // Action implementation - // ------------------------------------------------------------------------- - - @Override - public String execute() - throws Exception - { - if ( category != null ) - { - TaskCategory taskCategory = TaskCategory.valueOf( category.toUpperCase() ); - - TaskId taskId = new TaskId( taskCategory, currentUserService.getCurrentUser() ); - - notifications = notifier.getNotifications( taskId, lastUid ); - } - - return SUCCESS; - } -} === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2013-09-01 21:38:52 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml 2013-09-03 18:28:38 +0000 @@ -292,9 +292,6 @@ - - === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2013-08-16 12:29:21 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2013-09-03 18:28:38 +0000 @@ -465,11 +465,6 @@ - - /dhis-web-commons/ajax/htmlNotifications.vm - plainTextError - - /dhis-web-commons/ajax/htmlUser.vm === modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importDataValue.vm' --- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importDataValue.vm 2013-05-23 09:39:06 +0000 +++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/importDataValue.vm 2013-09-03 18:28:38 +0000 @@ -62,8 +62,8 @@
--++
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataMartForm.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataMartForm.vm 2013-06-18 20:42:30 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewDataMartForm.vm 2013-09-03 18:28:38 +0000 @@ -43,7 +43,7 @@
--++