From 8bc435e1e408b1cb13f7c9cc0d82ae24755a741f Mon Sep 17 00:00:00 2001 From: Luca Mussi Date: Sun, 16 Aug 2015 15:43:59 +0200 Subject: [PATCH] onRendered callbacks for atInput and weak deps for routing packages --- lib/at_input.js | 8 +++++--- package.js | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/at_input.js b/lib/at_input.js index 0a87374..7d9f07c 100644 --- a/lib/at_input.js +++ b/lib/at_input.js @@ -1,4 +1,6 @@ -Template.atInput.rendered = AccountsTemplates.atInputRendered; +_.each(AccountsTemplates.atInputRendered, function(callback){ + Template.atInput.onRendered(callback); +}); // Simply 'inherites' helpers from AccountsTemplates Template.atInput.helpers(AccountsTemplates.atInputHelpers); @@ -19,9 +21,9 @@ Template.atCheckboxInput.events({ } }); -Template.atSelectInput.rendered = function () { +Template.atSelectInput.onRendered(function () { $('.ui.dropdown').dropdown(); -}; +}); // Simply 'inherites' helpers from AccountsTemplates Template.atSelectInput.helpers(AccountsTemplates.atInputHelpers); diff --git a/package.js b/package.js index baa0165..d6ad84e 100644 --- a/package.js +++ b/package.js @@ -10,11 +10,16 @@ Package.on_use(function(api, where) { api.use([ 'templating', + 'underscore', ], 'client'); api.use([ 'useraccounts:core', ], ['client', 'server']); + + // Requires all routing packages loads before this asking for weak dependencies. + api.use('useraccounts:flow-routing@1.12.1', ['client', 'server'], {weak: true}); + api.use('useraccounts:iron-routing@1.12.1', ['client', 'server'], {weak: true}); api.imply([ 'useraccounts:core@1.12.1',