the_sortable_tree 2.6.1 → 2.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -5
  3. data/app/assets/javascripts/{expandable_tree → the_sortable_tree/expandable_tree}/hashchange.js.coffee +0 -0
  4. data/app/assets/javascripts/{expandable_tree → the_sortable_tree/expandable_tree}/initializer.js.coffee +0 -0
  5. data/app/assets/javascripts/{expandable_tree → the_sortable_tree/expandable_tree}/jquery.cookie.coffee +0 -0
  6. data/app/assets/javascripts/{expandable_tree → the_sortable_tree/expandable_tree}/restorable.js.coffee +0 -0
  7. data/app/assets/javascripts/{jquery.ui.nestedSortable.js → the_sortable_tree/jquery.ui.nestedSortable.js} +0 -0
  8. data/app/assets/javascripts/the_sortable_tree/sortable_ui/base.js.coffee +87 -0
  9. data/app/assets/javascripts/{sortable_tree → the_sortable_tree/sortable_ui}/initializer.js.coffee +14 -11
  10. data/app/assets/stylesheets/the_sortable_tree/expandable_tree.sass +23 -0
  11. data/app/assets/stylesheets/the_sortable_tree/sortable_ui/base.sass +36 -0
  12. data/app/assets/stylesheets/the_sortable_tree/tree.sass +35 -0
  13. data/app/helpers/render_expandable_tree_helper.rb +3 -3
  14. data/app/helpers/render_sortable_tree_helper.rb +30 -12
  15. data/app/helpers/render_tree_helper.rb +6 -5
  16. data/app/helpers/the_sortable_tree_helper.rb +3 -3
  17. data/gem_version.rb +1 -1
  18. data/spec/dummy_app/Gemfile +6 -3
  19. data/spec/dummy_app/README.md +26 -36
  20. data/spec/dummy_app/app/assets/javascripts/application.js +9 -13
  21. data/spec/dummy_app/app/assets/stylesheets/application.css +8 -9
  22. data/spec/dummy_app/app/views/admin/pages/index.html.haml +1 -3
  23. data/spec/dummy_app/app/views/admin/pages/manage.html.haml +2 -2
  24. data/spec/dummy_app/app/views/admin/pages/namespaced_link.html.haml +1 -1
  25. data/spec/dummy_app/app/views/admin/pages/node_manage.html.haml +1 -1
  26. data/spec/dummy_app/app/views/article_categories/index.html.haml +1 -1
  27. data/spec/dummy_app/app/views/article_categories/manage.html.haml +1 -1
  28. data/spec/dummy_app/app/views/inventory/categories/index.html.haml +1 -2
  29. data/spec/dummy_app/app/views/inventory/categories/manage.html.haml +1 -1
  30. data/spec/dummy_app/app/views/layouts/application.html.erb +5 -1
  31. data/spec/dummy_app/app/views/pages/expand.html.haml +1 -1
  32. data/spec/dummy_app/app/views/pages/expand_node.html.haml +1 -1
  33. data/spec/dummy_app/app/views/pages/index.html.haml +1 -2
  34. data/spec/dummy_app/app/views/pages/manage.html.haml +7 -6
  35. data/spec/dummy_app/app/views/pages/nested_options.html.haml +3 -2
  36. data/spec/dummy_app/app/views/welcome/index.html.haml +30 -29
  37. data/spec/dummy_app/bin/bundler +17 -0
  38. data/spec/dummy_app/bin/coderay +17 -0
  39. data/spec/dummy_app/bin/erubis +17 -0
  40. data/spec/dummy_app/bin/haml +17 -0
  41. data/spec/dummy_app/bin/html2haml +17 -0
  42. data/spec/dummy_app/bin/htmldiff +17 -0
  43. data/spec/dummy_app/bin/ldiff +17 -0
  44. data/spec/dummy_app/bin/nokogiri +17 -0
  45. data/spec/dummy_app/bin/pry +17 -0
  46. data/spec/dummy_app/bin/rackup +17 -0
  47. data/spec/dummy_app/bin/rails +17 -0
  48. data/spec/dummy_app/bin/rake +17 -0
  49. data/spec/dummy_app/bin/rspec +17 -0
  50. data/spec/dummy_app/bin/ruby_parse +17 -0
  51. data/spec/dummy_app/bin/ruby_parse_extract_error +17 -0
  52. data/spec/dummy_app/bin/sass +17 -0
  53. data/spec/dummy_app/bin/sass-convert +17 -0
  54. data/spec/dummy_app/bin/scss +17 -0
  55. data/spec/dummy_app/bin/sprockets +17 -0
  56. data/spec/dummy_app/bin/thor +17 -0
  57. data/spec/dummy_app/bin/tilt +17 -0
  58. metadata +55 -121
  59. data/app/assets/stylesheets/expandable_tree.scss +0 -26
  60. data/app/assets/stylesheets/nested_options.scss +0 -25
  61. data/app/assets/stylesheets/sortable_tree.scss +0 -108
  62. data/app/assets/stylesheets/tree.scss +0 -35
  63. data/app/views/sortable/client/_tree.html.erb +0 -9
  64. data/app/views/tree/client/_tree.html.erb +0 -23
  65. data/spec/dummy_app/Gemfile.lock +0 -210
  66. data/spec/dummy_app/_test/fixtures/admin/pages.yml +0 -7
  67. data/spec/dummy_app/_test/fixtures/article_categories.yml +0 -9
  68. data/spec/dummy_app/_test/fixtures/comments.yml +0 -13
  69. data/spec/dummy_app/_test/fixtures/inventory/categories.yml +0 -9
  70. data/spec/dummy_app/_test/functional/inventory/category_controller_test.rb +0 -14
  71. data/spec/dummy_app/_test/performance/browsing_test.rb +0 -12
  72. data/spec/dummy_app/_test/test_helper.rb +0 -13
  73. data/spec/dummy_app/_test/unit/admin/page_test.rb +0 -7
  74. data/spec/dummy_app/_test/unit/article_category_test.rb +0 -7
  75. data/spec/dummy_app/_test/unit/comment_test.rb +0 -7
  76. data/spec/dummy_app/_test/unit/helpers/inventory/category_helper_test.rb +0 -4
  77. data/spec/dummy_app/_test/unit/inventory/category_test.rb +0 -7
  78. data/spec/dummy_app/config/database.yml +0 -7
  79. data/spec/dummy_app/db/development.db +0 -0
  80. data/spec/dummy_app/db/test.db +0 -0
  81. data/spec/dummy_app/doc/README_FOR_APP +0 -2
  82. data/spec/dummy_app/script/rails +0 -6
  83. data/spec/dummy_app/spec/build_tree_helper.rb +0 -39
  84. data/spec/dummy_app/spec/spec_helper.rb +0 -52
  85. data/spec/dummy_app/spec/views/pages/index.html.haml_spec.rb +0 -48
  86. data/spec/old_tests/controlllers/controller_mixin_spec.rb +0 -49
  87. data/spec/old_tests/dummy/README.rdoc +0 -261
  88. data/spec/old_tests/dummy/Rakefile +0 -7
  89. data/spec/old_tests/dummy/app/assets/javascripts/application.js +0 -15
  90. data/spec/old_tests/dummy/app/assets/stylesheets/application.css +0 -13
  91. data/spec/old_tests/dummy/app/controllers/application_controller.rb +0 -3
  92. data/spec/old_tests/dummy/app/controllers/tests_controller.rb +0 -3
  93. data/spec/old_tests/dummy/app/views/layouts/application.html.erb +0 -14
  94. data/spec/old_tests/dummy/config.ru +0 -4
  95. data/spec/old_tests/dummy/config/application.rb +0 -56
  96. data/spec/old_tests/dummy/config/boot.rb +0 -10
  97. data/spec/old_tests/dummy/config/database.yml +0 -25
  98. data/spec/old_tests/dummy/config/environment.rb +0 -5
  99. data/spec/old_tests/dummy/config/environments/development.rb +0 -37
  100. data/spec/old_tests/dummy/config/environments/production.rb +0 -67
  101. data/spec/old_tests/dummy/config/environments/test.rb +0 -37
  102. data/spec/old_tests/dummy/config/initializers/backtrace_silencers.rb +0 -7
  103. data/spec/old_tests/dummy/config/initializers/inflections.rb +0 -15
  104. data/spec/old_tests/dummy/config/initializers/mime_types.rb +0 -5
  105. data/spec/old_tests/dummy/config/initializers/secret_token.rb +0 -7
  106. data/spec/old_tests/dummy/config/initializers/session_store.rb +0 -8
  107. data/spec/old_tests/dummy/config/initializers/wrap_parameters.rb +0 -14
  108. data/spec/old_tests/dummy/config/locales/en.yml +0 -5
  109. data/spec/old_tests/dummy/config/routes.rb +0 -3
  110. data/spec/old_tests/dummy/db/test.sqlite3 +0 -0
  111. data/spec/old_tests/dummy/log/test.log +0 -4
  112. data/spec/old_tests/dummy/public/404.html +0 -26
  113. data/spec/old_tests/dummy/public/422.html +0 -26
  114. data/spec/old_tests/dummy/public/500.html +0 -25
  115. data/spec/old_tests/dummy/public/favicon.ico +0 -0
  116. data/spec/old_tests/dummy/script/rails +0 -6
  117. data/spec/old_tests/spec_helper.rb +0 -15
