1
0
Fork 0
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:
Luke Pulverenti 2015-12-08 13:57:59 -05:00
parent 76c2164aeb
commit df4f347fb4
9 changed files with 28 additions and 43 deletions

View file

@ -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>';
$('#itemBirthLocation', page).show().html(Globalize.translate('BirthPlaceValue').replace('{0}', gmap)).trigger('create');
$('#itemBirthLocation', page).show().html(Globalize.translate('BirthPlaceValue').replace('{0}', gmap));
} else {
$('#itemBirthLocation', page).hide();
}
@ -461,7 +461,7 @@
}
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 {
$('.artist', page).hide();
}
@ -541,7 +541,7 @@
html += attributes.join('<br/>');
$('.photoInfoContent', page).html(html).trigger('create');
$('.photoInfoContent', page).html(html);
}
function renderTabButtons(page, item) {
@ -765,7 +765,7 @@
if (html) {
html = (item.Status == 'Ended' ? 'Aired ' : 'Airs ') + html;
$('#seriesAirTime', page).show().html(html).trigger('create');
$('#seriesAirTime', page).show().html(html);
} else {
$('#seriesAirTime', page).hide();
}

View file

@ -2617,7 +2617,7 @@
Dashboard.setPageTitle(name);
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 {
nameElem.html(name);
}
@ -2659,7 +2659,7 @@
}
if (html.length) {
parentNameElem.show().html(html.join(' - ')).trigger('create');
parentNameElem.show().html(html.join(' - '));
} else {
parentNameElem.hide();
}
@ -2690,7 +2690,7 @@
html = Globalize.translate('ValueLinks', html);
linksElem.innerHTML = html;
$(linksElem).trigger('create');
$(linksElem);
$(linksElem).show();
} else {

View file

@ -67,7 +67,7 @@
addLayoutButton: true,
currentLayout: view
})).trigger('create');
}));
if (result.TotalRecordCount) {

View file

@ -58,7 +58,7 @@
addLayoutButton: true,
currentLayout: view
})).trigger('create');
}));
if (view == "List") {

View file

@ -699,7 +699,7 @@
// smallIcon: true
// });
// $(".playlist", page).html(html).trigger('create').lazyChildren();
// $(".playlist", page).html(html).lazyChildren();
//});
html += LibraryBrowser.getListViewHtml({

View file

@ -396,7 +396,7 @@ var Dashboard = {
elem.slideDown(400);
}
elem.html(options.html).trigger('create');
elem.html(options.html);
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>';
}
$('.preferencesContainer', elem).html(html).trigger('create');
$('.preferencesContainer', elem).html(html);
},
getPluginSecurityInfo: function () {

View file

@ -179,7 +179,7 @@
//html += '</div>';
//html += '</div>';
$(elem).html(html).trigger('create');
$(elem).html(html);
$('#selectSyncTarget', elem).on('change', function () {

View file

@ -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 += '</button>';
$('.syncJobForm', page).html(html).trigger('create');
$('.syncJobForm', page).html(html);
SyncManager.renderForm({
elem: $('.formFields', page),
dialogOptions: dialogOptions,
@ -125,7 +125,7 @@
html += '</div>';
var elem = $('.jobItems', page).html(html).trigger('create').lazyChildren();
var elem = $('.jobItems', page).html(html).lazyChildren();
$('.btnJobItemMenu', elem).on('click', function () {
showJobItemMenu(this);

View file

@ -85,20 +85,9 @@
})(jQuery, this);
(function ($, undefined) {
var $win = $(window), self;
$.event.special.navigate = self = {
bound: false,
// TODO a lot of duplication between popstate and hashchange
popstate: function (event) {
window.addEventListener('popstate', function (event) {
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) {
@ -112,11 +101,7 @@
}
}));
}, 0);
}
};
window.addEventListener('popstate', self.popstate);
})(jQuery);
});
jQuery.mobile.widgets = {};