mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove trigger create when not needed
This commit is contained in:
parent
76c2164aeb
commit
df4f347fb4
9 changed files with 28 additions and 43 deletions
|
@ -202,7 +202,7 @@
|
||||||
|
|
||||||
var gmap = '<a class="textlink" target="_blank" href="https://maps.google.com/maps?q=' + item.ProductionLocations[0] + '">' + item.ProductionLocations[0] + '</a>';
|
var gmap = '<a class="textlink" target="_blank" href="https://maps.google.com/maps?q=' + item.ProductionLocations[0] + '">' + item.ProductionLocations[0] + '</a>';
|
||||||
|
|
||||||
$('#itemBirthLocation', page).show().html(Globalize.translate('BirthPlaceValue').replace('{0}', gmap)).trigger('create');
|
$('#itemBirthLocation', page).show().html(Globalize.translate('BirthPlaceValue').replace('{0}', gmap));
|
||||||
} else {
|
} else {
|
||||||
$('#itemBirthLocation', page).hide();
|
$('#itemBirthLocation', page).hide();
|
||||||
}
|
}
|
||||||
|
@ -461,7 +461,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.ArtistItems && item.ArtistItems.length && item.Type != "MusicAlbum") {
|
if (item.ArtistItems && item.ArtistItems.length && item.Type != "MusicAlbum") {
|
||||||
$('.artist', page).show().html(getArtistLinksHtml(item.ArtistItems, context)).trigger('create');
|
$('.artist', page).show().html(getArtistLinksHtml(item.ArtistItems, context));
|
||||||
} else {
|
} else {
|
||||||
$('.artist', page).hide();
|
$('.artist', page).hide();
|
||||||
}
|
}
|
||||||
|
@ -541,7 +541,7 @@
|
||||||
|
|
||||||
html += attributes.join('<br/>');
|
html += attributes.join('<br/>');
|
||||||
|
|
||||||
$('.photoInfoContent', page).html(html).trigger('create');
|
$('.photoInfoContent', page).html(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderTabButtons(page, item) {
|
function renderTabButtons(page, item) {
|
||||||
|
@ -765,7 +765,7 @@
|
||||||
if (html) {
|
if (html) {
|
||||||
html = (item.Status == 'Ended' ? 'Aired ' : 'Airs ') + html;
|
html = (item.Status == 'Ended' ? 'Aired ' : 'Airs ') + html;
|
||||||
|
|
||||||
$('#seriesAirTime', page).show().html(html).trigger('create');
|
$('#seriesAirTime', page).show().html(html);
|
||||||
} else {
|
} else {
|
||||||
$('#seriesAirTime', page).hide();
|
$('#seriesAirTime', page).hide();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2617,7 +2617,7 @@
|
||||||
Dashboard.setPageTitle(name);
|
Dashboard.setPageTitle(name);
|
||||||
|
|
||||||
if (linkToElement) {
|
if (linkToElement) {
|
||||||
nameElem.html('<a class="detailPageParentLink" href="' + LibraryBrowser.getHref(item, context) + '">' + name + '</a>').trigger('create');
|
nameElem.html('<a class="detailPageParentLink" href="' + LibraryBrowser.getHref(item, context) + '">' + name + '</a>');
|
||||||
} else {
|
} else {
|
||||||
nameElem.html(name);
|
nameElem.html(name);
|
||||||
}
|
}
|
||||||
|
@ -2659,7 +2659,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (html.length) {
|
if (html.length) {
|
||||||
parentNameElem.show().html(html.join(' - ')).trigger('create');
|
parentNameElem.show().html(html.join(' - '));
|
||||||
} else {
|
} else {
|
||||||
parentNameElem.hide();
|
parentNameElem.hide();
|
||||||
}
|
}
|
||||||
|
@ -2690,7 +2690,7 @@
|
||||||
html = Globalize.translate('ValueLinks', html);
|
html = Globalize.translate('ValueLinks', html);
|
||||||
|
|
||||||
linksElem.innerHTML = html;
|
linksElem.innerHTML = html;
|
||||||
$(linksElem).trigger('create');
|
$(linksElem);
|
||||||
$(linksElem).show();
|
$(linksElem).show();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
addLayoutButton: true,
|
addLayoutButton: true,
|
||||||
currentLayout: view
|
currentLayout: view
|
||||||
|
|
||||||
})).trigger('create');
|
}));
|
||||||
|
|
||||||
if (result.TotalRecordCount) {
|
if (result.TotalRecordCount) {
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
addLayoutButton: true,
|
addLayoutButton: true,
|
||||||
currentLayout: view
|
currentLayout: view
|
||||||
|
|
||||||
})).trigger('create');
|
}));
|
||||||
|
|
||||||
if (view == "List") {
|
if (view == "List") {
|
||||||
|
|
||||||
|
|
|
@ -699,7 +699,7 @@
|
||||||
// smallIcon: true
|
// smallIcon: true
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// $(".playlist", page).html(html).trigger('create').lazyChildren();
|
// $(".playlist", page).html(html).lazyChildren();
|
||||||
//});
|
//});
|
||||||
|
|
||||||
html += LibraryBrowser.getListViewHtml({
|
html += LibraryBrowser.getListViewHtml({
|
||||||
|
|
|
@ -396,7 +396,7 @@ var Dashboard = {
|
||||||
elem.slideDown(400);
|
elem.slideDown(400);
|
||||||
}
|
}
|
||||||
|
|
||||||
elem.html(options.html).trigger('create');
|
elem.html(options.html);
|
||||||
|
|
||||||
if (options.timeout) {
|
if (options.timeout) {
|
||||||
|
|
||||||
|
@ -750,7 +750,7 @@ var Dashboard = {
|
||||||
html += '<p><a data-mini="true" data-role="button" href="mypreferencesmenu.html?userId=' + user.localUser.Id + '" data-icon="gear">' + Globalize.translate('ButtonSettings') + '</button></a>';
|
html += '<p><a data-mini="true" data-role="button" href="mypreferencesmenu.html?userId=' + user.localUser.Id + '" data-icon="gear">' + Globalize.translate('ButtonSettings') + '</button></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.preferencesContainer', elem).html(html).trigger('create');
|
$('.preferencesContainer', elem).html(html);
|
||||||
},
|
},
|
||||||
|
|
||||||
getPluginSecurityInfo: function () {
|
getPluginSecurityInfo: function () {
|
||||||
|
|
|
@ -179,7 +179,7 @@
|
||||||
//html += '</div>';
|
//html += '</div>';
|
||||||
//html += '</div>';
|
//html += '</div>';
|
||||||
|
|
||||||
$(elem).html(html).trigger('create');
|
$(elem).html(html);
|
||||||
|
|
||||||
$('#selectSyncTarget', elem).on('change', function () {
|
$('#selectSyncTarget', elem).on('change', function () {
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
html += '<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>' + Globalize.translate('ButtonSave') + '</span></paper-button>';
|
html += '<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>' + Globalize.translate('ButtonSave') + '</span></paper-button>';
|
||||||
html += '</button>';
|
html += '</button>';
|
||||||
|
|
||||||
$('.syncJobForm', page).html(html).trigger('create');
|
$('.syncJobForm', page).html(html);
|
||||||
SyncManager.renderForm({
|
SyncManager.renderForm({
|
||||||
elem: $('.formFields', page),
|
elem: $('.formFields', page),
|
||||||
dialogOptions: dialogOptions,
|
dialogOptions: dialogOptions,
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
var elem = $('.jobItems', page).html(html).trigger('create').lazyChildren();
|
var elem = $('.jobItems', page).html(html).lazyChildren();
|
||||||
|
|
||||||
$('.btnJobItemMenu', elem).on('click', function () {
|
$('.btnJobItemMenu', elem).on('click', function () {
|
||||||
showJobItemMenu(this);
|
showJobItemMenu(this);
|
||||||
|
|
|
@ -85,38 +85,23 @@
|
||||||
|
|
||||||
})(jQuery, this);
|
})(jQuery, this);
|
||||||
|
|
||||||
(function ($, undefined) {
|
window.addEventListener('popstate', function (event) {
|
||||||
var $win = $(window), self;
|
var state = event.state || {};
|
||||||
|
|
||||||
$.event.special.navigate = self = {
|
setTimeout(function () {
|
||||||
bound: false,
|
|
||||||
|
|
||||||
// TODO a lot of duplication between popstate and hashchange
|
if (event.historyState) {
|
||||||
popstate: function (event) {
|
$.extend(state, event.historyState);
|
||||||
var state = event.state || {};
|
|
||||||
|
|
||||||
// NOTE we let the current stack unwind because any assignment to
|
|
||||||
// location.hash will stop the world and run this event handler. By
|
|
||||||
// doing this we create a similar behavior to hashchange on hash
|
|
||||||
// assignment
|
|
||||||
setTimeout(function () {
|
|
||||||
|
|
||||||
if (event.historyState) {
|
|
||||||
$.extend(state, event.historyState);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.dispatchEvent(new CustomEvent("navigate", {
|
|
||||||
detail: {
|
|
||||||
state: state,
|
|
||||||
originalEvent: event
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}, 0);
|
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
window.addEventListener('popstate', self.popstate);
|
window.dispatchEvent(new CustomEvent("navigate", {
|
||||||
})(jQuery);
|
detail: {
|
||||||
|
state: state,
|
||||||
|
originalEvent: event
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
|
|
||||||
jQuery.mobile.widgets = {};
|
jQuery.mobile.widgets = {};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue