Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
6408 Zobrazení

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.


Avatar
Zrušit
Autor Nejlepší odpověď

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.')
},
});
}



Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
pro 22
2683
1
lis 19
18547
0
pro 21
4087
0
čvc 25
315
1
čvc 25
5114