X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FTemplate%2FPlugin%2FL.pm;h=78efe642aaaaae16214745cfd504c54a392e9f79;hb=35d63a9fdee45777535d7ec815bfbc76c5c1bdc9;hp=5ef07b75bbfc2a5bf90d049db01caa76fa0b1c1b;hpb=17f39e02a0d2b7ceb565258861217fa7ba6bfbcf;p=kivitendo-erp.git diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index 5ef07b75b..78efe642a 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -66,6 +66,7 @@ sub select_tag { return _call_presenter('select_tag', @_); } sub input_tag { return _call_presenter('input_tag', @_); } sub truncate { return _call_presenter('truncate', @_); } sub simple_format { return _call_presenter('simple_format', @_); } +sub part_picker { return _call_presenter('part_picker', @_); } sub _set_id_attribute { my ($attributes, $name) = @_; @@ -221,14 +222,16 @@ sub date_tag { _set_id_attribute(\%params, $name); my @onchange = $params{onchange} ? (onChange => delete $params{onchange}) : (); - my @class = $params{no_cal} || $params{readonly} ? () : (class => 'datepicker'); + my @classes = $params{no_cal} || $params{readonly} ? () : ('datepicker'); + push @classes, delete($params{class}) if $params{class}; + my %class = @classes ? (class => join(' ', @classes)) : (); return $self->input_tag( $name, blessed($value) ? $value->to_lxoffice : $value, size => 11, onblur => "check_right_date_format(this);", %params, - @class, @onchange, + %class, @onchange, ); } @@ -390,8 +393,10 @@ JAVASCRIPT my $filter = ".filter(function(idx) { return this.substr(0, " . length($params{with}) . ") == '$params{with}'; })"; $filter .= ".map(function(idx, str) { return str.replace('$params{with}_', ''); })"; + my $params_js = $params{params} ? qq| + ($params{params})| : ''; + $stop_event = <{CONTEXT}->stash->get('SELF'); my $paginate_spec = $controller->get_paginate_spec; @@ -481,6 +486,7 @@ sub paginate_controls { return $controller->get_callback(%url_params); }, + %params, ); return SL::Presenter->get->render('common/paginate', %template_params); @@ -733,6 +739,11 @@ If trueish then the children will not be recolored. The default is to recolor the children by setting the class C on odd and C on even entries. +=item C + +An optional JavaScript string that is evaluated before sending the +POST request. The result must be a string that is appended to the URL. + =back Example: