/source/Plug-in/fck/editor/dialog/fck_checkbox.html

http://prosporous.googlecode.com/ · HTML · 110 lines · 75 code · 13 blank · 22 comment · 0 complexity · c169f3b9684d37acbed4b73a418e37a5 MD5 · raw file

  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-2007 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. * Checkbox dialog window.
  23. -->
  24. <html>
  25. <head>
  26. <title>Checkbox 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 oEditor = window.parent.InnerDialogLoaded() ;
  32. // Gets the document DOM
  33. var oDOM = oEditor.FCK.EditorDocument ;
  34. var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
  35. window.onload = function()
  36. {
  37. // First of all, translate the dialog box texts
  38. oEditor.FCKLanguageManager.TranslatePage(document) ;
  39. if ( oActiveEl && oActiveEl.tagName == 'INPUT' && oActiveEl.type == 'checkbox' )
  40. {
  41. GetE('txtName').value = oActiveEl.name ;
  42. GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
  43. GetE('txtSelected').checked = oActiveEl.checked ;
  44. }
  45. else
  46. oActiveEl = null ;
  47. window.parent.SetOkButton( true ) ;
  48. window.parent.SetAutoSize( true ) ;
  49. }
  50. function Ok()
  51. {
  52. oEditor.FCKUndo.SaveUndoStep() ;
  53. if ( !oActiveEl )
  54. {
  55. oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
  56. oActiveEl.type = 'checkbox' ;
  57. oActiveEl = oEditor.FCK.InsertElement( oActiveEl ) ;
  58. }
  59. if ( GetE('txtName').value.length > 0 )
  60. oActiveEl.name = GetE('txtName').value ;
  61. if ( oEditor.FCKBrowserInfo.IsIE )
  62. oActiveEl.value = GetE('txtValue').value ;
  63. else
  64. SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
  65. var bIsChecked = GetE('txtSelected').checked ;
  66. SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox
  67. oActiveEl.checked = bIsChecked ;
  68. return true ;
  69. }
  70. </script>
  71. </head>
  72. <body style="OVERFLOW: hidden" scroll="no">
  73. <table height="100%" width="100%">
  74. <tr>
  75. <td align="center">
  76. <table border="0" cellpadding="0" cellspacing="0" width="80%">
  77. <tr>
  78. <td>
  79. <span fckLang="DlgCheckboxName">Name</span><br>
  80. <input type="text" size="20" id="txtName" style="WIDTH: 100%">
  81. </td>
  82. </tr>
  83. <tr>
  84. <td>
  85. <span fckLang="DlgCheckboxValue">Value</span><br>
  86. <input type="text" size="20" id="txtValue" style="WIDTH: 100%">
  87. </td>
  88. </tr>
  89. <tr>
  90. <td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>
  91. </tr>
  92. </table>
  93. </td>
  94. </tr>
  95. </table>
  96. </body>
  97. </html>