Author: rgardler
Date: Mon Nov 19 01:49:05 2012
New Revision: 1411043

URL: http://svn.apache.org/viewvc?rev=1411043&view=rev
Log:
don't use sessionStorage as there is a problem in IE10 in which sessionStorage 
is undefined when we try to set the initial value. This is probably an order of 
initialisation issue and since we want to rewrite this code for online/offline 
access at some point there seems little point in debugging right now

Modified:
    
incubator/wookie/trunk/widgets/templates/assetPlayer/scripts/asset_controller.js

Modified: 
incubator/wookie/trunk/widgets/templates/assetPlayer/scripts/asset_controller.js
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/assetPlayer/scripts/asset_controller.js?rev=1411043&r1=1411042&r2=1411043&view=diff
==============================================================================
--- 
incubator/wookie/trunk/widgets/templates/assetPlayer/scripts/asset_controller.js
 (original)
+++ 
incubator/wookie/trunk/widgets/templates/assetPlayer/scripts/asset_controller.js
 Mon Nov 19 01:49:05 2012
@@ -24,6 +24,7 @@ var ${widget.shortname}_asset_controller
     auto: false, // indicates if we are auto playing assets
     staticDuration: 5000, // interval between auto play of static assets (e.g. 
photo's)
     interval: null, // the interval object that controls the auto player
+    collection: null, // the collection of assets to play
 
     init:function() { 
        // register button events
@@ -53,13 +54,13 @@ var ${widget.shortname}_asset_controller
     },
     
     setCollection:function(album){
-       sessionStorage.setItem('collection', JSON.stringify(album));
+       ${widget.shortname}_asset_controller.collection = album;
         // FIXME: cache images for faster slideshow. e.g. 
http://www.anthonymclin.com/code/7-miscellaneous/98-on-demand-image-loading-with-jquery
        ${widget.shortname}_asset_controller.displayAsset(0);
     },
 
     getCollection:function() {
-       return JSON.parse(sessionStorage.getItem('collection'));
+       return  ${widget.shortname}_asset_controller.collection;
     },
     
     displayAsset:function(idx) {


Reply via email to