Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1688 Rev 1921
Line -... Line 1...
-
 
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">
Line 28... Line 32...
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() ;
Line 36... Line 41...
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 ) ;
Line 46... Line 51...
46
}
51
}
47
 
52
 
Line 54... Line 59...
54
	var aColors = ['00','33','66','99','cc','ff'] ;
59
	var aColors = ['00','33','66','99','cc','ff'] ;
Line 55... Line 60...
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
		}
Line 71... Line 76...
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 ;
Line 95... Line 100...
95
	AppendColorRow( 0, 3 ) ;
100
	AppendColorRow( 0, 3 ) ;
96
	AppendColorRow( 3, 3 ) ;
101
	AppendColorRow( 3, 3 ) ;
Line 97... Line 102...
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
	}
Line 112... Line 117...
112
}
117
}
113
 
118
 
Line 129... Line 134...
129
	catch (e) { Clear() ; }
134
	catch (e) { Clear() ; }
130
}
135
}
Line 131... Line 136...
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' )
Line 135... Line 140...
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
}