[FIX] correctly initialize web_chat addon

bzr revid: xmo@openerp.com-20110414132310-qfuewowccf1f2fx9
This commit is contained in:
Xavier Morel
2011-04-14 15:23:10 +02:00
parent bc2b83e883
commit 8acaa289a0
3 changed files with 19 additions and 27 deletions
+9 -3
View File
@@ -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,
}
+10
View File
@@ -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();
};
-24
View File
@@ -1,24 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="/web_chat/static/lib/AjaxIM/js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="/web_chat/static/lib/AjaxIM/js/jquery.jsonp-1.1.0.js"></script>
<script type="text/javascript" src="/web_chat/static/lib/AjaxIM/js/jquery.jstore-all-min.js"></script>
<script type="text/javascript" src="/web_chat/static/lib/AjaxIM/js/jquery.md5.js"></script>
<script type="text/javascript" src="/web_chat/static/lib/AjaxIM/js/im.js"></script>
</head>
<body>
<script>
var AjaxIM, AjaxIMLoadedFunction;
$(function() {
AjaxIM.init({
pollServer: '/web_chat/pollserver',
theme: '/web_chat/static/lib/AjaxIM/themes/default',
flashStorage: '/web_chat/static/lib/AjaxIM/js/jStore.Flash.html'
});
AjaxIM.client.login();
});
</script>
</body>
</html>