From 0dbcbb6f8b0b89776c24d000840192571e39edbf Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 20 Dec 2013 23:01:24 +0100 Subject: debug --- js/app/services/persistence.coffee | 4 +++- js/public/app.js | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/app/services/persistence.coffee b/js/app/services/persistence.coffee index 59b3083ff..1c7ed9351 100644 --- a/js/app/services/persistence.coffee +++ b/js/app/services/persistence.coffee @@ -60,7 +60,7 @@ $rootScope, $q) -> ### ITEM CONTROLLER ### - getItems: (type, id, offset, onSuccess=null) -> + getItems: (type, id, offset=0, onSuccess=null) -> onSuccess or= -> # show different loading signs @@ -78,11 +78,13 @@ $rootScope, $q) -> successCallbackWrapper = -> + console.log 'haha' lastChange = @_lastFeedChange # back up last change value in closure so we can compare it properly do (lastChange, offset) => successCallbackWrapper = (data) => console.log data + console.log data.items console.log offset console.log lastChange console.log @_lastFeedChange diff --git a/js/public/app.js b/js/public/app.js index 26680dea4..85044751e 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -2764,6 +2764,9 @@ License along with this library. If not, see . Persistence.prototype.getItems = function(type, id, offset, onSuccess) { var failureCallbackWrapper, lastChange, loading, params, successCallbackWrapper, _this = this; + if (offset == null) { + offset = 0; + } if (onSuccess == null) { onSuccess = null; } @@ -2776,11 +2779,14 @@ License along with this library. If not, see . loading = this._autoPageLoading; } loading.increase(); - successCallbackWrapper = function() {}; + successCallbackWrapper = function() { + return console.log('haha'); + }; lastChange = this._lastFeedChange; (function(lastChange, offset) { return successCallbackWrapper = function(data) { console.log(data); + console.log(data.items); console.log(offset); console.log(lastChange); console.log(_this._lastFeedChange); -- cgit v1.2.3