sortablelabel-js 1.4 → 1.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f5a937172c547979e71a03e028676820ccf4bca
|
4
|
+
data.tar.gz: 53e8cd388c11dad6cfe7d7b11d2e5ab13e9589df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53d277d12bb8e32b90bfc433554cf71e4898dfa4c5d4e3d4af8946457d2c19ce800598e1af3d43e39d9992e0bd01499f8f5e5a813f3f31232ef70790eae737ab
|
7
|
+
data.tar.gz: 71d36fe3dd07062d08f86309b6538f6bacaab66e4363a04b14b72443b09b1114dfa85db39cc6b975b00c72f79d8fe2a3249b5cf5f6abc6b4ad7bec0abc95c144
|
@@ -6,7 +6,7 @@ class @SortableLabel
|
|
6
6
|
positionTarget: '.position-field'
|
7
7
|
nestedTarget: null
|
8
8
|
removeField: "input[id$='_destroy']"
|
9
|
-
label:
|
9
|
+
label: null
|
10
10
|
minimun: 0
|
11
11
|
|
12
12
|
constructor: (scope, options) ->
|
@@ -166,6 +166,9 @@ class @SortableLabel
|
|
166
166
|
alert("Field name can't be empty!")
|
167
167
|
else if typeof(_this.options['label']) == 'function'
|
168
168
|
$(this).closest('.fields').find(_this.options['labelTarget']).html(_this.options['label'].call($(this).closest('.fields').find(_this.options['labelTarget']), stepCount))
|
169
|
+
else
|
170
|
+
labelContent = $(this).closest('.fields').find(_this.options['labelTarget']).text()
|
171
|
+
$(this).closest('.fields').find(_this.options['labelTarget']).html("#{labelContent} #{stepCount}")
|
169
172
|
stepCount += 1
|
170
173
|
)
|
171
174
|
)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sortablelabel-js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.5'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|