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

Commit

Permalink
MUMUP-2898 Adds ability to write your own directive for removing a wi…
Browse files Browse the repository at this point in the history
…dget (#393)

* MUMUP-2898 Widget Fixes

* Revert back to original feed

* id over class
  • Loading branch information
vertein authored Apr 12, 2017
1 parent 4b71c17 commit d017bd3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
4 changes: 0 additions & 4 deletions uw-frame-components/css/buckyless/widget.less
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,6 @@
left: 0;
}

&.widget-remove {
right: 0;
}

.material-icons {
font-size: 18px;
}
Expand Down
1 change: 1 addition & 0 deletions uw-frame-components/portal/widgets/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ define(['angular', 'require'], function(angular, require) {
app.directive('widget', function() {
return {
restrict: 'E',
transclude: true,
scope: {
fname: '@'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- OPTION-LINK ICON -->
<div class="option-link-icon">
<a href="{{ widget.selectedUrl }}" target="_blank" rel="noopener noreferrer">
<frame-widget-icon></frame-widget-icon>
<widget-icon></widget-icon>
</a>
</div>

Expand Down
10 changes: 3 additions & 7 deletions uw-frame-components/portal/widgets/partials/widget-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@
</md-tooltip>
<md-icon>info</md-icon>
</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'">
<md-icon>close</md-icon>
</md-button>
<div ng-transclude id="widget-removal">
</div>

<md-card-header-text>
<span class="md-title" style="text-align: center;" aria-label="{{ widget.title }}" tabindex="0">
Expand Down Expand Up @@ -70,7 +66,7 @@
<div ng-switch-when="basic">
<a tabindex="-1" ng-href="{{ renderUrl() }}" target="{{ widget.target ? widget.target : '_blank' }}" class="basic-widget" rel="noopener noreferrer">
<div class="widget-icon-container" layout="column" layout-align="center center">
<frame-widget-icon></frame-widget-icon>
<widget-icon></widget-icon>
</div>
</a>
<launch-button data-href="{{ renderUrl() }}"
Expand Down

0 comments on commit d017bd3

Please sign in to comment.