summaryrefslogtreecommitdiff
path: root/httemplate/elements/fckeditor/editor/dialog/fck_select.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/elements/fckeditor/editor/dialog/fck_select.html')
-rw-r--r--httemplate/elements/fckeditor/editor/dialog/fck_select.html36
1 files changed, 20 insertions, 16 deletions
diff --git a/httemplate/elements/fckeditor/editor/dialog/fck_select.html b/httemplate/elements/fckeditor/editor/dialog/fck_select.html
index cb48b5070..2f28da6b3 100644
--- a/httemplate/elements/fckeditor/editor/dialog/fck_select.html
+++ b/httemplate/elements/fckeditor/editor/dialog/fck_select.html
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2010 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
@@ -30,12 +30,13 @@
<script type="text/javascript" src="fck_select/fck_select.js"></script>
<script type="text/javascript">
-var oEditor = window.parent.InnerDialogLoaded() ;
+var dialog = window.parent ;
+var oEditor = dialog.InnerDialogLoaded() ;
// Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ;
-var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
+var oActiveEl = dialog.Selection.GetSelectedElement() ;
var oListText ;
var oListValue ;
@@ -48,6 +49,10 @@ window.onload = function()
oListText = document.getElementById( 'cmbText' ) ;
oListValue = document.getElementById( 'cmbValue' ) ;
+ // Fix the lists widths. (Bug #970)
+ oListText.style.width = oListText.offsetWidth ;
+ oListValue.style.width = oListValue.offsetWidth ;
+
if ( oActiveEl && oActiveEl.tagName == 'SELECT' )
{
GetE('txtName').value = oActiveEl.name ;
@@ -68,22 +73,21 @@ window.onload = function()
else
oActiveEl = null ;
- window.parent.SetOkButton( true ) ;
+ dialog.SetOkButton( true ) ;
+ dialog.SetAutoSize( true ) ;
+ SelectField( 'txtName' ) ;
}
function Ok()
{
+ oEditor.FCKUndo.SaveUndoStep() ;
+
var sSize = GetE('txtLines').value ;
if ( sSize == null || isNaN( sSize ) || sSize <= 1 )
sSize = '' ;
- if ( !oActiveEl )
- {
- oActiveEl = oEditor.FCK.EditorDocument.createElement( 'SELECT' ) ;
- oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
- }
+ oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'SELECT', {name: GetE('txtName').value} ) ;
- SetAttribute( oActiveEl, 'name' , GetE('txtName').value ) ;
SetAttribute( oActiveEl, 'size' , sSize ) ;
oActiveEl.multiple = ( sSize.length > 0 && GetE('chkMultiple').checked ) ;
@@ -112,7 +116,7 @@ function Ok()
</script>
</head>
- <body style='OVERFLOW: hidden' scroll='no'>
+ <body style="overflow: hidden">
<table width="100%" height="100%">
<tr>
<td>
@@ -128,7 +132,7 @@ function Ok()
<tr>
<td nowrap><span fckLang="DlgSelectSize">Size</span>&nbsp;</td>
<td nowrap><input id="txtLines" type="text" size="2" value="">&nbsp;<span fckLang="DlgSelectLines">lines</span></td>
- <td nowrap align="right"><input id="chkMultiple" name="chkMultiple" type="checkbox"><label for="chkMultiple" fckLang="DlgSelectChkMulti">Allow
+ <td nowrap align="right"><input id="chkMultiple" type="checkbox"><label for="chkMultiple" fckLang="DlgSelectChkMulti">Allow
multiple selections</label></td>
</tr>
</table>
@@ -139,20 +143,20 @@ function Ok()
<table width="100%">
<tr>
<td width="50%"><span fckLang="DlgSelectOpText">Text</span><br>
- <input id="txtText" style="WIDTH: 100%" type="text" name="txtText">
+ <input id="txtText" style="WIDTH: 100%" type="text">
</td>
<td width="50%"><span fckLang="DlgSelectOpValue">Value</span><br>
- <input id="txtValue" style="WIDTH: 100%" type="text" name="txtValue">
+ <input id="txtValue" style="WIDTH: 100%" type="text">
</td>
<td vAlign="bottom"><input onclick="Add();" type="button" fckLang="DlgSelectBtnAdd" value="Add"></td>
<td vAlign="bottom"><input onclick="Modify();" type="button" fckLang="DlgSelectBtnModify" value="Modify"></td>
</tr>
<tr>
<td rowSpan="2"><select id="cmbText" style="WIDTH: 100%" onchange="GetE('cmbValue').selectedIndex = this.selectedIndex;Select(this);"
- size="5" name="cmbText"></select>
+ size="5"></select>
</td>
<td rowSpan="2"><select id="cmbValue" style="WIDTH: 100%" onchange="GetE('cmbText').selectedIndex = this.selectedIndex;Select(this);"
- size="5" name="cmbValue"></select>
+ size="5"></select>
</td>
<td vAlign="top" colSpan="2">
</td>