event refactor, landing on HEAD!
[freeside.git] / httemplate / elements / fckeditor / editor / dialog / fck_tablecell.html
diff --git a/httemplate/elements/fckeditor/editor/dialog/fck_tablecell.html b/httemplate/elements/fckeditor/editor/dialog/fck_tablecell.html
new file mode 100644 (file)
index 0000000..b7c536b
--- /dev/null
@@ -0,0 +1,255 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >\r
+<!--\r
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben\r
+ *\r
+ * == BEGIN LICENSE ==\r
+ *\r
+ * Licensed under the terms of any of the following licenses at your\r
+ * choice:\r
+ *\r
+ *  - GNU General Public License Version 2 or later (the "GPL")\r
+ *    http://www.gnu.org/licenses/gpl.html\r
+ *\r
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
+ *    http://www.gnu.org/licenses/lgpl.html\r
+ *\r
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")\r
+ *    http://www.mozilla.org/MPL/MPL-1.1.html\r
+ *\r
+ * == END LICENSE ==\r
+ *\r
+ * Cell properties dialog window.\r
+-->\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+       <title>Table Cell Properties</title>\r
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+       <meta name="robots" content="noindex, nofollow" />\r
+       <script src="common/fck_dialog_common.js" type="text/javascript"></script>\r
+       <script type="text/javascript">\r
+\r
+var oEditor = window.parent.InnerDialogLoaded() ;\r
+\r
+// Gets the document DOM\r
+var oDOM = oEditor.FCK.EditorDocument ;\r
+\r
+// Array of selected Cells\r
+var aCells = oEditor.FCKTableHandler.GetSelectedCells() ;\r
+\r
+window.onload = function()\r
+{\r
+       // First of all, translate the dialog box texts\r
+       oEditor.FCKLanguageManager.TranslatePage( document ) ;\r
+\r
+       SetStartupValue() ;\r
+\r
+       window.parent.SetOkButton( true ) ;\r
+       window.parent.SetAutoSize( true ) ;\r
+}\r
+\r
+function SetStartupValue()\r
+{\r
+       if ( aCells.length > 0 )\r
+       {\r
+               var oCell = aCells[0] ;\r
+               var iWidth = GetAttribute( oCell, 'width' ) ;\r
+\r
+               if ( iWidth.indexOf && iWidth.indexOf( '%' ) >= 0 )\r
+               {\r
+                       iWidth = iWidth.substr( 0, iWidth.length - 1 ) ;\r
+                       GetE('selWidthType').value = 'percent' ;\r
+               }\r
+\r
+               if ( oCell.attributes['noWrap'] != null && oCell.attributes['noWrap'].specified )\r
+                       GetE('selWordWrap').value = !oCell.noWrap ;\r
+\r
+               GetE('txtWidth').value                  = iWidth ;\r
+               GetE('txtHeight').value                 = GetAttribute( oCell, 'height' ) ;\r
+               GetE('selHAlign').value                 = GetAttribute( oCell, 'align' ) ;\r
+               GetE('selVAlign').value                 = GetAttribute( oCell, 'vAlign' ) ;\r
+               GetE('txtRowSpan').value                = GetAttribute( oCell, 'rowSpan' ) ;\r
+               GetE('txtCollSpan').value               = GetAttribute( oCell, 'colSpan' ) ;\r
+               GetE('txtBackColor').value              = GetAttribute( oCell, 'bgColor' ) ;\r
+               GetE('txtBorderColor').value    = GetAttribute( oCell, 'borderColor' ) ;\r
+//             GetE('cmbFontStyle').value              = oCell.className ;\r
+       }\r
+}\r
+\r
+// Fired when the user press the OK button\r
+function Ok()\r
+{\r
+       for( i = 0 ; i < aCells.length ; i++ )\r
+       {\r
+               if ( GetE('txtWidth').value.length > 0 )\r
+                       aCells[i].width = GetE('txtWidth').value + ( GetE('selWidthType').value == 'percent' ? '%' : '') ;\r
+               else\r
+                       aCells[i].removeAttribute( 'width', 0 ) ;\r
+\r
+               if ( GetE('selWordWrap').value == 'false' )\r
+                       aCells[i].noWrap = true ;\r
+               else\r
+                       aCells[i].removeAttribute( 'noWrap' ) ;\r
+\r
+               SetAttribute( aCells[i], 'height'               , GetE('txtHeight').value ) ;\r
+               SetAttribute( aCells[i], 'align'                , GetE('selHAlign').value ) ;\r
+               SetAttribute( aCells[i], 'vAlign'               , GetE('selVAlign').value ) ;\r
+               SetAttribute( aCells[i], 'rowSpan'              , GetE('txtRowSpan').value ) ;\r
+               SetAttribute( aCells[i], 'colSpan'              , GetE('txtCollSpan').value ) ;\r
+               SetAttribute( aCells[i], 'bgColor'              , GetE('txtBackColor').value ) ;\r
+               SetAttribute( aCells[i], 'borderColor'  , GetE('txtBorderColor').value ) ;\r
+//             SetAttribute( aCells[i], 'className'    , GetE('cmbFontStyle').value ) ;\r
+       }\r
+\r
+       return true ;\r
+}\r
+\r
+function SelectBackColor( color )\r
+{\r
+       if ( color && color.length > 0 )\r
+               GetE('txtBackColor').value = color ;\r
+}\r
+\r
+function SelectBorderColor( color )\r
+{\r
+       if ( color && color.length > 0 )\r
+               GetE('txtBorderColor').value = color ;\r
+}\r
+\r
+function SelectColor( wich )\r
+{\r
+       oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ;\r
+}\r
+\r
+       </script>\r
+</head>\r
+<body scroll="no" style="overflow: hidden">\r
+       <table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">\r
+               <tr>\r
+                       <td>\r
+                               <table cellspacing="1" cellpadding="1" width="100%" border="0">\r
+                                       <tr>\r
+                                               <td>\r
+                                                       <table cellspacing="0" cellpadding="0" border="0">\r
+                                                               <tr>\r
+                                                                       <td nowrap="nowrap">\r
+                                                                               <span fcklang="DlgCellWidth">Width</span>:</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;<input onkeypress="return IsDigit(event);" id="txtWidth" type="text" maxlength="4"\r
+                                                                                       size="3" name="txtWidth" />&nbsp;<select id="selWidthType" name="selWidthType">\r
+                                                                                               <option fcklang="DlgCellWidthPx" value="pixels" selected="selected">pixels</option>\r
+                                                                                               <option fcklang="DlgCellWidthPc" value="percent">percent</option>\r
+                                                                                       </select></td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td nowrap="nowrap">\r
+                                                                               <span fcklang="DlgCellHeight">Height</span>:</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;<input id="txtHeight" type="text" maxlength="4" size="3" name="txtHeight" onkeypress="return IsDigit(event);" />&nbsp;<span\r
+                                                                                       fcklang="DlgCellWidthPx">pixels</span></td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td>\r
+                                                                               &nbsp;</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;</td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td nowrap="nowrap">\r
+                                                                               <span fcklang="DlgCellWordWrap">Word Wrap</span>:</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;<select id="selWordWrap" name="selAlignment">\r
+                                                                                       <option fcklang="DlgCellWordWrapYes" value="true" selected="selected">Yes</option>\r
+                                                                                       <option fcklang="DlgCellWordWrapNo" value="false">No</option>\r
+                                                                               </select></td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td>\r
+                                                                               &nbsp;</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;</td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td nowrap="nowrap">\r
+                                                                               <span fcklang="DlgCellHorAlign">Horizontal Alignment</span>:</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;<select id="selHAlign" name="selAlignment">\r
+                                                                                       <option fcklang="DlgCellHorAlignNotSet" value="" selected>&lt;Not set&gt;</option>\r
+                                                                                       <option fcklang="DlgCellHorAlignLeft" value="left">Left</option>\r
+                                                                                       <option fcklang="DlgCellHorAlignCenter" value="center">Center</option>\r
+                                                                                       <option fcklang="DlgCellHorAlignRight" value="right">Right</option>\r
+                                                                               </select></td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td nowrap="nowrap">\r
+                                                                               <span fcklang="DlgCellVerAlign">Vertical Alignment</span>:</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;<select id="selVAlign" name="selAlignment">\r
+                                                                                       <option fcklang="DlgCellVerAlignNotSet" value="" selected>&lt;Not set&gt;</option>\r
+                                                                                       <option fcklang="DlgCellVerAlignTop" value="top">Top</option>\r
+                                                                                       <option fcklang="DlgCellVerAlignMiddle" value="middle">Middle</option>\r
+                                                                                       <option fcklang="DlgCellVerAlignBottom" value="bottom">Bottom</option>\r
+                                                                                       <option fcklang="DlgCellVerAlignBaseline" value="baseline">Baseline</option>\r
+                                                                               </select></td>\r
+                                                               </tr>\r
+                                                       </table>\r
+                                               </td>\r
+                                               <td>\r
+                                                       &nbsp;&nbsp;&nbsp;</td>\r
+                                               <td align="right">\r
+                                                       <table cellspacing="0" cellpadding="0" border="0">\r
+                                                               <tr>\r
+                                                                       <td nowrap="nowrap">\r
+                                                                               <span fcklang="DlgCellRowSpan">Rows Span</span>:</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;\r
+                                                                               <input onkeypress="return IsDigit(event);" id="txtRowSpan" type="text" maxlength="3" size="2"\r
+                                                                                       name="txtRows"></td>\r
+                                                                       <td>\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td nowrap="nowrap">\r
+                                                                               <span fcklang="DlgCellCollSpan">Columns Span</span>:</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;\r
+                                                                               <input onkeypress="return IsDigit(event);" id="txtCollSpan" type="text" maxlength="2"\r
+                                                                                       size="2" name="txtColumns"></td>\r
+                                                                       <td>\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td>\r
+                                                                               &nbsp;</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;</td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td nowrap="nowrap">\r
+                                                                               <span fcklang="DlgCellBackColor">Background Color</span>:</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;<input id="txtBackColor" type="text" size="8" name="txtCellSpacing"></td>\r
+                                                                       <td>\r
+                                                                               &nbsp;\r
+                                                                               <input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Back' )"></td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td nowrap="nowrap">\r
+                                                                               <span fcklang="DlgCellBorderColor">Border Color</span>:</td>\r
+                                                                       <td>\r
+                                                                               &nbsp;<input id="txtBorderColor" type="text" size="8" name="txtCellPadding" /></td>\r
+                                                                       <td>\r
+                                                                               &nbsp;\r
+                                                                               <input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Border' )" /></td>\r
+                                                               </tr>\r
+                                                       </table>\r
+                                               </td>\r
+                                       </tr>\r
+                               </table>\r
+                       </td>\r
+               </tr>\r
+       </table>\r
+</body>\r
+</html>\r