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: 133834335558558247a311078d3b4b37fefa539b
4
- data.tar.gz: dc23c8b48047fcefb1cd6e1e4dae9e314221e752
3
+ metadata.gz: 4f5a937172c547979e71a03e028676820ccf4bca
4
+ data.tar.gz: 53e8cd388c11dad6cfe7d7b11d2e5ab13e9589df
5
5
  SHA512:
6
- metadata.gz: 6115e5e420c318138ec88640596e3944e954cb4c0e7e6f9d179069b0695cb9a3fc8f93835b70d486df775822ce7d8963ca0ac79fa90d423235cc028bc7ad7fa6
7
- data.tar.gz: 70a4c4f4fd9360c0dd173efe9616be2a3601ebb0de8041437b6357c50a543d6e024d1488a7c28264c75ef9b363abc20e0911d7e0b0f85bfaca55bd32eecc35dd
6
+ metadata.gz: 53d277d12bb8e32b90bfc433554cf71e4898dfa4c5d4e3d4af8946457d2c19ce800598e1af3d43e39d9992e0bd01499f8f5e5a813f3f31232ef70790eae737ab
7
+ data.tar.gz: 71d36fe3dd07062d08f86309b6538f6bacaab66e4363a04b14b72443b09b1114dfa85db39cc6b975b00c72f79d8fe2a3249b5cf5f6abc6b4ad7bec0abc95c144
@@ -1,5 +1,5 @@
1
1
  module Sortablelabel
2
2
  module Js
3
- VERSION = "1.4"
3
+ VERSION = "1.5"
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ class @SortableLabel
6
6
  positionTarget: '.position-field'
7
7
  nestedTarget: null
8
8
  removeField: "input[id$='_destroy']"
9
- label: 'Step '
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'
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-10 00:00:00.000000000 Z
11
+ date: 2018-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler