Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to control edit dialog size and position #2551

Closed
tristanleboss opened this issue Jun 16, 2018 · 2 comments
Closed

Ability to control edit dialog size and position #2551

tristanleboss opened this issue Jun 16, 2018 · 2 comments
Assignees

Comments

@tristanleboss
Copy link

tristanleboss commented Jun 16, 2018

I think it would be great to allow for more control over the edit dialog size and position.

Indeed, I would like to customize the pixel location (top and left) of the edit dialog along with its size (width and height) and, of course, to have eveyrhing updatable when the user resize the editor even if a dialog is active.

I think it would be great to add an event which receives the size and position as an array before they are applied to the dialog. I managed to change the dialog width using the "resize" event but changing its position is a no-go: I tried to edit the css top and left properties but it seems something is updating them afterwards?!

@nao-pon
Copy link
Member

nao-pon commented Jun 19, 2018

@tristanleboss I done.

Example: Make the edit dialog the same size as the elFinder node

To define with handlers.dialogopen: [Fn] of the client setting or elFinderInstance.bind('dialogopen', [Fn]).

handlers : {
    dialogopen : function(e, fm) {
        var dialog = e.data.dialog,
            elfNode;
        if (dialog.hasClass('elfinder-dialog-edit')) {
            elfNode = fm.getUI();
            dialog.css({
                top: 0,
                left: 0,
                width: elfNode.width(),
                height: elfNode.height()
            }).trigger('resize', { init : true });
        }
    }
}

Thanks! 👍

@tristanleboss
Copy link
Author

Great. Thanks a lot for taking the time to (quickly) answer user feedbacks.

I think this feature can be realy helpful to improve usability of elFinder ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants