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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Tue, 08 Jul 2008 09:23:38 -0000


raeburn		Tue Jul  8 05:23:38 2008 EDT

  Modified files:              
    /loncom/interface	coursecatalog.pm 
  Log:
  - Add some white space after "Display courses" button.
  - setCourseId() and changeSort() javascript functions always available on course listing page
  
  
Index: loncom/interface/coursecatalog.pm
diff -u loncom/interface/coursecatalog.pm:1.36 loncom/interface/coursecatalog.pm:1.37
--- loncom/interface/coursecatalog.pm:1.36	Mon Jul  7 11:20:18 2008
+++ loncom/interface/coursecatalog.pm	Tue Jul  8 05:23:38 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler for displaying the course catalog interface
 #
-# $Id: coursecatalog.pm,v 1.36 2008/07/07 15:20:18 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.37 2008/07/08 09:23:38 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -101,9 +101,6 @@
     return;
 }
 
-ENDSCRIPT
-        if ($env{'form.state'} eq 'listing') {
-            $catjs .= qq|
 function changeSort(caller) {
     document.$formname.sortby.value = caller;
     document.$formname.submit();
@@ -111,8 +108,9 @@
 function setCourseId(caller) {
     document.$formname.coursenum.value = caller;
     document.$formname.submit();
-}\n|;
-        }
+}
+
+ENDSCRIPT
         my $numtitles;
         if ($env{'form.currcat_0'} eq 'instcode::0') {
             $numtitles = &instcode_course_selector($r,$codedom,$formname,$domdesc,
@@ -319,10 +317,7 @@
                   '<input type="submit" name="catalogfilter" value="'.
                   &mt('Display courses').'" />'.
                   '<input type="hidden" name="numtitles" value="'.$numtitles.
-                  '" /></form>');
-        if (($numtitles > 0) && ($env{'form.state'} eq 'listing')) {
-            $r->print('<br />');
-        }
+                  '" /></form><br /><br />');
     } else {
         &cat_header($r,$codedom,$js,\%add_entries,$catlinks,$numtitles);
         my $cat_maxdepth = $env{'form.catalog_maxdepth'};