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">
|
|
|
|
|
2015-12-09 22:01:59 +01:00
|
|
|
<md-dialog class="sg-mail-editor" flex="80" flex-sm="90" flex-xs="100"
|
|
|
|
nv-file-drop="nv-file-drop"
|
|
|
|
nv-file-over="nv-file-over"
|
|
|
|
over-class="sg-over-dropzone"
|
|
|
|
uploader="editor.uploader">
|
2015-09-03 22:10:05 +02:00
|
|
|
<md-toolbar>
|
2015-08-02 19:25:38 +02:00
|
|
|
<div class="md-toolbar-tools">
|
2015-12-02 16:52:35 +01:00
|
|
|
<md-icon class="sg-icon-toolbar-bg">edit</md-icon>
|
2015-08-26 04:17:57 +02:00
|
|
|
<!-- from -->
|
2015-09-04 15:09:43 +02:00
|
|
|
<sg-avatar-image hide-sm="hide-sm"
|
2015-08-26 04:17:57 +02:00
|
|
|
sg-email="editor.message.editable.from"
|
|
|
|
size="32"><!-- avatar --></sg-avatar-image>
|
2015-08-06 22:18:53 +02:00
|
|
|
<md-input-container flex="flex">
|
|
|
|
<label><var:string label:value="From"/></label>
|
|
|
|
<md-select name="from"
|
2015-08-26 04:17:57 +02:00
|
|
|
ng-model="editor.message.editable.from">
|
2015-08-06 22:18:53 +02:00
|
|
|
<md-option ng-value="identity" ng-repeat="identity in editor.identities">{{identity}}</md-option>
|
|
|
|
</md-select>
|
|
|
|
</md-input-container>
|
|
|
|
<div flex-gt-sm="flex-gt-sm"><!-- spacer --></div>
|
2015-10-16 20:00:04 +02:00
|
|
|
<md-button class="sg-icon-button" ng-click="editor.send()"
|
|
|
|
ng-disabled="!(editor.message.editable.to.length > 0 || editor.message.editable.cc.length > 0 || editor.message.editable.bcc.length > 0)">
|
2015-08-06 22:18:53 +02:00
|
|
|
<md-icon>send</md-icon>
|
2015-08-03 18:43:21 +02:00
|
|
|
</md-button>
|
2015-12-10 19:41:07 +01:00
|
|
|
<md-button class="sg-icon-button" ng-click="editor.save()">
|
2015-08-06 22:18:53 +02:00
|
|
|
<md-icon>save</md-icon>
|
|
|
|
</md-button>
|
2015-08-26 04:17:57 +02:00
|
|
|
<md-button class="sg-icon-button" ng-click="editor.cancel()">
|
2015-08-06 22:18:53 +02:00
|
|
|
<md-icon>close</md-icon>
|
|
|
|
</md-button>
|
2015-08-26 04:17:57 +02:00
|
|
|
</div>
|
2015-08-03 18:43:21 +02:00
|
|
|
</md-toolbar>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2015-12-09 22:01:59 +01:00
|
|
|
<div class="sg-dropzone">
|
|
|
|
<div layout="column" layout-align="center center" layout-fill="layout-fill">
|
|
|
|
<md-icon>file_upload</md-icon>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2015-10-14 16:31:15 +02:00
|
|
|
<md-dialog-content class="md-padding">
|
2015-09-03 22:10:05 +02:00
|
|
|
<header>
|
|
|
|
<div class="msg-header-content">
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2015-09-03 22:10:05 +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"
|
2015-12-01 22:09:29 +01:00
|
|
|
md-transform-chip="editor.addRecipient($chip)">
|
2015-09-03 22:10:05 +02:00
|
|
|
<md-autocomplete
|
|
|
|
class="sg-chips-autocomplete"
|
2015-09-21 17:58:48 +02:00
|
|
|
md-autofocus="true"
|
2015-09-03 22:10:05 +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)"
|
|
|
|
md-min-length="3"
|
|
|
|
md-delay="300"
|
|
|
|
md-no-cache="true"
|
|
|
|
label:placeholder="Add a recipient">
|
|
|
|
<md-item-template>
|
|
|
|
<span class="md-contact-suggestion">
|
|
|
|
<span class="md-contact-name"
|
|
|
|
md-highlight-text="editor.autocomplete.to.searchText"
|
|
|
|
md-highlight-flags="^i">{{user.$$fullname}}</span>
|
|
|
|
<span class="md-contact-email"
|
|
|
|
md-highlight-text="editor.autocomplete.to.searchText"
|
|
|
|
md-highlight-flags="^i">{{user.$$email}}</span>
|
|
|
|
</span>
|
|
|
|
</md-item-template>
|
|
|
|
</md-autocomplete>
|
|
|
|
<md-chip-template>{{$chip}}</md-chip-template>
|
|
|
|
</md-chips>
|
|
|
|
</div>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2015-09-03 22:10:05 +02:00
|
|
|
<!-- cc -->
|
|
|
|
<div class="pseudo-input-container" ng-hide="editor.hideCc">
|
|
|
|
<label class="pseudo-input-label">
|
|
|
|
<var:string label:value="Cc"/>
|
|
|
|
</label>
|
|
|
|
<md-chips ng-model="editor.message.editable.cc"
|
2015-12-01 22:09:29 +01:00
|
|
|
md-transform-chip="editor.addRecipient($chip)">
|
2015-09-03 22:10:05 +02:00
|
|
|
<md-autocomplete
|
|
|
|
class="sg-chips-autocomplete"
|
|
|
|
md-search-text="editor.autocomplete.cc.searchText"
|
|
|
|
md-selected-item="editor.autocomplete.cc.selected"
|
|
|
|
md-items="user in editor.contactFilter(editor.autocomplete.cc.searchText)"
|
2015-09-21 17:58:48 +02:00
|
|
|
md-min-length="3"
|
|
|
|
md-delay="300"
|
|
|
|
md-no-cache="true"
|
2015-09-03 22:10:05 +02:00
|
|
|
label:placeholder="Add a recipient">
|
|
|
|
<md-item-template>
|
|
|
|
<span class="md-contact-suggestion">
|
|
|
|
<span class="md-contact-name"
|
|
|
|
md-highlight-text="editor.autocomplete.to.searchText"
|
|
|
|
md-highlight-flags="^i">{{user.$$fullname}}</span>
|
|
|
|
<span class="md-contact-email"
|
|
|
|
md-highlight-text="editor.autocomplete.to.searchText"
|
|
|
|
md-highlight-flags="^i">{{user.$$email}}</span>
|
|
|
|
</span>
|
|
|
|
</md-item-template>
|
|
|
|
</md-autocomplete>
|
|
|
|
<md-chip-template>{{$chip}}</md-chip-template>
|
|
|
|
</md-chips>
|
|
|
|
</div>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2015-09-03 22:10:05 +02:00
|
|
|
<!-- bcc -->
|
|
|
|
<div class="pseudo-input-container" ng-hide="editor.hideBcc">
|
|
|
|
<label class="pseudo-input-label">
|
|
|
|
<var:string label:value="Bcc"/>
|
|
|
|
</label>
|
|
|
|
<md-chips ng-model="editor.message.editable.bcc"
|
2015-12-01 22:09:29 +01:00
|
|
|
md-transform-chip="editor.addRecipient($chip)">
|
2015-09-03 22:10:05 +02:00
|
|
|
<md-autocomplete
|
|
|
|
class="sg-chips-autocomplete"
|
|
|
|
md-selected-item="editor.autocomplete.bcc.selected"
|
|
|
|
md-search-text="editor.autocomplete.bcc.searchText"
|
|
|
|
md-items="user in editor.contactFilter(editor.autocomplete.bcc.searchText)"
|
2015-09-21 17:58:48 +02:00
|
|
|
md-min-length="3"
|
|
|
|
md-delay="300"
|
|
|
|
md-no-cache="true"
|
2015-09-03 22:10:05 +02:00
|
|
|
label:placeholder="Add a recipient">
|
|
|
|
<md-item-template>
|
|
|
|
<span class="md-contact-suggestion">
|
|
|
|
<span class="md-contact-name"
|
|
|
|
md-highlight-text="editor.autocomplete.to.searchText"
|
|
|
|
md-highlight-flags="^i">{{user.$$fullname}}</span>
|
|
|
|
<span class="md-contact-email"
|
|
|
|
md-highlight-text="editor.autocomplete.to.searchText"
|
|
|
|
md-highlight-flags="^i">{{user.$$email}}</span>
|
|
|
|
</span>
|
|
|
|
</md-item-template>
|
|
|
|
</md-autocomplete>
|
|
|
|
<md-chip-template>{{$chip}}</md-chip-template>
|
|
|
|
</md-chips>
|
2015-08-06 22:18:53 +02:00
|
|
|
</div>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2015-09-03 22:10:05 +02:00
|
|
|
<!-- subject -->
|
|
|
|
<md-input-container>
|
|
|
|
<label>
|
|
|
|
<var:string label:value="Subject"/>
|
|
|
|
</label>
|
|
|
|
<input type="text" name="subject" ng-model="editor.message.editable.subject"/>
|
|
|
|
</md-input-container>
|
|
|
|
</div>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2015-09-03 22:10:05 +02:00
|
|
|
<!-- toolbar to show cc/bcc/attachment fields -->
|
2015-12-08 17:56:36 +01:00
|
|
|
<div layout="column" layout-align="start end">
|
2015-09-03 22:10:05 +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>
|
|
|
|
<md-button label:aria-label="More mail options" class="sg-icon-button" ng-click="$mdOpenMenu($event)">
|
|
|
|
<md-icon>more_vert</md-icon>
|
|
|
|
</md-button>
|
|
|
|
<md-menu-content width="4">
|
|
|
|
<md-menu-item>
|
|
|
|
<md-button ng-href="#">
|
|
|
|
<md-checkbox ng-model="editor.message.editable.receipt">
|
|
|
|
<var:string label:value="Return Receipt"/>
|
|
|
|
</md-checkbox>
|
|
|
|
</md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
<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">
|
|
|
|
<md-icon ng-class="{ 'icon-check': editor.message.editable.priority == 1}"><!-- highest --></md-icon>
|
|
|
|
<var:string label:value="highest"/>
|
|
|
|
</md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
<md-menu-item>
|
|
|
|
<md-button ng-click="editor.message.editable.priority = 2">
|
|
|
|
<md-icon ng-class="{ 'icon-check': editor.message.editable.priority == 2}"><!-- high --></md-icon>
|
|
|
|
<var:string label:value="high"/>
|
|
|
|
</md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
<md-menu-item>
|
|
|
|
<md-button ng-click="editor.message.editable.priority = 3">
|
|
|
|
<md-icon ng-class="{ 'icon-check':
|
|
|
|
!editor.message.editable.priority
|
|
|
|
|| editor.message.editable.priority == 3}"><!-- normal --></md-icon>
|
|
|
|
<var:string label:value="normal"/>
|
|
|
|
</md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
<md-menu-item>
|
|
|
|
<md-button ng-click="editor.message.editable.priority = 4">
|
|
|
|
<md-icon ng-class="{ 'icon-check': editor.message.editable.priority == 4}"><!-- low --></md-icon>
|
|
|
|
<var:string label:value="low"/>
|
|
|
|
</md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
<md-menu-item>
|
|
|
|
<md-button ng-click="editor.message.editable.priority = 5">
|
|
|
|
<md-icon ng-class="{ 'icon-check': editor.message.editable.priority == 5}"><!-- lowest --></md-icon>
|
|
|
|
<var:string label:value="lowest"/>
|
|
|
|
</md-button>
|
|
|
|
</md-menu-item>
|
|
|
|
</md-menu-content>
|
|
|
|
</md-menu>
|
2015-07-13 21:22:58 +02:00
|
|
|
|
2015-09-03 22:10:05 +02:00
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<!-- MESSAGE CONTENT -->
|
|
|
|
<textarea name="content" var:class="editorClass"
|
|
|
|
ck-locale="editor.localeCode"
|
|
|
|
ng-model="editor.message.editable.text"/>
|
2015-08-03 18:43:21 +02:00
|
|
|
</md-dialog-content>
|
2015-08-06 22:18:53 +02:00
|
|
|
|
|
|
|
<!-- TOOLBAR BUTTONS -->
|
2015-11-27 19:00:39 +01:00
|
|
|
<md-dialog-actions>
|
2015-08-06 22:18:53 +02:00
|
|
|
<div layout="row" layout-align="space-between center" layout-fill="layout-fill">
|
2015-12-02 16:52:35 +01:00
|
|
|
<!-- Attachments -->
|
2015-09-03 22:10:05 +02:00
|
|
|
<md-chips ng-model="editor.uploader.queue"
|
2015-12-02 16:52:35 +01:00
|
|
|
class="md-flex sg-readonly" readonly="true">
|
2015-09-03 22:10:05 +02:00
|
|
|
<md-chip-template>
|
2015-12-01 22:09:29 +01:00
|
|
|
<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>
|
2015-12-02 22:32:39 +01:00
|
|
|
<a ng-href="{{$chip.inlineUrl}}" target="_new">{{$chip.file.name}}</a>
|
2015-12-01 22:09:29 +01:00
|
|
|
<md-icon ng-class="{ 'md-warn': $chip.isUploading }"
|
|
|
|
ng-click="editor.removeAttachment($chip)">close</md-icon>
|
2015-09-03 22:10:05 +02:00
|
|
|
</md-chip-template>
|
|
|
|
</md-chips>
|
2015-12-02 16:52:35 +01:00
|
|
|
<label class="md-button md-icon-button" for="file-input">
|
|
|
|
<md-icon>attach_file</md-icon>
|
|
|
|
<!-- <span><var:string label:value="Attach"/></span> -->
|
|
|
|
</label>
|
|
|
|
<input id="file-input" name="file-input" type="file" class="ng-hide"
|
|
|
|
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
|
|
|
|
-->
|
|
|
|
<!-- multiple="multiple" -->
|
2015-08-06 22:18:53 +02:00
|
|
|
</div>
|
2015-11-27 19:00:39 +01:00
|
|
|
</md-dialog-actions>
|
2015-09-03 22:10:05 +02:00
|
|
|
</md-dialog>
|
2015-02-20 05:41:11 +01:00
|
|
|
</container>
|