[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages/bookmarkmenu bookmarklib.js

bisitz bisitz@source.lon-capa.org
Thu, 23 Apr 2009 10:31:28 -0000


bisitz		Thu Apr 23 10:31:28 2009 EDT

  Modified files:              
    /loncom/html/res/adm/pages/bookmarkmenu	bookmarklib.js 
  Log:
  XHTML / Tidy up HTML code generated by bookmarklib.js:
  - Added quotation marks to HTML attributes
  - Replaced some HTML styles by CSS styles (style="...")
  - Added missing "#" to colors
  - <br /> instead of <br>
  
  
Index: loncom/html/res/adm/pages/bookmarkmenu/bookmarklib.js
diff -u loncom/html/res/adm/pages/bookmarkmenu/bookmarklib.js:1.22 loncom/html/res/adm/pages/bookmarkmenu/bookmarklib.js:1.23
--- loncom/html/res/adm/pages/bookmarkmenu/bookmarklib.js:1.22	Fri Feb 13 20:20:23 2009
+++ loncom/html/res/adm/pages/bookmarkmenu/bookmarklib.js	Thu Apr 23 10:31:28 2009
@@ -1,7 +1,7 @@
 // The LearningOnline Network with CAPA
 // bookmarklib.js
 // 
-// $Id: bookmarklib.js,v 1.22 2009/02/13 20:20:23 schafran Exp $
+// $Id: bookmarklib.js,v 1.23 2009/04/23 10:31:28 bisitz Exp $
 // 
 // Copyright Michigan State University Board of Trustees
 // 
@@ -87,10 +87,9 @@
       open();                        //--------for 'compliant' browsers
       clear();                       //----------for Mozilla (Netscape6)
       write("<html>\n"                                            );
-      write("<body bgcolor=dddddd text=000000 link=000000 "       );
-      write("vlink=000000 topmargin=0 leftmargin=0 rightmargin=0 ");
-      write("marginheight=0 marginwidth=0>\n"                     );
-      write("<table border=0 cellspacing=0 cellpadding=0>\n"      );
+      write("<body link=\"#000000\" vlink=\"000000\" " );
+      write("style=\"background-color: #DDDDDD; color: #000000; margin: 0px;\">\n"                   );
+      write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"   );
    }
 //   bendebugger=window.open('','HTML_DUMP','scrollbars');  //debug
 //   bendebugger.document.clear(); //debug
@@ -266,13 +265,13 @@
    if (this.opened) {
       with (parent.frames[4].document) {
 	 write("<tr><td><a href=JavaScript:"+objPath+".swapState();>"   );
-         write("<img src=/res/adm/pages/bookmarkmenu/folder_pointer_opened.gif border=0></a>"       );
+         write("<img src=\"/res/adm/pages/bookmarkmenu/folder_pointer_opened.gif\" border=\"0\"></a>");
 	 write("<a href='JavaScript:"+objPath+".folderClick();'"        );
 	 write("onmouseover="+objPath+".folderHover("+image_num+");>"   );
-	 write("<img src=/res/adm/pages/bookmarkmenu/pix.gif height=25 width="+20*(depth)+" border=0></a>");
+	 write("<img src=\"/res/adm/pages/bookmarkmenu/pix.gif\" height=\"25\" width=\""+20*(depth)+"\" border=\"0\"></a>");
 	 write("<a href='javaScript:"+objPath+".folderClick();'"        );
          write("onmouseover='"+objPath+".folderHover("+image_num+");'>" );
-	 write("<img src="+this.icon+" border=0></a>"                   );
+	 write("<img src=\""+this.icon+"\" border=\"0\"></a>"           );
 	 write( this.name+"</td></tr>"                                  );
       }
 //       with (bendebugger.document) {
@@ -301,12 +300,12 @@
    } else {
       with (parent.frames[4].document) {
 	 write("<tr><td><a href=JavaScript:"+objPath+".swapState();>"   );
-         write("<img src=/res/adm/pages/bookmarkmenu/folder_pointer_closed.gif border=0></a>"       );
+         write("<img src=\"/res/adm/pages/bookmarkmenu/folder_pointer_closed.gif\" border=\"0\"></a>"       );
 	 write("<a href='JavaScript:"+objPath+".folderClick();'"        );
 	 write(" onmouseover="+objPath+".folderHover("+image_num+");>"  );
-	 write("<img src=/res/adm/pages/bookmarkmenu/pix.gif height=25 width="+20*(depth)+" border=0></a>");
+	 write("<img src=\"/res/adm/pages/bookmarkmenu/pix.gif\" height=\"25\" width=\""+20*(depth)+"\" border=\"0\"></a>");
 	 write("<a href=JavaScript:"+objPath+".folderClick();>"         );
-	 write("<img src="+this.icon+" border=0></a>"                   );
+	 write("<img src=\""+this.icon+"\" border=\"0\"></a>"           );
 	 write( this.name+"</td></tr>"                                  );
       }
 //      with (bendebugger.document) {
@@ -423,10 +422,10 @@
    with (parent.frames[4].document) {
       write("<tr><td><a href='javaScript:"+objPath+".linkClick("+pstn+");'" );
       write(" onmouseover='"+objPath+".p["+pstn+"].linkHover("+image_num+");'>");
-      write("<img src=/res/adm/pages/bookmarkmenu/pix.gif height=25 width="+(20*(depth)+15)+" border=0></a>");
+      write("<img src=\"/res/adm/pages/bookmarkmenu/pix.gif\" height=\"25\" width=\""+(20*(depth)+15)+"\" border=\"0\"></a>");
       write("<a href='javaScript:"+objPath+".linkClick("+pstn+");'");
       write(" onmouseover='"+objPath+".p["+pstn+"].linkHover("+image_num+");'>");
-      write("<img src=/res/adm/pages/bookmarkmenu/link.gif border=0></a>");
+      write("<img src=\"/res/adm/pages/bookmarkmenu/link.gif\" border=\"0\"></a>");
       write("<a href='javaScript:"+objPath+".p["+pstn+"].linkGoto();'" );
       write(" onmouseover='"+objPath+".p["+pstn+"].linkHover("+image_num+");'>");
       write(this.name+"</td></tr>"                                );
@@ -582,18 +581,18 @@
    with(add_link.document) {
       open();
       clear();
-      write("<html><body bgcolor='#bbbbbb'><center>"              );
+      write("<html><body bgcolor=\"#BBBBBB\"><center>"                );
       write("<form method='post' name='newLink' onSubmit='javascript:opener.addNewLink(newLink.title.value,newLink.address.value);'>\n");
-      write("<table width=340 height=150 bgcolor='#ffffff' "      );
-      write("align=center><tr><td>Link Name:<br>"                 );
-      write("<input type='text' name='title' size=45"             );
-      write("value='"+clienttitle+"'><br>Address:<br>"            );
-      write("<input type='text' name='address' size='45' "        );
+      write("<table width=\"340\" height=\"150\" bgcolor=\"#FFFFFF\" ");
+      write("align=\"center\"><tr><td>Link Name:<br />"               );
+      write("<input type='text' name='title' size=\"45\""             );
+      write("value=\""+clienttitle+"\"><br />Address:<br />"          );
+      write("<input type=\"text\" name=\"address\" size=\"45\" "      );
       write("value='"+clienthref+"'>");
-      write("<br><center><input type='submit' value='Save'> "     );
-      write("<input type='button' value='Close' title='Without save' "       );
-      write("onclick='javascript:window.close();'></center></td>" );
-      write("</tr></table></form></center></body></html>"         );
+      write("<br /><center><input type=\"submit\" value=\"Save\"> "   );
+      write("<input type=\"button\" value=\"Close\" title=\"Close without saving\" ");
+      write("onclick=\"javascript:window.close();\"></center></td>"   );
+      write("</tr></table></form></center></body></html>"             );
       close();
    }
 }
@@ -604,15 +603,15 @@
    with(add_link.document) {
       open();
       clear();
-      write("<html><body bgcolor='#bbbbbb'><center>"              );
-      write("<form method='post' name='newLink' onSubmit='javascript:opener.addNewFolder(newLink.title.value);'>\n");
-      write("<table width=340 height=150 bgcolor='#ffffff' "      );
-      write("align=center><tr><td>Folder Name:<br>"               );
-      write("<input type='text' name='title' size=45 value=''>"   );
-      write("<br><center><input type='submit' value='Save'>"      );
-      write("<input type='button' value='Cancel' "                );
-      write("onclick='javascript:window.close();'></center></td>" );
-      write("</tr></table></form></center></body></html>"         );
+      write("<html><body bgcolor=\"#BBBBBB\"><center>"                   );
+      write("<form method=\"post\" name=\"newLink\" onSubmit=\"javascript:opener.addNewFolder(newLink.title.value);\">\n");
+      write("<table width=\"340\" height=\"150\" bgcolor=\"#FFFFFF\" "   );
+      write("align=\"center\"><tr><td>Folder Name:<br />"                );
+      write("<input type=\"text\" name=\"title\" size=\"45\" value=\"\">");
+      write("<br /><center><input type=\"submit\" value=\"Save\">"       );
+      write("<input type=\"button\" value=\"Cancel\" "                   );
+      write("onclick=\"javascript:window.close();\"></center></td>"      );
+      write("</tr></table></form></center></body></html>"                );
       close();
    }
 }