update views

This commit is contained in:
Nabeel Shahzad
2017-06-19 09:47:26 -05:00
parent f4e7eef40c
commit bbde1ccfd6
12 changed files with 29 additions and 435 deletions

38
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "54a87d4ef6ab895374f978fe8563b529",
"content-hash": "95b3ff9658c5de4a09ad71bb6d8393c7",
"packages": [
{
"name": "barryvdh/laravel-ide-helper",
@@ -911,7 +911,7 @@
"laravel",
"templates"
],
"time": "2017-05-20T10:43:37+00:00"
"time": "2017-05-20 10:43:37"
},
{
"name": "infyomlabs/laravel-generator",
@@ -966,7 +966,7 @@
"test",
"view"
],
"time": "2016-08-18T14:19:50+00:00"
"time": "2016-08-18 14:19:50"
},
{
"name": "infyomlabs/swagger-generator",
@@ -1003,7 +1003,7 @@
"swagger",
"templates"
],
"time": "2016-02-14T10:41:03+00:00"
"time": "2016-02-14 10:41:03"
},
{
"name": "jeremeamia/SuperClosure",
@@ -1106,7 +1106,7 @@
"laravel",
"swagger"
],
"time": "2016-01-25T15:38:17+00:00"
"time": "2016-01-25 15:38:17"
},
{
"name": "laracasts/flash",
@@ -1153,16 +1153,16 @@
},
{
"name": "laravel/framework",
"version": "v5.4.26",
"version": "v5.4.27",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "a7ebbfab64111e24f8e584db64e2be9279ded357"
"reference": "66f5e1b37cbd66e730ea18850ded6dc0ad570404"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/a7ebbfab64111e24f8e584db64e2be9279ded357",
"reference": "a7ebbfab64111e24f8e584db64e2be9279ded357",
"url": "https://api.github.com/repos/laravel/framework/zipball/66f5e1b37cbd66e730ea18850ded6dc0ad570404",
"reference": "66f5e1b37cbd66e730ea18850ded6dc0ad570404",
"shasum": ""
},
"require": {
@@ -1278,7 +1278,7 @@
"framework",
"laravel"
],
"time": "2017-06-13T18:58:49+00:00"
"time": "2017-06-15T19:08:25+00:00"
},
{
"name": "laravelcollective/html",
@@ -1625,16 +1625,16 @@
},
{
"name": "monolog/monolog",
"version": "1.22.1",
"version": "1.23.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0"
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/1e044bc4b34e91743943479f1be7a1d5eb93add0",
"reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
"reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
"shasum": ""
},
"require": {
@@ -1655,7 +1655,7 @@
"phpunit/phpunit-mock-objects": "2.3.0",
"ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
"swiftmailer/swiftmailer": "~5.3"
"swiftmailer/swiftmailer": "^5.3|^6.0"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
@@ -1699,7 +1699,7 @@
"logging",
"psr-3"
],
"time": "2017-03-13T07:08:03+00:00"
"time": "2017-06-19T01:22:40+00:00"
},
{
"name": "mtdowling/cron-expression",
@@ -3943,12 +3943,12 @@
"version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/geocoder-php/Geocoder.git",
"url": "https://github.com/geocoder-php/php-common.git",
"reference": "ccc178e2984c0af24881faa0ffe515f20e5e8c23"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/geocoder-php/Geocoder/zipball/ccc178e2984c0af24881faa0ffe515f20e5e8c23",
"url": "https://api.github.com/repos/geocoder-php/php-common/zipball/ccc178e2984c0af24881faa0ffe515f20e5e8c23",
"reference": "ccc178e2984c0af24881faa0ffe515f20e5e8c23",
"shasum": ""
},
@@ -4238,7 +4238,7 @@
"permission",
"roles"
],
"time": "2016-12-29T06:25:06+00:00"
"time": "2016-12-29 06:25:06"
}
],
"packages-dev": [

View File

@@ -1,22 +0,0 @@
var circleCoordinates_{!! $id !!} = (
@foreach ($options['coordinates'] as $key => $coordinate)
new google.maps.LatLng({!! $coordinate['latitude'] !!}, {!! $coordinate['longitude'] !!})
@endforeach
);
var circle_{!! $id !!} = new google.maps.Circle({
strokeColor: '{!! $options['strokeColor'] !!}',
strokeOpacity: {!! $options['strokeOpacity'] !!},
strokeWeight: {!! $options['strokeWeight'] !!},
fillColor: '{!! $options['fillColor'] !!}',
fillOpacity: {!! $options['fillOpacity'] !!},
center: circleCoordinates_{!! $id !!},
radius: {!! $options['radius'] !!},
editable: {!! $options['editable'] ? 'true' : 'false' !!}
});
circle_{!! $id !!}.setMap({!! $options['map'] !!});
shapes.push({
'circle_{!! $id !!}': circle_{!! $id !!}
});

View File

@@ -1,37 +0,0 @@
@if (!$view->shared('javascript', false))
@if ($view->share('javascript', true)) @endif
@if ($options['async'])
<script async defer type="text/javascript" src="//maps.googleapis.com/maps/api/js?v={!! $options['version'] !!}&region={!! $options['region'] !!}&language={!! $options['language'] !!}&key={!! $options['key'] !!}&signed_in={!! $options['user'] ? 'true' : 'false' !!}&libraries=places&callback=initialize_method"></script>
@else
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?v={!! $options['version'] !!}&region={!! $options['region'] !!}&language={!! $options['language'] !!}&key={!! $options['key'] !!}&signed_in={!! $options['user'] ? 'true' : 'false' !!}&libraries=places"></script>
@endif
@if ($options['cluster'])
<script type="text/javascript" src="//googlemaps.github.io/js-marker-clusterer/src/markerclusterer.js"></script>
@endif
@if ($options['async'])
<script type="text/javascript">
var initialize_items = [];
function initialize_method() {
initialize_items.forEach(function(item) {
item.method();
});
}
</script>
@endif
@endif

View File

@@ -1,106 +0,0 @@
<div id="map-canvas-{!! $id !!}" style="width: 100%; height: 100%; margin: 0; padding: 0; position: relative; overflow: hidden;"></div>
<script type="text/javascript">
var maps = [];
function initialize_{!! $id !!}() {
var bounds = new google.maps.LatLngBounds();
var infowindow = new google.maps.InfoWindow();
var position = new google.maps.LatLng({!! $options['latitude'] !!}, {!! $options['longitude'] !!});
var mapOptions_{!! $id !!} = {
@if ($options['center'])
center: position,
@endif
mapTypeId: google.maps.MapTypeId.{!! $options['type'] !!},
disableDefaultUI: @if (!$options['ui']) true @else false @endif,
scrollwheel: @if ($options['scrollWheelZoom']) true @else false @endif,
fullscreenControl: @if ($options['fullscreenControl']) true @else false @endif,
};
var map_{!! $id !!} = new google.maps.Map(document.getElementById('map-canvas-{!! $id !!}'), mapOptions_{!! $id !!});
map_{!! $id !!}.setTilt({!! $options['tilt'] !!});
var markers = [];
var infowindows = [];
var shapes = [];
@foreach ($options['markers'] as $key => $marker)
{!! $marker->render($key, $view) !!}
@endforeach
@foreach ($options['shapes'] as $key => $shape)
{!! $shape->render($key, $view) !!}
@endforeach
@if ($options['overlay'] == 'BIKE')
var bikeLayer = new google.maps.BicyclingLayer();
bikeLayer.setMap(map_{!! $id !!});
@endif
@if ($options['overlay'] == 'TRANSIT')
var transitLayer = new google.maps.TransitLayer();
transitLayer.setMap(map_{!! $id !!});
@endif
@if ($options['overlay'] == 'TRAFFIC')
var trafficLayer = new google.maps.TrafficLayer();
trafficLayer.setMap(map_{!! $id !!});
@endif
var idleListener = google.maps.event.addListenerOnce(map_{!! $id !!}, "idle", function () {
map_{!! $id !!}.setZoom({!! $options['zoom'] !!});
@if (!$options['center'])
map_{!! $id !!}.fitBounds(bounds);
@endif
@if ($options['locate'])
if (typeof navigator !== 'undefined' && navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
map_{!! $id !!}.setCenter(new google.maps.LatLng(position.coords.latitude, position.coords.longitude));
});
}
@endif
});
var map = map_{!! $id !!};
@if (isset($options['eventBeforeLoad']))
{!! $options['eventBeforeLoad'] !!}
@endif
@if (isset($options['eventAfterLoad']))
google.maps.event.addListenerOnce(map_{!! $id !!}, "tilesloaded", function() {
{!! $options['eventAfterLoad'] !!}
});
@endif
@if ($options['cluster'])
var markerClusterOptions = {
imagePath: '{!! $options['clusters']['icon'] !!}',
gridSize: {!! $options['clusters']['grid'] !!},
maxZoom: @if ($options['clusters']['zoom'] === null) null @else {!! $options['clusters']['zoom'] !!} @endif,
averageCenter: @if ($options['clusters']['center'] === true) true @else false @endif,
minimumClusterSize: {!! $options['clusters']['size'] !!}
};
var markerCluster = new MarkerClusterer(map_{!! $id !!}, markers, markerClusterOptions);
@endif
maps.push({
key: {!! $id !!},
markers: markers,
infowindows: infowindows,
map: map_{!! $id !!},
shapes: shapes
});
}
@if (!$options['async'])
google.maps.event.addDomListener(window, 'load', initialize_{!! $id !!});
@endif
</script>

