From 66cf63f213b507601b6841ac119418be7759800d Mon Sep 17 00:00:00 2001 From: thomasb Date: Mon, 1 Jun 2009 15:35:53 +0000 Subject: Use event system on the client to handle ajax callbacks git-svn-id: https://svn.roundcube.net/trunk@2589 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/js/app.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'roundcubemail/program/js/app.js') diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 5e323e229..4f12e808a 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -3923,6 +3923,12 @@ function rcube_webmail() console.log(response.exec); eval(response.exec); } + + // execute callback functions of plugins + if (response.callbacks && response.callbacks.length) { + for (var i=0; i < response.callbacks.length; i++) + this.triggerEvent(response.callbacks[i][0], response.callbacks[i][1]); + } // process the response data according to the sent action switch (response.action) { -- cgit v1.2.3