fck_button.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. * Button dialog window.
  23. -->
  24. <html xmlns="http://www.w3.org/1999/xhtml">
  25. <head>
  26. <title>Button 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. // Gets the document DOM
  34. var oDOM = oEditor.FCK.EditorDocument ;
  35. var oActiveEl = dialog.Selection.GetSelectedElement() ;
  36. window.onload = function()
  37. {
  38. // First of all, translate the dialog box texts
  39. oEditor.FCKLanguageManager.TranslatePage(document) ;
  40. if ( oActiveEl && oActiveEl.tagName.toUpperCase() == "INPUT" && ( oActiveEl.type == "button" || oActiveEl.type == "submit" || oActiveEl.type == "reset" ) )
  41. {
  42. GetE('txtName').value = oActiveEl.name ;
  43. GetE('txtValue').value = oActiveEl.value ;
  44. GetE('txtType').value = oActiveEl.type ;
  45. }
  46. else
  47. oActiveEl = null ;
  48. dialog.SetOkButton( true ) ;
  49. dialog.SetAutoSize( true ) ;
  50. SelectField( 'txtName' ) ;
  51. }
  52. function Ok()
  53. {
  54. oEditor.FCKUndo.SaveUndoStep() ;
  55. oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: GetE('txtType').value } ) ;
  56. SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
  57. return true ;
  58. }
  59. </script>
  60. <style type="text/css">
  61. body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
  62. </style>
  63. </head>
  64. <body style="overflow: hidden">
  65. <table width="100%" style="height: 100%">
  66. <tr>
  67. <td align="center">
  68. <table border="0" cellpadding="0" cellspacing="0" width="80%">
  69. <tr>
  70. <td colspan="">
  71. <span fcklang="DlgCheckboxName">Name</span><br />
  72. <input type="text" size="20" id="txtName" style="width: 100%" />
  73. </td>
  74. </tr>
  75. <tr>
  76. <td>
  77. <span fcklang="DlgButtonText">Text (Value)</span><br />
  78. <input type="text" id="txtValue" style="width: 100%" />
  79. </td>
  80. </tr>
  81. <tr>
  82. <td>
  83. <span fcklang="DlgButtonType">Type</span><br />
  84. <select id="txtType">
  85. <option fcklang="DlgButtonTypeBtn" value="button" selected="selected">Button</option>
  86. <option fcklang="DlgButtonTypeSbm" value="submit">Submit</option>
  87. <option fcklang="DlgButtonTypeRst" value="reset">Reset</option>
  88. </select>
  89. </td>
  90. </tr>
  91. </table>
  92. </td>
  93. </tr>
  94. </table>
  95. </body>
  96. </html>