SC.toolbox.js
SC.toolbox.sendFilesToSharedToolbox(entries, destinationDirectoryAsArrayInToolbox, completeProc)
A helper method used in conjunction with SC.toolbox.showToolboxDialog. Upload one or more files to the shared toolbox.
Parameters
| Name | Type | Description |
| entries | A DataTransferItemList object (if files are dragged into the toolbox) or FileList object | A list of items to be added to the shared toolbox |
| destinationDirectoryAsArrayInToolbox | String array |
The destination of the toolbox entries
|
| completeProc | function | Function to be called after the files have been sent to the shared toolbox |
Return type
void
Example
var uploadFileProc = function (entries, pathAsArray) {
SC.css.ensureClass(fileLoadingOverlay, 'Loading', true);
SC.toolbox.sendFilesToSharedToolbox(
entries,
pathAsArray,
function () {
SC.service.GetToolbox(function (toolbox) {
loadedToolbox = toolbox;
renderProc(pathAsArray);
SC.css.ensureClass(fileLoadingOverlay, 'Loading', false);
});
}
);
};
SC.toolbox.showToolboxDialog(commandName, runProc)
Displays the toolbox dialog.
Parameters
| Name | Type | Description |
| commandName | String | The command name that will be shown in various parts of the toolbox dialog |
| runProc | function | Function to execute when the toolbox dialog is shown |
Return type
void
Example
This example shows the toolbox dialog and adds a RunTool session event to selected sessions.
else if (commandName == 'RunTool') {
SC.toolbox.showToolboxDialog(
commandName,
function (path, isElevated, onSuccess, onError) {
SC.service.AddEventToSessions(
sessionInfo.SessionGroupPath,
sessionIDs,
isElevated ? SC.types.SessionEventType.QueuedElevatedTool : SC.types.SessionEventType.QueuedTool,
path,
onSuccess,
onError
);
}
);
