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

Update bootstrapDialog for Bootstrap version 4.0. #281

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

avan06
Copy link

@avan06 avan06 commented Jul 22, 2016

A modified version is downward compatible,

@ellisio
Copy link

ellisio commented Aug 4, 2016

As of the latest v4 Alpha release this no longer works. You get this error when compiling via Grunt:

Error: Cannot find module 'bootstrap' from '/Users/andrew/Developer/Kicka/Seminar/node_modules/bootstrap3-dialog/dist/js

This will be fixed in the v4-alpha-3.1 patch.

@EugenMayer
Copy link

Just to mention, also working on this, using @avan06 code https://github.com/EugenMayer/bootstrap-dialog and some additions like bower dependency fixes. I am the the middle of testing it against bootstrap-4dev and could join this to see how far we get this

@EugenMayer
Copy link

At least this EugenMayer#4 and that EugenMayer#1 would be needed to get some sort of working copy.

@EugenMayer
Copy link

created a jsfiddle with bootstrap 4 http://jsfiddle.net/o5k0eaws/217/

@EugenMayer
Copy link

i updated the jsfiddle to outline one issue:
Bootstrap 4: http://jsfiddle.net/o5k0eaws/219/
Bootstrap 3: http://jsfiddle.net/o5k0eaws/220/

In bootstrap3, the modal-backdrop handling works, so the first dialog is overlayed by the backdrop, in bootstrap it is not. The reason is, that the modal-backdrops do not get a z-index at all.

Using bootstrap4 with the classic API though, does work : http://jsfiddle.net/o5k0eaws/222/
So bootstrap 4 in general works with the classic API, but when using setModal it does not yet work

@nakupanda
Copy link
Owner

Thanks for this try for bootstrap 4, it's been long since last time folks talking about this.

I'm haven't read through bootstrap yet, I will arrange my time on it and them see how to create bootstrap 4-dialog.

@EugenMayer
Copy link

Well the only issue i am for now encountering is the one outlined in http://jsfiddle.net/o5k0eaws/219/ .. with the special use of bootstrap-dialog .. the modal-backdrop handling fails. Could you point me in a direction looking for thaT?

'choose_remote_name/revert-232-feature_mouseOverButton'
@digixweb
Copy link

digixweb commented Mar 8, 2017

I also get this error: "bootstrap3-dialog": "^1.35.3",

Browserify Failed!: Cannot find module 'bootstrap' from '/home/vagrant/dev/mbm/node_modules/bootstrap3-dialog/dist/js'

@mediatvguy
Copy link

Greetings from Florida :)

Any news on bootstrapDialog for V. 4 ?

@EugenMayer
Copy link

As much news as from bootstrap 4 itself, none

@mediatvguy
Copy link

