lolita 3.0.7 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. data/GUIDELINE +4 -0
  2. data/README.rdoc +50 -0
  3. data/VERSION +1 -1
  4. data/app/controllers/lolita/rest_controller.rb +27 -11
  5. data/app/helpers/components/lolita/configuration/list_component.rb +11 -0
  6. data/app/helpers/lolita_helper.rb +1 -1
  7. data/app/views/components/lolita/configuration/field/_display.html.erb +9 -0
  8. data/app/views/components/lolita/configuration/field/_label.html.erb +1 -0
  9. data/app/views/components/lolita/{field → configuration/field}/_object.html.erb +0 -0
  10. data/app/views/components/lolita/configuration/field/array/_display.html.erb +5 -0
  11. data/app/views/components/lolita/configuration/field/array/habtm/_display.html.erb +26 -0
  12. data/app/views/components/lolita/configuration/field/array/select/_display.html.erb +5 -0
  13. data/app/views/components/lolita/configuration/field/big_decimal/_display.html.erb +1 -0
  14. data/app/views/components/lolita/{field/_boolean.html.erb → configuration/field/boolean/_display.html.erb} +0 -0
  15. data/app/views/components/lolita/configuration/field/date/_display.html.erb +1 -0
  16. data/app/views/components/lolita/{field/_string.html.erb → configuration/field/float/_display.html.erb} +0 -0
  17. data/app/views/components/lolita/configuration/field/integer/_display.html.erb +1 -0
  18. data/app/views/components/lolita/configuration/field/string/_display.html.erb +5 -0
  19. data/app/views/components/lolita/{field/_disabled.html.erb → configuration/field/string/disabled/_display.html.erb} +0 -0
  20. data/app/views/components/lolita/{field/_password.html.erb → configuration/field/string/password/_display.html.erb} +0 -0
  21. data/app/views/components/lolita/configuration/field/string/text/_display.html.erb +34 -0
  22. data/app/views/components/lolita/configuration/field/time/_display.html.erb +1 -0
  23. data/app/views/components/lolita/{field_set → configuration/field_set}/_display.html.erb +1 -1
  24. data/app/views/components/lolita/configuration/list/_body.html.erb +5 -0
  25. data/app/views/components/lolita/{list → configuration/list}/_body_cell.html.erb +0 -0
  26. data/app/views/components/lolita/{list → configuration/list}/_checkbox_cell.html.erb +0 -0
  27. data/app/views/components/lolita/{list → configuration/list}/_checkbox_header.html.erb +0 -0
  28. data/app/views/components/lolita/configuration/list/_display.html.erb +12 -0
  29. data/app/views/components/lolita/configuration/list/_filter.html.erb +8 -0
  30. data/app/views/components/lolita/configuration/list/_header.html.erb +9 -0
  31. data/app/views/components/lolita/{list → configuration/list}/_header_cell.html.erb +0 -0
  32. data/app/views/components/lolita/{list → configuration/list}/_new_resource.html.erb +0 -0
  33. data/app/views/components/lolita/configuration/list/_paginator.html.erb +3 -0
  34. data/app/views/components/lolita/configuration/list/_row.html.erb +7 -0
  35. data/app/views/components/lolita/{list → configuration/list}/_title.html.erb +0 -0
  36. data/app/views/components/lolita/{list → configuration/list}/_tool_cell.html.erb +0 -0
  37. data/app/views/components/lolita/{list → configuration/list}/_tool_header.html.erb +0 -0
  38. data/app/views/components/lolita/configuration/tab/_display.html.erb +17 -0
  39. data/app/views/components/lolita/configuration/tab/_fields.html.erb +7 -0
  40. data/app/views/components/lolita/configuration/tab/content/_display.html.erb +1 -0
  41. data/app/views/components/lolita/configuration/tab/default/_display.html.erb +9 -0
  42. data/app/views/components/lolita/{tabs → configuration/tabs}/_display.html.erb +4 -3
  43. data/app/views/{lolita/layouts → layouts/lolita}/application.html.erb +0 -0
  44. data/app/views/{lolita/layouts → layouts/lolita}/application.html.erb_spec.rb +0 -0
  45. data/author +1 -1
  46. data/lib/lolita.rb +31 -12
  47. data/lib/lolita/adapter/active_record.rb +16 -5
  48. data/lib/lolita/adapter/mongoid.rb +2 -2
  49. data/lib/lolita/base_configuration.rb +44 -2
  50. data/lib/lolita/builder.rb +31 -14
  51. data/lib/lolita/configuration/column.rb +92 -86
  52. data/lib/lolita/configuration/columns.rb +65 -65
  53. data/lib/lolita/configuration/factory.rb +8 -8
  54. data/lib/lolita/configuration/field.rb +156 -100
  55. data/lib/lolita/configuration/field/array.rb +74 -0
  56. data/lib/lolita/configuration/field/big_decimal.rb +12 -0
  57. data/lib/lolita/configuration/field/boolean.rb +7 -5
  58. data/lib/lolita/configuration/field/date.rb +13 -0
  59. data/lib/lolita/configuration/field/integer.rb +7 -5
  60. data/lib/lolita/configuration/field/string.rb +8 -6
  61. data/lib/lolita/configuration/field/time.rb +13 -0
  62. data/lib/lolita/configuration/fields.rb +36 -0
  63. data/lib/lolita/configuration/filter.rb +63 -0
  64. data/lib/lolita/configuration/list.rb +101 -91
  65. data/lib/lolita/configuration/page.rb +1 -0
  66. data/lib/lolita/configuration/tab.rb +137 -131
  67. data/lib/lolita/configuration/tab/content.rb +14 -12
  68. data/lib/lolita/configuration/tab/default.rb +15 -13
  69. data/lib/lolita/configuration/tabs.rb +2 -2
  70. data/lib/lolita/controllers/component_helpers.rb +26 -14
  71. data/lib/lolita/controllers/internal_helpers.rb +14 -0
  72. data/lib/lolita/controllers/url_helpers.rb +47 -10
  73. data/lib/lolita/dbi/base.rb +50 -50
  74. data/lib/lolita/errors.rb +2 -2
  75. data/lib/lolita/hooks.rb +298 -0
  76. data/lib/lolita/hooks/named_hook.rb +122 -0
  77. data/lib/lolita/lazy_loader.rb +46 -46
  78. data/lib/lolita/mapping.rb +3 -2
  79. data/lib/lolita/navigation.rb +48 -0
  80. data/lib/lolita/observed_array.rb +7 -0
  81. data/lib/lolita/rails/routes.rb +29 -3
  82. data/lolita.gemspec +65 -48
  83. data/public/javascripts/lolita/tab.js +5 -0
  84. data/public/javascripts/rails.js +137 -137
  85. data/public/stylesheets/lolita/style.css +3 -1
  86. data/spec/builder_spec.rb +42 -0
  87. data/spec/configuration/field_spec.rb +29 -18
  88. data/spec/configuration/filter_spec.rb +60 -0
  89. data/spec/configuration/tab_spec.rb +28 -20
  90. data/spec/configuration/tabs_spec.rb +8 -4
  91. data/spec/controllers/lolita_rest_spec.rb +15 -0
  92. data/spec/hooks_spec.rb +191 -0
  93. data/spec/lolita_spec.rb +6 -4
  94. data/spec/navigation/tree_spec.rb +59 -0
  95. data/spec/rails_app/app/mongoid/post.rb +2 -0
  96. data/spec/rails_app/app/views/components/lolita/{list → configuration/list}/_body_cell.html.erb +0 -0
  97. data/spec/rails_app/config/application.rb +1 -0
  98. data/spec/rails_app/lib/lolita/configuration/field/my_custom_collection.rb +14 -0
  99. data/spec/simple_spec_helper.rb +1 -0
  100. data/spec/spec_helper.rb +1 -2
  101. metadata +66 -49
  102. data/README.md +0 -5
  103. data/app/helpers/components/lolita/list_component.rb +0 -9
  104. data/app/views/components/lolita/field/_collection.html.erb +0 -5
  105. data/app/views/components/lolita/field/_date.html.erb +0 -1
  106. data/app/views/components/lolita/field/_datetime.html.erb +0 -1
  107. data/app/views/components/lolita/field/_display.html.erb +0 -6
  108. data/app/views/components/lolita/field/_integer.html.erb +0 -1
  109. data/app/views/components/lolita/field/_label.html.erb +0 -1
  110. data/app/views/components/lolita/field/_select.html.erb +0 -1
  111. data/app/views/components/lolita/field/_text.html.erb +0 -27
  112. data/app/views/components/lolita/list/_body.html.erb +0 -5
  113. data/app/views/components/lolita/list/_display.html.erb +0 -11
  114. data/app/views/components/lolita/list/_header.html.erb +0 -9
  115. data/app/views/components/lolita/list/_paginator.html.erb +0 -4
  116. data/app/views/components/lolita/list/_row.html.erb +0 -7
  117. data/app/views/components/lolita/tab/_content.html.erb +0 -1
  118. data/app/views/components/lolita/tab/_default.html.erb +0 -11
  119. data/app/views/components/lolita/tab/_display.html.erb +0 -7
  120. data/app/views/components/lolita/tab/_fields.html.erb +0 -7
  121. data/lib/lolita/configuration/field/collection.rb +0 -71
  122. data/lib/lolita/configuration/field/datetime.rb +0 -10
  123. data/lib/lolita/configuration/field/disabled.rb +0 -10
  124. data/lib/lolita/configuration/field/password.rb +0 -10
  125. data/lib/lolita/configuration/field/text.rb +0 -10
  126. data/lib/lolita/hooks/base.rb +0 -58
  127. data/lib/lolita/hooks/component.rb +0 -15
  128. data/lib/lolita/hooks/hooks.rb +0 -15
