2014-12-11 17:24:22 +01:00
|
|
|
<?xml version="1.0" standalone="yes"?>
|
|
|
|
<container
|
|
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:var="http://www.skyrix.com/od/binding"
|
|
|
|
xmlns:const="http://www.skyrix.com/od/constant"
|
2015-07-13 21:22:58 +02:00
|
|
|
xmlns:label="OGo:label">
|
|
|
|
|
2017-01-19 03:24:45 +01:00
|
|
|
<md-dialog id="mailEditor" class="sg-mail-editor"
|
|
|
|
flex="{{ editor.isFullscreen? 100 : 60 }}"
|
|
|
|
flex-sm="{{ editor.isFullscreen? 100 : 90 }}"
|
|
|
|
flex-xs="100"
|
2015-12-09 22:01:59 +01:00
|
|
|
nv-file-drop="nv-file-drop"
|
|
|
|
nv-file-over="nv-file-over"
|
|
|
|
over-class="sg-over-dropzone"
|
2018-08-02 23:59:52 +02:00
|
|
|
uploader="editor.uploader"
|
|
|
|
var:sg-labels="framework">
|
2016-05-31 17:46:58 +02:00
|
|
|
<form name="messageForm">
|
2019-08-15 23:47:17 +02:00
|
|
|
<md-toolbar class="md-hue-1">
|
2016-05-31 17:46:58 +02:00
|
|
|
<div class="md-toolbar-tools">
|
2017-01-19 03:24:45 +01:00
|
|
|
<!-- expand dialog -->
|
2019-02-18 20:51:43 +01:00
|
|
|
<md-button ng-click="editor.toggleFullscreen($event)"
|
2019-07-05 22:35:20 +02:00
|
|
|
class="md-icon-button hide show-gt-xs"
|
2017-01-19 03:24:45 +01:00
|
|
|
aria-hidden="true"
|
|
|
|
ng-if="!isPopup">
|
2019-07-05 22:35:20 +02:00
|
|
|
<md-icon>{{ editor.isFullscreen ? 'fullscreen_exit' : 'fullscreen' }}</md-icon>
|
2017-01-19 03:24:45 +01:00
|
|
|
</md-button>
|
2016-05-31 17:46:58 +02:00
|
|
|
<!-- from -->
|
|
|
|
<sg-avatar-image class="hide-xs"
|
|
|
|
sg-email="editor.message.editable.from"
|
2016-11-11 22:46:55 +01:00
|
|
|
size="32">person</sg-avatar-image>
|
2016-05-31 17:46:58 +02:00
|
|
|
<md-input-container class="sg-no-wrap">
|
|
|
|
<label><var:string label:value="From"/></label>
|
|
|
|
<md-select name="from"
|
|
|
|
ng-model="editor.message.editable.from">
|
2018-01-22 08:57:54 +01:00
|
|
|
<md-option ng-value="identity" ng-repeat="identity in editor.identities track by $index">{{identity}}</md-option>
|
2016-05-31 17:46:58 +02:00
|
|
|
</md-select>
|
|
|
|
</md-input-container>
|
|
|
|
<div flex="flex"><!-- spacer --></div>
|
|
|
|
<md-button class="sg-icon-button" ng-click="editor.send()"
|
2016-11-28 17:45:09 +01:00
|
|
|
ng-disabled="!(editor.message.editable.to.length > 0 || editor.message.editable.cc.length > 0 || editor.message.editable.bcc.length > 0) || editor.uploader.isUploading || messageForm.$invalid || messageForm.$submitted"
|
2016-07-15 20:03:16 +02:00
|
|
|
sg-ripple-click="mailEditor">
|
2016-05-31 17:46:58 +02:00
|
|
|
<md-icon>send</md-icon>
|
|
|
|
</md-button>
|
|
|
|
<md-button class="sg-icon-button" ng-click="editor.save()">
|
|
|
|
<md-icon>save</md-icon>
|
|
|
|
</md-button>
|
|
|
|
<md-button class="sg-icon-button" ng-click="editor.cancel()">
|
|
|
|
<md-icon>close</md-icon>
|
|
|
|
</md-button>
|
|
|
|
</div>
|
|
|
|
</md-toolbar>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2016-05-31 17:46:58 +02:00
|
|
|
<div class="sg-dropzone">
|
|
|
|
<div layout="column" layout-align="center center" layout-fill="layout-fill">
|
|
|
|
<md-icon>file_upload</md-icon>
|
|
|
|
</div>
|
2015-12-09 22:01:59 +01:00
|
|
|
</div>
|
|
|
|
|
2016-05-31 17:46:58 +02:00
|
|
|
<md-dialog-content>
|
|
|
|
<header class="sg-padded">
|
|
|
|
<div class="msg-header-content">
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2016-05-31 17:46:58 +02:00
|
|
|
<!-- to -->
|
|
|
|
<div class="pseudo-input-container">
|
|
|
|
<label class="pseudo-input-label">
|
|
|
|
<var:string label:value="To"/>
|
|
|
|
</label>
|
|
|
|
<md-chips ng-model="editor.message.editable.to"
|
|
|
|
md-separator-keys="editor.recipientSeparatorKeys"
|
|
|
|
md-transform-chip="editor.addRecipient($chip, 'to')"
|
2019-02-20 16:15:56 +01:00
|
|
|
md-add-on-blur="true"
|
2019-02-20 18:15:29 +01:00
|
|
|
md-autofocus="editor.isNew()"
|
2019-02-20 16:15:56 +01:00
|
|
|
md-autocomplete-snap="width">
|
2016-05-31 17:46:58 +02:00
|
|
|
<md-autocomplete
|
2019-02-18 20:51:43 +01:00
|
|
|
md-menu-class="md-2-line"
|
2016-05-31 17:46:58 +02:00
|
|
|
md-search-text="editor.autocomplete.to.searchText"
|
|
|
|
md-selected-item="editor.autocomplete.to.selected"
|
|
|
|
md-items="user in editor.contactFilter(editor.autocomplete.to.searchText)"
|
2016-11-02 17:01:22 +01:00
|
|
|
var:md-min-length="minimumSearchLength"
|
2016-05-31 17:46:58 +02:00
|
|
|
md-delay="150"
|
|
|
|
md-no-cache="true"
|
|
|
|
label:placeholder="Add a recipient">
|
|
|
|
<md-item-template>
|
2019-02-18 20:51:43 +01:00
|
|
|
<div class="sg-tile-content">
|
|
|
|
<div class="sg-md-subhead"
|
2016-05-31 17:46:58 +02:00
|
|
|
md-highlight-text="editor.autocomplete.to.searchText"
|
2019-02-18 20:51:43 +01:00
|
|
|
md-highlight-flags="gi">{{ user.$shortFormat(editor.autocomplete.to.searchText) }}</div>
|
|
|
|
<div class="sg-md-body"
|
|
|
|
md-colors="::{color: 'default-background-500'}">{{ user.containername }}</div>
|
|
|
|
</div>
|
2016-05-31 17:46:58 +02:00
|
|
|
</md-item-template>
|
|
|
|
</md-autocomplete>
|
|
|
|
<md-chip-template>{{$chip}}</md-chip-template>
|
|
|
|
</md-chips>
|
|
|
|
</div>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2016-05-31 17:46:58 +02:00
|
|
|
<!-- cc -->
|
|
|
|
<div class="pseudo-input-container ng-hide" ng-hide="editor.hideCc">
|
|
|
|
<label class="pseudo-input-label">
|
|
|
|
<var:string label:value="Cc"/>
|
|
|
|
</label>
|
|
|
|
<md-chips ng-model="editor.message.editable.cc"
|
|
|
|
md-separator-keys="editor.recipientSeparatorKeys"
|
|
|
|
md-transform-chip="editor.addRecipient($chip, 'cc')"
|
2019-02-20 16:15:56 +01:00
|
|
|
md-add-on-blur="true"
|
|
|
|
md-autocomplete-snap="width">
|
2016-05-31 17:46:58 +02:00
|
|
|
<md-autocomplete
|
2019-02-18 20:51:43 +01:00
|
|
|
md-menu-class="md-2-line"
|
2016-05-31 17:46:58 +02:00
|
|
|
md-search-text="editor.autocomplete.cc.searchText"
|
|
|
|
md-selected-item="editor.autocomplete.cc.selected"
|
|
|
|
md-items="user in editor.contactFilter(editor.autocomplete.cc.searchText)"
|
2019-09-18 20:02:21 +02:00
|
|
|
var:md-min-length="minimumSearchLength"
|
2019-02-18 20:51:43 +01:00
|
|
|
md-delay="150"
|
2016-05-31 17:46:58 +02:00
|
|
|
md-no-cache="true"
|
|
|
|
label:placeholder="Add a recipient">
|
|
|
|
<md-item-template>
|
2019-02-18 20:51:43 +01:00
|
|
|
<div class="sg-tile-content">
|
|
|
|
<div class="sg-md-subhead"
|
|
|
|
md-highlight-text="editor.autocomplete.cc.searchText"
|
|
|
|
md-highlight-flags="gi">{{ user.$shortFormat(editor.autocomplete.cc.searchText) }}</div>
|
|
|
|
<div class="sg-md-body"
|
|
|
|
md-colors="::{color: 'default-background-500'}">{{ user.containername }}</div>
|
|
|
|
</div>
|
2016-05-31 17:46:58 +02:00
|
|
|
</md-item-template>
|
|
|
|
</md-autocomplete>
|
|
|
|
<md-chip-template>{{$chip}}</md-chip-template>
|
|
|
|
</md-chips>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- bcc -->
|
|
|
|
<div class="pseudo-input-container ng-hide" ng-hide="editor.hideBcc">
|
|
|
|
<label class="pseudo-input-label">
|
|
|
|
<var:string label:value="Bcc"/>
|
|
|
|
</label>
|
|
|
|
<md-chips ng-model="editor.message.editable.bcc"
|
|
|
|
md-separator-keys="editor.recipientSeparatorKeys"
|
|
|
|
md-transform-chip="editor.addRecipient($chip, 'bcc')"
|
2019-02-20 16:15:56 +01:00
|
|
|
md-add-on-blur="true"
|
|
|
|
md-autocomplete-snap="width">
|
2016-05-31 17:46:58 +02:00
|
|
|
<md-autocomplete
|
2019-02-18 20:51:43 +01:00
|
|
|
md-menu-class="md-2-line"
|
2016-05-31 17:46:58 +02:00
|
|
|
md-selected-item="editor.autocomplete.bcc.selected"
|
|
|
|
md-search-text="editor.autocomplete.bcc.searchText"
|
|
|
|
md-items="user in editor.contactFilter(editor.autocomplete.bcc.searchText)"
|
2019-09-18 20:02:21 +02:00
|
|
|
var:md-min-length="minimumSearchLength"
|
2019-02-18 20:51:43 +01:00
|
|
|
md-delay="150"
|
2016-05-31 17:46:58 +02:00
|
|
|
md-no-cache="true"
|
|
|
|
label:placeholder="Add a recipient">
|
|
|
|
<md-item-template>
|
2019-02-18 20:51:43 +01:00
|
|
|
<div class="sg-tile-content">
|
|
|
|
<div class="sg-md-subhead"
|
|
|
|
md-highlight-text="editor.autocomplete.bcc.searchText"
|
|
|
|
md-highlight-flags="gi">{{ user.$shortFormat(editor.autocomplete.bcc.searchText) }}</div>
|
|
|
|
<div class="sg-md-body"
|
|
|
|
md-colors="::{color: 'default-background-500'}">{{ user.containername }}</div>
|
|
|
|
</div>
|
2016-05-31 17:46:58 +02:00
|
|
|
</md-item-template>
|
|
|
|
</md-autocomplete>
|
|
|
|
<md-chip-template>{{$chip}}</md-chip-template>
|
|
|
|
</md-chips>
|
|
|
|
</div>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2016-05-31 17:46:58 +02:00
|
|
|
<!-- subject -->
|
|
|
|
<md-input-container>
|
|
|
|
<label>
|
|
|
|
<var:string label:value="Subject"/>
|
|
|
|
</label>
|
|
|
|
<input type="text" name="subject" ng-model="editor.message.editable.subject" ng-required="true"/>
|
|
|
|
<div ng-messages="messageForm.subject.$error">
|
2017-12-18 22:02:36 +01:00
|
|
|
<div ng-message="required"><var:string label:value="Please specify a subject."/></div>
|
2016-05-31 17:46:58 +02:00
|
|
|
</div>
|
|
|
|
</md-input-container>
|
2015-08-06 22:18:53 +02:00
|
|
|
</div>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2016-05-31 17:46:58 +02:00
|
|
|
<!-- toolbar to show cc/bcc/attachment fields -->
|
2017-01-19 03:24:45 +01:00
|
|
|
<div class="msg-header-buttons" layout="column" layout-align="start end">
|
2016-05-31 17:46:58 +02:00
|
|
|
<md-button class="sg-icon-button " ng-show="editor.hideCc" ng-click="editor.hideCc = false">Cc</md-button>
|
|
|
|
<md-button class="sg-icon-button " ng-show="editor.hideBcc" ng-click="editor.hideBcc = false">Bcc</md-button>
|
|
|
|
<md-menu>
|
2016-11-01 20:54:56 +01:00
|
|
|
<md-button label:aria-label="More mail options" class="sg-icon-button" ng-click="$mdMenu.open($event)">
|
2016-05-31 17:46:58 +02:00
|
|
|
<md-icon>more_vert</md-icon>
|
|
|
|
</md-button>
|
|
|
|
<md-menu-content width="4">
|
|
|
|
<md-menu-item>
|
|
|
|
<sg-checkmark ng-model="editor.message.editable.receipt">
|
|
|
|
<var:string label:value="Return Receipt"/>
|
|
|
|
</sg-checkmark>
|
|
|
|
</md-menu-item>
|
2017-12-23 11:09:45 +01:00
|
|
|
<md-menu-item>
|
2018-01-24 04:23:14 +01:00
|
|
|
<md-button class="md-primary" ng-disabled="true" ng-bind="::'Security' | loc"><!-- Security --></md-button>
|
2017-12-23 11:09:45 +01:00
|
|
|
</md-menu-item>
|
|
|
|
<md-menu-item>
|
|
|
|
<sg-checkmark ng-model="editor.message.editable.sign">
|
|
|
|
<var:string label:value="Sign"/>
|
|
|
|
</sg-checkmark>
|
|
|
|
</md-menu-item>
|
|
|
|
<md-menu-item>
|
|
|
|
<sg-checkmark ng-model="editor.message.editable.encrypt">
|
|
|
|
<var:string label:value="Encrypt"/>
|
|
|
|
</sg-checkmark>
|
|
|
|
</md-menu-item>
|
2016-05-31 17:46:58 +02:00
|
|
|
<md-menu-item>
|
|
|
|
<md-button class="md-primary" ng-disabled="true"><var:string label:value="Priority"/></md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
<md-menu-item>
|
|
|
|
<md-button ng-click="editor.message.editable.priority = 1">
|
2019-07-05 22:35:20 +02:00
|
|
|
<md-icon>{{ editor.message.editable.priority == 1 ? 'check' : null }}</md-icon>
|
2016-05-31 17:46:58 +02:00
|
|
|
<var:string label:value="highest"/>
|
|
|
|
</md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
<md-menu-item>
|
|
|
|
<md-button ng-click="editor.message.editable.priority = 2">
|
2019-07-05 22:35:20 +02:00
|
|
|
<md-icon>{{ editor.message.editable.priority == 2 ? 'check' : null }}</md-icon>
|
2016-05-31 17:46:58 +02:00
|
|
|
<var:string label:value="high"/>
|
|
|
|
</md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
<md-menu-item>
|
|
|
|
<md-button ng-click="editor.message.editable.priority = 3">
|
2019-07-05 22:35:20 +02:00
|
|
|
<md-icon>{{ (!editor.message.editable.priority || editor.message.editable.priority == 3) ? 'check' : null }}</md-icon>
|
2016-05-31 17:46:58 +02:00
|
|
|
<var:string label:value="normal"/>
|
|
|
|
</md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
<md-menu-item>
|
|
|
|
<md-button ng-click="editor.message.editable.priority = 4">
|
2019-07-05 22:35:20 +02:00
|
|
|
<md-icon>{{ editor.message.editable.priority == 4 ? 'check' : null }}</md-icon>
|
2016-05-31 17:46:58 +02:00
|
|
|
<var:string label:value="low"/>
|
|
|
|
</md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
<md-menu-item>
|
|
|
|
<md-button ng-click="editor.message.editable.priority = 5">
|
2019-07-05 22:35:20 +02:00
|
|
|
<md-icon>{{ editor.message.editable.priority == 5 ? 'check' : null }}</md-icon>
|
2016-05-31 17:46:58 +02:00
|
|
|
<var:string label:value="lowest"/>
|
|
|
|
</md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
</md-menu-content>
|
|
|
|
</md-menu>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2016-05-31 17:46:58 +02:00
|
|
|
</div>
|
|
|
|
</header>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2016-05-31 17:46:58 +02:00
|
|
|
<!-- MESSAGE CONTENT -->
|
2017-01-19 03:24:45 +01:00
|
|
|
<md-input-container class="md-block sg-mail-editor-content">
|
2016-05-31 17:46:58 +02:00
|
|
|
<textarea name="content" var:class="editorClass"
|
2018-08-17 22:31:50 +02:00
|
|
|
rows="9"
|
2016-05-31 17:46:58 +02:00
|
|
|
ck-locale="editor.localeCode"
|
2017-01-19 20:47:11 +01:00
|
|
|
ck-margin="16px"
|
2018-08-17 22:31:50 +02:00
|
|
|
ck-focus="editor.onHTMLFocus($event)"
|
2017-01-19 03:24:45 +01:00
|
|
|
ng-model="editor.message.editable.text"
|
2018-08-17 22:31:50 +02:00
|
|
|
ng-focus="editor.onTextFocus($event)"
|
2019-02-20 18:15:29 +01:00
|
|
|
md-autofocus="::!editor.isNew()"
|
2017-01-19 03:24:45 +01:00
|
|
|
md-no-resize="md-no-resize"
|
|
|
|
md-detect-hidden="md-detect-hidden" />
|
|
|
|
</md-input-container>
|
2016-05-31 17:46:58 +02:00
|
|
|
</md-dialog-content>
|
2015-09-03 22:10:05 +02:00
|
|
|
|
2016-05-31 17:46:58 +02:00
|
|
|
<!-- ATTACHMENTS -->
|
2017-08-23 17:55:09 +02:00
|
|
|
<md-dialog-content class="md-actions sg-mail-editor-attachments"
|
|
|
|
layout="row" layout-align="space-between start">
|
|
|
|
<!-- Attachments -->
|
|
|
|
<md-chips ng-model="editor.uploader.queue"
|
|
|
|
class="md-flex sg-readonly" readonly="true">
|
|
|
|
<md-chip-template>
|
|
|
|
<span class="sg-chip-progress" ng-show="$chip.isUploading">
|
|
|
|
<span class="md-default-theme md-warn md-bg"
|
|
|
|
ng-style="{ width: $chip.progress + '%'}"><!-- progress --></span>
|
|
|
|
</span>
|
|
|
|
<a ng-href="{{$chip.inlineUrl}}" target="_new">{{$chip.file.name}}</a>
|
|
|
|
<button class="md-icon-button md-chip-remove"
|
|
|
|
ng-click="editor.removeAttachment($chip, 'fileInput')">
|
|
|
|
<md-icon ng-class="{ 'md-warn': $chip.isUploading }">close</md-icon>
|
|
|
|
</button>
|
|
|
|
</md-chip-template>
|
|
|
|
</md-chips>
|
|
|
|
<div class="msg-header-buttons">
|
2016-11-10 16:21:33 +01:00
|
|
|
<label class="md-button md-icon-button" for="fileInput">
|
2015-12-02 16:52:35 +01:00
|
|
|
<md-icon>attach_file</md-icon>
|
|
|
|
<!-- <span><var:string label:value="Attach"/></span> -->
|
|
|
|
</label>
|
2017-01-19 21:41:21 +01:00
|
|
|
<input id="fileInput" class="ng-hide" name="fileInput" type="file" multiple="multiple"
|
2015-12-02 16:52:35 +01:00
|
|
|
nv-file-select="nv-file-select"
|
|
|
|
uploader="editor.uploader"/>
|
|
|
|
<!--
|
|
|
|
Disable multiple until this issue is resolved:
|
|
|
|
https://github.com/nervgh/angular-file-upload/issues/525
|
|
|
|
-->
|
2016-05-31 17:46:58 +02:00
|
|
|
<!-- multiple="multiple" -->
|
|
|
|
</div>
|
2017-08-23 17:55:09 +02:00
|
|
|
</md-dialog-content>
|
2016-05-31 17:46:58 +02:00
|
|
|
</form>
|
2017-01-19 03:24:45 +01:00
|
|
|
|
2016-07-15 20:03:16 +02:00
|
|
|
<sg-ripple class="md-default-theme md-accent md-bg"
|
|
|
|
ng-class="{ 'md-warn': editor.sendState == 'error' }"><!-- ripple background --></sg-ripple>
|
|
|
|
<sg-ripple-content class="md-default-theme md-accent md-hue-1 md-fg md-flex ng-hide"
|
|
|
|
layout="column" layout-align="center center" layout-fill="layout-fill"
|
|
|
|
ng-switch="editor.sendState">
|
|
|
|
|
|
|
|
<!-- Sending -->
|
|
|
|
<div layout="column" layout-align="center center"
|
|
|
|
ng-switch-when="sending">
|
|
|
|
<md-progress-circular class="md-hue-1"
|
|
|
|
md-mode="indeterminate"
|
|
|
|
md-diameter="48"><!-- mailbox loading progress --></md-progress-circular>
|
|
|
|
<div class="md-padding">
|
|
|
|
<var:string label:value="Sending"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Sent -->
|
|
|
|
<div layout="column" layout-align="center center"
|
|
|
|
ng-switch-when="sent">
|
|
|
|
<md-icon class="md-accent md-hue-1 sg-icon--large">done</md-icon>
|
|
|
|
<div class="md-default-theme md-accent md-hue-1 md-fg md-padding">
|
|
|
|
<var:string label:value="Sent"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Error -->
|
|
|
|
<div layout="column" layout-align="center center"
|
|
|
|
ng-switch-when="error">
|
|
|
|
<md-icon class="md-accent md-hue-1 sg-icon--large">error</md-icon>
|
|
|
|
<div class="md-padding">
|
|
|
|
{{editor.errorMessage}}
|
|
|
|
</div>
|
|
|
|
<md-button sg-ripple-click="mailEditor"><var:string label:value="Close"/></md-button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</sg-ripple-content>
|
|
|
|
|
2015-09-03 22:10:05 +02:00
|
|
|
</md-dialog>
|
2015-02-20 05:41:11 +01:00
|
|
|
</container>
|