-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Documentation update
- Loading branch information
Showing
2 changed files
with
332 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
## rwatts:orionjs-dashboard Public API ## | ||
|
||
Adds a Dashboard and Widgets to Orion. | ||
|
||
_API documentation automatically generated by [docmeteor](https://github.com/raix/docmeteor)._ | ||
|
||
- | ||
|
||
### <a name="orion.links.add"></a>*orionlinks*.add() <sub><i>Client</i></sub> ### | ||
|
||
*This method __add__ is defined in `orion.links`* | ||
|
||
__Returns__ *{Object}* | ||
|
||
|
||
Adds the orion dashboard link to the admin panel. | ||
Note that the showDashboardTab Option defines whether | ||
the ordering of the link. | ||
|
||
> ```Tracker.autorun(function(){ ...``` [orionjs_dashboard_client.js:11](orionjs_dashboard_client.js#L11) | ||
|
||
- | ||
|
||
### <a name="orion"></a>orion {function} <sub><i>Client</i></sub> ### | ||
|
||
|
||
__Returns__ *{Object}* | ||
|
||
|
||
Declares the orion namespace | ||
|
||
> ```orion = orion;``` [orionjs_dashboard_api.js:9](orionjs_dashboard_api.js#L9) | ||
|
||
- | ||
|
||
### <a name="orion.dashboard"></a>*orion*.dashboard {function} <sub><i>Client</i></sub> ### | ||
|
||
*This property __dashboard__ is defined in `orion`* | ||
|
||
__Returns__ *{Object}* | ||
|
||
|
||
Declares the orion.dashboard namespace and Object. | ||
|
||
> ```orion.dashboard = { ...``` [orionjs_dashboard_api.js:19](orionjs_dashboard_api.js#L19) | ||
|
||
- | ||
|
||
### <a name="orion.dashboard._widgets"></a>*oriondashboard*._widgets {function} <sub><i>Client</i></sub> ### | ||
|
||
*This property ___widgets__ is defined in `orion.dashboard`* | ||
|
||
__Returns__ *{[Object]}* | ||
|
||
|
||
Declares the orion.dashboard._widgets array. Which is an array | ||
of objects that are | ||
|
||
> ```orion.dashboard._widgets = [];``` [orionjs_dashboard_api.js:30](orionjs_dashboard_api.js#L30) | ||
|
||
- | ||
|
||
### <a name="orion.dashboard.registerWidget"></a>*oriondashboard*.registerWidget({Object}) <sub><i>Client</i></sub> ### | ||
|
||
*This method __registerWidget__ is defined in `orion.dashboard`* | ||
|
||
__Arguments__ | ||
|
||
* __{Object}__ *{any}* | ||
|
||
data An object that contains the data to be passed to the template | ||
|
||
|
||
__Returns__ *{Object}* | ||
Returns an object with data for the widet. | ||
|
||
|
||
Registers the widget and passes the data along to the declared template. | ||
Template must be defined within the Passed argument otherwise it will default | ||
to the default widget template. | ||
|
||
> ```orion.dashboard.registerWidget = function (data){ ...``` [orionjs_dashboard_api.js:43](orionjs_dashboard_api.js#L43) | ||
|
||
- | ||
|
||
### <a name="ReactiveTemplates.helpers"></a>*ReactiveTemplates*.helpers {function} <sub><i>Client</i></sub> ### | ||
|
||
*This property __helpers__ is defined in `ReactiveTemplates`* | ||
|
||
__Returns__ *{undefined}* | ||
|
||
|
||
Pulls all widgets from the orion.dashboard._widgets array and passes them | ||
along to the declared template. | ||
|
||
> ```ReactiveTemplates.helpers(``` [orionjs_dashboard_api.js:61](orionjs_dashboard_api.js#L61) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
## Public and Private API ## | ||
|
||
_API documentation automatically generated by [docmeteor](https://github.com/raix/docmeteor)._ | ||
|
||
*** | ||
|
||
__File: ["orionjs_dashboard.js"](orionjs_dashboard.js) Where: {client|server}__ | ||
|
||
*** | ||
|
||
### <a name="Options.init"></a>*Options*.init() <sub><i>Anywhere</i></sub> ### | ||
|
||
*This method is private* | ||
*This method __init__ is defined in `Options`* | ||
|
||
__Returns__ *{Boolean}* | ||
Returns Boolean True or False | ||
|
||
|
||
Optional setting allowing or denying the dashboard link to display | ||
in the admin panel. | ||
|
||
> ```Options.init(``` [orionjs_dashboard.js:10](orionjs_dashboard.js#L10) | ||
|
||
- | ||
|
||
### <a name="if "></a>if () <sub><i>Anywhere</i></sub> ### | ||
|
||
*This method is private* | ||
|
||
__Returns__ *{Boolean}* | ||
|
||
|
||
If the showDashboard option is set to true, the home route will be | ||
set to the dashboard path. This option can be overwritten by | ||
setting the adminHomeRoute explicitly | ||
|
||
> ```if (Options.get(``` [orionjs_dashboard.js:21](orionjs_dashboard.js#L21) | ||
|
||
- | ||
|
||
### <a name="ReactiveTemplates.request"></a>*ReactiveTemplates*.request() <sub><i>Anywhere</i></sub> ### | ||
|
||
*This method is private* | ||
*This method __request__ is defined in `ReactiveTemplates`* | ||
|
||
__Returns__ *{String}* | ||
|
||
|
||
Set's the dashboard template and defines the default template. | ||
See ReactiveTemplates documentation for how to override the default | ||
dashboard template. This typically is not neeed. | ||
|
||
> ```ReactiveTemplates.request(``` [orionjs_dashboard.js:34](orionjs_dashboard.js#L34) | ||
|
||
- | ||
|
||
### <a name="ReactiveTemplates.request"></a>*ReactiveTemplates*.request() <sub><i>Anywhere</i></sub> ### | ||
|
||
*This method is private* | ||
*This method __request__ is defined in `ReactiveTemplates`* | ||
|
||
__Returns__ *{String}* | ||
|
||
|
||
Set's the Dashboard Widget template and defines the default template. | ||
See ReactiveTemplates documentation for informatation on how to override the | ||
default widget. NOTE: this is not the same as registering a new widget. | ||
|
||
> ```ReactiveTemplates.request(``` [orionjs_dashboard.js:50](orionjs_dashboard.js#L50) | ||
|
||
- | ||
|
||
### <a name="Roles.registerAction"></a>*Roles*.registerAction() <sub><i>Anywhere</i></sub> ### | ||
|
||
*This method is private* | ||
*This method __registerAction__ is defined in `Roles`* | ||
|
||
__Returns__ *{Boolean}* | ||
|
||
|
||
Registers the orionDashboard action to the Roles package. | ||
This allows us to ensure the user has the proper permissions to | ||
make changes to the dashboard. | ||
|
||
> ```Roles.registerAction(``` [orionjs_dashboard.js:66](orionjs_dashboard.js#L66) | ||
|
||
- | ||
|
||
### <a name="RouterLayer.route"></a>*RouterLayer*.route() <sub><i>Client</i></sub> ### | ||
|
||
*This method is private* | ||
*This method __route__ is defined in `RouterLayer`* | ||
|
||
__Returns__ *{Object}* | ||
|
||
|
||
Registers the route for the dashboard. By Default this route is always | ||
registered as a subpath of /admin/ | ||
|
||
> ```RouterLayer.route(``` [orionjs_dashboard.js:77](orionjs_dashboard.js#L77) | ||
|
||
- | ||
|
||
### <a name="orion.accounts.addProtectedRoute"></a>*orionaccounts*.addProtectedRoute() <sub><i>Client</i></sub> ### | ||
|
||
*This method is private* | ||
*This method __addProtectedRoute__ is defined in `orion.accounts`* | ||
|
||
__Returns__ *{String}* | ||
|
||
|
||
Adds a protected route to orionDashboard ensuring that the user must be | ||
logged in to navigate to this path. | ||
|
||
> ```orion.accounts.addProtectedRoute(``` [orionjs_dashboard.js:93](orionjs_dashboard.js#L93) | ||
|
||
*** | ||
|
||
__File: ["orionjs_dashboard_client.js"](orionjs_dashboard_client.js) Where: {client}__ | ||
|
||
*** | ||
|
||
### <a name="orion.links.add"></a>*orionlinks*.add() <sub><i>Client</i></sub> ### | ||
|
||
*This method __add__ is defined in `orion.links`* | ||
|
||
__Returns__ *{Object}* | ||
|
||
|
||
Adds the orion dashboard link to the admin panel. | ||
Note that the showDashboardTab Option defines whether | ||
the ordering of the link. | ||
|
||
> ```Tracker.autorun(function(){ ...``` [orionjs_dashboard_client.js:11](orionjs_dashboard_client.js#L11) | ||
|
||
*** | ||
|
||
__File: ["orionjs_dashboard_api.js"](orionjs_dashboard_api.js) Where: {client}__ | ||
|
||
*** | ||
|
||
### <a name="orion"></a>orion {function} <sub><i>Client</i></sub> ### | ||
|
||
|
||
__Returns__ *{Object}* | ||
|
||
|
||
Declares the orion namespace | ||
|
||
> ```orion = orion;``` [orionjs_dashboard_api.js:9](orionjs_dashboard_api.js#L9) | ||
|
||
- | ||
|
||
### <a name="orion.dashboard"></a>*orion*.dashboard {function} <sub><i>Client</i></sub> ### | ||
|
||
*This property __dashboard__ is defined in `orion`* | ||
|
||
__Returns__ *{Object}* | ||
|
||
|
||
Declares the orion.dashboard namespace and Object. | ||
|
||
> ```orion.dashboard = { ...``` [orionjs_dashboard_api.js:19](orionjs_dashboard_api.js#L19) | ||
|
||
- | ||
|
||
### <a name="orion.dashboard._widgets"></a>*oriondashboard*._widgets {function} <sub><i>Client</i></sub> ### | ||
|
||
*This property ___widgets__ is defined in `orion.dashboard`* | ||
|
||
__Returns__ *{[Object]}* | ||
|
||
|
||
Declares the orion.dashboard._widgets array. Which is an array | ||
of objects that are | ||
|
||
> ```orion.dashboard._widgets = [];``` [orionjs_dashboard_api.js:30](orionjs_dashboard_api.js#L30) | ||
|
||
- | ||
|
||
### <a name="orion.dashboard.registerWidget"></a>*oriondashboard*.registerWidget({Object}) <sub><i>Client</i></sub> ### | ||
|
||
*This method __registerWidget__ is defined in `orion.dashboard`* | ||
|
||
__Arguments__ | ||
|
||
* __{Object}__ *{any}* | ||
|
||
data An object that contains the data to be passed to the template | ||
|
||
|
||
__Returns__ *{Object}* | ||
Returns an object with data for the widet. | ||
|
||
|
||
Registers the widget and passes the data along to the declared template. | ||
Template must be defined within the Passed argument otherwise it will default | ||
to the default widget template. | ||
|
||
> ```orion.dashboard.registerWidget = function (data){ ...``` [orionjs_dashboard_api.js:43](orionjs_dashboard_api.js#L43) | ||
|
||
- | ||
|
||
### <a name="ReactiveTemplates.helpers"></a>*ReactiveTemplates*.helpers {function} <sub><i>Client</i></sub> ### | ||
|
||
*This property __helpers__ is defined in `ReactiveTemplates`* | ||
|
||
__Returns__ *{undefined}* | ||
|
||
|
||
Pulls all widgets from the orion.dashboard._widgets array and passes them | ||
along to the declared template. | ||
|
||
> ```ReactiveTemplates.helpers(``` [orionjs_dashboard_api.js:61](orionjs_dashboard_api.js#L61) | ||
|