Update bas_vk_tab.html
Browse files- bas_vk_tab.html +14 -1
bas_vk_tab.html
CHANGED
|
@@ -249,7 +249,8 @@ button:hover, #filter-clear:hover, #download-json:hover, #take-for-yourself:hove
|
|
| 249 |
<input id="filter-value2" type="text" placeholder="Значение фильтра 2">
|
| 250 |
|
| 251 |
<button id="filter-clear">Очистить фильтр</button>
|
| 252 |
-
|
|
|
|
| 253 |
<button id="download-json">Рассылка по выбранным</button>
|
| 254 |
<button id="take-for-yourself">Взять себе</button> <!-- Добавлена вторая кнопка -->
|
| 255 |
</div>
|
|
@@ -488,6 +489,18 @@ document.getElementById("download-xlsx").addEventListener("click", function(){
|
|
| 488 |
console.log("Данные для рассылки:", jsonData);
|
| 489 |
}
|
| 490 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 491 |
function handleTakeForYourself() {
|
| 492 |
var tableData = table.getData("active");
|
| 493 |
var jsonData = JSON.stringify(tableData, null, 2);
|
|
|
|
| 249 |
<input id="filter-value2" type="text" placeholder="Значение фильтра 2">
|
| 250 |
|
| 251 |
<button id="filter-clear">Очистить фильтр</button>
|
| 252 |
+
<button id="download-xlsx">Скачать в XLSX</button>
|
| 253 |
+
<button id="download-json">Download JSON</button>
|
| 254 |
<button id="download-json">Рассылка по выбранным</button>
|
| 255 |
<button id="take-for-yourself">Взять себе</button> <!-- Добавлена вторая кнопка -->
|
| 256 |
</div>
|
|
|
|
| 489 |
console.log("Данные для рассылки:", jsonData);
|
| 490 |
}
|
| 491 |
|
| 492 |
+
|
| 493 |
+
//trigger download of data.json file
|
| 494 |
+
document.getElementById("download-json").addEventListener("click", function(){
|
| 495 |
+
table.download("json", "data.json");
|
| 496 |
+
});
|
| 497 |
+
|
| 498 |
+
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
|
| 502 |
+
|
| 503 |
+
|
| 504 |
function handleTakeForYourself() {
|
| 505 |
var tableData = table.getData("active");
|
| 506 |
var jsonData = JSON.stringify(tableData, null, 2);
|