rest_in_place_bootstrap_slider 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9da617c3ce664f4c7336a615ee4c87c28ec2fd79
4
- data.tar.gz: c48dfd971fd30099a91915db61923eea0d131070
3
+ metadata.gz: 6b9fbd90a188f7253d7b94ab22001b71d8def31c
4
+ data.tar.gz: 0f7c3d7781e074f937e4127b029b990970527699
5
5
  SHA512:
6
- metadata.gz: 76f62a072ba3533b566b99c8751c5d36bcf0d54c0f10127e43184bd626f0f05b94f44b5716dd10b64de473c2014b81e3bdff746a6c1b36133ea4f1538b1660c0
7
- data.tar.gz: 56c2c86263e1d9c7ac259c61367f868a5903d5a0b66f7586fc070ee476920a7e6d5d9f5759cdd2aa96b7bcb0757dbfb831a0df2380840c9689a3e87f5281e3c2
6
+ metadata.gz: 3e1ab561fdc929982b31cc761fc8579e87f8725df487ea32ad6eb60cafbd7be22f8525ea76b4c0a82d3a57d196257f422ba4df6cabd873e184c58d1cd51f72a4
7
+ data.tar.gz: 90facb30cfb496f1c03cca3117d3bebfc2c1fcf0382569fa3755f599c09f1785b1a07a2ac859aa67f5691c84f61aaf852dc862677447836465206d482d4c2ae5
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # RestInPlaceBootstrapSlider
1
+ # rest_in_place_bootstrap_slider
2
2
 
3
3
  An AJAX Inplace-Editor + Bootstrap-Slider for the Rails 3.1+ asset pipeline.
4
4
 
@@ -17,18 +17,9 @@ For the styling of the slider you'll need to setup a proper twitter bootstrap en
17
17
 
18
18
  Add this lines to your application's Gemfile:
19
19
 
20
- gem 'rest_in_place_bootstrap_slider'
21
-
20
+ gem 'rest_in_place_bootstrap_slider'
22
21
  gem 'bootstrap-sass' # or any other bootstrap gem
23
22
 
24
- And then execute:
25
-
26
- $ bundle
27
-
28
- Or install it yourself as:
29
-
30
- $ gem install rest_in_place_bootstrap_slider
31
-
32
23
  Example `application.js.coffee`:
33
24
 
34
25
  //= require bootstrap
@@ -43,7 +34,27 @@ Example `application.css.scss`:
43
34
 
44
35
  ## Usage
45
36
 
46
- TODO: Write usage instructions here
37
+ The following example snippet provides an inline editor for a `User#age` attribute and a slider control. The User model must be exposed via RESTful JSON API (just like the one generated by `rails g scaffold Users`).
38
+
39
+ <p class="rest-in-place-slider">
40
+ <strong>Age:</strong>
41
+ <span class="rest-in-place"
42
+ data-url="<%= url_for(@user) %>"
43
+ data-object="user"
44
+ data-attribute="age">
45
+ <%= @user.age %>
46
+ </span>
47
+ <input class="slider"
48
+ data-slider-id="user-<%= @user.id %>-age"
49
+ type="text" data-slider-min="0"
50
+ data-slider-max="199"
51
+ data-slider-step="1"
52
+ data-slider-value="<%= @user.age %>" />
53
+ </p>
54
+
55
+ The [TestApp](TestApp) contains a full rails app with a working [HTML example](TestApp/app/views/users/show.html.erb).
56
+
57
+ See [rest_in_place](http://github.com/janv/rest_in_place/) and [bootstrap-slider-rails](https://github.com/utahstreetlabs/bootstrap-slider-rails) for more detailed instructions about their APIs.
47
58
 
48
59
  ## Contributing
49
60
 
@@ -25,7 +25,7 @@ class RestInPlaceSlider
25
25
  bindSliderInput : () ->
26
26
  @$sliderInput
27
27
  .slider()
28
- .on('slide', @sliderInputUpdatedHandler)
28
+ .on('slideStop', @sliderInputUpdatedHandler)
29
29
 
30
30
  bindTextInput : () ->
31
31
  @$textInput.bind('success.rest-in-place', @textInputUpdatedHandler)
@@ -1,3 +1,3 @@
1
1
  module RestInPlaceBootstrapSlider
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest_in_place_bootstrap_slider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Bissinger