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 1... Line 1...
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
2
<!--
2
<!--
3
 * FCKeditor - The text editor for internet
3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
4
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
-
 
5
 *
-
 
6
 * == BEGIN LICENSE ==
5
 * 
7
 *
6
 * Licensed under the terms of the GNU Lesser General Public License:
8
 * Licensed under the terms of any of the following licenses at your
7
 * 		http://www.opensource.org/licenses/lgpl-license.php
9
 * choice:
8
 * 
10
 *
9
 * For further information visit:
11
 *  - GNU General Public License Version 2 or later (the "GPL")
10
 * 		http://www.fckeditor.net/
12
 *    http://www.gnu.org/licenses/gpl.html
11
 * 
13
 *
12
 * "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
13
 * 
16
 *
14
 * File Name: fck_hiddenfield.html
17
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
15
 * 	Hidden Field dialog window.
18
 *    http://www.mozilla.org/MPL/MPL-1.1.html
16
 * 
19
 *
17
 * File Authors:
20
 * == END LICENSE ==
-
 
21
 *
18
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
22
 * Hidden Field dialog window.
19
-->
23
-->
20
<html>
24
<html xmlns="http://www.w3.org/1999/xhtml">
21
	<head>
25
<head>
22
		<title>Hidden Field Properties</title>
26
	<title>Hidden Field Properties</title>
23
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
27
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
24
		<meta content="noindex, nofollow" name="robots">
28
	<meta content="noindex, nofollow" name="robots" />
25
		<script src="common/fck_dialog_common.js" type="text/javascript"></script>
29
	<script src="common/fck_dialog_common.js" type="text/javascript"></script>
26
		<script type="text/javascript">
30
	<script type="text/javascript">
Line -... Line 31...
-
 
31
 
27
 
32
var dialog	= window.parent ;
-
 
33
var oEditor = dialog.InnerDialogLoaded() ;
-
 
34
 
Line 28... Line 35...
28
var oEditor = window.parent.InnerDialogLoaded() ;
35
var FCK = oEditor.FCK ;
29
 
36
 
Line -... Line 37...
-
 
37
// Gets the document DOM
30
// Gets the document DOM
38
var oDOM = FCK.EditorDocument ;
-
 
39
 
-
 
40
// Get the selected flash embed (if available).
-
 
41
var oFakeImage = dialog.Selection.GetSelectedElement() ;
-
 
42
var oActiveEl ;
-
 
43
 
-
 
44
if ( oFakeImage )
-
 
45
{
-
 
46
	if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckinputhidden') )
-
 
47
		oActiveEl = FCK.GetRealElement( oFakeImage ) ;
Line 31... Line 48...
31
var oDOM = oEditor.FCK.EditorDocument ;
48
	else
32
 
49
		oFakeImage = null ;
33
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
50
}
34
 
51
 
Line 35... Line 52...
35
window.onload = function()
52
window.onload = function()
36
{
53
{
37
	// First of all, translate the dialog box texts
54
	// First of all, translate the dialog box texts
38
	oEditor.FCKLanguageManager.TranslatePage(document) ;
55
	oEditor.FCKLanguageManager.TranslatePage(document) ;
39
 
56
 
40
	if ( oActiveEl && oActiveEl.tagName == 'INPUT' && oActiveEl.type == 'hidden' ) 
-
 
41
	{
-
 
Line 42... Line 57...
42
		GetE('txtName').value		= oActiveEl.name ;
57
	if ( oActiveEl )
-
 
58
	{
-
 
59
		GetE('txtName').value		= oActiveEl.name ;
43
		GetE('txtValue').value		= oActiveEl.value ;
60
		GetE('txtValue').value		= oActiveEl.value ;
Line 44... Line 61...
44
	}
61
	}
45
	else
62
 
-
 
63
	dialog.SetOkButton( true ) ;
-
 
64
	dialog.SetAutoSize( true ) ;
-
 
65
	SelectField( 'txtName' ) ;
-
 
66
}
-
 
67
 
-
 
68
 
46
		oActiveEl = null ;
69
function Ok()
47
 
70
{
48
	window.parent.SetOkButton( true ) ;
71
	oEditor.FCKUndo.SaveUndoStep() ;
49
}	
72
 
-
 
73
	oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: 'hidden' } ) ;
50
 
74
 
-
 
75
	SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
51
 
76
 
52
function Ok()
77
	if ( !oFakeImage )
53
{
78
	{
54
	if ( !oActiveEl )
-
 
Line 55... Line 79...
55
	{
79
		oFakeImage	= oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__InputHidden', oActiveEl ) ;
56
		oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
80
		oFakeImage.setAttribute( '_fckinputhidden', 'true', 0 ) ;
Line 57... Line 81...
57
		oActiveEl.type = 'hidden' ;
81
 
58
		oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
82
		oActiveEl.parentNode.insertBefore( oFakeImage, oActiveEl ) ;
59
	}
83
		oActiveEl.parentNode.removeChild( oActiveEl ) ;
60
	
84
	}
61
	oActiveEl.name = GetE('txtName').value ;
85
	else
62
	SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
86
		oEditor.FCKUndo.SaveUndoStep() ;
63
 
87
 
64
	return true ;
88
	return true ;
65
}
89
}
66
 
90
 
67
		</script>
91
	</script>
68
	</head>
92
</head>
69
	<body style="OVERFLOW: hidden" scroll="no">
93
<body style="overflow: hidden" scroll="no">
70
		<table height="100%" width="100%">
94
	<table height="100%" width="100%">
71
			<tr>
95
		<tr>
72
				<td align="center">
96
			<td align="center">
73
					<table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%">
97
				<table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%">
74
						<tr>
98
					<tr>
75
							<td>
99
						<td>
76
								<span fckLang="DlgHiddenName">Name</span><br>
100
							<span fcklang="DlgHiddenName">Name</span><br />
77
								<input type="text" size="20" id="txtName" style="WIDTH: 100%">
101
							<input type="text" size="20" id="txtName" style="width: 100%" />
78
							</td>
102
						</td>
79
						</tr>
103
					</tr>
80
						<tr>
104
					<tr>
81
							<td>
105
						<td>