--- loncom/interface/lonmenu.pm 2012/05/13 23:45:07 1.369.2.1 +++ loncom/interface/lonmenu.pm 2012/05/14 13:58:04 1.369.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369.2.1 2012/05/13 23:45:07 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.2 2012/05/14 13:58:04 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -156,7 +156,6 @@ use Apache::lonlocal; use Apache::lonmsg(); use LONCAPA qw(:DEFAULT :match); use HTML::Entities(); -use Apache::lonwishlist(); use vars qw(@desklines %category_names %category_members %category_positions $readdesk @primary_menu @secondary_menu); @@ -628,14 +627,9 @@ c&6&3 c&8&1 c&8&2 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 - 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 .= (< 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'. &mt('Switch server?'); @@ -1425,6 +1422,13 @@ function group_chat(group) { 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() { w_Annotator_flag=1; annotator=window.open('','Annotator','width=365,height=265,scrollbars=0'); @@ -1438,17 +1442,26 @@ function annotate() { annotator.document.close(); } -function open_Wishlist_Import(rat) { - var newWin; - if (rat) { - newWin = window.open('/adm/wishlist?inhibitmenu=yes&mode=import&rat='+rat, - 'wishlistImport','scrollbars=1,resizable=1,menubar=0'); - } - else { - newWin = window.open('/adm/wishlist?inhibitmenu=yes&mode=import', - 'wishlistImport','scrollbars=1,resizable=1,menubar=0'); - } - newWin.focus(); +function set_bookmark() { + go(''); + clienttitle=document.title; + clienthref=location.pathname; + w_bmquery_flag=1; + bmquery=window.open('','bmquery','width=365,height=165,scrollbars=0'); + bmquery.document.write( + '$start_page_bookmark' + +'
' + +'
Link Name:
' + +'
Address:

' + +'$end_page_bookmark' ); + bmquery.document.close(); } ENDUTILITY