Fixed hiding of table border in color pulldown in IE. Tweak light/dark threshold. Added :hover border on color boxes.
This commit is contained in:
parent
ec3486f05d
commit
5f47ae3187
|
@ -857,13 +857,13 @@ h1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
#color_table {
|
#color_table {
|
||||||
|
border: none;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border: 1px solid #000000;
|
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#color_table td {
|
#color_table td {
|
||||||
border: 1px solid #000000;
|
border: 1px solid transparent;
|
||||||
width: 1.5em;
|
width: 1.5em;
|
||||||
height: 1.5em;
|
height: 1.5em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -884,6 +884,10 @@ h1 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#color_table .color_box:hover {
|
||||||
|
border: 2px solid #eeeeee;
|
||||||
|
}
|
||||||
|
|
||||||
.color_box_dark_selected {
|
.color_box_dark_selected {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3306,10 +3306,18 @@ Pulldown.prototype.update_position = function ( always_left_align ) {
|
||||||
new Move( this.div, { "x": position.x, "y": viewport_bottom - div_height, "mode": "absolute", "duration": 0.25 } );
|
new Move( this.div, { "x": position.x, "y": viewport_bottom - div_height, "mode": "absolute", "duration": 0.25 } );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Pulldown.prototype.show = function () {
|
||||||
|
// implemented in derived object
|
||||||
|
}
|
||||||
|
|
||||||
|
Pulldown.prototype.hide = function () {
|
||||||
|
// implemented in derived object
|
||||||
|
}
|
||||||
|
|
||||||
Pulldown.prototype.shutdown = function () {
|
Pulldown.prototype.shutdown = function () {
|
||||||
// if this pulldown is to be cached, then simply hide it rather than shutting it down completely
|
// if this pulldown is to be cached, then simply hide it rather than shutting it down completely
|
||||||
if ( this.cache ) {
|
if ( this.cache ) {
|
||||||
addElementClass( this.div, "invisible" );
|
this.hide();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4725,12 +4733,12 @@ Color_pulldown.prototype.color_mouse_pressed = function ( event ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Color_pulldown.prototype.color_mouse_released = function ( event ) {
|
Color_pulldown.prototype.color_mouse_released = function ( event ) {
|
||||||
|
event.stop();
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
setTimeout( function () {
|
setTimeout( function () {
|
||||||
self.shutdown();
|
self.shutdown();
|
||||||
}, 100 );
|
}, 100 );
|
||||||
|
|
||||||
event.stop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Color_pulldown.prototype.select_color = function ( color_code, skip_set ) {
|
Color_pulldown.prototype.select_color = function ( color_code, skip_set ) {
|
||||||
|
@ -4750,9 +4758,9 @@ Color_pulldown.prototype.select_color_box = function ( color_box, color_code, sk
|
||||||
if ( color_code == undefined || color_code == null )
|
if ( color_code == undefined || color_code == null )
|
||||||
color_code = getStyle( color_box, "background-color" );
|
color_code = getStyle( color_box, "background-color" );
|
||||||
|
|
||||||
var LIGHT_DARK_THRESHOLD = 0.5;
|
var LIGHT_DARK_THRESHOLD = 0.45;
|
||||||
|
|
||||||
if ( Color.fromString( color_code ).asHSL().l > LIGHT_DARK_THRESHOLD )
|
if ( Color.fromString( color_code ).asHSL().l >= LIGHT_DARK_THRESHOLD )
|
||||||
addElementClass( color_box, "color_box_light_selected" );
|
addElementClass( color_box, "color_box_light_selected" );
|
||||||
else
|
else
|
||||||
addElementClass( color_box, "color_box_dark_selected" );
|
addElementClass( color_box, "color_box_dark_selected" );
|
||||||
|
|
Reference in New Issue