Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.327 and 1.328

version 1.327, 2012/10/08 10:47:34 version 1.328, 2012/10/31 12:54:13
Line 3011  FOURTH Line 3011  FOURTH
     return $output;      return $output;
 }  }
   
   ##############################################
   ##############################################
   
   sub javascript_jumpto_resource {
       my $confirm_switch = &mt("Editing requires switching to the resource's home server.").'\n'.
                            &mt('Switch server?');
       return (<<ENDUTILITY)
   
   function go(url) {
      if (url!='' && url!= null) {
          currentURL = null;
          currentSymb= null;
          window.location.href=url;
      }
   }
   
   function need_switchserver(url) {
       if (url!='' && url!= null) {
           if (confirm("$confirm_switch")) {
               go(url);
           }
       }
       return;
   }
   
   ENDUTILITY
   
   }
   
   sub jump_to_editres {
       my ($cfile,$home,$switchserver,$uploaded,$symb) = @_;
       my $jscall;
       if ($switchserver) {
           if ($symb && $home) {
               $cfile = '/adm/switchserver?otherserver='.$home.'&amp;role='.
                        &HTML::Entities::encode($env{'request.role'},'"<>&').'&amp;'.
                       'symb='.&HTML::Entities::encode($env{'request.symb'},'"<>&');
               if ($uploaded) {
                   $cfile .= '&amp;forceedit=1';
               }
               $jscall = "need_switchserver('$cfile');";
           }
       } else {
           if ($uploaded) {
               $cfile .= '?forceedit=1';
           }
           $jscall = "go('$cfile')";
       }
       return $jscall;
   }
   
 ##############################################  ##############################################
 ##############################################  ##############################################

Removed from v.1.327  
changed lines
  Added in v.1.328


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