active_scaffold 3.0.5 → 3.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +11 -2
- data/Gemfile.lock +20 -0
- data/Rakefile +33 -4
- data/active_scaffold.gemspec +378 -17
- data/frontends/default/images/config.png +0 -0
- data/frontends/default/images/gears.png +0 -0
- data/frontends/default/javascripts/jquery/active_scaffold.js +34 -33
- data/frontends/default/javascripts/jquery/jquery.editinplace.js +21 -4
- data/frontends/default/javascripts/prototype/active_scaffold.js +43 -38
- data/frontends/default/stylesheets/stylesheet.css +110 -35
- data/frontends/default/views/_action_group.html.erb +20 -0
- data/frontends/default/views/_base_form.html.erb +7 -3
- data/frontends/default/views/_create_form.html.erb +5 -3
- data/frontends/default/views/_create_form_on_list.html.erb +2 -1
- data/frontends/default/views/_field_search.html.erb +2 -2
- data/frontends/default/views/_form.html.erb +2 -2
- data/frontends/default/views/_form_messages.html.erb +1 -1
- data/frontends/default/views/_horizontal_subform.html.erb +1 -1
- data/frontends/default/views/_list_actions.html.erb +6 -14
- data/frontends/default/views/_list_header.html.erb +4 -6
- data/frontends/default/views/_list_with_header.html.erb +2 -2
- data/frontends/default/views/_messages.html.erb +2 -2
- data/frontends/default/views/_search.html.erb +2 -2
- data/frontends/default/views/_show.html.erb +1 -1
- data/frontends/default/views/_update_form.html.erb +2 -1
- data/frontends/default/views/_vertical_subform.html.erb +1 -1
- data/frontends/default/views/action_confirmation.html.erb +13 -0
- data/frontends/default/views/add_existing.js.rjs +1 -1
- data/frontends/default/views/destroy.js.rjs +21 -3
- data/frontends/default/views/on_action_update.js.rjs +1 -1
- data/frontends/default/views/on_create.js.rjs +30 -13
- data/frontends/default/views/on_update.js.rjs +19 -6
- data/init.rb +6 -0
- data/lib/active_scaffold/actions/core.rb +32 -12
- data/lib/active_scaffold/actions/create.rb +4 -11
- data/lib/active_scaffold/actions/delete.rb +16 -13
- data/lib/active_scaffold/actions/list.rb +58 -2
- data/lib/active_scaffold/actions/mark.rb +1 -1
- data/lib/active_scaffold/actions/nested.rb +24 -15
- data/lib/active_scaffold/actions/show.rb +10 -3
- data/lib/active_scaffold/actions/update.rb +10 -3
- data/lib/{active_record_permissions.rb → active_scaffold/active_record_permissions.rb} +0 -0
- data/lib/active_scaffold/bridges/ancestry/lib/ancestry_bridge.rb +9 -8
- data/lib/active_scaffold/bridges/bridge.rb +1 -1
- data/lib/active_scaffold/bridges/calendar_date_select/lib/as_cds_bridge.rb +8 -4
- data/lib/active_scaffold/bridges/carrierwave/bridge.rb +1 -1
- data/lib/active_scaffold/bridges/paperclip/bridge.rb +1 -1
- data/lib/active_scaffold/bridges/paperclip/lib/list_ui.rb +1 -1
- data/lib/active_scaffold/config/base.rb +8 -0
- data/lib/active_scaffold/config/core.rb +2 -15
- data/lib/active_scaffold/config/create.rb +8 -0
- data/lib/active_scaffold/config/delete.rb +10 -1
- data/lib/active_scaffold/config/field_search.rb +1 -0
- data/lib/active_scaffold/config/form.rb +2 -1
- data/lib/active_scaffold/config/nested.rb +3 -2
- data/lib/active_scaffold/config/search.rb +1 -0
- data/lib/active_scaffold/config/show.rb +1 -0
- data/lib/active_scaffold/config/update.rb +8 -0
- data/lib/active_scaffold/constraints.rb +9 -4
- data/lib/active_scaffold/data_structures/action_columns.rb +1 -1
- data/lib/active_scaffold/data_structures/action_link.rb +10 -1
- data/lib/active_scaffold/data_structures/action_links.rb +62 -22
- data/lib/active_scaffold/data_structures/column.rb +17 -13
- data/lib/active_scaffold/data_structures/nested_info.rb +21 -6
- data/lib/active_scaffold/finder.rb +2 -1
- data/lib/active_scaffold/helpers/association_helpers.rb +2 -2
- data/lib/active_scaffold/helpers/controller_helpers.rb +57 -10
- data/lib/active_scaffold/helpers/form_column_helpers.rb +12 -8
- data/lib/active_scaffold/helpers/id_helpers.rb +5 -9
- data/lib/active_scaffold/helpers/list_column_helpers.rb +26 -28
- data/lib/active_scaffold/helpers/search_column_helpers.rb +8 -3
- data/lib/active_scaffold/helpers/view_helpers.rb +60 -19
- data/lib/active_scaffold/locale/de.rb +13 -6
- data/lib/active_scaffold/locale/en.rb +2 -1
- data/lib/active_scaffold/locale/es.yml +3 -0
- data/lib/active_scaffold/locale/fr.rb +5 -2
- data/lib/active_scaffold/locale/ru.yml +77 -20
- data/lib/active_scaffold/marked_model.rb +5 -5
- data/lib/{paginator.rb → active_scaffold/paginator.rb} +0 -0
- data/lib/{responds_to_parent.rb → active_scaffold/responds_to_parent.rb} +0 -0
- data/lib/active_scaffold/version.rb +9 -0
- data/lib/active_scaffold.rb +60 -84
- data/lib/active_scaffold_assets.rb +45 -0
- data/lib/active_scaffold_env.rb +14 -0
- data/lib/active_scaffold_vho.rb +2 -0
- data/lib/extensions/active_association_reflection.rb +13 -0
- data/lib/extensions/paginator_extensions.rb +1 -1
- data/lib/extensions/routing_mapper.rb +1 -1
- data/lib/generators/active_scaffold_setup/active_scaffold_setup_generator.rb +12 -4
- metadata +85 -68
- data/lib/dhtml_confirm.rb +0 -54
data/.document
ADDED
data/Gemfile
CHANGED
@@ -1,4 +1,13 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
2
5
|
|
3
|
-
#
|
4
|
-
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "shoulda", ">= 0"
|
10
|
+
gem "bundler", "~> 1.0.0"
|
11
|
+
gem "jeweler", "~> 1.5.2"
|
12
|
+
gem "rcov", ">= 0"
|
13
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
git (1.2.5)
|
5
|
+
jeweler (1.5.2)
|
6
|
+
bundler (~> 1.0.0)
|
7
|
+
git (>= 1.2.5)
|
8
|
+
rake
|
9
|
+
rake (0.8.7)
|
10
|
+
rcov (0.9.9)
|
11
|
+
shoulda (2.11.3)
|
12
|
+
|
13
|
+
PLATFORMS
|
14
|
+
ruby
|
15
|
+
|
16
|
+
DEPENDENCIES
|
17
|
+
bundler (~> 1.0.0)
|
18
|
+
jeweler (~> 1.5.2)
|
19
|
+
rcov
|
20
|
+
shoulda
|
data/Rakefile
CHANGED
@@ -1,11 +1,40 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
1
10
|
require 'rake'
|
2
11
|
require 'rake/testtask'
|
3
12
|
require 'rake/packagetask'
|
4
13
|
require 'rake/rdoctask'
|
5
14
|
require 'find'
|
6
15
|
|
7
|
-
|
8
|
-
|
16
|
+
require 'jeweler'
|
17
|
+
require './lib/active_scaffold/version.rb'
|
18
|
+
|
19
|
+
Jeweler::Tasks.new do |gem|
|
20
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
21
|
+
gem.name = "active_scaffold"
|
22
|
+
gem.version = ActiveScaffold::Version::STRING
|
23
|
+
gem.homepage = "http://github.com/vhochstein/active_scaffold"
|
24
|
+
gem.license = "MIT"
|
25
|
+
gem.summary = %Q{Rails 3 Version of activescaffold supporting prototype and jquery}
|
26
|
+
gem.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.}
|
27
|
+
gem.email = "activescaffold@googlegroups.com"
|
28
|
+
gem.authors = ["Many, see README"]
|
29
|
+
gem.add_runtime_dependency 'render_component'
|
30
|
+
gem.add_runtime_dependency 'verification'
|
31
|
+
gem.add_runtime_dependency 'rails', '~> 3.0.0'
|
32
|
+
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
33
|
+
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
34
|
+
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
35
|
+
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
36
|
+
end
|
37
|
+
Jeweler::RubygemsDotOrgTasks.new
|
9
38
|
|
10
39
|
desc 'Test ActiveScaffold.'
|
11
40
|
Rake::TestTask.new(:test) do |t|
|
@@ -17,8 +46,8 @@ end
|
|
17
46
|
desc 'Generate documentation for ActiveScaffold.'
|
18
47
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
19
48
|
rdoc.rdoc_dir = 'rdoc'
|
20
|
-
rdoc.title = 'ActiveScaffold'
|
49
|
+
rdoc.title = 'ActiveScaffold #{ActiveScaffold::Version::STRING}'
|
21
50
|
rdoc.options << '--line-numbers' << '--inline-source'
|
22
|
-
rdoc.rdoc_files.include('README')
|
51
|
+
rdoc.rdoc_files.include('README*')
|
23
52
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
24
53
|
end
|
data/active_scaffold.gemspec
CHANGED
@@ -1,24 +1,385 @@
|
|
1
|
-
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
2
5
|
|
3
6
|
Gem::Specification.new do |s|
|
4
|
-
s.name
|
5
|
-
s.version
|
6
|
-
s.platform = Gem::Platform::RUBY
|
7
|
-
s.authors = ["Many, see README"]
|
8
|
-
s.email = ["activescaffold@googlegroups.com"]
|
9
|
-
s.homepage = "https://github.com/vhochstein/active_scaffold"
|
10
|
-
s.summary = %q{Rails 3 Version of activescaffold supporting prototype and jquery}
|
11
|
-
s.description = %q{Advanced scaffolding plugin for Rails}
|
7
|
+
s.name = %q{active_scaffold}
|
8
|
+
s.version = "3.0.10"
|
12
9
|
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Many, see README"]
|
12
|
+
s.date = %q{2011-02-01}
|
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
|
+
s.email = %q{activescaffold@googlegroups.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
".autotest",
|
20
|
+
".document",
|
21
|
+
"CHANGELOG",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"MIT-LICENSE",
|
25
|
+
"README",
|
26
|
+
"Rakefile",
|
27
|
+
"active_scaffold.gemspec",
|
28
|
+
"active_scaffold_vho.gemspec",
|
29
|
+
"frontends/default/images/add.gif",
|
30
|
+
"frontends/default/images/arrow_down.gif",
|
31
|
+
"frontends/default/images/arrow_up.gif",
|
32
|
+
"frontends/default/images/close.gif",
|
33
|
+
"frontends/default/images/config.png",
|
34
|
+
"frontends/default/images/cross.png",
|
35
|
+
"frontends/default/images/gears.png",
|
36
|
+
"frontends/default/images/indicator-small.gif",
|
37
|
+
"frontends/default/images/indicator.gif",
|
38
|
+
"frontends/default/images/magnifier.png",
|
39
|
+
"frontends/default/javascripts/jquery/active_scaffold.js",
|
40
|
+
"frontends/default/javascripts/jquery/jquery.editinplace.js",
|
41
|
+
"frontends/default/javascripts/prototype/active_scaffold.js",
|
42
|
+
"frontends/default/javascripts/prototype/dhtml_history.js",
|
43
|
+
"frontends/default/javascripts/prototype/form_enhancements.js",
|
44
|
+
"frontends/default/javascripts/prototype/rico_corner.js",
|
45
|
+
"frontends/default/stylesheets/stylesheet-ie.css",
|
46
|
+
"frontends/default/stylesheets/stylesheet.css",
|
47
|
+
"frontends/default/views/_action_group.html.erb",
|
48
|
+
"frontends/default/views/_add_existing_form.html.erb",
|
49
|
+
"frontends/default/views/_base_form.html.erb",
|
50
|
+
"frontends/default/views/_create_form.html.erb",
|
51
|
+
"frontends/default/views/_create_form_on_list.html.erb",
|
52
|
+
"frontends/default/views/_field_search.html.erb",
|
53
|
+
"frontends/default/views/_form.html.erb",
|
54
|
+
"frontends/default/views/_form_association.html.erb",
|
55
|
+
"frontends/default/views/_form_association_footer.html.erb",
|
56
|
+
"frontends/default/views/_form_attribute.html.erb",
|
57
|
+
"frontends/default/views/_form_hidden_attribute.html.erb",
|
58
|
+
"frontends/default/views/_form_messages.html.erb",
|
59
|
+
"frontends/default/views/_horizontal_subform.html.erb",
|
60
|
+
"frontends/default/views/_horizontal_subform_header.html.erb",
|
61
|
+
"frontends/default/views/_horizontal_subform_record.html.erb",
|
62
|
+
"frontends/default/views/_human_conditions.html.erb",
|
63
|
+
"frontends/default/views/_list.html.erb",
|
64
|
+
"frontends/default/views/_list_actions.html.erb",
|
65
|
+
"frontends/default/views/_list_calculations.html.erb",
|
66
|
+
"frontends/default/views/_list_column_headings.html.erb",
|
67
|
+
"frontends/default/views/_list_header.html.erb",
|
68
|
+
"frontends/default/views/_list_inline_adapter.html.erb",
|
69
|
+
"frontends/default/views/_list_messages.html.erb",
|
70
|
+
"frontends/default/views/_list_pagination.html.erb",
|
71
|
+
"frontends/default/views/_list_pagination_links.html.erb",
|
72
|
+
"frontends/default/views/_list_record.html.erb",
|
73
|
+
"frontends/default/views/_list_record_columns.html.erb",
|
74
|
+
"frontends/default/views/_list_with_header.html.erb",
|
75
|
+
"frontends/default/views/_messages.html.erb",
|
76
|
+
"frontends/default/views/_render_field.js.rjs",
|
77
|
+
"frontends/default/views/_row.html.erb",
|
78
|
+
"frontends/default/views/_search.html.erb",
|
79
|
+
"frontends/default/views/_search_attribute.html.erb",
|
80
|
+
"frontends/default/views/_show.html.erb",
|
81
|
+
"frontends/default/views/_show_columns.html.erb",
|
82
|
+
"frontends/default/views/_update_actions.html.erb",
|
83
|
+
"frontends/default/views/_update_form.html.erb",
|
84
|
+
"frontends/default/views/_vertical_subform.html.erb",
|
85
|
+
"frontends/default/views/_vertical_subform_record.html.erb",
|
86
|
+
"frontends/default/views/action_confirmation.html.erb",
|
87
|
+
"frontends/default/views/add_existing.js.rjs",
|
88
|
+
"frontends/default/views/add_existing_form.html.erb",
|
89
|
+
"frontends/default/views/create.html.erb",
|
90
|
+
"frontends/default/views/delete.html.erb",
|
91
|
+
"frontends/default/views/destroy.js.rjs",
|
92
|
+
"frontends/default/views/edit_associated.js.rjs",
|
93
|
+
"frontends/default/views/field_search.html.erb",
|
94
|
+
"frontends/default/views/form_messages.js.rjs",
|
95
|
+
"frontends/default/views/list.html.erb",
|
96
|
+
"frontends/default/views/list.js.rjs",
|
97
|
+
"frontends/default/views/on_action_update.js.rjs",
|
98
|
+
"frontends/default/views/on_create.js.rjs",
|
99
|
+
"frontends/default/views/on_update.js.rjs",
|
100
|
+
"frontends/default/views/search.html.erb",
|
101
|
+
"frontends/default/views/show.html.erb",
|
102
|
+
"frontends/default/views/update.html.erb",
|
103
|
+
"frontends/default/views/update_column.js.rjs",
|
104
|
+
"frontends/default/views/update_row.js.rjs",
|
105
|
+
"init.rb",
|
106
|
+
"lib/active_scaffold.rb",
|
107
|
+
"lib/active_scaffold/actions/common_search.rb",
|
108
|
+
"lib/active_scaffold/actions/core.rb",
|
109
|
+
"lib/active_scaffold/actions/create.rb",
|
110
|
+
"lib/active_scaffold/actions/delete.rb",
|
111
|
+
"lib/active_scaffold/actions/field_search.rb",
|
112
|
+
"lib/active_scaffold/actions/list.rb",
|
113
|
+
"lib/active_scaffold/actions/mark.rb",
|
114
|
+
"lib/active_scaffold/actions/nested.rb",
|
115
|
+
"lib/active_scaffold/actions/search.rb",
|
116
|
+
"lib/active_scaffold/actions/show.rb",
|
117
|
+
"lib/active_scaffold/actions/subform.rb",
|
118
|
+
"lib/active_scaffold/actions/update.rb",
|
119
|
+
"lib/active_scaffold/active_record_permissions.rb",
|
120
|
+
"lib/active_scaffold/attribute_params.rb",
|
121
|
+
"lib/active_scaffold/bridges/ancestry/bridge.rb",
|
122
|
+
"lib/active_scaffold/bridges/ancestry/lib/ancestry_bridge.rb",
|
123
|
+
"lib/active_scaffold/bridges/bridge.rb",
|
124
|
+
"lib/active_scaffold/bridges/calendar_date_select/bridge.rb",
|
125
|
+
"lib/active_scaffold/bridges/calendar_date_select/lib/as_cds_bridge.rb",
|
126
|
+
"lib/active_scaffold/bridges/carrierwave/bridge.rb",
|
127
|
+
"lib/active_scaffold/bridges/carrierwave/lib/carrierwave_bridge.rb",
|
128
|
+
"lib/active_scaffold/bridges/carrierwave/lib/carrierwave_bridge_helpers.rb",
|
129
|
+
"lib/active_scaffold/bridges/carrierwave/lib/form_ui.rb",
|
130
|
+
"lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb",
|
131
|
+
"lib/active_scaffold/bridges/date_picker/bridge.rb",
|
132
|
+
"lib/active_scaffold/bridges/date_picker/lib/datepicker_bridge.rb",
|
133
|
+
"lib/active_scaffold/bridges/date_picker/public/javascripts/date_picker_bridge.js",
|
134
|
+
"lib/active_scaffold/bridges/file_column/bridge.rb",
|
135
|
+
"lib/active_scaffold/bridges/file_column/lib/as_file_column_bridge.rb",
|
136
|
+
"lib/active_scaffold/bridges/file_column/lib/file_column_helpers.rb",
|
137
|
+
"lib/active_scaffold/bridges/file_column/lib/form_ui.rb",
|
138
|
+
"lib/active_scaffold/bridges/file_column/lib/list_ui.rb",
|
139
|
+
"lib/active_scaffold/bridges/file_column/test/functional/file_column_keep_test.rb",
|
140
|
+
"lib/active_scaffold/bridges/file_column/test/mock_model.rb",
|
141
|
+
"lib/active_scaffold/bridges/file_column/test/test_helper.rb",
|
142
|
+
"lib/active_scaffold/bridges/paperclip/bridge.rb",
|
143
|
+
"lib/active_scaffold/bridges/paperclip/lib/form_ui.rb",
|
144
|
+
"lib/active_scaffold/bridges/paperclip/lib/list_ui.rb",
|
145
|
+
"lib/active_scaffold/bridges/paperclip/lib/paperclip_bridge.rb",
|
146
|
+
"lib/active_scaffold/bridges/paperclip/lib/paperclip_bridge_helpers.rb",
|
147
|
+
"lib/active_scaffold/bridges/semantic_attributes/bridge.rb",
|
148
|
+
"lib/active_scaffold/bridges/semantic_attributes/lib/semantic_attributes_bridge.rb",
|
149
|
+
"lib/active_scaffold/bridges/shared/date_bridge.rb",
|
150
|
+
"lib/active_scaffold/bridges/tiny_mce/bridge.rb",
|
151
|
+
"lib/active_scaffold/bridges/tiny_mce/lib/tiny_mce_bridge.rb",
|
152
|
+
"lib/active_scaffold/bridges/validation_reflection/bridge.rb",
|
153
|
+
"lib/active_scaffold/bridges/validation_reflection/lib/validation_reflection_bridge.rb",
|
154
|
+
"lib/active_scaffold/config/base.rb",
|
155
|
+
"lib/active_scaffold/config/core.rb",
|
156
|
+
"lib/active_scaffold/config/create.rb",
|
157
|
+
"lib/active_scaffold/config/delete.rb",
|
158
|
+
"lib/active_scaffold/config/field_search.rb",
|
159
|
+
"lib/active_scaffold/config/form.rb",
|
160
|
+
"lib/active_scaffold/config/list.rb",
|
161
|
+
"lib/active_scaffold/config/mark.rb",
|
162
|
+
"lib/active_scaffold/config/nested.rb",
|
163
|
+
"lib/active_scaffold/config/search.rb",
|
164
|
+
"lib/active_scaffold/config/show.rb",
|
165
|
+
"lib/active_scaffold/config/subform.rb",
|
166
|
+
"lib/active_scaffold/config/update.rb",
|
167
|
+
"lib/active_scaffold/configurable.rb",
|
168
|
+
"lib/active_scaffold/constraints.rb",
|
169
|
+
"lib/active_scaffold/data_structures/action_columns.rb",
|
170
|
+
"lib/active_scaffold/data_structures/action_link.rb",
|
171
|
+
"lib/active_scaffold/data_structures/action_links.rb",
|
172
|
+
"lib/active_scaffold/data_structures/actions.rb",
|
173
|
+
"lib/active_scaffold/data_structures/column.rb",
|
174
|
+
"lib/active_scaffold/data_structures/columns.rb",
|
175
|
+
"lib/active_scaffold/data_structures/error_message.rb",
|
176
|
+
"lib/active_scaffold/data_structures/nested_info.rb",
|
177
|
+
"lib/active_scaffold/data_structures/set.rb",
|
178
|
+
"lib/active_scaffold/data_structures/sorting.rb",
|
179
|
+
"lib/active_scaffold/finder.rb",
|
180
|
+
"lib/active_scaffold/helpers/association_helpers.rb",
|
181
|
+
"lib/active_scaffold/helpers/controller_helpers.rb",
|
182
|
+
"lib/active_scaffold/helpers/country_helpers.rb",
|
183
|
+
"lib/active_scaffold/helpers/form_column_helpers.rb",
|
184
|
+
"lib/active_scaffold/helpers/human_condition_helpers.rb",
|
185
|
+
"lib/active_scaffold/helpers/id_helpers.rb",
|
186
|
+
"lib/active_scaffold/helpers/list_column_helpers.rb",
|
187
|
+
"lib/active_scaffold/helpers/pagination_helpers.rb",
|
188
|
+
"lib/active_scaffold/helpers/search_column_helpers.rb",
|
189
|
+
"lib/active_scaffold/helpers/show_column_helpers.rb",
|
190
|
+
"lib/active_scaffold/helpers/view_helpers.rb",
|
191
|
+
"lib/active_scaffold/locale/de.rb",
|
192
|
+
"lib/active_scaffold/locale/en.rb",
|
193
|
+
"lib/active_scaffold/locale/es.yml",
|
194
|
+
"lib/active_scaffold/locale/fr.rb",
|
195
|
+
"lib/active_scaffold/locale/hu.yml",
|
196
|
+
"lib/active_scaffold/locale/ja.yml",
|
197
|
+
"lib/active_scaffold/locale/ru.yml",
|
198
|
+
"lib/active_scaffold/marked_model.rb",
|
199
|
+
"lib/active_scaffold/paginator.rb",
|
200
|
+
"lib/active_scaffold/responds_to_parent.rb",
|
201
|
+
"lib/active_scaffold/version.rb",
|
202
|
+
"lib/active_scaffold_assets.rb",
|
203
|
+
"lib/active_scaffold_env.rb",
|
204
|
+
"lib/active_scaffold_vho.rb",
|
205
|
+
"lib/extensions/action_controller_rendering.rb",
|
206
|
+
"lib/extensions/action_view_rendering.rb",
|
207
|
+
"lib/extensions/action_view_resolver.rb",
|
208
|
+
"lib/extensions/active_association_reflection.rb",
|
209
|
+
"lib/extensions/active_record_offset.rb",
|
210
|
+
"lib/extensions/array.rb",
|
211
|
+
"lib/extensions/localize.rb",
|
212
|
+
"lib/extensions/name_option_for_datetime.rb",
|
213
|
+
"lib/extensions/nil_id_in_url_params.rb",
|
214
|
+
"lib/extensions/paginator_extensions.rb",
|
215
|
+
"lib/extensions/reverse_associations.rb",
|
216
|
+
"lib/extensions/routing_mapper.rb",
|
217
|
+
"lib/extensions/to_label.rb",
|
218
|
+
"lib/extensions/unsaved_associated.rb",
|
219
|
+
"lib/extensions/unsaved_record.rb",
|
220
|
+
"lib/extensions/usa_state.rb",
|
221
|
+
"lib/generators/active_scaffold/USAGE",
|
222
|
+
"lib/generators/active_scaffold/active_scaffold_generator.rb",
|
223
|
+
"lib/generators/active_scaffold_controller/USAGE",
|
224
|
+
"lib/generators/active_scaffold_controller/active_scaffold_controller_generator.rb",
|
225
|
+
"lib/generators/active_scaffold_controller/templates/controller.rb",
|
226
|
+
"lib/generators/active_scaffold_setup/USAGE",
|
227
|
+
"lib/generators/active_scaffold_setup/active_scaffold_setup_generator.rb",
|
228
|
+
"public/blank.html",
|
229
|
+
"shoulda_macros/macros.rb",
|
230
|
+
"test/bridges/bridge_test.rb",
|
231
|
+
"test/config/base_test.rb",
|
232
|
+
"test/config/create_test.rb",
|
233
|
+
"test/config/list_test.rb",
|
234
|
+
"test/config/show_test.rb",
|
235
|
+
"test/config/update_test.rb",
|
236
|
+
"test/const_mocker.rb",
|
237
|
+
"test/data_structures/action_columns_test.rb",
|
238
|
+
"test/data_structures/action_link_test.rb",
|
239
|
+
"test/data_structures/action_links_test.rb",
|
240
|
+
"test/data_structures/actions_test.rb",
|
241
|
+
"test/data_structures/association_column_test.rb",
|
242
|
+
"test/data_structures/column_test.rb",
|
243
|
+
"test/data_structures/columns_test.rb",
|
244
|
+
"test/data_structures/error_message_test.rb",
|
245
|
+
"test/data_structures/set_test.rb",
|
246
|
+
"test/data_structures/sorting_test.rb",
|
247
|
+
"test/data_structures/standard_column_test.rb",
|
248
|
+
"test/data_structures/virtual_column_test.rb",
|
249
|
+
"test/extensions/active_record_test.rb",
|
250
|
+
"test/extensions/array_test.rb",
|
251
|
+
"test/helpers/form_column_helpers_test.rb",
|
252
|
+
"test/helpers/list_column_helpers_test.rb",
|
253
|
+
"test/helpers/pagination_helpers_test.rb",
|
254
|
+
"test/misc/active_record_permissions_test.rb",
|
255
|
+
"test/misc/attribute_params_test.rb",
|
256
|
+
"test/misc/configurable_test.rb",
|
257
|
+
"test/misc/constraints_test.rb",
|
258
|
+
"test/misc/finder_test.rb",
|
259
|
+
"test/misc/lang_test.rb",
|
260
|
+
"test/mock_app/.gitignore",
|
261
|
+
"test/mock_app/app/controllers/application_controller.rb",
|
262
|
+
"test/mock_app/app/helpers/application_helper.rb",
|
263
|
+
"test/mock_app/config/boot.rb",
|
264
|
+
"test/mock_app/config/database.yml",
|
265
|
+
"test/mock_app/config/environment.rb",
|
266
|
+
"test/mock_app/config/environments/development.rb",
|
267
|
+
"test/mock_app/config/environments/production.rb",
|
268
|
+
"test/mock_app/config/environments/test.rb",
|
269
|
+
"test/mock_app/config/initializers/backtrace_silencers.rb",
|
270
|
+
"test/mock_app/config/initializers/inflections.rb",
|
271
|
+
"test/mock_app/config/initializers/mime_types.rb",
|
272
|
+
"test/mock_app/config/initializers/new_rails_defaults.rb",
|
273
|
+
"test/mock_app/config/initializers/session_store.rb",
|
274
|
+
"test/mock_app/config/locales/en.yml",
|
275
|
+
"test/mock_app/config/routes.rb",
|
276
|
+
"test/mock_app/db/test.sqlite3",
|
277
|
+
"test/mock_app/public/blank.html",
|
278
|
+
"test/mock_app/public/images/active_scaffold/DO_NOT_EDIT",
|
279
|
+
"test/mock_app/public/images/active_scaffold/default/add.gif",
|
280
|
+
"test/mock_app/public/images/active_scaffold/default/arrow_down.gif",
|
281
|
+
"test/mock_app/public/images/active_scaffold/default/arrow_up.gif",
|
282
|
+
"test/mock_app/public/images/active_scaffold/default/close.gif",
|
283
|
+
"test/mock_app/public/images/active_scaffold/default/cross.png",
|
284
|
+
"test/mock_app/public/images/active_scaffold/default/indicator-small.gif",
|
285
|
+
"test/mock_app/public/images/active_scaffold/default/indicator.gif",
|
286
|
+
"test/mock_app/public/images/active_scaffold/default/magnifier.png",
|
287
|
+
"test/mock_app/public/javascripts/active_scaffold/DO_NOT_EDIT",
|
288
|
+
"test/mock_app/public/javascripts/active_scaffold/default/active_scaffold.js",
|
289
|
+
"test/mock_app/public/javascripts/active_scaffold/default/dhtml_history.js",
|
290
|
+
"test/mock_app/public/javascripts/active_scaffold/default/form_enhancements.js",
|
291
|
+
"test/mock_app/public/javascripts/active_scaffold/default/rico_corner.js",
|
292
|
+
"test/mock_app/public/stylesheets/active_scaffold/DO_NOT_EDIT",
|
293
|
+
"test/mock_app/public/stylesheets/active_scaffold/default/stylesheet-ie.css",
|
294
|
+
"test/mock_app/public/stylesheets/active_scaffold/default/stylesheet.css",
|
295
|
+
"test/model_stub.rb",
|
296
|
+
"test/run_all.rb",
|
297
|
+
"test/test_helper.rb",
|
298
|
+
"uninstall.rb"
|
299
|
+
]
|
300
|
+
s.homepage = %q{http://github.com/vhochstein/active_scaffold}
|
301
|
+
s.licenses = ["MIT"]
|
16
302
|
s.require_paths = ["lib"]
|
303
|
+
s.rubygems_version = %q{1.3.7}
|
304
|
+
s.summary = %q{Rails 3 Version of activescaffold supporting prototype and jquery}
|
305
|
+
s.test_files = [
|
306
|
+
"test/bridges/bridge_test.rb",
|
307
|
+
"test/config/base_test.rb",
|
308
|
+
"test/config/create_test.rb",
|
309
|
+
"test/config/list_test.rb",
|
310
|
+
"test/config/show_test.rb",
|
311
|
+
"test/config/update_test.rb",
|
312
|
+
"test/const_mocker.rb",
|
313
|
+
"test/data_structures/action_columns_test.rb",
|
314
|
+
"test/data_structures/action_link_test.rb",
|
315
|
+
"test/data_structures/action_links_test.rb",
|
316
|
+
"test/data_structures/actions_test.rb",
|
317
|
+
"test/data_structures/association_column_test.rb",
|
318
|
+
"test/data_structures/column_test.rb",
|
319
|
+
"test/data_structures/columns_test.rb",
|
320
|
+
"test/data_structures/error_message_test.rb",
|
321
|
+
"test/data_structures/set_test.rb",
|
322
|
+
"test/data_structures/sorting_test.rb",
|
323
|
+
"test/data_structures/standard_column_test.rb",
|
324
|
+
"test/data_structures/virtual_column_test.rb",
|
325
|
+
"test/extensions/active_record_test.rb",
|
326
|
+
"test/extensions/array_test.rb",
|
327
|
+
"test/helpers/form_column_helpers_test.rb",
|
328
|
+
"test/helpers/list_column_helpers_test.rb",
|
329
|
+
"test/helpers/pagination_helpers_test.rb",
|
330
|
+
"test/misc/active_record_permissions_test.rb",
|
331
|
+
"test/misc/attribute_params_test.rb",
|
332
|
+
"test/misc/configurable_test.rb",
|
333
|
+
"test/misc/constraints_test.rb",
|
334
|
+
"test/misc/finder_test.rb",
|
335
|
+
"test/misc/lang_test.rb",
|
336
|
+
"test/mock_app/app/controllers/application_controller.rb",
|
337
|
+
"test/mock_app/app/helpers/application_helper.rb",
|
338
|
+
"test/mock_app/config/boot.rb",
|
339
|
+
"test/mock_app/config/environment.rb",
|
340
|
+
"test/mock_app/config/environments/development.rb",
|
341
|
+
"test/mock_app/config/environments/production.rb",
|
342
|
+
"test/mock_app/config/environments/test.rb",
|
343
|
+
"test/mock_app/config/initializers/backtrace_silencers.rb",
|
344
|
+
"test/mock_app/config/initializers/inflections.rb",
|
345
|
+
"test/mock_app/config/initializers/mime_types.rb",
|
346
|
+
"test/mock_app/config/initializers/new_rails_defaults.rb",
|
347
|
+
"test/mock_app/config/initializers/session_store.rb",
|
348
|
+
"test/mock_app/config/routes.rb",
|
349
|
+
"test/model_stub.rb",
|
350
|
+
"test/run_all.rb",
|
351
|
+
"test/test_helper.rb"
|
352
|
+
]
|
17
353
|
|
18
|
-
s.
|
19
|
-
|
20
|
-
|
21
|
-
s.add_dependency('activerecord', '~> 3.0.0')
|
354
|
+
if s.respond_to? :specification_version then
|
355
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
356
|
+
s.specification_version = 3
|
22
357
|
|
23
|
-
|
358
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
359
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
360
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
361
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
362
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
363
|
+
s.add_runtime_dependency(%q<render_component>, [">= 0"])
|
364
|
+
s.add_runtime_dependency(%q<verification>, [">= 0"])
|
365
|
+
s.add_runtime_dependency(%q<rails>, ["~> 3.0.0"])
|
366
|
+
else
|
367
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
368
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
369
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
370
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
371
|
+
s.add_dependency(%q<render_component>, [">= 0"])
|
372
|
+
s.add_dependency(%q<verification>, [">= 0"])
|
373
|
+
s.add_dependency(%q<rails>, ["~> 3.0.0"])
|
374
|
+
end
|
375
|
+
else
|
376
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
377
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
378
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
379
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
380
|
+
s.add_dependency(%q<render_component>, [">= 0"])
|
381
|
+
s.add_dependency(%q<verification>, [">= 0"])
|
382
|
+
s.add_dependency(%q<rails>, ["~> 3.0.0"])
|
383
|
+
end
|
24
384
|
end
|
385
|
+
|
Binary file
|
Binary file
|
@@ -32,10 +32,9 @@ $(document).ready(function() {
|
|
32
32
|
if (action_link.is_disabled()) {
|
33
33
|
return false;
|
34
34
|
} else {
|
35
|
-
// hack:
|
36
|
-
//
|
37
|
-
|
38
|
-
if (action_link.position) event.data_type = 'dummy';
|
35
|
+
// hack: jquery requires if you request for javascript that javascript
|
36
|
+
// is coming back, however rails has a different mantra
|
37
|
+
if (action_link.position) event.data_type = 'rails';
|
39
38
|
if (action_link.loading_indicator) action_link.loading_indicator.css('visibility','visible');
|
40
39
|
action_link.disable();
|
41
40
|
}
|
@@ -162,7 +161,14 @@ $(document).ready(function() {
|
|
162
161
|
}
|
163
162
|
|
164
163
|
if (csrf_param) options['params'] = csrf_param.attr('content') + '=' + csrf_token.attr('content');
|
165
|
-
|
164
|
+
|
165
|
+
if (span.closest('div.active-scaffold').attr('data-eid')) {
|
166
|
+
if (options['params'].length > 0) {
|
167
|
+
options['params'] += ";";
|
168
|
+
}
|
169
|
+
options['params'] += ("eid=" + span.closest('div.active-scaffold').attr('data-eid'));
|
170
|
+
}
|
171
|
+
|
166
172
|
if (mode === 'clone') {
|
167
173
|
options.clone_id_suffix = record_id;
|
168
174
|
options.clone_selector = '#' + column_heading.attr('id') + ' .as_inplace_pattern';
|
@@ -247,6 +253,11 @@ $(document).ready(function() {
|
|
247
253
|
ActiveScaffold[$(this).val() == 'REPLACE' ? 'hide' : 'show']($(this).next().next());
|
248
254
|
return true;
|
249
255
|
});
|
256
|
+
|
257
|
+
$('a[data-popup]').live('click', function(e) {
|
258
|
+
window.open($(this).attr('href'));
|
259
|
+
e.preventDefault();
|
260
|
+
});
|
250
261
|
|
251
262
|
});
|
252
263
|
|
@@ -510,9 +521,9 @@ var ActiveScaffold = {
|
|
510
521
|
$(form_element + ":first *:input[type!=hidden]:first").focus();
|
511
522
|
},
|
512
523
|
|
513
|
-
create_record_row: function(
|
514
|
-
if (typeof(
|
515
|
-
tbody = $(tbody);
|
524
|
+
create_record_row: function(active_scaffold_id, html, options) {
|
525
|
+
if (typeof(active_scaffold_id) == 'string') active_scaffold_id = '#' + active_scaffold_id;
|
526
|
+
tbody = $(active_scaffold_id).find('tbody.records');
|
516
527
|
|
517
528
|
if (options.insert_at == 'top') {
|
518
529
|
tbody.prepend(html);
|
@@ -621,6 +632,7 @@ var ActiveScaffold = {
|
|
621
632
|
toggler.children('a').click(function() {
|
622
633
|
toggable.toggle();
|
623
634
|
$(this).html((toggable.is(':hidden')) ? options.show_label : options.hide_label);
|
635
|
+
return false;
|
624
636
|
});
|
625
637
|
},
|
626
638
|
|
@@ -632,8 +644,9 @@ var ActiveScaffold = {
|
|
632
644
|
element.append(content);
|
633
645
|
}
|
634
646
|
} else {
|
635
|
-
|
636
|
-
|
647
|
+
var current = $('#' + element.attr('id') + ' tr.association-record')
|
648
|
+
if (current[0]) {
|
649
|
+
this.replace(current[0], content);
|
637
650
|
} else {
|
638
651
|
element.prepend(content);
|
639
652
|
}
|
@@ -739,8 +752,11 @@ ActiveScaffold.ActionLink = {
|
|
739
752
|
if (element.length > 0) {
|
740
753
|
element.data(); // jquery 1.4.2 workaround
|
741
754
|
if (typeof(element.data('action_link')) === 'undefined' && !element.hasClass('as_adapter')) {
|
742
|
-
var parent = element.
|
743
|
-
|
755
|
+
var parent = element.closest('.actions');
|
756
|
+
if (parent.length === 0) {
|
757
|
+
// maybe an column action_link
|
758
|
+
parent = element.parent();
|
759
|
+
}
|
744
760
|
if (parent && parent.is('td')) {
|
745
761
|
// record action
|
746
762
|
parent = parent.closest('tr.record');
|
@@ -763,21 +779,7 @@ ActiveScaffold.ActionLink.Abstract = Class.extend({
|
|
763
779
|
init: function(a, target, loading_indicator) {
|
764
780
|
this.tag = $(a);
|
765
781
|
this.url = this.tag.attr('href');
|
766
|
-
this.method = 'get';
|
767
|
-
|
768
|
-
if(this.url.match('_method=delete')){
|
769
|
-
this.method = 'delete';
|
770
|
-
// action delete is special case cause in ajax world it will be destroy
|
771
|
-
} else if(this.url.match('/delete')){
|
772
|
-
this.url = this.url.replace('/delete', '');
|
773
|
-
this.tag.attr('href', this.url);
|
774
|
-
this.method = 'delete';
|
775
|
-
} else if(this.url.match('_method=post')){
|
776
|
-
this.method = 'post';
|
777
|
-
} else if(this.url.match('_method=put')){
|
778
|
-
this.method = 'put';
|
779
|
-
}
|
780
|
-
if (this.method != 'get') this.tag.attr('data-method', this.method);
|
782
|
+
this.method = this.tag.attr('data-method') || 'get';
|
781
783
|
this.target = target;
|
782
784
|
this.loading_indicator = loading_indicator;
|
783
785
|
this.hide_target = false;
|
@@ -827,6 +829,10 @@ ActiveScaffold.ActionLink.Abstract = Class.extend({
|
|
827
829
|
scaffold_id: function() {
|
828
830
|
return '#' + this.tag.closest('div.active-scaffold').attr('id');
|
829
831
|
},
|
832
|
+
|
833
|
+
scaffold: function() {
|
834
|
+
return this.tag.closest('div.active-scaffold');
|
835
|
+
},
|
830
836
|
|
831
837
|
update_flash_messages: function(messages) {
|
832
838
|
message_node = $(this.scaffold_id().replace(/-active-scaffold/, '-messages'));
|
@@ -836,7 +842,7 @@ ActiveScaffold.ActionLink.Abstract = Class.extend({
|
|
836
842
|
this.adapter = element;
|
837
843
|
this.adapter.addClass('as_adapter');
|
838
844
|
this.adapter.data('action_link', this);
|
839
|
-
}
|
845
|
+
}
|
840
846
|
});
|
841
847
|
|
842
848
|
/**
|
@@ -848,11 +854,6 @@ ActiveScaffold.Actions.Record = ActiveScaffold.Actions.Abstract.extend({
|
|
848
854
|
var refresh = this.target.attr('data-refresh');
|
849
855
|
if (refresh) l.refresh_url = refresh;
|
850
856
|
|
851
|
-
if ($(link).hasClass('delete')) {
|
852
|
-
l.url = l.url.replace(/\/delete(\?.*)?$/, '$1');
|
853
|
-
l.url = l.url.replace(/\/delete\/(.*)/, '/destroy/$1');
|
854
|
-
l.tag.attr('href', l.url);
|
855
|
-
}
|
856
857
|
if (l.position) {
|
857
858
|
l.url = l.url.append_params({adapter: '_list_inline_adapter'});
|
858
859
|
l.tag.attr('href', l.url);
|