+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >\r
-<!--\r
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
- * Copyright (C) 2003-2010 Frederico Caldeira Knabben\r
- *\r
- * == BEGIN LICENSE ==\r
- *\r
- * Licensed under the terms of any of the following licenses at your\r
- * choice:\r
- *\r
- * - GNU General Public License Version 2 or later (the "GPL")\r
- * http://www.gnu.org/licenses/gpl.html\r
- *\r
- * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
- * http://www.gnu.org/licenses/lgpl.html\r
- *\r
- * - Mozilla Public License Version 1.1 or later (the "MPL")\r
- * http://www.mozilla.org/MPL/MPL-1.1.html\r
- *\r
- * == END LICENSE ==\r
- *\r
- * Text field dialog window.\r
--->\r
-<html xmlns="http://www.w3.org/1999/xhtml">\r
-<head>\r
- <title></title>\r
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
- <meta content="noindex, nofollow" name="robots" />\r
- <script src="common/fck_dialog_common.js" type="text/javascript"></script>\r
- <script type="text/javascript">\r
-\r
-var dialog = window.parent ;\r
-var oEditor = dialog.InnerDialogLoaded() ;\r
-\r
-// Gets the document DOM\r
-var oDOM = oEditor.FCK.EditorDocument ;\r
-\r
-var oActiveEl = dialog.Selection.GetSelectedElement() ;\r
-\r
-window.onload = function()\r
-{\r
- // First of all, translate the dialog box texts\r
- oEditor.FCKLanguageManager.TranslatePage(document) ;\r
-\r
- if ( oActiveEl && oActiveEl.tagName == 'INPUT' && ( oActiveEl.type == 'text' || oActiveEl.type == 'password' ) )\r
- {\r
- GetE('txtName').value = oActiveEl.name ;\r
- GetE('txtValue').value = oActiveEl.value ;\r
- GetE('txtSize').value = GetAttribute( oActiveEl, 'size' ) ;\r
- GetE('txtMax').value = GetAttribute( oActiveEl, 'maxLength' ) ;\r
- GetE('txtType').value = oActiveEl.type ;\r
- }\r
- else\r
- oActiveEl = null ;\r
-\r
- dialog.SetOkButton( true ) ;\r
- dialog.SetAutoSize( true ) ;\r
- SelectField( 'txtName' ) ;\r
-}\r
-\r
-function Ok()\r
-{\r
- if ( isNaN( GetE('txtMax').value ) || GetE('txtMax').value < 0 )\r
- {\r
- alert( "Maximum characters must be a positive number." ) ;\r
- GetE('txtMax').focus() ;\r
- return false ;\r
- }\r
- else if( isNaN( GetE('txtSize').value ) || GetE('txtSize').value < 0 )\r
- {\r
- alert( "Width must be a positive number." ) ;\r
- GetE('txtSize').focus() ;\r
- return false ;\r
- }\r
-\r
- oEditor.FCKUndo.SaveUndoStep() ;\r
-\r
- oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: GetE('txtType').value } ) ;\r
-\r
- SetAttribute( oActiveEl, 'value' , GetE('txtValue').value ) ;\r
- SetAttribute( oActiveEl, 'size' , GetE('txtSize').value ) ;\r
- SetAttribute( oActiveEl, 'maxlength', GetE('txtMax').value ) ;\r
-\r
- return true ;\r
-}\r
-\r
- </script>\r
-</head>\r
-<body style="overflow: hidden">\r
- <table width="100%" style="height: 100%">\r
- <tr>\r
- <td align="center">\r
- <table cellspacing="0" cellpadding="0" border="0">\r
- <tr>\r
- <td>\r
- <span fcklang="DlgTextName">Name</span><br />\r
- <input id="txtName" type="text" size="20" />\r
- </td>\r
- <td>\r
- </td>\r
- <td>\r
- <span fcklang="DlgTextValue">Value</span><br />\r
- <input id="txtValue" type="text" size="25" />\r
- </td>\r
- </tr>\r
- <tr>\r
- <td>\r
- <span fcklang="DlgTextCharWidth">Character Width</span><br />\r
- <input id="txtSize" type="text" size="5" />\r
- </td>\r
- <td>\r
- </td>\r
- <td>\r
- <span fcklang="DlgTextMaxChars">Maximum Characters</span><br />\r
- <input id="txtMax" type="text" size="5" />\r
- </td>\r
- </tr>\r
- <tr>\r
- <td>\r
- <span fcklang="DlgTextType">Type</span><br />\r
- <select id="txtType">\r
- <option value="text" selected="selected" fcklang="DlgTextTypeText">Text</option>\r
- <option value="password" fcklang="DlgTextTypePass">Password</option>\r
- </select>\r
- </td>\r
- <td>\r
- </td>\r
- <td>\r
- </td>\r
- </tr>\r
- </table>\r
- </td>\r
- </tr>\r
- </table>\r
-</body>\r
-</html>\r