mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
vulcanize
This commit is contained in:
parent
07df993238
commit
55e40bdcf7
52 changed files with 12309 additions and 33 deletions
38
dashboard-ui/cordova/ios/actionsheet.js
vendored
Normal file
38
dashboard-ui/cordova/ios/actionsheet.js
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
(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) {
|
||||
|
||||
if (index >= 1) {
|
||||
options.callback(options.items[index - 1].id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.ActionSheetElement = {
|
||||
show: show
|
||||
};
|
||||
})();
|
21
dashboard-ui/cordova/ios/orientation.js
vendored
Normal file
21
dashboard-ui/cordova/ios/orientation.js
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
(function () {
|
||||
|
||||
function forceScroll() {
|
||||
|
||||
var doc = $(document);
|
||||
|
||||
// Try to make it react quicker to the orientation change
|
||||
doc.scrollTop(doc.scrollTop() + 1);
|
||||
}
|
||||
|
||||
function onOrientationChange() {
|
||||
|
||||
forceScroll();
|
||||
for (var i = 0; i <= 500; i += 100) {
|
||||
setTimeout(forceScroll, i);
|
||||
}
|
||||
}
|
||||
|
||||
$(window).on('orientationchange', onOrientationChange);
|
||||
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue