Переработаны роутеры приложения
Переписано APi WebSocket для работы с новыми роутерами
This commit is contained in:
84
web/lib/pages/territory/editor/index.html
Normal file
84
web/lib/pages/territory/editor/index.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<div class="page-editor">
|
||||
<div id="part-1" class="part_block">
|
||||
<h1>
|
||||
<span>Крок 1.</span> Інформація про будинок, територію, точки на карті
|
||||
</h1>
|
||||
|
||||
<form id="info-form">
|
||||
<div>
|
||||
<label for="info-title">Назва вулиці</label>
|
||||
<input
|
||||
type="text"
|
||||
id="info-title"
|
||||
name="address"
|
||||
required
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="info-number">Номер будинку / частини</label>
|
||||
<input type="text" id="info-number" name="number" required value="" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="info-settlement">Місто</label>
|
||||
<input
|
||||
type="text"
|
||||
id="info-settlement"
|
||||
name="settlement"
|
||||
required
|
||||
value="Тернопіль"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="part-2" class="part_block">
|
||||
<h1 id="part-2-title"><span>Крок 2.</span> Створення будинку / ділянки</h1>
|
||||
|
||||
<div class="osm-info">
|
||||
<div>
|
||||
<label for="info-osm">OSM iD</label>
|
||||
<div>
|
||||
<input
|
||||
id="info-osm"
|
||||
type="text"
|
||||
placeholder="123, 345, 678"
|
||||
onchange="Territory_editor.osm.autoPoligon(this.value)"
|
||||
/>
|
||||
<a
|
||||
href="https://www.openstreetmap.org/#map=19/49.561725/25.604458"
|
||||
target="_blank"
|
||||
title="Де знайти OSM iD ?"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 48 48"
|
||||
width="100px"
|
||||
height="100px"
|
||||
>
|
||||
<path
|
||||
d="M 24 4 C 12.972066 4 4 12.972074 4 24 C 4 35.027926 12.972066 44 24 44 C 35.027934 44 44 35.027926 44 24 C 44 12.972074 35.027934 4 24 4 z M 24 7 C 33.406615 7 41 14.593391 41 24 C 41 33.406609 33.406615 41 24 41 C 14.593385 41 7 33.406609 7 24 C 7 14.593391 14.593385 7 24 7 z M 24 14 A 2 2 0 0 0 24 18 A 2 2 0 0 0 24 14 z M 23.976562 20.978516 A 1.50015 1.50015 0 0 0 22.5 22.5 L 22.5 33.5 A 1.50015 1.50015 0 1 0 25.5 33.5 L 25.5 22.5 A 1.50015 1.50015 0 0 0 23.976562 20.978516 z"
|
||||
></path>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<span>або</span>
|
||||
<button onclick="Territory_editor.osm.newPoligon()">Обрати на карті</button>
|
||||
</div>
|
||||
|
||||
<div class="block-map">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
|
||||
<button type="button" id="part-2-button" onclick="Territory_editor.save()">Зберегти</button>
|
||||
</div>
|
||||
|
||||
<div id="part-3" class="part_block" style="display: none">
|
||||
<h1 id="part-3-title"><span>Крок 3.</span> Створення квартир</h1>
|
||||
|
||||
<div id="house"></div>
|
||||
</div>
|
||||
</div>
|
||||
1200
web/lib/pages/territory/editor/script.js
Normal file
1200
web/lib/pages/territory/editor/script.js
Normal file
File diff suppressed because it is too large
Load Diff
398
web/lib/pages/territory/editor/style.css
Normal file
398
web/lib/pages/territory/editor/style.css
Normal file
@@ -0,0 +1,398 @@
|
||||
.page-editor {
|
||||
width: calc(100% - 40px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 20px 20px 0 20px;
|
||||
}
|
||||
|
||||
.page-editor>#part-1,
|
||||
.page-editor>#part-2,
|
||||
.page-editor>#part-3 {
|
||||
border-radius: 10px;
|
||||
width: calc(100% - 40px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
margin-bottom: 20px;
|
||||
background: var(--ColorThemes1);
|
||||
color: var(--ColorThemes3);
|
||||
border: 1px solid var(--ColorThemes2);
|
||||
box-shadow: var(--shadow-l1);
|
||||
padding: 0 20px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.page-editor>#part-1>h1,
|
||||
.page-editor>#part-2>h1,
|
||||
.page-editor>#part-3>h1 {
|
||||
width: calc(100% - 40px);
|
||||
color: var(--ColorThemes3);
|
||||
border-radius: var(--border-radius);
|
||||
font-size: var(--FontSize5);
|
||||
font-weight: 300;
|
||||
padding: 20px 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.page-editor>#part-1>h1>span,
|
||||
.page-editor>#part-2>h1>span,
|
||||
.page-editor>#part-3>h1>span {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.page-editor>#part-1>form>div {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin: 0 0 20px 0;
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.page-editor>#part-1>form>div>label {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
font-size: var(--FontSize1);
|
||||
font-weight: 500;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.page-editor>#part-1>form>div>input {
|
||||
width: calc(100% - 10px);
|
||||
min-width: 140px;
|
||||
padding: 0 5px;
|
||||
border-radius: 6px;
|
||||
height: 30px;
|
||||
background: var(--ColorThemes0);
|
||||
color: var(--ColorThemes3);
|
||||
font-size: var(--FontSize2);
|
||||
}
|
||||
|
||||
.page-editor>#part-1>form>button,
|
||||
.page-editor>#part-2>button,
|
||||
.page-editor>#part-3>button {
|
||||
border-radius: 6px;
|
||||
background: var(--PrimaryColor);
|
||||
color: var(--PrimaryColorText);
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
font-size: var(--FontSize3);
|
||||
font-weight: 400;
|
||||
margin: 0 0 20px 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.osm-info {
|
||||
padding-bottom: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.osm-info>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.osm-info>div {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.osm-info>div>label {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
font-size: var(--FontSize1);
|
||||
font-weight: 500;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.osm-info>div>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.osm-info>div>div>input {
|
||||
width: calc(100% - 10px);
|
||||
min-width: 140px;
|
||||
padding: 0 5px;
|
||||
border-radius: 6px;
|
||||
height: 30px;
|
||||
background: var(--ColorThemes0);
|
||||
color: var(--ColorThemes3);
|
||||
font-size: var(--FontSize2);
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.osm-info>div>div>a {
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.osm-info>div>div>a>svg {
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
fill: var(--ColorThemes3);
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.osm-info>span {
|
||||
font-size: var(--FontSize5);
|
||||
margin: 10px;
|
||||
color: var(--ColorThemes3);
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.osm-info>button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
transition: 0.15s ease-in;
|
||||
color: var(--PrimaryColorText);
|
||||
background: var(--PrimaryColor);
|
||||
border-radius: 6px;
|
||||
flex-direction: row;
|
||||
z-index: 2;
|
||||
font-size: var(--FontSize3);
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.block-map {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: var(--ColorThemes1);
|
||||
color: var(--ColorThemes3);
|
||||
border: 1px solid var(--ColorThemes2);
|
||||
box-shadow: var(--shadow-l1);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.page-editor>#part-2>.block-map>#map {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>input {
|
||||
font-weight: 500;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 10px;
|
||||
margin: 13px;
|
||||
font-size: var(--FontSize1);
|
||||
background: var(--ColorThemes3);
|
||||
color: var(--ColorThemes0);
|
||||
border-radius: 6px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house {
|
||||
display: flex;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>button {
|
||||
display: flex;
|
||||
position: relative;
|
||||
width: 34px;
|
||||
min-width: 34px;
|
||||
height: calc(100% - 10px);
|
||||
background: var(--PrimaryColor);
|
||||
color: var(--PrimaryColorText);
|
||||
margin: 0 10px;
|
||||
border-radius: 6px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>button>svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: var(--PrimaryColorText);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance {
|
||||
min-height: 200px;
|
||||
border: 1px solid var(--ColorThemes3);
|
||||
border-style: dashed;
|
||||
border-radius: 6px;
|
||||
margin: 0 10px 10px 0;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.entrance-info>.entrance-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.entrance-info>.entrance-header>input {
|
||||
text-align: center;
|
||||
font-size: var(--FontSize5);
|
||||
font-weight: 400;
|
||||
margin: 10px;
|
||||
padding: 7px;
|
||||
color: var(--ColorThemes0);
|
||||
background: var(--ColorThemes3);
|
||||
border-radius: 4px;
|
||||
width: calc(100% - 14px - 20px);
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.entrance-info>.entrance-header>button {
|
||||
display: flex;
|
||||
margin: 10px 10px 10px 0px;
|
||||
border-radius: 4px;
|
||||
min-width: 33px;
|
||||
min-height: 33px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.entrance-info>.entrance-header>button>svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
fill: #C14D4D;
|
||||
}
|
||||
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.entrance-info>button,
|
||||
.page-editor>#part-3>#house>.entrance>.floor>.floor-info>button {
|
||||
display: flex;
|
||||
position: relative;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
background: var(--PrimaryColor);
|
||||
color: var(--PrimaryColorText);
|
||||
margin: 25px;
|
||||
border-radius: 50%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.entrance-info>button>svg,
|
||||
.page-editor>#part-3>#house>.entrance>.floor>.floor-info>button>svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: var(--PrimaryColorText);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.floor {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: calc(100% - 22px);
|
||||
border: 1px solid var(--ColorThemes3);
|
||||
margin: 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.floor>.floor-info>h2 {
|
||||
position: absolute;
|
||||
width: 65px;
|
||||
right: -1px;
|
||||
top: -1px;
|
||||
margin: 0;
|
||||
background: var(--ColorThemes3);
|
||||
color: var(--ColorThemes2);
|
||||
border-radius: 0 4px 0 4px;
|
||||
font-size: var(--FontSize1);
|
||||
padding: 2px 4px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.floor>.apartment {
|
||||
display: flex;
|
||||
position: relative;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
background: var(--ColorThemes1);
|
||||
border: 2px solid var(--PrimaryColor);
|
||||
margin: 10px;
|
||||
border-radius: 4px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.floor>.apartment>input {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
font-size: var(--FontSize5);
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
color: var(--ColorThemes3);
|
||||
background: 0;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.floor>.apartment>button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 0 4px 0 4px;
|
||||
background: var(--PrimaryColor);
|
||||
font-size: var(--FontSize5);
|
||||
margin: -2px;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>#house>.entrance>.floor>.apartment>button>svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
fill: var(--PrimaryColorText);
|
||||
}
|
||||
|
||||
.page-editor>#part-3>.info {}
|
||||
|
||||
.page-editor>#part-3>.info>p {
|
||||
font-size: var(--FontSize2);
|
||||
color: var(--ColorThemes3);
|
||||
opacity: 0.8;
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>.info>button {
|
||||
border-radius: 6px;
|
||||
background: var(--ColorThemes3);
|
||||
width: fit-content;
|
||||
height: 40px;
|
||||
padding: 0 10px;
|
||||
margin-bottom: 20px;
|
||||
text-transform: uppercase;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>.info>button>svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: var(--ColorThemes0);
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.page-editor>#part-3>.info>button>span {
|
||||
font-size: var(--FontSize3);
|
||||
font-weight: 400;
|
||||
color: var(--ColorThemes0);
|
||||
}
|
||||
Reference in New Issue
Block a user