SmartIT_Extensions/BAK/menu-custom-field-ntt.html

44 lines
2.2 KiB
HTML

<div class="clearfix">
<label class="label_control-wrap">
<custom-field-label></custom-field-label>
<span class="custom-field__value" ng-if="!$parent.editMode && data.value" tooltip="{{tooltipToShow}}">
{{ data.value }}
</span>
<span class="custom-field-ntt__noValue" ng-if="!$parent.editMode && !data.value" ng-bind-html="('customField.label.noValue' | i18n)"></span>
<div class="ticket__required-field" ng-if="!$parent.editMode && data.isRequired && !data.value">
<i class="icon-exclamation_triangle"></i> {{'ticket.notification.draft.missingField' | i18n:(data.label)}}
</div>
<div ng-if="$parent.editMode" class="relative-position">
<input type="text" class="typeahead-input full-width"
title="{{(data.value) ? data.value : ('customField.queryMenu.placeholder' | i18n:(data.label))}}"
ng-model="data.value"
placeholder="{{'customField.queryMenu.placeholder' | i18n:(data.label)}}"
autocomplete="false"
ng-blur="onInputFocusBlur();"
uib-tooltip="{{'search.category.exceedsChunkSize' | i18n}}"
tooltip-is-open="state.isTooltipOpen"
tooltip-enable="exceedsChunkSize"
tooltip-trigger="'none'"
tooltip-placement="auto"
typeahead="option.displayLabel for option in loadDynamicSelectionValues($viewValue)"
typeahead-editable="false"
typeahead-loading="state.loading"
typeahead-min-length="typeaheadMinLength"
typeahead-on-select="selectItem($item)"
typeahead-wait-ms="500"
ng-required="data.isRequired"
ng-disabled="data.isReadOnly || !isEditable || (data.groupMember && !data.groupEditable)"
ng-if="typeaheadMinLength > -1">
<loading-spinner if="state.loading" inline="true" class="typeahead-loader"></loading-spinner>
<i focus-input-on-clear class="icon-cross typeahead-clear" ng-if="!state.loading && data.value && !(data.isReadOnly || !isEditable || (data.groupMember && !data.groupEditable))" tabindex="0" ng-click="selectItem()" ng-enter="selectItem()"></i>
</div>
<!-- hack to support validation -->
<input ng-if="!$parent.editMode" name="{{data.name}}" type="hidden" ng-required="data.isRequired" ng-model="data.value">
</label>
</div>