1 <public:component lightweight="true">
\r
3 <public:attach event="oncontentready" onevent="ShowBorders()" />
\r
4 <public:attach event="onpropertychange" onevent="OnPropertyChange()" />
\r
6 <script language="javascript">
\r
8 var oClassRegex = /\s*FCK__ShowTableBorders/ ;
\r
10 function ShowBorders()
\r
12 if ( this.border == 0 )
\r
14 if ( !oClassRegex.test( this.className ) )
\r
15 this.className += ' FCK__ShowTableBorders' ;
\r
19 if ( oClassRegex.test( this.className ) )
\r
21 this.className = this.className.replace( oClassRegex, '' ) ;
\r
22 if ( this.className.length == 0 )
\r
23 this.removeAttribute( 'className', 0 ) ;
\r
28 function OnPropertyChange()
\r
30 if ( event.propertyName == 'border' || event.propertyName == 'className' )
\r
31 ShowBorders.call(this) ;
\r