From 87b16a0a6156e90f549f13f59e657ff03a33a7e4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 3 Feb 2009 15:28:37 +0300 Subject: add dialog to download articles for offline reading; start implementation --- modules/backend-rpc.php | 28 ++++++++++++++++++++++++++++ modules/popup-dialog.php | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) (limited to 'modules') diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 04e2858ca..55ab73a20 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -514,6 +514,34 @@ return; } + if ($subop == "download") { + $stage = (int) $_REQUEST["stage"]; + + print ""; + + if ($stage == 0) { + print ""; + + $reply = array(); + + $result = db_query($link, "SELECT id, title FROM + ttrss_feeds WHERE owner_uid = ".$_SESSION["uid"]); + + while ($line = db_fetch_assoc($result)) { + print ""; + } + + print ""; + + } + + print ""; + + return; + } + print "Unknown method: $subop"; } ?> diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php index 465d3bcd9..d89547fe9 100644 --- a/modules/popup-dialog.php +++ b/modules/popup-dialog.php @@ -461,6 +461,45 @@ return; } + if ($id == "offlineDownload") { + print "
".__('Download articles')."
"; + print "
"; + + print "
"; + + print "
".__("Download")."
"; + + print "
"; + + $amount = array( + 50 => 50, + 100 => 100, + 0 => "All unread"); + + print_select_hash("amount", 50, $amount); + + print " " . __("newest articles for offline reading."); + + print "
"; + + print "
"; + + print "
+
+
+
+ +
"; + + print "
"; + + return; + } + + print "
Internal Error

Unknown dialog $id

-- cgit v1.2.3-54-g00ecf