digicorp / propeller

Propeller - Develop more, Code less. Propeller is a front-end responsive framework based on Google's Material Design Standards & Bootstrap.
http://propeller.in
MIT License
1.13k stars 139 forks source link

modal not working #8

Closed mohammed1955 closed 7 years ago

mohammed1955 commented 7 years ago

hi,when a li in sidebar have data-target of a modal unfortunately modal not working.i using admin template.

sunil-digicorp commented 7 years ago

Hi, To call a modal box there are two attributes required - data-target (which contains your Form ID) and data-toggle (which contains a static value - modal). With these two attributes, you can easily call a modal even in the li of the sidebar in admin template. Hope this may help you.

mohammed1955 commented 7 years ago

hi buddy, i worked extactly same you say but not working

sunil-digicorp commented 7 years ago

In that case, it would be great if you can share your code snippet or a link, where you are facing the issue. This will help us in providing the right solution.

mohammed1955 commented 7 years ago

when li is direct child of ul that have nav, pmd-sidebar-nav classes modal work. BUT when i attach necessary modal class to li in ul that is submenu and have have dropdown,pmd-dropdown classes not work.bro you should try this in admin template to find out this problem

sunil-digicorp commented 7 years ago

Hello,

Thank you for elaborating your issue with us. Yes, you are right. Modal component does not work when called on sidebar's sub menu.

To make it work, please remove below js code snippet from propeller.min.js:

$( ".pmd-sidebar .dropdown-menu, .pmd-navbar-sidebar .dropdown-menu" ).click(function(event) { event.stopPropagation(); });

We added above code purposely because bootstrap dropdown get close automatically on click. To prevent it from closing, we added that script.

Hope this will solve your problem.