From 9d5db695ee3e1cfc1f0d306bccf117640a14927b Mon Sep 17 00:00:00 2001 From: MVA Date: Mon, 19 Mar 2012 11:31:32 +0100 Subject: [REF] correct the code and change the view files bzr revid: mva@openerp.com-20120319103132-av7c09avg4p0xgt3 --- addons/google_docs/static/src/js/gdocs.js | 3 ++- addons/google_docs/static/src/xml/gdocs.xml | 10 ++-------- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'addons/google_docs/static/src') diff --git a/addons/google_docs/static/src/js/gdocs.js b/addons/google_docs/static/src/js/gdocs.js index b7353fd0bba..c6bc1caa5ed 100644 --- a/addons/google_docs/static/src/js/gdocs.js +++ b/addons/google_docs/static/src/js/gdocs.js @@ -4,6 +4,7 @@ openerp.google_docs = function(instance, session) { instance.web.form.SidebarAttachments = instance.web.form.SidebarAttachments.extend({ init: function() { this._super.apply(this, arguments); + this.$element.delegate('.oe_google_docs_text_button', 'click', this.on_add_text_gdoc); var self = this; var config = new instance.web.DataSet(this, 'google.docs.config', this.view.dataset.get_context()); config.call('get_config', [this.view.dataset.ids[this.view.dataset.index]], function(r) { @@ -21,7 +22,7 @@ openerp.google_docs = function(instance, session) { }); }); }, - on_add_gdoc: function() { + on_add_text_gdoc: function() { var self = this; var $gdocbtn = this.$element.find('.oe_google_docs_text_button'); $gdocbtn.attr('disabled', 'true').find('img, span').toggle(); diff --git a/addons/google_docs/static/src/xml/gdocs.xml b/addons/google_docs/static/src/xml/gdocs.xml index f401512e96b..1182e9f8421 100644 --- a/addons/google_docs/static/src/xml/gdocs.xml +++ b/addons/google_docs/static/src/xml/gdocs.xml @@ -4,13 +4,6 @@ -
-
-
-
-
-
-
+
-- cgit v1.2.3