Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3785 Lượt xem

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...

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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/

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 25
274
2
thg 4 25
1157
1
thg 5 25
8203
0
thg 3 15
3824
1
thg 6 25
459