-
Notifications
You must be signed in to change notification settings - Fork 1
/
emails.html
109 lines (108 loc) · 6.23 KB
/
emails.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<script type="text/ng-template" id="emails">
<!-- <md-button class="md-accent md-hue-2 no-margin" ng-click="$ls.emails.action = 'write'">Write a new Email</md-button> -->
</script>
<div layout="row" flex>
<!-- <md-card ng-if="$media('gt-xs') || $ls.emails.action == 'select'" flex-gt-xs="33" flex>
<md-content layout="row" flex>
<md-tabs md-selected="$ls.selected.tab" flex>
<md-tab ng-repeat="tab in ::tabs" ng-click="getEmails(tab)">
<md-tab-label>
<md-icon md-font-icon="fa fa-{{ ::icons[tab] }} fa-fw"></md-icon>
{{ ::tab.capitalize() }}
</md-tab-label>
<md-tab-body>
<md-virtual-repeat-container style="height: 100%">
<md-list flex>
<div md-virtual-repeat="email in emailsLoaders[tab]" md-on-demand>
<md-list-item ng-click="$ls.emails.action = 'view'; openEmail(tab, email.id)" ng-if="email"
md-colors="isSelected(tab, email.id) && {background: 'accent-A100'}" class="md-2-line">
<div ng-if="tab != 'events'" class="md-avatar-icon fix-icon"
md-colors="::{background: 'blue-grey-400'}" style="min-width: 36px">
{{ getInitials(email.sender || email.course) }}
</div>
<div class="md-list-item-text">
<h3>{{ email.title || "No Title" }}</h3>
<p>{{ email.sender || email.course }}</p>
</div>
<div class="md-list-item-text align-right">
<h3>{{ email.time | timeDistance }}</h3>
<p class="md-caption">{{ email.event }}</p>
</div>
</md-list-item>
<loading ng-if="!email" color="'green'" style="display: block; margin-top: 32px"></loading>
</div>
</md-list>
</md-virtual-repeat-container>
</md-tab-body>
</md-tab>
</md-tabs>
</md-content>
</md-card>
<md-card ng-if="$media('gt-xs') && $ls.emails.action != 'write' || $ls.emails.action == 'view'" flex>
<md-content ng-if="$ls.selected.email[1]" layout-padding flex>
{{ email = ($ls.emails[$ls.selected.email[0]] | find: 'id' : $ls.selected.email[1]); '' }}
<md-card-title>
<md-card-title-text>
<span class="md-display-1">
<md-button class="md-icon-button" ng-click="$ls.emails.action = 'select'"
style="margin-right: 12px; padding: 4px 8px 12px" hide-gt-xs>
<md-icon md-font-icon="fa fa-arrow-left fa-2x" md-colors="{color: 'grey-800'}"></md-icon>
</md-button>
{{ email.title }}
</span>
</md-card-title-text>
</md-card-title>
<md-card-header ng-if="$ls.selected.email[0] != 'events'">
<div id="email-circle" class="fix-icon" md-colors="{background: 'blue-grey-400'}">
{{ getInitials(email.sender || email.course) }}
</div>
<md-card-header-text layout="row" layout-align="space-between">
<div layout="column">
<span class="md-title">{{ email.sender || email.course }}</span>
<span class="md-subhead">{{ email.from || "Blackboard Generated" }}</span>
</div>
<div layout="column" style="text-align: right">
<span class="md-title">{{ email.time | timeDistance }}</span>
<span class="md-subhead">{{ email.event }}</span>
</div>
</md-card-header-text>
</md-card-header>
<md-card-content layout="column" ng-bind-html="$ls.emails.body[$ls.selected.email[1]]">
</md-card-content>
</md-content>
</md-card>
<md-card ng-if="$ls.emails.action == 'write'" flex>
<md-content layout-padding flex style="position: relative">
<md-card-title>
<md-card-title-text>
<span class="md-display-1">New Email</span>
</md-card-title-text>
</md-card-title>
<md-card-content>
<md-card-header-text layout="column" flex>
<md-input-container class="md-block">
<label>To</label>
<input type="text" ng-model="to">
</md-input-container>
<md-input-container class="md-block">
<label>Subject</label>
<input type="text" ng-model="subject">
</md-input-container>
</md-card-header-text>
<md-input-container class="md-block">
<label>Add a message here</label>
<textarea rows="8" ng-model="body"></textarea>
</md-input-container>
<div layout="row" flex style="position: absolute; bottom: 16px">
<md-button class="md-raised" ng-click="sendEmail($event, to, subject, body)"
md-colors="{background: 'light-blue-500', color: 'grey-A100'}">Send</md-button>
<md-button class="md-raised" ng-click="$ls.emails.action = 'select'"
md-colors="{background: 'blue-grey-300', color: 'grey-A100'}">Cancel</md-button>
</div>
</md-card-content>
</md-content>
</md-card> -->
<h2 style="text-align: center; margin-top: 100px" flex>
Emails external access was blocked, we're looking for a solution. Stay tuned!
</h2>
</div>