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-08-02 19:25:38 +02:00
|
|
|
<md-dialog flex="80" flex-sm="100">
|
2015-09-03 22:10:05 +02:00
|
|
|
<md-toolbar>
|
2015-08-02 19:25:38 +02:00
|
|
|
<div class="md-toolbar-tools">
|
2015-08-03 18:43:21 +02:00
|
|
|
<md-icon class="material-icons 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>
|
|
|
|
<md-button class="sg-icon-button" ng-click="editor.send()">
|
|
|
|
<md-icon>send</md-icon>
|
2015-08-03 18:43:21 +02:00
|
|
|
</md-button>
|
2015-08-26 04:17:57 +02:00
|
|
|
<md-button class="sg-icon-button" ng-click="editor.message.$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-08-03 18:43:21 +02:00
|
|
|
<md-dialog-content>
|
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"
|
|
|
|
md-on-append="editor.addRecipient($chip)">
|
|
|
|
<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"
|
|
|
|
md-on-append="editor.addRecipient($chip)">
|
|
|
|
<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"
|
|
|
|
md-on-append="editor.addRecipient($chip)">
|
|
|
|
<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 -->
|
|
|
|
<div layout="column" layout-align="end end">
|
|
|
|
<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 -->
|
|
|
|
<div class="md-actions">
|
|
|
|
<div layout="row" layout-align="space-between center" layout-fill="layout-fill">
|
2015-08-13 00:25:15 +02:00
|
|
|
<div>
|
|
|
|
<!-- md-icon does not play well with Firefox - makes the
|
|
|
|
file input never appear. This should eventually be
|
|
|
|
fixed in Angular Material -->
|
|
|
|
<label class="md-button" for="file-input">
|
|
|
|
<span><var:string label:value="Attach"/></span>
|
2015-08-06 22:18:53 +02:00
|
|
|
</label>
|
2015-08-13 00:25:15 +02:00
|
|
|
<input id="file-input" type="file"
|
|
|
|
nv-file-select="nv-file-select"
|
|
|
|
multiple="multiple"
|
|
|
|
uploader="editor.uploader"
|
|
|
|
ng-show="false"/>
|
|
|
|
</div>
|
2015-09-03 22:10:05 +02:00
|
|
|
<div>
|
|
|
|
<!-- FILES ALREADY UPLOADED, FOR EXAMPLE WHEN WE FORWARD A
|
|
|
|
MAIL WITH ATTACHMENTS -->
|
|
|
|
<md-chips ng-model="editor.message.editable.attachmentAttrs"
|
|
|
|
class="sg-readonly" readonly="true">
|
|
|
|
<md-chip-template>
|
|
|
|
<span>{{$chip.filename}}</span>
|
2015-08-06 22:18:53 +02:00
|
|
|
<md-icon ng-click="editor.message.$deleteAttachment($chip.filename);">close</md-icon>
|
2015-09-03 22:10:05 +02:00
|
|
|
</md-chip-template>
|
|
|
|
</md-chips>
|
|
|
|
<!-- FILE BEING ATTACHED TO A MAIL -->
|
|
|
|
<md-chips ng-model="editor.uploader.queue"
|
|
|
|
class="sg-readonly" readonly="true">
|
|
|
|
<md-chip-template>
|
|
|
|
<span>{{$chip.file.name}}</span>
|
|
|
|
<md-icon ng-show="!$chip.isUploading"
|
|
|
|
ng-click="editor.message.$deleteAttachment($chip.file.name);
|
|
|
|
$chip.remove();">close</md-icon>
|
|
|
|
<md-icon ng-show="$chip.isUploading"
|
|
|
|
ng-click="editor.uploader.cancelItem($chip)"
|
|
|
|
ng-style="{ 'color': '#F00' }">cancel</md-icon>
|
|
|
|
<span ng-show="$chip.isUploading">{{$chip.progress}} %</span>
|
|
|
|
</md-chip-template>
|
|
|
|
</md-chips>
|
|
|
|
</div>
|
2015-08-06 22:18:53 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-09-03 22:10:05 +02:00
|
|
|
</md-dialog>
|
2015-02-20 05:41:11 +01:00
|
|
|
</container>
|