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

Commit

Permalink
MUMUP-2898 Update things
Browse files Browse the repository at this point in the history
  • Loading branch information
vertein committed Apr 12, 2017
1 parent 730e8cd commit 3a60a6a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions uw-frame-components/portal/widgets/controllers.js
Expand Up @@ -39,7 +39,7 @@ define(['angular'], function(angular) {
/**
* Initial widget setup -- gets data for a single widget from the provided fname attribute
*/
var initializeWidget = function(fname, unremovable) {
var initializeWidget = function(fname, removable) {
// Initialize scope variables
$scope.widget = {};
$scope.widgetType = '';
Expand All @@ -54,7 +54,7 @@ define(['angular'], function(angular) {
if (data) {
$scope.widget = data;
$scope.widgetType = widgetType(data);
$scope.cantRemove = unremovable;
$scope.removable = removable;
}
})
.catch(function(error) {
Expand Down Expand Up @@ -84,7 +84,7 @@ define(['angular'], function(angular) {

// Initialize the widget
if ($scope.fname) {
initializeWidget($scope.fname, $scope.unremovable);
initializeWidget($scope.fname, $scope.removable);
} else {
$log.warn('WidgetCardController didn\'t get an fname.');
}
Expand Down
2 changes: 1 addition & 1 deletion uw-frame-components/portal/widgets/directives.js
Expand Up @@ -12,7 +12,7 @@ define(['angular', 'require'], function(angular, require) {
restrict: 'E',
scope: {
fname: '@',
unremovable : '=?',
removable: '=?'
},
templateUrl: require.toUrl('./partials/widget-card.html'),
controller: 'WidgetCardController'
Expand Down
4 changes: 2 additions & 2 deletions uw-frame-components/portal/widgets/partials/widget-card.html
Expand Up @@ -21,8 +21,8 @@
</md-button>
<md-button class="widget-action widget-remove md-icon-button"
aria-label="remove {{ widget.title }} widget from your home screen"
ng-click="widgetCtrl.removewidget(widget.nodeId, widget.title)"
ng-hide="GuestMode || cantRemove || widget.lifecycleState === 'MAINTENANCE'">
ng-click="remove()"
ng-hide="GuestMode || !removable || widget.lifecycleState === 'MAINTENANCE'">
<md-icon>close</md-icon>
</md-button>

Expand Down

0 comments on commit 3a60a6a

Please sign in to comment.