Merge pull request #2606 from jamescoxhead/U4-11295
U4-11295 Added filtering to Nested Content add doctype overlay
This commit is contained in:
@@ -106,7 +106,8 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
|
||||
|
||||
$scope.overlayMenu = {
|
||||
show: false,
|
||||
style: {}
|
||||
style: {},
|
||||
showFilter: false
|
||||
};
|
||||
|
||||
// helper to force the current form into the dirty state
|
||||
@@ -344,6 +345,8 @@ angular.module("umbraco").controller("Umbraco.PropertyEditors.NestedContent.Prop
|
||||
$scope.currentNode = $scope.nodes[0];
|
||||
}
|
||||
|
||||
$scope.overlayMenu.showFilter = $scope.scaffolds.length > 15;
|
||||
|
||||
inited = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +47,20 @@
|
||||
<h5>
|
||||
<localize key="grid_insertControl" />
|
||||
</h5>
|
||||
|
||||
<div class="form-search" ng-hide="overlayMenu.showFilter === false" style="margin-bottom: 15px;">
|
||||
<i class="icon-search"></i>
|
||||
<input type="text"
|
||||
ng-model="searchTerm"
|
||||
class="umb-search-field search-query input-block-level -full-width-input"
|
||||
localize="placeholder"
|
||||
placeholder="@placeholders_filter"
|
||||
umb-auto-focus
|
||||
no-dirty-check />
|
||||
</div>
|
||||
|
||||
<ul class="elements">
|
||||
<li ng-repeat="scaffold in overlayMenu.scaffolds">
|
||||
<li ng-repeat="scaffold in overlayMenu.scaffolds | filter:searchTerm">
|
||||
<a ng-click="addNode(scaffold.alias)" href>
|
||||
<i class="icon {{scaffold.icon}}"></i>
|
||||
{{scaffold.name}}
|
||||
|
||||
Reference in New Issue
Block a user