Added loading bar to routes

This commit is contained in:
Thaum
2014-11-30 08:31:45 +00:00
parent f018a5f3a3
commit cce866dd79
5 changed files with 19 additions and 10 deletions

View File

@@ -4,7 +4,6 @@
# but you can also edit it by hand. # but you can also edit it by hand.
meteor-platform meteor-platform
autopublish
insecure insecure
iron:router iron:router
accounts-password accounts-password
@@ -16,3 +15,5 @@ cw4gn3r:jquery-event-drag
underscore underscore
aldeed:collection2 aldeed:collection2
aldeed:autoform aldeed:autoform
multiply:iron-router-progress

View File

@@ -6,7 +6,6 @@ aldeed:autoform@3.2.0
aldeed:collection2@2.2.0 aldeed:collection2@2.2.0
aldeed:simple-schema@1.0.3 aldeed:simple-schema@1.0.3
application-configuration@1.0.3 application-configuration@1.0.3
autopublish@1.0.1
autoupdate@1.1.3 autoupdate@1.1.3
base64@1.0.1 base64@1.0.1
binary-heap@1.0.1 binary-heap@1.0.1
@@ -15,6 +14,7 @@ blaze@2.0.3
boilerplate-generator@1.0.1 boilerplate-generator@1.0.1
callback-hook@1.0.1 callback-hook@1.0.1
check@1.0.2 check@1.0.2
coffeescript@1.0.4
ctl-helper@1.0.4 ctl-helper@1.0.4
ctl@1.0.2 ctl@1.0.2
cw4gn3r:jquery-event-drag@2.2.0 cw4gn3r:jquery-event-drag@2.2.0
@@ -54,6 +54,7 @@ mobile-status-bar@1.0.1
mongo-livedata@1.0.6 mongo-livedata@1.0.6
mongo@1.0.8 mongo@1.0.8
mrt:moment@2.6.0 mrt:moment@2.6.0
multiply:iron-router-progress@1.0.0
npm-bcrypt@0.7.7 npm-bcrypt@0.7.7
observe-sequence@1.0.3 observe-sequence@1.0.3
ordered-dict@1.0.1 ordered-dict@1.0.1

View File

@@ -1,6 +1,6 @@
/*Router.configure({ Router.configure({
loadingTemplate: 'loading' loadingTemplate: 'loading'
});*/ });
Router.map( function () { Router.map( function () {
this.route('home', this.route('home',
@@ -19,8 +19,7 @@ Router.map( function () {
this.route('characterSheet', { this.route('characterSheet', {
path: '/character/:_id', path: '/character/:_id',
waitOn: function(){ 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() { data: function() {
var data = Characters.findOne({_id: this.params._id}, {fields: {_id: 1}}); var data = Characters.findOne({_id: this.params._id}, {fields: {_id: 1}});
@@ -46,4 +45,8 @@ Router.map( function () {
return data; return data;
} }
}); });
this.route('loading', {
path: '/loading'
});
}); });

View File

@@ -1,3 +1,7 @@
paper-spinner.red::shadow .circle { #iron-router-progress {
border-color: #db4437; background-color : #D50000;
} }
#iron-router-progress.spinner:before {
border-color : #D50000;
}

View File

@@ -1,3 +1,3 @@
<template name="loading"> <template name="loading">
<paper-spinner class="red" active></paper-spinner> loading
</template> </template>