mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-11-15 03:31:19 +03:00
add new labels to config
This commit is contained in:
parent
eacb4f498e
commit
7d9ce1071f
2 changed files with 416 additions and 389 deletions
|
@ -30,5 +30,11 @@ ngallery:
|
||||||
img:
|
img:
|
||||||
proxy: true
|
proxy: true
|
||||||
percent: 50
|
percent: 50
|
||||||
|
photo:
|
||||||
|
upload:
|
||||||
|
premoderation: true
|
||||||
|
defaultindex: 5.0
|
||||||
|
comments:
|
||||||
|
premoderation: false
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use \App\Services\{Auth, DB};
|
use \App\Services\{Auth, DB};
|
||||||
use \App\Models\User;
|
use \App\Models\User;
|
||||||
|
|
||||||
$user = new User(Auth::userid());
|
$user = new User(Auth::userid());
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ru">
|
<html lang="ru">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,13 +24,13 @@ $user = new User(Auth::userid());
|
||||||
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
|
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
|
||||||
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
|
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
|
||||||
<script src="https://cesium.com/downloads/cesiumjs/releases/1.83/Build/Cesium/Cesium.js"></script>
|
<script src="https://cesium.com/downloads/cesiumjs/releases/1.83/Build/Cesium/Cesium.js"></script>
|
||||||
<link href="https://cesium.com/downloads/cesiumjs/releases/1.83/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
|
<link href="https://cesium.com/downloads/cesiumjs/releases/1.83/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-indoor/0.4.2/leaflet.indoor.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-indoor/0.4.2/leaflet.indoor.min.js"></script>
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet-indoor/0.4.2/leaflet.indoor.min.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet-indoor/0.4.2/leaflet.indoor.min.css" />
|
||||||
<!-- Подключение плагина Leaflet.markercluster -->
|
<!-- Подключение плагина Leaflet.markercluster -->
|
||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster/dist/MarkerCluster.css">
|
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster/dist/MarkerCluster.css">
|
||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster/dist/MarkerCluster.Default.css">
|
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster/dist/MarkerCluster.Default.css">
|
||||||
<script src="https://unpkg.com/leaflet.markercluster/dist/leaflet.markercluster.js"></script>
|
<script src="https://unpkg.com/leaflet.markercluster/dist/leaflet.markercluster.js"></script>
|
||||||
<!-- Подключение плагина Leaflet-Geoman -->
|
<!-- Подключение плагина Leaflet-Geoman -->
|
||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet-geoman-free/dist/leaflet-geoman.css">
|
<link rel="stylesheet" href="https://unpkg.com/leaflet-geoman-free/dist/leaflet-geoman.css">
|
||||||
<script src="https://unpkg.com/leaflet-geoman-free/dist/leaflet-geoman.min.js"></script>
|
<script src="https://unpkg.com/leaflet-geoman-free/dist/leaflet-geoman.min.js"></script>
|
||||||
|
@ -37,7 +39,7 @@ $user = new User(Auth::userid());
|
||||||
<script src="https://unpkg.com/leaflet-3d-model/dist/leaflet-3d-model.min.js"></script>
|
<script src="https://unpkg.com/leaflet-3d-model/dist/leaflet-3d-model.min.js"></script>
|
||||||
<td class="main">
|
<td class="main">
|
||||||
<h1>Предложить фото на публикацию</h1>
|
<h1>Предложить фото на публикацию</h1>
|
||||||
<p>Ваш текущий индекс загрузки: <b><?=$user->i('uploadindex')?></b></p>
|
<p>Ваш текущий индекс загрузки: <b><?= $user->i('uploadindex') ?></b></p>
|
||||||
<script>
|
<script>
|
||||||
var UPLOAD_JPG_MAX_PX = 2500;
|
var UPLOAD_JPG_MAX_PX = 2500;
|
||||||
var UPLOAD_PNG_MAX_PX = 0;
|
var UPLOAD_PNG_MAX_PX = 0;
|
||||||
|
@ -642,21 +644,38 @@ $user = new User(Auth::userid());
|
||||||
<div>
|
<div>
|
||||||
<label for="railwayCheckbox">Железная дорога от OpenRailwayMap:</label>
|
<label for="railwayCheckbox">Железная дорога от OpenRailwayMap:</label>
|
||||||
<input type="checkbox" id="railwayCheckbox">
|
<input type="checkbox" id="railwayCheckbox">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="lcol">Место съёмки:</td>
|
||||||
|
<td style="padding-right:15px">
|
||||||
|
<table width="100%">
|
||||||
|
<tr>
|
||||||
|
<td style="padding:0; vertical-align:middle">
|
||||||
|
<input type="text" name="place" id="place" maxlength="255" style="width:506px" onfocus="showHint('place')" onblur="hideHint('place')" value="">
|
||||||
|
</td>
|
||||||
|
|
||||||
</tbody>
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td colspan="2" style="height:7px"></td></tr><tr>
|
<tr>
|
||||||
|
<td colspan="2" style="height:7px"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
|
||||||
</tr></tbody><script>
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<script>
|
||||||
var map = L.map('map_canvas').setView([55.7558, 37.6176], 13);
|
var map = L.map('map_canvas').setView([55.7558, 37.6176], 13);
|
||||||
var marker;
|
var marker;
|
||||||
var geocoder;
|
var geocoder;
|
||||||
|
@ -702,7 +721,7 @@ $user = new User(Auth::userid());
|
||||||
} else {
|
} else {
|
||||||
map.removeLayer(baseLayers["openrailway"]);
|
map.removeLayer(baseLayers["openrailway"]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Инициализация карты Leaflet.js с выбранным базовым слоем по умолчанию
|
// Инициализация карты Leaflet.js с выбранным базовым слоем по умолчанию
|
||||||
baseLayers["osm"].addTo(map);
|
baseLayers["osm"].addTo(map);
|
||||||
|
|
||||||
|
@ -766,8 +785,13 @@ $user = new User(Auth::userid());
|
||||||
// Пример настройки интерактивности для меток
|
// Пример настройки интерактивности для меток
|
||||||
building.floors.forEach(function(floor) {
|
building.floors.forEach(function(floor) {
|
||||||
floor.markers.forEach(function(marker) {
|
floor.markers.forEach(function(marker) {
|
||||||
var markerIcon = L.divIcon({ className: 'indoor-marker', html: marker.label });
|
var markerIcon = L.divIcon({
|
||||||
L.marker(marker.latLng, { icon: markerIcon }).addTo(map.indoorLayer.getLevel(floor.level));
|
className: 'indoor-marker',
|
||||||
|
html: marker.label
|
||||||
|
});
|
||||||
|
L.marker(marker.latLng, {
|
||||||
|
icon: markerIcon
|
||||||
|
}).addTo(map.indoorLayer.getLevel(floor.level));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -818,7 +842,7 @@ $user = new User(Auth::userid());
|
||||||
map.fitBounds(poly.getBounds());
|
map.fitBounds(poly.getBounds());
|
||||||
}
|
}
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
</script>
|
</script>
|
||||||
<tbody class="p20">
|
<tbody class="p20">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="narrow" style="font-size:20px; padding:10px 15px 5px">Шаг 4. <b>Выберите опции загрузки:</b></td>
|
<td colspan="2" class="narrow" style="font-size:20px; padding:10px 15px 5px">Шаг 4. <b>Выберите опции загрузки:</b></td>
|
||||||
|
@ -876,37 +900,37 @@ $user = new User(Auth::userid());
|
||||||
$('#mform').submit(function(e) {
|
$('#mform').submit(function(e) {
|
||||||
|
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var formData = new FormData(this);
|
var formData = new FormData(this);
|
||||||
var bar = $('.bar');
|
var bar = $('.bar');
|
||||||
var percent = $('.percent');
|
var percent = $('.percent');
|
||||||
var status = $('#status');
|
var status = $('#status');
|
||||||
var continuepost = 0;
|
var continuepost = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: '/api/upload',
|
url: '/api/upload',
|
||||||
data: formData,
|
data: formData,
|
||||||
|
|
||||||
xhr: function() {
|
xhr: function() {
|
||||||
// Добавляем спиннер и блокируем кнопку во время загрузки
|
// Добавляем спиннер и блокируем кнопку во время загрузки
|
||||||
//$("#r").html('<button type="submit" id="register" name="loginaccount" class="btn btn-block btn-primary py-2 ripple-handler mt-1 mb-3" disabled><div class="plus-button-reflection"></div>Опубликовать</button>');
|
//$("#r").html('<button type="submit" id="register" name="loginaccount" class="btn btn-block btn-primary py-2 ripple-handler mt-1 mb-3" disabled><div class="plus-button-reflection"></div>Опубликовать</button>');
|
||||||
|
|
||||||
var xhr = new window.XMLHttpRequest();
|
var xhr = new window.XMLHttpRequest();
|
||||||
xhr.upload.addEventListener("progress", function(evt) {
|
xhr.upload.addEventListener("progress", function(evt) {
|
||||||
if (evt.lengthComputable) {
|
if (evt.lengthComputable) {
|
||||||
var percentComplete = parseInt(((evt.loaded / evt.total) * 100));
|
var percentComplete = parseInt(((evt.loaded / evt.total) * 100));
|
||||||
console.log(evt.total);
|
console.log(evt.total);
|
||||||
|
|
||||||
// Обновляем прогресс загрузки
|
// Обновляем прогресс загрузки
|
||||||
scrollProgressBarWidth(percentComplete);
|
scrollProgressBarWidth(percentComplete);
|
||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
return xhr;
|
return xhr;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -940,8 +964,7 @@ return xhr;
|
||||||
//$("#prgrsg").html('<div id="prgrs" class="progress-bar progress-bar-striped progress-bar-animated bg-danger" role="progressbar" aria-valuenow="0" aria-valuemin="100" aria-valuemax="100" style="width: 100%">100%</div>');
|
//$("#prgrsg").html('<div id="prgrs" class="progress-bar progress-bar-striped progress-bar-animated bg-danger" role="progressbar" aria-valuenow="0" aria-valuemin="100" aria-valuemax="100" style="width: 100%">100%</div>');
|
||||||
Notify.noty('danger', 'В посте больше 10 медиафайлов');
|
Notify.noty('danger', 'В посте больше 10 медиафайлов');
|
||||||
scrollProgressBarWidth(0);
|
scrollProgressBarWidth(0);
|
||||||
}
|
} else if (jsonData.errorcode == "0") {
|
||||||
else if (jsonData.errorcode == "0") {
|
|
||||||
Notify.noty('success', 'Успешная публикация!');
|
Notify.noty('success', 'Успешная публикация!');
|
||||||
$("#r").html('<button type="submit" id="register" name="loginaccount" class="btn btn-block btn-primary py-2 ripple-handler mt-1 mb-3" disabled>Опубликовать<span class="ripple-mask"><span class="ripple" style=""></span></span></button>');
|
$("#r").html('<button type="submit" id="register" name="loginaccount" class="btn btn-block btn-primary py-2 ripple-handler mt-1 mb-3" disabled>Опубликовать<span class="ripple-mask"><span class="ripple" style=""></span></span></button>');
|
||||||
//$("#r").html('<button id="uploadbtn" style="margin-right: 15px; background: none; border: none; color: aliceblue; " type="submit" name="createpost" class="mb-3 mt-3"><i style="position:relative; font-size: 25px; margin-right: 10px; color: aliceblue; top: 4px;" class="ti ti-message-share uploadbtn"></i>Опубликовать</button>');
|
//$("#r").html('<button id="uploadbtn" style="margin-right: 15px; background: none; border: none; color: aliceblue; " type="submit" name="createpost" class="mb-3 mt-3"><i style="position:relative; font-size: 25px; margin-right: 10px; color: aliceblue; top: 4px;" class="ti ti-message-share uploadbtn"></i>Опубликовать</button>');
|
||||||
|
@ -958,7 +981,7 @@ return xhr;
|
||||||
|
|
||||||
ws.send(JSON.stringify(positionData));*/
|
ws.send(JSON.stringify(positionData));*/
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
window.location.replace("/photo/"+jsonData.id);
|
window.location.replace("/photo/" + jsonData.id);
|
||||||
scrollProgressBarWidth(0);
|
scrollProgressBarWidth(0);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else if (jsonData.errorcode == "LIMITEXCEEDED") {
|
} else if (jsonData.errorcode == "LIMITEXCEEDED") {
|
||||||
|
@ -989,12 +1012,10 @@ return xhr;
|
||||||
cache: false,
|
cache: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
processData: false
|
processData: false
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
Loading…
Reference in a new issue