2010-03-02 20:57:30 +01:00
|
|
|
<?xml version="1.0" standalone="yes"?>
|
|
|
|
<!DOCTYPE var:component>
|
|
|
|
<var:component
|
|
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:var="http://www.skyrix.com/od/binding"
|
|
|
|
xmlns:const="http://www.skyrix.com/od/constant"
|
|
|
|
xmlns:uix="OGo:uix"
|
|
|
|
xmlns:rsrc="OGo:url"
|
|
|
|
xmlns:label="OGo:label"
|
|
|
|
className="UIxPageFrame"
|
|
|
|
title="title"
|
|
|
|
const:popup="YES"
|
|
|
|
>
|
2015-02-25 23:21:07 +01:00
|
|
|
<md-dialog>
|
|
|
|
<md-content>
|
2010-03-02 20:57:30 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
var filterId = '<var:string value="filterId"/>';
|
2014-03-10 15:07:47 +01:00
|
|
|
var sieveFolderEncoding = '<var:string value="sieveFolderEncoding"/>';
|
2013-11-22 20:42:16 +01:00
|
|
|
var mailTags = <var:string value="labels" const:escapeHTML="NO"/>;
|
2010-03-02 20:57:30 +01:00
|
|
|
</script>
|
|
|
|
<form id="mainForm" var:href="ownPath">
|
|
|
|
<div id="filterNameContainer" class="container">
|
2015-02-25 23:21:07 +01:00
|
|
|
<md-input-container>
|
|
|
|
<label><var:string label:value="Filter name:"/></label>
|
|
|
|
<input const:name="filterName" type="text" ng-model="filter.name"/>
|
|
|
|
</md-input-container>
|
2010-03-02 20:57:30 +01:00
|
|
|
</div>
|
|
|
|
<div id="filterMatchContainer" class="container">
|
|
|
|
<var:string label:value="For incoming messages that"/>
|
2015-02-25 23:21:07 +01:00
|
|
|
<md-select const:name="matchType" const:id="matchType" ng-model="filter.match">
|
|
|
|
<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>
|
2010-03-02 20:57:30 +01:00
|
|
|
</div>
|
|
|
|
|
2015-02-25 23:21:07 +01:00
|
|
|
<!-- CONDITIONS -->
|
2010-03-02 20:57:30 +01:00
|
|
|
<div id="filterRulesContainer" class="container">
|
2015-02-25 23:21:07 +01:00
|
|
|
<div id="filterRules"><!-- empty -->
|
|
|
|
<md-list>
|
2015-04-09 20:46:54 +02:00
|
|
|
<md-list-item ng-repeat="rule in filter.rules">
|
2015-02-25 23:21:07 +01:00
|
|
|
<md-select ng-model="rule.field">
|
|
|
|
<md-option ng-value="key" ng-repeat="(key, value) in fieldLabels">{{ value }}</md-option>
|
|
|
|
</md-select>
|
|
|
|
|
|
|
|
<input type="text" ng-show="rule.field ==
|
|
|
|
'header'" ng-model="rule.custom_header"/>
|
|
|
|
|
|
|
|
<md-select ng-show="rule.field =='size'" ng-model="rule.operator">
|
|
|
|
<md-option ng-value="key" ng-repeat="(key, value) in numberOperatorLabels">
|
|
|
|
{{ value }}
|
|
|
|
</md-option>
|
|
|
|
</md-select>
|
|
|
|
|
|
|
|
<md-select ng-show="rule.field !='size'" ng-model="rule.operator">
|
|
|
|
<md-option ng-value="key" ng-repeat="(key, value) in textOperatorLabels">
|
|
|
|
{{ value }}
|
|
|
|
</md-option>
|
|
|
|
</md-select>
|
|
|
|
|
|
|
|
<input type="text" ng-model="rule.value"/>
|
|
|
|
|
|
|
|
<md-button ng-click="removeMailFilterRule($index)" type="button">
|
|
|
|
<div class="md-icon-remove"><!-- delete --></div>
|
|
|
|
</md-button>
|
2015-04-09 20:46:54 +02:00
|
|
|
|
|
|
|
</md-list-item>
|
2015-02-25 23:21:07 +01:00
|
|
|
</md-list>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<md-button ng-click="addMailFilterRule($event)" type="button">
|
|
|
|
<div class="md-icon-add"><!-- create --></div>
|
|
|
|
</md-button>
|
2010-03-02 20:57:30 +01:00
|
|
|
</div>
|
2015-02-25 23:21:07 +01:00
|
|
|
|
|
|
|
<!-- ACTIONS -->
|
2010-03-02 20:57:30 +01:00
|
|
|
<div id="filterActionsContainer" class="container">
|
|
|
|
<var:string label:value="Perform these actions:"/><br/>
|
|
|
|
<div id="filterActions"><!-- empty --></div>
|
2015-02-25 23:21:07 +01:00
|
|
|
|
|
|
|
<md-list>
|
2015-04-09 20:46:54 +02:00
|
|
|
<md-list-item ng-repeat="action in filter.actions">
|
2015-02-25 23:21:07 +01:00
|
|
|
<md-select ng-model="action.method">
|
|
|
|
<md-option ng-value="key" ng-repeat="(key, value) in methodLabels">{{ value }}</md-option>
|
|
|
|
</md-select>
|
|
|
|
|
|
|
|
<!-- FORWARD MESSAGE TO -->
|
|
|
|
<input type="text" ng-show="action.method == 'redirect'" ng-model="action.argument"/>
|
|
|
|
|
|
|
|
<!-- DISCARD -->
|
|
|
|
<!-- nada -->
|
|
|
|
|
|
|
|
<!-- KEEP -->
|
|
|
|
<!-- nada -->
|
|
|
|
|
|
|
|
<!-- SEND REJECT MESSAGE -->
|
|
|
|
<input type="text" ng-show="action.method == 'reject'" ng-model="action.argument"/>
|
|
|
|
|
|
|
|
<!-- FILE INTO -->
|
|
|
|
<md-select ng-show="action.method == 'fileinto'" ng-model="action.argument">
|
|
|
|
<md-option ng-value="item.path" ng-repeat="item in mailboxes">
|
|
|
|
{{ item.name }}
|
|
|
|
</md-option>
|
|
|
|
</md-select>
|
|
|
|
|
|
|
|
<!-- FLAG WITH -->
|
|
|
|
<md-select ng-show="action.method == 'addflag'" ng-model="action.argument" >
|
|
|
|
<md-option ng-value="key" ng-repeat="(key, value) in labels">{{ value[0] }}</md-option>
|
|
|
|
</md-select>
|
|
|
|
|
|
|
|
<!-- STOP -->
|
|
|
|
<!-- nada -->
|
|
|
|
|
|
|
|
|
|
|
|
<md-button ng-click="removeMailFilterAction($index)" type="button">
|
|
|
|
<div class="md-icon-remove"><!-- delete --></div>
|
|
|
|
</md-button>
|
2015-04-09 20:46:54 +02:00
|
|
|
|
|
|
|
</md-list-item>
|
2015-02-25 23:21:07 +01:00
|
|
|
</md-list>
|
|
|
|
|
|
|
|
<md-button ng-click="addMailFilterAction($event)" type="button">
|
|
|
|
<div class="md-icon-add"><!-- create --></div>
|
|
|
|
</md-button>
|
2010-03-02 20:57:30 +01:00
|
|
|
</div>
|
2015-02-25 23:21:07 +01:00
|
|
|
|
|
|
|
<div class="md-actions" layout="row">
|
|
|
|
<md-button type="button" ng-click="cancel()">Cancel</md-button>
|
|
|
|
<md-button type="button" class="md-primary" ng-click="save()">Save</md-button>
|
|
|
|
</div>
|
2010-03-02 20:57:30 +01:00
|
|
|
</form>
|
2015-02-25 23:21:07 +01:00
|
|
|
</md-content>
|
|
|
|
</md-dialog>
|
2010-03-02 20:57:30 +01:00
|
|
|
</var:component>
|