Skip to content

Update bootstrapDialog for Bootstrap version 4.0.#281

Open
avan06 wants to merge 4 commits into
nakupanda:masterfrom
avan06:master
Open

Update bootstrapDialog for Bootstrap version 4.0.#281
avan06 wants to merge 4 commits into
nakupanda:masterfrom
avan06:master

Conversation

@avan06

@avan06 avan06 commented Jul 22, 2016

Copy link
Copy Markdown

A modified version is downward compatible,

@ellisio

ellisio commented Aug 4, 2016

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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

@EugenMayer

Copy link
Copy Markdown

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

@EugenMayer

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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

digixweb commented Mar 8, 2017

Copy link
Copy Markdown

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
Copy Markdown

Greetings from Florida :)

Any news on bootstrapDialog for V. 4 ?

@EugenMayer

Copy link
Copy Markdown

As much news as from bootstrap 4 itself, none

@mediatvguy

Copy link
Copy Markdown

:(

@nakupanda

Copy link
Copy Markdown
Owner

Sorry, none..

@bindrid

bindrid commented Aug 19, 2017

Copy link
Copy Markdown

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

bindrid commented Aug 20, 2017

Copy link
Copy Markdown

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

Oviglo commented Aug 21, 2017

Copy link
Copy Markdown

+1

@nakupanda

nakupanda commented Aug 23, 2017

Copy link
Copy Markdown
Owner

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

@alpertandogan

Copy link
Copy Markdown

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

tmaly1980 commented Nov 18, 2017

Copy link
Copy Markdown

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
Copy Markdown

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

@tmaly1980

tmaly1980 commented Dec 8, 2017

Copy link
Copy Markdown

@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

l0ft13 commented Jan 18, 2018

Copy link
Copy Markdown

+1

@Oviglo

Oviglo commented Mar 1, 2018

Copy link
Copy Markdown

Thank you !

@Jako

Jako commented Mar 13, 2018

Copy link
Copy Markdown

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

@leankuroneko

Copy link
Copy Markdown

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

@TCardinal

Copy link
Copy Markdown

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

@leankuroneko leankuroneko left a comment

Copy link
Copy Markdown

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

Oviglo commented Apr 28, 2018

Copy link
Copy Markdown

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

rmihaig commented Jun 2, 2018

Copy link
Copy Markdown

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

GedMarc commented Jun 8, 2018

Copy link
Copy Markdown

+1 !
:)

@alcidesfmelof

Copy link
Copy Markdown

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

@GedMarc

GedMarc commented Jun 13, 2018

Copy link
Copy Markdown

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

JavaTMP commented Jun 13, 2018

Copy link
Copy Markdown

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

@GedMarc GedMarc left a comment

Copy link
Copy Markdown

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

GedMarc commented Jun 18, 2018

Copy link
Copy Markdown

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
Copy Markdown
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

firepol commented Jul 1, 2018

Copy link
Copy Markdown

@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

GedMarc commented Jul 1, 2018

Copy link
Copy Markdown

@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

GedMarc commented Jul 1, 2018

Copy link
Copy Markdown

@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.