sortablelabel-js 0.7 → 0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sortablelabel/js/version.rb +1 -1
- data/vendor/assets/javascripts/sortable_label.coffee +7 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cfe5fd7777bb9bfdc7b102445eb9286b1f3e7b3
|
4
|
+
data.tar.gz: ba6bfb11bccc583cfd89c0a1f7cd92eb7337e33a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bc193fb82ff8c8f48b62a9feed721e417295bf32ce57ca5ad2db439f469c55861600bdb55262477a28ad235ccab235682bcc0fb363072db676537f7bcb488ee
|
7
|
+
data.tar.gz: 66def897877720149551efc2fcccd8762891310ee77c0309a4537783dc4fceba8103d39aac86eb4d7e13afeb177c13778259b5d9c4fa00e4d26b26b2fb058e43
|
@@ -61,26 +61,23 @@ class @SortableLabel
|
|
61
61
|
$(@target).each(->
|
62
62
|
stepCount = 1
|
63
63
|
$(this).find(target).each( ->
|
64
|
+
if _this.options['minimun'] >= stepCount
|
65
|
+
$(this).closest('.fields').find('.remove_nested_fields').hide();
|
66
|
+
else
|
67
|
+
$(this).closest('.fields').find('.remove_nested_fields').show();
|
64
68
|
$(this).closest('.fields').find(_this.options['positionTarget']).val(stepCount)
|
65
69
|
if typeof(_this.options['label']) == 'string'
|
66
70
|
if _this.options['label'].trim() == 'Day'
|
67
|
-
$(this).closest('.fields').find(_this.options['labelTarget']).html(_this.dayOfWeek(stepCount - 1))
|
68
|
-
stepCount += 1
|
71
|
+
$(this).closest('.fields').find(_this.options['labelTarget']).html(_this.dayOfWeek(stepCount - 1))
|
69
72
|
else
|
70
73
|
if _this.options['fieldName']
|
71
74
|
if $(this).parent().find('.remove_nested_fields').data('association') == _this.options['fieldName']
|
72
75
|
$(this).closest('.fields').find(_this.options['labelTarget']).html(_this.options['label'] + stepCount)
|
73
|
-
stepCount += 1
|
74
76
|
else
|
75
|
-
|
77
|
+
alert("Field name can't be empty!")
|
76
78
|
else if typeof(_this.options['label']) == 'function'
|
77
79
|
$(this).closest('.fields').find(_this.options['labelTarget']).html(_this.options['label'].call($(this).closest('.fields').find(_this.options['labelTarget']), stepCount))
|
78
|
-
|
79
|
-
if _this.options['minimun'] >= stepCount
|
80
|
-
$(this).closest('.fields').find('.remove_nested_fields').hide();
|
81
|
-
else
|
82
|
-
$(this).closest('.fields').find('.remove_nested_fields').show();
|
83
|
-
|
80
|
+
stepCount += 1
|
84
81
|
)
|
85
82
|
)
|
86
83
|
|
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.8'
|
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-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|