mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Unminify using 1.5.323
Repo with tag: https://github.com/MediaBrowser/emby-webcomponents/tree/1.5.323
This commit is contained in:
parent
4678528d00
commit
de6ac33ec1
289 changed files with 78483 additions and 54701 deletions
|
@ -1,18 +1,34 @@
|
|||
define(["dialog", "globalize"], function(dialog, globalize) {
|
||||
"use strict";
|
||||
return function(text, title) {
|
||||
define(['dialog', 'globalize'], function (dialog, globalize) {
|
||||
'use strict';
|
||||
|
||||
return function (text, title) {
|
||||
|
||||
var options;
|
||||
options = "string" == typeof text ? {
|
||||
title: title,
|
||||
text: text
|
||||
} : text;
|
||||
if (typeof text === 'string') {
|
||||
options = {
|
||||
title: title,
|
||||
text: text
|
||||
};
|
||||
} else {
|
||||
options = text;
|
||||
}
|
||||
|
||||
var items = [];
|
||||
return items.push({
|
||||
name: globalize.translate("sharedcomponents#ButtonGotIt"),
|
||||
id: "ok",
|
||||
type: "submit"
|
||||
}), options.buttons = items, dialog(options).then(function(result) {
|
||||
return "ok" === result ? Promise.resolve() : Promise.reject()
|
||||
})
|
||||
}
|
||||
|
||||
items.push({
|
||||
name: globalize.translate('sharedcomponents#ButtonGotIt'),
|
||||
id: 'ok',
|
||||
type: 'submit'
|
||||
});
|
||||
|
||||
options.buttons = items;
|
||||
|
||||
return dialog(options).then(function (result) {
|
||||
if (result === 'ok') {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return Promise.reject();
|
||||
});
|
||||
};
|
||||
});
|
|
@ -1,14 +1,23 @@
|
|||
define([], function() {
|
||||
"use strict";
|
||||
define([], function () {
|
||||
'use strict';
|
||||
|
||||
function replaceAll(str, find, replace) {
|
||||
return str.split(find).join(replace)
|
||||
}
|
||||
return function(options) {
|
||||
"string" == typeof options && (options = {
|
||||
text: options
|
||||
});
|
||||
var text = replaceAll(options.text || "", "<br/>", "\n");
|
||||
return alert(text), Promise.resolve()
|
||||
|
||||
return str.split(find).join(replace);
|
||||
}
|
||||
|
||||
return function (options) {
|
||||
|
||||
if (typeof options === 'string') {
|
||||
options = {
|
||||
text: options
|
||||
};
|
||||
}
|
||||
|
||||
var text = replaceAll(options.text || '', '<br/>', '\n');
|
||||
|
||||
alert(text);
|
||||
|
||||
return Promise.resolve();
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue