~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/web/static/htdocs/applets/FCKeditor/editor/css/behaviors/showtableborders.htc

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
 
8
 
var oClassRegex = /\s*FCK__ShowTableBorders/ ;
9
 
 
10
 
function 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
 
 
28
 
function OnPropertyChange()
29
 
{
30
 
        if ( event.propertyName == 'border' || event.propertyName == 'className' )
31
 
                ShowBorders.call(this) ;
32
 
}
33
 
 
34
 
</script>
35
 
 
36
 
</public:component>