+++ /dev/null
-<!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-2010 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
- * Color Selection dialog window.\r
--->\r
-<html>\r
- <head>\r
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
- <meta name="robots" content="noindex, nofollow" />\r
- <style TYPE="text/css">\r
- #ColorTable { cursor: pointer ; cursor: hand ; }\r
- #hicolor { height: 74px ; width: 74px ; border-width: 1px ; border-style: solid ; }\r
- #hicolortext { width: 75px ; text-align: right ; margin-bottom: 7px ; }\r
- #selhicolor { height: 20px ; width: 74px ; border-width: 1px ; border-style: solid ; }\r
- #selcolor { width: 75px ; height: 20px ; margin-top: 0px ; margin-bottom: 7px ; }\r
- #btnClear { width: 75px ; height: 22px ; margin-bottom: 6px ; }\r
- .ColorCell { height: 15px ; width: 15px ; }\r
- </style>\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
-function OnLoad()\r
-{\r
- // First of all, translate the dialog box texts\r
- oEditor.FCKLanguageManager.TranslatePage(document) ;\r
-\r
- CreateColorTable() ;\r
-\r
- window.parent.SetOkButton( true ) ;\r
- window.parent.SetAutoSize( true ) ;\r
-}\r
-\r
-function CreateColorTable()\r
-{\r
- // Get the target table.\r
- var oTable = document.getElementById('ColorTable') ;\r
-\r
- // Create the base colors array.\r
- var aColors = ['00','33','66','99','cc','ff'] ;\r
-\r
- // This function combines two ranges of three values from the color array into a row.\r
- function AppendColorRow( rangeA, rangeB )\r
- {\r
- for ( var i = rangeA ; i < rangeA + 3 ; i++ )\r
- {\r
- var oRow = oTable.insertRow(-1) ;\r
-\r
- for ( var j = rangeB ; j < rangeB + 3 ; j++ )\r
- {\r
- for ( var n = 0 ; n < 6 ; n++ )\r
- {\r
- AppendColorCell( oRow, '#' + aColors[j] + aColors[n] + aColors[i] ) ;\r
- }\r
- }\r
- }\r
- }\r
-\r
- // This function create a single color cell in the color table.\r
- function AppendColorCell( targetRow, color )\r
- {\r
- var oCell = targetRow.insertCell(-1) ;\r
- oCell.className = 'ColorCell' ;\r
- oCell.bgColor = color ;\r
-\r
- oCell.onmouseover = function()\r
- {\r
- document.getElementById('hicolor').style.backgroundColor = this.bgColor ;\r
- document.getElementById('hicolortext').innerHTML = this.bgColor ;\r
- }\r
-\r
- oCell.onclick = function()\r
- {\r
- document.getElementById('selhicolor').style.backgroundColor = this.bgColor ;\r
- document.getElementById('selcolor').value = this.bgColor ;\r
- }\r
- }\r
-\r
- AppendColorRow( 0, 0 ) ;\r
- AppendColorRow( 3, 0 ) ;\r
- AppendColorRow( 0, 3 ) ;\r
- AppendColorRow( 3, 3 ) ;\r
-\r
- // Create the last row.\r
- var oRow = oTable.insertRow(-1) ;\r
-\r
- // Create the gray scale colors cells.\r
- for ( var n = 0 ; n < 6 ; n++ )\r
- {\r
- AppendColorCell( oRow, '#' + aColors[n] + aColors[n] + aColors[n] ) ;\r
- }\r
-\r
- // Fill the row with black cells.\r
- for ( var i = 0 ; i < 12 ; i++ )\r
- {\r
- AppendColorCell( oRow, '#000000' ) ;\r
- }\r
-}\r
-\r
-function Clear()\r
-{\r
- document.getElementById('selhicolor').style.backgroundColor = '' ;\r
- document.getElementById('selcolor').value = '' ;\r
-}\r
-\r
-function ClearActual()\r
-{\r
- document.getElementById('hicolor').style.backgroundColor = '' ;\r
- document.getElementById('hicolortext').innerHTML = ' ' ;\r
-}\r
-\r
-function UpdateColor()\r
-{\r
- try { document.getElementById('selhicolor').style.backgroundColor = document.getElementById('selcolor').value ; }\r
- catch (e) { Clear() ; }\r
-}\r
-\r
-function Ok()\r
-{\r
- if ( typeof(window.parent.Args().CustomValue) == 'function' )\r
- window.parent.Args().CustomValue( document.getElementById('selcolor').value ) ;\r
-\r
- return true ;\r
-}\r
- </script>\r
- </head>\r
- <body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">\r
- <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">\r
- <tr>\r
- <td align="center" valign="middle">\r
- <table border="0" cellspacing="5" cellpadding="0" width="100%">\r
- <tr>\r
- <td valign="top" align="center" nowrap width="100%">\r
- <table id="ColorTable" border="0" cellspacing="0" cellpadding="0" width="270" onmouseout="ClearActual();">\r
- </table>\r
- </td>\r
- <td valign="top" align="left" nowrap>\r
- <span fckLang="DlgColorHighlight">Highlight</span>\r
- <div id="hicolor"></div>\r
- <div id="hicolortext"> </div>\r
- <span fckLang="DlgColorSelected">Selected</span>\r
- <div id="selhicolor"></div>\r
- <input id="selcolor" type="text" maxlength="20" onchange="UpdateColor();">\r
- <br>\r
- <input id="btnClear" type="button" fckLang="DlgColorBtnClear" value="Clear" onclick="Clear();" />\r
- </td>\r
- </tr>\r
- </table>\r
- </td>\r
- </tr>\r
- </table>\r
- </body>\r
-</html>\r