update tv guide

This commit is contained in:
Luke Pulverenti 2015-07-23 10:58:27 -04:00
parent 86dea1fa4c
commit 7a39655dca
12 changed files with 81 additions and 30 deletions

View file

@ -91,10 +91,11 @@
var savedKeyPropertyName = 'vbk';
var savedKey = appStorage.getItem(savedKeyPropertyName);
if (savedKey) {
var deferred = DeferredBuilder.Deferred();
deferred.resolveWith(null, [savedKey]);
return deferred.promise();
htmlMediaRenderer.customViblastKey = savedKey;
callback();
return;
}
var headers = {};

View file

@ -203,7 +203,7 @@
}
function closeMainDrawer() {
document.getElementsByClassName('mainDrawerPanel')[0].closeDrawer();
document.querySelector('.mainDrawerPanel').closeDrawer();
}
function ensureDrawerStructure(drawer) {

View file

@ -285,9 +285,12 @@
html += '<div class="channelHeaderCell">';
html += '<a class="channelHeaderCellInner" href="livetvchannel.html?id=' + channel.Id + '">';
html += '<div class="guideChannelInfo">' + channel.Name + '<br/>' + channel.Number + '</div>';
var hasChannelImage = channel.ImageTags.Primary;
var cssClass = hasChannelImage ? 'guideChannelInfo guideChannelInfoWithImage' : 'guideChannelInfo';
if (channel.ImageTags.Primary) {
html += '<div class="' + cssClass + '">' + channel.Name + '<br/>' + channel.Number + '</div>';
if (hasChannelImage) {
var url = ApiClient.getScaledImageUrl(channel.Id, {
maxHeight: 35,

View file

@ -108,7 +108,7 @@
$('#selectListing', page).html(result.map(function (o) {
return '<option value="' + o.Id + '">' + o.name + '</option>';
return '<option value="' + o.Id + '">' + o.Name + '</option>';
})).selectmenu('refresh');

View file

@ -9,6 +9,8 @@
$('#chkMovies', page).checked(config.EnableMovieProviders).checkboxradio("refresh");
$('#txtRecordingPath', page).val(config.RecordingPath || '');
Dashboard.hideLoadingMsg();
}
@ -22,6 +24,7 @@
config.GuideDays = $('#selectGuideDays', form).val() || null;
config.EnableMovieProviders = $('#chkMovies', form).checked();
config.RecordingPath = $('#txtRecordingPath', form).val() || null;
ApiClient.updateNamedConfiguration("livetv", config).done(Dashboard.processServerConfigurationUpdateResult);
});
@ -32,8 +35,26 @@
$(document).on('pageinitdepends', "#liveTvSettingsPage", function () {
var page = this;
$('.liveTvSettingsForm').off('submit', onSubmit).on('submit', onSubmit);
$('#btnSelectRecordingPath', page).on("click.selectDirectory", function () {
var picker = new DirectoryBrowser(page);
picker.show({
callback: function (path) {
if (path) {
$('#txtRecordingPath', page).val(path);
}
picker.close();
}
});
});
}).on('pageshowready', "#liveTvSettingsPage", function () {
Dashboard.showLoadingMsg();

View file

@ -2035,6 +2035,7 @@ var AppInfo = {};
drawerWidth = Math.max(drawerWidth, 240);
// But not exceeding 310
drawerWidth = Math.min(drawerWidth, 310);
drawer.drawerWidth = drawerWidth + "px";
if ($.browser.safari && !AppInfo.isNativeApp) {