fck_radiobutton.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. * Radio Button dialog window.
  23. -->
  24. <html>
  25. <head>
  26. <title>Radio 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 == 'radio' )
  41. {
  42. GetE('txtName').value = oActiveEl.name ;
  43. GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
  44. GetE('txtSelected').checked = oActiveEl.checked ;
  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: 'radio' } ) ;
  56. if ( oEditor.FCKBrowserInfo.IsIE )
  57. oActiveEl.value = GetE('txtValue').value ;
  58. else
  59. SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
  60. var bIsChecked = GetE('txtSelected').checked ;
  61. SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox
  62. oActiveEl.checked = bIsChecked ;
  63. return true ;
  64. }
  65. </script>
  66. <style type="text/css">
  67. body, td, input, textarea, select, label { font-family: Arial, Verdana, Geneva, helvetica, sans-serif; font-size: 11px; }
  68. </style>
  69. </head>
  70. <body style="OVERFLOW: hidden" scroll="no">
  71. <table height="100%" width="100%">
  72. <tr>
  73. <td align="center">
  74. <table border="0" cellpadding="0" cellspacing="0" width="80%">
  75. <tr>
  76. <td>
  77. <span fckLang="DlgCheckboxName">Name</span><br>
  78. <input type="text" size="20" id="txtName" style="WIDTH: 100%">
  79. </td>
  80. </tr>
  81. <tr>
  82. <td>
  83. <span fckLang="DlgCheckboxValue">Value</span><br>
  84. <input type="text" size="20" id="txtValue" style="WIDTH: 100%">
  85. </td>
  86. </tr>
  87. <tr>
  88. <td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>
  89. </tr>
  90. </table>
  91. </td>
  92. </tr>
  93. </table>
  94. </body>
  95. </html>