diff options
| author | Yuval Adam <yuval@y3xz.com> | 2015-07-07 18:00:25 +0300 |
|---|---|---|
| committer | Yuval Adam <yuval@y3xz.com> | 2015-07-07 18:00:25 +0300 |
| commit | c079c5914a1980d656ef96eca5fa775aebaab648 (patch) | |
| tree | 4e9905ae21403ed3b9ba75a8be6bf08c81e80741 | |
| parent | 288893999c04a2cbe9adbc61ae7d753913bdb07e (diff) | |
Add printing stubs
| -rw-r--r-- | client/button.js | 8 | ||||
| -rw-r--r-- | 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); + } } }); |
