sortablelabel-js 0.5 → 0.6
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: 499e805b615f15f06b64abdab9207764b29040fe
|
4
|
+
data.tar.gz: fdda77defd0b39be9a123940486c3ef6d6c873bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 387c0b3402db0a0f035ba640a59cc0f35d67d967a7998e5dff7a36cbef32a282c09f4a980da82979999df5d90c44f780d6d37e9063633100c3d8dc82ba48571c
|
7
|
+
data.tar.gz: 2b3a2a8aacd20bb75301551fca93b52b74ee4f4f6443a47da6e03b9901379bc35bbe7abfe14223bf8f2cd55070b77290c8264007293ef63472fe0dc0f4a70002
|
@@ -4,9 +4,11 @@ class @SortableLabel
|
|
4
4
|
sortableItem: '> div.fields'
|
5
5
|
labelTarget: 'label'
|
6
6
|
positionTarget: '.position-field'
|
7
|
+
subPositionTarget: '.sub-position-field'
|
7
8
|
nestedTarget: null
|
8
9
|
removeField: "input[id$='_destroy']"
|
9
10
|
label: 'Step '
|
11
|
+
groupLabel: 'Group'
|
10
12
|
minimun: 0
|
11
13
|
|
12
14
|
constructor: (scope, options) ->
|
@@ -96,10 +98,12 @@ class @SortableLabel
|
|
96
98
|
name: tempLabel,
|
97
99
|
count: 1
|
98
100
|
)
|
99
|
-
$(this).
|
101
|
+
$(this).closest('.fields').find(_this.options['subPositionTarget']).val(1)
|
102
|
+
$(this).html("<i class='fa fa-trophy fa-fw small-opacity-30'></i>" + tempLabel + " " + _this.options['groupLabel'] + " 1")
|
100
103
|
else if _index > -1
|
101
104
|
week_group_label_list[_index].count += 1
|
102
|
-
$(this).
|
105
|
+
$(this).closest('.fields').find(_this.options['subPositionTarget']).val(week_group_label_list[_index].count)
|
106
|
+
$(this).html("<i class='fa fa-trophy fa-fw small-opacity-30'></i>" + tempLabel + " " + _this.options['groupLabel'] + " " + week_group_label_list[_index].count)
|
103
107
|
)
|
104
108
|
)
|
105
109
|
|