Update data_gc_tab.html
Browse files- data_gc_tab.html +3 -3
data_gc_tab.html
CHANGED
@@ -218,6 +218,9 @@
|
|
218 |
pagination: "local", // enable local pagination
|
219 |
paginationSize: 50, // number of rows per page
|
220 |
selectable: true, // enable row selection
|
|
|
|
|
|
|
221 |
columns: [
|
222 |
{title:"Номер в списке", field:"id"},
|
223 |
{title:"Имя", field:"name", width:120},
|
@@ -294,19 +297,16 @@
|
|
294 |
valueEl.value = "";
|
295 |
table.clearFilter();
|
296 |
});
|
297 |
-
|
298 |
function handleDownloadJson() {
|
299 |
var tableData = table.getData("active");
|
300 |
var jsonData = JSON.stringify(tableData, null, 2);
|
301 |
console.log("Данные для рассылки:", jsonData);
|
302 |
}
|
303 |
-
|
304 |
function handleTakeForYourself() {
|
305 |
var tableData = table.getData("active");
|
306 |
var jsonData = JSON.stringify(tableData, null, 2);
|
307 |
console.log("Данные для себя:", jsonData);
|
308 |
}
|
309 |
-
|
310 |
document.getElementById("download-json").addEventListener("click", handleDownloadJson);
|
311 |
document.getElementById("take-for-yourself").addEventListener("click", handleTakeForYourself);
|
312 |
})
|
|
|
218 |
pagination: "local", // enable local pagination
|
219 |
paginationSize: 50, // number of rows per page
|
220 |
selectable: true, // enable row selection
|
221 |
+
initialSort: [
|
222 |
+
{column:"id", dir:"desc"} // сортировка по убыванию по полю "id"
|
223 |
+
],
|
224 |
columns: [
|
225 |
{title:"Номер в списке", field:"id"},
|
226 |
{title:"Имя", field:"name", width:120},
|
|
|
297 |
valueEl.value = "";
|
298 |
table.clearFilter();
|
299 |
});
|
|
|
300 |
function handleDownloadJson() {
|
301 |
var tableData = table.getData("active");
|
302 |
var jsonData = JSON.stringify(tableData, null, 2);
|
303 |
console.log("Данные для рассылки:", jsonData);
|
304 |
}
|
|
|
305 |
function handleTakeForYourself() {
|
306 |
var tableData = table.getData("active");
|
307 |
var jsonData = JSON.stringify(tableData, null, 2);
|
308 |
console.log("Данные для себя:", jsonData);
|
309 |
}
|
|
|
310 |
document.getElementById("download-json").addEventListener("click", handleDownloadJson);
|
311 |
document.getElementById("take-for-yourself").addEventListener("click", handleTakeForYourself);
|
312 |
})
|