summaryrefslogtreecommitdiff
path: root/addons/google_docs/static/src/js
diff options
context:
space:
mode:
authorMVA <mva@openerp.com>2012-03-19 11:31:32 +0100
committerMVA <mva@openerp.com>2012-03-19 11:31:32 +0100
commit9d5db695ee3e1cfc1f0d306bccf117640a14927b (patch)
tree34fd81e18758843760a9c1f4c3304de21850a14e /addons/google_docs/static/src/js
parentebb97da4d16ffdbf74091bc6742f1f175ac0142b (diff)
[REF] correct the code and change the view files
bzr revid: mva@openerp.com-20120319103132-av7c09avg4p0xgt3
Diffstat (limited to 'addons/google_docs/static/src/js')
-rw-r--r--addons/google_docs/static/src/js/gdocs.js3
1 files changed, 2 insertions, 1 deletions
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();