From c079c5914a1980d656ef96eca5fa775aebaab648 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Tue, 7 Jul 2015 18:00:25 +0300 Subject: Add printing stubs --- client/button.js | 8 ++++++-- server/methods.js | 6 ++++++ 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); + } } }); -- cgit v1.3.1