Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Fixed the height of the add record button when reloading the page
Browse files Browse the repository at this point in the history
  • Loading branch information
areksolek committed Jul 20, 2023
1 parent 54151fb commit cbe8394
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 67 deletions.
6 changes: 2 additions & 4 deletions layouts/basic/modules/RecycleBin/ListViewHeader.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
{assign var=LINKS value=array_merge($LINKS,$LISTVIEW_LINKS['LISTVIEW'])}
{/if}
{include file=\App\Layout::getTemplatePath('ButtonViewLinks.tpl') LINKS=$LINKS TEXT_HOLDER='LBL_ACTIONS' BTN_ICON='fa fa-list' CLASS='listViewMassActions mr-sm-1 mb-1 mb-sm-0 c-btn-block-sm-down'}
{if !empty($LISTVIEW_LINKS)}
{foreach item=LINK from=$LISTVIEW_LINKS['LISTVIEWBASIC']}
{include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE_NAME) BUTTON_VIEW='listView' CLASS='mr-sm-1 mb-1 c-btn-block-sm-down'}
{/foreach}
{if !empty($LISTVIEW_LINKS['LISTVIEWBASIC'])}
{include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $MODULE_NAME) LINKS=$LISTVIEW_LINKS['LISTVIEWBASIC'] BUTTON_VIEW='listView' CLASS='mr-sm-1 mb-1 c-btn-block-sm-down' MODULE=$QUALIFIED_MODULE}
{/if}
</div>
<div class="customFilterMainSpan ml-auto mx-xl-auto">
Expand Down
4 changes: 1 addition & 3 deletions layouts/basic/modules/Settings/AdminAccess/Permissions.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
{strip}
<!-- tpl-Settings-AdminAccess-Permissions -->
<div class="actions mb-2">
{foreach from=$LINKS item=LINK}
{include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $QUALIFIED_MODULE) BUTTON_VIEW='listViewBasic' MODULE_NAME=$QUALIFIED_MODULE}
{/foreach}
{include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $QUALIFIED_MODULE) LINKS=$LINKS BUTTON_VIEW='listViewBasic' BREAKPOINT='md' CLASS='c-btn-link--responsive' MODULE=$QUALIFIED_MODULE}
</div>
<form class="js-filter-form" data-js="container">
<table id="dataTableExamplePermissions" class="table table-sm table-striped display text-center mt-2 js-data-table" data-url="index.php?module=AdminAccess&parent=Settings&action=GetData&mode=access">
Expand Down
107 changes: 52 additions & 55 deletions layouts/basic/modules/Settings/Currency/ListViewContents.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,83 +11,80 @@
-->*}
{strip}
<!-- tpl-Settings-Currency-ListViewContents -->
<input type="hidden" id="pageStartRange" value="{$PAGING_MODEL->getRecordStartRange()}"/>
<input type="hidden" id="pageEndRange" value="{$PAGING_MODEL->getRecordEndRange()}"/>
<input type="hidden" id="previousPageExist" value="{$PAGING_MODEL->isPrevPageExists()}"/>
<input type="hidden" id="nextPageExist" value="{$PAGING_MODEL->isNextPageExists()}"/>
<input type="hidden" id="totalCount" value="{$LISTVIEW_COUNT}"/>
<input type="hidden" value="{$ORDER_BY}" id="orderBy"/>
<input type="hidden" value="{$SORT_ORDER}" id="sortOrder"/>
<input type="hidden" id="totalCount" value="{$LISTVIEW_COUNT}"/>
<input type="hidden" id="pageStartRange" value="{$PAGING_MODEL->getRecordStartRange()}" />
<input type="hidden" id="pageEndRange" value="{$PAGING_MODEL->getRecordEndRange()}" />
<input type="hidden" id="previousPageExist" value="{$PAGING_MODEL->isPrevPageExists()}" />
<input type="hidden" id="nextPageExist" value="{$PAGING_MODEL->isNextPageExists()}" />
<input type="hidden" id="totalCount" value="{$LISTVIEW_COUNT}" />
<input type="hidden" value="{$ORDER_BY}" id="orderBy" />
<input type="hidden" value="{$SORT_ORDER}" id="sortOrder" />
<input type="hidden" id="totalCount" value="{$LISTVIEW_COUNT}" />
<input type='hidden' value="{$PAGE_NUMBER}" id='pageNumber'>
<input type='hidden' value="{$PAGING_MODEL->getPageLimit()}" id='pageLimit'>
<input type="hidden" value="{$LISTVIEW_ENTRIES_COUNT}" id="noOfEntries">
<div class="listViewEntriesDiv u-overflow-scroll-non-desktop" style='overflow-x:auto;'>
<span class="listViewLoadingImageBlock d-none modal" id="loadingListViewModal">
<img class="listViewLoadingImage" src="{\App\Layout::getImagePath('loading.gif')}" alt="no-image"
title="{\App\Language::translate('LBL_LOADING')}"/>
title="{\App\Language::translate('LBL_LOADING')}" />
<p class="listViewLoadingMsg">{\App\Language::translate('LBL_LOADING_LISTVIEW_CONTENTS')}........</p>
</span>
{assign var="NAME_FIELDS" value=$MODULE_MODEL->getNameFields()}
{assign var=WIDTH value={99/(count($LISTVIEW_HEADERS))}}
<table class="table tableRWD table-bordered table-sm listViewEntriesTable">
{include file=\App\Layout::getTemplatePath('ListView/TableHeader.tpl', $QUALIFIED_MODULE) EMPTY_COLUMN=1}
<tbody>
{foreach item=LISTVIEW_ENTRY from=$LISTVIEW_ENTRIES}
<tr class="listViewEntries" data-id="{$LISTVIEW_ENTRY->getId()}"
{if method_exists($LISTVIEW_ENTRY,'getDetailViewUrl')}data-recordurl="{$LISTVIEW_ENTRY->getDetailViewUrl()}"{/if}
>
<td width="1%" nowrap class="{$WIDTHTYPE}">
{if !empty($MODULE) && $MODULE eq 'CronTasks'}
<img src="{\App\Layout::getImagePath('drag.png')}" class="alignTop"
title="{\App\Language::translate('LBL_DRAG',$QUALIFIED_MODULE)}"/>
{/if}
</td>
{foreach item=LISTVIEW_HEADER from=$LISTVIEW_HEADERS}
{assign var=LISTVIEW_HEADERNAME value=$LISTVIEW_HEADER->get('name')}
{assign var=LAST_COLUMN value=$LISTVIEW_HEADER@last}
<td class="listViewEntryValue {$WIDTHTYPE}" width="{$WIDTH}%" nowrap>
{if $LISTVIEW_HEADERNAME eq 'currency_status' }
{if {$LISTVIEW_ENTRY->getDisplayValue($LISTVIEW_HEADERNAME)} eq 'Active' }
&nbsp;{\App\Language::translate('LBL_ACTIVE',$QUALIFIED_MODULE)}
{else}
&nbsp;{\App\Language::translate('LBL_INACTIVE',$QUALIFIED_MODULE)}
{foreach item=LISTVIEW_ENTRY from=$LISTVIEW_ENTRIES}
<tr class="listViewEntries" data-id="{$LISTVIEW_ENTRY->getId()}"
{if method_exists($LISTVIEW_ENTRY,'getDetailViewUrl')}data-recordurl="{$LISTVIEW_ENTRY->getDetailViewUrl()}" {/if}>
<td width="1%" nowrap class="{$WIDTHTYPE}">
{if !empty($MODULE) && $MODULE eq 'CronTasks'}
<img src="{\App\Layout::getImagePath('drag.png')}" class="alignTop"
title="{\App\Language::translate('LBL_DRAG',$QUALIFIED_MODULE)}" />
{/if}
{elseif $LISTVIEW_HEADERNAME eq 'currency_name'}
{\App\Language::translate($LISTVIEW_ENTRY->getDisplayValue('currency_code'), 'Other.Currency')}
{else}
&nbsp;{$LISTVIEW_ENTRY->getDisplayValue($LISTVIEW_HEADERNAME)}
{/if}
{if $LAST_COLUMN}
</td>
<td nowrap class="{$WIDTHTYPE}">
{assign var=LINKS value=$LISTVIEW_ENTRY->getRecordLinks()}
{if count($LINKS) > 0}
<div class="actions">
<div class="float-right">
{foreach from=$LINKS item=LINK}
{include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $QUALIFIED_MODULE) BUTTON_VIEW='listViewBasic' MODULE=$QUALIFIED_MODULE}
{/foreach}
</div>
</div>
</td>
{foreach item=LISTVIEW_HEADER from=$LISTVIEW_HEADERS}
{assign var=LISTVIEW_HEADERNAME value=$LISTVIEW_HEADER->get('name')}
{assign var=LAST_COLUMN value=$LISTVIEW_HEADER@last}
<td class="listViewEntryValue {$WIDTHTYPE}" width="{$WIDTH}%" nowrap>
{if $LISTVIEW_HEADERNAME eq 'currency_status' }
{if {$LISTVIEW_ENTRY->getDisplayValue($LISTVIEW_HEADERNAME)} eq 'Active' }
&nbsp;{\App\Language::translate('LBL_ACTIVE',$QUALIFIED_MODULE)}
{else}
&nbsp;{\App\Language::translate('LBL_INACTIVE',$QUALIFIED_MODULE)}
{/if}
{elseif $LISTVIEW_HEADERNAME eq 'currency_name'}
{\App\Language::translate($LISTVIEW_ENTRY->getDisplayValue('currency_code'), 'Other.Currency')}
{else}
&nbsp;{$LISTVIEW_ENTRY->getDisplayValue($LISTVIEW_HEADERNAME)}
{/if}
{if $LAST_COLUMN}
</td>
<td nowrap class="{$WIDTHTYPE}">
{assign var=LINKS value=$LISTVIEW_ENTRY->getRecordLinks()}
{if count($LINKS) > 0}
<div class="actions">
<div class="float-right">
{include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $QUALIFIED_MODULE) LINKS=$LINKS BUTTON_VIEW='listViewBasic' MODULE=$QUALIFIED_MODULE}
</div>
</div>
{/if}
</td>
{/if}
</td>
{/if}
</td>
{/foreach}
</tr>
{/foreach}
{/foreach}
</tr>
{/foreach}
</tbody>
</table>
<!--added this div for Temporarily -->
{if $LISTVIEW_ENTRIES_COUNT eq '0'}
<table class="emptyRecordsDiv">
<tbody>
<tr>
<td>
{\App\Language::translate('LBL_EQ_ZERO')} {\App\Language::translate(MODULE, $QUALIFIED_MODULE)} {\App\Language::translate('LBL_FOUND')}
</td>
</tr>
<tr>
<td>
{\App\Language::translate('LBL_EQ_ZERO')} {\App\Language::translate(MODULE, $QUALIFIED_MODULE)} {\App\Language::translate('LBL_FOUND')}
</td>
</tr>
</tbody>
</table>
{/if}
Expand Down
8 changes: 4 additions & 4 deletions layouts/basic/modules/Settings/Groups/ListTable.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<!-- tpl-Settings-Groups-ListTable -->
<div class="o-breadcrumb widget_header row mb-2">
<div class="col-md-12">
{include file=\App\Layout::getTemplatePath('BreadCrumbs.tpl', $MODULE_NAME)}
{include file=\App\Layout::getTemplatePath('BreadCrumbs.tpl', $QUALIFIED_MODULE)}
</div>
</div>
<div class="actions mb-2">
{foreach from=$LINKS item=LINK}
{include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $QUALIFIED_MODULE) BUTTON_VIEW='listViewBasic' MODULE_NAME=$QUALIFIED_MODULE}
{/foreach}
{if !empty($LINKS)}
{include file=\App\Layout::getTemplatePath('ButtonLinks.tpl', $QUALIFIED_MODULE) LINKS=$LINKS BUTTON_VIEW='listViewBasic' MODULE=$QUALIFIED_MODULE}
{/if}
</div>
<form class="js-filter-form" data-js="container">
<table id="dataTableGroups" class="table table-sm table-striped display nowrap text-center mt-2 js-data-table u-cursor-pointer" data-url="index.php?module=Groups&parent=Settings&view=GetData">
Expand Down
1 change: 1 addition & 0 deletions layouts/basic/modules/Settings/Vtiger/EditViewActions.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<span class="fas fa-times mr-1"></span>
<strong>{\App\Language::translate('LBL_CANCEL', $MODULE)}</strong>
</button>
ffff
{if isset($EDITVIEW_LINKS['EDIT_VIEW_HEADER'])}
{foreach item=LINK from=$EDITVIEW_LINKS['EDIT_VIEW_HEADER']}
{include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE) BUTTON_VIEW='editViewHeader'}
Expand Down
5 changes: 4 additions & 1 deletion layouts/basic/modules/Vtiger/ButtonLinks.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
{if !isset($BUTTON_VIEW)}
{assign var=BUTTON_VIEW value=''}
{/if}
{if !isset($BREAKPOINT)}
{assign var=BREAKPOINT value=''}
{/if}
{assign var=COUNT_LINKS value=count($LINKS)}
<div class="c-btn-link {if ($COUNT_LINKS > 1 && $USER_MODEL->get('rowheight') eq 'narrow') && !isset($SKIP_GROUP)}btn-group-sm{elseif $COUNT_LINKS > 1 && !isset($SKIP_GROUP)}btn-group{/if} {$CLASS}">
{foreach item=LINK from=$LINKS}
{include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE) BUTTON_VIEW=$BUTTON_VIEW}
{include file=\App\Layout::getTemplatePath('ButtonLink.tpl', $MODULE) BUTTON_VIEW=$BUTTON_VIEW MODULE_NAME=$MODULE BREAKPOINT=$BREAKPOINT}
{/foreach}
</div>
<!-- /tpl-Base-ButtonLinks -->
Expand Down

0 comments on commit cbe8394

Please sign in to comment.