Diff for /loncom/interface/loncommon.pm between versions 1.1137 and 1.1138

version 1.1137, 2013/07/10 22:07:37 version 1.1138, 2013/07/11 18:24:31
Line 7928  sub validate_page { Line 7928  sub validate_page {
   
   
 sub start_scrollbox {  sub start_scrollbox {
     my ($outerwidth,$width,$height,$id,$bgcolor)=@_;      my ($outerwidth,$width,$height,$id,$bgcolor,$cursor) = @_;
     unless ($outerwidth) { $outerwidth='520px'; }      unless ($outerwidth) { $outerwidth='520px'; }
     unless ($width) { $width='500px'; }      unless ($width) { $width='500px'; }
     unless ($height) { $height='200px'; }      unless ($height) { $height='200px'; }
Line 7942  sub start_scrollbox { Line 7942  sub start_scrollbox {
     }      }
     my $nicescroll_js;      my $nicescroll_js;
     if ($env{'browser.mobile'}) {      if ($env{'browser.mobile'}) {
           my %options;
           if (ref($cursor) eq 'HASH') {
               %options = %{$cursor};
           }
           unless ($options{'railalign'} =~ /^left|right$/) {
               $options{'railalign'} = 'left';
           }
           unless ($options{'cursorcolor'} =~ /^\#\w+$/) {
               my $function  = &get_users_function();
               $options{'cursorcolor'} = &designparm($function.'.sidebg',$env{'request.role.domain'});
               unless ($options{'cursorcolor'} =~ /^\#\w+$/) {
                   $options{'cursorcolor'} = '#00F';
               }
           }
           if ($options{'cursoropacity'} =~ /^[\d.]+$/) {
               unless ($options{'cursoropacity'} >= 0.0 && $options{'cursoropacity'} <=1.0) {
                   $options{'cursoropacity'}='1.0';
               }
           } else {
               $options{'cursoropacity'}='1.0';
           }
           if ($options{'cursorfixedheight'} eq 'none') {
               delete($options{'cursorfixedheight'});
           } else {
               unless ($options{'cursorfixedheight'} =~ /^\d+$/) { $options{'cursorfixedheight'}='50'; }
           }
           unless ($options{'railoffset'} =~ /^{[\w\:\d]+}$/) {
               delete($options{'railoffset'});
           } 
           my @niceoptions;
           while (my($key,$value) = each(%options)) {
               if ($value =~ /^\{.+\}$/) {
                   push(@niceoptions,$key.':'.$value);
               } else {
                   push(@niceoptions,$key.':"'.$value.'"');
               }
           }
         $nicescroll_js = '          $nicescroll_js = '
 <script type="text/javascript">  <script type="text/javascript">
 // <![CDATA[   // <![CDATA[ 
 $(document).ready(  $(document).ready(
   function() {      function() {  
       $("#div_'.$id.'").niceScroll({cursorcolor:"#00F"});        $("#div_'.$id.'").niceScroll({'.join(',',@niceoptions).'});
   }    }
 );  );
   

Removed from v.1.1137  
changed lines
  Added in v.1.1138


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>