source: trunk/prototype/app/plugins/jpicker/Example.html @ 5341

Revision 5341, 33.7 KB checked in by wmerlotto, 12 years ago (diff)

Ticket #2434 - Commit inicial do novo módulo de agenda do Expresso - expressoCalendar

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
5  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6  <title>Digital Magic Productions - jPicker - A jQuery Color Picker Plugin</title>
7  <link rel="Stylesheet" type="text/css" href="css/jpicker-1.1.6.min.css" />
8  <link rel="Stylesheet" type="text/css" href="jPicker.css" />
9  <script src="jquery-1.4.4.min.js" type="text/javascript"></script>
10  <script src="jpicker-1.1.6.min.js" type="text/javascript"></script>
11  <script type="text/javascript">
12    $(function()
13      {
14        $.fn.jPicker.defaults.images.clientPath='images/';
15        var LiveCallbackElement = $('#Live'),
16            LiveCallbackButton = $('#LiveButton');
17        $('#Inline').jPicker({window:{title:'Inline Example'}});
18        $('#Expandable').jPicker({window:{expandable:true,title:'Expandable Example'}});
19        $('#Alpha').jPicker({window:{expandable:true,title:'Alpha (Transparency) Example)',alphaSupport:true},color:{active:new $.jPicker.Color({ahex:'99330099'})}});
20        $('#Binded').jPicker({window:{title:'Binded Example'},color:{active:new $.jPicker.Color({ahex:'993300ff'})}});
21        $('.Multiple').jPicker({window:{title:'Multiple Binded Example'}});
22        $('#Callbacks').jPicker(
23          {window:{title:'Callback Example'}},
24          function(color, context)
25          {
26            var all = color.val('all');
27            alert('Color chosen - hex: ' + (all && '#' + all.hex || 'none') + ' - alpha: ' + (all && all.a + '%' || 'none'));
28            $('#Commit').css({ backgroundColor: all && '#' + all.hex || 'transparent' });
29          },
30          function(color, context)
31          {
32            if (context == LiveCallbackButton.get(0)) alert('Color set from button');
33            var hex = color.val('hex');
34            LiveCallbackElement.css({ backgroundColor: hex && '#' + hex || 'transparent' });
35          },
36          function(color, context)
37          {
38            alert('"Cancel" Button Clicked');
39          });
40        $('#LiveButton').click(
41          function()
42          {
43            $.jPicker.List[7].color.active.val('hex', 'e2ddcf', this);
44          });
45        $('#AlterColors').jPicker({window:{title:'Color Interaction Example'}});
46        $('#GetActiveColor').click(
47          function()
48          {
49            alert($.jPicker.List[8].color.active.val('ahex'));
50          });
51        $('#GetRG').click(
52          function()
53          {
54            var rg=$.jPicker.List[8].color.active.val('rg');
55            alert('red: ' + rg.r + ', green: ' + rg.g);
56          });
57        $('#SetHue').click(
58          function()
59          {
60            $.jPicker.List[8].color.active.val('h', 133);
61          });
62        $('#SetValue').click(
63          function()
64          {
65            $.jPicker.List[8].color.active.val('v', 38);
66          });
67        $('#SetRG').click(
68          function()
69          {
70            $.jPicker.List[8].color.active.val('rg', { r: 213, g: 118 });
71          });
72      });
73  </script>
74</head>
75<body>
76  <div id="jPicker">
77    <h2>jPicker - A jQuery Color Picker Plugin.</h2>
78    <p>
79      jPicker is a fast, lightweight jQuery plugin for including an advanced color picker in your web projects. It has been painstakenly ported from John Dyers' awesome work on his picker using the Prototype framework.<br /><br />
80      jPicker supports all current browsers and has been extensively tested in Chrome, Firefox, IE5.5+, Safari, and Opera.<br /><br />
81      If you are updating a current version, you MUST always use the CSS and image files from the download as there may have been changes.<br /><br />
82      If you are moving from a V1.0.* version, you MUST read the docs below to implement some changes to the Color object returned by the callback functions.<br /><br />
83      <a href="http://johndyer.name/post/2007/09/PhotoShop-like-JavaScript-Color-Picker.aspx" class="newWindow">View John Dyer's prototype plugin here.</a><br /><br />
84      View jPicker details a docs below.<br /><br />
85      <a href="http://code.google.com/p/jpicker/" class="newWindow">Check out the source from Google Code.</a>
86    </p><hr /><br />
87    <h2>jPicker Inline Example</h2>
88    <p>
89      jPicker can be used inline by binding to any block level element.<br /><br />
90      <code>jPicker() -- no arguments</code>
91      <pre>
92&lt;script type="text/javascript"&gt;       
93  $(document).ready(
94    function()
95    {
96      $('#Inline').jPicker();
97    });
98&lt;/script&gt;
99&lt;div id="Inline"&gt;&lt;/div&gt;</pre>
100      <div id="Inline"></div>
101    </p><hr /><br />
102    <h2>jPicker Expandable Example</h2>
103    <p>
104      jPicker can also display only a small picker icon that opens a popup for editing.<br /><br />
105      <code>jPicker({ window: { expandable: true }})</code>
106      <pre>
107&lt;script type="text/javascript"&gt;
108  $(document).ready(
109    function()
110    {
111      $('#Expandable').jPicker(
112        {
113          window:
114          {
115            expandable: true
116          }
117        });
118    });
119&lt;/script&gt;
120&lt;span id="Expandable"&gt;&lt;/span&gt;</pre>
121      <span id="Expandable"></span>
122    </p><hr /><br />
123    <h2>jPicker Alpha Channel Example</h2>
124    <p>
125      jPicker can also pick colors with alpha (transparency) values.<br /><br />
126      <code>jPicker({ window: { expandable: true }})</code>
127      <pre>
128&lt;script type="text/javascript"&gt;       
129  $(document).ready(
130    function()
131    {
132      $('#Alpha').jPicker(
133        {
134          window:
135          {
136            expandable: true
137          },
138          color:
139          {
140            alphaSupport: true,
141            active: new $.jPicker.Color({ ahex: '99330099' })
142          }
143        });
144    });
145&lt;/script&gt;
146&lt;span id="Alpha"&gt;&lt;/span&gt;</pre>
147      <span id="Alpha"></span>
148    </p><hr /><br />
149    <h2>jPicker Binded Example</h2>
150    <p>
151      jPicker can also be binded to an input element.<br /><br />
152      <code>jPicker() -- no arguments</code>
153      <pre>
154&lt;script type="text/javascript"&gt;       
155  $(document).ready(
156    function()
157    {
158      $('#Binded').jPicker();
159    });
160&lt;/script&gt;
161&lt;input id="Binded" type="text" value="e2ddcf" /&gt;</pre>
162      <input id="Binded" type="text" value="e2ddcf" />
163    </p><hr /><br />
164    <h2>Multiple jPicker Binded Example</h2>
165    <p>
166      jPicker can also be binded to multiple elements at a time.<br /><br />
167      <code>jPicker() -- no arguments</code>
168      <pre>
169&lt;script type="text/javascript"&gt;       
170  $(document).ready(
171    function()
172    {
173      $('.Multiple').jPicker();
174    });
175&lt;/script&gt;
176&lt;input class="Multiple" type="text" value="e2ddcf" /&gt;&lt;br /&gt;
177&lt;input class="Multiple" type="text" value="" /&gt;&lt;br /&gt;
178&lt;input class="Multiple" type="text" value="fda0f7" /&gt;</pre>
179      <input class="Multiple" type="text" value="e2ddcf" /><br />
180      <input class="Multiple" type="text" value="" /><br />
181      <input class="Multiple" type="text" value="fda0f7" /><br />
182    </p><hr /><br />
183    <h2>jPicker Callback Functions</h2>
184    <p>
185      Register for callback function to have it interact with your page.<br /><br />
186      <code>jPicker([settings, [commitCallback, [liveCallback, [cancelCallback]]]])</code>
187      <pre>
188&lt;script type="text/javascript"&gt;
189  $(document).ready(
190    function()
191    {
192      var LiveCallbackElement = $('#Live'),
193          LiveCallbackButton = $('#LiveButton');  // you don't want it searching this
194                                                  // on every live callback!!!
195      $('#Callbacks').jPicker(
196        {},
197        function(color, context)
198        {
199          var all = color.val('all');
200          alert('Color chosen - hex: ' + (all && '#' + all.hex || 'none') +
201            ' - alpha: ' + (all && all.a + '%' || 'none'));
202          $('#Commit').css(
203            {
204              backgroundColor: all && '#' + all.hex || 'transparent'
205            }); // prevent IE from throwing exception if hex is empty
206        },
207        function(color, context)
208        {
209          if (context == LiveCallbackButton.get(0)) alert('Color set from button');
210          var hex = color.val('hex');
211          LiveCallbackElement.css(
212            {
213              backgroundColor: hex && '#' + hex || 'transparent'
214            }); // prevent IE from throwing exception if hex is empty
215        },
216        function(color, context)
217        {
218          alert('"Cancel" Button Clicked');
219        });     
220      $('#LiveButton').click(
221        function()
222        {
223          $.jPicker.List[0].color.active.val('hex', 'e2ddcf', this);
224        });
225    });
226&lt;/script&gt;
227&lt;input id="Callbacks" type="text" value="e2ddcf" /&gt;
228&lt;span id="Commit" style="background-color: #e2ddcf; display: block; --
229          float: left; height: 50px; margin: 10px; width: 50px;"&gt; --
230          Commit&lt;/span&gt;
231&lt;span id="Live" style="display: block; float: left; height: 50px; --
232          margin: 10px; width: 50px;"&gt;Live&lt;/span&gt;
233&lt;input id="LiveButton" type="button" value="Set To #e2ddcf" /&gt;</pre>
234      <input id="Callbacks" type="text" value="e2ddcf" /><br />
235      <span id="Commit" style="background-color: #e2ddcf; display: block; float: left; height: 50px; margin: 10px; width: 50px;">Commit</span>
236      <span id="Live" style="display: block; float: left; height: 50px; margin: 10px; width: 50px;">Live</span>
237      <input id="LiveButton" type="button" value="Set To #e2ddcf" />
238    </p><hr /><br />
239    <h2>jPicker Settings And Colors</h2>
240    <p>
241      Use the "val" method on the active color for interaction with the picker.<br /><br />
242      <code>(jQuery).jPicker.List[index]</code>
243      <pre>
244&lt;script type="text/javascript"&gt;       
245  $(document).ready(
246    function()
247    {
248      $('#AlterColors').jPicker();
249      $('#GetActiveColor').click(
250        function()
251        {
252          alert($.jPicker.List[0].color.active.val('ahex'));
253        });
254      $('#GetRG').click(
255        function()
256        {
257          var rg=$.jPicker.List[0].color.active.val('rg');
258          alert('red: ' + rg.r + ', green: ' + rg.g);
259        });
260      $('#SetHue').click(
261        function()
262        {
263          $.jPicker.List[0].color.active.val('h', 133);
264        });
265      $('#SetValue').click(
266        function()
267        {
268          $.jPicker.List[0].color.active.val('v', 38);
269        });
270      $('#SetRG').click(
271        function()
272        {
273          $.jPicker.List[0].color.active.val('rg', { r: 213, g: 118 });
274        });
275    });
276&lt;/script&gt;
277&lt;input id="AlterColors" type="text" value="e2ddcf" /&gt;&lt;br /&gt;
278&lt;input id="GetActiveColor" type="button" value="Get Active Color" /&gt;&lt;br /&gt;
279&lt;input id="GetRG" type="button" value="Get Red/Green Value" /&gt;&lt;br /&gt;
280&lt;input id="SetHue" type="button" value="Set Hue To 133" /&gt;&lt;br /&gt;
281&lt;input id="SetValue" type="button" value="Set Value To 38" /&gt;&lt;br /&gt;
282&lt;input id="SetRG" type="button" value="Set Red/Green To 213, 118" /&gt;</pre>
283      <input id="AlterColors" type="text" value="e2ddcf" /><br />
284      <input id="GetActiveColor" type="button" value="Get Active Color" /><br />
285      <input id="GetRG" type="button" value="Get Red/Green Value" /><br />
286      <input id="SetHue" type="button" value="Set Hue To 133" /><br />
287      <input id="SetValue" type="button" value="Set Value To 38" /><br />
288      <input id="SetRG" type="button" value="Set Red/Green To 213, 118" />
289    </p><hr /><br />
290    <h2>jPicker Core</h2>
291    <p>
292      jPicker Core function - returns the jQuery object.<br /><br />
293      <code>jPicker([settings, [commitCallback, [liveCallback, [cancelCallback]]]])</code>
294    </p><hr /><br />
295    <h2>Settings</h2>
296    <p>
297      settings [object]: (with defaults)<br />
298      <pre>
299{
300  window: // used to define the position of the popup window
301          // only useful in binded mode
302  {
303    title: null, // any title for the jPicker window itself - displays
304                 // "Drag Markers To Pick A Color" if left null
305    position:
306    {
307      x: 'screenCenter', // acceptable values "left", "center", "right",
308                         // "screenCenter", or relative px value
309      y: 'top', // acceptable values "top", "bottom", "center", or relative px
310                // value
311    },
312    expandable: false, // default to large static picker - set to true to make an
313                       // expandable picker (small icon with popup) - set
314                       // automatically when binded to input element
315    liveUpdate: true, // set false if you want the user to click "OK" before the
316                      // binded input box updates values (always "true" for
317                      // expandable picker)
318    alphaSupport: false, // set to true to enable alpha picking
319    alphaPrecision: 0, // set decimal precision for alpha percentage display -
320                       // hex codes do not map directly to percentage integers -
321                       // range 0-2
322    updateInputColor: true // set to false to prevent binded input colors from
323                           // changing
324  },
325  color:
326  {
327    mode: 'h', // acceptable values "h" (hue), "s" (saturation), "v" (brightness),
328               // "r" (red), "g" (green), "b" (blue), "a" (alpha)
329    active: new $.jPicker.Color({ hex: 'ffc000' }), // accepts any declared
330               // jPicker.Color object or hex string WITH OR WITHOUT '#'
331    quickList: // this list of quick pick colors - override for a different list
332      [
333        new $.jPicker.Color({ h: 360, s: 33, v: 100}), // accepts any declared
334               // jPicker.Color object or hex string WITH OR WITHOUT '#'
335        new $.jPicker.Color({ h: 360, s: 66, v: 100}),
336        (...) // removed for brevity
337        new $.jPicker.Color({ h: 330, s: 100, v: 50}),
338        new $.jPicker.Color()
339      ]
340  },
341  images
342  {
343    clientPath: '/jPicker/images/', // Path to image files
344    colorMap: // colorMap size and arrow icon
345    {
346      width: 256, // Map width - don't override unless using a smaller image set
347      height: 256, // Map height - don't override unles using a smaller image set
348      arrow:
349      {
350        file: 'mappoint.gif', // Arrow icon image file
351        width: 15, // Arrow icon width
352        height: 15 // Arrow icon height
353      }
354    },
355    colorBar: // colorBar size and arrow icon
356    {
357      width: 20, // Bar width - don't override unless using a smaller image set
358      height: 256, // Bar height - don't override unless using a smaller image set
359      arrow:
360      {
361        file: 'rangearrows.gif', // Arrow icon image file
362        width: 40, // Arrow icon width
363        height: 9 // Arrow icon height
364      }
365    },
366    picker: // picker icon and size
367    {
368      file: 'picker.gif', // Picker icon image file
369      width: 25, // Picker width - don't override unless using a smaller image set
370      height: 24 // Picker height - don't override unless using a smaller image set
371    }
372  },
373  localization:
374  {
375    text:
376    {
377      title: 'Drag Markers To Pick A Color',
378      newColor: 'new',
379      currentColor: 'current',
380      ok: 'OK',
381      cancel: 'Cancel'
382    },
383    tooltips:
384    {
385      colors:
386      {
387        newColor: 'New Color - Press &ldquo;OK&rdquo; To Commit',
388        currentColor: 'Click To Revert To Original Color'
389      },
390      buttons:
391      {
392        ok: 'Commit To This Color Selection',
393        cancel: 'Cancel And Revert To Original Color'
394      },
395      hue:
396      {
397        radio: 'Set To &ldquo;Hue&rdquo; Color Mode',
398        textbox: 'Enter A &ldquo;Hue&rdquo; Value (0-360&deg;)'
399      },
400      saturation:
401      {
402        radio: 'Set To &ldquo;Saturation&rdquo; Color Mode',
403        textbox: 'Enter A &ldquo;Saturation&rdquo; Value (0-100%)'
404      },
405      brightness:
406      {
407        radio: 'Set To &ldquo;Brightness&rdquo; Color Mode',
408        textbox: 'Enter A &ldquo;Brightness&rdquo; Value (0-100%)'
409      },
410      red:
411      {
412        radio: 'Set To &ldquo;Red&rdquo; Color Mode',
413        textbox: 'Enter A &ldquo;Red&rdquo; Value (0-255)'
414      },
415      green:
416      {
417        radio: 'Set To &ldquo;Green&rdquo; Color Mode',
418        textbox: 'Enter A &ldquo;Green&rdquo; Value (0-255)'
419      },
420      blue:
421      {
422        radio: 'Set To &ldquo;Blue&rdquo; Color Mode',
423        textbox: 'Enter A &ldquo;Blue&rdquo; Value (0-255)'
424      },
425      alpha:
426      {
427        radio: 'Set To &ldquo;Alpha&rdquo; Color Mode',
428        textbox: 'Enter A &ldquo;Alpha&rdquo; Value (0-100)'
429      },
430      hex:
431      {
432        textbox: 'Enter A &ldquo;Hex&rdquo; Color Value (#000000-#ffffff)',
433        alpha: 'Enter A &ldquo;Alpha&rdquo; Value (#00-#ff)'
434      }
435    }
436  }
437}</pre>
438    </p><hr /><br />
439    <h2>Callback Pattern</h2>
440    <p>
441      <code>function(jPicker.Color color, object context){...}</code>
442    </p><hr /><br />
443    <h2>jPicker List</h2>
444    <p>
445      The list of active jPicker objects.<br /><br />
446      <code>(jQuery).jPicker.List[]</code>
447    </p><hr /><br />
448    <h2>jPicker Color Class</h2>
449    <p>
450      Definition of the jPicker.Color class.<br />
451      <pre>
452(jQuery).jPicker.Color()
453(jQuery).jPicker.Color({ ahex: 'ffffffff' })
454(jQuery).jPicker.Color({ hex: 'ffffff', [a: (0-255)] })
455(jQuery).jPicker.Color({ r: (0-255), g: (0-255), b: (0-255), [a: (0-255)] })
456(jQuery).jPicker.Color({ h: (0-360), s: (0-100), v: (0-100), [a: (0-255)] })
457{
458  val: function(name, value, context),
459  bind: function(callback) where callback is function(color, [context]),
460  unbind: function(callback)
461}
462
463method "val" usage
464
465val(name) : get value
466
467  'r':     red         (0-255)
468  'g':     green       (0-255)
469  'b':     blue        (0-255)
470  'a':     alpha       (0-255)
471  'h':     hue         (0-360)
472  's':     saturation  (0-100)
473  'v':     value       (0-100)
474  'hex':   hex         (000000-ffffff)
475  'ahex':  ahex        (00000000-ffffffff)
476  'all':   all         all
477 
478  ex. Usage
479
480    val('r'):     (0-255)
481    val('h'):     (0-360)
482    val('hex'):   (000000-ffffff)
483    val('rg'):    { r: (0-255), g: (0-255) }
484    val('rgba'):  { r: (0-255), g: (0-255), b: (0-255), a: (0-255) }
485    val('hvga'):  { h: (0-255), v: (0-100), g: (0-255), a: (0-255) }
486    val('all'):   { r: (0-255), g: (0-255), b: (0-255), a: (0-255), h: (0-360) --
487                    s: (0-100), v: (0-100), hex: (000000-ffffff), --
488                    ahex: (00000000-ffffffff) }
489
490val(name, value, [context]) : set value
491
492  'r':     red         (0-255)
493  'g':     green       (0-255)
494  'b':     blue        (0-255)
495  'a':     alpha       (0-255)
496  'h':     hue         (0-360)
497  's':     saturation  (0-100)
498  'v':     value       (0-100)
499  'hex':   hex         (000000-ffffff)
500  'ahex':  ahex        (00000000-ffffffff)
501 
502  ex. Usage
503
504    val('r', (0-255)) || val('r', { r: (0-255) })
505    val('h', (0-360)) || val('h', { h: (0-360) })
506    val('hex', (000000-ffffff)) || val('hex', { hex: (000000-ffffff) })
507    val('rg', { r: (0-255), g: (0-255) })
508    val('rgba', { r: (-255), g: (0-255), b: (0-255), a: (0-255) })
509    val(null, { r: (0-255), g: (0-255) })
510    val('hvga'):  incorrect usage - cannot set hsv AND rgb as they will conflict</pre>
511    </p><hr /><br />
512    <h2>jPicker ColorMethod Utility Class</h2>
513    <p>
514      Static methods for altering and retrieving different color spaces.<br />
515      <pre>
516(jQuery).jPicker.ColorMethods.hexToRgba:
517    function(hex)
518    returns { r: (0-255), g: (0-255), b: (0-255), a: (0-255) }
519   
520(jQuery).jPicker.ColorMethods.validateHex:
521    function(hex)
522    returns new hex string
523   
524(jQuery).jPicker.ColorMethods.rgbaToHex:
525    function({ r: (0-255), g: (0-255), b: (0-255), a: (0-255) })
526    returns hex string
527   
528(jQuery).jPicker.ColorMethods.intToHex:
529    function(number)
530    returns hex string
531   
532(jQuery).jPicker.ColorMethods.hexToInt:
533    function(hex)
534    return integer
535
536(jQuery).jPicker.ColorMethods.rgbToHsv:
537    function({ r: (0-255), g: (0-255), b: (0-255) })
538    returns { h: (0-360), s: (0-100), v: (0-100) }
539
540(jQuery).jPicker.ColorMethods.hsvToRgb:
541    function({ h: (0-360), s: (0-100), v: (0-100) })
542    returns { r: (0-255), g: (0-255), b: (0-255) }
543</pre>
544    </p><hr /><br />
545    <h2>Known Issues</h2>
546    <ul>
547      <li>
548        <h3>Attaching multiple jPicker objects on a single page will slow performance.</h3>
549        <ul>
550          <li>jPicker creates a new instance of the picker for every element. Performance will suffer when binding dozens of instances.</li>
551        </ul>
552      </li>
553    </ul><hr />
554    <h2>Coming Soon</h2>
555    <ul>
556      <li>
557        <ul>
558          <li>Will consider supporting jQuery ThemeRoller CSS API for theming the UI if demand exists.</li>
559        </ul>
560      </li>
561    </ul><hr />
562    <h2>Planned For Future Release</h2>
563    <ul>
564      <li>
565        Move the jPicker object to a single instance that all selection instances point to.
566        <ul>
567          <li>This will result in much faster operation and initialization for pages with multiple pickers.</li>
568        </ul>
569      </li>
570      <li>Add activateCallback option for calling a callback function when the jPicker is activated or its binding is switched to a different picker element.</li>
571    </ul><hr />
572    <h2>Change Log</h2>
573    <ul>
574      <li>
575        <h3>V1.1.5:</h3>
576        <ul>
577          <li>Corrected Color object constructor to allow setting of the "alpha" value as per the documentation which previously didn't work.</li>
578          <li>Added support for translucency for quickList colors with checkered background - Only available if "alphaSupport" is enabled.</li>
579          <li>Restricted default color to "alpha" of 255 if "alphaSupport" is disabled - It will now assign an explicit alpha of 255 when disabled.</li>
580          <li>Added new setting variable "alphaPrecision" which indicates the number of decimal points to allow in the alpha percentage display - Now defaults to 0.</li>
581        </ul>
582      </li>
583      <li>
584        <h3>V1.1.4:</h3>
585        <ul>
586          <li>Changed "alpha" range from 0-100 to 0-255 to correct truncating and rounding errors caused by attempting to get an integer percentage that matches a hex value.</li>
587          <li>"alpha" percentage display will now show up to 1 decimal point for more accurate representation of "alpha" value.</li>
588          <li>Color object now accepts "alpha" values in a range of 0-255 and also returns the same when getting the "alpha" value. You will need to run ((alpha * 100) / 255) to retrieve a percentage value.</li>
589          <li>Reworked the table layout and labels to remove the need for the label to reference the radio input box. This reduces injected code and removes the need to generate unique ids on the radio buttons.</li>
590          <li>Transparent/invisible caret on NULL color is now corrected - uses the same caret color as a white color.</li>
591          <li>Setting a binded input value of "" or no value attribute will now create a NULL color on initialization instead of the settings default color.</li>
592          <li>Added a dynamic, invisible "iframe" behind a dialog picker in all browsers that fail jQuery.support.boxModel (currently IE <= 7 Quirks Mode). This prevents "select" box from showing through the picker.</li>
593        </ul>
594      </li>
595      <li>
596        <h3>V1.1.3:</h3>
597        <ul>
598          <li>Now adding popup color pickers to document.body instead of inline with the popup control. This corrects issues with the picker not showing beyond a relative container scope.</li>
599          <li>No longer need to hide popup icon in Internet Explorer for picker elements lower in the DOM than the currently active one since the picker itself is attached to document.body (it is always higher in the DOM now).</li>
600          <li>Popup pickers are now bring-to-front selectable. Clicking on the picker will bring it above all other pickers on the page instead of having to drag one out from underneath another.</li>
601          <li>Corrected jPicker.List/setTimeout bug which allowed an instance to bind to the List in an order other than the order the initialization function was called.</li>
602          <li>Added a updateInputColor option (default true) to allow for a binded input field that does not automatically update its background/text color.</li>
603        </ul>
604        <hr />
605      </li>
606      <li>
607        <h3>V1.1.2:</h3>
608        <ul>
609          <li>Reworked the find methods and contexts for element searches. Now using ":first" instead of ".eq(0)" to take advantage of early out searches. Much faster initialization of the picker, on the order of 6 times.</li>
610          <li>Now using setTimeout for calling visual updates. Dramatically improved marker dragging in all browsers. Reduces blocking as re-rendering is internal to the browser and independent of the other javascript still in progress.</li>
611          <li>Marker updates can now cancel a previous valueChanged event when a new mouseMove event comes in. IE8 marker dragging is still slower, much over 5 times faster than it was.</li>
612          <li>Reworked entire quickPick list creation. It now adds up source code and does a single "html" method instead of multiple "append" methods. This is a large part of the speed increase on initialization.</li>
613          <li>The vast majority of all running scripts on both initialization and dragging is now occupied altering the style rules and finding elements (init only) instead of jPicker code.</li>
614          <li>All methods previously called with global context now use the "call" method for using the context of the class running the method. "this" in a callback is now the DOM node (jQuery style) and jPicker instead of "window".</li>
615          <li>Added "effects" section of window settings to allow different show/hide effects and durations.</li>
616          <li>Removed change log and read me from the full source code to separate files (ChangeLog.txt and ReadMe.txt) and an HTML demonstration/documentation page (Example.txt).</li>
617        </ul>
618        <hr />
619      </li>
620      <li>
621        <h3>V1.1.1:</h3>
622        <ul>
623          <li>Correct IE exception caused by attempting to set "#transparent" to CSS background-color.</li>
624        </ul>
625        <hr />
626      </li>
627      <li>
628        <h3>V1.1.0:</h3>
629        <ul>
630          <li>Reworked nearly the entire plugin including the internal and external event model, bindings, DOM searches, classes, and overall presentation.</li>
631          <li>The Color object now supports a changed event that you can bind to (or just bind to the picker events still included).</li>
632          <li>Event order has been reversed, instead of an change event on the map/bar/text fields updating the display, they now update the Color object which then fires the events that update the display.</li>
633          <li>alphaSupport re-implemented by request - default behavior is off.</li>
634          <li>Hex code now only 6 characters again.</li>
635          <li>Color object can now have its value changed from code, using the "val" method, and it will fire all events necessary to update the display.</li>
636          <li>Removed all "get_*" methods from the color object, instead opting for a single "val" method for getting and setting, more in line with familiar jQuery methods.</li>
637          <li>Better rendering for all IE versions in Quirks mode.</li>
638        </ul>
639        <hr />
640      </li>
641      <li>
642        <h3>V1.0.13:</h3>
643        <ul>
644          <li>Updated transparency algorithm for red/green/blue color modes. The algorithm from John Dyers' color picker was close but incorrect. Bar colors are now pixel perfect with the new algorithm.</li>
645          <li>Changed from using "background-position" on the color maps to an element of full height using the "top" attribute for image-map location using "overflow: hidden" to hide overdraw.</li>
646          <li>IE7/8 ignores opacity on elements taller than 4096px. Image maps therefore no longer include a blank first map so the Bar is just under 4096. Blank is now accomplished by setting the "top" setting to below the map display.</li>
647          <li>New colorBar picker image that does not draw outside of the element since the elements now hide overdraw.</li>
648          <li>Added IE5.5/6 support for the picker. This is why it now uses maps of full height and the "top" attribute for map locations.</li>
649          <li>Moved the images in the maps to 4 pixels apart from each other. IE7/8 change the first pixel of the bottom-border of 2px to partially transparent showing a portion of a different color map without this.</li>
650        </ul>
651        <hr />
652      </li>
653      <li>
654        <h3>V1.0.12:</h3>
655        <ul>
656          <li>Added minified CSS file.</li>
657          <li>Added IE7/8 Quirks Mode support.</li>
658          <li>Added configurable string constants for all text and tooltips. You can now change the default values for different languages.</li>
659          <li>Privatized the RGBA values in the Color object for better NULL handling. YOU MUST USE THE NEW GET FUNCTIONS TO ACCESS THE COLOR PROPERTIES.</li>
660          <li>Better NULL color handling and an additional "No Color Selected" quick pick color.</li>
661          <li>More consistent behavior across multiple versions of browsers.</li>
662          <li>Added alpha response to the binded color picker icon.</li>
663          <li>Removed "alphaSupport" variable. It is now always supported.</li>
664        </ul>
665        <hr />
666      </li>
667      <li>
668        <h3>V1.0.11b:</h3>
669        <ul>
670          <li>Corrected NULL behavior in IE. jQuery was getting an exception when attempting to assign a backgroundColor style of '#'. Now assigns 'transparent' if color is NULL.</li>
671          <li>Can now create new Color object WITH OR WITHOUT the '#' prefix.</li>
672        </ul>
673        <hr />
674      </li>
675      <li>
676        <h3>V1.0.11:</h3>
677        <ul>
678          <li>Added ability for NULL colors (delete the hex value). Color will be returned as color.hex == ''. Can set the default color to an empty hex string as well.</li>
679          <li>cancelCallback now returns the original color for use in programming responses.</li>
680        </ul>
681        <hr />
682      </li>
683      <li>
684        <h3>V1.0.10:</h3>
685        <ul>
686          <li>Corrected table layout and tweaked display for more consisent presentation. Nice catch from Jonathan Pasquier.</li>
687        </ul>
688        <hr />
689      </li>
690      <li>
691        <h3>V1.0.9:</h3>
692        <ul>
693          <li>Added optional title variable for each jPicker window.</li>
694        </ul>
695        <hr />
696      </li>
697      <li>
698        <h3>V1.0.8:</h3>
699        <ul>
700          <li>Moved all images into a few sprites - now using backgroundPosition to change color maps and bars instead of changing the image - this should be faster to download and run.</li>
701        </ul>
702        <hr />
703      </li>
704      <li>
705        <h3>V1.0.7:</h3>
706        <ul>
707          <li>RENAMED CSS FILE TO INCLUDE VERSION NUMBER!!! YOU MUST USE THIS VERSIONED CSS FILE!!! There will be no need to do your own CSS version number increments from now on.</li>
708          <li>Added opacity feedback to color preview boxes.</li>
709          <li>Removed reliance on "id" value of containing object. Subobjects are now found by class and container instead of id's. This drastically reduces injected code.</li>
710          <li>Removed (jQuery).jPicker.getListElementById(id) function since "id" is no longer incorporated or required.</li>
711        </ul>
712        <hr />
713      </li>
714      <li>
715        <h3>V1.0.6:</h3>
716        <ul>
717          <li>Corrected picker bugs introduced with 1.0.5.</li>
718          <li>Removed alpha slider bar until activated - default behavior for alpha is now OFF.</li>
719          <li>Corrected Color constructor bug not allowing values of 0 for initial value (it was evaluating false and missing the init code - Thanks Pavol).</li>
720          <li>Removed title tags (tooltips) from color maps and bars - They get in the way in some browsers (e.g. IE - dragging marker does NOT prevent or hide the tooltip).</li>
721          <li>THERE WERE CSS FILE CHANGES WITH THIS UPDATE!!! IF YOU USE NEVER-EXPIRE HEADERS, YOU WILL NEED TO INCREMENT YOUR CSS FILE VERSION NUMBER!!!</li>
722        </ul>
723        <hr />
724      </li>
725      <li>
726        <h3>V1.0.5:</h3>
727        <ul>
728          <li>Added opacity support to picker and color/callback methods. New property "a" (alpha - range from 0-100) in all color objects now - defaults to 100% opaque. (Thank you Pavol)</li>
729          <li>Added title attributes to input elements - gives short tooltip directions on what button or field does.</li>
730          <li>Commit callback used to fire on control initialization (twice actually) - This has been corrected, it does not fire on initialization.</li>
731          <li>THERE WERE CSS FILE CHANGES WITH THIS UPDATE!!! IF YOU USE NEVER-EXPIRE HEADERS, YOU WILL NEED TO INCREMENT YOUR CSS FILE VERSION NUMBER!!!</li>
732        </ul>
733        <hr />
734      </li>
735      <li>
736        <h3>V1.0.4:</h3>
737        <ul>
738          <li>Added ability for smaller picker icon with expandable window on any DOM element (not just input).</li>
739          <li>"draggable" property renamed to "expandable" and its scope increased to create small picker icon or large static picker.</li>
740        </ul>
741        <hr />
742      </li>
743      <li>
744        <h3>V1.0.3</h3>
745        <ul>
746          <li>Added cancelCallback function for registering an external function when user clicks cancel button. (Thank you Jeff and Pavol)</li>
747        </ul>
748        <hr />
749      </li>
750      <li>
751        <h3>V1.0.2</h3>
752        <ul>
753          <li>Random bug fixes - speed concerns.</li>
754        </ul>
755        <hr />
756      </li>
757      <li>
758        <h3>V1.0.1</h3>
759        <ul>
760          <li>Corrected closure based memeory leak - there may be others?</li>
761        </ul>
762        <hr />
763      </li>
764      <li>
765        <h3>V1.0.0</h3>
766        <ul>
767          <li>First Release.</li>
768        </ul>
769        <hr />
770      </li>
771    </ul>
772  </div>
773</body>
774</html>
Note: See TracBrowser for help on using the repository browser.