Class Index | File Index

Classes


Namespace Vizit


Defined in: <pkg\Release\Vizit\Layouts\Vizit\vizit-all.js>.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
To start working with the Vizit Client Library, you must have the scripts on your page.
Field Summary
Field Attributes Field Name and Description
 
The version of Vizit
Method Summary
Method Attributes Method Name and Description
 
GetElement(ref, cfg)
Like Vizit.Write, this function creates buttons and instant previews linking to a particular document.
 
GetImageElement(ref, width, height, frame, attributes)
Like Vizit.WriteImage, this function creates an image tag for a particulr document frame at the provided width and height.
 
GetImageString(ref, width, height, frame, attributes)
Like Vizit.WriteImage, this function creates an image tag of the document frame specified at the width and height provided.
 
GetString(ref, cfg)
Like Vizit.Write, this function creates buttons and instant previews linking to a particular document.
 
OnReady(delegate, scope, key)
If Vizit is ready when this method is called, the passed delegate will be called immediately, otherwise the passed delgate will be called when Vizit is ready.
 
Write(ref, cfg)
Writes buttons and/or first page previews to the document.
 
WriteImage(ref, width, height, frame, attributes)
Writes an image tag for the specified document frame at the provided width and height.
Namespace Detail
Vizit
To start working with the Vizit Client Library, you must have the scripts on your page. To do this, you should include the vizit-all.js script using the javascript below. This script must be loaded after the VIZIT_SETTINGS variable is set (if used) and before any calls into the Vizit namespace. See Vizit#OnReady to ensure that Vizit is ready to be used. Vizit will initialize as soon as all of its scripts are loaded and if it is a SharePoint page, it will wait for SharePoint to be ready. If you need Vizit to wait until additional scripts are ready, see Vizit.Boot.
    
        <script type='text/javascript' src='http://path/to/layouts/vizit/Vizit.Core/Endpoints/ResourceEndpoint.ashx?op=Settings&variable=vizitsettings'></script>
        <script type='text/javascript' src='http://path/to/layouts/vizit/vizit-all.js'></script>
    
Field Detail
Version
The version of Vizit
Method Detail
{HTMLElement} GetElement(ref, cfg)
Like Vizit.Write, this function creates buttons and instant previews linking to a particular document. GetElement should be used when you want the actual HTML elements. The appendChild method in HTML elements can be used to place these elements on the page.
Parameters:
ref
{String|Object} See Vizit.Write
cfg Optional
{String|Object} See Vizit.Write
Returns:
{HTMLElement} An HTML element containing the buttons.

{String} GetImageElement(ref, width, height, frame, attributes)
Like Vizit.WriteImage, this function creates an image tag for a particulr document frame at the provided width and height. GetImageElement should be used when you want the actual HTML elements. The appendChild method in HTML elements can be used to place these elements on the page.
Parameters:
ref
{String|Object} See Vizit.WriteImage.
width
{Number} See Vizit.WriteImage.
height Optional
{Number} See Vizit.WriteImage.
frame Optional
{Number} See Vizit.WriteImage.
attributes Optional
{Object} See Vizit.WriteImage.
Returns:
{String} An HTML string containing the image tag

{String} GetImageString(ref, width, height, frame, attributes)
Like Vizit.WriteImage, this function creates an image tag of the document frame specified at the width and height provided. GetImageString should be used when youw ant to controlw hen the string is written to the document or written to the innerHTML property of an HTML element.
Parameters:
ref
{String|Object} See Vizit.WriteImage.
width
{Number} See Vizit.WriteImage.
height Optional
{Number} See Vizit.WriteImage.
frame Optional
{Number} See Vizit.WriteImage.
attributes Optional
{Object} See Vizit.WriteImage.
Returns:
{String} An HTML string containing the image tag

{String} GetString(ref, cfg)
Like Vizit.Write, this function creates buttons and instant previews linking to a particular document. GetString should be used when you want to control when the string is written to the document or written to the innerHTML property of an HTML element.
Parameters:
ref
{String|Object} See Vizit.Write.
cfg Optional
{String|Object} See Vizit.Write.
Returns:
{String} An HTML string containing the buttons.

OnReady(delegate, scope, key)
If Vizit is ready when this method is called, the passed delegate will be called immediately, otherwise the passed delgate will be called when Vizit is ready.
Parameters:
{Function} delegate
The function that should be called when Vizit is ready.
{Object} scope Optional
The context in which the delegate should be run. If no scope is provided, window will be used.
{String} key Optional
If provided, any future Vizit.OnReady calls made with the same key will overwrite this delegate causing only the last one to fire when Vizit is ready.

Write(ref, cfg)
Writes buttons and/or first page previews to the document. This should be used inline.
Parameters:
ref
{String|Object} The URL of the file that the buttons should be connected to, or a Document Reference.
cfg Optional
{String|Object} The text of the link that will be created next to the buttons or an object containing the following properties:
cfg.buttons Optional
{String[]} An array of strings containing the names of the buttons that should be drawn. If this is not provided, the global defaults or anything in VIZIT_SETTINGS.buttons will be used. Possible options are 'InstantPreview', 'OpenInEssential', and 'OpenInPro'
cfg.text Optional
{String} The text of the link that will be created next to the buttons.
cfg.essential Optional
{String|Object} The ID of an already created Essential window or an Essential configuration object.
cfg.spacer Optional
{Boolean} Whether or not just a spacer should be created (without buttons) this is useful for providing a consistent alignment of many items in a list where some may be folders and not require Vizit buttons next to them.

WriteImage(ref, width, height, frame, attributes)
Writes an image tag for the specified document frame at the provided width and height.
        Vizit.WriteImage('http://path/to/image.ext', 300, 300, 0, { class: 'cssClassName', style: 'padding: 5px' });
Parameters:
ref
{String|Object} The URL of the file that the buttons should be conected to, or a Document Reference.
width
{Number} The maximum width of the returned frame.
height Optional
{Number} The maximum height of the returned frame. If no height is provided, the value for width will be used.
frame Optional
{Number} The page of the document to generate an image tag for. This is zero based. The default value is 0.
attributes Optional
{Object} A JSON object of attribute-value pairs to be added to the img tag.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Oct 28 2013 13:52:27 GMT-0000 (GMT)