--- loncom/interface/lonmenu.pm 2009/11/19 10:26:15 1.305 +++ loncom/interface/lonmenu.pm 2009/11/20 04:12:43 1.306 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.305 2009/11/19 10:26:15 bisitz Exp $ +# $Id: lonmenu.pm,v 1.306 2009/11/20 04:12:43 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1606,6 +1606,31 @@ function gonav(url) { NAVCONTROL } +sub dc_popup_js { + my %lt = &Apache::lonlocal::texthash( + more => '(More ...)', + less => '(Less ...)', + ); + return <<"END"; + +function showCourseID() { + document.getElementById('dccid').style.display='block'; + document.getElementById('dccid').style.textAlign='left'; + document.getElementById('dccid').style.textFace='normal'; + document.getElementById('dccidtext').innerHTML ='$lt{'less'}'; + return; +} + +function hideCourseID() { + document.getElementById('dccid').style.display='none'; + document.getElementById('dccidtext').innerHTML ='$lt{'more'}'; + return; +} + +END + +} + sub utilityfunctions { my $caller = shift; unless ($env{'environment.remote'} eq 'off' || @@ -1623,6 +1648,13 @@ sub utilityfunctions { my $currentsymb=&Apache::lonenc::check_encrypt($env{'request.symb'}); my $nav_control=&nav_control_js(); + my $dc_popup_cid; + if ($env{'user.adv'} && exists($env{'user.role.dc./'. + $env{'course.'.$env{'request.course.id'}. + '.domain'}.'/'})) { + $dc_popup_cid = &dc_popup_js(); + } + my $start_page_annotate = &Apache::loncommon::start_page('Annotator',undef, {'only_body' => 1, @@ -1650,6 +1682,7 @@ return (<