/* Copyright (c) 2004-2005, The Dojo Foundation All Rights Reserved. Licensed under the Academic Free License version 2.1 or above OR the modified BSD license. For more information on Dojo licensing, see: http://dojotoolkit.org/community/licensing.shtml */ dojo.provide("dojo.storage.browser"); dojo.require("dojo.storage"); dojo.require("dojo.uri.*"); dojo.storage.browser.StorageProvider = function(){ this.initialized = false; this.flash = null; this.backlog = []; } dojo.inherits( dojo.storage.browser.StorageProvider, dojo.storage.StorageProvider); dojo.lang.extend(dojo.storage.browser.StorageProvider, { storageOnLoad: function(){ this.initialized = true; this.hideStore(); while(this.backlog.length){ this.set.apply(this, this.backlog.shift()); } }, unHideStore: function(){ var container = dojo.byId("dojo-storeContainer"); with(container.style){ position = "absolute"; overflow = "visible"; width = "215px"; height = "138px"; // FIXME: make these positions dependent on screen size/scrolling! left = "30px"; top = "30px"; visiblity = "visible"; zIndex = "20"; border = "1px solid black"; } }, hideStore: function(status){ var container = dojo.byId("dojo-storeContainer"); with(container.style){ left = "-300px"; top = "-300px"; } }, set: function(key, value, ns){ if(!this.initialized){ this.backlog.push([key, value, ns]); return "pending"; } return this.flash.set(key, value, ns||this.namespace); }, get: function(key, ns){ return this.flash.get(key, ns||this.namespace); }, writeStorage: function(){ var swfloc = dojo.uri.dojoUri("src/storage/Storage.swf").toString(); // alert(swfloc); var storeParts = [ '