source: extensions/Psli_BingMaps/admin/template/admin_picture.tpl @ 15448

Last change on this file since 15448 was 15448, checked in by psli, 12 years ago
File size: 4.8 KB
Line 
1<!--
2Plugin Name: Psli-BingMaps
3Author: psli
4-->
5<div class="titrePage">
6<h2>Psli-BingMaps</h2>
7</div>
8
9<form action="" method="post">
10<input type="hidden" name="hiddenpicture" value="{$HIDDENPICTURE}" />
11<!-- ***************************************************************************************************** -->
12<!-- ***************************************************************************************************** -->
13<!-- ***************************************************************************************************** -->
14<!-- ***************************************************************************************************** -->
15<table style="width:100%;">
16        <colgroup>
17                <col width="200px" >
18                <col width="*" >
19        </colgroup>
20        <tr>
21                <td align="right">
22                        {'Select a picture'|@translate} :
23                </td>
24                <td>
25                        <select name="pictureSelected" style="width:300px;">
26                                {html_options options=$picture_select_selected}
27                                {html_options options=$picture_select}
28                        </select>
29                        <input type="submit" name="open" value="{'Open this picture'|@translate}" style="width:140px;" />
30                        <input type="submit" name="delete" value="{'Delete this picture'|@translate}" style="width:140px;margin-left:30px;" />
31                        <input type="checkbox" name="deleteCheck">&nbsp;{'Are you sure?'|@translate}</input>
32                </td>
33        </tr>
34</table>
35
36<!-- ***************************************************************************************************** -->
37<!-- ***************************************************************************************************** -->
38<!-- ***************************************************************************************************** -->
39<!-- ***************************************************************************************************** -->
40<fieldset id="tableData" style="display:none;">
41<legend>{'Entity field'|@translate} : {$TITLE}</legend>
42        <table style="margin-top:10px;width:95%;">
43                <colgroup>
44                        <col width="172px" >
45                        <col width="470px" >
46                        <col width="130px" >
47                        <col width="*" >
48                </colgroup>
49                <tr>
50                        <td align="right">{'Picture Title'|@translate} : </td>
51                        <td><input type="text" style="width:398px;" name="title" id="title" value="{$TITLE}" /></td>
52                        <td><input type="submit" name="save" value="{'Submit'|@translate}" style="width:100px;margin-bottom:5px;" /></td>
53                        <td rowspan="7" style="text-align:left;vertical-align:top;" >
54                                <fieldset style="height:100%">
55                                <legend>{'Associated map'|@translate}</legend>
56                                        <table style="width:100%;text-align:left;">
57                                                {$ASSOCIATEDMAP}
58                                        </table>
59                                </fieldset>
60                        <td>
61                </tr>
62                <tr>
63                        <td align="right">{'Zoom minimum'|@translate}&nbsp;:</td>
64                        <td>
65                                <input id="zoommin" type="text" name="zoommin" value="{$ZOOMMIN}" style="width:398px;margin-right:5px;" maxlength="2">
66                                <button type="button" onclick="psli_SetMinimum();">{'Set'|@translate}</button>
67                        </td>
68                </tr>
69                <tr>
70                        <td align="right">{'Zoom maximum'|@translate}&nbsp;:</td>
71                        <td>
72                                <input id="zoommax" type="text" name="zoommax" value="{$ZOOMMAX}" style="width:398px;margin-right:5px;" maxlength="2">
73                                <button type="button" onclick="psli_SetMaximum();">{'Set'|@translate}</button> 
74                        </td>                                                           
75                </tr>
76        </table>
77</fieldset>     
78
79        <!-- ***************************************************************************************************** -->
80        <!-- ***************************************************************************************************** -->
81        <!-- ***************************************************************************************************** -->
82        <!-- ***************************************************************************************************** -->         
83        <div id='myMap' style="position:relative; text-align:center; height:600px; margin:15px; border:2px solid white;"></div>
84        <script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>                                           
85        <script>
86                psli_g_BingKey = "{$KEY}";
87                psli_g_MapCenter = new Microsoft.Maps.Location({$LAT}, {$LON});
88               
89                psli_g_MapOptions = {ldelim}
90                        credentials: psli_g_BingKey,
91                        showDashboard:false,
92                        showMapTypeSelector:false,
93                        showScalebar:false,
94                        mapTypeId: Microsoft.Maps.MapTypeId.road,
95                        center: psli_g_MapCenter,
96                        zoom: parseInt(document.getElementById("zoommin").value)
97                {rdelim};
98                psli_g_Map = new Microsoft.Maps.Map(document.getElementById("myMap"), psli_g_MapOptions);
99                psli_g_Map.setView({ldelim}center: psli_g_MapCenter{rdelim});
100                var pin = new Microsoft.Maps.Pushpin(psli_g_MapCenter);
101                psli_g_Map.entities.clear();
102                psli_g_Map.entities.push(pin);
103               
104                document.getElementById("tableData").style.display='{$DISPLAY}';
105                 
106                function psli_SetMinimum() {ldelim}
107                        document.getElementById("zoommin").value = psli_g_Map.getZoom();
108                {rdelim}
109
110                function psli_SetMaximum() {ldelim}
111                        document.getElementById("zoommax").value = psli_g_Map.getZoom();
112                {rdelim}
113        </script>
114
115</form>
Note: See TracBrowser for help on using the repository browser.