[FIX] correctly initialize web_chat addon
bzr revid: xmo@openerp.com-20110414132310-qfuewowccf1f2fx9
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user