Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1688 Rev 1921
-
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
1
<!--
2
<!--
2
 * FCKeditor - The text editor for internet
3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
4
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
-
 
5
 *
-
 
6
 * == BEGIN LICENSE ==
4
 * 
7
 *
5
 * Licensed under the terms of the GNU Lesser General Public License:
8
 * Licensed under the terms of any of the following licenses at your
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
9
 * choice:
7
 * 
10
 *
8
 * For further information visit:
11
 *  - GNU General Public License Version 2 or later (the "GPL")
9
 * 		http://www.fckeditor.net/
12
 *    http://www.gnu.org/licenses/gpl.html
10
 * 
13
 *
11
 * "Support Open Source software. What about a donation today?"
14
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
-
 
15
 *    http://www.gnu.org/licenses/lgpl.html
12
 * 
16
 *
13
 * File Name: fck_colorselector.html
17
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
14
 * 	Color Selection dialog window.
18
 *    http://www.mozilla.org/MPL/MPL-1.1.html
15
 * 
19
 *
16
 * File Authors:
20
 * == END LICENSE ==
-
 
21
 *
17
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
22
 * Color Selection dialog window.
18
-->
23
-->
19
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
-
 
20
<html>
24
<html>
21
	<head>
25
	<head>
22
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
26
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
23
		<meta name="robots" content="noindex, nofollow" />
27
		<meta name="robots" content="noindex, nofollow" />
24
		<style TYPE="text/css">
28
		<style TYPE="text/css">
25
			#ColorTable		{ cursor: pointer ; cursor: hand ; }
29
			#ColorTable		{ cursor: pointer ; cursor: hand ; }
26
			#hicolor		{ height: 74px ; width: 74px ; border-width: 1px ; border-style: solid ; }
30
			#hicolor		{ height: 74px ; width: 74px ; border-width: 1px ; border-style: solid ; }
27
			#hicolortext	{ width: 75px ; text-align: right ; margin-bottom: 7px ; }
31
			#hicolortext	{ width: 75px ; text-align: right ; margin-bottom: 7px ; }
28
			#selhicolor		{ height: 20px ; width: 74px ; border-width: 1px ; border-style: solid ; }
32
			#selhicolor		{ height: 20px ; width: 74px ; border-width: 1px ; border-style: solid ; }
29
			#selcolor		{ width: 75px ; height: 20px ; margin-top: 0px ; margin-bottom: 7px ; }
33
			#selcolor		{ width: 75px ; height: 20px ; margin-top: 0px ; margin-bottom: 7px ; }
30
			#btnClear		{ width: 75px ; height: 22px ; margin-bottom: 6px ; }
34
			#btnClear		{ width: 75px ; height: 22px ; margin-bottom: 6px ; }
31
			.ColorCell		{ height: 15px ; width: 15px ; }
35
			.ColorCell		{ height: 15px ; width: 15px ; }
32
		</style>
36
		</style>
-
 
37
		<script src="common/fck_dialog_common.js" type="text/javascript"></script>
33
		<script type="text/javascript">
38
		<script type="text/javascript">
34
		
39
 
35
var oEditor = window.parent.InnerDialogLoaded() ;
40
var oEditor = window.parent.InnerDialogLoaded() ;
36
 
41
 
37
function OnLoad()
42
function OnLoad()
38
{
43
{
39
	// First of all, translate the dialog box texts
44
	// First of all, translate the dialog box texts
40
	oEditor.FCKLanguageManager.TranslatePage(document) ;
45
	oEditor.FCKLanguageManager.TranslatePage(document) ;
41
	
46
 
42
	CreateColorTable() ;
47
	CreateColorTable() ;
43
	
48
 
44
	window.parent.SetOkButton( true ) ;	
49
	window.parent.SetOkButton( true ) ;
45
	window.parent.SetAutoSize( true ) ;
50
	window.parent.SetAutoSize( true ) ;
46
}
51
}
47
 
52
 
48
function CreateColorTable()
53
function CreateColorTable()
49
{
54
{
50
	// Get the target table.
55
	// Get the target table.
51
	var oTable = document.getElementById('ColorTable') ;
56
	var oTable = document.getElementById('ColorTable') ;
52
 
57
 
53
	// Create the base colors array.
58
	// Create the base colors array.
54
	var aColors = ['00','33','66','99','cc','ff'] ;
59
	var aColors = ['00','33','66','99','cc','ff'] ;
55
 
60
 
56
	// This function combines two ranges of three values from the color array into a row.
61
	// This function combines two ranges of three values from the color array into a row.
57
	function AppendColorRow( rangeA, rangeB )
62
	function AppendColorRow( rangeA, rangeB )
58
	{
63
	{
59
		for ( var i = rangeA ; i < rangeA + 3 ; i++ ) 
64
		for ( var i = rangeA ; i < rangeA + 3 ; i++ )
60
		{ 
65
		{
61
			var oRow = oTable.insertRow(-1) ; 
66
			var oRow = oTable.insertRow(-1) ;
62
 
67
 
63
			for ( var j = rangeB ; j < rangeB + 3 ; j++ ) 
68
			for ( var j = rangeB ; j < rangeB + 3 ; j++ )
64
			{ 
69
			{
65
				for ( var n = 0 ; n < 6 ; n++ ) 
70
				for ( var n = 0 ; n < 6 ; n++ )
66
				{ 
71
				{
67
					AppendColorCell( oRow, '#' + aColors[j] + aColors[n] + aColors[i] ) ; 
72
					AppendColorCell( oRow, '#' + aColors[j] + aColors[n] + aColors[i] ) ;
68
				} 
73
				}
69
			} 
74
			}
70
		}
75
		}
71
	}
76
	}
72
 
77
 
73
	// This function create a single color cell in the color table.
78
	// This function create a single color cell in the color table.
74
	function AppendColorCell( targetRow, color )
79
	function AppendColorCell( targetRow, color )
75
	{
80
	{
76
		var oCell = targetRow.insertCell(-1) ;
81
		var oCell = targetRow.insertCell(-1) ;
77
		oCell.className = 'ColorCell' ;
82
		oCell.className = 'ColorCell' ;
78
		oCell.bgColor = color ;
83
		oCell.bgColor = color ;
79
		
84
 
80
		oCell.onmouseover = function()
85
		oCell.onmouseover = function()
81
		{
86
		{
82
			document.getElementById('hicolor').style.backgroundColor = this.bgColor ;
87
			document.getElementById('hicolor').style.backgroundColor = this.bgColor ;
83
			document.getElementById('hicolortext').innerHTML = this.bgColor ;
88
			document.getElementById('hicolortext').innerHTML = this.bgColor ;
84
		}
89
		}
85
		
90
 
86
		oCell.onclick = function()
91
		oCell.onclick = function()
87
		{
92
		{
88
			document.getElementById('selhicolor').style.backgroundColor = this.bgColor ;
93
			document.getElementById('selhicolor').style.backgroundColor = this.bgColor ;
89
			document.getElementById('selcolor').value = this.bgColor ;
94
			document.getElementById('selcolor').value = this.bgColor ;
90
		}
95
		}
91
	}
96
	}
92
 
97
 
93
	AppendColorRow( 0, 0 ) ;
98
	AppendColorRow( 0, 0 ) ;
94
	AppendColorRow( 3, 0 ) ;
99
	AppendColorRow( 3, 0 ) ;
95
	AppendColorRow( 0, 3 ) ;
100
	AppendColorRow( 0, 3 ) ;
96
	AppendColorRow( 3, 3 ) ;
101
	AppendColorRow( 3, 3 ) ;
97
 
102
 
98
	// Create the last row.
103
	// Create the last row.
99
	var oRow = oTable.insertRow(-1) ;
104
	var oRow = oTable.insertRow(-1) ;
100
	
105
 
101
	// Create the gray scale colors cells.
106
	// Create the gray scale colors cells.
102
	for ( var n = 0 ; n < 6 ; n++ )
107
	for ( var n = 0 ; n < 6 ; n++ )
103
	{
108
	{
104
		AppendColorCell( oRow, '#' + aColors[n] + aColors[n] + aColors[n] ) ; 
109
		AppendColorCell( oRow, '#' + aColors[n] + aColors[n] + aColors[n] ) ;
105
	}
110
	}
106
	
111
 
107
	// Fill the row with black cells.
112
	// Fill the row with black cells.
108
	for ( var i = 0 ; i < 12 ; i++ )
113
	for ( var i = 0 ; i < 12 ; i++ )
109
	{
114
	{
110
		AppendColorCell( oRow, '#000000' ) ; 
115
		AppendColorCell( oRow, '#000000' ) ;
111
	}
116
	}
112
}
117
}
113
 
118
 
114
function Clear()
119
function Clear()
115
{
120
{
116
	document.getElementById('selhicolor').style.backgroundColor = '' ;
121
	document.getElementById('selhicolor').style.backgroundColor = '' ;
117
	document.getElementById('selcolor').value = '' ;
122
	document.getElementById('selcolor').value = '' ;
118
}
123
}
119
 
124
 
120
function ClearActual()
125
function ClearActual()
121
{
126
{
122
	document.getElementById('hicolor').style.backgroundColor = '' ;
127
	document.getElementById('hicolor').style.backgroundColor = '' ;
123
	document.getElementById('hicolortext').innerHTML = '&nbsp;' ;
128
	document.getElementById('hicolortext').innerHTML = '&nbsp;' ;
124
}
129
}
125
 
130
 
126
function UpdateColor()
131
function UpdateColor()
127
{
132
{
128
	try		  { document.getElementById('selhicolor').style.backgroundColor = document.getElementById('selcolor').value ; }
133
	try		  { document.getElementById('selhicolor').style.backgroundColor = document.getElementById('selcolor').value ; }
129
	catch (e) { Clear() ; }
134
	catch (e) { Clear() ; }
130
}
135
}
131
 
136
 
132
function Ok()
137
function Ok()
133
{
138
{
134
	if ( typeof(window.parent.dialogArguments.CustomValue) == 'function' )
139
	if ( typeof(window.parent.Args().CustomValue) == 'function' )
135
		window.parent.dialogArguments.CustomValue( document.getElementById('selcolor').value ) ;
140
		window.parent.Args().CustomValue( document.getElementById('selcolor').value ) ;
136
 
141
 
137
	return true ;
142
	return true ;
138
}
143
}
139
		</script>
144
		</script>
140
	</head>
145
	</head>
141
	<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
146
	<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
142
		<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
147
		<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
143
			<tr>
148
			<tr>
144
				<td align="center" valign="middle">
149
				<td align="center" valign="middle">
145
					<table border="0" cellspacing="5" cellpadding="0" width="100%">
150
					<table border="0" cellspacing="5" cellpadding="0" width="100%">
146
						<tr>
151
						<tr>
147
							<td valign="top" align="center" nowrap width="100%">
152
							<td valign="top" align="center" nowrap width="100%">
148
								<table id="ColorTable" border="0" cellspacing="0" cellpadding="0" width="270" onmouseout="ClearActual();">
153
								<table id="ColorTable" border="0" cellspacing="0" cellpadding="0" width="270" onmouseout="ClearActual();">
149
								</table>
154
								</table>
150
							</td>
155
							</td>
151
							<td valign="top" align="left" nowrap>
156
							<td valign="top" align="left" nowrap>
152
								<span fckLang="DlgColorHighlight">Highlight</span>
157
								<span fckLang="DlgColorHighlight">Highlight</span>
153
								<div id="hicolor"></div>
158
								<div id="hicolor"></div>
154
								<div id="hicolortext">&nbsp;</div>
159
								<div id="hicolortext">&nbsp;</div>
155
								<span fckLang="DlgColorSelected">Selected</span>
160
								<span fckLang="DlgColorSelected">Selected</span>
156
								<div id="selhicolor"></div>
161
								<div id="selhicolor"></div>
157
								<input id="selcolor" type="text" maxlength="20" onchange="UpdateColor();">
162
								<input id="selcolor" type="text" maxlength="20" onchange="UpdateColor();">
158
								<br>
163
								<br>
159
								<input id="btnClear" type="button" fckLang="DlgColorBtnClear" value="Clear" onclick="Clear();" />
164
								<input id="btnClear" type="button" fckLang="DlgColorBtnClear" value="Clear" onclick="Clear();" />
160
							</td>
165
							</td>
161
						</tr>
166
						</tr>
162
					</table>
167
					</table>
163
				</td>
168
				</td>
164
			</tr>
169
			</tr>
165
		</table>
170
		</table>
166
	</body>
171
	</body>
167
</html>
172
</html>