Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
Actually true is false, and false is true (#460)
Browse files Browse the repository at this point in the history
* actually true is false, and false is true

* loading is now loaded, makes more sense now
  • Loading branch information
Tim Levett committed Apr 29, 2016
1 parent 13b0f58 commit a4aa68e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ define(['angular', 'jquery'], function(angular, $) {
};

var endFn = function(){
$scope.loading = false;
$scope.loaded = true;
$scope.empty = $scope.portlet.exclusiveContent
&& $scope.portlet.exclusiveContent.length > 0 ? false : true;
};
Expand All @@ -50,7 +50,7 @@ define(['angular', 'jquery'], function(angular, $) {
if (typeof $scope.portlet === 'undefined' ||
typeof $scope.portlet.fname === 'undefined') {
if(result.status === 403) {
$scope.loading = false;
$scope.loaded = true;
$scope.empty = false;
$scope.portlet = {};
$scope.portlet.title = 'Access Denied';
Expand All @@ -60,7 +60,7 @@ define(['angular', 'jquery'], function(angular, $) {
$location.path('/');
}
} else {
$scope.loading = true;
$scope.loaded = true;
layoutService.getExclusiveMarkup($scope.portlet).then(endFn,endFn);
}
});
Expand Down Expand Up @@ -89,7 +89,7 @@ define(['angular', 'jquery'], function(angular, $) {
layoutService,
sharedPortletService) {
$scope.portlet = sharedPortletService.getProperty() || {};
$scope.loading = [];
$scope.loaded = false;
var that = this;
that.getPortlet = function (fname, portlets) {
for (var p in portlets) {
Expand All @@ -104,7 +104,7 @@ define(['angular', 'jquery'], function(angular, $) {

if (typeof $rootScope.layout !== 'undefined' && $rootScope.layout != null) {
$scope.portlet = that.getPortlet($routeParams.fname, $rootScope.layout);
$scope.loading = $scope.portlet;
$scope.loaded = true;
}
if (typeof $scope.portlet.fname === 'undefined') {
layoutService.getApp($routeParams.fname).then(function (result) {
Expand All @@ -113,7 +113,7 @@ define(['angular', 'jquery'], function(angular, $) {
if (typeof $scope.portlet === 'undefined' ||
typeof $scope.portlet.fname === 'undefined') {
if(result.status === 403) {
$scope.loading = false;
$scope.loaded = true;
$scope.empty = false;
$scope.portlet = {};
$scope.portlet.title = 'Access Denied';
Expand All @@ -124,13 +124,13 @@ define(['angular', 'jquery'], function(angular, $) {
}

} else {
$scope.loading = $scope.portlet; //not []
$scope.loaded = true;
}
});
}

} else {
$scope.loading = $scope.portlet;
$scope.loaded = true;
}

$scope.openRating = function (size, fname, name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
app-action-link-text="'Add to home'"
app-add-to-home='true'></app-header-two-way-bind>
<div role="main" class="white-page portlet-body">
<loading-gif data-object='loading' data-empty='empty'></loading-gif>
<loading-gif data-object='loaded' data-empty='empty'></loading-gif>
<div ng-bind-html="portlet.exclusiveContent" class="up-portlet-content-wrapper" id="content-{{::portlet.nodeId}}">
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
app-add-to-home='true'></app-header-two-way-bind>

<div role="main" class="white-page portlet-body">
<loading-gif data-object='loading'></loading-gif>
<loading-gif data-object='loaded'></loading-gif>
<div ng-bind-html="::portlet.staticContent" class="up-portlet-content-wrapper" id="content-{{::portlet.nodeId}}">
</div>
</div>
Expand Down

0 comments on commit a4aa68e

Please sign in to comment.