facilmap/frontend/pad.html

103 wiersze
4.0 KiB
HTML
Czysty Wina Historia

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html ng-app="facilpad" ng-controller="PadCtrl">
<head>
<meta charset="utf-8">
<title>{{padData.name}}</title>
<script src="js/pad.js"></script>
<style type="text/css">
@import "pad.css";
</style>
</head>
<body>
<div ng-hide="loaded" style="position:absolute; top:0; left:0; right:0; bottom:0; padding:10px; background: #fff; z-index:100000; font-size:1.5em; font-weight:bold;">
Loading...
</div>
<div id="map"></div>
<div id="map-disabled-cover" ng-hide="!error &amp;&amp; loaded"></div>
<ul id="toolbox">
<li><a href="javascript:" ng-click="addMarker()">Add marker</a></li>
<!--<li><a href="javascript:" ng-click="addLine()">Add line</a></li>-->
<li><a href="javascript:">Views</a><ul>
<li ng-repeat="(id, view) in views"><a href="javascript:" ng-click="displayView(view)">{{view.name}}</a></li>
<li><a href="javascript:" ng-click="openDialog('save-view-dialog')">Save current view</a></li>
<li><a href="javascript:" ng-click="openDialog('manage-views-dialog')">Manage views</a></li>
</ul></li>
<li><a href="javascript:" ng-click="openDialog('pad-settings-dialog')">Pad settings</a></li>
<!--<li><a href="javascript:">Layers</a></li>-->
</ul>
<div id="messages">
<p ng-repeat="message in messages" class="{{message.type}}">{{message.message}} <a href="javascript:" class="close-button" ng-click="closeMessage(message)">×</a></p>
</div>
<div id="save-view-dialog" title="Save current view" fp-dialog>
<form>
<p class="error" ng-hide="!dialogError">{{dialogError}}</p>
<dl>
<dt><label for="save-view-name">Name</label></dt>
<dd><input id="save-view-name" ng-model="saveViewName"></dd>
</dl>
<div><button ng-click="saveView()">Save</button></div>
</form>
</div>
<div id="manage-views-dialog" title="Manage views" fp-dialog>
<p class="error" ng-hide="!dialogError">{{dialogError}}</p>
<table>
<tbody>
<tr ng-class="{selected: view.id == padData.defaultView.id}" ng-repeat="view in views">
<td><a href="javascript:" ng-click="displayView(view)">{{view.name}}</a></td>
<td class="button"><button ng-hide="view.id == padData.defaultView.id" ng-click="setDefaultView(view)">Make default</button></td>
<td class="button"><button ng-click="deleteView(view)">Delete</button></td>
</tr>
</tbody>
</table>
</div>
<div id="view-marker-popup" ng-show="currentMarker" ng-style="{ top: currentMarker.xy.y + 'px', left: currentMarker.xy.x + 'px' }">
<div class="content">
<h2>{{currentMarker.name}}</h2>
<p>{{round(currentMarker.position.lat, 5)}}, {{round(currentMarker.position.lon, 5)}}</p>
<div ng-bind-html="currentMarker.descriptionHtml"></div>
</div>
<div class="buttons">
<button ng-click="openDialog('edit-marker-dialog')">Edit</button>
</div>
<a href="javascript:" ng-click="currentMarker=null" class="close-button">×</a>
</div>
<div id="edit-marker-dialog" title="Edit marker" fp-dialog fp-preserve="markers[currentMarker.id]">
<form>
<p class="error" ng-show="dialogError">{{dialogError}}</p>
<dl>
<dt><label for="edit-marker-name">Name</label></dt>
<dd><input id="edit-marker-name" ng-model="currentMarker.name" /></dd>
<dt><label for="edit-marker-description">Description</label></dt>
<dd><textarea id="edit-marker-description" ng-model="currentMarker.description"></textarea></dd>
</dl>
<div>
<button ng-click="saveMarker(currentMarker)">Save</button>
<button ng-click="deleteMarker(currentMarker)">Remove</button>
</div>
</form>
</div>
<div id="pad-settings-dialog" title="Pad settings" fp-dialog fp-preserve="padData">
<form>
<p class="error" ng-show="dialogError">{{dialogError}}</p>
<dl>
<dt>Link</dt>
<dd>{{padUrl}}</dd>
<dt><label for="pad-name-input">Pad name</label></dt>
<dd><input id="pad-name-input" ng-model="padData.name" /></dd>
</dl>
<div>
<button ng-click="savePadData()">Save</button>
</div>
</form>
</div>
</body>
</html>