How to reuse an Umbraco Property Editor from dialogService
Hi,
I'm looking to try and reuse some of the Umbraco property editors within a custom property editor, ideally being presented within the right hand dialog. I assumed I would have to use the dialogService. Specifically, the propertyDialog method. Unfortunately, I've not had much luck. Would anyone know how to accomplish this?
The below is an example of my property editor controller which wants to display the Umbraco.DataTime editor within the right hand side dialog:
$scope.addDate = function () {
dialogService.propertyDialog({
editor: "Umbraco.DateTime",
value: null,
callback: function (value) {}
});
};
Turns out I should have spent a little more time looking at Umbraco's source. Its relatively simple. I created a custom dialog and dialog controller which renders out an emb-editor element. Passing the correct object and config worked a treat. Here is my dialog view:
How to reuse an Umbraco Property Editor from dialogService
Hi,
I'm looking to try and reuse some of the Umbraco property editors within a custom property editor, ideally being presented within the right hand dialog. I assumed I would have to use the dialogService. Specifically, the propertyDialog method. Unfortunately, I've not had much luck. Would anyone know how to accomplish this?
The below is an example of my property editor controller which wants to display the Umbraco.DataTime editor within the right hand side dialog:
Thanks, Dan.
Turns out I should have spent a little more time looking at Umbraco's source. Its relatively simple. I created a custom dialog and dialog controller which renders out an emb-editor element. Passing the correct object and config worked a treat. Here is my dialog view:
And my custom view:
Hi Dan,
How do you tie your custom dialog to your property editor. When I use the code from your first post i doesn't load my custom view.
Dave
Hi Dave,
The custom dialog view is used within a custom package. Have you got the package manifest setup correctly to use your custom view?
Thanks, Dan.
Hi Dan,
I solved it like this :
Dave
Hi Dave,
can you tell me how do you access the dialogdata "mydata" in dialog template?
Thanks in advance.
Best,
Sören
Hi Dave,
It has resolved itself, with $scope.dialogData :-) Sometimes it is too easy.
Best,
Sören
Hi all,
I digged out this conversation, because I try to reuse a colorpicker.
As part of my dialog I write:
In my controller I write:
The colorpicker doesn't appear and in the console I get a message:
Seems, as if a had to mock a property Dialog. But how do I do that?
Does anybody has an idea what's missing here?
Mirko
regarding the error
I wrapped the html in a form-tag
is working on a reply...