added command support to toolbar.

This commit is contained in:
kay.one 2013-05-11 16:39:32 -07:00
commit c8a48d5df3
6 changed files with 136 additions and 36 deletions

27
UI/Shared/Messenger.js Normal file
View file

@ -0,0 +1,27 @@
"use strict";
define(['app'], function () {
NzbDrone.Shared.Messenger = {
show: function (options) {
if (!options.type) {
options.type = 'info';
}
if (!options.hideAfter) {
switch (options.type) {
case 'info':
options.hideAfter = 5;
break;
case 'error':
options.hideAfter = 0;
}
}
return window.Messenger().post({
message : options.message,
type : options.type,
showCloseButton: true,
hideAfter : options.hideAfter
});
}};
});