Fix type handling when adding search result to map

pull/108/head
Candid Dauth 2017-05-12 01:30:20 +02:00
rodzic 35901e3b42
commit f2f69e0d37
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -14,14 +14,14 @@
</dl> </dl>
</div> </div>
<div class="buttons"> <div class="buttons">
{{filteredTypes = (result.isMarker && result.isLine ? client.types : (client.types | fmObjectFilter:{type:isMarker ? 'marker' : 'line'})); ""}} {{filteredTypes = (result.isMarker && result.isLine ? client.types : (client.types | fmObjectFilter:{type:result.isMarker ? 'marker' : 'line'})); ""}}
<div uib-dropdown keyboard-nav="true" ng-if="!readonly && (filteredTypes | fmPropertyCount) > 1"> <div uib-dropdown keyboard-nav="true" ng-if="!readonly && (filteredTypes | fmPropertyCount) > 1">
<button id="add-type-button" type="button" class="btn btn-default" uib-dropdown-toggle>Add to map <span class="caret"></span></button> <button id="add-type-button" type="button" class="btn btn-default" uib-dropdown-toggle>Add to map <span class="caret"></span></button>
<ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="add-type-button"> <ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="add-type-button">
<li role="menuitem" ng-repeat="type in filteredTypes"><a href="javascript:" ng-click="addToMap(type)">{{type.name}}</a></li> <li role="menuitem" ng-repeat="type in filteredTypes"><a href="javascript:" ng-click="addToMap(type)">{{type.name}}</a></li>
</ul> </ul>
</div> </div>
<button type="button" ng-if="!readonly && (filteredTypes | fmPropertyCount) == 1" class="btn btn-default" ng-click="addToMap(filteredTypes[0])">Add to map</button> <button type="button" ng-if="!readonly && (filteredTypes | fmPropertyCount) == 1" ng-repeat="type in filteredTypes" class="btn btn-default" ng-click="addToMap(type)">Add to map</button>
<div uib-dropdown keyboard-nav="true"> <div uib-dropdown keyboard-nav="true">
<button type="button" class="btn btn-default" uib-dropdown-toggle>Use as <span class="caret"></span></button> <button type="button" class="btn btn-default" uib-dropdown-toggle>Use as <span class="caret"></span></button>
<ul class="dropdown-menu" uib-dropdown-menu role="menu"> <ul class="dropdown-menu" uib-dropdown-menu role="menu">