I was playing around with the new umbraco backoffice.
I saw that dialogs are moving to a new overlay approach and I wonder if there is something that could give me a basic example to start implementing it for custom property editors.
thank you for your answer. I already know how to implement a dialog, I've done it many times.
What I'm saying is that in the 7.4 beta devs are changing the way dialogs are implemented (and the change is still undocumented) using a new angular directive umb-overlay (if you look the 7.4 scripts/views of the backoffice you can see yourself).
I am hoping a dev has a moment to share basic example of thisnew approach
7.4 docs are still in the making but I hope this basic example will get you started. You can extend the overlay object with all the properties you need just as the old dialogService.
On the umbOverlay component in your html you can see that you pass in your “overlay” model into the component in the “model” attribute. This means that you will have access to all the data from that model on $scope.model inside the component.
You can try to do a console log on $scope.model.title and then you will hopefully see “Overlay” in your log. And if you log $scope.model.dialogModel you will see the value from $scope.control.value
Umbraco 7.4 backoffice - overlays dialog
Hi everyone,
I was playing around with the new umbraco backoffice.
I saw that dialogs are moving to a new overlay approach and I wonder if there is something that could give me a basic example to start implementing it for custom property editors.
Thank you,
Alex
Hi Alex,
Perhaps this documentation about the dialogService can help you a step further to achieve what you are trying to do.
http://umbraco.github.io/Belle/#/api/umbraco.services.dialogService
Hope this helps,
/Dennis
Hi Denis,
thank you for your answer. I already know how to implement a dialog, I've done it many times.
What I'm saying is that in the 7.4 beta devs are changing the way dialogs are implemented (and the change is still undocumented) using a new angular directive umb-overlay (if you look the 7.4 scripts/views of the backoffice you can see yourself).
I am hoping a dev has a moment to share basic example of thisnew approach
Alex
Hi Alex,
7.4 docs are still in the making but I hope this basic example will get you started. You can extend the overlay object with all the properties you need just as the old dialogService.
In your html
In your controller
Hey Mads,
Do you have any idea how I can pass parameters to this overlay?
I see in Umbraco.Dialogs.MediaPickerController for example:
But I don't get where those dialogoptions come from.
Hi Gerards,
any model you pass to the
<umb-overlay model="myModel">
Is also returned trough the callbacks
submit: function (myModel)
andclose: function (myModel)
so in this case its the
$scope.overlay
I am trying to make my dialogService into umb-overlay.
How do you get the model data sendt into your custom view?
I hope someone still see this ;)
Hi Bo,
Take a look at this new UI documentation
https://our.umbraco.org/apidocs/ui/#/api/umbraco.services.dialogService
Yes i know the https://our.umbraco.org/apidocs/ui/#/api/umbraco.services.dialogService, but i cant seem to find out how to make the overlay from the dialogService.
Atm i use this
And it works. But i would like it as an umb-overlay.
Do you know how to?
Hi Bo,
On the umbOverlay component in your html you can see that you pass in your “overlay” model into the component in the “model” attribute. This means that you will have access to all the data from that model on $scope.model inside the component.
You can try to do a console log on $scope.model.title and then you will hopefully see “Overlay” in your log. And if you log $scope.model.dialogModel you will see the value from $scope.control.value
I hope this makes sense.
Have a wonderful day.
Thanks Mads.
Now it all makes sence to me. Saved me alot of headache.
Thank you Mads,
this was exactly what I was looking for, thank you very much
Alex
is working on a reply...