コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
6320 ビュー

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



アバター
破棄
関連投稿 返信 ビュー 活動
2
12月 22
2503
1
11月 19
18413
0
12月 21
3909
0
7月 25
165
0
6月 25
432