OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-registry                 Date:   08-Aug-2006 18:41:42
  Branch: HEAD                             Handle: 2006080817414200

  Modified files:
    openpkg-registry        registry-ui.pl

  Log:
    automatically checkmark row for further processing on input change

  Summary:
    Revision    Changes     Path
    1.100       +26 -6      openpkg-registry/registry-ui.pl
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-registry/registry-ui.pl
  ============================================================================
  $ cvs diff -u -r1.99 -r1.100 registry-ui.pl
  --- openpkg-registry/registry-ui.pl   8 Aug 2006 16:30:11 -0000       1.99
  +++ openpkg-registry/registry-ui.pl   8 Aug 2006 16:41:42 -0000       1.100
  @@ -1528,6 +1528,7 @@
           $html .= "<td><b>description</b></td>";
           $html .= "<td><b>link</b></td>";
           $html .= "</tr>\n";
  +        my $row=1;
           for my $i (sort keys %{$rv}) {
               $html .= "<tr>";
   
  @@ -1535,6 +1536,7 @@
               $html .= "<td>";
               $html .= $cgi->checkbox(
                   -class    => "checkbox",
  +                -id       => "row-$row",
                   -name     => "$mode/$i/check",
                   -checked  => ($mode eq "arrival" ? 1 : 0),
                   -label    => ""
  @@ -1555,6 +1557,7 @@
                       -size      => 50,
                       -maxlength => 50,
                       -default   => $rv->{$i}->{registry_desc},
  +                    -onchange  => "checkrowbox('row-$row')"
                   ) . "</td>";
               }
               else {
  @@ -1565,6 +1568,7 @@
               $html .= "<td><code>" . $rv->{$i}->{registry_link} . 
"</code></td>";
   
           $html .= "</tr>\n";
  +        $row++;
           }
   
           $html .= "<tr>";
  @@ -1984,6 +1988,7 @@
       #   token
       #
       if ($cfg->{profile}->{token}->{uienable}) {
  +        my $row = 0;
   
           $html .= "<table class=\"token\">\n";
           $html .= "<tr>";
  @@ -2016,6 +2021,7 @@
           $html .= "<td>";
           $html .= $cgi->checkbox(
               -class    => "checkbox",
  +            -id       => "row-$row",
               -name     => "token/new/check",
               -checked  => 1,
               -label    => ""
  @@ -2032,6 +2038,7 @@
               -size      => 50,
               -maxlength => 50,
               -default   => "unspecified",
  +            -onchange  => "checkrowbox('row-$row')"
           ) . "</td>";
   
           #   userenable
  @@ -2040,7 +2047,8 @@
               -class    => "checkbox",
               -name     => "token/new/userenable",
               -checked  => 1,
  -            -label    => ""
  +            -label    => "",
  +            -onchange  => "checkrowbox('row-$row')"
           ) . "</td>";
   
           #   usercount
  @@ -2052,7 +2060,8 @@
               -class    => "checkbox",
               -name     => "token/new/linkenable",
               -checked  => $mok,
  -            -label    => ""
  +            -label    => "",
  +            -onchange  => "checkrowbox('row-$row')"
           ) . "</td>";
   
           #   linkcount
  @@ -2064,7 +2073,8 @@
               -class    => "checkbox",
               -name     => "token/new/assocenable",
               -checked  => $mok,
  -            -label    => ""
  +            -label    => "",
  +            -onchange  => "checkrowbox('row-$row')"
           ) . "</td>";
   
           #   assoccount
  @@ -2081,6 +2091,7 @@
           $html .= "<td colspan=\"7\">";
           $html .= "</td>";
           $html .= "</tr>\n";
  +        $row++;
   
           #   delete/modify existing tokens
   
  @@ -2097,6 +2108,7 @@
                   #   checkbox
                   $html .= "<td>";
                   $html .= $cgi->checkbox(
  +                    -id       => "row-$row",
                       -class    => "checkbox",
                       -name     => "token/$k/check",
                       -checked  => 0,
  @@ -2114,6 +2126,7 @@
                       -size      => 50,
                       -maxlength => 50,
                       -default   => $rv->{$k}->{description},
  +                    -onchange  => "checkrowbox('row-$row')"
                   ) . "</td>";
   
                   #   userenable
  @@ -2122,7 +2135,8 @@
                       -class    => "checkbox",
                       -name     => "token/$k/userenable",
                       -checked  => $rv->{$k}->{userenable},
  -                    -label    => ""
  +                    -label    => "",
  +                    -onclick  => "checkrowbox('row-$row')"
                   ) . "</td>";
   
                   #   usercount
  @@ -2134,7 +2148,8 @@
                       -class    => "checkbox",
                       -name     => "token/$k/linkenable",
                       -checked  => $rv->{$k}->{linkenable},
  -                    -label    => ""
  +                    -label    => "",
  +                    -onclick  => "checkrowbox('row-$row')"
                   ) . "</td>";
   
                   #   linkcount
  @@ -2146,13 +2161,15 @@
                       -class    => "checkbox",
                       -name     => "token/$k/assocenable",
                       -checked  => $rv->{$k}->{assocenable},
  -                    -label    => ""
  +                    -label    => "",
  +                    -onclick  => "checkrowbox('row-$row')"
                   ) . "</td>";
   
                   #   assoccount
                   $html .= "<td>" . $rv->{$k}->{assoccount} . "</td>";
   
                   $html .= "</tr>\n";
  +                $row++;
               }
   
               $html .= "<tr>";
  @@ -2851,6 +2868,9 @@
           }
       }
   }
  +function checkrowbox(box) {
  +    document.getElementById(box).checked=1;
  +}
   //--></script>
   EOT
       return $js;
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to