summaryrefslogtreecommitdiffstats
path: root/js/public
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-25 15:05:20 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-25 15:05:20 +0100
commitb0f35f7f7ba067ce894619b11d6b05287e0e09b3 (patch)
tree09be4428c714a8b121987768c876970f9fb8f2e6 /js/public
parentc16402308b389fcb3b40b8981b8fd88990ef57c2 (diff)
fixed js errors on load
Diffstat (limited to 'js/public')
-rw-r--r--js/public/app.js26
1 files changed, 15 insertions, 11 deletions
diff --git a/js/public/app.js b/js/public/app.js
index f57367fa0..f711b637e 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -653,17 +653,21 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
Loads the initial data from the server
*/
- var _this = this;
+ var triggerHideRead,
+ _this = this;
this._loading.increase();
this.getActiveFeed(function() {
return _this.getItems(_this._activeFeed.getType(), _this._activeFeed.getId(), 0, function() {
return _this._loading.decrease();
});
});
- this.getAllFolders(this._triggerHideRead);
- this.getAllFeeds(this._triggerHideRead);
- this.userSettingsRead(this._triggerHideRead);
- return this.getStarredItems(this._triggerHideRead);
+ triggerHideRead = function() {
+ return _this._triggerHideRead;
+ };
+ this.getAllFolders(triggerHideRead);
+ this.getAllFeeds(triggerHideRead);
+ this.userSettingsRead(triggerHideRead);
+ return this.getStarredItems(triggerHideRead);
};
/*
@@ -768,7 +772,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
Persistence.prototype.getAllFeeds = function(callback) {
var params;
- callback || (callback = angular.noop);
+ callback || (callback = function() {});
params = {
onSuccess: callback
};
@@ -861,7 +865,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
Persistence.prototype.getAllFolders = function(callback) {
var params;
- callback || (callback = angular.noop);
+ callback || (callback = function() {});
params = {
onSuccess: callback
};
@@ -907,8 +911,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
if (onFailure == null) {
onFailure = null;
}
- onSuccess || (onSuccess = angular.noop);
- onFailure || (onFailure = angular.noop);
+ onSuccess || (onSuccess = function() {});
+ onFailure || (onFailure = function() {});
params = {
data: {
folderName: folderName,
@@ -977,7 +981,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
Gets the configs for read settings
*/
- callback || (callback = angular.noop);
+ callback || (callback = function() {});
params = {
onSuccess: callback
};
@@ -998,7 +1002,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
return this._request.post('news_usersettings_read_hide');
};
- Persistence.prototype._trigerHideRead = function() {
+ Persistence.prototype._triggerHideRead = function() {
return this._$rootScope.$broadcast('triggerHideRead');
};