summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/button.js8
-rw-r--r--server/methods.js6
2 files changed, 12 insertions, 2 deletions
diff --git a/client/button.js b/client/button.js
index f483e8e..bc1f870 100644
--- a/client/button.js
+++ b/client/button.js
@@ -157,7 +157,10 @@ Template.dates.events({
var photos = _.sortBy(results.data.data, function(p) {
return p.created_time;
});
+
+ Session.set('date', { month: month, year: year });
Session.set('photos', photos);
+
$('form.dates div.error').hide();
$('form.dates button.dates').show();
}
@@ -214,10 +217,11 @@ Template.photos.events({
window.print();
},
'click button.share-save': function (event) {
-
+ window.print();
},
'click button.share-print': function (event) {
- window.print();
+ var date = Session.get('date');
+ Meteor.call('printFinalImage', date.month, date.year, [[1,2,3], [4,5,6]]);
}
})
diff --git a/server/methods.js b/server/methods.js
index 2254b08..d99728a 100644
--- a/server/methods.js
+++ b/server/methods.js
@@ -11,5 +11,11 @@ Meteor.methods({
},
getInstagramProfilePhoto: function () {
return Meteor.user().services.instagram.profile_picture;
+ },
+ printFinalImage: function(month, year, matrix) {
+ if (Meteor.userId()) {
+ var username = Meteor.user().services.instagram.username;
+ console.log('Printing', username, month, year, matrix);
+ }
}
});