diff options
author | ITSERVICES\rb7147 <rb7147@att.com> | 2017-04-25 11:46:00 -0400 |
---|---|---|
committer | ITSERVICES\rb7147 <rb7147@att.com> | 2017-05-03 09:58:17 -0400 |
commit | e0addf5b588a1244f9679becd90999dfcb4c3a94 (patch) | |
tree | 1212772d6366730266ff0e093c874b07aa716c29 /POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_includes/js/alerts.html | |
parent | 39fb0f30472777e4b60d6a7ac8aa4eb9773961ff (diff) |
Policy 1707 commit to LF
Change-Id: Ibe6f01d92f9a434c040abb05d5386e89d675ae65
Signed-off-by: ITSERVICES\rb7147 <rb7147@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_includes/js/alerts.html')
-rw-r--r-- | POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_includes/js/alerts.html | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_includes/js/alerts.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_includes/js/alerts.html new file mode 100644 index 000000000..711fd6c40 --- /dev/null +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_includes/js/alerts.html @@ -0,0 +1,73 @@ +<div class="bs-docs-section"> + <h1 id="alerts" class="page-header">Alert messages <small>alert.js</small></h1> + + <h2 id="alerts-examples">Example alerts</h2> + <p>Add dismiss functionality to all alert messages with this plugin.</p> + <p>When using a <code>.close</code> button, it must be the first child of the <code>.alert-dismissible</code> and no text content may come before it in the markup.</p> + <div class="bs-example bs-example-standalone" data-example-id="dismissible-alert-js"> + <div class="alert alert-warning alert-dismissible fade in" role="alert"> + <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> + <strong>Holy guacamole!</strong> Best check yo self, you're not looking too good. + </div> + + <div class="alert alert-danger alert-dismissible fade in" role="alert"> + <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> + <h4>Oh snap! You got an error!</h4> + <p>Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.</p> + <p> + <button type="button" class="btn btn-danger">Take this action</button> + <button type="button" class="btn btn-default">Or do this</button> + </p> + </div> + </div><!-- /example --> + + + <h2 id="alerts-usage">Usage</h2> + + <p>Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert close functionality. Closing an alert removes it from the DOM.</p> + +{% highlight html %} +<button type="button" class="close" data-dismiss="alert" aria-label="Close"> + <span aria-hidden="true">×</span> +</button> +{% endhighlight %} + + <p>To have your alerts use animation when closing, make sure they have the <code>.fade</code> and <code>.in</code> classes already applied to them.</p> + + <h3 id="alerts-methods">Methods</h3> + + <h4><code>$().alert()</code></h4> + <p>Makes an alert listen for click events on descendant elements which have the <code>data-dismiss="alert"</code> attribute. (Not necessary when using the data-api's auto-initialization.)</p> + + <h4><code>$().alert('close')</code></h4> + <p>Closes an alert by removing it from the DOM. If the <code>.fade</code> and <code>.in</code> classes are present on the element, the alert will fade out before it is removed.</p> + + + <h3 id="alerts-events">Events</h3> + <p>Bootstrap's alert plugin exposes a few events for hooking into alert functionality.</p> + <div class="table-responsive"> + <table class="table table-bordered table-striped bs-events-table"> + <thead> + <tr> + <th>Event Type</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td>close.bs.alert</td> + <td>This event fires immediately when the <code>close</code> instance method is called.</td> + </tr> + <tr> + <td>closed.bs.alert</td> + <td>This event is fired when the alert has been closed (will wait for CSS transitions to complete).</td> + </tr> + </tbody> + </table> + </div><!-- /.table-responsive --> +{% highlight js %} +$('#myAlert').on('closed.bs.alert', function () { + // do something… +}) +{% endhighlight %} +</div> |