Merged changes

This commit is contained in:
jdescottes
2014-07-03 23:40:30 +02:00
13 changed files with 206 additions and 43 deletions

View File

@@ -62,12 +62,26 @@
evt.preventDefault();
evt.stopPropagation();
this.beforeSaving_();
pskl.app.storageService.store({
success : this.onSaveSuccess_.bind(this),
error : this.onSaveError_.bind(this),
after : this.afterSaving_.bind(this)
});
var name = this.getName();
if (!name) {
name = window.prompt('Please specify a name', 'New piskel');
}
if (name) {
var description = this.getDescription();
var isPublic = !!this.isPublicCheckbox.prop('checked');
var descriptor = new pskl.model.piskel.Descriptor(name, description, isPublic);
this.piskelController.getPiskel().setDescriptor(descriptor);
this.beforeSaving_();
pskl.app.storageService.store({
success : this.onSaveSuccess_.bind(this),
error : this.onSaveError_.bind(this),
after : this.afterSaving_.bind(this)
});
}
};
ns.SaveController.prototype.onSaveLocalClick_ = function (evt) {