Commit ae785bf8 authored by Muhamad's avatar Muhamad

perbaiki, table data

parent 6d5c957d
...@@ -943,7 +943,7 @@ def hasilsearch(request): ...@@ -943,7 +943,7 @@ def hasilsearch(request):
) )
FROM FROM
geo_bangunan buildings geo_bangunan buildings
JOIN geo_data_kelurahan desa ON st_intersects ( ST_SetSRID(desa.geom, 0), buildings.geom ) JOIN geo_data_kelurahan desa ON st_intersects ( ST_SetSRID(desa.geom, 4326), ST_SetSRID(buildings.geom, 4326) )
WHERE WHERE
desa.desa = '%s'"""% nama_desa) desa.desa = '%s'"""% nama_desa)
......
...@@ -889,6 +889,18 @@ body>ul>li.fixed-plugin.no3d.overlay-cek>div.dropdown.show-dropdown.open>ul { ...@@ -889,6 +889,18 @@ body>ul>li.fixed-plugin.no3d.overlay-cek>div.dropdown.show-dropdown.open>ul {
margin-left: -270px!important; margin-left: -270px!important;
} }
/*
#DataTables_Table_0>thead>tr>th:nth-child(1) {
width: 5%!important;
;
}
#DataTables_Table_0>thead>tr>th:nth-child(2) {
width: 20%!important;
} */
@media (max-width: 1025px) { @media (max-width: 1025px) {
.dock { .dock {
position: absolute; position: absolute;
...@@ -1012,6 +1024,11 @@ body>ul>li.fixed-plugin.no3d.overlay-cek>div.dropdown.show-dropdown.open>ul { ...@@ -1012,6 +1024,11 @@ body>ul>li.fixed-plugin.no3d.overlay-cek>div.dropdown.show-dropdown.open>ul {
width: 100%!important; width: 100%!important;
top: 0px; top: 0px;
} }
#panel-sm2 {
width: 100%!important;
top: 0px;
position: absolute;
}
#panel-sm>div { #panel-sm>div {
margin-left: 0px margin-left: 0px
} }
...@@ -1068,6 +1085,47 @@ body>ul>li.fixed-plugin.no3d.overlay-cek>div.dropdown.show-dropdown.open>ul { ...@@ -1068,6 +1085,47 @@ body>ul>li.fixed-plugin.no3d.overlay-cek>div.dropdown.show-dropdown.open>ul {
#modal_detail_non_kelurahan>div>div>div.modal-body>fieldset>div>div:nth-child(2)>div>div { #modal_detail_non_kelurahan>div>div>div.modal-body>fieldset>div>div:nth-child(2)>div>div {
margin-left: 5px margin-left: 5px
} }
#panel-sm2>div:nth-child(2) {
max-height: 103vh;
height: 103vh!important;
overflow: scroll;
left: 50px!important;
width: 90%!important;
}
#panel-sm2>div:nth-child(1) {
display: none;
}
/* #modal_detail_perbaikan>div>div>div>div.isi.text {
max-height: 93vh!important;
}
#modal_detail_perbaikan {
max-height: 100vh!important;
} */
#modal_detail_perbaikan>div {
top: 0%!important;
}
#modal_detail_perbaikan>div>div>div>div.isi.text {
max-height: 94vh!important;
}
#modal_detail_perbaikan {
max-height: 100vh!important;
}
#DataTables_Table_0>thead>tr>th:nth-child(4),
#DataTables_Table_0>thead>tr>th:nth-child(5),
#DataTables_Table_0>thead>tr>th:nth-child(6),
#DataTables_Table_0>thead>tr>th:nth-child(7),
#DataTables_Table_0>tbody>tr>td:nth-child(4),
#DataTables_Table_0>tbody>tr>td:nth-child(5),
#DataTables_Table_0>tbody>tr>td:nth-child(6),
#DataTables_Table_0>tbody>tr>td:nth-child(7) {
display: none;
}
#DataTables_Table_0>tbody>tr>td:nth-child(8)>a>td>i {
display: none;
}
#DataTables_Table_0>tbody>tr>td:nth-child(8)>a {
width: 75px!important;
}
} }
@media (min-width: 1025px) { @media (min-width: 1025px) {
......
...@@ -69,11 +69,269 @@ input:checked+.slider:before { ...@@ -69,11 +69,269 @@ input:checked+.slider:before {
border-radius: 50%; border-radius: 50%;
} }
#user_profile>.table-sm>thead>tr>th, #user_profile>.table-sm>thead>tr>th {
.table-sm>tbody>tr>th,
.table-sm>tfoot>tr>th,
.table-sm>thead>tr>td,
.table-sm>tbody>tr>td,
.table-sm>tfoot>tr>td {
padding: 13px 20px; padding: 13px 20px;
}
/*
* Table
*/
table.dataTable {
margin: 0 auto;
clear: both;
width: 100%;
margin-bottom: 20px!important;
}
table.dataTable thead th {
padding: 3px 0px 3px 10px;
cursor: pointer;
*cursor: hand;
}
table.dataTable tfoot th {
padding: 3px 10px;
}
table.dataTable td {
padding: 3px 10px;
}
table.dataTable td.center,
table.dataTable td.dataTables_empty {
text-align: center;
}
#DataTables_Table_0>tbody>tr>td:nth-child(8)>a>td {
padding: 0;
}
/*
* Table wrapper
*/
.dataTables_wrapper {
position: relative;
clear: both;
*zoom: 1;
}
.dataTables_wrapper .ui-widget-header {
font-weight: normal;
}
.dataTables_wrapper .ui-toolbar {
padding: 5px;
}
/*
* Page length menu
*/
.dataTables_length {
float: left;
display: none;
}
/*
* Filter
*/
.dataTables_filter {
text-align: right;
}
/*
* Table information
*/
.dataTables_info {
padding-top: 3px;
clear: both;
float: left;
}
/*
* Pagination
*/
.dataTables_paginate {
float: right;
text-align: right;
}
.dataTables_paginate .ui-button {
margin-right: -0.1em !important;
}
.paging_two_button .ui-button {
float: left;
cursor: pointer;
cursor: hand;
}
.paging_full_numbers .ui-button {
padding: 2px 6px;
margin: 0;
cursor: pointer;
cursor: hand;
color: #333 !important;
}
/* Two button pagination - previous / next */
.paginate_disabled_previous,
.paginate_enabled_previous,
.paginate_disabled_next,
.paginate_enabled_next {
height: 19px;
float: left;
cursor: pointer;
*cursor: hand;
color: #111 !important;
}
.paginate_disabled_previous:hover,
.paginate_enabled_previous:hover,
.paginate_disabled_next:hover,
.paginate_enabled_next:hover {
text-decoration: none !important;
}
.paginate_disabled_previous:active,
.paginate_enabled_previous:active,
.paginate_disabled_next:active,
.paginate_enabled_next:active {
outline: none;
}
.paginate_disabled_previous,
.paginate_disabled_next {
color: #666 !important;
}
.paginate_disabled_previous,
.paginate_enabled_previous {
padding-left: 23px;
}
.paginate_disabled_next,
.paginate_enabled_next {
padding-right: 23px;
margin-left: 10px;
}
.paginate_enabled_previous {
background: url('../images/back_enabled.png') no-repeat top left;
}
.paginate_enabled_previous:hover {
background: url('../images/back_enabled_hover.png') no-repeat top left;
}
.paginate_disabled_previous {
background: url('../images/back_disabled.png') no-repeat top left;
}
.paginate_enabled_next {
background: url('../images/forward_enabled.png') no-repeat top right;
}
.paginate_enabled_next:hover {
background: url('../images/forward_enabled_hover.png') no-repeat top right;
}
.paginate_disabled_next {
background: url('../images/forward_disabled.png') no-repeat top right;
}
/* Full number pagination */
.paging_full_numbers a:active {
outline: none
}
.paging_full_numbers a:hover {
text-decoration: none;
}
.paging_full_numbers a.paginate_button,
.paging_full_numbers a.paginate_active {
border: 1px solid #aaa;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
padding: 2px 5px;
margin: 0 3px;
cursor: pointer;
*cursor: hand;
color: #333 !important;
}
.paging_full_numbers a.paginate_button:hover {
text-decoration: none !important;
}
/*
* Processing indicator
*/
.dataTables_processing {
position: absolute;
top: 50%;
left: 50%;
width: 250px;
height: 30px;
margin-left: -125px;
margin-top: -15px;
padding: 14px 0 2px 0;
border: 1px solid #ddd;
text-align: center;
color: #999;
font-size: 14px;
}
/*
* Sorting
*/
table.dataTable thead th div.DataTables_sort_wrapper {
position: relative;
padding-right: 20px;
padding-right: 20px;
}
table.dataTable thead th div.DataTables_sort_wrapper span {
position: absolute;
top: 50%;
margin-top: -8px;
right: 0;
}
table.dataTable th:active {
outline: none;
}
/*
* Scrolling
*/
.dataTables_scroll {
clear: both;
}
.dataTables_scrollBody {
*margin-top: -1px;
} }
\ No newline at end of file
...@@ -649,7 +649,7 @@ ...@@ -649,7 +649,7 @@
</div> </div>
</a> </a>
</div> </div>
<div class="col-md-4 text-center"> <!-- <div class="col-md-4 text-center">
<a href="#" class="btn btn_create_lahan"> <a href="#" class="btn btn_create_lahan">
<div> <div>
<img src="{% static 'img/icon-1/SquareHalflahan.svg' %}" alt="" style="width: 35px; <img src="{% static 'img/icon-1/SquareHalflahan.svg' %}" alt="" style="width: 35px;
...@@ -670,7 +670,7 @@ ...@@ -670,7 +670,7 @@
<span>KDB & KLB</span> <span>KDB & KLB</span>
</div> </div>
</a> </a>
</div> </div> -->
</div> </div>
</fieldset> </fieldset>
......
...@@ -450,12 +450,52 @@ background: none;border-color: transparent;"> ...@@ -450,12 +450,52 @@ background: none;border-color: transparent;">
<div> <div>
<i class="icon-download4"></i><span>&nbsp;&nbsp;&nbsp;Download</span> <i class="icon-download4"></i><span>&nbsp;&nbsp;&nbsp;Download</span>
</div> </div>
</a> </a>
</div>
<div class="container-detached">
<div class="content-detached">
<ul class="media-list datatab">
{% for all in res_all %}
<li class="media panel panel-body stack-media-on-mobile" style="background: transparent;border: none;color: white;">
<div>
{{forloop.counter}}
</div>
<div>
{{all.name_perbaikan}}
</div>
<div>
{{all.name}}
</div>
<div>
{{all.type}}
</div>
<div>
{{all.tgl_perbaikan}}
</div>
<div>
{{all.tgl_selesai}}
</div>
<div>
{{all.anggaran}}
</div>
<div>
<a class="btn mdlFire " onclick="loaddetailid( '{{all.id_object}}') " data-toggle="modal" data-target="#modal_detail_perbaikan" style="background-color: #5A9AFB;color: white;border-radius: 5px;width: 85px;height: 25px; ">
<div style="margin-top: -5px; ">
<i class="icon-search4 text-muted text-size-base " style="color: white;font-size: 10px; "></i>
<span>&nbsp;&nbsp;
Detail</span>
</div>
</a>
</div>
</li>
{% endfor %}
</ul>
</div>
</div> </div>
<thead style="font-size: 12px;line-height: 14px;font-family: 'gilroysemibold';text-transform: capitalize;">
<!-- <thead style="font-size: 12px;line-height: 14px;font-family: 'gilroysemibold';text-transform: capitalize;">
<tr> <tr>
<th>No.</th> <th>No.</th>
<th>Sarana Perbaiakn</th> <th>Sarana Perbaiakn</th>
...@@ -468,7 +508,6 @@ background: none;border-color: transparent;"> ...@@ -468,7 +508,6 @@ background: none;border-color: transparent;">
</tr> </tr>
</thead> </thead>
<tbody id="tbody_perbaikan"> <tbody id="tbody_perbaikan">
{% for all in res_all %} {% for all in res_all %}
<tr> <tr>
<td>{{forloop.counter}}</td> <td>{{forloop.counter}}</td>
...@@ -483,7 +522,7 @@ background: none;border-color: transparent;"> ...@@ -483,7 +522,7 @@ background: none;border-color: transparent;">
<div style="margin-top: -5px; "> <div style="margin-top: -5px; ">
<i class="icon-search4 text-muted text-size-base " style="color: white;font-size: 10px; "></i> <i class="icon-search4 text-muted text-size-base " style="color: white;font-size: 10px; "></i>
<span>&nbsp;&nbsp; <span>&nbsp;&nbsp;
Detail</span> Detail</span>
</div> </div>
</a> </a>
...@@ -491,7 +530,7 @@ background: none;border-color: transparent;"> ...@@ -491,7 +530,7 @@ background: none;border-color: transparent;">
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody> -->
</table> </table>
</div> </div>
</div> </div>
...@@ -504,10 +543,10 @@ background: none;border-color: transparent;"> ...@@ -504,10 +543,10 @@ background: none;border-color: transparent;">
<div id="modal_detail_perbaikan" class="modal fade mymodal" style="padding-top: 0px;padding-bottom: 0px;right: -11px;width: 100% !important;max-height: 657px;overflow-y:hidden; left: 0px;"> <div id="modal_detail_perbaikan" class="modal fade mymodal" style="padding-top: 0px;padding-bottom: 0px;right: -11px;width: 100% !important;max-height: 100vh;overflow-y:hidden; left: 0px;">
<div class="modal-dialog modal-sm " style="max-height: 657px;margin: 0;float: right;bottom: 0; <div class="modal-dialog modal-sm " style="margin: 0;float: right;bottom: 0;
width: 320px;"> width: 320px;">
<div class="modal-content " style="background-color: #1B1F2D;max-height: 657px;color: white; "> <div class="modal-content " style="background-color: #1B1F2D;max-height: 100vh;color: white; ">
<div class="modal-body " style="padding: 0px;background-color: #1B1F2D; "> <div class="modal-body " style="padding: 0px;background-color: #1B1F2D; ">
<div style="float: right;margin: -42px 10px 0px 0px; "> <div style="float: right;margin: -42px 10px 0px 0px; ">
<button type="button " class="btn btn-link " onclick="cetakExcel() " style="color: white;padding-top: 2px;"><i class="icon-printer"></i> <button type="button " class="btn btn-link " onclick="cetakExcel() " style="color: white;padding-top: 2px;"><i class="icon-printer"></i>
...@@ -518,7 +557,7 @@ background: none;border-color: transparent;"> ...@@ -518,7 +557,7 @@ background: none;border-color: transparent;">
<!-- <button class="modalMinimize" style="right: 50px;"> <i class='fa fa-minus'></i> </button> --> <!-- <button class="modalMinimize" style="right: 50px;"> <i class='fa fa-minus'></i> </button> -->
<button type="button" onclick="destroymodper()" class="close" data-dismiss="modal " style="color: white;padding: 3px;"> x </button> <button type="button" onclick="destroymodper()" class="close" data-dismiss="modal " style="color: white;padding: 3px;"> x </button>
</div> </div>
<div class="isi text " style="margin-top: 50px;overflow-y: scroll;max-height: 607px;overflow-x: hidden; "> <div class="isi text " style="margin-top: 50px;overflow-y: scroll;max-height: 94vh;overflow-x: hidden; ">
<div class="isi_detail_cek "> <div class="isi_detail_cek ">
<div> <div>
<div> <div>
...@@ -685,6 +724,71 @@ background: none;border-color: transparent;"> ...@@ -685,6 +724,71 @@ background: none;border-color: transparent;">
<script type="text/javascript " src="{% static 'js/plugins/forms/selects/select2.min.js' %} "></script> <script type="text/javascript " src="{% static 'js/plugins/forms/selects/select2.min.js' %} "></script>
<script> <script>
$(document).ready(function() {
var x = window.matchMedia("(min-width: 700px)")
if (x.matches) { // If media query matches
$.fn.dataList = function(options) {
this.each(function() {
var $table = $(this);
if ($table.is('ul')) {
var $ul = $table;
$table = $ul.wrap('<table><tbody/></table').closest('table');
$ul.find('li').wrap('<tr></tr>').contents().unwrap();
$ul.find('div').wrap('<td><td/>').contents().unwrap();
$ul.contents().unwrap()
$table.prepend(`<thead><tr><th>No.</th>
<th>Sarana Perbaiakn</th>
<th>Nama</th>
<th>Type</th>
<th>Tanggal Mulai</th>
<th>Tanggal Selesai</th>
<th>Anggaran</th>
<th>Keterangan</th>
</tr></thead>`);
}
$table.dataTable(options);
});
}
$('.datatab').dataList({
"pageLength": 15,
autoWidth: false,
columnDefs: [{
orderable: false,
width: '20px',
targets: [0],
}, {
orderable: false,
width: '20px',
targets: [6],
}, {
orderable: false,
width: '20px',
targets: [7],
}, ],
dom: '<"float-left "B>frtip',
language: {
search: ' _INPUT_',
searchPlaceholder: 'Data Perbaikan...',
lengthMenu: '<span>Show:</span><hr> _MENU_',
paginate: {
'first': 'First',
'last': 'Last',
'next': '&rarr;',
'previous': '&larr;'
}
},
});
} else {
// document.querySelector("#perbaikan-dashboard\\ > div > div.container-detached > div > ul > li > div:nth-child(1)").style.display = 'none';
//$('.datatab').dataTable({
// "pageLength": 15
//});
}
});
//tes //tes
$("#sel-kec ").change(function() { $("#sel-kec ").change(function() {
var id_kec = $(this).val() var id_kec = $(this).val()
...@@ -753,7 +857,7 @@ background: none;border-color: transparent;"> ...@@ -753,7 +857,7 @@ background: none;border-color: transparent;">
}; };
$("#tbody_perbaikan").html(data_perbaikan) $("#tbody_perbaikan").html(data_perbaikan)
datatatata() //datatatata()
} }
}); });
...@@ -861,10 +965,10 @@ background: none;border-color: transparent;"> ...@@ -861,10 +965,10 @@ background: none;border-color: transparent;">
} }
$("#perbaikan_manage").click(function() { $("#perbaikan_manage").click(function() {
$(".datatable-show-all.list_perb").dataTable().fnDestroy(); //$(".datatable-show-all.list_perb").dataTable().fnDestroy();
setTimeout(function() { //setTimeout(function() {
datatatata() // datatatata()
}, 100); //}, 100);
}) })
......
...@@ -2501,24 +2501,24 @@ ...@@ -2501,24 +2501,24 @@
}); });
} }
$("#perbaikan_manage").click(function() { // $("#perbaikan_manage").click(function() {
var x = window.matchMedia("(max-width: 700px)") // var x = window.matchMedia("(max-width: 700px)")
if (x.matches) { // If media query matches // if (x.matches) { // If media query matches
swal({ // swal({
title: "Sorry", // title: "Sorry",
text: "Untuk di mobile tampilan manajemen perbaikan tidak mendukung, Silahkan akses menggunakan laptop atau PC", // text: "Untuk di mobile tampilan manajemen perbaikan tidak mendukung, Silahkan akses menggunakan laptop atau PC",
type: "warning", // type: "warning",
icon: "error", // icon: "error",
confirmButtonColor: "#00BCD4" // confirmButtonColor: "#00BCD4"
}) // })
//
setTimeout(function() { // setTimeout(function() {
$("#panel-sm2").removeClass('active') // $("#panel-sm2").removeClass('active')
$("#manage_perbaikan").removeClass('active') // $("#manage_perbaikan").removeClass('active')
$("#btn-hide-all").css("display", "none") // $("#btn-hide-all").css("display", "none")
}, 500); // }, 500);
} // }
}) // })
$('.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').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") $('.leaflet-bottom.leaflet-right>.leaflet-control-attribution.leaflet-control').css("right", "50px")
......
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