diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-03-01 18:39:34 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-03-01 18:39:34 +0100 |
| commit | 2b8605c6e21a3b6fceb20352295e8148df69cbd8 (patch) | |
| tree | e182e910fd991805bff4ebe33e5e53fb2356ccfe /addons | |
| parent | 775022e01f13b88007887d5d5779bc9219c88852 (diff) | |
[FIX] google_drive: show icon via css instead of injecting html
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/google_drive/static/src/css/google_drive.css | 5 | ||||
| -rw-r--r-- | addons/google_drive/static/src/img/drive_icon.png | bin | 2148 -> 1542 bytes | |||
| -rw-r--r-- | addons/google_drive/static/src/js/gdrive.js | 4 | ||||
| -rw-r--r-- | addons/google_drive/views/google_drive.xml | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/addons/google_drive/static/src/css/google_drive.css b/addons/google_drive/static/src/css/google_drive.css new file mode 100644 index 00000000000..ce2b22599b0 --- /dev/null +++ b/addons/google_drive/static/src/css/google_drive.css @@ -0,0 +1,5 @@ +li.oe_share_gdoc > a:after { + content: url('/google_drive/static/src/img/drive_icon.png'); + position: absolute; + right: 5px; +} diff --git a/addons/google_drive/static/src/img/drive_icon.png b/addons/google_drive/static/src/img/drive_icon.png Binary files differindex 590dde867f4..1553aa319a6 100644 --- a/addons/google_drive/static/src/img/drive_icon.png +++ b/addons/google_drive/static/src/img/drive_icon.png diff --git a/addons/google_drive/static/src/js/gdrive.js b/addons/google_drive/static/src/js/gdrive.js index 6b5e1f83bf9..20837859212 100644 --- a/addons/google_drive/static/src/js/gdrive.js +++ b/addons/google_drive/static/src/js/gdrive.js @@ -38,7 +38,7 @@ openerp.google_drive = function (instance, m) { } if (!already_there){ self.add_items('other', [{ - label: res.name+ '<img style="position:absolute;right:5px;height:20px;width:20px;" title="Google Drive" src="google_drive/static/src/img/drive_icon.png"/>', + label: res.name, config_id: res.id, res_id: res_id, res_model: view.dataset.model, @@ -73,4 +73,4 @@ openerp.google_drive = function (instance, m) { }, }); -};
\ No newline at end of file +}; diff --git a/addons/google_drive/views/google_drive.xml b/addons/google_drive/views/google_drive.xml index 5017f53f1a8..0f9887e1602 100644 --- a/addons/google_drive/views/google_drive.xml +++ b/addons/google_drive/views/google_drive.xml @@ -5,6 +5,7 @@ <data> <template id="assets_backend" name="google_drive assets" inherit_id="web.assets_backend"> <xpath expr="." position="inside"> + <link rel="stylesheet" href="/google_drive/static/src/css/google_drive.css" /> <script type="text/javascript" src="/google_drive/static/src/js/gdrive.js"></script> </xpath> </template> |
