DmitrMakeev
commited on
Commit
•
34b71c9
1
Parent(s):
53d6109
Update data_gc_tab.html
Browse files- data_gc_tab.html +5 -2
data_gc_tab.html
CHANGED
@@ -249,7 +249,7 @@ 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>
|
@@ -446,7 +446,10 @@ return link + `<img src="${imageUrl3}" alt="WhatsApp" style="width: 98px; height
|
|
446 |
document.getElementById("filter-value").addEventListener("keyup", updateFilter);
|
447 |
document.getElementById("filter-field2").addEventListener("change", updateFilter);
|
448 |
document.getElementById("filter-value2").addEventListener("keyup", updateFilter);
|
449 |
-
|
|
|
|
|
|
|
450 |
document.getElementById("filter-clear").addEventListener("click", function() {
|
451 |
fieldEl.value = "";
|
452 |
typeEl.value = "=";
|
|
|
249 |
<input id="filter-value2" type="text" placeholder="Значение фильтра 2">
|
250 |
|
251 |
<button id="filter-clear">Очистить фильтр</button>
|
252 |
+
<button id="download-xlsx">Download XLSX</button>
|
253 |
<button id="download-json">Рассылка по выбранным</button>
|
254 |
<button id="take-for-yourself">Взять себе</button> <!-- Добавлена вторая кнопка -->
|
255 |
</div>
|
|
|
446 |
document.getElementById("filter-value").addEventListener("keyup", updateFilter);
|
447 |
document.getElementById("filter-field2").addEventListener("change", updateFilter);
|
448 |
document.getElementById("filter-value2").addEventListener("keyup", updateFilter);
|
449 |
+
//trigger download of data.xlsx file
|
450 |
+
document.getElementById("download-xlsx").addEventListener("click", function(){
|
451 |
+
table.download("xlsx", "data.xlsx", {sheetName:"My Data"});
|
452 |
+
});
|
453 |
document.getElementById("filter-clear").addEventListener("click", function() {
|
454 |
fieldEl.value = "";
|
455 |
typeEl.value = "=";
|