Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.332 and 1.335

version 1.332, 2012/11/27 23:45:08 version 1.335, 2012/11/30 11:28:51
Line 209  dependencies for a web page uploaded dir Line 209  dependencies for a web page uploaded dir
 =cut  =cut
   
 sub dependencycheck_js {  sub dependencycheck_js {
     my ($symb,$title,$url) = @_;      my ($symb,$title,$url,$folderpath,$uri) = @_;
     my $link = '/adm/dependencies?symb='.&HTML::Entities::encode($symb,'<>&"').      my $link;
                '&title='.&HTML::Entities::encode($title,'<>&"').      if ($symb) {
                '&url='.&HTML::Entities::encode($url,'<>&"');          $link = '/adm/dependencies?symb='.&HTML::Entities::encode($symb,'<>&"');
       } elsif ($folderpath) {
           $link = '/adm/dependencies?folderpath='.&HTML::Entities::encode($folderpath,'<>&"');
            $url = $uri;
       }
       $link .= (($link=~/\?/)?'&amp;':'?').'title='.
                &HTML::Entities::encode($title,'<>&"');
       if ($url) {
           $link .= '&url='.&HTML::Entities::encode($url,'<>&"');
       }
     return <<ENDJS;      return <<ENDJS;
                 <script type="text/javascript">                  <script type="text/javascript">
                 // <![CDATA[                  // <![CDATA[
Line 1933  sub docs_breadcrumbs { Line 1942  sub docs_breadcrumbs {
                            'no_mt' => 1,                             'no_mt' => 1,
                           });                            });
     }      }
       if ($title) {
           push(@docs_crumbs,
                             {'title' => $title,
                              'text'  => $title,
                              'no_mt' => 1,}
                             );
       }
     if (wantarray) {      if (wantarray) {
         unless ($precleared) {          unless ($precleared) {
             &clear_breadcrumbs();              &clear_breadcrumbs();
         }          }
         &add_breadcrumb(@docs_crumbs);          &add_breadcrumb(@docs_crumbs);
         if ($title) {  
             &add_breadcrumb({text => $title});  
         }  
         if ($contenteditor) {          if ($contenteditor) {
             $plain=~s/\&gt\;\s*$//;              $plain=~s/\&gt\;\s*$//;
         }          }
Line 3521  sub funclist_from_array { Line 3534  sub funclist_from_array {
                { listattr => {class => 'LC_funclist'} });                 { listattr => {class => 'LC_funclist'} });
 }     }   
   
   =pod
   
   =item &actionbox( \@array )
   
   Constructs a XHTML list from \@array with the first item being visually
   highlighted and set to the value 'Actions'. The list is wrapped in a division.
   
   The actionlist is used to offer contextual actions, mostly at the bottom
   of a page, on which the outcome of an processed action is shown,
   e.g. a file operation in Construction Space.
   
   =over
   
   =item \@array
   
   A reference to the array containing text. Details: sub funclist_from_array
   
   =back
    
   Returns: XHTML div as string. 
   
   =back
   
   =cut  
   
   sub actionbox {
       my ($items) = @_;
       return unless(ref($items) eq 'ARRAY');
       return
           '<div class="LC_actionbox">'
          .&funclist_from_array($items, {legend => &mt('Actions')})
          .'</div>';
   }
   
 1;  1;
   
 __END__  __END__

Removed from v.1.332  
changed lines
  Added in v.1.335


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