From 1c5685d68f1b73270fb814fe04cbb490eb90ba5f Mon Sep 17 00:00:00 2001 From: mensonge Date: Fri, 14 Nov 2008 15:39:19 +0000 Subject: Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library) git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f --- .../storage/AirEncryptedLocalStorageProvider.js | 221 --------------------- 1 file changed, 221 deletions(-) delete mode 100644 includes/js/dojox/storage/AirEncryptedLocalStorageProvider.js (limited to 'includes/js/dojox/storage/AirEncryptedLocalStorageProvider.js') diff --git a/includes/js/dojox/storage/AirEncryptedLocalStorageProvider.js b/includes/js/dojox/storage/AirEncryptedLocalStorageProvider.js deleted file mode 100644 index 500ac0f..0000000 --- a/includes/js/dojox/storage/AirEncryptedLocalStorageProvider.js +++ /dev/null @@ -1,221 +0,0 @@ -if(!dojo._hasResource["dojox.storage.AirEncryptedLocalStorageProvider"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["dojox.storage.AirEncryptedLocalStorageProvider"] = true; -dojo.provide("dojox.storage.AirEncryptedLocalStorageProvider"); -dojo.require("dojox.storage.manager"); -dojo.require("dojox.storage.Provider"); - -if (dojo.isAIR) { - (function(){ - - if (!air) { - var air = {}; - } - air.ByteArray = window.runtime.flash.utils.ByteArray; - air.EncryptedLocalStore = window.runtime.flash.data.EncryptedLocalStore, - - // summary: - // Storage provider that uses features in the Adobe AIR runtime to achieve - // permanent storage - dojo.declare("dojox.storage.AirEncryptedLocalStorageProvider", [ dojox.storage.Provider ], { - initialize: function(){ - // indicate that this storage provider is now loaded - dojox.storage.manager.loaded(); - }, - - isAvailable: function(){ - return true; - }, - - _getItem: function(key){ - var storedValue = air.EncryptedLocalStore.getItem("__dojo_" + key); - return storedValue ? storedValue.readUTFBytes(storedValue.length) : ""; - }, - - _setItem: function(key, value){ - var bytes = new air.ByteArray(); - bytes.writeUTFBytes(value); - air.EncryptedLocalStore.setItem("__dojo_" + key, bytes); - }, - - _removeItem: function(key){ - air.EncryptedLocalStore.removeItem("__dojo_" + key); - }, - - put: function(key, value, resultsHandler, namespace){ - if(this.isValidKey(key) == false){ - throw new Error("Invalid key given: " + key); - } - namespace = namespace||this.DEFAULT_NAMESPACE; - if(this.isValidKey(namespace) == false){ - throw new Error("Invalid namespace given: " + namespace); - } - - // try to store the value - try{ - var namespaces = this._getItem("namespaces")||'|'; - if(namespaces.indexOf('|'+namespace+'|')==-1){ - this._setItem("namespaces", namespaces + namespace + '|'); - } - var keys = this._getItem(namespace + "_keys")||'|'; - if(keys.indexOf('|'+key+'|')==-1){ - this._setItem(namespace + "_keys", keys + key + '|'); - } - this._setItem('_' + namespace + '_' + key, value); - }catch(e){ - // indicate we failed - console.debug("dojox.storage.AirEncryptedLocalStorageProvider.put:", e); - resultsHandler(this.FAILED, key, e.toString()); - return; - } - - if(resultsHandler){ - resultsHandler(this.SUCCESS, key, null); - } - }, - - get: function(key, namespace){ - if(this.isValidKey(key) == false){ - throw new Error("Invalid key given: " + key); - } - namespace = namespace||this.DEFAULT_NAMESPACE; - return this._getItem('_' + namespace + '_' + key); - }, - - getNamespaces: function(){ - var results = [ this.DEFAULT_NAMESPACE ]; - var namespaces = (this._getItem("namespaces")||'|').split('|'); - for (var i=0;i