Skip to content

Commit

Permalink
[v0.1.0]
Browse files Browse the repository at this point in the history
- Documentation update
  • Loading branch information
rwatts3 committed Nov 4, 2015
1 parent 7b7871d commit ebf47a3
Show file tree
Hide file tree
Showing 2 changed files with 332 additions and 0 deletions.
103 changes: 103 additions & 0 deletions api.md
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()&nbsp;&nbsp;<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}&nbsp;&nbsp;<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}&nbsp;&nbsp;<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}&nbsp;&nbsp;<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})&nbsp;&nbsp;<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}&nbsp;&nbsp;<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)

229 changes: 229 additions & 0 deletions internal.api.md
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()&nbsp;&nbsp;<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 ()&nbsp;&nbsp;<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()&nbsp;&nbsp;<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()&nbsp;&nbsp;<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()&nbsp;&nbsp;<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()&nbsp;&nbsp;<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()&nbsp;&nbsp;<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()&nbsp;&nbsp;<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}&nbsp;&nbsp;<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}&nbsp;&nbsp;<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}&nbsp;&nbsp;<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})&nbsp;&nbsp;<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}&nbsp;&nbsp;<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)

0 comments on commit ebf47a3

Please sign in to comment.