Update bas_vk_tab.html
Browse files- bas_vk_tab.html +29 -0
bas_vk_tab.html
CHANGED
|
@@ -327,6 +327,7 @@ button:hover, #filter-clear:hover, #download-json:hover, #take-for-yourself:hove
|
|
| 327 |
}
|
| 328 |
return `<div style="width: 20px; height: 20px; background-color: ${color}; border-radius: 50%;"></div>`;
|
| 329 |
}},
|
|
|
|
| 330 |
{title:"Канал трафика", field:"pr4", width:95},
|
| 331 |
{title:"Дата", field:"pr5", width:95},
|
| 332 |
{title:"Ключ PR", field:"key_pr", width:95},
|
|
@@ -338,6 +339,34 @@ button:hover, #filter-clear:hover, #download-json:hover, #take-for-yourself:hove
|
|
| 338 |
document.getElementById('filter-clear').addEventListener('click', function() {
|
| 339 |
table.clearFilter(true);
|
| 340 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 341 |
// Download XLSX functionality
|
| 342 |
document.getElementById('download-xlsx').addEventListener('click', function() {
|
| 343 |
table.download("xlsx", "data.xlsx");
|
|
|
|
| 327 |
}
|
| 328 |
return `<div style="width: 20px; height: 20px; background-color: ${color}; border-radius: 50%;"></div>`;
|
| 329 |
}},
|
| 330 |
+
{title:"Driver", field:"driver", hozAlign:"center", editor:checkboxEditor, formatter:"tickCross"},
|
| 331 |
{title:"Канал трафика", field:"pr4", width:95},
|
| 332 |
{title:"Дата", field:"pr5", width:95},
|
| 333 |
{title:"Ключ PR", field:"key_pr", width:95},
|
|
|
|
| 339 |
document.getElementById('filter-clear').addEventListener('click', function() {
|
| 340 |
table.clearFilter(true);
|
| 341 |
});
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
var checkboxEditor = function(cell, onRendered, success, cancel){
|
| 345 |
+
//create and style input
|
| 346 |
+
var input = document.createElement("input");
|
| 347 |
+
input.setAttribute("type", "checkbox");
|
| 348 |
+
|
| 349 |
+
// Set the checkbox state based on the cell value
|
| 350 |
+
input.checked = cell.getValue() === true || cell.getValue() === "true";
|
| 351 |
+
|
| 352 |
+
onRendered(function(){
|
| 353 |
+
input.focus();
|
| 354 |
+
});
|
| 355 |
+
|
| 356 |
+
function onChange(){
|
| 357 |
+
success(input.checked);
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
//submit new value on change
|
| 361 |
+
input.addEventListener("change", onChange);
|
| 362 |
+
|
| 363 |
+
return input;
|
| 364 |
+
};
|
| 365 |
+
|
| 366 |
+
|
| 367 |
+
|
| 368 |
+
|
| 369 |
+
|
| 370 |
// Download XLSX functionality
|
| 371 |
document.getElementById('download-xlsx').addEventListener('click', function() {
|
| 372 |
table.download("xlsx", "data.xlsx");
|