[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/FCKeditor/editor/dialog/ -> fck_tablecell.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   * Cell properties dialog window.
  23  -->
  24  <html xmlns="http://www.w3.org/1999/xhtml">
  25  <head>
  26      <title>Table Cell Properties</title>
  27      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  28      <meta name="robots" content="noindex, nofollow" />
  29      <script src="common/fck_dialog_common.js" type="text/javascript"></script>
  30      <script type="text/javascript">
  31  
  32  var dialog    = window.parent ;
  33  var oEditor = dialog.InnerDialogLoaded() ;
  34  
  35  // Gets the document DOM

  36  var oDOM = oEditor.FCK.EditorDocument ;
  37  
  38  // Array of selected Cells

  39  var aCells = oEditor.FCKTableHandler.GetSelectedCells() ;
  40  
  41  window.onload = function()
  42  {
  43      // First of all, translate the dialog box texts

  44      oEditor.FCKLanguageManager.TranslatePage( document ) ;
  45  
  46      SetStartupValue() ;
  47  
  48      dialog.SetOkButton( true ) ;
  49      dialog.SetAutoSize( true ) ;
  50      SelectField( 'txtWidth' ) ;
  51  }
  52  
  53  function SetStartupValue()
  54  {
  55      if ( aCells.length > 0 )
  56      {
  57          var oCell = aCells[0] ;
  58          var iWidth = GetAttribute( oCell, 'width' ) ;
  59  
  60          if ( iWidth.indexOf && iWidth.indexOf( '%' ) >= 0 )
  61          {
  62              iWidth = iWidth.substr( 0, iWidth.length - 1 ) ;
  63              GetE('selWidthType').value = 'percent' ;
  64          }
  65  
  66          if ( oCell.attributes['noWrap'] != null && oCell.attributes['noWrap'].specified )
  67              GetE('selWordWrap').value = !oCell.noWrap ;
  68  
  69          GetE('txtWidth').value            = iWidth ;
  70          GetE('txtHeight').value            = GetAttribute( oCell, 'height' ) ;
  71          GetE('selHAlign').value            = GetAttribute( oCell, 'align' ) ;
  72          GetE('selVAlign').value            = GetAttribute( oCell, 'vAlign' ) ;
  73          GetE('txtRowSpan').value        = GetAttribute( oCell, 'rowSpan' ) ;
  74          GetE('txtCollSpan').value        = GetAttribute( oCell, 'colSpan' ) ;
  75          GetE('txtBackColor').value        = GetAttribute( oCell, 'bgColor' ) ;
  76          GetE('txtBorderColor').value    = GetAttribute( oCell, 'borderColor' ) ;
  77  //        GetE('cmbFontStyle').value        = oCell.className ;

  78      }
  79  }
  80  
  81  // Fired when the user press the OK button

  82  function Ok()
  83  {
  84      for( i = 0 ; i < aCells.length ; i++ )
  85      {
  86          if ( GetE('txtWidth').value.length > 0 )
  87              aCells[i].width    = GetE('txtWidth').value + ( GetE('selWidthType').value == 'percent' ? '%' : '') ;
  88          else
  89              aCells[i].removeAttribute( 'width', 0 ) ;
  90  
  91          if ( GetE('selWordWrap').value == 'false' )
  92              SetAttribute( aCells[i], 'noWrap', 'nowrap' ) ;
  93          else
  94              aCells[i].removeAttribute( 'noWrap' ) ;
  95  
  96          SetAttribute( aCells[i], 'height'        , GetE('txtHeight').value ) ;
  97          SetAttribute( aCells[i], 'align'        , GetE('selHAlign').value ) ;
  98          SetAttribute( aCells[i], 'vAlign'        , GetE('selVAlign').value ) ;
  99          SetAttribute( aCells[i], 'rowSpan'        , GetE('txtRowSpan').value ) ;
 100          SetAttribute( aCells[i], 'colSpan'        , GetE('txtCollSpan').value ) ;
 101          SetAttribute( aCells[i], 'bgColor'        , GetE('txtBackColor').value ) ;
 102          SetAttribute( aCells[i], 'borderColor'    , GetE('txtBorderColor').value ) ;
 103  //        SetAttribute( aCells[i], 'className'    , GetE('cmbFontStyle').value ) ;

 104      }
 105  
 106      return true ;
 107  }
 108  
 109  function SelectBackColor( color )
 110  {
 111      if ( color && color.length > 0 )
 112          GetE('txtBackColor').value = color ;
 113  }
 114  
 115  function SelectBorderColor( color )
 116  {
 117      if ( color && color.length > 0 )
 118          GetE('txtBorderColor').value = color ;
 119  }
 120  
 121  function SelectColor( wich )
 122  {
 123      oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ;
 124  }
 125  
 126      </script>
 127  </head>
 128  <body scroll="no" style="overflow: hidden">
 129      <table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
 130          <tr>
 131              <td>
 132                  <table cellspacing="1" cellpadding="1" width="100%" border="0">
 133                      <tr>
 134                          <td>
 135                              <table cellspacing="0" cellpadding="0" border="0">
 136                                  <tr>
 137                                      <td nowrap="nowrap">
 138                                          <span fcklang="DlgCellWidth">Width</span>:</td>
 139                                      <td>
 140                                          &nbsp;<input onkeypress="return IsDigit(event);" id="txtWidth" type="text" maxlength="4"
 141                                              size="3" name="txtWidth" />&nbsp;<select id="selWidthType" name="selWidthType">
 142                                                  <option fcklang="DlgCellWidthPx" value="pixels" selected="selected">pixels</option>
 143                                                  <option fcklang="DlgCellWidthPc" value="percent">percent</option>
 144                                              </select></td>
 145                                  </tr>
 146                                  <tr>
 147                                      <td nowrap="nowrap">
 148                                          <span fcklang="DlgCellHeight">Height</span>:</td>
 149                                      <td>
 150                                          &nbsp;<input id="txtHeight" type="text" maxlength="4" size="3" name="txtHeight" onkeypress="return IsDigit(event);" />&nbsp;<span
 151                                              fcklang="DlgCellWidthPx">pixels</span></td>
 152                                  </tr>
 153                                  <tr>
 154                                      <td>
 155                                          &nbsp;</td>
 156                                      <td>
 157                                          &nbsp;</td>
 158                                  </tr>
 159                                  <tr>
 160                                      <td nowrap="nowrap">
 161                                          <span fcklang="DlgCellWordWrap">Word Wrap</span>:</td>
 162                                      <td>
 163                                          &nbsp;<select id="selWordWrap" name="selAlignment">
 164                                              <option fcklang="DlgCellWordWrapYes" value="true" selected="selected">Yes</option>
 165                                              <option fcklang="DlgCellWordWrapNo" value="false">No</option>
 166                                          </select></td>
 167                                  </tr>
 168                                  <tr>
 169                                      <td>
 170                                          &nbsp;</td>
 171                                      <td>
 172                                          &nbsp;</td>
 173                                  </tr>
 174                                  <tr>
 175                                      <td nowrap="nowrap">
 176                                          <span fcklang="DlgCellHorAlign">Horizontal Alignment</span>:</td>
 177                                      <td>
 178                                          &nbsp;<select id="selHAlign" name="selAlignment">
 179                                              <option fcklang="DlgCellHorAlignNotSet" value="" selected>&lt;Not set&gt;</option>
 180                                              <option fcklang="DlgCellHorAlignLeft" value="left">Left</option>
 181                                              <option fcklang="DlgCellHorAlignCenter" value="center">Center</option>
 182                                              <option fcklang="DlgCellHorAlignRight" value="right">Right</option>
 183                                          </select></td>
 184                                  </tr>
 185                                  <tr>
 186                                      <td nowrap="nowrap">
 187                                          <span fcklang="DlgCellVerAlign">Vertical Alignment</span>:</td>
 188                                      <td>
 189                                          &nbsp;<select id="selVAlign" name="selAlignment">
 190                                              <option fcklang="DlgCellVerAlignNotSet" value="" selected>&lt;Not set&gt;</option>
 191                                              <option fcklang="DlgCellVerAlignTop" value="top">Top</option>
 192                                              <option fcklang="DlgCellVerAlignMiddle" value="middle">Middle</option>
 193                                              <option fcklang="DlgCellVerAlignBottom" value="bottom">Bottom</option>
 194                                              <option fcklang="DlgCellVerAlignBaseline" value="baseline">Baseline</option>
 195                                          </select></td>
 196                                  </tr>
 197                              </table>
 198                          </td>
 199                          <td>
 200                              &nbsp;&nbsp;&nbsp;</td>
 201                          <td align="right">
 202                              <table cellspacing="0" cellpadding="0" border="0">
 203                                  <tr>
 204                                      <td nowrap="nowrap">
 205                                          <span fcklang="DlgCellRowSpan">Rows Span</span>:</td>
 206                                      <td>
 207                                          &nbsp;
 208                                          <input onkeypress="return IsDigit(event);" id="txtRowSpan" type="text" maxlength="3" size="2"
 209                                              name="txtRows"></td>
 210                                      <td>
 211                                      </td>
 212                                  </tr>
 213                                  <tr>
 214                                      <td nowrap="nowrap">
 215                                          <span fcklang="DlgCellCollSpan">Columns Span</span>:</td>
 216                                      <td>
 217                                          &nbsp;
 218                                          <input onkeypress="return IsDigit(event);" id="txtCollSpan" type="text" maxlength="2"
 219                                              size="2" name="txtColumns"></td>
 220                                      <td>
 221                                      </td>
 222                                  </tr>
 223                                  <tr>
 224                                      <td>
 225                                          &nbsp;</td>
 226                                      <td>
 227                                          &nbsp;</td>
 228                                      <td>
 229                                          &nbsp;</td>
 230                                  </tr>
 231                                  <tr>
 232                                      <td nowrap="nowrap">
 233                                          <span fcklang="DlgCellBackColor">Background Color</span>:</td>
 234                                      <td>
 235                                          &nbsp;<input id="txtBackColor" type="text" size="8" name="txtCellSpacing"></td>
 236                                      <td>
 237                                          &nbsp;
 238                                          <input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Back' )"></td>
 239                                  </tr>
 240                                  <tr>
 241                                      <td nowrap="nowrap">
 242                                          <span fcklang="DlgCellBorderColor">Border Color</span>:</td>
 243                                      <td>
 244                                          &nbsp;<input id="txtBorderColor" type="text" size="8" name="txtCellPadding" /></td>
 245                                      <td>
 246                                          &nbsp;
 247                                          <input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Border' )" /></td>
 248                                  </tr>
 249                              </table>
 250                          </td>
 251                      </tr>
 252                  </table>
 253              </td>
 254          </tr>
 255      </table>
 256  </body>
 257  </html>


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