diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-25 21:54:26 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-25 21:54:26 +0100 |
commit | 3a237701e0c9ea8ea2bc4f5e6e4ac840282ab5fa (patch) | |
tree | 2e4b316de79ac297f6c66c89daaae0d5fced357c | |
parent | 0430a6ca38545463d7eea070204d77bddb447437 (diff) |
return empty json responses when nothing has been done
-rw-r--r-- | controller/itemcontroller.php | 8 | ||||
-rw-r--r-- | controller/usersettingscontroller.php | 4 | ||||
-rw-r--r-- | templates/main.php | 2 | ||||
-rw-r--r-- | templates/part.feed.unread.php | 4 | ||||
-rw-r--r-- | templates/part.listfeed.php | 4 | ||||
-rw-r--r-- | templates/part.listfolder.php | 2 | ||||
-rw-r--r-- | templates/part.showall.php | 4 |
7 files changed, 20 insertions, 8 deletions
diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php index ce76f3cab..44b7f9684 100644 --- a/controller/itemcontroller.php +++ b/controller/itemcontroller.php @@ -107,6 +107,8 @@ class ItemController extends Controller { */ public function star(){ $this->setStarred(true); + + return $this->renderJSON(); } @@ -117,6 +119,8 @@ class ItemController extends Controller { */ public function unstar(){ $this->setStarred(false); + + return $this->renderJSON(); } @@ -134,6 +138,8 @@ class ItemController extends Controller { */ public function read(){ $this->setRead(true); + + return $this->renderJSON(); } @@ -144,6 +150,8 @@ class ItemController extends Controller { */ public function unread(){ $this->setRead(false); + + return $this->renderJSON(); } diff --git a/controller/usersettingscontroller.php b/controller/usersettingscontroller.php index 9900d98d8..157dee7ff 100644 --- a/controller/usersettingscontroller.php +++ b/controller/usersettingscontroller.php @@ -63,6 +63,8 @@ class UserSettingsController extends Controller { public function show(){ $userId = $this->api->getUserId(); $this->api->setUserValue($userId, 'showAll', true); + + return $this->renderJSON(); } @@ -74,6 +76,8 @@ class UserSettingsController extends Controller { public function hide(){ $userId = $this->api->getUserId(); $this->api->setUserValue($userId, 'showAll', false); + + return $this->renderJSON(); } diff --git a/templates/main.php b/templates/main.php index 28cb83041..6bb71c9ae 100644 --- a/templates/main.php +++ b/templates/main.php @@ -27,7 +27,7 @@ <?php print_unescaped($this->inc('part.feed.unread')) ?> <?php print_unescaped($this->inc('part.feed.starred')) ?> <?php print_unescaped($this->inc('part.listfolder')) ?> - <?php //print_unescaped($this->inc('part.listfeed', array('folderId' => '0'))) ?> + <?php print_unescaped($this->inc('part.listfeed', array('folderId' => '0'))) ?> <?php print_unescaped($this->inc('part.showall')); ?> </ul> diff --git a/templates/part.feed.unread.php b/templates/part.feed.unread.php index 4c40848a1..32aa867e7 100644 --- a/templates/part.feed.unread.php +++ b/templates/part.feed.unread.php @@ -5,13 +5,13 @@ ng-show="isShown(feedType.Subscriptions, 0)"> <a class="rss-icon" href="#" - ui-if="getShowAll()==false" + ui-if="!isShowAll()" ng-click="loadFeed(feedType.Subscriptions, 0)"> <?php p($l->t('Unread articles'))?> </a> <a class="rss-icon" href="#" - ui-if="getShowAll()==true" + ui-if="isShowAll()" ng-click="loadFeed(feedType.Subscriptions, 0)"> <?php p($l->t('All articles'))?> </a> diff --git a/templates/part.listfeed.php b/templates/part.listfeed.php index dbeb1dbf0..51b249eb5 100644 --- a/templates/part.listfeed.php +++ b/templates/part.listfeed.php @@ -1,6 +1,6 @@ <li ng-class="{active: isFeedActive(feedType.Feed, feed.id), unread: feed.unreadCount!=0}" - ng-repeat="feed in feeds|feedInFolder:<?php p($_['folderId']); ?>" - ng-show="feed.show" + ng-repeat="feed in getFeedsOfFolder(<?php p($_['folderId']); ?>)" + ng-show="isShown(feedType.Feed, feed.id)" data-id="{{feed.id}}" class="feed" draggable> diff --git a/templates/part.listfolder.php b/templates/part.listfolder.php index 5df8a2c30..4285ed0ae 100644 --- a/templates/part.listfolder.php +++ b/templates/part.listfolder.php @@ -1,7 +1,7 @@ <li ng-class="{ active: isFeedActive(feedType.Folder, folder.id), open: folder.open, - collapsible: folder.hasChildren, + collapsible: hasFeeds(), unread: getUnreadCount(feedType.Folder, folder.id)!=0}" ng-repeat="folder in folders" ng-show="folder.show" diff --git a/templates/part.showall.php b/templates/part.showall.php index f5cacf039..3bbd719b8 100644 --- a/templates/part.showall.php +++ b/templates/part.showall.php @@ -1,7 +1,7 @@ -<li ng-show="!getShowAll()" class="show-all"> +<li ui-if="!isShowAll()" class="show-all"> <a ng-click="setShowAll(true)" href="#"><?php p($l->t('Show all')); ?></a> </li> -<li ng-show="getShowAll()" class="show-all"> +<li ui-if="istShowAll()" class="show-all"> <a ng-click="setShowAll(false)" href="#"><?php p($l->t('Show only unread')); ?></a> </li> |