sortablelabel-js 2.0 → 2.1

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: 076c2fc366c4647abbd5651a889adbcc9056f12b
4
- data.tar.gz: 707d95a4fe9752e837a30b385c9e79ec2821fc85
3
+ metadata.gz: d4fb0f60698d0d20dbfc51b2763fb9d78ee540e4
4
+ data.tar.gz: 9492f92c37457a49d7d98f87772a3a218599fcca
5
5
  SHA512:
6
- metadata.gz: 2ec95c40738fd473d417b1817066787e367ec616fbb78d76c7978dae4a95307e145b072e6c546aa520816a38599befbb53801d3c3e209fb781c15cea9226fd3b
7
- data.tar.gz: 9e90fba5c89dc1ac134dd3c3fa42be238152e73d27de5820d18a9afa5038c2c846b44d6de4df43fce2dd3c60731f647b1d70305c98371affb4a31038c9b32684
6
+ metadata.gz: 0f9b50dd7b03f40d8e75d7502a6de6fc04f714c1b1a147b7c96bcf28b39efe1f1da32483bd10a3dd331f182087b222dc3824c362c04a4e8182132a5693d2c25b
7
+ data.tar.gz: c3df6e1948d309bc1d976f98a4b832a01eb36138e9610d5edbf966fc9a53ec728f3d4d429d8ebac5990c45a893bca646e279b331ab00925a3717ea8b668fb749
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sortablelabel-js (2.0)
4
+ sortablelabel-js (2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  module Sortablelabel
2
2
  module Js
3
- VERSION = "2.0"
3
+ VERSION = "2.1"
4
4
  end
5
5
  end
@@ -15,16 +15,20 @@ class @SortableLabel
15
15
  @targetId = @options['fieldName'] || @target.attr('id')
16
16
  @stop_callback = @options["stop"]
17
17
  @initSortByPosition()
18
- @calInitStepLable()
18
+ @calStepLable()
19
19
  if $(".sortable-label-#{@targetId}").size() == 0
20
20
  $(document).on("nested:fieldAdded:#{@targetId}", (event) =>
21
21
  @calStepLable()
22
+ if typeof(@stop_callback) == 'function'
23
+ @stop_callback.call(@target)
22
24
  if @options['nestedTarget']
23
25
  @options['nestedTarget'].call(@target)
24
26
  )
25
27
 
26
28
  $(document).on("nested:fieldRemoved:#{@targetId}", (event) =>
27
29
  @calStepLable()
30
+ if typeof(@stop_callback) == 'function'
31
+ @stop_callback.call(@target)
28
32
  )
29
33
 
30
34
  if !@target.hasClass("sortable-label-#{@targetId}")
@@ -137,11 +141,6 @@ class @SortableLabel
137
141
  )
138
142
  )
139
143
 
140
- calInitStepLable: ->
141
- this.calLabel(this.options['removeField']+'[value=false]')
142
- if this.options['weekGroupLabelTarget']
143
- this.calWeekGroupLabel(this.options['weekGroupLabelTarget'])
144
-
145
144
  calStepLable: ->
146
145
  this.calLabel(this.options['removeField']+'[value=false]')
147
146
  if this.options['weekGroupLabelTarget']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sortablelabel-js
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.0'
4
+ version: '2.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - BenZhang