- Timestamp:
- 2007-03-27 11:04:26 (21 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/branches/features/dataprocessor/editor/dialog/fck_hiddenfield.html
r132 r225 22 22 * Hidden Field dialog window. 23 23 --> 24 <html >25 <head>26 <title>Hidden Field Properties</title>27 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">28 <meta content="noindex, nofollow" name="robots">29 <script src="common/fck_dialog_common.js" type="text/javascript"></script>30 <script type="text/javascript">24 <html xmlns="http://www.w3.org/1999/xhtml"> 25 <head> 26 <title>Hidden Field Properties</title> 27 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 28 <meta content="noindex, nofollow" name="robots" /> 29 <script src="common/fck_dialog_common.js" type="text/javascript"></script> 30 <script type="text/javascript"> 31 31 32 32 var oEditor = window.parent.InnerDialogLoaded() ; 33 var FCK = oEditor.FCK ; 33 34 34 35 // Gets the document DOM 35 var oDOM = oEditor.FCK.EditorDocument ;36 var oDOM = FCK.EditorDocument ; 36 37 37 var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ; 38 // Get the selected flash embed (if available). 39 var oFakeImage = FCK.Selection.GetSelectedElement() ; 40 var oActiveEl ; 41 42 if ( oFakeImage ) 43 { 44 if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckinputhidden') ) 45 oActiveEl = FCK.GetRealElement( oFakeImage ) ; 46 else 47 oFakeImage = null ; 48 } 38 49 39 50 window.onload = function() … … 42 53 oEditor.FCKLanguageManager.TranslatePage(document) ; 43 54 44 if ( oActiveEl && oActiveEl.tagName == 'INPUT' && oActiveEl.type == 'hidden')55 if ( oActiveEl ) 45 56 { 46 57 GetE('txtName').value = oActiveEl.name ; 47 58 GetE('txtValue').value = oActiveEl.value ; 48 59 } 49 else50 oActiveEl = null ;51 60 52 61 window.parent.SetOkButton( true ) ; … … 58 67 if ( !oActiveEl ) 59 68 { 60 oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;69 oActiveEl = FCK.EditorDocument.createElement( 'INPUT' ) ; 61 70 oActiveEl.type = 'hidden' ; 62 oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ; 71 72 oFakeImage = null ; 63 73 } 64 74 … … 66 76 SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ; 67 77 78 if ( !oFakeImage ) 79 { 80 oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__InputHidden', oActiveEl ) ; 81 oFakeImage.setAttribute( '_fckinputhidden', 'true', 0 ) ; 82 oFakeImage = FCK.InsertElementAndGetIt( oFakeImage ) ; 83 } 84 else 85 oEditor.FCKUndo.SaveUndoStep() ; 86 87 oEditor.FCKFlashProcessor.RefreshView( oFakeImage, oActiveEl ) ; 88 68 89 return true ; 69 90 } 70 91 71 </script>72 </head>73 <body style="OVERFLOW: hidden" scroll="no">74 <table height="100%" width="100%">75 <tr>76 <td align="center">77 <table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%">78 <tr>79 <td>80 <span fckLang="DlgHiddenName">Name</span><br>81 <input type="text" size="20" id="txtName" style="WIDTH: 100%">82 </td>83 </tr>84 <tr>85 <td>86 <span fckLang="DlgHiddenValue">Value</span><br>87 <input type="text" size="30" id="txtValue" style="WIDTH: 100%">88 </td>89 </tr>90 </table>91 </td>92 </tr>93 </table>94 </body>92 </script> 93 </head> 94 <body style="overflow: hidden" scroll="no"> 95 <table height="100%" width="100%"> 96 <tr> 97 <td align="center"> 98 <table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%"> 99 <tr> 100 <td> 101 <span fcklang="DlgHiddenName">Name</span><br /> 102 <input type="text" size="20" id="txtName" style="width: 100%" /> 103 </td> 104 </tr> 105 <tr> 106 <td> 107 <span fcklang="DlgHiddenValue">Value</span><br /> 108 <input type="text" size="30" id="txtValue" style="width: 100%" /> 109 </td> 110 </tr> 111 </table> 112 </td> 113 </tr> 114 </table> 115 </body> 95 116 </html>