dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26633
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13174: Import UI, fixed wrong icons in user feedback for very short processes / small import files.
------------------------------------------------------------
revno: 13174
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-12-08 23:26:19 +0100
message:
Import UI, fixed wrong icons in user feedback for very short processes / small import files.
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.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/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2013-11-28 10:34:47 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2013-12-08 22:26:19 +0000
@@ -1857,38 +1857,43 @@
$.getJSON( '../api/system/tasks/' + category + param, function( notifications )
{
- var html = '',
- isComplete = false;
+ var html = '',
+ isComplete = false;
- if ( isDefined( notifications ) && notifications.length )
- {
+ if ( isDefined( notifications ) && notifications.length ) {
$.each( notifications, function( i, notification )
{
var first = i == 0,
loaderHtml = '';
- if( notification.completed === "true" || notification.completed === true ) {
- isComplete = true;
- }
-
- if ( first )
- {
+ if ( first ) {
$( '#' + tableId ).prop( 'lastUid', notification.uid );
loaderHtml = _loading_bar_html;
$( '#loaderSpan' ).replaceWith ( '' ); // Hide previous loader bar
}
- var time = ( undefined != notification.time ) ? notification.time.replace( 'T', ' ' ).substring( 0, 19 ) : '';
+ var time = '';
+
+ if ( undefined !== notification.time ) {
+ time = notification.time.replace( 'T', ' ' ).substring( 0, 19 );
+ }
html += '<tr><td>' + time + '</td><td>' + notification.message + ' ';
- html += isComplete ? '<img src="../images/completed.png">' : loaderHtml;
+
+ if ( notification.completed ) {
+ html += '<img src="../images/completed.png">';
+ isComplete = true;
+ }
+ else {
+ html += loaderHtml;
+ }
+
html += '</td></tr>';
} );
$( '#' + tableId ).show().prepend( html );
- if ( isComplete && completedCallback && completedCallback.call )
- {
+ if ( isComplete && completedCallback && completedCallback.call ) {
completedCallback();
}
}