From 3ad5555256afc58f1d74ceec8cb9b0b47c19ffd7 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 8 Jun 2015 17:38:40 +0100 Subject: generate the callbacks for white cards in the common part Signed-off-by: Olivier Gayot --- cao-common.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cao-common.js b/cao-common.js index cc29ddb..c911b31 100644 --- a/cao-common.js +++ b/cao-common.js @@ -42,7 +42,10 @@ var CAO = function() { var idx = result['cards'][i][0]; var desc = result['cards'][i][1]; - white_cards[idx] = desc; + white_cards[idx] = { + 'desc': desc, + 'event': self.gen_callback_white_card(idx) + }; self.on_show_white_card(idx, desc) } @@ -97,7 +100,10 @@ var CAO = function() { var idx = result['card']['id']; var desc = result['card']['desc']; - white_cards[idx] = desc; + white_cards[idx] = { + 'desc': desc, + 'event': self.gen_callback_white_card(idx) + }; self.on_show_white_card(idx, desc); }; -- cgit v1.2.3