743 lines
25 KiB
PHP
743 lines
25 KiB
PHP
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
|
||
<script>
|
||
|
||
function priceSorter(a, b) {
|
||
var aa = a.replaceAll(' ', '')
|
||
var bb = b.replaceAll(' ', '')
|
||
return aa - bb
|
||
}
|
||
|
||
function floorSorter(a, b) {
|
||
var aa = a.split(' ')[0]
|
||
var bb = b.split(' ')[0]
|
||
|
||
if (isNaN(parseInt(aa))|| isNaN(parseInt(bb))) {
|
||
return aa > 0 ? 1 : -1
|
||
}
|
||
return aa - bb
|
||
}
|
||
|
||
function phoneSorter(a, b, aData, bData) {
|
||
var resultA = JSON.parse(aData.client);
|
||
var resultB = JSON.parse(bData.client);
|
||
|
||
var aa = ''
|
||
var bb = ''
|
||
|
||
if (resultA.length) {
|
||
aa = resultA[0].phone.replace('+', '')
|
||
}
|
||
|
||
if (resultB.length) {
|
||
bb = resultB[0].phone.replace('+', '')
|
||
}
|
||
|
||
return aa - bb
|
||
}
|
||
function dateSorter(a, b) {
|
||
//console.log(a,b);
|
||
var aa = getTimeStamp(a);
|
||
var bb = getTimeStamp(b);
|
||
//console.log(aa,bb);
|
||
return aa - bb
|
||
}
|
||
|
||
function getTimeStamp(input) {
|
||
if(input == '' || isEmpty(input)){
|
||
input = "01.01.1970 00:00:00";
|
||
}
|
||
var parts = input.trim().split(' ');
|
||
var date = parts[0].split('.');
|
||
var time = (parts[1] ? parts[1] : '00:00:00').split(':');
|
||
|
||
// NOTE:: Month: 0 = January - 11 = December.
|
||
var d = new Date(date[2],date[1]-1,date[0],time[0],time[1],time[2]);
|
||
return d.getTime() / 1000;
|
||
}
|
||
|
||
|
||
$(document).ready(function() {
|
||
//$( "#object_list_table" ).wrap( "<div class='object_list_table_scroll'></div>" );
|
||
})
|
||
|
||
function addSaveButtonToToolbar() {
|
||
$('.fixed-table-toolbar .dropdown-menu').append(`<li class="save"><a id="saveTable">Сохранить</a></li>`);
|
||
|
||
$('.jw__objects_for_progress-bar .fixed-table-toolbar #saveTable').on('click', function() {
|
||
let arr = [];
|
||
let idUser = <?= $_SESSION['id'];?>;
|
||
$('.fixed-table-toolbar .dropdown-menu input').each(function(i , elem){
|
||
console.log(elem, elem.checked, $(elem).attr('data-field'));
|
||
elem.checked ? arr.push($(elem).attr('data-field')) : '';
|
||
})
|
||
$.ajax({
|
||
url:"/ajax/getReclameTable.php",
|
||
method: 'get',
|
||
dataType: 'html',
|
||
data: {arrPunkt: arr, idTable: tableId, idUser: idUser},
|
||
success: function(data) {
|
||
console.log(data);
|
||
}
|
||
});
|
||
|
||
})
|
||
|
||
$('.fr-system__objects #saveTable').on('click', function() {
|
||
|
||
let arr = [];
|
||
let idUser = <?= $_SESSION['id'];?>;
|
||
$('.fr-system__objects .dropdown-menu input').each(function(i, elem){
|
||
console.log(elem, elem.checked, $(elem).attr('data-field'));
|
||
elem.checked ? arr.push($(elem).attr('data-field')) : '';
|
||
})
|
||
$.ajax({
|
||
url:"/ajax/getReclameTable.php",
|
||
method: 'get',
|
||
dataType: 'html',
|
||
data: {arrPunkt: arr, idTable: tableId, idUser: idUser},
|
||
success: function(data) {
|
||
console.log(data);
|
||
}
|
||
});
|
||
|
||
})
|
||
}
|
||
|
||
|
||
function initBootstrapTable() {
|
||
$("#object_list_table").bootstrapTable({
|
||
formatColumnsToggleAll: function () {
|
||
return 'Выбрать все'
|
||
},
|
||
onReorderColumn: (e) => {
|
||
bindExpandEventToToolbar()
|
||
addSaveButtonToToolbar()
|
||
let sp = 3;
|
||
if(tableId == 8 || tableId == 1){
|
||
sp = 4;
|
||
}
|
||
const arr = e.splice(sp);
|
||
|
||
let idUser = <?= $_SESSION['id'];?>;
|
||
|
||
$.ajax({
|
||
url:"/ajax/getReclameTable.php",
|
||
method: 'get',
|
||
dataType: 'html',
|
||
data: {arrPunkt: arr, idTable: tableId, idUser},
|
||
success: function(data) { }
|
||
})
|
||
|
||
const fotorama = $('.objects-fotorama').fotorama()
|
||
fetchFotorama(fotorama)
|
||
},
|
||
onCheckAll: (rowsAfter, rowsBefore) => {
|
||
var ids = "";
|
||
for(let i=0; i<rowsAfter.length; i++){
|
||
var id = rowsAfter[i].id;
|
||
if (ids) {
|
||
ids = ids + "|" + id;
|
||
} else {
|
||
ids = id;
|
||
}
|
||
}
|
||
|
||
$.ajax({
|
||
url: '/ajax/toChecked.php?st=1&id='+ids,
|
||
success: function(){
|
||
}
|
||
});
|
||
|
||
},
|
||
onUncheckAll: (rowsAfter, rows) => {
|
||
var ids = "";
|
||
var values = [];
|
||
for(let i=0; i<rows.length; i++){
|
||
var id = rows[i].id;
|
||
values.push(id);
|
||
if (ids) {
|
||
ids = ids + "|" + id;
|
||
} else {
|
||
ids = id;
|
||
}
|
||
}
|
||
|
||
$('#object_list_table').bootstrapTable('uncheckBy', {field: 'id', values: values});
|
||
$.ajax({
|
||
url: '/ajax/toChecked.php?st=0&id='+ids,
|
||
success: function(){
|
||
}
|
||
});
|
||
|
||
},
|
||
onCheck(row, e){
|
||
|
||
to_check_new(row.id, 1);
|
||
|
||
},
|
||
onUncheck(row, e){
|
||
to_check_new(row.id, 0);
|
||
},
|
||
onColumnSwitch: () => {
|
||
setTimeout(function () {
|
||
const fotorama = $('.objects-fotorama').fotorama();
|
||
fetchFotorama(fotorama)
|
||
})
|
||
},
|
||
// onLoadSuccess: (e) => {console.log(e, 'LOADED');} ,
|
||
maxMovingRows: 25,
|
||
dragaccept: '.drag-accept',
|
||
exact: true,
|
||
onPostBody: function () {
|
||
const fotorama = $('.objects-fotorama');
|
||
fetchFotorama(fotorama)
|
||
},
|
||
onPageChange: function () {
|
||
setTimeout(function () {
|
||
const fotorama = $('.objects-fotorama').fotorama();
|
||
fetchFotorama(fotorama)
|
||
})
|
||
},
|
||
onSort: function () {
|
||
setTimeout(function () {
|
||
const fotorama = $('.objects-fotorama').fotorama();
|
||
fetchFotorama(fotorama)
|
||
})
|
||
}
|
||
});
|
||
|
||
tableLoaded()
|
||
|
||
function fetchFotorama(fotorama) {
|
||
$(document).on('click', '.objects-fotorama', function (e) {
|
||
const fotoramaInstance = $(this).data('fotorama');
|
||
if ($(e.target).hasClass("fotorama--fullscreen")) {
|
||
if (fotoramaInstance) {
|
||
fotoramaInstance.cancelFullScreen();
|
||
} else {
|
||
console.error('Fotorama instance not found');
|
||
}
|
||
} else {
|
||
fotoramaInstance.requestFullScreen();
|
||
}
|
||
});
|
||
|
||
|
||
fotorama.on('fotorama:fullscreenenter', function() {
|
||
console.log($(this).data('fotorama'))
|
||
var fotoramaInstance = $(this).data('fotorama');
|
||
var $fullscreen = $('.fotorama--fullscreen');
|
||
|
||
$fullscreen.attr('style', function(i, style) {
|
||
return (style || '') + ' max-width: 70vw !important; max-height: 70vh !important; margin: auto !important';
|
||
});
|
||
|
||
fotoramaInstance.setOptions({
|
||
fit: 'scaledown'
|
||
});
|
||
|
||
var $fullscreenWrap = $('.fotorama__wrap');
|
||
|
||
$fullscreenWrap.css({
|
||
'width': '100%',
|
||
'height': 'auto',
|
||
'max-width': '70vw',
|
||
'max-height': '70vh'
|
||
});
|
||
});
|
||
|
||
fotorama.on('fotorama:fullscreenexit', function() {
|
||
var $fullscreen = $(this);
|
||
|
||
$fullscreen.attr('style', function(i, style) {
|
||
return (style || '') + ' max-width: 83px !important; max-height: 47px !important;';
|
||
});
|
||
|
||
var $fullscreenWrap = $('.fotorama__wrap');
|
||
|
||
$fullscreenWrap.css({
|
||
'width': '83px',
|
||
'height': '47px'
|
||
});
|
||
});
|
||
}
|
||
}
|
||
|
||
function bindExpandEventToToolbar() {
|
||
$('.fixed-table-toolbar .dropdown-toggle').click(function(e) {
|
||
e.stopImmediatePropagation()
|
||
$(this).attr('aria-expanded', function (i, attr) {
|
||
return attr == 'true' ? 'false' : 'true'
|
||
});
|
||
|
||
$('.dropdown-menu.dropdown-menu-right').toggleClass('show')
|
||
$(this).toggleClass('show')
|
||
})
|
||
}
|
||
|
||
</script>
|
||
<script type="text/javascript">
|
||
var tableId = <?= $tableId ?>;
|
||
$(".crm__table").hide()
|
||
$('.object-content__preloader__agency').css({
|
||
"position": "absolute",
|
||
"text-align": "center",
|
||
"top": "50%",
|
||
"left": "calc(50% + 55px)",
|
||
"margin-top": "-48px",
|
||
"margin-left": "-48px",
|
||
"z-index": "10"
|
||
});
|
||
$(".object-content__preloader__agency").show()
|
||
|
||
function init() {
|
||
initBootstrapTable()
|
||
bindExpandEventToToolbar()
|
||
addSaveButtonToToolbar()
|
||
$(".crm__table").show()
|
||
$(".object-content__preloader__agency").hide()
|
||
}
|
||
|
||
if (typeof $("#object_list_table").bootstrapTable === 'function') {
|
||
init()
|
||
} else {
|
||
window.onload = () => {
|
||
init()
|
||
}
|
||
}
|
||
|
||
|
||
function advPriceFormatter(column, row) {
|
||
if (row.adv_price && row.adv_price > 0) {
|
||
return '<a href="javascript:void();" class="openAdvObjectStats" data-id="' + row.id + '"><span>' + row.adv_price + '</span></a>';
|
||
} else {
|
||
return row.adv_price;
|
||
}
|
||
}
|
||
|
||
function clientsFormatter(column, row) {
|
||
var result = JSON.parse(row.client);
|
||
|
||
var html = '';
|
||
|
||
if (result && result.length > 0) {
|
||
for (var i = 0; i < result.length; i++) {
|
||
if (html) {
|
||
html = html + '<br/>';
|
||
}
|
||
html = html + '<a href="javascript:void();" class="openClient" data-id="' + result[i].id + '"><span>' + result[i].fio + '</span></a>';
|
||
}
|
||
}
|
||
|
||
|
||
return html;
|
||
}
|
||
function clientsPhoneFormatter(column, row) {
|
||
var result = JSON.parse(row.client);
|
||
|
||
var html = '';
|
||
|
||
if (result && result.length > 0) {
|
||
for (var i = 0; i < result.length; i++) {
|
||
if (html) {
|
||
html = html + '<br/>';
|
||
}
|
||
html = html + '<a href="javascript:void();" class="openClient" data-id="' + result[i].id + '"><span>' + result[i].phone + '</span></a>';
|
||
}
|
||
}
|
||
|
||
|
||
return html;
|
||
}
|
||
function requestFormatter(column, row) {
|
||
if (row.requests) {
|
||
return '<a target="_blank" href="/requisitions.php?funnelId=all&resetFilter=1&objectId=' + row.id + '"><span>' + row.requests + '</span></a>';
|
||
} else {
|
||
return '';
|
||
}
|
||
}
|
||
|
||
function previewFormatter(value, row) {
|
||
if (row.preview) {
|
||
const preview = JSON.parse(row.preview);
|
||
|
||
if (preview.length === 1 && preview[0].includes('no_photo.png')) {
|
||
return `<div style="display: flex; align-items: center; justify-content: center"><image style="width: 40px; height: 40px;" src='${preview[0]}'></image></div>`
|
||
}
|
||
const imageTags = preview.map((p) => (
|
||
`<image class="test-image" style="width: 40px; max-width: 70vw; max-height: 70vh; height: 40px;" src='${p}'></image>`
|
||
))
|
||
|
||
|
||
return `
|
||
<div class="fotorama objects-fotorama" data-max-width="70vw" data-max-height="70vh" data-fit="contain" data-controlsonstart="false" data-nav="false" data-allowfullscreen="true" data-width="100%">
|
||
`
|
||
+
|
||
imageTags.join(' ')
|
||
+
|
||
`</div>`
|
||
} else {
|
||
return '';
|
||
}
|
||
}
|
||
function editFormatter(value, row) {
|
||
if (row.edit) {
|
||
if (row.edit === 'editObjectCan') {
|
||
return '<a target="_blank" style="font-size: 18px;padding: 5px 6px;border-bottom: none !important;" href="add-object.php?can=1&id=' + row.id + '" title="Редактировать"><i class="ti-pencil"></i></a>';
|
||
} else {
|
||
return '<a target="_blank" style="font-size: 18px;padding: 5px 6px;border-bottom: none !important;" href="add-object.php?id=' + row.id + '" title="Редактировать"><i class="ti-pencil"></i></a>';
|
||
}
|
||
} else {
|
||
return '';
|
||
}
|
||
}
|
||
function archiveFormatter(value, row) {
|
||
if (row.archive) {
|
||
if (row.archive === 'archiveMyObject') {
|
||
return '<a data-id="' + row.id + '" style="font-size: 18px;padding: 5px 6px;border-bottom: none !important;" href="javascript:void();" title="Поместить в архив" class="archiveMyObject"><i class="ti-folder"></i></a>';
|
||
} else {
|
||
return '<a data-id="' + row.id + '" style="font-size: 18px;padding: 5px 6px;border-bottom: none !important;" href="javascript:void();" title="Восстановить" class="unArchiveMyObject"><i class="ti-back-right"></i></a>';
|
||
}
|
||
} else {
|
||
return '';
|
||
}
|
||
}
|
||
|
||
function linksFormatter(column, row, index, test, test2, test3) {
|
||
var data_count = <?= count($objectsFound) ?>;
|
||
|
||
if (row.links) {
|
||
|
||
var actions = row.links.split(";");
|
||
|
||
var html = '';
|
||
|
||
for (var i=0; i < actions.length; i++) {
|
||
if (actions[i] === 'ad-report') {
|
||
html = html + '<a href="javascript:void();" style="border-bottom: none !important;" class="ad-report" data-id="' + row.id + '"><span>Отчет по рекламе</span></a>'
|
||
}
|
||
if (actions[i] === 'publish-report') {
|
||
html = html + '<a href="javascript:void();" style="border-bottom: none !important;" class="publish-report" data-id="' + row.id + '"><span>Отчет о публикации</span></a>'
|
||
}
|
||
if (actions[i] === 'deleteMyObject') {
|
||
html = html + '<a href="javascript:void();" style="border-bottom: none !important;" class="deleteMyObject" data-id="' + row.id + '"><span>Удалить</span></a>'
|
||
}
|
||
if (actions[i] === 'add_client_new') {
|
||
html = html + '<a href="javascript:void();" style="border-bottom: none !important;" class="add_client_new" data-object="' + row.id + '"><span>Создать заявку</span></a>'
|
||
}
|
||
if (actions[i] === 'advertisingCosts') {
|
||
html = html + '<a href="javascript:void();" style="border-bottom: none !important;" class="advertisingCosts" data-id="' + row.id + '"><span>Затраты на рекламу</span></a>'
|
||
}
|
||
if (actions[i] === 'cabinet') {
|
||
html = html + '<a target="_blank" style="border-bottom: none !important;" href="/cabinet-edit.php?id=' + row.id + '"><span>Кабинет клиента</span></a>'
|
||
}
|
||
if (actions[i] === 'sendToNewUser') {
|
||
html = html + '<a href="javascript:void();" style="border-bottom: none !important;" class="sendToNewUser" data-id="' + row.id + '"><span>Передать объект</span></a>'
|
||
}
|
||
if (actions[i] === 'add-event') {
|
||
html = html + '<a href="javascript:void();" style="border-bottom: none !important;" class="add-event" data-id="' + row.id + '"><span>Задачи</span></a>'
|
||
}
|
||
if (actions[i] === 'add-note') {
|
||
html = html + '<a href="javascript:void();" style="border-bottom: none !important;" class="add-note" data-id="' + row.id + '"><span>Примечания</span></a>'
|
||
}
|
||
}
|
||
|
||
let css = ''
|
||
let reversed = ''
|
||
|
||
if (index < data_count / 2) {
|
||
reversed = 'reversed'
|
||
css = 'display:none;right: auto;left: 0;top: 50px;'
|
||
} else {
|
||
css = 'display:none;right: auto;left: 0;top: auto;bottom: -10px;'
|
||
}
|
||
|
||
if (index == Math.floor(data_count / 2)) {
|
||
css = 'display:none;right: auto;left: 0;top: auto;bottom: -10px;'
|
||
reversed = ''
|
||
}
|
||
|
||
if (index < 3) {
|
||
reversed = 'reversed'
|
||
css = 'display:none;right: auto;left: 0;top: 50px;'
|
||
}
|
||
|
||
return '<div class="row-menu-obj">' +
|
||
'<div class="object-content__actions" style="padding: 0 0 2px;border-bottom: none;">' +
|
||
' <div class="actions-menu__icons">' +
|
||
' <span class="jw__small-popup jw-action-icon-more" style="padding: 6px;" data-id="obj' + row.id + '"></span>' +
|
||
' <div class="jw__popup actions-menu '+ reversed +'" style="'+ css +'" id="popup__obj' + row.id + '">' +
|
||
' <div class="actions-menu__inner">' + html +
|
||
' </div>' +
|
||
' </div>' +
|
||
' </div>' +
|
||
' <div class="clear"></div> ' +
|
||
' </div>' +
|
||
'</div>';
|
||
} else {
|
||
return '';
|
||
}
|
||
}
|
||
|
||
function tableLoaded() {
|
||
$(".jw__small-popup").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-id');
|
||
if ($("#popup__" + id).hasClass("show")) {
|
||
$("#popup__" + id).toggleClass("show");
|
||
} else {
|
||
$(".jw__popup.actions-menu").removeClass("show");
|
||
$("#popup__" + id).toggleClass("show");
|
||
}
|
||
|
||
return false;
|
||
});
|
||
|
||
$(".ad-report").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-id');
|
||
$("#popup__obj" + id).toggleClass("show");
|
||
openAdStatsWindow(id);
|
||
|
||
return false;
|
||
});
|
||
|
||
$(".openAdvObjectStats").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-id');
|
||
openObjectAdvPlacesStatsWindow(id, <?php echo $userInStats;?>);
|
||
|
||
return false;
|
||
});
|
||
|
||
$(".openClient").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-id');
|
||
editClientNew(id, null);
|
||
|
||
return false;
|
||
});
|
||
|
||
// Делегирование событий для обработки кликов после сортировки
|
||
$('body').on('click', '.openClient', function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-id');
|
||
editClientNew(id, null);
|
||
|
||
return false;
|
||
});
|
||
|
||
|
||
$(".publish-report").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-id');
|
||
$("#popup__obj" + id).toggleClass("show");
|
||
openPublishStatsWindow(id);
|
||
|
||
return false;
|
||
});
|
||
|
||
$(".deleteMyObject").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-id');
|
||
$("#popup__obj" + id).toggleClass("show");
|
||
$.ajax({
|
||
url: '/ajax/deleteUserObject.php?objId=' + id,
|
||
success:function(data){
|
||
window.location.reload(true);
|
||
},
|
||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||
console.log("eRROR: " + errorThrown);
|
||
}
|
||
});
|
||
|
||
return false;
|
||
});
|
||
|
||
$(".advertisingCosts").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-id');
|
||
$("#popup__obj" + id).toggleClass("show");
|
||
advertisingCostsWindow(id);
|
||
|
||
return false;
|
||
});
|
||
|
||
$(".add_client_new").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-object');
|
||
$("#popup__obj" + id).toggleClass("show");
|
||
add_client_new(id);
|
||
|
||
return false;
|
||
});
|
||
|
||
// $(".archiveMyObject").click(function(e) {
|
||
// e.preventDefault();
|
||
// e.stopPropagation();
|
||
|
||
// var id = $(this).attr('data-id');
|
||
// $('#archive_table_object_id_obj').val(id);
|
||
|
||
// $("#archive_table_object_bg").fadeIn(500);
|
||
// $("#archive_table_object").fadeIn(10);
|
||
// $("body").addClass("lock");
|
||
|
||
// return false;
|
||
// });
|
||
|
||
$(".unArchiveMyObject").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-id');
|
||
$('#unarchive_table_object_id_obj').val(id);
|
||
|
||
$("#unarchive_table_object_bg").fadeIn(500);
|
||
$("#unarchive_table_object").fadeIn(10);
|
||
$("body").addClass("lock");
|
||
|
||
return false;
|
||
});
|
||
|
||
$(".sendToNewUser").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-id');
|
||
$("#popup__obj" + id).toggleClass("show");
|
||
openSendToNewUserWindow(id);
|
||
|
||
return false;
|
||
});
|
||
|
||
$(".add-event").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var id = $(this).attr('data-id');
|
||
$("#popup__obj" + id).toggleClass("show");
|
||
openEventsWindow(id);
|
||
|
||
return false;
|
||
});
|
||
|
||
$(".add-note").click(function(e) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
var id = $(this).attr('data-id');
|
||
openNotesWindow(id);
|
||
return false;
|
||
});
|
||
}
|
||
|
||
function archiveTableObject() {
|
||
var id = $('#archive_table_object_id_obj').val();
|
||
if (id) {
|
||
$.ajax({
|
||
url: '/ajax/archiveUserObject.php?objId=' + id,
|
||
success: function (data) {
|
||
window.location.reload(true);
|
||
},
|
||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||
console.log("eRROR: " + errorThrown);
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
function unarchiveTableObject() {
|
||
var id = $('#unarchive_table_object_id_obj').val();
|
||
if (id) {
|
||
$.ajax({
|
||
url: '/ajax/unArchiveUserObject.php?objId=' + id,
|
||
success:function(data){
|
||
window.location.reload(true);
|
||
},
|
||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||
console.log("eRROR: " + errorThrown);
|
||
}
|
||
});
|
||
}
|
||
}
|
||
</script>
|
||
<style>
|
||
.select-cell {display: none;}
|
||
.bootstrap-table .fixed-table-toolbar .columns label {
|
||
white-space: nowrap;
|
||
}
|
||
|
||
#object_list_table th {
|
||
color: white;
|
||
}
|
||
|
||
#object_list_table th[data-field=price] {
|
||
min-width: 150px;
|
||
}
|
||
|
||
</style>
|
||
|
||
<div class="full_modal-bg" id="archive_table_object_bg" style="display: none">
|
||
<span class="pseudo-link closer"><i class="ti-close"></i></span>
|
||
<div class="full_modal edit-modal" id="archive_table_object" style="display: none;">
|
||
<div class="modal-inner">
|
||
<h2 style="text-align: center;">Помещение объекта в архив</h2>
|
||
<div class="form-block">
|
||
<div>
|
||
<p style="text-align: center;">Вы действительно хотите поместить объект в архив?</p>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="modal-submit">
|
||
<input type="hidden" name="archive_table_object_id_obj" id="archive_table_object_id_obj" value="">
|
||
<button type="submit" onclick="archiveTableObject();">Архивировать <i class="ti-angle-right"></i></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="full_modal-bg" id="unarchive_table_object_bg" style="display: none">
|
||
<span class="pseudo-link closer"><i class="ti-close"></i></span>
|
||
<div class="full_modal edit-modal" id="unarchive_table_object" style="display: none;">
|
||
<div class="modal-inner">
|
||
<h2 style="text-align: center;">Восстановление объекта из архива</h2>
|
||
<div class="form-block">
|
||
<div>
|
||
<p style="text-align: center;">Вы действительно хотите восстановить объект из архива?</p>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="modal-submit">
|
||
<input type="hidden" name="unarchive_table_object_id_obj" id="unarchive_table_object_id_obj" value="">
|
||
<button type="submit" onclick="unarchiveTableObject();">Восстановить <i class="ti-angle-right"></i></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|