Skip to content

Commit 275440a

Browse files
committed
Expand/Collapse actions for performance widgets
1 parent 770f016 commit 275440a

6 files changed

Lines changed: 21 additions & 7 deletions

File tree

lhc_web/design/defaulttheme/js/svelte/public/build/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lhc_web/design/defaulttheme/js/svelte/public/build/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lhc_web/design/defaulttheme/js/svelte/src/LHC.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@
280280
$lhcList[listId + '_m_h'] = lhcServices.restoreLocalSetting(listId + '_m_h',null,false);
281281
});
282282
283-
$lhcList['onlineusers_m_h'] = lhcServices.restoreLocalSetting('onlineusers_m_h',null,false);
283+
['onlineusers_m_h', 'depp_m_h', 'opp_m_h'].forEach(function(key) {
284+
$lhcList[key] = lhcServices.restoreLocalSetting(key, null, false);
285+
});
284286
285287
async function updateNoticeData(){
286288
const responseTrack = await fetch(WWW_DIR_JAVASCRIPT + 'chat/loadinitialdata', {

lhc_web/design/defaulttheme/js/svelte/src/Widgets/Parts/WidgetBodyPending.svelte

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,20 @@
133133
</th>
134134

135135
{#if $lhcList[type].cl}
136-
{#each $lhcList[type].cl as col}
137-
<th title={$t("dep_performance.col_" + col)} class="abbr-list">{$t("dep_performance.col_" + col)}</th>
136+
{#each $lhcList[type].cl as col, colIndex}
137+
<th title={$t("dep_performance.col_" + col)}>
138+
{#if no_expand === false && colIndex === $lhcList[type].cl.length - 1}
139+
<div class="float-end expand-actions">
140+
<a on:click={(e) => lhcServices.changeWidgetHeight(lhcList,panel_id,true)} class="text-muted disable-select">
141+
<i title={$t("widget.more_rows")} class="material-icons">expand</i>
142+
</a>
143+
<a on:click={(e) => lhcServices.changeWidgetHeight(lhcList,panel_id,false)} class="text-muted disable-select">
144+
<i title={$t("widget.less_rows")} class="material-icons">compress</i>
145+
</a>
146+
</div>
147+
{/if}
148+
<div class="abbr-list">{$t("dep_performance.col_" + col)}</div>
149+
</th>
138150
{/each}
139151
{/if}
140152

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php if ($currentUser->hasAccessTo('lhstatistic','dep_performance')) : ?>
2-
<lhc-widget <?php if (isset($customCardNoId)) : ?>no_panel_id="true"<?php endif;?> <?php if (isset($customCardNoCollapse)) : ?>no_collapse="true"<?php endif; ?> column_1_width="15%" <?php if ($currentUser->hasAccessTo('lhstatistic','performance_settings')) : ?>custom_settings_url="statistic/performancesettings"<?php endif;?> card_icon="home" no_link="true" hide_2_column="true" no_counter="true" hide_third_column="true" <?php if (isset($rightPanelMode)) : ?>right_panel_mode="true"<?php endif; ?> <?php if (isset($hideCardHeader)) : ?>hide_header="true"<?php endif;?> sort_identifier="dep_performance_sort" icon_class="chat-active" limit_list_identifier="limitdp" type="dep_performance" expand_identifier="depp_widget_exp" list_identifier="dep-performance" height_identifier="depp_m_h" panel_list_identifier="depp-panel-list" optionsPanel='<?php echo json_encode(array('limitid' => 'limitdp', 'hide_department_filter' => true, 'limits_width' => 12))?>' www_dir_flags="<?php echo erLhcoreClassDesign::design('images/flags');?>"></lhc-widget>
2+
<lhc-widget <?php if (isset($customCardNoId)) : ?>no_panel_id="true"<?php endif;?> <?php if (isset($customCardNoCollapse)) : ?>no_collapse="true"<?php endif; ?> column_1_width="15%" <?php if ($currentUser->hasAccessTo('lhstatistic','performance_settings')) : ?>custom_settings_url="statistic/performancesettings"<?php endif;?> card_icon="home" no_link="true" hide_2_column="true" no_counter="true" hide_third_column="true" <?php if (isset($rightPanelMode)) : ?>right_panel_mode="true"<?php endif; ?> <?php if (isset($hideCardHeader)) : ?>hide_header="true"<?php endif;?> sort_identifier="dep_performance_sort" icon_class="chat-active" limit_list_identifier="limitdp" type="dep_performance" expand_identifier="depp_widget_exp" list_identifier="dep-performance" height_identifier="depp_m_h" panel_list_identifier="depp-panel-list" optionsPanel='<?php echo json_encode(array("panelid" => "depp", 'limitid' => 'limitdp', 'hide_department_filter' => true, 'limits_width' => 12))?>' www_dir_flags="<?php echo erLhcoreClassDesign::design('images/flags');?>"></lhc-widget>
33
<?php endif; ?>
44

55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php if ($currentUser->hasAccessTo('lhstatistic','op_performance')) : ?>
2-
<lhc-widget <?php if (isset($customCardNoId)) : ?>no_panel_id="true"<?php endif;?> <?php if (isset($customCardNoCollapse)) : ?>no_collapse="true"<?php endif; ?> column_1_width="15%" <?php if ($currentUser->hasAccessTo('lhstatistic','performance_settings')) : ?>custom_settings_url="statistic/performancesettings/op"<?php endif;?> card_icon="account_box" no_link="true" hide_2_column="true" no_counter="true" hide_third_column="true" <?php if (isset($rightPanelMode)) : ?>right_panel_mode="true"<?php endif; ?> <?php if (isset($hideCardHeader)) : ?>hide_header="true"<?php endif;?> sort_identifier="op_performance_sort" icon_class="chat-active" limit_list_identifier="limitop" type="op_performance" expand_identifier="opp_widget_exp" list_identifier="op-performance" height_identifier="opp_m_h" panel_list_identifier="depp-panel-list" optionsPanel='<?php echo json_encode(array('limitid' => 'limitop', 'hide_department_filter' => true, 'limits_width' => 12))?>' www_dir_flags="<?php echo erLhcoreClassDesign::design('images/flags');?>"></lhc-widget>
2+
<lhc-widget <?php if (isset($customCardNoId)) : ?>no_panel_id="true"<?php endif;?> <?php if (isset($customCardNoCollapse)) : ?>no_collapse="true"<?php endif; ?> column_1_width="15%" <?php if ($currentUser->hasAccessTo('lhstatistic','performance_settings')) : ?>custom_settings_url="statistic/performancesettings/op"<?php endif;?> card_icon="account_box" no_link="true" hide_2_column="true" no_counter="true" hide_third_column="true" <?php if (isset($rightPanelMode)) : ?>right_panel_mode="true"<?php endif; ?> <?php if (isset($hideCardHeader)) : ?>hide_header="true"<?php endif;?> sort_identifier="op_performance_sort" icon_class="chat-active" limit_list_identifier="limitop" type="op_performance" expand_identifier="opp_widget_exp" list_identifier="op-performance" height_identifier="opp_m_h" panel_list_identifier="opp-panel-list" optionsPanel='<?php echo json_encode(array("panelid" => "opp", 'limitid' => 'limitop', 'hide_department_filter' => true, 'limits_width' => 12))?>' www_dir_flags="<?php echo erLhcoreClassDesign::design('images/flags');?>"></lhc-widget>
33
<?php endif; ?>

0 commit comments

Comments
 (0)