Skip to Content Skip to Menu

Testers needed for plugin - CB Customizetab

  • Stiggi
  • Stiggi
  • OFFLINE
  • Posts: 41
  • Thanks: 0
  • Karma: 18
17 years 8 months ago #33901 by Stiggi
Replied by Stiggi on topic Re: ColorPicker.js
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:

[code:1]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);
}
}[/code:1]

Please Log in or Create an account to join the conversation.

  • Stiggi
  • Stiggi
  • OFFLINE
  • Posts: 41
  • Thanks: 0
  • Karma: 18
17 years 8 months ago #34022 by Stiggi
Replied by Stiggi on topic Re: ColorPicker.js
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

[code:1]<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>[/code:1]

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

Please Log in or Create an account to join the conversation.

  • Flipsider
  • Flipsider
  • OFFLINE
  • Posts: 137
  • Thanks: 0
  • Karma: -82
17 years 8 months ago #34073 by Flipsider
Replied by Flipsider on topic Re: ColorPicker.js
uhm....... please check your mail.. :huh:

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 :pinch:

De-Karma me... if you dare...
CB Xbox Gamercard Plugin (Gone] - CB Xbox Gamercard Module (Gone)

Please Log in or Create an account to join the conversation.

  • mikko
  • mikko
  • OFFLINE
  • Posts: 703
  • Thanks: 0
  • Karma: 115
17 years 8 months ago #34087 by mikko
Replied by mikko on topic Re: ColorPicker.js
I will code a CB template switcher when I have the extra time.

mikko

Please Log in or Create an account to join the conversation.

  • Stiggi
  • Stiggi
  • OFFLINE
  • Posts: 41
  • Thanks: 0
  • Karma: 18
17 years 8 months ago #34093 by Stiggi
Replied by Stiggi on topic Re: ColorPicker.js
customizetab v0.8 released .

Fixed IE colorpicker bugs.

Please Log in or Create an account to join the conversation.

  • youngarmy
  • youngarmy
  • OFFLINE
  • Posts: 24
  • Thanks: 0
  • Karma: 0
17 years 8 months ago #34131 by youngarmy
Replied by youngarmy on topic Re: ColorPicker.js
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 ?

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum