' ;
+
+ // Gets the correct CSS class to use for the specified style (param).
+ oField.innerHTML ='
' +
+ '
' +
+ //'
' +
+ '
' + this.Caption + '
' +
+ '
' +
+ '
' +
+ '
' ;
+ }
- /* Events Handlers */
+ // Events Handlers
+
oField.SpecialCombo = this ;
oField.onmouseover = FCKSpecialCombo_OnMouseOver ;
@@ -158,12 +199,36 @@
function FCKSpecialCombo_OnMouseOver()
{
if ( this.SpecialCombo.Enabled )
- this.className = 'SC_Field SC_FieldOver' ;
+ {
+ switch ( this.SpecialCombo.Style )
+ {
+ case FCK_TOOLBARITEM_ONLYICON :
+ this.className = 'TB_Button_On';
+ break ;
+ case FCK_TOOLBARITEM_ONLYTEXT :
+ this.className = 'TB_Button_On';
+ break ;
+ case FCK_TOOLBARITEM_ICONTEXT :
+ this.className = 'SC_Field SC_FieldOver' ;
+ break ;
+ }
+ }
}
function FCKSpecialCombo_OnMouseOut()
{
- this.className='SC_Field' ;
+ switch ( this.SpecialCombo.Style )
+ {
+ case FCK_TOOLBARITEM_ONLYICON :
+ this.className = 'TB_Button_Off';
+ break ;
+ case FCK_TOOLBARITEM_ONLYTEXT :
+ this.className = 'TB_Button_Off';
+ break ;
+ case FCK_TOOLBARITEM_ICONTEXT :
+ this.className='SC_Field' ;
+ break ;
+ }
}
function FCKSpecialCombo_OnClick( e )
@@ -178,20 +243,22 @@
if ( this.SpecialCombo.Enabled )
{
+ var oPanel = this.SpecialCombo._Panel ;
+
if ( typeof( this.SpecialCombo.OnBeforeClick ) == 'function' )
this.SpecialCombo.OnBeforeClick( this.SpecialCombo ) ;
if ( this.SpecialCombo._ItemsHolderEl.offsetHeight > this.SpecialCombo.PanelMaxHeight )
- this.SpecialCombo._Panel.PanelDiv.style.height = this.SpecialCombo.PanelMaxHeight + 'px' ;
+ oPanel.PanelDiv.style.height = this.SpecialCombo.PanelMaxHeight + 'px' ;
else
- this.SpecialCombo._Panel.PanelDiv.style.height = this.SpecialCombo._ItemsHolderEl.offsetHeight + 'px' ;
+ oPanel.PanelDiv.style.height = this.SpecialCombo._ItemsHolderEl.offsetHeight + 'px' ;
- this.SpecialCombo._Panel.PanelDiv.style.width = this.SpecialCombo.PanelWidth + 'px' ;
+ oPanel.PanelDiv.style.width = this.SpecialCombo.PanelWidth + 'px' ;
if ( FCKBrowserInfo.IsGecko )
- this.SpecialCombo._Panel.PanelDiv.style.overflow = '-moz-scrollbars-vertical' ;
+ oPanel.PanelDiv.style.overflow = '-moz-scrollbars-vertical' ;
- this.SpecialCombo._Panel.Show( 0, this.offsetHeight, this, null, this.SpecialCombo.PanelMaxHeight, true ) ;
+ oPanel.Show( 0, this.offsetHeight, this, null, this.SpecialCombo.PanelMaxHeight, true ) ;
}
return false ;
Index: lams_central/web/fckeditor/editor/_source/classes/fckstyledef.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fckstyledef.js (.../fckstyledef.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fckstyledef.js (.../fckstyledef.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckstyledef.js
* FCKStyleDef Class: represents a single stylke definition.
*
Index: lams_central/web/fckeditor/editor/_source/classes/fckstyledef_gecko.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fckstyledef_gecko.js (.../fckstyledef_gecko.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fckstyledef_gecko.js (.../fckstyledef_gecko.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckstyledef_gecko.js
* FCKStyleDef Class: represents a single stylke definition. (Gecko specific)
*
Index: lams_central/web/fckeditor/editor/_source/classes/fckstyledef_ie.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fckstyledef_ie.js (.../fckstyledef_ie.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fckstyledef_ie.js (.../fckstyledef_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckstyledef_ie.js
* FCKStyleDef Class: represents a single stylke definition. (IE specific)
*
Index: lams_central/web/fckeditor/editor/_source/classes/fckstylesloader.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fckstylesloader.js (.../fckstylesloader.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fckstylesloader.js (.../fckstylesloader.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckstylesloader.js
* FCKStylesLoader Class: this class define objects that are responsible
* for loading the styles defined in the XML file.
Index: lams_central/web/fckeditor/editor/_source/classes/fcktoolbar.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fcktoolbar.js (.../fcktoolbar.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fcktoolbar.js (.../fcktoolbar.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbar.js
* FCKToolbar Class: represents a toolbar. A toolbar is not the complete
* toolbar set visible, but just a strip on it... a group of items.
@@ -20,25 +22,23 @@
{
this.Items = new Array() ;
- this.DOMTable = document.createElement( 'table' ) ;
- this.DOMTable.className = 'TB_Toolbar' ;
- with ( this.DOMTable )
- {
- // Sets the toolbar direction. IE uses "styleFloat" and Gecko uses "cssFloat".
- style.styleFloat = style.cssFloat = FCKLang.Dir == 'rtl' ? 'right' : 'left' ;
-
- cellPadding = 0 ;
- cellSpacing = 0 ;
- border = 0 ;
- }
+ var e = this.DOMTable = document.createElement( 'table' ) ;
+ e.className = 'TB_Toolbar' ;
- this.DOMRow = this.DOMTable.insertRow(-1) ;
+ // Sets the toolbar direction. IE uses "styleFloat" and Gecko uses "cssFloat".
+ e.style.styleFloat = e.style.cssFloat = FCKLang.Dir == 'rtl' ? 'right' : 'left' ;
+ e.cellPadding = 0 ;
+ e.cellSpacing = 0 ;
+ e.border = 0 ;
+
+ this.DOMRow = e.insertRow(-1) ;
+
var oCell = this.DOMRow.insertCell(-1) ;
oCell.className = 'TB_Start' ;
oCell.innerHTML = '' ;
- FCKToolbarSet.DOMElement.appendChild( this.DOMTable ) ;
+ FCKToolbarSet.DOMElement.appendChild( e ) ;
}
FCKToolbar.prototype.AddItem = function( toolbarItem )
Index: lams_central/web/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js (.../fcktoolbarbreak_gecko.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js (.../fcktoolbarbreak_gecko.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbarbreak_gecko.js
* FCKToolbarBreak Class: breaks the toolbars.
* It makes it possible to force the toolbar to brak to a new line.
Index: lams_central/web/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js (.../fcktoolbarbreak_ie.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js (.../fcktoolbarbreak_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbarbreak_ie.js
* FCKToolbarBreak Class: breaks the toolbars.
* It makes it possible to force the toolbar to brak to a new line.
Index: lams_central/web/fckeditor/editor/_source/classes/fcktoolbarbutton.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fcktoolbarbutton.js (.../fcktoolbarbutton.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fcktoolbarbutton.js (.../fcktoolbarbutton.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbarbutton.js
* FCKToolbarButton Class: represents a button in the toolbar.
*
Index: lams_central/web/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js (.../fcktoolbarfontformatcombo.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js (.../fcktoolbarfontformatcombo.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,16 +8,23 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbarfontformatcombo.js
* FCKToolbarPanelButton Class: Handles the Fonts combo selector.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
-var FCKToolbarFontFormatCombo = function()
+var FCKToolbarFontFormatCombo = function( tooltip, style )
{
- this.Command = FCKCommands.GetCommand( 'FontFormat' ) ;
+ this.Command = FCKCommands.GetCommand( 'FontFormat' ) ;
+ this.Label = this.GetLabel() ;
+ this.Tooltip = tooltip ? tooltip : this.Label ;
+ this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ;
+
+ this.PanelWidth = 190 ;
}
// Inherit from FCKToolbarSpecialCombo.
Index: lams_central/web/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js (.../fcktoolbarfontscombo.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js (.../fcktoolbarfontscombo.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,16 +8,21 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbarfontscombo.js
* FCKToolbarPanelButton Class: Handles the Fonts combo selector.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
-var FCKToolbarFontsCombo = function()
+var FCKToolbarFontsCombo = function( tooltip, style )
{
- this.Command = FCKCommands.GetCommand( 'FontName' ) ;
+ this.Command = FCKCommands.GetCommand( 'FontName' ) ;
+ this.Label = this.GetLabel() ;
+ this.Tooltip = tooltip ? tooltip : this.Label ;
+ this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ;
}
// Inherit from FCKToolbarSpecialCombo.
Index: lams_central/web/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js (.../fcktoolbarfontsizecombo.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js (.../fcktoolbarfontsizecombo.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,16 +8,21 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbarfontsizecombo.js
* FCKToolbarPanelButton Class: Handles the Fonts combo selector.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
-var FCKToolbarFontSizeCombo = function()
+var FCKToolbarFontSizeCombo = function( tooltip, style )
{
- this.Command = FCKCommands.GetCommand( 'FontSize' ) ;
+ this.Command = FCKCommands.GetCommand( 'FontSize' ) ;
+ this.Label = this.GetLabel() ;
+ this.Tooltip = tooltip ? tooltip : this.Label ;
+ this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ;
}
// Inherit from FCKToolbarSpecialCombo.
Index: lams_central/web/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js (.../fcktoolbarpanelbutton.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js (.../fcktoolbarpanelbutton.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbarpanelbutton.js
* FCKToolbarPanelButton Class: represents a special button in the toolbar
* that shows a panel when pressed.
Index: lams_central/web/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js (.../fcktoolbarspecialcombo.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js (.../fcktoolbarspecialcombo.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbarspecialcombo.js
* FCKToolbarSpecialCombo Class: This is a "abstract" base class to be used
* by the special combo toolbar elements like font name, font size, paragraph format, etc...
@@ -36,10 +38,15 @@
FCKToolbarSpecialCombo.prototype.CreateInstance = function( parentToolbar )
{
this._Combo = new FCKSpecialCombo( this.GetLabel() ) ;
- this._Combo.FieldWidth = 100 ;
- this._Combo.PanelWidth = 150 ;
- this._Combo.PanelMaxHeight = 150 ;
+ this._Combo.FieldWidth = this.FieldWidth != null ? this.FieldWidth : 100 ;
+ this._Combo.PanelWidth = this.PanelWidth != null ? this.PanelWidth : 150 ;
+ this._Combo.PanelMaxHeight = this.PanelMaxHeight != null ? this.PanelMaxHeight : 150 ;
+ //this._Combo.Command.Name = this.Command.Name;
+// this._Combo.Label = this.Label ;
+ this._Combo.Tooltip = this.Tooltip ;
+ this._Combo.Style = this.Style ;
+
this.CreateItems( this._Combo ) ;
this._Combo.Create( parentToolbar.DOMRow.insertCell(-1) ) ;
Index: lams_central/web/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js (.../fcktoolbarstylecombo.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js (.../fcktoolbarstylecombo.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,16 +8,21 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbarstylecombo.js
* FCKToolbarPanelButton Class: Handles the Fonts combo selector.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
-var FCKToolbarStyleCombo = function()
+var FCKToolbarStyleCombo = function( tooltip, style )
{
- this.Command = FCKCommands.GetCommand( 'Style' ) ;
+ this.Command = FCKCommands.GetCommand( 'Style' ) ;
+ this.Label = this.GetLabel() ;
+ this.Tooltip = tooltip ? tooltip : this.Label ;
+ this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ;
}
// Inherit from FCKToolbarSpecialCombo.
@@ -41,10 +46,13 @@
for ( var s in this.Command.Styles )
{
var oStyle = this.Command.Styles[s] ;
+ var oItem ;
+
if ( oStyle.IsObjectElement )
- var oItem = targetSpecialCombo.AddItem( s, s ) ;
+ oItem = targetSpecialCombo.AddItem( s, s ) ;
else
- var oItem = targetSpecialCombo.AddItem( s, oStyle.GetOpenerTag() + s + oStyle.GetCloserTag() ) ;
+ oItem = targetSpecialCombo.AddItem( s, oStyle.GetOpenerTag() + s + oStyle.GetCloserTag() ) ;
+
oItem.Style = oStyle ;
}
}
Index: lams_central/web/fckeditor/editor/_source/classes/fckxml_gecko.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fckxml_gecko.js (.../fckxml_gecko.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fckxml_gecko.js (.../fckxml_gecko.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckxml_gecko.js
* FCKXml Class: class to load and manipulate XML files.
*
@@ -30,7 +32,7 @@
oXmlHttp.open( "GET", urlToCall, false ) ;
oXmlHttp.send( null ) ;
- if ( oXmlHttp.status == 200 )
+ if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 )
this.DOMDocument = oXmlHttp.responseXML ;
else if ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 )
this.DOMDocument = oXmlHttp.responseXML ;
Index: lams_central/web/fckeditor/editor/_source/classes/fckxml_ie.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/classes/fckxml_ie.js (.../fckxml_ie.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/classes/fckxml_ie.js (.../fckxml_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckxml_ie.js
* FCKXml Class: class to load and manipulate XML files.
* (IE specific implementation)
@@ -21,17 +23,27 @@
if ( !( FCKXml = NS.FCKXml ) )
{
FCKXml = NS.FCKXml = function()
- {}
+ {
+ this.Error = false ;
+ }
FCKXml.prototype.LoadUrl = function( urlToCall )
{
+ this.Error = false ;
+
var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ;
+ if ( !oXmlHttp )
+ {
+ this.Error = true ;
+ return ;
+ }
+
oXmlHttp.open( "GET", urlToCall, false ) ;
oXmlHttp.send( null ) ;
- if ( oXmlHttp.status == 200 )
+ if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 )
this.DOMDocument = oXmlHttp.responseXML ;
else if ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 )
{
@@ -41,11 +53,17 @@
this.DOMDocument.loadXML( oXmlHttp.responseText ) ;
}
else
+ {
+ this.Error = true ;
alert( 'Error loading "' + urlToCall + '"' ) ;
+ }
}
FCKXml.prototype.SelectNodes = function( xpath, contextNode )
{
+ if ( this.Error )
+ return new Array() ;
+
if ( contextNode )
return contextNode.selectNodes( xpath ) ;
else
@@ -54,6 +72,9 @@
FCKXml.prototype.SelectSingleNode = function( xpath, contextNode )
{
+ if ( this.Error )
+ return ;
+
if ( contextNode )
return contextNode.selectSingleNode( xpath ) ;
else
Index: lams_central/web/fckeditor/editor/_source/commandclasses/fck_othercommands.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/commandclasses/fck_othercommands.js (.../fck_othercommands.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/commandclasses/fck_othercommands.js (.../fck_othercommands.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_othercommands.js
* Definition of other commands that are not available internaly in the
* browser (see FCKNamedCommand).
@@ -175,8 +177,9 @@
{
FCKUndo.SaveUndoStep() ;
FCK.SetHTML( '' ) ;
+ FCKUndo.Typing = true ;
// FCK.SetHTML( FCKBrowserInfo.IsGecko ? ' ' : '' ) ;
-// FCK.SetHTML( FCKBrowserInfo.IsGecko ? ' ' : '' ) ;
+// FCK.SetHTML( FCKBrowserInfo.IsGecko ? GECKO_BOGUS : '' ) ;
}
FCKNewPageCommand.prototype.GetState = function()
@@ -194,8 +197,8 @@
{
if ( FCKBrowserInfo.IsGecko )
{
- var iWidth = screen.width * 0.65 ;
- var iHeight = screen.height * 0.65 ;
+ var iWidth = FCKConfig.ScreenWidth * 0.65 ;
+ var iHeight = FCKConfig.ScreenHeight * 0.65 ;
FCKDialog.OpenDialog( 'FCKDialog_Source', FCKLang.Source, 'dialog/fck_source.html', iWidth, iHeight, null, null, true ) ;
}
else
@@ -224,7 +227,7 @@
FCKUndoCommand.prototype.GetState = function()
{
if ( FCKBrowserInfo.IsIE )
- return ( FCKUndo.Typing || FCKUndo.CurrentIndex > 0 ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ;
+ return ( FCKUndo.CheckUndoState() ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ;
else
return FCK.GetNamedCommandState( 'Undo' ) ;
}
@@ -246,7 +249,27 @@
FCKRedoCommand.prototype.GetState = function()
{
if ( FCKBrowserInfo.IsIE )
- return ( !FCKUndo.Typing && FCKUndo.CurrentIndex < ( FCKUndo.SavedData.length - 1 ) ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ;
+ return ( FCKUndo.CheckRedoState() ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ;
else
return FCK.GetNamedCommandState( 'Redo' ) ;
+}
+
+// ### Page Break
+var FCKPageBreakCommand = function()
+{
+ this.Name = 'PageBreak' ;
+}
+
+FCKPageBreakCommand.prototype.Execute = function()
+{
+ var oCenter = FCK.EditorDocument.createElement( 'CENTER' ) ;
+ oCenter.style.pageBreakAfter = 'always' ;
+
+ var oFakeImage = FCKDocumentProcessors_CreateFakeImage( 'FCK__PageBreak', oCenter ) ;
+ oFakeImage = FCK.InsertElement( oFakeImage ) ;
+}
+
+FCKPageBreakCommand.prototype.GetState = function()
+{
+ return 0 ; // FCK_TRISTATE_OFF
}
\ No newline at end of file
Index: lams_central/web/fckeditor/editor/_source/commandclasses/fcknamedcommand.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/commandclasses/fcknamedcommand.js (.../fcknamedcommand.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/commandclasses/fcknamedcommand.js (.../fcknamedcommand.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcknamedcommand.js
* FCKNamedCommand Class: represents an internal browser command.
*
Index: lams_central/web/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js (.../fckpasteplaintextcommand.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js (.../fckpasteplaintextcommand.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckpasteplaintextcommand.js
* FCKPastePlainTextCommand Class: represents the
* "Paste as Plain Text" command.
Index: lams_central/web/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js (.../fckpastewordcommand.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js (.../fckpastewordcommand.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckpastewordcommand.js
* FCKPasteWordCommand Class: represents the "Paste from Word" command.
*
Index: lams_central/web/fckeditor/editor/_source/commandclasses/fckstylecommand.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/commandclasses/fckstylecommand.js (.../fckstylecommand.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/commandclasses/fckstylecommand.js (.../fckstylecommand.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckstylecommand.js
* FCKStyleCommand Class: represents the "Style" command.
*
@@ -27,11 +29,15 @@
FCKStyleCommand.prototype.Execute = function( styleName, styleComboItem )
{
+ FCKUndo.SaveUndoStep() ;
+
if ( styleComboItem.Selected )
styleComboItem.Style.RemoveFromSelection() ;
else
styleComboItem.Style.ApplyToSelection() ;
+ FCKUndo.SaveUndoStep() ;
+
FCK.Focus() ;
FCK.Events.FireEvent( "OnSelectionChange" ) ;
@@ -44,13 +50,11 @@
if ( FCKSelection.GetType() == 'Control' )
{
var e = FCKSelection.GetSelectedElement() ;
- if ( e )
- return this.StylesLoader.StyleGroups[ e.tagName ] ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
- else
- FCK_TRISTATE_OFF ;
+ if ( e )
+ return this.StylesLoader.StyleGroups[ e.tagName ] ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
}
- else
- return FCK_TRISTATE_OFF ;
+
+ return FCK_TRISTATE_OFF ;
}
FCKStyleCommand.prototype.GetActiveStyles = function()
Index: lams_central/web/fckeditor/editor/_source/commandclasses/fcktablecommand.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/commandclasses/fcktablecommand.js (.../fcktablecommand.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/commandclasses/fcktablecommand.js (.../fcktablecommand.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktablecommand.js
* FCKPastePlainTextCommand Class: represents the
* "Paste as Plain Text" command.
Index: lams_central/web/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js (.../fcktextcolorcommand.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js (.../fcktextcolorcommand.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktextcolorcommand.js
* FCKTextColorCommand Class: represents the text color comand. It shows the
* color selection panel.
@@ -154,7 +156,7 @@
for ( var i = 0 ; i < 8 && iCounter < aColors.length ; i++, iCounter++ )
{
- var oDiv = oRow.insertCell(-1).appendChild( CreateSelectionDiv() ) ;
+ oDiv = oRow.insertCell(-1).appendChild( CreateSelectionDiv() ) ;
oDiv.Color = aColors[iCounter] ;
oDiv.innerHTML = '
' ;
@@ -164,10 +166,10 @@
}
// Create the Row and the Cell for the "More Colors..." button.
- var oCell = oTable.insertRow(-1).insertCell(-1) ;
+ oCell = oTable.insertRow(-1).insertCell(-1) ;
oCell.colSpan = 8 ;
- var oDiv = oCell.appendChild( CreateSelectionDiv() ) ;
+ oDiv = oCell.appendChild( CreateSelectionDiv() ) ;
oDiv.innerHTML = '
' + FCKLang.ColorMoreColors + '
' ;
oDiv.Command = this ;
Index: lams_central/web/fckeditor/editor/_source/globals/fck_constants.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/globals/fck_constants.js (.../fck_constants.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/globals/fck_constants.js (.../fck_constants.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_constants.js
* Defines some constants used by the editor. These constants are also
* globally available in the page where the editor is placed.
@@ -17,23 +19,23 @@
*/
// Editor Instance Status.
-FCK_STATUS_NOTLOADED = window.parent.FCK_STATUS_NOTLOADED = 0 ;
-FCK_STATUS_ACTIVE = window.parent.FCK_STATUS_ACTIVE = 1 ;
-FCK_STATUS_COMPLETE = window.parent.FCK_STATUS_COMPLETE = 2 ;
+var FCK_STATUS_NOTLOADED = window.parent.FCK_STATUS_NOTLOADED = 0 ;
+var FCK_STATUS_ACTIVE = window.parent.FCK_STATUS_ACTIVE = 1 ;
+var FCK_STATUS_COMPLETE = window.parent.FCK_STATUS_COMPLETE = 2 ;
// Tristate Operations.
-FCK_TRISTATE_OFF = window.parent.FCK_TRISTATE_OFF = 0 ;
-FCK_TRISTATE_ON = window.parent.FCK_TRISTATE_ON = 1 ;
-FCK_TRISTATE_DISABLED = window.parent.FCK_TRISTATE_DISABLED = -1 ;
+var FCK_TRISTATE_OFF = window.parent.FCK_TRISTATE_OFF = 0 ;
+var FCK_TRISTATE_ON = window.parent.FCK_TRISTATE_ON = 1 ;
+var FCK_TRISTATE_DISABLED = window.parent.FCK_TRISTATE_DISABLED = -1 ;
// For unknown values.
-FCK_UNKNOWN = window.parent.FCK_UNKNOWN = -1000 ;
+var FCK_UNKNOWN = window.parent.FCK_UNKNOWN = -1000 ;
// Toolbar Items Style.
-FCK_TOOLBARITEM_ONLYICON = window.parent.FCK_TOOLBARITEM_ONLYTEXT = 0 ;
-FCK_TOOLBARITEM_ONLYTEXT = window.parent.FCK_TOOLBARITEM_ONLYTEXT = 1 ;
-FCK_TOOLBARITEM_ICONTEXT = window.parent.FCK_TOOLBARITEM_ONLYTEXT = 2 ;
+var FCK_TOOLBARITEM_ONLYICON = window.parent.FCK_TOOLBARITEM_ONLYICON = 0 ;
+var FCK_TOOLBARITEM_ONLYTEXT = window.parent.FCK_TOOLBARITEM_ONLYTEXT = 1 ;
+var FCK_TOOLBARITEM_ICONTEXT = window.parent.FCK_TOOLBARITEM_ICONTEXT = 2 ;
// Edit Mode
-FCK_EDITMODE_WYSIWYG = window.parent.FCK_EDITMODE_WYSIWYG = 0 ;
-FCK_EDITMODE_SOURCE = window.parent.FCK_EDITMODE_SOURCE = 1 ;
\ No newline at end of file
+var FCK_EDITMODE_WYSIWYG = window.parent.FCK_EDITMODE_WYSIWYG = 0 ;
+var FCK_EDITMODE_SOURCE = window.parent.FCK_EDITMODE_SOURCE = 1 ;
\ No newline at end of file
Index: lams_central/web/fckeditor/editor/_source/globals/fckeditorapi.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/globals/fckeditorapi.js (.../fckeditorapi.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/globals/fckeditorapi.js (.../fckeditorapi.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckeditorapi.js
* Create the FCKeditorAPI object that is available as a global object in
* the page where the editor is placed in.
@@ -30,7 +32,7 @@
FCKeditorAPI.__Instances = new Object() ;
// Set the current version.
- FCKeditorAPI.Version = '2.0' ;
+ FCKeditorAPI.Version = '2.1.1' ;
// Function used to get a instance of an existing editor present in the
// page.
Index: lams_central/web/fckeditor/editor/_source/internals/fck.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fck.js (.../fck.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fck.js (.../fck.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck.js
* Creation and initialization of the "FCK" object. This is the main object
* that represents an editor instance.
@@ -26,10 +28,13 @@
// There is a bug on IE... getElementById returns any META tag that has the
// name set to the ID you are looking for. So the best way in to get the array
// by names and look for the correct one.
+// As ASP.Net generates a ID that is different from the Name, we must also
+// look for the field based on the ID.
var aElements = window.parent.document.getElementsByName( FCK.Name ) ;
+aElements[ aElements.length ] = window.parent.document.getElementById( FCK.Name ) ;
var i = 0;
-while ( FCK.LinkedField = aElements[i++] )
+while ( ( FCK.LinkedField = aElements[i++] ) )
{
if ( FCK.LinkedField.tagName == 'INPUT' || FCK.LinkedField.tagName == 'TEXTAREA' )
break ;
Index: lams_central/web/fckeditor/editor/_source/internals/fck_1.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fck_1.js (.../fck_1.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fck_1.js (.../fck_1.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_1.js
* This is the first part of the "FCK" object creation. This is the main
* object that represents an editor instance.
@@ -31,8 +33,8 @@
// The Base Path of the editor is saved to rebuild relative URL (IE issue).
// this.BaseUrl = this.EditorDocument.location.protocol + '//' + this.EditorDocument.location.host ;
- if ( FCKBrowserInfo.IsGecko )
- this.MakeEditable() ;
+// if ( FCKBrowserInfo.IsGecko )
+// this.MakeEditable() ;
// Set the editor's startup contents
this.SetHTML( FCKTools.GetLinkedFieldValue() ) ;
@@ -160,14 +162,16 @@
// if ( FCKBrowserInfo.IsIE )
// FCK.CheckRelativeLinks() ;
+ var sXHTML ;
+
if ( FCKConfig.FullPage )
- var sXHTML = FCKXHtml.GetXHTML( this.EditorDocument.getElementsByTagName( 'html' )[0], true, format ) ;
+ sXHTML = FCKXHtml.GetXHTML( this.EditorDocument.getElementsByTagName( 'html' )[0], true, format ) ;
else
{
if ( FCKConfig.IgnoreEmptyParagraphValue && this.EditorDocument.body.innerHTML == '
' )
- var sXHTML = '' ;
+ sXHTML = '' ;
else
- var sXHTML = FCKXHtml.GetXHTML( this.EditorDocument.body, false, format ) ;
+ sXHTML = FCKXHtml.GetXHTML( this.EditorDocument.body, false, format ) ;
}
if ( bSource )
@@ -182,15 +186,17 @@
if ( FCK.XmlDeclaration && FCK.XmlDeclaration.length > 0 )
sXHTML = FCK.XmlDeclaration + '\n' + sXHTML ;
- return sXHTML ;
+ return FCKConfig.ProtectedSource.Revert( sXHTML ) ;
}
FCK.UpdateLinkedField = function()
{
if ( FCKConfig.EnableXHTML )
- FCKTools.SetLinkedFieldValue( FCK.GetXHTML( FCKConfig.FormatOutput ) ) ;
+ FCK.LinkedField.value = FCK.GetXHTML( FCKConfig.FormatOutput ) ;
else
- FCKTools.SetLinkedFieldValue( FCK.GetHTML( FCKConfig.FormatOutput ) ) ;
+ FCK.LinkedField.value = FCK.GetHTML( FCKConfig.FormatOutput ) ;
+
+ FCK.Events.FireEvent( 'OnAfterLinkedFieldUpdate' ) ;
}
FCK.ShowContextMenu = function( x, y )
@@ -220,7 +226,7 @@
FCK.OnAfterSetHTML = function()
{
var oProcessor, i = 0 ;
- while( oProcessor = FCKDocumentProcessors[i++] )
+ while( ( oProcessor = FCKDocumentProcessors[i++] ) )
oProcessor.ProcessDocument( FCK.EditorDocument ) ;
this.Events.FireEvent( 'OnAfterSetHTML' ) ;
@@ -264,6 +270,28 @@
FCKDocumentProcessors.addItem( FCKAnchorsProcessor ) ;
+// Page Breaks
+var FCKPageBreaksProcessor = new Object() ;
+FCKPageBreaksProcessor.ProcessDocument = function( document )
+{
+ var aCenters = document.getElementsByTagName( 'CENTER' ) ;
+
+ var oCenter ;
+ var i = aCenters.length - 1 ;
+ while ( i >= 0 && ( oCenter = aCenters[i--] ) )
+ {
+ if ( oCenter.style.pageBreakAfter == 'always' && oCenter.innerHTML.trim().length == 0 )
+ {
+ var oFakeImage = FCKDocumentProcessors_CreateFakeImage( 'FCK__PageBreak', oCenter.cloneNode(true) ) ;
+
+ oCenter.parentNode.insertBefore( oFakeImage, oCenter ) ;
+ oCenter.parentNode.removeChild( oCenter ) ;
+ }
+ }
+}
+
+FCKDocumentProcessors.addItem( FCKPageBreaksProcessor ) ;
+
// Flash Embeds.
var FCKFlashProcessor = new Object() ;
FCKFlashProcessor.ProcessDocument = function( document )
@@ -321,4 +349,61 @@
}
return e ;
-}
\ No newline at end of file
+}
+
+// START iCM MODIFICATIONS
+/*
+var FCKTablesProcessor = new Object() ;
+FCKTablesProcessor.ProcessDocument = function( document )
+{
+ FCKTablesProcessor.CheckTablesNesting( document ) ;
+}
+
+// Ensure that tables are not incorrectly nested within P, H1, H2, etc tags
+FCKTablesProcessor.CheckTablesNesting = function( document )
+{
+ var aTables = document.getElementsByTagName( "TABLE" ) ;
+ var oParentNode ;
+
+ for ( var i=0; i tag for the bold, italic and underline.
- this.EditorWindow.document.execCommand( 'useCSS', false, !FCKConfig.GeckoUseSPAN ) ;
+ // Tell Gecko to use or not the tag for the bold, italic and underline.
+ FCK.EditorDocument.execCommand( 'useCSS', false, !FCKConfig.GeckoUseSPAN ) ;
+ }
+ catch (e) {}
}
FCK.Focus = function()
@@ -126,8 +167,17 @@
FCK.SetHTML = function( html, forceWYSIWYG )
{
+ // Firefox can't handle correctly the editing of the STRONG and EM tags.
+ // We must replace them with B and I.
+ html = html.replace( FCKRegexLib.StrongOpener, '' ) ;
+ html = html.replace( FCKRegexLib.EmOpener, '' ) ;
+
if ( forceWYSIWYG || FCK.EditMode == FCK_EDITMODE_WYSIWYG )
{
+ html = FCKConfig.ProtectedSource.Protect( html ) ;
+
// Gecko has a lot of bugs mainly when handling editing features.
// To avoid an Aplication Exception (that closes the browser!) we
// must first write the contents with an empty body, and
@@ -138,7 +188,7 @@
{
// Add the tag to the input HTML.
if ( FCK.TempBaseTag.length > 0 && !FCKRegexLib.HasBaseTag.test( html ) )
- html = html.replace( FCKRegexLib.HeadCloser, FCK.TempBaseTag + '' ) ;
+ html = html.replace( FCKRegexLib.HeadOpener, '$&' + FCK.TempBaseTag ) ;
html = html.replace( FCKRegexLib.HeadCloser, '' ) ;
@@ -193,10 +243,9 @@
var sHtml =
'' +
'' +
- '' ;
+ '' +
+ FCK.TempBaseTag ;
- sHtml += FCK.TempBaseTag ;
-
this.EditorDocument.getElementsByTagName("HEAD")[0].innerHTML = sHtml ;
this.InitializeBehaviors() ;
@@ -208,17 +257,13 @@
// FCK.EditorDocument.designMode = 'off' ;
if ( html.length == 0 )
- FCK.EditorDocument.body.innerHTML = ' ' ;
+ FCK.EditorDocument.body.innerHTML = GECKO_BOGUS ;
else if ( FCKRegexLib.EmptyParagraph.test( html ) )
- FCK.EditorDocument.body.innerHTML = html.replace( FCKRegexLib.TagBody, '> <' ) ;
+ FCK.EditorDocument.body.innerHTML = html.replace( FCKRegexLib.TagBody, '>' + GECKO_BOGUS + '<' ) ;
else
FCK.EditorDocument.body.innerHTML = html ;
-
- // On Gecko we must set the desingMode on again after setting the BODY innerHTML.
-// FCK.EditorDocument.designMode = 'on' ;
-
- // Tell Gecko to use or not the tag for the bold, italic and underline.
- FCK.EditorDocument.execCommand( 'useCSS', false, !FCKConfig.GeckoUseSPAN ) ;
+
+ FCK.MakeEditable() ;
}
FCK.OnAfterSetHTML() ;
Index: lams_central/web/fckeditor/editor/_source/internals/fck_1_ie.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fck_1_ie.js (.../fck_1_ie.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fck_1_ie.js (.../fck_1_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_1_ie.js
* This is the first part of the "FCK" object creation. This is the main
* object that represents an editor instance.
@@ -23,31 +25,32 @@
// errors when using a differente BaseHref.
FCK._BehaviorsStyle =
'' ;
-function Doc_OnMouseDown()
+function Doc_OnMouseUp()
{
- FCK.Focus() ;
-
- FCK.EditorWindow.event.cancelBubble = true ;
- FCK.EditorWindow.event.returnValue = false ;
+ if ( FCK.EditorWindow.event.srcElement.tagName == 'HTML' )
+ {
+ FCK.Focus() ;
+ FCK.EditorWindow.event.cancelBubble = true ;
+ FCK.EditorWindow.event.returnValue = false ;
+ }
}
function Doc_OnPaste()
@@ -70,34 +73,59 @@
{
var e = FCK.EditorWindow.event ;
- if ( e.keyCode == 13 && FCKConfig.UseBROnCarriageReturn ) // ENTER
+// FCKDebug.Output( 'KeyCode: ' + e.keyCode ) ;
+
+ switch ( e.keyCode )
{
- if ( (e.ctrlKey || e.altKey || e.shiftKey) )
- return true ;
- else
- {
- // We must ignore it if we are inside a List.
- if ( FCK.EditorDocument.queryCommandState( 'InsertOrderedList' ) || FCK.EditorDocument.queryCommandState( 'InsertUnorderedList' ) )
- return true ;
+ case 13 : // ENTER
+ if ( FCKConfig.UseBROnCarriageReturn && !(e.ctrlKey || e.altKey || e.shiftKey) )
+ {
+ Doc_OnKeyDownUndo() ;
+
+ // We must ignore it if we are inside a List.
+ if ( FCK.EditorDocument.queryCommandState( 'InsertOrderedList' ) || FCK.EditorDocument.queryCommandState( 'InsertUnorderedList' ) )
+ return true ;
- // Insert the (The must be also inserted to make it work)
- FCK.InsertHtml(" ") ;
+ // Insert the (The must be also inserted to make it work)
+ FCK.InsertHtml( ' ' ) ;
- // Remove the
- var oRange = FCK.EditorDocument.selection.createRange() ;
- oRange.moveStart('character',-1) ;
- oRange.select() ;
- FCK.EditorDocument.selection.clear() ;
+ // Remove the
+ var oRange = FCK.EditorDocument.selection.createRange() ;
+ oRange.moveStart( 'character', -1 ) ;
+ oRange.select() ;
+ FCK.EditorDocument.selection.clear() ;
- return false ;
- }
+ return false ;
+ }
+ break ;
+
+ case 9 : // TAB
+ if ( FCKConfig.TabSpaces > 0 && !(e.ctrlKey || e.altKey || e.shiftKey) )
+ {
+ Doc_OnKeyDownUndo() ;
+
+ FCK.InsertHtml( window.FCKTabHTML ) ;
+ return false ;
+ }
+ break ;
+ case 90 : // Z
+ if ( e.ctrlKey && !(e.altKey || e.shiftKey) )
+ {
+ FCKUndo.Undo() ;
+ return false ;
+ }
+ break ;
+ case 89 : // Y
+ if ( e.ctrlKey && !(e.altKey || e.shiftKey) )
+ {
+ FCKUndo.Redo() ;
+ return false ;
+ }
+ break ;
}
- else if ( e.keyCode == 9 && FCKConfig.TabSpaces > 0 && !(e.ctrlKey || e.altKey || e.shiftKey) ) // TAB
- {
- FCK.InsertHtml( window.FCKTabHTML ) ;
- return false ;
- }
+ if ( !( e.keyCode >=16 && e.keyCode <= 18 ) )
+ Doc_OnKeyDownUndo() ;
return true ;
}
@@ -134,31 +162,23 @@
{
// Set the focus to the editable area when clicking in the document area.
// TODO: The cursor must be positioned at the end.
- this.EditorDocument.attachEvent( 'onmousedown', Doc_OnMouseDown ) ;
- this.EditorDocument.attachEvent( 'onmouseup', Doc_OnMouseDown ) ;
+ this.EditorDocument.attachEvent( 'onmouseup', Doc_OnMouseUp ) ;
// Intercept pasting operations
this.EditorDocument.body.attachEvent( 'onpaste', Doc_OnPaste ) ;
// Disable Right-Click and shows the context menu.
this.EditorDocument.attachEvent('oncontextmenu', Doc_OnContextMenu ) ;
- // Check if key strokes must be monitored.
- if ( FCKConfig.UseBROnCarriageReturn || FCKConfig.TabSpaces > 0 )
+ // Build the "TAB" key replacement (if necessary).
+ if ( FCKConfig.TabSpaces > 0 )
{
- // Build the "TAB" key replacement.
- if ( FCKConfig.TabSpaces > 0 )
- {
- window.FCKTabHTML = '' ;
- for ( i = 0 ; i < FCKConfig.TabSpaces ; i++ )
- window.FCKTabHTML += " " ;
- }
-
- this.EditorDocument.attachEvent("onkeydown", Doc_OnKeyDown ) ;
+ window.FCKTabHTML = '' ;
+ for ( i = 0 ; i < FCKConfig.TabSpaces ; i++ )
+ window.FCKTabHTML += " " ;
}
+ this.EditorDocument.attachEvent("onkeydown", Doc_OnKeyDown ) ;
- this.EditorDocument.attachEvent("onkeydown", Doc_OnKeyDownUndo ) ;
-
this.EditorDocument.attachEvent("ondblclick", Doc_OnDblClick ) ;
// Catch cursor movements
@@ -184,11 +204,7 @@
{
if ( forceWYSIWYG || FCK.EditMode == FCK_EDITMODE_WYSIWYG )
{
- // TODO: Wait stable version and remove the following commented lines.
- // In IE, if you do document.body.innerHTML = '' it throws a "Unknow runtime error".
- // To solve it we must add a fake (safe) tag before it, and then remove it.
- // this.EditorDocument.body.innerHTML = '
' + html.replace( FCKRegexLib.AposEntity, ''' ) ;
- // this.EditorDocument.getElementById('__fakeFCKRemove__').removeNode(true) ;
+ html = FCKConfig.ProtectedSource.Protect( html ) ;
var sHtml ;
@@ -201,7 +217,7 @@
if ( FCK.TempBaseTag.length > 0 && !FCKRegexLib.HasBaseTag.test( html ) )
sHtml += FCK.TempBaseTag ;
- sHtml = html.replace( FCKRegexLib.HeadCloser, sHtml + '' ) ;
+ sHtml = html.replace( FCKRegexLib.HeadOpener, '$&' + sHtml ) ;
}
else
{
@@ -230,13 +246,6 @@
this.EditorDocument.body.contentEditable = true ;
FCK.OnAfterSetHTML() ;
-
- // TODO: Wait stable version and remove the following commented lines.
-// this.EditorDocument.body.innerHTML = '' ;
-// if ( html && html.length > 0 )
-// this.EditorDocument.write( html ) ;
-
-// this.EditorDocument.dir = FCKConfig.ContentLangDirection ;
}
else
document.getElementById('eSourceField').value = html ;
@@ -257,4 +266,13 @@
// Inset the HTML.
oSel.createRange().pasteHTML( html ) ;
+}
+
+FCK.SetInnerHtml = function( html ) // IE Only
+{
+ var oDoc = FCK.EditorDocument ;
+ // Using the following trick, any comment in the begining of the HTML will
+ // be preserved.
+ oDoc.body.innerHTML = '
' + html ;
+ oDoc.getElementById('__fakeFCKRemove__').removeNode( true ) ;
}
\ No newline at end of file
Index: lams_central/web/fckeditor/editor/_source/internals/fck_2.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fck_2.js (.../fck_2.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fck_2.js (.../fck_2.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_2.js
* This is the second part of the "FCK" object creation. This is the main
* object that represents an editor instance.
@@ -32,6 +34,8 @@
FCK.EditorDocument.execCommand( commandName, false, commandParameter ) ;
FCK.Events.FireEvent( 'OnSelectionChange' ) ;
}
+
+ FCKUndo.SaveUndoStep() ;
}
FCK.GetNamedCommandState = function( commandName )
@@ -112,17 +116,17 @@
FCK.Preview = function()
{
- var iWidth = screen.width * 0.8 ;
- var iHeight = screen.height * 0.7 ;
- var iLeft = ( screen.width - iWidth ) / 2 ;
+ var iWidth = FCKConfig.ScreenWidth * 0.8 ;
+ var iHeight = FCKConfig.ScreenHeight * 0.7 ;
+ var iLeft = ( FCKConfig.ScreenWidth - iWidth ) / 2 ;
var oWindow = window.open( '', null, 'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' + iWidth + ',height=' + iHeight + ',left=' + iLeft ) ;
var sHTML ;
if ( FCKConfig.FullPage )
{
if ( FCK.TempBaseTag.length > 0 )
- sHTML = FCK.GetXHTML().replace( FCKRegexLib.HeadCloser, FCK.TempBaseTag + '' ) ;
+ sHTML = FCK.GetXHTML().replace( FCKRegexLib.HeadOpener, '$&' + FCK.TempBaseTag ) ;
else
sHTML = FCK.GetXHTML() ;
}
@@ -194,4 +198,5 @@
return aEls[i] ;
}
}
+ return null ;
}
Index: lams_central/web/fckeditor/editor/_source/internals/fck_2_gecko.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fck_2_gecko.js (.../fck_2_gecko.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fck_2_gecko.js (.../fck_2_gecko.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_2_gecko.js
* This is the second part of the "FCK" object creation. This is the main
* object that represents an editor instance.
@@ -36,7 +38,15 @@
Print : true,
Paste : true,
Cut : true,
- Copy : true
+ Copy : true
+ // START iCM MODIFICATIONS
+ // Include list functions so we can ensure content is wrapped
+ // with P tags if not using BRs on carriage return, etc
+ /*
+ InsertOrderedList : true,
+ InsertUnorderedList : true
+ */
+ // END iCM MODIFICATIONS
}
// ExecuteNamedCommand overload for Gecko.
@@ -48,17 +58,45 @@
FCK.EditorWindow.print() ;
break ;
case 'Paste' :
- try { if ( FCK.Paste() ) FCK._BaseExecuteNamedCommand( 'Paste' ) ; }
+ try { if ( FCK.Paste() ) FCK.ExecuteNamedCommand( 'Paste' ) ; }
catch (e) { alert( FCKLang.PasteErrorPaste ) ; }
break ;
case 'Cut' :
- try { FCK._BaseExecuteNamedCommand( 'Cut' ) ; }
+ try { FCK.ExecuteNamedCommand( 'Cut' ) ; }
catch (e) { alert( FCKLang.PasteErrorCut ) ; }
break ;
case 'Copy' :
- try { FCK._BaseExecuteNamedCommand( 'Copy' ) ; }
+ try { FCK.ExecuteNamedCommand( 'Copy' ) ; }
catch (e) { alert( FCKLang.PasteErrorCopy ) ; }
break ;
+
+ // START iCM MODIFICATIONS
+ /*
+ case 'InsertOrderedList' :
+ case 'InsertUnorderedList' :
+
+ if ( !FCKConfig.UseBROnCarriageReturn && FCK.EditorDocument.queryCommandState( commandName ) )
+ {
+ // We're in a list item which is in the same type of list as the toolbar button clicked
+ // Therefore, move the selected list item out of the list as is done on an ENTER key within
+ // an empty list item.
+ var oSel = FCK.EditorWindow.getSelection() ;
+ var oSelNode = oSel.focusNode ;
+ var oLINode = FCKTools.GetElementAscensor( oSelNode, "LI" ) ;
+ FCK.ToggleListItem( oLINode, oSelNode ) ;
+ }
+ else
+ {
+ // Let the default handler do its stuff
+ FCK.Focus() ;
+ FCK.EditorDocument.execCommand( commandName, false, commandParameter ) ;
+ }
+
+ FCK.Events.FireEvent( 'OnSelectionChange' ) ;
+ break ;
+ */
+ // END iCM MODIFICATIONS
+
default :
FCK.ExecuteNamedCommand( commandName, commandParameter ) ;
}
@@ -76,6 +114,7 @@
FCK.PasteAsPlainText() ;
return false ;
}
+/* For now, the AutoDetectPasteFromWord feature is IE only.
else if ( FCKConfig.AutoDetectPasteFromWord )
{
var sHTML = FCK.GetClipboardHTML() ;
@@ -89,6 +128,7 @@
}
}
}
+*/
else
return true ;
}
@@ -198,3 +238,232 @@
}
}
}
+
+// START iCM Modifications
+/*
+// Ensure that behaviour of the ENTER key or the list toolbar button works correctly for a list item.
+// ENTER in empty list item at top of list should result in the empty list item being
+// removed and selection being moved out of the list into a P tag above it.
+// ENTER in empty list item at bottom of list should result in the empty list item being
+// removed and selection being moved out of the list into a P tag below it.
+// ENTER in empty list item in middle of the list should result in the list being split
+// into two and the selection being moved into a P tag between the two resulting lists.
+// Clicking the list toolbar button in a list item at top of list should result in the list item's contents being
+// moved out of the list into a P tag above it.
+// Clicking the list toolbar button in a list item at the bottom of list should result in the list item's contents being
+// moved out of the list into a P tag below it.
+// Clicking the list toolbar button in a list item in the middle of the list should result in the list being split
+// into two and the list item's contents being moved into a P tag between the two resulting lists.
+FCK.ToggleListItem = function( oLINode, oSelNode )
+{
+ var oListNode = FCKTools.GetElementAscensor( oLINode, "UL,OL" ) ;
+ var oRange = FCK.EditorDocument.createRange() ;
+
+ // Create a new block element
+ var oBlockNode = FCK.EditorDocument.createElement( "P" ) ;
+ oBlockNode.innerHTML = oLINode.innerHTML ; // Transfer any list item contents
+ if ( FCKTools.NodeIsEmpty( oBlockNode ) )
+ oBlockNode.innerHTML = GECKO_BOGUS ; // Ensure it has some content, required for Gecko
+ if ( oLINode.className && oLINode.className != '' )
+ oBlockNode.className = oLINode.className ; // Transfer across any class attribute
+
+ var oCursorNode = oBlockNode ;
+
+ // Then, perform list processing and locate the point at which the new P tag is to be inserted
+ if ( oListNode.childNodes[0] == oLINode )
+ {
+ // First LI was empty so want to leave list and insert P above it
+ oListNode.removeChild( oLINode );
+ // Need to insert a new P tag (or other suitable block element) just before the list
+ oRange.setStartBefore( oListNode ) ;
+ oRange.setEndBefore( oListNode ) ;
+ }
+ else if ( oListNode.childNodes[oListNode.childNodes.length-1] == oLINode )
+ {
+ // Last LI was empty so want to leave list and insert new block element in the parent
+ oListNode.removeChild( oLINode );
+ // Need to insert a new P tag (or other suitable block element) just after the list
+ oRange.setEndAfter( oListNode ) ;
+ oRange.setStartAfter( oListNode ) ;
+ }
+ else
+ {
+ // A middle LI was empty so want to break list into two and insert the new block/text node in between them
+ oListNode = FCKTools.SplitNode( oListNode, oSelNode, 0 ) ;
+ oListNode.removeChild( oListNode.childNodes[0] ) ;
+ oRange.setStartBefore( oListNode ) ;
+ oRange.setEndBefore( oListNode ) ;
+ }
+
+ // Insert new block/text node
+ oRange.insertNode( oBlockNode ) ;
+
+ // Ensure that we don't leave empty UL/OL tags behind
+ if ( oListNode.childNodes.length == 0 )
+ oListNode.parentNode.removeChild( oListNode ) ;
+
+ // Reset cursor position to start of the new P tag's contents ready for typing
+ FCK.Selection.SetCursorPosition( oCursorNode ) ;
+}
+
+FCK.ListItemEnter = function( oLINode, oSelNode, nSelOffset )
+{
+ // Ensure that behaviour of ENTER key within an empty list element works correctly.
+ // ENTER in empty list item at top of list should result in the empty list item being
+ // removed and selection being moved out of the list into a P tag above it.
+ // ENTER in empty list item at bottom of list should result in the empty list item being
+ // removed and selection being moved out of the list into a P tag below it.
+ // ENTER in empty list item in middle of the list should result in the list being split
+ // into two and the selection being moved into a P tag between the two resulting lists.
+ if ( FCKTools.NodeIsEmpty( oLINode ) )
+ {
+ FCK.ToggleListItem( oLINode, oSelNode ) ;
+ return false ; // Job done, perform no default handling
+ }
+
+ return true ; // If non-empty list item, let default handler do its stuff
+}
+
+FCK.ListItemBackSpace = function( oSelNode, nSelOffset )
+{
+ // Ensure that behaviour of BACKSPACE key within an empty list element works correctly.
+ // BACKSPACE in empty list item at top of list should result in the empty list item being
+ // removed and selection being moved out of the list into a P tag above it.
+ // Allow the default handler to do its stuff for backspace in other list elements.
+ var oListNode = oSelNode.parentNode ;
+
+ if ( FCKTools.NodeIsEmpty( oSelNode ) && ( oListNode.childNodes[0] == oSelNode ) )
+ {
+ var oRange = FCK.EditorDocument.createRange() ;
+
+ // Create a new P element
+ var oBlockNode = FCK.EditorDocument.createElement( "P" ) ;
+ if ( FCKTools.NodeIsEmpty( oBlockNode ) )
+ oBlockNode.innerHTML = GECKO_BOGUS ; // Ensure it has some content, required for Gecko
+
+ // First LI was empty so want to leave list and insert P above it
+ oListNode.removeChild( oSelNode );
+ oRange.setStartBefore( oListNode ) ;
+ oRange.setEndBefore( oListNode ) ;
+
+ // Insert new P tag
+ oRange.insertNode( oBlockNode ) ;
+
+ // Ensure that we don't leave empty UL/OL tags behind
+ if ( oListNode.childNodes.length == 0 )
+ oListNode.parentNode.removeChild( oListNode ) ;
+
+ // Reset cursor position to start of the new P tag's contents ready for typing
+ FCK.Selection.SetCursorPosition( oBlockNode ) ;
+
+ return false ; // Job done, perform no default handling
+ }
+
+ return true ; // Let default handler do its stuff if not backspacing in an empty first LI
+}
+
+FCK.Enter = function()
+{
+ // Remove any selected content before we begin so we end up with a single selection point
+ FCK.Selection.Delete() ;
+
+ // Determine the current cursor (selection) point, the node it's within and the offset
+ // position of the cursor within that node
+ var oSel = FCK.EditorWindow.getSelection() ;
+ var nSelOffset = oSel.focusOffset;
+ var oSelNode = oSel.focusNode ;
+
+ // Guard against a null focus node.
+ if ( !oSelNode )
+ return false ;
+
+ var oLINode = FCKTools.GetElementAscensor( oSelNode, "LI" ) ;
+
+ if ( oLINode ) // An LI element is selected
+ {
+ // Handle list items separately as need to handle termination of the list, etc
+ return FCK.ListItemEnter( oLINode, oSelNode, nSelOffset ) ;
+ }
+ else if ( oSelNode.nodeType == 3 ) // A TEXT node is selected
+ {
+ // Split it at the selection point and ensure both halves have a suitable enclosing block element
+ var oParentBlockNode = FCKTools.GetParentBlockNode( oSelNode ) ;
+ var oBlockNode2 = FCKTools.SplitNode( oParentBlockNode ? oParentBlockNode : FCK.EditorDocument.body, oSelNode, nSelOffset ) ;
+
+ FCK.Selection.SetCursorPosition( oBlockNode2 );
+
+ return false ;
+ }
+ else // An ELEMENT node is selected
+ {
+ // Cater for ENTER being pressed after very last element in the editor e.g. pressing ENTER after table element at very end of the editor's content
+ if ( nSelOffset >= oSelNode.childNodes.length )
+ {
+ var oBlockNode = FCK.EditorDocument.createElement( "P" ) ;
+ if ( FCKTools.NodeIsEmpty( oBlockNode ) )
+ oBlockNode.innerHTML = GECKO_BOGUS ; // Ensure it has some content, required for Gecko
+ oSelNode.appendChild( oBlockNode ) ;
+ FCK.Selection.SetCursorPosition( oBlockNode ) ;
+ return false ;
+ }
+
+ var oBlockNode2 = FCKTools.SplitNode( oSelNode, oSelNode.childNodes[nSelOffset] ) ;
+
+ FCK.Selection.SetCursorPosition( oBlockNode2 );
+
+ return false ;
+ }
+
+ return true ;
+}
+
+FCK.BackSpace = function()
+{
+ var oSel = FCK.EditorWindow.getSelection() ;
+ var oSelNode = oSel.focusNode ;
+ var nSelOffset = oSel.focusOffset;
+ var oParentNode = null ;
+
+ // Guard against a null focus node.
+ if ( !oSelNode )
+ return false ;
+
+ if ( oSelNode.nodeName.toUpperCase() == "LI" ) // An LI element is selected
+ {
+ // Handle list items separately as need to handle termination of the list, etc
+ return FCK.ListItemBackSpace( oSelNode, nSelOffset ) ;
+ }
+ else
+ {
+ // If we are anything other than a TEXT node, move to the child indicated by the selection offset
+ if ( oSelNode.nodeType != 3 )
+ {
+ oSelNode = oSelNode.childNodes[nSelOffset] ;
+ nSelOffset = 0 ;
+ }
+
+ // If we are the first child and the previous sibling of the parent is an empty block element (containing nothing or just the filler element)
+ // want the backspace to completely remove the empty block element
+ if ( !oSelNode.previousSibling && nSelOffset <= 0 )
+ {
+ oParentNode = oSelNode.parentNode ;
+
+ if ( oParentNode && oParentNode.previousSibling && FCKRegexLib.BlockElements.test( oParentNode.previousSibling.nodeName ) )
+ {
+ if ( FCKTools.NodeIsEmpty( oParentNode.previousSibling ) )
+ {
+ var oRange = FCK.EditorDocument.createRange() ;
+ oRange.selectNode ( oParentNode.previousSibling );
+ oRange.deleteContents() ;
+
+ // Don't do any default processing
+ return false ;
+ }
+ }
+ }
+ }
+ return true ; // Let default processing do its stuff
+}
+*/
+// END iCM Modifications
+
Index: lams_central/web/fckeditor/editor/_source/internals/fck_2_ie.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fck_2_ie.js (.../fck_2_ie.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fck_2_ie.js (.../fck_2_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_2_ie.js
* This is the second part of the "FCK" object creation. This is the main
* object that represents an editor instance.
Index: lams_central/web/fckeditor/editor/_source/internals/fck_last.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fck_last.js (.../fck_last.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fck_last.js (.../fck_last.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_last.js
* These are the last script lines executed in the editor loading process.
*
@@ -25,6 +27,18 @@
if ( FCKConfig.ForcePasteAsPlainText )
FCK.Events.AttachEvent( "OnPaste", FCK.Paste ) ;
+// START iCM Modifications
+// Override default ENTER key handler for Gecko/Mozilla so
+// it acts more like IE browsers.
+/*
+if ( FCKBrowserInfo.IsGecko && !FCKConfig.UseBROnCarriageReturn )
+{
+ FCK.Events.AttachEvent( "OnEnter", FCK.Enter ) ;
+ FCK.Events.AttachEvent( "OnBackSpace", FCK.BackSpace ) ;
+}
+*/
+// END iCM Modifications
+
// Load Plugins.
if ( FCKPlugins.ItemsCount > 0 )
{
Index: lams_central/web/fckeditor/editor/_source/internals/fck_onload.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fck_onload.js (.../fck_onload.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fck_onload.js (.../fck_onload.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_onload.js
* This is the script that is called when the editor page is loaded inside
* its IFRAME. It's the editor startup.
@@ -62,10 +64,10 @@
var d, e ;
var j = 0 ;
- while ( d = aCleanupDocs[j++] )
+ while ( ( d = aCleanupDocs[j++] ) )
{
var i = 0 ;
- while ( e = d.getElementsByTagName("DIV").item(i++) )
+ while ( ( e = d.getElementsByTagName("DIV").item(i++) ) )
{
if ( e.FCKToolbarButton )
e.FCKToolbarButton = null ;
@@ -78,7 +80,7 @@
}
i = 0 ;
- while ( e = d.getElementsByTagName("TR").item(i++) )
+ while ( ( e = d.getElementsByTagName("TR").item(i++) ) )
{
if ( e.FCKContextMenuItem )
e.FCKContextMenuItem = null ;
@@ -176,22 +178,19 @@
// @Packager.Compactor.Remove.Start
var sSuffix = FCKBrowserInfo.IsIE ? 'ie' : 'gecko' ;
- with ( FCKScriptLoader )
- {
- AddScript( '_source/internals/fckdebug.js' ) ;
- AddScript( '_source/internals/fcktools.js' ) ;
- AddScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
- AddScript( '_source/internals/fckregexlib.js' ) ;
- AddScript( '_source/internals/fcklanguagemanager.js' ) ;
- AddScript( '_source/classes/fckevents.js' ) ;
- AddScript( '_source/internals/fckxhtmlentities.js' ) ;
- AddScript( '_source/internals/fckxhtml.js' ) ;
- AddScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;
- AddScript( '_source/internals/fckcodeformatter.js' ) ;
- AddScript( '_source/internals/fckundo_' + sSuffix + '.js' ) ;
- AddScript( '_source/internals/fck_1.js' ) ;
- AddScript( '_source/internals/fck_1_' + sSuffix + '.js' ) ;
- }
+ FCKScriptLoader.AddScript( '_source/internals/fckdebug.js' ) ;
+ FCKScriptLoader.AddScript( '_source/internals/fcktools.js' ) ;
+ FCKScriptLoader.AddScript( '_source/internals/fcktools_' + sSuffix + '.js' ) ;
+ FCKScriptLoader.AddScript( '_source/internals/fckregexlib.js' ) ;
+ FCKScriptLoader.AddScript( '_source/internals/fcklanguagemanager.js' ) ;
+ FCKScriptLoader.AddScript( '_source/classes/fckevents.js' ) ;
+ FCKScriptLoader.AddScript( '_source/internals/fckxhtmlentities.js' ) ;
+ FCKScriptLoader.AddScript( '_source/internals/fckxhtml.js' ) ;
+ FCKScriptLoader.AddScript( '_source/internals/fckxhtml_' + sSuffix + '.js' ) ;
+ FCKScriptLoader.AddScript( '_source/internals/fckcodeformatter.js' ) ;
+ FCKScriptLoader.AddScript( '_source/internals/fckundo_' + sSuffix + '.js' ) ;
+ FCKScriptLoader.AddScript( '_source/internals/fck_1.js' ) ;
+ FCKScriptLoader.AddScript( '_source/internals/fck_1_' + sSuffix + '.js' ) ;
// @Packager.Compactor.Remove.End
/* @Packager.Compactor.RemoveLine
Index: lams_central/web/fckeditor/editor/_source/internals/fckbrowserinfo.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckbrowserinfo.js (.../fckbrowserinfo.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fckbrowserinfo.js (.../fckbrowserinfo.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckbrowserinfo.js
* Defines the FCKBrowserInfo object that hold some browser informations.
*
Index: lams_central/web/fckeditor/editor/_source/internals/fckcodeformatter.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckcodeformatter.js (.../fckcodeformatter.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckcodeformatter.js (.../fckcodeformatter.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckcodeformatter.js
* Format the HTML.
*
Index: lams_central/web/fckeditor/editor/_source/internals/fckcommands.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckcommands.js (.../fckcommands.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fckcommands.js (.../fckcommands.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckcommands.js
* Define all commands available in the editor.
*
@@ -62,6 +64,7 @@
case 'Preview' : oCommand = new FCKPreviewCommand() ; break ;
case 'Save' : oCommand = new FCKSaveCommand() ; break ;
case 'NewPage' : oCommand = new FCKNewPageCommand() ; break ;
+ case 'PageBreak' : oCommand = new FCKPageBreakCommand() ; break ;
case 'TextColor' : oCommand = new FCKTextColorCommand('ForeColor') ; break ;
case 'BGColor' : oCommand = new FCKTextColorCommand('BackColor') ; break ;
@@ -103,7 +106,7 @@
else
{
alert( FCKLang.UnknownCommand.replace( /%1/g, commandName ) ) ;
- return ;
+ return null ;
}
}
Index: lams_central/web/fckeditor/editor/_source/internals/fckconfig.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckconfig.js (.../fckconfig.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckconfig.js (.../fckconfig.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckconfig.js
* Creates and initializes the FCKConfig object.
*
@@ -32,6 +34,19 @@
FCKConfig.EditorPath = FCKConfig.BasePath.replace( /editor\/$/, '' ) ;
+// There is a bug in Gecko. If the editor is hidden on startup, an error is
+// thrown when trying to get the screen dimentions.
+try
+{
+ FCKConfig.ScreenWidth = screen.width ;
+ FCKConfig.ScreenHeight = screen.height ;
+}
+catch (e)
+{
+ FCKConfig.ScreenWidth = 800 ;
+ FCKConfig.ScreenHeight = 600 ;
+}
+
// Override the actual configuration values with the values passed throw the
// hidden field "___Config".
FCKConfig.ProcessHiddenField = function()
@@ -88,4 +103,48 @@
FCKConfig.Plugins.Add = function( name, langs, path )
{
FCKConfig.Plugins.Items.addItem( [name, langs, path] ) ;
-}
\ No newline at end of file
+}
+
+// FCKConfig.ProtectedSource: object that holds a collection of Regular
+// Expressions that defined parts of the raw HTML that must remain untouched
+// like custom tags, scripts, server side code, etc...
+FCKConfig.ProtectedSource = new Object() ;
+FCKConfig.ProtectedSource.RegexEntries = new Array() ;
+
+FCKConfig.ProtectedSource.Add = function( regexPattern )
+{
+ this.RegexEntries.addItem( regexPattern ) ;
+}
+
+FCKConfig.ProtectedSource.Protect = function( html )
+{
+ function _Replace( protectedSource )
+ {
+ var index = FCKTempBin.AddElement( protectedSource ) ;
+ return '' ;
+ }
+
+ for ( var i = 0 ; i < this.RegexEntries.length ; i++ )
+ {
+ html = html.replace( this.RegexEntries[i], _Replace ) ;
+ }
+
+ return html ;
+}
+
+
+FCKConfig.ProtectedSource.Revert = function( html, clearBin )
+{
+ function _Replace( m, opener, index )
+ {
+ var protectedValue = clearBin ? FCKTempBin.RemoveElement( index ) : FCKTempBin.Elements[ index ] ;
+ // There could be protected source inside another one.
+ return FCKConfig.ProtectedSource.Revert( protectedValue, clearBin ) ;
+ }
+
+ return html.replace( /(<|<)!--\{PS..(\d+)\}--(>|>)/g, _Replace ) ;
+}
+
+// First of any other protection, we must protect all comments to avoid
+// loosing them (of course, IE related).
+FCKConfig.ProtectedSource.Add( //g ) ;
\ No newline at end of file
Index: lams_central/web/fckeditor/editor/_source/internals/fckcontextmenu.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckcontextmenu.js (.../fckcontextmenu.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fckcontextmenu.js (.../fckcontextmenu.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckcontextmenu.js
* Defines the FCKContextMenu object that is responsible for all
* Context Menu operations.
@@ -60,46 +62,40 @@
case 'Generic' :
// Generic items that are always available.
oGroup = new FCKContextMenuGroup() ;
- with ( oGroup )
- {
- Add( new FCKContextMenuItem( this, 'Cut' , FCKLang.Cut , true ) ) ;
- Add( new FCKContextMenuItem( this, 'Copy' , FCKLang.Copy , true ) ) ;
- Add( new FCKContextMenuItem( this, 'Paste' , FCKLang.Paste , true ) ) ;
- }
+ oGroup.Add( new FCKContextMenuItem( this, 'Cut' , FCKLang.Cut , true ) ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'Copy' , FCKLang.Copy , true ) ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'Paste' , FCKLang.Paste , true ) ) ;
+
break ;
case 'Link' :
oGroup = new FCKContextMenuGroup() ;
- with ( oGroup )
- {
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'Link' , FCKLang.EditLink , true ) ) ;
- Add( new FCKContextMenuItem( this, 'Unlink' , FCKLang.RemoveLink, true ) ) ;
- }
+ oGroup.Add( new FCKContextMenuSeparator() ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'Link' , FCKLang.EditLink , true ) ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'Unlink' , FCKLang.RemoveLink, true ) ) ;
+
break ;
case 'TableCell' :
oGroup = new FCKContextMenuGroup() ;
- with ( oGroup )
- {
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'TableInsertRow' , FCKLang.InsertRow, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableDeleteRows' , FCKLang.DeleteRows, true ) ) ;
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'TableInsertColumn' , FCKLang.InsertColumn, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableDeleteColumns' , FCKLang.DeleteColumns, true ) ) ;
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'TableInsertCell' , FCKLang.InsertCell, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableDeleteCells' , FCKLang.DeleteCells, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableMergeCells' , FCKLang.MergeCells, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableSplitCell' , FCKLang.SplitCell, true ) ) ;
- Add( new FCKContextMenuSeparator() ) ;
- Add( new FCKContextMenuItem( this, 'TableCellProp' , FCKLang.CellProperties, true ) ) ;
- Add( new FCKContextMenuItem( this, 'TableProp' , FCKLang.TableProperties, true ) ) ;
- }
+ oGroup.Add( new FCKContextMenuSeparator() ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'TableInsertRow' , FCKLang.InsertRow, true ) ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'TableDeleteRows' , FCKLang.DeleteRows, true ) ) ;
+ oGroup.Add( new FCKContextMenuSeparator() ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'TableInsertColumn' , FCKLang.InsertColumn, true ) ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'TableDeleteColumns' , FCKLang.DeleteColumns, true ) ) ;
+ oGroup.Add( new FCKContextMenuSeparator() ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'TableInsertCell' , FCKLang.InsertCell, true ) ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'TableDeleteCells' , FCKLang.DeleteCells, true ) ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'TableMergeCells' , FCKLang.MergeCells, true ) ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'TableSplitCell' , FCKLang.SplitCell, true ) ) ;
+ oGroup.Add( new FCKContextMenuSeparator() ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'TableCellProp' , FCKLang.CellProperties, true ) ) ;
+ oGroup.Add( new FCKContextMenuItem( this, 'TableProp' , FCKLang.TableProperties, true ) ) ;
+
break ;
case 'Table' :
@@ -158,20 +154,19 @@
var sTagName ;
if ( oTag )
- {
sTagName = oTag.tagName ;
- }
// Set items visibility.
// var bIsAnchor = ( sTagName == 'A' && oTag.name.length > 0 && oTag.href.length == 0 ) ;
- if ( this.Groups['Link'] ) this.Groups['Link'].SetVisible( /*!bIsAnchor &&*/ FCK.GetNamedCommandState( 'Unlink' ) != FCK_TRISTATE_DISABLED ) ;
+// if ( this.Groups['Link'] ) this.Groups['Link'].SetVisible( !bIsAnchor && FCK.GetNamedCommandState( 'Unlink' ) != FCK_TRISTATE_DISABLED ) ;
+ if ( this.Groups['Link'] ) this.Groups['Link'].SetVisible( FCK.GetNamedCommandState( 'Unlink' ) != FCK_TRISTATE_DISABLED ) ;
if ( this.Groups['TableCell'] ) this.Groups['TableCell'].SetVisible( sTagName != 'TABLE' && FCKSelection.HasAncestorNode('TABLE') ) ;
if ( this.Groups['Table'] ) this.Groups['Table'].SetVisible( sTagName == 'TABLE' ) ;
- if ( this.Groups['Image'] ) this.Groups['Image'].SetVisible( sTagName == 'IMG' && !oTag.getAttribute('_fckflash') && !oTag.getAttribute('_fckanchor') ) ;
+ if ( this.Groups['Image'] ) this.Groups['Image'].SetVisible( sTagName == 'IMG' && !oTag.getAttribute('_fckfakelement') ) ;
if ( this.Groups['Flash'] ) this.Groups['Flash'].SetVisible( sTagName == 'IMG' && oTag.getAttribute('_fckflash') ) ;
if ( this.Groups['Anchor'] ) this.Groups['Anchor'].SetVisible( sTagName == 'IMG' && oTag.getAttribute('_fckanchor') ) ;
Index: lams_central/web/fckeditor/editor/_source/internals/fckcontextmenu_gecko.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckcontextmenu_gecko.js (.../fckcontextmenu_gecko.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckcontextmenu_gecko.js (.../fckcontextmenu_gecko.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckcontextmenu_gecko.js
* Context Menu operations. (Gecko specific implementations)
*
Index: lams_central/web/fckeditor/editor/_source/internals/fckcontextmenu_ie.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckcontextmenu_ie.js (.../fckcontextmenu_ie.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckcontextmenu_ie.js (.../fckcontextmenu_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckcontextmenu_ie.js
* Context Menu operations. (IE specific implementations)
*
Index: lams_central/web/fckeditor/editor/_source/internals/fckcoreextensions.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckcoreextensions.js (.../fckcoreextensions.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fckcoreextensions.js (.../fckcoreextensions.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckcoreextensions.js
* Some extensions to the Javascript Core.
*
Index: lams_central/web/fckeditor/editor/_source/internals/fckdebug.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckdebug.js (.../fckdebug.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckdebug.js (.../fckdebug.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckdebug.js
* Debug window control and operations.
*
Index: lams_central/web/fckeditor/editor/_source/internals/fckdialog.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckdialog.js (.../fckdialog.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fckdialog.js (.../fckdialog.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckdialog.js
* Dialog windows operations.
*
Index: lams_central/web/fckeditor/editor/_source/internals/fckdialog_gecko.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckdialog_gecko.js (.../fckdialog_gecko.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fckdialog_gecko.js (.../fckdialog_gecko.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckdialog_gecko.js
* Dialog windows operations. (Gecko specific implementations)
*
@@ -17,8 +19,8 @@
FCKDialog.Show = function( dialogInfo, dialogName, pageUrl, dialogWidth, dialogHeight, parentWindow, resizable )
{
- var iTop = (screen.height - dialogHeight) / 2 ;
- var iLeft = (screen.width - dialogWidth) / 2 ;
+ var iTop = (FCKConfig.ScreenHeight - dialogHeight) / 2 ;
+ var iLeft = (FCKConfig.ScreenWidth - dialogWidth) / 2 ;
var sOption = "location=no,menubar=no,toolbar=no,dependent=yes,dialog=yes,minimizable=no,modal=yes,alwaysRaised=yes" +
",resizable=" + ( resizable ? 'yes' : 'no' ) +
@@ -65,13 +67,10 @@
// It is strange, but we have to check the FCKDialog existence to avoid a
// random error: "FCKDialog is not defined".
if ( typeof( FCKDialog ) != "object" )
- return ;
+ return false ;
if ( FCKDialog.Window && !FCKDialog.Window.closed )
- {
FCKDialog.Window.focus() ;
- return false ;
- }
else
{
// Try/Catch must be used to avoit an error when using a frameset
@@ -88,4 +87,5 @@
catch (e)
{}
}
+ return false ;
}
Index: lams_central/web/fckeditor/editor/_source/internals/fckdialog_ie.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckdialog_ie.js (.../fckdialog_ie.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckdialog_ie.js (.../fckdialog_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckdialog_ie.js
* Dialog windows operations. (IE specific implementations)
*
Index: lams_central/web/fckeditor/editor/_source/internals/fcklanguagemanager.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fcklanguagemanager.js (.../fcklanguagemanager.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fcklanguagemanager.js (.../fcklanguagemanager.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcklanguagemanager.js
* Defines the FCKLanguageManager object that is used for language
* operations.
@@ -55,17 +57,17 @@
FCKLanguageManager.TranslateElements = function( targetDocument, tag, propertyToSet )
{
- var aInputs = targetDocument.getElementsByTagName(tag) ;
+ var e = targetDocument.getElementsByTagName(tag) ;
- for ( var i = 0 ; i < aInputs.length ; i++ )
+ for ( var i = 0 ; i < e.length ; i++ )
{
- var sKey = aInputs[i].getAttribute( 'fckLang' ) ;
+ var sKey = e[i].getAttribute( 'fckLang' ) ;
if ( sKey )
{
var s = FCKLang[ sKey ] ;
if ( s )
- eval( 'aInputs[i].' + propertyToSet + ' = s' ) ;
+ eval( 'e[i].' + propertyToSet + ' = s' ) ;
}
}
}
Index: lams_central/web/fckeditor/editor/_source/internals/fcknamespace.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fcknamespace.js (.../fcknamespace.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fcknamespace.js (.../fcknamespace.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcknamespace.js
* This file declares the namespace (object holder) where the common editor
* objects and classes are defined.
Index: lams_central/web/fckeditor/editor/_source/internals/fckplugins.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckplugins.js (.../fckplugins.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckplugins.js (.../fckplugins.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckplugins.js
* Defines the FCKPlugins object that is responsible for loading the Plugins.
*
Index: lams_central/web/fckeditor/editor/_source/internals/fckregexlib.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckregexlib.js (.../fckregexlib.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fckregexlib.js (.../fckregexlib.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckregexlib.js
* These are some Regular Expresions used by the editor.
*
@@ -23,7 +25,13 @@
// Used by the Styles combo to identify styles that can't be applied to text.
FCKRegexLib.ObjectElements = /^(?:IMG|TABLE|TR|TD|INPUT|SELECT|TEXTAREA|HR|OBJECT)$/i ;
+// START iCM MODIFICATIONS
+// Added TABLE and CAPTION to the block elements for ENTER key handling
// Block Elements.
+/*
+FCKRegexLib.BlockElements = /^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TD|TABLE|CAPTION)$/i ;
+*/
+// END iCM MODIFICATIONS
FCKRegexLib.BlockElements = /^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|TD)$/i ;
// Elements marked as empty "Empty" in the XHTML DTD.
@@ -42,6 +50,7 @@
FCKRegexLib.HasBaseTag = /]*>/i ;
FCKRegexLib.HeadCloser = /<\/head\s*>/i ;
FCKRegexLib.TableBorderClass = /\s*FCK__ShowTableBorders\s*/ ;
@@ -57,4 +66,27 @@
FCKRegexLib.EmptyParagraph = /^<(p|div)>\s*<\/\1>$/i ;
-FCKRegexLib.TagBody = /> ;
\ No newline at end of file
+FCKRegexLib.TagBody = /> ;
+
+// START iCM MODIFICATIONS
+/*
+// HTML table cell elements
+FCKRegexLib.TableCellElements = /^(?:TD|TH)$/i ;
+// Block elements that can themselves contain block elements - used within the FCKTools.SplitNode
+// function. I know BODY isn't really a block element but means can do the check in one hit.
+FCKRegexLib.SpecialBlockElements = /^(?:BODY|TH|TD|CAPTION)$/i ;
+// Block elements that can validly contain a nested table. Ditto above for the BODY entry.
+FCKRegexLib.TableBlockElements = /^(?:BODY|DIV|LI|TD|TH)$/i ;
+// List elements
+FCKRegexLib.ListElements = /^(?:OL|UL)$/i ;
+// Used to remove empty tags after the split process used on ENTER key press
+FCKRegexLib.EmptyElement = /<(P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|SPAN|A)[^\>]*>\s*<\/\1>/gi ;
+*/
+// END iCM MODIFICATIONS
+
+FCKRegexLib.StrongOpener = /])/gi ;
+FCKRegexLib.StrongCloser = /<\/STRONG>/gi ;
+FCKRegexLib.EmOpener = /])/gi ;
+FCKRegexLib.EmCloser = /<\/EM>/gi ;
+
+FCKRegexLib.GeckoEntitiesMarker = /#\?-\:/g ;
Index: lams_central/web/fckeditor/editor/_source/internals/fckscriptloader.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckscriptloader.js (.../fckscriptloader.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fckscriptloader.js (.../fckscriptloader.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckscriptloader.js
* Defines the FCKScriptLoader object that is used to dynamically load
* scripts in the editor.
Index: lams_central/web/fckeditor/editor/_source/internals/fckselection.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckselection.js (.../fckselection.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckselection.js (.../fckselection.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckselection.js
* Active selection functions.
*
Index: lams_central/web/fckeditor/editor/_source/internals/fckselection_gecko.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckselection_gecko.js (.../fckselection_gecko.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckselection_gecko.js (.../fckselection_gecko.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckselection_gecko.js
* Active selection functions. (Gecko specific implementation)
*
@@ -99,7 +101,7 @@
while ( oContainer )
{
- if ( oContainer.tagName == nodeTagName ) return true ;
+ if ( oContainer.nodeType == 1 && oContainer.tagName == nodeTagName ) return true ;
oContainer = oContainer.parentNode ;
}
@@ -117,9 +119,11 @@
while ( oContainer )
{
- if ( oContainer.tagName == nodeTagName ) return oContainer ;
+ if ( oContainer.tagName == nodeTagName )
+ return oContainer ;
oContainer = oContainer.parentNode ;
}
+ return null ;
}
FCKSelection.Delete = function()
@@ -134,4 +138,27 @@
}
return oSel ;
-}
\ No newline at end of file
+}
+// START iCM MODIFICATIONS
+/*
+// Move the cursor position (the selection point) to a specific offset within a specific node
+// If no offset specified, the start of the node is assumed
+FCKSelection.SetCursorPosition = function ( oNode, nOffset )
+{
+ if ( typeof nOffset == "undefined" ) nOffset = 0 ;
+
+ var oSel = FCK.EditorWindow.getSelection() ;
+ var oRange = FCK.EditorDocument.createRange() ;
+
+ oRange.setStart( oNode, nOffset ) ;
+ oRange.collapse( true ) ;
+
+ oSel.removeAllRanges() ;
+ oSel.addRange( oRange );
+
+ if ( oNode.scrollIntoView )
+ oNode.scrollIntoView( false );
+}
+*/
+// END iCM MODIFICATIONS
+
Index: lams_central/web/fckeditor/editor/_source/internals/fckselection_ie.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckselection_ie.js (.../fckselection_ie.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckselection_ie.js (.../fckselection_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckselection_ie.js
* Active selection functions. (IE specific implementation)
*
@@ -36,10 +38,15 @@
FCKSelection.GetParentElement = function()
{
- if ( this.GetType() == 'Control' )
- return FCKSelection.GetSelectedElement().parentElement ;
- else
- return FCK.EditorDocument.selection.createRange().parentElement() ;
+ switch ( this.GetType() )
+ {
+ case 'Control' :
+ return FCKSelection.GetSelectedElement().parentElement ;
+ case 'None' :
+ return ;
+ default :
+ return FCK.EditorDocument.selection.createRange().parentElement() ;
+ }
}
FCKSelection.SelectNode = function( node )
@@ -124,4 +131,20 @@
}
return oSel ;
-}
\ No newline at end of file
+}
+// START iCM Modifications
+/*
+// Move the cursor position (the selection point) to a specific offset within a specific node
+// If no offset specified, the start of the node is assumed
+FCKSelection.SetCursorPosition = function ( oNode, nOffset )
+{
+ if ( typeof nOffset == "undefined" ) nOffset = 0 ;
+
+ FCK.Selection.SelectNode( oNode ) ; // Doesn't handle offsets currently but offset always zero at mo
+ FCK.Selection.Collapse( true ) ;
+
+ oNode.scrollIntoView( false );
+}
+*/
+// END iCM Modifications
+
Index: lams_central/web/fckeditor/editor/_source/internals/fcktablehandler.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fcktablehandler.js (.../fcktablehandler.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fcktablehandler.js (.../fcktablehandler.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktablehandler.js
* Manage table operations.
*
@@ -71,6 +73,9 @@
{
// Get the cell where the selection is placed in.
var oCell = FCKSelection.MoveToAncestorNode("TD") ;
+ if ( !oCell )
+ oCell = FCKSelection.MoveToAncestorNode("TH") ;
+
if ( !oCell ) return ;
// Get the cell's table.
@@ -89,26 +94,19 @@
if ( oRow.cells.length < iIndex )
continue ;
- // Create the new cell element to be added.
- oCell = FCK.EditorDocument.createElement('TD') ;
+ oCell = oRow.cells[iIndex-1].cloneNode(false) ;
+
if ( FCKBrowserInfo.IsGecko )
- oCell.innerHTML = ' ' ;
-// oCell.innerHTML = ' ' ;
+ oCell.innerHTML = FCKBrowserInfo.IsGecko ? GECKO_BOGUS : '' ;
// Get the cell that is placed in the new cell place.
var oBaseCell = oRow.cells[iIndex] ;
// If the cell is available (we are not in the last cell of the row).
if ( oBaseCell )
- {
- // Insert the new cell just before of it.
- oRow.insertBefore( oCell, oBaseCell ) ;
- }
+ oRow.insertBefore( oCell, oBaseCell ) ; // Insert the new cell just before of it.
else
- {
- // Append the cell at the end of the row.
- oRow.appendChild( oCell ) ;
- }
+ oRow.appendChild( oCell ) ; // Append the cell at the end of the row.
}
}
@@ -154,7 +152,7 @@
// Create the new cell element to be added.
var oNewCell = FCK.EditorDocument.createElement("TD");
if ( FCKBrowserInfo.IsGecko )
- oNewCell.innerHTML = ' ' ;
+ oNewCell.innerHTML = GECKO_BOGUS ;
// oNewCell.innerHTML = " " ;
// If it is the last cell in the row.
@@ -264,7 +262,7 @@
FCKTableHandler._GetCellIndexSpan = function( tableMap, rowIndex, cell )
{
if ( tableMap.length < rowIndex + 1 )
- return ;
+ return null ;
var oRow = tableMap[ rowIndex ] ;
@@ -273,6 +271,8 @@
if ( oRow[c] == cell )
return c ;
}
+
+ return null ;
}
// Get the cells available in a collumn of a TableMap.
@@ -350,7 +350,7 @@
for ( var i = 0 ; i < aCells.length ; i++ )
{
if ( FCKBrowserInfo.IsGecko )
- aCells[i].innerHTML = ' ' ;
+ aCells[i].innerHTML = GECKO_BOGUS ;
else
aCells[i].innerHTML = '' ;
}
Index: lams_central/web/fckeditor/editor/_source/internals/fcktablehandler_gecko.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fcktablehandler_gecko.js (.../fcktablehandler_gecko.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fcktablehandler_gecko.js (.../fcktablehandler_gecko.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktablehandler_gecko.js
* Manage table operations (IE specific).
*
Index: lams_central/web/fckeditor/editor/_source/internals/fcktablehandler_ie.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fcktablehandler_ie.js (.../fcktablehandler_ie.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fcktablehandler_ie.js (.../fcktablehandler_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktablehandler_ie.js
* Manage table operations (IE specific).
*
Index: lams_central/web/fckeditor/editor/_source/internals/fcktoolbaritems.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fcktoolbaritems.js (.../fcktoolbaritems.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fcktoolbaritems.js (.../fcktoolbaritems.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbaritems.js
* Toolbar items definitions.
*
@@ -73,6 +75,7 @@
case 'Table' : oItem = new FCKToolbarButton( 'Table' , FCKLang.InsertTableLbl, FCKLang.InsertTable ) ; break ;
case 'SpecialChar' : oItem = new FCKToolbarButton( 'SpecialChar' , FCKLang.InsertSpecialCharLbl, FCKLang.InsertSpecialChar ) ; break ;
case 'Smiley' : oItem = new FCKToolbarButton( 'Smiley' , FCKLang.InsertSmileyLbl, FCKLang.InsertSmiley ) ; break ;
+ case 'PageBreak' : oItem = new FCKToolbarButton( 'PageBreak' , FCKLang.PageBreakLbl, FCKLang.PageBreak ) ; break ;
case 'UniversalKey' : oItem = new FCKToolbarButton( 'UniversalKey' , FCKLang.UniversalKeyboard ) ; break ;
case 'Rule' : oItem = new FCKToolbarButton( 'InsertHorizontalRule', FCKLang.InsertLineLbl, FCKLang.InsertLine, null, false, true ) ; break ;
@@ -105,7 +108,7 @@
default:
alert( FCKLang.UnknownToolbarItem.replace( /%1/g, itemName ) ) ;
- return ;
+ return null ;
}
FCKToolbarItems.LoadedItems[ itemName ] = oItem ;
Index: lams_central/web/fckeditor/editor/_source/internals/fcktoolbarset.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fcktoolbarset.js (.../fcktoolbarset.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fcktoolbarset.js (.../fcktoolbarset.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktoolbarset.js
* Defines the FCKToolbarSet object that is used to load and draw the
* toolbar.
@@ -92,7 +94,7 @@
}
else
{
- var oToolbar = new FCKToolbar() ;
+ oToolbar = new FCKToolbar() ;
for ( var j = 0 ; j < oToolbarItems.length ; j++ )
{
Index: lams_central/web/fckeditor/editor/_source/internals/fcktools.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fcktools.js (.../fcktools.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fcktools.js (.../fcktools.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktools.js
* Utility functions.
*
@@ -28,19 +30,6 @@
}
//**
-// FCKTools.SetLinkedFieldValue: Sets the value of the hidden INPUT element
-// that is associated to the editor. This element has its ID set to the
-// editor's instance name so the user reffers to the instance name when getting
-// the posted data.
-FCKTools.SetLinkedFieldValue = function( value )
-{
- if ( FCKConfig.FormatOutput )
- FCK.LinkedField.value = FCKCodeFormatter.Format( value ) ;
- else
- FCK.LinkedField.value = value ;
-}
-
-//**
// FCKTools.AttachToLinkedFieldFormSubmit: attaches a function call to the
// submit event of the linked field form. This function us generally used to
// update the linked field value before submitting the form.
@@ -183,18 +172,25 @@
return c ;
}
-FCKTools.GetElementAscensor = function( element, ascensorTagName )
+// START iCM MODIFICATIONS
+// Amended to accept a list of one or more ascensor tag names
+// Amended to check the element itself before working back up through the parent hierarchy
+FCKTools.GetElementAscensor = function( element, ascensorTagNames )
{
- var e = element.parentNode ;
+// var e = element.parentNode ;
+ var e = element ;
+ var lstTags = "," + ascensorTagNames.toUpperCase() + "," ;
while ( e )
{
- if ( e.nodeName == ascensorTagName )
+ if ( lstTags.indexOf( "," + e.nodeName.toUpperCase() + "," ) != -1 )
return e ;
e = e.parentNode ;
}
+ return null ;
}
+// END iCM MODIFICATIONS
FCKTools.Pause = function( miliseconds )
{
@@ -216,4 +212,75 @@
FCKTools.ConvertHtmlSizeToStyle = function( size )
{
return size.endsWith( '%' ) ? size : ( size + 'px' ) ;
-}
\ No newline at end of file
+}
+// START iCM MODIFICATIONS
+/*
+// Transfers the supplied attributes to the supplied node
+FCKTools.SetElementAttributes = function( oElement, oAttributes )
+{
+ for ( var i = 0; i < oAttributes.length; i++ )
+ {
+ if ( oAttributes[i].specified ) // Needed for IE which always returns all attributes whether set or not
+ oElement.setAttribute( oAttributes[i].nodeName, oAttributes[i].nodeValue, 0 ) ;
+ }
+}
+
+// Get immediate block node (P, H1, for example) for the supplied node - the supplied node may itself be a block node in which
+// case it will be returned. If no block node found, returns null.
+FCKTools.GetParentBlockNode = function( oNode )
+{
+ if ( oNode.nodeName.toUpperCase() == "BODY" )
+ return null ;
+ else if ( oNode.nodeType == 1 && FCKRegexLib.BlockElements.test(oNode.tagName) )
+ return oNode ;
+ else
+ return FCKTools.GetParentBlockNode( oNode.parentNode ) ;
+}
+
+// Run through any children of the supplied node. If there are none, or they only comprise
+// empty text nodes and BR nodes, then the node is effectively empty.
+// Sometimes (on Gecko) a seemingly empty node is coming back with several children that are solely
+// empty text nodes and BRs e.g. the first item in an OL list, for example, when
+// UseBROnCarriageReturn is set to false.
+// Seems to be due to the use of the (GECKO_BOGUS) as fillers both
+// in fck_gecko_1.js when html is empty and in ENTER key handler ? If normal BR tags are
+// used instead this doesn't seem to happen....
+FCKTools.NodeIsEmpty = function( oNode )
+{
+ var oSibling = oNode.childNodes[0] ;
+ while ( oSibling )
+ {
+ if ( ( oSibling.nodeType != 1 && oSibling.nodeType != 3 ) || ( oSibling.nodeType == 1 && oSibling.nodeName.toUpperCase() != "BR" ) || ( oSibling.nodeType == 3 && oSibling.nodeValue && oSibling.nodeValue.trim() != '' ) )
+ return false ;
+
+ oSibling = oSibling.nextSibling ;
+ }
+
+ return true ;
+}
+
+// Returns a document fragment that contains a copy of the specified range of nodes
+FCKTools.GetDocumentFragment = function( oParentNode, oFromNode, oToNode, bIncludeFromNode, bIncludeToNode, bClone )
+{
+ if ( typeof bIncludeFromNode == "undefined" ) bIncludeFromNode = true ;
+ if ( typeof bIncludeToNode == "undefined" ) bIncludeToNode = true ;
+ if ( typeof bClone == "undefined" ) bClone = true ;
+
+ var oFragment = FCK.EditorDocument.createDocumentFragment() ;
+
+ var oNode = oFromNode ;
+ while ( oNode && oNode != oToNode )
+ {
+ if ( oNode != oFromNode || bIncludeFromNode )
+ oFragment.appendChild( bClone ? oNode.cloneNode( true ) : oNode ) ;
+
+ oNode = oNode.nextSibling ;
+ }
+
+ if ( oNode && (oFromNode != oToNode && bIncludeToNode) )
+ oFragment.appendChild( bClone ? oNode.cloneNode( true ) : oNode ) ; // Include To Node
+
+ return oFragment ;
+}
+*/
+// END iCM MODIFICATIONS
Index: lams_central/web/fckeditor/editor/_source/internals/fcktools_gecko.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fcktools_gecko.js (.../fcktools_gecko.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fcktools_gecko.js (.../fcktools_gecko.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,13 +8,18 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktools_gecko.js
* Utility functions. (Gecko version).
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
+// Constant for the Gecko Bogus Node.
+var GECKO_BOGUS = ' ' ;
+
// Appends a CSS file to a document.
FCKTools.AppendStyleSheet = function( documentElement, cssFileUrl )
{
@@ -83,4 +88,167 @@
case 'DOMDocument' :
return document.implementation.createDocument( '', '', null ) ;
}
-}
\ No newline at end of file
+ return null ;
+}
+// START iCM Modifications
+/*
+// Starting at the specified node, find the first inline node of the sequence
+// For example, assume we have the following elements :
Some text some more text and some link yet some more text
+// If the "some link" text node is the one specified, then the "Some text" text node will be the first inline node returned.
+FCKTools.GetFirstInlineNode = function( oNode )
+{
+ if ( FCKRegexLib.BlockElements.test( oNode.nodeName ) )
+ return oNode ;
+ else if ( oNode.previousSibling && !FCKRegexLib.BlockElements.test( oNode.previousSibling.nodeName ) )
+ return FCKTools.GetFirstInlineNode( oNode.previousSibling ) ;
+ else if ( oNode.parentNode && !FCKRegexLib.BlockElements.test( oNode.parentNode.nodeName ) && oNode.parentNode.nodeName.toUpperCase() != "BODY" )
+ return FCKTools.GetFirstInlineNode( oNode.parentNode ) ;
+ else
+ return oNode ;
+}
+
+// Starting at the specified node, find the last inline node of the sequence
+// For example, assume we have the following elements :
Some text some more text and some link yet some more text
+// If the "some link" text node is the one specified, then the " yet some more text" text node will be the last inline node returned.
+FCKTools.GetLastInlineNode = function( oNode )
+{
+ if ( FCKRegexLib.BlockElements.test( oNode.nodeName ) )
+ return oNode ;
+ else if ( oNode.nextSibling && !FCKRegexLib.BlockElements.test( oNode.nextSibling.nodeName ) )
+ return FCKTools.GetLastInlineNode( oNode.nextSibling ) ;
+ else if ( oNode.parentNode && !FCKRegexLib.BlockElements.test( oNode.parentNode.nodeName ) && oNode.parentNode.nodeName.toUpperCase() != "BODY" )
+ return FCKTools.GetLastInlineNode( oNode.parentNode ) ;
+ else
+ return oNode ;
+}
+
+
+// Split the supplied parent at the specified child and (optionally) offset.
+// Ensure that enclosing block elements are created where missing but that existing
+// block elements (table for example) don't get incorrectly nested.
+FCKTools.SplitNode = function( oParentBlockNode, oChildNode, nOffset )
+{
+ if ( typeof nOffset == "undefined" ) nOffset = 0 ;
+
+ var oFragment = FCK.EditorDocument.createDocumentFragment() ;
+ var oRange = FCK.EditorDocument.createRange() ;
+
+ if ( FCKRegexLib.ListElements.test( oParentBlockNode.nodeName ) )
+ {
+ // Treat OL/UL parents differently as want to split at the specified
+ // child LI node to create to OL/UL lists.
+ oStartNode = oParentBlockNode.firstChild ;
+ oEndNode = oParentBlockNode.lastChild ;
+ }
+ else
+ {
+ // Locate the inline nodes adjacent to the specified child node so that these can
+ // be kept together.
+ oStartNode = FCKTools.GetFirstInlineNode( oChildNode ) ;
+ oEndNode = FCKTools.GetLastInlineNode( oChildNode ) ;
+ }
+
+ // Create a new tag which holds the content of the affected node(s) located before (but not including) the child node and offset
+ if ( FCKRegexLib.BlockElements.test( oStartNode.nodeName ) && !FCKRegexLib.ListElements.test( oParentBlockNode.nodeName ) )
+ {
+ // First element of the bunch is already a block element so we don't want to wrap it with a new block element.
+ // Just use this first node provided it is not the same as the last node (to prevent duplication), otherwise
+ // create a new empty P element.
+ if ( oStartNode != oEndNode )
+ {
+ oBlockNode1 = oStartNode.cloneNode( true ) ;
+ }
+ else
+ {
+ oBlockNode1 = FCK.EditorDocument.createElement( "P" ) ;
+ oBlockNode1.innerHTML = GECKO_BOGUS ;
+
+ if ( !FCKRegexLib.SpecialBlockElements.test( oParentBlockNode.nodeName ) )
+ FCKTools.SetElementAttributes( oBlockNode1, oParentBlockNode.attributes ) ; // Transfer across any class attributes, etc
+ }
+ }
+ else
+ {
+ // First element of the bunch is not a block element (or it is a LI element which is a special case).
+ // So ensure all of the inline nodes before the selection are wrapped with a suitable block element.
+ var oBlockNode1 = FCK.EditorDocument.createElement( FCKRegexLib.SpecialBlockElements.test( oParentBlockNode.nodeName ) ? "P" : oParentBlockNode.tagName ) ;
+ oRange.setStartBefore( oStartNode ) ;
+ if ( nOffset == 0 )
+ oRange.setEndBefore( oChildNode ) ;
+ else
+ oRange.setEnd( oChildNode, nOffset ) ;
+ oBlockNode1.appendChild( oRange.cloneContents() ) ;
+ oBlockNode1.innerHTML = oBlockNode1.innerHTML.replace(/[\x00-\x1F]/g, "") ; // Prevent any control characters returned within the innerHTML from causing problems
+ if ( FCKTools.NodeIsEmpty( oBlockNode1 ) )
+ oBlockNode1.innerHTML = GECKO_BOGUS ; // Ensure it has some content, required for Gecko
+ else
+ oBlockNode1.innerHTML = oBlockNode1.innerHTML.replace( FCKRegexLib.EmptyElement, "" ) ; // Strip out any empty tags that may have been generated by the split
+ if ( !FCKRegexLib.SpecialBlockElements.test( oParentBlockNode.nodeName ) )
+ FCKTools.SetElementAttributes( oBlockNode1, oParentBlockNode.attributes ) ; // Transfer across any class attributes, etc
+ }
+
+ // Create a new tag which holds the content of the affected node(s) located after (and including) the child node
+ if ( FCKRegexLib.BlockElements.test( oEndNode.nodeName ) && !FCKRegexLib.ListElements.test( oParentBlockNode.nodeName ) )
+ {
+ // Last element of the bunch is already a block element so we don't want to wrap it with a new block element.
+ oBlockNode2 = oEndNode.cloneNode( true ) ;
+ }
+ else
+ {
+ // Last element of the bunch is not a block element (or it is a LI element which is a special case).
+ // So ensure all of the inline nodes after and including the child/offset are wrapped with a suitable block element.
+ var oBlockNode2 = FCK.EditorDocument.createElement( FCKRegexLib.SpecialBlockElements.test( oParentBlockNode.nodeName ) ? "P" : oParentBlockNode.tagName );
+ oRange.setEndAfter( oEndNode );
+ if ( nOffset == 0 )
+ oRange.setStartBefore( oChildNode ) ;
+ else
+ oRange.setStart( oChildNode, nOffset );
+ oBlockNode2.appendChild( oRange.cloneContents() ) ;
+ oBlockNode2.innerHTML = oBlockNode2.innerHTML.replace(/[\x00-\x1F]/g, "") ; // Prevent any control characters returned within the innerHTML from causing problems
+ if ( FCKTools.NodeIsEmpty( oBlockNode2 ) )
+ oBlockNode2.innerHTML = GECKO_BOGUS ; // Ensure it has some content, required for Gecko
+ else
+ oBlockNode2.innerHTML = oBlockNode2.innerHTML.replace( FCKRegexLib.EmptyElement, "" ) ; // Strip out any empty tags that may have been generated by the split
+ if ( !FCKRegexLib.SpecialBlockElements.test( oParentBlockNode.nodeName ) )
+ FCKTools.SetElementAttributes( oBlockNode2, oParentBlockNode.attributes ) ; // Transfer across any class attributes, etc
+ }
+
+ // Insert the resulting nodes into a document fragment
+ oFragment.appendChild( oBlockNode1 );
+ oFragment.appendChild( oBlockNode2 );
+
+ // Replace the affected nodes with the new nodes (fragment)
+ FCKTools.ReplaceNodes( oParentBlockNode, oStartNode, oEndNode, oFragment ) ;
+
+ // Return the second node so it can be used for setting cursor position, etc
+ return oBlockNode2 ;
+}
+
+// Function that replaces the specified range of nodes (inclusive) within the supplied parent
+// with the nodes stored in the supplied document fragment.
+FCKTools.ReplaceNodes = function( oParentBlockNode, oStartNode, oEndNode, oFragment )
+{
+ var oRange = FCK.EditorDocument.createRange() ;
+
+ // Delete the affected node(s)
+ if ( !FCKRegexLib.SpecialBlockElements.test( oParentBlockNode.nodeName ) && (oParentBlockNode.firstChild == oStartNode) && (oParentBlockNode.lastChild == oEndNode) )
+ {
+ // Entire parent block node is to be replaced so insert the two new block elements before it
+ // and then remove the old node
+ oRange.selectNode ( oParentBlockNode );
+ }
+ else
+ {
+ // Only part of the parent block node is to be replaced so insert the two new block elements
+ // before the first inline node of the affected content and then remove the old nodes
+ oRange.setEndAfter( oEndNode ) ;
+ oRange.setStartBefore( oStartNode ) ;
+ }
+
+ // Insert the replacement nodes
+ oRange.deleteContents() ;
+ oRange.insertNode( oFragment ) ;
+}
+*/
+// END iCM Modifications
+
Index: lams_central/web/fckeditor/editor/_source/internals/fcktools_ie.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fcktools_ie.js (.../fcktools_ie.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fcktools_ie.js (.../fcktools_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fcktools_ie.js
* Utility functions. (IE version).
*
@@ -63,6 +65,13 @@
for ( var i = 0 ; i < 2 ; i++ )
{
try { return new ActiveXObject( aObjs[i] ) ; }
- catch (e) {}
+ catch (e)
+ {}
}
+
+ if ( FCKLang.NoActiveX )
+ {
+ alert( FCKLang.NoActiveX ) ;
+ FCKLang.NoActiveX = null ;
+ }
}
\ No newline at end of file
Index: lams_central/web/fckeditor/editor/_source/internals/fckundo_ie.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckundo_ie.js (.../fckundo_ie.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fckundo_ie.js (.../fckundo_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -35,9 +35,19 @@
FCK.Events.FireEvent( "OnSelectionChange" ) ;
}
+FCKUndo.CheckUndoState = function()
+{
+ return ( FCKUndo.Typing || FCKUndo.CurrentIndex > 0 ) ;
+}
+
+FCKUndo.CheckRedoState = function()
+{
+ return ( !FCKUndo.Typing && FCKUndo.CurrentIndex < ( FCKUndo.SavedData.length - 1 ) ) ;
+}
+
FCKUndo.Undo = function()
{
- if ( FCKUndo.CurrentIndex >= 0 )
+ if ( FCKUndo.CheckUndoState() )
{
// If it is the first step.
if ( FCKUndo.CurrentIndex == ( FCKUndo.SavedData.length - 1 ) )
@@ -55,7 +65,7 @@
FCKUndo.Redo = function()
{
- if ( FCKUndo.CurrentIndex < ( FCKUndo.SavedData.length - 1 ) )
+ if ( FCKUndo.CheckRedoState() )
{
// Go a step forward.
FCKUndo._ApplyUndoLevel( ++FCKUndo.CurrentIndex ) ;
@@ -67,9 +77,13 @@
FCKUndo._ApplyUndoLevel = function(level)
{
var oData = FCKUndo.SavedData[ level ] ;
+
+ if ( !oData )
+ return ;
// Update the editor contents with that step data.
- FCK.EditorDocument.body.innerHTML = oData[0] ;
+ FCK.SetInnerHtml( oData[0] ) ;
+// FCK.EditorDocument.body.innerHTML = oData[0] ;
if ( oData[1] )
{
Index: lams_central/web/fckeditor/editor/_source/internals/fckurlparams.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckurlparams.js (.../fckurlparams.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckurlparams.js (.../fckurlparams.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckurlparams.js
* Defines the FCKURLParams object that is used to get all parameters
* passed by the URL QueryString (after the "?").
@@ -20,7 +22,7 @@
var FCKURLParams = new Object() ;
var aParams = document.location.search.substr(1).split('&') ;
-for ( i = 0 ; i < aParams.length ; i++ )
+for ( var i = 0 ; i < aParams.length ; i++ )
{
var aParam = aParams[i].split('=') ;
var sParamName = aParam[0] ;
Index: lams_central/web/fckeditor/editor/_source/internals/fckxhtml.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckxhtml.js (.../fckxhtml.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fckxhtml.js (.../fckxhtml.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckxhtml.js
* Defines the FCKXHtml object, responsible for the XHTML operations.
*
@@ -146,7 +148,7 @@
// The already processed nodes must be marked to avoid then to be duplicated (bad formatted HTML).
// So here, the "mark" is checked... if the element is Ok, then mark it.
- if ( htmlNode._fckxhtmljob == FCKXHtml.CurrentJobNum )
+ if ( htmlNode._fckxhtmljob && htmlNode._fckxhtmljob == FCKXHtml.CurrentJobNum )
return false ;
else
htmlNode._fckxhtmljob = FCKXHtml.CurrentJobNum ;
@@ -156,8 +158,8 @@
// if ( sNodeName.length == 0 || sNodeName.substr(0,1) == '/' )
// break ;
- var oNode = this.XML.createElement( sNodeName ) ;
-
+ var oNode = this._CreateNode( sNodeName ) ;
+
// Add all attributes.
FCKXHtml._AppendAttributes( xmlNode, htmlNode, oNode, sNodeName ) ;
@@ -183,7 +185,8 @@
// Comment
case 8 :
- xmlNode.appendChild( this.XML.createComment( htmlNode.nodeValue ) ) ;
+ try { xmlNode.appendChild( this.XML.createComment( htmlNode.nodeValue ) ) ; }
+ catch (e) { /* Do nothing... probably this is a wrong format comment. */ }
break ;
// Unknown Node type.
@@ -194,14 +197,38 @@
return true ;
}
+if ( FCKConfig.ForceStrongEm )
+{
+ FCKXHtml._CreateNode = function( nodeName )
+ {
+ switch ( nodeName )
+ {
+ case 'b' :
+ nodeName = 'strong' ;
+ break ;
+ case 'i' :
+ nodeName = 'em' ;
+ break ;
+ }
+ return this.XML.createElement( nodeName ) ;
+ }
+}
+else
+{
+ FCKXHtml._CreateNode = function( nodeName )
+ {
+ return this.XML.createElement( nodeName ) ;
+ }
+}
+
// Append an item to the SpecialBlocks array and returns the tag to be used.
FCKXHtml._AppendSpecialItem = function( item )
{
return '___FCKsi___' + FCKXHtml.SpecialBlocks.addItem( item ) ;
}
-if ( FCKConfig.ProcessHTMLEntities )
-{
+//if ( FCKConfig.ProcessHTMLEntities )
+//{
FCKXHtml._AppendTextNode = function( targetNode, textValue )
{
// We can't just replace the special chars with entities and create a
@@ -226,14 +253,14 @@
}
}
}
-}
-else
-{
- FCKXHtml._AppendTextNode = function( targetNode, textValue )
- {
- targetNode.appendChild( this.XML.createTextNode( textValue ) ) ;
- }
-}
+//}
+//else
+//{
+// FCKXHtml._AppendTextNode = function( targetNode, textValue )
+// {
+// targetNode.appendChild( this.XML.createTextNode( textValue ) ) ;
+// }
+//}
// An object that hold tag specific operations.
FCKXHtml.TagProcessors = new Object() ;
Index: lams_central/web/fckeditor/editor/_source/internals/fckxhtml_gecko.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckxhtml_gecko.js (.../fckxhtml_gecko.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckxhtml_gecko.js (.../fckxhtml_gecko.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckxhtml_gecko.js
* Defines the FCKXHtml object, responsible for the XHTML operations.
* Gecko specific.
@@ -21,15 +23,10 @@
// Create the XMLSerializer.
var oSerializer = new XMLSerializer() ;
- if ( FCKConfig.ProcessHTMLEntities )
- {
- // Return the serialized XML as a string.
- // Due to a BUG on Gecko, the special chars sequence "#?-:" must be replaced with "&"
- // for the XHTML entities.
- return oSerializer.serializeToString( this.MainNode ).replace( FCKXHtmlEntities.GeckoEntitiesMarkerRegex, '&' ) ;
- }
- else
- return oSerializer.serializeToString( this.MainNode ) ;
+ // Return the serialized XML as a string.
+ // Due to a BUG on Gecko, the special chars sequence "#?-:" must be replaced with "&"
+ // for the XHTML entities.
+ return oSerializer.serializeToString( this.MainNode ).replace( FCKRegexLib.GeckoEntitiesMarker, '&' ) ;
}
// There is a BUG on Gecko... createEntityReference returns null.
@@ -50,6 +47,7 @@
if ( oAttribute.specified )
{
var sAttName = oAttribute.nodeName.toLowerCase() ;
+ var sAttValue ;
// The "_fckxhtmljob" attribute is used to mark the already processed elements.
if ( sAttName == '_fckxhtmljob' )
@@ -60,12 +58,12 @@
// There are one cases (on Gecko) when the oAttribute.nodeValue must be used:
// - for the "class" attribute
else if ( sAttName == 'class' )
- var sAttValue = oAttribute.nodeValue ;
+ sAttValue = oAttribute.nodeValue ;
// XHTML doens't support attribute minimization like "CHECKED". It must be trasformed to cheched="checked".
else if ( oAttribute.nodeValue === true )
sAttValue = sAttName ;
else
- var sAttValue = htmlNode.getAttribute( sAttName, 2 ) ; // We must use getAttribute to get it exactly as it is defined.
+ sAttValue = htmlNode.getAttribute( sAttName, 2 ) ; // We must use getAttribute to get it exactly as it is defined.
if ( FCKConfig.ForceSimpleAmpersand && sAttValue.replace )
sAttValue = sAttValue.replace( /&/g, '___FCKAmp___' ) ;
Index: lams_central/web/fckeditor/editor/_source/internals/fckxhtml_ie.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckxhtml_ie.js (.../fckxhtml_ie.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/_source/internals/fckxhtml_ie.js (.../fckxhtml_ie.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckxhtml_ie.js
* Defines the FCKXHtml object, responsible for the XHTML operations.
* IE specific.
Index: lams_central/web/fckeditor/editor/_source/internals/fckxhtmlentities.js
===================================================================
diff -u -rec7cf4ccd30c2f44920a59691c6055f714e5e36c -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/_source/internals/fckxhtmlentities.js (.../fckxhtmlentities.js) (revision ec7cf4ccd30c2f44920a59691c6055f714e5e36c)
+++ lams_central/web/fckeditor/editor/_source/internals/fckxhtmlentities.js (.../fckxhtmlentities.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,17 +8,19 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fckxhtmlentities.js
* This file define the HTML entities handled by the editor.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
+var FCKXHtmlEntities = new Object() ;
+
if ( FCKConfig.ProcessHTMLEntities )
{
- FCKXHtmlEntities = new Object();
-
FCKXHtmlEntities.Entities = {
// Latin-1 Entities
' ':'nbsp',
@@ -311,6 +313,10 @@
// Create and Compile the Regex used to separate the entities from the text.
FCKXHtmlEntities.EntitiesRegex = new RegExp('','') ;
FCKXHtmlEntities.EntitiesRegex.compile( '[' + FCKXHtmlEntities.Chars + ']|[^' + FCKXHtmlEntities.Chars + ']+', 'g' ) ;
-
- FCKXHtmlEntities.GeckoEntitiesMarkerRegex = /#\?-\:/g ;
+}
+else
+{
+ // Even if we are not processing the entities, we must respect the .
+ FCKXHtmlEntities.Entities = { ' ':'nbsp' } ;
+ FCKXHtmlEntities.EntitiesRegex = /[ ]|[^ ]+/g ;
}
\ No newline at end of file
Index: lams_central/web/fckeditor/editor/css/fck_editorarea.css
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/css/fck_editorarea.css (.../fck_editorarea.css) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/css/fck_editorarea.css (.../fck_editorarea.css) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_editorarea.css
* This is the default CSS file used by the editor area. It defines the
* initial font of the editor and background color.
Index: lams_central/web/fckeditor/editor/css/fck_internal.css
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/css/fck_internal.css (.../fck_internal.css) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/css/fck_internal.css (.../fck_internal.css) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_internal.css
* This CSS Style Sheet defines rules used by the editor for its internal use.
*
@@ -43,4 +45,20 @@
background-repeat: no-repeat;
width: 16px ;
height: 15px ;
+}
+
+.FCK__PageBreak
+{
+ background-position: center center;
+ background-image: url(images/fck_pagebreak.gif);
+ background-repeat: no-repeat;
+ clear: both;
+ display: block;
+ float: none;
+ width: 100%;
+ border-top: #999999 1px dotted;
+ border-bottom: #999999 1px dotted;
+ border-right:0px;
+ border-left:0px;
+ height: 5px;
}
\ No newline at end of file
Index: lams_central/web/fckeditor/editor/css/fck_showtableborders_gecko.css
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/css/fck_showtableborders_gecko.css (.../fck_showtableborders_gecko.css) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/css/fck_showtableborders_gecko.css (.../fck_showtableborders_gecko.css) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_showtableborders_gecko.css
* This CSS Style Sheet defines the rules to show table borders on Gecko.
*
Index: lams_central/web/fckeditor/editor/css/images/fck_pagebreak.gif
===================================================================
diff -u
Binary files differ
Index: lams_central/web/fckeditor/editor/dialog/common/fck_dialog_common.css
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/dialog/common/fck_dialog_common.css (.../fck_dialog_common.css) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/dialog/common/fck_dialog_common.css (.../fck_dialog_common.css) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_dialog_common.css
* This is the CSS file used for interface details in some dialog
* windows.
@@ -74,5 +76,5 @@
.FCK__FieldNumeric
{
- behavior: url(fcknumericfield.htc) ;
+ behavior: url(common/fcknumericfield.htc) ;
}
\ No newline at end of file
Index: lams_central/web/fckeditor/editor/dialog/common/fck_dialog_common.js
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/dialog/common/fck_dialog_common.js (.../fck_dialog_common.js) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/dialog/common/fck_dialog_common.js (.../fck_dialog_common.js) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -8,6 +8,8 @@
* For further information visit:
* http://www.fckeditor.net/
*
+ * "Support Open Source software. What about a donation today?"
+ *
* File Name: fck_dialog_common.js
* Useful functions used by almost all dialog window pages.
*
Index: lams_central/web/fckeditor/editor/dialog/common/fcknumericfield.htc
===================================================================
diff -u -re7bc7c1b21c5e95239af85cf7d5e5ab01b18e279 -r55b56043d9d88eeb96bb4f8680fe9d2b0491dc12
--- lams_central/web/fckeditor/editor/dialog/common/fcknumericfield.htc (.../fcknumericfield.htc) (revision e7bc7c1b21c5e95239af85cf7d5e5ab01b18e279)
+++ lams_central/web/fckeditor/editor/dialog/common/fcknumericfield.htc (.../fcknumericfield.htc) (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -2,7 +2,7 @@
Index: lams_central/web/fckeditor/editor/dialog/fck_about/lgpl.html
===================================================================
diff -u
--- lams_central/web/fckeditor/editor/dialog/fck_about/lgpl.html (revision 0)
+++ lams_central/web/fckeditor/editor/dialog/fck_about/lgpl.html (revision 55b56043d9d88eeb96bb4f8680fe9d2b0491dc12)
@@ -0,0 +1,434 @@
+
+
+
+ GNU Lesser General Public License
+
+
+
+
+
GNU Lesser General Public License
+
+
Version 2.1, February 1999
+
+
Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite
+ 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute
+ verbatim copies of this license document, but changing it is not allowed.
+
[This is the first released version of the Lesser GPL. It also counts as the
+ successor of the GNU Library Public License, version 2, hence the version
+ number 2.1.]
+
+
Preamble
+
The licenses for most software are designed to take away your freedom to share
+ and change it. By contrast, the GNU General Public Licenses are intended to
+ guarantee your freedom to share and change free software--to make sure the
+ software is free for all its users.
+
+
This license, the Lesser General Public License, applies to some specially
+ designated software packages--typically libraries--of the Free Software
+ Foundation and other authors who decide to use it. You can use it too, but we
+ suggest you first think carefully about whether this license or the ordinary
+ General Public License is the better strategy to use in any particular case,
+ based on the explanations below.
+
+
When we speak of free software, we are referring to freedom of use, not price.
+ Our General Public Licenses are designed to make sure that you have the freedom
+ to distribute copies of free software (and charge for this service if you
+ wish); that you receive source code or can get it if you want it; that you can
+ change the software and use pieces of it in new free programs; and that you are
+ informed that you can do these things.
+
To protect your rights, we need to make restrictions that forbid distributors to
+ deny you these rights or to ask you to surrender these rights. These
+ restrictions translate to certain responsibilities for you if you distribute
+ copies of the library or if you modify it.
+
+
For example, if you distribute copies of the library, whether gratis or for a
+ fee, you must give the recipients all the rights that we gave you. You must
+ make sure that they, too, receive or can get the source code. If you link other
+ code with the library, you must provide complete object files to the
+ recipients, so that they can relink them with the library after making changes
+ to the library and recompiling it. And you must show them these terms so they
+ know their rights.
+
+
We protect your rights with a two-step method: (1) we copyright the library, and
+ (2) we offer you this license, which gives you legal permission to copy,
+ distribute and/or modify the library.
+
+
To protect each distributor, we want to make it very clear that there is no
+ warranty for the free library. Also, if the library is modified by someone else
+ and passed on, the recipients should know that what they have is not the
+ original version, so that the original author's reputation will not be affected
+ by problems that might be introduced by others.
+
+
Finally, software patents pose a constant threat to the existence of any free
+ program. We wish to make sure that a company cannot effectively restrict the
+ users of a free program by obtaining a restrictive license from a patent
+ holder. Therefore, we insist that any patent license obtained for a version of
+ the library must be consistent with the full freedom of use specified in this
+ license.
+
+
Most GNU software, including some libraries, is covered by the ordinary GNU
+ General Public License. This license, the GNU Lesser General Public License,
+ applies to certain designated libraries, and is quite different from the
+ ordinary General Public License. We use this license for certain libraries in
+ order to permit linking those libraries into non-free programs.
+
+
When a program is linked with a library, whether statically or using a shared
+ library, the combination of the two is legally speaking a combined work, a
+ derivative of the original library. The ordinary General Public License
+ therefore permits such linking only if the entire combination fits its criteria
+ of freedom. The Lesser General Public License permits more lax criteria for
+ linking other code with the library.
+
+
We call this license the "Lesser" General Public License because it does Less to
+ protect the user's freedom than the ordinary General Public License. It also
+ provides other free software developers Less of an advantage over competing
+ non-free programs. These disadvantages are the reason we use the ordinary
+ General Public License for many libraries. However, the Lesser license provides
+ advantages in certain special circumstances.
+
+
For example, on rare occasions, there may be a special need to encourage the
+ widest possible use of a certain library, so that it becomes a de-facto
+ standard. To achieve this, non-free programs must be allowed to use the
+ library. A more frequent case is that a free library does the same job as
+ widely used non-free libraries. In this case, there is little to gain by
+ limiting the free library to free software only, so we use the Lesser General
+ Public License.
+
+
In other cases, permission to use a particular library in non-free programs
+ enables a greater number of people to use a large body of free software. For
+ example, permission to use the GNU C Library in non-free programs enables many
+ more people to use the whole GNU operating system, as well as its variant, the
+ GNU/Linux operating system.
+
+
Although the Lesser General Public License is Less protective of the users'
+ freedom, it does ensure that the user of a program that is linked with the
+ Library has the freedom and the wherewithal to run that program using a
+ modified version of the Library.
+
+
The precise terms and conditions for copying, distribution and modification
+ follow. Pay close attention to the difference between a "work based on the
+ library" and a "work that uses the library". The former contains code derived
+ from the library, whereas the latter must be combined with the library in order
+ to run.
+
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
0. This License Agreement applies to any software library or
+ other program which contains a notice placed by the copyright holder or other
+ authorized party saying it may be distributed under the terms of this Lesser
+ General Public License (also called "this License"). Each licensee is addressed
+ as "you".
+
A "library" means a collection of software functions and/or data prepared so as
+ to be conveniently linked with application programs (which use some of those
+ functions and data) to form executables.
+
+
The "Library", below, refers to any such software library or work which has been
+ distributed under these terms. A "work based on the Library" means either the
+ Library or any derivative work under copyright law: that is to say, a work
+ containing the Library or a portion of it, either verbatim or with
+ modifications and/or translated straightforwardly into another language.
+ (Hereinafter, translation is included without limitation in the term
+ "modification".)
+
+
"Source code" for a work means the preferred form of the work for making
+ modifications to it. For a library, complete source code means all the source
+ code for all modules it contains, plus any associated interface definition
+ files, plus the scripts used to control compilation and installation of the
+ library.
+
Activities other than copying, distribution and modification are not covered by
+ this License; they are outside its scope. The act of running a program using
+ the Library is not restricted, and output from such a program is covered only
+ if its contents constitute a work based on the Library (independent of the use
+ of the Library in a tool for writing it). Whether that is true depends on what
+ the Library does and what the program that uses the Library does.
+
+
1. You may copy and distribute verbatim copies of the Library's
+ complete source code as you receive it, in any medium, provided that you
+ conspicuously and appropriately publish on each copy an appropriate copyright
+ notice and disclaimer of warranty; keep intact all the notices that refer to
+ this License and to the absence of any warranty; and distribute a copy of this
+ License along with the Library.
+
+
You may charge a fee for the physical act of transferring a copy, and you may at
+ your option offer warranty protection in exchange for a fee.
+
+
2. You may modify your copy or copies of the Library or any
+ portion of it, thus forming a work based on the Library, and copy and
+ distribute such modifications or work under the terms of Section 1 above,
+ provided that you also meet all of these conditions:
+
+
+
a) The modified work must itself be a software library.
+
+
b) You must cause the files modified to carry prominent notices stating that you
+ changed the files and the date of any change.
+
c) You must cause the whole of the work to be licensed at no charge to all third
+ parties under the terms of this License.
+
+
d) If a facility in the modified Library refers to a function or a table of data
+ to be supplied by an application program that uses the facility, other than as
+ an argument passed when the facility is invoked, then you must make a good
+ faith effort to ensure that, in the event an application does not supply such
+ function or table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+
(For example, a function in a library to compute square roots has a purpose that
+ is entirely well-defined independent of the application. Therefore, Subsection
+ 2d requires that any application-supplied function or table used by this
+ function must be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+
These requirements apply to the modified work as a whole. If identifiable
+ sections of that work are not derived from the Library, and can be reasonably
+ considered independent and separate works in themselves, then this License, and
+ its terms, do not apply to those sections when you distribute them as separate
+ works. But when you distribute the same sections as part of a whole which is a
+ work based on the Library, the distribution of the whole must be on the terms
+ of this License, whose permissions for other licensees extend to the entire
+ whole, and thus to each and every part regardless of who wrote it.
+
+
Thus, it is not the intent of this section to claim rights or contest your
+ rights to work written entirely by you; rather, the intent is to exercise the
+ right to control the distribution of derivative or collective works based on
+ the Library.
+
+
In addition, mere aggregation of another work not based on the Library with the
+ Library (or with a work based on the Library) on a volume of a storage or
+ distribution medium does not bring the other work under the scope of this
+ License.
+
+
+
3. You may opt to apply the terms of the ordinary GNU General
+ Public License instead of this License to a given copy of the Library. To do
+ this, you must alter all the notices that refer to this License, so that they
+ refer to the ordinary GNU General Public License, version 2, instead of to this
+ License. (If a newer version than version 2 of the ordinary GNU General Public
+ License has appeared, then you can specify that version instead if you wish.)
+ Do not make any other change in these notices.
+
+
Once this change is made in a given copy, it is irreversible for that copy, so
+ the ordinary GNU General Public License applies to all subsequent copies and
+ derivative works made from that copy.
+
+
This option is useful when you wish to copy part of the code of the Library into
+ a program that is not a library.
+
+
4. You may copy and distribute the Library (or a portion or
+ derivative of it, under Section 2) in object code or executable form under the
+ terms of Sections 1 and 2 above provided that you accompany it with the
+ complete corresponding machine-readable source code, which must be distributed
+ under the terms of Sections 1 and 2 above on a medium customarily used for
+ software interchange.
+
+
If distribution of object code is made by offering access to copy from a
+ designated place, then offering equivalent access to copy the source code from
+ the same place satisfies the requirement to distribute the source code, even
+ though third parties are not compelled to copy the source along with the object
+ code.
+
5. A program that contains no derivative of any portion of the
+ Library, but is designed to work with the Library by being compiled or linked
+ with it, is called a "work that uses the Library". Such a work, in isolation,
+ is not a derivative work of the Library, and therefore falls outside the scope
+ of this License.
+
+
However, linking a "work that uses the Library" with the Library creates an
+ executable that is a derivative of the Library (because it contains portions of
+ the Library), rather than a "work that uses the library". The executable is
+ therefore covered by this License. Section 6 states terms for distribution of
+ such executables.
+
+
When a "work that uses the Library" uses material from a header file that is
+ part of the Library, the object code for the work may be a derivative work of
+ the Library even though the source code is not. Whether this is true is
+ especially significant if the work can be linked without the Library, or if the
+ work is itself a library. The threshold for this to be true is not precisely
+ defined by law.
+
+
If such an object file uses only numerical parameters, data structure layouts
+ and accessors, and small macros and small inline functions (ten lines or less
+ in length), then the use of the object file is unrestricted, regardless of
+ whether it is legally a derivative work. (Executables containing this object
+ code plus portions of the Library will still fall under Section 6.)
+
+
Otherwise, if the work is a derivative of the Library, you may distribute the
+ object code for the work under the terms of Section 6. Any executables
+ containing that work also fall under Section 6, whether or not they are linked
+ directly with the Library itself.
+
+
6. As an exception to the Sections above, you may also combine
+ or link a "work that uses the Library" with the Library to produce a work
+ containing portions of the Library, and distribute that work under terms of
+ your choice, provided that the terms permit modification of the work for the
+ customer's own use and reverse engineering for debugging such modifications.
+
+
You must give prominent notice with each copy of the work that the Library is
+ used in it and that the Library and its use are covered by this License. You
+ must supply a copy of this License. If the work during execution displays
+ copyright notices, you must include the copyright notice for the Library among
+ them, as well as a reference directing the user to the copy of this License.
+ Also, you must do one of these things:
+
+
+
a) Accompany the work with the complete corresponding machine-readable source
+ code for the Library including whatever changes were used in the work (which
+ must be distributed under Sections 1 and 2 above); and, if the work is an
+ executable linked with the Library, with the complete machine-readable "work
+ that uses the Library", as object code and/or source code, so that the user can
+ modify the Library and then relink to produce a modified executable containing
+ the modified Library. (It is understood that the user who changes the contents
+ of definitions files in the Library will not necessarily be able to recompile
+ the application to use the modified definitions.)
+
+
b) Use a suitable shared library mechanism for linking with the Library. A
+ suitable mechanism is one that (1) uses at run time a copy of the library
+ already present on the user's computer system, rather than copying library
+ functions into the executable, and (2) will operate properly with a modified
+ version of the library, if the user installs one, as long as the modified
+ version is interface-compatible with the version that the work was made with.
+
+
c) Accompany the work with a written offer, valid for at least three years, to
+ give the same user the materials specified in Subsection 6a, above, for a
+ charge no more than the cost of performing this distribution.
+
+
d) If distribution of the work is made by offering access to copy from a
+ designated place, offer equivalent access to copy the above specified materials
+ from the same place.
+
+
e) Verify that the user has already received a copy of these materials or that
+ you have already sent this user a copy.
+
+
For an executable, the required form of the "work that uses the Library" must
+ include any data and utility programs needed for reproducing the executable
+ from it. However, as a special exception, the materials to be distributed need
+ not include anything that is normally distributed (in either source or binary
+ form) with the major components (compiler, kernel, and so on) of the operating
+ system on which the executable runs, unless that component itself accompanies
+ the executable.
+
+
It may happen that this requirement contradicts the license restrictions of
+ other proprietary libraries that do not normally accompany the operating
+ system. Such a contradiction means you cannot use both them and the Library
+ together in an executable that you distribute.
+
+
7. You may place library facilities that are a work based on
+ the Library side-by-side in a single library together with other library
+ facilities not covered by this License, and distribute such a combined library,
+ provided that the separate distribution of the work based on the Library and of
+ the other library facilities is otherwise permitted, and provided that you do
+ these two things:
+
+
+
a) Accompany the combined library with a copy of the same work based on the
+ Library, uncombined with any other library facilities. This must be distributed
+ under the terms of the Sections above.
+
+
b) Give prominent notice with the combined library of the fact that part of it
+ is a work based on the Library, and explaining where to find the accompanying
+ uncombined form of the same work.
+
+
8. You may not copy, modify, sublicense, link with, or
+ distribute the Library except as expressly provided under this License. Any
+ attempt otherwise to copy, modify, sublicense, link with, or distribute the
+ Library is void, and will automatically terminate your rights under this
+ License. However, parties who have received copies, or rights, from you under
+ this License will not have their licenses terminated so long as such parties
+ remain in full compliance.
+
+
9. You are not required to accept this License, since you have
+ not signed it. However, nothing else grants you permission to modify or
+ distribute the Library or its derivative works. These actions are prohibited by
+ law if you do not accept this License. Therefore, by modifying or distributing
+ the Library (or any work based on the Library), you indicate your acceptance of
+ this License to do so, and all its terms and conditions for copying,
+ distributing or modifying the Library or works based on it.
+
+
10. Each time you redistribute the Library (or any work based
+ on the Library), the recipient automatically receives a license from the
+ original licensor to copy, distribute, link with or modify the Library subject
+ to these terms and conditions. You may not impose any further restrictions on
+ the recipients' exercise of the rights granted herein. You are not responsible
+ for enforcing compliance by third parties with this License.
+
+
11. If, as a consequence of a court judgment or allegation of
+ patent infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement or otherwise)
+ that contradict the conditions of this License, they do not excuse you from the
+ conditions of this License. If you cannot distribute so as to satisfy
+ simultaneously your obligations under this License and any other pertinent
+ obligations, then as a consequence you may not distribute the Library at all.
+ For example, if a patent license would not permit royalty-free redistribution
+ of the Library by all those who receive copies directly or indirectly through
+ you, then the only way you could satisfy both it and this License would be to
+ refrain entirely from distribution of the Library.
+
+
If any portion of this section is held invalid or unenforceable under any
+ particular circumstance, the balance of the section is intended to apply, and
+ the section as a whole is intended to apply in other circumstances.
+
+
It is not the purpose of this section to induce you to infringe any patents or
+ other property right claims or to contest validity of any such claims; this
+ section has the sole purpose of protecting the integrity of the free software
+ distribution system which is implemented by public license practices. Many
+ people have made generous contributions to the wide range of software
+ distributed through that system in reliance on consistent application of that
+ system; it is up to the author/donor to decide if he or she is willing to
+ distribute software through any other system and a licensee cannot impose that
+ choice.
+
+
This section is intended to make thoroughly clear what is believed to be a
+ consequence of the rest of this License.
+
+
12. If the distribution and/or use of the Library is restricted
+ in certain countries either by patents or by copyrighted interfaces, the
+ original copyright holder who places the Library under this License may add an
+ explicit geographical distribution limitation excluding those countries, so
+ that distribution is permitted only in or among countries not thus excluded. In
+ such case, this License incorporates the limitation as if written in the body
+ of this License.
+
+
13. The Free Software Foundation may publish revised and/or new
+ versions of the Lesser General Public License from time to time. Such new
+ versions will be similar in spirit to the present version, but may differ in
+ detail to address new problems or concerns.
+
Each version is given a distinguishing version number. If the Library specifies
+ a version number of this License which applies to it and "any later version",
+ you have the option of following the terms and conditions either of that
+ version or of any later version published by the Free Software Foundation. If
+ the Library does not specify a license version number, you may choose any
+ version ever published by the Free Software Foundation.
+
+
14. If you wish to incorporate parts of the Library into other
+ free programs whose distribution conditions are incompatible with these, write
+ to the author to ask for permission. For software which is copyrighted by the
+ Free Software Foundation, write to the Free Software Foundation; we sometimes
+ make exceptions for this. Our decision will be guided by the two goals of
+ preserving the free status of all derivatives of our free software and of
+ promoting the sharing and reuse of software generally.
+
+
NO WARRANTY
+
+
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+ WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
+ WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+ PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
+ IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
+ QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE
+ DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
+ CORRECTION.
+
+
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO
+ IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT
+ OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS
+ OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+ PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN
+ IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGES.
+