Diff for /loncom/interface/lonmenu.pm between versions 1.369.2.1 and 1.369.2.2

version 1.369.2.1, 2012/05/13 23:45:07 version 1.369.2.2, 2012/05/14 13:58:04
Line 156  use Apache::lonlocal; Line 156  use Apache::lonlocal;
 use Apache::lonmsg();  use Apache::lonmsg();
 use LONCAPA qw(:DEFAULT :match);  use LONCAPA qw(:DEFAULT :match);
 use HTML::Entities();  use HTML::Entities();
 use Apache::lonwishlist();  
   
 use vars qw(@desklines %category_names %category_members %category_positions   use vars qw(@desklines %category_names %category_members %category_positions 
             $readdesk @primary_menu @secondary_menu);              $readdesk @primary_menu @secondary_menu);
Line 628  c&6&3 Line 627  c&6&3
 c&8&1  c&8&1
 c&8&2  c&8&2
 s&8&3&prt.png&Print&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document  s&8&3&prt.png&Print&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document
   s&9&1&sbkm.png&Bookmark&set[_1]bookmark[_2]&set_bookmark()&Set a bookmark for this resource&&1
   
 ENDMENUITEMS  ENDMENUITEMS
             if (&Apache::lonnet::allowed('bre', $env{'request.course.id'}) eq 'F' && $env{'request.uri'} =~ /^\/res/) {  
                 # wishlist is only available for users with access to resource-pool  
                 # and links can only be set for resources within the resource-pool  
                 $menuitems .= (<<ENDMENUITEMS);  
 s&9&1&wishlist-link.png&Wishlist&wishlistlink[_2]&set_wishlistlink()&Set a link for this resource to wishlist&&1  
 ENDMENUITEMS  
             }  
   
 my $currentURL = &Apache::loncommon::get_symb();  my $currentURL = &Apache::loncommon::get_symb();
 my ($symb_old,$symb_old_enc) = &Apache::loncommon::clean_symb($currentURL);  my ($symb_old,$symb_old_enc) = &Apache::loncommon::clean_symb($currentURL);
Line 665  ENDREALRES Line 659  ENDREALRES
     $menuitems .= (<<ENDMENUITEMS);      $menuitems .= (<<ENDMENUITEMS);
 s&8&3&prt.png&Print&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document  s&8&3&prt.png&Print&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document
 ENDMENUITEMS  ENDMENUITEMS
             if (&Apache::lonnet::allowed('bre', $env{'request.course.id'}) eq 'F') {  
                 # wishlist is only available for users with access to resource-pool  
                 $menuitems .= (<<ENDMENUITEMS);  
 s&9&1&wishlist-link.png&Wishlist&wishlistlink[_2]&set_wishlistlink()&Set a link for this resource to wishlist&&1  
 ENDMENUITEMS  
             }  
  }   }
         my $buttons='';          my $buttons='';
         foreach (split(/\n/,$menuitems)) {          foreach (split(/\n/,$menuitems)) {
Line 1309  sub utilityfunctions { Line 1297  sub utilityfunctions {
     my $end_page_annotate =       my $end_page_annotate = 
         &Apache::loncommon::end_page({'js_ready' => 1});          &Apache::loncommon::end_page({'js_ready' => 1});
   
       my $start_page_bookmark =
           &Apache::loncommon::start_page('Bookmarks',undef,
                                          {'only_body' => 1,
                                           'js_ready'  => 1,
                                           'bgcolor'   => '#BBBBBB',});
   
       my $end_page_bookmark =
           &Apache::loncommon::end_page({'js_ready' => 1});
   
     my $confirm_switch = &mt("Editing requires switching to the resource's home server.").'\n'.      my $confirm_switch = &mt("Editing requires switching to the resource's home server.").'\n'.
                          &mt('Switch server?');                           &mt('Switch server?');
   
Line 1425  function group_chat(group) { Line 1422  function group_chat(group) {
    grpchat=window.open(url,winName,'height=320,width=280,resizable=yes,location=no,menubar=no,toolbar=no');     grpchat=window.open(url,winName,'height=320,width=280,resizable=yes,location=no,menubar=no,toolbar=no');
 }  }
   
   function edit_bookmarks() {
      go('');
      w_BookmarkPal_flag=1;
      bookmarkpal=window.open("/adm/bookmarks",
                  "BookmarkPal", "width=500,height=505,scrollbars=0");
   }
   
 function annotate() {  function annotate() {
    w_Annotator_flag=1;     w_Annotator_flag=1;
    annotator=window.open('','Annotator','width=365,height=265,scrollbars=0');     annotator=window.open('','Annotator','width=365,height=265,scrollbars=0');
Line 1438  function annotate() { Line 1442  function annotate() {
    annotator.document.close();     annotator.document.close();
 }  }
   
 function open_Wishlist_Import(rat) {  function set_bookmark() {
    var newWin;     go('');
    if (rat) {     clienttitle=document.title;
        newWin = window.open('/adm/wishlist?inhibitmenu=yes&mode=import&rat='+rat,     clienthref=location.pathname;
                             'wishlistImport','scrollbars=1,resizable=1,menubar=0');     w_bmquery_flag=1;
    }     bmquery=window.open('','bmquery','width=365,height=165,scrollbars=0');
    else {     bmquery.document.write(
        newWin = window.open('/adm/wishlist?inhibitmenu=yes&mode=import',     '$start_page_bookmark'
                             'wishlistImport','scrollbars=1,resizable=1,menubar=0');     +'<center><form method="post"'
    }     +' name="newlink" action="/adm/bookmarks" target="bmquery" '
    newWin.focus();     +'> <table width="340" height="150" '
      +'bgcolor="#FFFFFF" align="center"><tr><td>Link Name:<br /><input '
      +'type="text" name="title" size="45" value="'+clienttitle+'" />'
      +'<br />Address:<br /><input type="text" name="address" size="45" '
      +'value="'+clienthref+'" /><br /><center><input type="submit" '
      +'value="Save" /> <input type="button" value="Close" '
      +'onclick="javascript:window.close();" /></center></td>'
      +'</tr></table></form></center>'
      +'$end_page_bookmark' );
      bmquery.document.close();
 }  }
   
 ENDUTILITY  ENDUTILITY

Removed from v.1.369.2.1  
changed lines
  Added in v.1.369.2.2


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