Subversion Repositories Applications.papyrus

Rev

Rev 431 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 431 Rev 521
Line 6... Line 6...
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
7
 * 
7
 * 
8
 * For further information visit:
8
 * For further information visit:
9
 * 		http://www.fckeditor.net/
9
 * 		http://www.fckeditor.net/
10
 * 
10
 * 
-
 
11
 * "Support Open Source software. What about a donation today?"
-
 
12
 * 
11
 * File Name: fck_table.html
13
 * File Name: fck_table.html
12
 * 	Table dialog window.
14
 * 	Table dialog window.
13
 * 
15
 * 
14
 * File Authors:
16
 * File Authors:
15
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
17
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
Line 73... Line 75...
73
		document.getElementById('selAlignment').value	= table.align ;
75
		document.getElementById('selAlignment').value	= table.align ;
74
		document.getElementById('txtCellPadding').value	= table.cellPadding	;
76
		document.getElementById('txtCellPadding').value	= table.cellPadding	;
75
		document.getElementById('txtCellSpacing').value	= table.cellSpacing	;
77
		document.getElementById('txtCellSpacing').value	= table.cellSpacing	;
76
//		document.getElementById('cmbFontStyle').value	= table.className ;
78
//		document.getElementById('cmbFontStyle').value	= table.className ;
Line 77... Line 79...
77
 
79
 
Line 78... Line 80...
78
		if (table.caption) document.getElementById('txtCaption').value = table.caption.innerText ;		
80
		if (table.caption) document.getElementById('txtCaption').value = table.caption.innerHTML ;
79
		
81
		
80
		document.getElementById('txtRows').disabled    = true ;
82
		document.getElementById('txtRows').disabled    = true ;
Line 108... Line 110...
108
//	table.className		= cmbFontStyle.value ;
110
//	table.className		= cmbFontStyle.value ;
Line 109... Line 111...
109
	
111
	
110
	if ( document.getElementById('txtCaption').value != '')
112
	if ( document.getElementById('txtCaption').value != '')
111
	{
113
	{
112
		if (! table.caption) table.createCaption() ;
114
		if (! table.caption) table.createCaption() ;
-
 
115
		table.caption.innerHTML = document.getElementById('txtCaption').value ;
-
 
116
	}
-
 
117
	else if ( bExists && table.caption )
-
 
118
	{
-
 
119
		if ( document.all )
-
 
120
			table.caption.innerHTML = '' ;	// TODO: It causes an IE internal error if using removeChild.
-
 
121
		else
113
		table.caption.innerText = document.getElementById('txtCaption').value ;
122
			table.caption.parentNode.removeChild( table.caption ) ;
114
	}
-
 
115
//	else if ( bExists && table.caption )
-
 
Line 116... Line 123...
116
//		table.deleteCaption() ;		// TODO: It causes an IE internal error.
123
	}
117
		
124
		
118
	if (! bExists)
125
	if (! bExists)
119
	{
126
	{
Line 131... Line 138...
131
				//oCell.innerHTML = " " ;
138
				//oCell.innerHTML = " " ;
132
			}
139
			}
133
		}
140
		}
Line 134... Line 141...
134
		
141
		
-
 
142
		oEditor.FCKUndo.SaveUndoStep() ;
-
 
143
		
-
 
144
		// START iCM MODIFICATIONS	
-
 
145
		// Amended to ensure that newly inserted tables are not incorrectly nested in P tags, etc
-
 
146
		// We insert the table first and then rectify any nestings afterwards so we can re-use the
135
		oEditor.FCKUndo.SaveUndoStep() ;
147
		// FCKTablesProcessor function that corrects tables on SetHTML()
-
 
148
		table = oEditor.FCK.InsertElementAndGetIt( table ) ;
-
 
149
		if ( !oEditor.FCKConfig.UseBROnCarriageReturn )
-
 
150
		{
-
 
151
			oEditor.FCKTablesProcessor.CheckTableNesting( table ) ;
-
 
152
		}
136
		oEditor.FCK.InsertElement( table ) ;
153
		// END iCM MODIFICATIONS	
Line 137... Line 154...
137
	}
154
	}
138
	
155