lolita 3.2.0.rc.14 → 3.2.0.rc.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/app/assets/javascripts/lolita/application.js +2 -0
  2. data/app/assets/javascripts/lolita/tab.js +4 -28
  3. data/app/assets/stylesheets/lolita/style.css.erb +6 -1
  4. data/app/views/components/lolita/configuration/field/array/autocomplete/_input.html.haml +1 -1
  5. data/app/views/components/lolita/configuration/field/enum/_display.html.haml +1 -0
  6. data/app/views/components/lolita/configuration/field/string/autocomplete/_display.html.haml +3 -0
  7. data/app/views/components/lolita/configuration/field/string/text/_display.html.haml +1 -1
  8. data/app/views/components/lolita/configuration/nested_form/_display.html.haml +1 -1
  9. data/lib/lolita.rb +3 -3
  10. data/lib/lolita/adapter/abstract_adapter.rb +1 -0
  11. data/lib/lolita/adapter/active_record.rb +4 -0
  12. data/lib/lolita/adapter/mongoid.rb +4 -0
  13. data/lib/lolita/configuration/field/array.rb +12 -2
  14. data/lib/lolita/configuration/field/enum.rb +29 -0
  15. data/lib/lolita/configuration/field/float.rb +1 -1
  16. data/lib/lolita/configuration/field/hash.rb +1 -1
  17. data/lib/lolita/configuration/field/range.rb +1 -1
  18. data/lib/lolita/configuration/field/symbol.rb +1 -1
  19. data/lib/lolita/configuration/tab.rb +1 -1
  20. data/lib/lolita/version.rb +1 -1
  21. data/spec/configuration/tab_spec.rb +29 -27
  22. data/spec/rails_app/coverage.data +1 -0
  23. data/spec/rails_app/log/development.log +43315 -0
  24. data/spec/rails_app/log/test.log +370 -0
  25. data/spec/rails_app/public/javascripts/lolita/tab.js +1 -1
  26. data/spec/simple_spec_helper.rb +0 -1
  27. data/spec/spec_helper.rb +5 -3
  28. data/vendor/assets/javascripts/application_vendor_lolita.js +0 -2
  29. metadata +416 -373
  30. data/.gitignore +0 -31
  31. data/.rspec +0 -2
  32. data/Gemfile +0 -21
  33. data/History.rdoc +0 -259
  34. data/author +0 -1
  35. data/lolita.gemspec +0 -38
  36. data/spec/coverage_helper.rb +0 -33
  37. data/vendor/assets/javascripts/tinymce_config.js +0 -16
