fck_hiddenfield.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  2. <!--
  3. * FCKeditor - The text editor for Internet - http://www.fckeditor.net
  4. * Copyright (C) 2003-2010 Frederico Caldeira Knabben
  5. *
  6. * == BEGIN LICENSE ==
  7. *
  8. * Licensed under the terms of any of the following licenses at your
  9. * choice:
  10. *
  11. * - GNU General Public License Version 2 or later (the "GPL")
  12. * http://www.gnu.org/licenses/gpl.html
  13. *
  14. * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  15. * http://www.gnu.org/licenses/lgpl.html
  16. *
  17. * - Mozilla Public License Version 1.1 or later (the "MPL")
  18. * http://www.mozilla.org/MPL/MPL-1.1.html
  19. *
  20. * == END LICENSE ==
  21. *
  22. * Hidden Field dialog window.
  23. -->
  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. var dialog = window.parent ;
  32. var oEditor = dialog.InnerDialogLoaded() ;
  33. var FCK = oEditor.FCK ;
  34. // Gets the document DOM
  35. var oDOM = FCK.EditorDocument ;
  36. // Get the selected flash embed (if available).
  37. var oFakeImage = dialog.Selection.GetSelectedElement() ;
  38. var oActiveEl ;
  39. if ( oFakeImage )
  40. {
  41. if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckinputhidden') )
  42. oActiveEl = FCK.GetRealElement( oFakeImage ) ;
  43. else
  44. oFakeImage = null ;
  45. }
  46. window.onload = function()
  47. {
  48. // First of all, translate the dialog box texts
  49. oEditor.FCKLanguageManager.TranslatePage(document) ;
  50. if ( oActiveEl )
  51. {
  52. GetE('txtName').value = oActiveEl.name ;
  53. GetE('txtValue').value = oActiveEl.value ;
  54. }
  55. dialog.SetOkButton( true ) ;
  56. dialog.SetAutoSize( true ) ;
  57. SelectField( 'txtName' ) ;
  58. }
  59. function Ok()
  60. {
  61. oEditor.FCKUndo.SaveUndoStep() ;
  62. oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'hidden' } ) ;
  63. SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
  64. if ( !oFakeImage )
  65. {
  66. oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__InputHidden', oActiveEl ) ;
  67. oFakeImage.setAttribute( '_fckinputhidden', 'true', 0 ) ;
  68. oActiveEl.parentNode.insertBefore( oFakeImage, oActiveEl ) ;
  69. oActiveEl.parentNode.removeChild( oActiveEl ) ;
  70. }
  71. else
  72. oEditor.FCKUndo.SaveUndoStep() ;
  73. return true ;
  74. }
  75. </script>
  76. <style type="text/css">
  77. body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
  78. </style>
  79. </head>
  80. <body style="overflow: hidden" scroll="no">
  81. <table height="100%" width="100%">
  82. <tr>
  83. <td align="center">
  84. <table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%">
  85. <tr>
  86. <td>
  87. <span fcklang="DlgHiddenName">Name</span><br />
  88. <input type="text" size="20" id="txtName" style="width: 100%" />
  89. </td>
  90. </tr>
  91. <tr>
  92. <td>
  93. <span fcklang="DlgHiddenValue">Value</span><br />
  94. <input type="text" size="30" id="txtValue" style="width: 100%" />
  95. </td>
  96. </tr>
  97. </table>
  98. </td>
  99. </tr>
  100. </table>
  101. </body>
  102. </html>