Class ecm.widget.viewer.ContentViewer


Extends dijit._LayoutWidget.
Provides a widget that contains tabs in which individual viewers for documents are displayed.
Defined in: <ecm\widget\viewer\ContentViewer.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Field Summary

Field Attributes Field Name and Description
 
The browser's locale.
 
The content viewer title.
 
Specifies whether the ContentViewer widget is the primary layout widget in a browser window.
 
Specifies whether the ContentViewer widget is the sole widget in a browser window.
 
Sets to true to prevent iframe-based viewers from having their page set to about:blank externally.
 
Shows the layout toolbar buttons, which include tabbed view, horizontal split, vertical split, or edit properties.
 
Shows the Next and Previous toolbar buttons.
 
Indicates the current splitMode value of the viewer.
 
Indicates the current viewerMode value of the viewer.
 
The title of the window, when isEntireWindow == true.

Method Summary

Method Attributes Method Name and Description
 
close(item)
 
Close all open viewers, without confirming to save or discard changes.
 
closeItem(item, okCallback, cancelCallback, preview, confirm)
Close the item, if open in a viewer or preview viewer.
 
 
enablePI(show)
Enables the edit properties mode in the viewer.
 
Returns the text to place to the left of the ContentViewer widget toolbar.
 
getViewersStatus(includePrinting)
Returns a data structure containing information about all open viewers that have unsaved changes, and/or are in the process of printing.
 
navigateNextHit(tabContainer, confirm)
Navigate to the next hit relative to the current selected viewer.
 
navigatePreviousHit(tabContainer, confirm)
Navigate to the previous hit relative to the current selected viewer.
 
onDocumentClosed(item, preview)
Called when an item is closed in the viewer.
 
onDocumentOpened(item, preview)
Called when an item is opened in the viewer.
 
onNextEnabled(tabContainer, enabled)
Event is fired when the next hit button for the tab container should be either enabled or disabled.
 
onPrevEnabled(tabContainer, enabled)
Event is fired when the previous hit button for the tab container should be either enabled or disabled.
 
open(item, openInBackground)
Opens an item in the viewer, if it is not already opened.
 
 
preview(item, openInBackground)
Previews an item in the viewer, if it is not already opened.
 
For the specified page, determine the availability of next and previous documents relative to the current document being displayed.

Constructor Detail

ecm.widget.viewer.ContentViewer()

Field Detail

browserLocale

The browser's locale.

contentViewerTitle

The content viewer title. If specified, this text will be placed to the left of the top toolbar of this widget. If it is null, the text will be assigned by the widget, to a predefined localized value.
Since:
2.0.3

isChildWindow

Specifies whether the ContentViewer widget is the primary layout widget in a browser window. If true, the ecm.model.desktop object for the window will be created and loaded.

isEntireWindow

Specifies whether the ContentViewer widget is the sole widget in a browser window.

resetAboutBlank

Sets to true to prevent iframe-based viewers from having their page set to about:blank externally.

showLayouts

Shows the layout toolbar buttons, which include tabbed view, horizontal split, vertical split, or edit properties.

showNextPrev

Shows the Next and Previous toolbar buttons.

splitMode

Indicates the current splitMode value of the viewer. The possible values are: none, left, right, and bottom.

viewerMode

Indicates the current viewerMode value of the viewer. The possible values are: none, left, right, bottom, edit and comment.
Since:
2.0.3.3

windowTitle

The title of the window, when isEntireWindow == true.

Method Detail

close(item)

Parameters:
item
Deprecated:
As of release 2.0.2. This method is not implemented.

closeAllViewers()

Close all open viewers, without confirming to save or discard changes. Any changes, or print jobs underway may be interrupted.
Since:
2.0.3.3

closeItem(item, okCallback, cancelCallback, preview, confirm)

Close the item, if open in a viewer or preview viewer.
Parameters:
item
The item to close.
okCallback
Called if the item is found and it's tab(s) are closed.
cancelCallback
Called if the item was either not found, or the close was cancelled by the user.
preview
True or false, to indicate whether or not to close an item opened via the open call or via the preview call. Default is false.
confirm
True or false, to indicate whether or not to show a confirmation dialog if the viewer contains unsaved changes or is in the middle of spooling a print. Default is false.
Since:
2.0.3.4

