summaryrefslogtreecommitdiffstats
path: root/js/build/app.js
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-23 03:51:37 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-23 03:51:37 +0200
commit21445917b001de0af6d6abf7eb71eeef6b0ec38a (patch)
treeb3b86321c270642b0645d01d6e7796997a93d8c1 /js/build/app.js
parent02adea04a5f65640acbce0c954b3b48a61bacb9a (diff)
rename settings to settingsresource
Diffstat (limited to 'js/build/app.js')
-rw-r--r--js/build/app.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/js/build/app.js b/js/build/app.js
index 422adafb1..7a63b37b7 100644
--- a/js/build/app.js
+++ b/js/build/app.js
@@ -197,17 +197,17 @@ var $__build_47_app__ = function () {
console.log('here');
});
app.controller('SettingsController', [
- 'Settings',
'$route',
+ 'SettingsResource',
'FeedResource',
- function (Settings, $route, FeedResource) {
+ function ($route, SettingsResource, FeedResource) {
'use strict';
var $__0 = this;
this.importing = false;
this.opmlImportError = false;
this.articleImportError = false;
var set = function (key, value) {
- Settings.set(key, value);
+ SettingsResource.set(key, value);
if ([
'showAll',
'oldestFirst'
@@ -219,7 +219,7 @@ var $__build_47_app__ = function () {
set(key, !$__0.getSetting(key));
};
this.getSetting = function (key) {
- return Settings.get(key);
+ return SettingsResource.get(key);
};
this.importOpml = function (content) {
console.log(content);
@@ -250,7 +250,9 @@ var $__build_47_app__ = function () {
$traceurRuntime.createClass(FeedResource, {
add: function (value) {
$traceurRuntime.superCall(this, $FeedResource.prototype, 'add', [value]);
- $traceurRuntime.setProperty(this.ids, value.id, this.hashMap[$traceurRuntime.toProperty(value.url)]);
+ if (value.id !== undefined) {
+ $traceurRuntime.setProperty(this.ids, value.id, this.hashMap[$traceurRuntime.toProperty(value.url)]);
+ }
},
delete: function (id) {
var feed = this.get(id);
@@ -583,7 +585,7 @@ var $__build_47_app__ = function () {
}, {});
return Resource;
});
- app.service('Settings', [
+ app.service('SettingsResource', [
'$http',
'BASE_URL',
function ($http, BASE_URL) {