Commit b0cc89be authored by Manggar Mahardhika's avatar Manggar Mahardhika

konflik gak penting cuk

OKU/__pycache__/settings.cpython-37.pyc
parents bda279e5 b5d5df4a
......@@ -55,6 +55,7 @@ urlpatterns = [
path('c_bangunan', views.createbang, name='c_bangunan'),
path('create-jalan', views.createjalan, name='create-jalan'),
path('create-point', views.createpoint, name='create-point'),
path('c_lahan', views.createlahan, name='c_lahan'),
path('edit-tuplah', login_required(views.edittuplah), name='edit-tuplah'),
path('edit-tuplah-valid', views.edittuplahvalid, name='edit-tuplah-valid'),
......
......@@ -2542,6 +2542,45 @@ def upload_tampak(request):
return Response(respon)
@api_view(('GET',))
def createlahan(request):
poly_create = request.GET.get('polygon')
p_create = poly_create.replace('"','')
po_create = p_create.replace(', ','],[')
name = request.GET.get('name')
tipelh = request.GET.get('tipelh')
tahun = request.GET.get('tahun')
luas = request.GET.get('luas')
obid = 666
provinsi = "Sumatera Selatan"
gambar = "NONE"
latlng = po_create.split("],[")[0]
print(p_create)
print(latlng)
if name == "":
name = "Sumatera Selatan"
else:
name = name
with conn.cursor() as lahan:
lahan.execute("""INSERT INTO geo_tuplah(geom, objectid_1, name, provinsi, pl_19_r, legenda, gambar) VALUES (ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((%s)))'), '%s', '%s', '%s', '%s', '%s', '%s')"""% (p_create, obid, name, provinsi, tahun, tipelh, gambar))
conn.commit()
data = {'status':'Success'}
data = 'SUCCESS'
info = 'data telah diperbaharui'
status = 0
# except:
# data = 'Sorry'
# info = 'Dalam Perbaikan'
# status = 1
respon={'data':data, 'info': info, 'status':status}
return Response(respon)
import re
@api_view(('POST',))
......
......@@ -619,8 +619,8 @@ class Dashboard(generic.TemplateView):
'gardu_listrik':gardu_listrik_result,
'global':all[0],
'res_all':res_all,
'thisUser' : user_data
# ,'user_res':user_res
'thisUser' : user_data,
# 'user_res':user_res
}
return render (request, self.template_name, context)
......
......@@ -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',
}
}
......
......@@ -808,6 +808,14 @@ li.active>a:after {
color: black!important;
}
input#change_stat {
display: block!important;
}
#help>div:nth-child(3)>div>div.panel.panel-flat.panel-collapsed>div.panel-body>table>tbody>tr {
border-top: 20px solid white;
}
@media (max-width: 1025px) {
.dock {
position: absolute;
......
This diff is collapsed.
......@@ -39,8 +39,11 @@ WorldImagery.onclick = function() {
};
BingSatellite.onclick = function() {
maps = L.tileLayer.bing({ bingMapsKey: BING_KEY, maxNativeZoom: 22 }).addTo(map);
setTimeout(function() {
$('.leaflet-bottom.leaflet-right>.leaflet-control-attribution.leaflet-control').html(`Powered by <a href="https://khansia.co.id" target="_blank">Khansia</a> with <a href="https://leafletjs.com" target="_blank">Leaflet</a>`)
}, 100);
};
GoogleSatellite.onclick = function() {
......
/* ------------------------------------------------------------------------------
*
* # Styled checkboxes, radios and file input
*
* Specific JS code additions for form_checkboxes_radios.html page
*
* Version: 1.0
* Latest update: Aug 1, 2015
*
* ---------------------------------------------------------------------------- */
*
* # Styled checkboxes, radios and file input
*
* Specific JS code additions for form_checkboxes_radios.html page
*
* Version: 1.0
* Latest update: Aug 1, 2015
*
* ---------------------------------------------------------------------------- */
$(function() {
......@@ -21,7 +21,8 @@ $(function() {
elems.forEach(function(html) {
var switchery = new Switchery(html);
});
} else {
}
else {
var elems = document.querySelectorAll('.switchery');
for (var i = 0; i < elems.length; i++) {
var switchery = new Switchery(elems[i]);
......@@ -29,28 +30,8 @@ $(function() {
}
// Colored switches
/* ini ngaruh sama element yang punya class "switchery-" */
var primary = document.querySelectorAll("[class^=switchery-");
/* ------------------- */
console.log(primary);
var switcheryCustom = document.querySelector('.switchery-custom');
var switchery = new Switchery(switcheryCustom, { color: '#5A9AFB', secondaryColor: '#3B3E47', jackColor: '#fff', jackSecondaryColor: '#fff' });
// var switchery = new Switchery(primary[0], { color: '#2196F3' });
/* inisialisasi switchery buat class "switchery-" */
for (var z = 0; z < primary.length; z++) {
var switchery = new Switchery(primary[z], { color: '#5A9AFB', secondaryColor: '#3B3E47', jackColor: '#fff', jackSecondaryColor: '#fff' });
}
/* ------------------ */
var switcheryCustom1 = document.querySelector('.switchery-custom1');
var switchery = new Switchery(switcheryCustom1, { color: '#5A9AEB', secondaryColor: '#3B3E47', jackColor: '#fff', jackSecondaryColor: '#fff' });
// var switchery = new Switchery(primary, { color: '#2196F3' });
var primary = document.querySelector('.switchery-primary');
var switchery = new Switchery(primary, { color: '#2196F3' });
var danger = document.querySelector('.switchery-danger');
var switchery = new Switchery(danger, { color: '#EF5350' });
......@@ -59,7 +40,7 @@ $(function() {
var switchery = new Switchery(warning, { color: '#FF7043' });
var info = document.querySelector('.switchery-info');
var switchery = new Switchery(info, { color: '#00BCD4' });
var switchery = new Switchery(info, { color: '#00BCD4'});
......@@ -124,5 +105,5 @@ $(function() {
// ------------------------------
$(".switch").bootstrapSwitch();
});
\ No newline at end of file
});
This diff is collapsed.
This diff is collapsed.
......@@ -15,7 +15,7 @@
</div>
<div class="sidebar-category sidebar-category-visible">
<div class="category-content no-padding">
<ul class="navigation navigation-main navigation-accordion" style="margin-bottom: 45vh;">
<ul class="navigation navigation-main navigation-accordion" style="margin-bottom: 40vh;">
<!-- Main -->
<li id="button_keterangan">
......@@ -37,11 +37,11 @@
</ul>
<ul class="navigation navigation-main navigation-accordion">
<!-- <li>
<a href="#" class="side-bar-but">
<li>
<a href="#" class="side-bar-but" data-toggle="modal" data-target="#modal_help" data-backdrop="static" data-keyboard="false">
<img src="{% static 'img/icon-1/Vectoriconwarning.svg' %}" alt="" style="height: 17.875003814697266px;width: 17.875003814697266px;margin-left: -8px;">
</a>
</li> -->
</li>
<li>
<a href="{% url 'logout' %}" class="side-bar-but">
<img src="{% static 'img/icon-1/Vectoriconlogout.svg' %}" alt="" style="height: 17.875003814697266px;width: 17.875003814697266px;margin-left: -8px;">
......@@ -352,8 +352,8 @@
<div class="col-sm-2">
<div class="checkbox checkbox-switchery">
<label>
<input type="checkbox" class="switchery-custom" id="cabud" onclick="cb100()">
</label>
<input type="checkbox" class="switchery-custom" id="cabud" onclick="cb100()">
</label>
</div>
</div>
......
......@@ -93,6 +93,15 @@
<link rel="stylesheet" href="{% static 'css/layout-style.css' %}"> {% endblock css %}
<link href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" rel="Stylesheet"></link>
<!-- Theme JS files -->
<script type="text/javascript" src="{% static 'js/plugins/forms/styling/uniform.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/forms/styling/switchery.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/forms/styling/switch.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/core/app.js' %}"></script>
<!-- <script type="text/javascript" src="{% static 'js/pages/form_checkboxes_radios.js' %}"></script> -->
<!-- /theme JS files -->
</head>
......@@ -347,13 +356,13 @@
<!-- Theme JS files -->
<script type="text/javascript" src="{% static 'js/plugins/visualization/d3/d3.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/visualization/d3/d3_tooltip.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/forms/styling/switchery.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/forms/styling/uniform.min.js' %}"></script>
<!-- <script type="text/javascript" src="{% static 'js/plugins/forms/styling/switchery.min.js' %}"></script> -->
<!-- <script type="text/javascript" src="{% static 'js/plugins/forms/styling/uniform.min.js' %}"></script> -->
<script type="text/javascript" src="{% static 'js/plugins/forms/selects/bootstrap_multiselect.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/ui/moment/moment.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/pickers/daterangepicker.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/forms/styling/switch.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/pages/form_checkboxes_radios.js' %}"></script>
<!-- <script type="text/javascript" src="{% static 'js/plugins/forms/styling/switch.min.js' %}"></script> -->
<!-- <script type="text/javascript" src="{% static 'js/pages/form_checkboxes_radios.js' %}"></script> -->
<script type="text/javascript " src="{% static 'js/apexcharts.min.js' %}"></script>
<script type="text/javascript " src="{% static 'js/apexcharts.js' %}"></script>
......@@ -378,27 +387,29 @@
<script type="text/javascript" src="{% static 'js/action.js' %}"></script>
<script>
// start disabled inspect
document.addEventListener('contextmenu', function(e) {
e.preventDefault();
});
document.onkeydown = function(e) {
if(event.keyCode == 123) {
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) {
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) {
return false;
}
if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) {
return false;
}
}
// document.addEventListener('contextmenu', function(e) {
// e.preventDefault();
// });
// document.onkeydown = function(e) {
// if(event.keyCode == 123) {
// return false;
// }
// if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {
// return false;
// }
// if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) {
// return false;
// }
// if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) {
// return false;
// }
// if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) {
// return false;
// }
// }
// end disabled inspect
var dar = null;
......@@ -2156,6 +2167,120 @@
}
});
/* ini ngaruh sama element yang punya class "switchery-" */
var primary = document.querySelectorAll("[class^=switchery-");
/* ------------------- */
for (var z = 0; z < primary.length; z++) {
var switchery = new Switchery(primary[z], {
color: '#5A9AFB',
secondaryColor: '#3B3E47',
jackColor: '#fff',
jackSecondaryColor: '#fff'
});
}
$('.leaflet-bottom.leaflet-right>.leaflet-control-attribution.leaflet-control').html(`Powered by <a href="https://khansia.co.id" target="_blank">Khansia</a> with <a href="https://leafletjs.com" target="_blank">Leaflet</a>`)
$('.leaflet-bottom.leaflet-right>.leaflet-control-attribution.leaflet-control').css("right", "50px")
</script>
\ No newline at end of file
</script>
<!-- <script>
$(function() {
// Switchery
// ------------------------------
// Initialize multiple switches
if (Array.prototype.forEach) {
var elems = Array.prototype.slice.call(document.querySelectorAll('.switchery'));
elems.forEach(function(html) {
var switchery = new Switchery(html);
});
}
else {
var elems = document.querySelectorAll('.switchery');
for (var i = 0; i < elems.length; i++) {
var switchery = new Switchery(elems[i]);
}
}
// Colored switches
var primary = document.querySelector('.switchery-primary');
var switchery = new Switchery(primary, { color: '#2196F3' });
var danger = document.querySelector('.switchery-danger');
var switchery = new Switchery(danger, { color: '#EF5350' });
var warning = document.querySelector('.switchery-warning');
var switchery = new Switchery(warning, { color: '#FF7043' });
var info = document.querySelector('.switchery-info');
var switchery = new Switchery(info, { color: '#00BCD4'});
// Checkboxes/radios (Uniform)
// ------------------------------
// Default initialization
$(".styled, .multiselect-container input").uniform({
radioClass: 'choice'
});
// File input
$(".file-styled").uniform({
wrapperClass: 'bg-blue',
fileButtonHtml: '<i class="icon-file-plus"></i>'
});
//
// Contextual colors
//
// Primary
$(".control-primary").uniform({
radioClass: 'choice',
wrapperClass: 'border-primary-600 text-primary-800'
});
// Danger
$(".control-danger").uniform({
radioClass: 'choice',
wrapperClass: 'border-danger-600 text-danger-800'
});
// Success
$(".control-success").uniform({
radioClass: 'choice',
wrapperClass: 'border-success-600 text-success-800'
});
// Warning
$(".control-warning").uniform({
radioClass: 'choice',
wrapperClass: 'border-warning-600 text-warning-800'
});
// Info
$(".control-info").uniform({
radioClass: 'choice',
wrapperClass: 'border-info-600 text-info-800'
});
// Custom color
$(".control-custom").uniform({
radioClass: 'choice',
wrapperClass: 'border-indigo-600 text-indigo-800'
});
// Bootstrap switch
// ------------------------------
$(".switch").bootstrapSwitch();
});
</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