From 7032c36926622ca3cd4f385b88c04c558e4d939c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sasu=20=C3=96lander?= Date: Mon, 16 Oct 2023 14:14:12 +0300 Subject: [PATCH] bring back tram code from merge contflick fix --- UI/src/view/point_asset/massTransitStopForm.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/UI/src/view/point_asset/massTransitStopForm.js b/UI/src/view/point_asset/massTransitStopForm.js index 163c7bc9d6..2b624f71ea 100644 --- a/UI/src/view/point_asset/massTransitStopForm.js +++ b/UI/src/view/point_asset/massTransitStopForm.js @@ -3,6 +3,7 @@ var poistaSelected = false; var authorizationPolicy; var pointAssetToSave = false; + var tramStopToSave = false; var rootElement = $("#feature-attributes"); @@ -130,6 +131,11 @@ selectedMassTransitStopModel.deleteMassTransitStop(poistaSelected); } }); + } else if(tramStopToSave) { + new GenericConfirmPopup('Oletko varma, että haluat luoda pysäkin kävelyn ja pyöräilyn väylälle?', { + successCallback: function () { + saveStop(); + }}); } else if (pointAssetToSave) { saveWithPossibleWalkingCyclingPopUp(); } else { @@ -1098,6 +1104,10 @@ pointAssetToSave = true; } + if (property.publicId === "pysakin_tyyppi" && _.some(property.values, function (value) {return value.propertyValue === 1;})) { + tramStopToSave = true; + } + }); eventbus.on('busStop:selected', function(value) {