diff --git a/api.md b/api.md new file mode 100644 index 0000000..836f5c4 --- /dev/null +++ b/api.md @@ -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)._ + +- + +### *orionlinks*.add()  Client ### + +*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) + + +- + +### orion {function}  Client ### + + +__Returns__ *{Object}* + + +Declares the orion namespace + +> ```orion = orion;``` [orionjs_dashboard_api.js:9](orionjs_dashboard_api.js#L9) + + +- + +### *orion*.dashboard {function}  Client ### + +*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) + + +- + +### *oriondashboard*._widgets {function}  Client ### + +*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) + + +- + +### *oriondashboard*.registerWidget({Object})  Client ### + +*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) + + +- + +### *ReactiveTemplates*.helpers {function}  Client ### + +*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) + + diff --git a/internal.api.md b/internal.api.md new file mode 100644 index 0000000..710e791 --- /dev/null +++ b/internal.api.md @@ -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}__ + +*** + +### *Options*.init()  Anywhere ### + +*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) + + +- + +### if ()  Anywhere ### + +*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) + + +- + +### *ReactiveTemplates*.request()  Anywhere ### + +*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) + + +- + +### *ReactiveTemplates*.request()  Anywhere ### + +*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) + + +- + +### *Roles*.registerAction()  Anywhere ### + +*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) + + +- + +### *RouterLayer*.route()  Client ### + +*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) + + +- + +### *orionaccounts*.addProtectedRoute()  Client ### + +*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}__ + +*** + +### *orionlinks*.add()  Client ### + +*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}__ + +*** + +### orion {function}  Client ### + + +__Returns__ *{Object}* + + +Declares the orion namespace + +> ```orion = orion;``` [orionjs_dashboard_api.js:9](orionjs_dashboard_api.js#L9) + + +- + +### *orion*.dashboard {function}  Client ### + +*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) + + +- + +### *oriondashboard*._widgets {function}  Client ### + +*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) + + +- + +### *oriondashboard*.registerWidget({Object})  Client ### + +*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) + + +- + +### *ReactiveTemplates*.helpers {function}  Client ### + +*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) + +