data/.gitignore DELETED
@@ -1,31 +0,0 @@
1
- coverage.data
2
- sinatra-test.rb
3
- tmp/
4
- diagramm.rb
5
- log/
6
- nbproject/
7
- _public/_gsdata
8
- .DS_Store
9
- _public/_gsdata_/*
10
- .rvmrc
11
- .document
12
- *~
13
- doc/
14
- rdoc/
15
- unused_classes/
16
- spec/debug.log
17
- .git.zip
18
- .idea/
19
- .gem
20
- lib/test.rb
21
- coverage/
22
- spec/rails_app/log/
23
- spec/rails_app/tmp/
24
- .project
25
- Gemfile.lock
26
- .redcar
27
- pkg
28
- .bundle
29
- .pivotalrc
30
- .project
31
- *.swp
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --format d
data/Gemfile DELETED
@@ -1,21 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- gemspec
4
-
5
- group :test, :development do
6
- gem "debugger"
7
- end
8
-
9
- group :rails do
10
- gem "rails" , "~> 3.2.0"
11
- gem "rspec-rails", "~> 2.9.0"
12
- gem "jquery-rails"
13
- gem "tinymce-rails", "~>3.4.8"
14
- end
15
-
16
- group :mongoid do
17
- gem 'mongo', '~> 1.4.0'
18
- gem 'mongoid', '~> 2.3.0'
19
- gem 'bson_ext', '~> 1.4.0'
20
- end
21
-
data/History.rdoc DELETED
@@ -1,259 +0,0 @@
1
- === Version 3.2.0
2
- * Enhancements
3
- * *append_to* option added for #lolita_for, that may append to container resource
4
- * _only_ options added for <b>lolita_for</b>
5
- * New options _visible_ added to Lolita::Mapping, now is possible to exclude resource from navigation tree
6
- * Search functionality added, included in List
7
- * All modules that need to be included by Lolita controllers is added in one Lolita::ControllerAddition
8
- * Basic authorization added, now with CanCan.
9
- * Created adapter Field and Association classes. Field and association access methods convert data to thoes class objects
10
- * Factory module created where factory classes are located
11
- * Removed specific pagination methods from adapters
12
- * Removed Lolita::Configuration::Factory and Lolita::Configuration::Page
13
- * Range, Float, Symbol, Hash fields are added to support Mongoid ORM
14
- * All fields automaticly have html_options[:class] updated with its type
15
- * Assets can be passet to lolita through application configuration attribute #assets
16
- * Polymorphic association field
17
- * :once options added to hook #run
18
- * #use_mapping added in InternalHelpers, switch block to given mapping
19
- * :on option added to fields, that allow to determine when to show field
20
- * Sublists for columns and list itself for 1-to-many, many-to-many and 1-to-many throught for AR
21
- * Version class added in Support
22
- * #skip_routes added for Lolita.application, that allow to add specific behaviour for application when rake or rails or other commands is called
23
- * #action added to list
24
-
25
- * Changes
26
- * using rails 3.1.x
27
- * #value, #value=, #record_value removed from Lolita::Configuration::Field
28
- * Created pagination in list and in adapters; its possible to customize it for model.
29
- * All fields must have name as well as tabs must have type
30
- * List #per renamed to #per_page
31
-
32
- * Removed
33
- * Lolita::Generator::FileHelper from generators removed
34
-
35
- * Bug fixes
36
- * visible? for Navigation::Branch fixed
37
- * /lolita redirection fixed
38
- * Each hook call runs as new instance of Hooks::Runner
39
- * All classes fixed to work with both mongoid and AR
40
- * String disabled builder fixed to use form object
41
- * Error msg list is visible in all tabs even there is no field that failed validation (fixed)
42
- * only run #lolita_for when <em>rails console</em> or <em>rails server</em> is running
43
-
44
- === Version 3.1.18
45
- * Bug fixes
46
- * Polymorphic bug fixed
47
- * habtm field fixed
48
-
49
- === Version 3.1.17 / 2011-09-01
50
- * Bug fixes
51
- * Error explanation updated with nested errors
52
-
53
- * Enhancements
54
- * Array field have special method for values
55
- * HAML support added
56
- * look improved
57
- * project configuration added
58
-
59
- === Version 3.1.16 / 2011-08-30
60
- * Bug fixes
61
- * Component helper name detection fixed
62
- * Nested forms normal style fixed
63
-
64
- === Version 3.1.15 / 2011-08-29
65
- * Enhancements
66
- * By default content tab excludes technical columns, like created_at, updated_at etc.
67
- * It's possible to define and lolita uses nested fields in each tab through nested_fields_for.
68
- * All fields (except array/habtm) uses #current_form for field generation, that is current tab form.
69
- * Lolita know how to vizualize habtm relation
70
- * Added #component_locals method for views, so it is possible to access next component locals.
71
- * Hidden field type added
72
- * Nested forms updated to be more flexible
73
-
74
- * Changes
75
- * For unknown period field_sets are removed from use, it is possible to define them and use in your own views.
76
-
77
- * Bug fixes
78
- * /lolita now redirects to first existing mapping if any defined (Issue #14)
79
- * component hooks fixed to use right local variable and detect right name of current component
80
-
81
- === Version 3.1.14 / 2011-08-24
82
- * Enhancements
83
- * request notifications moved to related methods in ::Controllers::InternalHelpers
84
- * Some minor visual improvements (Rolands Bondars)
85
-
86
- === Version 3.1.13 / 2011-08-16
87
- * Enhancements
88
- * Color for Lolita-Alert popup changed
89
- * #current_form method added in lolita helpers
90
- * Bug fixes
91
- * DBI for AR - method names fixed
92
- * Messages encoding bug fixed
93
-
94
- === Version 3.1.12 / 2011-07-15
95
- * Bug fixes
96
- * Time convertation from rails time_select fixed.
97
-
98
- === Version 3.1.11 / 2011-07-15
99
- * Enhancements
100
- * By default columns are not sortable
101
-
102
- === Version 3.1.10 / 2011-07-06
103
- * Enhancements
104
- * File tabs can be more than one time
105
-
106
- === Version 3.1.9 / 2011-06-30
107
- * Bug fixes
108
- * Rails view helpers uses html options and options from field configuration
109
-
110
- === Version 3.1.8 / 2011-06-15
111
- * Bug fixes
112
- * Show layout on info page
113
-
114
- === Version 3.1.7 / 2011-06-10
115
- * Enhancements
116
- * Builder refactored. Now support conditions. (Arturs Meisters)
117
-
118
- * Bug fixes
119
- * Updated Kaminari to 0.12.4 - previous version has serious BUG (Arturs Meisters, Gatis Tomsons)
120
- * Lolita messaging not used in RestController (Arturs Meisters)
121
-
122
- === Version 3.1.6 / 2011-05-19
123
- * Enhancements
124
- * Hooks run all callbacks from superclasses and included modules too. (Arturs Meisters)
125
- * Column now can be configured with attributes, updated :formatter (Gatis Tomsons)
126
- * Titles and labels now user localization (Arturs Meisters)
127
- * Latvian translations added (Arturs Meisters)
128
- * Lolita don't use flash messages anymore, now messages goes through reponse header. (Arturs Meisters)
129
- * jQuery updated to v1.6
130
- * jQuery UI added v1.8.13, by default in layout
131
- * TinyMCE initialization/configuration script moved to separate file (Rolands Bondars)
132
-
133
- * Bug fixes
134
- * Restored TinyMCE 'util' folder, it is required for certain actions (Rolands Bondars)
135
-
136
- === Version 3.1.5 / 2011-04-20
137
- * Changes
138
- * Moved from WillPaginate to Kaminari (Gatis Tomsons, Arturs Meisters)
139
-
140
- * Enhancements
141
- * Lolita #before_setup and #after_setup hooks added (Arturs Meisters)
142
- * Lolita #before_routes_load and #after_routes_load hooks added (Arturs Meisters)
143
- * added Kaminari[https://github.com/amatsuda/kaminari] support to paginator (Gatis Tomsons)
144
-
145
- * Bug fixes
146
- * array field values lazy assigment removed (Arturs Meisters)
147
- * tree fixed that can use mapping without InternalHelper (Arturs Meisters)
148
- * tree now can detect if parent is active, when any of children is active (Arturs Meisters)
149
- * order in list view works when model has default_scope (Gatis Tomsons)
150
- * rest_controller now understands Rails date/date_time generated attributes (Gatis Tomsons)
151
-
152
- === Version 3.1.4 / 2011-04-19
153
- * Enhancements
154
- * #render_component improved, to support any class with build method as first argument (Arturs Meisters)
155
- * list components refactore; columns and column components created (Arturs Meisters)
156
- * documentation for Filters (Gatis Tomsons)
157
- * sorting configuration for columns (Arturs Meisters)
158
- * lolita:assets generator invoke :assets for all added modules (Arturs Meisters)
159
-
160
- * Bug fixes
161
- * paginator updated, to use WillPaginate only when it is accessable (Arturs Meisters)
162
- * resource cheching for tree (Arturs Meisters)
163
-
164
- === Version 3.1.3 / 2011-04-15
165
- * Enhancements
166
- * Lolita::Navigation::Tree and Lolita::Navigation::Branch added (Arturs Meisters)
167
- * Main navigation tree generate from resources (Arturs Meisters)
168
-
169
- * Bug fixes
170
- * Hooks #let_content fixed to change after first block. (Arturs Meisters)
171
-
172
- === Version 3.1.2 / 2011-04-14
173
- * Enhancements
174
- * Hooks for Lolita::RestController addeed (Arturs Meisters)
175
- * Form save response splited in different methods for easy way to override (Arturs Meisters)
176
- * Hooks for #render_components (Arturs Meisters)
177
- * Hook #run return results from methods and blocks as one big string (Arturs Meisters)
178
- * Hooks :run_scope inventend (Arturs Meisters)
179
-
180
- * Bug fixes
181
- * Migration detection fixed (Arturs Meisters)
182
- * Hooks named fire methods fixed (Arturs Meisters)
183
- * Bug fixes in hooks (Arturs Meisters)
184
- * Builder bug fix, in production (Arturs Meisters)
185
-
186
- === Version 3.1.1 / 2011-04-13
187
- * Enhancements
188
- * Filters for list added (Gatis Tomsons)
189
-
190
- === Version 3.1.0 / 2011-04-12
191
- * Enhancements
192
- * Hooks added (Arturs Meisters)
193
- * Builders updated to complete received names (Arturs Meisters)
194
- * Fields renamed to related Ruby or ActiveSupport classes (Gatis Tomsons)
195
- * Componente default naming changed to match related model/class structure (Gatis Tomsons)
196
- * No need for <em>include Lolita::Configuration</em> and #lolita call for lolita_for
197
- related class (Arturs Meisters)
198
- * Automatic field type detection from ORM (Arturs Meisters)
199
- * List filter introduced (Gatis Tomsons)
200
- * Response for JSON (Gatis Tomsons)
201
- * Configuration has locales, and Lolita using those to seperate project translation (Arturs Meisters)
202
- * DateTime field formation for display only (Valdis Pornieks)
203
-
204
- * Bug fixes
205
- * Validation errors fixed (Janis Kesteris)
206
- * MongoID adapter fixed to work with new mongoid (Valdis Pornieks)
207
- * AR :order option fixed for find methods (Aivils Stoss)
208
- * AR migration error fixed (Arturs Meisters)
209
- * Redirect after destroy to index (Valdis Pornieks)
210
- * Route and nested route bugs fixed (Arturs Meisters)
211
- * Multiple textareas with tinyMCE (Valdis Pornieks)
212
- * Resource path methods fixed (Arturs Meisters)
213
- * #url_for fixed for lolita (Arturs Meisters, Gatis Tomsons)
214
- * Layout fixed (Rolands Bondars)
215
-
216
- === Version 3.0.7 / 2011-03-29
217
- * Enhancements
218
- * Collection field updated (Arturs Meisters)
219
- * #options_for_select added for collection field (Gatis Tomsons)
220
-
221
- === Version 3.0.6 / 2011-03-29
222
- * Enhancements
223
- * TinyMCE updated with new buttons (Janis Kesteris)
224
- * #add_module changed to support nested routes (Arturs Meisters)
225
- * Routes support nested resources (Arturs Meisters)
226
- * Fields splited in classes based on type (Arturs Meisters)
227
- * #render_component accept :format option (Arturs Meisters)
228
-
229
- * Bug fixes
230
- * Collection field collection priority fixed (Arturs Meisters)
231
- * JQuery Ajax request updated, to support Rails CSRF fix. (Arturs Meisters)
232
-
233
- === Version 3.0.5 / 2011-03-23
234
- * Enhacements
235
- * #by_type for tabs added (Arturs Meisters)
236
- * Test module invented and #be_routable matcher added (Arturs Meisters)
237
- * Cucumber added for testing (Rolands Bondars)
238
-
239
- * Bug fixes
240
- * Small look fixes (Rolands Bondars)
241
- * #content_for removed from tab components (Rolands Bondars)
242
-
243
- === Version 3.0.4 / 2011-03-17
244
- * Enhancements
245
- * Save button added (Rolands Bondars)
246
- * Removed unnecessery stuff from TinyMCE (Rolands Bonadars)
247
- * :content used as default type for tabs. (Arturs Meisters)
248
-
249
- === Version 3.0.3 / 2011-03-16
250
- * Enhancements (Arturs Meisters)
251
- * First version form 3.x series of Lolita
252
- * Basic configuration classes
253
- * Basic views
254
- * Basic controller and views mechanism
255
- * New look (Rolands Bondars)
256
-
257
- === Versions before 3.0.3
258
- Lolita 3 is completely different from previous versions and don't have any compability or architecture same as
259
- old versions.
data/author DELETED
@@ -1 +0,0 @@
1
- This software is developed by IT House (Latvia) and Artūrs Meisters
data/lolita.gemspec DELETED
@@ -1,38 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "lolita/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "lolita"
7
- s.version = Lolita::Version.to_s
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["ITHouse (Latvia) and Arturs Meisters"]
10
- s.email = "support@ithouse.lv"
11
- s.homepage = "http://github.com/ithouse/lolita"
12
- s.summary = %q{Great web resources management tool}
13
- s.description = %q{Manage Rails, Sinatra application backend with ease.}
14
-
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.md"
18
- ]
19
- s.licenses = ["MIT"]
20
-
21
- s.add_runtime_dependency(%q<kaminari>, ["~> 0.13.0"])
22
- s.add_runtime_dependency(%q<abstract>, ["~> 1"])
23
- s.add_runtime_dependency(%q<haml>, ["~> 3.1.2"])
24
- s.add_runtime_dependency(%q<activesupport>,["~>3.2.0"])
25
- s.add_runtime_dependency(%q<jquery-rails>, [">=0"])
26
- s.add_runtime_dependency(%q<tinymce-rails>,["~>3.4.8"])
27
-
28
- s.add_development_dependency(%q<fabrication>, ["~> 1.3.2"])
29
- s.add_development_dependency(%q<cover_me>, ["~> 1.2.0"])
30
- s.add_development_dependency(%q<rspec>, ["~> 2.9.0"])
31
- s.add_development_dependency(%q<capybara>, ["~> 1.1.2"])
32
- s.add_development_dependency(%q<capybara-webkit>, ["~> 0.11.0"])
33
- s.add_development_dependency(%q<ffaker>, ["~> 1"])
34
-
35
- s.files = `git ls-files`.split("\n")
36
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
37
- s.require_paths = ["lib"]
38
- end
@@ -1,33 +0,0 @@
1
- require 'cover_me'
2
- require 'ruby-debug'
3
- CoverMe.config do |c|
4
- # where is your project's root:
5
- c.project.root = File.expand_path("../lolita") # => "Rails.root" (default)
6
-
7
- # what files are you interested in coverage for:
8
- c.file_pattern = [
9
- /(#{CoverMe.config.project.root}\/app\/.+\.rb)/i,
10
- /(#{CoverMe.config.project.root}\/lib\/.+\.rb)/i
11
- ]
12
-
13
- c.formatter = CoverMe::HtmlFormatter
14
- # what files do you want to explicitly exclude from coverage
15
- #c.exclude_file_patterns # => [] (default)
16
-
17
- # where do you want the HTML generated:
18
- #c.html_formatter.output_path # => File.join(CoverMe.config.project.root, 'coverage') (default)
19
-
20
- # what do you want to happen when it finishes:
21
- c.at_exit = Proc.new {
22
- if CoverMe.config.formatter == CoverMe::HtmlFormatter
23
- index = File.join(CoverMe.config.html_formatter.output_path, 'index.html')
24
- if File.exists?(index)
25
- `open #{index}`
26
- end
27
- end
28
- }
29
- end
30
-
31
- at_exit do
32
- CoverMe.complete!
33
- end
@@ -1,16 +0,0 @@
1
- function load_tinymce(options){
2
- var settings = {
3
- theme: "advanced",
4
- skin: "cirkuit",
5
- mode: "textareas",
6
- theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,formatselect,|,link,unlink,image,code",
7
- theme_advanced_buttons2 : "",
8
- theme_advanced_buttons3 : "",
9
- theme_advanced_toolbar_location: "top",
10
- theme_advanced_toolbar_align: "left",
11
- // theme_advanced_statusbar_location : "bottom",
12
- theme_advanced_resizing: true
13
- };
14
- $.extend(true, settings, options);
15
- $("textarea[data-simple!=true]").tinymce(settings);
16
- }