Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bitrix-tug-components
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shohruh Tojiboev
bitrix-tug-components
Commits
12e6bcc7
Commit
12e6bcc7
authored
May 03, 2021
by
Shohruh Tojiboev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tug.table
parent
40fe5917
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
74 deletions
+74
-74
component.php
tug.charts/component.php
+0
-2
style.css
tug.charts/templates/.default/style.css
+1
-1
template.php
tug.charts/templates/.default/template.php
+11
-3
component.php
tug.settings/component.php
+1
-2
template.php
tug.tables/templates/.default/template.php
+61
-66
No files found.
tug.charts/component.php
View file @
12e6bcc7
...
@@ -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'
))
...
...
tug.charts/templates/.default/style.css
View file @
12e6bcc7
.bot_statistics__gr
{
.bot_statistics__gr
{
height
:
500px
;
min-
height
:
500px
;
}
}
\ No newline at end of file
tug.charts/templates/.default/template.php
View file @
12e6bcc7
...
@@ -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']
)
...
...
tug.settings/component.php
View file @
12e6bcc7
...
@@ -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
();
...
...
tug.tables/templates/.default/template.php
View file @
12e6bcc7
...
@@ -36,60 +36,44 @@ $isBitrix24Template = (SITE_TEMPLATE_ID == "bitrix24");
...
@@ -36,60 +36,44 @@ $isBitrix24Template = (SITE_TEMPLATE_ID == "bitrix24");
<?
if
(
$isBitrix24Template
)
:?>
<?
if
(
$isBitrix24Template
)
:?>
<?
<?
$bodyClass
=
$APPLICATION
->
GetPageProperty
(
"BodyClass"
);
$bodyClass
=
$APPLICATION
->
GetPageProperty
(
"BodyClass"
);
$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"
>
<?
if
(
!
empty
(
$arResult
[
"FILTER_FIELDS"
]))
<?
endif
?>
{
$APPLICATION
->
IncludeComponent
(
<?
if
(
!
empty
(
$arResult
[
"FILTER_FIELDS"
]))
"bitrix:main.ui.filter"
,
{
""
,
$APPLICATION
->
IncludeComponent
(
array
(
"bitrix:main.ui.filter"
,
"GRID_ID"
=>
$filterIdTables
,
""
,
"FILTER_ID"
=>
$filterIdTables
,
array
(
"FILTER"
=>
$arResult
[
"FILTER_FIELDS"
],
"GRID_ID"
=>
$filterIdTables
,
"FILTER_PRESETS"
=>
$arResult
[
"FILTER_PRESETS"
],
"FILTER_ID"
=>
$filterIdTables
,
"ENABLE_LIVE_SEARCH"
=>
false
,
"FILTER"
=>
$arResult
[
"FILTER_FIELDS"
],
"ENABLE_LABEL"
=>
true
"FILTER_PRESETS"
=>
$arResult
[
"FILTER_PRESETS"
],
),
"ENABLE_LIVE_SEARCH"
=>
false
,
$component
,
"ENABLE_LABEL"
=>
true
array
()
),
);
$component
,
}
?>
array
()
);
<?
if
(
!
empty
(
$arResult
[
"PAGETITLE_BUTTONS"
]))
:?>
}
?>
<
div
class
="
pagetitle
-
container
pagetitle
-
align
-
right
-
container
">
<?foreach(
$arResult["PAGETITLE_BUTTONS"]
as
$tbButton
):?>
<?
if
(
!
empty
(
$arResult
[
"BUTTONS"
]
))
:?>
<button type="
button
"
<
div
class
="
pagetitle
-
container
pagetitle
-
align
-
right
-
container
">
class="
ui
-
btn
ui
-
btn
-
md
ui
-
btn
-
themes
<?=
$tbButton
[
'CLASSES'
]
?:
'ui-btn-light-border'
?>
"
<?foreach(
$arResult["BUTTONS"]
as
$tbButton
):
<?
if
(
$tbButton
[
'ON_CLICK'
])
:?>
if(!empty(
$tbButton['href']
)):?>
onclick
=
"<?=
$tbButton['ON_CLICK']
?>"
<a href="
<?=
$tbButton
[
'href'
]
?>
" class="ui-btn ui-btn-md ui-btn-themes
<?=
(
!
empty
(
$tbButton
[
"style"
]))
?
$tbButton
[
"style"
]
:
"ui-btn-light-border"
?>
<?
endif
?>
<?=
(
!
empty
(
$tbButton
[
"icon"
]))
?
$tbButton
[
"icon"
]
:
""
?>
">
>
</button>
<?=
$tbButton
[
"title"
]
?>
<?
endforeach
?>
</a>
</div>
<?
else
:?>
<?
endif
?>
<
button
id
=
"alv-stats-export"
</div>
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
-->
<?
<?
$this
->
EndViewTarget
();
$this
->
EndViewTarget
();
?>
?>
<?
endif
?>
<?
endif
?>
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment