diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js index 5adf121a56..67ec951512 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js @@ -9,6 +9,7 @@ angular.module("umbraco") $element, eventsService, editorService, + overlayService, $interpolate ) { @@ -320,21 +321,22 @@ angular.module("umbraco") var title = ""; localizationService.localize("grid_insertControl").then(function (value) { title = value; - $scope.editorOverlay = { - view: "itempicker", + overlayService.open({ + view: "itempicker", filter: area.$allowedEditors.length > 15, title: title, availableItems: area.$allowedEditors, event: event, - show: true, - submit: function (model) { + submit: function(model) { if (model.selectedItem) { $scope.addControl(model.selectedItem, area, index); - $scope.editorOverlay.show = false; - $scope.editorOverlay = null; + overlayService.close(); } + }, + close: function() { + overlayService.close(); } - }; + }); }); }; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html index bde2b9148e..7fdefb4d78 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.html @@ -299,11 +299,4 @@ - - -