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

channel fixes

This commit is contained in:
Luke Pulverenti 2014-05-18 15:58:42 -04:00
parent 382c0e393c
commit c04ac2c462
7 changed files with 48 additions and 54 deletions

View file

@ -17,7 +17,7 @@
} }
.backdropPage { .backdropPage {
background-color: rgba(0, 0, 0, .85)!important; background-color: rgba(0, 0, 0, .86)!important;
} }
.backdropContainer { .backdropContainer {

View file

@ -8,7 +8,7 @@
<div id="channelTabs" class="itemTabs" style="display: none;"> <div id="channelTabs" class="itemTabs" style="display: none;">
<div class="libraryViewNav scopedLibraryViewNav"> <div class="libraryViewNav scopedLibraryViewNav">
<a href="#" class="ui-btn-active">${TabChannels}</a> <a href="channels.html" class="ui-btn-active">${TabChannels}</a>
</div> </div>
</div> </div>

View file

@ -9,7 +9,7 @@
}; };
function getSavedQueryId() { function getSavedQueryId() {
return 'channels-' + (getParameterByName('categoryId') || ''); return 'channels-' + getParameterByName('id') + (getParameterByName('categoryId') || '');
} }
function showLoadingMessage(page) { function showLoadingMessage(page) {
@ -35,9 +35,7 @@
$('.categoryTitle', page).html(item.Name); $('.categoryTitle', page).html(item.Name);
}); });
if (categoryId) { query.categoryId = categoryId;
query.categoryId = categoryId;
}
$.getJSON(ApiClient.getUrl("Channels/" + channelId + "/Items", query)).done(function (result) { $.getJSON(ApiClient.getUrl("Channels/" + channelId + "/Items", query)).done(function (result) {
@ -55,7 +53,8 @@
shape: "auto", shape: "auto",
context: 'channels', context: 'channels',
showTitle: true, showTitle: true,
centerText: true centerText: true,
coverImage: true
}); });
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
@ -80,6 +79,9 @@
LibraryBrowser.saveQueryValues(getSavedQueryId(), query); LibraryBrowser.saveQueryValues(getSavedQueryId(), query);
}).always(function() {
hideLoadingMessage(page); hideLoadingMessage(page);
}); });
} }

View file

@ -1165,7 +1165,7 @@
} }
if (version.Path) { if (version.Path) {
html += '<div><span class="mediaInfoLabel">Path</span><span class="mediaInfoAttribute">' + version.Path + '</span></div>'; html += '<div style="max-width:600px;overflow:hidden;"><span class="mediaInfoLabel">Path</span><span class="mediaInfoAttribute">' + version.Path + '</span></div>';
} }
if (version.Container) { if (version.Container) {

View file

@ -479,7 +479,11 @@
if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.777777778) < .3) { if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.777777778) < .3) {
options.shape = 'backdrop'; options.shape = 'backdrop';
} }
else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .34) { else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .33) {
options.coverImage = true;
options.shape = 'square';
}
else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.3333334) < .01) {
options.coverImage = true; options.coverImage = true;
options.shape = 'square'; options.shape = 'square';
} }

View file

@ -5,66 +5,63 @@
}, },
load: function (page) { load: function (page) {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
ApiClient.getPluginSecurityInfo().done(function (info) { ApiClient.getPluginSecurityInfo().done(function (info) {
$('#txtSupporterKey', page).val(info.SupporterKey);
$('#txtLegacyKey', page).val(info.LegacyKey);
if ((info.LegacyKey || info.SupporterKey) && !info.IsMBSupporter) { $('#txtSupporterKey', page).val(info.SupporterKey);
if (info.SupporterKey && !info.IsMBSupporter) {
$('#txtSupporterKey', page).addClass("invalidEntry"); $('#txtSupporterKey', page).addClass("invalidEntry");
$('.notSupporter', page).show(); $('.notSupporter', page).show();
} else { } else {
$('#txtSupporterKey', page).removeClass("invalidEntry"); $('#txtSupporterKey', page).removeClass("invalidEntry");
$('.notSupporter', page).hide(); $('.notSupporter', page).hide();
} }
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
}); });
}, },
updateSupporterKey: function () { updateSupporterKey: function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
var form = this; var form = this;
var key = $('#txtSupporterKey', form).val(); var key = $('#txtSupporterKey', form).val();
var legacyKey = $('#txtLegacyKey', form).val();
var info = { var info = {
SupporterKey: key, SupporterKey: key
LegacyKey: legacyKey };
};
ApiClient.updatePluginSecurityInfo(info).done(function () { ApiClient.updatePluginSecurityInfo(info).done(function () {
Dashboard.resetPluginSecurityInfo();
Dashboard.hideLoadingMsg();
if (key) {
Dashboard.alert({ Dashboard.resetPluginSecurityInfo();
message: "Thank you. Your supporter key has been updated.", Dashboard.hideLoadingMsg();
title: "Confirmation"
});
} else { if (key) {
Dashboard.alert({
message: "Thank you. Your supporter key has been removed.",
title: "Confirmation"
});
}
var page = $(form).parents('.page'); Dashboard.alert({
message: "Thank you. Your supporter key has been updated.",
title: "Confirmation"
});
SupporterKeyPage.load(page); } else {
}); Dashboard.alert({
message: "Thank you. Your supporter key has been removed.",
title: "Confirmation"
});
}
var page = $(form).parents('.page');
SupporterKeyPage.load(page);
});
return false; return false;
}, },
linkSupporterKeys: function () { linkSupporterKeys: function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
@ -96,7 +93,7 @@
return false; return false;
}, },
retrieveSupporterKey: function () { retrieveSupporterKey: function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
@ -104,13 +101,13 @@
var email = $('#txtEmail', form).val(); var email = $('#txtEmail', form).val();
var url = "http://mb3admin.com/admin/service/supporter/retrievekey?email="+email; var url = "http://mb3admin.com/admin/service/supporter/retrievekey?email=" + email;
console.log(url); console.log(url);
$.post(url).done(function (res) { $.post(url).done(function (res) {
var result = JSON.parse(res); var result = JSON.parse(res);
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
if (result.Success) { if (result.Success) {
Dashboard.alert("Key emailed to "+email); Dashboard.alert("Key emailed to " + email);
} else { } else {
Dashboard.showError(result.ErrorMessage); Dashboard.showError(result.ErrorMessage);
} }

View file

@ -33,15 +33,6 @@
</p> </p>
</div> </div>
</div>
<div style="margin: 2em 0;">
<label for="txtLegacyKey">MB2 Supporter Key</label>
<input type="password" id="txtLegacyKey" name="txtLegacyKey" />
<div class="fieldDescription">
Some premium plugins may give credit for registrations with previous versions in MB2.
</div>
</div> </div>
<p> <p>
<button type="submit" id="mbLegacyKeyBtn" data-theme="b" data-icon="check">Save</button> <button type="submit" id="mbLegacyKeyBtn" data-theme="b" data-icon="check">Save</button>