From 1ed2c05a9763d9237300b5149c9df20734c32992 Mon Sep 17 00:00:00 2001 From: Marc Hollander Date: Tue, 27 Oct 2020 08:51:48 +0100 Subject: [PATCH 1/8] #3 Update gear for rides --- src/extension/updateActivities.js | 74 +++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 4 deletions(-) diff --git a/src/extension/updateActivities.js b/src/extension/updateActivities.js index 0d256a2..f837368 100644 --- a/src/extension/updateActivities.js +++ b/src/extension/updateActivities.js @@ -1,4 +1,5 @@ 'use strict'; + const filterPanel = document.querySelector('.search .panel'); const filterPanelHeading = document.createElement('div'); @@ -27,6 +28,42 @@ const editPanelBody = document.createElement('div'); editPanelBody.classList.add('panel-body', 'row'); editPanel.appendChild(editPanelBody); +const workoutTypeRideOptions = document.getElementById('workout_type_ride'); +const editPanelFormGroupRideType = document.createElement('div'); +editPanelFormGroupRideType.classList.add('form-group', 'col-sm-6'); +editPanelBody.appendChild(editPanelFormGroupRideType); + +const editPanelRideTypeLabel = document.createElement('label'); +editPanelRideTypeLabel.innerText = 'Ride type'; +editPanelFormGroupRideType.appendChild(editPanelRideTypeLabel); + +const editPanelRideTypeField = document.createElement('select'); +editPanelRideTypeField.id = 'strava-bulk-edit-ride-type'; +editPanelRideTypeField.classList.add('form-control'); +editPanelRideTypeField.innerHTML = workoutTypeRideOptions.innerHTML.replace(/