]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/ClientJS.pm
ClientJS: Leading Whitespace von allen Argumenten tilgen, nicht nur vom ersten
[kivitendo-erp.git] / SL / ClientJS.pm
index 0e18d732bce17ba9a6ac66987cec2d570df43a35..93bbd74827f6bfde1d1b22aec4504abd5f6db540 100644 (file)
@@ -132,10 +132,10 @@ sub action {
   croak "Unsupported jQuery action: $method"                                                    unless defined $num_args;
   croak "Parameter count mismatch for $method(actual: " . scalar(@args) . " wanted: $num_args)" if     scalar(@args) != $num_args;
 
-  if ($num_args) {
+  foreach my $idx (1..$num_args) {
     # Force flattening from SL::Presenter::EscapedText: "" . $...
-    $args[0] =  "" . $args[0];
-    $args[0] =~ s/^\s+//;
+    $args[$idx - 1] =  "" . $args[$idx - 1];
+    $args[$idx - 1] =~ s/^\s+//;
   }
 
   push @{ $self->_actions }, [ $method, @args ];