frappe.views.CommunicationComposer = frappe.views.CommunicationComposer.extend({
make_fun: function(){
show_alert('Hi');
},
make: function(){
this._super();
this.make_fun();
}
})
http://ejohn.org/blog/simple-javascript-inheritance/
make is a convencion in frappe for the method that create the HTML widget
if you override the complete class by extending by the basic
Class
and not by CommunicationComposer
the email_box cant show, because you destroyied the original classOverride example:
frappe.views.CommunicationComposer = Class.extend({
my_fun : function() {
show_alert('Hi');
},
});
reference: http://ejohn.org/blog/simple-javascript-inheritance/
Thanks: @MaxMorais
No comments:
Post a Comment