Fixed: Error messages not being shown in the UI or being shown in the wrong place

This commit is contained in:
Mark McDowall
2014-06-04 08:38:26 -07:00
parent 9916479f02
commit 545bc756f2
13 changed files with 66 additions and 34 deletions

View File

@@ -22,13 +22,18 @@ define([
'click .x-save-and-add': '_saveAndAdd',
'click .x-delete' : '_delete',
'click .x-back' : '_back',
'click .x-test' : '_test'
'click .x-close' : '_close',
'click .x-test' : '_test'
},
initialize: function (options) {
this.targetCollection = options.targetCollection;
},
onBeforeClose: function () {
window.alert('closing down!');
},
_save: function () {
var self = this;
var promise = this.model.save();
@@ -67,6 +72,19 @@ define([
require('Settings/Indexers/Add/IndexerSchemaModal').open(this.targetCollection);
},
_close: function () {
if (this.model.isNew()) {
this.model.destroy();
}
else {
this.model.fetch();
}
vent.trigger(vent.Commands.CloseModalCommand);
},
_test: function () {
var testCommand = 'test{0}'.format(this.model.get('implementation'));
var properties = {};