sortablelabel-js 0.6 → 0.7
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 +4 -4
- data/lib/sortablelabel/js/version.rb +1 -1
- data/package.json +3 -2
- data/vendor/assets/javascripts/sortable_label.coffee +12 -6
- 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: bcb174b958a8a05fee37c0844a832d103c61cccb
|
|
4
|
+
data.tar.gz: 10949d6831b2cf476692e8346111269f6a0598ae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dffdbef8491ea6d7a8bee685054bbfdf4a0ab591fb5e9d1ca8c1cb28744d97554d50321184e5c83cbbb851f38ae9205d1029edd9e5894551d3c09ed303171b1c
|
|
7
|
+
data.tar.gz: dfa77cd4520b257a8c06153f8480ae41d9681e20f0fd90469dbb181eebaf1229d056a4ec10939f133a9f3e78b2cd40b15cba9977baeb928ef1ca1ff3b3684f0e
|
data/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "Extension of jquery-sortable javascript library",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "./node_modules/karma/bin/karma start my.conf.js",
|
|
7
|
+
"test": "./node_modules/karma/bin/karma start my.conf.js --reporters nyan",
|
|
8
8
|
"dependency": "npm install | bower install"
|
|
9
9
|
},
|
|
10
10
|
"author": "",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"karma-coffee-preprocessor": "^1.0.1",
|
|
17
17
|
"karma-coverage": "^1.1.1",
|
|
18
18
|
"karma-jasmine": "^1.1.0",
|
|
19
|
-
"karma-jasmine-jquery": "^0.1.1"
|
|
19
|
+
"karma-jasmine-jquery": "^0.1.1",
|
|
20
|
+
"karma-nyan-reporter": "^0.2.5"
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -4,11 +4,9 @@ class @SortableLabel
|
|
|
4
4
|
sortableItem: '> div.fields'
|
|
5
5
|
labelTarget: 'label'
|
|
6
6
|
positionTarget: '.position-field'
|
|
7
|
-
subPositionTarget: '.sub-position-field'
|
|
8
7
|
nestedTarget: null
|
|
9
8
|
removeField: "input[id$='_destroy']"
|
|
10
9
|
label: 'Step '
|
|
11
|
-
groupLabel: 'Group'
|
|
12
10
|
minimun: 0
|
|
13
11
|
|
|
14
12
|
constructor: (scope, options) ->
|
|
@@ -98,12 +96,20 @@ class @SortableLabel
|
|
|
98
96
|
name: tempLabel,
|
|
99
97
|
count: 1
|
|
100
98
|
)
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
if typeof _this.options['subPositionTarget'] == 'string'
|
|
100
|
+
$(this).closest('.fields').find(_this.options['subPositionTarget']).val(1)
|
|
101
|
+
if typeof _this.options['groupLabel'] == 'string'
|
|
102
|
+
$(this).html("<i class='fa fa-trophy fa-fw small-opacity-30'></i>" + tempLabel + " " + _this.options['groupLabel'] + " 1")
|
|
103
|
+
else
|
|
104
|
+
$(this).html("<i class='fa fa-trophy fa-fw small-opacity-30'></i>" + tempLabel)
|
|
103
105
|
else if _index > -1
|
|
104
106
|
week_group_label_list[_index].count += 1
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
if typeof _this.options['subPositionTarget'] == 'string'
|
|
108
|
+
$(this).closest('.fields').find(_this.options['subPositionTarget']).val(week_group_label_list[_index].count)
|
|
109
|
+
if typeof _this.options['groupLabel'] == 'string'
|
|
110
|
+
$(this).html("<i class='fa fa-trophy fa-fw small-opacity-30'></i>" + tempLabel + " " + _this.options['groupLabel'] + " " + week_group_label_list[_index].count)
|
|
111
|
+
else
|
|
112
|
+
$(this).html("<i class='fa fa-trophy fa-fw small-opacity-30'></i>" + tempLabel)
|
|
107
113
|
)
|
|
108
114
|
)
|
|
109
115
|
|
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.7'
|
|
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-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|