MyBB Community Forums

Full Version: Any tips to get bootstrap modal to work?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

From another thread I got the idea to move the bootstrap js to the footer, and edit out the modal CSS:

/** Modal Start **/
/*
.modal {
display: none;
width: 400px;
text-align: left;
background: #fff;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
-o-border-radius: 8px;
-ms-border-radius: 8px;
border-radius: 8px;
-webkit-box-shadow: 0 0 10px #000;
-moz-box-shadow: 0 0 10px #000;
-o-box-shadow: 0 0 10px #000;
-ms-box-shadow: 0 0 10px #000;
box-shadow: 0 0 10px #000;
}

.modal a.close-modal {
position: absolute;
top: -12.5px;
right: -12.5px;
display: block;
width: 30px;
height: 30px;
text-indent: -9999px;
background: url(images/close.png) no-repeat 0 0;
}

.modal-spinner {
display: none;
width: 64px;
height: 64px;
position: fixed;
top: 50%;
left: 50%;
margin-right: -32px;
margin-top: -32px;
background: url(images/spinner_big.gif) no-repeat center center;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
-o-border-radius: 8px;
-ms-border-radius: 8px;
border-radius: 8px;
}*/

/** Modal End **/

The thread mentioned is:
http://mybbhacks.zingaburga.com/showthre...204&page=1

I then try to get the buddy list popup to work by replacing the misc_buddypopup template code with the following:

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">{$lang->buddy_list}</h4>
      </div>
      <div class="modal-body">
        {$buddies}
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>

This does work, however when you dismiss the modal, the screen does not transition back to normal, it stays in the faded state. Is there any tips to get this to work on a default installation?

Thanks
there is a problem with bootstrap modal in the latest version, only the 3.32 is working.

YOu should bug bootstrap Toungue