Methods
calculeButtonContent(pluginpath, infobutton)
On component metadata file may be field "icon" and "label". This fields are used to create action component button.
When user click this button, on targetcontent to been added an element.
Parameters:
Name | Type | Description |
---|---|---|
pluginpath |
String | relative path to root component |
infobutton |
Object | JSON created from metadata file. |
infobutton.icon |
String | relative icon path |
infobutton.label |
String | Label button. |
- Source:
getCBObjectFromButton(component)
Create element from component. This include cbobject and rendered view on targetcontent.
When append rendered view on targetcontent then trigger add_callback function related with component
Parameters:
Name | Type | Description |
---|---|---|
component |
String | Component idtype indicated on metadata file. |
- Source:
initSections()
Initalize sections. This void Sections namespace and render initial section
- Source:
loadComponentExtraCss(pluginpath, infobutton)
On component metadata file may be field "external_css" . This field include style files that may be included to decorate component
function or elements created by component . This method is reponsible read metadata info to be include all files indicate on "external_scripts". This files are loaded
Parameters:
Name | Type | Description |
---|---|---|
pluginpath |
String | relative path to root component |
infobutton |
Object | JSON created from metadata file. |
infobutton.external_css |
Array.<String> | List paths to be included. This not support folders, only files. |
- Source:
loadComponentExtraScripts(pluginpath, infobutton)
On component metadata file may be field "external_scripts" . This field include libraries must be included on head file to work component fine.
This method is reponsible read metadata info to be include all files indicate on "external_scripts". This files are loaded
Parameters:
Name | Type | Description |
---|---|---|
pluginpath |
String | relative path to root component |
infobutton |
Object | JSON created from metadata file. |
infobutton.external_scripts |
Array.<String> | List paths to be included. This not support folders, only files. |
- Source:
loadComponents()
Go over components path to find components and append this components on Project.Actions namespace.
- Source:
loadComponentsRecursive(componentpath)
Go over components path to find components and append this components on Cloudbook.Actions with id
Also load extra scripts needed to components work fine
Parameters:
Name | Type | Description |
---|---|---|
componentpath |
String | Path to load component |
- Source:
loadProject(projectPath)
Load project from path. This method void project and discard not saved changes.
Parameters:
Name | Type | Description |
---|---|---|
projectPath |
String |
- Source:
loadSectionsObjects()
Load all sections available
- Source:
renderActionsButtons()
Create components buttons to append elements into selected section.
Here method call editorView and add_callback methods of CBObjects.
See
CBObject#editorView and
CBObject.add_callback
- Source: