Section Footers

From Lianjapedia
Revision as of 08:34, 12 January 2015 by Yvonne.milne (Talk | contribs)

Jump to: navigation, search

Under Construction

Sections can have a Footer displayed at the bottom of the Section. This can be made Visible or hidden. It can display a Caption. It can also have a Custom menu accessed via a cog icon in the bottom left hand corner (in addition to the Caption) or a series of Buttons (no Caption). The Custom menu can trigger a Custom action (SHOWDOCUMENT()) or call an Inline Delegate or script function specified in the the Custom footer menu Custom Delegate.

Double-click on the Section header or click the cog icon to access the Section Attributes. Scroll down to the Footer sub-section.

Visible

Footer: default Visible is False


By default, the Section Footer is not visible.

Footer: set Visible to True


To make the Footer visible, check the Visible attribute to True.

The Footer must be visible to display a Footer Caption or Footer Custom menu.

The Visible attribute can be queried or changed programmatically using Lianja.getElementByID("page.section").footervisible.

Caption

Footer Caption


The Caption attribute is used to specify text to be displayed in the Footer.


Footer Caption with HTML formatting


The Footer Caption can be formatted with HTML.

The Caption attribute can be queried or changed programmatically using Lianja.get("page.section").footercaption.

Height

Footer Height


The Height attribute is used to specify the footer height.

Background color

Footer Background Color


The Background color is used to specify the footer background color.

Click the [...] button to access the 'Select Color' dialog.

Foreground color

The Foreground color is used to specify the footer foreground color.

As above, click the [...] button to access the 'Select Color' dialog.

Note: save (Done) and exit the Section Attributes to see the color change as it is greyed out while the dialog is active.

Custom menu

Footer Menu: default 'cog' menu


The Custom menu attribute is used to specify a comma-separated list of values as the menu items of the Section footer menu.

Footer Menu: running default 'cog' menu


The menu is accessed via the 'cog' icon in the bottom left hand corner of the Section Footer.

Footer Menu: default 'cog' menu and Caption


With a default 'cog' Custom menu, a Caption can also be specified.

Footer Menu


Alternatively, the menu can be displayed as a series of buttons.

To display as centered buttons, prefix the list of values with #.

Note: if the menu items are displayed as buttons, the Caption is not displayed.

Footer Menu


To display as left aligned buttons, prefix the list of values with #<.

Footer Menu


To display as right aligned buttons, prefix the list of values with #>.

Footer Menu


Alternatively, prefix the list with + to display the menu items as horizontally autosized buttons (tablet style buttons).

The Custom menu attribute can be queried or changed programmatically using Lianja.get("page.section").footermenu.

Custom action

Footer Menu: Custom action


When a menu item is selected, the action specified in the Custom action attribute will be performed.

The action is a SHOWDOCUMENT() action.

The selected menu item can be accessed via {}.

If no Custom action is specified, the Custom footer menu Custom Delegate will be checked and run if set.

Footer button CSS

Footer Menu: Button CSS style


If the Footer Custom menu is displayed in button format (#,#<,#> or + prefixes), the Footer button CSS attribute can be used to specify the CSS style for the buttons.

This can be a list of semi-colon separated attributes, or the name of a CSS file. Click the [...] button to create and edit a CSS file.

Footer button width

Footer Menu: Button width


If the Footer Custom menu is displayed in (non-autosized) button format (#,#< or #> prefixes), the Footer button width attribute can be used to specify the width of the buttons.


Custom Delegate: Custom footer menu

If no Custom action is specified, the Custom footer menu Custom Delegate will be run when a menu item is selected.

Footer Menu: Custom delegate inline


This can be a single line inline delegate.

The selected menu item can be accessed via {}.

Footer Menu: Custom delegate script


Or it can be the name of the script function to be called. The selected menu item text is passed to the function as a parameter.

Click the [...] button to create and edit the script function. The Section Scripting Language attribute determines the language used.



Lianja/VFP function example

////////////////////////////////////////////////////////////////
// Event delegate for 'custommenu' event
proc employees_section1_custommenu(action)
	do case
	case action = "page2"
		messagebox("You selected page2")
	case action = "page3"
		messagebox("You selected page3")
	otherwise
		messagebox("You selected page4")
	endcase
endproc

JavaScript function example

////////////////////////////////////////////////////////////////
// Event delegate for 'custommenu' event
function employees_section1_custommenu(action)
{
	if (action == "page2")
	{
		messagebox("You selected page2");
	}
	else if (action == "page3")
	{
		messagebox("You selected page3");
	}
	else
	{
		messagebox("You selected page4");
	}
};