Added filtering to property editor picker

This commit is contained in:
Mads Rasmussen
2015-06-16 09:15:20 +02:00
parent a5ca52d3c4
commit 554dff5235

View File

@@ -1,9 +1,20 @@
<div class="umb-overlay-body" ng-controller="Umbraco.Editors.DocumentType.PropertyController">
<div ng-if="dataTypes.userConfigured.length > 0">
<div class="umb-control-group">
<div class="form-search">
<i class="icon-search"></i>
<input type="text"
style="width: 100%"
ng-model="searchTerm"
class="umb-search-field search-query input-block-level"
placeholder="Filter...">
</div>
</div>
<div ng-if="(dataTypes.userConfigured | filter:searchTerm).length > 0">
<h5>Your configurations</h5>
<ul class="umb-card-grid">
<li ng-repeat="configuredDataType in dataTypes.userConfigured | orderBy:'name'">
<li ng-repeat="configuredDataType in dataTypes.userConfigured | orderBy:'name' | filter: searchTerm">
<a href="" ng-click="model.selectDataType(configuredDataType)">
<i class="{{ configuredDataType.icon }}" ng-class="{'icon-autofill': configuredDataType.icon == null}"></i>
{{ configuredDataType.name }}
@@ -12,10 +23,10 @@
</ul>
</div>
<div ng-if="dataTypes.userPropertyEditors.length > 0">
<div ng-if="(dataTypes.userPropertyEditors | filter:searchTerm).length > 0">
<h5>Custom property editors</h5>
<ul class="umb-card-grid">
<li ng-repeat="customEditor in dataTypes.userPropertyEditors | orderBy:'name'">
<li ng-repeat="customEditor in dataTypes.userPropertyEditors | orderBy:'name' | filter: searchTerm">
<a href="" ng-click="model.selectDataType(customEditor)">
<i class="{{ customEditor.icon }}" ng-class="{'icon-autofill': customEditor.icon == null}"></i>
{{ customEditor.name }}
@@ -24,10 +35,10 @@
</ul>
</div>
<div ng-if="dataTypes.system.length > 0">
<div ng-if="(dataTypes.system | filter:searchTerm).length > 0">
<h5>Standard</h5>
<ul class="umb-card-grid">
<li ng-repeat="systemDataType in dataTypes.system | orderBy:'name'">
<li ng-repeat="systemDataType in dataTypes.system | orderBy:'name' | filter: searchTerm">
<a href="" ng-click="model.selectDataType(systemDataType)">
<i class="{{ systemDataType.icon }}" ng-class="{'icon-autofill': systemDataType.icon == null}"></i>
{{ systemDataType.name }}