_.each(result, function(res) {
setTimeout(function() {
//If notification not already displayed, we add button and action on it
if (!($.find(".eid_"+res.event_id)).length) {
res.title = QWeb.render('notify_title', {'title': res.title, 'id' : res.event_id});
res.message += QWeb.render("notify_footer");
a = self.do_notify(res.title,res.message,true);
a.element.find(".link2showed").on('click',function() {
self.get_notif_box(this).find('.ui-notify-close').trigger("click");
self.rpc("/calendar/notify_ack");
});
}
答案 0 :(得分:0)
_.each(result, function(res) {setTimeout(function() {
//If notification not already displayed, we add button and action on it
if (!($.find(".eid_"+res.event_id)).length) {
res.title = QWeb.render('notify_title', {'title': res.title, 'id' : res.event_id});
res.message += QWeb.render("notify_footer");
a = self.do_notify(res.title,res.message,true);
a.element.find(".link2showed").on('click',function() {
self.get_notif_box(this).find('.ui-notify-close').trigger("click");
self.rpc("/calendar/notify_ack");
});
}}); });
试试这个..