summaryrefslogtreecommitdiff
path: root/cao-common.js
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-06-08 17:38:40 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-06-08 17:38:40 +0100
commit3ad5555256afc58f1d74ceec8cb9b0b47c19ffd7 (patch)
tree500817762587742217e7bf289cd9e1738b030ab5 /cao-common.js
parent320e1030e9aa9323451c6bd78a58d05fe6eef05e (diff)
generate the callbacks for white cards in the common part
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'cao-common.js')
-rw-r--r--cao-common.js10
1 files 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);
};