Vulcan/client/app.js

35 lines
805 B
JavaScript
Raw Normal View History

Meteor.subscribe('users');
2012-09-06 15:28:58 +09:00
2012-08-22 21:27:22 -04:00
Posts = new Meteor.Collection('posts');
Meteor.subscribe('posts');
2012-08-22 23:24:33 -04:00
Comments = new Meteor.Collection('comments');
Meteor.subscribe('comments', function() {
StyleNewRecords = new Date();
});
2012-08-23 00:15:48 -04:00
2012-08-30 21:35:48 -04:00
2012-09-06 19:42:11 +09:00
Settings = new Meteor.Collection('settings');
2012-09-24 15:36:37 +09:00
Meteor.subscribe('settings', function(){
2012-10-01 12:23:35 +09:00
// runs once on site load
if((proxinoKey=getSetting('proxinoKey'))){
2012-09-24 15:36:37 +09:00
Proxino.key = proxinoKey;
Proxino.track_errors();
}
2012-09-24 15:36:37 +09:00
});
2012-09-06 19:42:11 +09:00
2012-09-15 18:41:08 +09:00
$.fn.exists = function () {
return this.length !== 0;
}
2012-10-01 14:52:32 +09:00
getAuthorName = function(item){
2012-10-01 16:08:30 +09:00
// keep both variables for transition period
var id=item.userId || item.user_id;
2012-10-01 14:52:32 +09:00
// if item is linked to a user, get that user's display name. Else, return the author field.
2012-10-01 16:08:30 +09:00
return (id && (user=Meteor.users.findOne(id))) ? getDisplayName(user) : this.author;
2012-10-01 14:52:32 +09:00
}