Constructor
new DataPackageView()
- Source:
Extends
Members
className
- Source:
The template for the DataPackage header row
Type:
- Source:
delayedModels :object
Models waiting for their parent folder to be rendered, hashed by parent
id: {'parentid': [model1, model2, ...]}
Type:
- Source:
events
- Source:
id
- Source:
isOpen :boolean
Flag indicating the open or closed state of the package rows
Type:
- Source:
A reference to the parent EditorView that contains this view
Type:
- Since:
- Source:
startMessageTemplate :Underscore.Template
The template for the start message row
Type:
- Source:
subviews :object
Any views rendered within this view will be stored here
Type:
- Source:
tagName
- Source:
template :Underscore.Template
The main template for the DataPackageView
Type:
- Source:
Methods
addAll()
Add all rows to the DataPackageView
- Source:
addFilesAndFolders(sortedFilePathObj) → {boolean}
Add all the files and folders
Parameters:
Name |
Type |
Description |
sortedFilePathObj |
object
|
An object where keys are folder
paths and values are arrays of file IDs |
- Source:
Returns:
- Returns false if the input object is not provided
-
Type
-
boolean
addNestedPackages(dataPackage)
Adds a nested data package to the package table.
Parameters:
Name |
Type |
Description |
dataPackage |
object
|
The data package to be added. |
- Since:
- Source:
addOne(item, dataPackage)
Add a single DataItemView row to the DataPackageView
Parameters:
Name |
Type |
Description |
item |
DataONEObject
|
The DataONE object to add |
dataPackage |
DataPackage
|
The data package to add the item to |
- Source:
checkForPrivateMembers()
Check for private members and disable download buttons if necessary.
- Since:
- Source:
collapse(e)
Collapse function to hide rows when a user clicks on a collapse
control.
Parameters:
Name |
Type |
Description |
e |
Event
|
The event object. |
- Since:
- Source:
collapseAll(e)
Collapse all function to hide all child rows when a user clicks on a
collapse-all control.
Parameters:
Name |
Type |
Description |
e |
Event
|
The event object. |
- Since:
- Source:
expand(e)
Expand function to show hidden rows when a user clicks on an expand
control.
Parameters:
Name |
Type |
Description |
e |
Event
|
The event object. |
- Since:
- Source:
expandAll(e)
Expand all function to show all child rows when a user clicks on an
expand-all control.
Parameters:
Name |
Type |
Description |
e |
Event
|
The event object. |
- Since:
- Source:
getNestedPackages()
Retrieves and processes nested packages for the current package.
- Since:
- Source:
handleAddFiles(e)
Handle the event when a user clicks the "Add Files" button in the
message row of the DataPackageView.
Parameters:
Name |
Type |
Description |
e |
Event
|
The event object. |
- Source:
initialize()
- Source:
onClose()
Close subviews as needed
- Source:
removeOne(item)
Remove the subview represented by the given model item.
Parameters:
Name |
Type |
Description |
item |
Backbone.Model
|
The model item to remove. |
- Source:
render()
- Source:
renderDataPackage()
Render the Data Package View and insert it into this view
- Source:
renderShareControl()
Renders a control that opens the AccessPolicyView for editing
permissions on this package
- Since:
- Source:
toggleRows(event)
Show or hide the data rows associated with the event row science
metadata
Parameters:
Name |
Type |
Description |
event |
Event
|
The event object. |
- Source: