diff --git a/ui/controls/autocomplete.md b/ui/controls/autocomplete.md index d9fe73af..ad61ac9a 100644 --- a/ui/controls/autocomplete.md +++ b/ui/controls/autocomplete.md @@ -4,11 +4,23 @@ Autocomplete control. - +```html + +``` + +```backend + +``` ## JavaScript API diff --git a/ui/controls/button.md b/ui/controls/button.md index b5a78854..87ac5942 100644 --- a/ui/controls/button.md +++ b/ui/controls/button.md @@ -6,58 +6,120 @@ Use the button classes on an ``, ` - - +```html +Link + + + +``` + +```backend +Link + + + +``` ### Options Use any of the available button classes to quickly create a styled button. - - +```html + + - - + + - - + + - - + + - - + + - - + + - - + + +``` + +```backend + + + + + + + + + + + + + + + + + + + + +``` ### Sizes Fancy larger or smaller buttons? Add `.btn-lg`, `.btn-sm`, or `.btn-xs` for additional sizes. -

- - -

-

- - -

-

- - -

-

- - -

+```html +

+ + +

+

+ + +

+

+ + +

+

+ + +

+``` + +```backend +

+ + +

+

+ + +

+

+ + +

+

+ + +

+``` Create block level buttons—those that span the full width of a parent— by adding .btn-block. - - +```html + + +``` + +```backend + + +``` diff --git a/ui/controls/callout.md b/ui/controls/callout.md index fbf84901..40667120 100644 --- a/ui/controls/callout.md +++ b/ui/controls/callout.md @@ -4,60 +4,117 @@ Displays a detailed message to the user, also allowing it to be dismissed. -
- -
- -

Warning warning

-

My arms are flailing wildly

-
-
-

Insert coin(s) to begin play

-
+```html +
+ +
+ +

Warning warning

+

My arms are flailing wildly

+
+

Insert coin(s) to begin play

+
+
+``` + +```backend +
+ +
+ +

Warning warning

+

My arms are flailing wildly

+
+
+

Insert coin(s) to begin play

+
+
+``` ### No sub-header Include the `no-subheader` class to omit the sub heading. -
-
- -

Incoming unicorn

-
+```html +
+
+ +

Incoming unicorn

+
+``` + +```backend +
+
+ +

Incoming unicorn

+
+
+``` ### No icon Include the `no-icon` class to omit the icon. -
-
-

There was a hull breach

-
    -
  • Get to the chopper
  • -
-
+```html +
+
+

There was a hull breach

+
    +
  • Get to the chopper
  • +
+
+
+``` + +```backend +
+
+

There was a hull breach

+
    +
  • Get to the chopper
  • +
+
+``` ### No header -
-
-

Something good happened

-
    -
  • You found a pony
  • -
-
+```html +
+
+

Something good happened

+
    +
  • You found a pony
  • +
+
+
+``` + +```backend +
+
+

Something good happened

+
    +
  • You found a pony
  • +
+
+``` ### Data attributes: -- data-dismiss="callout" - when assigned to an element, the callout hides on click +- `data-dismiss="callout"` - when assigned to an element, the callout hides on click ## JavaScript API diff --git a/ui/controls/chart.md b/ui/controls/chart.md index a9c14152..3659d5a4 100644 --- a/ui/controls/chart.md +++ b/ui/controls/chart.md @@ -4,17 +4,33 @@ The pie chart outputs information as a circle diagram, with optional label in the center. Example markup: -
-
    -
  • Label 1 100
  • -
  • Label 2 100
  • -
  • Label 3 100
  • -
