Browse Source

Updating docs pages to reflect correct settings

pull/1177/head
jlukic 10 years ago
parent
commit
0248cff001
11 changed files with 470 additions and 446 deletions
  1. 36
      server/documents/modules/api.html.eco
  2. 236
      server/documents/modules/dimmer.html.eco
  3. 629
      server/documents/modules/dropdown.html.eco
  4. 2
      server/documents/modules/modal.html.eco
  5. 2
      server/documents/modules/popup.html.eco
  6. 2
      server/documents/modules/rating.html.eco
  7. 2
      server/documents/modules/shape.html.eco
  8. 2
      server/documents/modules/sidebar.html.eco
  9. 2
      server/documents/modules/tab.html.eco
  10. 2
      server/documents/modules/transition.html.eco
  11. 1
      server/files/stylesheets/semantic.css

36
server/documents/modules/api.html.eco

@ -15,7 +15,7 @@ type : 'UI Behavior'
<div class="main container">
<div class="ui active tab" data-tab="overview">
<div class="ui two column internally celled very relaxed stackable grid">
<div class="ui two column very relaxed stackable grid">
<div class="row">
<div class="column">
<div class="content">
@ -90,6 +90,7 @@ type : 'UI Behavior'
$.fn.api.settings.api = {
'get followers' : '/followers/{id}?results={count}',
'create user' : '/create',
'add user' : '/add/{id}',
'follow user' : '/follow/{id}',
'search' : '/search/?query={value}'
};
@ -181,7 +182,7 @@ type : 'UI Behavior'
</div>
</div>
<h2 class="ui dividing header">Setting URL Variables</h2>
<h2 class="ui dividing header">Setting-up Requests</h2>
<div class="no example">
<h4 class="ui header">URL Variables</h4>
@ -232,25 +233,30 @@ type : 'UI Behavior'
</div>
<div class="no example">
<h4 class="ui header">Data Attributes</h4>
<p>You can include url values as metadata inside the DOM.
<p>This is often easiest to include unique url data for each triggering element. For example, many follow buttons will trigger the same endpoint, but each will have its own user id.</p>
<h4 class="ui header">Request Information in Data Attributes</h4>
<p>You can include url values as html5 metadata attributes</p>
<p>This is often easiest to include unique url data for each triggering element, for example, many follow buttons will trigger the same endpoint, but each will have its own user id.</p>
<p>As a convenience, you can also specify your API action in metadata, to allow you to instantiate multiple types of api actions in one statement.</p>
<div class="ui ignored warning message">
Only variables specified in your API's URL will be searched for in metadata.
</div>
<div class="code" data-type="html">
<div class="ui follow button" data-id="11">
User 1
<div class="ui button" data-action="follow user" data-id="11">
Follow 1
</div>
<div class="ui follow button" data-id="22">
User 2
<div class="ui button" data-action="add user" data-id="11">
Add Stevie
</div>
<div class="ui button" data-action="follow user" data-id="22">
Follow Jenny
</div>
<div class="ui button" data-action="add user" data-id="22">
Add Jennie
</div>
</div>
<div class="code" data-type="javascript">
$('.follow.button')
.api({
action: 'follow user'
})
.api()
;
</div>
</div>
@ -277,7 +283,7 @@ type : 'UI Behavior'
</div>
<div class="no example">
<h4 class="ui header">Modifying Data and Settings Just Before Sending</h4>
<h4 class="ui header">Adjusting Request in Before Send</h4>
<p>All run settings, not just url data, can be adjusted in a special callback <code>beforeSend</code> which occurs before the API request is sent.</p>
<div class="ui info message">
An additional callback <code>beforeXHR</code> lets you modify the XHR object before sending. This is different than beforeSend.
@ -320,10 +326,10 @@ type : 'UI Behavior'
</div>
</div>
<h2 class="ui dividing header">Including Server Data</h2>
<h2 class="ui dividing header">Sending Data</h2>
<div class="example">
<h4 class="ui header">Automatically Routed</h4>
<h4 class="ui header">Automatically Routed Data</h4>
<p>Calling API on any element inside of a form, will automatically include serialized form content in your request when using a special setting <code>serializeForm</code>, or using a form as the <code>stateContext</code>.</p>
<div class="ui ignored message">
Using <code>serializeForm</code> requires including the serialize-object dependency.

236
server/documents/modules/dimmer.html.eco