@@ -1,10 +1,12 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
1
+ require File.expand_path(File.dirname(__FILE__) + '/simple_spec_helper')
2
2
 
3
3
  describe Lolita do
4
4
 
5
- it "should yield itself" do
6
- Lolita.setup do |config|
7
- config.class.should == Lolita::BaseConfiguration
5
+ context "#setup" do
6
+ it "should yield Lolita::BaseConfiguration instance" do
7
+ Lolita.setup do |config|
8
+ config.class.should == Lolita::BaseConfiguration
9
+ end
8
10
  end
9
11
  end
10
12
  end
@@ -0,0 +1,59 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../simple_spec_helper')
2
+
3
+ describe Lolita::Navigation::Tree do
4
+
5
+ context "#new" do
6
+ it "should create new navigation tree with name" do
7
+ tree=Lolita::Navigation::Tree.new("Test tree")
8
+ tree.name.should == "Test tree"
9
+ end
10
+
11
+ it "should raise error when name is not specified" do
12
+ lambda{
13
+ Lolita::Navigation::Tree.new
14
+ }.should raise_error(ArgumentError)
15
+ end
16
+
17
+ end
18
+
19
+ let(:tree){Lolita::Navigation::Tree.new("test")}
20
+
21
+ context "#add" do
22
+ it "should accept object, position and options" do
23
+ tree.add(Object,:append,:url=>"/mypath")
24
+ tree.should have(1).branch
25
+ end
26
+ end
27
+
28
+ context "#each" do
29
+ let(:populated_tree){
30
+ p_tree=Lolita::Navigation::Tre.new("populated tree")
31
+ 0.upto(3){|i|
32
+ p_tree.add(Object,:append,:url=>"/#{i}",:name=>"branch#{i}")
33
+ }
34
+ p_tree
35
+ }
36
+
37
+ it "should iterate through all branches" do
38
+ populated_tree.each_with_index do |branch,index|
39
+ branch.name.should == "branch#{index}"
40
+ end
41
+ end
42
+ end
43
+
44
+ context "callbacks" do
45
+ it "should respond to callback #before_load" do
46
+ Lolita::Hooks.tree("test").before_load
47
+ end
48
+ end
49
+
50
+ it "should add new branch when other branches meet some criteria " do
51
+ tree.add(Object,:append,:url=>"/mypath")
52
+ tree.each_branch do |branch|
53
+ if branch.resource.is_a?(Object)
54
+ tree.append(Object,:url=>"/mypath2")
55
+ end
56
+ end
57
+ tree.should have(2).branches
58
+ end
59
+ end
@@ -3,6 +3,8 @@ class Post
3
3
  include Lolita::Configuration
