[Jifty-commit] r3363 - in jifty/trunk: share/web/static/js

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Tue Jun 5 18:06:38 EDT 2007


Author: clkao
Date: Tue Jun  5 18:06:37 2007
New Revision: 3363

Modified:
   jifty/trunk/lib/Jifty/Web/Form.pm
   jifty/trunk/share/web/static/js/jifty.js

Log:
revert r3360 & r3361

Modified: jifty/trunk/lib/Jifty/Web/Form.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/Form.pm	Tue Jun  5 18:06:37 2007
@@ -217,19 +217,8 @@
 
 sub submit {
     my $self = shift;
-    my %args = ( submit => undef, @_ );
-    my ($spa) = Jifty->find_plugin('Jifty::Plugin::SinglePage');
-    if ($spa) {
-	# XXX: merge with _sp_link hook.
-	if ($args{onclick}) {
-	    Carp::cluck "already has onclick, fix me later";
-	}
-	else {
-	    my $submit = delete $args{submit} || [undef]; # something special for js to handle
-	    $args{onclick} = {submit => $submit, refresh_self => 1};
-	}
-    }
-    my $button = Jifty::Web::Form::Clickable->new(%args)->generate;
+
+    my $button = Jifty::Web::Form::Clickable->new(submit => undef, @_)->generate;
     Jifty->web->out(qq{<div class="submit_button">});
     $button->render_widget;
     Jifty->web->out(qq{</div>});

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 Jun  5 18:06:37 2007
@@ -740,11 +740,6 @@
     // Grab extra arguments (from a button)
     var button_args = Form.Element.buttonFormElements(trigger);
 
-    // If the action hash is '':1, it's a special case for all actions
-    if (named_args['actions']['']) {
-        named_args['actions'] = {};
-        Form.getActions(Form.Element.getForm(trigger)).each(function(x){named_args['actions'][x.moniker] = 1 });
-    }
     // Build actions structure
     request['actions'] = $H();
     for (var moniker in named_args['actions']) {


More information about the Jifty-commit mailing list