[LON-CAPA-cvs] cvs: loncom /interface lonhelp.pm

raeburn raeburn at source.lon-capa.org
Sun Dec 29 19:23:40 EST 2013


raeburn		Mon Dec 30 00:23:40 2013 EDT

  Modified files:              
    /loncom/interface	lonhelp.pm 
  Log:
  - Only call javascript function: expand_div() onload for mobile devices.
  
  
Index: loncom/interface/lonhelp.pm
diff -u loncom/interface/lonhelp.pm:1.42 loncom/interface/lonhelp.pm:1.43
--- loncom/interface/lonhelp.pm:1.42	Wed Dec 18 01:23:21 2013
+++ loncom/interface/lonhelp.pm	Mon Dec 30 00:23:40 2013
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonhelp.pm,v 1.42 2013/12/18 01:23:21 raeburn Exp $
+# $Id: lonhelp.pm,v 1.43 2013/12/30 00:23:40 raeburn Exp $
 #
 # .tex help system web server handler
 #
@@ -228,13 +228,21 @@
      if ($env{'form.searchterm'}=~/\w/) {
         $caller = 'search';
      }
-     my $starthash = {
-           only_body   => 1,
-           add_entries => {
-                            'onload' => "javascript:expand_div('$caller');",
-                          },
-     };
 
+     my $starthash;
+
+     if ($env{'browser.mobile'}) {
+         $starthash = {
+                        only_body   => 1,
+                        add_entries => {
+                                         'onload' => "javascript:expand_div('$caller');",
+                                       },
+                      };
+     } else {
+         $starthash = {
+                        only_body   => 1,
+                      };
+     }
      my $firstfile;
      my $start_page=
 	 &Apache::loncommon::start_page('LON-CAPA Help',undef,$starthash);




More information about the LON-CAPA-cvs mailing list