djk2 / django-popup-view-field

Field and widget can render bootstrap dialog window with content from django view.
MIT License
22 stars 6 forks source link

Add support for bootstrap 4 #8

Closed djk2 closed 4 years ago

ImanoWilliams commented 4 years ago

I am trying to add support for Bootstrap 4. You can check out my fork. However, when I click on load (search) I am getting this "Data is loading ..." in the modal box.

I do not know a lot about how to make the changes, but I am going through your code and making changes/inserts where possible.

djk2 commented 4 years ago

Hi. I started working on support for bootstrap4 one year ago, but I stopt working because I found bugs in Javascript library for Popup dialog in bootstrap4. I couldn't solve this bugs self so I decided that I put work off for people from bootstrap will solve problem. I totally forgot about this and I had a lot of different work.
Probably you have the same situation. Thanks for your issue. I will try look on this issue to end of this month.

ImanoWilliams commented 4 years ago

Great, let me know. Also, you could let me know where the prob is, if you need any help. This app is beneficial to the interface I am trying to design.

djk2 commented 4 years ago

Hi. I have grate news. I added support for bootstrap4 and Django 2.2. Now, If you want switch my library to working with bootstrap4 you have to set DJANGO_POPUP_VIEW_FIELD_TEMPLATE_PACK='bootstrap4' in your settings.py file.

About modification, to cut a long story short: I had to changing mechanism embed dialog in HTML code. In old version, dialog window was each time dynamically created and added to HTML and next was removed. Last time, my script was getting HTML for dialog from template element, clone it and generated new HTML component containing dialog window

. Unfortunately, bootstrap4 have some bugs and can not cooperative with dynamically components (probably I not enough known JS). I decided to add hidden dialog to for permanently. Content of dialog is reloading each time, when window is showing.

Please, test my new solution and give me a info. if everything is OK.

djk2 commented 4 years ago

14 Close.

ImanoWilliams commented 4 years ago

I downloaded the new repo and installed the latest version of jango-popup-view-field. I tried running your demo, but I the popup for the the bootstrap is not displaying. In the logs, it shows that there is a request, but no popup is being shown. Also, I am running Django 3.x.x because I cannot install Django 2.2.9 that is in the requirement.txt.

djk2 commented 4 years ago

Hi. Please look at the https://github.com/djk2/django-popup-view-field/issues/16 and let me known if everythink works fine.