maj-text-counter-rails 0.0.15 → 1.0.0
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 +8 -8
- data/Gemfile.lock +2 -2
- data/LICENSE.txt +1 -1
- data/README.md +56 -10
- data/lib/maj-text-counter-rails/version.rb +1 -1
- data/vendor/assets/javascripts/maj-text-counter.coffee +1 -4
- metadata +1 -2
- data/lib/maj-text-counter-rails/engine.rb +0 -9
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGM1MDQ1ODg1ODZkMmVmMThjZDhlYWJhZDY4YzI2OWY4ZDFjNWZlNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjBjNDYyYjM3MWNmYjdmMjE2MmQ5ZDFmYTAxNmU5MTdmMzljNTNmNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzM5ZWFhYjhmNjRmZjAyNjgzZjJjMjY1MmNkYTg0NDJiZmNmNGViNTVlNGVj
|
10
|
+
ZDg1NDMxYzkzN2MxMWNhYzFlODJiMmYzNTQyODkxZTY3MTRmY2I0Zjg3ZTFl
|
11
|
+
YzhkMmZiZjBkZGMxZDNlMDUzZDc4NzRlYjEwOWE5NzU4YTViN2Q=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjJlZTExZWQ5ZGNhNDNkNGJjN2Y4OTMwMzBlYjhlZjlkNTFmYjFjNDk3ODRh
|
14
|
+
YTE4ZDYyNTM0YTBiN2E4NWYxZDFiMjg5ZGI2ZTkxZDM1YjNiMjU5NDQ5ZWEw
|
15
|
+
MTMyMTQwNjZjOWFiZDM2OTY4MGNiZDkwN2I0NmFjYmIxMTZiYzE=
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
maj-text-counter-rails (0.0
|
4
|
+
maj-text-counter-rails (1.0.0)
|
5
5
|
coffee-rails (~> 4.0)
|
6
6
|
compass-rails (~> 2.0)
|
7
7
|
railties (~> 4.0)
|
@@ -38,7 +38,7 @@ GEM
|
|
38
38
|
tzinfo (~> 1.1)
|
39
39
|
arel (5.0.1.20140414130214)
|
40
40
|
builder (3.2.2)
|
41
|
-
chunky_png (1.3.
|
41
|
+
chunky_png (1.3.3)
|
42
42
|
coffee-rails (4.0.1)
|
43
43
|
coffee-script (>= 2.2.0)
|
44
44
|
railties (>= 4.0.0, < 5.0)
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,24 +1,65 @@
|
|
1
|
-
# MajTextCounter
|
1
|
+
# MajTextCounter for rails asset pipeline
|
2
2
|
|
3
|
-
|
3
|
+
[MajTextCounter](https://github.com/supernini/majTextCounter) is a library for counting and limiting characters/words on text input, or textarea, elements (using .val()).
|
4
|
+
|
5
|
+
The `maj-text-counter-rails` gem integrates the `MajTextCounter` with the Rails asset pipeline.
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
7
|
-
|
9
|
+
Include `chosen-rails` in Gemefile
|
10
|
+
|
11
|
+
```rb
|
12
|
+
gem 'majTextCounter-rails'
|
13
|
+
```
|
8
14
|
|
9
|
-
|
15
|
+
Then run `bundle install`
|
10
16
|
|
11
|
-
|
17
|
+
## Usage
|
12
18
|
|
13
|
-
|
19
|
+
Add to your `app/assets/javascripts/application.js` if use with jQuery
|
14
20
|
|
15
|
-
|
21
|
+
```coffee
|
22
|
+
//= require maj-text-counter
|
23
|
+
```
|
16
24
|
|
17
|
-
|
25
|
+
Add to your `app/assets/stylesheets/application.css`
|
18
26
|
|
19
|
-
|
27
|
+
```scss
|
28
|
+
*= require maj-text-counter
|
29
|
+
```
|
30
|
+
|
31
|
+
Basic usage:
|
32
|
+
|
33
|
+
```javascript
|
34
|
+
$('input').majTextCounter();
|
35
|
+
```
|
36
|
+
|
37
|
+
Limit to a maximum words count:
|
20
38
|
|
21
|
-
|
39
|
+
```javascript
|
40
|
+
$('input').majTextCounter({
|
41
|
+
wordLimit: 10,
|
42
|
+
});
|
43
|
+
```
|
44
|
+
|
45
|
+
Limit to a maximum caracters count:
|
46
|
+
|
47
|
+
```javascript
|
48
|
+
$('input').majTextCounter({
|
49
|
+
carLimit: 10,
|
50
|
+
});
|
51
|
+
```
|
52
|
+
|
53
|
+
Speak french ?:
|
54
|
+
|
55
|
+
```javascript
|
56
|
+
$('input').majTextCounter({
|
57
|
+
words: "mots",
|
58
|
+
letters: "lettres",
|
59
|
+
separator: " & ",
|
60
|
+
maximum: "MAX :",
|
61
|
+
});
|
62
|
+
```
|
22
63
|
|
23
64
|
## Contributing
|
24
65
|
|
@@ -27,3 +68,8 @@ TODO: Write usage instructions here
|
|
27
68
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
69
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
70
|
5. Create new Pull Request
|
71
|
+
|
72
|
+
|
73
|
+
## Authors
|
74
|
+
|
75
|
+
[miseajour.net](http://www.miseajour.net)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maj-text-counter-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Supernini
|
@@ -122,7 +122,6 @@ files:
|
|
122
122
|
- README.md
|
123
123
|
- Rakefile
|
124
124
|
- lib/maj-text-counter-rails.rb
|
125
|
-
- lib/maj-text-counter-rails/engine.rb
|
126
125
|
- lib/maj-text-counter-rails/version.rb
|
127
126
|
- maj-text-counter-rails-0.0.2.gem
|
128
127
|
- maj-text-counter-rails.gemspec
|