--- loncom/interface/lonmenu.pm 2019/08/17 12:58:00 1.369.2.78 +++ loncom/interface/lonmenu.pm 2020/01/19 00:24:30 1.369.2.79 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369.2.78 2019/08/17 12:58:00 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.79 2020/01/19 00:24:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1707,7 +1707,7 @@ sub prepare_functions { &advtools_crumbs(@inlineremote); return $editbutton; } elsif (($env{'request.registered'}) && (!ref($forbodytag))) { - return $editbutton; + return $editbutton || $viewsrcbutton; } else { if (ref($bread_crumbs) eq 'ARRAY') { if (@inlineremote > 0) { @@ -2382,6 +2382,11 @@ function open_StoredLinks_Import(rat) { newWin.focus(); } +function open_source() { + sourcewin=window.open('/adm/source?inhibitmenu=yes&viewonly=1&filename='+currentURL,'LONsource', + 'height=500,width=600,resizable=yes,location=no,menubar=no,toolbar=no,scrollbars=yes'); +} + (function (\$) { \$(document).ready(function () { \$.single=function(a){return function(b){a[0]=b;return a}}(\$([1]));