summaryrefslogtreecommitdiff
path: root/addons/web_livechat/web
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2011-10-13 19:03:27 +0200
committerOlivier Dony <odo@openerp.com>2011-10-13 19:03:27 +0200
commit3bffe65b2ca8bc50ece644e7947ad2bbd5c9341a (patch)
treeb307874680dbdce7b2f5109b7b696ea38e679e20 /addons/web_livechat/web
parenta93ca01b5b1365f92e191e3c429ef655e751b455 (diff)
parent8a7c61cb96a541a9aaca51ffe3ee903407b26360 (diff)
[MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20111013170327-9rvfdkbgj01hdgxb
Diffstat (limited to 'addons/web_livechat/web')
-rw-r--r--addons/web_livechat/web/__init__.py5
-rw-r--r--addons/web_livechat/web/editors.py93
-rw-r--r--addons/web_livechat/web/static/css/lc.css7
3 files changed, 0 insertions, 105 deletions
diff --git a/addons/web_livechat/web/__init__.py b/addons/web_livechat/web/__init__.py
deleted file mode 100644
index ec026b194f1..00000000000
--- a/addons/web_livechat/web/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-##############################################################################
-# This file is part of the "web-livechatinc-odoo" OpenERP module.
-# See LICENCE file at the root of the module folder.
-##############################################################################
-import editors
diff --git a/addons/web_livechat/web/editors.py b/addons/web_livechat/web/editors.py
deleted file mode 100644
index bb3dd3da354..00000000000
--- a/addons/web_livechat/web/editors.py
+++ /dev/null
@@ -1,93 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>).
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-import openobject.templating
-
-class BaseTemplateEditor(openobject.templating.TemplateEditor):
- templates = ['/openobject/controllers/templates/base.mako']
-
- def edit(self, template, template_text):
- output = super(BaseTemplateEditor, self).edit(template, template_text)
-
- end_head = output.index('</head>')
-
- output = output[:end_head] + """
- <link rel="stylesheet" type="text/css" href="/web_livechat/static/css/lc.css"/>
- <%
- cp.session['livechat'] = rpc.RPCProxy('publisher_warranty.contract').is_livechat_enable()
- %>
- % if cp.session['livechat']:
-<script type="text/javascript">
-
- (function() {
- var lc_params = '';
- var lc_lang = 'en';
- var lc_skill = '0';
-
- var lc = document.createElement('script'); lc.type = 'text/javascript'; lc.async = true;
- var lc_src = ('https:' == document.location.protocol ? 'https://' : 'http://');
- lc_src += 'chat.livechatinc.net/licence/1035052/script.cgi?lang='+lc_lang+unescape('%26')+'groups='+lc_skill;
- lc_src += ((lc_params == '') ? '' : unescape('%26')+'params='+encodeURIComponent(encodeURIComponent(lc_params))); lc.src = lc_src;
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);
- })();
-
-</script>
- % endif
- """ + output[end_head:]
-
- return output
-
-
-class HeaderTemplateEditor(openobject.templating.TemplateEditor):
- templates = ['/openerp/controllers/templates/header.mako']
-
-
- def edit(self, template, template_text):
- output = super(HeaderTemplateEditor, self).edit(template, template_text)
-
- PATTERN = '<div id="corner">'
- corner = output.index(PATTERN) + len(PATTERN)
-
-
- output = output[:corner] + """
- <p id="livechat_status" class="logout">
- ${ rpc.RPCProxy('publisher_warranty.contract').get_default_livechat_text() | n}
- </p>
- % if cp.session['livechat']:
-
- <script type="text/javascript">
- var __lc_buttons = __lc_buttons || [];
- __lc_buttons.push({
- elementId: 'livechat_status',
- language: 'en',
- skill: '0',
- type: 'text',
- labels: {
- online: '<img src="/web_livechat/static/images/available.png"/>Support',
- offline: '<img src="/web_livechat/static/images/away.png"/>Support'
- }
- });
- </script>
-
- % endif
- """ + output[corner:]
- return output
-
diff --git a/addons/web_livechat/web/static/css/lc.css b/addons/web_livechat/web/static/css/lc.css
deleted file mode 100644
index e6892857ddd..00000000000
--- a/addons/web_livechat/web/static/css/lc.css
+++ /dev/null
@@ -1,7 +0,0 @@
-#livechat_status a.online {
- text-shadow: 0 0 0.2em #9a0404, 0 0 0.2em #9a0404, 0 0 0.2em #9a0404, 0 0 0.2em #9a0404;
-}
-#livechat_status img {
- vertical-align: middle;
- margin-right: 0.5em;
-}