@ -39,17 +39,17 @@ themes : ['Default']
<p>A dimmer can display content</p>
<div class="ui ignored info message">Content must be included inside <code>.content .center</code> to display centered correctly in the modal.</div>
<div class="ui segment">
<h4 class="ui dividing header">
<i class="photo icon"></i>Dog Photos
</h4>
<img src="/images/demo/item1.jpg">
<img src="/images/demo/item2.jpg">
<h3 class="ui header">
Overlayable Section
</h3>
<img src="/images/wireframe/text-image.png">
<img src="/images/wireframe/text-image.png">
<div class="ui dimmer">
<div class="content">
<div class="center">
<h2 class="ui inverted icon header">
<i class="icon circular inverted emphasized red heart"></i>
Your poodle photo uploaded successfully!
<i class="circular red heart icon"></i>
Dimmed Message!
</h2>
</div>
</div>
@ -94,6 +94,8 @@ themes : ['Default']
<p>An active dimmer will dim its parent container</p>
<div class="ui segment">
<div class="ui active dimmer"></div>
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
</div>
</div>
@ -102,6 +104,8 @@ themes : ['Default']
<p>A disabled dimmer cannot be activated</p>
<div class="ui segment">
<div class="ui disabled dimmer"></div>
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
</div>
</div>
@ -114,8 +118,8 @@ themes : ['Default']
<div class="ignored ui info message">Having any parent element receive the class <code>ui dimmable dimmed</code> will trigger the dimmer to display.</div>
<div class="ui dimmable dimmed segment">
<div class="ui simple dimmer"></div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
</div>
</div>
@ -124,8 +128,8 @@ themes : ['Default']
<p>A dimmer can be formatted to have its colors inverted</p>
<div class="ui segment">
<div class="ui inverted dimmer"></div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<img class="ui wireframe image" src="/images/wireframe/paragraph.png">
<img class="ui wireframe image" src="/images/wireframe/paragraph.png">
</div>
<div class="ignore ui icon buttons">
<div class="ui show button"><i class="plus icon"></i></div>
@ -149,24 +153,24 @@ themes : ['Default']
<div class="ui dimmer">
<div class="content">
<div class="center">
<h2 class="ui inverted header">Puppy</h2>
<div class="ui green button">Vote</div>
<a class="ui button">View</a>
<h2 class="ui inverted header">Title</h2>
<div class="ui primary button">Add</div>
<div class="ui button">View</div>
</div>
</div>
</div>
<img src="/images/demo/highres.jpg">
<img src="/images/wireframe/image.png">
</div>
<div class="ui circular image">
<div class="ui dimmer">
<div class="content">
<div class="center">
<div class="ui mini green button">Vote</div>
<a class="ui mini button">View</a>
<div class="ui small primary button">Add</div>
<div class="ui small button">View</div>
</div>
</div>
</div>
<img src="/images/demo/photo2.jpg">
<img src="/images/wireframe/square-image.png">
</div>
</div>
@ -177,8 +181,8 @@ themes : ['Default']
<div class="ui inverted dimmer">
<div class="ui text loader">Loading</div>
</div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
</div>
<div class="ignore ui icon buttons">
<div class="ui show button"><i class="plus icon"></i></div>
@ -192,37 +196,49 @@ themes : ['Default']
<h2 class="ui dividing header">Usage</h2>
<h3 class="ui header">Display</h3>
<p>You can display a dimmer by either invoking .dimmer('show') on a section or a dimmer itself. If you choose to dim a dimmable section, a dimmer will automatically be created.</p>
<div class="ignore code">
// these two are the same
$('.ui.dimmable)
.dimmer('show')
;
$('.ui.dimmable .dimmer')
.dimmer('show')
;
<div class="no example">
<h4 class="ui header">Display</h4>
<p>You can display a dimmer by either invoking .dimmer('show') on a section or a dimmer itself. If you choose to dim a dimmable section, a dimmer will automatically be created.</p>
<div class="ignore code">
// these two are the same
$('.ui.dimmable)
.dimmer('show')
;
$('.ui.dimmable .dimmer')
.dimmer('show')
;
</div>
</div>
<h3 class="ui header">Creating Dimmers</h3>
<p>If a dimmer does not exist inside the element it will be created on first use.</p>
<div class="code" data-demo="true">
$('h3')
.dimmer('toggle')
;
<div class="no example">
<h4 class="ui header">Creating Dimmers</h4>
<p>If a dimmer does not exist inside the element it will be created on first use.</p>
<div class="code" data-demo="true">
$('h4')
.dimmer('toggle')
;
</div>
</div>
<h3 class="ui header">Showing a specific dimmer</h3>
<p>If a dimmer is already inside an element, you can call behavior on the dimmable section or the dimmer itself.</p>
<div class="code" data-demo="true">
// If a dimmer exists on a page, you can make it appear by calling it directly
$('.page.dimmer:first')
.dimmer('toggle')
;
<div class="no example">
<h4 class="ui header">Showing a Specific Dimmer</h4>
<p>If a dimmer is already inside an element, you can call behavior on the dimmable section or the dimmer itself.</p>
<div class="code" data-demo="true">
// If a dimmer exists on a page, you can make it appear by calling it directly
$('.page.dimmer:first')
.dimmer('toggle')
;
</div>
</div>
<h2 class="ui dividing header">Behavior</h2>
<p>All the following <a href="/module.html#/behavior">behaviors</a> can be called using the syntax:</p>
<div class="ui ignored info message">
Behaviors must be called on the same content which you originally initialize the dimmer, whether it is the <code>dimmable</code> context, or the <code>ui dimmer</code>
</div>
<div class="code">
$('.your.element')
.dimmer('behavior name', argumentOne, argumentTwo)
@ -251,6 +267,10 @@ themes : ['Default']
<td>toggle</td>
<td>Toggles current dimmer visibility</td>
</tr>
<tr>
<td>create</td>
<td>Creates a new dimmer in dimmable context</td>
</tr>
<tr>
<td>get duration</td>
<td>Returns current duration for show or hide event depending on current visibility</td>
@ -263,14 +283,6 @@ themes : ['Default']
<td>has dimmer</td>
<td>Returns whether current dimmable has a dimmer</td>
</tr>
<tr>
<td>is dimmer</td>
<td>Whether current element is a dimmer</td>
</tr>
<tr>
<td>is dimmable</td>
<td>Whether current element is a dimmable section</td>
</tr>
<tr>
<td>is active</td>
<td>Whether section's dimmer is active</td>
@ -280,17 +292,25 @@ themes : ['Default']
<td>Whether dimmer is animating</td>
</tr>
<tr>
<td>is page</td>
<td>Whether dimmable section is <code>body</code></td>
<td>is dimmer</td>
<td>Whether current element is a dimmer</td>
</tr>
<tr>
<td>is enabled</td>
<td>Whether dimmer is not disabled</td>
<td>is dimmable</td>
<td>Whether current element is a dimmable section</td>
</tr>
<tr>
<td>is disabled</td>
<td>Whether dimmer is disabled</td>
</tr>
<tr>
<td>is enabled</td>
<td>Whether dimmer is not disabled</td>
</tr>
<tr>
<td>is page</td>
<td>Whether dimmable section is <code>body</code></td>
</tr>
<tr>
<td>is page dimmer</td>
<td>Whether dimmer is a page dimmer</td>
@ -320,15 +340,17 @@ themes : ['Default']
</div>
<div class="ui tab" data-tab="settings">
<div class="ui tab" data-tab="settings">
<h2 class="ui dividing header">
Dimmer
</h2>
<h3 class="ui header">
Dimmer Settings
<div class="sub header">Dimmer settings modify its behavior</div>
</h3>
<table class="ui sortable celled definition table segment">
<h4 class="ui header">
Behavior
</h4>
<table class="ui sortable celled definition table">
<thead>
<th>Setting</th>
<th></th>
<th class="four wide">Default</th>
<th>Description</th>
</thead>
@ -347,10 +369,10 @@ themes : ['Default']
<td>duration</td>
<td>
<div class="code">
duration : {
show : 500,
hide : 500
}
duration : {
show : 500,
hide : 500
}
</div>
</td>
<td>Animation duration of dimming. If an integer is used, that value will apply to both show and hide animations.</td>
@ -363,18 +385,16 @@ themes : ['Default']
<td>Named transition to use when animating menu in and out. Fade and slide down are available without including <a href="/modules/transition.html">ui transitions</a></td>
</tr>
</tbody>
</tbody>
</table>
<h3 class="ui header">
<h4 class="ui header">
Callbacks
<div class="sub header">Callbacks specify a function to occur after a specific behavior.</div>
</h3>
</h4>
<table class="ui sortable celled definition table segment">
<table class="ui sortable celled definition table">
<thead>
<th class="four wide">Setting</th>
<th>Context</th>
<th class="three wide"></th>
<th class="three wide">Context</th>
<th>Description</th>
</thead>
<tbody>
@ -396,40 +416,19 @@ themes : ['Default']
</tbody>
</table>
<h3 class="ui header">
Templates
<div class="sub header">Templates are used to generate DOM elements</div>
</h3>
<h2 class="ui dividing header">
Module
</h2>
<table class="ui sortable celled definition table segment">
<thead>
<th class="three wide">Generates</th>
<th>Default</th>
</thead>
<tbody>
<tr>
<td>dimmer</td>
<td>
<div class="code" data-type="javascript">
function() {
return $('<div />').attr('class', 'ui dimmer');
}
</div>
</td>
</tr>
</tbody>
</table>
<p>These settings are native to all modules, and define how the component ties content to DOM attributes, and debugging settings for the module.</p>
<h3 class="ui header">
DOM Settings
<div class="sub header">DOM settings specify how this module should interface with the DOM</div>
</h3>
<table class="ui sortable celled definition table segment">
<table class="ui sortable celled definition table">
<thead>
<th>Setting</th>
<th></th>
<th class="six wide">Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>namespace</td>
@ -441,7 +440,7 @@ themes : ['Default']
<td>
<div class="code" data-type="css">
selector: {
dimmable : '.ui.dimmable',
dimmable : '.dimmable',
dimmer : '.ui.dimmer',
content : '.ui.dimmer > .content, .ui.dimmer > .content > .center'
}
@ -449,13 +448,26 @@ themes : ['Default']
</td>
<td>Object containing selectors used by module.</td>
</tr>
<tr>
<td>template</td>
<td>
<div class="code">
template : {
dimmer: function() {
return $('<div />').attr('class', 'ui dimmer');
}
}
</div>
</td>
<td>Templates used to generate dimmer content</td>
</tr>
<tr>
<td>className</td>
<td>
<div class="code">
className : {
active : 'active',
dimmable : 'ui dimmable',
dimmable : 'dimmable',
dimmed : 'dimmed',
disabled : 'disabled',
pageDimmer : 'page',
@ -467,21 +479,6 @@ themes : ['Default']
</td>
<td>Class names used to attach style to state</td>
</tr>
</tbody>
</table>
<h3 class="ui header">
Debug Settings
<div class="sub header">Debug settings controls debug output to the console</div>
</h3>
<table class="ui sortable celled definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>Dimmer</td>
@ -489,7 +486,7 @@ themes : ['Default']
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>False</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>
@ -514,7 +511,6 @@ themes : ['Default']
</tr>
</tbody>
</table>
</div>
</div>

629
server/documents/modules/dropdown.html.eco

@ -996,6 +996,243 @@ themes : ['Default']
</div>
<div class="ui tab" data-tab="examples">
<div class="transition example">
<h3 class="ui header">Changing Transitions</h3>
<p>A dropdown can specify a different <a href="/modules/transition.html">transitions</a>.</p>
<div class="code" data-type="javascript">
$('.dropdown')
.dropdown({
// you can use any ui transition
transition: 'drop'
})
;
</div>
<div class="ui teal buttons">
<div class="ui button">Toggle</div>
<div class="ui floating dropdown icon button">
<i class="dropdown icon"></i>
<div class="menu">
<div class="item" data-value="drop">Drop</div>
<div class="item" data-value="horizontal flip">Horizontal Flip</div>
<div class="item" data-value="fade up">Fade Up</div>
<div class="item" data-value="scale">Scale</div>
</div>
</div>
</div>
</div>
<div class="dropdown example">
<h3 class="ui header">Multiple Levels</h3>
<p>A dropdown menu can also contain sub menus inside of it</p>
My favorite animal breed is <div class="ui inline dropdown">
<input type="hidden" name="gender">
<div class="text">Shiba Inu</div>
<i class="dropdown icon"></i>
<div class="menu">
<div class="item">
<i class="dropdown icon"></i>
<span class="text">Dogs</span>
<div class="menu">
<div class="item">Shiba Inu</div>
<div class="item">Poodle</div>
<div class="item">Labrador</div>
</div>
</div>
<div class="item">
<i class="dropdown icon"></i>
<span class="text">Cats</span>
<div class="menu">
<div class="item">Aegean</div>
<div class="item">Balinese</div>
<div class="item">Persian</div>
</div>
</div>
</div>
</div>
</div>
<div class="dropdown example">
<h3 class="ui header">Preserving User Selections</h3>
<p>This example uses a preset text value to preserve the menu item on page navigation</p>
<div class="ui ignored info icon message">
<i class="help circle icon"></i>
<div class="content">
<p>A dropdown will automatically select on page load any menu item that includes the currently value of <code>text</code> or your dropdown's <code>hidden input</code> value.</p>
<p>This is used to preserve a user's selection on page navigation and will automatically remove and default text placeholder formatting.</p>
</div>
</div>
Current action: <div class="ui inline dropdown">
<div class="text">Hide</div>
<i class="dropdown icon"></i>
<div class="menu">
<div class="item">Edit</div>
<div class="item">Remove</div>
<div class="item">Hide</div>
</div>
</div>
</div>
<div class="dropdown example">
<h3 class="ui header">Button Group</h3>
<p>A <a href="/elements/button.html">button group</a> can be formatted to show additional content as a dropdown</p>
<div class="ui icon buttons">
<div class="ui top left pointing dropdown button">
<i class="user icon"></i>
<div class="menu">
<div class="item"><i class="edit icon"></i>Edit User</div>
<div class="item"><i class="delete icon"></i>Remove User</div>
<div class="item"><i class="hide icon"></i>Make Invisible</div>
</div>
</div>
<div class="ui top left pointing dropdown button">
<i class="users icon"></i>
<div class="menu">
<div class="item"><i class="edit icon"></i>Edit Group</div>
<div class="item"><i class="delete icon"></i>Remove Group</div>
<div class="item"><i class="hide icon"></i>Hide from Group</div>
</div>
</div>
<div class="ui top right pointing dropdown button">
<i class="settings icon"></i>
<div class="menu">
<div class="item"><i class="edit icon"></i> Edit</div>
<div class="item"><i class="delete icon"></i> Remove</div>
<div class="item"><i class="hide icon"></i> Hide</div>
</div>
</div>
</div>
</div>
<div class="hover example">
<h3 class="ui header">Menu</h3>
<p>A <a href="/collections/menu.html">menu</a> element can contain a dropdown</p>
<div class="ui tiered purple inverted menu">
<div class="menu">
<a class="active item">
Home
</a>
<a class="ui dropdown item">
<i class="dropdown icon"></i>Messages
<div class="menu">
<div class="item">
<i class="dropdown icon"></i>
<span class="text">Categories</span>
<div class="menu">
<div class="item">Unread</div>
<div class="item">Promotions</div>
<div class="item">Updates</div>
</div>
</div>
<div class="item">Archive</div>
</div>
</a>
<a class="item">
Browse
</a>
</div>
<div class="sub menu">
<a class="item">Activity Feed</a>
<a class="item">Profile</a>
<a class="item">Events</a>
</div>
</div>
</div>
<div class="dropdown example">
<h3 class="ui header">Form</h3>
<p>A dropdown can be formatted to allow selection inside a <a href="/collections/form.html">form</a></p>
<div class="ui form segment">
<p>Let's go ahead and get you signed up.</p>
<div class="two fields">
<div class="field">
<label>First Name</label>
<input placeholder="First Name" type="text">
</div>
<div class="field">
<label>Last Name</label>
<input placeholder="Last Name" type="text">
</div>
</div>
<div class="field">
<label>Gender</label>
<div class="ui dropdown selection">
<input type="hidden" name="gender">
<div class="default text">...</div>
<i class="dropdown icon"></i>
<div class="menu">
<div class="item" data-value="male">Male</div>
<div class="item" data-value="female">Female</div>
</div>
</div>
</div>
</div>
</div>
<h3 class="ui dividing header">Using Different Dropdown Actions</h3>
<div class="button example">
<h4 class="ui header">Combo Dropdowns</h4>
<div class="ignored">
<p>A <a href="/elements/button.html">button</a> can be formatted with a dropdown.</p>
<p>You can change the default action that occurs on selection to different presets built into <em>ui dropdown</em>.</p>
<p>For example, using the <code>combo</code> preset will change the preceding element to the selected value.</p>
</div>
<div class="evaluated code" data-type="javascript">
$('.combo.dropdown')
.dropdown({
action: 'combo'
})
;
</div>
<div class="ui teal buttons">
<div class="ui button">Save</div>
<div class="ui combo top right pointing dropdown icon button">
<i class="dropdown icon"></i>
<div class="menu">
<div class="item"><i class="edit icon"></i> Edit</div>
<div class="item"><i class="delete icon"></i> Delete</div>
<div class="item"><i class="hide icon"></i> Hide</div>
</div>
</div>
</div>
</div>
<div class="link example">
<h4 class="ui header">Link Dropdowns</h4>
<div class="ignored">
<p>If each option in your dropdown links out to another page, you might just want to make your menu hide without changing any value.</p>
<div class="evaluated code" data-type="javascript">
$('.link.example .dropdown')
.dropdown({
action: 'hide'
})
;
</div>
</div>
<div class="ui floating dropdown button">
<div class="text">Go to</div>
<i class="dropdown icon"></i>
<div class="menu">
<a class="item" href="#link1"><i class="home icon"></i> Home</a>
<a class="item" href="#link2"><i class="users icon"></i> Browse</a>
<a class="item" href="#link3"><i class="search icon"></i> Search</a>
</div>
</div>
</div>
</div>
<div class="ui tab" data-tab="usage">
<h2 class="ui dividing header">Initializing</h2>
@ -1206,8 +1443,8 @@ themes : ['Default']
<table class="ui definition sortable celled table segment">
<thead>
<tr>
<th>Behavior</th>
<th>Description</th>
<th>Behavior</th>
<th>Description</th>
</tr>
</thead>
<tbody>
@ -1325,248 +1562,15 @@ themes : ['Default']
</table>
</div>
<div class="ui tab" data-tab="examples">
<div class="transition example">
<h3 class="ui header">Changing Transitions</h3>
<p>A dropdown can specify a different <a href="/modules/transition.html">transitions</a>.</p>
<div class="code" data-type="javascript">
$('.dropdown')
.dropdown({
// you can use any ui transition
transition: 'drop'
})
;
</div>
<div class="ui teal buttons">
<div class="ui button">Toggle</div>
<div class="ui floating dropdown icon button">
<i class="dropdown icon"></i>
<div class="menu">
<div class="item" data-value="drop">Drop</div>
<div class="item" data-value="horizontal flip">Horizontal Flip</div>
<div class="item" data-value="fade up">Fade Up</div>
<div class="item" data-value="scale">Scale</div>
</div>
</div>
</div>
</div>
<div class="dropdown example">
<h3 class="ui header">Multiple Levels</h3>
<p>A dropdown menu can also contain sub menus inside of it</p>
My favorite animal breed is <div class="ui inline dropdown">
<input type="hidden" name="gender">
<div class="text">Shiba Inu</div>
<i class="dropdown icon"></i>
<div class="menu">
<div class="item">
<i class="dropdown icon"></i>
<span class="text">Dogs</span>
<div class="menu">
<div class="item">Shiba Inu</div>
<div class="item">Poodle</div>
<div class="item">Labrador</div>
</div>
</div>
<div class="item">
<i class="dropdown icon"></i>
<span class="text">Cats</span>
<div class="menu">
<div class="item">Aegean</div>
<div class="item">Balinese</div>
<div class="item">Persian</div>
</div>
</div>
</div>
</div>
</div>
<div class="dropdown example">
<h3 class="ui header">Preserving User Selections</h3>
<p>This example uses a preset text value to preserve the menu item on page navigation</p>
<div class="ui ignored info icon message">
<i class="help circle icon"></i>
<div class="content">
<p>A dropdown will automatically select on page load any menu item that includes the currently value of <code>text</code> or your dropdown's <code>hidden input</code> value.</p>
<p>This is used to preserve a user's selection on page navigation and will automatically remove and default text placeholder formatting.</p>
</div>
</div>
Current action: <div class="ui inline dropdown">
<div class="text">Hide</div>
<i class="dropdown icon"></i>
<div class="menu">
<div class="item">Edit</div>
<div class="item">Remove</div>
<div class="item">Hide</div>
</div>
</div>
</div>
<div class="dropdown example">
<h3 class="ui header">Button Group</h3>
<p>A <a href="/elements/button.html">button group</a> can be formatted to show additional content as a dropdown</p>
<div class="ui icon buttons">
<div class="ui top left pointing dropdown button">
<i class="user icon"></i>
<div class="menu">
<div class="item"><i class="edit icon"></i>Edit User</div>
<div class="item"><i class="delete icon"></i>Remove User</div>
<div class="item"><i class="hide icon"></i>Make Invisible</div>
</div>
</div>
<div class="ui top left pointing dropdown button">
<i class="users icon"></i>
<div class="menu">
<div class="item"><i class="edit icon"></i>Edit Group</div>
<div class="item"><i class="delete icon"></i>Remove Group</div>
<div class="item"><i class="hide icon"></i>Hide from Group</div>
</div>
</div>
<div class="ui top right pointing dropdown button">
<i class="settings icon"></i>
<div class="menu">
<div class="item"><i class="edit icon"></i> Edit</div>
<div class="item"><i class="delete icon"></i> Remove</div>
<div class="item"><i class="hide icon"></i> Hide</div>
</div>
</div>
</div>
</div>
<div class="hover example">
<h3 class="ui header">Menu</h3>
<p>A <a href="/collections/menu.html">menu</a> element can contain a dropdown</p>
<div class="ui tiered purple inverted menu">
<div class="menu">
<a class="active item">
Home
</a>
<a class="ui dropdown item">
<i class="dropdown icon"></i>Messages
<div class="menu">
<div class="item">
<i class="dropdown icon"></i>
<span class="text">Categories</span>
<div class="menu">
<div class="item">Unread</div>
<div class="item">Promotions</div>
<div class="item">Updates</div>
</div>
</div>
<div class="item">Archive</div>
</div>
</a>
<a class="item">
Browse
</a>
</div>
<div class="sub menu">
<a class="item">Activity Feed</a>
<a class="item">Profile</a>
<a class="item">Events</a>
</div>
</div>
</div>
<div class="dropdown example">
<h3 class="ui header">Form</h3>
<p>A dropdown can be formatted to allow selection inside a <a href="/collections/form.html">form</a></p>
<div class="ui form segment">
<p>Let's go ahead and get you signed up.</p>
<div class="two fields">
<div class="field">
<label>First Name</label>
<input placeholder="First Name" type="text">
</div>
<div class="field">
<label>Last Name</label>
<input placeholder="Last Name" type="text">
</div>
</div>
<div class="field">
<label>Gender</label>
<div class="ui dropdown selection">
<input type="hidden" name="gender">
<div class="default text">...</div>
<i class="dropdown icon"></i>
<div class="menu">
<div class="item" data-value="male">Male</div>
<div class="item" data-value="female">Female</div>
</div>
</div>
</div>
</div>
</div>
<h3 class="ui dividing header">Using Different Dropdown Actions</h3>
<div class="button example">
<h4 class="ui header">Combo Dropdowns</h4>
<div class="ignored">
<p>A <a href="/elements/button.html">button</a> can be formatted with a dropdown.</p>
<p>You can change the default action that occurs on selection to different presets built into <em>ui dropdown</em>.</p>
<p>For example, using the <code>combo</code> preset will change the preceding buttons text value to the current selected alue</p>
</div>
<div class="evaluated code" data-type="javascript">
$('.combo.dropdown')
.dropdown({
action: 'combo'
})
;
</div>
<div class="ui teal buttons">
<div class="ui button">Save</div>
<div class="ui combo top right pointing dropdown icon button">
<i class="dropdown icon"></i>
<div class="menu">
<div class="item"><i class="edit icon"></i> Edit</div>
<div class="item"><i class="delete icon"></i> Delete</div>
<div class="item"><i class="hide icon"></i> Hide</div>
</div>
</div>
</div>
</div>
<div class="link example">
<h4 class="ui header">Link Dropdowns</h4>
<div class="ignored">
<p>If each option in your dropdown links out to another page, you might just want to make your menu hide without changing any value.</p>
<div class="evaluated code" data-type="javascript">
$('.link.example .dropdown')
.dropdown({
action: 'hide'
})
;
</div>
</div>
<div class="ui floating dropdown button">
<div class="text">Go to</div>
<i class="dropdown icon"></i>
<div class="menu">
<a class="item" href="#link1"><i class="home icon"></i> Home</a>
<a class="item" href="#link2"><i class="users icon"></i> Browse</a>
<a class="item" href="#link3"><i class="search icon"></i> Search</a>
</div>
</div>
</div>
</div>
<div class="ui tab" data-tab="settings">
<h3 class="ui header">
Dropdown Settings
<div class="sub header">Dropdown settings modify the dropdown's behavior</div>
</h3>
<h2 class="ui dividing header">
Dropdown
</h2>
<h4 class="ui header">
Behavior
</h4>
<table class="ui celled sortable definition table segment">
<thead>
<tr>
@ -1576,22 +1580,43 @@ themes : ['Default']
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>false</td>
<td>Type of dropdown (Either </td>
</tr>
<tr>
<td>on</td>
<td>click</td>
<td>Event used to trigger dropdown (Hover, Click)</td>
<td>Event used to trigger dropdown (Hover, Click, Custom Event)</td>
</tr>
<tr>
<td>allowTab</td>
<td>true</td>
<td>Whether to allow a <code>tabindex</code> to be created for this element </td>
</tr>
<tr>
<td>fullTextSearch</td>
<td>true</td>
<td>Whether search selections should look for string match anywhere in string</td>
</tr>
<tr>
<td>preserveHTML</td>
<td>true</td>
<td>Whether html included in dropdown values should be preserved. (Allows icons to show up in selected value)</td>
</tr>
<tr>
<td>delay</td>
<td>
<div class="code">
delay: {
show: 50,
hide: 300
}
delay: {
show : 200,
hide : 300,
touch : 50
},
</div>
</td>
<td>Time in milliseconds to debounce show or hide behavior when <code>on: hover</code> is used.</td>
<td>Time in milliseconds to debounce show or hide behavior when <code>on: hover</code> is used, or when touch is used.</td>
</tr>
<tr>
<td>transition</td>
@ -1613,16 +1638,16 @@ themes : ['Default']
<td>Sets a default action to occur.
<div class="ui vertical divided list">
<div class="item">
<div class="header">activate</div>
<div class="description">Most likely action will be determined by type of dropdown, for example a selection dropdown will automatically use updateForm</div>
<div class="header">activate (default)</div>
<div class="description">Updates dropdown text with selected value, sets element state to active, updates any hidden fields if available</div>
</div>
<div class="item">
<div class="header">combo</div>
<div class="description">changes text of previous element matching text selector</div>
<div class="header">select</div>
<div class="description">activates menu and updates input fields, but does not change current text</div>
</div>
<div class="item">
<div class="header">select</div>
<div class="description">activates menu item but does not change text</div>
<div class="header">combo</div>
<div class="description">changes text of previous sibling element</div>
</div>
<div class="item">
<div class="header">nothing</div>
@ -1633,26 +1658,24 @@ themes : ['Default']
<div class="description">Dropdown menu is hidden</div>
</div>
<div class="item">
<div class="header">function(){}</div>
<div class="description">custom function is executed</div>
<div class="header">function(text, value){}</div>
<div class="description">custom function is executed with values specified in callback</div>
</div>
</div>
</tr>
</tbody>
</table>
<div class="ui horizontal section divider"><i class="icon setting"></i></div>
<h3 class="ui header">
<h4 class="ui header">
Callbacks
<div class="sub header">Callbacks specify a function to occur after a specific behavior.</div>
</h3>
</h4>
<table class="ui celled sortable definition table segment">
<thead>
<tr>
<th class="four wide">Setting</th>
<th>Context</th>
<th>Description</th>
<th class="four wide"></th>
<th>Context</th>
<th>Description</th>
</tr>
</thead>
<tbody>
@ -1674,6 +1697,10 @@ themes : ['Default']
</tbody>
</table>
<h4 class="ui header">
Module Settings
</h4>
<h3 class="ui header">
DOM Settings
<div class="sub header">DOM settings specify how this module should interface with the DOM</div>
@ -1681,9 +1708,9 @@ themes : ['Default']
<table class="ui celled sortable definition table segment">
<thead>
<tr>
<th>Setting</th>
<th class="four wide">Default</th>
<th>Description</th>
<th></th>
<th class="four wide">Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
@ -1696,12 +1723,14 @@ themes : ['Default']
<td>selector</td>
<td colspan="2">
<div class="code">
selector : {
input : '> input[type="hidden"]',
item : '.menu > .item',
menu : '.menu',
text : '> .text'
}
selector : {
dropdown : '.ui.dropdown',
text : '> .text:not(.icon)',
input : '> input[type="hidden"], > select',
search : '> .search, .menu > .search > input, .menu > input.search',
menu : '.menu',
item : '.item'
}
</div>
</td>
</tr>
@ -1709,10 +1738,12 @@ themes : ['Default']
<td>metadata</td>
<td colspan="2">
<div class="code">
metadata: {
text : 'text',
value : 'value'
}
metadata: {
defaultText : 'defaultText',
defaultValue : 'defaultValue',
text : 'text',
value : 'value'
}
</div>
</td>
</tr>
@ -1720,31 +1751,21 @@ themes : ['Default']
<td>className</td>
<td colspan="2">
<div class="code">
className : {
active : 'active',
disabled : 'disabled',
placeholder : 'default',
visible : 'visible'
}
className : {
active : 'active',
disabled : 'disabled',
dropdown : 'ui dropdown',
filtered : 'filtered',
menu : 'menu',
placeholder : 'default',
search : 'search',
selected : 'selected',
selection : 'selection',
visible : 'visible'
}
</div>
</td>
</tr>
</tbody>
</table>
<h3 class="ui header">
Debug Settings
<div class="sub header">Debug settings controls debug output to the console</div>
</h3>
<table class="ui celled sortable definition table segment">
<thead>
<tr>
<th>Setting</th>
<th class="four wide">Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>Dropdown</td>
@ -1752,7 +1773,7 @@ themes : ['Default']
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>False</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>
@ -1769,11 +1790,11 @@ themes : ['Default']
<td>error</td>
<td colspan="2">
<div class="code">
error : {
action : 'You called a dropdown action that was not defined',
method : 'The method you called is not defined.',
transition : 'The requested transition was not found'
}
error : {
action : 'You called a dropdown action that was not defined',
method : 'The method you called is not defined.',
transition : 'The requested transition was not found'
}
</div>
</td>
</tr>

2
server/documents/modules/modal.html.eco

@ -623,7 +623,7 @@ themes : ['Default', 'Fixed-width']
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>False</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>

2
server/documents/modules/popup.html.eco

@ -726,7 +726,7 @@ themes : ['Default']
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>False</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>

2
server/documents/modules/rating.html.eco

@ -326,7 +326,7 @@ themes : ['Default']
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>False</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>

2
server/documents/modules/shape.html.eco

@ -545,7 +545,7 @@ themes : ['default']
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>False</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>

2
server/documents/modules/sidebar.html.eco

@ -439,7 +439,7 @@ themes : ['Default']
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>False</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>

2
server/documents/modules/tab.html.eco

@ -365,7 +365,7 @@ themes : ['Default']
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>False</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>

2
server/documents/modules/transition.html.eco

@ -512,7 +512,7 @@ type : 'UI Module'
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>False</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>

1
server/files/stylesheets/semantic.css

@ -569,6 +569,7 @@ body#example.hide {
margin: 0em;
padding: 0em;
max-height: 610px;
font-weight: normal;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}

Loading…
Cancel
Save