summaryrefslogtreecommitdiff
path: root/addons/google_docs/static/src
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
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')
-rw-r--r--addons/google_docs/static/src/js/gdocs.js3
-rw-r--r--addons/google_docs/static/src/xml/gdocs.xml10
2 files changed, 4 insertions, 9 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();
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 @@
<templates id="template" xml:space="preserve">
<t t-extend="FormView.sidebar.attachments">
<t t-jquery="div.oe-binary-file-set" t-operation="append">
- <br/>
- <br/>
- <br/>
- <br/>
- <br/>
- <br/>
- <br/>
<button class="oe_google_docs_text_button" type="button">
<img src="/web/static/src/img/throbber.gif" width="16" height="16" style="display: none"/>
<span>Add GDoc - text</span>
@@ -19,10 +12,11 @@
<img src="/web/static/src/img/throbber.gif" width="16" height="16" style="display: none"/>
<span>Add GDoc - spreadsheet</span>
</button>
+ <!--
<button class="oe_google_docs_slide_button" type="button">
<img src="/web/static/src/img/throbber.gif" width="16" height="16" style="display: none"/>
<span>Add GDoc - presentation</span>
- </button>
+ </button>-->
</t>
</t>
</templates>