View File

@@ -1,19 +0,0 @@
@include('googlmapper::javascript')
@foreach ($items as $id => $item)
{!! $item->render($id, $view) !!}
@if ($options['async'])
<script type="text/javascript">
initialize_items.push({
method: initialize_{!! $id !!}
});
</script>
@endif
@endforeach

View File

@@ -1,110 +0,0 @@
@if ($options['user'] && $options['place'])
var service = new google.maps.places.PlacesService({!! $options['map'] !!});
var request = {
placeId: '{!! $options['place'] !!}'
};
service.getDetails(request, function(placeResult, status) {
if (status != google.maps.places.PlacesServiceStatus.OK) {
alert('Unable to find the Place details.');
return;
}
@endif
var markerPosition_{!! $id !!} = new google.maps.LatLng({!! $options['latitude'] !!}, {!! $options['longitude'] !!});
var marker_{!! $id !!} = new google.maps.Marker({
position: markerPosition_{!! $id !!},
@if ($options['user'] && $options['place'])
place: {
placeId: '{!! $options['place'] !!}',
location: { lat: {!! $options['latitude'] !!}, lng: {!! $options['longitude'] !!} }
},
attribution: {
source: document.title,
webUrl: document.URL
},
@endif
@if (isset($options['draggable']) && $options['draggable'] == true)
draggable:true,
@endif
title: {!! json_encode((string) $options['title']) !!},
label: {!! json_encode((string) $options['label']) !!},
animation: @if (empty($options['animation']) || $options['animation'] == 'NONE') '' @else google.maps.Animation.{!! $options['animation'] !!} @endif,
@if ($options['symbol'])
icon: {
path: google.maps.SymbolPath.{!! $options['symbol'] !!},
scale: {!! $options['scale'] !!}
}
@else
icon: {!! json_encode((is_array($options['icon']) ? (array) $options['icon'] : (string) $options['icon'])) !!}
@endif
});
bounds.extend(marker_{!! $id !!}.position);
marker_{!! $id !!}.setMap({!! $options['map'] !!});
markers.push(marker_{!! $id !!});
@if ($options['user'] && $options['place'])
marker_{!! $id !!}.addListener('click', function() {
infowindow.setContent('<a href="' + placeResult.website + '">' + placeResult.name + '</a>');
infowindow.open({!! $options['map'] !!}, this);
});
});
@else
@if (!empty($options['content']))
var infowindow_{!! $id !!} = new google.maps.InfoWindow({
content: {!! json_encode((string) $options['content']) !!}
});
@if (isset($options['maxWidth']))
infowindow_{!! $id !!}.setOptions({ maxWidth: {!! $options['maxWidth'] !!} });
@endif
@if (isset($options['open']) && $options['open'])
infowindow_{!! $id !!}.open({!! $options['map'] !!}, marker_{!! $id !!});
@endif
google.maps.event.addListener(marker_{!! $id !!}, 'click', function() {
@if (isset($options['autoClose']) && $options['autoClose'])
for (var i = 0; i < infowindows.length; i++) {
infowindows[i].close();
}
@endif
infowindow_{!! $id !!}.open({!! $options['map'] !!}, marker_{!! $id !!});
});
infowindows.push(infowindow_{!! $id !!});
@endif
@endif
@foreach (['eventClick', 'eventRightClick', 'eventMouseOver', 'eventMouseDown', 'eventMouseUp', 'eventMouseOut', 'eventDrag', 'eventDragStart', 'eventDragEnd', 'eventDomReady'] as $event)
@if (isset($options[$event]))
google.maps.event.addListener(marker_{!! $id !!}, '{!! str_replace('event', '', strtolower($event)) !!}', function (event) {
{!! $options[$event] !!}
});
@endif
@endforeach

