Custom Infinite Editor using Editor Service not displaying Submit and Close buttons
Hi, I am migrating over a Property Editor from Umbraco 7 onto Umbraco 8. The custom property editor uses an Overlay to display an item selector, but since overlays do not work in Umbraco 8, I am using the editorService.open() method instead. The list is displaying fine in an infinite editor, but it is not showing any Submit or Close buttons, and neither the Title and Pagination for the list like it does in the Umbraco 7 application.
I am using the following code:
editorService.open({
title: "Available videos",
subtitle: "Select video(s) in the list",
view: "/App_Plugins/Newsroom.VideoFormatEditor/dialog/videopicker.html",
size: "small",
submit: function (value) {
// Custom code for the list
};
close: function () {
editorService.close();
}
You need to have the buttons on the view that is being opened. So in your case your videopicker.html would need to have those buttons. Typically you'd use an umb-editor-footer directive to show this.
Thanks a lot! I managed to get the Close and Submit buttons in place.
I however am having issues passing on the model when submitting. The following is the submit function, which receives no data on submitting.
editorService.open({
title: "Available videos",
multiPicker: true,
subtitle: "Select video(s) in the list",
view: "/App_Plugins/Newsroom.VideoFormatEditor/dialog/videopicker.html",
size: "small",
submit: function (model) {
if (angular.isArray(model.selection)) {
$scope.videoInfoLoaded = false;
var count = model.selection.length;
var nbVideoLoaded = 0;
I have essentially copied over this code from the Umbraco 7 application where it works absolutely fine, so it seems that a lot has changed in terms of the Custom Property Editors. Do you know of any examples that I can follow to migrate over the Custom Property editors onto the new Umbraco 8 application?
Custom Infinite Editor using Editor Service not displaying Submit and Close buttons
Hi, I am migrating over a Property Editor from Umbraco 7 onto Umbraco 8. The custom property editor uses an Overlay to display an item selector, but since overlays do not work in Umbraco 8, I am using the editorService.open() method instead. The list is displaying fine in an infinite editor, but it is not showing any Submit or Close buttons, and neither the Title and Pagination for the list like it does in the Umbraco 7 application.
I am using the following code:
and here is what is being displayed
Can someone please help?
You need to have the buttons on the view that is being opened. So in your case your
videopicker.html
would need to have those buttons. Typically you'd use anumb-editor-footer
directive to show this.Here's an example from something I wrote:
The close button is only shown when the view is opened within an infinite editor. Hope that helps.
Hi Dan,
Thanks a lot! I managed to get the Close and Submit buttons in place.
I however am having issues passing on the model when submitting. The following is the submit function, which receives no data on submitting.
I have essentially copied over this code from the Umbraco 7 application where it works absolutely fine, so it seems that a lot has changed in terms of the Custom Property Editors. Do you know of any examples that I can follow to migrate over the Custom Property editors onto the new Umbraco 8 application?
Thanks!
Glad it worked!
There's an example of creating a custom property editor in the docs at:
https://our.umbraco.com/Documentation/Tutorials/Creating-a-Property-Editor/
Another good place to look for examples is in the Umbraco 8 source code:
https://github.com/umbraco/Umbraco-CMS/tree/v8/contrib/src/Umbraco.Web.UI.Client/src/views/propertyeditors
Good luck :)
is working on a reply...