Author: artdaw
Date: 2008-12-29 20:33:46 -0500 (Mon, 29 Dec 2008)
New Revision: 12054
Modified:
trunk/sandbox/ui/colorPicker/design/colorPicker.html
trunk/sandbox/ui/colorPicker/design/ui.colorpicker.js
Log:
rich:colorPicker design was edited
Modified: trunk/sandbox/ui/colorPicker/design/colorPicker.html
===================================================================
--- trunk/sandbox/ui/colorPicker/design/colorPicker.html 2008-12-29 23:35:58 UTC (rev
12053)
+++ trunk/sandbox/ui/colorPicker/design/colorPicker.html 2008-12-30 01:33:46 UTC (rev
12054)
@@ -164,6 +164,7 @@
height:16px;
width:16px;
vertical-align:middle;
+ border: 1px solid #BED6F8;
}
</style>
@@ -178,13 +179,14 @@
$('div.rich-colorPicker-color').pngFix();
}
$("#rich-colorPicker").colorPicker({
+ eventName: 'click',
flat: false,
color: "#807540",
/*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);
+ $("#rich-colorPicker input").val('#'+ui.hex);
}
});
});
@@ -195,10 +197,21 @@
<body style="height: 10000px">
<br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br />
+<br /><br /><br /><br /><br /><br /><br />
+<br /><br /><br /><br /><br /><br /><br />
+<br /><br /><br /><br /><br /><br /><br />
+<br /><br /><br /><br /><br /><br /><br />
<span id="rich-colorPicker" class="rich-colorPicker-span">
<input readonly="readonly"/>
<img src="images/arrow.gif" alt="icon"
class="rich-colorPicker-icon" vertical-align="middle" />
</span>
+<input type="button" value="Set red color in RGB format"
onclick="$('#rich-colorPicker').colorPicker('setColor',
{r:255,g:0,b:0})"/>
+<input type="button" value="Set gray color in HEX format"
onclick="$('#rich-colorPicker').colorPicker('setColor',
'#cccccc')"/>
+<input type="button" value="Set seagreen color in HSB format"
onclick="$('#rich-colorPicker').colorPicker('setColor',
{h:160,s:100,b:100})"/>
+<br /><br /><br /><br /><br /><br /><br />
+<br /><br /><br /><br /><br /><br /><br />
+<br /><br /><br /><br /><br /><br /><br />
+<br /><br /><br /><br /><br /><br /><br />
<div id="rich-colorPicker-ui"
class="rich-colorPicker-wrapper">
<div class="rich-colorPicker-ext">
<div class="rich-colorPicker-color">
@@ -243,5 +256,7 @@
<button type="button" class="rich-colorPicker-submit"
name="submit">Apply</button>
</div>
</div>
+
+
</body>
</html>
Modified: trunk/sandbox/ui/colorPicker/design/ui.colorpicker.js
===================================================================
--- trunk/sandbox/ui/colorPicker/design/ui.colorpicker.js 2008-12-29 23:35:58 UTC (rev
12053)
+++ trunk/sandbox/ui/colorPicker/design/ui.colorpicker.js 2008-12-30 01:33:46 UTC (rev
12054)
@@ -58,7 +58,7 @@
_init: function() {
- this.charMin = 67;
+ this.charMin = 65;
var o = this.options, self = this,
tpl = $(o.clientId.toString()+"-ui");
@@ -208,7 +208,7 @@
this._trigger('change', e, { options: this.options, hsb: col, hex:
this._HSBToHex(col), rgb: this._HSBToRGB(col) });
},
_blur: function(e) {
-
+/*
var col = this.color;
this._fillRGBFields(col);
this._fillHSBFields(col);
@@ -216,7 +216,8 @@
this._setHue(col);
this._setSelector(col);
this._setNewColor(col);
- this._setIconColor(col);
+ this._setIconColor(col);
+*/
this.fields.parent().removeClass('rich-colorPicker-focus');
},
@@ -342,9 +343,10 @@
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._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: function(e) {
@@ -514,14 +516,5 @@
}
-});
-
-$.extend($.ui.colorPicker, {
- defaults: {
- eventName: 'click',
- color: 'ff0000',
- flat: false
- }
-});
-
+});
})(jQuery);