sortablelabel-js 0.3 → 0.4
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: 45d3630a00b1f5ee6383877574702981bae6b08d
|
4
|
+
data.tar.gz: 3c22746f6e44036b9a264ed2b0472fab806f2911
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a94966a2d30916c07b46378e91be52b221bdc1da8ac864ff1d2d1c4553c729b2598b72e3577dc875ad4a4be09cf8f77ff3616eda3e872c252e4b98642832f9e
|
7
|
+
data.tar.gz: 1a1af8ebcccef936e778cd8e0dc3a517cef8eb98f54b80b55ba56f95dbd2f52943eacf492bbe1a4404b8dd4cce8916dceb0f3cd46992ede0c4693de7a61e6f90
|
@@ -61,13 +61,14 @@ class @SortableLabel
|
|
61
61
|
$(@target).each(->
|
62
62
|
stepCount = 1
|
63
63
|
$(this).find(target).each( ->
|
64
|
+
$(this).closest('.fields').find(_this.options['positionTarget']).val(stepCount)
|
64
65
|
if typeof(_this.options['label']) == 'string'
|
65
|
-
if _this.options['label'].trim() == 'Day'
|
66
|
-
$(this).closest('.fields').find(_this.options['labelTarget']).html(_this.dayOfWeek(stepCount
|
67
|
-
stepCount += 1
|
66
|
+
if _this.options['label'].trim() == 'Day'
|
67
|
+
$(this).closest('.fields').find(_this.options['labelTarget']).html(_this.dayOfWeek(stepCount))
|
68
|
+
stepCount += 1
|
68
69
|
else
|
69
70
|
if _this.options['fieldName']
|
70
|
-
if $(this).
|
71
|
+
if $(this).parent().find('.remove_nested_fields').data('association') == _this.options['fieldName']
|
71
72
|
$(this).closest('.fields').find(_this.options['labelTarget']).html(_this.options['label'] + stepCount)
|
72
73
|
stepCount += 1
|
73
74
|
else
|
@@ -75,7 +76,6 @@ class @SortableLabel
|
|
75
76
|
else if typeof(_this.options['label']) == 'function'
|
76
77
|
$(this).closest('.fields').find(_this.options['labelTarget']).html(_this.options['label'].call($(this).closest('.fields').find(_this.options['labelTarget']), stepCount))
|
77
78
|
stepCount += 1
|
78
|
-
$(this).closest('.fields').find(_this.options['positionTarget']).val(stepCount)
|
79
79
|
if _this.options['minimun'] >= stepCount
|
80
80
|
$(this).closest('.fields').find('.remove_nested_fields').hide();
|
81
81
|
else
|
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: '0.
|
4
|
+
version: '0.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|