summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--css/news.css101
-rw-r--r--js/news.js10
-rw-r--r--templates/main.php2
-rw-r--r--templates/part.items.header.php51
4 files changed, 3 insertions, 161 deletions
diff --git a/css/news.css b/css/news.css
index 44be1c144..0bdbc2f03 100644
--- a/css/news.css
+++ b/css/news.css
@@ -69,88 +69,6 @@ div.add_parentfolder {
padding-left: 1.8em;
}
-
-/**
- * View above the feeds which shows the feed title
- * and the controls
- */
-div.feed_controls {
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- background: none repeat scroll 0 0 #f7f7f7;
- border-bottom: 1px solid #ccc;
- box-shadow: 0 4px 4px -3px #ccc;
- overflow: hidden;
- position: fixed;
- left: 34.1em;
- right: 0;
- top: 3.5em;
- z-index: 1;
- height: 3.3em;
-}
-
- div.feed_controls .unreaditemcounter {
- background: #5E5E5E;
- border-radius: 5px;
- padding: 2px 5px;
- color: white;
- text-align: center;
- font-weight: normal;
- margin: .7em 0 0 .6em;
- display: block;
- float: left;
- min-width: 1.2em;
- display: none;
- }
-
- div.feed_controls .unreaditemcounter.all_read {
- display: none;
- }
-
-
- div.feed_controls div.subscriptions_title {
- display: inline-block;
- padding-left: .8em;
- padding-bottom: .6em;
- width: 22.4em;
- border-right: 1px solid #ddd;
- }
-
- div.feed_controls div.feed_title {
- padding-left: 10px;
- display: inline-block;
- }
-
- div.feed_controls div.feed_title h1 {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 1.2em;
- line-height: 2.6em;
- font-weight: bold;
- color: #333;
- }
-
- @media all and (min-width: 1280px){
- div.feed_controls div.feed_title h1 { max-width: 450px; }
- }
-
- @media all and (max-width: 1279px) and (min-width: 1024px){
- div.feed_controls div.feed_title h1 { max-width: 230px; }
- }
-
- @media all and (max-width: 1023px) and (min-width: 950px){
- div.feed_controls div.feed_title h1 { max-width: 130px; }
- }
-
- @media all and (max-width: 949px){
- div.feed_controls div.feed_title h1 { display: none; }
- }
-
- div.feed_controls .controls {
- float: right;
- }
-
/* feed/folder list */
#leftcontent {
@@ -163,20 +81,6 @@ div.feed_controls {
bottom: 0;
}
- /*
- #leftcontent h1 {
- background-color: #DBDBDB;
- border-bottom: 1px solid #CCCCCC;
- border-top: 1px solid #D4D4D4;
- color: #333333;
- font-weight: bold;
- display: block;
- font-size: 1.2em;
- max-width: 100%;
- padding: 0 0.8em;
- text-shadow: 0 1px 0 #F8F8F8;
- line-height: 2.6em;
- }*/
#feeds {
background-color: #f8f8f8;
@@ -509,7 +413,6 @@ div.feed_controls {
top: 3.5em !important;
box-sizing: border-box;
-moz-box-sizing: border-box;
- margin-top: 3.5em;
left: 34.1em;
}
@@ -552,7 +455,8 @@ div.feed_controls {
.utils {
height: 2em;
margin: 0;
- padding: 0.6em 0.5em 0.5em 0.5em;
+ padding: 1.1em 0.5em 0.5em 0.5em;
+ float: left;
background-color: #f8f8f8;
background-image: linear-gradient(top, rgb(248,248,248) 0%, rgb(255,255,255) 100%);
background-image: -o-linear-gradient(top, rgb(248,248,248) 0%, rgb(255,255,255) 100%);
@@ -600,6 +504,7 @@ div.feed_controls {
font-size: 1.5em;
margin: 0 13em 0 1.75em;
font-weight: bold;
+ padding-top: .8em;
}
.feed_item h1.item_title a {
diff --git a/js/news.js b/js/news.js
index b3229e947..c5236b39e 100644
--- a/js/news.js
+++ b/js/news.js
@@ -388,7 +388,6 @@ News={
var _activeFeedId = News.Feed.activeFeedId;
var _$feed = $('li.feed[data-id="'+feedId+'"]');
var _$feedUnreadCounter = _$feed.find('.unreaditemcounter');
- var _$feedUnreadCounterUtil = $('.feed_controls .unreaditemcounter');
var _$feedLink = _$feed.children('a');
/**
@@ -457,24 +456,15 @@ News={
if(count === 0){
_$feedLink.addClass('all_read');
_$feedUnreadCounter.addClass('all_read');
- if(_activeFeedId == _feedId){
- _$feedUnreadCounterUtil.addClass('all_read');
- }
} else {
var currentCount = _getUnreadCount();
// if the previous count was 0 we need to remove certain classes
if(currentCount === 0){
_$feedLink.removeClass('all_read');
_$feedUnreadCounter.removeClass('all_read');
- if(_activeFeedId == _feedId){
- _$feedUnreadCounterUtil.removeClass('all_read');
- }
}
}
_$feedUnreadCounter.html(count);
- if(_activeFeedId == _feedId){
- _$feedUnreadCounterUtil.html(count);
- }
};
// public
diff --git a/templates/main.php b/templates/main.php
index 3ec909b7d..2855ec8b4 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -5,8 +5,6 @@
<?php
if ($_['feedid']){
-echo $this->inc("part.items.header");
-
?>
<div id="leftcontent" class="leftcontent">
diff --git a/templates/part.items.header.php b/templates/part.items.header.php
deleted file mode 100644
index 0a49b9e91..000000000
--- a/templates/part.items.header.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-if(isset($_['feedid'])){
- $feedId = $_['feedid'];
- $itemMapper = new OCA\News\ItemMapper();
- switch ($feedId) {
- case -1:
- $feedTitle = $l->t('Starred');
- $unreadItemCount = $itemMapper->countAllStatus($feedId, OCA\News\StatusFlag::IMPORTANT);
- break;
-
- case -2:
- $feedTitle = $l->t('New articles');
- $unreadItemCount = $itemMapper->countEveryItemByStatus(OCA\News\StatusFlag::UNREAD);
- break;
-
- default:
- $feedMapper = new OCA\News\FeedMapper();
- $feed = $feedMapper->findById($feedId);
- $feedTitle = $feed->getTitle();
- $unreadItemCount = $itemMapper->countAllStatus($feedId, OCA\News\StatusFlag::UNREAD);
- break;
- }
-
- if($unreadItemCount > 0){
- $readClass = '';
- } else {
- $readClass = 'all_read';
- }
-} else {
- $feedTitle = '';
- $unreadItemCount = 0;
-}
-
-$showAll = OCP\Config::getUserValue(OCP\USER::getUser(), 'news', 'showAll');
-
-?>
-
-<div class="feed_controls">
- <span title="<?php echo $l->t('Unread items'); ?>" class="unreaditemcounter <?php echo $readClass; ?>"><?php echo $unreadItemCount; ?></span>
- <div class="feed_title">
- <h1 title="<?php echo $feedTitle; ?>"><?php echo $feedTitle; ?></h1>
- </div>
- <div class="controls">
- <input type="button" value="<?php echo $l->t('Mark all read'); ?>" id="mark_all_as_read" />
- <select id="feed_filter">
- <option value="unread" <?php if(!$showAll){ echo 'selected="selected"'; }; ?>><?php echo $l->t('Show only unread articles'); ?></option>
- <option value="all" <?php if($showAll){ echo 'selected="selected"'; }; ?>><?php echo $l->t('Show read/unread articles'); ?></option>
- </select>
- </div>
-</div> \ No newline at end of file