Commit 256c7193 authored by Thomas Citharel's avatar Thomas Citharel 🏃🏻
Browse files

fix save warning

parent ea66e1ad
......@@ -113,6 +113,10 @@ define(['libs/backbone',
return this._deck.get('exists');
},
setExistStatus: function () {
this._deck.set('exists', true);
},
importPresentation: function(rawObj) {
// deck disposes iteself on import?
console.log('New file name: ' + rawObj.fileName);
......
......@@ -32,7 +32,7 @@ function(Backbone, ActionHandlers, StorageModal, StorageInterface , PreviewLaunc
if (this._editorModel.getExistStatus()) {
this._previewLauncher.launch(this._generators[this._index]);
} else {
alert('Vous devez enregistrer la présentation avant de pouvoir la visionner');
alert(lang.saveWarning);
//this.saveAsModal.show(ActionHandlers.save, lang.save_as);
}
},
......
......@@ -65,6 +65,7 @@ function(StorageProviders, PreviewLauncher) {
savePresentation: function(identifier, data, cb, saveAction, model) {
this.store(identifier, data, cb, saveAction);
model.setExistStatus();
/** Also save preview */
var previewLauncher = new PreviewLauncher(model);
var generators = model.registry
......
......@@ -18,7 +18,7 @@ define(function() {
this.exportables.forEach(function(exportable) {
var data = exportable.export();
var identifier = exportable.identifier();
this.storageInterface.store(identifier, data, null, false, this.model);
this.storageInterface.savePresentation(identifier, data, null, false, this.model);
}, this);
},
......
......@@ -38,5 +38,6 @@ define({
picture_incorrect: "The entered picture URL appears to be incorrect",
preview: 'Preview',
upload: 'Upload',
video_info: 'Supports <strong>webm & YouTube</strong>.<br/>Try: http://www.youtube.com/watch?v=vHUsdkmr-SM'
video_info: 'Supports <strong>webm & YouTube</strong>.<br/>Try: http://www.youtube.com/watch?v=vHUsdkmr-SM',
saveWarning: 'You need to save the presentation before viewing it'
});
......@@ -38,5 +38,6 @@ define({
picture_incorrect: "L'URL de l'image entrée semble être incorrecte",
preview: 'Aperçu',
upload: 'Téléverser',
video_info: 'Supporte <strong>webm & YouTube</strong>.<br/>Essayez par exemple&nbsp;: http://www.youtube.com/watch?v=vHUsdkmr-SM'
video_info: 'Supporte <strong>webm & YouTube</strong>.<br/>Essayez par exemple&nbsp;: http://www.youtube.com/watch?v=vHUsdkmr-SM',
saveWarning: 'Vous devez enregistrer la présentation avant de pouvoir la visionner'
});
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