rails_admin_nestable 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,9 @@
|
|
1
1
|
module RailsAdminNestable
|
2
2
|
class Configuration
|
3
3
|
|
4
|
+
TREE_DEFAULT_OPTIONS = { enable_callback: false }
|
5
|
+
LIST_DEFAULT_OPTIONS = { position_field: :position, max_depth: 1, enable_callback: false }
|
6
|
+
|
4
7
|
def initialize(abstract_model)
|
5
8
|
@abstract_model = abstract_model
|
6
9
|
end
|
@@ -15,15 +18,9 @@ module RailsAdminNestable
|
|
15
18
|
|
16
19
|
def options
|
17
20
|
if tree?
|
18
|
-
@nestable_options ||=
|
19
|
-
enable_callback: false
|
20
|
-
})
|
21
|
+
@nestable_options ||= self.tree_options
|
21
22
|
elsif list?
|
22
|
-
@nestable_options ||=
|
23
|
-
position_field: :position,
|
24
|
-
max_depth: 1,
|
25
|
-
enable_callback: false
|
26
|
-
}.merge(list.class == Hash ? list : {})
|
23
|
+
@nestable_options ||= self.list_options
|
27
24
|
end
|
28
25
|
|
29
26
|
@nestable_options || {}
|
@@ -31,6 +28,14 @@ module RailsAdminNestable
|
|
31
28
|
|
32
29
|
protected
|
33
30
|
|
31
|
+
def tree_options
|
32
|
+
tree.class == Hash ? TREE_DEFAULT_OPTIONS.merge(tree) : TREE_DEFAULT_OPTIONS
|
33
|
+
end
|
34
|
+
|
35
|
+
def list_options
|
36
|
+
LIST_DEFAULT_OPTIONS.merge(list.class == Hash ? list : {})
|
37
|
+
end
|
38
|
+
|
34
39
|
def tree
|
35
40
|
@nestable_tree ||= ::RailsAdmin::Config.model(@abstract_model.model).nestable_tree
|
36
41
|
end
|
metadata
CHANGED
@@ -1,104 +1,93 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_nestable
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 4
|
9
|
+
version: 0.1.4
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
11
|
+
authors:
|
8
12
|
- Andrea Dal Ponte
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
|
17
|
+
date: 2013-04-11 00:00:00 +02:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: rails
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '3.1'
|
22
|
-
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
-
|
31
|
-
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0'
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 3
|
29
|
+
- 1
|
30
|
+
version: "3.1"
|
38
31
|
type: :runtime
|
32
|
+
version_requirements: *id001
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rails_admin
|
39
35
|
prerelease: false
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
name: haml-rails
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
segments:
|
41
|
+
- 0
|
42
|
+
version: "0"
|
54
43
|
type: :runtime
|
44
|
+
version_requirements: *id002
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: haml-rails
|
55
47
|
prerelease: false
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
name: coffee-rails
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ! '>='
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
48
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
segments:
|
53
|
+
- 0
|
54
|
+
version: "0"
|
70
55
|
type: :runtime
|
56
|
+
version_requirements: *id003
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: coffee-rails
|
71
59
|
prerelease: false
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
name: sass-rails
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ! '>='
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '0'
|
60
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
segments:
|
65
|
+
- 0
|
66
|
+
version: "0"
|
86
67
|
type: :runtime
|
68
|
+
version_requirements: *id004
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sass-rails
|
87
71
|
prerelease: false
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
72
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
segments:
|
77
|
+
- 0
|
78
|
+
version: "0"
|
79
|
+
type: :runtime
|
80
|
+
version_requirements: *id005
|
81
|
+
description: Rails Admin plugin to organise Tree/List models with a simple drag and drop custom action
|
82
|
+
email:
|
97
83
|
- info@andreadalponte.com
|
98
84
|
executables: []
|
85
|
+
|
99
86
|
extensions: []
|
87
|
+
|
100
88
|
extra_rdoc_files: []
|
101
|
-
|
89
|
+
|
90
|
+
files:
|
102
91
|
- app/assets/javascripts/rails_admin/jquery.nestable.js
|
103
92
|
- app/assets/javascripts/rails_admin/rails_admin_nestable.js.coffee
|
104
93
|
- app/assets/stylesheets/rails_admin/rails_admin_nestable.css.scss
|
@@ -116,28 +105,35 @@ files:
|
|
116
105
|
- MIT-LICENSE
|
117
106
|
- Rakefile
|
118
107
|
- README.md
|
108
|
+
has_rdoc: true
|
119
109
|
homepage: https://github.com/dalpo/rails_admin_nestable
|
120
110
|
licenses: []
|
111
|
+
|
121
112
|
post_install_message:
|
122
113
|
rdoc_options: []
|
123
|
-
|
114
|
+
|
115
|
+
require_paths:
|
124
116
|
- lib
|
125
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
requirements:
|
134
|
-
- -
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
segments:
|
122
|
+
- 0
|
123
|
+
version: "0"
|
124
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
segments:
|
129
|
+
- 0
|
130
|
+
version: "0"
|
137
131
|
requirements: []
|
132
|
+
|
138
133
|
rubyforge_project:
|
139
|
-
rubygems_version: 1.
|
134
|
+
rubygems_version: 1.3.6
|
140
135
|
signing_key:
|
141
136
|
specification_version: 3
|
142
137
|
summary: Reorganise model data with a drag and drop tree/list structure
|
143
138
|
test_files: []
|
139
|
+
|