[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lon-capa-cvs
Subject:    [LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm
From:       raeburn via LON-CAPA-cvs <lon-capa-cvs () mail ! lon-capa ! org>
Date:       2021-10-26 2:31:22
Message-ID: cvsraeburn1635215482 () cvsserver
[Download RAW message or body]

raeburn		Tue Oct 26 02:31:22 2021 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  - Prevent javascript errors in resize_scrollbox() when menu collection is in
    use in which standard components are absent.
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.399 loncom/interface/lonhtmlcommon.pm:1.400
--- loncom/interface/lonhtmlcommon.pm:1.399	Mon Jun  7 06:15:55 2021
+++ loncom/interface/lonhtmlcommon.pm	Tue Oct 26 02:31:22 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.399 2021/06/07 06:15:55 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.400 2021/10/26 02:31:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3433,12 +3433,18 @@
         if (itemid != null) {
             itemh = itemid.offsetHeight;
         }
-        var primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
-        var secondaryheight;
+        var primaryheight = 0;
+        if (document.getElementById('LC_nav_bar') != null) { 
+            primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
+        }
+        var secondaryheight = 0;
         if (document.getElementById('LC_secondary_menu') != null) { 
             secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight;
         }
-        var crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
+        var crumbsheight = 0;
+        if (document.getElementById('LC_breadcrumbs') != null) {
+            crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
+        }
         var dccidheight = 0;
         if (document.getElementById('dccid') != null) {
             dccidheight = document.getElementById('dccid').offsetHeight;


_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic