[freeside-commits] freeside/httemplate/elements/fckeditor/editor/css/behaviors disablehandles.htc, NONE, 1.1 showtableborders.htc, NONE, 1.1

Ivan,,, ivan at wavetail.420.am
Wed Aug 1 15:25:15 PDT 2007


Update of /home/cvs/cvsroot/freeside/httemplate/elements/fckeditor/editor/css/behaviors
In directory wavetail:/tmp/cvs-serv23435/httemplate/elements/fckeditor/editor/css/behaviors

Added Files:
	disablehandles.htc showtableborders.htc 
Log Message:
event refactor, landing on HEAD!

--- NEW FILE: disablehandles.htc ---
<public:component lightweight="true">

<script language="javascript">

function CancelEvent()
{
	return false ;
}

this.onresizestart = CancelEvent ;
this.onbeforeeditfocus = CancelEvent ;

</script>

</public:component>

--- NEW FILE: showtableborders.htc ---
<public:component lightweight="true">

<public:attach event="oncontentready" onevent="ShowBorders()" />
<public:attach event="onpropertychange" onevent="OnPropertyChange()" />

<script language="javascript">

var oClassRegex = /\s*FCK__ShowTableBorders/ ;

function ShowBorders()
{
	if ( this.border == 0 )
	{
		if ( !oClassRegex.test( this.className ) )
			this.className += ' FCK__ShowTableBorders' ;
	}
	else
	{
		if ( oClassRegex.test( this.className ) )
		{
			this.className = this.className.replace( oClassRegex, '' ) ;
			if ( this.className.length == 0 )
				this.removeAttribute( 'className', 0 ) ;
		}
	}
}

function OnPropertyChange()
{
	if ( event.propertyName == 'border' || event.propertyName == 'className' )
		ShowBorders.call(this) ;
}

</script>

</public:component>



More information about the freeside-commits mailing list