src/lib/htmshell.c 1.64

1.64 2009/09/02 22:55:39 tdreszer
Turns out OK jpg is not needed. Using 'button' tag
Index: src/lib/htmshell.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/htmshell.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -b -B -U 4 -r1.63 -r1.64
--- src/lib/htmshell.c	18 Aug 2009 21:22:15 -0000	1.63
+++ src/lib/htmshell.c	2 Sep 2009 22:55:39 -0000	1.64
@@ -200,9 +200,9 @@
 }
 
 #define WARNBOX_IN_USE
 #ifdef WARNBOX_IN_USE
-static void htmlWarnBoxSetup(FILE *f, int dirDepth)
+static void htmlWarnBoxSetup(FILE *f)
 /* Creates an invisible, empty warning box than can be filled with errors
  * and then made visible.  dirDepth is the number of levels beneath apache
  * root that caller's HTML will appear to the web client.  E.g. if writing
  * HTML from cgi-bin, dirDepth is 1; if trash/body/, 2. */
@@ -212,12 +212,8 @@
 if(htmlWarnBoxSetUpAlready)
     return;
 htmlWarnBoxSetUpAlready=TRUE;
 
-char relPath[PATH_LEN];
-relPath[0] = '\0';
-while (dirDepth-- > 0)
-    safecat(relPath, sizeof(relPath), "../");
 // NOTE: Making both IE and FF work is almost impossible.  Currently, in IE, if the message
 // is forced to the top (calling this routine after <BODY> then the box is not resizable
 // (dynamically adjusting to its contents). But if this setup is done later in the page
 // (at first warning), then IE does resize it.  Why?
@@ -230,10 +226,10 @@
 	    "<div id='warnBox' style='display:none; background-color:Beige; "
 	      "border: 3px ridge DarkRed; width:640px; padding:10px; margin:10px; "
 	      "text-align:left;'>"
 	    "<CENTER><B id='warnHead' style='color:DarkRed;'></B></CENTER><UL id='warnList'></UL>"
-	    "<CENTER><img id='warnOK' src='%simages/ok.jpg' onclick='hideWarnBox();return false;'></CENTER>"
-	    "</div></center>\");\n", relPath);
+            "<CENTER><button id='warnOK' onclick='hideWarnBox();return false;'>&nbsp;OK&nbsp;</button></CENTER>"
+            "</div></center>\");\n");
 fprintf(f,"function showWarnBox() {"
 	        "var warnBox=document.getElementById('warnBox');"
 	        "warnBox.style.display=''; warnBox.style.width='65%%';"
 	        "document.getElementById('warnHead').innerHTML='Error(s):';"
@@ -253,9 +249,9 @@
 {
 va_list argscp;
 va_copy(argscp, args);
 #ifdef WARNBOX_IN_USE
-htmlWarnBoxSetup(stdout,1); // sets up the warnBox if it hasn't already been done.
+htmlWarnBoxSetup(stdout); // sets up the warnBox if it hasn't already been done.
 char warning[512];
 vsnprintf(warning,sizeof(warning),format, args);
 // NOTE: While some internal HTML should work, a single quote (') will will screw it all up!
 if( strSwapStrs(warning, sizeof(warning),"'","&#39;") == -1) // Sheild single quotes
@@ -417,9 +413,9 @@
     fprintf(f, " BGCOLOR=\"%X\"", htmlBgColor);
 fputs(">\n",f);
 
 #ifdef WARNBOX_IN_USE
-htmlWarnBoxSetup(f, dirDepth);
+htmlWarnBoxSetup(f);
 #endif//def WARNBOX_IN_USE
 }
 
 
@@ -553,9 +549,9 @@
 else
     printf("<BODY BACKGROUND=\"%s\">\n", htmlBackground);
 
 #ifdef WARNBOX_IN_USE
-htmlWarnBoxSetup(stdout, 1);// Sets up a warning box which can be filled with errors as they occur
+htmlWarnBoxSetup(stdout);// Sets up a warning box which can be filled with errors as they occur
 #endif//def WARNBOX_IN_USE
 
 /* Call wrapper for error handling. */
 htmEmptyShell(doMiddle, method);