mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update jqm
This commit is contained in:
parent
6b21f2fbd0
commit
8996ae4eab
39 changed files with 1162 additions and 686 deletions
|
@ -117,12 +117,6 @@
|
|||
$('.btnSync', page).addClass('hide');
|
||||
}
|
||||
|
||||
if (LibraryBrowser.canShare(item, user)) {
|
||||
$('.btnShare', page).removeClass('hide');
|
||||
} else {
|
||||
$('.btnShare', page).addClass('hide');
|
||||
}
|
||||
|
||||
if (item.Type == 'Program' && item.TimerId) {
|
||||
$('.btnCancelRecording', page).removeClass('hide');
|
||||
} else {
|
||||
|
@ -1747,13 +1741,6 @@
|
|||
deleteTimer(page, currentItem.TimerId);
|
||||
});
|
||||
|
||||
$('.btnShare', page).on('click', function () {
|
||||
|
||||
require(['sharingmanager'], function () {
|
||||
SharingManager.showMenu(Dashboard.getCurrentUserId(), currentItem.Id);
|
||||
});
|
||||
});
|
||||
|
||||
$('.btnMoreCommands', page).on('click', function () {
|
||||
|
||||
var button = this;
|
||||
|
|
|
@ -670,6 +670,10 @@
|
|||
commands.push('download');
|
||||
}
|
||||
|
||||
if (LibraryBrowser.canShare(item, user)) {
|
||||
commands.push('share');
|
||||
}
|
||||
|
||||
return commands;
|
||||
},
|
||||
|
||||
|
@ -760,6 +764,14 @@
|
|||
});
|
||||
}
|
||||
|
||||
if (commands.indexOf('share') != -1) {
|
||||
items.push({
|
||||
name: Globalize.translate('ButtonShare'),
|
||||
id: 'share',
|
||||
ironIcon: 'share'
|
||||
});
|
||||
}
|
||||
|
||||
require(['actionsheet'], function () {
|
||||
|
||||
ActionSheetElement.show({
|
||||
|
@ -769,6 +781,11 @@
|
|||
|
||||
switch (id) {
|
||||
|
||||
case 'share':
|
||||
require(['sharingmanager'], function () {
|
||||
SharingManager.showMenu(Dashboard.getCurrentUserId(), itemId);
|
||||
});
|
||||
break;
|
||||
case 'addtocollection':
|
||||
BoxSetEditor.showPanel([itemId]);
|
||||
break;
|
||||
|
|
|
@ -171,7 +171,8 @@
|
|||
|
||||
function onCardTapHold(e) {
|
||||
|
||||
showContextMenu(this, {});
|
||||
var card = parentWithClass(e.target, 'card');
|
||||
showContextMenu(card, {});
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
|
@ -423,6 +424,7 @@
|
|||
break;
|
||||
case 'album':
|
||||
Dashboard.navigate('itemdetails.html?id=' + albumid);
|
||||
break;
|
||||
case 'record':
|
||||
Dashboard.navigate('livetvnewrecording.html?programid=' + itemId);
|
||||
break;
|
||||
|
@ -483,16 +485,24 @@
|
|||
|
||||
function onListViewMenuButtonClick(e) {
|
||||
|
||||
showContextMenu(this, {});
|
||||
var btn = parentWithClass(e.target, 'listviewMenuButton') || parentWithClass(e.target, 'cardOverlayMoreButton');
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
if (btn) {
|
||||
showContextMenu(btn, {});
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function onListViewPlayButtonClick(e) {
|
||||
|
||||
var playButton = this;
|
||||
var card = this;
|
||||
var playButton = parentWithClass(e.target, 'cardOverlayPlayButton');
|
||||
|
||||
if (!playButton) {
|
||||
return;
|
||||
}
|
||||
var card = e.target;
|
||||
|
||||
if (!card.classList.contains('card') && !card.classList.contains('listItem')) {
|
||||
card = $(card).parents('.listItem,.card')[0];
|
||||
|
@ -535,7 +545,11 @@
|
|||
|
||||
function onGroupedCardClick(e) {
|
||||
|
||||
var card = this;
|
||||
var card = parentWithClass(e.target, 'groupedCard');
|
||||
|
||||
if (!card) {
|
||||
return;
|
||||
}
|
||||
var itemId = card.getAttribute('data-itemid');
|
||||
var context = card.getAttribute('data-context');
|
||||
|
||||
|
@ -794,13 +808,31 @@
|
|||
});
|
||||
}
|
||||
|
||||
function parentWithClass(elem, className) {
|
||||
|
||||
while (!elem.classList || !elem.classList.contains(className)) {
|
||||
elem = elem.parentNode;
|
||||
|
||||
if (!elem) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return elem;
|
||||
}
|
||||
|
||||
function onCardClick(e) {
|
||||
|
||||
var targetElem = parentWithClass(e.target, 'mediaItem');
|
||||
|
||||
if (!targetElem) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isClickable(targetElem)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var targetElem = e.target;
|
||||
if (targetElem.classList.contains('itemSelectionPanel') || this.querySelector('.itemSelectionPanel')) {
|
||||
return;
|
||||
}
|
||||
|
@ -923,20 +955,17 @@
|
|||
preventHover = true;
|
||||
}
|
||||
|
||||
this.off('contextmenu', '.card', onCardTapHold);
|
||||
this.on('contextmenu', '.card', onCardTapHold);
|
||||
this.off('contextmenu', onCardTapHold);
|
||||
this.on('contextmenu', onCardTapHold);
|
||||
|
||||
this.off('click', '.groupedCard', onGroupedCardClick);
|
||||
this.on('click', '.groupedCard', onGroupedCardClick);
|
||||
this.off('click', onGroupedCardClick);
|
||||
this.on('click', onGroupedCardClick);
|
||||
|
||||
this.off('click', '.listviewMenuButton', onListViewMenuButtonClick);
|
||||
this.on('click', '.listviewMenuButton', onListViewMenuButtonClick);
|
||||
this.off('click', onListViewMenuButtonClick);
|
||||
this.on('click', onListViewMenuButtonClick);
|
||||
|
||||
this.off('click', '.cardOverlayMoreButton', onListViewMenuButtonClick);
|
||||
this.on('click', '.cardOverlayMoreButton', onListViewMenuButtonClick);
|
||||
|
||||
this.off('click', '.cardOverlayPlayButton', onListViewPlayButtonClick);
|
||||
this.on('click', '.cardOverlayPlayButton', onListViewPlayButtonClick);
|
||||
this.off('click', onListViewPlayButtonClick);
|
||||
this.on('click', onListViewPlayButtonClick);
|
||||
|
||||
if (!AppInfo.isTouchPreferred) {
|
||||
this.off('mouseenter', '.card:not(.bannerCard) .cardContent', onHoverIn);
|
||||
|
@ -949,8 +978,8 @@
|
|||
this.on("touchstart", '.card:not(.bannerCard) .cardContent', preventTouchHover);
|
||||
}
|
||||
|
||||
this.off('click', '.mediaItem', onCardClick);
|
||||
this.on('click', '.mediaItem', onCardClick);
|
||||
this.off('click', onCardClick);
|
||||
this.on('click', onCardClick);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
|
|
@ -144,6 +144,7 @@
|
|||
|
||||
function onRecordClick() {
|
||||
$('.itemFlyout').popup('close');
|
||||
|
||||
Dashboard.navigate('livetvnewrecording.html?programid=' + this.getAttribute('data-id'));
|
||||
}
|
||||
|
||||
|
|
|
@ -18,13 +18,6 @@
|
|||
return 'livetvitems2' + (query.ParentId || '');
|
||||
}
|
||||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
$('#selectView', page).val(view);
|
||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||
$('#selectPageSize', page).val(query.Limit);
|
||||
}
|
||||
|
||||
function reloadItems(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
@ -39,14 +32,11 @@
|
|||
startIndex: query.StartIndex,
|
||||
limit: query.Limit,
|
||||
totalRecordCount: result.TotalRecordCount,
|
||||
viewButton: true,
|
||||
showLimit: false
|
||||
});
|
||||
|
||||
page.querySelector('.listTopPaging').innerHTML = pagingHtml;
|
||||
|
||||
updateFilterControls(page);
|
||||
|
||||
if (view == "Poster") {
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
|
@ -95,52 +85,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#liveTvItemsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('#selectView', this).on('change', function () {
|
||||
|
||||
view = this.value;
|
||||
|
||||
reloadItems(page);
|
||||
|
||||
LibraryBrowser.saveViewSetting(getSavedQueryKey(), view);
|
||||
});
|
||||
|
||||
$('#radioBasicFilters', this).on('change', function () {
|
||||
|
||||
if (this.checked) {
|
||||
$('.basicFilters', page).show();
|
||||
$('.advancedFilters', page).hide();
|
||||
} else {
|
||||
$('.basicFilters', page).hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('#radioAdvancedFilters', this).on('change', function () {
|
||||
|
||||
if (this.checked) {
|
||||
$('.advancedFilters', page).show();
|
||||
$('.basicFilters', page).hide();
|
||||
} else {
|
||||
$('.advancedFilters', page).hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.itemsContainer', page).on('needsrefresh', function () {
|
||||
|
||||
reloadItems(page);
|
||||
|
||||
});
|
||||
|
||||
$('#selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#liveTvItemsPage", function () {
|
||||
$(document).on('pagebeforeshow', "#liveTvItemsPage", function () {
|
||||
|
||||
query.ParentId = LibraryMenu.getTopParentId();
|
||||
|
||||
|
@ -163,16 +108,7 @@
|
|||
|
||||
QueryFilters.onPageShow(page, query);
|
||||
|
||||
LibraryBrowser.getSavedViewSetting(viewkey).done(function (val) {
|
||||
|
||||
if (val) {
|
||||
$('#selectView', page).val(val).trigger('change');
|
||||
} else {
|
||||
reloadItems(page);
|
||||
}
|
||||
});
|
||||
|
||||
updateFilterControls(page);
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
|
@ -342,6 +342,21 @@
|
|||
]
|
||||
});
|
||||
|
||||
// These don't play very well
|
||||
if (isVlc) {
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'VideoAudio',
|
||||
Codec: 'dca',
|
||||
Conditions: [
|
||||
{
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'AudioChannels',
|
||||
Value: 6
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
if (isVlc) {
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'Video',
|
||||
|
|
|
@ -2113,6 +2113,11 @@ var AppInfo = {};
|
|||
return {};
|
||||
});
|
||||
|
||||
define("jqmcollapsible", ["jqmicons", "thirdparty/jquerymobile-1.4.5/jqm.collapsible"], function () {
|
||||
Dashboard.importCss('thirdparty/jquerymobile-1.4.5/jqm.collapsible.css');
|
||||
return {};
|
||||
});
|
||||
|
||||
define("hammer", ["bower_components/hammerjs/hammer.min"], function (Hammer) {
|
||||
return Hammer;
|
||||
});
|
||||
|
@ -2194,6 +2199,7 @@ var AppInfo = {};
|
|||
depends.push('jqmicons');
|
||||
depends.push('jqmpopup');
|
||||
depends.push('jqmlistview');
|
||||
depends.push('jqmcollapsible');
|
||||
}
|
||||
|
||||
require(depends, function () {
|
||||
|
@ -2320,7 +2326,7 @@ $(document).on('pagecreate', ".page", function () {
|
|||
var isSettingsPage = page.classList.contains('type-interior');
|
||||
|
||||
if (isSettingsPage) {
|
||||
require(['jqmicons', 'jqmlistview']);
|
||||
|
||||
Dashboard.ensureToolsMenu(page);
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
|
|
@ -196,7 +196,7 @@
|
|||
|
||||
function showSyncMenu(options) {
|
||||
|
||||
requirejs(["scripts/registrationservices"], function () {
|
||||
requirejs(["scripts/registrationservices", "jqmcollapsible"], function () {
|
||||
RegistrationServices.validateFeature('sync').done(function () {
|
||||
showSyncMenuInternal(options);
|
||||
});
|
||||
|
@ -244,7 +244,6 @@
|
|||
html += '</div>';
|
||||
|
||||
$(document.body).append(html);
|
||||
require(['paperbuttonstyle']);
|
||||
|
||||
var elem = $('.syncPanel').panel({}).trigger('create').panel("open").on("panelclose", function () {
|
||||
$(this).off("panelclose").remove();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue