From 0ad14b3c905c04d89022625b9ab8edb5b5a79142 Mon Sep 17 00:00:00 2001 From: Rudolfs Janitis Date: Fri, 1 Apr 2016 19:39:35 +0300 Subject: [PATCH 1/2] Created basic Bootstrap template --- package.js | 38 ++++++++++++++------------ src/orionjs-dashboard-bootstrap.css | 16 +++++++++++ src/orionjs-dashboard-bootstrap.html | 32 ++++++++++++++++++++-- src/orionjs-dashboard-materialize.html | 6 ++-- src/orionjs-dashboard.js | 22 +++++++-------- 5 files changed, 79 insertions(+), 35 deletions(-) create mode 100644 src/orionjs-dashboard-bootstrap.css diff --git a/package.js b/package.js index ab6d5ca..0baff48 100644 --- a/package.js +++ b/package.js @@ -14,26 +14,28 @@ Package.onUse(function(api) { api.versionsFrom('1.2.1'); api.use([ 'ecmascript', - 'meteor-platform', - 'check', - 'orionjs:core@1.6.0', - 'nicolaslopezj:roles@2.0.1', - 'tmeasday:publish-counts@0.7.2' + 'meteor-platform', + 'check', + 'orionjs:core@1.6.0', + 'nicolaslopezj:roles@2.0.1', + 'tmeasday:publish-counts@0.7.2', + 'fortawesome:fontawesome@4.5.0' ]); api.imply(['tmeasday:publish-counts','orionjs:core']); - - api.use(['orionjs:bootstrap@1.6.0','orionjs:materialize@1.6.0'],'client',{weak:true}); - + + api.use(['orionjs:bootstrap@1.6.0','orionjs:materialize@1.6.0'],'client',{weak:true}); + api.addFiles('src/orionjs-dashboard.js'); - - api.addFiles([ - 'src/orionjs-dashboard-bootstrap.html', - 'src/orionjs-dashboard-materialize.html', - 'src/orionjs-dashboard-client.js', - 'src/orionjs-dashboard-api.js' - ], 'client'); - - api.export('orion'); + + api.addFiles([ + 'src/orionjs-dashboard-bootstrap.html', + 'src/orionjs-dashboard-bootstrap.css', + 'src/orionjs-dashboard-materialize.html', + 'src/orionjs-dashboard-client.js', + 'src/orionjs-dashboard-api.js' + ], 'client'); + + api.export('orion'); }); Package.onTest(function (api) { @@ -43,4 +45,4 @@ Package.onTest(function (api) { api.addFiles(['tests/orionjs-dashboard-tests.js']); }); -// meteor test-packages --velocity --driver-package respondly:test-reporter rwatts:orionjs-dashboard \ No newline at end of file +// meteor test-packages --velocity --driver-package respondly:test-reporter rwatts:orionjs-dashboard diff --git a/src/orionjs-dashboard-bootstrap.css b/src/orionjs-dashboard-bootstrap.css new file mode 100644 index 0000000..2b3739b --- /dev/null +++ b/src/orionjs-dashboard-bootstrap.css @@ -0,0 +1,16 @@ +.widget .well .count > h1 { + margin: 0; +} + +.widget .well .icon { + text-align: right; +} + +.widget .well .icon > i { + font-size: 39px; + margin-right: .2em; +} + +.widget .well .widget-label { + text-align: center; +} diff --git a/src/orionjs-dashboard-bootstrap.html b/src/orionjs-dashboard-bootstrap.html index 8202827..b23bcc9 100644 --- a/src/orionjs-dashboard-bootstrap.html +++ b/src/orionjs-dashboard-bootstrap.html @@ -1,8 +1,34 @@ \ No newline at end of file + + + diff --git a/src/orionjs-dashboard-materialize.html b/src/orionjs-dashboard-materialize.html index a4632c8..67baef2 100644 --- a/src/orionjs-dashboard-materialize.html +++ b/src/orionjs-dashboard-materialize.html @@ -1,8 +1,8 @@ \ No newline at end of file + diff --git a/src/orionjs-dashboard.js b/src/orionjs-dashboard.js index 636b73b..277e768 100644 --- a/src/orionjs-dashboard.js +++ b/src/orionjs-dashboard.js @@ -3,7 +3,7 @@ * @where {client|server} * @private * @return {Boolean} Returns Boolean True or False - * + * * Optional setting allowing or denying the dashboard link to display * in the admin panel. */ @@ -13,10 +13,10 @@ Options.init('showDashboardTab', true); * @where {client|server} * @private * @return {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 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('showDashboardTab') == true) { Options.set('adminHomeRoute', 'orionDashboard'); @@ -26,7 +26,7 @@ if (Options.get('showDashboardTab') == true) { * @where {client|server} * @private * @return {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. @@ -42,7 +42,7 @@ if (_.has(Package, 'orionjs:materialize')) { * @where {client|server} * @private * @return {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. @@ -58,7 +58,7 @@ if (_.has(Package, 'orionjs:materialize')) { * @where {client|server} * @private * @return {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. @@ -70,8 +70,8 @@ Roles.registerAction('orionDashboard', true); * @where {client} * @private * @return {Object} - * - * Registers the route for the dashboard. By Default this route is always + * + * Registers the route for the dashboard. By Default this route is always * registered as a subpath of /admin/ */ RouterLayer.route('/admin/dashboard', { @@ -86,7 +86,7 @@ RouterLayer.route('/admin/dashboard', { * @where {client} * @private * @return {String} - * + * * Adds a protected route to orionDashboard ensuring that the user must be * logged in to navigate to this path. */ From 6ea7fea3594adaf1093e248dae4258572582fcce Mon Sep 17 00:00:00 2001 From: Rudolfs Janitis Date: Mon, 11 Apr 2016 20:39:14 +0300 Subject: [PATCH 2/2] Added src/orionjs-dashboard.css --- package.js | 1 + src/orionjs-dashboard-bootstrap.html | 6 +++--- src/orionjs-dashboard.css | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 src/orionjs-dashboard.css diff --git a/package.js b/package.js index 0baff48..edced18 100644 --- a/package.js +++ b/package.js @@ -28,6 +28,7 @@ Package.onUse(function(api) { api.addFiles('src/orionjs-dashboard.js'); api.addFiles([ + 'src/orionjs-dashboard.css', 'src/orionjs-dashboard-bootstrap.html', 'src/orionjs-dashboard-bootstrap.css', 'src/orionjs-dashboard-materialize.html', diff --git a/src/orionjs-dashboard-bootstrap.html b/src/orionjs-dashboard-bootstrap.html index b23bcc9..09466b0 100644 --- a/src/orionjs-dashboard-bootstrap.html +++ b/src/orionjs-dashboard-bootstrap.html @@ -1,8 +1,8 @@