summaryrefslogtreecommitdiff
path: root/httemplate/elements/fckeditor/editor/dialog/fck_checkbox.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/elements/fckeditor/editor/dialog/fck_checkbox.html')
-rw-r--r--httemplate/elements/fckeditor/editor/dialog/fck_checkbox.html21
1 files changed, 12 insertions, 9 deletions
diff --git a/httemplate/elements/fckeditor/editor/dialog/fck_checkbox.html b/httemplate/elements/fckeditor/editor/dialog/fck_checkbox.html
index 624c7df..ac7b4f3 100644
--- a/httemplate/elements/fckeditor/editor/dialog/fck_checkbox.html
+++ b/httemplate/elements/fckeditor/editor/dialog/fck_checkbox.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-2010 Frederico Caldeira Knabben
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
@@ -29,13 +29,12 @@
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript">
-var dialog = window.parent ;
-var oEditor = dialog.InnerDialogLoaded() ;
+var oEditor = window.parent.InnerDialogLoaded() ;
// Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ;
-var oActiveEl = dialog.Selection.GetSelectedElement() ;
+var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
window.onload = function()
{
@@ -51,16 +50,20 @@ window.onload = function()
else
oActiveEl = null ;
- dialog.SetOkButton( true ) ;
- dialog.SetAutoSize( true ) ;
- SelectField( 'txtName' ) ;
+ window.parent.SetOkButton( true ) ;
}
function Ok()
{
- oEditor.FCKUndo.SaveUndoStep() ;
+ if ( !oActiveEl )
+ {
+ oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
+ oActiveEl.type = 'checkbox' ;
+ oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
+ }
- oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'checkbox' } ) ;
+ if ( GetE('txtName').value.length > 0 )
+ oActiveEl.name = GetE('txtName').value ;
if ( oEditor.FCKBrowserInfo.IsIE )
oActiveEl.value = GetE('txtValue').value ;