mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Sieve Scripts use radio buttons to prevent confusion
This commit is contained in:
parent
723ebc4055
commit
ddb95b925d
2 changed files with 6 additions and 10 deletions
|
|
@ -43,7 +43,7 @@ export class UserSettingsFilters /*extends AbstractViewSettings*/ {
|
||||||
|
|
||||||
onBuild(oDom) {
|
onBuild(oDom) {
|
||||||
oDom.addEventListener('click', event => {
|
oDom.addEventListener('click', event => {
|
||||||
const el = event.target.closestWithin('.script-item .e-action', oDom),
|
const el = event.target.closestWithin('.script-item .script-name', oDom),
|
||||||
script = el && ko.dataFor(el);
|
script = el && ko.dataFor(el);
|
||||||
script && this.editScript(script);
|
script && this.editScript(script);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,8 @@
|
||||||
<!-- ko if: allowFilters() -->
|
<!-- ko if: allowFilters() -->
|
||||||
<tr><th colspan="4" data-i18n="SETTINGS_FILTERS/SIMPLE"></th></tr>
|
<tr><th colspan="4" data-i18n="SETTINGS_FILTERS/SIMPLE"></th></tr>
|
||||||
<tr class="script-item">
|
<tr class="script-item">
|
||||||
<td>
|
<td class="e-action fontastic" data-bind="click: function (oScript) { $root.toggleScript(oScript); }, text: active() ? '⦿' : '○'"></td>
|
||||||
<span class="fontastic" data-bind="click: function (oScript) { $root.toggleScript(oScript); }, text: active() ? '☑' : '☐'"></span>
|
<td class="e-action script-name" data-bind="text: name()"></td>
|
||||||
</td>
|
|
||||||
<td class="e-action" class="script-name" data-bind="text: name()"></td>
|
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -28,16 +26,14 @@
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
<!-- ko if: !allowFilters() -->
|
<!-- ko if: !allowFilters() -->
|
||||||
<tr class="script-item">
|
<tr class="script-item">
|
||||||
<td>
|
<td class="e-action fontastic" data-bind="click: function (oScript) { $root.toggleScript(oScript); }, text: active() ? '⦿' : '○'"></td>
|
||||||
<span class="fontastic" data-bind="click: function (oScript) { $root.toggleScript(oScript); }, text: active() ? '☑' : '☐'"></span>
|
<td class="e-action script-name" data-bind="text: name()"></td>
|
||||||
</td>
|
|
||||||
<td class="e-action" class="script-name" data-bind="text: name()"></td>
|
|
||||||
<td>
|
<td>
|
||||||
<a class="btn btn-small btn-danger button-confirm-delete" data-bind="css: {'delete-access': askDelete()}, click: function(oScript) { $root.deleteScript(oScript); }"
|
<a class="btn btn-small btn-danger button-confirm-delete" data-bind="css: {'delete-access': askDelete()}, click: function(oScript) { $root.deleteScript(oScript); }"
|
||||||
data-i18n="GLOBAL/ARE_YOU_SURE"></a>
|
data-i18n="GLOBAL/ARE_YOU_SURE"></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="delete-script fontastic" data-bind="visible: !askDelete() && canBeDeleted(), click: function (oScript) { $root.scriptForDeletion(oScript); }">🗑</span>
|
<span class="e-action fontastic" data-bind="visible: !askDelete() && canBeDeleted(), click: function (oScript) { $root.scriptForDeletion(oScript); }">🗑</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue