Skip to content

Commit

Permalink
Merge pull request #2 from JonasDoebertin/develop
Browse files Browse the repository at this point in the history
Merge 1.0.0
  • Loading branch information
JonasDoebertin committed Sep 9, 2015
2 parents 5f4daa3 + 987e254 commit 82fc4fb
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changelog

## Version 1.0.0-rc.1
## Version 1.0.0

* Initial public release
55 changes: 43 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ site/
fields/
rangeslider/
assets/
languages/
partials/
rangeslider.php
```
Expand All @@ -45,12 +44,14 @@ $ cd your/project/root
$ git submodule add https://github.com/JonasDoebertin/kirby-range-slider.git site/fields/rangeslider
```

Updating all your Git submodules (eg. the Kirby core modules and any extensions added as submodules) to their latest version, all you need to do is to run these two Git commands.
Updating all your Git submodules (eg. the Kirby core modules and any extensions added as submodules) to their latest version, all you need to do is to run these few Git commands:

```bash
$ cd your/project/root
$ git submodule foreach --recursive git checkout master
$ git submodule foreach --recursive git pull
$ git submodule foreach git checkout master
$ git submodule foreach git pull
$ git commit -a -m "Update submodules"
$ git submodule update --init --recursive
```

## Usage
Expand All @@ -62,20 +63,24 @@ Using the field in your blueprint couldn't be easier. After installing the plugi
```yaml
fields:
title:
label: Event Name
type: text
label: Event Name
type: text
duration:
label: Event Duration
type: rangeslider
min: 1
max: 7
step: 1
label: Event Duration
type: rangeslider
min: 1
max: 7
step: 1
postfix: " days"

```

*Fields related part of the blueprint for the setup shown in the screenshot.*

### Within your templates

You may use any `rangeslider` field you added to your blueprints just like any other standard `number` field.

## Options

### min *(required)*
Expand Down Expand Up @@ -106,7 +111,7 @@ fields:

### step

Set the minimal difference between two slider values. Examples: If set to `1` the user may select integral numbers (1, 2, 3, …). If set to `0.5` the user will be able to select integral numbers or numbers end with `.5`. If a user should be able to pick a price of a product, you'd want to set this to `0.01` so the user can select numbers with to decimals.
Set the minimal difference between two slider values. Examples: If set to `1` the user may select integral numbers (1, 2, 3, …). If set to `0.5` the user will be able to select integral numbers or numbers end with `.5`. If a user should be able to pick a price of a product, you'd want to set this to `0.01` so the user can select numbers with to decimals. The `step` options defaults to `1`.

```yaml
fields:
Expand All @@ -120,4 +125,30 @@ fields:

### prefix

Setting a `prefix` allows you to make the range slider display even more user-friendly. The prefix will be prepended to the sliders number display (even though it will not be added to the stored value). This is especially useful for adding money symbols when using the range slider to pick prices (see below). The `prefix` and `postfix` options may also be used together.

```yaml
fields:
text:
label: Product Price
type: rangeslider
min: 1
max: 99
step: 0.01
prefix: "$ "
```

### postfix

As with the `prefix` option, setting a `postfix` allows you to make the range slider display more user-friendly. The postfix will be appended to the sliders number display (even though it will not be added to the stored value). This is especially useful for adding any kind of unit (durations, distances, etc.) when using the range slider to pick these (see below). The `prefix` and `postfix` options may also be used together.

```yaml
fields:
text:
label: Event Duration
type: rangeslider
min: 1
max: 7
step: 1
postfix: " days"
```
2 changes: 1 addition & 1 deletion assets/css/rangeslider.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Range Slider Field for Kirby 2
*
* @version 1.0.0-rc.1
* @version 1.0.0
* @author Jonas Döbertin <hello@jd-powered.net>
* @copyright Jonas Döbertin <hello@jd-powered.net>
* @link https://github.com/JonasDoebertin/kirby-range-slider
Expand Down
2 changes: 1 addition & 1 deletion assets/js/rangeslider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Range Slider Field for Kirby 2
*
* @version 1.0.0-rc.1
* @version 1.0.0
* @author Jonas Döbertin <hello@jd-powered.net>
* @copyright Jonas Döbertin <hello@jd-powered.net>
* @link https://github.com/JonasDoebertin/kirby-range-slider
Expand Down
2 changes: 1 addition & 1 deletion rangeslider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Range Slider Field for Kirby 2
*
* @version 1.0.0-rc.1
* @version 1.0.0
* @author Jonas Döbertin <hello@jd-powered.net>
* @copyright Jonas Döbertin <hello@jd-powered.net>
* @link https://github.com/JonasDoebertin/kirby-range-slider
Expand Down

0 comments on commit 82fc4fb

Please sign in to comment.