From 05c5500e4fe67e263f454a1b80049a9cbd1c5aed Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 29 Aug 2008 09:06:03 -0500 Subject: [PATCH] Fixing markup errors, tweaking show/hide javascript. Signed-off-by: Galen Charlton --- admin/marc_subfields_structure.pl | 42 ++++++----------- .../admin/marc_subfields_structure.tmpl | 45 +++++++++++-------- 2 files changed, 40 insertions(+), 47 deletions(-) diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index 473e50a381..3c15291bbe 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -198,7 +198,6 @@ if ( $op eq 'add_form' ) { }, -default => $data->{'tab'}, -size => 1, - -tabindex => '', -multiple => 0, ); $row_data{tagsubfield} = @@ -217,49 +216,43 @@ if ( $op eq 'add_form' ) { -values => \@kohafields, -default => "$data->{'kohafield'}", -size => 1, - -tabindex => '', -multiple => 0, ); $row_data{authorised_value} = CGI::scrolling_list( - -name => 'authorised_value', - -id => 'authorised_value', + -name => "authorised_value", + -id => "authorised_value$i", -values => \@authorised_values, -default => $data->{'authorised_value'}, -size => 1, - -tabindex => '', -multiple => 0, ); $row_data{value_builder} = CGI::scrolling_list( - -name => 'value_builder', - -id => 'value_builder', + -name => "value_builder", + -id => "value_builder$i", -values => \@value_builder, -default => $data->{'value_builder'}, -size => 1, - -tabindex => '', -multiple => 0, ); $row_data{authtypes} = CGI::scrolling_list( - -name => 'authtypecode', - -id => 'authtypecode', + -name => "authtypecode", + -id => "authtypecode$i", -values => \@authtypes, -default => $data->{'authtypecode'}, -size => 1, - -tabindex => '', -multiple => 0, ); $row_data{repeatable} = CGI::checkbox( -name => "repeatable$i", -checked => $data->{'repeatable'} ? 'checked' : '', -value => 1, - -tabindex => '', -label => '', -id => "repeatable$i" ); $row_data{mandatory} = CGI::checkbox( - -name => "mandatory$i", + -name => "mandatory", -checked => $data->{'mandatory'} ? 'checked' : '', -value => 1, - -tabindex => '', -label => '', -id => "mandatory$i" ); @@ -269,7 +262,6 @@ if ( $op eq 'add_form' ) { -id => "isurl$i", -checked => $data->{'isurl'} ? 'checked' : '', -value => 1, - -tabindex => '', -label => '' ); $row_data{row} = $i; @@ -306,7 +298,6 @@ if ( $op eq 'add_form' ) { }, -default => "", -size => 1, - -tabindex => '', -multiple => 0, ); $row_data{tagsubfield} = @@ -322,7 +313,6 @@ if ( $op eq 'add_form' ) { -values => \@kohafields, -default => "", -size => 1, - -tabindex => '', -multiple => 0, ); $row_data{hidden} = ""; @@ -331,7 +321,6 @@ if ( $op eq 'add_form' ) { -id => "repeatable$j", -checked => '', -value => 1, - -tabindex => '', -label => '' ); $row_data{mandatory} = CGI::checkbox( @@ -339,7 +328,6 @@ if ( $op eq 'add_form' ) { -id => "mandatory$j", -checked => '', -value => 1, - -tabindex => '', -label => '' ); $row_data{isurl} = CGI::checkbox( @@ -347,32 +335,28 @@ if ( $op eq 'add_form' ) { -id => "isurl$j", -checked => '', -value => 1, - -tabindex => '', -label => '' ); $row_data{value_builder} = CGI::scrolling_list( - -name => 'value_builder', - -id => 'value_builder', + -name => "value_builder", + -id => "value_builder$j", -values => \@value_builder, -default => $data->{'value_builder'}, -size => 1, - -tabindex => '', -multiple => 0, ); $row_data{authorised_value} = CGI::scrolling_list( - -name => 'authorised_value', - -id => 'authorised_value', + -name => "authorised_value", + -id => "authorised_value$j", -values => \@authorised_values, -size => 1, - -tabindex => '', -multiple => 0, ); $row_data{authtypes} = CGI::scrolling_list( - -name => 'authtypecode', - -id => 'authtypecode', + -name => "authtypecode", + -id => "authtypecode$j", -values => \@authtypes, -size => 1, - -tabindex => '', -multiple => 0, ); $row_data{link} = CGI::escapeHTML( $data->{'link'} ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl index 5a0c060ee0..59d3104754 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl @@ -7,9 +7,17 @@ $(document).ready(function() { $('#subfieldtabs > ul').tabs(); + $("a.displaymore").click(function(){ + $("#"+$(this).attr("href").replace("#","")).toggle(); + if($(this).html() == "display more constraints"){ + $(this).html("hide constraints"); + } else { + $(this).html("display more constraints"); + } + }); }); -function displayMoreConstraint(numlayer){ +/*function displayMoreConstraint(numlayer){ var thisdiv = document.getElementById(numlayer); if(thisdiv.getAttribute("class") == "content_hidden"){ thisdiv.removeAttribute('class'); @@ -18,7 +26,7 @@ function displayMoreConstraint(numlayer){ thisdiv.removeAttribute('class'); thisdiv.setAttribute("class","content_hidden"); } -} +}*/ //]]> @@ -28,7 +36,7 @@ function displayMoreConstraint(numlayer){