mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update player selection dialog
This commit is contained in:
parent
f0f5c26a2c
commit
c80c66b498
10 changed files with 258 additions and 296 deletions
|
@ -25,14 +25,14 @@
|
|||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/polymerelements/iron-meta",
|
||||
"homepage": "https://github.com/PolymerElements/iron-meta",
|
||||
"_release": "1.0.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.3",
|
||||
"commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-meta.git",
|
||||
"_source": "git://github.com/PolymerElements/iron-meta.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-meta"
|
||||
"_originalSource": "PolymerElements/iron-meta"
|
||||
}
|
15
dashboard-ui/cordova/chromecast.js
vendored
15
dashboard-ui/cordova/chromecast.js
vendored
|
@ -282,7 +282,8 @@
|
|||
"SetAudioStreamIndex",
|
||||
"SetSubtitleStreamIndex",
|
||||
"DisplayContent",
|
||||
"SetRepeatMode"
|
||||
"SetRepeatMode",
|
||||
"EndSession"
|
||||
];
|
||||
|
||||
return target;
|
||||
|
@ -664,6 +665,17 @@
|
|||
}
|
||||
};
|
||||
|
||||
self.endSession = function () {
|
||||
|
||||
if (currentDevice) {
|
||||
currentDevice.disconnect();
|
||||
}
|
||||
|
||||
cleanupSession();
|
||||
currentDevice = null;
|
||||
currentDeviceId = null;
|
||||
};
|
||||
|
||||
$(MediaController).on('playerchange', function (e, newPlayer, newTarget) {
|
||||
|
||||
if (newTarget.id != currentDeviceId) {
|
||||
|
@ -675,7 +687,6 @@
|
|||
cleanupSession();
|
||||
currentDevice = null;
|
||||
currentDeviceId = null;
|
||||
self.lastPlayerData = {};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -421,6 +421,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.backdropPage .noBackdrop {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.itemBackdropContent {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
|
|
|
@ -705,7 +705,8 @@
|
|||
"SetAudioStreamIndex",
|
||||
"SetSubtitleStreamIndex",
|
||||
"DisplayContent",
|
||||
"SetRepeatMode"]
|
||||
"SetRepeatMode",
|
||||
"EndSession"]
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -778,6 +779,11 @@
|
|||
});
|
||||
};
|
||||
|
||||
self.endSession = function () {
|
||||
|
||||
castPlayer.stopApp();
|
||||
};
|
||||
|
||||
self.volumeUp = function () {
|
||||
|
||||
castPlayer.sendMessage({
|
||||
|
|
|
@ -68,10 +68,13 @@
|
|||
renderDetails(page, item, context);
|
||||
|
||||
var hasBackdrop = LibraryBrowser.renderDetailPageBackdrop(page, item);
|
||||
//$('#itemBackdrop', page).addClass('noBackdrop').css('background-image', 'none');
|
||||
//Backdrops.setBackdrops(page, [item]);
|
||||
|
||||
// For these types, make the backdrop a little smaller so that the items are more quickly accessible
|
||||
if (item.Type == "Season" || item.Type == "MusicArtist" || item.Type == "MusicAlbum" || item.Type == "Series" || item.Type == "Playlist" || item.Type == "BoxSet") {
|
||||
if (item.Type == 'MusicArtist' || item.Type == "MusicAlbum" || item.Type == "Playlist" || item.Type == "BoxSet" || item.Type == "Audio") {
|
||||
$('#itemBackdrop', page).addClass('noBackdrop').css('background-image', 'none');
|
||||
Backdrops.setBackdrops(page, [item]);
|
||||
}
|
||||
else if (item.Type == "Season" || item.Type == "Series") {
|
||||
page.querySelector('#itemBackdrop').classList.add('smallBackdrop');
|
||||
} else {
|
||||
page.querySelector('#itemBackdrop').classList.remove('smallBackdrop');
|
||||
|
@ -411,7 +414,7 @@
|
|||
var topOverview = page.querySelector('.topOverview');
|
||||
var bottomOverview = page.querySelector('.bottomOverview');
|
||||
|
||||
var seasonOnBottom = screen.availHeight < 600 || screen.availWidth < 600;
|
||||
var seasonOnBottom = screen.availHeight < 800 || screen.availWidth < 600;
|
||||
|
||||
if (item.Type == 'MusicAlbum' || item.Type == 'MusicArtist' || (item.Type == 'Season' && seasonOnBottom) || (item.Type == 'Series' && seasonOnBottom)) {
|
||||
LibraryBrowser.renderOverview([bottomOverview], item);
|
||||
|
@ -647,14 +650,20 @@
|
|||
return;
|
||||
}
|
||||
|
||||
var shape = item.Type == "MusicAlbum" || item.Type == "MusicArtist" ? "detailPageSquare" : "detailPagePortrait";
|
||||
var screenWidth = $(window).width();
|
||||
var screenHeight = $(window).height();
|
||||
|
||||
var options = {
|
||||
userId: Dashboard.getCurrentUserId(),
|
||||
limit: screenWidth > 800 ? 5 : 4,
|
||||
limit: screenWidth > 800 && shape == "detailPagePortrait" ? 5 : 4,
|
||||
fields: "PrimaryImageAspectRatio,UserData,SyncInfo"
|
||||
};
|
||||
|
||||
if (screenWidth >= 800 && screenHeight >= 1000) {
|
||||
options.limit *= 2;
|
||||
}
|
||||
|
||||
ApiClient.getSimilarItems(item.Id, options).done(function (result) {
|
||||
|
||||
if (!result.Items.length) {
|
||||
|
@ -669,7 +678,7 @@
|
|||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: item.Type == "MusicAlbum" || item.Type == "MusicArtist" ? "detailPageSquare" : "detailPagePortrait",
|
||||
shape: shape,
|
||||
showParentTitle: item.Type == "MusicAlbum",
|
||||
centerText: true,
|
||||
showTitle: item.Type == "MusicAlbum" || item.Type == "Game" || item.Type == "MusicArtist",
|
||||
|
|
|
@ -64,119 +64,110 @@
|
|||
});
|
||||
}
|
||||
|
||||
function getTargetsHtml(targets) {
|
||||
function showPlayerSelection() {
|
||||
|
||||
var playerInfo = MediaController.getPlayerInfo();
|
||||
|
||||
var html = '';
|
||||
html += '<form>';
|
||||
|
||||
html += '<h3>' + Globalize.translate('HeaderSelectPlayer') + '</h3>';
|
||||
html += '<fieldset data-role="controlgroup" data-mini="true">';
|
||||
|
||||
var checkedHtml;
|
||||
|
||||
for (var i = 0, length = targets.length; i < length; i++) {
|
||||
|
||||
var target = targets[i];
|
||||
|
||||
var id = 'radioPlayerTarget' + i;
|
||||
|
||||
var isChecked = target.id == playerInfo.id;
|
||||
checkedHtml = isChecked ? ' checked="checked"' : '';
|
||||
|
||||
var mirror = (!target.isLocalPlayer && target.supportedCommands.indexOf('DisplayContent') != -1) ? 'true' : 'false';
|
||||
|
||||
html += '<input type="radio" class="radioSelectPlayerTarget" name="radioSelectPlayerTarget" data-mirror="' + mirror + '" data-commands="' + target.supportedCommands.join(',') + '" data-mediatypes="' + target.playableMediaTypes.join(',') + '" data-playername="' + target.playerName + '" data-targetid="' + target.id + '" data-targetname="' + target.name + '" data-devicename="' + (target.deviceName || '') + '" id="' + id + '" value="' + target.id + '"' + checkedHtml + '>';
|
||||
html += '<label for="' + id + '" style="font-weight:normal;">' + target.name;
|
||||
|
||||
if (target.appName && target.appName != target.name) {
|
||||
html += '<br/><span>' + target.appName + '</span>';
|
||||
}
|
||||
|
||||
html += '</label>';
|
||||
if (!playerInfo.isLocalPlayer) {
|
||||
showActivePlayerMenu(playerInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
html += '</fieldset>';
|
||||
Dashboard.showModalLoadingMsg();
|
||||
|
||||
html += '<p class="fieldDescription">' + Globalize.translate('LabelAllPlaysSentToPlayer') + '</p>';
|
||||
MediaController.getTargets().done(function (targets) {
|
||||
|
||||
checkedHtml = MediaController.enableDisplayMirroring() ? ' checked="checked"' : '';
|
||||
var menuItems = targets.map(function (t) {
|
||||
|
||||
html += '<div style="margin-top:1.5em;" class="fldMirrorMode"><label for="chkEnableMirrorMode">' + Globalize.translate('OptionEnableDisplayMirroring') + '</label><input type="checkbox" class="chkEnableMirrorMode" id="chkEnableMirrorMode" data-mini="true"' + checkedHtml + ' /></div>';
|
||||
var name = t.name;
|
||||
|
||||
html += '</form>';
|
||||
if (t.appName && t.appName != t.name) {
|
||||
name += " - " + t.appName;
|
||||
}
|
||||
|
||||
return html;
|
||||
return {
|
||||
name: name,
|
||||
id: t.id,
|
||||
ironIcon: 'tablet-android'
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
require(['actionsheet'], function () {
|
||||
|
||||
Dashboard.hideModalLoadingMsg();
|
||||
|
||||
ActionSheetElement.show({
|
||||
title: Globalize.translate('HeaderSelectPlayer'),
|
||||
items: menuItems,
|
||||
callback: function (id) {
|
||||
|
||||
var target = targets.filter(function (t) {
|
||||
return t.id == id;
|
||||
})[0];
|
||||
|
||||
MediaController.trySetActivePlayer(target.playerName, target);
|
||||
|
||||
mirrorIfEnabled();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function showPlayerSelection() {
|
||||
function showActivePlayerMenu(playerInfo) {
|
||||
|
||||
var promise = MediaController.getTargets();
|
||||
var id = 'dlg' + new Date().getTime();
|
||||
var html = '';
|
||||
|
||||
var html = '<div data-role="panel" data-position="right" data-display="overlay" data-position-fixed="true" id="playerSelectionPanel" data-theme="a">';
|
||||
var style = "";
|
||||
|
||||
html += '<div class="players"></div>';
|
||||
html += '<paper-dialog id="' + id + '" entry-animation="fade-in-animation" exit-animation="fade-out-animation" with-backdrop style="' + style + '">';
|
||||
|
||||
html += '<br/>';
|
||||
html += '<p><a href="nowplaying.html" class="clearLink"><paper-button raised class="block"><iron-icon icon="tablet-android"></iron-icon><span>' + Globalize.translate('ButtonRemoteControl') + '</span></paper-button></a></p>';
|
||||
html += '<h2>';
|
||||
html += (playerInfo.deviceName || playerInfo.name);
|
||||
html += '</h2>';
|
||||
|
||||
html += '<div style="padding:0 2em;">';
|
||||
|
||||
if (playerInfo.supportedCommands.indexOf('DisplayContent') != -1) {
|
||||
|
||||
html += '<div>';
|
||||
var checkedHtml = MediaController.enableDisplayMirroring() ? ' checked' : '';
|
||||
html += '<paper-checkbox class="chkMirror"' + checkedHtml + '>' + Globalize.translate('OptionEnableDisplayMirroring') + '</paper-checkbox>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="buttons">';
|
||||
html += '<paper-button onclick="Dashboard.navigate(\'nowplaying.html\');" dialog-dismiss>' + Globalize.translate('ButtonRemoteControl') + '</paper-button>';
|
||||
html += '<paper-button dialog-dismiss onclick="MediaController.disconnectFromPlayer();">' + Globalize.translate('ButtonDisconnect') + '</paper-button>';
|
||||
html += '<paper-button dialog-dismiss>' + Globalize.translate('ButtonCancel') + '</paper-button>';
|
||||
html += '</div>';
|
||||
|
||||
html += '</paper-dialog>';
|
||||
|
||||
$(document.body).append(html);
|
||||
|
||||
require(['jqmicons']);
|
||||
setTimeout(function () {
|
||||
|
||||
var elem = $('#playerSelectionPanel').panel({}).trigger('create').panel("open").on("panelclose", function () {
|
||||
var dlg = document.getElementById(id);
|
||||
|
||||
$(this).off("panelclose").remove();
|
||||
});
|
||||
$('.chkMirror', dlg).on('change', onMirrorChange);
|
||||
|
||||
promise.done(function (targets) {
|
||||
|
||||
$('.players', elem).html(getTargetsHtml(targets)).trigger('create');
|
||||
|
||||
$('.chkEnableMirrorMode', elem).on('change', function () {
|
||||
MediaController.enableDisplayMirroring(this.checked);
|
||||
dlg.open();
|
||||
|
||||
// Has to be assigned a z-index after the call to .open()
|
||||
$(dlg).on('iron-overlay-closed', function () {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
$('.radioSelectPlayerTarget', elem).off('change').on('change', function () {
|
||||
}, 100);
|
||||
}
|
||||
|
||||
var supportsMirror = this.getAttribute('data-mirror') == 'true';
|
||||
|
||||
if (supportsMirror) {
|
||||
$('.fldMirrorMode', elem).show();
|
||||
} else {
|
||||
$('.fldMirrorMode', elem).hide();
|
||||
}
|
||||
|
||||
var playerName = this.getAttribute('data-playername');
|
||||
var targetId = this.getAttribute('data-targetid');
|
||||
var targetName = this.getAttribute('data-targetname');
|
||||
var deviceName = this.getAttribute('data-deviceName');
|
||||
var playableMediaTypes = this.getAttribute('data-mediatypes').split(',');
|
||||
var supportedCommands = this.getAttribute('data-commands').split(',');
|
||||
|
||||
MediaController.trySetActivePlayer(playerName, {
|
||||
id: targetId,
|
||||
name: targetName,
|
||||
playableMediaTypes: playableMediaTypes,
|
||||
supportedCommands: supportedCommands,
|
||||
deviceName: deviceName
|
||||
|
||||
});
|
||||
|
||||
mirrorIfEnabled();
|
||||
|
||||
});
|
||||
|
||||
if ($('.radioSelectPlayerTarget:checked', elem)[0].getAttribute('data-mirror') == 'true') {
|
||||
$('.fldMirrorMode', elem).show();
|
||||
} else {
|
||||
$('.fldMirrorMode', elem).hide();
|
||||
}
|
||||
});
|
||||
function onMirrorChange() {
|
||||
MediaController.enableDisplayMirroring(this.checked);
|
||||
}
|
||||
|
||||
function bindKeys(controller) {
|
||||
|
@ -369,6 +360,36 @@
|
|||
}
|
||||
};
|
||||
|
||||
self.disconnectFromPlayer = function () {
|
||||
|
||||
var playerInfo = self.getPlayerInfo();
|
||||
|
||||
if (playerInfo.supportedCommands.indexOf('EndSession') != -1) {
|
||||
|
||||
var options = {
|
||||
callback: function (result) {
|
||||
|
||||
if (result == 0) {
|
||||
MediaController.getCurrentPlayer().endSession();
|
||||
}
|
||||
|
||||
if (result != 2) {
|
||||
self.setDefaultPlayerActive();
|
||||
}
|
||||
},
|
||||
message: Globalize.translate('ConfirmEndPlayerSession'),
|
||||
title: Globalize.translate('HeaderDisconnectFromPlayer'),
|
||||
buttons: [Globalize.translate('ButtonYes'), Globalize.translate('ButtonNo'), Globalize.translate('ButtonCancel')]
|
||||
};
|
||||
|
||||
Dashboard.dialog(options);
|
||||
|
||||
} else {
|
||||
|
||||
self.setDefaultPlayerActive();
|
||||
}
|
||||
};
|
||||
|
||||
self.getPlayers = function () {
|
||||
return players;
|
||||
};
|
||||
|
|
|
@ -20,7 +20,6 @@ $.support.cors = true;
|
|||
$(document).one('click', WebNotifications.requestPermission);
|
||||
|
||||
var Dashboard = {
|
||||
|
||||
jQueryMobileInit: function () {
|
||||
|
||||
// Page
|
||||
|
@ -96,7 +95,7 @@ var Dashboard = {
|
|||
var url = getWindowUrl().toLowerCase();
|
||||
|
||||
return url.indexOf('mediabrowser.tv') != -1 ||
|
||||
url.indexOf('emby.media') != -1;
|
||||
url.indexOf('emby.media') != -1;
|
||||
},
|
||||
|
||||
isRunningInCordova: function () {
|
||||
|
@ -244,8 +243,7 @@ var Dashboard = {
|
|||
|
||||
if (document.createStyleSheet) {
|
||||
document.createStyleSheet(url);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
var link = document.createElement('link');
|
||||
link.setAttribute('rel', 'stylesheet');
|
||||
link.setAttribute('type', 'text/css');
|
||||
|
@ -599,6 +597,75 @@ var Dashboard = {
|
|||
}
|
||||
},
|
||||
|
||||
dialog: function (options) {
|
||||
|
||||
var title = options.title;
|
||||
var message = options.message;
|
||||
var buttons = options.buttons;
|
||||
var callback = options.callback;
|
||||
|
||||
// Cordova
|
||||
if (navigator.notification && navigator.notification.confirm && message.indexOf('<') == -1) {
|
||||
|
||||
navigator.notification.confirm(message, function (index) {
|
||||
|
||||
callback(index);
|
||||
|
||||
}, title, buttons.join(','));
|
||||
|
||||
} else {
|
||||
Dashboard.dialogInternal(message, title, buttons, callback);
|
||||
}
|
||||
},
|
||||
|
||||
dialogInternal: function (message, title, buttons, callback) {
|
||||
|
||||
var id = 'paperdlg' + new Date().getTime();
|
||||
|
||||
var html = '<paper-dialog id="' + id + '" role="alertdialog" entry-animation="fade-in-animation" exit-animation="fade-out-animation" with-backdrop>';
|
||||
html += '<h2>' + title + '</h2>';
|
||||
html += '<div>' + message + '</div>';
|
||||
html += '<div class="buttons">';
|
||||
|
||||
var index = 0;
|
||||
html += buttons.map(function (b) {
|
||||
|
||||
var dataIndex = ' data-index="' + index + '"';
|
||||
index++;
|
||||
return '<paper-button class="dialogButton"' + dataIndex + ' dialog-dismiss>' + b + '</paper-button>';
|
||||
|
||||
}).join('');
|
||||
|
||||
html += '</div>';
|
||||
html += '</paper-dialog>';
|
||||
|
||||
$(document.body).append(html);
|
||||
|
||||
// This timeout is obviously messy but it's unclear how to determine when the webcomponent is ready for use
|
||||
// element onload never fires
|
||||
setTimeout(function () {
|
||||
|
||||
var dlg = document.getElementById(id);
|
||||
|
||||
$('.dialogButton', dlg).on('click', function () {
|
||||
|
||||
if (callback) {
|
||||
callback(parseInt(this.getAttribute('data-index')));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Has to be assigned a z-index after the call to .open()
|
||||
$(dlg).on('iron-overlay-closed', function (e) {
|
||||
|
||||
this.parentNode.removeChild(this);
|
||||
});
|
||||
|
||||
dlg.open();
|
||||
|
||||
}, 300);
|
||||
},
|
||||
|
||||
confirm: function (message, title, callback) {
|
||||
|
||||
// Cordova
|
||||
|
@ -619,46 +686,43 @@ var Dashboard = {
|
|||
|
||||
confirmInternal: function (message, title, showCancel, callback) {
|
||||
|
||||
require(['paperbuttonstyle'], function () {
|
||||
var id = 'paperdlg' + new Date().getTime();
|
||||
|
||||
var id = 'paperdlg' + new Date().getTime();
|
||||
var html = '<paper-dialog id="' + id + '" role="alertdialog" entry-animation="fade-in-animation" exit-animation="fade-out-animation" with-backdrop>';
|
||||
html += '<h2>' + title + '</h2>';
|
||||
html += '<div>' + message + '</div>';
|
||||
html += '<div class="buttons">';
|
||||
|
||||
var html = '<paper-dialog id="' + id + '" role="alertdialog" entry-animation="fade-in-animation" exit-animation="fade-out-animation" with-backdrop>';
|
||||
html += '<h2>' + title + '</h2>';
|
||||
html += '<div>' + message + '</div>';
|
||||
html += '<div class="buttons">';
|
||||
html += '<paper-button class="btnConfirm" dialog-confirm autofocus>' + Globalize.translate('ButtonOk') + '</paper-button>';
|
||||
|
||||
if (showCancel) {
|
||||
html += '<paper-button dialog-dismiss>' + Globalize.translate('ButtonCancel') + '</paper-button>';
|
||||
}
|
||||
if (showCancel) {
|
||||
html += '<paper-button dialog-dismiss>' + Globalize.translate('ButtonCancel') + '</paper-button>';
|
||||
}
|
||||
|
||||
html += '<paper-button class="btnConfirm" dialog-confirm autofocus>' + Globalize.translate('ButtonOk') + '</paper-button>';
|
||||
html += '</div>';
|
||||
html += '</paper-dialog>';
|
||||
|
||||
html += '</div>';
|
||||
html += '</paper-dialog>';
|
||||
$(document.body).append(html);
|
||||
|
||||
$(document.body).append(html);
|
||||
// This timeout is obviously messy but it's unclear how to determine when the webcomponent is ready for use
|
||||
// element onload never fires
|
||||
setTimeout(function () {
|
||||
|
||||
// This timeout is obviously messy but it's unclear how to determine when the webcomponent is ready for use
|
||||
// element onload never fires
|
||||
setTimeout(function () {
|
||||
var dlg = document.getElementById(id);
|
||||
|
||||
var dlg = document.getElementById(id);
|
||||
// Has to be assigned a z-index after the call to .open()
|
||||
$(dlg).on('iron-overlay-closed', function (e) {
|
||||
var confirmed = this.closingReason.confirmed;
|
||||
this.parentNode.removeChild(this);
|
||||
|
||||
// Has to be assigned a z-index after the call to .open()
|
||||
$(dlg).on('iron-overlay-closed', function (e) {
|
||||
var confirmed = this.closingReason.confirmed;
|
||||
this.parentNode.removeChild(this);
|
||||
if (callback) {
|
||||
callback(confirmed);
|
||||
}
|
||||
});
|
||||
|
||||
if (callback) {
|
||||
callback(confirmed);
|
||||
}
|
||||
});
|
||||
dlg.open();
|
||||
|
||||
dlg.open();
|
||||
|
||||
}, 300);
|
||||
});
|
||||
}, 300);
|
||||
},
|
||||
|
||||
refreshSystemInfoFromServer: function () {
|
||||
|
|
|
@ -860,5 +860,10 @@
|
|||
"OptionBudget": "Budget",
|
||||
"ForAdditionalLiveTvOptions": "For additional Live TV providers, click on the External Services tab to see the available options.",
|
||||
"ButtonGuide": "Guide",
|
||||
"ButtonRecordedTv": "Recorded TV"
|
||||
"ButtonRecordedTv": "Recorded TV",
|
||||
"HeaderDisconnectFromPlayer": "Disconnect from Player",
|
||||
"ConfirmEndPlayerSession": "Would you like to shutdown the app on the remote device?",
|
||||
"ButtonDisconnect": "Disconnect",
|
||||
"ButtonYes": "Yes",
|
||||
"ButtonNo": "No"
|
||||
}
|
|
@ -421,7 +421,7 @@
|
|||
"ButtonScenes": "Scenes",
|
||||
"ButtonQuality": "Quality",
|
||||
"HeaderNotifications": "Notifications",
|
||||
"HeaderSelectPlayer": "Select Player:",
|
||||
"HeaderSelectPlayer": "Select Player",
|
||||
"ButtonSelect": "Select",
|
||||
"ButtonNew": "New",
|
||||
"MessageInternetExplorerWebm": "For best results with Internet Explorer please install the WebM playback plugin.",
|
||||
|
@ -860,6 +860,7 @@
|
|||
"OptionDatePlayed": "Date Played",
|
||||
"OptionDateAdded": "Date Added",
|
||||
"OptionPlayCount": "Play Count",
|
||||
"ButtonDisconnect": "Disconnect",
|
||||
"ButtonSort": "Sort",
|
||||
"ButtonMenu": "Menu",
|
||||
"ButtonFilter": "Filter",
|
||||
|
@ -870,5 +871,9 @@
|
|||
"OptionBudget": "Budget",
|
||||
"ForAdditionalLiveTvOptions": "For additional Live TV providers, click on the External Services tab to see the available options.",
|
||||
"ButtonGuide": "Guide",
|
||||
"ButtonRecordedTv": "Recorded TV"
|
||||
"ButtonRecordedTv": "Recorded TV",
|
||||
"HeaderDisconnectFromPlayer": "Disconnect from Player",
|
||||
"ConfirmEndPlayerSession": "Would you like to shutdown the app on the remote device?",
|
||||
"ButtonYes": "Yes",
|
||||
"ButtonNo": "No"
|
||||
}
|
||||
|
|
|
@ -307,96 +307,6 @@
|
|||
timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay );
|
||||
};
|
||||
|
||||
// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
// vvvvvvvvvvvvvvvvvvv REMOVE IF NOT SUPPORTING IE6/7/8 vvvvvvvvvvvvvvvvvvv
|
||||
// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
window.attachEvent && !window.addEventListener && !supports_onhashchange && (function(){
|
||||
// Not only do IE6/7 need the "magical" Iframe treatment, but so does IE8
|
||||
// when running in "IE7 compatibility" mode.
|
||||
|
||||
var iframe,
|
||||
iframe_src;
|
||||
|
||||
// When the event is bound and polling starts in IE 6/7, create a hidden
|
||||
// Iframe for history handling.
|
||||
self.start = function(){
|
||||
if ( !iframe ) {
|
||||
iframe_src = $.fn[ str_hashchange ].src;
|
||||
iframe_src = iframe_src && iframe_src + get_fragment();
|
||||
|
||||
// Create hidden Iframe. Attempt to make Iframe as hidden as possible
|
||||
// by using techniques from http://www.paciellogroup.com/blog/?p=604.
|
||||
iframe = $('<iframe tabindex="-1" title="empty"/>').hide()
|
||||
|
||||
// When Iframe has completely loaded, initialize the history and
|
||||
// start polling.
|
||||
.one( 'load', function(){
|
||||
iframe_src || history_set( get_fragment() );
|
||||
poll();
|
||||
})
|
||||
|
||||
// Load Iframe src if specified, otherwise nothing.
|
||||
.attr( 'src', iframe_src || 'javascript:0' )
|
||||
|
||||
// Append Iframe after the end of the body to prevent unnecessary
|
||||
// initial page scrolling (yes, this works).
|
||||
.insertAfter( 'body' )[0].contentWindow;
|
||||
|
||||
// Whenever `document.title` changes, update the Iframe's title to
|
||||
// prettify the back/next history menu entries. Since IE sometimes
|
||||
// errors with "Unspecified error" the very first time this is set
|
||||
// (yes, very useful) wrap this with a try/catch block.
|
||||
doc.onpropertychange = function(){
|
||||
try {
|
||||
if ( event.propertyName === 'title' ) {
|
||||
iframe.document.title = doc.title;
|
||||
}
|
||||
} catch(e) {}
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// Override the "stop" method since an IE6/7 Iframe was created. Even
|
||||
// if there are no longer any bound event handlers, the polling loop
|
||||
// is still necessary for back/next to work at all!
|
||||
self.stop = fn_retval;
|
||||
|
||||
// Get history by looking at the hidden Iframe's location.hash.
|
||||
history_get = function() {
|
||||
return get_fragment( iframe.location.href );
|
||||
};
|
||||
|
||||
// Set a new history item by opening and then closing the Iframe
|
||||
// document, *then* setting its location.hash. If document.domain has
|
||||
// been set, update that as well.
|
||||
history_set = function( hash, history_hash ) {
|
||||
var iframe_doc = iframe.document,
|
||||
domain = $.fn[ str_hashchange ].domain;
|
||||
|
||||
if ( hash !== history_hash ) {
|
||||
// Update Iframe with any initial `document.title` that might be set.
|
||||
iframe_doc.title = doc.title;
|
||||
|
||||
// Opening the Iframe's document after it has been closed is what
|
||||
// actually adds a history entry.
|
||||
iframe_doc.open();
|
||||
|
||||
// Set document.domain for the Iframe document as well, if necessary.
|
||||
domain && iframe_doc.write( '\x3cscript>document.domain="' + domain + '"\x3c/script>' );
|
||||
|
||||
iframe_doc.close();
|
||||
|
||||
// Update the Iframe's hash, for great justice.
|
||||
iframe.location.hash = hash;
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// ^^^^^^^^^^^^^^^^^^^ REMOVE IF NOT SUPPORTING IE6/7/8 ^^^^^^^^^^^^^^^^^^^
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
return self;
|
||||
})();
|
||||
|
||||
|
@ -747,79 +657,6 @@ $.extend( $.expr[ ":" ], {
|
|||
}
|
||||
});
|
||||
|
||||
// support: jQuery <1.8
|
||||
if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
|
||||
$.each( [ "Width", "Height" ], function( i, name ) {
|
||||
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
|
||||
type = name.toLowerCase(),
|
||||
orig = {
|
||||
innerWidth: $.fn.innerWidth,
|
||||
innerHeight: $.fn.innerHeight,
|
||||
outerWidth: $.fn.outerWidth,
|
||||
outerHeight: $.fn.outerHeight
|
||||
};
|
||||
|
||||
function reduce( elem, size, border, margin ) {
|
||||
$.each( side, function() {
|
||||
size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
|
||||
if ( border ) {
|
||||
size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
|
||||
}
|
||||
if ( margin ) {
|
||||
size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
|
||||
}
|
||||
});
|
||||
return size;
|
||||
}
|
||||
|
||||
$.fn[ "inner" + name ] = function( size ) {
|
||||
if ( size === undefined ) {
|
||||
return orig[ "inner" + name ].call( this );
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
$( this ).css( type, reduce( this, size ) + "px" );
|
||||
});
|
||||
};
|
||||
|
||||
$.fn[ "outer" + name] = function( size, margin ) {
|
||||
if ( typeof size !== "number" ) {
|
||||
return orig[ "outer" + name ].call( this, size );
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
$( this).css( type, reduce( this, size, true, margin ) + "px" );
|
||||
});
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
// support: jQuery <1.8
|
||||
if ( !$.fn.addBack ) {
|
||||
$.fn.addBack = function( selector ) {
|
||||
return this.add( selector == null ?
|
||||
this.prevObject : this.prevObject.filter( selector )
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
|
||||
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
|
||||
$.fn.removeData = (function( removeData ) {
|
||||
return function( key ) {
|
||||
if ( arguments.length ) {
|
||||
return removeData.call( this, $.camelCase( key ) );
|
||||
} else {
|
||||
return removeData.call( this );
|
||||
}
|
||||
};
|
||||
})( $.fn.removeData );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// deprecated
|
||||
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue