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

fixed tug.table

parent 40fe5917
......@@ -3,8 +3,6 @@ use \Bitrix\Main\Config\Option;
if (isset($_REQUEST['AJAX_CALL']) && $_REQUEST['AJAX_CALL'] == 'Y')
return;
// var_dump($arParams);
// die;
$arResult = $arParams['CHART_DATA'];
if (!(isset($arParams['TEMPLATE_HIDE']) && $arParams['TEMPLATE_HIDE'] == 'Y'))
......
.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"]))
$isBitrix24Template = (SITE_TEMPLATE_ID == "bitrix24");
$defAlphas = 0.5;
$minHeight = 500;
$heightStep = 50;
?>
<?if($isBitrix24Template):?>
......@@ -54,7 +56,7 @@ $defAlphas = 0.5;
<?if(is_array($section["FIELDS"]) && !empty($section["FIELDS"])):?>
<?foreach($section["FIELDS"] as $key => $arField):
$fId;
$fHeight = 500;
$fHeight = $minHeight;
if(!empty($arField['ID']))
{
$fId = $arField['ID'];
......@@ -62,9 +64,15 @@ $defAlphas = 0.5;
{
$fId = 'chart__'.$key;
}
if(!empty($arResult['height'])) {
$fHeight = $arResult['height'][$fId];
// if(!empty($arResult['height'])) {
// $fHeight = $arResult['height'][$fId];
// }
$fHeight = count($arField['DATA']) * $heightStep;
if($fHeight < $minHeight) {
$fHeight = $minHeight;
}
?>
<?switch ($arField['TYPE'])
......
......@@ -4,8 +4,7 @@ use \Bitrix\Main\Config\Option;
if (isset($_REQUEST['AJAX_CALL']) && $_REQUEST['AJAX_CALL'] == 'Y')
return;
$arResult = $arParams['FORM_DATA'];
$arResult = $arParams['FORM_DATA'];
if (!(isset($arParams['TEMPLATE_HIDE']) && $arParams['TEMPLATE_HIDE'] == 'Y'))
$this->IncludeComponentTemplate();
......
......@@ -36,60 +36,44 @@ $isBitrix24Template = (SITE_TEMPLATE_ID == "bitrix24");
<?if($isBitrix24Template):?>
<?
$bodyClass = $APPLICATION->GetPageProperty("BodyClass");
$APPLICATION->SetPageProperty("BodyClass", ($bodyClass ? $bodyClass." " : "")."pagetitle-toolbar-field-view");
$this->SetViewTarget("inside_pagetitle", 0);
$bodyClass = $APPLICATION->GetPageProperty("BodyClass");
$APPLICATION->SetPageProperty("BodyClass", ($bodyClass ? $bodyClass." " : "")."pagetitle-toolbar-field-view");
$this->SetViewTarget("inside_pagetitle", 0);
?>
<!-- start pagetitle-container -->
<div class="pagetitle-container pagetitle-flexible-space">
<?endif?>
<?if(!empty($arResult["FILTER_FIELDS"]))
{
$APPLICATION->IncludeComponent(
"bitrix:main.ui.filter",
"",
array(
"GRID_ID" => $filterIdTables,
"FILTER_ID" => $filterIdTables,
"FILTER" => $arResult["FILTER_FIELDS"],
"FILTER_PRESETS" => $arResult["FILTER_PRESETS"],
"ENABLE_LIVE_SEARCH" => false,
"ENABLE_LABEL" => true
),
$component,
array()
);
}?>
<?if(!empty($arResult["BUTTONS"] )):?>
<div class="pagetitle-container pagetitle-align-right-container">
<?foreach($arResult["BUTTONS"] as $tbButton):
if(!empty($tbButton['href'])):?>
<a href="<?=$tbButton['href']?>" class="ui-btn ui-btn-md ui-btn-themes <?=(!empty($tbButton["style"])) ? $tbButton["style"] : "ui-btn-light-border"?>
<?=(!empty($tbButton["icon"])) ? $tbButton["icon"] : ""?>">
<?=$tbButton["title"]?>
</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?>
<?endforeach?>
</div>
<?endif?>
<?if($isBitrix24Template):?>
</div>
<!-- end pagetitle-container -->
<div class="pagetitle-container pagetitle-flexible-space">
<?if(!empty($arResult["FILTER_FIELDS"]))
{
$APPLICATION->IncludeComponent(
"bitrix:main.ui.filter",
"",
array(
"GRID_ID" => $filterIdTables,
"FILTER_ID" => $filterIdTables,
"FILTER" => $arResult["FILTER_FIELDS"],
"FILTER_PRESETS" => $arResult["FILTER_PRESETS"],
"ENABLE_LIVE_SEARCH" => false,
"ENABLE_LABEL" => true
),
$component,
array()
);
}?>
<?if(!empty($arResult["PAGETITLE_BUTTONS"])):?>
<div class="pagetitle-container pagetitle-align-right-container">
<?foreach($arResult["PAGETITLE_BUTTONS"] as $tbButton):?>
<button type="button"
class="ui-btn ui-btn-md ui-btn-themes <?=$tbButton['CLASSES'] ?: 'ui-btn-light-border'?>"
<?if($tbButton['ON_CLICK']):?>
onclick="<?=$tbButton['ON_CLICK']?>"
<?endif?>
></button>
<?endforeach?>
</div>
<?endif?>
</div>
<?
$this->EndViewTarget();
$this->EndViewTarget();
?>
<?endif?>
......@@ -113,6 +97,12 @@ if(!empty($arResult["NAV_OBJECT"]))
}
?>
<?if(!empty($arResult["CSS"])):?>
<style>
<?=$arResult["CSS"]?>
</style>
<?endif?>
<?if(!empty($arResult["DIGITBLOCKS"])):?>
<div class="stat_widgets">
<?foreach($arResult["DIGITBLOCKS"] as $dblock):?>
......@@ -133,9 +123,10 @@ if(!empty($arResult["NAV_OBJECT"]))
</div>
<?endif?>
<?if(!empty($arResult["TABLE_HEADER_BOX"])) {?>
<?=$arResult["TABLE_HEADER_BOX"];?>
<?}?>
<?if(!empty($arResult["TABLE_HEADER_BOX"]))
{
echo $arResult["TABLE_HEADER_BOX"];
}?>
<div id="tel-stat-grid-container">
<?
......@@ -177,20 +168,20 @@ if(!empty($arResult["NAV_OBJECT"]))
'ROWS' => $arResult["DATAS"],
'TOTAL_ROWS_COUNT' => $arResult['ROWS_COUNT'],
'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,
'AJAX_MODE' => 'Y',
'AJAX_ID' => \CAjax::getComponentID('bitrix:main.ui.grid', '.default', ''),
'PAGE_SIZES' => $pageSizes,
'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_GRID_SETTINGS_MENU' => true,
'SHOW_NAVIGATION_PANEL' => (!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_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"] )),
'ACTION_PANEL' => [
'GROUPS' => [
......@@ -215,13 +206,21 @@ if(!empty($arResult["NAV_OBJECT"]))
$APPLICATION->IncludeComponent('bitrix:main.ui.grid', '', $ui_grid_params);
if ($isGridAjaxRequest)
{
die();
}
?>
<div>
<?if(!empty($arResult["SCRIPTS"])):?>
<script><?=$arResult["SCRIPTS"]?></script>
<?endif?>
<?
if ($isGridAjaxRequest)
{
die();
}
?>
<div id="alv_records_player"></div>
<script>
......@@ -240,10 +239,6 @@ if(!empty($arResult["NAV_OBJECT"]))
<?endif?>
</script>
<?if(!empty( $arResult["SCRIPTS"] )):?>
<script><?=$arResult["SCRIPTS"]?></script>
<?endif?>
<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