157 lines
8.8 KiB
HTML
157 lines
8.8 KiB
HTML
<div ux-id="email-blade" class="email-window modal-content" role="dialog" aria-labelledby="modalLabel" ng-class="{'email-popup': isPopupWindow}">
|
|
<span class="modal-content__508-hidden-span">{{'common.labels.508BeginContent' | i18n}}</span>
|
|
<div class="email-window__wrapper">
|
|
<div class="chat-window__loading-state-spinner" loading-spinner if="sendingEmail" centered="true" overlay="true" ></div>
|
|
<div class="email__header drag-handle">
|
|
<h2 ux-id="blade-title" id="modalLabel">{{'email.header.label' | i18n}}</h2>
|
|
<div class="email__controls">
|
|
<span ng-repeat="control in emailControls" ng-if="!control.inactive">
|
|
<a ux-id="{{control.name}}" class="email__controls_item {{control.iconClass}}"
|
|
ng-click="handleEmailControlsClick($event, control)" ng-enter="handleEmailControlsClick($event, control)"
|
|
title="{{'email.icon.' + control.name | i18n}}"
|
|
aria-label="{{'email.icon.' + control.name | i18n}}" tabindex=0 role="link" ></a>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div ux-id="email-connections" class="email__connections">
|
|
<span ux-id="label">{{'email.connection.label' | i18n}}:</span>
|
|
<span ux-id="ticket-info">{{emailContext.headerText}}</span>
|
|
<!-- cc and bcc will not be supported since there is no backend support yet
|
|
<span class="email__recipient-controls" ng-hide="showCC && showBCC">
|
|
<span>{{'email.add.label' | i18n}}: </span>
|
|
<span>
|
|
<a ng-click="showCC = true" ng-hide="showCC" aria-label="{{'email.cc.label' | i18n}}" tabindex=0 href="javascript:void(0)" role="link">{{'email.cc.label' | i18n}}</a>
|
|
</span>
|
|
<span>
|
|
<a ng-click="showBCC = true" ng-hide="showBCC" aria-label="{{'email.bcc.label' | i18n}}" tabindex=0 href="javascript:void(0)" role="link">{{'email.bcc.label' | i18n}}</a>
|
|
</span>
|
|
</span>
|
|
-->
|
|
</div>
|
|
|
|
<email-recipient label="{{'email.to.label' | i18n}}" recipient-list="emailContext.senderList" input-text="emailContext.recipientInputText" ticket-data="emailInstance.ticketData"> </email-recipient>
|
|
<!--
|
|
<email-recipient label="{{'email.cc.label' | i18n}}" recipient-list="emailContext.ccList" ng-if="showCC"></email-recipient>
|
|
|
|
<email-recipient label="{{'email.bcc.label' | i18n}}" recipient-list="emailContext.bccList" ng-if="showBCC"></email-recipient>
|
|
-->
|
|
<div class="email__subject">
|
|
<div ux-id="subject-label" class="email__subject-title">{{'email.subject.label' | i18n}}:</div>
|
|
<div ux-id="subject-textbox" class="email__subject-text">
|
|
<input type="text" ng-model="emailContext.subjectText" ng-change="checkByteLength(255)">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="email__body">
|
|
<div ng-if="!showArticles">
|
|
<textarea ux-id="email-body-textbox" class="email__message-editor"
|
|
ng-model="emailContext.messageBody"
|
|
ng-keydown="handleEmailBodyKeyDown($event)"
|
|
ng-keyup="handleEmailBodyChange($event)"
|
|
ng-click="handleEmailBodyClick($event)"
|
|
ng-paste="handleTextPaste($event)"
|
|
placeholder="{{'email.messageEditor.placeholder' | i18n}}">
|
|
</textarea>
|
|
|
|
<email-accelerators ng-if="accelerators.showAcceleratorsList" topposition="{{popupTopPosition}}" leftposition="{{popupLeftPosition}}" class="email-accelerators__popup">
|
|
</email-accelerators>
|
|
</div>
|
|
<div ng-if="showArticles" class="email__rs-group-list">
|
|
<div class="chat-window__loading-state-spinner" loading-spinner if="articlesLoading" centered="true" overlay="true" ></div>
|
|
<div ng-if="!articlesLoading">
|
|
<div class="rs-group-list-item clearfix" role="listitem" tabindex="0" ng-repeat="resource in pinnedKBA" ng-click="selectResource($event, resource)" ng-enter="selectResource($event, resource)">
|
|
<div class="rs-group-list-item__icon-container">
|
|
<i class="rs-group-list-item__icon_action {{isResourceSelected(resource) ? 'icon-check_circle' : 'icon-circle_thin_o'}}"
|
|
ng-click="selectResource($event, resource)" ng-enter="selectResource($event, resource)"
|
|
aria-label="{{(isResourceSelected(resource) ? 'common.button.unselect' : 'common.button.select') | i18n}} {{'common.label.resource' | i18n}}" role="button" tabindex="0">
|
|
</i>
|
|
<i class="rs-group-list-item__icon" ng-class="'icon-' + resource.type"></i>
|
|
</div>
|
|
<div class="rs-group-list-item__info" tabindex="0">
|
|
<div class="rs-group-list-item__title">{{resource.displayId}}</div>
|
|
<div class="rs-group-list-item__description">{{ (resource.title || resource.desc) | removeSearchTags}}</div>
|
|
<div class="rs-group-list-item__date">
|
|
{{'common.labels.updated' | i18n}}: {{(resource.getLastModifyDate() | date: mediumDate) || ('common.labels.unknown' | i18n)}}
|
|
</div>
|
|
<div class="rs-group-list-item__rating" ng-if="resource.getRating() >= 0">
|
|
<i class="icon-thumbs_up"></i>
|
|
<span class="rs-group-list-item__ka-property_likes">{{resource.getRating()}}%</span>
|
|
<span ng-if="resource.getNumberOfViews() !== -1">
|
|
<i class="icon-eye"></i>
|
|
<span class="rs-group-list-item__ka-property_views">{{resource.getNumberOfViews() | labelByCount: 'resourceSlice.viewCount.label'}}</span>
|
|
</span>
|
|
<div class="rs-group-list-item__ka-property" ng-if="resource.getNumberOfLinkedItems() !== -1">
|
|
<i class="icon-link"></i>
|
|
<span class="rs-group-list-item__ka-property_links">{{resource.getNumberOfLinkedItems()}} {{'resourceSlice.linkedItems.label' | i18n}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="email__footer" ng-if="!showArticles">
|
|
<button ux-id="email-send-btn" id="emailBtn"type="button"
|
|
class="btn_primary email__footer-button"
|
|
ng-disabled="!emailContext.senderList.length || !emailContext.messageBody || !emailContext.subjectText"
|
|
ng-click="sendEmail()" aria-label="{{ 'email.button.send' | i18n }}" title="{{ 'email.button.send' | i18n }}">
|
|
{{ 'email.button.send' | i18n }}
|
|
</button>
|
|
|
|
<label ng-if="!showPopOver && !emailContext.attachment" class="email__attachment-btn">
|
|
<input type="file"
|
|
ie-activate-by-enter
|
|
onchange="angular.element(this).scope().addEmailAttachment(this)"
|
|
class="attach-tool__file-input"
|
|
title="{{'common.labels.attach' | i18n}}"
|
|
aria-label="{{'common.labels.attach' | i18n}}"
|
|
tabindex=0
|
|
role="link"/>
|
|
<i class="icon-paperclip email__attachment-icon"></i>
|
|
</label>
|
|
|
|
<button ux-id="email-attachment-btn" class="btn_no-fill"
|
|
ng-if="showPopOver && !(emailContext.attachment || emailContext.kba)"
|
|
class="attach-action"
|
|
popover-trigger="click"
|
|
popover-template="'components/email/email-action-popover.html'"
|
|
popover-placement="top"
|
|
><i class="icon-paperclip"></i></button>
|
|
|
|
<span ux-id="attached-file" class="email__attachment" ng-if="emailContext.attachment">
|
|
<i ux-id="attached-file-icon" class="icon-paperclip email__attachment-icon-small"></i>
|
|
{{emailContext.attachment.name}}
|
|
<i ux-id="remove-attached-file" tabindex=0 title="{{common.button.delete | i18n}} {{emailContext.attachment.name}}" class="email__attachment_dismiss icon-cross" role = "link" ng-click="removeEmailAttachment()" ng-enter="removeEmailAttachment()" ></i>
|
|
</span>
|
|
|
|
<span ux-id="attached-ka" class="email__attachment" ng-if="emailContext.kba">
|
|
<i ux-id="attached-ka-icon" ng-class="'icon-' + emailContext.kba.type" class="email__attachment-icon-small"></i>
|
|
{{emailContext.kba.displayId}}: {{ (emailContext.kba.title || emailContext.kba.desc) | removeSearchTags}}
|
|
<i ux-id="remove-attached-ka" tabindex=0 class="email__attachment_dismiss icon-cross" role = "link" ng-click="removeKBAttachment()" ng-enter="removeKBAttachment()"></i>
|
|
</span>
|
|
|
|
<span ux-id="email-helper-text" class="email__footer-help">
|
|
<i class="icon-question_circle"></i>
|
|
<a ng-if="!emailContext.ticketList" ng-click="acceleratorsHelp()" ng-enter="acceleratorsHelp()" aria-label="{{'email.footerHelp.label' | i18n}}" tabindex=0 role="link">{{'email.footerHelp.label' | i18n}}</a>
|
|
<a ng-if="emailContext.ticketList" aria-label="{{'email.footerAcceleratorsNotAvailable.label' | i18n}}" tabindex=0 role="link">{{'email.footerAcceleratorsNotAvailable.label' | i18n}}</a>
|
|
</span>
|
|
|
|
</div>
|
|
<div class="email__footer" ng-if="showArticles">
|
|
<button type="button"
|
|
class="btn_secondary email__footer-button"
|
|
ng-click="showEmailBody()">
|
|
{{ 'resource.search.back.button' | i18n }}
|
|
</button>
|
|
<button type="button"
|
|
class="btn_primary email__footer-button"
|
|
ng-disabled="!emailContext.kba"
|
|
ng-click="attachKBA()">
|
|
{{ 'common.button.attach' | i18n }}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<span class="modal-content__508-hidden-span">{{'common.labels.508EndContent' | i18n}}</span>
|
|
</div>
|