mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixed remote control flyout
This commit is contained in:
parent
54417bdc37
commit
a2a7a7c124
5 changed files with 28 additions and 26 deletions
|
@ -1,4 +1,4 @@
|
||||||
#remoteControlFlyout {
|
.remoteControlFlyout {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
min-height: 400px;
|
min-height: 400px;
|
||||||
}
|
}
|
||||||
|
@ -69,13 +69,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-height: 500px) {
|
@media all and (min-height: 500px) {
|
||||||
#remoteControlFlyout {
|
.remoteControlFlyout {
|
||||||
min-height: 450px;
|
min-height: 450px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-height: 600px) {
|
@media all and (min-height: 600px) {
|
||||||
#remoteControlFlyout {
|
.remoteControlFlyout {
|
||||||
min-height: 500px;
|
min-height: 500px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,19 +87,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 400px) {
|
@media all and (min-width: 400px) {
|
||||||
#remoteControlFlyout {
|
.remoteControlFlyout {
|
||||||
width: 360px;
|
width: 360px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 500px) {
|
@media all and (min-width: 500px) {
|
||||||
#remoteControlFlyout {
|
.remoteControlFlyout {
|
||||||
width: 450px;
|
width: 450px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 600px) {
|
@media all and (min-width: 600px) {
|
||||||
#remoteControlFlyout {
|
.remoteControlFlyout {
|
||||||
width: 550px;
|
width: 550px;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -25,10 +25,10 @@
|
||||||
<div style="margin: -25px 0 1em;">
|
<div style="margin: -25px 0 1em;">
|
||||||
|
|
||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;">
|
||||||
<a class="lnkBrowseImages lnkBrowseAllImages hide" href="#popupDownload" data-rel="popup" data-position-to="window" data-role="button" data-inline="true" data-icon="cloud" data-mini="true" data-transition="pop">Browse Online Images</a>
|
<a class="lnkBrowseImages lnkBrowseAllImages hide" href="#popupDownload" data-rel="popup" data-position-to="window" data-role="button" data-inline="true" data-icon="cloud" data-mini="true" data-transition="pop">Browse Images</a>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;">
|
||||||
<a href="#popupUpload" data-rel="popup" data-position-to="window" data-role="button" data-inline="true" data-icon="plus" data-mini="true" data-transition="pop">Upload Image</a>
|
<a href="#popupUpload" data-rel="popup" data-position-to="window" data-role="button" data-inline="true" data-icon="plus" data-mini="true" data-transition="pop">Upload</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -442,8 +442,8 @@
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<br />
|
<br />
|
||||||
<label for="enableInternetProviders">Lock this item to prevent future changes.</label>
|
<label for="chkLockData">Lock this item to prevent future changes.</label>
|
||||||
<input data-mini="true" type="checkbox" id="enableInternetProviders" onchange="EditItemMetadataPage.setProviderSettingsContainerVisibility(this)" />
|
<input data-mini="true" type="checkbox" id="chkLockData" onchange="EditItemMetadataPage.setProviderSettingsContainerVisibility(this)" />
|
||||||
</p>
|
</p>
|
||||||
<div id="providerSettingsContainer" style="display: none">
|
<div id="providerSettingsContainer" style="display: none">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
var htmlName = "<div class='" + cssClass + "'>";
|
var htmlName = "<div class='" + cssClass + "'>";
|
||||||
|
|
||||||
if (item.EnableInternetProviders === false) {
|
if (item.LockData) {
|
||||||
htmlName += '<img src="css/images/editor/lock.png" />';
|
htmlName += '<img src="css/images/editor/lock.png" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -858,12 +858,12 @@
|
||||||
populateListView($('#listTags', page), item.Tags);
|
populateListView($('#listTags', page), item.Tags);
|
||||||
populateListView($('#listKeywords', page), item.Keywords);
|
populateListView($('#listKeywords', page), item.Keywords);
|
||||||
|
|
||||||
var enableInternetProviders = (item.EnableInternetProviders || false);
|
var lockData = (item.LockData || false);
|
||||||
$("#enableInternetProviders", page).attr('checked', !enableInternetProviders).checkboxradio('refresh');
|
var chkLockData = $("#chkLockData", page).attr('checked', lockData).checkboxradio('refresh');
|
||||||
if (enableInternetProviders) {
|
if (chkLockData.checked()) {
|
||||||
$('#providerSettingsContainer', page).show();
|
|
||||||
} else {
|
|
||||||
$('#providerSettingsContainer', page).hide();
|
$('#providerSettingsContainer', page).hide();
|
||||||
|
} else {
|
||||||
|
$('#providerSettingsContainer', page).show();
|
||||||
}
|
}
|
||||||
populateInternetProviderSettings(page, item, item.LockedFields);
|
populateInternetProviderSettings(page, item, item.LockedFields);
|
||||||
|
|
||||||
|
@ -1222,7 +1222,7 @@
|
||||||
OfficialRating: $('#selectOfficialRating', form).val(),
|
OfficialRating: $('#selectOfficialRating', form).val(),
|
||||||
CustomRating: $('#selectCustomRating', form).val(),
|
CustomRating: $('#selectCustomRating', form).val(),
|
||||||
People: currentItem.People,
|
People: currentItem.People,
|
||||||
EnableInternetProviders: !$("#enableInternetProviders", form).prop('checked'),
|
LockData: $("#chkLockData", form).prop('checked'),
|
||||||
LockedFields: $('.selectLockedField', form).map(function () {
|
LockedFields: $('.selectLockedField', form).map(function () {
|
||||||
var value = $(this).val();
|
var value = $(this).val();
|
||||||
if (value != '') return value;
|
if (value != '') return value;
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
|
|
||||||
var item = options.item;
|
var item = options.item;
|
||||||
|
|
||||||
var html = '<div data-role="popup" id="remoteControlFlyout" data-transition="slidedown" data-theme="a">';
|
var html = '<div data-role="popup" class="remoteControlFlyout" data-transition="slidedown" data-theme="a">';
|
||||||
|
|
||||||
html += '<a href="#" data-rel="back" data-role="button" data-icon="delete" data-iconpos="notext" class="ui-btn-right" data-theme="b">Close</a>';
|
html += '<a href="#" data-rel="back" data-role="button" data-icon="delete" data-iconpos="notext" class="ui-btn-right" data-theme="b">Close</a>';
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
|
|
||||||
$(document.body).append(html);
|
$(document.body).append(html);
|
||||||
|
|
||||||
var popup = $('#remoteControlFlyout').popup({ history: false, tolerance: 0, corners: false }).trigger('create').popup("open").on("popupafterclose", function () {
|
var popup = $('.remoteControlFlyout').popup({ history: false, tolerance: 0, corners: false }).trigger('create').popup("open").on("popupafterclose", function () {
|
||||||
|
|
||||||
if (ApiClient.isWebSocketOpen()) {
|
if (ApiClient.isWebSocketOpen()) {
|
||||||
ApiClient.sendWebSocketMessage("SessionsStop");
|
ApiClient.sendWebSocketMessage("SessionsStop");
|
||||||
|
@ -109,6 +109,8 @@
|
||||||
$(ApiClient).off("websocketmessage.remotecontrol");
|
$(ApiClient).off("websocketmessage.remotecontrol");
|
||||||
|
|
||||||
$(this).off("popupafterclose").remove();
|
$(this).off("popupafterclose").remove();
|
||||||
|
|
||||||
|
$('.remoteControlFlyout').popup("destroy").remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
popup.on('click', '.trSession', function () {
|
popup.on('click', '.trSession', function () {
|
||||||
|
@ -131,7 +133,7 @@
|
||||||
var checkboxes = $('.chkClient', popup);
|
var checkboxes = $('.chkClient', popup);
|
||||||
|
|
||||||
if (!checkboxes.length) {
|
if (!checkboxes.length) {
|
||||||
$('#remoteControlFlyout').popup("close");
|
$('.remoteControlFlyout').popup("close");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,7 +358,7 @@
|
||||||
|
|
||||||
renderVideos(themeSongsElem, result.Items, 'Theme Songs');
|
renderVideos(themeSongsElem, result.Items, 'Theme Songs');
|
||||||
|
|
||||||
$('#remoteControlFlyout').popup("reposition", { tolerance: 0 });
|
$('.remoteControlFlyout').popup("reposition", { tolerance: 0 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -445,7 +447,7 @@
|
||||||
|
|
||||||
if (!sessions.length) {
|
if (!sessions.length) {
|
||||||
elem.html('<p>There are currently no available media browser sessions to control.</p>');
|
elem.html('<p>There are currently no available media browser sessions to control.</p>');
|
||||||
$('#remoteControlFlyout').popup("reposition", {});
|
$('.remoteControlFlyout').popup("reposition", {});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -542,8 +544,6 @@
|
||||||
$('.tdSelectSession', elem).html('<input type="radio" class="chkClient" name="chkClient" />');
|
$('.tdSelectSession', elem).html('<input type="radio" class="chkClient" name="chkClient" />');
|
||||||
|
|
||||||
$('.chkClient:first', elem).checked(true);
|
$('.chkClient:first', elem).checked(true);
|
||||||
|
|
||||||
$('#remoteControlFlyout').popup("reposition", { tolerance: 0 });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSessionNowPlayingTime(session) {
|
function getSessionNowPlayingTime(session) {
|
||||||
|
@ -642,7 +642,7 @@
|
||||||
|
|
||||||
function showMenu(sessions, options) {
|
function showMenu(sessions, options) {
|
||||||
|
|
||||||
var html = '<div data-role="popup" data-transition="slidedown" id="remoteControlFlyout" data-theme="a">';
|
var html = '<div data-role="popup" data-transition="slidedown" class="remoteControlFlyout" data-theme="a">';
|
||||||
|
|
||||||
html += '<a href="#" data-rel="back" data-role="button" data-icon="delete" data-iconpos="notext" class="ui-btn-right" data-theme="b">Close</a>';
|
html += '<a href="#" data-rel="back" data-role="button" data-icon="delete" data-iconpos="notext" class="ui-btn-right" data-theme="b">Close</a>';
|
||||||
|
|
||||||
|
@ -702,7 +702,7 @@
|
||||||
|
|
||||||
$(document.body).append(html);
|
$(document.body).append(html);
|
||||||
|
|
||||||
var popup = $('#remoteControlFlyout').popup({ history: false, tolerance: 0, corners: false }).trigger('create').popup("open").on("popupafterclose", function () {
|
var popup = $('.remoteControlFlyout').popup({ history: false, tolerance: 0, corners: false }).trigger('create').popup("open").on("popupafterclose", function () {
|
||||||
|
|
||||||
if (ApiClient.isWebSocketOpen()) {
|
if (ApiClient.isWebSocketOpen()) {
|
||||||
ApiClient.sendWebSocketMessage("SessionsStop");
|
ApiClient.sendWebSocketMessage("SessionsStop");
|
||||||
|
@ -711,6 +711,8 @@
|
||||||
$(ApiClient).off("websocketmessage.remotecontrol");
|
$(ApiClient).off("websocketmessage.remotecontrol");
|
||||||
|
|
||||||
$(this).off("popupafterclose").remove();
|
$(this).off("popupafterclose").remove();
|
||||||
|
|
||||||
|
$('.remoteControlFlyout').popup("destroy").remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
renderSessionsInControlMenu(popup, sessions, options);
|
renderSessionsInControlMenu(popup, sessions, options);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue