| 
Welcome, Guest

Testers needed for plugin - CB Customizetab
(1 viewing) (1) Guest

TOPIC: Testers needed for plugin - CB Customizetab

Re: ColorPicker.js 4 years, 11 months ago #33901

  • Posts:
  • Karma:
thanks

the problem with IE is, that x and y measurements of the colorpickerimage are some pixels out. Normally the IE starts clientX and clientY at (2,2) - but the colorpicker needs an adjustment of 3 pixel.

Now I changed the JS function hColorPickerMouseMove(ev) to:

function hColorPickerMouseMove(ev){
ev = ev || window.event;
 
var de = document.documentElement;
var b = document.body;
var correctX = (de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0);
var correctY = (de.scrollTop || b.scrollTop) - (de.clientTop || 0);
 
if (correctX == -2) correctX = -3;
 
var hCPImg = ev.target || ev.srcElement;
 
var mousePos = mouseCoordinates(ev);
cp.colorPos = getPosition(hCPImg);
 
var x = mousePos.x-cp.colorPos.x+correctX;
var y = mousePos.y-cp.colorPos.y; //+correctY //not needed?!?
var width = parseInt(hCPImg.offsetWidth);
var height = parseInt(hCPImg.offsetHeight);
 
var color = getHorizColor(y*width+x, width, height);
 
try
{
cp.hColorDiv.style.backgroundColor = cp.cpColor = '#'+color;
}
catch (e)
{
alert('Error: ' + e + ' - color: ' + color);
}
}

Re: ColorPicker.js 4 years, 10 months ago #34022

  • Posts:
  • Karma:
ok, I hope I solved the colorpicker issues now. It works on my local system with IE and Firefox.

Download here

There is one problem in IE - normally the changes a user made will immediatly applied to the specific pageelement. This will not work in IE, cause I manipulate the stylesheet directly with getProperty and setProperty (which IE doesnt support). I will try a workaround with addRole and removeRole. Now you can add more information to the XML file. see the following example:

  • Tip - is shown as tooltip
  • name (attribute) - if set its used as label
  • fname - this is used as filename prefix and must be unique


<element selector="body" name="Whole page" desc="Changes the color of the body" tip="Change the layout of your whole site here">
<attribute type="color" name="Backround Color" tip="Please set here the backgroundcolor of your whole site">background-color</attribute>
<attribute type="set" set="repeat;repeat-x;repeat-y;no-repeat">background-repeat</attribute>
<attribute type="image" fname="bodybg">background-image</attribute>
</element>


Post edited by: Stiggi, at: 2007/03/21 01:06

Re: ColorPicker.js 4 years, 10 months ago #34073

  • Posts:
  • Karma:
uhm....... please check your mail..

And to however who could do it, stiggi or mikko, can you add the cb template chooser? Site template sucks... like... completely, I gave you plenty of reasons
De-Karma me... if you dare...
CB Xbox Gamercard Plugin (Gone] - CB Xbox Gamercard Module (Gone)

Re: ColorPicker.js 4 years, 10 months ago #34087

  • Posts:
  • Karma:
I will code a CB template switcher when I have the extra time.

mikko

Re: ColorPicker.js 4 years, 10 months ago #34093

  • Posts:
  • Karma:
customizetab v0.8 released.

Fixed IE colorpicker bugs.

Re: ColorPicker.js 4 years, 10 months ago #34131

  • Posts:
  • Karma:
1.There is one serious bug:

If the user enters a text into the box, he can't even access his profile anymore to change it.

For example I tried to enter transparent instead of a color.


2. is it possible to stretch a background image and put it in a absolute position ? (Important)

3. Is it possible to upload a .cbprofile background picture ?
Time to create page: 0.82 seconds