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

MUMUP-2898 Adds compact mode back in #614

Merged
merged 1 commit into from
Apr 13, 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
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
define(['angular', 'require'], function(angular, require) {
var app = angular.module('my-app.layout.directives', []);

// Compact Mode
app.directive('defaultCard', function() {
return {
restrict: 'E',
templateUrl: require.toUrl('./partials/default-card.html'),
};
});

app.directive('portletIcon', function() {
return {
restrict: 'E',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<md-card class="list-content" id="portlet-id-{{::portlet.nodeId}}">
<md-button class="widget-action widget-info md-icon-button" aria-label="see a brief description of this app">
<md-tooltip md-direction="top" class="widget-action-tooltip">
{{portlet.description}}
</md-tooltip>
<md-icon>info</md-icon>
</md-button>
<md-button class="widget-action widget-remove md-icon-button"
aria-label="remove {{ portlet.title }} widget from your home screen"
ng-click="layoutCtrl.removePortlet(portlet.nodeId, portlet.title)"
ng-hide="GuestMode || cantRemove">
<md-icon>close</md-icon>
</md-button>

<a aria-labelledby="appTitle_portlet.title-{{::portlet.nodeId}}" tabindex="0" ng-href="{{ layoutCtrl.renderURL(portlet) }}" target="{{::portlet.target}}">
<div class="icon-container">
<portlet-icon></portlet-icon>
</div>
<div class="list-item-container">
<h4 id="appTitle_portlet.title-{{::portlet.nodeId}}">{{ ::portlet.title }}</h4>
</div>
</a>
</md-card>