mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 23:35:57 +00:00
* remove users/filters toolbar edit button (just click on it)
* fix title of edit filter dialog always showing create filter
This commit is contained in:
@@ -736,8 +736,6 @@ class Pref_Filters extends Handler_Protected {
|
|||||||
<?= __('Create filter') ?></button>
|
<?= __('Create filter') ?></button>
|
||||||
<button dojoType="dijit.form.Button" onclick="return dijit.byId('filterTree').joinSelectedFilters()">
|
<button dojoType="dijit.form.Button" onclick="return dijit.byId('filterTree').joinSelectedFilters()">
|
||||||
<?= __('Combine') ?></button>
|
<?= __('Combine') ?></button>
|
||||||
<button dojoType="dijit.form.Button" onclick="return dijit.byId('filterTree').editSelectedFilter()">
|
|
||||||
<?= __('Edit') ?></button>
|
|
||||||
<button dojoType="dijit.form.Button" onclick="return dijit.byId('filterTree').resetFilterOrder()">
|
<button dojoType="dijit.form.Button" onclick="return dijit.byId('filterTree').resetFilterOrder()">
|
||||||
<?= __('Reset sort order') ?></button>
|
<?= __('Reset sort order') ?></button>
|
||||||
<button dojoType="dijit.form.Button" onclick="return dijit.byId('filterTree').removeSelectedFilters()">
|
<button dojoType="dijit.form.Button" onclick="return dijit.byId('filterTree').removeSelectedFilters()">
|
||||||
|
|||||||
@@ -346,10 +346,6 @@ class Pref_Users extends Handler_Protected {
|
|||||||
<?= __('Create user') ?>
|
<?= __('Create user') ?>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button dojoType='dijit.form.Button' onclick='Users.editSelected()'>
|
|
||||||
<?= __('Edit') ?>
|
|
||||||
</button dojoType="dijit.form.Button">
|
|
||||||
|
|
||||||
<button dojoType='dijit.form.Button' onclick='Users.removeSelected()'>
|
<button dojoType='dijit.form.Button' onclick='Users.removeSelected()'>
|
||||||
<?= __('Remove') ?>
|
<?= __('Remove') ?>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ const Filters = {
|
|||||||
try {
|
try {
|
||||||
const dialog = new fox.SingleUseDialog({
|
const dialog = new fox.SingleUseDialog({
|
||||||
id: "filterEditDlg",
|
id: "filterEditDlg",
|
||||||
title: __("Create Filter"),
|
title: id ? __("Edit Filter") : __("Create Filter"),
|
||||||
test: function () {
|
test: function () {
|
||||||
Filters.test(this.attr('value'));
|
Filters.test(this.attr('value'));
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -119,23 +119,6 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editSelectedFilter: function() {
|
|
||||||
const rows = this.getSelectedFilters();
|
|
||||||
|
|
||||||
if (rows.length == 0) {
|
|
||||||
alert(__("No filters selected."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rows.length > 1) {
|
|
||||||
alert(__("Please select only one filter."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Notify.close();
|
|
||||||
|
|
||||||
this.editFilter(rows[0]);
|
|
||||||
},
|
|
||||||
removeSelectedFilters: function() {
|
removeSelectedFilters: function() {
|
||||||
const sel_rows = this.getSelectedFilters();
|
const sel_rows = this.getSelectedFilters();
|
||||||
|
|
||||||
|
|||||||
@@ -93,21 +93,6 @@ const Users = {
|
|||||||
alert(__("No users selected."));
|
alert(__("No users selected."));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editSelected: function() {
|
|
||||||
const rows = this.getSelection();
|
|
||||||
|
|
||||||
if (rows.length == 0) {
|
|
||||||
alert(__("No users selected."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rows.length > 1) {
|
|
||||||
alert(__("Please select one user."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.edit(rows[0]);
|
|
||||||
},
|
|
||||||
getSelection :function() {
|
getSelection :function() {
|
||||||
return Tables.getSelected("users-list");
|
return Tables.getSelected("users-list");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user