summaryrefslogtreecommitdiffstats
path: root/ajax
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
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')
-rw-r--r--ajax/createfeed.php6
-rw-r--r--ajax/feeddialog.php2
-rw-r--r--ajax/folderdialog.php2
3 files changed, 7 insertions, 3 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)));
diff --git a/ajax/feeddialog.php b/ajax/feeddialog.php
index b1e41a6ff..9130eddfe 100644
--- a/ajax/feeddialog.php
+++ b/ajax/feeddialog.php
@@ -2,6 +2,6 @@
include("populateroot.php");
-$output = new OCP\Template("news", "part.addfeed");
+$output = new OCP\Template("news", "part.feeddialog");
$output->assign('allfeeds', $allfeeds);
$output->printpage(); \ No newline at end of file
diff --git a/ajax/folderdialog.php b/ajax/folderdialog.php
index bb1c37cf3..95d96d09d 100644
--- a/ajax/folderdialog.php
+++ b/ajax/folderdialog.php
@@ -2,6 +2,6 @@
include("populateroot.php");
-$output = new OCP\Template("news", "part.addfolder");
+$output = new OCP\Template("news", "part.folderdialog");
$output->assign('allfeeds', $allfeeds);
$output->printpage(); \ No newline at end of file