HyperWorks Desktop

Customize the Organize Browser

Customize the Organize Browser

Previous topic Next topic Expand/collapse all hidden text  

Customize the Organize Browser

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

The following can be customized in an Organize browser:

Toolbar
Context menu
Custom actions for typical lifecycle operations. These can be either pre or post of typical lifecycle operations.
Note:The custom scripts are recommended to be placed in a folder as declared in the libraryprofile.xml file.
hmtoggle_plus1greyToolbar Customization

The typical toolbar customization script is shown below.

toolbar_customization

The core application expects a return value of one to show the toolbar from a procedure named ::namespace::ShowHideCustomToolbar. A return value of zero will hide the toolbar.

You can use the standard hwt commands to create label combinations or icons to do specific jobs.

hmtoggle_plus1greyContext Menu Customization

A typical context menu customization procedure is shown below.

context_menu_customization

The core application runs the procedure ::namespace::CtxMenuAddCustomItems to add the custom context menus. The arguments objBrowser, menu and obj values are passed to this procedure by core.

hmtoggle_plus1greyCustom Actions

The following are the exposed hook ups for pre and post actions. All of the below procedures should be under one .tcl file, as recommended.

::namespace::OnLoad- This procedure will be called as the entry point of the module as declared in the libraryprofile.xml.

custom_actions1

::namespace::OnUnLoad- This procedure will be called when you change to a different library or the module is unloaded.

custom_actions2

::namespace:: OnChangeWorkspace- This procedure is called when you change the current workspace.

custom_actions3

::namespace:: OnChangeLibrary- This procedure is called when you change the current library. If the new library is using a different profile then ::namespace::OnLoad is also called.

custom_actions4

::namespace:: OnContentCheckIn_Pre- This procedure is called before content is checked into the library.

custom_actions5

Arguments

gdm- Generic data manager handle. See DMDirector_OpenWorkspace.

ci- Content interface handle. See ContentInterfaceList_at.

The above arguments are passed from the core.

Return values:

0 or “ ”- Will continue Check-In operation.

1 - Will abort Check-In operation. For example, if you have not provided certain information or a certain metadata value extraction fails.

::namespace:: OnContentCheckIn_Post- This procedure is called after content is checked into the library.

custom_actions6

Return values: None

::namespace:: OnContentCheckOut_Pre- This procedure is called before content is checked out from the library.

custom_actions7

Return values:

0 or “ ”- Will continue Check-Out operation.

1 - Will abort Check-Out operation.

::namespace:: OnContentCheckOut_Post- This procedure is called after content is checked out from the library.

custom_actions8

Return values: None

::namespace:: OnContentUndoCheckOut_Pre- This procedure is called before the Undo Check-Out operation.

custom_actions9

Return values:

0 or “ ”- Will continue Check-Out operation.
1 - Will abort Check-Out operation.
::namespace:: OnContentUndoCheckOut_Post- This procedure is called after the Undo Check-Out operation.

custom_actions10

Return values: None

::namespace:: OnContentGet_Pre- This procedure is called before the Get operation.

custom_actions11

Return values

0 or “ ”- Will continue Get operation.

1 - Will abort Get operation.

2 - Operation is implemented in custom refresh proc.

::namespace:: OnContentGet_Post- This procedure is called after the Get operation.

custom_actions12

Return values: None