active_scaffold_vho 3.0.10 → 3.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/README +11 -5
- data/active_scaffold_vho.gemspec +18 -18
- data/frontends/default/stylesheets/stylesheet.css +1 -1
- data/lib/active_scaffold/bridges/carrierwave/lib/carrierwave_bridge.rb +1 -0
- data/lib/active_scaffold/bridges/carrierwave/lib/form_ui.rb +2 -1
- data/lib/active_scaffold/bridges/paperclip/lib/list_ui.rb +1 -1
- data/lib/{extensions → active_scaffold/extensions}/action_controller_rendering.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/action_view_rendering.rb +20 -10
- data/lib/{extensions → active_scaffold/extensions}/action_view_resolver.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/active_association_reflection.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/active_record_offset.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/array.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/localize.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/name_option_for_datetime.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/nil_id_in_url_params.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/paginator_extensions.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/reverse_associations.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/routing_mapper.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/to_label.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/unsaved_associated.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/unsaved_record.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/usa_state.rb +0 -0
- data/lib/active_scaffold/helpers/list_column_helpers.rb +2 -2
- data/lib/active_scaffold/version.rb +1 -1
- data/lib/active_scaffold_env.rb +1 -1
- data/lib/generators/active_scaffold_setup/active_scaffold_setup_generator.rb +3 -3
- metadata +20 -20
data/README
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
** For all documentation see the project website: http://github.com/vhochstein/active_scaffold/wiki **
|
3
3
|
******************************************************************************************************
|
4
4
|
|
5
|
-
ActiveScaffold
|
5
|
+
ActiveScaffold Gem/Plugin by Scott Rutherford (scott@caronsoftware.com), Richard White (rrwhite@gmail.com), Lance Ivy (lance@cainlevy.net), Ed Moss, Tim Harper and Sergio Cambra (sergio@entrecables.com)
|
6
6
|
|
7
7
|
Uses DhtmlHistory by Brad Neuberg (bkn3@columbia.edu)
|
8
8
|
http://codinginparadise.org
|
@@ -40,7 +40,10 @@ If you want to install as plugins under vendor/plugins, install these versions:
|
|
40
40
|
rails plugin install git://github.com/vhochstein/active_scaffold.git
|
41
41
|
|
42
42
|
If you want to use the gem, add to your Gemfile:
|
43
|
-
gem "
|
43
|
+
gem "active_scaffold_vho"
|
44
|
+
|
45
|
+
In case you would like to use most recent commit:
|
46
|
+
gem 'active_scaffold_vho', :git => 'git://github.com/vhochstein/active_scaffold.git'
|
44
47
|
|
45
48
|
== Pick your own javascript framework
|
46
49
|
|
@@ -50,11 +53,14 @@ Out of the box Prototype or JQuery are supported:
|
|
50
53
|
Prototype 1.7 (default js framework)
|
51
54
|
rails.js in git://github.com/vhochstein/prototype-ujs.git
|
52
55
|
|
53
|
-
JQuery 1.4.1
|
54
|
-
|
56
|
+
JQuery 1.4.1, 1.4.2
|
57
|
+
https://github.com/vhochstein/jquery-ujs/raw/jquery1_4_2/src/rails.js
|
58
|
+
|
59
|
+
JQuery > 1.4.2
|
60
|
+
https://github.com/vhochstein/jquery-ujs/raw/master/src/rails.js
|
55
61
|
|
56
62
|
To configure the javascript framework when installed under vendor/plugins/
|
57
|
-
uncomment last line in ...plugins/active_scaffold/
|
63
|
+
uncomment last line in ...plugins/active_scaffold/lib/active_scaffold_env.rb in order to use jquery instead of prototype
|
58
64
|
|
59
65
|
To configure the javascript framework when installed as a gem:
|
60
66
|
Add a config/initializers/active_scaffold.rb containing:
|
data/active_scaffold_vho.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{active_scaffold_vho}
|
8
|
-
s.version = "3.0.
|
8
|
+
s.version = "3.0.11"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Many, see README"]
|
12
|
-
s.date = %q{2011-02-
|
12
|
+
s.date = %q{2011-02-03}
|
13
13
|
s.description = %q{Save time and headaches, and create a more easily maintainable set of pages, with ActiveScaffold. ActiveScaffold handles all your CRUD (create, read, update, delete) user interface needs, leaving you more time to focus on more challenging (and interesting!) problems.}
|
14
14
|
s.email = %q{activescaffold@googlegroups.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -175,6 +175,22 @@ Gem::Specification.new do |s|
|
|
175
175
|
"lib/active_scaffold/data_structures/nested_info.rb",
|
176
176
|
"lib/active_scaffold/data_structures/set.rb",
|
177
177
|
"lib/active_scaffold/data_structures/sorting.rb",
|
178
|
+
"lib/active_scaffold/extensions/action_controller_rendering.rb",
|
179
|
+
"lib/active_scaffold/extensions/action_view_rendering.rb",
|
180
|
+
"lib/active_scaffold/extensions/action_view_resolver.rb",
|
181
|
+
"lib/active_scaffold/extensions/active_association_reflection.rb",
|
182
|
+
"lib/active_scaffold/extensions/active_record_offset.rb",
|
183
|
+
"lib/active_scaffold/extensions/array.rb",
|
184
|
+
"lib/active_scaffold/extensions/localize.rb",
|
185
|
+
"lib/active_scaffold/extensions/name_option_for_datetime.rb",
|
186
|
+
"lib/active_scaffold/extensions/nil_id_in_url_params.rb",
|
187
|
+
"lib/active_scaffold/extensions/paginator_extensions.rb",
|
188
|
+
"lib/active_scaffold/extensions/reverse_associations.rb",
|
189
|
+
"lib/active_scaffold/extensions/routing_mapper.rb",
|
190
|
+
"lib/active_scaffold/extensions/to_label.rb",
|
191
|
+
"lib/active_scaffold/extensions/unsaved_associated.rb",
|
192
|
+
"lib/active_scaffold/extensions/unsaved_record.rb",
|
193
|
+
"lib/active_scaffold/extensions/usa_state.rb",
|
178
194
|
"lib/active_scaffold/finder.rb",
|
179
195
|
"lib/active_scaffold/helpers/association_helpers.rb",
|
180
196
|
"lib/active_scaffold/helpers/controller_helpers.rb",
|
@@ -201,22 +217,6 @@ Gem::Specification.new do |s|
|
|
201
217
|
"lib/active_scaffold_assets.rb",
|
202
218
|
"lib/active_scaffold_env.rb",
|
203
219
|
"lib/active_scaffold_vho.rb",
|
204
|
-
"lib/extensions/action_controller_rendering.rb",
|
205
|
-
"lib/extensions/action_view_rendering.rb",
|
206
|
-
"lib/extensions/action_view_resolver.rb",
|
207
|
-
"lib/extensions/active_association_reflection.rb",
|
208
|
-
"lib/extensions/active_record_offset.rb",
|
209
|
-
"lib/extensions/array.rb",
|
210
|
-
"lib/extensions/localize.rb",
|
211
|
-
"lib/extensions/name_option_for_datetime.rb",
|
212
|
-
"lib/extensions/nil_id_in_url_params.rb",
|
213
|
-
"lib/extensions/paginator_extensions.rb",
|
214
|
-
"lib/extensions/reverse_associations.rb",
|
215
|
-
"lib/extensions/routing_mapper.rb",
|
216
|
-
"lib/extensions/to_label.rb",
|
217
|
-
"lib/extensions/unsaved_associated.rb",
|
218
|
-
"lib/extensions/unsaved_record.rb",
|
219
|
-
"lib/extensions/usa_state.rb",
|
220
220
|
"lib/generators/active_scaffold/USAGE",
|
221
221
|
"lib/generators/active_scaffold/active_scaffold_generator.rb",
|
222
222
|
"lib/generators/active_scaffold_controller/USAGE",
|
@@ -25,6 +25,7 @@ module ActiveScaffold
|
|
25
25
|
def configure_carrierwave_field(field)
|
26
26
|
self.columns << field
|
27
27
|
self.columns[field].form_ui ||= :carrierwave
|
28
|
+
self.columns[field].params.add "#{field}_cache"
|
28
29
|
self.columns[field].params.add "delete_#{field}"
|
29
30
|
|
30
31
|
# [:file_name, :content_type, :file_size, :updated_at].each do |f|
|
@@ -22,7 +22,8 @@ module ActiveScaffold
|
|
22
22
|
content_tag(:div, (
|
23
23
|
get_column_value(@record, column) + " | " +
|
24
24
|
hidden_field(:record, "delete_#{column.name}", hidden_field_options) +
|
25
|
-
content_tag(:a, as_(:remove_file), {:href => '#', :onclick => js_remove_file_code})
|
25
|
+
content_tag(:a, as_(:remove_file), {:href => '#', :onclick => js_remove_file_code}) +
|
26
|
+
hidden_field(:record, "#{column.name}_cache", {:name => options[:name].gsub(/\[#{column.name}\]$/, "[#{column.name}_cache]")})
|
26
27
|
).html_safe
|
27
28
|
) + content_tag(:div, input, :style => "display: none")
|
28
29
|
)
|
File without changes
|
@@ -38,15 +38,19 @@ module ActionView::Rendering #:nodoc:
|
|
38
38
|
#
|
39
39
|
def render_with_active_scaffold(*args, &block)
|
40
40
|
if args.first == :super
|
41
|
+
last_view = @view_stack.last
|
41
42
|
options = args[1] || {}
|
42
43
|
options[:locals] ||= {}
|
43
|
-
options[:locals].reverse_merge!(
|
44
|
-
if
|
45
|
-
|
46
|
-
|
44
|
+
options[:locals].reverse_merge!(last_view[:locals] || {})
|
45
|
+
if last_view[:templates].nil?
|
46
|
+
last_view[:templates] = lookup_context.find_all_templates(last_view[:view], controller_path, !last_view[:is_template])
|
47
|
+
last_view[:templates].shift
|
47
48
|
end
|
48
|
-
options[:template] =
|
49
|
-
|
49
|
+
options[:template] = last_view[:templates].shift
|
50
|
+
@view_stack << last_view
|
51
|
+
result = render_without_active_scaffold options
|
52
|
+
@view_stack.pop
|
53
|
+
result
|
50
54
|
elsif args.first.is_a?(Hash) and args.first[:active_scaffold]
|
51
55
|
require 'digest/md5'
|
52
56
|
options = args.first
|
@@ -79,11 +83,17 @@ module ActionView::Rendering #:nodoc:
|
|
79
83
|
else
|
80
84
|
options = args.first
|
81
85
|
if options.is_a?(Hash)
|
82
|
-
|
83
|
-
|
84
|
-
|
86
|
+
current_view = {:view => options[:partial], :is_template => false} if options[:partial]
|
87
|
+
current_view = {:view => options[:template], :is_template => !!options[:template]} if current_view.nil? && options[:template]
|
88
|
+
current_view[:locals] = options[:locals] if !current_view.nil? && options[:locals]
|
89
|
+
if current_view.present?
|
90
|
+
@view_stack ||= []
|
91
|
+
@view_stack << current_view
|
92
|
+
end
|
85
93
|
end
|
86
|
-
render_without_active_scaffold(*args, &block)
|
94
|
+
result = render_without_active_scaffold(*args, &block)
|
95
|
+
@view_stack.pop if current_view.present?
|
96
|
+
result
|
87
97
|
end
|
88
98
|
end
|
89
99
|
alias_method_chain :render, :active_scaffold
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -346,10 +346,10 @@ module ActiveScaffold
|
|
346
346
|
def render_nested_view(action_links, url_options, record)
|
347
347
|
rendered = []
|
348
348
|
action_links.member.each do |link|
|
349
|
-
if link.nested_link? && link.column && @nested_auto_open[link.column.name] && @records.length <= @nested_auto_open[link.column.name] && respond_to?(:
|
349
|
+
if link.nested_link? && link.column && @nested_auto_open[link.column.name] && @records.length <= @nested_auto_open[link.column.name] && controller.respond_to?(:render_component_into_view)
|
350
350
|
link_url_options = {:adapter => '_list_inline_adapter', :format => :js}.merge(action_link_url_options(link, url_options, record, options = {:reuse_eid => true}))
|
351
351
|
link_id = get_action_link_id(link_url_options, record, link.column)
|
352
|
-
rendered << (
|
352
|
+
rendered << (controller.send(:render_component_into_view, link_url_options) + javascript_tag("ActiveScaffold.ActionLink.get('#{link_id}').set_opened();"))
|
353
353
|
end
|
354
354
|
end
|
355
355
|
rendered.join(' ').html_safe
|
data/lib/active_scaffold_env.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# TODO: clean up extensions. some could be organized for autoloading, and others could be removed entirely.
|
2
|
-
Dir["#{File.dirname __FILE__}/extensions/*.rb"].each { |file| require file }
|
2
|
+
Dir["#{File.dirname __FILE__}/active_scaffold/extensions/*.rb"].each { |file| require file }
|
3
3
|
|
4
4
|
ActionController::Base.send(:include, ActiveScaffold)
|
5
5
|
ActionController::Base.send(:include, RespondsToParent)
|
@@ -39,10 +39,10 @@ module Rails
|
|
39
39
|
:after => "<%= javascript_include_tag :defaults %>\n"
|
40
40
|
elsif js_lib == 'jquery'
|
41
41
|
inject_into_file "app/views/layouts/application.html.erb",
|
42
|
-
" <%= stylesheet_link_tag 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.
|
43
|
-
<%= javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.
|
42
|
+
" <%= stylesheet_link_tag 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/ui-lightness/jquery-ui.css' %>
|
43
|
+
<%= javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js' %>
|
44
44
|
<%= javascript_include_tag 'rails_jquery.js' %>
|
45
|
-
<%= javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.
|
45
|
+
<%= javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.js' %>
|
46
46
|
<%= javascript_include_tag 'jquery-ui-timepicker-addon.js' %>
|
47
47
|
<%= javascript_include_tag 'application.js' %>
|
48
48
|
<%= active_scaffold_includes %>\n",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_scaffold_vho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 3.0.
|
9
|
+
- 11
|
10
|
+
version: 3.0.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Many, see README
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-03 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -290,6 +290,22 @@ files:
|
|
290
290
|
- lib/active_scaffold/data_structures/nested_info.rb
|
291
291
|
- lib/active_scaffold/data_structures/set.rb
|
292
292
|
- lib/active_scaffold/data_structures/sorting.rb
|
293
|
+
- lib/active_scaffold/extensions/action_controller_rendering.rb
|
294
|
+
- lib/active_scaffold/extensions/action_view_rendering.rb
|
295
|
+
- lib/active_scaffold/extensions/action_view_resolver.rb
|
296
|
+
- lib/active_scaffold/extensions/active_association_reflection.rb
|
297
|
+
- lib/active_scaffold/extensions/active_record_offset.rb
|
298
|
+
- lib/active_scaffold/extensions/array.rb
|
299
|
+
- lib/active_scaffold/extensions/localize.rb
|
300
|
+
- lib/active_scaffold/extensions/name_option_for_datetime.rb
|
301
|
+
- lib/active_scaffold/extensions/nil_id_in_url_params.rb
|
302
|
+
- lib/active_scaffold/extensions/paginator_extensions.rb
|
303
|
+
- lib/active_scaffold/extensions/reverse_associations.rb
|
304
|
+
- lib/active_scaffold/extensions/routing_mapper.rb
|
305
|
+
- lib/active_scaffold/extensions/to_label.rb
|
306
|
+
- lib/active_scaffold/extensions/unsaved_associated.rb
|
307
|
+
- lib/active_scaffold/extensions/unsaved_record.rb
|
308
|
+
- lib/active_scaffold/extensions/usa_state.rb
|
293
309
|
- lib/active_scaffold/finder.rb
|
294
310
|
- lib/active_scaffold/helpers/association_helpers.rb
|
295
311
|
- lib/active_scaffold/helpers/controller_helpers.rb
|
@@ -316,22 +332,6 @@ files:
|
|
316
332
|
- lib/active_scaffold_assets.rb
|
317
333
|
- lib/active_scaffold_env.rb
|
318
334
|
- lib/active_scaffold_vho.rb
|
319
|
-
- lib/extensions/action_controller_rendering.rb
|
320
|
-
- lib/extensions/action_view_rendering.rb
|
321
|
-
- lib/extensions/action_view_resolver.rb
|
322
|
-
- lib/extensions/active_association_reflection.rb
|
323
|
-
- lib/extensions/active_record_offset.rb
|
324
|
-
- lib/extensions/array.rb
|
325
|
-
- lib/extensions/localize.rb
|
326
|
-
- lib/extensions/name_option_for_datetime.rb
|
327
|
-
- lib/extensions/nil_id_in_url_params.rb
|
328
|
-
- lib/extensions/paginator_extensions.rb
|
329
|
-
- lib/extensions/reverse_associations.rb
|
330
|
-
- lib/extensions/routing_mapper.rb
|
331
|
-
- lib/extensions/to_label.rb
|
332
|
-
- lib/extensions/unsaved_associated.rb
|
333
|
-
- lib/extensions/unsaved_record.rb
|
334
|
-
- lib/extensions/usa_state.rb
|
335
335
|
- lib/generators/active_scaffold/USAGE
|
336
336
|
- lib/generators/active_scaffold/active_scaffold_generator.rb
|
337
337
|
- lib/generators/active_scaffold_controller/USAGE
|