1,21 → 1,25 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > |
<!-- |
* FCKeditor - The text editor for internet |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben |
* |
* Licensed under the terms of the GNU Lesser General Public License: |
* http://www.opensource.org/licenses/lgpl-license.php |
* |
* For further information visit: |
* http://www.fckeditor.net/ |
* |
* "Support Open Source software. What about a donation today?" |
* |
* File Name: fck_form.html |
* Form dialog window. |
* |
* File Authors: |
* Frederico Caldeira Knabben (fredck@fckeditor.net) |
* FCKeditor - The text editor for Internet - http://www.fckeditor.net |
* Copyright (C) 2003-2008 Frederico Caldeira Knabben |
* |
* == BEGIN LICENSE == |
* |
* Licensed under the terms of any of the following licenses at your |
* choice: |
* |
* - GNU General Public License Version 2 or later (the "GPL") |
* http://www.gnu.org/licenses/gpl.html |
* |
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
* http://www.gnu.org/licenses/lgpl.html |
* |
* - Mozilla Public License Version 1.1 or later (the "MPL") |
* http://www.mozilla.org/MPL/MPL-1.1.html |
* |
* == END LICENSE == |
* |
* Form dialog window. |
--> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head> |
25,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.MoveToAncestorNode( 'FORM' ) ; |
var oActiveEl = dialog.Selection.GetSelection().MoveToAncestorNode( 'FORM' ) ; |
|
window.onload = function() |
{ |
37,7 → 42,7 |
// First of all, translate the dialog box texts |
oEditor.FCKLanguageManager.TranslatePage(document) ; |
|
if ( oActiveEl ) |
if ( oActiveEl ) |
{ |
GetE('txtName').value = oActiveEl.name ; |
GetE('txtAction').value = oActiveEl.getAttribute( 'action', 2 ) ; |
46,7 → 51,9 |
else |
oActiveEl = null ; |
|
window.parent.SetOkButton( true ) ; |
dialog.SetOkButton( true ) ; |
dialog.SetAutoSize( true ) ; |
SelectField( 'txtName' ) ; |
} |
|
function Ok() |
53,13 → 60,14 |
{ |
if ( !oActiveEl ) |
{ |
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'FORM' ) ; |
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ; |
oActiveEl.innerHTML = ' ' ; |
oActiveEl = oEditor.FCK.InsertElement( 'form' ) ; |
|
if ( oEditor.FCKBrowserInfo.IsGeckoLike ) |
oEditor.FCKTools.AppendBogusBr( oActiveEl ) ; |
} |
|
|
oActiveEl.name = GetE('txtName').value ; |
SetAttribute( oActiveEl, 'action' , GetE('txtAction').value ) ; |
SetAttribute( oActiveEl, 'action', GetE('txtAction').value ) ; |
oActiveEl.method = GetE('txtMethod').value ; |
|
return true ; |