Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs
In directory usw-pr-cvs1:/tmp/cvs-serv7061/chat/lib/index_libs
Modified Files:
msg_colors.lib.js
Log Message:
Reduce the width of the image to 2px and fix some bugs with js1.1 (and not 1.2) enabled browsers
Index: msg_colors.lib.js
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/msg_colors.lib.js,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** msg_colors.lib.js 2001/04/27 18:27:22 1.3
--- msg_colors.lib.js 2001/05/01 09:03:59 1.4
***************
*** 27,33 ****
var jsSelectedColor = null;
! var jsImgColor1 = new Image(4,20);
jsImgColor1.src = jsChatPath + 'images/unsel_color.gif';
! var jsImgColor2 = new Image(4,20);
jsImgColor2.src = jsChatPath + 'images/sel_color.gif';
--- 27,33 ----
var jsSelectedColor = null;
! var jsImgColor1 = new Image(2, 20);
jsImgColor1.src = jsChatPath + 'images/unsel_color.gif';
! var jsImgColor2 = new Image(2, 20);
jsImgColor2.src = jsChatPath + 'images/sel_color.gif';
***************
*** 44,49 ****
function pmcSetColorPicker(theCurrentColor)
{
! var jsTextColors = new Array('#000000', '#ffffff');
! var i = 1;
// Defines the list of available colors (red ones are only valid for the
--- 44,49 ----
function pmcSetColorPicker(theCurrentColor)
{
! var jsTextColors = new Array('#000000', '#333333', '#666666', '#999999', '#ffffff');
! var i = 4;
// Defines the list of available colors (red ones are only valid for the
***************
*** 69,76 ****
// Buffers the color picker
jsColorPicker = new Array();
jsColorPicker[0] = '<table border="0" cellpadding="0" cellspacing="0">';
jsColorPicker[1] = '<tr>';
! for (var i = 0; i < jsTextColors.length; i++)
{
if (theCurrentColor == jsTextColors[i])
--- 69,77 ----
// Buffers the color picker
+ var jsTextColorsCnt = jsTextColors.length;
jsColorPicker = new Array();
jsColorPicker[0] = '<table border="0" cellpadding="0" cellspacing="0">';
jsColorPicker[1] = '<tr>';
! for (var i = 0; i < jsTextColorsCnt; i++)
{
if (theCurrentColor == jsTextColors[i])
***************
*** 87,91 ****
jsColorPicker[i+2] = '<\/tr>';
jsColorPicker[i+3] = '<\/table>';
! jsTextColors = null;
return true;
--- 88,93 ----
jsColorPicker[i+2] = '<\/tr>';
jsColorPicker[i+3] = '<\/table>';
! jsTextColorsCnt = null;
! jsTextColors = null;
return true;
***************
*** 114,124 ****
var obj2 = inputDoc.getElementById(colorRank);
}
! else if (jsIsIE4)
{
! var obj1 = inputDoc.all[jsSelectedColor];
! var obj2 = inputDoc.all[colorRank];
}
! // NS
! else if (jsIsNS4)
{
var obj1 = inputDoc.images[jsSelectedColor];
--- 116,125 ----
var obj2 = inputDoc.getElementById(colorRank);
}
! else if (typeof(document.images.item) != 'undefined')
{
! var obj1 = inputDoc.images.item(jsSelectedColor);
! var obj2 = inputDoc.images.item(colorRank);
}
! else if (typeof(document.images) != 'undefined')
{
var obj1 = inputDoc.images[jsSelectedColor];
***************
*** 126,130 ****
--- 127,133 ----
}
else
+ {
return false;
+ }
if (jsSelectedColor != null)
|