Appendix A. mosMenuBar
Here is a list of functions available to display toolbar buttons. These functions belong to
Functions that end with 'List' (e.g. publishList) are meant for a list of records on the current page. Usually this is a list of checkboxes where you need to select at least 1 record. These functions will do some checking to make sure that at least 1 record is selected.
| Image |
Function |
| |
startTable()
Writes the start of the button bar table |
| (custom) |
custom($task = '', $icon = '', $iconOver = '', $alt = '', $listSelect = true)
Writes a custom options & task button for the button bar
Parameters:
$icon: The image to display (path relative to 'image' folder in the current directory)
$iconOver: The image to display when moused over
$listSelect: True if required to check that a standard list item is checked |
|
addNew($task = 'new', $alt = 'New')
Text: New |
 |
publish($task = 'publish', $alt = 'Publish')
Text: Publish |
 |
publishList($task = 'publish', $alt = 'Publish')
Text: Publish |
 |
makeDefault($task = 'default', $alt = 'Default')
Text: Default |
 |
assign($task = 'assign', $alt = 'Assign')
Text: Assign |
 |
unpublish($task = 'unpublish', $alt = 'Unpublish')
Text: Unpublish |
 |
unpublishList($task = 'unpublish', $alt = 'Unpublish')
Text: Unpublish |
 |
archiveList($task = 'archive', $alt = 'Archive')
Text: Archive |
 |
unarchiveList($task = 'unarchive', $alt = 'Unarchive')
Text: Unarchive |
 |
editList($task = 'edit', $alt = 'Edit')
Text: Edit |
 |
editHtml($task = 'edit_source', $alt = 'Edit HTML')
Text: Edit HTML |
 |
editCss($task = 'edit_css', $alt = 'Edit CSS')
Text: Edit CSS |
 |
deleteList($msg = '', $task = 'remove', $alt = 'Delete')
Parameter:
$msg: Postscript for the 'are you sure' message
Text: Delete |
 |
trash($task = 'remove', $alt = 'Trash')
Write a trash button that will move items to Trash Manager
Text: Trash |
 |
preview($popup = '', $updateEditors = false)
Writes a preview button for a given option (opens a popup window)
Parameters:
$popup: The name of the popup file (excluding the file extension). This variable will be used in JavaScript's window.open() as follows:
window.open('popups/t=', 'win1', 'status= no,toolbar=no, scrollbars=yes, titlebar=no, menubar=no, resizable=yes, width=640, height=480, directories=no, location=no');
Text: Preview |
 |
help($ref)
Writes a button to open help page from $mosConfig_live_site/help/$ref.xml
Parameters:
$ref: help page file name (without extension)
Text: Help |
 |
save($task = 'save', $alt = 'Save')
Text: (use $alt value) |
 |
cancel($task = 'cancel', $alt = 'Cancel')
Writes a cancel button and invokes a cancel operation
Text: (use $alt value) |
 |
back()
Writes a cancel button that will go back to the previous page without doing any other operation
Text: Back |
 |
media_manager($directory = '')
Parameters:
$directory: The sub-directory to upload the media to
Text: Upload |
 |
divider()
Write a divider between menu buttons |
| |
spacer($width = '')
Writes a spacer cell |
| |
endTable()
Writes the end of the menu bar table |