@@ -1,26 +0,0 @@
1
- .sortable_tree{
2
- &.expandable{
3
- h4{
4
- margin-left: 50px;
5
- }
6
- }
7
-
8
- .expand{
9
- float: left;
10
- cursor: pointer;
11
-
12
- border: 1px solid lightgray;
13
- color: lightgray;
14
-
15
- font-size: 13px;
16
- font-weight: normal;
17
- line-height: 13px;
18
- text-align: center;
19
-
20
- width: 13px;
21
- height: 13px;
22
- margin: 3px 10px 0 0;
23
-
24
- &.empty{ display:none !important; }
25
- }
26
- }
@@ -1,25 +0,0 @@
1
- .nested_options{
2
- padding: 3px;
3
- font-size: 18px;
4
- font-family: Arial;
5
- border: 1px solid gray;
6
-
7
- option{
8
- color: black; padding: 3px;
9
- &.selected{ font-weight: bold; color: red; }
10
- }
11
-
12
- @for $i from 1 through 2{
13
- .l_#{$i}{
14
- padding-left: #{($i - 1)*15}px;
15
- font-size: #{(100 - $i * 10) + '%'};
16
- }
17
- }
18
-
19
- @for $i from 3 through 10{
20
- .l_#{$i}{
21
- padding-left: #{($i - 1)*15}px;
22
- font-size: 70%;
23
- }
24
- }
25
- }
@@ -1,108 +0,0 @@
1
- .sortable_tree{
2
- margin: 0; padding: 0;
3
- *{ margin: 0; padding: 0; }
4
-
5
- ol{
6
- margin: 0 0 0 13px;
7
- padding: 0 0 0 15px;
8
- border-left: 1px dashed gray;
9
- list-style: none outside none;
10
- }
11
-
12
- li{
13
- margin-bottom:5px;
14
- position: relative;
15
- list-style: none outside none;
16
- }
17
-
18
- a{
19
- color:#000;
20
- font-size:10pt;
21
- font-weight:normal;
22
- text-decoration:none;
23
- line-height: 150%;
24
- margin-left:30px;
25
- margin-right:120px;
26
- display:block;
27
- &:hover{ text-decoration: underline; }
28
- }
29
-
30
- h4{
31
- margin-left: 30px;
32
-
33
- a{
34
- color: #333;
35
- font-size: 14px;
36
- margin-left: 0;
37
- &:hover{ background: #eee; }
38
- }
39
- }
40
-
41
- p{
42
- margin-right: 75px;
43
- padding: 5px;
44
- }
45
-
46
- .handle{
47
- background: transparent image-url("iconza/icons/move.png");
48
- background-position: center center;
49
-
50
- width: 16px;
51
- height: 16px;
52
- margin: 3px 10px 0 0;
53
- float: left;
54
- cursor: move;
55
-
56
- &:hover{ background: transparent image-url("iconza/icons/red_move.png"); }
57
- }
58
-
59
- .item{
60
- padding: 5px;
61
- background: #f7f7f7;
62
- border-radius: 3px;
63
- margin-bottom: 5px;
64
- &:hover{ background: #eee; }
65
- }
66
-
67
- .placeholder {
68
- background-color: #EEF;
69
- border: 1px dashed blue;
70
- }
71
-
72
- .ui-nestedSortable-error {
73
- background: #FAA;
74
- color: #8a1f11;
75
- }
76
-
77
- .controls{
78
- position: absolute;
79
- top: 1px; right: 10px;
80
-
81
- a{
82
- width: 20px;
83
- height: 20px;
84
- display: block;
85
-
86
- float: left;
87
- padding: 5px;
88
- cursor: pointer;
89
- position: relative;
90
-
91
- margin: 0 0 5px 5px;
92
- overflow: hidden; zoom: 1;
93
-
94
- &.new{
95
- background: transparent image-url("iconza/icons/add.png") no-repeat scroll center center;
96
- &:hover{ background: transparent image-url("iconza/icons/red_add.png") no-repeat scroll center center; }
97
- }
98
- &.edit{
99
- background: transparent image-url("iconza/icons/edit.png") no-repeat scroll center center;
100
- &:hover{ background: transparent image-url("iconza/icons/red_edit.png") no-repeat scroll center center; }
101
- }
102
- &.delete{
103
- background: transparent image-url("iconza/icons/delete.png") no-repeat scroll center center;
104
- &:hover{ background: transparent image-url("iconza/icons/red_delete.png") no-repeat scroll center center; }
105
- }
106
- }
107
- }
108
- }
@@ -1,35 +0,0 @@
1
- .tree{
2
- margin:0; padding:0;
3
- *{ margin: 0; padding: 0; }
4
-
5
- ol{
6
- margin: 0 0 0 13px;
7
- padding: 0 0 0 15px;
8
- border-left: 1px dashed gray;
9
- list-style: none outside none;
10
- }
11
-
12
- li{
13
- margin-bottom:5px;
14
- position: relative;
15
- list-style: none outside none;
16
- }
17
-
18
- a{
19
- color: black;
20
- font-size: 14px;
21
-
22
- &:hover {
23
- color: black;
24
- background: #ddd;
25
- }
26
- }
27
-
28
- .item{
29
- padding: 5px;
30
- background: #eee;
31
- margin-bottom: 5px;
32
- border-radius: 3px;
33
- &:hover{ background: #ddd; }
34
- }
35
- }
@@ -1,9 +0,0 @@
1
- <% unless tree.blank? %>
2
- <i class='sortable_tree' style='display:none'>
3
- <i class='data'><%= tree.to_json %></i>
4
- <i class='locale'><%= t(:sortable).to_json %></i>
5
- <i class='klass'><%= opts[:klass] %></i>
6
- <i class='plural'><%= opts[:klass].pluralize %></i>
7
- <i class='rebuild_url'><%= url_for(:controller => opts[:klass].pluralize, :action => :rebuild) %></i>
8
- </i>
9
- <% end %>
@@ -1,23 +0,0 @@
1
- <h1><%= tree.size %></h1>
2
-
3
- <div class='tree_block'>
4
- <ol class='tree'>
5
- <%= server_build_tree(tree) %>
6
- </ol>
7
- </div>
8
-
9
- <% unless tree.blank? %>
10
- <i class='render_tree' style='display:none' data-locale="<%= t(:tree).to_json %>" data-klass="<%= opts[:klass] %>" data-plural="<%= opts[:klass].pluralize %>">
11
- </i>
12
- <% end %>
13
-
14
- <% tree.each do |item| %>
15
-
16
- <li>
17
- <div class='item'>
18
- <h4><a href='#'><%= item.title %></a></h4>
19
- <p><%= item.content %></p>
20
- </div>
21
- </li>
22
-
23
- <% end %>
@@ -1,210 +0,0 @@
1
- GIT
2
- remote: git://github.com/collectiveidea/awesome_nested_set.git
3
- revision: 76bfb779ef882984f578238c1e5bdb76ee2b29fd
4
- specs:
5
- awesome_nested_set (3.1.1)
6
- activerecord (>= 4.0.0, < 5.1)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- actionmailer (4.1.16)
12
- actionpack (= 4.1.16)
13
- actionview (= 4.1.16)
14
- mail (~> 2.5, >= 2.5.4)
15
- actionpack (4.1.16)
16
- actionview (= 4.1.16)
17
- activesupport (= 4.1.16)
18
- rack (~> 1.5.2)
19
- rack-test (~> 0.6.2)
20
- actionview (4.1.16)
21
- activesupport (= 4.1.16)
22
- builder (~> 3.1)
23
- erubis (~> 2.7.0)
24
- activemodel (4.1.16)
25
- activesupport (= 4.1.16)
26
- builder (~> 3.1)
27
- activerecord (4.1.16)
28
- activemodel (= 4.1.16)
29
- activesupport (= 4.1.16)
30
- arel (~> 5.0.0)
31
- activesupport (4.1.16)
32
- i18n (~> 0.6, >= 0.6.9)
33
- json (~> 1.7, >= 1.7.7)
34
- minitest (~> 5.1)
35
- thread_safe (~> 0.1)
36
- tzinfo (~> 1.1)
37
- addressable (2.4.0)
38
- arel (5.0.1.20140414130214)
39
- builder (3.2.2)
40
- capybara (2.10.0)
41
- addressable
42
- mime-types (>= 1.16)
43
- nokogiri (>= 1.3.3)
44
- rack (>= 1.0.0)
45
- rack-test (>= 0.5.4)
46
- xpath (~> 2.0)
47
- childprocess (0.5.9)
48
- ffi (~> 1.0, >= 1.0.11)
49
- coderay (1.1.1)
50
- coffee-rails (4.2.1)
51
- coffee-script (>= 2.2.0)
52
- railties (>= 4.0.0, < 5.2.x)
53
- coffee-script (2.4.1)
54
- coffee-script-source
55
- execjs
56
- coffee-script-source (1.10.0)
57
- concurrent-ruby (1.0.2)
58
- database_cleaner (1.5.3)
59
- diff-lcs (1.2.5)
60
- erubis (2.7.0)
61
- execjs (2.7.0)
62
- factory_girl (4.7.0)
63
- activesupport (>= 3.0.0)
64
- faker (1.6.6)
65
- i18n (~> 0.5)
66
- ffi (1.9.14)
67
- haml (4.0.7)
68
- tilt
69
- haml-rails (0.9.0)
70
- actionpack (>= 4.0.1)
71
- activesupport (>= 4.0.1)
72
- haml (>= 4.0.6, < 5.0)
73
- html2haml (>= 1.0.1)
74
- railties (>= 4.0.1)
75
- html2haml (2.0.0)
76
- erubis (~> 2.7.0)
77
- haml (~> 4.0.0)
78
- nokogiri (~> 1.6.0)
79
- ruby_parser (~> 3.5)
80
- i18n (0.7.0)
81
- jquery-rails (3.1.4)
82
- railties (>= 3.0, < 5.0)
83
- thor (>= 0.14, < 2.0)
84
- jquery-ui-rails (5.0.5)
85
- railties (>= 3.2.16)
86
- json (1.8.3)
87
- mail (2.6.4)
88
- mime-types (>= 1.16, < 4)
89
- method_source (0.8.2)
90
- mime-types (3.1)
91
- mime-types-data (~> 3.2015)
92
- mime-types-data (3.2016.0521)
93
- mini_portile2 (2.1.0)
94
- minitest (5.9.1)
95
- nokogiri (1.6.8.1)
96
- mini_portile2 (~> 2.1.0)
97
- pry (0.10.4)
98
- coderay (~> 1.1.0)
99
- method_source (~> 0.8.1)
100
- slop (~> 3.4)
101
- quiet_assets (1.1.0)
102
- railties (>= 3.1, < 5.0)
103
- rack (1.5.5)
104
- rack-test (0.6.3)
105
- rack (>= 1.0)
106
- rails (4.1.16)
107
- actionmailer (= 4.1.16)
108
- actionpack (= 4.1.16)
109
- actionview (= 4.1.16)
110
- activemodel (= 4.1.16)
111
- activerecord (= 4.1.16)
112
- activesupport (= 4.1.16)
113
- bundler (>= 1.3.0, < 2.0)
114
- railties (= 4.1.16)
115
- sprockets-rails (~> 2.0)
116
- railties (4.1.16)
117
- actionpack (= 4.1.16)
118
- activesupport (= 4.1.16)
119
- rake (>= 0.8.7)
120
- thor (>= 0.18.1, < 2.0)
121
- rake (11.3.0)
122
- rspec (3.5.0)
123
- rspec-core (~> 3.5.0)
124
- rspec-expectations (~> 3.5.0)
125
- rspec-mocks (~> 3.5.0)
126
- rspec-core (3.5.4)
127
- rspec-support (~> 3.5.0)
128
- rspec-expectations (3.5.0)
129
- diff-lcs (>= 1.2.0, < 2.0)
130
- rspec-support (~> 3.5.0)
131
- rspec-mocks (3.5.0)
132
- diff-lcs (>= 1.2.0, < 2.0)
133
- rspec-support (~> 3.5.0)
134
- rspec-rails (3.5.2)
135
- actionpack (>= 3.0)
136
- activesupport (>= 3.0)
137
- railties (>= 3.0)
138
- rspec-core (~> 3.5.0)
139
- rspec-expectations (~> 3.5.0)
140
- rspec-mocks (~> 3.5.0)
141
- rspec-support (~> 3.5.0)
142
- rspec-support (3.5.0)
143
- ruby_parser (3.8.2)
144
- sexp_processor (~> 4.1)
145
- rubyzip (1.2.0)
146
- sass (3.4.22)
147
- sass-rails (5.0.6)
148
- railties (>= 4.0.0, < 6)
149
- sass (~> 3.1)
150
- sprockets (>= 2.8, < 4.0)
151
- sprockets-rails (>= 2.0, < 4.0)
152
- tilt (>= 1.1, < 3)
153
- selenium-webdriver (2.53.4)
154
- childprocess (~> 0.5)
155
- rubyzip (~> 1.0)
156
- websocket (~> 1.0)
157
- sexp_processor (4.7.0)
158
- slop (3.6.0)
159
- sprockets (3.7.0)
160
- concurrent-ruby (~> 1.0)
161
- rack (> 1, < 3)
162
- sprockets-rails (2.3.3)
163
- actionpack (>= 3.0)
164
- activesupport (>= 3.0)
165
- sprockets (>= 2.8, < 4.0)
166
- sqlite3 (1.3.11)
167
- the_sortable_tree (2.6.0)
168
- rails (>= 3.1)
169
- thor (0.19.1)
170
- thread_safe (0.3.5)
171
- tilt (2.0.5)
172
- tzinfo (1.2.2)
173
- thread_safe (~> 0.1)
174
- uglifier (3.0.2)
175
- execjs (>= 0.3.0, < 3)
176
- websocket (1.2.3)
177
- xpath (2.0.0)
178
- nokogiri (~> 1.3)
179
-
180
- PLATFORMS
181
- ruby
182
-
183
- DEPENDENCIES
184
- awesome_nested_set!
185
- capybara
186
- coffee-rails
187
- database_cleaner
188
- factory_girl
189
- faker
190
- haml
191
- haml-rails
192
- jquery-rails
193
- jquery-ui-rails
194
- json
195
- pry
196
- quiet_assets
197
- rails (~> 4.1.0)
198
- rspec
199
- rspec-core
200
- rspec-expectations
201
- rspec-mocks
202
- rspec-rails
203
- sass-rails
204
- selenium-webdriver
205
- sqlite3
206
- the_sortable_tree (= 2.6.0)
207
- uglifier
208
-
209
- BUNDLED WITH
210
- 1.13.1
@@ -1,7 +0,0 @@
1
- # Read about fixtures at http://api.rubyonrails.org/classes/Fixtures.html
2
-
3
- one:
4
- title: MyString
5
-
6
- two:
7
- title: MyString