Class LABKEY.Portal
Portal class to allow programmatic administration of portal pages.
Additional Documentation:
Defined in: Portal.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Portal class to allow programmatic administration of portal pages.
|
Method Attributes | Method Name and Description |
---|---|
addTab()
Allows an administrator to add a new portal page tab.
|
|
getWebParts(config)
Move an existing web part up within its portal page, identifying the web part by its unique web part ID.
|
|
moveTabLeft(config)
Move a folder tab to the left.
|
|
moveTabRight(config)
Move a folder tab to the right.
|
|
moveWebPartDown(config)
Move an existing web part down within its portal page, identifying the web part by the unique ID of the containing span.
|
|
moveWebPartUp(config)
Move an existing web part up within its portal page, identifying the web part by index.
|
|
removeWebPart(config)
Remove an existing web part within its portal page.
|
|
renameTab(pageId, urlId)
Allows an administrator to rename a tab.
|
|
showTab(pageId)
Shows a hidden tab.
|
|
Toggle tab edit mode.
|
Method Detail
addTab()
Allows an administrator to add a new portal page tab.
getWebParts(config)
Move an existing web part up within its portal page, identifying the web part by its unique web part ID.
- Parameters:
- config
- An object which contains the following configuration properties.
- {String} config.pageId Optional
- Reserved for a time when multiple portal pages are allowed per container. If not provided, main portal page for the container will be queried.
- {String} config.containerPath Optional
- Specifies the container in which the web part query should be performed. If not provided, the method will operate on the current container.
- {Function} config.success
- Function called when the this function completes successfully.
This function will be called with the following arguments:
- webparts: an object with one property for each page region, generally 'body' and 'right'. The value
of each property is an ordered array of objects indicating the current web part configuration
on the page. Each object has the following properties:
- name: the name of the web part
- index: the index of the web part
- webPartId: the unique integer ID of this web part.
- responseObj: the XMLHttpResponseObject instance used to make the AJAX request
- options: the options used for the AJAX request
- webparts: an object with one property for each page region, generally 'body' and 'right'. The value
of each property is an ordered array of objects indicating the current web part configuration
on the page. Each object has the following properties:
- {Function} config.failure Optional
- Function called when execution fails.
This function will be called with the following arguments:
- exceptionObj: A JavaScript Error object caught by the calling code.
- responseObj: The XMLHttpRequest object containing the response data.
- options: the options used for the AJAX request
moveTabLeft(config)
Move a folder tab to the left.
- Parameters:
- config
- An object which contains the following configuration properties.
- {String} config.pageId Optional
- The pageId of the tab to be moved.
- {String} config.folderTabCaption Optional
- The caption of the tab to be moved.
moveTabRight(config)
Move a folder tab to the right.
- Parameters:
- config
- An object which contains the following configuration properties.
- {String} config.pageId Optional
- Reserved for a time when multiple portal pages are allowed per container.
moveWebPartDown(config)
Move an existing web part down within its portal page, identifying the web part by the unique ID of the containing span.
This span will have name 'webpart'.
- Parameters:
- config
- An object which contains the following configuration properties.
- {String} config.pageId Optional
- Reserved for a time when multiple portal pages are allowed per container. If not provided, main portal page for the container will be modified.
- {String} config.containerPath Optional
- Specifies the container in which the web part modification should be performed. If not provided, the method will operate on the current container.
- {String} config.webPartId
- The unique integer ID of the web part to be moved.
- {Boolean} config.updateDOM Optional
- Indicates whether the current page's DOM should be updated to reflect changes to web part layout. Defaults to false.
- {Function} config.success
- Function called when the this function completes successfully.
This function will be called with the following arguments:
- webparts: an object with one property for each page region, generally 'body' and 'right'. The value
of each property is an ordered array of objects indicating the current web part configuration
on the page. Each object has the following properties:
- name: the name of the web part
- index: the index of the web part
- webPartId: the unique integer ID of this web part.
- responseObj: the XMLHttpResponseObject instance used to make the AJAX request
- options: the options used for the AJAX request
- webparts: an object with one property for each page region, generally 'body' and 'right'. The value
of each property is an ordered array of objects indicating the current web part configuration
on the page. Each object has the following properties:
- {Function} config.failure Optional
- Function called when execution fails.
This function will be called with the following arguments:
- exceptionObj: A JavaScript Error object caught by the calling code.
- responseObj: The XMLHttpRequest object containing the response data.
- options: the options used for the AJAX request
moveWebPartUp(config)
Move an existing web part up within its portal page, identifying the web part by index.
- Parameters:
- config
- An object which contains the following configuration properties.
- {String} config.pageId Optional
- Reserved for a time when multiple portal pages are allowed per container. If not provided, main portal page for the container will be modified.
- {String} config.containerPath Optional
- Specifies the container in which the web part modification should be performed. If not provided, the method will operate on the current container.
- {String} config.webPartId
- The unique integer ID of the web part to be moved.
- {Boolean} config.updateDOM Optional
- Indicates whether the current page's DOM should be updated to reflect changes to web part layout. Defaults to false.
- {Function} config.success
- Function called when the this function completes successfully.
This function will be called with the following arguments:
- webparts: an object with one property for each page region, generally 'body' and 'right'. The value
of each property is an ordered array of objects indicating the current web part configuration
on the page. Each object has the following properties:
- name: the name of the web part
- index: the index of the web part
- webPartId: the unique integer ID of this web part.
- responseObj: the XMLHttpResponseObject instance used to make the AJAX request
- options: the options used for the AJAX request
- webparts: an object with one property for each page region, generally 'body' and 'right'. The value
of each property is an ordered array of objects indicating the current web part configuration
on the page. Each object has the following properties:
- {Function} config.failure Optional
- Function called when execution fails.
This function will be called with the following arguments:
- exceptionObj: A JavaScript Error object caught by the calling code.
- responseObj: The XMLHttpRequest object containing the response data.
- options: the options used for the AJAX request
removeWebPart(config)
Remove an existing web part within its portal page.
- Parameters:
- config
- An object which contains the following configuration properties.
- {String} config.pageId Optional
- Reserved for a time when multiple portal pages are allowed per container. If not provided, main portal page for the container will be modified.
- {String} config.containerPath Optional
- Specifies the container in which the web part modification should be performed. If not provided, the method will operate on the current container.
- {String} config.webPartId
- The unique integer ID of the web part to be moved.
- {Boolean} config.updateDOM Optional
- Indicates whether the current page's DOM should be updated to reflect changes to web part layout. Defaults to false.
- {Function} config.success
- Function called when the this function completes successfully.
This function will be called with the following arguments:
- webparts: an object with one property for each page region, generally 'body' and 'right'. The value
of each property is an ordered array of objects indicating the current web part configuration
on the page. Each object has the following properties:
- name: the name of the web part
- index: the index of the web part
- webPartId: the unique integer ID of this web part.
- responseObj: the XMLHttpResponseObject instance used to make the AJAX request
- options: the options used for the AJAX request
- webparts: an object with one property for each page region, generally 'body' and 'right'. The value
of each property is an ordered array of objects indicating the current web part configuration
on the page. Each object has the following properties:
- {Function} config.failure Optional
- Function called when execution fails.
This function will be called with the following arguments:
- exceptionObj: A JavaScript Error object caught by the calling code.
- responseObj: The XMLHttpRequest object containing the response data.
- options: the options used for the AJAX request
renameTab(pageId, urlId)
Allows an administrator to rename a tab.
- Parameters:
- pageId
- the pageId of the tab to rename
- urlId
- the id of the anchor tag of the tab to be renamed.
showTab(pageId)
Shows a hidden tab.
- Parameters:
- pageId
- the pageId of the tab.
toggleTabEditMode()
Toggle tab edit mode. Enables or disables tab edit mode. When in tab edit mode an administrator
can manage tabs (i.e. change order, add, remove, etc.)