.then(uci.save.bind(uci))
.then(this.load.bind(this))
.then(this.renderContents.bind(this))
- .catch(function() { alert('Cannot save due to invalid values') });
+ .catch(function(e) {
+ alert('Cannot save due to invalid values')
+ return Promise.reject();
+ });
},
reset: function() {
},
handleModalCancel: function(modalMap, ev) {
- L.ui.hideModal();
+ return Promise.resolve(L.ui.hideModal());
},
handleModalSave: function(modalMap, ev) {
- modalMap.save()
+ return modalMap.save()
.then(L.bind(this.map.reset, this.map))
- .then(L.ui.hideModal);
+ .then(L.ui.hideModal)
+ .catch(function() {});
},
renderMoreOptionsModal: function(section_id, ev) {
},
handleModalSave: function(/* ... */) {
- this.super('handleModalSave', arguments);
- this.addedSection = null;
+ return this.super('handleModalSave', arguments)
+ .then(L.bind(function() { this.addedSection = null }, this));
},
handleModalCancel: function(/* ... */) {
this.addedSection = null;
}
- this.super('handleModalCancel', arguments);
+ return this.super('handleModalCancel', arguments);
},
renderUCISection: function(section_id) {