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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 23 Mar 2006 22:02:01 -0000


albertel		Thu Mar 23 17:02:01 2006 EDT

  Modified files:              
    /loncom/interface	lonsupportreq.pm lonsearchcat.pm 
  Log:
   - some start_page work
  
  
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.30 loncom/interface/lonsupportreq.pm:1.31
--- loncom/interface/lonsupportreq.pm:1.30	Wed Mar 15 14:41:26 2006
+++ loncom/interface/lonsupportreq.pm	Thu Mar 23 17:01:57 2006
@@ -1,5 +1,5 @@
 #
-# $Id: lonsupportreq.pm,v 1.30 2006/03/15 19:41:26 albertel Exp $
+# $Id: lonsupportreq.pm,v 1.31 2006/03/23 22:01:57 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -63,7 +63,6 @@
 sub print_request_form {
     my ($r,$origurl,$function) = @_;
     my ($os,$browser,$bversion,$uhost,$uname,$udom,$uhome,$urole,$usec,$email,$cid,$cdom,$cnum,$ctitle,$ccode,$sectionlist,$lastname,$firstname,$server,$formname);
-    my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0" onLoad="initialize_codes()"',1);
     my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg');
     if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) {
         $tablecolor = '#EEEE99';
@@ -98,7 +97,7 @@
     var str = field.value;
     if (window.RegExp) {
         var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
-        var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$";
+        var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"; //"
         var reg1 = new RegExp(reg1str);
         var reg2 = new RegExp(reg2str);
         if (!reg1.test(str) && reg2.test(str)) {
@@ -115,7 +114,7 @@
     }
 }
 END
-    #" stupid emacs
+
     if ($cid =~ m/_/) {
         ($cdom,$cnum) = split/_/,$cid;
     }
@@ -196,19 +195,17 @@
         }
     }
 	
-    my $html=&Apache::lonxml::xmlbegin();
-    my $head = &Apache::loncommon::headtag('LON-CAPA support request');
-    my $end_head = &Apache::loncommon::endheadtag();
-    $r->print(<<ENDHEAD);
-$html
-$head
-<script type"text/javascript">
-$scripttag
-$jscript
-</script>
-$end_head
-$bodytag
-ENDHEAD
+    my $js = '<script type"text/javascript">'."\n$scripttag\n$jscript\n".
+	'</script>';
+    my $add_entries =
+	'topmargin="0" marginheight="0" onLoad="initialize_codes()"',
+    my $start_page =
+	&Apache::loncommon::start_page('Support Request',$js,
+				       { 'function'    => $function,
+					 'add_entries' => $add_entries,
+					 'only_body'   => 1,});
+    $r->print($start_page);
+
     if ($r->uri eq '/adm/helpdesk') {
         &print_header($r,$origurl);
     }
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.259 loncom/interface/lonsearchcat.pm:1.260
--- loncom/interface/lonsearchcat.pm:1.259	Tue Mar 21 16:07:31 2006
+++ loncom/interface/lonsearchcat.pm	Thu Mar 23 17:01:58 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.259 2006/03/21 21:07:31 albertel Exp $
+# $Id: lonsearchcat.pm,v 1.260 2006/03/23 22:01:58 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3121,17 +3121,17 @@
         "&persistent_db_id=".$env{'form.persistent_db_id'};
     my $run_search_link = $basic_link."&phase=run_search";
     my $results_link = &results_link();
+    my $js = <<JS;
+<script type="text/javascript">
+var targetwin = opener;
+var queue = '';
+</script>
+JS
     my $html     = &Apache::lonxml::xmlbegin();
-    my $head     = &Apache::loncommon::headtag('LON-CAPA Digital Library Search Results');
-    my $end_head = &Apache::loncommon::endheadtag();
+    my $head     = &Apache::loncommon::head('LON-CAPA Digital Library Search Results',$js);
     my $result = <<"ENDFRAMES";
 $html
 $head
-<script>
-var targetwin = opener;
-var queue = '';
-</script>
-$end_head
 <frameset rows="150,*">
     <frame name="statusframe"  src="$run_search_link">
     <frame name="resultsframe" src="$results_link">