eLabSDK.Page.SampleBrowser

Functions

NameDescription
removeSampleTypesFromAddDialog(object)Removes all sample types from the possible options during the Sample Add action, except for the ones specified. Only call this after the onAddNewSample event
focusSampleboxOrList(disableClicks)Focus on the samplebox or sample list in the GUI
currentCompartmentView()Gets the current viewmode of the compartment.
removeFocusSampleboxOrList()Removed focus on the samplebox or sample list in the GUI
addBulkSampleAction(actionTitle, callback)(Deprecated, use registerBulkAction instead). Allows the creation of bulk sample actions in the sample list.
transposeStoragePrint()Transpose box GUI to change the direction of cells from top to down, left to right. This overrides the printing feature
transposeSampleBoxes()Transpose box GUI to change the direction of cells from top to down, left to right.
restoreTransposedSampleBoxes()Restore transposed boxes in the GUI to change the direction of cells back to the default.
registerBulkAction(object)Register a bulk action for editing samples.
refreshSampleData()Refresh the sample data currently on screen
addActionToSampleBrowser(id, content, callback)Add a button in the sample browser
getSampleSpecificationFieldFromSampleForm(fieldName:)Retrieve a specification field from its name if it exists
getSampleBaseFieldFromSampleForm(fieldName:)Retrieve a base field from its name if it exists
getSampleActionButtonContainer()Return the sample action button container, present on the add / edit sample form
addContentToStorageUnitNode(storageID, htmlContent, toolTipContent:)Adds content to the tree node containing a particular storage unit
addPrintOption(btn)Insert a print option to the 'Print Compartment' button dropdown.

removeSampleTypesFromAddDialog(object)

Removes all sample types from the possible options during the Sample Add action, except for the ones specified. Only call this after the onAddNewSample event

Kind: global function

ParamTypeDescription
objectobject
object.keepIDsstringArray of sampleTypeIDs

focusSampleboxOrList(disableClicks)

Focus on the samplebox or sample list in the GUI

Kind: global function

ParamTypeDescription
disableClicksbool: Prevent any item to be clicked.

currentCompartmentView()

Gets the current viewmode of the compartment.

Kind: global function
Returns: string - listview or boxview

removeFocusSampleboxOrList()

Removed focus on the samplebox or sample list in the GUI

Kind: global function

addBulkSampleAction(actionTitle, callback)

(Deprecated, use registerBulkAction instead). Allows the creation of bulk sample actions in the sample list.

Kind: global function
Returns: object - in callback
{
sampleIDs: [],
seriesIDs: [],
sampleIDsIncludingSeriesClicked: [],
sampleCount: 0,
sampleTypeIDs: []
}

ParamTypeDescription
actionTitlestring: name of the action displayed in the selector
callbackfunction: function to execute when the action is selected. Provide information on the chosen samples.

transposeStoragePrint()

Transpose box GUI to change the direction of cells from top to down, left to right. This overrides the printing feature

Kind: global function

transposeSampleBoxes()

Transpose box GUI to change the direction of cells from top to down, left to right.

Kind: global function

restoreTransposedSampleBoxes()

Restore transposed boxes in the GUI to change the direction of cells back to the default.

Kind: global function

registerBulkAction(object)

Register a bulk action for editing samples.

Kind: global function

ParamTypeDescription
objectobject
object.idstringUnique ID of your action. We strongly advise to preface with your root identifier from your add-on.
object.labelstringmake sure this is sufficiently unique to identify your add-ons action. If the label exists, the action will not be added to the menu.
object.onSelectfunctioncallback function returning a list of sampleIDs and sampleSeriesIDs, and where applicable partialSampleSeriesIDs selected.

refreshSampleData()

Refresh the sample data currently on screen

Kind: global function

addActionToSampleBrowser(id, content, callback)

Add a button in the sample browser

Kind: global function

ParamDescription
id: button id
content: button content
callback: function to call on click

getSampleSpecificationFieldFromSampleForm(fieldName:)

Retrieve a specification field from its name if it exists

Kind: global function
Returns: field : specification field if found

ParamDescription
fieldName:name of the specification field

getSampleBaseFieldFromSampleForm(fieldName:)

Retrieve a base field from its name if it exists

Kind: global function
Returns: field : base field if found

ParamDescription
fieldName:name of the base field

getSampleActionButtonContainer()

Return the sample action button container, present on the add / edit sample form

Kind: global function
Returns: sampleButtonContainer : button container present on the add / edit page

addContentToStorageUnitNode(storageID, htmlContent, toolTipContent:)

Adds content to the tree node containing a particular storage unit

Kind: global function

ParamDescription
storageID: storage unit ID
htmlContent: content (in html) to add
toolTipContent:Additional content (in html) to add to the tooltip onhover

addPrintOption(btn)

Insert a print option to the 'Print Compartment' button dropdown.

Kind: global function

ParamDescription
btn: button configuration

Example

addPrintOption(new eLabSDK.GUI.Button({
                label: 'Test Print',
                icon: 'barcode',
                actionID: 'testButton',
                action: function () {
                    return;
                }
            })
            );

© 2023 eLabNext