Module: alfresco/core/CoreRwd

alfresco/core/CoreRwd

Provides a "Response Web Design" solution for widgets. This can be mixed in to widget definitions to allow minimum and maximum browser window widths that the widget will be displayed for. The idea is that different widgets providing the same function are declared in different places within the page model that all have different minRwdWidth and maxRwdWidth values configured so that the user is able to use different controls in different functions. For example; a line of menu bar items may have an alternative rendering as a single popup menu bar item.
Author:
  • Dave Draper
License:
Source:

Members

maxRwdWidth :number

The maximum width (in pixels) that the browser window needs to be for the widgets root DOM node to be displayed.
Type:
  • number
Default Value:
  • null
Source:

minRwdWidth :number

The minimum width (in pixels) that the browser window needs to be for the widgets root DOM node to be displayed.
Type:
  • number
Default Value:
  • null
Source:

Methods

applyRwd()

Gets the current size of the browser window and either hides or shows the widgets root DOM element depending upon the configured minRwdWidth and maxRwdWidth values. If the current window width is bigger than the minimum allowed and less that the maximum allowed then the widget will be displayed.
Source:

postCreate()

Extends the super class implementation to set up an event handler for changes to the browser window size. The applyRwd function will be called on window resize events and is also called immediately to initialise the visibility of the widget.
Source: