DmitrMakeev commited on
Commit
33f3ed9
·
verified ·
1 Parent(s): bea6185

Update data_gc_tab.html

Browse files
Files changed (1) hide show
  1. data_gc_tab.html +39 -0
data_gc_tab.html CHANGED
@@ -171,7 +171,14 @@
171
  <option value="data_t">Дата</option>
172
  <option value="n_con">n_con</option> <!-- Добавлено новое поле -->
173
  </select>
 
 
 
 
 
174
 
 
 
175
  <select id="filter-type">
176
  <option value="=">=</option>
177
  <option value="<"><</option>
@@ -287,6 +294,38 @@ var table = new Tabulator("#example-table", {
287
  valueEl.value = "";
288
  table.clearFilter();
289
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  // Переопределяем метод table.download
291
  table.download = function(type, filename, options) {
292
  // Сохраняем старые данные
 
171
  <option value="data_t">Дата</option>
172
  <option value="n_con">n_con</option> <!-- Добавлено новое поле -->
173
  </select>
174
+ <div>
175
+ <button id="select-row">Select "Oli Bob"</button>
176
+ <button id="deselect-row">Deselect "Oli Bob"</button>
177
+ <button id="select-all">Select All</button>
178
+ <button id="deselect-all">Deselect All</button>
179
 
180
+ <span id="select-stats"></span>
181
+ </div>
182
  <select id="filter-type">
183
  <option value="=">=</option>
184
  <option value="<"><</option>
 
294
  valueEl.value = "";
295
  table.clearFilter();
296
  });
297
+
298
+
299
+
300
+
301
+ table.on("rowSelectionChanged", function(data, rows){
302
+ document.getElementById("select-stats").innerHTML = data.length;
303
+ });
304
+
305
+ //select row on "select" button click
306
+ document.getElementById("select-row").addEventListener("click", function(){
307
+ table.selectRow(1);
308
+ });
309
+
310
+ //deselect row on "deselect" button click
311
+ document.getElementById("deselect-row").addEventListener("click", function(){
312
+ table.deselectRow(1);
313
+ });
314
+
315
+ //select row on "select all" button click
316
+ document.getElementById("select-all").addEventListener("click", function(){
317
+ table.selectRow();
318
+ });
319
+
320
+ //deselect row on "deselect all" button click
321
+ document.getElementById("deselect-all").addEventListener("click", function(){
322
+ table.deselectRow();
323
+ });
324
+
325
+
326
+
327
+
328
+
329
  // Переопределяем метод table.download
330
  table.download = function(type, filename, options) {
331
  // Сохраняем старые данные