4
4
  field :title, :type => String
5
5
  field :body, :type => String
6
+ field :is_public, :type => Boolean
7
+ field :price, :type => BigDecimal
6
8
  references_many :comments,:class_name=>"Comment"
7
9
  referenced_in :profile
8
10
  validates_presence_of :title
@@ -7,6 +7,7 @@ require "rails/test_unit/railtie"
7
7
  Bundler.require(:default, LOLITA_ORM, Rails.env) if defined?(Bundler)
8
8
  #require 'cells'
9
9
  require 'lolita'
10
+ require "lolita/rails/all"
10
11
  require 'will_paginate'
11
12
 
12
13
  module RailsApp
@@ -0,0 +1,14 @@
1
+ module Lolita
2
+ module Configuration
3
+ module Field
4
+ class MyCustomCollection < Lolita::Configuration::Field::Array
5
+
6
+ def initialize *args,&block
7
+ super
8
+ @type="my_custom_collection"
9
+ end
10
+
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1 @@
1
+ require File.expand_path("../../lib/lolita",__FILE__)
@@ -24,9 +24,8 @@ require 'rubygems'
24
24
  #require 'ruby-debug'
25
25
  LOLITA_ORM=:mongoid
26
26
  require "orm/#{LOLITA_ORM}"
27
-
27
+ require "rails"
28
28
  require "rails_app/config/environment"
