1
|
<!-- BEGIN main_block -->
|
2
|
<html>
|
3
|
|
4
|
<head>
|
5
|
<title>Insert Image</title>
|
6
|
|
7
|
<script type="text/javascript" src="popup.js"></script>
|
8
|
|
9
|
<script type="text/javascript">
|
10
|
|
11
|
window.resizeTo(700, 100);
|
12
|
|
13
|
function Init() {
|
14
|
__dlg_init();
|
15
|
var param = window.dialogArguments;
|
16
|
if (param) {
|
17
|
document.getElementById("f_url").value = param["f_url"];
|
18
|
document.getElementById("f_alt").value = param["f_alt"];
|
19
|
document.getElementById("f_border").value = param["f_border"];
|
20
|
document.getElementById("f_align").value = param["f_align"];
|
21
|
document.getElementById("f_vert").value = param["f_vert"];
|
22
|
document.getElementById("f_horiz").value = param["f_horiz"];
|
23
|
window.ipreview.location.replace(param.f_url);
|
24
|
}
|
25
|
document.getElementById("f_url").focus();
|
26
|
};
|
27
|
|
28
|
function onOK() {
|
29
|
var required = {
|
30
|
"f_url": "You must enter the URL"
|
31
|
};
|
32
|
for (var i in required) {
|
33
|
var el = document.getElementById(i);
|
34
|
if (!el.value) {
|
35
|
alert(required[i]);
|
36
|
el.focus();
|
37
|
return false;
|
38
|
}
|
39
|
}
|
40
|
// pass data back to the calling window
|
41
|
var fields = ["f_url", "f_alt", "f_align", "f_border",
|
42
|
"f_horiz", "f_vert"];
|
43
|
var param = new Object();
|
44
|
for (var i in fields) {
|
45
|
var id = fields[i];
|
46
|
var el = document.getElementById(id);
|
47
|
param[id] = el.value;
|
48
|
}
|
49
|
__dlg_close(param);
|
50
|
return false;
|
51
|
};
|
52
|
|
53
|
function onCancel() {
|
54
|
__dlg_close(null);
|
55
|
return false;
|
56
|
};
|
57
|
|
58
|
function onPreview() {
|
59
|
var f_url = document.getElementById("f_url");
|
60
|
var url = f_url.value;
|
61
|
if (!url) {
|
62
|
alert("You have to enter an URL first");
|
63
|
f_url.focus();
|
64
|
return false;
|
65
|
}
|
66
|
window.ipreview.location.replace(url);
|
67
|
return false;
|
68
|
};
|
69
|
</script>
|
70
|
|
71
|
<style type="text/css">
|
72
|
html, body {
|
73
|
background: #EEEEEE;
|
74
|
color: #000000;
|
75
|
font: 11px Tahoma,Verdana,sans-serif;
|
76
|
margin: 0px;
|
77
|
padding: 0px;
|
78
|
}
|
79
|
body { padding: 0px; }
|
80
|
table {
|
81
|
font: 11px Tahoma,Verdana,sans-serif;
|
82
|
}
|
83
|
form p {
|
84
|
margin-top: 5px;
|
85
|
margin-bottom: 5px;
|
86
|
}
|
87
|
.fl { width: 9em; float: left; padding: 2px 5px; text-align: right; }
|
88
|
.fr { width: 6em; float: left; padding: 2px 5px; text-align: right; }
|
89
|
fieldset { padding: 0px 10px 5px 5px; }
|
90
|
select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
|
91
|
button { width: 70px; }
|
92
|
.space { padding: 2px; }
|
93
|
|
94
|
.title { background: #336699; color: #FFFFFF; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
|
95
|
letter-spacing: 2px;
|
96
|
}
|
97
|
form { padding: 0px; margin: 0px; }
|
98
|
</style>
|
99
|
|
100
|
</head>
|
101
|
|
102
|
<body onload="Init()">
|
103
|
|
104
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
105
|
<tr>
|
106
|
<td style="background-color: #003366;" width="5"> </td>
|
107
|
<td style="background-color: #FFFFFF;" valign="top">
|
108
|
|
109
|
<div class="title" style="background: #003366;">Browse Media</div>
|
110
|
|
111
|
<form name="browser" action="insert_image.php" method="post" class="browser">
|
112
|
<select name="folder" style="width: 250px; font-family: Arial;">
|
113
|
<option value="/media">/media</option>
|
114
|
<!-- BEGIN dir_list_block -->
|
115
|
<option value="{NAME}"{SELECTED}>{NAME}</option>
|
116
|
<!-- END dir_list_block -->
|
117
|
</select>
|
118
|
<input type="submit" name="submit" value="Browse Selected Folder" style="width: 250px;" />
|
119
|
|
120
|
<br />
|
121
|
|
122
|
<style type="text/css">
|
123
|
.browser {
|
124
|
padding: 5px;
|
125
|
padding-top: 0;
|
126
|
}
|
127
|
.browser ul, .browser li {
|
128
|
margin: 0;
|
129
|
padding: 0;
|
130
|
display: block;
|
131
|
list-style-type: none;
|
132
|
}
|
133
|
.browser li {
|
134
|
padding: 5px 0px 5px 0px;
|
135
|
}
|
136
|
</style>
|
137
|
|
138
|
<iframe src="{WB_URL}/modules/htmlarea/htmlarea/popups/list_media.php?folder={DIRECTORY}&popup={POPUP}" style="width: 245px; height: 320px;"></iframe>
|
139
|
|
140
|
</form>
|
141
|
|
142
|
</td>
|
143
|
<td style="background-color: #003366;" width="5"> </td>
|
144
|
<td style="background-color: #336699;" width="5"> </td>
|
145
|
<td width="420" valign="top">
|
146
|
|
147
|
<div class="title">Insert Image</div>
|
148
|
<!--- new stuff --->
|
149
|
<form name="insert_image" action="" method="get" style="padding: 5px;">
|
150
|
<table border="0" width="100%" style="padding: 0px; margin: 0px">
|
151
|
<tbody>
|
152
|
|
153
|
<tr>
|
154
|
<td style="width: 7em; text-align: right">Image URL:</td>
|
155
|
<td><input type="text" name="url" id="f_url" style="width:74%"
|
156
|
title="Enter the image URL here" />
|
157
|
<button name="preview" onclick="return onPreview();"
|
158
|
title="Preview the image in a new window">Preview</button>
|
159
|
</td>
|
160
|
</tr>
|
161
|
<tr>
|
162
|
<td style="width: 80px; text-align: right">Alternate text:</td>
|
163
|
<td><input type="text" name="alt" id="f_alt" style="width:74%"
|
164
|
title="For browsers that don't support images" /></td>
|
165
|
</tr>
|
166
|
|
167
|
</tbody>
|
168
|
</table>
|
169
|
|
170
|
<p />
|
171
|
|
172
|
<fieldset style="float: left; margin-left: 5px;">
|
173
|
<legend>Layout</legend>
|
174
|
|
175
|
<div class="space"></div>
|
176
|
|
177
|
<div class="fl">Alignment:</div>
|
178
|
<select size="1" name="align" id="f_align"
|
179
|
title="Positioning of this image">
|
180
|
<option value="" >Not set</option>
|
181
|
<option value="left" >Left</option>
|
182
|
<option value="right" >Right</option>
|
183
|
<option value="texttop" >Texttop</option>
|
184
|
<option value="absmiddle" >Absmiddle</option>
|
185
|
<option value="baseline" selected="1" >Baseline</option>
|
186
|
<option value="absbottom" >Absbottom</option>
|
187
|
<option value="bottom" >Bottom</option>
|
188
|
<option value="middle" >Middle</option>
|
189
|
<option value="top" >Top</option>
|
190
|
</select>
|
191
|
|
192
|
<p />
|
193
|
|
194
|
<div class="fl">Border thickness:</div>
|
195
|
<input type="text" name="border" id="f_border" size="5"
|
196
|
title="Leave empty for no border" />
|
197
|
|
198
|
<div class="space"></div>
|
199
|
|
200
|
</fieldset>
|
201
|
|
202
|
<fieldset style="float:right; margin-right: 5px;">
|
203
|
<legend>Spacing</legend>
|
204
|
|
205
|
<div class="space"></div>
|
206
|
|
207
|
<div class="fr">Horizontal:</div>
|
208
|
<input type="text" name="horiz" id="f_horiz" size="5"
|
209
|
title="Horizontal padding" />
|
210
|
|
211
|
<p />
|
212
|
|
213
|
<div class="fr">Vertical:</div>
|
214
|
<input type="text" name="vert" id="f_vert" size="5"
|
215
|
title="Vertical padding" />
|
216
|
|
217
|
<div class="space"></div>
|
218
|
|
219
|
</fieldset>
|
220
|
<br clear="all" />
|
221
|
<table width="100%" style="margin-bottom: 0.2em">
|
222
|
<tr>
|
223
|
<td valign="bottom">
|
224
|
Image Preview:<br />
|
225
|
<iframe name="ipreview" id="ipreview" frameborder="0" style="border : 1px solid gray;" height="200" width="300" src=""></iframe>
|
226
|
</td>
|
227
|
<td valign="bottom" style="text-align: left; padding-right: 5px;">
|
228
|
<button type="button" name="ok" onclick="return onOK();">OK</button><br>
|
229
|
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
|
230
|
</td>
|
231
|
</tr>
|
232
|
</table>
|
233
|
</form>
|
234
|
|
235
|
</td>
|
236
|
<td style="background-color: #336699;" width="5"> </td>
|
237
|
</tr>
|
238
|
<tr height="8">
|
239
|
<td colspan="3" style="background-color: #003366;"></td>
|
240
|
<td colspan="3" style="background-color: #336699;"></td>
|
241
|
</tr>
|
242
|
</table>
|
243
|
|
244
|
</body>
|
245
|
</html>
|
246
|
<!-- END main_block -->
|