the_sortable_tree 1.7.1 → 1.8.0

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.
data/README.md CHANGED
@@ -58,7 +58,9 @@ Read project wiki for looking ERB partials
58
58
  **By default I'm use HAML, and now you should define it manually in your Gemfile.**
59
59
 
60
60
  ### Install
61
+
61
62
  gem 'haml'
63
+ gem 'awesome_nested_set' # gem 'nested_set'
62
64
  gem 'the_sortable_tree'
63
65
 
64
66
  bundle
@@ -69,42 +71,17 @@ bundle
69
71
  2. gem 'haml'
70
72
  3. JQuery UI
71
73
 
72
- ### Options
73
-
74
- **id** - id field (:id => :friendly_id etc. **:id** by default)
75
-
76
- **title** - title field of node (:title => :name etc. **:title** by default)
77
-
78
- **path** - path to custom view partials (:path => 'pages/the_sortable_tree')
79
-
80
- **max_levels** - how many draggable levels can be? (**3** by default). **Can't be 0 (zero) and negative**
81
-
82
- **namespace** - namespace for admin sections for example. (:namespace => :admin, **:namespace** => nil by default)
83
-
84
- **opts[:level]** - view helper define level of recursion for each node. You can call **opts[:level]** into view partials
85
-
86
- ### Partials
87
-
88
- **_tree** - root container for nested set elements
89
-
90
- **_node** - element of tree (link to current node and nested set of children)
91
-
92
- **_link** - decoration of link to current element of tree
93
-
94
- **_children** - decoration of children
95
-
96
- **_new** - create new element link
97
-
98
- **_controls** - control elements for current node
74
+ ### Example of using with Page Model
99
75
 
76
+ ### Jquery
100
77
 
101
- **_js_init_sortable_tree** - JS for sortable tree
78
+ **app/assets/javascripts/application.js**
102
79
 
103
- **_js_on_update_tree**- JS for sortable tree
104
-
105
- **_js_rebuild_ajax**- JS for sortable tree
106
-
107
- ### Example of using with Page Model
80
+ ``` ruby
81
+ //= require jquery
82
+ //= require jquery-ui
83
+ //= require jquery_ujs
84
+ ```
108
85
 
109
86
  ### Extend your Model
110
87
 
@@ -255,6 +232,45 @@ Customize and use it!
255
232
  = sortable_tree @pages, :new_url => new_page_path, :path => 'pages/the_sortable_tree', :max_levels => 2
256
233
  ```
257
234
 
235
+ ### LiveDemo
236
+
237
+ https://github.com/the-teacher/the_sortable_tree_test_app
238
+
239
+ ### Options
240
+
241
+ **id** - id field (:id => :friendly_id etc. **:id** by default)
242
+
243
+ **title** - title field of node (:title => :name etc. **:title** by default)
244
+
245
+ **path** - path to custom view partials (:path => 'pages/the_sortable_tree')
246
+
247
+ **max_levels** - how many draggable levels can be? (**3** by default). **Can't be 0 (zero) and negative**
248
+
249
+ **namespace** - namespace for admin sections for example. (:namespace => :admin, **:namespace** => nil by default)
250
+
251
+ **opts[:level]** - view helper define level of recursion for each node. You can call **opts[:level]** into view partials
252
+
253
+ ### Partials
254
+
255
+ **_tree** - root container for nested set elements
256
+
257
+ **_node** - element of tree (link to current node and nested set of children)
258
+
259
+ **_link** - decoration of link to current element of tree
260
+
261
+ **_children** - decoration of children
262
+
263
+ **_new** - create new element link
264
+
265
+ **_controls** - control elements for current node
266
+
267
+
268
+ **_js_init_sortable_tree** - JS for sortable tree
269
+
270
+ **_js_on_update_tree**- JS for sortable tree
271
+
272
+ **_js_rebuild_ajax**- JS for sortable tree
273
+
258
274
  ### Contributors
259
275
 
260
276
  * https://github.com/the-teacher
@@ -1,5 +1,11 @@
1
+ ol.nested_set * {
2
+ margin: 0; padding: 0;
3
+ list-style:none;
4
+ }
1
5
  .nested_set{
2
6
  padding: 0;
7
+ list-style:none;
8
+ font-size: 16px;
3
9
  }
4
10
  .nested_set ol{
5
11
  margin:0 0 0 25px;
@@ -1,8 +1,18 @@
1
+ ol.nested_set_min * {
2
+ margin: 0; padding: 0;
3
+ list-style:none;
4
+ }
5
+ ol.nested_set_min {
6
+ list-style:none;
7
+ font-size: 16px;
8
+ }
1
9
  ol.nested_set_min li{
2
- font-size: 1.4em;
10
+ font-size: 0.9em;
3
11
  line-height: 130%;
4
12
  margin-bottom: 5px;
5
13
  font-weight: bold;
14
+ list-style:none;
15
+ list-style-position: outside;
6
16
  }
7
17
  ol.nested_set_min ol{
8
18
  border-left: 1px dashed #AAA;
@@ -1,3 +1,3 @@
1
1
  module TheSortableTree
2
- VERSION = "1.7.1"
2
+ VERSION = "1.8.0"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_sortable_tree
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 55
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 7
9
- - 1
10
- version: 1.7.1
8
+ - 8
9
+ - 0
10
+ version: 1.8.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ilya N. Zykin, Matthew Clark, Mikhail Dieterle
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-09 00:00:00 +04:00
19
- default_executable:
18
+ date: 2012-02-11 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: rails
@@ -168,7 +167,6 @@ files:
168
167
  - spec/dummy/app/assets/javascripts/application.js
169
168
  - spec/dummy/app/views/layouts/application.html.erb
170
169
  - spec/dummy/script/rails
171
- has_rdoc: true
172
170
  homepage: https://github.com/the-teacher/the_sortable_tree
173
171
  licenses: []
174
172
 
@@ -198,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
196
  requirements: []
199
197
 
200
198
  rubyforge_project: the_sortable_tree
201
- rubygems_version: 1.6.2
199
+ rubygems_version: 1.8.15
202
200
  signing_key:
203
201
  specification_version: 3
204
202
  summary: Drag&Drop GUI helper for awesome_nested_set gem. Sortable tree view helper