From cce866dd79a3ce27914b3ba10067bc55e8b9940d Mon Sep 17 00:00:00 2001 From: Thaum Date: Sun, 30 Nov 2014 08:31:45 +0000 Subject: [PATCH] Added loading bar to routes --- rpg-docs/.meteor/packages | 3 ++- rpg-docs/.meteor/versions | 3 ++- rpg-docs/Routes/Routes.js | 13 ++++++++----- rpg-docs/client/views/loading/loading.css | 8 ++++++-- rpg-docs/client/views/loading/loading.html | 2 +- 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/rpg-docs/.meteor/packages b/rpg-docs/.meteor/packages index a00dc148..804fa513 100644 --- a/rpg-docs/.meteor/packages +++ b/rpg-docs/.meteor/packages @@ -4,7 +4,6 @@ # but you can also edit it by hand. meteor-platform -autopublish insecure iron:router accounts-password @@ -16,3 +15,5 @@ cw4gn3r:jquery-event-drag underscore aldeed:collection2 aldeed:autoform +multiply:iron-router-progress + diff --git a/rpg-docs/.meteor/versions b/rpg-docs/.meteor/versions index 34f08f31..31008504 100644 --- a/rpg-docs/.meteor/versions +++ b/rpg-docs/.meteor/versions @@ -6,7 +6,6 @@ aldeed:autoform@3.2.0 aldeed:collection2@2.2.0 aldeed:simple-schema@1.0.3 application-configuration@1.0.3 -autopublish@1.0.1 autoupdate@1.1.3 base64@1.0.1 binary-heap@1.0.1 @@ -15,6 +14,7 @@ blaze@2.0.3 boilerplate-generator@1.0.1 callback-hook@1.0.1 check@1.0.2 +coffeescript@1.0.4 ctl-helper@1.0.4 ctl@1.0.2 cw4gn3r:jquery-event-drag@2.2.0 @@ -54,6 +54,7 @@ mobile-status-bar@1.0.1 mongo-livedata@1.0.6 mongo@1.0.8 mrt:moment@2.6.0 +multiply:iron-router-progress@1.0.0 npm-bcrypt@0.7.7 observe-sequence@1.0.3 ordered-dict@1.0.1 diff --git a/rpg-docs/Routes/Routes.js b/rpg-docs/Routes/Routes.js index fa0dd1d5..eb94e951 100644 --- a/rpg-docs/Routes/Routes.js +++ b/rpg-docs/Routes/Routes.js @@ -1,6 +1,6 @@ -/*Router.configure({ - loadingTemplate: 'loading' -});*/ +Router.configure({ + loadingTemplate: 'loading' +}); Router.map( function () { this.route('home', @@ -19,8 +19,7 @@ Router.map( function () { this.route('characterSheet', { path: '/character/:_id', waitOn: function(){ - return Meteor.subscribe("characterList", Meteor.userId()); - //return Meteor.subscribe("singleCharacter", this.params._id, Meteor.userId()); + return Meteor.subscribe("singleCharacter", this.params._id, Meteor.userId()); }, data: function() { var data = Characters.findOne({_id: this.params._id}, {fields: {_id: 1}}); @@ -46,4 +45,8 @@ Router.map( function () { return data; } }); + + this.route('loading', { + path: '/loading' + }); }); diff --git a/rpg-docs/client/views/loading/loading.css b/rpg-docs/client/views/loading/loading.css index 47e35481..28f6171c 100644 --- a/rpg-docs/client/views/loading/loading.css +++ b/rpg-docs/client/views/loading/loading.css @@ -1,3 +1,7 @@ -paper-spinner.red::shadow .circle { - border-color: #db4437; +#iron-router-progress { + background-color : #D50000; } + +#iron-router-progress.spinner:before { + border-color : #D50000; +} \ No newline at end of file diff --git a/rpg-docs/client/views/loading/loading.html b/rpg-docs/client/views/loading/loading.html index 432b1b18..06d65e24 100644 --- a/rpg-docs/client/views/loading/loading.html +++ b/rpg-docs/client/views/loading/loading.html @@ -1,3 +1,3 @@