1 |
<?php |
---|
2 |
/** |
---|
3 |
_____________________________________________________________________________ |
---|
4 |
| |
---|
5 |
| MapNotes Widget |
---|
6 |
| |
---|
7 |
| @project Chameleon |
---|
8 |
| @revision $Id: properties.phtml,v 1.12 2005/04/12 18:07:58 pspencer Exp $ |
---|
9 |
| @purpose Creates annotations on map. |
---|
10 |
| @author DM Solutions Group (wbronsema@dmsolutions.ca) |
---|
11 |
| @copyright |
---|
12 |
| <b>Copyright (c) 2004 DM Solutions Group Inc.</b> |
---|
13 |
| Permission is hereby granted, free of charge, to any person obtaining a |
---|
14 |
| copy of this software and associated documentation files (the "Software"), |
---|
15 |
| to deal in the Software without restriction, including without limitation |
---|
16 |
| the rights to use, copy, modify, merge, publish, distribute, sublicense, |
---|
17 |
| and/or sell copies of the Software, and to permit persons to whom the |
---|
18 |
| Software is furnished to do so, subject to the following conditions: |
---|
19 |
| |
---|
20 |
| The above copyright notice and this permission notice shall be included |
---|
21 |
| in all copies or substantial portions of the Software. |
---|
22 |
| |
---|
23 |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
---|
24 |
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
---|
25 |
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
---|
26 |
| THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
---|
27 |
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
---|
28 |
| FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
---|
29 |
| DEALINGS IN THE SOFTWARE. |
---|
30 |
|_____________________________________________________________________________ |
---|
31 |
|
---|
32 |
**/ |
---|
33 |
|
---|
34 |
// include the supporting php functions |
---|
35 |
include( './properties.php' ); |
---|
36 |
|
---|
37 |
?> |
---|
38 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
---|
39 |
<html> |
---|
40 |
<head> |
---|
41 |
<title></title> |
---|
42 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
43 |
<style type="text/css"> |
---|
44 |
<!-- |
---|
45 |
legend { |
---|
46 |
font-family: Arial, Helvetica, sans-serif; |
---|
47 |
font-size: 11px; |
---|
48 |
} |
---|
49 |
fieldset { |
---|
50 |
padding: 5px; |
---|
51 |
margin: 1px; |
---|
52 |
} |
---|
53 |
img.titleIcon { |
---|
54 |
float: left; |
---|
55 |
} |
---|
56 |
img.titleButton { |
---|
57 |
float: right; |
---|
58 |
} |
---|
59 |
.titleText { |
---|
60 |
font-family: Arial, Helvetica, sans-serif; |
---|
61 |
font-size: 12px; |
---|
62 |
font-weight: bold; |
---|
63 |
} |
---|
64 |
.helpText { |
---|
65 |
font-family: Arial, Helvetica, sans-serif; |
---|
66 |
font-size: 11px; |
---|
67 |
color: #333333; |
---|
68 |
padding: 0px; |
---|
69 |
padding-top:5px; |
---|
70 |
margin: 0px; |
---|
71 |
} |
---|
72 |
.labelText { |
---|
73 |
font-family: Arial, Helvetica, sans-serif; |
---|
74 |
font-size: 11px; |
---|
75 |
margin-left: 6px; |
---|
76 |
margin-right: 2px;; |
---|
77 |
} |
---|
78 |
.inputItem { |
---|
79 |
font-family: Arial, Helvetica, sans-serif; |
---|
80 |
font-size: 11px; |
---|
81 |
} |
---|
82 |
.titleArea { |
---|
83 |
background-color:#d9d9d9; |
---|
84 |
border-left: #ffffff 1px solid; |
---|
85 |
border-top: #ffffff 1px solid; |
---|
86 |
border-right: #999999 1px solid; |
---|
87 |
border-bottom: #999999 1px solid; |
---|
88 |
margin: 0px; |
---|
89 |
padding: 5px; |
---|
90 |
} |
---|
91 |
.helpArea { |
---|
92 |
background-color:#ffffff; |
---|
93 |
border-left: #ffffff 1px solid; |
---|
94 |
border-top: #ffffff 1px solid; |
---|
95 |
border-right: #999999 1px solid; |
---|
96 |
border-bottom: #999999 1px solid; |
---|
97 |
margin: 0px; |
---|
98 |
padding: 5px; |
---|
99 |
padding-top: 0px; |
---|
100 |
} |
---|
101 |
.processingArea { |
---|
102 |
position: absolute; |
---|
103 |
background-color:#ffffff; |
---|
104 |
border-left: #ffffff 1px solid; |
---|
105 |
border-top: #ffffff 1px solid; |
---|
106 |
border-right: #999999 1px solid; |
---|
107 |
border-bottom: #999999 1px solid; |
---|
108 |
left: 165px; |
---|
109 |
width: 120px; |
---|
110 |
margin: 5px; |
---|
111 |
padding: 5px; |
---|
112 |
padding-top: 0px; |
---|
113 |
} |
---|
114 |
.contentArea { |
---|
115 |
background-color:#f0f0f0; |
---|
116 |
border-left: #ffffff 1px solid; |
---|
117 |
border-top: #ffffff 1px solid; |
---|
118 |
border-right: #999999 1px solid; |
---|
119 |
border-bottom: #999999 1px solid; |
---|
120 |
margin: 0px; |
---|
121 |
padding: 5px; |
---|
122 |
} |
---|
123 |
.buttonArea { |
---|
124 |
background-color:#f0f0f0; |
---|
125 |
border-left: #ffffff 1px solid; |
---|
126 |
border-top: #ffffff 1px solid; |
---|
127 |
border-right: #999999 1px solid; |
---|
128 |
border-bottom: #999999 1px solid; |
---|
129 |
margin: 0px; |
---|
130 |
padding: 5px; |
---|
131 |
text-align: right; |
---|
132 |
} |
---|
133 |
.dialogBox { |
---|
134 |
background-color:#f0f0f0; |
---|
135 |
border: #000000 1px solid; |
---|
136 |
} |
---|
137 |
body { |
---|
138 |
margin: 0px; |
---|
139 |
padding: 0px; |
---|
140 |
background-color:transparent; |
---|
141 |
} |
---|
142 |
--> |
---|
143 |
</style> |
---|
144 |
<script language="javascript" type="text/javascript"> |
---|
145 |
function doneLoading() |
---|
146 |
{ |
---|
147 |
<?php |
---|
148 |
if ( isset( $_FORM['update'] ) && $_FORM['update'] == 1 ) |
---|
149 |
{ |
---|
150 |
//echo 'parent.MapNotesHideProperties()'; |
---|
151 |
echo 'parent.MapNotesPointSubmit();'; |
---|
152 |
} |
---|
153 |
|
---|
154 |
?> |
---|
155 |
|
---|
156 |
var label = document.forms.mapnotes_properties.label.value; |
---|
157 |
label = label.replace( "+", " " ); |
---|
158 |
label = unescape(label); |
---|
159 |
if(document.forms.mapnotes_properties.label_dummy) |
---|
160 |
{ |
---|
161 |
document.forms.mapnotes_properties.label_dummy.value =label; |
---|
162 |
} |
---|
163 |
|
---|
164 |
} |
---|
165 |
|
---|
166 |
function deleteCurrentPoint() |
---|
167 |
{ |
---|
168 |
document.forms.mapnotes_properties.mode.value='DELETE'; |
---|
169 |
document.forms.mapnotes_properties.update.value='1'; |
---|
170 |
document.forms.mapnotes_properties.submit(); |
---|
171 |
} |
---|
172 |
|
---|
173 |
var currentColor = null; |
---|
174 |
|
---|
175 |
function openColorPicker( szName ) |
---|
176 |
{ |
---|
177 |
currentColor = szName; |
---|
178 |
obj = document.forms.mapnotes_properties[szName]; |
---|
179 |
|
---|
180 |
var aColor = obj.value.split( ' ' ); |
---|
181 |
|
---|
182 |
window.open( '<?php echo $_SESSION['gszCoreWebPath']?>/common/colorpicker/colorpicker.html?x=30&y=20&red='+aColor[0]+'&green='+aColor[1]+'&blue='+aColor[2]+'&CallBackFunc=applyColorPicker', 'colorpicker', 'width=330,height=280,toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no' ); |
---|
183 |
} |
---|
184 |
|
---|
185 |
function applyColorPicker( r, g, b ) |
---|
186 |
{ |
---|
187 |
var obj = document.forms.mapnotes_properties[currentColor]; |
---|
188 |
obj.value = r + " " + g + " " + b; |
---|
189 |
var img = document.getElementById( currentColor+"_img" ); |
---|
190 |
img.src = "<?php echo $_SESSION['gszCoreWebPath']?>/common/colorpicker/color.php?x=30&y=20&red="+r+"&green="+g+"&blue=" + b; |
---|
191 |
} |
---|
192 |
|
---|
193 |
var currentSymbol = null; |
---|
194 |
var symbolPickerWH = null; |
---|
195 |
|
---|
196 |
function openSymbolPicker( szName ) |
---|
197 |
{ |
---|
198 |
currentSymbol = szName; |
---|
199 |
obj = document.forms.mapnotes_properties[szName]; |
---|
200 |
|
---|
201 |
var nSymbol = obj.value; |
---|
202 |
|
---|
203 |
symbolPickerWH = window.open( '<?php echo $_SESSION['gszCoreWebPath']?>/common/picker/symbol_picker.phtml?<?php echo SID?>&szCallBack=applySymbolPicker&nSelectedSymbol='+nSymbol, 'symbolpicker', 'width=330,height=280,toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no' ); |
---|
204 |
|
---|
205 |
if (!symbolPickerWH.opener) |
---|
206 |
symbolPickerWH.opener = self; |
---|
207 |
} |
---|
208 |
|
---|
209 |
function applySymbol( szValue ) |
---|
210 |
{ |
---|
211 |
var obj = document.forms[0][currentSymbol]; |
---|
212 |
obj.value = szValue; |
---|
213 |
var img = document.getElementById( currentSymbol+"_img" ); |
---|
214 |
img.src = "<?php echo $_SESSION['gszCoreWebPath']?>/common/picker/symbol.php?<?php echo SID;?>&width=30&height=20&nSymbolName="+szValue; |
---|
215 |
} |
---|
216 |
|
---|
217 |
function applySymbolPicker(actionId, wh) |
---|
218 |
{ |
---|
219 |
if (wh == symbolPickerWH) |
---|
220 |
{ |
---|
221 |
if (actionId == 0) // ok |
---|
222 |
{ |
---|
223 |
applySymbol(wh.PICKER.szSelected); |
---|
224 |
wh.close(); |
---|
225 |
} |
---|
226 |
if (actionId == 1) // apply |
---|
227 |
{ |
---|
228 |
applySymbol(wh.PICKER.szSelected); |
---|
229 |
} |
---|
230 |
if (actionId == 2) // cancel |
---|
231 |
{ |
---|
232 |
wh.close(); |
---|
233 |
} |
---|
234 |
if (actionId == 3) // loaded |
---|
235 |
{ |
---|
236 |
|
---|
237 |
} |
---|
238 |
} |
---|
239 |
else |
---|
240 |
{ |
---|
241 |
alert("Error"); |
---|
242 |
} |
---|
243 |
} |
---|
244 |
|
---|
245 |
function submitIframe() |
---|
246 |
{ |
---|
247 |
// url encode the label |
---|
248 |
document.forms.mapnotes_properties.label.value = escape(document.forms.mapnotes_properties.label_dummy.value); |
---|
249 |
|
---|
250 |
// submit iframe |
---|
251 |
document.forms.mapnotes_properties.update.value = '1'; |
---|
252 |
document.forms.mapnotes_properties.submit(); |
---|
253 |
} |
---|
254 |
|
---|
255 |
function addAsNewPoint() |
---|
256 |
{ |
---|
257 |
document.forms.mapnotes_properties.mode.value='ADD'; |
---|
258 |
document.forms.mapnotes_properties.update.value='1'; |
---|
259 |
document.forms.mapnotes_properties.point_id.value='-1'; |
---|
260 |
document.forms.mapnotes_properties.submit(); |
---|
261 |
} |
---|
262 |
|
---|
263 |
</script> |
---|
264 |
</head> |
---|
265 |
|
---|
266 |
<body onload="doneLoading()"> |
---|
267 |
<form name="mapnotes_properties" method="POST"> |
---|
268 |
<?php |
---|
269 |
// process various labels |
---|
270 |
$szLabel1 = $oMLT->get( '13', 'close button' ); |
---|
271 |
$szLabel2 = $oMLT->get( '14', 'Label Properties' ); |
---|
272 |
$szLabel3 = $oMLT->get( '15', 'Label' ); |
---|
273 |
$szLabel4 = $oMLT->get( '16', 'Color' ); |
---|
274 |
$szLabel5 = $oMLT->get( '17', 'Outline' ); |
---|
275 |
$szLabel6 = $oMLT->get( '18', 'Symbol' ); |
---|
276 |
$szLabel7 = $oMLT->get( '19', 'Size' ); |
---|
277 |
$szLabel8 = $oMLT->get( '20', 'Marker Properties' ); |
---|
278 |
$szLabel9 = $oMLT->get( '7', 'Add as New' ); |
---|
279 |
$szLabel10 = $oMLT->get( '6', 'Delete' ); |
---|
280 |
$szLabel11 = $oMLT->get( '21', 'Cancel' ); |
---|
281 |
$szLabel12 = $oMLT->get( '22', 'Processing Map Note' ); |
---|
282 |
|
---|
283 |
|
---|
284 |
if ( !isset( $_FORM['update'] ) || $_FORM['update'] == 0 ) |
---|
285 |
{ |
---|
286 |
echo <<<EOT |
---|
287 |
<div id="PopIn1" class="dialogBox" style="position:absolute; z-index:1; left: 0px; top: 0px;"> |
---|
288 |
<div class="titleArea"> |
---|
289 |
<table border="0" cellspacing="0" cellpadding="0" width="100%"> |
---|
290 |
<tr> |
---|
291 |
<td width="20"><img src="{$_SESSION['gszCoreWebPath']}/skins/default/icons/icon_add_mapnote.png" width="20" height="20"></td> |
---|
292 |
<td><span class="titleText"> {$szTitle}</span></td> |
---|
293 |
<td width="20"><a href="javascript:parent.MapNotesHideProperties()"><img src="{$_SESSION['gszCoreWebPath']}/skins/default/icons/icon_close.png" width="20" height="20" title="{$szLabel1}" border="0"></a></td> |
---|
294 |
</tr> |
---|
295 |
</table> |
---|
296 |
</div> |
---|
297 |
<div class="helpArea"> |
---|
298 |
<p class="helpText">{$szHelpText}</p> |
---|
299 |
</div> |
---|
300 |
<div class="contentArea"> |
---|
301 |
<fieldset> |
---|
302 |
<legend>{$szLabel2}</legend> |
---|
303 |
<table border="0" cellspacing="0" cellpadding="0"> |
---|
304 |
<tr> |
---|
305 |
<td><span class="labelText">{$szLabel3}</span></td> |
---|
306 |
<td><input type="text" name="label_dummy" value="" size="30"/></td> |
---|
307 |
<td><span class="labelText">{$szLabel4}</span></td> |
---|
308 |
<td>{$szFontColorPicker}</td> |
---|
309 |
<td><span class="labelText">{$szLabel5}</span></td> |
---|
310 |
<td>{$szFontOutlineColorPicker}</td> |
---|
311 |
</tr> |
---|
312 |
</table> |
---|
313 |
</fieldset> |
---|
314 |
<fieldset> |
---|
315 |
<legend>{$szLabel8}</legend> |
---|
316 |
<table border="0" cellspacing="0" cellpadding="0"> |
---|
317 |
<tr> |
---|
318 |
<td><span class="labelText">{$szLabel6}</span></td> |
---|
319 |
<td>{$szSymbolPicker}</td> |
---|
320 |
<td><span class="labelText">{$szLabel7}</span></td> |
---|
321 |
<td><select name="symbolsize"> |
---|
322 |
{$szSymbolSizeSelector} |
---|
323 |
</select></td> |
---|
324 |
<td><span class="labelText">{$szLabel4}</span></td> |
---|
325 |
<td>{$szSymbolColorPicker}</td> |
---|
326 |
<td><span class="labelText">{$szLabel5}</span></td> |
---|
327 |
<td>{$szSymbolOutlineColorPicker}</td> |
---|
328 |
</tr> |
---|
329 |
</table> |
---|
330 |
</fieldset> |
---|
331 |
</div> |
---|
332 |
<div class="buttonArea"> |
---|
333 |
<input type="button" name="Button" value="{$szLabel9}" class="inputItem" {$szDisableEditButtons} onmouseup="addAsNewPoint()" onkeyup="addAsNewPoint()"> |
---|
334 |
<input type="button" name="Button" value="{$szLabel10}" class="inputItem" {$szDisableEditButtons} onmouseup="deleteCurrentPoint()" onkeyup="deleteCurrentPoint()"> |
---|
335 |
|
---|
336 |
<input type="button" name="Button" value="{$szSubmitCaption}" class="inputItem" onkeyup="submitIframe()" onmouseup="submitIframe()"> |
---|
337 |
<input type="button" name="Button" value="{$szLabel11}" class="inputItem" onmouseup="parent.MapNotesHideProperties()" onkeyup="parent.MapNotesHideProperties()"> |
---|
338 |
</div> |
---|
339 |
</div> |
---|
340 |
EOT; |
---|
341 |
} |
---|
342 |
else |
---|
343 |
{ |
---|
344 |
// show processing div |
---|
345 |
echo <<<EOT |
---|
346 |
<div class="processingArea"> |
---|
347 |
<p class="helpText">{$szLabel12}...</p> |
---|
348 |
</div> |
---|
349 |
EOT; |
---|
350 |
} |
---|
351 |
|
---|
352 |
?> |
---|
353 |
<input type="hidden" name="label" value="<?php echo $txtLabel ?>" size="30"/> |
---|
354 |
<input type="hidden" name="font" value="<?php echo $txtFont ?>"/><br> |
---|
355 |
<input type="hidden" name="fontsize" value="<?php echo $txtFontSize ?>"/><br> |
---|
356 |
<input type="hidden" name="marquee" value="<?php echo $txtMarquee ?>"/><br> |
---|
357 |
<input type="hidden" name="offsetx" value="<?php echo $txtOffsetX ?>"/><br> |
---|
358 |
<input type="hidden" name="offsety" value="<?php echo $txtOffsetY ?>"/><br> |
---|
359 |
<input type="hidden" name="labelposition" value="<?php echo $txtLabelPosition ?>"/><br> |
---|
360 |
<input type="hidden" name="mode" value="<?php echo $szMode ?>" /> |
---|
361 |
<input type="hidden" name="sid" value="<?php echo $szSID ?>" /> |
---|
362 |
<input type="hidden" name="update" value="0" /> |
---|
363 |
<input type="hidden" name="point_id" value="<?php echo $nPointID ?>" /> |
---|
364 |
<input type="hidden" name="layer" value="<?php echo $_FORM['layer'] ?>" /> |
---|
365 |
<input type="hidden" name="mouse_x" value="<?php echo $_FORM['mouse_x'] ?>" /> |
---|
366 |
<input type="hidden" name="mouse_y" value="<?php echo $_FORM['mouse_y'] ?>" /> |
---|
367 |
</form> |
---|
368 |
</body> |
---|
369 |
</html> |
---|