Commit 12e6bcc7 authored by Shohruh Tojiboev's avatar Shohruh Tojiboev

fixed tug.table

parent 40fe5917
...@@ -3,8 +3,6 @@ use \Bitrix\Main\Config\Option; ...@@ -3,8 +3,6 @@ use \Bitrix\Main\Config\Option;
if (isset($_REQUEST['AJAX_CALL']) && $_REQUEST['AJAX_CALL'] == 'Y') if (isset($_REQUEST['AJAX_CALL']) && $_REQUEST['AJAX_CALL'] == 'Y')
return; return;
// var_dump($arParams);
// die;
$arResult = $arParams['CHART_DATA']; $arResult = $arParams['CHART_DATA'];
if (!(isset($arParams['TEMPLATE_HIDE']) && $arParams['TEMPLATE_HIDE'] == 'Y')) if (!(isset($arParams['TEMPLATE_HIDE']) && $arParams['TEMPLATE_HIDE'] == 'Y'))
......
.bot_statistics__gr { .bot_statistics__gr {
height: 500px; min-height: 500px;
} }
\ No newline at end of file
...@@ -14,6 +14,8 @@ if (!is_array($arResult["SECTIONS"]) || empty($arResult["SECTIONS"])) ...@@ -14,6 +14,8 @@ if (!is_array($arResult["SECTIONS"]) || empty($arResult["SECTIONS"]))
$isBitrix24Template = (SITE_TEMPLATE_ID == "bitrix24"); $isBitrix24Template = (SITE_TEMPLATE_ID == "bitrix24");
$defAlphas = 0.5; $defAlphas = 0.5;
$minHeight = 500;
$heightStep = 50;
?> ?>
<?if($isBitrix24Template):?> <?if($isBitrix24Template):?>
...@@ -54,7 +56,7 @@ $defAlphas = 0.5; ...@@ -54,7 +56,7 @@ $defAlphas = 0.5;
<?if(is_array($section["FIELDS"]) && !empty($section["FIELDS"])):?> <?if(is_array($section["FIELDS"]) && !empty($section["FIELDS"])):?>
<?foreach($section["FIELDS"] as $key => $arField): <?foreach($section["FIELDS"] as $key => $arField):
$fId; $fId;
$fHeight = 500; $fHeight = $minHeight;
if(!empty($arField['ID'])) if(!empty($arField['ID']))
{ {
$fId = $arField['ID']; $fId = $arField['ID'];
...@@ -62,9 +64,15 @@ $defAlphas = 0.5; ...@@ -62,9 +64,15 @@ $defAlphas = 0.5;
{ {
$fId = 'chart__'.$key; $fId = 'chart__'.$key;
} }
if(!empty($arResult['height'])) { // if(!empty($arResult['height'])) {
$fHeight = $arResult['height'][$fId]; // $fHeight = $arResult['height'][$fId];
// }
$fHeight = count($arField['DATA']) * $heightStep;
if($fHeight < $minHeight) {
$fHeight = $minHeight;
} }
?> ?>
<?switch ($arField['TYPE']) <?switch ($arField['TYPE'])
......
...@@ -4,8 +4,7 @@ use \Bitrix\Main\Config\Option; ...@@ -4,8 +4,7 @@ use \Bitrix\Main\Config\Option;
if (isset($_REQUEST['AJAX_CALL']) && $_REQUEST['AJAX_CALL'] == 'Y') if (isset($_REQUEST['AJAX_CALL']) && $_REQUEST['AJAX_CALL'] == 'Y')
return; return;
$arResult = $arParams['FORM_DATA'];
$arResult = $arParams['FORM_DATA'];
if (!(isset($arParams['TEMPLATE_HIDE']) && $arParams['TEMPLATE_HIDE'] == 'Y')) if (!(isset($arParams['TEMPLATE_HIDE']) && $arParams['TEMPLATE_HIDE'] == 'Y'))
$this->IncludeComponentTemplate(); $this->IncludeComponentTemplate();
......
...@@ -40,10 +40,7 @@ $isBitrix24Template = (SITE_TEMPLATE_ID == "bitrix24"); ...@@ -40,10 +40,7 @@ $isBitrix24Template = (SITE_TEMPLATE_ID == "bitrix24");
$APPLICATION->SetPageProperty("BodyClass", ($bodyClass ? $bodyClass." " : "")."pagetitle-toolbar-field-view"); $APPLICATION->SetPageProperty("BodyClass", ($bodyClass ? $bodyClass." " : "")."pagetitle-toolbar-field-view");
$this->SetViewTarget("inside_pagetitle", 0); $this->SetViewTarget("inside_pagetitle", 0);
?> ?>
<!-- start pagetitle-container -->
<div class="pagetitle-container pagetitle-flexible-space"> <div class="pagetitle-container pagetitle-flexible-space">
<?endif?>
<?if(!empty($arResult["FILTER_FIELDS"])) <?if(!empty($arResult["FILTER_FIELDS"]))
{ {
$APPLICATION->IncludeComponent( $APPLICATION->IncludeComponent(
...@@ -62,32 +59,19 @@ $isBitrix24Template = (SITE_TEMPLATE_ID == "bitrix24"); ...@@ -62,32 +59,19 @@ $isBitrix24Template = (SITE_TEMPLATE_ID == "bitrix24");
); );
}?> }?>
<?if(!empty($arResult["BUTTONS"] )):?> <?if(!empty($arResult["PAGETITLE_BUTTONS"])):?>
<div class="pagetitle-container pagetitle-align-right-container"> <div class="pagetitle-container pagetitle-align-right-container">
<?foreach($arResult["BUTTONS"] as $tbButton): <?foreach($arResult["PAGETITLE_BUTTONS"] as $tbButton):?>
if(!empty($tbButton['href'])):?> <button type="button"
<a href="<?=$tbButton['href']?>" class="ui-btn ui-btn-md ui-btn-themes <?=(!empty($tbButton["style"])) ? $tbButton["style"] : "ui-btn-light-border"?> class="ui-btn ui-btn-md ui-btn-themes <?=$tbButton['CLASSES'] ?: 'ui-btn-light-border'?>"
<?=(!empty($tbButton["icon"])) ? $tbButton["icon"] : ""?>"> <?if($tbButton['ON_CLICK']):?>
<?=$tbButton["title"]?> onclick="<?=$tbButton['ON_CLICK']?>"
</a>
<?else:?>
<button id="alv-stats-export"
class="ui-btn ui-btn-md ui-btn-themes
<?=(!empty($tbButton["style"])) ? $tbButton["style"] : "ui-btn-light-border"?>
<?=($tbButton['disable'] ? 'ui-btn-disabled' : "")?>
<?=(!empty($tbButton["icon"])) ? $tbButton["icon"] : ""?>"
<?=(!empty($tbButton["click"])) ? ' onClick="'.$tbButton["click"].'" ' : ""?>
>
<?=$tbButton["title"]?>
</button>
<?endif?> <?endif?>
></button>
<?endforeach?> <?endforeach?>
</div> </div>
<?endif?> <?endif?>
<?if($isBitrix24Template):?>
</div> </div>
<!-- end pagetitle-container -->
<? <?
$this->EndViewTarget(); $this->EndViewTarget();
?> ?>
...@@ -113,6 +97,12 @@ if(!empty($arResult["NAV_OBJECT"])) ...@@ -113,6 +97,12 @@ if(!empty($arResult["NAV_OBJECT"]))
} }
?> ?>
<?if(!empty($arResult["CSS"])):?>
<style>
<?=$arResult["CSS"]?>
</style>
<?endif?>
<?if(!empty($arResult["DIGITBLOCKS"])):?> <?if(!empty($arResult["DIGITBLOCKS"])):?>
<div class="stat_widgets"> <div class="stat_widgets">
<?foreach($arResult["DIGITBLOCKS"] as $dblock):?> <?foreach($arResult["DIGITBLOCKS"] as $dblock):?>
...@@ -133,9 +123,10 @@ if(!empty($arResult["NAV_OBJECT"])) ...@@ -133,9 +123,10 @@ if(!empty($arResult["NAV_OBJECT"]))
</div> </div>
<?endif?> <?endif?>
<?if(!empty($arResult["TABLE_HEADER_BOX"])) {?> <?if(!empty($arResult["TABLE_HEADER_BOX"]))
<?=$arResult["TABLE_HEADER_BOX"];?> {
<?}?> echo $arResult["TABLE_HEADER_BOX"];
}?>
<div id="tel-stat-grid-container"> <div id="tel-stat-grid-container">
<? <?
...@@ -177,20 +168,20 @@ if(!empty($arResult["NAV_OBJECT"])) ...@@ -177,20 +168,20 @@ if(!empty($arResult["NAV_OBJECT"]))
'ROWS' => $arResult["DATAS"], 'ROWS' => $arResult["DATAS"],
'TOTAL_ROWS_COUNT' => $arResult['ROWS_COUNT'], 'TOTAL_ROWS_COUNT' => $arResult['ROWS_COUNT'],
'ACTION_ALL_ROWS' => true, 'ACTION_ALL_ROWS' => true,
'SHOW_ROW_CHECKBOXES' => (!empty($arResult["CHECKBOX"])) ? $arResult["CHECKBOX"] : true, 'SHOW_ROW_CHECKBOXES' => (isset($arResult["CHECKBOX"])) ? $arResult["CHECKBOX"] : true,
'NAV_OBJECT' => $nav, 'NAV_OBJECT' => $nav,
'AJAX_MODE' => 'Y', 'AJAX_MODE' => 'Y',
'AJAX_ID' => \CAjax::getComponentID('bitrix:main.ui.grid', '.default', ''), 'AJAX_ID' => \CAjax::getComponentID('bitrix:main.ui.grid', '.default', ''),
'PAGE_SIZES' => $pageSizes, 'PAGE_SIZES' => $pageSizes,
'AJAX_OPTION_JUMP' => 'Y', 'AJAX_OPTION_JUMP' => 'Y',
'SHOW_CHECK_ALL_CHECKBOXES' => (!empty($arResult["CHECKBOX"])) ? $arResult["CHECKBOX"] : true, 'SHOW_CHECK_ALL_CHECKBOXES' => (isset($arResult["CHECKBOX"])) ? $arResult["CHECKBOX"] : true,
'SHOW_ROW_ACTIONS_MENU' => true, 'SHOW_ROW_ACTIONS_MENU' => true,
'SHOW_GRID_SETTINGS_MENU' => true, 'SHOW_GRID_SETTINGS_MENU' => true,
'SHOW_NAVIGATION_PANEL' => (!empty($arResult["DATAS"])), // (count($arResult["DATAS"])>24), 'SHOW_NAVIGATION_PANEL' => (!empty($arResult["DATAS"])), // (count($arResult["DATAS"])>24),
'SHOW_PAGINATION' => (!empty($arResult["DATAS"])), // (count($arResult["DATAS"])>24), 'SHOW_PAGINATION' => (!empty($arResult["DATAS"])), // (count($arResult["DATAS"])>24),
'SHOW_SELECTED_COUNTER' => false, (!empty($arResult["DATAS"])), // (!empty($arResult["CHECKBOX"])), 'SHOW_SELECTED_COUNTER' => false, (!empty($arResult["DATAS"])), // (!empty($arResult["CHECKBOX"])),
'SHOW_TOTAL_COUNTER' => true, //(!empty($arResult["DATAS"])), // (count($arResult["DATAS"])>24), 'SHOW_TOTAL_COUNTER' => true, //(!empty($arResult["DATAS"])), // (count($arResult["DATAS"])>24),
'SHOW_PAGESIZE' => (!empty($arResult["DATAS"])), // (count($arResult["DATAS"])>24), 'SHOW_PAGESIZE' => (isset($arResult["SHOW_PAGESIZE"])) ? $arResult["SHOW_PAGESIZE"] : true, //(!empty($arResult["DATAS"])), // (count($arResult["DATAS"])>24),
'SHOW_ACTION_PANEL' => (!empty($arResult["ACTION_PANEL_ITEMS"] )), 'SHOW_ACTION_PANEL' => (!empty($arResult["ACTION_PANEL_ITEMS"] )),
'ACTION_PANEL' => [ 'ACTION_PANEL' => [
'GROUPS' => [ 'GROUPS' => [
...@@ -215,13 +206,21 @@ if(!empty($arResult["NAV_OBJECT"])) ...@@ -215,13 +206,21 @@ if(!empty($arResult["NAV_OBJECT"]))
$APPLICATION->IncludeComponent('bitrix:main.ui.grid', '', $ui_grid_params); $APPLICATION->IncludeComponent('bitrix:main.ui.grid', '', $ui_grid_params);
if ($isGridAjaxRequest)
{
die();
}
?> ?>
<div> <div>
<?if(!empty($arResult["SCRIPTS"])):?>
<script><?=$arResult["SCRIPTS"]?></script>
<?endif?>
<?
if ($isGridAjaxRequest)
{
die();
}
?>
<div id="alv_records_player"></div> <div id="alv_records_player"></div>
<script> <script>
...@@ -240,10 +239,6 @@ if(!empty($arResult["NAV_OBJECT"])) ...@@ -240,10 +239,6 @@ if(!empty($arResult["NAV_OBJECT"]))
<?endif?> <?endif?>
</script> </script>
<?if(!empty( $arResult["SCRIPTS"] )):?>
<script><?=$arResult["SCRIPTS"]?></script>
<?endif?>
<script> <script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment