This commit is contained in:
Loretta 2024-08-20 15:20:25 +02:00
parent f9feff0bf5
commit 04f44fab68
1 changed files with 9 additions and 7 deletions

View File

@ -34,7 +34,7 @@
CustomizeElement="CustomizeElement" CustomizeElement="CustomizeElement"
ShowFilterRow="ShowFilterRow"> ShowFilterRow="ShowFilterRow">
<Columns> <Columns>
<DxGridCommandColumn Width="135" MinWidth="135" Visible="AcDomain.IsDeveloperVersion" DeleteButtonVisible="AcDomain.IsDeveloperVersion" EditButtonVisible="AcDomain.IsDeveloperVersion" FixedPosition="GridColumnFixedPosition.Left"/> <DxGridCommandColumn Width="135" MinWidth="135" Visible="AcDomain.IsDeveloperVersion" DeleteButtonVisible="AcDomain.IsDeveloperVersion" EditButtonVisible="AcDomain.IsDeveloperVersion" FixedPosition="GridColumnFixedPosition.Left" />
<DxGridDataColumn FieldName="SenderId" Caption=" " Width="30px" ShowInColumnChooser="AcDomain.IsDeveloperVersion" DisplayFormat="N" AllowSort="false"> <DxGridDataColumn FieldName="SenderId" Caption=" " Width="30px" ShowInColumnChooser="AcDomain.IsDeveloperVersion" DisplayFormat="N" AllowSort="false">
<CellDisplayTemplate> <CellDisplayTemplate>
@{ @{
@ -83,8 +83,8 @@
} }
</CellDisplayTemplate> </CellDisplayTemplate>
</DxGridDataColumn> </DxGridDataColumn>
<DxGridDataColumn FieldName="Id" Width="150" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N"/> <DxGridDataColumn FieldName="Id" Width="150" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
<DxGridDataColumn FieldName="ContextId" Width="150px" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N"/> <DxGridDataColumn FieldName="ContextId" Width="150px" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
<DxGridDataColumn FieldName="Created" Caption="Received" DisplayFormat="g" Width="@(IsMessageTextVisible ? 140.ToString() : 85.ToString())" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center"> <DxGridDataColumn FieldName="Created" Caption="Received" DisplayFormat="g" Width="@(IsMessageTextVisible ? 140.ToString() : 85.ToString())" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center">
<CellDisplayTemplate> <CellDisplayTemplate>
@{ @{
@ -103,17 +103,19 @@
</CellDisplayTemplate> </CellDisplayTemplate>
</DxGridDataColumn> </DxGridDataColumn>
<DxGridDataColumn FieldName="EmailAddress" Caption="Sender" Width="200px" Visible="IsSenderEmailVisible || AcDomain.IsDeveloperVersion"/> <DxGridDataColumn FieldName="EmailAddress" Caption="Sender" Width="200px" Visible="IsSenderEmailVisible || AcDomain.IsDeveloperVersion" />
<DxGridDataColumn FieldName="Subject"> <DxGridDataColumn FieldName="Subject">
<CellDisplayTemplate> <CellDisplayTemplate>
@{ @{
var subjectString = ((EmailMessage)context.DataItem).Subject; var subjectString = ((EmailMessage)context.DataItem).Subject;
<p style="word-break: normal; white-space: normal; padding: 0; margin: 0 auto;">@subjectString</p> <p style="word-break: normal; white-space: normal; padding: 0; margin: 0 auto;">@subjectString</p>
if (!IsMessageTextVisible) if (!IsMessageTextVisible)
{ {
var textString = System.Text.RegularExpressions.Regex.Replace(((EmailMessage)context.DataItem).Text!, "<(.|\n)*?>", string.Empty); var textString = System.Text.RegularExpressions.Regex.Replace(((EmailMessage)context.DataItem).Text!, "<(.|\n)*?>", string.Empty);
<div style="padding-top: 3px; color: darkgray">@textString</div> if (textString.Length > 80) textString = textString[..80] + "...";
<div style="color: darkgray; word-break: normal; white-space: normal; padding: 3px 5px 0 0; margin: 0 auto;">@textString</div>
} }
} }
</CellDisplayTemplate> </CellDisplayTemplate>
@ -123,7 +125,7 @@
<text>@System.Text.RegularExpressions.Regex.Replace((displayTextContext.Value as string)!, "<(.|\n)*?>", string.Empty)</text> <text>@System.Text.RegularExpressions.Regex.Replace((displayTextContext.Value as string)!, "<(.|\n)*?>", string.Empty)</text>
</CellDisplayTemplate> </CellDisplayTemplate>
</DxGridDataColumn> </DxGridDataColumn>
<DxGridDataColumn FieldName="IsReaded" Caption="Readed" Visible="@IsMessageTextVisible" Width="70" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center"/> <DxGridDataColumn FieldName="IsReaded" Caption="Readed" Visible="@IsMessageTextVisible" Width="70" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
</Columns> </Columns>
<DetailRowTemplate> <DetailRowTemplate>