Class Index | File Index

Classes


Class LABKEY.Portal

Portal class to allow programmatic administration of portal pages.

Additional Documentation:


Defined in: Portal.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Portal class to allow programmatic administration of portal pages.
Method Summary
Method Attributes Method Name and Description
 
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(pageId, domId)
Move a folder tab to the left.
 
moveTabRight(pageId, domId)
Move a folder tab to the right.
 
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, domId, currentLabel)
Allows an administrator to rename a tab.
 
showTab(pageId)
Shows a hidden tab.
Class Detail
LABKEY.Portal()
Portal class to allow programmatic administration of portal pages.
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
{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(pageId, domId)
Move a folder tab to the left.
Parameters:
pageId
the pageId of the tab.
domId
the id of the anchor tag of the tab.

moveTabRight(pageId, domId)
Move a folder tab to the right.
Parameters:
pageId
the pageId of the tab.
domId
the id of the anchor tag of the tab.

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
{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
{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
{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, domId, currentLabel)
Allows an administrator to rename a tab.
Parameters:
pageId
the pageId of the tab.
domId
the id of the anchor tag of the tab.
currentLabel
the current label of the tab.

showTab(pageId)
Shows a hidden tab.
Parameters:
pageId
the pageId of the tab.

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Mar 14 2019 22:39:26 GMT-0000 (UTC)