diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-03-08 21:53:54 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-03-08 21:54:06 +0100 |
commit | 69ba0a6f92795483c8e7f75c4c71d146a4d7d2a0 (patch) | |
tree | 93a49950bfd9ebdd3b6f4c9ddedf66d2525759e7 /js | |
parent | 9d323d22e1e4fb7305766fcd308c56b279146833 (diff) |
dont collapse old item when opening a new one, fix #453
Diffstat (limited to 'js')
-rw-r--r-- | js/app/controllers/itemcontroller.coffee | 9 | ||||
-rw-r--r-- | js/public/app.js | 10 | ||||
-rw-r--r-- | js/tests/controllers/itemcontrollerSpec.coffee | 10 |
3 files changed, 0 insertions, 29 deletions
diff --git a/js/app/controllers/itemcontroller.coffee b/js/app/controllers/itemcontroller.coffee index 1b5d4a350..ee2fa7e82 100644 --- a/js/app/controllers/itemcontroller.coffee +++ b/js/app/controllers/itemcontroller.coffee @@ -87,15 +87,6 @@ Language, AutoPageLoading, Compact) -> @_$scope.isCompactView = => return @_compact.isCompact() - @_$scope.is = - active: 0 - - @_$scope.toggleOpen = (id) => - if id == @_$scope.is.active - @_$scope.is.active = 0 - else - @_$scope.is.active = id - return new ItemController($scope, ItemBusinessLayer, FeedModel, FeedLoading, AutoPageLoading, FeedBusinessLayer, Language, diff --git a/js/public/app.js b/js/public/app.js index 789ab42e8..d77220b72 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -877,16 +877,6 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. this._$scope.isCompactView = function() { return _this._compact.isCompact(); }; - this._$scope.is = { - active: 0 - }; - this._$scope.toggleOpen = function(id) { - if (id === _this._$scope.is.active) { - return _this._$scope.is.active = 0; - } else { - return _this._$scope.is.active = id; - } - }; } return ItemController; diff --git a/js/tests/controllers/itemcontrollerSpec.coffee b/js/tests/controllers/itemcontrollerSpec.coffee index 03b6bbc2e..7b2c50cb9 100644 --- a/js/tests/controllers/itemcontrollerSpec.coffee +++ b/js/tests/controllers/itemcontrollerSpec.coffee @@ -191,13 +191,3 @@ describe 'ItemController', -> @Compact.handle(true) expect(@scope.isCompactView()).toBe(true) - - it 'should toggle active ones and close old ones', => - expect(@scope.is.active).toBe(0) - - @scope.toggleOpen(3) - expect(@scope.is.active).toBe(3) - - @scope.toggleOpen(3) - expect(@scope.is.active).toBe(0) - |