Index: editor/dialog/fck_tablecell.html
===================================================================
--- editor/dialog/fck_tablecell.html (revision 1180)
+++ editor/dialog/fck_tablecell.html (working copy)
@@ -64,6 +64,16 @@
if ( oCell.attributes['noWrap'] != null && oCell.attributes['noWrap'].specified )
GetE('selWordWrap').value = !oCell.noWrap ;
+ var sBorderColor = oCell.style.borderColor ;
+ var matchResults = null ;
+ if ( matchResults = sBorderColor.match( /(rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/i ) )
+ {
+ var red = parseInt( matchResults[2], 10 ).toString( 16 ),
+ green = parseInt( matchResults[3], 10 ).toString( 16 ),
+ blue = parseInt( matchResults[4], 10 ).toString( 16 ) ;
+ sBorderColor = '#' + [red, green, blue].join( '' ) ;
+ }
+
GetE('txtWidth').value = iWidth ;
GetE('txtHeight').value = GetAttribute( oCell, 'height' ) ;
GetE('selHAlign').value = GetAttribute( oCell, 'align' ) ;
@@ -71,7 +81,7 @@
GetE('txtRowSpan').value = GetAttribute( oCell, 'rowSpan' ) ;
GetE('txtCollSpan').value = GetAttribute( oCell, 'colSpan' ) ;
GetE('txtBackColor').value = GetAttribute( oCell, 'bgColor' ) ;
- GetE('txtBorderColor').value = GetAttribute( oCell, 'borderColor' ) ;
+ GetE('txtBorderColor').value = sBorderColor ;
// GetE('cmbFontStyle').value = oCell.className ;
}
}
@@ -97,7 +107,19 @@
SetAttribute( aCells[i], 'rowSpan' , GetE('txtRowSpan').value ) ;
SetAttribute( aCells[i], 'colSpan' , GetE('txtCollSpan').value ) ;
SetAttribute( aCells[i], 'bgColor' , GetE('txtBackColor').value ) ;
- SetAttribute( aCells[i], 'borderColor' , GetE('txtBorderColor').value ) ;
+
+ var sBorderColor = GetE( 'txtBorderColor' ).value ;
+ if ( sBorderColor.length > 0 )
+ {
+ oEditor.FCKDomTools.SetElementStyles( aCells[i],
+ {
+ 'borderColor' : sBorderColor,
+ 'borderWidth' : '1px',
+ 'borderStyle' : 'solid'
+ } ) ;
+ }
+ else
+ aCells[i].style.border = 'default' ;
// SetAttribute( aCells[i], 'className' , GetE('cmbFontStyle').value ) ;
}