The most important thing to note is that the auto-sizing feature is aware of whether the ribbon is fixed at the top of the screen. It is important to know whether your master page has the ribbon fixed at the top of the screen or not in order to customize it to work well with auto-sizing. A ribbon fixed on top of the screen looks like this, with the page content below the ribbon scrollable separately from the ribbon itself:
- The ribbon is inside an element with ID "s4-ribbonrow".
- The remaining page content is inside an element with ID "s4-workspace".
- The element with ID "s4-workspace" is scrollable.
- The <body> element is not scrollable.
- There is no element on the page with ID "s4-ribbonrow".
- The <body> element is scrollable.
The auto-sizing process happens when the hosted page loads. If your master page or any individual pages use dynamic HTML to change the size, position, or amount of content on the page after page load, you may need to re-invoke the auto-sizing process after the dynamic content update in order to obtain a correctly-sized dialog. From within a hosted page, call
window.frameElement.autoSize();to invoke the auto-sizing process. During initial page load, the dialog is hidden and a loading dialog is shown (see below). However, after the page has loaded, re-invoking the auto-sizing process will continue to show the existing dialog while changing its size.
No comments:
Post a Comment