1. Pascal Brewing
  2. Yii Bootstrap 3 Module Example

Commits

DrMabuse  committed 85bc85a

update modal

  • Participants
  • Parent commits cb49570
  • Branches master

Comments (0)

Files changed (1)

File app/views/site/javascript/_modal.php

View file
 <h3>Static example</h3>
 <p>A rendered modal with header, body, and set of actions in the footer.</p>
 <div class="bs-example bs-example-modal">
+    <div class="modal fade in">
+        <div class="modal-dialog">
+            <div class="modal-content">
+                <div class="modal-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+                    <h4 class="modal-title">Modal title</h4>
+                </div>
+                <div class="modal-body">
+                    <p>One fine body&hellip;</p>
+                </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><!-- /.modal-content -->
+        </div><!-- /.modal-dialog -->
+    </div><!-- /.modal -->
     <?php $this->widget('bootstrap.widgets.BsModal', array(
         'id' => 'myModal',
         'header' => 'Modal Heading',
         'content' => '<p>One fine body...</p>',
         'footer' => array(
-            BSHtml::button('Save Changes', array('data-dismiss' => 'modal', 'color' => BSHtml::BUTTON_COLOR_PRIMARY)),
+            BSHtml::button(
+                'Save Changes',
+                array('data-dismiss' => 'modal', 'color' => BSHtml::BUTTON_COLOR_PRIMARY)
+            ),
             BSHtml::button('Close', array('data-dismiss' => 'modal')),
         ),
     )); ?>
             'type' => 'POST',
             'success' => 'js:function(data){
                 console.log(data);
-                $(".modal-body").html(data);
+                $("#demo_modal .modal-body").html(data);
                 $("#demo_modal").modal("show");
             }',
         ),