-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
carson
committed
Mar 28, 2019
1 parent
2117949
commit 14eff63
Showing
5 changed files
with
144 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
layout: default | ||
nav: attributes > ic-indicator | ||
--- | ||
|
||
<div class="container"> | ||
|
||
<div class="row"> | ||
<div class="col-md-12"> | ||
|
||
<h2><code>ic-indicator</code> - The Global Indicator Attribute</h2> | ||
|
||
<h3>Summary</h3> | ||
|
||
<p>The global indicator attribute can be used to show an indicator while a request is in process. This | ||
indicator will be shown in addition to any local request indicators otherwise specified.</p> | ||
|
||
<h3>Syntax</h3> | ||
|
||
<p>The value of the attribute should be a valid selector of the indicator element to show, or | ||
<code>false</code> if you wish for an element to not show a global indicator specified on a | ||
parent element.</p> | ||
|
||
<h3>Example</h3> | ||
|
||
<pre> | ||
<div ic-global-indicator="#indicator"> | ||
<button ic-post-to="/target_url" > | ||
Click Me! | ||
<i class="fa fa-spinner fa-spin ic-indicator" style="display:none"></i> | ||
</button> | ||
<br/> | ||
Global Indicator: <i id="indicator" class="fa fa-spinner fa-spin" style="display:none"></i> | ||
</div> | ||
</pre> | ||
|
||
|
||
<div class="live-demo"> | ||
<script> | ||
$.mockjax({ | ||
'url': '/target_url', | ||
responseTime: 1500 | ||
}); | ||
</script> | ||
|
||
<div ic-global-indicator="#indicator"> | ||
<button ic-post-to="/target_url" > | ||
Click Me! | ||
<i class="fa fa-spinner fa-spin ic-indicator" style="display:none"></i> | ||
</button> | ||
|
||
<br/> | ||
|
||
Global Indicator: <i id="indicator" class="fa fa-spinner fa-spin" style="display:none"></i> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
layout: default | ||
nav: attributes > ic-switch-class | ||
--- | ||
|
||
<div class="container"> | ||
|
||
<div class="row"> | ||
<div class="col-md-12"> | ||
|
||
<h2><code>ic-switch-class</code> - The Switch Class Attribute</h2> | ||
|
||
<h3>Summary</h3> | ||
|
||
<p>The <code>ic-switch-class</code> attribute allows you to switch classes | ||
between elements after a response has been received. This allows you to | ||
for example update a tab state without replacing the tabs in the server | ||
response.</p> | ||
|
||
<h3>Syntax</h3> | ||
|
||
<p>The value of this attribute should be the name of the class to be switched between sibling | ||
elements and the attribute should be placed on the parent element.</p> | ||
|
||
<h3>Dependencies</h3> | ||
|
||
<p>The <code>ic-switch-class</code> attribute has no effect on dependencies.</p> | ||
|
||
<h3>Example</h3> | ||
|
||
<p>Here is a simple bootstrap tab example. Note that the body of the tabbed UI is | ||
replaced with new HTML, but the tabs are not, since we are targeting <code>#content</code>. | ||
The tabs update based on switching the class <code>active</code> between them.</p> | ||
|
||
<pre> | ||
<ul class="nav nav-tabs" ic-target="#content" ic-switch-class="active"> | ||
<li class="active"><a ic-get-from="/tabs">Tab1</a></li> | ||
<li><a ic-get-from="/tabs">Tab2</a></li> | ||
<li><a ic-get-from="/tabs">Tab3</a></li> | ||
</ul> | ||
<div id="content"> | ||
Pick a tab | ||
</div> | ||
</pre> | ||
|
||
<div class="live-demo"> | ||
<script> | ||
(function () { | ||
var i = 0; | ||
$.mockjax({ | ||
'url': '/tabs', | ||
'response': function () { | ||
i++; | ||
this.responseText = "You have changed tabs " + i + " times..."; | ||
} | ||
}); | ||
})(); | ||
</script> | ||
|
||
<ul class="nav nav-tabs" ic-target="#content" ic-switch-class="active"> | ||
<li class="active"><a ic-get-from="/tabs">Tab1</a></li> | ||
<li><a ic-get-from="/tabs">Tab2</a></li> | ||
<li><a ic-get-from="/tabs">Tab3</a></li> | ||
</ul> | ||
<div id="content"> | ||
Pick a tab | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters