summaryrefslogtreecommitdiffstats
path: root/ajax/createfeed.php
diff options
context:
space:
mode:
authorGregor Tätzner <gregor@freenet.de>2012-08-02 18:52:33 +0200
committerGregor Tätzner <gregor@freenet.de>2012-08-02 18:52:33 +0200
commitbdc51593245f6495bbd7e198c5dcda8072497e12 (patch)
treeb9fb41b454d647b49ff4af41294232c7152a4f8a /ajax/createfeed.php
parent1cc2f0c7f0317fc5b1a0f19a147538f51927984e (diff)
Add feed to feed list instantly on feed adding
Reload is no longer necessary. There are still some issues - especially the order of the feeds: atm the feed is just inserted at the beginning
Diffstat (limited to 'ajax/createfeed.php')
-rw-r--r--ajax/createfeed.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/ajax/createfeed.php b/ajax/createfeed.php
index 754d87495..3b20b3ce9 100644
--- a/ajax/createfeed.php
+++ b/ajax/createfeed.php
@@ -32,6 +32,10 @@ if(!$feedid) {
exit();
}
+$tmpl = new OCP\Template("news", "part.listfeed");
+$tmpl->assign('child', $feed);
+$listitem = $tmpl->fetchPage();
+
//TODO: replace the following with a real success case. see contact/ajax/createaddressbook.php for inspirations
-OCP\JSON::success(array('data' => array('message' => $l->t('Feed added!'))));
+OCP\JSON::success(array('data' => array('message' => $l->t('Feed added!'), 'listitem' => $listitem)));