layout.js

Usage

General-purpose functions for Layouts.

Location

WEB-OPAL\scripts\layout.js

Functions

All Public Functions

closePopupWindow()

confirmChangesMade( confirmMsg )
navigateTo( page, releaseLockFlag, newwindow )
releaseLock( releaseLockFlag )
setCookieRSetList( rsetlist )
 
   
   
   
   
   
 
 

 

 

closePopupWindow()

Functionality

• Closes a popup window.
This function calls the releaseLock() function, setting the rsetlist cookie and submitting the request to the server using a dynamically created form. This releases rsets locked by the form in the popup.

Parameters

None.

Returns

None.

 

confirmChangesMade( confirmMsg )

Functionality

• Called from a button or hyperlink.
• Navigates to another page.
• Calls the getChangesMade() function in the specified page.

Parameters

Parameter Description
confirmMsg Text displayed in the Confirmation dialog box.

Returns

The Confirmation dialog box opens only if the getChangesMade function returns true.

Return Returned when...
true
• getChangesMade() returns false or true.
• OK clicked in the Confirmation dialog box.
false
• getChangesMade() returns true.
• Cancel clicked in Confirmation dialog box.

 

navigateTo( page, releaseLockFlag, newwindow )

Functionality

This function has been deprecated. Use sapphire.page.navigate described in the LabVantage JavaScript Global API Reference.

• Accepts the URL of the next page to open.
• Opens the next page only if the confirmChangesMade() function returns true.

Parameters

Parameter Description
page Next page to open.
releaseLockFlag
Y = Locks are released (default).
N = Locks are not released.
newwindow Determines if the next page opens in a new popup window.

Returns

None.

 

releaseLock( releaseLockFlag )

Functionality

This function has been deprecated. Use sapphire.connection.releaseLock described in the LabVantage JavaScript Global API Reference.

• Gets and sets the rsetlist cookie, which is submitted to the server along with each page.

Parameters

Parameter Description
releaseLockFlag
Y = Gets rsetid and assigns it to the rsetlist cookie. This releases the lock when the request is submitted to the server.
N = Clears the rsetlist cookie and does not release the lock.

Returns

None.

 

setCookieRSetList( rsetlist )

Functionality

This function has been deprecated. Use sapphire.connection.setCookieRSetList described in the LabVantage JavaScript Global API Reference.

• Sets the rsetlist cookie.

Parameters

Parameter Description
rsetlist List of rsets to unlock. If the rsetlist cookie is not set, and you leave or close the page, the server releases locks using the locktimeout.

Returns

None.