Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Collab

Collab is a static object that primarily provides functionality for managing state models. The custom status feature in Revu uses JavaScript behind the scenes to populate the new states so that custom statuses are compatible with other PDF applications.

properties

user

SecureTypeAccess
NostringR

Login username of the current user. See identity.name for the username as entered in the Revu preferences.


methods

addStateModel

Secure
No

Adds a new state model

Collab.addStateModel(cName, cUIName, oStates, cDefault, bHidden, bHistory)

cName: Unique identifier for the state model

cUIName: Text of the state model as seen by the user

oStates: States object which describes the states in the model

cDefault: [optional] The default state to use. The default is no state

bHidden: [optional] Option to hide the state model. Not used by Revu

bHistory: [optional] Option to maintain the audit history. Not used by Revu

example:

Collab.addStateModel(
    {
        cName: "SimpleStateModel",
        cUIName: "Simple",
        oStates: { 
            "Open": { cUIName: "Open" },
            "Closed": { cUIName: "Closed" } 
        },
        cDefault:"Open"
    }
)

removeStateModel

Secure
No

Removes a state model

Collab.removeStateModel(cName)

cName: Unique identifier for the state model

example:

Collab.removeStateModel("SimpleStateModel")

objects

States

Object that represents the oStates parameter of addStateModel. The keys on the object are unique identifiers for each state, and the values are objects with the following property:

cUIName: Text of the state as seen by the user

example:

var states = { 
    "Open": { cUIName: "Open" },
    "Closed": { cUIName: "Closed" } 
}