diff options
| author | Ajay Chauhan (OpenERP) <cha@tinyerp.com> | 2012-07-11 17:22:22 +0530 |
|---|---|---|
| committer | Ajay Chauhan (OpenERP) <cha@tinyerp.com> | 2012-07-11 17:22:22 +0530 |
| commit | 14beea5700fe97d148f720b6c6942d2d38ff5a2d (patch) | |
| tree | 459406745e03b36044760951223a80188a9a2e28 /addons/web_livechat/static/src | |
| parent | 8a847dcf5e6e1dc85c29504fc352e873f63cc51d (diff) | |
| parent | 79a8450b72f4b23c6b5e86ac69502a49f881fccc (diff) | |
[MERGE] merge with parent branch
bzr revid: cha@tinyerp.com-20120711115222-9hzmeove3ly2e5bm
Diffstat (limited to 'addons/web_livechat/static/src')
| -rw-r--r-- | addons/web_livechat/static/src/css/lc.css | 7 | ||||
| -rw-r--r-- | addons/web_livechat/static/src/img/available.png | bin | 1153 -> 0 bytes | |||
| -rw-r--r-- | addons/web_livechat/static/src/img/away.png | bin | 1398 -> 0 bytes | |||
| -rw-r--r-- | addons/web_livechat/static/src/img/busy.png | bin | 1145 -> 0 bytes | |||
| -rw-r--r-- | addons/web_livechat/static/src/js/web_livechat.js | 127 | ||||
| -rw-r--r-- | addons/web_livechat/static/src/xml/web_livechat.xml | 10 |
6 files changed, 0 insertions, 144 deletions
diff --git a/addons/web_livechat/static/src/css/lc.css b/addons/web_livechat/static/src/css/lc.css deleted file mode 100644 index 7f1876a2793..00000000000 --- a/addons/web_livechat/static/src/css/lc.css +++ /dev/null @@ -1,7 +0,0 @@ -.livechat span.online { - text-shadow: 0 0 0.2em #9a0404, 0 0 0.2em #9a0404, 0 0 0.2em #9a0404, 0 0 0.2em #9a0404; -} -.livechat img { - vertical-align: middle; - margin-right: 0.5em; -} diff --git a/addons/web_livechat/static/src/img/available.png b/addons/web_livechat/static/src/img/available.png Binary files differdeleted file mode 100644 index e9eea88ae5f..00000000000 --- a/addons/web_livechat/static/src/img/available.png +++ /dev/null diff --git a/addons/web_livechat/static/src/img/away.png b/addons/web_livechat/static/src/img/away.png Binary files differdeleted file mode 100644 index f0a0847059f..00000000000 --- a/addons/web_livechat/static/src/img/away.png +++ /dev/null diff --git a/addons/web_livechat/static/src/img/busy.png b/addons/web_livechat/static/src/img/busy.png Binary files differdeleted file mode 100644 index ddb24377f0f..00000000000 --- a/addons/web_livechat/static/src/img/busy.png +++ /dev/null diff --git a/addons/web_livechat/static/src/js/web_livechat.js b/addons/web_livechat/static/src/js/web_livechat.js deleted file mode 100644 index 540af94310f..00000000000 --- a/addons/web_livechat/static/src/js/web_livechat.js +++ /dev/null @@ -1,127 +0,0 @@ -/*############################################################################ -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2011-2012 OpenERP SA (<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/>. -# -############################################################################*/ - -var __lc_buttons = []; - -openerp.web_livechat = function (openerp) { - -openerp.web_livechat.Livechat = openerp.web.Widget.extend({ - template: 'Systray.LiveChat', - - start: function() { - this._super(); - if (!this.session) - return; - var self = this; - var pwc = new openerp.web.Model("publisher_warranty.contract"); - pwc.get_func('is_livechat_enable')().then(function(res) { - if(res) { - self.$element.click(self.do_load_livechat); - } else { - self.$element.click(self.do_open_url); - } - }); - }, - - do_open_url: function(evt) { - evt.preventDefault(); - openerp.webclient.action_manager.do_action({type: 'ir.actions.act.url', url: 'http://www.openerp.com/support-or-publisher-warranty-contract', target: 'new'}); - }, - - do_load_livechat: function(evt) { - var self = this; - if (evt) { - evt.preventDefault(); - } - - this.$element.unbind('click', this.do_load_livechat); - - var lc_id = _.uniqueId('livechat_'); - this.$element.attr('id', lc_id); - - var pwc = new openerp.web.Model("publisher_warranty.contract"); - - pwc.get_func('is_livechat_enable')().then(function(res) { - if(!res) { - return; - } - - // connect to LiveChat - __lc_load(); - - __lc_buttons.push({ - elementId: lc_id, //'livechat_status', - language: 'en', - skill: '2', - type: 'text', - labels: { - online: '<img src="/web_livechat/static/src/img/available.png"/>', - offline: '<img src="/web_livechat/static/src/img/away.png"/>', - } - }); - }); - } -}); - -openerp.web.UserMenu.include({ - do_update: function() { - var self = this; - this._super.apply(this, arguments); - this.update_promise.then(function() { - if (self.livechat) { - self.livechat.destroy(); - } - self.livechat = new openerp.web_livechat.Livechat(self); - self.livechat.appendTo(openerp.webclient.$element.find('.oe_systray')); - }); - } -}); - -if (openerp.webclient) { - // tracking code from LiveChat - var license = '1035052', - params = '', - lang = 'en', - skill = '0'; - __lc_load = function (p) { - if (typeof __lc_loaded != 'function') - if (p) { - var d = document, - l = d.createElement('script'), - s = d.getElementsByTagName('script')[0], - a = unescape('%26'), - h = ('https:' == d.location.protocol ? 'https://' : 'http://'); - l.type = 'text/javascript'; - l.async = true; - l.src = h + 'gis' + p +'.livechatinc.com/gis.cgi?serverType=control'+a+'licenseID='+license+a+'jsonp=__lc_load'; - if (!(typeof p['server'] !== 'string' || typeof __lc_serv === 'string')) { - l.src = h + (__lc_serv = p['server']) + '/licence/'+license+'/script.cgi?lang='+lang+a+'groups='+skill; - l.src += (params == '') ? '' : a+'params='+encodeURIComponent(encodeURIComponent(params)); - s.parentNode.insertBefore(l, s); - } else - setTimeout(__lc_load, 1000); - if(typeof __lc_serv != 'string'){ - s.parentNode.insertBefore(l, s); - } - } else __lc_load(Math.ceil(Math.random()*5)); - } -} - -}; diff --git a/addons/web_livechat/static/src/xml/web_livechat.xml b/addons/web_livechat/static/src/xml/web_livechat.xml deleted file mode 100644 index 0f1bf073bc2..00000000000 --- a/addons/web_livechat/static/src/xml/web_livechat.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- vim:fdl=1: ---> -<templates id="template" xml:space="preserve"> -<t t-name="Systray.LiveChat"> - <div class="oe_systray_livechat" title="Support"> - <a href="#"><img src="/web_livechat/static/src/img/busy.png"/></a> - </div> -</t> -</templates> |
