Setting URL Variables
+Setting-up Requests
URL Variables
@@ -232,25 +233,30 @@ type : 'UI Behavior'Data Attributes
-You can include url values as metadata inside the DOM. -
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.
+Request Information in Data Attributes
+You can include url values as html5 metadata attributes
+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.
+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.
Modifying Data and Settings Just Before Sending
+Adjusting Request in Before Send
All run settings, not just url data, can be adjusted in a special callback beforeSend
which occurs before the API request is sent.
beforeXHR
lets you modify the XHR object before sending. This is different than beforeSend.
@@ -320,10 +326,10 @@ type : 'UI Behavior'
Including Server Data
+Sending Data
Automatically Routed
+Automatically Routed Data
Calling API on any element inside of a form, will automatically include serialized form content in your request when using a special setting serializeForm
, or using a form as the stateContext
.
serializeForm
requires including the serialize-object dependency.
diff --git a/server/documents/modules/dimmer.html.eco b/server/documents/modules/dimmer.html.eco
index b154f3cd1..c024066ad 100755
--- a/server/documents/modules/dimmer.html.eco
+++ b/server/documents/modules/dimmer.html.eco
@@ -39,17 +39,17 @@ themes : ['Default']
A dimmer can display content
.content .center
to display centered correctly in the modal.- Dog Photos -
- - ++ Overlayable Section +
+ +- - Your poodle photo uploaded successfully! + + Dimmed Message!
An active dimmer will dim its parent container
A disabled dimmer cannot be activated
ui dimmable dimmed
will trigger the dimmer to display.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.
-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.
+ +A dimmer can be formatted to have its colors inverted
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.
-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.
+ +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.
-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.
+ +Usage
-Display
-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.
-Display
+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.
+Creating Dimmers
-If a dimmer does not exist inside the element it will be created on first use.
-Creating Dimmers
+If a dimmer does not exist inside the element it will be created on first use.
+Showing a specific dimmer
-If a dimmer is already inside an element, you can call behavior on the dimmable section or the dimmer itself.
-Showing a Specific Dimmer
+If a dimmer is already inside an element, you can call behavior on the dimmable section or the dimmer itself.
+Behavior
All the following behaviors can be called using the syntax:
+ +dimmable
context, or the ui dimmer
+ body
body
+ Dimmer +
-
- Dimmer Settings
- Dimmer settings modify its behavior
-
- Setting | +Default | Description | @@ -347,10 +369,10 @@ themes : ['Default']duration |
- duration : {
- show : 500,
- hide : 500
- }
+ duration : {
+ show : 500,
+ hide : 500
+ }
|
Animation duration of dimming. If an integer is used, that value will apply to both show and hide animations. | @@ -363,18 +385,16 @@ themes : ['Default']Named transition to use when animating menu in and out. Fade and slide down are available without including ui transitions | -
---|
+
Callbacks
- Callbacks specify a function to occur after a specific behavior.
-
+
- Setting | -Context | ++ | Context | Description | @@ -396,40 +416,19 @@ themes : ['Default']
---|
- Templates
- Templates are used to generate DOM elements
-
+ + Module +
-Generates | -Default | - - -
---|---|
dimmer | -
-
- function() {
- return $('').attr('class', 'ui dimmer');
- }
-
- |
-
These settings are native to all modules, and define how the component ties content to DOM attributes, and debugging settings for the module.
-
- DOM Settings
- DOM settings specify how this module should interface with the DOM
-
- Setting | +Default | Description | +
---|---|---|
namespace | @@ -441,7 +440,7 @@ themes : ['Default']
selector: {
- dimmable : '.ui.dimmable',
+ dimmable : '.dimmable',
dimmer : '.ui.dimmer',
content : '.ui.dimmer > .content, .ui.dimmer > .content > .center'
}
@@ -449,13 +448,26 @@ themes : ['Default']
|
Object containing selectors used by module. |
template | +
+
+ template : {
+ dimmer: function() {
+ return $('').attr('class', 'ui dimmer');
+ }
+ }
+
+ |
+ Templates used to generate dimmer content | +
className |
className : {
active : 'active',
- dimmable : 'ui dimmable',
+ dimmable : 'dimmable',
dimmed : 'dimmed',
disabled : 'disabled',
pageDimmer : 'page',
@@ -467,21 +479,6 @@ themes : ['Default']
|
Class names used to attach style to state |
- Debug Settings
- Debug settings controls debug output to the console
-
-
- Setting | -Default | -Description | - -|
---|---|---|---|
name | Dimmer | @@ -489,7 +486,7 @@ themes : ['Default']||
debug | -True | +False | Provides standard debug output to console |
Changing Transitions
+A dropdown can specify a different transitions.
+ +Multiple Levels
+A dropdown menu can also contain sub menus inside of it
+ My favorite animal breed isPreserving User Selections
+This example uses a preset text value to preserve the menu item on page navigation
+A dropdown will automatically select on page load any menu item that includes the currently value of text
or your dropdown's hidden input
value.
This is used to preserve a user's selection on page navigation and will automatically remove and default text placeholder formatting.
+Button Group
+A button group can be formatted to show additional content as a dropdown
+Menu
+A menu element can contain a dropdown
+ +Form
+A dropdown can be formatted to allow selection inside a form
+Let's go ahead and get you signed up.
+Using Different Dropdown Actions
+ +Combo Dropdowns
+A button can be formatted with a dropdown.
+You can change the default action that occurs on selection to different presets built into ui dropdown.
+For example, using the combo
preset will change the preceding element to the selected value.
Initializing
@@ -1206,8 +1443,8 @@ themes : ['Default']Behavior | -Description | +Behavior | +Description |
---|
Changing Transitions
-A dropdown can specify a different transitions.
- -Multiple Levels
-A dropdown menu can also contain sub menus inside of it
- My favorite animal breed isPreserving User Selections
-This example uses a preset text value to preserve the menu item on page navigation
-A dropdown will automatically select on page load any menu item that includes the currently value of text
or your dropdown's hidden input
value.
This is used to preserve a user's selection on page navigation and will automatically remove and default text placeholder formatting.
-Button Group
-A button group can be formatted to show additional content as a dropdown
-Menu
-A menu element can contain a dropdown
- -Form
-A dropdown can be formatted to allow selection inside a form
-Let's go ahead and get you signed up.
-Using Different Dropdown Actions
- -Combo Dropdowns
-A button can be formatted with a dropdown.
-You can change the default action that occurs on selection to different presets built into ui dropdown.
-For example, using the combo
preset will change the preceding buttons text value to the current selected alue
- Dropdown Settings
- Dropdown settings modify the dropdown's behavior
-
+ + Dropdown +
+ ++ Behavior +
type | +false | +Type of dropdown (Either | +|
on | click | -Event used to trigger dropdown (Hover, Click) | +Event used to trigger dropdown (Hover, Click, Custom Event) | +
allowTab | +true | +Whether to allow a tabindex to be created for this element |
+ |
fullTextSearch | +true | +Whether search selections should look for string match anywhere in string | +|
preserveHTML | +true | +Whether html included in dropdown values should be preserved. (Allows icons to show up in selected value) | |
delay |
- delay: {
- show: 50,
- hide: 300
- }
+ delay: {
+ show : 200,
+ hide : 300,
+ touch : 50
+ },
|
- Time in milliseconds to debounce show or hide behavior when on: hover is used. |
+ Time in milliseconds to debounce show or hide behavior when on: hover is used, or when touch is used. |
transition | @@ -1613,16 +1638,16 @@ themes : ['Default']Sets a default action to occur.
-
activate
- Most likely action will be determined by type of dropdown, for example a selection dropdown will automatically use updateForm
+ activate (default)
+ Updates dropdown text with selected value, sets element state to active, updates any hidden fields if available
-
combo
- changes text of previous element matching text selector
+ select
+ activates menu and updates input fields, but does not change current text
-
select
- activates menu item but does not change text
+ combo
+ changes text of previous sibling element
nothing
@@ -1633,26 +1658,24 @@ themes : ['Default']
Dropdown menu is hidden
-
function(){}
- custom function is executed
+ function(text, value){}
+ custom function is executed with values specified in callback
|
+
Callbacks
- Callbacks specify a function to occur after a specific behavior.
-
+
Setting | -Context | -Description | ++ | Context | +Description |
---|
+ Module Settings +
+
DOM Settings
DOM settings specify how this module should interface with the DOM
@@ -1681,9 +1708,9 @@ themes : ['Default']
Setting | -Default | -Description | ++ | Default | +Description | selector |
- 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'
+ }
|
@@ -1709,10 +1738,12 @@ themes : ['Default']
metadata |
- metadata: {
- text : 'text',
- value : 'value'
- }
+ metadata: {
+ defaultText : 'defaultText',
+ defaultValue : 'defaultValue',
+ text : 'text',
+ value : 'value'
+ }
|
@@ -1720,31 +1751,21 @@ themes : ['Default']
className |
- 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'
+ }
|
-
-
---|
- Debug Settings
- Debug settings controls debug output to the console
-
- Setting | -Default | -Description | -|
---|---|---|---|
name | Dropdown | @@ -1752,7 +1773,7 @@ themes : ['Default']||
debug | -True | +False | Provides standard debug output to console |
error |
- 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'
+ }
|
||
debug | -True | +False | Provides standard debug output to console |
debug | -True | +False | Provides standard debug output to console |
debug | -True | +False | Provides standard debug output to console |
debug | -True | +False | Provides standard debug output to console |
debug | -True | +False | Provides standard debug output to console |
debug | -True | +False | Provides standard debug output to console |
debug | -True | +False | Provides standard debug output to console |