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
| Secure | Type | Access |
|---|---|---|
| No | string | R |
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 hidden the state model in Revu. 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" }
}
Resources
Revu 21
Revu JavaScript
JavaScript
