mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
697257670c
commit
02ae9ec81e
123 changed files with 13600 additions and 531 deletions
40
dashboard-ui/cordova/actionsheet.js
vendored
Normal file
40
dashboard-ui/cordova/actionsheet.js
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
(function () {
|
||||
|
||||
function show(options) {
|
||||
|
||||
// items
|
||||
// positionTo
|
||||
// showCancel
|
||||
// title
|
||||
|
||||
var innerOptions = {
|
||||
'title': options.title,
|
||||
'buttonLabels': options.items.map(function (i) {
|
||||
return i.name;
|
||||
})
|
||||
};
|
||||
|
||||
// Show cancel unless the caller explicitly set it to false
|
||||
if (options.showCancel !== false) {
|
||||
innerOptions.addCancelButtonWithLabel = Globalize.translate('ButtonCancel');
|
||||
}
|
||||
|
||||
// Depending on the buttonIndex, you can now call shareViaFacebook or shareViaTwitter
|
||||
// of the SocialSharing plugin (https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin)
|
||||
window.plugins.actionsheet.show(innerOptions, function (index) {
|
||||
|
||||
if (options.callback) {
|
||||
|
||||
// Results are 1-based
|
||||
if (index >= 1 && options.items.length >= index) {
|
||||
|
||||
options.callback(options.items[index - 1].id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.ActionSheetElement = {
|
||||
show: show
|
||||
};
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue