mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Disallow block padding
This commit is contained in:
parent
454b81a037
commit
5e1b6acffe
126 changed files with 2 additions and 2127 deletions
|
@ -5,10 +5,8 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
|||
var dispatchPageEvents;
|
||||
|
||||
viewContainer.setOnBeforeChange(function (newView, isRestored, options) {
|
||||
|
||||
var lastView = currentView;
|
||||
if (lastView) {
|
||||
|
||||
var beforeHideResult = dispatchViewEvent(lastView, null, 'viewbeforehide', true);
|
||||
|
||||
if (!beforeHideResult) {
|
||||
|
@ -36,7 +34,6 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
|||
});
|
||||
|
||||
function onViewChange(view, options, isRestore) {
|
||||
|
||||
var lastView = currentView;
|
||||
if (lastView) {
|
||||
dispatchViewEvent(lastView, null, 'viewhide');
|
||||
|
@ -76,7 +73,6 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
|||
}
|
||||
|
||||
function dispatchViewEvent(view, eventInfo, eventName, isCancellable) {
|
||||
|
||||
if (!eventInfo) {
|
||||
eventInfo = {
|
||||
detail: {
|
||||
|
@ -101,7 +97,6 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
|||
}
|
||||
|
||||
function getViewEventDetail(view, options, isRestore) {
|
||||
|
||||
var url = options.url;
|
||||
var index = url.indexOf('?');
|
||||
var params = index === -1 ? {} : queryString.parse(url.substring(index + 1));
|
||||
|
@ -133,7 +128,6 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
|||
}
|
||||
|
||||
ViewManager.prototype.loadView = function (options) {
|
||||
|
||||
var lastView = currentView;
|
||||
|
||||
// Record the element that has focus
|
||||
|
@ -146,13 +140,11 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
|||
}
|
||||
|
||||
viewContainer.loadView(options).then(function (view) {
|
||||
|
||||
onViewChange(view, options);
|
||||
});
|
||||
};
|
||||
|
||||
ViewManager.prototype.tryRestoreView = function (options, onViewChanging) {
|
||||
|
||||
if (options.cancel) {
|
||||
return Promise.reject({ cancelled: true });
|
||||
}
|
||||
|
@ -163,10 +155,8 @@ define(['viewContainer', 'focusManager', 'queryString', 'layoutManager'], functi
|
|||
}
|
||||
|
||||
return viewContainer.tryRestoreView(options).then(function (view) {
|
||||
|
||||
onViewChanging();
|
||||
onViewChange(view, options, true);
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue