X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5324155e7bc22990d1d0a775bc64e47b867f9b4d..9aaadfdc06efbfb31f70c32cdf6aacf2f8a136f2:/SL/Template/Plugin/L.pm diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index d9deef78e..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) = @_; @@ -185,7 +186,7 @@ sub ajax_submit_tag { $url = _J($url); $form_selector = _J($form_selector); - my $onclick = qq|submit_ajax_form('${url}', '${form_selector}')|; + my $onclick = qq|kivi.submit_ajax_form('${url}', '${form_selector}')|; return $self->button_tag($onclick, $text, @slurp); } @@ -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); @@ -580,8 +586,8 @@ clicks the dialog's ok/yes button. Creates a HTML 'input type="button"' tag with a very specific onclick handler that submits the form given by the jQuery selector C<$form_selector> to the URL C<$url> (the actual JavaScript function -called for that is C in C). The -button's label will be C<$text>. +called for that is C in +C). The button's label will be C<$text>. =item C @@ -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: