Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove subrides #905

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions assets/js/modules/entity/Factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ define([], function () {
return eventEntity;
};

Factory.prototype.createSubride = function (subrideJson) {
var subrideEntity = new SubrideEntity();

subrideEntity = this._transferProperties(subrideEntity, subrideJson);

return subrideEntity;
};

Factory.prototype.createCity = function (cityJson) {
var cityEntity = new CityEntity();

Expand Down
67 changes: 0 additions & 67 deletions assets/js/modules/entity/SubrideEntity.js

This file was deleted.

24 changes: 0 additions & 24 deletions assets/js/modules/map/marker/SubrideMarker.js

This file was deleted.

109 changes: 0 additions & 109 deletions assets/js/modules/page/EditSubridePage.js

This file was deleted.

33 changes: 1 addition & 32 deletions assets/js/modules/page/RidePage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['CriticalService', 'Map', 'Container', 'ClusterContainer', 'CityEntity', 'RideEntity', 'TimelapseTrackEntity', 'SubrideEntity', 'MapLayerControl', 'PhotoEntity', 'PhotoViewModal', 'Timelapse'], function (CriticalService) {
define(['CriticalService', 'Map', 'Container', 'ClusterContainer', 'CityEntity', 'RideEntity', 'TimelapseTrackEntity', 'MapLayerControl', 'PhotoEntity', 'PhotoViewModal', 'Timelapse'], function (CriticalService) {

RidePage = function (context, options) {
this.options = options;
Expand All @@ -9,7 +9,6 @@ define(['CriticalService', 'Map', 'Container', 'ClusterContainer', 'CityEntity',
this._initLayerControl();
this._initTrackToggleEvent();
this._initPhotoViewModal();
this._initSubrideEvents();
this._initTimelapse();

this._CriticalService = CriticalService;
Expand All @@ -18,7 +17,6 @@ define(['CriticalService', 'Map', 'Container', 'ClusterContainer', 'CityEntity',
RidePage.prototype._map = null;
RidePage.prototype._ride = null;
RidePage.prototype._city = null;
RidePage.prototype._subrideContainer = null;
RidePage.prototype._layerControl = null;
RidePage.prototype._layers = null;
RidePage.prototype._timelapse = null;
Expand Down Expand Up @@ -68,7 +66,6 @@ define(['CriticalService', 'Map', 'Container', 'ClusterContainer', 'CityEntity',

this._rideContainer.addToControl(this._layers, 'Tour');
this._cityContainer.addToControl(this._layers, 'Städte');
this._subrideContainer.addToControl(this._layers, 'Mini-Masses');
this._trackContainer.addToControl(this._layers, 'Tracks');
this._photoContainer.addToControl(this._layers, 'Fotos');

Expand All @@ -85,15 +82,13 @@ define(['CriticalService', 'Map', 'Container', 'ClusterContainer', 'CityEntity',
};

RidePage.prototype._initContainers = function () {
this._subrideContainer = new Container();
this._trackContainer = new Container();
this._cityContainer = new Container();
this._rideContainer = new Container();
this._photoContainer = new ClusterContainer();
};

RidePage.prototype._initLayers = function () {
this._subrideContainer.addToMap(this._map);
this._trackContainer.addToMap(this._map);
this._cityContainer.addToMap(this._map);
this._rideContainer.addToMap(this._map);
Expand Down Expand Up @@ -133,32 +128,6 @@ define(['CriticalService', 'Map', 'Container', 'ClusterContainer', 'CityEntity',
this._ride.addToContainer(this._rideContainer);
};

RidePage.prototype.addSubride = function (subrideJson) {
var subride = this._CriticalService.factory.createSubride(subrideJson);

subride.addToContainer(this._subrideContainer, subride.getId());
};

RidePage.prototype._initSubrideEvents = function () {
var that = this;

$('.subride a.subride-link').on('click', function () {
var subrideId = $(this).data('subride-id');

that._panMapToSubride(subrideId);
});
};

RidePage.prototype._panMapToSubride = function (subrideId) {
var subride = this._subrideContainer.getEntity(subrideId);

subride.openPopup();

var latLng = subride.getLatLng();

this._map.setView(latLng, 14);
};

RidePage.prototype.addTrack = function (trackJson) {
var track = this._CriticalService.factory.createTrack(trackJson);

Expand Down
5 changes: 0 additions & 5 deletions config/routes/99-annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ controllers_api_photo:
type: annotation
prefix: '/api/'

controllers_api_subride:
resource: '../../src/Controller/Api/SubrideController.php'
type: annotation
prefix: '/api/'

controllers_api_track:
resource: '../../src/Controller/Api/TrackController.php'
type: annotation
Expand Down
4 changes: 0 additions & 4 deletions config/routes/criticalmass/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ caldera_criticalmass_rideestimate:
resource: 'rideestimate.yml'
prefix: /

caldera_criticalmass_subdride:
resource: 'subride.yml'
prefix: /

caldera_criticalmass_oauth:
resource: 'oauth.yml'
prefix: /
Expand Down
15 changes: 0 additions & 15 deletions config/routes/criticalmass/subride.yml

This file was deleted.

52 changes: 0 additions & 52 deletions src/Controller/Api/SubrideController.php

This file was deleted.

1 change: 0 additions & 1 deletion src/Controller/Ride/RideController.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public function showAction(SeoPageInterface $seoPage, EventDispatcherInterface $
'ride' => $ride,
'tracks' => $this->getTrackRepository()->findTracksByRide($ride),
'photos' => $this->getPhotoRepository()->findPhotosByRide($ride),
'subrides' => $this->getSubrideRepository()->getSubridesForRide($ride),
'dateTime' => new \DateTime(),
'weatherForecast' => $weatherForecast,
'participation' => $participation,
Expand Down
Loading