View | Details | Raw Unified | Return to bug 35012
Collapse All | Expand All

(-)a/Koha/FrameworkPlugin.pm (-2 / +9 lines)
Lines 329-335 sub _add_binding { Link Here
329
        #click event applies to buttonDot
329
        #click event applies to buttonDot
330
330
331
    if( $pars =~ /^(e|ev|event)$/i ) { # new style event handler assumed
331
    if( $pars =~ /^(e|ev|event)$/i ) { # new style event handler assumed
332
        $bind= qq|    \$("#$ctl").$ev(\{id: '$id'\}, $fname);\n|;
332
333
        if ($ev eq "click"){
334
          # remove already registered click listeners
335
          $bind= qq|    \$("#$ctl").off('click');\n|;
336
          $bind.= qq|    \$("#$ctl").$ev(\{id: '$id'\}, $fname);\n|;
337
        } else {
338
          $bind= qq|    \$("#$ctl").$ev(\{id: '$id'\}, $fname);\n|;
339
        }
340
333
        $script='';
341
        $script='';
334
    } elsif( $fname eq 'noclick' ) { # no click: return false, no scroll
342
    } elsif( $fname eq 'noclick' ) { # no click: return false, no scroll
335
        $bind= qq|    \$("#$ctl").$ev(function () { return false; });\n|;
343
        $bind= qq|    \$("#$ctl").$ev(function () { return false; });\n|;
336
- 

Return to bug 35012