source: trunk/admin/inc/FCKeditor/editor/css/behaviors/showtableborders.htc@ 2

Last change on this file since 2 was 2, checked in by root, 15 years ago

importo il progetto

File size: 822 bytes
Line 
1<public:component lightweight="true">
2
3<public:attach event="oncontentready" onevent="ShowBorders()" />
4<public:attach event="onpropertychange" onevent="OnPropertyChange()" />
5
6<script language="javascript">
7
8var oClassRegex = /\s*FCK__ShowTableBorders/ ;
9
10function ShowBorders()
11{
12 if ( this.border == 0 )
13 {
14 if ( !oClassRegex.test( this.className ) )
15 this.className += ' FCK__ShowTableBorders' ;
16 }
17 else
18 {
19 if ( oClassRegex.test( this.className ) )
20 {
21 this.className = this.className.replace( oClassRegex, '' ) ;
22 if ( this.className.length == 0 )
23 this.removeAttribute( 'className', 0 ) ;
24 }
25 }
26}
27
28function OnPropertyChange()
29{
30 if ( event.propertyName == 'border' || event.propertyName == 'className' )
31 ShowBorders.call(this) ;
32}
33
34</script>
35
36</public:component>
Note: See TracBrowser for help on using the repository browser.