29
-
30
29
  require 'rspec/rails'
31
30
  require 'ffaker'
32
31
  require 'factory_girl'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: lolita
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 3.0.7
5
+ version: 3.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - ITHouse
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-03-29 00:00:00 +03:00
14
+ date: 2011-04-12 00:00:00 +03:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -176,7 +176,7 @@ extensions: []
176
176
 
177
177
  extra_rdoc_files:
178
178
  - LICENSE.txt
179
- - README.md
179
+ - README.rdoc
180
180
  files:
181
181
  - .document
182
182
  - .project
@@ -185,50 +185,54 @@ files:
185
185
  - Gemfile
186
186
  - IDEA
187
187
  - LICENSE.txt
188
- - README.md
188
+ - README.rdoc
189
189
  - Rakefile
190
190
  - VERSION
191
191
  - app/controllers/lolita/rest_controller.rb
192
- - app/helpers/components/lolita/list_component.rb
192
+ - app/helpers/components/lolita/configuration/list_component.rb
193
193
  - app/helpers/lolita_helper.rb
194
- - app/views/components/lolita/field/_boolean.html.erb
195
- - app/views/components/lolita/field/_collection.html.erb
196
- - app/views/components/lolita/field/_date.html.erb
197
- - app/views/components/lolita/field/_datetime.html.erb
198
- - app/views/components/lolita/field/_disabled.html.erb
199
- - app/views/components/lolita/field/_display.html.erb
200
- - app/views/components/lolita/field/_integer.html.erb
201
- - app/views/components/lolita/field/_label.html.erb
202
- - app/views/components/lolita/field/_object.html.erb
203
- - app/views/components/lolita/field/_password.html.erb
204
- - app/views/components/lolita/field/_select.html.erb
205
- - app/views/components/lolita/field/_string.html.erb
206
- - app/views/components/lolita/field/_text.html.erb
207
- - app/views/components/lolita/field_set/_display.html.erb
208
- - app/views/components/lolita/list/_body.html.erb
209
- - app/views/components/lolita/list/_body_cell.html.erb
210
- - app/views/components/lolita/list/_checkbox_cell.html.erb
211
- - app/views/components/lolita/list/_checkbox_header.html.erb
212
- - app/views/components/lolita/list/_display.html.erb
213
- - app/views/components/lolita/list/_header.html.erb
214
- - app/views/components/lolita/list/_header_cell.html.erb
215
- - app/views/components/lolita/list/_new_resource.html.erb
216
- - app/views/components/lolita/list/_paginator.html.erb
217
- - app/views/components/lolita/list/_row.html.erb
218
- - app/views/components/lolita/list/_title.html.erb
219
- - app/views/components/lolita/list/_tool_cell.html.erb
220
- - app/views/components/lolita/list/_tool_header.html.erb
194
+ - app/views/components/lolita/configuration/field/_display.html.erb
195
+ - app/views/components/lolita/configuration/field/_label.html.erb
196
+ - app/views/components/lolita/configuration/field/_object.html.erb
197
+ - app/views/components/lolita/configuration/field/array/_display.html.erb
198
+ - app/views/components/lolita/configuration/field/array/habtm/_display.html.erb
199
+ - app/views/components/lolita/configuration/field/array/select/_display.html.erb
200
+ - app/views/components/lolita/configuration/field/big_decimal/_display.html.erb
201
+ - app/views/components/lolita/configuration/field/boolean/_display.html.erb
202
+ - app/views/components/lolita/configuration/field/date/_display.html.erb
203
+ - app/views/components/lolita/configuration/field/float/_display.html.erb
204
+ - app/views/components/lolita/configuration/field/integer/_display.html.erb
205
+ - app/views/components/lolita/configuration/field/string/_display.html.erb
206
+ - app/views/components/lolita/configuration/field/string/disabled/_display.html.erb
207
+ - app/views/components/lolita/configuration/field/string/password/_display.html.erb
208
+ - app/views/components/lolita/configuration/field/string/text/_display.html.erb
209
+ - app/views/components/lolita/configuration/field/time/_display.html.erb
210
+ - app/views/components/lolita/configuration/field_set/_display.html.erb
211
+ - app/views/components/lolita/configuration/list/_body.html.erb
212
+ - app/views/components/lolita/configuration/list/_body_cell.html.erb
213
+ - app/views/components/lolita/configuration/list/_checkbox_cell.html.erb
214
+ - app/views/components/lolita/configuration/list/_checkbox_header.html.erb
215
+ - app/views/components/lolita/configuration/list/_display.html.erb
216
+ - app/views/components/lolita/configuration/list/_filter.html.erb
217
+ - app/views/components/lolita/configuration/list/_header.html.erb
218
+ - app/views/components/lolita/configuration/list/_header_cell.html.erb
219
+ - app/views/components/lolita/configuration/list/_new_resource.html.erb
220
+ - app/views/components/lolita/configuration/list/_paginator.html.erb
221
+ - app/views/components/lolita/configuration/list/_row.html.erb
222
+ - app/views/components/lolita/configuration/list/_title.html.erb
223
+ - app/views/components/lolita/configuration/list/_tool_cell.html.erb
224
+ - app/views/components/lolita/configuration/list/_tool_header.html.erb
225
+ - app/views/components/lolita/configuration/tab/_display.html.erb
226
+ - app/views/components/lolita/configuration/tab/_fields.html.erb
227
+ - app/views/components/lolita/configuration/tab/content/_display.html.erb
228
+ - app/views/components/lolita/configuration/tab/default/_display.html.erb
229
+ - app/views/components/lolita/configuration/tabs/_display.html.erb
221
230
  - app/views/components/lolita/navigation/_display.html.erb
