summaryrefslogtreecommitdiff
path: root/classes/pref/feeds.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-13 21:41:38 +0300
committerAndrew Dolgov <[email protected]>2021-02-13 21:41:38 +0300
commit8464c619e413b4aabacb802e1afe49a7c960506a (patch)
treede14161b0a81fffefd25f57f9c239fb779362e79 /classes/pref/feeds.php
parent17413078a72e1298c6dc8953c40e8d83ce38c49c (diff)
inactive feeds: use client dialog
Diffstat (limited to 'classes/pref/feeds.php')
-rwxr-xr-xclasses/pref/feeds.php52
1 files changed, 5 insertions, 47 deletions
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index d8495a59c..03e8b1b81 100755
--- a/classes/pref/feeds.php
+++ b/classes/pref/feeds.php
@@ -1485,56 +1485,14 @@ class Pref_Feeds extends Handler_Protected {
ORDER BY last_article");
$sth->execute([$_SESSION['uid']]);
- print "<div dojoType='fox.Toolbar'>";
- print "<div dojoType='fox.form.DropDownButton'>".
- "<span>" . __('Select')."</span>";
- print "<div dojoType='dijit.Menu' style='display: none'>";
- print "<div onclick=\"Tables.select('inactive-feeds-list', true)\"
- dojoType='dijit.MenuItem'>".__('All')."</div>";
- print "<div onclick=\"Tables.select('inactive-feeds-list', false)\"
- dojoType='dijit.MenuItem'>".__('None')."</div>";
- print "</div></div>";
- print "</div>"; #toolbar
-
- print "<div class='panel panel-scrollable'>";
- print "<table width='100%' id='inactive-feeds-list'>";
-
- $lnum = 1;
-
- while ($line = $sth->fetch()) {
-
- $feed_id = $line["id"];
-
- print "<tr data-row-id='$feed_id'>";
-
- print "<td width='5%' align='center'><input
- onclick='Tables.onRowChecked(this);' dojoType='dijit.form.CheckBox'
- type='checkbox'></td>";
- print "<td>";
-
- print "<a href='#' ".
- "title=\"".__("Click to edit feed")."\" ".
- "onclick=\"CommonDialogs.editFeed(".$line["id"].")\">".
- htmlspecialchars($line["title"])."</a>";
-
- print "</td><td class='text-muted' align='right'>";
- print TimeHelper::make_local_datetime($line['last_article'], false);
- print "</td>";
- print "</tr>";
+ $rv = [];
- ++$lnum;
+ while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
+ $row['last_article'] = TimeHelper::make_local_datetime($row['last_article'], false);
+ array_push($rv, $row);
}
- print "</table>";
- print "</div>";
-
- print "<footer>
- <button style='float : left' class='alt-danger' dojoType='dijit.form.Button' onclick='App.dialogOf(this).removeSelected()'>"
- .__('Unsubscribe from selected feeds')."</button>
- <button dojoType='dijit.form.Button' class='alt-primary' type='submit'>"
- .__('Close this window')."</button>
- </footer>";
-
+ print json_encode($rv);
}
function feedsWithErrors() {