diff options
Diffstat (limited to 'httemplate/elements/fckeditor/editor/dialog/fck_textfield.html')
| -rw-r--r-- | httemplate/elements/fckeditor/editor/dialog/fck_textfield.html | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/httemplate/elements/fckeditor/editor/dialog/fck_textfield.html b/httemplate/elements/fckeditor/editor/dialog/fck_textfield.html index 7b4c8ef9a..43f91a6cd 100644 --- a/httemplate/elements/fckeditor/editor/dialog/fck_textfield.html +++ b/httemplate/elements/fckeditor/editor/dialog/fck_textfield.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 ==
*
@@ -29,12 +29,13 @@ <script src="common/fck_dialog_common.js" type="text/javascript"></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() ;
window.onload = function()
{
@@ -48,13 +49,13 @@ window.onload = function() GetE('txtSize').value = GetAttribute( oActiveEl, 'size' ) ;
GetE('txtMax').value = GetAttribute( oActiveEl, 'maxLength' ) ;
GetE('txtType').value = oActiveEl.type ;
-
- GetE('txtType').disabled = true ;
}
else
oActiveEl = null ;
- window.parent.SetOkButton( true ) ;
+ dialog.SetOkButton( true ) ;
+ dialog.SetAutoSize( true ) ;
+ SelectField( 'txtName' ) ;
}
function Ok()
@@ -72,14 +73,10 @@ function Ok() return false ;
}
- if ( !oActiveEl )
- {
- oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
- oActiveEl.type = GetE('txtType').value ;
- oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
- }
+ oEditor.FCKUndo.SaveUndoStep() ;
+
+ oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: GetE('txtType').value } ) ;
- oActiveEl.name = GetE('txtName').value ;
SetAttribute( oActiveEl, 'value' , GetE('txtValue').value ) ;
SetAttribute( oActiveEl, 'size' , GetE('txtSize').value ) ;
SetAttribute( oActiveEl, 'maxlength', GetE('txtMax').value ) ;
|
