Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.308 and 1.309

version 1.308, 2012/04/05 15:56:13 version 1.309, 2012/04/16 19:24:59
Line 103  sub direct_parm_link { Line 103  sub direct_parm_link {
 ##############################################  ##############################################
 ##############################################  ##############################################
   
 =item confirm_success  =item &confirm_success()
   
 Successful completion of an operation message  Successful completion of an operation message
   
Line 129  sub confirm_success { Line 129  sub confirm_success {
   
 =pod  =pod
   
 =item dragmath_button  =item &dragmath_button()
   
 Creates a button that launches a dragmath popup-window, in which an   Creates a button that launches a dragmath popup-window, in which an 
 expression can be edited and pasted as LaTeX into a specified textarea.   expression can be edited and pasted as LaTeX into a specified textarea. 
Line 155  ENDDRAGMATH Line 155  ENDDRAGMATH
   
 =pod  =pod
   
 =item dragmath_js  =item &dragmath_js()
   
 Javascript used to open pop-up window containing dragmath applet which   Javascript used to open pop-up window containing dragmath applet which 
 can be used to paste LaTeX into a textarea.  can be used to paste LaTeX into a textarea.
   
 =cut  =cut
   
 sub dragmath_js {  sub dragmath_js {
Line 177  sub dragmath_js { Line 178  sub dragmath_js {
 ENDDRAGMATHJS  ENDDRAGMATHJS
 }  }
   
   ##############################################
   ##############################################
   
   =pod
   
   =item &dependencies_button()
   
   Creates a button that launches a popup-window, in which dependencies  
   for the web page in the main window can be added to, replaced or deleted.  
   
   =cut
   
   sub dependencies_button {
       my $buttontext=&mt('Manage Dependencies');
       return <<"END";
                   <input type="button" value="$buttontext" onclick="javascript:dependencycheck();" />
   END
   }
   
   ##############################################
   
   =pod
   
   =item &dependencycheck_js()
   
   Javascript used to open pop-up window containing interface to manage 
   dependencies for a web page uploaded diretcly to a course.
   
   =cut
   
   sub dependencycheck_js {
       my ($symb,$title) = @_;
       my $link = '/adm/dependencies?symb='.&HTML::Entities::encode($symb,'<>&"').
                  '&title='.&HTML::Entities::encode($title,'<>&"');
       return <<ENDJS;
                   <script type="text/javascript">
                   // <![CDATA[
                     function dependencycheck() {
                        depwin  = window.open("$link","","width=750,height=500,resizable,scrollbars=yes");
                     }
                   // ]]>
                   </script>
   ENDJS
   }
   
 ##############################################  ##############################################
 ##############################################  ##############################################
   
 =pod  =pod
   
 =item authorbombs  =item &authorbombs()
   
 =cut  =cut
   
Line 317  sub get_recent_frozen { Line 362  sub get_recent_frozen {
   
 =pod  =pod
   
 =item textbox  =item &textbox()
   
 =cut  =cut
   
Line 337  sub textbox { Line 382  sub textbox {
   
 =pod  =pod
   
 =item checkbox  =item &checkbox()
   
 =cut  =cut
   
Line 359  sub checkbox { Line 404  sub checkbox {
   
 =pod  =pod
   
 =item radiobutton  =item &radiobutton()
   
 =cut  =cut
   
Line 383  sub radio { Line 428  sub radio {
   
 =pod  =pod
   
 =item &date_setter  =item &date_setter()
   
 &date_setter returns html and javascript for a compact date-setting form.  &date_setter returns html and javascript for a compact date-setting form.
 To retrieve values from it, use &get_date_from_form().  To retrieve values from it, use &get_date_from_form.
   
 Inputs  Inputs
   
Line 636  sub build_url { Line 681  sub build_url {
   
 =pod  =pod
   
 =item &get_date_from_form  =item &get_date_from_form()
   
 get_date_from_form retrieves the date specified in an &date_setter form.  get_date_from_form retrieves the date specified in an &date_setter form.
   
Line 895  of items completed and an estimate of th Line 940  of items completed and an estimate of th
 =over 4  =over 4
   
   
 =item &Create_PrgWin  =item &Create_PrgWin()
   
 Writes javascript to the client to open a progress window and returns a  Writes javascript to the client to open a progress window and returns a
 data structure used for bookkeeping.  data structure used for bookkeeping.
Line 926  Inputs Line 971  Inputs
 Returns a hash containing the progress state data structure.  Returns a hash containing the progress state data structure.
   
   
 =item &Update_PrgWin  =item &Update_PrgWin()
   
 Updates the text in the progress indicator.  Does not increment the count.  Updates the text in the progress indicator.  Does not increment the count.
 See &Increment_PrgWin.  See &Increment_PrgWin.
Line 946  Inputs: Line 991  Inputs:
 Returns: none  Returns: none
   
   
 =item Increment_PrgWin  =item Increment_PrgWin()
   
 Increment the count of items completed for the progress window by $step or 1 if no step is provided.  Increment the count of items completed for the progress window by $step or 1 if no step is provided.
   
Line 968  Inputs: Line 1013  Inputs:
 Returns: none  Returns: none
   
   
 =item Close_PrgWin  =item &Close_PrgWin()
   
 Closes the progress window.  Closes the progress window.
   
Line 1494  clientTime = (new Date()).getTime(); Line 1539  clientTime = (new Date()).getTime();
   
 =pod  =pod
   
 =item breadcrumbs  =item &breadcrumbs()
   
 Compiles the previously registered breadcrumbs into an series of links.  Compiles the previously registered breadcrumbs into an series of links.
 Additionally supports a 'component', which will be displayed on the  Additionally supports a 'component', which will be displayed on the
Line 1512  Inputs: $component (the text on the righ Line 1557  Inputs: $component (the text on the righ
            when including the text on the right.             when including the text on the right.
 Returns a string containing breadcrumbs for the current page.  Returns a string containing breadcrumbs for the current page.
   
 =item clear_breadcrumbs  =item &clear_breadcrumbs()
   
 Clears the previously stored breadcrumbs.  Clears the previously stored breadcrumbs.
   
 =item add_breadcrumb  =item &add_breadcrumb()
   
 Pushes a breadcrumb on the stack of crumbs.  Pushes a breadcrumb on the stack of crumbs.
   
Line 1675  returns: nothing Line 1720  returns: nothing
         push(@Crumbs,@_);          push(@Crumbs,@_);
     }      }
           
 =item add_breadcrumb_tool($category, $html)  =item &add_breadcrumb_tool($category, $html)
   
 Adds $html to $category of the breadcrumb toolbar container.  Adds $html to $category of the breadcrumb toolbar container.
   
Line 1718  returns: nothing Line 1763  returns: nothing
         push @{$tools{$category}}, @html;          push @{$tools{$category}}, @html;
     }      }
   
 =item clear_breadcrumb_tools()  =item &clear_breadcrumb_tools()
   
 Clears the breadcrumb toolbar container.  Clears the breadcrumb toolbar container.
   
Line 1730  returns: nothing Line 1775  returns: nothing
         undef(%tools);          undef(%tools);
     }      }
   
 =item render_tools(\$breadcrumbs)  =item &render_tools(\$breadcrumbs)
   
 Creates html for breadcrumb tools (categories navigation and tools) and inserts   Creates html for breadcrumb tools (categories navigation and tools) and inserts 
 \$breadcrumbs at the correct position.  \$breadcrumbs at the correct position.
Line 1739  input: \$breadcrumbs - a reference to th Line 1784  input: \$breadcrumbs - a reference to th
 breadcrumbs.  breadcrumbs.
   
 returns: nothing  returns: nothing
   
 =cut  =cut
   
 #TODO might split this in separate functions for each category  #TODO might split this in separate functions for each category
Line 1754  returns: nothing Line 1800  returns: nothing
                    { listattr => { class=>'LC_breadcrumb_tools_outerlist' } });                     { listattr => { class=>'LC_breadcrumb_tools_outerlist' } });
     }      }
   
 =item render_advtools(\$breadcrumbs)  =pod
   
   =item &render_advtools(\$breadcrumbs)
   
 Creates html for advanced tools (category advtools) and inserts \$breadcrumbs   Creates html for advanced tools (category advtools) and inserts \$breadcrumbs 
 at the correct position.  at the correct position.
Line 1763  input: \$breadcrumbs - a reference to th Line 1811  input: \$breadcrumbs - a reference to th
 breadcrumbs (after render_tools call).  breadcrumbs (after render_tools call).
   
 returns: nothing  returns: nothing
   
 =cut  =cut
   
     sub render_advtools {      sub render_advtools {
Line 2763  sub scripttag { Line 2812  sub scripttag {
     return htmltag('script', $content, {type => 'text/javascript'});      return htmltag('script', $content, {type => 'text/javascript'});
 };  };
   
   =pod
   
 =item list_from_array( \@array, { listattr =>{}, itemattr =>{} } )  =item &list_from_array( \@array, { listattr =>{}, itemattr =>{} } )
   
 Constructs a XHTML list from \@array.  Constructs a XHTML list from \@array.
   
Line 2890  sub generate_menu { Line 2940  sub generate_menu {
   
 =pod  =pod
   
 =item &start_funclist  =item &start_funclist()
   
 Start list of available functions  Start list of available functions
   
Line 2930  sub start_funclist { Line 2980  sub start_funclist {
   
 =pod  =pod
   
 =item &add_item_funclist  =item &add_item_funclist()
   
 Adds an item to the list of available functions  Adds an item to the list of available functions
   
Line 2956  sub add_item_funclist { Line 3006  sub add_item_funclist {
   
 =pod  =pod
   
 =item &end_funclist  =item &end_funclist()
   
 End list of available functions  End list of available functions
   
Line 2977  sub end_funclist { Line 3027  sub end_funclist {
   
 =pod  =pod
   
 =item funclist_from_array( \@array, {legend => 'text for legend'} )  =item &funclist_from_array( \@array, {legend => 'text for legend'} )
   
 Constructs a XHTML list from \@array with the first item being visually  Constructs a XHTML list from \@array with the first item being visually
 highlighted and set to the value of legend or 'Functions' if legend is  highlighted and set to the value of legend or 'Functions' if legend is

Removed from v.1.308  
changed lines
  Added in v.1.309


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