[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/FCKeditor/editor/plugins/placeholder/ -> fck_placeholder.html (source)

   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-2008 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  
  32  var dialog = window.parent ;
  33  var oEditor = dialog.InnerDialogLoaded() ;
  34  var FCKLang = oEditor.FCKLang ;
  35  var FCKPlaceholders = oEditor.FCKPlaceholders ;
  36  
  37  window.onload = function ()
  38  {
  39      // First of all, translate the dialog box texts

  40      oEditor.FCKLanguageManager.TranslatePage( document ) ;
  41  
  42      LoadSelected() ;
  43  
  44      // Show the "Ok" button.

  45      dialog.SetOkButton( true ) ;
  46  
  47      // Select text field on load.

  48      SelectField( 'txtName' ) ;
  49  }
  50  
  51  var eSelected = dialog.Selection.GetSelectedElement() ;
  52  
  53  function LoadSelected()
  54  {
  55      if ( !eSelected )
  56          return ;
  57  
  58      if ( eSelected.tagName == 'SPAN' && eSelected._fckplaceholder )
  59          document.getElementById('txtName').value = eSelected._fckplaceholder ;
  60      else
  61          eSelected == null ;
  62  }
  63  
  64  function Ok()
  65  {
  66      var sValue = document.getElementById('txtName').value ;
  67  
  68      if ( eSelected && eSelected._fckplaceholder == sValue )
  69          return true ;
  70  
  71      if ( sValue.length == 0 )
  72      {
  73          alert( FCKLang.PlaceholderErrNoName ) ;
  74          return false ;
  75      }
  76  
  77      if ( FCKPlaceholders.Exist( sValue ) )
  78      {
  79          alert( FCKLang.PlaceholderErrNameInUse ) ;
  80          return false ;
  81      }
  82  
  83      FCKPlaceholders.Add( sValue ) ;
  84      return true ;
  85  }
  86  
  87          </script>
  88      </head>
  89      <body scroll="no" style="OVERFLOW: hidden">
  90          <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
  91              <tr>
  92                  <td>
  93                      <table cellSpacing="0" cellPadding="0" align="center" border="0">
  94                          <tr>
  95                              <td>
  96                                  <span fckLang="PlaceholderDlgName">Placeholder Name</span><br>
  97                                  <input id="txtName" type="text">
  98                              </td>
  99                          </tr>
 100                      </table>
 101                  </td>
 102              </tr>
 103          </table>
 104      </body>
 105  </html>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7