/pigeoncms/Plugins/fckeditor/editor/plugins/placeholder/fck_placeholder.html

http://pigeoncms.googlecode.com/ · HTML · 105 lines · 69 code · 14 blank · 22 comment · 0 complexity · 0c0a7ec7d8c7889db613a14fd12c0862 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-2009 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. * Placeholder Plugin.
  23. -->
  24. <html>
  25. <head>
  26. <title>Placeholder Properties</title>
  27. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  28. <meta content="noindex, nofollow" name="robots">
  29. <script src="../../dialog/common/fck_dialog_common.js" type="text/javascript"></script>
  30. <script language="javascript">
  31. var dialog = window.parent ;
  32. var oEditor = dialog.InnerDialogLoaded() ;
  33. var FCKLang = oEditor.FCKLang ;
  34. var FCKPlaceholders = oEditor.FCKPlaceholders ;
  35. window.onload = function ()
  36. {
  37. // First of all, translate the dialog box texts
  38. oEditor.FCKLanguageManager.TranslatePage( document ) ;
  39. LoadSelected() ;
  40. // Show the "Ok" button.
  41. dialog.SetOkButton( true ) ;
  42. // Select text field on load.
  43. SelectField( 'txtName' ) ;
  44. }
  45. var eSelected = dialog.Selection.GetSelectedElement() ;
  46. function LoadSelected()
  47. {
  48. if ( !eSelected )
  49. return ;
  50. if ( eSelected.tagName == 'SPAN' && eSelected._fckplaceholder )
  51. document.getElementById('txtName').value = eSelected._fckplaceholder ;
  52. else
  53. eSelected == null ;
  54. }
  55. function Ok()
  56. {
  57. var sValue = document.getElementById('txtName').value ;
  58. if ( eSelected && eSelected._fckplaceholder == sValue )
  59. return true ;
  60. if ( sValue.length == 0 )
  61. {
  62. alert( FCKLang.PlaceholderErrNoName ) ;
  63. return false ;
  64. }
  65. if ( FCKPlaceholders.Exist( sValue ) )
  66. {
  67. alert( FCKLang.PlaceholderErrNameInUse ) ;
  68. return false ;
  69. }
  70. FCKPlaceholders.Add( sValue ) ;
  71. return true ;
  72. }
  73. </script>
  74. </head>
  75. <body scroll="no" style="OVERFLOW: hidden">
  76. <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
  77. <tr>
  78. <td>
  79. <table cellSpacing="0" cellPadding="0" align="center" border="0">
  80. <tr>
  81. <td>
  82. <span fckLang="PlaceholderDlgName">Placeholder Name</span><br>
  83. <input id="txtName" type="text">
  84. </td>
  85. </tr>
  86. </table>
  87. </td>
  88. </tr>
  89. </table>
  90. </body>
  91. </html>