Disallow block padding
This commit is contained in:
@@ -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);
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user