Series search added

This commit is contained in:
Mark McDowall 2013-07-21 19:52:53 -07:00
parent 125f3d87a4
commit d19e33f0a8
7 changed files with 83 additions and 9 deletions

View file

@ -5,6 +5,7 @@ define(['Commands/CommandController', 'Shared/Messenger'],
ExecuteCommand: function (options) {
options.iconClass = this._getIconClass(options.element);
this._showStartMessage(options);
this._setSpinnerOnElement(options);
var promise = CommandController.Execute(options.command, options.properties);
@ -14,9 +15,10 @@ define(['Commands/CommandController', 'Shared/Messenger'],
SaveModel: function (options) {
options.iconClass = this._getIconClass(options.element);
this._showStartMessage(options);
this._setSpinnerOnElement(options);
var promise = options.context.model.save();
var promise = options.context.model.save();
this._handlePromise(promise, options);
},
@ -80,6 +82,14 @@ define(['Commands/CommandController', 'Shared/Messenger'],
options.element.removeClass(options.iconClass);
options.element.addClass('icon-nd-spinner');
}
},
_showStartMessage: function (options) {
if (options.startMessage) {
Messenger.show({
message: options.startMessage
});
}
}
}
});