From 8acaa289a0a8dc20239c78c9bf815c2633e60284 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 14 Apr 2011 15:23:10 +0200 Subject: [PATCH] [FIX] correctly initialize web_chat addon bzr revid: xmo@openerp.com-20110414132310-qfuewowccf1f2fx9 --- addons/web_chat/__openerp__.py | 12 +++++++++--- addons/web_chat/static/src/js/web_chat.js | 10 ++++++++++ addons/web_chat/static/src/web_chat.html | 24 ----------------------- 3 files changed, 19 insertions(+), 27 deletions(-) create mode 100644 addons/web_chat/static/src/js/web_chat.js delete mode 100644 addons/web_chat/static/src/web_chat.html diff --git a/addons/web_chat/__openerp__.py b/addons/web_chat/__openerp__.py index 9c9ee6f3b2f..e177288953c 100644 --- a/addons/web_chat/__openerp__.py +++ b/addons/web_chat/__openerp__.py @@ -1,8 +1,14 @@ { "name": "Web Chat", "version": "2.0", - "depends": [], - "js": ["static/src/web_chat.js"], + "depends": ['base'], + "js": [ + 'static/lib/AjaxIM/js/jquery.jsonp-1.1.0.js', + 'static/lib/AjaxIM/js/jquery.jstore-all-min.js', + 'static/lib/AjaxIM/js/jquery.md5.js', + 'static/lib/AjaxIM/js/im.js', + 'static/src/js/web_chat.js' + ], "css": [], - 'active': False, + 'active': True, } diff --git a/addons/web_chat/static/src/js/web_chat.js b/addons/web_chat/static/src/js/web_chat.js new file mode 100644 index 00000000000..fce64ee6f78 --- /dev/null +++ b/addons/web_chat/static/src/js/web_chat.js @@ -0,0 +1,10 @@ +openerp.web_chat = function (openerp) { + openerp.web_chat = {}; + openerp.web_chat.im = new AjaxIM({ + storageMethod: 'local', + pollServer: '/web_chat/pollserver', + theme: '/web_chat/static/lib/AjaxIM/themes/default', + flashStorage: '/web_chat/static/lib/AjaxIM/js/jStore.Flash.html' + }); + openerp.web_chat.im.login(); +}; diff --git a/addons/web_chat/static/src/web_chat.html b/addons/web_chat/static/src/web_chat.html deleted file mode 100644 index a1070ab475a..00000000000 --- a/addons/web_chat/static/src/web_chat.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - -