[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages/bookmarkmenu admbookmarks.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 11 Apr 2006 15:26:08 -0000


albertel		Tue Apr 11 11:26:08 2006 EDT

  Modified files:              
    /loncom/html/res/adm/pages/bookmarkmenu	admbookmarks.pm 
  Log:
  - start_page
  
  
Index: loncom/html/res/adm/pages/bookmarkmenu/admbookmarks.pm
diff -u loncom/html/res/adm/pages/bookmarkmenu/admbookmarks.pm:1.30 loncom/html/res/adm/pages/bookmarkmenu/admbookmarks.pm:1.31
--- loncom/html/res/adm/pages/bookmarkmenu/admbookmarks.pm:1.30	Thu Apr  7 02:56:22 2005
+++ loncom/html/res/adm/pages/bookmarkmenu/admbookmarks.pm	Tue Apr 11 11:26:05 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The bookmarks handler
 #
-# $Id: admbookmarks.pm,v 1.30 2005/04/07 06:56:22 albertel Exp $
+# $Id: admbookmarks.pm,v 1.31 2006/04/11 15:26:05 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -36,6 +36,7 @@
 use strict;
 use Apache::Constants qw(:common);
 use Apache::lonnet;
+use Apache::loncommon();
 
 # --------------------------------------------------------------Put bookmarks
 
@@ -59,14 +60,7 @@
 
 sub construct_editor {
     my $bookmarks=shift;
-    return(<<END_HTML) 
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<title>
-Bookmark Tree Viewer/Editor
-</title>
-
+    my $js = <<ENDJS;
 <script src="/res/adm/pages/bookmarkmenu/bookmarklib.js" language="JavaScript"></script>
 
 <script LANGUAGE="JavaScript">
@@ -82,7 +76,14 @@
 window.tree.redraw();
 }
 </script>
-</head>
+ENDJS
+
+    my $html = &Apache::lonxml::xmlbegin();
+    my $head = &Apache::loncommon::head('Bookmark Tree Viewer/Editor',$js);
+    
+    return(<<END_HTML) 
+$html
+$head
 <FRAMESET rows="25, *, 40, 25, 1" topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 frameborder="0" border="0" framespacing="0" onLoad="Javascript:buildBookmarkMenu();initialize();">
  <FRAMESET cols="25, *, 25" frameborder="0" borders="0" framespacing="0">
   <FRAME marginwidth="0" marginheight="0" scrolling="no" src="javascript:''">
@@ -113,16 +114,16 @@
 # ---------------------------------------------------------------Construct Error window
 
 sub construct_error {
-  my $error_message=shift;
-  return(<<END_ERROR)
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
- <head>
-  <title>
-   Bookmark Tree Viewer/Editor  V3
-  </title>
- </head>
- <body bgcolor="#BBBBBB">
+    my $error_message=shift;
+    my $start_page = 
+	&Apache::loncommon::start_page('Bookmark Tree Viewer/Editor',undef,
+				       {'only_body' => 1,
+					'bgcolor'   => '#BBBBBB',});
+
+    my $end_page =  &Apache::loncommon::end_page();
+
+ return(<<END_ERROR)
+$start_page
   <table bgcolor="#FFFFFF" width="100%" height="90%" align="center">
    <td>
     <i>
@@ -135,25 +136,29 @@
     <input type=button name="close" value="close window" onClick="javascript:window.close();">
    </form>
   </center>
- </body>
-</html>
+$end_page
 END_ERROR
 }
 
 # --------------------------------------------Construct toolbar (after saving)
 
 sub construct_toolbar {
+    my $start_page = 
+	&Apache::loncommon::start_page('Bookmark Tree Viewer/Editor',undef,
+				       {'only_body' => 1,
+					'bgcolor'   => '#FFFFFF',});
+
+    my $end_page =  &Apache::loncommon::end_page();
+
   return(<<END_TOOLBAR)
-<html>
-<body>
+$start_page
 <div align="bottom">
 <center>
 Bookmarks saved. 
 [ <a href="/res/adm/pages/bookmarkmenu/bookmarkmenu_toolbar.html" target="_self">Continue</a> ]
 </center>
 </div>
-</body>
-</html>
+$end_page
 END_TOOLBAR
 }