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

Hi everyone,

I run a tool-based site https://whitescreentest.net/ that allows users to test screens using full-screen white, black, and other color backgrounds—useful for spotting dead pixels, screen tint, etc.

I'm looking to integrate a similar tool into an Odoo Website for product display testing (e.g., showcasing monitors or screens). Specifically, I want to:

  • Embed a full-screen color tool into a product page
  • Allow users to choose from preset colors or custom RGB values
  • Enable a click-to-fullscreen feature for the display area
  • Possibly log or track usage sessions (optional)

Has anyone here integrated custom interactive tools into an Odoo website like this? Would it be better to use a custom module, or can this be handled via embedded JavaScript/HTML in Odoo's website builder?

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

Create a Custom Snippet or Embed Code

Use the Website → Edit → HTML/Embed Code block to paste your custom tool’s HTML/JS.
Example:
​<div id="colorDisplay" style="width:100%;height:100vh;background:#ffffff;cursor:pointer;" onclick="toggleFullscreen(this)">

</div>


<div style="margin-top:20px;">

  <label>Pick a Color: </label>

  <input type="color" id="colorPicker" onchange="changeColor(this.value)">

  <label> or enter RGB: </label>

  <input type="text" id="rgbInput" placeholder="#FFFFFF" oninput="changeColor(this.value)">

</div>


<script>

function changeColor(color) {

  document.getElementById("colorDisplay").style.background = color;

}

function toggleFullscreen(elem) {

  if (!document.fullscreenElement) {

    elem.requestFullscreen().catch(err => alert(err.message));

  } else {

    document.exitFullscreen();

  }

}

</script>

i hope it is usefull

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 1 24
1003
2
thg 5 23
7637
1
thg 2 22
22790
5
thg 12 21
15879
0
thg 12 20
4165