Difference between revisions of "Section Footers"

From Lianjapedia
Jump to: navigation, search
Line 232: Line 232:
  
  
==Footer==
+
==Notes on Client Support==
 
{| class="wikitable" width="100%"
 
{| class="wikitable" width="100%"
 
!width="20%"|Attribute
 
!width="20%"|Attribute

Revision as of 09:34, 12 January 2015

Under Construction

Sections can have a Footer displayed at the bottom of the Section. The Footer can be made Visible or hidden. It can display a Caption. It can have a Custom menu.

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.

It can also contain {} expression substitution.



Caption: This is the <b>caption</b> and the time is <font color='red'>{time()}</font>


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(selitem)
	do case
	case selitem = "page2"
		messagebox("You selected page2")
	case selitem = "page3"
		messagebox("You selected page3")
	otherwise
		messagebox("You selected page4")
	endcase
endproc

JavaScript function example

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


Notes on Client Support

Attribute Notes
Visible
Caption The Caption can only be combined with the Footer Custom menu on the Desktop Client. On non Desktop clients with a Footer Custom menu specified, only the menu is displayed.
HTML formatting is ignored in non Desktop Clients.
Height
Background color
Foreground color
Custom menu The 'cog' icon is on Desktop client only. On other clients, the menu items are displayed in the Footer, left-aligned.
The #<, #> and + prefixes are available on the Dekstop client only. All clients support the use of the # prefix to display the menu items as centered buttons.
Custom action The Custom action is supported on the Desktop client only.
Footer button CSS The Footer button CSS style is supported on the Desktop client only.
Footer button width The Footer button width is supported on the Desktop client only.
Custom footer menu The Custom delegate script function must be written in JavaScript for non Desktop clients.