Author: artdaw
Date: 2009-01-04 07:35:24 -0500 (Sun, 04 Jan 2009)
New Revision: 12085
Modified:
trunk/sandbox/ui/colorPicker/design/colorPicker.html
trunk/sandbox/ui/colorPicker/design/ui.colorpicker.js
Log:
rich:colorPicker design: color modes for the input were added
Modified: trunk/sandbox/ui/colorPicker/design/colorPicker.html
===================================================================
--- trunk/sandbox/ui/colorPicker/design/colorPicker.html 2009-01-04 00:37:56 UTC (rev
12084)
+++ trunk/sandbox/ui/colorPicker/design/colorPicker.html 2009-01-04 12:35:24 UTC (rev
12085)
@@ -157,7 +157,7 @@
.rich-colorPicker-span input{
border: 1px solid #BED6F8;
font-size: 12px;
- width: 100px;
+ width:130px;
vertical-align:middle;
}
.rich-colorPicker-icon {
@@ -187,8 +187,10 @@
/*color: {r:128,g:117,b:64},*/
/*color: {h:50,s:50,b:50}*/
clientId: "#rich-colorPicker",
- submit: function(e, ui) {
- $("#rich-colorPicker input").val('#'+ui.hex);
+ submit: function(e, ui) {
+// Possibility to choose color modes for the input
+// $("#rich-colorPicker input").val(ui.hex);
+ $("#rich-colorPicker input").val(ui.rgb);
}
});
});
Modified: trunk/sandbox/ui/colorPicker/design/ui.colorpicker.js
===================================================================
--- trunk/sandbox/ui/colorPicker/design/ui.colorpicker.js 2009-01-04 00:37:56 UTC (rev
12084)
+++ trunk/sandbox/ui/colorPicker/design/ui.colorpicker.js 2009-01-04 12:35:24 UTC (rev
12085)
@@ -353,8 +353,11 @@
var col = this.color;
this.origColor = col;
this._setCurrentColor(col);
- this._setIconColor(col);
- this._trigger("submit", e, { options: this.options, hsb: col, hex:
this._HSBToHex(col), rgb: this._HSBToRGB(col) });
+ this._setIconColor(col);
+ var RGBCol = this._HSBToRGB(col);
+
+ this._trigger("submit", e, { options: this.options, hex:
'#'+this._HSBToHex(col), rgb: 'rgb('+RGBCol.r+', '+RGBCol.g+',
'+RGBCol.b+')' });
+// this._trigger("submit", e, { options: this.options, hsb: col, hex:
this._HSBToHex(col), rgb: this._HSBToRGB(col) });
this.picker.hide();
$(document).unbind('mousedown.colorPicker');
return false;
Show replies by date