222
231
  - app/views/components/lolita/shared/_flash.html.erb
223
232
  - app/views/components/lolita/shared/_header.html.erb
224
233
  - app/views/components/lolita/shared/_right_sidebar.html.erb
225
- - app/views/components/lolita/tab/_content.html.erb
226
- - app/views/components/lolita/tab/_default.html.erb
227
- - app/views/components/lolita/tab/_display.html.erb
228
- - app/views/components/lolita/tab/_fields.html.erb
229
- - app/views/components/lolita/tabs/_display.html.erb
230
- - app/views/lolita/layouts/application.html.erb
231
- - app/views/lolita/layouts/application.html.erb_spec.rb
234
+ - app/views/layouts/lolita/application.html.erb
235
+ - app/views/layouts/lolita/application.html.erb_spec.rb
232
236
  - app/views/lolita/rest/form.html.erb
233
237
  - app/views/lolita/rest/index.html.erb
234
238
  - author
@@ -254,15 +258,16 @@ files:
254
258
  - lib/lolita/configuration/columns.rb
255
259
  - lib/lolita/configuration/factory.rb
256
260
  - lib/lolita/configuration/field.rb
261
+ - lib/lolita/configuration/field/array.rb
262
+ - lib/lolita/configuration/field/big_decimal.rb
257
263
  - lib/lolita/configuration/field/boolean.rb
258
- - lib/lolita/configuration/field/collection.rb
259
- - lib/lolita/configuration/field/datetime.rb
260
- - lib/lolita/configuration/field/disabled.rb
264
+ - lib/lolita/configuration/field/date.rb
261
265
  - lib/lolita/configuration/field/integer.rb
262
- - lib/lolita/configuration/field/password.rb
263
266
  - lib/lolita/configuration/field/string.rb
264
- - lib/lolita/configuration/field/text.rb
267
+ - lib/lolita/configuration/field/time.rb
265
268
  - lib/lolita/configuration/field_set.rb
269
+ - lib/lolita/configuration/fields.rb
270
+ - lib/lolita/configuration/filter.rb
266
271
  - lib/lolita/configuration/list.rb
267
272
  - lib/lolita/configuration/page.rb
268
273
  - lib/lolita/configuration/tab.rb
