ModuleLayoutHandler API - v0.4

Documentation for a historical release of Infusion: 1.3
Please view the Infusion Documentation site for the latest documentation.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

ModuleLayoutHandler API - v0.4

A layout object may look like this:

{ id:"t2", columns:[ { id:"c1", children:["portletA","portletB","portletC","portletD"]}, { id:"c2", children:["portletE","portletF"] }, { id:"c3", children:["portletG","portletH","portletI"]} ] }

The ModuleLayoutHandler (unlike the ListLayoutHandler API - v0.4 and GridLayoutHandler API - v0.4) works exclusively with the layou and targetPerms object, and does not query the actual DOM structure. For detailed information about the structure of the layout object, see Layout Customizer Integration - Layout and Permissions - v0.4

targetPerms

A two-dimensional array of binary flags describing the movement permissions of the modules.

For detailed information about the structure of the targetPerms object, see Layout Customizer Integration - Layout and Permissions - v0.4

options (optional)

An optional set of key/value pairs that configure the Layout Handler:

Name

Description

Value

Default

orderChangedCallback

A function to be called each time the order of items has changed, to communicate the new order to the server. The item paramter is optional. (see Order-Changed Callback - v0.4)

a function

function(item) {};

willShowKBDropWarning

A function to be called each time the drop warning is shown. If nothing is provided, the drop warning will be displayed superimposed on the module being moved.

a function

var defaultWillShowKBDropWarning = function (item, dropWarning) { if (dropWarning) { var offset = jQuery(item).offset(); dropWarning = jQuery(dropWarning); dropWarning.css("position", "absolute"); dropWarning.css("top", offset.top); dropWarning.css("left", offset.left); } };