constructor()


enablePI(show)

Enables the edit properties mode in the viewer.
Parameters:
{boolean} show Optional, Default: true

getContentViewerTitle()

Returns the text to place to the left of the ContentViewer widget toolbar.
Since:
2.0.3

{object} getViewersStatus(includePrinting)

Returns a data structure containing information about all open viewers that have unsaved changes, and/or are in the process of printing. The returned data structure:

 {
     splitMode: one of "none", "left", "right" or "bottom", indicating the position of the split pane relative to the main pane
     viewerMode: one of "none", "left", "right" "bottom", "edit", or "comment", indicating the current mode of the viewer
     mainStatus: an array containing 0..n status objects
     [ 
         {
             title:             the title as it appears on the viewer's tab
             tabIndex:          the tab index of the dirty and/or printing tab
             id:                the item id of the item being viewed
             repositoryId:      the repository id of the item being viewed
             isDirty:           boolean indicating that the item is dirty 
             isPropertiesDirty: boolean indicating that properties pane is open and contains unsaved changes
             isPrinting:        boolean indicating that the item is printing 
             isPreview:         boolean indicating that this tab represents a preview viewer
         }
         ...
     ],
     splitStatus: an array containing 0..n status objects, or null if splitMode == "none".
     [
         ...
     ]
 }
Parameters:
includePrinting
(optional) Indicate whether or not to include viewers that are printing. If true, all viewers that are either printing or dirty are returned. If false (default), return only dirty viewers.
Returns:
{object} An object following the data structure described above.

navigateNextHit(tabContainer, confirm)

Navigate to the next hit relative to the current selected viewer.
Parameters:
tabContainer
The tab container (main or split) containing the specified viewer to navigate. If not specified, the current focused tabContainer will be used.
confirm
If true (default), and there are unsaved annotations in the viewer, confirmation dialog will be shown prior to navigating to the next item.
Since:
2.0.3.3

navigatePreviousHit(tabContainer, confirm)

Navigate to the previous hit relative to the current selected viewer.
Parameters:
tabContainer
The tab container (main or split) containing the specified viewer to navigate. If not specified, the current focused tabContainer will be used.
confirm
If true (default), and there are unsaved annotations in the viewer, confirmation dialog will be shown prior to navigating to the previous item.
Since:
2.0.3.3

onDocumentClosed(item, preview)

Called when an item is closed in the viewer.
Parameters:
item
the item that was opened
preview
boolean indicating if closed from preview mode
Since:
2.0.3.3

onDocumentOpened(item, preview)

Called when an item is opened in the viewer.
Parameters:
item
the item that was opened
preview
boolean indicating if opened in preview mode
Since:
2.0.3.3

onNextEnabled(tabContainer, enabled)

Event is fired when the next hit button for the tab container should be either enabled or disabled.
Parameters:
tabContainer
The tabContainer associated with this state update.
enabled
Boolean to enable or disable
Since:
2.0.3.3

onPrevEnabled(tabContainer, enabled)

Event is fired when the previous hit button for the tab container should be either enabled or disabled.
Parameters:
tabContainer
The tabContainer associated with this state update.
enabled
Boolean to enable or disable
Since:
2.0.3.3

open(item, openInBackground)

Opens an item in the viewer, if it is not already opened. If openInBackground is false, the viewer will be selected into the foreground and displayed. In split mode, the tab is selected in the current focused split.
Parameters:
item
The item to view.
openInBackground

postMixInProperties()


preview(item, openInBackground)

Previews an item in the viewer, if it is not already opened. If openInBackground is false, the viewer will be selected into the foreground and displayed. In split mode, the tab is selected in the current focused split.
Parameters:
item
The item to view.
openInBackground

refreshNavigation(tabPage)

For the specified page, determine the availability of next and previous documents relative to the current document being displayed. Calling this method will cause onNextEnabled and onPrevEnabled events to fire, to update navigation controls.
Parameters:
tabPage
The tabPage containing the document being viewed
Since:
2.0.3.3