map & color
This commit is contained in:
@ -1,19 +1,16 @@
|
||||
@model RdvQuery
|
||||
@{ ViewData["Title"] = $"Proposition de rendez-vous à {Model.PerformerProfile.Performer.UserName} [{ViewBag.Activity.Name}]"; }
|
||||
|
||||
@section scripts {
|
||||
<script type="text/javascript" src="~/lib/moment/moment-with-locales.min.js"></script>
|
||||
<script type="text/javascript" src="~/lib/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
|
||||
@section header {
|
||||
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#map {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
@section scripts {
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
@ -22,8 +19,6 @@
|
||||
format: "YYYY/MM/DD HH:mm"
|
||||
});
|
||||
|
||||
initMap();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -70,11 +65,12 @@
|
||||
<span asp-validation-for="Location.Address" class="text-danger"></span>
|
||||
<ul id="loccomb">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map" data-val="valloc" data-addr="Location_Address" data-loccombo="loccomb" data-lat="Location_Latitude" data-lon="Location_Longitude" ></div>
|
||||
|
||||
</div>
|
||||
<label asp-for="Reason" class="col-md-2 control-label">
|
||||
@ -113,3 +109,5 @@
|
||||
</form>
|
||||
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
@{ await Html.RenderPartialAsync("_MapScriptsPartial"); }
|
||||
|
||||
|
@ -3,16 +3,22 @@
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
function setCoord(config, pos)
|
||||
{
|
||||
var culture = '@System.Globalization.CultureInfo.CurrentCulture.Name';
|
||||
var lat = new Number(pos.lat);
|
||||
var lng = new Number(pos.lng);
|
||||
$('#'+config.latId).val(lat.toLocaleString(culture));
|
||||
$('#'+config.lonId).val(lng.toLocaleString(culture));
|
||||
}
|
||||
function chooseLoc(config, sender, loc) {
|
||||
if (sender === 'user') $('#'+config.addrId).val(loc.formatted_address);
|
||||
var pos = loc.geometry.location;
|
||||
var lat = new Number(pos.lat);
|
||||
var lng = new Number(pos.lng);
|
||||
var mapid = '#'+config.addrId;
|
||||
var gmap = config.gmap;
|
||||
gmap.setCenter(pos);
|
||||
$('#'+config.latId).val(pos.lat);
|
||||
$('#'+config.longId).val(pos.lng);
|
||||
setCoord(config, pos);
|
||||
var marker = new google.maps.Marker({
|
||||
map: gmap,
|
||||
draggable: true,
|
||||
@ -21,8 +27,7 @@
|
||||
});
|
||||
google.maps.event.addListener(marker, 'dragend', function() {
|
||||
var pos = marker.getPosition();
|
||||
$('#'+config.latId).val(pos.lat);
|
||||
$('#'+config.longId).val(pos.lng);
|
||||
setCoord(config, { lat: pos.lat(), lng: pos.lng() });
|
||||
});
|
||||
$('#'+config.addrId).valid();
|
||||
$('#'+config.valId).empty();
|
||||
@ -39,7 +44,6 @@
|
||||
valId: $(mapDiv).data('val'),
|
||||
locComboId: $(mapDiv).data('loccombo')
|
||||
};
|
||||
console.log(config);
|
||||
|
||||
var input = '#'+config.addrId;
|
||||
$(input).data("val-required", '@SR["SpecifyPlace"]') ;
|
||||
|
@ -152,7 +152,7 @@
|
||||
"yavsc": "Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:86",
|
||||
"coiffure": "Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:88",
|
||||
"freefield": "Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:89",
|
||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5000"
|
||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls https://localhost:5000"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": {
|
||||
|
3
Yavsc/wwwroot/css/main/bootstrap.css
vendored
3
Yavsc/wwwroot/css/main/bootstrap.css
vendored
@ -5555,7 +5555,8 @@ fieldset[disabled] .navbar-default .btn-link:focus {
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-brand {
|
||||
color: #9d9d9d;
|
||||
color: #000;
|
||||
background-color: #fff8;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-brand:hover,
|
||||
|
Reference in New Issue
Block a user