mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 11:43:16 +02:00
[Case 4315] Fixes Color Picker preview restore functionality (details below).
* The original color preview is now visually retained when the user changes the color via the picker when using the Non-Submit configuration (No OK button). * Clicking the initial old color preview section restores the original/initial color of the object. Tested Desktop & HMD Modes. Changes Committed: modified: scripts/system/html/css/colpick.css modified: scripts/system/html/js/colpick.js
This commit is contained in:
parent
2fc954909b
commit
6c5961820c
2 changed files with 7 additions and 4 deletions
|
@ -279,7 +279,7 @@ colpick Color Picker / colpick.com
|
|||
}
|
||||
|
||||
/*full layout with no submit button*/
|
||||
.colpick_full_ns .colpick_submit, .colpick_full_ns .colpick_current_color{
|
||||
.colpick_full_ns .colpick_submit {
|
||||
display:none;
|
||||
}
|
||||
.colpick_full_ns .colpick_new_color {
|
||||
|
@ -320,11 +320,11 @@ colpick Color Picker / colpick.com
|
|||
}
|
||||
|
||||
/*rgbhex layout, no submit button*/
|
||||
.colpick_rgbhex_ns .colpick_submit, .colpick_rgbhex_ns .colpick_current_color{
|
||||
.colpick_rgbhex_ns .colpick_submit {
|
||||
display:none;
|
||||
}
|
||||
.colpick_rgbhex_ns .colpick_new_color{
|
||||
width:68px;
|
||||
width:34px;
|
||||
border: 1px solid #8f8f8f;
|
||||
}
|
||||
.colpick_rgbhex_ns .colpick_rgb_r {
|
||||
|
@ -379,7 +379,7 @@ colpick Color Picker / colpick.com
|
|||
}
|
||||
|
||||
/*hex layout, no submit button*/
|
||||
.colpick_hex_ns .colpick_submit, .colpick_hex_ns .colpick_current_color {
|
||||
.colpick_hex_ns .colpick_submit {
|
||||
display:none;
|
||||
}
|
||||
.colpick_hex_ns .colpick_hex_field {
|
||||
|
|
|
@ -302,6 +302,9 @@ For usage and examples: colpick.com/plugin
|
|||
setSelector(col, cal.get(0));
|
||||
setHue(col, cal.get(0));
|
||||
setNewColor(col, cal.get(0));
|
||||
// If the user triggered this behavior, then any prior color change should be negated.
|
||||
cal.data('colpick').onChange.apply(cal.parent(), [col, hsbToHex(col),
|
||||
hsbToRgb(col), cal.data('colpick').el, 0]);
|
||||
};
|
||||
return {
|
||||
init: function (opt) {
|
||||
|
|
Loading…
Reference in a new issue