View File

@@ -1,12 +0,0 @@
var overlayCoordinates_{!! $id !!} = new google.maps.LatLngBounds(
@foreach ($options['coordinates'] as $coordinate)
new google.maps.LatLng({!! $coordinate['latitude'] !!}, {!! $coordinate['longitude'] !!}),
@endforeach
);
overlay_{!! $id !!} = new google.maps.GroundOverlay(
'{!! $options['image'] !!}',
overlayCoordinates_{!! $id !!}
);
overlay_{!! $id !!}.setMap({!! $options['map'] !!});

View File

@@ -1,21 +0,0 @@
var polygonCoordinates_{!! $id !!} = [
@foreach ($options['coordinates'] as $coordinate)
new google.maps.LatLng({!! $coordinate['latitude'] !!}, {!! $coordinate['longitude'] !!}),
@endforeach
];
var polygon_{!! $id !!} = new google.maps.Polygon({
paths: polygonCoordinates_{!! $id !!},
strokeColor: '{!! $options['strokeColor'] !!}',
strokeOpacity: {!! $options['strokeOpacity'] !!},
strokeWeight: {!! $options['strokeWeight'] !!},
fillColor: '{!! $options['fillColor'] !!}',
fillOpacity: {!! $options['fillOpacity'] !!},
editable: {!! $options['editable'] ? 'true' : 'false' !!}
});
polygon_{!! $id !!}.setMap({!! $options['map'] !!});
shapes.push({
'polygon_{!! $id !!}': polygon_{!! $id !!}
});

