Hello,
I would like to add a popup dialog on frontend on button click. Something like option "Edit Menu" in website editor. When we click on it, a popup dialog appear and let us organize website menu. I saw that this functionality extend the website.editor.Dialog in JS like that:
    website.contentMenu.EditMenuDialog = website.editor.Dialog.extend({
        template: 'website.contentMenu.dialog.edit',
        events: _.extend({}, website.editor.Dialog.prototype.events, {
            'click a.js_add_menu': 'add_menu',
            'click button.js_edit_menu': 'edit_menu',
            'click button.js_delete_menu': 'delete_menu',
        }),
This code is available in /server/addons/website/static/src/js/website.contentMenu.js
I tried to extend website.editor.Dialog in my custom module to use the default popup dialog form, but I get this error when my page is loaded:
TypeError: website.editor is undefined
This is a part of my code:
    website.manageVideo.Dialog = website.editor.Dialog.extend({
        template: 'custom_moduloe.manageVideo.dialog.edit',
        events: _.extend({}, website.editor.Dialog.prototype.events, {
            'click a.js_add_video': 'add_video',
            'click button.js_edit_video': 'edit_video',
            'click button.js_delete_video': 'delete_video',
        }),
   ....
    website.ready().done(function() {
        var content = new website.manageVideo.Dialog();
        content.setElement($('.oe_content_video'));
        content.start();
    });
My templates are created and it should be working.
So, how can I create a popup dialog?
Thanks
 
                        
please provide your js file... have you added var website = require('website.website'); ?