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

MUMUP-2898 Adds ability to write your own directive for removing a widget #393

Merged
merged 3 commits into from
Apr 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️

</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 }}" 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