active_scaffold_vho 3.0.22 → 3.0.23
Sign up to get free protection for your applications and to get access to all the features.
- data/active_scaffold_vho.gemspec +2 -2
- data/frontends/default/javascripts/jquery/active_scaffold.js +3 -6
- data/frontends/default/javascripts/prototype/active_scaffold.js +7 -6
- data/lib/active_scaffold/actions/core.rb +1 -1
- data/lib/active_scaffold/extensions/action_view_rendering.rb +1 -0
- data/lib/active_scaffold/version.rb +1 -1
- metadata +4 -4
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.23"
|
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-
|
12
|
+
s.date = %q{2011-11-05}
|
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 = [
|
@@ -457,12 +457,9 @@ var ActiveScaffold = {
|
|
457
457
|
if (typeof(element) == 'string') element = '#' + element;
|
458
458
|
element = $(element);
|
459
459
|
ActiveScaffold.trigger_unload_events(element.find('[data-as_load]').andSelf());
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
}
|
464
|
-
ActiveScaffold.trigger_load_events(element.find('[data-as_load]').andSelf());
|
465
|
-
return element;
|
460
|
+
var new_element = $(html).replaceAll(element);
|
461
|
+
ActiveScaffold.trigger_load_events(new_element.find('[data-as_load]').andSelf());
|
462
|
+
return new_element;
|
466
463
|
},
|
467
464
|
|
468
465
|
replace_html: function(element, html) {
|
@@ -411,12 +411,13 @@ var ActiveScaffold = {
|
|
411
411
|
var elements = element.select('[data-as_load]');
|
412
412
|
elements.unshift(element);
|
413
413
|
ActiveScaffold.trigger_unload_events(elements);
|
414
|
-
Element.
|
415
|
-
|
416
|
-
|
417
|
-
elements.
|
414
|
+
var new_element = new Element('div').update(html);
|
415
|
+
new_element = new_element.firstDescendant();
|
416
|
+
Element.replace(element, new_element);
|
417
|
+
elements = new_element.select('[data-as_load]');
|
418
|
+
elements.unshift(new_element);
|
418
419
|
ActiveScaffold.trigger_load_events(elements);
|
419
|
-
return
|
420
|
+
return new_element;
|
420
421
|
},
|
421
422
|
|
422
423
|
replace_html: function(element, html) {
|
@@ -605,7 +606,7 @@ var ActiveScaffold = {
|
|
605
606
|
if (element) {
|
606
607
|
if (options.is_subform == false) {
|
607
608
|
ActiveScaffold.trigger_unload_events(new Array(element.up('li.form-element')));
|
608
|
-
this.replace(element.up('dl'), content);
|
609
|
+
element = this.replace(element.up('dl'), content);
|
609
610
|
ActiveScaffold.trigger_load_events(new Array(element.up('li.form-element')));
|
610
611
|
} else {
|
611
612
|
this.replace_html(element, content);
|
@@ -150,7 +150,7 @@ module ActiveScaffold::Actions
|
|
150
150
|
params = params[:record] || {} unless params[model.inheritance_column] # in create action must be inside record key
|
151
151
|
model = params.delete(model.inheritance_column).camelize.constantize if params[model.inheritance_column]
|
152
152
|
end
|
153
|
-
model.
|
153
|
+
model.respond_to?(:build) ? model.build(build_options || {}) : model.new
|
154
154
|
end
|
155
155
|
|
156
156
|
private
|
@@ -18,6 +18,7 @@ module ActionView::Rendering #:nodoc:
|
|
18
18
|
# Adds two rendering options.
|
19
19
|
#
|
20
20
|
# ==render :super
|
21
|
+
# ==render :super, :locals =>{:headline => 'formheadline'}
|
21
22
|
#
|
22
23
|
# This syntax skips all template overrides and goes directly to the provided ActiveScaffold templates.
|
23
24
|
# Useful if you want to wrap an existing template. Just call super!
|
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: 41
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 3.0.
|
9
|
+
- 23
|
10
|
+
version: 3.0.23
|
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-
|
18
|
+
date: 2011-11-05 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|