mirror of
https://github.com/claradex/nativegallery.git
synced 2024-12-22 16:41:04 +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:
|
||||
proxy: true
|
||||
percent: 50
|
||||
photo:
|
||||
upload:
|
||||
premoderation: true
|
||||
defaultindex: 5.0
|
||||
comments:
|
||||
premoderation: false
|
||||
|
||||
|
|
@ -1,15 +1,17 @@
|
|||
<?php
|
||||
|
||||
use \App\Services\{Auth, DB};
|
||||
use \App\Models\User;
|
||||
|
||||
$user = new User(Auth::userid());
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
@ -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-control-geocoder/dist/Control.Geocoder.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">
|
||||
<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" />
|
||||
<!-- Подключение плагина 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.Default.css">
|
||||
<script src="https://unpkg.com/leaflet.markercluster/dist/leaflet.markercluster.js"></script>
|
||||
<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>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet-indoor/0.4.2/leaflet.indoor.min.css" />
|
||||
<!-- Подключение плагина 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.Default.css">
|
||||
<script src="https://unpkg.com/leaflet.markercluster/dist/leaflet.markercluster.js"></script>
|
||||
<!-- Подключение плагина Leaflet-Geoman -->
|
||||
<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>
|
||||
|
@ -37,7 +39,7 @@ $user = new User(Auth::userid());
|
|||
<script src="https://unpkg.com/leaflet-3d-model/dist/leaflet-3d-model.min.js"></script>
|
||||
<td class="main">
|
||||
<h1>Предложить фото на публикацию</h1>
|
||||
<p>Ваш текущий индекс загрузки: <b><?=$user->i('uploadindex')?></b></p>
|
||||
<p>Ваш текущий индекс загрузки: <b><?= $user->i('uploadindex') ?></b></p>
|
||||
<script>
|
||||
var UPLOAD_JPG_MAX_PX = 2500;
|
||||
var UPLOAD_PNG_MAX_PX = 0;
|
||||
|
@ -642,21 +644,38 @@ $user = new User(Auth::userid());
|
|||
<div>
|
||||
<label for="railwayCheckbox">Железная дорога от OpenRailwayMap:</label>
|
||||
<input type="checkbox" id="railwayCheckbox">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</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><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 marker;
|
||||
var geocoder;
|
||||
|
@ -702,7 +721,7 @@ $user = new User(Auth::userid());
|
|||
} else {
|
||||
map.removeLayer(baseLayers["openrailway"]);
|
||||
}
|
||||
});
|
||||
});
|
||||
// Инициализация карты Leaflet.js с выбранным базовым слоем по умолчанию
|
||||
baseLayers["osm"].addTo(map);
|
||||
|
||||
|
@ -766,8 +785,13 @@ $user = new User(Auth::userid());
|
|||
// Пример настройки интерактивности для меток
|
||||
building.floors.forEach(function(floor) {
|
||||
floor.markers.forEach(function(marker) {
|
||||
var markerIcon = L.divIcon({ className: 'indoor-marker', html: marker.label });
|
||||
L.marker(marker.latLng, { icon: markerIcon }).addTo(map.indoorLayer.getLevel(floor.level));
|
||||
var markerIcon = L.divIcon({
|
||||
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());
|
||||
}
|
||||
}).addTo(map);
|
||||
</script>
|
||||
</script>
|
||||
<tbody class="p20">
|
||||
<tr>
|
||||
<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) {
|
||||
|
||||
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
var bar = $('.bar');
|
||||
var percent = $('.percent');
|
||||
var status = $('#status');
|
||||
var continuepost = 0;
|
||||
e.preventDefault();
|
||||
var formData = new FormData(this);
|
||||
var bar = $('.bar');
|
||||
var percent = $('.percent');
|
||||
var status = $('#status');
|
||||
var continuepost = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/api/upload',
|
||||
data: formData,
|
||||
|
||||
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();
|
||||
xhr.upload.addEventListener("progress", function(evt) {
|
||||
if (evt.lengthComputable) {
|
||||
var percentComplete = parseInt(((evt.loaded / evt.total) * 100));
|
||||
console.log(evt.total);
|
||||
var xhr = new window.XMLHttpRequest();
|
||||
xhr.upload.addEventListener("progress", function(evt) {
|
||||
if (evt.lengthComputable) {
|
||||
var percentComplete = parseInt(((evt.loaded / evt.total) * 100));
|
||||
console.log(evt.total);
|
||||
|
||||
// Обновляем прогресс загрузки
|
||||
scrollProgressBarWidth(percentComplete);
|
||||
}
|
||||
}, false);
|
||||
return xhr;
|
||||
},
|
||||
// Обновляем прогресс загрузки
|
||||
scrollProgressBarWidth(percentComplete);
|
||||
}
|
||||
}, false);
|
||||
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>');
|
||||
Notify.noty('danger', 'В посте больше 10 медиафайлов');
|
||||
scrollProgressBarWidth(0);
|
||||
}
|
||||
else if (jsonData.errorcode == "0") {
|
||||
} else if (jsonData.errorcode == "0") {
|
||||
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 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));*/
|
||||
setTimeout(function() {
|
||||
window.location.replace("/photo/"+jsonData.id);
|
||||
window.location.replace("/photo/" + jsonData.id);
|
||||
scrollProgressBarWidth(0);
|
||||
}, 1000);
|
||||
} else if (jsonData.errorcode == "LIMITEXCEEDED") {
|
||||
|
@ -989,12 +1012,10 @@ return xhr;
|
|||
cache: false,
|
||||
contentType: false,
|
||||
processData: false
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in a new issue