Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

replacing ART.store/retrieve with Secure.write/read

  • Loading branch information...
commit d26f7f56628d227129a06d69cb7d66b9c920b7ca 1 parent 2cb8ac4
@kassens authored
View
27 scripts/art/art.air.js
@@ -99,8 +99,6 @@ ART.Menu.Item = new Class({
return new ART.Menu.Item(this.name, $extend(this.options, {_item: this.item}));
},
- // Exposed class properties
-
setChecked: function(value){
this.item.checked = value;
},
@@ -134,31 +132,6 @@ ART.Menu.Item = new Class({
});
-// storage wrappers
-
-ART.Storage = {
-
- data: {},
-
- store: function(key, value){
- ART.Storage.data[key] = value;
- var bytes = new AIR.ByteArray();
- bytes.writeUTFBytes(JSON.encode(ART.Storage.data));
- AIR.EncryptedLocalStore.setItem('application:storage', bytes);
- return ART.Storage;
- },
-
- retrieve: function(key){
- var stored = AIR.EncryptedLocalStore.getItem('application:storage');
- var data = (stored && stored.length) ? JSON.decode(stored.readUTFBytes(stored.length)) : null;
- if (data) return (data[key] != undefined) ? data[key] : null;
- }
-
-};
-
-ART.store = ART.Storage.store;
-ART.retrieve = ART.Storage.retrieve;
-
// ART Window for AIR
ART.HTML = {};
View
2  scripts/snippely/snippely.groups.js
@@ -2,7 +2,7 @@ Snippely.Groups = {
initialize: function(){
this.list = $('groups-list');
- this.id = ART.retrieve('groups:active') || 0;
+ this.id = Secure.read('groups:active') || 0;
this.buildMenus();
this.load();
View
28 scripts/snippely/snippely.js
@@ -182,12 +182,12 @@ var Snippely = {
},
retrieveProperties: function(){
- var top = ART.retrieve('window:y') || 100;
- var left = ART.retrieve('window:x') || 100;
- var width = ART.retrieve('window:width') || 640;
- var height = ART.retrieve('window:height') || 480;
- var groupsWidth = ART.retrieve('groups:width') || 200;
- var snippetsHeight = ART.retrieve('snippets:height') || 100;
+ var top = Secure.read('window:y') || 100;
+ var left = Secure.read('window:x') || 100;
+ var width = Secure.read('window:width') || 640;
+ var height = Secure.read('window:height') || 480;
+ var groupsWidth = Secure.read('groups:width') || 200;
+ var snippetsHeight = Secure.read('snippets:height') || 100;
nativeWindow.y = top;
nativeWindow.x = left;
@@ -269,16 +269,16 @@ var Snippely = {
},
storeProperties: function(){
- ART.store('window:y', nativeWindow.y);
- ART.store('window:x', nativeWindow.x);
- ART.store('window:height', nativeWindow.height);
- ART.store('window:width', nativeWindow.width);
+ Secure.write('window:y', nativeWindow.y);
+ Secure.write('window:x', nativeWindow.x);
+ Secure.write('window:height', nativeWindow.height);
+ Secure.write('window:width', nativeWindow.width);
- ART.store('groups:width', this.contentLeft.clientWidth);
- ART.store('groups:active', this.Groups.id);
+ Secure.write('groups:width', this.contentLeft.clientWidth);
+ Secure.write('groups:active', this.Groups.id);
- ART.store('snippets:height', this.contentTop.offsetHeight);
- ART.store('snippet:active', this.Snippets.id);
+ Secure.write('snippets:height', this.contentTop.offsetHeight);
+ Secure.write('snippet:active', this.Snippets.id);
},
toggleMenus: function(type, state){
View
2  scripts/snippely/snippely.snippets.js
@@ -3,7 +3,7 @@ Snippely.Snippets = {
initialize: function(){
this.list = $('snippets-list');
this.container = $('content-wrap');
- this.id = ART.retrieve('snippet:active') || 0;
+ this.id = Secure.read('snippet:active') || 0;
this.buildMenus();
$('snippets').addEvents({
Please sign in to comment.
Something went wrong with that request. Please try again.