-
+```html +
+
    +
  • Label 1 100
  • +
  • Label 2 100
  • +
  • Label 3 100
  • +
+
+``` + +```backend +
+
    +
  • Label 1 100
  • +
  • Label 2 100
  • +
  • Label 3 100
  • +
+
+``` ![image](https://raw.githubusercontent.com/wintercms/docs/develop/images/traffic-sources.png) @@ -22,18 +38,35 @@ The pie chart outputs information as a circle diagram, with optional label in th The next example shows a line chart markup. Data sets are defined with the SPAN elements inside the chart element. -
- - -
+```html +
+ + +
+``` + +```backend +
+ + +
+``` ![image](https://raw.githubusercontent.com/wintercms/docs/develop/images/line-chart.png) @@ -41,46 +74,89 @@ The next example shows a line chart markup. Data sets are defined with the SPAN The next example shows a bar chart markup. The **wrap-legend** class is optional, it manages the legend layout. The **data-height** and **data-full-width** attributes are optional as well. -
-
    -
  • Label 1 100
  • -
  • Label 2 100
  • -
  • Label 3 100
  • -
-
+```html +
+
    +
  • Label 1 100
  • +
  • Label 2 100
  • +
  • Label 3 100
  • +
+
+``` + +```backend +
+
    +
  • Label 1 100
  • +
  • Label 2 100
  • +
  • Label 3 100
  • +
+
+``` ![image](https://raw.githubusercontent.com/wintercms/docs/develop/images/bar-chart.png) # Example -
-
    -
  • Label 1 100
  • -
  • Label 2 100
  • -
  • Label 3 100
  • -
-
- -
-
    -
  • Label 1 100
  • -
  • Label 2 100
  • -
  • Label 3 100
  • -
-
- +```html +
+
    +
  • Label 1 100
  • +
  • Label 2 100
  • +
  • Label 3 100
  • +
+
+ +
+
    +
  • Label 1 100
  • +
  • Label 2 100
  • +
  • Label 3 100
  • +
+
+``` + +```backend +
+
    +
  • Label 1 100
  • +
  • Label 2 100
  • +
  • Label 3 100
  • +
+
+ +
+
    +
  • Label 1 100
  • +
  • Label 2 100
  • +
  • Label 3 100
  • +
+
+``` ## Status list @@ -88,36 +164,74 @@ A list of statuses and values # Example -
-
    -
  • - - Software is up to date - Update -
  • - -
  • - - Some issues need attention - View -
  • - -
  • - - System build - 313 -
  • - -
  • - - Event log items - 200 -
  • - -
  • - - Online since - 4th April 2014 -
  • -
-
+```html +
+
    +
  • + + Software is up to date + Update +
  • + +
  • + + Some issues need attention + View +
  • + +
  • + + System build + 313 +
  • + +
  • + + Event log items + 200 +
  • + +
  • + + Online since + 4th April 2014 +
  • +
+
+``` + +```backend +
+
    +
  • + + Software is up to date + Update +
  • + +
  • + + Some issues need attention + View +
  • + +
  • + + System build + 313 +
  • + +
  • + + Event log items + 200 +
  • + +
  • + + Online since + 4th April 2014 +
  • +
+
+``` diff --git a/ui/controls/checkbox.md b/ui/controls/checkbox.md index 7167d823..060167a2 100644 --- a/ui/controls/checkbox.md +++ b/ui/controls/checkbox.md @@ -4,99 +4,208 @@ Allows a user to select from a small set of binary options. -
- - -
+```html +
+ + +
+``` + +```backend +
+ + +
+``` ### Checkbox lists Allows a user to select from a list of binary options. -
- -
- -
-
- -
-
- -
+```html +
+ +
+ +
+
+ +
+
+ +
+
+ +
+

What cars would you like in your garage?

+
+ + +

Do not send new comment notifications.

+
+
+ + +

Send new comment notifications only to post author.

- -
-

What cars would you like in your garage?

-
- - -

Do not send new comment notifications.

-
-
- - -

Send new comment notifications only to post author.

-
-
- - -

Notify all users who have permissions to receive blog notifications.

-
+
+ + +

Notify all users who have permissions to receive blog notifications.

+
+``` + +```backend +
+ +
+ +
+
+ +
+
+ +
+
+ +
+

What cars would you like in your garage?

+
+ + +

Do not send new comment notifications.

+
+
+ + +

Send new comment notifications only to post author.

+
+
+ + +

Notify all users who have permissions to receive blog notifications.

+
+
+
+
+``` ### Indeterminate checkboxes -
- - -
+```html +
+ + +
+``` + +```backend +
+ + +
+``` The `data-checked` attribute may have one of three values: 0 (off), 1 (indeterminate) or 2 (on). ### Radio -
- - -
-
- - -
-
- - -
+```html +
+ + +
+
+ + +
+
+ + +
+``` + +```backend +
+ + +
+
+ + +
+
+ + +
+``` ### Slider - +```html + +``` + +```backend + +``` ### Balloon selector -
-
    -
  • One
  • -
  • Two
  • -
  • Three
  • -
- - -
+```html +
+
    +
  • One
  • +
  • Two
  • +
  • Three
  • +
+ + +
+``` + +```backend +
+
    +
  • One
  • +
  • Two
  • +
  • Three
  • +
+ + +
+``` If you don't define `data-control="balloon-selector"` then the control will act as a static list of labels. -
-
    -
  • Monday
  • -
  • Tuesday
  • -
  • Happy days!
  • -
-
+```html +
+
    +
  • Monday
  • +
  • Tuesday
  • +
  • Happy days!
  • +
+
+``` + +```backend +
+
    +
  • Monday
  • +
  • Tuesday
  • +
  • Happy days!
  • +
+
+``` diff --git a/ui/controls/datepicker.md b/ui/controls/datepicker.md index bc88edfa..3a919a6d 100644 --- a/ui/controls/datepicker.md +++ b/ui/controls/datepicker.md @@ -6,70 +6,142 @@ Renders a date picker, time picker, or both. The input associated to each contro ### Date Picker -
- - - - - -
+```html +
+ + + + + +
+``` + +```backend +
+ + + + + +
+``` ### Time Picker -
- - - - - -
+```html +
+ + + + + +
+``` + +```backend +
+ + + + + +
+``` ### Date & Time Picker -
-
-
- - -
-
- - -
+```html +
+
+
+ + +
+
+ +
+
+ + + +
+``` - - +```backend +
+
+
+ + +
+
+ + +
+ + +
+``` + ## Locale and timezone handling The date picker handles timezone and locale preferences automatically. Locale preferences will provide the date format for the region. The timezone setting is used to convert the chosen value to a uniform timezone, commonly UTC. These features are not enabled by default and require adding `` tags to the page. @@ -82,15 +154,15 @@ The date picker handles timezone and locale preferences automatically. Locale pr When a date is selected, it will be converted from the `backend-timezone` to the `app-timezone` for normalized storage. -> **Note**: Locale values are supplied by the Moment.js library. +> **NOTE**: Locale values are supplied by the Moment.js library. ## Supported data attributes -- data-control="datepicker" - enables the plugin on an element -- data-format="YYYY-MM-DD" - display format -- data-min-date="value" - minimum date to allow -- data-max-date="value" - maximum date to allow -- data-year-range="10" - range of years to display +- `data-control="datepicker"` - enables the plugin on an element +- `data-format="YYYY-MM-DD"` - display format +- `data-min-date="value"` - minimum date to allow +- `data-max-date="value"` - maximum date to allow +- `data-year-range="10"` - range of years to display ## JavaScript API diff --git a/ui/controls/dropdown.md b/ui/controls/dropdown.md index d6c47efc..4233784e 100644 --- a/ui/controls/dropdown.md +++ b/ui/controls/dropdown.md @@ -2,42 +2,82 @@ Customized dropdown menu ### Small dropdown - +``` + +```backend + +``` ### Drop "up" Add the `dropup` class to the dropdown container and the dropdown will appear in an upward direction. - +```html + +``` ### Large dropdown - +```html + +``` + +```backend + +``` diff --git a/ui/controls/filter.md b/ui/controls/filter.md index bf9ca2f3..41b2c7df 100644 --- a/ui/controls/filter.md +++ b/ui/controls/filter.md @@ -6,49 +6,71 @@ # Example -
- - - - Categories: - all - - - - - Statuses: - 2 - - - -
- - -
+```html +
+ + + Categories: + all + + + + Statuses: + 2 + + + +
+ +
+
+ + +``` + +```backend +
+ + + Categories: + all + - \ No newline at end of file + + + Statuses: + 2 + + + +
+ + +
+
+``` diff --git a/ui/controls/flashmessage.md b/ui/controls/flashmessage.md index 602c4844..2946a162 100644 --- a/ui/controls/flashmessage.md +++ b/ui/controls/flashmessage.md @@ -10,54 +10,74 @@ Displays a floating flash message on the screen.

``` +```html

This message is created from a static element. It will go away in 5 seconds.

- -
- +``` ### Trigger -

- - Show Success - +```html +

+ + Show Success + + + + Show Error + + + + Show Warning + +

+``` - - Show Error - +### Display static - - Show Warning - -

+A flash message can be rendered as a static element by attaching the `static` class. The `data-control` attribute is not needed. +```html +

+ Import completed successfully (success) +

-### Display static +

+ Informative info box is informational (info) +

-A flash message can be rendered as a static element by attaching the `static` class. The `data-control` attribute is not needed. +

+ Phasers have been set to stun (warning) +

-

- Import completed successfully (success) -

+

+ We couldn't help you with that (error) +

+``` -

- Informative info box is informational (info) -

+```backend +

+ Import completed successfully (success) +

-

- Phasers have been set to stun (warning) -

+

+ Informative info box is informational (info) +

+ +

+ Phasers have been set to stun (warning) +

-

- We couldn't help you with that (error) -

+

+ We couldn't help you with that (error) +

+``` ### Data attributes -- data-control="flash-message" - enables the flash message plugin -- data-interval="2" - the interval to display the message in seconds, optional. Default: 2 +- `data-control="flash-message"` - enables the flash message plugin +- `data-interval="2"` - the interval to display the message in seconds, optional. Default: 2 ### JavaScript API diff --git a/ui/controls/inspector.md b/ui/controls/inspector.md index cc2a2ba3..b3491629 100644 --- a/ui/controls/inspector.md +++ b/ui/controls/inspector.md @@ -721,4 +721,4 @@ $(document).on('hiding.oc.inspector', 'div[data-inspectable]', function(ev, data ### hidden.oc.inspector -The `hidden.oc.inspector` is triggered after Inspector is hidden. \ No newline at end of file +The `hidden.oc.inspector` is triggered after Inspector is hidden. diff --git a/ui/controls/list.md b/ui/controls/list.md index 736bc1e2..a6c3f4f5 100644 --- a/ui/controls/list.md +++ b/ui/controls/list.md @@ -61,312 +61,624 @@ A list should be a standard `` element with the classes of `table` and `d ### Complete example -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
-
TitleCreatedAuthorCategoriesPublishedUpdated
Welcome to WinterOct 01, 2013Adam PersonNewsOct 01, 2013Oct 01, 2013 
The marketplace is open!Oct 15, 2013Sam GeorgesFeaturesOct 16, 2013Oct 16, 2013 
Welcome to the Builder!Oct 21, 2013Alexey BobkovNews, FeaturesOct 21, 2013Oct 21, 2013 
Components explainedNov 12, 2013Alexey BobkovTutorialsNov 12, 2013Nov 12, 2013 
Creating a module in 90 secondsNov 15, 2013Sam GeorgesTutorialsNov 15, 2013Nov 15, 2013 
-