X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Ftiny_mce%2Fthemes%2Fadvanced%2Fjs%2Fcolor_picker.js;h=f51e703b0af8215a4ef3056e495b43510651c8bd;hb=a8ce0eff2e9c97d6c0c878451f83a3759ec0d07f;hp=7decac5b43c3c431867eb07a13f70e7dbebf76f5;hpb=2797e21fbf023037fc706d85ab314e609a0d3a07;p=citadel.git diff --git a/webcit/tiny_mce/themes/advanced/js/color_picker.js b/webcit/tiny_mce/themes/advanced/js/color_picker.js index 7decac5b4..f51e703b0 100644 --- a/webcit/tiny_mce/themes/advanced/js/color_picker.js +++ b/webcit/tiny_mce/themes/advanced/js/color_picker.js @@ -1,6 +1,6 @@ tinyMCEPopup.requireLangPack(); -var detail = 50, strhex = "0123456789ABCDEF", i, isMouseDown = false, isMouseOver = false; +var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; var colors = [ "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", @@ -266,10 +266,10 @@ function dechex(n) { } function computeColor(e) { - var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB; + var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target); - x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0); - y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0); + x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0); + y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0); partWidth = document.getElementById('colors').width / 6; partDetail = detail / 2;