mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +03:00
Sieve Filters (Interface first look)
Code refactoring Small fixes
This commit is contained in:
parent
409e9fbdc2
commit
1027f319ed
43 changed files with 466 additions and 427 deletions
67
rainloop/v/0.0.0/app/templates/Views/App/PopupsFilter.html
Normal file
67
rainloop/v/0.0.0/app/templates/Views/App/PopupsFilter.html
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<div class="popups">
|
||||
<div class="modal hide b-filter-content g-ui-user-select-none" data-bind="modal: modalVisibility">
|
||||
<div>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-bind="command: cancelCommand">×</button>
|
||||
<h3>
|
||||
<span class="i18n" data-i18n-text="POPUPS_CREATE_FOLDER/TITLE_CREATE_FOLDER"></span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row filter" data-bind="with: filter">
|
||||
<div class="span9">
|
||||
<br />
|
||||
<input type="text" class="span4" data-bind="value: name" placeholder="Description" />
|
||||
<hr />
|
||||
<div>
|
||||
<a class="btn" data-bind="click: addCondition">
|
||||
<i class="icon-plus"></i>
|
||||
|
||||
<span class="i18n" data-i18n-text="SETTINGS_FILTERS/BUTTON_ADD_CONDITION"></span>
|
||||
</a>
|
||||
<br />
|
||||
<br />
|
||||
<div data-bind="visible: 1 < conditions().length">
|
||||
<select class="span4" data-bind="value: conditionsType">
|
||||
<option value="And">
|
||||
Matching all of the following rules
|
||||
</option>
|
||||
<option value="Or">
|
||||
Matching any of the following rules
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div data-bind="visible: 0 < conditions().length, foreach: conditions">
|
||||
<div data-bind="template: {'name': template(), 'data': $data}"></div>
|
||||
</div>
|
||||
<div data-bind="visible: 0 === conditions().length">
|
||||
All messages
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div data-bind="template: {'name': actionTemplate()}"></div>
|
||||
|
||||
<label data-bind="visible: actionMarkAsReadVisiblity, click: function () { actionMarkAsRead(!actionMarkAsRead()); }">
|
||||
<i data-bind="css: actionMarkAsRead() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
|
||||
|
||||
<span>Mark as read</span>
|
||||
</label>
|
||||
|
||||
<label data-bind="click: function () { actionSkipOtherFilters(!actionSkipOtherFilters()); }">
|
||||
<i data-bind="css: actionSkipOtherFilters() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
|
||||
|
||||
<span>Skip other filters</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn buttonSave">
|
||||
<i class="icon-folder-add"></i>
|
||||
|
||||
<span class="i18n" data-i18n-text="POPUPS_CREATE_FOLDER/BUTTON_CREATE"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -6,60 +6,8 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div data-bind="foreach: filters, i18nUpdate: filters">
|
||||
<div class="filter span12 pull-left" style="background-color: #eee; padding: 15px; border-radius: 4px">
|
||||
|
||||
<input type="text" data-bind="value: name" placeholder="Description:" />
|
||||
|
||||
<br />
|
||||
|
||||
<label class="radio inline">
|
||||
<input type="radio" name="conditionsType" value="And" data-bind="checked: conditionsType" />
|
||||
Matching all of the following rules
|
||||
</label>
|
||||
<label class="radio inline">
|
||||
<input type="radio" name="conditionsType" value="Or" data-bind="checked: conditionsType" />
|
||||
Matching any of the following rules
|
||||
</label>
|
||||
<label class="radio inline">
|
||||
<input type="radio" name="conditionsType" value="All" data-bind="checked: conditionsType" />
|
||||
All messages
|
||||
</label>
|
||||
|
||||
<hr />
|
||||
|
||||
<div>
|
||||
<a class="btn" data-bind="click: addCondition">
|
||||
<i class="icon-plus"></i>
|
||||
|
||||
<span class="i18n" data-i18n-text="SETTINGS_FILTERS/BUTTON_ADD_CONDITION"></span>
|
||||
</a>
|
||||
<br />
|
||||
<br />
|
||||
<div data-bind="foreach: conditions">
|
||||
<div data-bind="template: {'name': template(), 'data': $data}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<a class="btn" data-bind="click: addAction">
|
||||
<i class="icon-plus"></i>
|
||||
|
||||
<span class="i18n" data-i18n-text="SETTINGS_FILTERS/BUTTON_ADD_ACTION"></span>
|
||||
</a>
|
||||
<br />
|
||||
<br />
|
||||
<div data-bind="foreach: actions">
|
||||
<div data-bind="template: {'name': template(), 'data': $data}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<a class="btn" data-bind="click: function (oFilter) { $parent.deleteFilter(oFilter); }">
|
||||
<i class="icon-trash"></i>
|
||||
|
||||
<span class="i18n" data-i18n-text="SETTINGS_FILTERS/BUTTON_DELETE_FILTER"></span>
|
||||
</a>
|
||||
<br />
|
||||
</div>
|
||||
<span data-bind="text: name" ></span>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
|
|
|||
|
|
@ -1,4 +1 @@
|
|||
<select data-bind="options: typeOptions, value: type, optionsText: 'name', optionsValue: 'id'"></select>
|
||||
<span class="delete-action pull-right" data-bind="visible: canBeDeleted, click: removeSelf">
|
||||
<i class="icon-trash"></i>
|
||||
</span>
|
||||
<select data-bind="options: actionTypeOptions, value: actionType, optionsText: 'name', optionsValue: 'id'"></select>
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
<select data-bind="options: typeOptions, value: type, optionsText: 'name', optionsValue: 'id'"></select>
|
||||
Folders
|
||||
<span class="delete-action pull-right" data-bind="visible: canBeDeleted, click: removeSelf">
|
||||
<i class="icon-trash"></i>
|
||||
</span>
|
||||
<select data-bind="options: actionTypeOptions, value: actionType, optionsText: 'name', optionsValue: 'id'"></select>
|
||||
|
||||
<select data-bind="options: $root.folderSelectList, value: $root.selectedFolderValue,
|
||||
optionsText: 'name', optionsValue: 'id', optionsAfterRender: $root.defautOptionsAfterRender"></select>
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
<select data-bind="options: typeOptions, value: type, optionsText: 'name', optionsValue: 'id'"></select>
|
||||
<input type="text" data-bind="value: value" />
|
||||
<span class="delete-action pull-right" data-bind="visible: canBeDeleted, click: removeSelf">
|
||||
<i class="icon-trash"></i>
|
||||
</span>
|
||||
<select data-bind="options: actionTypeOptions, value: actionType, optionsText: 'name', optionsValue: 'id'"></select>
|
||||
|
||||
<input type="text" data-bind="value: actionValue" />
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
<select data-bind="options: fieldOptions, value: field, optionsText: 'name', optionsValue: 'id'"></select>
|
||||
<select data-bind="options: typeOptions, value: type, optionsText: 'name', optionsValue: 'id'"></select>
|
||||
<input type="text" data-bind="value: value" />
|
||||
<span class="delete-action pull-right" data-bind="visible: canBeDeleted, click: removeSelf">
|
||||
<select class="span3" data-bind="options: fieldOptions, value: field, optionsText: 'name', optionsValue: 'id'"></select>
|
||||
|
||||
<select class="span2" data-bind="options: typeOptions, value: type, optionsText: 'name', optionsValue: 'id'"></select>
|
||||
|
||||
<input class="span3" type="text" data-bind="value: value" />
|
||||
|
||||
<span class="delete-action pull-right" data-bind="click: removeSelf">
|
||||
<i class="icon-trash"></i>
|
||||
</span>
|
||||
Loading…
Add table
Add a link
Reference in a new issue