Diff for /rat/lonwrapper.pm between versions 1.49.2.1 and 1.49.2.3

version 1.49.2.1, 2016/08/05 21:34:54 version 1.49.2.3, 2016/11/30 17:40:39
Line 53  sub wrapper { Line 53  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 101  sub wrapper { Line 105  sub wrapper {
         $output .= $endpage;          $output .= $endpage;
         return $output;          return $output;
     } else {      } else {
           my $offset = 5;
           &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']);
           if ($env{'form.inhibitmenu'} eq 'yes') {
               $offset = 0;
           }
         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 = $offset;
                 var height = 0;                  var height = 0;
                 var hdrtop = 0;                  var hdrtop = 0;
                 if (\$('div.LC_head_subbox:first').length) {                  if (\$('div.LC_head_subbox:first').length) {
Line 116  sub wrapper { Line 125  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 161  sub handler { Line 170  sub handler {
     
     if ($is_ext) {      if ($is_ext) {
         &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/))) {
               if ($env{'form.symb'}) {
                   (undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'});
                   if ($res =~ /(#[^#]+)$/) {
                       $url .= $1;
                   }
               } elsif ($env{'form.folderpath'} =~ /^supplemental/) {
                   if ($env{'form.anchor'} ne '') {
                       $url .= '#'.$env{'form.anchor'};
                   }
               }
             $r->print(              $r->print(
                 &Apache::lonextresedit::display_editor($url,$env{'form.folderpath'},                  &Apache::lonextresedit::display_editor($url,$env{'form.folderpath'},
                                                        $env{'form.symb'},                                                         $env{'form.symb'},

Removed from v.1.49.2.1  
changed lines
  Added in v.1.49.2.3


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