@@ -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');
|
||||
}
|
||||
);
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user