[Bio] / WebApplication / WebPage / AlignSeqsClustal.pm Repository:
ViewVC logotype

Diff of /WebApplication/WebPage/AlignSeqsClustal.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2, Fri Mar 13 11:28:28 2009 UTC revision 1.4, Fri Mar 20 14:37:17 2009 UTC
# Line 57  Line 57 
57    return 1;    return 1;
58  }  }
59    
60  sub require_javascript {  #sub require_javascript {
61    
62    return [ "$FIG_Config::cgi_url/Html/showfunctionalroles.js" ];  #  return [ "$FIG_Config::cgi_url/Html/showfunctionalroles.js" ];
63    
64  }  #}
65    
66  =item * B<output> ()  =item * B<output> ()
67    
# Line 289  Line 289 
289    $hiddenvalues->{ 'color_aln_by' } = $self->{ 'color_aln_by' };    $hiddenvalues->{ 'color_aln_by' } = $self->{ 'color_aln_by' };
290    $hiddenvalues->{ 'seq_format' } = $self->{ 'seq_format' };    $hiddenvalues->{ 'seq_format' } = $self->{ 'seq_format' };
291    
292    my $content;    my $content = qq~<script>
293    
294    function submitPage ( variablesubmit ) {
295    
296       document.getElementById( 'actionhidden' ).value = variablesubmit;
297       document.getElementById( 'form' ).submit();
298    
299    }
300    
301    function checkAll ( element, second ) {
302      var field = document.getElementsByName( element );
303      for ( i = 0; i < field.length; i++ ) {
304        if ( second ) {
305          var tmp = "role##-##" + second;
306          var hallo = field[i].id.indexOf( tmp );
307          if ( hallo == 0 ) {
308            field[i].checked = true ;
309          }
310        }
311        else {
312          field[i].checked = true ;
313        }
314      }
315    }
316    
317    function checkFirst ( element )
318    {
319      var field = document.getElementsByName( element );
320      for ( i = 0; i < field.length/2; i++ ) {
321        field[i].checked = true;
322      }
323    }
324    
325    function checkSecond ( element )
326    {
327      var field = document.getElementsByName( element );
328      for ( i= Math.round( field.length/2 ); i < field.length; i++ ) {
329        field[i].checked = true ;
330      }
331    }
332    
333    function uncheckAll ( element, second )
334    {
335      var field = document.getElementsByName( element );
336      for ( i = 0; i < field.length; i++ ) {
337        if ( second ) {
338          var tmp = "role##-##" + second;
339          var hallo = field[i].id.indexOf( tmp );
340          if ( hallo == 0 ) {
341            field[i].checked = false ;
342          }
343        }
344        else {
345          field[i].checked = false ;
346        }
347      }
348    }
349    </script>~;
350    
351    ####################    ####################
352    # Display comments #    # Display comments #
# Line 1091  Line 1148 
1148  sub get_flanking {  sub get_flanking {
1149    my ( $self, $fid, $before, $after ) = @_;    my ( $self, $fid, $before, $after ) = @_;
1150    
1151      if ( $before < $after ) {
1152        my $this = $before;
1153        $before = $after;
1154        $after = $this;
1155      }
1156    
1157    return if ( !defined( $fid ) || $fid !~ /^fig/ );    return if ( !defined( $fid ) || $fid !~ /^fig/ );
1158    
1159    my $feat_seq = $self->{ 'fig' }->get_dna_seq( $fid );    my $feat_seq = $self->{ 'fig' }->get_dna_seq( $fid );
# Line 1139  Line 1202 
1202        if ( $npost > 0 ) {        if ( $npost > 0 ) {
1203          $seq = lc( substr( $seq, 0 ) );          $seq = lc( substr( $seq, 0 ) );
1204        }        }
1205          elsif ( $npre < 0 ) {
1206            $seq = uc( substr( $seq, 0 ) );
1207          }
1208        elsif ( $length_feat < abs( $npost ) ) {        elsif ( $length_feat < abs( $npost ) ) {
1209          $seq = lc( substr( $seq, 0, $npre ) ) . uc( substr( $seq, $npre, $length_feat ) ) . lc( substr( $seq, ( $npre + $length_feat ) ) );          $seq = lc( substr( $seq, 0, $npre ) ) . uc( substr( $seq, $npre, $length_feat ) ) . lc( substr( $seq, ( $npre + $length_feat ) ) );
1210        }        }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3