Commit 2a0e2fe0 authored by Thomas Citharel's avatar Thomas Citharel 🏃🏻
Browse files

Fix autosave


Signed-off-by: Thomas Citharel's avatarThomas Citharel <tcit@tcit.fr>
parent bcbd1b45
Pipeline #13406 passed with stage
in 14 minutes and 42 seconds
......@@ -132,7 +132,7 @@ define(['libs/backbone',
},
setBackendId: function (backendId) {
this._deck.set('backendId');
this._deck.set('backendId', backendId);
},
importPresentation: function(rawObj) {
......
......@@ -69,10 +69,12 @@ function(StorageProviders, PreviewLauncher) {
model.setExistStatus(true);
},
saveNewPresentation: function (identifier, data, cb) {
saveNewPresentation: function (identifier, data, cb, ok, model) {
this.currentProvider().create(identifier, data, function (data) {
if (cb) {
cb(data, null);
console.log(data);
model.setBackendId(data.id);
}
});
}
......
......@@ -18,7 +18,9 @@ define(function() {
// var identifier = exportable.identifier();
this.exportables.forEach(function(exportable) {
var data = exportable.export();
var identifier = this.model.getBackendId() || this.model.fileName();
console.log(this.model.getBackendId());
console.log(this.model.fileName());
var identifier = this.model.getBackendId();
this.storageInterface.savePresentation(identifier, data, null, false, this.model);
}, this);
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment