"Panel Edit"
Bootstrap 3.1.0 Snippet by escapedlion

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="row"> <div class="col-xs-12 col-sm-offset-3 col-sm-6"> <div class="panel panel-default"> <div class="panel-heading panel-list"> <span class="title">Panel Title</span> <ul class="pull-right panel-controls"> <li><a href="#" data-toggle="tooltip" data-placement="top" title="Add"><i class="glyphicon glyphicon-plus"></i></a></li> <li><a href="#" class="hide-edit" data-command="options" data-toggle="tooltip" data-placement="top" title="Options"><i class="fa fa-cog"></i></a></li> </ul> </div> <div class="panel-edit"> <div class="row" style="display: none;"> <div class="col-xs-12"> <div class="input-group panel-edit"> <input type="text" class="form-control" id="contact-list-search"> <span class="input-group-btn"> <button class="btn btn-default" type="button"><span class="glyphicon glyphicon-search text-muted"></span></button> </span> </div> </div> </div> </div> <div class="panel-body"> <h4>Panel Body</h4> </div> </div> </div> </div> <div id="showModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="mySmallModalLabel">Ooops!!!</h4> </div> <div class="modal-body"> <p>I am being lazy and do not want to program an "Add User" section into this snippet... So it looks like you'll have to do that for yourself.</p><br/> <p><strong>Sorry<br/> ~ Mouse0270</strong></p> </div> </div> </div> </div> </div>
@import url(//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css); body { padding: 30px 0px 60px; } .panel > .list-group .list-group-item:first-child { /*border-top: 1px solid rgb(204, 204, 204);*/ } @media (max-width: 767px) { .visible-xs { display: inline-block !important; } .block { display: block !important; width: 100%; height: 1px !important; } } .panel-search > .form-control { border-radius: 0px; border-width: 0px; border-bottom-width: 1px; font-size: 1.3em; padding: 12px 12px; height: 44px; outline: none !important; } .panel-edit > .form-control:focus { outline:0px !important; -webkit-appearance:none; box-shadow: none; } .panel-edit > .input-group-btn .btn { border-radius: 0px; border-width: 0px; border-left-width: 1px; border-bottom-width: 1px; height: 44px; } .panel-list { padding: 0px; min-height: 44px; } .title { display: inline-block; font-size: 1.4em; font-weight: normal; padding: 5px 15px; } ul.panel-controls { list-style: none; margin: 0px; min-height: 44px; } ul.panel-controls li { margin-top: 8px; float: left; } ul.panel-controls li a { font-size: 1.4em; padding: 11px 10px 6px; } ul.panel-controls li a i { min-width: 24px; text-align: center; } ul.panel-controls li a:hover { background-color: rgba(51, 51, 51, 0.2); } .panel-toggle { font-size: 1.7em; } .name { font-size: 1.7em; font-weight: 700; } .panel-info { padding: 5px 10px; font-size: 1.25em; }
$(function () { $('[data-toggle="tooltip"]').tooltip(); $('a[href="#showModal"]').on('click', function(event) { event.preventDefault(); $('#showModal').modal('show'); }) $('[data-command="toggle-edit"]').on('click', function(event) { event.preventDefault(); $(this).toggleClass('hide-edit'); if ($(this).hasClass('hide-edit')) { $('.panel-edit').closest('.row').slideUp(100); }else{ $('.panel-edit').closest('.row').slideDown(100); } }) });

Related: See More


Questions / Comments: