jellyfin-web/dashboard-ui/bower_components/emby-webcomponents/alert/alert.js
Luke Pulverenti 79240b1a24 update voice
2016-07-20 09:56:24 -04:00

32 lines
702 B
JavaScript

define(['dialog', 'globalize'], function (dialog, globalize) {
return function (text, title) {
var options;
if (typeof text === 'string') {
options = {
title: title,
text: text
};
} else {
options = text;
}
var items = [];
items.push({
name: globalize.translate('sharedcomponents#ButtonOk'),
id: 'ok'
});
options.buttons = items;
return dialog(options).then(function (result) {
if (result == 'ok') {
return Promise.resolve();
}
return Promise.reject();
});
};
});