summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-07-10 10:57:35 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-07-10 10:57:35 -0400
commitaf0bf0486c25b7af0b237a33e2c1088924b84d0c (patch)
treeb41cd75fae87d518345aabf25f32e18ebfb1dcde /templates
parentd6532b0418fda7f97e72b6bfdbac2b401055c925 (diff)
update views when you remove a feed or mark item as read
Diffstat (limited to 'templates')
-rw-r--r--templates/part.feeds.php2
-rw-r--r--templates/part.items.php8
2 files changed, 6 insertions, 4 deletions
diff --git a/templates/part.feeds.php b/templates/part.feeds.php
index 60dc4efbc..f899695e9 100644
--- a/templates/part.feeds.php
+++ b/templates/part.feeds.php
@@ -15,7 +15,7 @@
}
elseif ($child instanceOf OC_News_Feed) { //onhover $(element).attr('id', 'newID');
- echo '<li class="feeds_list"><a href="' . OCP\Util::linkTo('news', 'index.php'). '?feedid=' . $child->getId() . '">' . $child->getTitle() .'</a>';
+ echo '<li class="feeds_list" data-id="' . $child->getId() . '"><a href="' . OCP\Util::linkTo('news', 'index.php'). '?feedid=' . $child->getId() . '">' . $child->getTitle() .'</a>';
echo '<button class="svg action" id="feeds_delete" onClick="(News.Feed.delete(' . $child->getId(). '))" title="' . $l->t('Delete feed') . '"></button>';
echo '<button class="svg action" id="feeds_edit" title="' . $l->t('Edit feed') . '"></button>';
echo '</li>';
diff --git a/templates/part.items.php b/templates/part.items.php
index 33bffc8ee..24ca958e9 100644
--- a/templates/part.items.php
+++ b/templates/part.items.php
@@ -10,12 +10,14 @@ echo '<ul class="accordion">';
foreach($items as $item) {
$title = $item->getTitle();
echo '<li>';
+ echo '<div data-id="' . $item->getId() . '"';
if ($item->isRead()) {
- echo '<div class="title_read">' . $title . '</div>';
+ echo ' class="title_read">';
}
else {
- echo '<div class="title_unread" onClick="News.Feed.markItem(' . $item->getId() . ')">' . $title . '</div>';
+ echo ' class="title_unread" onClick="News.Feed.markItem(' . $item->getId() . ')">';
}
- echo '<div class="body">' . $item->getBody() . '</div></li>';
+ echo $title . '</div><div class="body">' . $item->getBody() . '</div>';
+ echo '</li>';
}
echo '</ul>';