DmitrMakeev commited on
Commit
94db531
1 Parent(s): 0a969f5

Update data_gc_tab.html

Browse files
Files changed (1) hide show
  1. data_gc_tab.html +8 -20
data_gc_tab.html CHANGED
@@ -9,7 +9,8 @@
9
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
10
  <script src="https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js"></script>
11
  <script type="text/javascript" src="https://vk.com/js/api/openapi.js?169"></script>
12
-
 
13
 
14
 
15
  <link href="https://unpkg.com/tabulator-tables@6.2.1/dist/css/tabulator.min.css" rel="stylesheet">
@@ -213,21 +214,6 @@
213
 
214
 
215
  <script>
216
- // Функция для создания всплывающего окна с деталями строки
217
- var cellPopupFormatter = function(cell){
218
- var data = cell.getData(),
219
- container = document.createElement("div"),
220
- contents = "<strong style='font-size:1.2em;'>Детали пользователя</strong><br/><ul style='padding:0; margin-top:10px; margin-bottom:0;'>";
221
- contents += "<li><strong>Имя:</strong> " + data.name + "</li>";
222
- contents += "<li><strong>Реплики:</strong> " + data.b_mess + "</li>";
223
- contents += "</ul>";
224
-
225
- container.innerHTML = contents;
226
-
227
- return container;
228
- };
229
-
230
- // Инициализация таблицы с использованием cellClick
231
  document.addEventListener('DOMContentLoaded', function() {
232
  fetch('https://dmtuit-gcapirabiz.hf.space/data_gc_tab_out?api_sys=fasSd345D')
233
  .then(response => response.json())
@@ -256,10 +242,12 @@
256
  {title:"Город", field:"b_city", width:110},
257
  {title:"Email", field:"email", width:110},
258
  {title:"Реплики", field:"b_mess", width:95, cellClick:function(e, cell){
259
- if (cell.getColumn().getField() === "b_mess") {
260
- var popup = cellPopupFormatter(cell);
261
- document.body.appendChild(popup);
262
- }
 
 
263
  }},
264
  {title:"Куратор", field:"curator", formatter: linkFormatter},
265
  {title:"Статус покупки", field:"shop_st", formatter: function(cell, formatterParams, onRendered) {
 
9
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
10
  <script src="https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js"></script>
11
  <script type="text/javascript" src="https://vk.com/js/api/openapi.js?169"></script>
12
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
13
+ <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
14
 
15
 
16
  <link href="https://unpkg.com/tabulator-tables@6.2.1/dist/css/tabulator.min.css" rel="stylesheet">
 
214
 
215
 
216
  <script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  document.addEventListener('DOMContentLoaded', function() {
218
  fetch('https://dmtuit-gcapirabiz.hf.space/data_gc_tab_out?api_sys=fasSd345D')
219
  .then(response => response.json())
 
242
  {title:"Город", field:"b_city", width:110},
243
  {title:"Email", field:"email", width:110},
244
  {title:"Реплики", field:"b_mess", width:95, cellClick:function(e, cell){
245
+ var data = cell.getData();
246
+ Swal.fire({
247
+ title: 'Детали пользователя',
248
+ html: `<strong>Имя:</strong> ${data.name}<br><strong>Реплики:</strong> ${data.b_mess}`,
249
+ icon: 'info'
250
+ });
251
  }},
252
  {title:"Куратор", field:"curator", formatter: linkFormatter},
253
  {title:"Статус покупки", field:"shop_st", formatter: function(cell, formatterParams, onRendered) {