@@ -276,13 +281,13 @@ files:
276
281
  - lib/lolita/controllers/view_user_helpers.rb
277
282
  - lib/lolita/dbi/base.rb
278
283
  - lib/lolita/errors.rb
279
- - lib/lolita/hooks/base.rb
280
- - lib/lolita/hooks/component.rb
281
- - lib/lolita/hooks/hooks.rb
284
+ - lib/lolita/hooks.rb
285
+ - lib/lolita/hooks/named_hook.rb
282
286
  - lib/lolita/lazy_loader.rb
283
287
  - lib/lolita/mapping.rb
284
288
  - lib/lolita/modules.rb
285
289
  - lib/lolita/modules/rest.rb
290
+ - lib/lolita/navigation.rb
286
291
  - lib/lolita/observed_array.rb
287
292
  - lib/lolita/rails.rb
288
293
  - lib/lolita/rails/all.rb
@@ -350,11 +355,13 @@ files:
350
355
  - public/stylesheets/lolita/default.css
351
356
  - public/stylesheets/lolita/style.css
352
357
  - spec/adapter_helper.rb
358
+ - spec/builder_spec.rb
353
359
  - spec/configuration/base_spec.rb
354
360
  - spec/configuration/column_spec.rb
355
361
  - spec/configuration/columns_spec.rb
356
362
  - spec/configuration/field_set_spec.rb
357
363
  - spec/configuration/field_spec.rb
364
+ - spec/configuration/filter_spec.rb
358
365
  - spec/configuration/list_spec.rb
359
366
  - spec/configuration/page_spec.rb
360
367
  - spec/configuration/tab_spec.rb
@@ -362,8 +369,10 @@ files:
362
369
  - spec/controllers/internal_helpers_spec.rb
363
370
  - spec/controllers/lolita_rest_spec.rb
364
371
  - spec/dbi/base_spec.rb
372
+ - spec/hooks_spec.rb
365
373
  - spec/lolita_spec.rb
366
374
  - spec/mapping_spec.rb
375
+ - spec/navigation/tree_spec.rb
367
376
  - spec/orm/mongoid.rb
368
377
  - spec/rails_app/app/controllers/application_controller.rb
369
378
  - spec/rails_app/app/helpers/application_helper.rb
@@ -372,7 +381,7 @@ files:
372
381
  - spec/rails_app/app/mongoid/post.rb
373
382
  - spec/rails_app/app/mongoid/preference.rb
374
383
  - spec/rails_app/app/mongoid/profile.rb
375
- - spec/rails_app/app/views/components/lolita/list/_body_cell.html.erb
384
+ - spec/rails_app/app/views/components/lolita/configuration/list/_body_cell.html.erb
376
385
  - spec/rails_app/config/application.rb
377
386
  - spec/rails_app/config/boot.rb
378
387
  - spec/rails_app/config/environment.rb
@@ -385,6 +394,7 @@ files:
385
394
  - spec/rails_app/config/initializers/secret_token.rb
386
395
  - spec/rails_app/config/routes.rb
387
396
  - spec/rails_app/db/schema.rb
397
+ - spec/rails_app/lib/lolita/configuration/field/my_custom_collection.rb
388
398
  - spec/rails_app/public/images/lolita/plus.png
389
399
  - spec/rails_app/public/javascripts/jquery-1.5.1.min.js
390
400
  - spec/rails_app/public/javascripts/lolita/main.js
@@ -444,6 +454,7 @@ files:
444
454
  - spec/rails_app/public/stylesheets/lolita/default.css
445
455
  - spec/rails_app/public/stylesheets/lolita/style.css
446
456
  - spec/routing/routes_spec.rb
457
+ - spec/simple_spec_helper.rb
447
458
  - spec/spec_helper.rb
448
459
  - spec/support/factories/post.rb
449
460
  - test/cells/form_cell_test.rb
@@ -462,7 +473,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
462
473
  requirements:
463
474
  - - ">="
464
475
  - !ruby/object:Gem::Version
465
- hash: 85335663
476
+ hash: -659089805
466
477
  segments:
467
478
  - 0
468
479
  version: "0"
@@ -481,11 +492,13 @@ specification_version: 3
481
492
  summary: Great Rails CMS.
482
493
  test_files:
483
494
  - spec/adapter_helper.rb
495
+ - spec/builder_spec.rb
484
496
  - spec/configuration/base_spec.rb
