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

Sizes does not working correctly #36

Closed
tmendesilva opened this issue Sep 21, 2018 · 7 comments
Closed

Sizes does not working correctly #36

tmendesilva opened this issue Sep 21, 2018 · 7 comments

Comments

@tmendesilva
Copy link

tmendesilva commented Sep 21, 2018

Hello, after last updates dialogs size does not working. I'm trying use SIZE_WIDE, but the classes does not applied correctly, and it is adding btn-block on buttons. Tnks for the plugin extension for Yii2.

PHP code:

echo Dialog::widget([
    'libName' => 'deleteBranchDialog',
    'dialogDefaults' => [
        Dialog::DIALOG_CONFIRM  => [
            'type' => Dialog::TYPE_DANGER,
            'size' => Dialog::SIZE_WIDE,
            'title' => Html::tag('div', Html::tag('i', false, ['class' => 'fas fa-exclamation']), ['class' => 'icon-box']) .
                Yii::t('app', 'Delete') . ' ' . mb_strtolower(Yii::t('app', 'Branch')),
            'btnOKClass' => 'btn-danger',
            'btnOKLabel' => Html::tag('i', false, ['class' => 'far fa-check-circle fa-lg']) . ' ' . Yii::t('app', 'Delete'),
            'btnCancelLabel' => Html::tag('i', false, ['class' => 'fas fa-times-circle']) . ' ' . Yii::t('app', 'Cancel')
        ]
    ]
]);

HTML Rendered:

<div class="modal-dialog modal-xl">
    <div class="modal-content">
        <div class="modal-header">
            <div class="bootstrap-dialog-header">
                <div class="bootstrap-dialog-close-button" style="display: none;">
                    <button class="close" data-dismiss="modal" aria-label="close">×</button>
                </div>
                <div class="bootstrap-dialog-title" id="w3_title">
                    <div class="icon-box"><i class="fas fa-exclamation"></i></div>
                    Deletar filial/setor
                </div>
            </div>
        </div>
        <div class="modal-body">
            <div class="bootstrap-dialog-body">
                <div class="bootstrap-dialog-message">Deseja realmente deletar a(o) filial/setor <strong>UNIDADE
                        CENTRO</strong>?
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <div class="bootstrap-dialog-footer">
                <div class="bootstrap-dialog-footer-buttons">
                    <button class="btn btn-default btn-block" id="252dc9d3-ec07-420f-90c7-850880b5c8b7"><i
                                class="fas fa-times-circle"></i> Cancelar
                    </button>
                    <button class="btn btn-danger btn-block" id="ad46decd-7266-4554-a6f0-b0113eede04a"><i
                                class="far fa-check-circle fa-lg"></i> Deletar
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
@kartik-v
Copy link
Owner

Use Dialog::SIZE_LARGE - refer demo example.

@tmendesilva
Copy link
Author

tmendesilva commented Sep 22, 2018

Ok, Dialog::SIZE_LARGE used 'modal-lg' class, but the modal font size and buttons was increased. I'm using bootstrap 3.3.7.

Examples using Dialog::SIZE_WIDE

Before updates:
beforeupdate

After updates:
afterupdate

@kartik-v
Copy link
Owner

Yes there is a font-size increase corresponding to the size of the modal... will try to check if there is another option for font sizing.

@kartik-v kartik-v reopened this Sep 22, 2018
@tmendesilva
Copy link
Author

I think the problem is on wide size configs, large size is ok.

@kartik-v
Copy link
Owner

kartik-v commented Sep 22, 2018

Resolved via update to v1.0.5.

Check the second button example in the advanced usage

@tmendesilva
Copy link
Author

tmendesilva commented Sep 23, 2018

I updated to @dev version for test. Buttons is ok now, but the 'modal-xl' class isn't on 'bootstrap-dialog-bs3.css' file and properties aren't apply using Bootstrap 3. For Bs3 'modal-lg' was a good choice before updates.

@mortezakarimi
Copy link
Contributor

please fix this bug on bootstrap3

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

3 participants