跳至内容
菜单
此问题已终结
1 回复
3761 查看

I am trying to plug some of my javascript function for CRM module in openerp. what i want to achieve is -

  • disable right click
  • disable text selection.

Here below is the code of my js function.

 noRightClick = function () {
    document.oncontextmenu = function(){ return false; };
  };

and

noSelect = function () {
    document.onselectstart = function () {
      if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") {
        return false;
      } else {
        return true;
      }
    };

Please suggest where should i place these functions, so that it applicable to only CRM module.

Thanks in advance...

形象
丢弃
最佳答案

You can find information on how to do that on the web module documentation:

https://doc.openerp.com/trunk/web/module/ https://doc.openerp.com/trunk/training/

形象
丢弃
相关帖文 回复 查看 活动
2
7月 25
229
2
4月 25
1149
1
5月 25
8184
0
3月 15
3800
1
6月 25
435