[Jifty-commit] r5231 - in jifty/trunk: lib/Jifty/Web/Form share/web/static/js share/web/templates/__jifty/webservices
Jifty commits
jifty-commit at lists.jifty.org
Tue Mar 18 17:41:29 EDT 2008
Author: alexmv
Date: Tue Mar 18 17:41:29 2008
New Revision: 5231
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Web/Form/Field.pm
jifty/trunk/share/web/static/js/jifty.js
jifty/trunk/share/web/templates/__jifty/webservices/xml
Log:
r28624 at kohr-ah: chmrr | 2008-03-18 17:41:23 -0400
* Fixes for region updates in the wake of r5216
Modified: jifty/trunk/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Field.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Field.pm Tue Mar 18 17:41:29 2008
@@ -88,7 +88,7 @@
}
# now that the form field has been instantiated, register the action with the form.
- if ($self->action and Jifty->web->form->is_open and not (Jifty->web->form->has_action($self->action))) {
+ if ($self->action and Jifty->web->form->is_open and not (Jifty->web->form->printed_actions->{$self->action->moniker})) {
Jifty->web->form->register_action( $self->action);
Jifty->web->form->print_action_registration($self->action->moniker);
}
Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js (original)
+++ jifty/trunk/share/web/static/js/jifty.js Tue Mar 18 17:41:29 2008
@@ -992,7 +992,7 @@
}
// Make the region (for now)
- new Region(name, f['args'], f['path'], f['parent'], f['parent'] ? f['parent'].in_form : null);
+ new Region(name, f['args'], f['path'], f['parent'], f['parent'] ? fragments.get(f['parent']).in_form : null);
} else if ((f['path'] != null) && f['toggle'] && (f['path'] == fragments.get(name).path)) {
// If they set the 'toggle' flag, and clicking wouldn't change the path
Element.update(element, '');
Modified: jifty/trunk/share/web/templates/__jifty/webservices/xml
==============================================================================
--- jifty/trunk/share/web/templates/__jifty/webservices/xml (original)
+++ jifty/trunk/share/web/templates/__jifty/webservices/xml Tue Mar 18 17:41:29 2008
@@ -14,9 +14,11 @@
FRAGMENT:
for my $f ( Jifty->web->request->fragments ) {
- # Set up the region stack
+ # Set up the form if need be
+ Jifty->web->form->_init;
Jifty->web->form->is_open(1) if $f->in_form;
+ # Set up the region stack
local Jifty->web->{'region_stack'} = [];
my @regions;
do {
@@ -60,8 +62,8 @@
$writer->cdataElement( "content", Jifty->web->current_region->as_string );
$writer->endTag();
+ # Clean up region stack and form
Jifty->web->current_region->exit while Jifty->web->current_region;
-
Jifty->web->form->is_open(0);
}
More information about the Jifty-commit
mailing list