Merge branch 'master' of github.com:TelescopeJS/Telescope

This commit is contained in:
Sacha Greif 2014-09-19 20:17:02 +09:00
commit 64df11d9fe
5 changed files with 9 additions and 9 deletions

View file

@ -1,13 +1,13 @@
# Setup for Nitrous.IO
Before you can run this project, you will need to install Meteor with Autoparts, and install Meteorite with NPM.
Before you can run this project, you will need to install Meteor with Autoparts (open-source package manager built specifically for Nitrous.IO boxes).
Run the following commands in the Terminal below:
1. `cd ~/workspace/Telescope/`
2. `parts install meteor`
3. `npm install -g meteorite`
4. `mrt update`
5. `meteor`
3. `meteor -p 0.0.0.0:3000`
Go to the "Preview Menu" and click "Port 3000"
Usually you would just run `meteor`, but for nitrous environment host `0.0.0.0` is required.
To preview the app, go to the "Preview Menu" and click "Port 3000"

View file

@ -34,7 +34,7 @@ Template[getTemplate('posts_digest')].helpers({
},
previousDateURL: function(){
var currentDate=moment(Session.get('currentDate'));
var newDate=currentDate.subtract('days', 1);
var newDate=currentDate.subtract(1, 'days');
return getDigestURL(newDate);
},
showPreviousDate: function(){

View file

@ -28,7 +28,7 @@ getDigestURL = function(moment){
};
getDateRange= function(pageNumber){
var now = moment(new Date());
var dayToDisplay=now.subtract('days', pageNumber-1);
var dayToDisplay=now.subtract(pageNumber-1, 'days');
var range={};
range.start = dayToDisplay.startOf('day').valueOf();
range.end = dayToDisplay.endOf('day').valueOf();

View file

@ -120,7 +120,7 @@ numberOfItemsInPast24Hours = function(user, collection){
var items=collection.find({
userId: user._id,
createdAt: {
$gte: mDate.subtract('hours',24).valueOf()
$gte: mDate.subtract(24, 'hours').valueOf()
}
});
return items.count();

View file

@ -9,7 +9,7 @@ getCampaignPosts = function (postsCount) {
var lastCampaign = SyncedCron._collection.findOne({name: 'Schedule newsletter'}, {sort: {finishedAt: -1}, limit: 1});
// if there is a last campaign use its date, else default to posts from the last 7 days
var lastWeek = moment().subtract('days', 7).toDate();
var lastWeek = moment().subtract(7, 'days').toDate();
var after = (typeof lastCampaign != 'undefined') ? lastCampaign.finishedAt : lastWeek
var params = getParameters({