485
497
  - spec/configuration/column_spec.rb
486
498
  - spec/configuration/columns_spec.rb
487
499
  - spec/configuration/field_set_spec.rb
488
500
  - spec/configuration/field_spec.rb
501
+ - spec/configuration/filter_spec.rb
489
502
  - spec/configuration/list_spec.rb
490
503
  - spec/configuration/page_spec.rb
491
504
  - spec/configuration/tab_spec.rb
@@ -493,8 +506,10 @@ test_files:
493
506
  - spec/controllers/internal_helpers_spec.rb
494
507
  - spec/controllers/lolita_rest_spec.rb
495
508
  - spec/dbi/base_spec.rb
509
+ - spec/hooks_spec.rb
496
510
  - spec/lolita_spec.rb
497
511
  - spec/mapping_spec.rb
512
+ - spec/navigation/tree_spec.rb
498
513
  - spec/orm/mongoid.rb
499
514
  - spec/rails_app/app/controllers/application_controller.rb
500
515
  - spec/rails_app/app/helpers/application_helper.rb
@@ -515,7 +530,9 @@ test_files:
515
530
  - spec/rails_app/config/initializers/secret_token.rb
516
531
  - spec/rails_app/config/routes.rb
517
532
  - spec/rails_app/db/schema.rb
533
+ - spec/rails_app/lib/lolita/configuration/field/my_custom_collection.rb
518
534
  - spec/routing/routes_spec.rb
535
+ - spec/simple_spec_helper.rb
519
536
  - spec/spec_helper.rb
520
537
  - spec/support/factories/post.rb
521
538
  - test/cells/form_cell_test.rb
data/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Lolita 3
2
-
3
- Lolita is a Ruby On Rails based CMS with ActiveRecord and Mongoid support
4
-
5
- #### ALPHA STAGE, PLEASE USE branch **[2-3-stable](https://github.com/ithouse/lolita/tree/2-3-stable)**
@@ -1,9 +0,0 @@
1
- module Components
2
- module Lolita
3
- module ListComponent
4
- def sort_options
5
- params[:sort]
6
- end
7
- end
8
- end
9
- end
@@ -1,5 +0,0 @@
1
- <% if field.association_type==:one %>
2
- <%= render_component :"lolita/field", :select,:field=>field %>
3
- <% else %>
4
-
5
- <% end %>
@@ -1 +0,0 @@
1
- <%= render_component :"lolita/field", :string,:field=>field %>
@@ -1 +0,0 @@
1
- <%= render_component :"lolita/field", :string,:field=>field %>
@@ -1,6 +0,0 @@
1
- <div class="field" id="field_<%=field.__id__%>">
2
- <%= render_component :"lolita/field", :label, :field=>field %>
3
- <div class="field-value" id="field_<%=field.__id__%>_value">
4
- <%= render_component :"lolita/field", field.type_name.to_sym,:field=>field %>
5
- </div>
6
- </div>
@@ -1 +0,0 @@
1
- <%= render_component :"lolita/field", :string,:field=>field %>
@@ -1 +0,0 @@
1
- <%= label resource_name,field.name, :id=>"field_#{field.__id__}_label" %>
@@ -1 +0,0 @@
1
- <%= select resource_name, field.name, field.association_values.respond_to?(:call) ? field.association_values.call(self) : field.association_values, {:include_blank => field.include_blank} %>
@@ -1,27 +0,0 @@
1
- <% content_for :script do %>
2
- <%= javascript_include_tag "tinymce/jquery.tinymce" %>
3
- <script>
4
- function load_tinymce(){
5
- $("textarea").tinymce({
6
- script_url: "/javascripts/tinymce/tiny_mce.js",
7
- theme: "advanced",
8
- skin: "cirkuit",
9
- mode: "textareas",
10
- theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,formatselect,|,link,unlink,image,code",
11
- theme_advanced_buttons2 : "",
12
- theme_advanced_buttons3 : "",
13
- theme_advanced_toolbar_location: "top",
14
- theme_advanced_toolbar_align: "left",
15
- // theme_advanced_statusbar_location : "bottom",
16
- theme_advanced_resizing: true
17
- });
18
- }
19
- </script>
20
- <% end %>
21
-
22
- <%= text_area resource_name, field.name %>
23
- <script type="text/javascript">
24
- $(function(){
25
- load_tinymce();
26
- })
27
- </script>