I need to realize this function for backend form view:
inherited XML:
<div id="target">Click here</div>
Javascript:
$( "#target" ).click(function() {
alert( "Handler for .click() called." );
});
Thanks in advance for example or link.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I need to realize this function for backend form view:
inherited XML:
<div id="target">Click here</div>
Javascript:
$( "#target" ).click(function() {
alert( "Handler for .click() called." );
});
Thanks in advance for example or link.
I found a solution:
Javascript:
openerp.my_module= function(instance) {
instance.web.FormView = instance.web.FormView.extend({
events: {
'click #target': 'button_clicked',
},
button_clicked: function() {
alert('Handler for .click() called.')
},
});
}Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
Rekisteröidy| Aiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
|---|---|---|---|---|
|
|
2
jouluk. 22
|
3413 | ||
|
|
1
marrask. 19
|
19177 | ||
|
|
0
jouluk. 21
|
4672 | ||
|
|
0
heinäk. 25
|
868 | ||
|
|
1
heinäk. 25
|
6051 |