diff options
| author | Roberto López López (OpenERP) <rlo@openerp.com> | 2012-02-27 16:13:11 +0100 |
|---|---|---|
| committer | Roberto López López (OpenERP) <rlo@openerp.com> | 2012-02-27 16:13:11 +0100 |
| commit | 3568bed68046537878e7386597abfb7978de3cdb (patch) | |
| tree | 81e1ae18ec0d3b812070b1d5868980f008d0e257 /addons/google_docs/static/src | |
| parent | 087c191730d611058b0303cf38d10989d868a7f8 (diff) | |
[imp] view
bzr revid: rlo@openerp.com-20120227151311-38go1bn2ihs1n5jq
Diffstat (limited to 'addons/google_docs/static/src')
| -rw-r--r-- | addons/google_docs/static/src/js/gdocs.js | 10 | ||||
| -rw-r--r-- | addons/google_docs/static/src/xml/gdocs.xml | 9 |
2 files changed, 16 insertions, 3 deletions
diff --git a/addons/google_docs/static/src/js/gdocs.js b/addons/google_docs/static/src/js/gdocs.js index 579414ee74a..14996da46a5 100644 --- a/addons/google_docs/static/src/js/gdocs.js +++ b/addons/google_docs/static/src/js/gdocs.js @@ -2,7 +2,6 @@ openerp.gdocs = function(instance) { instance.web.form.SidebarAttachments = instance.web.form.SidebarAttachments.extend({ on_attachments_loaded: function(attachments) { - alert('gdocs.js.on_attachments_loaded()'); this._super(attachments); var self = this; var $gdocbtn = self.$element.find('button.gdocs'); @@ -17,7 +16,7 @@ instance.web.form.SidebarAttachments = instance.web.form.SidebarAttachments.exte }, on_add_gdoc: function() { var self = this; - var $gdocbtn = this.$element.find('button.gdocs');alert($gdocbtn); + var $gdocbtn = this.$element.find('button.gdocs'); $gdocbtn.attr('disabled', 'true').find('img, span').toggle(); this.view.dataset.call_button('copy_gdoc', [[this.view.datarecord.id], this.view.dataset.get_context()], function(r) { $gdocbtn.hide(); @@ -28,3 +27,10 @@ instance.web.form.SidebarAttachments = instance.web.form.SidebarAttachments.exte }); }; + +$(function() { + console.log($('#gd-button')); + $('#gd-button').click(function(){alert('click');}); + alert('binded'); +} +); diff --git a/addons/google_docs/static/src/xml/gdocs.xml b/addons/google_docs/static/src/xml/gdocs.xml index 9f78a91c28f..61c169fe531 100644 --- a/addons/google_docs/static/src/xml/gdocs.xml +++ b/addons/google_docs/static/src/xml/gdocs.xml @@ -4,7 +4,14 @@ <templates id="template" xml:space="preserve"> <t t-extend="FormView.sidebar.attachments"> <t t-jquery="div.oe-binary-file-set" t-operation="append"> - <button class="oe-button" type="button"> + <br/> + <br/> + <br/> + <br/> + <br/> + <br/> + <br/> + <button class="oe-button" type="button" id='gd-button'> <img src="/web/static/src/img/throbber.gif" width="16" height="16" style="display: none"/> <span>Add GDoc</span> </button> |
