witten
/
luminotes
Archived
1
0
Fork 0

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:
Dan Helfman 2009-05-18 14:48:24 -07:00
parent ec3486f05d
commit 5f47ae3187
2 changed files with 19 additions and 7 deletions

View File

@ -857,13 +857,13 @@ h1 {
}
#color_table {
border: none;
border-collapse: collapse;
border: 1px solid #000000;
margin-top: 1em;
}
#color_table td {
border: 1px solid #000000;
border: 1px solid transparent;
width: 1.5em;
height: 1.5em;
text-align: center;
@ -884,6 +884,10 @@ h1 {
margin: 0;
}
#color_table .color_box:hover {
border: 2px solid #eeeeee;
}
.color_box_dark_selected {
color: #ffffff;
}

View File

@ -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 } );
}
Pulldown.prototype.show = function () {
// implemented in derived object
}
Pulldown.prototype.hide = function () {
// implemented in derived object
}
Pulldown.prototype.shutdown = function () {
// if this pulldown is to be cached, then simply hide it rather than shutting it down completely
if ( this.cache ) {
addElementClass( this.div, "invisible" );
this.hide();
return false;
}
@ -4725,12 +4733,12 @@ Color_pulldown.prototype.color_mouse_pressed = function ( event ) {
}
Color_pulldown.prototype.color_mouse_released = function ( event ) {
event.stop();
var self = this;
setTimeout( function () {
self.shutdown();
}, 100 );
event.stop();
}
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 )
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" );
else
addElementClass( color_box, "color_box_dark_selected" );