1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 08:25:55 +00:00

more dialog-related cleanup

This commit is contained in:
Andrew Dolgov
2021-02-12 15:50:06 +03:00
parent 3d11c61f32
commit 3268364693
5 changed files with 47 additions and 82 deletions

View File

@@ -26,7 +26,7 @@ class Pref_Feeds extends Handler_Protected {
function batch_edit_cbox($elem, $label = false) {
print "<input type=\"checkbox\" title=\"".__("Check to enable field")."\"
onchange=\"dijit.byId('feedEditDlg').toggleField(this, '$elem', '$label')\">";
onchange=\"App.dialogOf(this).toggleField(this, '$elem', '$label')\">";
}
function renamecat() {
@@ -807,7 +807,8 @@ class Pref_Feeds extends Handler_Protected {
$title = htmlspecialchars($title, ENT_QUOTES);
print "<footer>
<button style='float : left' class='alt-danger' dojoType='dijit.form.Button' onclick='return CommonDialogs.unsubscribeFeed($feed_id, \"$title\")'>".
<button style='float : left' class='alt-danger' dojoType='dijit.form.Button'
onclick='App.dialogOf(this).unsubscribeFeed($feed_id, \"$title\")'>".
__('Unsubscribe')."</button>
<button dojoType='dijit.form.Button' class='alt-primary' type='submit'>".__('Save')."</button>
<button dojoType='dijit.form.Button' onclick='App.dialogOf(this).hide()'>".__('Cancel')."</button>

View File

@@ -2,8 +2,7 @@
class Pref_Filters extends Handler_Protected {
function csrf_ignore($method) {
$csrf_ignored = array("index", "getfiltertree", "newrule",
"newaction", "savefilterorder");
$csrf_ignored = array("index", "getfiltertree", "savefilterorder");
return array_search($method, $csrf_ignored) !== false;
}
@@ -857,10 +856,10 @@ class Pref_Filters extends Handler_Protected {
print "<button dojoType='dijit.form.Button' style='float : left' class='alt-info' onclick='window.open(\"https://tt-rss.org/wiki/ContentFilters\")'>
<i class='material-icons'>help</i> ".__("More info...")."</button>";
print "<button dojoType='dijit.form.Button' class='alt-primary' type='submit' onclick=\"return dijit.byId('filterNewRuleDlg').execute()\">".
print "<button dojoType='dijit.form.Button' class='alt-primary' type='submit' onclick='App.dialogOf(this).execute()'>".
($rule ? __("Save rule") : __('Add rule'))."</button> ";
print "<button dojoType='dijit.form.Button' onclick=\"return dijit.byId('filterNewRuleDlg').hide()\">".
print "<button dojoType='dijit.form.Button' onclick='App.dialogOf(this).hide()'>".
__('Cancel')."</button>";
print "</footer>";
@@ -950,10 +949,10 @@ class Pref_Filters extends Handler_Protected {
print "<footer>";
print "<button dojoType='dijit.form.Button' class='alt-primary' type='submit' onclick=\"return dijit.byId('filterNewActionDlg').execute()\">".
print "<button dojoType='dijit.form.Button' class='alt-primary' type='submit' onclick='App.dialogOf(this).execute()'>".
($action ? __("Save action") : __('Add action'))."</button> ";
print "<button dojoType='dijit.form.Button' onclick=\"return dijit.byId('filterNewActionDlg').hide()\">".
print "<button dojoType='dijit.form.Button' onclick='App.dialogOf(this).hide()'>".
__('Cancel')."</button>";
print "</footer>";