:(

@nakupanda
Copy link
Owner

Sorry, none..

@bindrid
Copy link

bindrid commented Aug 19, 2017

Note: bootstrap 4 beta is now out. In there documentation, they do not support stacked modals as they consider it a bad user experience. https://getbootstrap.com/docs/4.0/components/modal/

@bindrid
Copy link

bindrid commented Aug 20, 2017

I got Avan06 's version working. I had to add "col" class to the three sections, header, body and footer.
I also put a float right on the footer button container.

    createHeaderContent: function () {
        var $container = $('<div></div>');
        $container.addClass(this.getNamespace('header') + " col"); 

@Oviglo
Copy link

Oviglo commented Aug 21, 2017

+1

@nakupanda
Copy link
Owner

nakupanda commented Aug 23, 2017

@bindrid in bs3 it's also suggested not to use stacked modals.

@alpertandogan
Copy link

in css file i made this modification for bootstrap 4

.bootstrap-dialog .bootstrap-dialog-footer-buttons .btn{
margin-right: 5px;
}
.bootstrap-dialog .bootstrap-dialog-footer-buttons .btn:last-child{
margin-right: 0;
}

@tmaly1980
Copy link

tmaly1980 commented Nov 18, 2017

FYI, bootstrap-v4.0.0-beta.2 is out. @nakupanda Why is this sitting around for months? This library is essential IMO for modals so I don't have to actually code the HTML manually.

@EugenMayer
Copy link

@tmaly1980 don't hold yourself back, go forward and do the essential work?

@tmaly1980
Copy link

tmaly1980 commented Dec 8, 2017

@EugenMayer It looks like it's been done already, by @avan06 . Merge request has been sitting around since August.

Also looks like you did some work on this in your own cloned repo. How far did you get?

@l0ft13
Copy link

l0ft13 commented Jan 18, 2018

+1

@Oviglo
Copy link

Oviglo commented Mar 1, 2018

Thank you !

@Jako
Copy link

Jako commented Mar 13, 2018

It would be nice, if the work of @avan06 could be included here.

@leankuroneko
Copy link

Indeed! I had to remove the plugin because Yii updated Bootstrap and the functionality loss is noticeable :(

@TCardinal
Copy link

it would be good to get this merged now. holding things up.

Copy link

@leankuroneko leankuroneko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this fix. It solves compatibility and although some css issues appear, it makes the plugin usable again.

@Oviglo
Copy link

Oviglo commented Apr 28, 2018

Do you try with the last version of Bootstrap (4.1) ? I have this error:

Uncaught TypeError: Cannot set property 'paddingRight' of undefined

"element" var seem to be a jQuery object but it call native 'css' attribute

EDIT: Ok I think it's normal, just add 4.1 version :)

@rmihaig
Copy link

rmihaig commented Jun 2, 2018

Hello,
I managed to make this work with 4.1 by changing this line
} else if (/4.0.\d+/.test($.fn.modal.Constructor.VERSION)) { //FIXME for BootstrapV4
with this one
} else if (/4.\d+/.test($.fn.modal.Constructor.VERSION)) { //FIXME for BootstrapV4

@GedMarc
Copy link

GedMarc commented Jun 8, 2018

+1 !
:)

@alcidesfmelof
Copy link

Ho can I download a version that works with bootstrap 4.1?

@GedMarc
Copy link

GedMarc commented Jun 13, 2018

I took all the changes and applied them, if you just want quick js files can grab these https://github.com/GedMarc/Bootstrap-Dialog4/tree/master/jar-resources/META-INF/resources/bower_components/bootstrap4-dialog/dist/js

@JavaTMP
Copy link

JavaTMP commented Jun 13, 2018

We created Bootstrap modal Wrapper plugin for bootstrap 4.1 that does not depends on any external CSS other than standard bootstrap css file which supports dynamic and stack modal creations in this repository https://github.com/JavaTMP/bootstrap-modal-wrapper

Copy link

@GedMarc GedMarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are more places that require updates 👍
BootstrapDialogModal.METHODS_TO_OVERRIDE['v4.1'] = $.extend({}, BootstrapDialogModal.METHODS_TO_OVERRIDE['v3.3']);

Add at line 148, maybe with the \d?

@GedMarc
Copy link

GedMarc commented Jun 18, 2018

https://github.com/GedMarc/bootstrap4-dialog contains all the required changes + all BS4 updates for colour themes (LESS Change) + extra wide width (size:extrawide)
Supports 4.0 alpha 3 -> Current 4.1

This repo doesn't look to be maintained, the other repo's have partial updates

@nakupanda
Copy link
Owner

I'm that one who is a bit out of date.. which one is best to be merged? or nothing to be merged?

@firepol
Copy link

firepol commented Jul 1, 2018

@GedMarc I tested your repo in my project, it works, but I had to install it like this:

yarn add https://github.com/GedMarc/bootstrap4-dialog

and in my node_modules it still shows in the folder bootstrap3-dialog and in the packages.json it still shows as bootstrap3-dialog.

I'd expect it to show as bootstrap4-dialog. Maybe can you update the version and make it installable via npm, since this repo doesn't look updated much, it makes sense to make your fork more visible and discoverable...

Or @nakupanda do you plan any updates on this? Bootstrap 4 is stable since ages now...

@GedMarc
Copy link

GedMarc commented Jul 1, 2018

@nakupanda Up to you bud! You did the bulk of the work xD I can do a pull request for you, but the request to update the bower packages to reflect the compatibility makes sense,
I think I'll be updating my package info tho -

@GedMarc
Copy link

GedMarc commented Jul 1, 2018

@firepol I put it up, the version matches the current bootstrap 4 that it is compatible for :
https://www.npmjs.com/package/bootstrap4-dialog

npm install bootstrap4-dialog
bower install bootstrap4-dialog-gedmarc

mcaskill added a commit to mcaskill/bootstrap-dialog that referenced this pull request Apr 1, 2019
From: avan06/bootstrap3-dialog

Changed:
- [b840b3e] Update bootstrapDialog for Bootstrap version 4.0.
- [fc5a30b] FIXME for BootstrapV4.X
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.