diff options
Diffstat (limited to 'js/service/Settings.js')
-rw-r--r-- | js/service/Settings.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/js/service/Settings.js b/js/service/Settings.js new file mode 100644 index 000000000..09a89f6ed --- /dev/null +++ b/js/service/Settings.js @@ -0,0 +1,32 @@ +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright Bernhard Posselt 2014 + */ +app.service('Settings', function () { + 'use strict'; + + this.settings = {}; + + this.receive = function (data) { + var key; + for (key in data) { + if (data.hasOwnProperty(key)) { + this.settings[key] = data[key]; + } + } + }; + + this.get = function (key) { + return this.settings[key]; + }; + + this.set = function (key, value) { + this.settings[key] = value; + }; + +});
\ No newline at end of file |