Skip to content

[3.x Port] Configurable MessageBox minWidth #15996

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

Merged
merged 2 commits into from
Feb 2, 2022
Merged

[3.x Port] Configurable MessageBox minWidth #15996

merged 2 commits into from
Feb 2, 2022

Conversation

Jako
Copy link
Collaborator

@Jako Jako commented Jan 24, 2022

What does it do?

Make the minWidth of MODx.Msg.confirm configurable

Why is it needed?

The current confirm method of MODx.Msg uses the default Ext.MessageBox.minWidth set a few lines above.

How to test

Set the minWidth property of MODx.confirm to a value and open+close and reopen the confirm box again. Without the minWidth property, the reopened box is too small, since the size is only calculated on the first display (which is a second issue – but thats inside of Ext JS).

Related issue(s)/PR(s)

#15984, 3.x Port of #15995

@Jako Jako requested review from Mark-H and opengeek as code owners January 24, 2022 11:14
@cla-bot cla-bot bot added the cla-signed CLA confirmed for contributors to this PR. label Jan 24, 2022
@Jako Jako changed the title Configurable MessageBox minWidth [3.x Port] Configurable MessageBox minWidth Jan 24, 2022
@Ibochkarev Ibochkarev added this to the v3.0.0-rc2 milestone Jan 24, 2022
@Ibochkarev Ibochkarev added the pr/review-needed Pull request requires review and testing. label Jan 24, 2022
Mark-H added a commit to modxorg/Docs that referenced this pull request Feb 2, 2022
@Mark-H
Copy link
Collaborator

Mark-H commented Feb 2, 2022

Documentation updated pending for when this is merged: modxorg/Docs#385

Tested and confirmed working by running the following in the console:

MODx.msg.confirm({
   title: 'Are you sure?',
   text: 'Do you want to delete the world? This is irreversible.',
   minWidth: 500,
   listeners: {
        'success':{fn: function(r) {
             MODx.clearCache(); /* clear cache after world destruction, so we dont have latent data */
        },scope:true}
   }
});

@Mark-H Mark-H added pr/ready-for-merging Pull request reviewed and tested and ready for merging. and removed pr/review-needed Pull request requires review and testing. labels Feb 2, 2022
@opengeek opengeek merged commit 3a05fa0 into modxcms:3.x Feb 2, 2022
@Jako Jako deleted the configurable-messagebox-minwidth-3x branch February 3, 2022 05:20
Mark-H added a commit to modxorg/Docs that referenced this pull request Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA confirmed for contributors to this PR. pr/ready-for-merging Pull request reviewed and tested and ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants