Diff for /loncom/interface/loncommon.pm between versions 1.41 and 1.42

version 1.41, 2002/06/25 17:09:38 version 1.42, 2002/07/01 15:24:44
Line 190  BEGIN { Line 190  BEGIN {
           
 }  }
 # ============================================================= END BEGIN BLOCK  # ============================================================= END BEGIN BLOCK
   ###############################################################
   ##           HTML and Javascript Helper Functions            ##
   ###############################################################
   
   =pod 
   
   =item browser_and_searcher_javascript 
   
   Returns scalar containing javascript to open a browser window
   or a searcher window.  Also creates 
   
   =over 4
   
   =item openbrowser(formname,elementname,only,omit) [javascript]
   
   inputs: formname, elementname, only, omit
   
   formname and elementname indicate the name of the html form and name of
   the element that the results of the browsing selection are to be placed in. 
   
   Specifying 'only' will restrict the browser to displaying only files
   with the given extension.  Can be a comma seperated list.
   
   Specifying 'omit' will restrict the browser to NOT displaying files
   with the given extension.  Can be a comma seperated list.
   
   =item opensearcher(formname, elementname) [javascript]
   
   Inputs: formname, elementname
   
   formname and elementname specify the name of the html form and the name
   of the element the selection from the search results will be placed in.
   
   =back
   
   =cut
   
   ###############################################################
   sub browser_and_searcher_javascript {
       return <<END;
       var editbrowser;
       function openbrowser(formname,elementname,only,omit) {
           var url = '/res/?';
           if (editbrowser == null) {
               url += 'launch=1&';
           }
           url += 'catalogmode=interactive&';
           url += 'mode=edit&';
           url += 'form=' + formname + '&';
           if (only != null) {
               url += 'only=' + only + '&';
           } 
           if (omit != null) {
               url += 'omit=' + omit + '&';
           }
           url += 'element=' + elementname + '';
           var title = 'Browser';
           var options = 'scrollbars=1,resizable=1,menubar=0';
           options += ',width=700,height=600';
           editbrowser = open(url,title,options,'1');
           editbrowser.focus();
       }
       var editsearcher;
       function opensearcher(formname,elementname) {
           var url = '/adm/searchcat?';
           if (editsearcher == null) {
               url += 'launch=1&';
           }
           url += 'catalogmode=interactive&';
           url += 'mode=edit&';
           url += 'form=' + formname + '&';
           url += 'element=' + elementname + '';
           var title = 'Search';
           var options = 'scrollbars=1,resizable=1,menubar=0';
           options += ',width=700,height=600';
           editsearcher = open(url,title,options,'1');
           editsearcher.focus();
       }
   END
   }
   
   
   
   ###############################################################
   
   =pod
   
 =item linked_select_forms(...)  =item linked_select_forms(...)
   

Removed from v.1.41  
changed lines
  Added in v.1.42


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