This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.route('home',{ | |
| path: '/:_domain', | |
| data: function(){ | |
| if(domains.find().count() <= 0) | |
| { | |
| Router.go('register'); | |
| } | |
| return {'name':this.params._domain}; | |
| }, | |
| waitOn: function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ok, everything's ready. Here comes Meteor! | |
| [[[[[ ~/Desktop/mymeteorapp ]]]]] | |
| => Started proxy. | |
| => Started MongoDB. | |
| I20140718-11:07:16.323(2)? Jasmine-Unit is loaded | |
| I20140718-11:07:16.398(2)? [velocity] PWD /Users/mango/Desktop/mymeteorapp | |
| I20140718-11:07:16.460(2)? Check for test package configs... [ 'packages/blaze-layout/examples/simple/smart.json', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| => Started proxy. | |
| => Started MongoDB. | |
| I20140718-11:38:32.833(2)? Jasmine-Unit is loaded | |
| I20140718-11:38:32.930(2)? [velocity] PWD /Users/mango/Desktop/mymeteorapp | |
| I20140718-11:38:33.041(2)? Check for test package configs... [ 'packages/blaze-layout/examples/simple/smart.json', | |
| I20140718-11:38:33.041(2)? 'packages/blaze-layout/smart.json', | |
| I20140718-11:38:33.041(2)? 'packages/chosen-package/smart.json', | |
| I20140718-11:38:33.041(2)? 'packages/collection-hooks/smart.json', | |
| I20140718-11:38:33.041(2)? 'packages/collection2/smart.json', | |
| I20140718-11:38:33.042(2)? 'packages/handlebar-helpers/smart.json', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Template.sidebarProject.projectPath = function(){ | |
| return Router.path('project',{_project:'blabla',_domain:'cyan'}); | |
| }; | |
| Template.sidebarProject.events({ | |
| 'click #projectLink' : function(e,t) | |
| { | |
| e.preventDefault(); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.route('project',{ | |
| path: '/:_domain/projects/:_project', | |
| onBeforeAction : 'loading', | |
| data: function(){ | |
| return {'name':this.params._domain}; | |
| }, | |
| waitOn: function(){ | |
| var subscription = subs.subscribe('userDomain',this.params._domain,function(){ | |
| if(Domains.find().count() <= 0) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var subs = new SubsManager({ | |
| // will be cached only 20 recently used subscriptions | |
| cacheLimit: 20, | |
| // any subscription will be expired after 5 minutes of inactivity | |
| expireIn: 20 | |
| }); | |
| Router.configure({ | |
| layoutTemplate: 'layout', | |
| loadingTemplate: 'loading' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Meteor.publish('userDomain', function(domainName) { | |
| var domain,users; | |
| domain = Domains.find({name:domainName}); | |
| if(domain.count() <= 0) | |
| { | |
| this.ready(); | |
| return null; | |
| } | |
| var domainId = domain.fetch()[0]._id; | |
| if(!domainId) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.route('project',{ | |
| path: '/:_domain/projects/:_project', | |
| layoutTemplate: 'privateLayout', | |
| loadingTemplate: 'loading', | |
| data: function(){ | |
| return {'domainname':this.params._domain}; | |
| }, | |
| waitOn: function(){ | |
| return [subs.subscribe('userDomain',this.params._domain),subs.subscribe('projects'),subs.subscribe('tasks'),subs.subscribe('images')]; | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Meteor.publish('userData', function() { | |
| if(!this.userId) | |
| { | |
| this.ready(); | |
| return null; | |
| } | |
| return Meteor.users.find(this.userId, {fields: {username:1,roles:1}}); | |
| }); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| subs = new SubsManager({ | |
| // will be cached only 20 recently used subscriptions | |
| cacheLimit: 20, | |
| // any subscription will be expired after 5 minutes of inactivity | |
| expireIn: 20 | |
| }); | |
| Router.configure({ | |
| layoutTemplate: 'layout', | |
| loadingTemplate: 'loading' |
OlderNewer