1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
namespace AloVoice;
$opts = json_decode($_REQUEST['PLACEMENT_OPTIONS'], true);
self::eLog($opts, "------ Events.php :: DocucemntGenerator MENU:");
$chashe = '';
if (!0) {
$chashe = '?'.time();
}
?>
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DiDOX</title>
<!-- Документ в DIDOX -->
<script src="//api.bitrix24.com/api/v1/"></script>
<script src="template/js/didox/e-imzo.js<?php echo $chashe?>" type="text/javascript"></script>
<script src="template/js/didox/e-imzo-client.js<?php echo $chashe?>" type="text/javascript"></script>
<script src="template/js/didox/libs/moment.js" type="text/javascript"></script>
<script src="template/js/didox/libs/ag-grid-community.js" type="text/javascript"></script>
<script src="template/js/didox/libs/jQuery.js" type="text/javascript"></script>
<script src="template/js/didox/helper.js<?php echo $chashe?>" type="text/javascript"></script>
<link rel="stylesheet" href="template/css/tailwind.css">
<link rel="stylesheet" href="template/css/ag-grid.css">
<link rel="stylesheet" href="template/css/ag-theme-material.css">
<script>
var docs = [], deal = {};
</script>
</head>
<body>
<noscript>Для работы прижения необходимо включить JavaScript</noscript>
<div class="app">
<?php
if (!empty($opts["ENTITY_ID"])) {
$doc = BxRest::call( 'crm.documentgenerator.document.list', array(
"filter"=>[
"entityId" => $opts["ENTITY_ID"]
]
));
$deal = BxRest::call( 'crm.deal.get', array(
"ID" => $opts["ENTITY_ID"]
));
?>
<script>
// docs = JSON.parse('<?php echo json_encode($doc['result']['documents'])?>');
// deal = JSON.parse('<?php echo json_encode($deal['result'])?>');
</script>
<div class="">
<h4 class="text-center text-2xl" id="deal_name"></h4>
<div class="absolute top-2 right-2" id="auth_container" style="display: none">
<div>
<span>Авторизация DIDOX:</span>
<select class="ml-1" name="" id="auth_select">
<!-- <option value="0"></option> -->
</select>
</div>
</div>
</div>
<div id="docs_table" class="ag-theme-material" style="height: 60vh; width:100%;"></div>
<?php } else { ?>
Нет документов.
<script> setTimeout(function(){ BX24.closeApplication() }, 3000); </script>
<?php }
?>
</div>
<script src="template/js/didox/classes/App.js<?php echo $chashe?>" type="text/javascript"></script>
<script src="template/js/didox/classes/storage.js<?php echo $chashe?>" type="text/javascript"></script>
<script src="template/js/didox/classes/EAuth.js<?php echo $chashe?>" type="text/javascript"></script>
<script src="template/js/didox/classes/DocsTable.js<?php echo $chashe?>" type="text/javascript"></script>
<script src="template/js/didox/classes/DocSign.js<?php echo $chashe?>" type="text/javascript"></script>
<script src="template/js/didox/classes/Didox.js<?php echo $chashe?>" type="text/javascript"></script>
<script src="template/js/didox/main.js<?php echo $chashe?>" type="text/javascript"></script>
<script src="template/js/didox/libs/swal.js" type="text/javascript"></script>
</body>
</html>