1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix search dipping into restricted channels

This commit is contained in:
Luke Pulverenti 2016-06-30 15:01:48 -04:00
parent 0005654885
commit de50f5892d
11 changed files with 24 additions and 304 deletions

View file

@ -128,7 +128,6 @@
html += '<br/>';
html += Globalize.translate('MessageDirectoryPickerLinuxInstruction');
html += '<br/>';
//html += '<a href="http://doc.freenas.org/9.3/freenas_jails.html#add-storage" target="_blank">' + Globalize.translate('ButtonMoreInformation') + '</a>';
}
html += '</p>';

View file

@ -1,4 +1,4 @@
define(['jQuery', 'paper-checkbox', 'paper-button', 'emby-input', 'paper-item-body', 'paper-icon-item', 'paper-icon-button-light'], function ($) {
define(['jQuery', 'registrationservices', 'paper-checkbox', 'paper-button', 'emby-input', 'paper-item-body', 'paper-icon-item', 'paper-icon-button-light'], function ($, registrationServices) {
return function (page, providerId, options) {
@ -8,7 +8,7 @@
if (config && id) {
var result = config.ListingProviders.filter(function(i) {
var result = config.ListingProviders.filter(function (i) {
return i.Id == id;
})[0];
@ -200,6 +200,8 @@
page.querySelector('.btnSubmitListings').classList.add('hide');
}
page.querySelector('.premiereHelp').innerHTML = Globalize.translate('XmlTvPremiere', 24);
$('form', page).on('submit', function () {
submitListingsForm();
return false;
@ -207,6 +209,11 @@
page.querySelector('#btnSelectPath').addEventListener("click", onSelectPathClick);
page.querySelector('.lnkPremiere').addEventListener('click', function (e) {
registrationServices.showPremiereInfo();
e.preventDefault();
});
page.querySelector('.chkAllTuners').addEventListener('change', function (e) {
if (e.target.checked) {
page.querySelector('.selectTunersSection').classList.add('hide');

View file

@ -30,7 +30,6 @@
</div>
</div>
<div>
<br />
<paper-checkbox class="chkAllTuners">${OptionEnableForAllTuners}</paper-checkbox>
<div class="selectTunersSection hide">
<br /><br />
@ -39,7 +38,11 @@
</div>
</div>
</div>
<br /><br />
<br />
<div class="paperList" style="padding:1em;border-radius:5px;">
<div class="premiereHelp"></div>
<a class="lnkPremiere" href="https://emby.media/premiere">${ButtonLearnMore}</a>
</div><br />
<div>
<button is="emby-button" type="submit" class="raised submit block btnSubmitListings hide"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></button>
<button is="emby-button" type="button" class="raised cancel block btnCancel hide" onclick="history.back();"><iron-icon icon="close"></iron-icon><span>${ButtonCancel}</span></button>

View file

@ -1,29 +0,0 @@
paper-fab.keyboard-focus.paper-fab-0 {
background: #444;
}
.channelHeaderCell {
display: block;
}
.guideChannelInfo {
padding-top: 5px;
}
.guideChannelImage {
position: absolute;
top: 0;
right: 5px;
}
.actionSheet {
display: block !important;
}
.actionSheetContent {
display: block !important;
}
.actionSheetMenuItem {
display: block !important;
}

View file

@ -1,57 +0,0 @@
define(['browser', 'appStorage'], function (browser, appStorage) {
require(['css!devices/ie/ie.css']);
var browserSwitchKey = "ieswitchbrowser";
function getWeek(date) {
var onejan = new Date(date.getFullYear(), 0, 1);
return Math.ceil((((date - onejan) / 86400000) + onejan.getDay() + 1) / 7);
}
function onPageShow() {
var msg;
var expectedValue = getWeek(new Date()) + "_7";
if (appStorage.getItem(browserSwitchKey) == expectedValue) {
return;
}
if (!appStorage.getItem(browserSwitchKey)) {
appStorage.setItem(browserSwitchKey, expectedValue);
return;
}
if (navigator.userAgent.toLowerCase().indexOf('windows nt 10.') != -1) {
msg = Globalize.translate('MessageTryMicrosoftEdge');
msg += "<br/><br/>";
msg += '<a href="https://www.microsoft.com/en-us/windows/microsoft-edge" target="_blank">' + Globalize.translate('ButtonLearnMore') + '</a>';
Dashboard.alert({
message: msg,
title: Globalize.translate('HeaderTryMicrosoftEdge')
});
} else if (!browser.mobile) {
msg = Globalize.translate('MessageTryModernBrowser');
msg += "<br/><br/>";
msg += '<a href="https://www.google.com/chrome" target="_blank">' + Globalize.translate('ButtonLearnMore') + '</a>';
Dashboard.alert({
message: msg,
title: Globalize.translate('HeaderTryModernBrowser')
});
}
appStorage.setItem(browserSwitchKey, expectedValue);
}
pageClassOn('pageshow', "libraryPage", onPageShow);
pageClassOn('pageshow', "type-interior", onPageShow);
});

View file

@ -9,6 +9,7 @@
<select is="emby-select" id="selectVideoDecoder" label="${LabelHardwareAccelerationType}">
<option value="">${OptionNone}</option>
<option value="qsv">Intel Quick Sync</option>
<option value="h264_omx">h264_omx</option>
</select>
<div class="fieldDescription">${LabelHardwareAccelerationTypeHelp}</div>
</div>

View file

@ -1,80 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Emby</title>
</head>
<body>
<div class="backdropContainer kidsBackdropContainer" style="top:0;"></div>
<div id="kidsPage" data-role="page" class="page standalonePage noHeaderPage backdropPage staticBackdropPage" style="background-color: rgba(255,255,255,.6)!important;" data-require="scripts/kids">
<div data-role="content" style="padding-left: 0;padding-right:0;">
<div class="kidsWelcome" style="position:absolute;width:100%;">
<div class="btn btnActionAccent" style="z-index:100;max-width:600px;width:80%;text-align:center;margin:0 auto;">
<div style="padding-top:.25em;">${HeaderAdultsReadHere}</div>
<div style="padding: 1em 0; font-weight:normal;">
<div>${KidsModeAdultInstruction}</div>
</div>
<p>
<a data-mini="true" data-role="button" href="#" data-icon="lock" class="lnkPinCode" data-ajax="false" target="_blank">${ButtonConfigurePinCode}</a>
</p>
<button type="button" data-mini="true" data-icon="check" data-inline="true" class="btnDismissWelcome">${ButtonOk}</button>
<a data-mini="true" data-role="button" href="index.html" data-icon="delete" data-inline="true">${ButtonExit}</a>
</div>
</div>
<div class="kidsOptionsLogin" style="position:absolute;width:100%;display:none;">
<div class="btn" style="z-index:100;max-width:600px;width:80%;text-align:center;margin:0 auto;">
<div style="padding-top:.25em;">${HeaderGrownupsOnly}</div>
<form style="font-weight:normal;" class="kidPinForm">
<p>${HeaderToAccessPleaseEnterEasyPinCode}</p>
<div style="text-align:left;">
<div>
<label for="txtPinCode">${LabelPinCode}</label>
<input id="txtPinCode" type="password" />
</div>
</div>
<br />
<button type="submit" data-mini="true" data-icon="check">${ButtonSignIn}</button>
<button type="button" data-mini="true" data-icon="delete" class="btnCancelPin">${ButtonCancel}</button>
</form>
</div>
</div>
<div class="kidsOptions" style="position:absolute;width:100%;display:none;">
<div class="btn" style="z-index:100;max-width:600px;width:80%;text-align:center;margin:0 auto;">
<form class="kidsOptionsForm">
<div style="padding-top:.25em;">${HeaderGrownupsOnly}</div>
<br />
<div style="text-align:left;">
<div data-role="controlgroup">
<label for="chkEnableBackgroundMusic">${LabelEnableBackgroundMusic}</label>
<input type="checkbox" id="chkEnableBackgroundMusic" />
<label for="chkEnableSoundEffects">${LabelEnableSoundEffects}</label>
<input type="checkbox" id="chkEnableSoundEffects" />
</div>
</div>
<button type="submit" data-mini="true" data-icon="check">${ButtonSave}</button>
</form>
<p>${DividerOr}</p>
<a data-mini="true" data-role="button" href="index.html" data-icon="delete">${ButtonExit}</a>
</div>
</div>
<div class="kidContent">
<div style="text-align:center;padding:1em 0 2em;">
<div style="font-size:40px;">Icons</div>
</div>
<div class="itemsContainer" style="white-space:nowrap;overflow-y:hidden;overflow-x:auto;"></div>
</div>
<button type="button" data-role="none" class="imageButton btnOptions" style="font-size:32px;color: rgba(0,0,0,.4); position: fixed; bottom: 0;right: 15px;z-index:101;">
<i class="fa fa-lock"></i>
</button>
</div>
</div>
</body>
</html>

View file

@ -1,123 +0,0 @@
define(['jQuery'], function ($) {
function showSignIn(page) {
$('.kidsOptionsLogin', page).fadeIn();
$('#txtPinCode', page).val('');
$('.btnOptions', page).hide();
$('.kidContent', page).hide();
}
function validatePin(page) {
}
function loadContent(page) {
var options = {
SortBy: "Random",
SortOrder: "Descending",
MediaTypes: "Video",
Limit: 100,
Recursive: true,
Fields: "PrimaryImageAspectRatio",
ExcludeLocationTypes: "Virtual",
ImageTypeLimit: 1,
EnableImageTypes: "Primary,Backdrop,Thumb"
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).then(function (result) {
$('.itemsContainer', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "horizontalBackdrop",
preferThumb: true,
overlayText: true,
lazy: true,
defaultAction: 'play',
coverImage: true,
enableImageEnhancers: false
})).lazyChildren();
});
}
function onPinSubmit() {
var page = $(this).parents('.page');
if (validatePin(page)) {
$('.kidsOptionsLogin', page).hide();
$('.kidsOptions', page).fadeIn();
} else {
Dashboard.alert({
message: 'Invalid pin code entered. Please try again.',
title: 'Input Error'
});
}
return false;
}
function onOptionsSubmit() {
var page = $(this).parents('.page');
$('.kidsOptions', page).fadeOut();
$('.btnOptions', page).show();
$('.kidContent', page).show();
return false;
}
$(document).on('pageshow', "#kidsPage", function () {
var page = this;
var userId = Dashboard.getCurrentUserId();
$('.kidContent', page).hide();
$('.kidsWelcome', page).show();
$('.lnkPinCode', page).attr('href', 'myprofile.html?userId=' + userId);
$('.btnOptions', page).buttonEnabled(false);
$('.kidsOptionsLogin', page).hide();
$('.kidsOptions', page).hide();
$('.kidsBackdropContainer').css('background-image', 'url(css/images/kids/bg.jpg)');
}).on('pageinit', "#kidsPage", function () {
var page = this;
$('.btnDismissWelcome', page).on('click', function () {
$('.kidsWelcome', page).fadeOut();
$('.btnOptions', page).buttonEnabled(true);
$('.kidContent', page).show();
loadContent(page);
});
$('.btnOptions', page).on('click', function () {
showSignIn(page);
});
$('.btnCancelPin', page).on('click', function () {
$('.kidsOptionsLogin', page).fadeOut();
$('.btnOptions', page).show();
$('.kidContent', page).show();
});
$('.kidPinForm').off('submit', onPinSubmit).on('submit', onPinSubmit);
$('.kidsOptionsForm').off('submit', onOptionsSubmit).on('submit', onOptionsSubmit);
});
});

View file

@ -1,4 +1,4 @@
define(['appStorage'], function (appStorage) {
define(['appStorage', 'shell'], function (appStorage, shell) {
var supporterPlaybackKey = 'lastSupporterPlaybackMessage4';
@ -190,7 +190,6 @@
}
window.RegistrationServices = {
renderPluginInfo: function (page, pkg, pluginSecurityInfo) {
require(['jQuery'], function ($) {
@ -213,8 +212,7 @@
if (expDateTime <= nowTime) {
regStatus += "<p style='color:red;'>";
regStatus += Globalize.translate('MessageTrialExpired');
}
else if (expDateTime > new Date(1970, 1, 1).getTime()) {
} else if (expDateTime > new Date(1970, 1, 1).getTime()) {
regStatus += "<p style='color:blue;'>";
regStatus += Globalize.translate('MessageTrialWillExpireIn').replace('{0}', Math.round(expDateTime - nowTime) / (86400000));
@ -294,6 +292,10 @@
resolve();
}
});
},
showPremiereInfo: function () {
shell.openUrl('https://emby.media/premiere');
}
};

View file

@ -3149,10 +3149,6 @@ var AppInfo = {};
}
}
if (browserInfo.msie) {
deps.push('devices/ie/ie');
}
deps.push('scripts/librarylist');
deps.push('scripts/librarymenu');

View file

@ -2384,5 +2384,6 @@
"UnzipFFmpegFile": "Unzip the downloaded file to a folder of your choice.",
"OptionUseSystemInstalledVersion": "Use system installed version",
"OptionUseMyCustomVersion": "Use a custom version",
"FFmpegSavePathNotFound": "We're unable to locaate FFmpeg using the path you've entered. FFprobe is also required and must exist in the same folder. These components are normally bundled together in the same download. Please check the path and try again."
"FFmpegSavePathNotFound": "We're unable to locaate FFmpeg using the path you've entered. FFprobe is also required and must exist in the same folder. These components are normally bundled together in the same download. Please check the path and try again.",
"XmlTvPremiere": "By default, Emby will import {0} hours of guide data. Importing unlimited data requires an active Emby Premiere subscription."
}