dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42512
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21729: Added missing loading indicator
------------------------------------------------------------
revno: 21729
committer: Markus Bekken <markus.bekken@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2016-01-14 14:51:58 +0100
message:
Added missing loading indicator
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound-controller.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound.html
--
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-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound-controller.js 2015-12-16 09:43:38 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound-controller.js 2016-01-14 13:51:58 +0000
@@ -6,7 +6,7 @@
$scope,
$translate,
$log) {
- $scope.dashboardReady = true;
+ $scope.dashboardReady = false;
$scope.widget = $scope.$parent.$parent.biggerWidget ? $scope.$parent.$parent.biggerWidget
: $scope.$parent.$parent.smallerWidget ? $scope.$parent.$parent.smallerWidget : null;
$scope.widgetTitle = $scope.widget.title;
@@ -17,7 +17,9 @@
$scope.displayTextEffects = {};
$scope.displayKeyDataEffects = {};
-
+ $scope.$on('dashboardWidgets',function(){
+ $scope.dashboardReady = true;
+ });
//listen for updated rule effects
$scope.$on('ruleeffectsupdated', function(event, args) {
var textInEffect = false;
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound.html 2015-12-16 09:43:38 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/rulebound/rulebound.html 2016-01-14 13:51:58 +0000
@@ -1,4 +1,5 @@
<div class="panel panel-info" ng-controller="RuleBoundController">
+
<div class="panel-heading handle bold">
{{widgetTitleLabel}}
<span class="pull-right">
@@ -8,30 +9,34 @@
</a>
<a class="small-horizonal-spacing" href ng-click="removeWidget(this.widget)" title="{{removeLabel}}"><i class="fa fa-times-circle"></i></a>
</span>
- </div>
- <div ng-show="this.widget.expand" class="panel-body dashboard-widget-container">
- <div ng-if="!dashboardReady">
- <img id="ouwt_loader" src="../images/ajax-loader-bar.gif" alt="{{'loading'| translate}}"/>
+ </div>
+ <div ng-if="!dashboardReady">
+ <img id="ouwt_loader" src="../images/ajax-loader-bar.gif" alt="{{'loading'| translate}}"/>
+ </div>
+ <div ng-if="dashboardReady">
+ <div ng-show="this.widget.expand" class="panel-body dashboard-widget-container">
+ <div ng-if="!dashboardReady">
+ <img id="ouwt_loader" src="../images/ajax-loader-bar.gif" alt="{{'loading'| translate}}"/>
+ </div>
+
+ <div ng-if="dashboardReady">
+ <div class="panel-body" ng-if="showKeyDataSection">
+ <div ng-repeat="(key,item) in displayKeyDataEffects" ng-show="item.ineffect" class="info-container">
+ <div class="info-container-heading">{{item.content | trimquotes }}</div>
+ <div class="info-container-text">{{item.data | trimquotes}}</div>
+ </div>
+ </div>
+ <table class="table table-striped dashboard-element-container" ng-if="showTextSection">
+ <tr ng-repeat="(key,item) in displayTextEffects" ng-if="item.ineffect">
+ <td>
+ <div>
+ {{item.content | trimquotes}}{{item.data | trimquotes}}
+ </div>
+ </td>
+ </tr>
+ </table>
+ <div ng-show="!showKeyDataSection && !showTextSection" class="alert alert-warning">{{widgetTitleLabel === "Indicators" ? emptyIndicatorListLabel : emptyFeedbackListLabel}}</div>
+ </div>
</div>
-
- <div ng-if="dashboardReady">
- <div class="panel-body" ng-if="showKeyDataSection">
- <div ng-repeat="(key,item) in displayKeyDataEffects" ng-show="item.ineffect" class="info-container">
- <div class="info-container-heading">{{item.content | trimquotes }}</div>
- <div class="info-container-text">{{item.data | trimquotes}}</div>
- </div>
- </div>
- <table class="table table-striped dashboard-element-container" ng-if="showTextSection">
- <tr ng-repeat="(key,item) in displayTextEffects" ng-if="item.ineffect">
- <td>
- <div>
- {{item.content | trimquotes}}{{item.data | trimquotes}}
- </div>
- </td>
- </tr>
- </table>
- <div ng-show="!showKeyDataSection && !showTextSection" class="alert alert-warning">{{widgetTitleLabel === "Indicators" ? emptyIndicatorListLabel : emptyFeedbackListLabel}}</div>
- </div>
-
</div>
</div>