sortablelabel-js 0.2 → 0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07733852ec9bcfa1a0eb47efd0f1298858fcdc3a
|
4
|
+
data.tar.gz: 1ccb786108c52d45399be49c47239d9035363f1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2dcb66f162fde50af2d15801f489d9ef490b505eab5ea9e51e12e3c28243591a1e3173c60812e23db39a32784270f8d72b4e76f868dc30b82b54af8b4ff81b1
|
7
|
+
data.tar.gz: 890ccf361aa1c413ce7cfcfe11dfb75a16eabf87154b1b62a520da17f1467319446262c3236950b241b0230e93cf309763d7a3a316626696f6702345471ad5d7
|
@@ -49,12 +49,12 @@ class @SortableLabel
|
|
49
49
|
calInitStepLable: ->
|
50
50
|
this.calLabel(this.options['removeField']+'[value=false]')
|
51
51
|
if this.options['weekGroupLabelTarget']
|
52
|
-
this.calWeekGroupLabel(this.options['weekGroupLabelTarget']
|
52
|
+
this.calWeekGroupLabel(this.options['weekGroupLabelTarget'])
|
53
53
|
|
54
54
|
calStepLable: ->
|
55
55
|
this.calLabel(this.options['removeField']+'[value=false]')
|
56
56
|
if this.options['weekGroupLabelTarget']
|
57
|
-
this.calWeekGroupLabel(this.options['weekGroupLabelTarget']
|
57
|
+
this.calWeekGroupLabel(this.options['weekGroupLabelTarget'])
|
58
58
|
|
59
59
|
calLabel: (target) ->
|
60
60
|
_this = this
|
@@ -84,16 +84,12 @@ class @SortableLabel
|
|
84
84
|
)
|
85
85
|
)
|
86
86
|
|
87
|
-
calWeekGroupLabel: (target
|
87
|
+
calWeekGroupLabel: (target) ->
|
88
88
|
_this = this
|
89
89
|
week_group_label_list = []
|
90
90
|
$(@target).each(->
|
91
91
|
$(this).find(target).each(->
|
92
|
-
tempLabel =
|
93
|
-
if is_first
|
94
|
-
tempLabel = $(this).text()
|
95
|
-
else
|
96
|
-
tempLabel = $(this).text().substr(0, $(this).text().lastIndexOf(' '))
|
92
|
+
tempLabel = $(this).text()
|
97
93
|
_index = _this.isIncludeWeekGroup(tempLabel, week_group_label_list)
|
98
94
|
if _index is -1
|
99
95
|
week_group_label_list.push(
|
@@ -108,7 +104,7 @@ class @SortableLabel
|
|
108
104
|
)
|
109
105
|
|
110
106
|
isIncludeWeekGroup: (item, arr)->
|
111
|
-
if item == " "
|
107
|
+
if item == " " || item.trim() == ""
|
112
108
|
return -2
|
113
109
|
for _item, index in arr
|
114
110
|
return index if _item.name is item
|