From f18df06e5d2105794854a646e18b2fbef4ece3bc Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Thu, 11 Jun 2009 15:15:38 -0400 Subject: [PATCH] Bug 2889: Removed toggle variable from auth_tag_structure.pl and auth_subfields_structure.pl Removed toggle variable from auth_tag_structure.pl and .tmpl. Used template __odd__ in auth_tag_structure.tmpl. Removed toggle variable from auth_subfields_structure.pl and .tmpl. Use __odd__. Removed a type in the highlight class definition. Fixed a minor xhtml error. Signed-off-by: Galen Charlton --- admin/auth_subfields_structure.pl | 15 --------------- admin/auth_tag_structure.pl | 7 ------- .../modules/admin/auth_subfields_structure.tmpl | 8 ++++++-- .../prog/en/modules/admin/auth_tag_structure.tmpl | 6 +++++- 4 files changed, 11 insertions(+), 25 deletions(-) diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index 6eb3667783..fd86778fab 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -134,16 +134,10 @@ if ($op eq 'add_form') { my $sth=$dbh->prepare("select * from auth_subfield_structure where tagfield=? and authtypecode=?"); # and tagsubfield='$tagsubfield'"); $sth->execute($tagfield,$authtypecode); my @loop_data = (); - my $toggle=1; my $i=0; while ($data =$sth->fetchrow_hashref) { my %row_data; # get a fresh hash for the row data - if ($toggle eq 1){ - $toggle=0; - } else { - $toggle=1; - } $row_data{tab} = CGI::scrolling_list(-name=>'tab', -id=>"tab$i", -values => @@ -250,7 +244,6 @@ if ($op eq 'add_form') { -value => 1, -label => ''); $row_data{row} = $i; - $row_data{toggle} = $toggle; push(@loop_data, \%row_data); $i++; } @@ -365,7 +358,6 @@ if ($op eq 'add_form') { -tabindex=>'', -multiple=>0, ); - $row_data{toggle} = $toggle; $row_data{row} = $i; push(@loop_data, \%row_data); } @@ -498,14 +490,8 @@ if ($op eq 'add_form') { ################## DEFAULT ################################## } else { # DEFAULT my ($count,$results)=string_search($tagfield,$authtypecode); - my $toggle=1; my @loop_data = (); for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ - if ($toggle eq 1){ - $toggle=0; - } else { - $toggle=1; - } my %row_data; # get a fresh hash for the row data $row_data{tagfield} = $results->[$i]{'tagfield'}; $row_data{tagsubfield} = $results->[$i]{'tagsubfield'}; @@ -521,7 +507,6 @@ if ($op eq 'add_form') { $row_data{hidden} = $results->[$i]{'hidden'} if($results->[$i]{'hidden'} gt "000") ; $row_data{isurl} = $results->[$i]{'isurl'}; $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'}."&authtypecode=$authtypecode"; - $row_data{toggle} = $toggle; if ($row_data{tab} eq -1) { $row_data{subfield_ignored} = 1; } diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index c09b5d57e2..656b5317e3 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -219,14 +219,8 @@ if ($op eq 'add_form') { $template->param(searchfield => $searchfield); } my ($count,$results)=StringSearch($searchfield,$authtypecode); - my $toggle=1; my @loop_data = (); for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ - if ($toggle eq 1){ - $toggle=0; - } else { - $toggle=1; - } my %row_data; # get a fresh hash for the row data $row_data{tagfield} = $results->[$i]{'tagfield'}; $row_data{liblibrarian} = $results->[$i]{'liblibrarian'}; @@ -236,7 +230,6 @@ if ($op eq 'add_form') { $row_data{subfield_link} = "auth_subfields_structure.pl?tagfield=" . $results->[$i]{'tagfield'} . "&authtypecode=" . $authtypecode; $row_data{edit} = "$script_name?op=add_form&searchfield=" . $results->[$i]{'tagfield'} . "&authtypecode=" . $authtypecode; $row_data{delete} = "$script_name?op=delete_confirm&searchfield=" . $results->[$i]{'tagfield'} . "&authtypecode=" . $authtypecode; - $row_data{toggle} = $toggle; push(@loop_data, \%row_data); } $template->param(loop => \@loop_data, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl index 46054d6bb2..7f77fdd175 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl @@ -158,7 +158,11 @@ function displayMoreConstraint(numlayer){ Delete - + + + + + @@ -202,7 +206,7 @@ function displayMoreConstraint(numlayer){ - //images/1leftarrow.png" title="previous" alt="previous" border="0" > + //images/1leftarrow.png" title="previous" alt="previous" border="0" /> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tmpl index c0898f522d..3b4f9c613f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tmpl @@ -212,7 +212,11 @@ return false; Delete - + + + + + YesNo -- 2.39.5