تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
3849 أدوات العرض

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
يوليو 25
396
2
أبريل 25
1273
1
مايو 25
8286
0
مارس 15
3855
1
يونيو 25
595