View File

@@ -1,20 +0,0 @@
var polylineCoordinates_{!! $id !!} = [
@foreach ($options['coordinates'] as $coordinate)
new google.maps.LatLng({!! $coordinate['latitude'] !!}, {!! $coordinate['longitude'] !!}),
@endforeach
];
var polyline_{!! $id !!} = new google.maps.Polyline({
path: polylineCoordinates_{!! $id !!},
geodesic: {!! $options['strokeColor'] ? 'true' : 'false' !!},
strokeColor: '{!! $options['strokeColor'] !!}',
strokeOpacity: {!! $options['strokeOpacity'] !!},
strokeWeight: {!! $options['strokeWeight'] !!},
editable: {!! $options['editable'] ? 'true' : 'false' !!}
});
polyline_{!! $id !!}.setMap({!! $options['map'] !!});
shapes.push({
'polyline_{!! $id !!}': polyline_{!! $id !!}
});

View File

@@ -1,21 +0,0 @@
var rectangleCoordinates_{!! $id !!} = new google.maps.LatLngBounds(
@foreach ($options['coordinates'] as $key => $coordinate)
new google.maps.LatLng({!! $coordinate['latitude'] !!}, {!! $coordinate['longitude'] !!})@if (count($options['coordinates']) - 1 > $key), @endif
@endforeach
);
var rectangle_{!! $id !!} = new google.maps.Rectangle({
strokeColor: '{!! $options['strokeColor'] !!}',
strokeOpacity: {!! $options['strokeOpacity'] !!},
strokeWeight: {!! $options['strokeWeight'] !!},
fillColor: '{!! $options['fillColor'] !!}',
fillOpacity: {!! $options['fillOpacity'] !!},
bounds: rectangleCoordinates_{!! $id !!},
editable: {!! $options['editable'] ? 'true' : 'false' !!}
});
rectangle_{!! $id !!}.setMap({!! $options['map'] !!});
shapes.push({
'rectangle_{!! $id !!}': rectangle_{!! $id !!}
});

View File

@@ -1,39 +0,0 @@
<div id="map-canvas-{!! $id !!}" style="height: 100%; margin: 0; padding: 0;"></div>
<script type="text/javascript">
function initialize_{!! $id !!}() {
var bounds = new google.maps.LatLngBounds();
var position = new google.maps.LatLng({!! $options['latitude'] !!}, {!! $options['longitude'] !!});
var mapOptions = {
@if ($options['center'])
center: position,
@endif
zoom: {!! $options['zoom'] !!},
mapTypeId: google.maps.MapTypeId.{!! $options['type'] !!},
disableDefaultUI: @if (!$options['ui']) true @else false @endif
};
var map = new google.maps.Map(document.getElementById('map-canvas-{!! $id !!}'), mapOptions);
var panoramaOptions = {
position: position,
pov: {
heading: {!! $options['heading'] !!},
pitch: {!! $options['pitch'] !!}
}
};
var panorama = new google.maps.StreetViewPanorama(document.getElementById('map-canvas-{!! $id !!}'), panoramaOptions);
map.setStreetView(panorama);
}
@if (!$options['async'])
google.maps.event.addDomListener(window, 'load', initialize_{!! $id !!});
@endif
</script>

View File

@@ -73,8 +73,16 @@
<div class="flex-center position-ref full-height">
@if (Route::has('login'))
<div class="top-right links">
<a href="{{ url('/login') }}">Login</a>
<a href="{{ url('/register') }}">Register</a>
@if(!Auth::user())
<a href="{{ url('/login') }}">Login</a>
<a href="{{ url('/register') }}">Register</a>
@else
@if(Entrust::hasRole('admin'))
<a href="{{ url('/admin') }}">Admin</a>
@endif
<a href="{{ url('/dashboard') }}">Dashboard</a>
<a href="{{ url('/logout') }}">Logout</a>
@endif
</div>
@endif
@@ -83,13 +91,6 @@
phpVMS<sup style="">4</sup>
</div>
<!--<div class="links">
<a href="https://laravel.com/docs">Documentation</a>
<a href="https://laracasts.com">Laracasts</a>
<a href="https://laravel-news.com">News</a>
<a href="https://forge.laravel.com">Forge</a>
<a href="https://github.com/laravel/laravel">GitHub</a>
</div>-->
</div>
</div>
</body>