[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmenu.pm
raeburn
raeburn at source.lon-capa.org
Sun Jun 22 15:48:05 EDT 2014
raeburn Sun Jun 22 19:48:05 2014 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface lonmenu.pm
Log:
- For 2.11
- Backport 1.428
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.369.2.51 loncom/interface/lonmenu.pm:1.369.2.52
--- loncom/interface/lonmenu.pm:1.369.2.51 Sun Feb 23 22:36:16 2014
+++ loncom/interface/lonmenu.pm Sun Jun 22 19:48:05 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.369.2.51 2014/02/23 22:36:16 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.52 2014/06/22 19:48:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -876,11 +876,15 @@
}
$menuitems.="&$swtext{'anot'}&tations[_1]&annotate()&";
$menuitems.="Make notes and annotations about this resource&&1\n";
+my $is_mobile;
+if ($env{'browser.mobile'}) {
+ $is_mobile = 1;
+}
unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme|viewclasslist|portfolio)(\?|$)/) {
if ((!$env{'request.enc'}) && ($env{'request.noversionuri'} !~ m{^/adm/wrapper/ext/}) && ($env{'request.noversionuri'} !~ m{^/uploaded/$match_domain/$match_courseid/docs/})) {
$menuitems.=(<<ENDREALRES);
-s&6&3&catalog.png&$swtext{'catalog'}&info[_1]&catalog_info()&Show Metadata
+s&6&3&catalog.png&$swtext{'catalog'}&info[_1]&catalog_info('$is_mobile')&Show Metadata
ENDREALRES
}
unless (($env{'request.noversionuri'} =~ m{^/uploaded/$match_domain/$match_courseid/docs/}) ||
@@ -2102,8 +2106,12 @@
-function catalog_info() {
- openMyModal(window.location.pathname+'.meta',500,400,'yes');
+function catalog_info(isMobile) {
+ if (isMobile == 1) {
+ openMyModal(window.location.pathname+'.meta?modal=1',500,400,'yes');
+ } else {
+ loncatinfo=window.open(window.location.pathname+'.meta',"LONcatInfo",'height=500,width=400,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no');
+ }
}
function chat_win() {
More information about the LON-CAPA-cvs
mailing list