summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-02 10:37:51 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-02 10:38:00 +0200
commit711c260bfea993e0a1124951a55eee6c989ee888 (patch)
tree8982f13a41e9054bb7c2377b66769fe83ae9371a /js
parent635a9d779549832b4dacb2c5b9f4033d846bf154 (diff)
small pixel fixes
Diffstat (limited to 'js')
-rw-r--r--js/app/controllers/feedcontroller.coffee32
-rw-r--r--js/app/controllers/settingscontroller.coffee4
-rw-r--r--js/app/services/bl/feedbl.coffee2
-rw-r--r--js/public/app.js31
4 files changed, 29 insertions, 40 deletions
diff --git a/js/app/controllers/feedcontroller.coffee b/js/app/controllers/feedcontroller.coffee
index 580bd4763..1b6a79c53 100644
--- a/js/app/controllers/feedcontroller.coffee
+++ b/js/app/controllers/feedcontroller.coffee
@@ -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: ->
diff --git a/js/app/controllers/settingscontroller.coffee b/js/app/controllers/settingscontroller.coffee
index 0383b13fe..ec94b843c 100644
--- a/js/app/controllers/settingscontroller.coffee
+++ b/js/app/controllers/settingscontroller.coffee
@@ -27,5 +27,9 @@ angular.module('News').factory '_SettingsController', ->
constructor: (@$scope) ->
+ @$scope.import = (fileContent) =>
+ console.log 'hi'
+ console.log fileContent
+
return SettingsController \ No newline at end of file
diff --git a/js/app/services/bl/feedbl.coffee b/js/app/services/bl/feedbl.coffee
index 1c2e4af09..ffbc6e51c 100644
--- a/js/app/services/bl/feedbl.coffee
+++ b/js/app/services/bl/feedbl.coffee
@@ -28,7 +28,7 @@ angular.module('News').factory '_FeedBl', ->
constructor: (@_feedModel, @_itemBl, @_persistence) ->
- getUnreadCount: (feedId) ->
+ getFeedUnreadCount: (feedId) ->
@_feedModel.getFeedUnreadCount(feedId)
diff --git a/js/public/app.js b/js/public/app.js
index 463bf8c4c..bcca24fb1 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -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);
};