зеркало из https://github.com/nextcloud/news.git
small pixel fixes
This commit is contained in:
Родитель
635a9d7795
Коммит
711c260bfe
|
@ -16,11 +16,14 @@
|
|||
}
|
||||
|
||||
.add-new select {
|
||||
width: 134px;
|
||||
width: 133px;
|
||||
margin-top: 1px !important;
|
||||
height: 30px;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.add-new input {
|
||||
margin-top: 15px;
|
||||
height: 16px !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ angular.module('News').factory '_FeedController', ->
|
|||
|
||||
|
||||
@$scope.isShown = (type, id) =>
|
||||
return @isShown(type, id)
|
||||
return true
|
||||
|
||||
@$scope.getUnreadCount = =>
|
||||
return @_transFormCount(@_feedBl.getUnreadCount())
|
||||
|
@ -53,7 +53,7 @@ angular.module('News').factory '_FeedController', ->
|
|||
return @_transFormCount(@_feedBl.getFeedUnreadCount(feedId))
|
||||
|
||||
@$scope.getUnreadCount = (folderId) =>
|
||||
return @_transFormCount(@_folderBl.getFolderUnreadCount(folderId))
|
||||
return @_transFormCount(@_feedBl.getFolderUnreadCount(folderId))
|
||||
|
||||
@$scope.isShowAll = =>
|
||||
return @isShowAll()
|
||||
|
@ -133,20 +133,20 @@ angular.module('News').factory '_FeedController', ->
|
|||
return type == @_active.getType() and id == @_active.getId()
|
||||
|
||||
|
||||
isShown: (type, id) ->
|
||||
hasUnread = @getUnreadCount(type, id) > 0
|
||||
if hasUnread
|
||||
return true
|
||||
else
|
||||
if @isShowAll()
|
||||
switch type
|
||||
when @_feedType.Subscriptions
|
||||
return @_feedModel.size() > 0
|
||||
when @_feedType.Folder
|
||||
return @_folderModel.size() > 0
|
||||
when @_feedType.Feed
|
||||
return @_feedModel.size() > 0
|
||||
return false
|
||||
#isShown: (type, id) ->
|
||||
# hasUnread = @getUnreadCount(type, id) > 0
|
||||
# if hasUnread
|
||||
# return true
|
||||
# else
|
||||
# if @isShowAll()
|
||||
# switch type
|
||||
# when @_feedType.Subscriptions
|
||||
# return @_feedModel.size() > 0
|
||||
# when @_feedType.Folder
|
||||
# return @_folderModel.size() > 0
|
||||
# when @_feedType.Feed
|
||||
# return @_feedModel.size() > 0
|
||||
# return false
|
||||
|
||||
|
||||
isShowAll: ->
|
||||
|
|
|
@ -27,5 +27,9 @@ angular.module('News').factory '_SettingsController', ->
|
|||
|
||||
constructor: (@$scope) ->
|
||||
|
||||
@$scope.import = (fileContent) =>
|
||||
console.log 'hi'
|
||||
console.log fileContent
|
||||
|
||||
|
||||
return SettingsController
|
|
@ -28,7 +28,7 @@ angular.module('News').factory '_FeedBl', ->
|
|||
constructor: (@_feedModel, @_itemBl, @_persistence) ->
|
||||
|
||||
|
||||
getUnreadCount: (feedId) ->
|
||||
getFeedUnreadCount: (feedId) ->
|
||||
@_feedModel.getFeedUnreadCount(feedId)
|
||||
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|||
this.$scope.folderBl = this._folderBl;
|
||||
this.$scope.feedBl = this._feedBl;
|
||||
this.$scope.isShown = function(type, id) {
|
||||
return _this.isShown(type, id);
|
||||
return true;
|
||||
};
|
||||
this.$scope.getUnreadCount = function() {
|
||||
return _this._transFormCount(_this._feedBl.getUnreadCount());
|
||||
|
@ -246,7 +246,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|||
return _this._transFormCount(_this._feedBl.getFeedUnreadCount(feedId));
|
||||
};
|
||||
this.$scope.getUnreadCount = function(folderId) {
|
||||
return _this._transFormCount(_this._folderBl.getFolderUnreadCount(folderId));
|
||||
return _this._transFormCount(_this._feedBl.getFolderUnreadCount(folderId));
|
||||
};
|
||||
this.$scope.isShowAll = function() {
|
||||
return _this.isShowAll();
|
||||
|
@ -331,26 +331,6 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|||
return type === this._active.getType() && id === this._active.getId();
|
||||
};
|
||||
|
||||
FeedController.prototype.isShown = function(type, id) {
|
||||
var hasUnread;
|
||||
hasUnread = this.getUnreadCount(type, id) > 0;
|
||||
if (hasUnread) {
|
||||
return true;
|
||||
} else {
|
||||
if (this.isShowAll()) {
|
||||
switch (type) {
|
||||
case this._feedType.Subscriptions:
|
||||
return this._feedModel.size() > 0;
|
||||
case this._feedType.Folder:
|
||||
return this._folderModel.size() > 0;
|
||||
case this._feedType.Feed:
|
||||
return this._feedModel.size() > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
FeedController.prototype.isShowAll = function() {
|
||||
return this._showAll.getShowAll();
|
||||
};
|
||||
|
@ -484,7 +464,12 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|||
SettingsController = (function() {
|
||||
|
||||
function SettingsController($scope) {
|
||||
var _this = this;
|
||||
this.$scope = $scope;
|
||||
this.$scope["import"] = function(fileContent) {
|
||||
console.log('hi');
|
||||
return console.log(fileContent);
|
||||
};
|
||||
}
|
||||
|
||||
return SettingsController;
|
||||
|
@ -590,7 +575,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|||
this._persistence = _persistence;
|
||||
}
|
||||
|
||||
FeedBl.prototype.getUnreadCount = function(feedId) {
|
||||
FeedBl.prototype.getFeedUnreadCount = function(feedId) {
|
||||
return this._feedModel.getFeedUnreadCount(feedId);
|
||||
};
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<?php p($l->t('Add Website'))?>
|
||||
</a>
|
||||
|
||||
<div class="add-new-popup" >
|
||||
<div class="add-new-popup">
|
||||
<fieldset class="personalblock">
|
||||
<p class="error">
|
||||
<span ng-show="feedEmptyError"><?php p($l->t('Address must not be empty!')); ?></span>
|
||||
|
|
|
@ -5,4 +5,9 @@
|
|||
ng-click="loadFeed(feedType.Starred, 0)">
|
||||
<?php p($l->t('Starred')) ?>
|
||||
</a>
|
||||
<span class="utils">
|
||||
<span class="unread-counter">
|
||||
{{ getStarredCount() }}
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
|
@ -17,10 +17,10 @@
|
|||
</a>
|
||||
<span class="utils">
|
||||
<span class="unread-counter">
|
||||
{{ getUnreadCount(feedType.Subscriptions, 0) }}
|
||||
{{ getUnreadCount() }}
|
||||
</span>
|
||||
<button class="svg action mark-read-icon"
|
||||
ng-click="markAllRead(feedType.Subscriptions, 0)"
|
||||
ng-click="feedBl.markAllRead()"
|
||||
title="<?php p($l->t('Mark all read')) ?>"></button>
|
||||
</span>
|
||||
</li>
|
|
@ -2,7 +2,7 @@
|
|||
active: isFeedActive(feedType.Feed, feed.id),
|
||||
unread: feed.unreadCount!=0
|
||||
}"
|
||||
ng-repeat="feed in getFeedsOfFolder(<?php p($_['folderId']); ?>)"
|
||||
ng-repeat="feed in feedBl.getFeedsOfFolder(<?php p($_['folderId']); ?>)"
|
||||
ng-show="isShown(feedType.Feed, feed.id)"
|
||||
data-id="{{feed.id}}"
|
||||
class="feed"
|
||||
|
@ -15,17 +15,17 @@
|
|||
</a>
|
||||
|
||||
<span class="utils">
|
||||
<button ng-click="delete(feedType.Feed, feed.id)"
|
||||
<button ng-click="feedBl.delete(feed.id)"
|
||||
class="svg action delete-icon"
|
||||
title="<?php p($l->t('Delete feed')); ?>"></button>
|
||||
|
||||
<span class="unread-counter">
|
||||
{{ getUnreadCount(feedType.Feed, feed.id) }}
|
||||
{{ getFeedUnreadCount(feed.id) }}
|
||||
</span>
|
||||
|
||||
<button class="svg action mark-read-icon"
|
||||
ng-show="getUnreadCount(feedType.Feed, feed.id)>0"
|
||||
ng-click="markAllRead(feedType.Feed, feed.id)"
|
||||
ng-show="feed.unreadCount > 0"
|
||||
ng-click="feedBl.markFeedRead(feed.id)"
|
||||
title="<?php p($l->t('Mark all read')); ?>"></button>
|
||||
|
||||
</span>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<li ng-class="{
|
||||
active: isFeedActive(feedType.Folder, folder.id),
|
||||
open: folder.open,
|
||||
collapsible: hasFeeds(folder.id),
|
||||
unread: getUnreadCount(feedType.Folder, folder.id)!=0}"
|
||||
collapsible: folderBl.hasFeeds(folder.id),
|
||||
unread: getFolderUnreadCount(folder.id) != 0}"
|
||||
ng-repeat="folder in folders"
|
||||
ng-show="isShown(feedType.Folder, folder.id)"
|
||||
class="folder"
|
||||
|
@ -10,7 +10,7 @@
|
|||
droppable>
|
||||
<button class="collapse"
|
||||
title="<?php p($l->t('Collapse'));?>"
|
||||
ng-click="toggleFolder(folder.id)"></button>
|
||||
ng-click="folderBl.toggleFolder(folder.id)"></button>
|
||||
<a href="#"
|
||||
class="title folder-icon"
|
||||
ng-click="loadFeed(feedType.Folder, folder.id)">
|
||||
|
@ -19,7 +19,7 @@
|
|||
|
||||
<span class="utils">
|
||||
|
||||
<button ng-click="delete(feedType.Folder, folder.id)"
|
||||
<button ng-click="folderBl.delete(folder.id)"
|
||||
class="svg action delete-icon"
|
||||
title="<?php p($l->t('Delete folder')); ?>"></button>
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<fieldset class="personalblock">
|
||||
<legend><strong><?php p($l->t('Import / Export OPML')); ?></strong></legend>
|
||||
<input type="file" id="opml-upload" name="files[]" read-file/>
|
||||
<input type="file" id="opml-upload" name="import"
|
||||
oc-read-file="import($fileContent)"/>
|
||||
<button title="<?php p($l->t('Import')); ?>"
|
||||
oc-forward-click="{selector:'#opml-upload'}">
|
||||
<?php p($l->t('Import')); ?>
|
||||
|
|
Загрузка…
Ссылка в новой задаче