aboutsummaryrefslogtreecommitdiff
path: root/js/data
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-24 14:43:51 -0800
committerValerio Virgillito2012-02-24 14:44:02 -0800
commit72baf1c366829ada6858097dd7553ee9988d6110 (patch)
treee43790b3a45587b998be5ee897451dec8c29f564 /js/data
parentf97080989ee988c1e613915c2d246dc17b104b3b (diff)
downloadninja-72baf1c366829ada6858097dd7553ee9988d6110.tar.gz
removing the old settings class and disabling panel settings until the new panels are in
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/data')
-rwxr-xr-xjs/data/settings.js54
1 files changed, 0 insertions, 54 deletions
diff --git a/js/data/settings.js b/js/data/settings.js
deleted file mode 100755
index 6b1af3fc..00000000
--- a/js/data/settings.js
+++ /dev/null
@@ -1,54 +0,0 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component,
9 LocalStorage = require("js/controllers/local-storage-controller").LocalStorage;
10
11exports.Settings = Montage.create( Component, {
12
13 _settings: {
14 value: null
15 },
16
17 settings: {
18 get: function() { return this._settings; },
19 set: function(value) { this._settings = value; }
20 },
21
22 getSetting: {
23 value: function(objName, fieldName, namespace) {
24 try {
25 objName = objName.replace(/-/gi, "_").replace(/\//gi, "zzSlash");
26 return this.settings[objName][fieldName];
27 } catch(e) {
28 return null;
29 }
30 }
31 },
32
33 setSetting: {
34 value: function(objName, fieldName, value, namespace) {
35 try {
36 objName = objName.replace(/-/gi, "_").replace(/\//gi, "zzSlash");
37
38 if(this.settings === null) {
39 this.settings = {};
40 }
41
42 if (this.settings[objName] == null) {
43 this.settings[objName] = {};
44 }
45
46 this.settings[objName][fieldName] = value;
47
48 LocalStorage.setItem("settings", this.settings);
49 } catch(e) {
50 return null;
51 }
52 }
53 }
54}); \ No newline at end of file