2010-03-02 20:57:30 +01:00
|
|
|
<?xml version="1.0" standalone="yes"?>
|
2015-07-04 03:40:37 +02:00
|
|
|
<!DOCTYPE container>
|
|
|
|
<container
|
|
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:var="http://www.skyrix.com/od/binding"
|
|
|
|
xmlns:const="http://www.skyrix.com/od/constant"
|
|
|
|
xmlns:label="OGo:label"
|
|
|
|
xmlns:rsrc="OGo:url"
|
|
|
|
xmlns:uix="OGo:uix"><var:string var:value="doctype" const:escapeHTML="NO" />
|
2015-08-18 21:32:44 +02:00
|
|
|
<md-dialog flex="50" flex-sm="100">
|
2015-10-05 16:45:30 +02:00
|
|
|
<form name="mainForm" ng-submit="filterEditor.save(mainForm)">
|
2015-09-04 16:31:40 +02:00
|
|
|
<md-toolbar>
|
2015-08-24 17:20:23 +02:00
|
|
|
<div class="md-toolbar-tools">
|
|
|
|
<md-icon class="material-icons sg-icon-toolbar-bg">filter_list</md-icon>
|
|
|
|
<md-input-container>
|
|
|
|
<label><var:string label:value="Filter name:"/></label>
|
2015-10-05 16:45:30 +02:00
|
|
|
<input class="md-title" type="text" ng-model="filterEditor.filter.name" required="required"/>
|
2015-08-24 17:20:23 +02:00
|
|
|
</md-input-container>
|
2015-10-05 16:45:30 +02:00
|
|
|
<md-button type="button" class="sg-icon-button " ng-click="filterEditor.cancel()">
|
2015-08-24 17:20:23 +02:00
|
|
|
<md-icon>close</md-icon>
|
|
|
|
</md-button>
|
|
|
|
</div>
|
|
|
|
</md-toolbar>
|
2015-10-14 16:31:15 +02:00
|
|
|
<md-dialog-content class="md-dialog-content">
|
2015-04-27 19:33:26 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
var filterId = '<var:string value="filterId"/>';
|
|
|
|
var sieveFolderEncoding = '<var:string value="sieveFolderEncoding"/>';
|
|
|
|
var mailTags = <var:string value="labels" const:escapeHTML="NO"/>;
|
|
|
|
</script>
|
2015-08-14 08:31:27 +02:00
|
|
|
|
|
|
|
<div layout="row" layout-align="start center">
|
2015-10-05 16:45:30 +02:00
|
|
|
<var:string label:value="For incoming messages that"/>
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-input-container class="md-flex">
|
2015-10-05 16:45:30 +02:00
|
|
|
<md-select ng-model="filterEditor.filter.match" required="required">
|
2015-04-27 19:33:26 +02:00
|
|
|
<md-option const:value="all">
|
|
|
|
<var:string label:value="match all of the following rules:"/>
|
|
|
|
</md-option>
|
|
|
|
<md-option const:value="any">
|
|
|
|
<var:string label:value="match any of the following rules:"/>
|
|
|
|
</md-option>
|
|
|
|
<md-option const:value="allmessages">
|
|
|
|
<var:string label:value="match all messages"/>
|
|
|
|
</md-option>
|
|
|
|
</md-select>
|
2015-08-14 08:31:27 +02:00
|
|
|
</md-input-container>
|
|
|
|
</div>
|
2015-04-27 19:33:26 +02:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<!-- CONDITIONS -->
|
|
|
|
<div layout="column">
|
|
|
|
<div id="filterRules"><!-- empty -->
|
|
|
|
<md-list>
|
2015-10-05 16:45:30 +02:00
|
|
|
<md-list-item ng-repeat="rule in filterEditor.filter.rules">
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-input-container flex="25">
|
2015-04-27 19:33:26 +02:00
|
|
|
<md-select ng-model="rule.field">
|
2015-10-05 16:45:30 +02:00
|
|
|
<md-option ng-value="key" ng-repeat="(key, value) in filterEditor.fieldLabels">{{ value }}</md-option>
|
2015-04-27 19:33:26 +02:00
|
|
|
</md-select>
|
2015-08-14 08:31:27 +02:00
|
|
|
</md-input-container>
|
2015-04-27 19:33:26 +02:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-input-container flex="25" ng-show="rule.field == 'header'">
|
|
|
|
<input type="text" ng-model="rule.custom_header"/>
|
|
|
|
</md-input-container>
|
2015-04-27 19:33:26 +02:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-input-container flex="25" ng-show="rule.field == 'size'">
|
|
|
|
<md-select ng-model="rule.operator">
|
2015-10-05 16:45:30 +02:00
|
|
|
<md-option ng-value="key" ng-repeat="(key, value) in filterEditor.numberOperatorLabels">
|
2015-04-27 19:33:26 +02:00
|
|
|
{{ value }}
|
|
|
|
</md-option>
|
|
|
|
</md-select>
|
2015-08-14 08:31:27 +02:00
|
|
|
</md-input-container>
|
2015-04-27 19:33:26 +02:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-input-container flex="25" ng-show="rule.field != 'size'">
|
|
|
|
<md-select ng-model="rule.operator">
|
2015-10-05 16:45:30 +02:00
|
|
|
<md-option ng-value="key" ng-repeat="(key, value) in filterEditor.textOperatorLabels">
|
2015-04-27 19:33:26 +02:00
|
|
|
{{ value }}
|
|
|
|
</md-option>
|
|
|
|
</md-select>
|
2015-08-14 08:31:27 +02:00
|
|
|
</md-input-container>
|
2015-04-27 19:33:26 +02:00
|
|
|
|
2015-10-05 16:45:30 +02:00
|
|
|
<md-input-container class="md-flex" md-no-float="md-no-float">
|
|
|
|
<input type="text" label:placeholder="Value" ng-model="rule.value"/>
|
2015-08-14 08:31:27 +02:00
|
|
|
</md-input-container>
|
2015-04-27 19:33:26 +02:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-button class="sg-icon-button" type="button"
|
2015-10-05 16:45:30 +02:00
|
|
|
ng-click="filterEditor.removeMailFilterRule($index)">
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-icon>remove_circle</md-icon>
|
|
|
|
</md-button>
|
2015-04-27 19:33:26 +02:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
</md-list-item>
|
|
|
|
</md-list>
|
|
|
|
</div>
|
2015-04-27 19:33:26 +02:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<div layout="row" layout-align="end center">
|
2015-07-04 03:40:37 +02:00
|
|
|
<md-button class="sg-icon-button" type="button"
|
2015-10-05 16:45:30 +02:00
|
|
|
ng-click="filterEditor.addMailFilterRule($event)">
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-icon>add_circle</md-icon>
|
2015-04-27 19:33:26 +02:00
|
|
|
</md-button>
|
|
|
|
</div>
|
2015-08-14 08:31:27 +02:00
|
|
|
</div>
|
2015-04-27 19:33:26 +02:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<!-- ACTIONS -->
|
|
|
|
<div layout="column">
|
|
|
|
<var:string label:value="Perform these actions:"/>
|
|
|
|
<div id="filterActions"><!-- empty --></div>
|
2015-04-27 19:33:26 +02:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-list>
|
|
|
|
<md-list-item layout="row" layout-align="space-between center"
|
2015-10-05 16:45:30 +02:00
|
|
|
ng-repeat="action in filterEditor.filter.actions">
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-input-container>
|
2015-02-25 23:21:07 +01:00
|
|
|
<md-select ng-model="action.method">
|
2015-10-05 16:45:30 +02:00
|
|
|
<md-option ng-value="key" ng-repeat="(key, value) in filterEditor.methodLabels">{{ value }}</md-option>
|
2015-02-25 23:21:07 +01:00
|
|
|
</md-select>
|
2015-08-14 08:31:27 +02:00
|
|
|
</md-input-container>
|
2015-02-25 23:21:07 +01:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<!-- FORWARD MESSAGE TO -->
|
|
|
|
<md-input-container ng-show="action.method == 'redirect'" >
|
|
|
|
<input type="text" ng-model="action.argument"/>
|
|
|
|
</md-input-container>
|
2015-02-25 23:21:07 +01:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<!-- DISCARD -->
|
|
|
|
<!-- nada -->
|
2015-02-25 23:21:07 +01:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<!-- KEEP -->
|
|
|
|
<!-- nada -->
|
2015-02-25 23:21:07 +01:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<!-- SEND REJECT MESSAGE -->
|
|
|
|
<md-input-container ng-show="action.method == 'reject'">
|
|
|
|
<input type="text" ng-model="action.argument"/>
|
|
|
|
</md-input-container>
|
2015-02-25 23:21:07 +01:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<!-- FILE INTO -->
|
|
|
|
<md-input-container ng-show="action.method == 'fileinto'" >
|
|
|
|
<md-select ng-model="action.argument">
|
2015-10-05 16:45:30 +02:00
|
|
|
<md-option ng-value="item.path" ng-repeat="item in filterEditor.mailboxes">
|
2015-10-08 22:42:24 +02:00
|
|
|
<div ng-class="'sg-child-level-' + item.level">
|
|
|
|
{{ item.name }}
|
|
|
|
</div>
|
2015-02-25 23:21:07 +01:00
|
|
|
</md-option>
|
|
|
|
</md-select>
|
2015-08-14 08:31:27 +02:00
|
|
|
</md-input-container>
|
2015-02-25 23:21:07 +01:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<!-- FLAG WITH -->
|
|
|
|
<md-input-container ng-show="action.method == 'addflag'" >
|
|
|
|
<md-select ng-model="action.argument" >
|
2015-08-18 17:31:42 +02:00
|
|
|
<md-option value="seen"><var:string label:value="Seen"/></md-option>
|
|
|
|
<md-option value="deleted"><var:string label:value="Deleted"/></md-option>
|
|
|
|
<md-option value="answered"><var:string label:value="Answered"/></md-option>
|
|
|
|
<md-option value="flagged"><var:string label:value="Flagged"/></md-option>
|
|
|
|
<md-option value="junk"><var:string label:value="Junk"/></md-option>
|
|
|
|
<md-option value="not_junk"><var:string label:value="Not Junk"/></md-option>
|
2015-02-25 23:21:07 +01:00
|
|
|
<md-option ng-value="key" ng-repeat="(key, value) in labels">{{ value[0] }}</md-option>
|
|
|
|
</md-select>
|
2015-08-14 08:31:27 +02:00
|
|
|
</md-input-container>
|
2015-02-25 23:21:07 +01:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<!-- STOP -->
|
|
|
|
<!-- nada -->
|
2015-02-25 23:21:07 +01:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-button class="sg-icon-button" type="button"
|
2015-10-05 16:45:30 +02:00
|
|
|
ng-click="filterEditor.removeMailFilterAction($index)">
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-icon>remove_circle</md-icon>
|
|
|
|
</md-button>
|
2015-04-27 19:33:26 +02:00
|
|
|
|
2015-04-09 20:46:54 +02:00
|
|
|
</md-list-item>
|
2015-08-14 08:31:27 +02:00
|
|
|
</md-list>
|
2015-02-25 23:21:07 +01:00
|
|
|
|
2015-08-14 08:31:27 +02:00
|
|
|
<div layout="row" layout-align="end center">
|
2015-07-04 03:40:37 +02:00
|
|
|
<md-button class="sg-icon-button" type="button"
|
2015-10-05 16:45:30 +02:00
|
|
|
ng-click="filterEditor.addMailFilterAction($event)">
|
2015-08-14 08:31:27 +02:00
|
|
|
<md-icon>add_circle</md-icon>
|
2015-04-27 19:33:26 +02:00
|
|
|
</md-button>
|
|
|
|
</div>
|
2015-02-25 23:21:07 +01:00
|
|
|
</div>
|
2015-08-14 08:31:27 +02:00
|
|
|
</md-dialog-content>
|
2015-11-27 19:00:39 +01:00
|
|
|
<md-dialog-actions>
|
2015-10-05 16:45:30 +02:00
|
|
|
<md-button type="submit"><var:string label:value="Save"/></md-button>
|
2015-11-27 19:00:39 +01:00
|
|
|
</md-dialog-actions>
|
2015-08-14 08:31:27 +02:00
|
|
|
</form>
|
2015-04-27 19:33:26 +02:00
|
|
|
</md-dialog>
|
2015-07-04 03:40:37 +02:00
|
|
|
</container>
|