- Author:
- David Nickerson <nickerso@users.sourceforge.net>
- Date:
- 2010-05-04 12:37:19+12:00
- Desc:
- adding initial version of SED-ML L1V1 file reproducing what is in graphs/BR-INa-variants.xml
- Permanent Source URI:
- https://models.cellml.org/workspace/a1/rawfile/a80b964384c0c7683d7c5d07b73a5af7a973d46c/dojo-presentation/js/dojo/dojox/rpc/OfflineRest.js
dojo.provide("dojox.rpc.OfflineRest");
dojo.require("dojox.off.offline");
dojo.require("dojox.rpc.LocalStorageRest");
dojox.rpc.OfflineRest = dojo.mixin({
initialize: function(/*String*/applicationName){
// summary:
// Sets up an offline Rest application
// applicationName:
// You must provide an application to start the OfflineRest
// Store:
// Any data stores that you are using should be included here
dojox.off.ui.appName = applicationName;
dojox.off.files.slurp();
dojox.off.initialize();
var lsr = dojox.rpc.LocalStorageRest;
dojo.connect(dojox.off.sync, "onSync", this, function(type){
if(type == "upload"){
lsr.sendChanges();
}
if(type == "download"){
lsr.downloadChanges(); // FIXME: Do this async?
dojox.off.sync.finishedDownloading();
}
});
}
},dojox.rpc.LocalStorageRest);