SmartIT_Extensions/BMC/smart-it-full/views/custom-widgets/poi-location.html

75 lines
4.3 KiB
HTML

<div class="ticket-location edit-poi_container">
<div ng-show="$parent.editMode">
<label class="label_control-wrap">
<div class="edit-poi_item col-sm-6">
<span loading-spinner if="state.dataIsLoading" overlay="true" inline="true"></span>
<span id="locationLabel" class="label__text">
{{ 'create.workorder.location' | i18n}}
</span>
<div class="create-ticket__service-item">
<input type="text"
title="{{ 'create.workorder.location.placeholder' | i18n }}"
aria-labelledby="locationLabel"
class="form-control"
name="location"
ng-model="viewData.location"
ng-required="data.isRequired"
ng-disabled="data.isReadOnly || !isEditable"
role="combobox"
typeahead-wait-ms="550"
typeahead-loading="state.loadingLocations"
typeahead-min-length="3"
typeahead-ignore-blur="true"
typeahead-on-select="handleLocationChange()"
typeahead="location as (location.name +' @ '+ location.address) for location in filterLocationsByCriteria($viewValue)"
placeholder="{{ 'create.workorder.location.placeholder' | i18n }}">
<span loading-spinner class="create-ticket__loading-spinner_poi-input" if="state.loadingLocations" overlay="true" inline="true"></span>
<i class="icon-cross item-input__delete-btn" tabindex=0 role="link"
title="{{'common.button.clear' | i18n}} {{ 'personInfoCard.task.caption.primaryOffice' | i18n }}" ng-if="viewData.location && !state.loadingLocations"
focus-input-on-clear ng-click="clearField(true)" ng-enter="clearField(true)">
</i>
</div>
</div>
</label>
<div class="edit-poi_item col-sm-6 pull-right" >
<label class="label_control-wrap">
<span class="label__text">
&nbsp;
</span>
<div class="create-ticket__service-item">
<input type="text"
title="{{ 'create.workorder.location.poi.placeholder' | i18n }}"
aria-labelledby="locationLabel"
class="form-control"
name="poi"
ng-model="viewData.poi"
ng-required="data.isRequired"
ng-disabled="data.isReadOnly || !isEditable"
role="combobox"
typeahead-wait-ms="550"
typeahead-loading="state.loadingPOI"
typeahead-min-length="3"
typeahead-ignore-blur="true"
typeahead-on-select="handlePOIChange()"
typeahead="poi as (poi.type.name + ': ' + poi.name + ' @ ' + poi.floormap.name) for poi in filterPOIbyCriteria($viewValue)"
placeholder="{{ 'create.workorder.location.poi.placeholder' | i18n }}">
<span loading-spinner class="create-ticket__loading-spinner_poi-input" if="state.loadingPOI" overlay="true" inline="true"></span>
<i class="icon-cross item-input__delete-btn" tabindex=0 role="link"
title="{{'common.button.clear' | i18n}} {{ 'personInfoCard.task.caption.primaryOffice' | i18n }}" ng-if="viewData.poi && !state.loadingPOI"
focus-input-on-clear ng-click="clearField()" ng-enter="clearField()">
</i>
</div>
</label>
</div>
</div>
<label class="label_control-wrap" ng-show="!$parent.editMode">
<span class="label__text">
{{ 'create.workorder.location' | i18n}}
</span>
<div>
<span class="ticket__field-value" ng-click="showPOIMap(data.value)">
<i class="icon-mapmarker"></i> {{data.value.poiName || (viewData.poi && viewData.poi.name) || ('common.label.none' | i18n) }}
</span>
</div>
</label>
</div>