google-code-export / jpicker

Automatically exported from code.google.com/p/jpicker
1 stars 0 forks source link

Empty color does not work #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In your Example.html add an input box like below in the Multiple section:

  <input class="Multiple" type="text" value="" /><br />

Notice the empty value. Now when you show the page the color is yellow instead 
of the expected empty color.

If one open the dialog and select the empty color (the one with the red cross 
in the lower right cornet) then the inputbox become empty and the color 
selector square get the transparent look. But when we start with an empty color 
it doesn't work.

I use jPicker 1.1.3 in Firefox 3.6 on linux.

Original issue reported on code.google.com by denni...@gmail.com on 1 Sep 2010 at 6:07

GoogleCodeExporter commented 9 years ago
Thank you dennisbj, this must have slipped through quality control (in 
actuality, I never tested this combination). I will get a fix for this in the 
next version of jPicker.

In the meantime, my recommendation to correct the behavior on your page is to 
attach the jPicker to it, and then retrieve the jPicker instance from the List 
and assign the color to null. e.g.

$.jPicker.List[0].color.active.val('all',null);

Original comment by christop...@gmail.com on 1 Sep 2010 at 11:59

GoogleCodeExporter commented 9 years ago
That worked great. Thanks!

This snippet might help others in the same situation as me:

$('.Multiple[value=""]').each(function () {
  this.color.active.val('all',null);
})

Original comment by denni...@gmail.com on 2 Sep 2010 at 5:17

GoogleCodeExporter commented 9 years ago
This issue is corrected in the newest version V1.1.4.

Original comment by christop...@gmail.com on 16 Sep 2010 at 8:21