use infinite macro picker in RTE

This commit is contained in:
Mads Rasmussen
2018-08-21 11:29:04 +02:00
parent 1c0d09a1cb
commit 3c8b43cc3b
2 changed files with 7 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
angular.module("umbraco")
.controller("Umbraco.PropertyEditors.RTEController",
function ($rootScope, $scope, $q, $locale, dialogService, $log, imageHelper, assetsService, $timeout, tinyMceService, angularHelper, stylesheetResource, macroService, editorState) {
function ($scope, $q, $locale, assetsService, $timeout, tinyMceService, angularHelper, stylesheetResource, macroService, editorState, editorService) {
$scope.isLoading = true;
@@ -327,19 +327,18 @@ angular.module("umbraco")
//Create the insert macro plugin
tinyMceService.createInsertMacro(editor, $scope, function(dialogData) {
$scope.macroPickerOverlay = {
view: "macropicker",
var macroPicker = {
dialogData: dialogData,
show: true,
submit: function(model) {
var macroObject = macroService.collectValueData(model.selectedMacro, model.macroParams, dialogData.renderingEngine);
tinyMceService.insertMacroInEditor(editor, macroObject, $scope);
$scope.macroPickerOverlay.show = false;
$scope.macroPickerOverlay = null;
editorService.close();
},
close: function() {
editorService.close();
}
};
editorService.macroPicker(macroPicker);
});
};

View File

@@ -25,11 +25,4 @@
view="embedOverlay.view">
</umb-overlay>
<umb-overlay
ng-if="macroPickerOverlay.show"
model="macroPickerOverlay"
view="macroPickerOverlay.view"
position="right">
</umb-overlay>
</div>