Diff for /rat/lonwrapper.pm between versions 1.52 and 1.54

version 1.52, 2016/10/31 12:59:11 version 1.54, 2016/11/29 19:53:58
Line 54  sub wrapper { Line 54  sub wrapper {
                                         );                                          );
   
     my $anchor;      my $anchor;
     if (($is_ext) && ($env{'form.symb'})) {      if ($is_ext) {
         (undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'});          if ($env{'form.symb'}) {
         if ($res =~ /(#[^#]+)$/) {              (undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'});
             $anchor = $1;              if ($res =~ /(#[^#]+)$/) {
                   $anchor = $1;
               }
           } elsif ($env{'form.anchor'} ne '') {
               $anchor = '#'.$env{'form.anchor'};
         }          }
     }      }
   
Line 110  sub wrapper { Line 114  sub wrapper {
         my $script = &Apache::lonhtmlcommon::scripttag(<<SCRIPT);          my $script = &Apache::lonhtmlcommon::scripttag(<<SCRIPT);
         \$(document).ready( function() {          \$(document).ready( function() {
             \$(window).unbind('resize').resize(function(){              \$(window).unbind('resize').resize(function(){
                 var header;                  var header = null;
                 var offset = 5;                  var offset = 5;
                 var height = 0;                  var height = 0;
                 var hdrtop = 0;                  var hdrtop = 0;
Line 122  sub wrapper { Line 126  sub wrapper {
                         header = \$('#LC_breadcrumbs');                          header = \$('#LC_breadcrumbs');
                     }                      }
                 }                  }
                 if (header.length) {                  if (header != null && header.length) {
                     height = header.height();                      height = header.height();
                     hdrtop = header.position().top;                      hdrtop = header.position().top;
                 }                  }
Line 176  sub handler { Line 180  sub handler {
     }      }
     if (($is_ext) || ($exttool)) {      if (($is_ext) || ($exttool)) {
         &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},          &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
             ['forceedit','register','folderpath','symb','idx','title']);              ['forceedit','register','folderpath','symb','idx','title','anchor']);
         if (($env{'form.forceedit'}) &&          if (($env{'form.forceedit'}) &&
             (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) &&              (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) &&
             (($env{'form.folderpath'} =~ /^supplemental/) ||              (($env{'form.folderpath'} =~ /^supplemental/) ||
              ($env{'form.symb'} =~ /^uploaded/))) {               ($env{'form.symb'} =~ /^uploaded/))) {
             (undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'});              if ($env{'form.symb'}) {
             if ($res =~ /(#[^#]+)$/) {                  (undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'});
                  $url .= $1;                  if ($res =~ /(#[^#]+)$/) {
                       $url .= $1;
                   }
               } elsif ($env{'form.folderpath'} =~ /^supplemental/) {
                   if ($env{'form.anchor'} ne '') {
                       $url .= '#'.$env{'form.anchor'};
                   }
             }              }
             my $type = 'ext';              my $type = 'ext';
             my %ltitools;              my %ltitools;

Removed from v.1.52  
changed lines
  Added in v.1.54


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>