Commit 86c68770 authored by Muhamad's avatar Muhamad

create

parent 4958de4c
......@@ -85,10 +85,10 @@ DATABASES = {
'NAME': 'oku_gis_new',
'USER': 'postgres',
'PASSWORD' : 'khansia215758',
# 'HOST': '30.10.20.102',
# 'PORT': '5432',
'HOST': '103.126.28.66',
'PORT': '8082',
'HOST': '30.10.20.102',
'PORT': '5432',
# 'HOST': '103.126.28.66',
# 'PORT': '8082',
}
}
......
......@@ -199,6 +199,13 @@ body>div.page-container>div>div.sidebar.sidebar-main>div>img {
transform: rotate( 180deg);
}
#map-create-all>div.leaflet-control-container>div.leaflet-top.leaflet-left>div:nth-child(2)>div>div>a.leaflet-draw-draw-marker {
margin-top: -20px;
margin-left: -10px;
width: 40px;
height: 20px;
}
@media (max-width: 1025px) {
.dock {
position: absolute;
......
......@@ -309,7 +309,7 @@
for (var i = 0; i < data['result'].length; i++) {
var data_k = data['result'][i][0];
console.log(data_k)
var data_kab = `<option value="` + data_k +`">` + data_k + `</option>`;
var data_kab = `<option value="` + data_k + `">` + data_k + `</option>`;
data_all_kab.push(data_kab)
};
$('#tipe_point_2_b').html(`<option value="null" selected disabled>-- Pilih Tipe Point --</option>` + data_all_kab);
......@@ -334,7 +334,7 @@
for (var i = 0; i < data['result'].length; i++) {
var data_id = data['result'][i][0];
var data_po = data['result'][i][1];
var data_kab = `<option value="` +data_id + `">` + data_po + `</option>`;
var data_kab = `<option value="` + data_id + `">` + data_po + `</option>`;
data_all_kab.push(data_kab)
};
$('#tipe_point_3_b').html(`<option value="null" selected disabled>-- Pilih Point --</option>` + data_all_kab);
......
......@@ -4749,7 +4749,7 @@
maxheight = [];
minheight = [];
for(var x = 0; x < (poll.length/2); x++){
for (var x = 0; x < (poll.length / 2); x++) {
max = data["tinggi_pol"][i];
maxheight.push(max);
min = 0;
......@@ -4763,7 +4763,9 @@
maximumHeights: maxheight,
minimumHeights: minheight,
// height: 0,
material: new Cesium.ImageMaterialProperty({image:"static/image/bangunan/3d/"+data["tampak_depan_pol"][i]+""}),
material: new Cesium.ImageMaterialProperty({
image: "static/image/bangunan/3d/" + data["tampak_depan_pol"][i] + ""
}),
// closeTop: false,
// maximumHeights : data["tinggi_pol"][i],
// minimumHeights : 0,
......@@ -4780,10 +4782,12 @@
poll
),
// material: materialatas,
material: new Cesium.ImageMaterialProperty({image:"static/image/bangunan/3d/"+data["tampak_atas_pol"][i]+""}),
material: new Cesium.ImageMaterialProperty({
image: "static/image/bangunan/3d/" + data["tampak_atas_pol"][i] + ""
}),
outline: true,
height: data["tinggi_pol"][i],
fill : true,
fill: true,
outlineColor: Cesium.Color.GREEN,
},
name: data["info_polygon"][i]
......@@ -4836,7 +4840,7 @@
} else if (rema == 'Kantor Pemerintah Lainnya') {
var color = Cesium.Color.GAINSBORO;
var gmbcok = "3d_kadm_lain.svg"
} else{
} else {
var color = Cesium.Color.GAINSBORO;
var gmbcok = "3d_kadm.svg"
}
......@@ -4856,7 +4860,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -4916,7 +4920,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -4976,7 +4980,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -5037,7 +5041,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -5086,7 +5090,7 @@
} else if (rema == 'Pura') {
var color = Cesium.Color.DIMGREY;
var gmbcok = "3d_pura.svg"
} else{
} else {
var color = Cesium.Color.DIMGREY;
var gmbcok = "3d_ibadah_lain.svg"
}
......@@ -5106,7 +5110,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -5155,7 +5159,7 @@
} else if (rema == 'Pendidikan Tinggi') {
var color = Cesium.Color.DIMGREY;
var gmbcok = "3d_univ.svg"
} else{
} else {
var color = Cesium.Color.GOLDENROD;
var gmbcok = "3d_sp_lain.svg"
}
......@@ -5175,7 +5179,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -5215,7 +5219,7 @@
if (rema == 'Stasiun Pompa Bahan Bakar Umum') {
var color = Cesium.Color.FORESTGREEN;
var gmbcok = "3d_spbu.svg"
} else{
} else {
var color = Cesium.Color.FORESTGREEN;
var gmbcok = "3d_spbu.svg"
}
......@@ -5235,7 +5239,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -5275,7 +5279,7 @@
if (rema == 'Stasiun Kereta Api') {
var color = Cesium.Color.FORESTGREEN;
var gmbcok = "3d_stasiun.svg"
} else{
} else {
var color = Cesium.Color.FORESTGREEN;
var gmbcok = "3d_stasiun.svg"
}
......@@ -5295,7 +5299,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -5335,7 +5339,7 @@
if (rema == 'Stasiun Kereta Api') {
var color = Cesium.Color.FORESTGREEN;
var gmbcok = "3d_stasiun.svg"
} else{
} else {
var color = Cesium.Color.FORESTGREEN;
var gmbcok = "3d_stasiun.svg"
}
......@@ -5355,7 +5359,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -5395,7 +5399,7 @@
if (rema == 'Terminal Bus/Angkutan Kendaraan Lainnya') {
var color = Cesium.Color.FORESTGREEN;
var gmbcok = "3d_terminal.svg"
} else{
} else {
var color = Cesium.Color.FORESTGREEN;
var gmbcok = "3d_terminal.svg"
}
......@@ -5415,7 +5419,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -5470,7 +5474,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -5525,7 +5529,7 @@
position: Cesium.Cartesian3.fromDegrees(long[i], lati[i], 100),
billboard: {
// icon: facilityUrl,
image: `static/img/icon/`+gmbcok+``,
image: `static/img/icon/` + gmbcok + ``,
// image: `static/img/icon/3d_police.svg`,
show: true, // default
scale: 2.0, // default: 1.0
......@@ -5560,7 +5564,7 @@
} else {
var path_img = `"static/image/bangunan/` + data['administrasi']['f9'] + `"`
}
content_tampak=`
content_tampak = `
<div class="modal-dialog" style="width: max-content;height: max-content;">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color:#40777c;">
......@@ -5579,23 +5583,23 @@
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunantampak" value="">
</p>
<p>
<input type="text" name="idbangunan" id="idbangunantampak" class="form-control hidden" value="`+ data['properties']['f1'] +`" disable>
<input type="text" name="idbangunan" id="idbangunantampak" class="form-control hidden" value="` + data['properties']['f1'] + `" disable>
</p>
<p>
<input type="text" name="namebangunan" id="namebangunantampak" class="form-control" value="`+ data['properties']['f2'] +`">
<input type="text" name="namebangunan" id="namebangunantampak" class="form-control" value="` + data['properties']['f2'] + `">
</p>
<p>
<input type="text" name="infobangunan" id="infobangunantampak" class="form-control" value="`+ data['administrasi']['f12'] +`">
<input type="text" name="infobangunan" id="infobangunantampak" class="form-control" value="` + data['administrasi']['f12'] + `">
</p>
<p>
<span>Gambar Tampak Atas</span>
<input type="file" id="imgbangunanatas" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambaratas" type="text" class="form-control" value="`+ data['administrasi']['f14'] +`"required>
<input style="display:none;" id="gambaratas" type="text" class="form-control" value="` + data['administrasi']['f14'] + `"required>
</p>
<p>
<span>Gambar Tampak Depan</span>
<input type="file" id="imgbangunandepan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambardepan" type="text" class="form-control" value="`+ data['administrasi']['f15'] +`"required>
<input style="display:none;" id="gambardepan" type="text" class="form-control" value="` + data['administrasi']['f15'] + `"required>
</p>
</div>
</div>
......@@ -6684,9 +6688,9 @@
// <option value="gardu_listrik">Gardu Listrik</option>`
// }
var history
if (feature.administrasi.f11 == 'kantor_administrasi' || feature.administrasi.f11 == 'layanan_kesehatan' || feature.administrasi.f11 == 'puskesmas'
|| feature.administrasi.f11 == 'rumah_sakit' || feature.administrasi.f11 == 'sarana_pendidikan' || feature.administrasi.f11 == 'stasiun'
|| feature.administrasi.f11 == 'terminal_bus' || feature.administrasi.f11 == 'cagar_budaya' || feature.administrasi.f11 == 'gardu_listrik'){
if (feature.administrasi.f11 == 'kantor_administrasi' || feature.administrasi.f11 == 'layanan_kesehatan' || feature.administrasi.f11 == 'puskesmas' ||
feature.administrasi.f11 == 'rumah_sakit' || feature.administrasi.f11 == 'sarana_pendidikan' || feature.administrasi.f11 == 'stasiun' ||
feature.administrasi.f11 == 'terminal_bus' || feature.administrasi.f11 == 'cagar_budaya' || feature.administrasi.f11 == 'gardu_listrik') {
if (feature.properties.f4 != null) {
var list_history = feature.properties.f4
var list_history_panel = ``
......@@ -6753,7 +6757,7 @@
</div>
</div>
<div class="col-md-4">
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunan" value="`+feature.geometry+`">
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunan" value="` + feature.geometry + `">
<table>
<tr style="margin-top: 10px">
<th>
......@@ -6761,28 +6765,28 @@
</th>
<td>
<input type="file" id="imgbangunan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
<input style="display:none;" id="gambar" type="text" class="form-control" value="`+feature.administrasi.f9+`"required>
<input style="display:none;" id="gambar" type="text" class="form-control" value="` + feature.administrasi.f9 + `"required>
</td>
</tr>
<tr>
<td>
<input type="text" name="idbangunan" id="idbangunan" class="form-control hidden" value="`+feature.properties.f1+`" disable>
<input type="text" name="idbangunan" id="idbangunan" class="form-control hidden" value="` + feature.properties.f1 + `" disable>
<input style="display:none;" id="coordinateZoneeditbang" type="text" class="form-control" value=""required>
</td>
</tr>
<tr>
<th>Nama Bangunan</th>
<td>
<input type="text" name="namebangunan" id="namebangunan" class="form-control" value="`+feature.properties.f2+`">
<input type="text" name="namebangunan" id="namebangunan" class="form-control" value="` + feature.properties.f2 + `">
</td>
</tr>
<tr>
<th>Jenis Bangunan</th>
<td>
<input type="text" class="hidden" name="tipe1" id="tipe111" value="`+feature.administrasi.f11+`">
<input type="text" class="hidden" name="tipe1" id="tipe222" value="`+feature.administrasi.f12+`">
<input type="text" class="hidden" name="tipe1" id="tipe333" value="`+feature.administrasi.f13+`">
<input type="text" class="hidden" name="tipe1" id="tipe444" value="`+feature.administrasi.f14+`">
<input type="text" class="hidden" name="tipe1" id="tipe111" value="` + feature.administrasi.f11 + `">
<input type="text" class="hidden" name="tipe1" id="tipe222" value="` + feature.administrasi.f12 + `">
<input type="text" class="hidden" name="tipe1" id="tipe333" value="` + feature.administrasi.f13 + `">
<input type="text" class="hidden" name="tipe1" id="tipe444" value="` + feature.administrasi.f14 + `">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;width: 220px;" id="tipe_point_b_e" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Jenis Point --</option>
<option value="bangunan">Bangunan Biasa</option>
......@@ -6816,31 +6820,31 @@
<tr>
<th>Informasi Bangunan</th>
<td>
<input type="text" name="infobangunan" id="infobangunan" class="form-control" value="`+feature.properties.f3+`">
<input type="text" name="infobangunan" id="infobangunan" class="form-control" value="` + feature.properties.f3 + `">
</td>
</tr>
<tr>
<th>Kelurahan</th>
<td>
<input type=" text " name="nmkelurahan " id="nmkelurahan" class="form-control " value="`+feature.administrasi.f1+`">
<input type=" text " name="nmkelurahan " id="nmkelurahan" class="form-control " value="` + feature.administrasi.f1 + `">
</td>
</tr>
<tr>
<th>Kecamatan</th>
<td>
<input type="text " name="nmkecamatan " id="nmkecamatan" class="form-control " value="`+feature.administrasi.f2+`">
<input type="text " name="nmkecamatan " id="nmkecamatan" class="form-control " value="` + feature.administrasi.f2 + `">
</td>
</tr>
<tr>
<th>Kab/Kota</th>
<td>
<input type="text " name="nmkabkota " id="nmkabkota" class="form-control " value="`+feature.administrasi.f3+`">
<input type="text " name="nmkabkota " id="nmkabkota" class="form-control " value="` + feature.administrasi.f3 + `">
</td>
</tr>
<tr>
<th>Provinsi</th>
<td>
<input type="text " name="nmprovinsi " id="nmprovinsi" class="form-control " value="`+feature.administrasi.f4+`">
<input type="text " name="nmprovinsi " id="nmprovinsi" class="form-control " value="` + feature.administrasi.f4 + `">
</td>
</tr>
......@@ -6853,25 +6857,25 @@
<tr>
<th>Luas Bangunan</th>
<td>
<input type="text " name="luasbangunan " id="luasbangunan" class="form-control " value="`+feature.administrasi.f6+`">
<input type="text " name="luasbangunan " id="luasbangunan" class="form-control " value="` + feature.administrasi.f6 + `">
</td>
</tr>
<tr>
<th>Luas Tanah</th>
<td>
<input type="text " name="luastanah " id="luastanah" class="form-control " value="`+feature.administrasi.f7+`">
<input type="text " name="luastanah " id="luastanah" class="form-control " value="` + feature.administrasi.f7 + `">
</td>
</tr>
<tr>
<th>Tinggi Bangunan</th>
<td>
<input type="text " name="tinggibangunan " id="tinggibangunan" class="form-control " value="`+feature.administrasi.f8+`">
<input type="text " name="tinggibangunan " id="tinggibangunan" class="form-control " value="` + feature.administrasi.f8 + `">
</td>
</tr>
<tr>
<th>Pemilik</th>
<td>
<input type="text " name="pemilik " id="pemilik" class="form-control " value="`+feature.administrasi.f10+`">
<input type="text " name="pemilik " id="pemilik" class="form-control " value="` + feature.administrasi.f10 + `">
</td>
</tr>
</table>
......@@ -6885,7 +6889,7 @@
</div>
</div>
</div>`;
content_delete=`
content_delete = `
<div class="modal-dialog" style="width: max-content;height: max-content;">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color:#40777c;">
......@@ -6901,9 +6905,9 @@
<div class="form-group">
<div class="col-lg-12" style="margin-top:10px;margin-bottom:10px;">
<input type="text" class="hidden" name="coordinatebangunan" id="coordinatebangunanhps" value="">
<input type="text" name="idbangunan" id="idbangunanhps" class="form-control hidden" value="`+feature.properties.f1+`" disable>
<input type="text" name="namebangunan" id="namebangunanhps" class="form-control" value="`+feature.properties.f2+`">
<input type="text" name="infobangunan" id="infobangunanhps" class="form-control" value="`+feature.properties.f3+`">
<input type="text" name="idbangunan" id="idbangunanhps" class="form-control hidden" value="` + feature.properties.f1 + `" disable>
<input type="text" name="namebangunan" id="namebangunanhps" class="form-control" value="` + feature.properties.f2 + `">
<input type="text" name="infobangunan" id="infobangunanhps" class="form-control" value="` + feature.properties.f3 + `">
</div>
</div>
</div>
......@@ -7100,7 +7104,7 @@
</tr>
</div>
<div class="container">
`+history+`
` + history + `
</div>
</tbody>
</table>`;
......@@ -7225,7 +7229,7 @@
$(document).on("click", "#btn_edit_bangunan", function() {
var tipe1 = $('#tipe111').val();
$('#tipe_point_b_e option[value='+tipe1+']').attr('selected','selected');
$('#tipe_point_b_e option[value=' + tipe1 + ']').attr('selected', 'selected');
$("#tipe_point_b_e").change(function() {
$('#tipe_point_2_b_e').empty();
......@@ -7260,8 +7264,8 @@
var tipe2 = $('#tipe222').val();
if (tipe2 == 'null') {
$('#tipe_point_2_b_e').html(`<option value="null" selected disabled>-- Pilih Tipe Point --</option>`);
} else{
$('#tipe_point_2_b_e').html(`<option value="`+tipe2+`" selected>`+tipe2+`</option>`);
} else {
$('#tipe_point_2_b_e').html(`<option value="` + tipe2 + `" selected>` + tipe2 + `</option>`);
}
$("#tipe_point_2_b_e").change(function() {
......@@ -7284,7 +7288,7 @@
var data_po = data['result'][i][1];
console.log(data_id)
console.log(data_po)
var data_kab = `<option value="` +data_id + `">` + data_po + `</option>`;
var data_kab = `<option value="` + data_id + `">` + data_po + `</option>`;
data_all_kab.push(data_kab)
};
$('#tipe_point_3_b_e').html(`<option value="null" selected disabled>-- Pilih Point --</option>` + data_all_kab);
......@@ -7297,8 +7301,8 @@
if (tipe3 == 'null') {
$('#tipe_point_3_b_e').html(`<option value="null" selected disabled>-- Pilih Point --</option>`);
} else{
$('#tipe_point_3_b_e').html(`<option value="`+tipe3+`" selected>`+tipe4+`</option>`);
} else {
$('#tipe_point_3_b_e').html(`<option value="` + tipe3 + `" selected>` + tipe4 + `</option>`);
}
var map_edit = new L.map('map-edit', {
......@@ -7749,4 +7753,3 @@
});
};
</script>
\ No newline at end of file
{% include 'includes/insert.html' %}
\ No newline at end of file
......@@ -2027,9 +2027,9 @@
$(".nama_keterangan").html(feature.legend.f2)
$(".isi_keterangan").html(`
<input type="text" name="idtuplah" id="idtuplah" class="hidden" value="">
<input type="text" name="idjalan" id="idjalan" class="hidden" value="">
<input type="text" name="coordinatetuplah" id="coordinatetuplah" class="hidden" value="">
<input type="text" name="coordinatejalan" id="coordinatejalan" class="hidden" value="">
<div class="col-md-6">
<div>
......@@ -3464,3 +3464,765 @@
}
});
</script>
<script>
//klik kanan begin
map.on('contextmenu', function(e) {
$("#modal_option_create").modal("show");
$("#map-create-all").remove();
$(".btn_create_jalan").click(function() {
$("#modal__create").modal("show");
$(".title-create").html("Create Jalan")
$(".tombol_action_create").html(`<input type="button" id="create-jal" value="Create" style="z-index: 1000;position:relative;">`)
$(".tab_1").html("Koordinat")
$(".tab_2").html("Informasi Jalan")
$(".tombol_save_create").html(`<input type="button" class="btn btn-primary" id="create_save_jalan" value="SAVE" style="margin-right:30px;">
<input type="text" name="poly_create" class="hidden" id="poly_create_jalan" value="">`)
$("#koordinatjalan").html(`
<div class="form-group">
<div id="map-create-all" style="height: 300px;">
<div class="tombol_action_create">
<input type="button" id="create-jal" value="Create" style="z-index: 1000;position:relative;">
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="img_jalan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
</div>
</div>
</div>`)
$("#informasi_create").html(`
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-4 control-label lbl-top" style="margin-top: 15px;">Nama Jalan</label>
<div class="col-lg-8">
<input id="nama_jalan_create" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-4 control-label lbl-top" style="margin-top: 15px;">Panjang Jalan (m)</label>
<div class="col-lg-8">
<input id="panjang_jalan_create" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-4 control-label lbl-top" style="margin-top: 15px;">Lebar Jalan (m)</label>
<div class="col-lg-8">
<input id="lebar_jalan_create" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-4 control-label lbl-top" style="margin-top: 15px;">Tipe Jalan</label>
<div class="col-lg-8">
<input id="tipe_jalan_create" type="text" class="form-control" value="" required>
</div>
</div>
</div>
`);
var map_create_all = L.map('map-create-all', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([e.latlng.lat, e.latlng.lng], 20);
L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_create_all);
setTimeout(function() {
map_create_all.invalidateSize();
}, 500);
var lineDraweredit = new L.Draw.Polyline(map_create_all, polygon_options);
lineDraweredit.on("click", function(event) {
shapecoords.innerHTML = event.latlng.toString();
map_create_all.fire("click", event); // Trigger a map click as well.
});
map_create_all.on('draw:created', function(e) {
var type = e.layerType,
layer = e.layer;
layer.options.color = 'yellow';
layer.options.weight = 10;
var koordina = ""
if (type === 'polyline') {
var tempLatLng = null;
var totalDistance = 0.00000;
$.each(e.layer._latlngs, function(i, latlng) {
if (tempLatLng == null) {
tempLatLng = latlng;
return;
}
totalDistance += tempLatLng.distanceTo(latlng);
tempLatLng = latlng;
});
e.layer.bindPopup((totalDistance).toFixed(2) + ' meter');
e.layer.openPopup();
$("#panjang_jalan_create").val((totalDistance).toFixed(2) + ' meter');
}
$("#poly_create_jalan").val(JSON.stringify(layer.toGeoJSON()));
layer.addTo(map_create_all);
});
$("#create-jal").click(function() {
lineDraweredit.enable();
})
$("#map-create-all>div.leaflet-control-container>div.leaflet-top.leaflet-left>div>div>div").css("display", "none")
$("#map-create-all > div.leaflet-control-container > div.leaflet-top.leaflet-left > div").css("display", "none")
})
$(".btn_create_bangunan").click(function() {
$("#modal__create").modal("show");
$(".title-create").html("Create Bangunan")
$(".tombol_action_create").html(`<input type="button" id="create" value="Create" style="z-index: 1000;position:relative;">`)
$(".tab_1").html("Koordinat")
$(".tab_2").html("Informasi Bangunan")
$(".tombol_save_create").html(`<input type="button" class="btn btn-primary" id="create_save_bangunan" value="SAVE" style="margin-right:30px;">
<input type="text" name="poly_create" class="hidden" id="poly_create_bangunan" value="">`)
$("#koordinatjalan").html(`
<div class="form-group">
<div id="map-create-all" style="height: 300px;">
<div class="tombol_action_create">
<input type="button" id="create" value="Create" style="z-index: 1000;position:relative;">
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="img_bangunan" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
</div>
</div>
</div>`)
$("#informasi_create").html(`
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Nama Bangunan</label>
<div class="col-lg-9">
<input id="name_create" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Jenis Bangunan</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;" id="tipe_point_b" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Jenis Point --</option>
<option value="bangunan">Bangunan Biasa</option>
<option value="kantor_administrasi">Kantor Administrasi</option>
<option value="layanan_kesehatan">Layanan Kesehatan</option>
<option value="puskesmas">Puskesmas</option>
<option value="rumah_sakit">Rumah Sakit</option>
<option value="sarana_ibadah">Sarana Ibadah</option>
<option value="sarana_pendidikan">Sarana Pendidikan</option>
<option value="spbu">SPBU</option>
<option value="stasiun">Stasiun</option>
<option value="terminal_bus">Terminal Bus</option>
<option value="cagar_budaya">Cagar Budaya dan Tempat Wisata</option>
<option value="gardu_listrik">Gardu Listrik</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Tipe Bangunan</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;width: 220px;" id="tipe_point_2_b" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Tipe Point --</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Nama Point</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;width: 220px;" id="tipe_point_3_b" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Point --</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Informasi Bangunan</label>
<div class="col-lg-9">
<input id="info_create" type="text" class="form-control" value="" placeholder="Rumah/Gedung/Ruko/Pabrik/dsb" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Alamat</label>
<div class="col-lg-9">
<input id="alamat_create" type="text" class="form-control" value="" placeholder="cth : Jl. Contoh Rt 005/01 No.01" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Luas Bangunan</label>
<div class="col-lg-6">
<input id="luas_bangunan_create" type="text" class="form-control" value="" required>
</div>
<div class="col-lg-3">
<select id="satuan_luas_bangunan" >
<option>m2</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top">Luas Tanah</label>
<div class="col-lg-6">
<input id="luas_tanah_create" type="text" class="form-control" value="" required>
</div>
<div class="col-lg-3">
<select id="satuan_luas_tanah">
<option>m2</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top">Tinggi Bangunan</label>
<div class="col-lg-6">
<input id="tinggi_bangunan_create" type="text" class="form-control" value="" required>
</div>
<div class="col-lg-3">m</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top">Jumlah Lantai</label>
<div class="col-lg-9">
<input id="lantai" type="text" class="form-control" value="" placeholder="Estimasi Per Lantai = 3m" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" >Pemilik</label>
<div class="col-lg-9">
<input id="pemilik_create" type="text" class="form-control" value="" placeholder="cth : Ali Budiman, S.Si." required>
</div>
</div>
</div>
`);
var map_create_all = L.map('map-create-all', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([e.latlng.lat, e.latlng.lng], 20);
L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_create_all);
setTimeout(function() {
map_create_all.invalidateSize();
}, 500);
$('#create').click(function() {
map_create_all.enable();
});
var Marker = {};
var Poly = {};
map_create_all.on(L.Draw.Event.CREATED, function(e) {
var layer = e.layer;
$("#poly_create_bangunan").empty();
var type = e.layerType;
var layer = e.layer;
var shape = layer.toGeoJSON();
let geoShape = shape.geometry.coordinates[0];
let kordinat = "";
for (j in geoShape) {
kordinat += geoShape[j][0] + ' ' + geoShape[j][1];
if (j <= (geoShape.length - 2)) {
kordinat += ', ';
}
}
window.thisBaseDrawPolygonLayer = layer;
$("#poly_create_bangunan").val(JSON.stringify(kordinat));
});
polygon_options = {
showArea: false,
shapeOptions: {
stroke: true,
color: '#6e83f0',
weight: 1.5,
opacity: 2,
fill: false,
fillColor: null, //same as color by default
clickable: true
}
}
var polygonDraweredit = new L.Draw.Polygon(map_create_all, polygon_options);
map_create_all.on("click", function(event) {
shapecoords.innerHTML = event.latlng.toString();
map_create_all.fire("click", event); // Trigger a map click as well.
});
map_create_all.on('draw:created', function(e) {
var type = e.layerType,
layer = e.layer;
var lay = layer.addTo(map_create_all);
Poly = lay;
});
$("#map-create-all > div.leaflet-control-container > div.leaflet-top.leaflet-left > div").css("display", "none")
});
$(".btn_create_point").click(function() {
$("#modal__create").modal("show");
$(".title-create").html("Create Point")
$(".tombol_action_create").html(``)
$(".tab_1").html("Koordinat")
$(".tab_2").html("Informasi Point")
$(".tombol_save_create").html(`<input type="button" class="btn btn-primary" id="btnsavepoint" value="SAVE" style="margin-right:30px;">
<input type="text" name="poly_create_point" class="hidden" id="poly_create_point" value="">`)
$("#koordinatjalan").html(`
<div class="form-group">
<div id="map-create-all" style="height: 300px;">
<!-- <div class="tombol_action_create">
<input type="button" class="leaflet-draw-draw-marker" value="Create" style="z-index: 1000;position:relative;">
</div> -->
</div>
<div class="form-group">
<label class="col-lg-2 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="gambar_pitik" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
</div>
</div>
</div>`)
$("#informasi_create").html(`
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Nama Point</label>
<div class="col-lg-9">
<input id="name_create_point" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Jenis Point</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;" id="tipe_point" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Jenis Point --</option>
<option value="kantor_administrasi">Kantor Administrasi</option>
<option value="layanan_kesehatan">Layanan Kesehatan</option>
<option value="puskesmas">Puskesmas</option>
<option value="rumah_sakit">Rumah Sakit</option>
<option value="sarana_ibadah">Sarana Ibadah</option>
<option value="sarana_pendidikan">Sarana Pendidikan</option>
<option value="spbu">SPBU</option>
<option value="stasiun">Stasiun</option>
<option value="terminal_bus">Terminal Bus</option>
<option value="cagar_budaya">Cagar Budaya dan Tempat Wisata</option>
<option value="gardu_listrik">Gardu Listrik</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Tipe Point</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;width: 220px;" id="tipe_point_2" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Tipe Point --</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Alamat</label>
<div class="col-lg-9">
<input id="alamat_create_point" type="text" class="form-control" value="" placeholder="cth : Jl. Contoh Rt 005/01 No.01" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Luas Tanah</label>
<div class="col-lg-6">
<input id="luas_tanah_point" type="text" class="form-control" value="" required>
</div>
<div class="col-lg-3">
<select id="satuan_luas_tanah" style="margin-top: 15px;">
<option>m2</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Pimpinan</label>
<div class="col-lg-9">
<input id="pemilik_point" type="text" class="form-control" value="" placeholder="cth : Ali Budiman, S.Si." required>
</div>
</div>
</div>
`);
var map_create_all = L.map('map-create-all', {
editable: true,
zoomControl: false,
drawControl: true
}).setView([e.latlng.lat, e.latlng.lng], 20.5);
L.tileLayer('https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
maxZoom: 22,
minZoom: 4,
}).addTo(map_create_all);
setTimeout(function() {
map_create_all.invalidateSize();
}, 500);
$(".leaflet-draw-draw-marker").html('<span>Create</span>')
var drawControl = new L.Control.Draw(drawPluginOptions);
map_create_all.addControl(drawControl);
var editableLayers = new L.FeatureGroup();
map_create_all.addLayer(editableLayers);
// define custom marker
var MyCustomMarker = L.Icon.extend({
options: {
shadowUrl: null,
iconAnchor: new L.Point(12, 12),
iconSize: new L.Point(24, 24),
}
});
var drawPluginOptions = {
position: 'topright',
draw: {
marker: {
title: "soyel1",
icon: new MyCustomMarker()
},
marker: true
},
edit: {
featureGroup: editableLayers, //REQUIRED!!
remove: true
}
};
var drawControl = new L.Control.Draw(drawPluginOptions);
map_create_all.addControl(drawControl);
var editableLayers = new L.FeatureGroup();
map_create_all.addLayer(editableLayers);
map_create_all.on('draw:created', function(e) {
var type = e.layerType,
layer = e.layer;
editableLayers.addLayer(layer);
$("#poly_create_point").val(JSON.stringify(layer.toGeoJSON()));
$("#modal_point").modal()
map.closePopup();
});
$("#map-create-all > div.leaflet-control-container > div.leaflet-top.leaflet-left > div:nth-child(2) > div > div").css("display", "none")
$("#map-create-all > div.leaflet-control-container > div.leaflet-top.leaflet-right").css("display", "none")
$("#map-create-all > div.leaflet-control-container > div.leaflet-top.leaflet-left > div:nth-child(1) > div > div > a.leaflet-draw-draw-polyline").css("display", "none")
$("#map-create-all > div.leaflet-control-container > div.leaflet-top.leaflet-left > div:nth-child(2) > div > div > a.leaflet-draw-draw-marker").css("display", "block!important")
})
$("#tipe_point").change(function() {
var tipe = $(this).val();
$.ajax({
url: "{% url 'api:change-tipe' %}",
data: {
'tipe': tipe
},
dataType: 'json',
success: function(data) {
console.log(data)
var data_all_kab = []
for (var i = 0; i < data['result'].length; i++) {
var data_k = data['result'][i][0];
var data_kab = `<option value="` +
data_k +
`">` +
data_k +
`</option>`;
data_all_kab.push(data_kab)
};
$('#tipe_point_2').html(`<option value="null" selected disabled>-- Pilih Tipe Point --</option>` + data_all_kab);
}
});
});
$("#tipe_point_b").change(function() {
var tipe = $(this).val();
$.ajax({
url: "{% url 'api:change-tipe' %}",
data: {
'tipe': tipe
},
dataType: 'json',
success: function(data) {
var data_all_kab = []
for (var i = 0; i < data['result'].length; i++) {
var data_k = data['result'][i][0];
console.log(data_k)
var data_kab = `<option value="` + data_k + `">` + data_k + `</option>`;
data_all_kab.push(data_kab)
};
$('#tipe_point_2_b').html(`<option value="null" selected disabled>-- Pilih Tipe Point --</option>` + data_all_kab);
}
});
});
$("#tipe_point_2_b").change(function() {
var jenis = $(this).val();
var tipx = $("#tipe_point_b").val();
$.ajax({
url: "{% url 'api:change-jenis' %}",
data: {
'tipe': tipx,
'jenis': jenis
},
dataType: 'json',
success: function(data) {
console.log(data)
var data_all_kab = []
for (var i = 0; i < data['result'].length; i++) {
var data_id = data['result'][i][0];
var data_po = data['result'][i][1];
var data_kab = `<option value="` + data_id + `">` + data_po + `</option>`;
data_all_kab.push(data_kab)
};
$('#tipe_point_3_b').html(`<option value="null" selected disabled>-- Pilih Point --</option>` + data_all_kab);
}
});
});
});
$(document).on("click", "#create_save_jalan", function(e) {
data = new FormData()
data.append("gambar", $("input[id^='img_jalan']")[0].files[0]);
data.append("polyline", $("#poly_create_jalan").val())
data.append("name_jalan", $("#nama_jalan_create").val())
data.append("panjang_jalan", $("#panjang_jalan_create").val())
data.append("lebar_jalan", $("#lebar_jalan_create").val())
data.append("tipe_jalan", $("#tipe_jalan_create").val())
$.ajax({
url: "{% url 'api:create-jalan' %}",
data: data,
dataType: 'json',
type: 'POST',
processData: false,
contentType: false,
success: function(data) {
let response = data
if (response.status == 0) {
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
})
} else {
swal({
title: response.info,
text: response.data,
type: "warning",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
map.closePopup();
}
});
});
$(document).on("click", "#create_save_bangunan", function(e) {
var polygin = $('#poly_create_bangunan').val();
var name_poly = $('#name_create').val();
var tdb = $('#tipe_point_b').val();
var remark = $('#tipe_point_2_b').val();
var poin_id = $('#tipe_point_3_b').val();
var napo = $("#tipe_point_3_b option:selected").text();
var info_poly = $('#info_create').val();
var alamat_poly = $('#alamat_create').val();
var lb_poly = $('#luas_bangunan_create').val();
var lt_poly = $('#luas_tanah_create').val();
var tb_poly = $('#tinggi_bangunan_create').val();
var ltbang = $('#lantai').val();
var mpu_poly = $('#pemilik_create').val();
$.ajax({
url: "{% url 'api:c_bangunan' %}",
data: {
'polygon': polygin,
'name': name_poly,
'tipedb': tdb,
'poin_id': poin_id,
'nama_po': napo,
'remark': remark,
'info': info_poly,
'alamat': alamat_poly,
'lb': lb_poly,
'lt': lt_poly,
'tb': tb_poly,
'ltb': ltbang,
'pemilik': mpu_poly
},
dataType: 'json',
// type: 'POST',
// processData: false,
// contentType: false,
success: function(data) {
let response = data
if (response.status == 0) {
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
})
} else {
swal({
title: response.info,
text: response.data,
type: "warning",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
map.closePopup();
}
});
});
$(document).on("click", "#btnsavepoint", function(e) {
data = new FormData()
data.append("gambar", $("input[id^='gambar_pitik']")[0].files[0]);
data.append("point", $("#poly_create_point").val())
data.append("name_create_point", $("#name_create_point").val())
data.append("tipe_point", $("#tipe_point").val())
data.append("info_create_point", $("#tipe_point_2").val())
data.append("alamat_create_point", $("#alamat_create_point").val())
data.append("luas_tanah_point", $("#luas_tanah_point").val())
data.append("pemilik_point", $("#pemilik_point").val())
$.ajax({
url: "{% url 'api:create-point' %}",
data: data,
dataType: 'json',
type: 'POST',
processData: false,
contentType: false,
success: function(data) {
let response = data
if (response.status == 0) {
swal({
title: response.info,
text: response.data,
type: "success",
icon: "success",
confirmButtonColor: "#00BCD4"
}, function() {
$("#modal_point").css('display', 'none');
})
} else {
swal({
title: response.info,
text: response.data,
type: "warning",
icon: "error",
confirmButtonColor: "#00BCD4"
})
}
map.closePopup();
}
});
});
</script>
\ No newline at end of file
......@@ -320,111 +320,6 @@
<div class="modal fade" id="modal_tampak">
</div>
<div id="modal_point" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header bg-info" style="background-color: #40777c;">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h6 class="modal-title">Insert Point</h6>
</div>
<input type="text" name="poly_create_point" class="hidden" id="poly_create_point" value="">
<div class="modal-body" style="max-height: 450px;overflow-y: auto;">
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label" style="margin-top:10px">Image</label>
<div class="col-lg-9" style="margin-top:10px">
<input type="file" id="gambar_pitik" name="images[]" multiple accept="image/jpg,image/png,image/jpeg,image/gif">
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Nama Point</label>
<div class="col-lg-9">
<input id="name_create_point" type="text" class="form-control" value="" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Jenis Point</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;" id="tipe_point" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Jenis Point --</option>
<option value="kantor_administrasi">Kantor Administrasi</option>
<option value="layanan_kesehatan">Layanan Kesehatan</option>
<option value="puskesmas">Puskesmas</option>
<option value="rumah_sakit">Rumah Sakit</option>
<option value="sarana_ibadah">Sarana Ibadah</option>
<option value="sarana_pendidikan">Sarana Pendidikan</option>
<option value="spbu">SPBU</option>
<option value="stasiun">Stasiun</option>
<option value="terminal_bus">Terminal Bus</option>
<option value="cagar_budaya">Cagar Budaya dan Tempat Wisata</option>
<option value="gardu_listrik">Gardu Listrik</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Tipe Point</label>
<div class="col-lg-9">
<select style="border-bottom: 1px solid rgb(83, 83, 83) !important;width: 220px;" id="tipe_point_2" data-placeholder="select point.." class="select-size-md">
<option value="null" selected disabled>-- Pilih Tipe Point --</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Alamat</label>
<div class="col-lg-9">
<input id="alamat_create_point" type="text" class="form-control" value="" placeholder="cth : Jl. Contoh Rt 005/01 No.01" required>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Luas Tanah</label>
<div class="col-lg-6">
<input id="luas_tanah_point" type="text" class="form-control" value="" required>
</div>
<div class="col-lg-3">
<select id="satuan_luas_tanah" style="margin-top: 15px;">
<option>m2</option>
</select>
</div>
</div>
</div>
<div class="row" style="margin-top: 15px;">
<div class="form-group">
<label class="col-lg-3 control-label lbl-top" style="margin-top: 15px;">Pimpinan</label>
<div class="col-lg-9">
<input id="pemilik_point" type="text" class="form-control" value="" placeholder="cth : Ali Budiman, S.Si." required>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-link" data-dismiss="modal">Close</button>
<button type="button" id="btnsavepoint" class="btn btn-info">Save</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modalsearch3d" tabindex="-1" role="dialog">
<div class="modal-dialog modal-xs">
<div class="modal-content">
......@@ -686,3 +581,91 @@
</div>
</div>
</div>
<div class="modal fade" id="modal_option_create" tabindex="-1" role="dialog">
<div class="modal-dialog modal-xs" style="width: 350px;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Pilih jenis create</h4>
</div>
<div class="modal-body">
<fieldset>
<div class="row">
<div class="col-md-4 text-center">
<a href="#" class="btn btn_create_jalan">
<div>
<img src="{% static 'img/icon-1/Vectorjalan.svg' %}" alt="" style="width: 35px;
height: 35px;">
</div>
<div style="margin-top: 10px;">
<span>
Jalan
</span>
</div>
</a>
</div>
<div class="col-md-4 text-center">
<a href="#" class="btn btn_create_bangunan">
<div>
<img src="{% static 'img/icon-1/Buildingsbangunan.svg' %}" alt="" style="width: 35px;
height: 35px;">
</div>
<div style="margin-top: 10px;">
<span>
Bangunan
</span>
</div>
</a>
</div>
<div class="col-md-4 text-center">
<a href="#" class="btn btn_create_point">
<div>
<img src="{% static 'img/icon-1/Vectorpoint.svg' %}" alt="" style="width: 35px;
height: 35px;">
</div>
<div style="margin-top: 10px;">
<span>Point</span>
</div>
</a>
</div>
</div>
</fieldset>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modal__create" tabindex="-1" role="dialog">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h5 class="modal-title title-create">Create</h5>
</div>
<div class="modal-body" id="create_all">
<div class="tabbable" style="height:450px!important;width: 560px!important;">
<ul class="nav nav-tabs nav-tabs-bottom nav-justified">
<li onclick="changetabs(this)" class="active"><a href=".koordinatjalan" data-toggle="tab" class="tab_1">Koordinat</a></li>
<li onclick="changetabs(this)"><a href="#informasi_create" data-toggle="tab" class="tab_2">Informasi Jalan</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active koordinatjalan" id="koordinatjalan">
</div>
<div class="tab-pane" id="informasi_create">
</div>
</div>
</div>
<div class="tombol_save_create">
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -38,7 +38,6 @@
.modal-backdrop {
z-index: -1!important;
}
.sidebar {
......@@ -116,8 +115,7 @@
height: 270px;
}
#placelg{
#placelg {
object-fit: cover;
object-position: center center;
width: 30px;
......@@ -132,7 +130,7 @@
border: 1px solid red;
}
.modal-lg{
.modal-lg {
max-width: 1000px !important;
}
......@@ -164,8 +162,6 @@
transform: translate(-50%, -50%);
text-align: center;
}
</style>
</head>
......@@ -212,6 +208,7 @@
<ul class="dropdown-menu dropdown-menu-right">
{% if user.is_superuser or user.is_staff %}
<li><a href="{% url 'usermanagement' %}?page=userprofile"><i class="icon-user-tie"></i>User Profile</a></li>
<li><a href="{% url 'usermanagement' %}"><i class="icon-user"></i>User Management</a></li>
<li><a href="{% url 'apps:perbaikan' %}"><i class="icon-list"></i>Repair & Renovation</a></li>
{% endif %}
......@@ -239,14 +236,12 @@
<div class="sidebar-user">
<div class="category-content">
<div class="media">
{% for us in thisUser %}
{% if us.filepath %}
{% for us in thisUser %} {% if us.filepath %}
<a href="?page=userprofile" class="media-left"><img src="{% static 'img/' %}{{us.filepath}}" class="img-circle img-sm" alt=""></a>
{% else %}
<a href="?page=userprofile" class="media-left"><img src="{% static '/img/placeholder.jpg' %}" class="img-circle img-sm" alt=""></a>
{% endif %}
{% endfor %}
{% endif %} {% endfor %}
<div class="media-body">
<span class="media-heading text-semibold">{{user.username}}</span>
......@@ -502,7 +497,7 @@
<div class="row">
<div class="col-md-6">
<label>Username </label>
<input type="text" id="username" class="form-control" value="{{us.username}}"readonly>
<input type="text" id="username" class="form-control" value="{{us.username}}" readonly>
</div>
</div>
......@@ -532,7 +527,7 @@
<div class="row">
<div class="col-md-6">
<label>Email </label>
<input type="text" id="useremail" class="form-control" value="{{us.email}}"readonly>
<input type="text" id="useremail" class="form-control" value="{{us.email}}" readonly>
</div>
</div>
......@@ -753,7 +748,7 @@
<h6 class="modal-title"> Edit Password</h6>
</div>
<div class="modal-body">
<div >
<div>
<div class="alert alert-danger" id="notifications" style="display: none">
</div>
......@@ -773,7 +768,7 @@
<div class="col-md-12">
<label class="control-label"> Password saat ini :</label>
<input type="password" id="currentPass" class="form-control" >
<input type="password" id="currentPass" class="form-control">
</div>
</div>
......@@ -782,7 +777,7 @@
<div class="col-md-12">
<label class="control-label"> Password baru :</label>
<input type="password" id="newPass" class="form-control" >
<input type="password" id="newPass" class="form-control">
</div>
</div>
......@@ -791,7 +786,7 @@
<div class="col-md-12">
<label class="control-label"> Ulangi password baru :</label>
<input type="password" id="renewPass" class="form-control" >
<input type="password" id="renewPass" class="form-control">
</div>
</div>
......@@ -973,8 +968,7 @@
<!-- <script type="text/javascript" src="{% static 'js/plugins/ui/ripple.min.js' %}"></script> -->
<!-- /theme JS files -->
{% include 'includes/scripts.html' %}
{% include 'layout/userprofile.html' %}
{% include 'includes/scripts.html' %} {% include 'layout/userprofile.html' %}
<script src="{% static 'js/leaflet-bing-layer.js' %}"></script>
<!-- <script src="https://unpkg.com/sweetalert/dists/sweetalert.min.js"></script> -->
......@@ -1054,15 +1048,15 @@
const urlParams = new URLSearchParams(queryString);
const page = urlParams.get('page')
if (page == "group" ) {
if (page == "group") {
$("#usergroup").css("display", "block");
$("#info-maps").css("display", "none");
$("#userprofile").css("display", "none");
} else if(page == "user" || page == null){
} else if (page == "user" || page == null) {
$("#usergroup").css("display", "none");
$("#info-maps").css("display", "block");
$("#userprofile").css("display", "none")
} else{
} else {
$("#usergroup").css("display", "none");
$("#info-maps").css("display", "none");
$("#userprofile").css("display", "block");
......@@ -1577,11 +1571,11 @@
//user profile js
$("#save-edt-password").on("click", function(){
$("#save-edt-password").on("click", function() {
changepassword();
})
function changepassword(){
function changepassword() {
var isObject = {};
isObject.id = $("#iduseredt").val();
......@@ -1590,7 +1584,7 @@
isObject.renewPass = $("#renewPass").val();
isObject.username = $("#usernameedt").val();
if(isObject.currPass == "" || isObject.newPass == "" || isObject.renewPass == ""){
if (isObject.currPass == "" || isObject.newPass == "" || isObject.renewPass == "") {
$("#notifications").css("display", "block")
$("#notifications").html("Inputan tidak boleh kosong")
......@@ -1627,11 +1621,11 @@
}
$("#save-edit-profile").on("click", function(){
$("#save-edit-profile").on("click", function() {
editprofile();
})
function editprofile(){
function editprofile() {
var isObject = {}
isObject.id = $("#iduseredt").val();
......@@ -1639,14 +1633,14 @@
isObject.last_name = $("#lastnameedt").val();
isObject.email = $("#emailedts").val()
if(isObject.first_name == "" || isObject.last_name == "" || isObject.email == ""){
if (isObject.first_name == "" || isObject.last_name == "" || isObject.email == "") {
$("#notificationsprop").css("display", "block");
$("#notificationsprop").html("Inputan tidak boleh kosong")
return false
}else{
} else {
var mail_format = /^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/;
if(!isObject.email.match(mail_format)){
if (!isObject.email.match(mail_format)) {
$("#notificationsprop").css("display", "block");
$("#notificationsprop").html("Format email tidak valid, silahkan coba kembali.")
return false
......@@ -1737,6 +1731,4 @@
}
})
});
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment