Project

General

Profile

« Previous | Next » 

Revision 2832

Added by sgarg over 18 years ago

Modified the header to work with the new changes from Callie

View differences:

lib/style/skins/esa/header.html
2 2
<head>
3 3
<title>header.gif</title>
4 4
<meta http-equiv="Content-Type" content="text/html;">
5
<!--Fireworks MX 2004 Dreamweaver MX 2004 target.  Created Fri Dec 09 08:24:19 GMT-0800 (Pacific Standard Time) 2005-->
6 5
<!--Please note that in order for the "roll overs" to exactly swap they need to be created in conjunction with the slices. Slices must be in place when exporting the individual *.gif file to be used with the swap image behavior. I found it helpful to use the exact slice that was used for creating the top "img" file. This was done by moving the slice down, changing the orginal img (such as the text color), then moving the slice back up before exporting the individual *.gif type of file to be used as a swap image file. It might be necessary after exporting the individual swap image file to return the top img file (such as changing the text color back) before exporting the final html file. Export with File name: HTML and Images, Save as type: HTML and Images, HTML: Export HTML File, Slices: Export Slices. I included areas withou slices and Put images in a subfolder titled ESAHeaderSlices. Before the final export the swap image *.gif files were placed in the ESAHeaderSlices/RollOvers directory.
7 6
cjbwdish -->
8 7
<script language="JavaScript">
......
28 27
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
29 28
}
30 29

  
30
function loginStatus(){
31
 	var httpRequest=false;
32
        /*@cc_on @*/
33
        /*@if (@_jscript_version >= 5)
34
        try {
35
            httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
36
        } catch (e) {
37
            try {
38
                httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
39
            } catch (E) {
40
                httpRequest = false;
41
            }
42
        }
43
        @end @*/
44

  
45
        try{
46
        	if (!httpRequest && typeof XMLHttpRequest!='undefined') {
47
           		httpRequest = new XMLHttpRequest();
48
        	}
49

  
50
        	if(!httpRequest){
51
                	exit(0);
52
        	}
53

  
54
        	httpRequest.open("POST", "@servlet-path@?action=getloggedinuserinfo", true);
55
        	httpRequest.setRequestHeader("Content-Type", "text/xml");
56
        	var stringToSend = "action=getloggedinuserinfo";
57
        	httpRequest.onreadystatechange=function() {
58
                	if (httpRequest.readyState==4) {
59
                        	var response = httpRequest.responseText;
60
                        	var login_block = document.getElementById('login_block');
61
                        	var submission_block = document.getElementById('submission_block');
62
                        	var userSearch = document.getElementById('userSearch');
63
                        	var modSearch = document.getElementById('modSearch');
64
				login_block.innerHTML="";
65
				submission_block.innerHTML="";
66
                        	if(response.indexOf("public") > 0){
67
					login_block.innerHTML = "<a href='@cgi-prefix@/register-dataset.cgi?cfg=esa&stage=loginform' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"Login\",\"\",\"ESAHeaderSlices/RollOvers/LoginR.gif\",1);'><img name='Login' src='ESAHeaderSlices/Login.gif' width='62' height='18' border='0' title='Login' alt='Login'></a>";
68
					submission_block.innerHTML = "<a href='@cgi-prefix@/register-dataset.cgi?cfg=esa&stage=loginform&submission=true' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"MySubmissions\",\"\",\"ESAHeaderSlices/RollOvers/MySubmissionsR.gif\",1);'><img name='MySubmissions' src='ESAHeaderSlices/MySubmissions.gif' width='114' height='18' border='0' title='My Submissions - Before you can view your submissions you must login.' alt='My Submissions'></a>";
69
                        	} else {
70
					login_block.innerHTML = "<a href='@cgi-prefix@/register-dataset.cgi?cfg=esa&stage=logout' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"Logout\",\"\",\"ESAHeaderSlices/RollOvers/LogoutR.gif\",1);'><img name='Logout' src='ESAHeaderSlices/Logout.gif' width='62' height='18' border='0' title ='Logout' alt='Logout'></a>";
71
					
72
					if(response.indexOf("isModerator") > 0){
73
						submission_block.innerHTML = "<a onClick='modSearch.submit()' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"ViewSubmissions\",\"\",\"ESAHeaderSlices/RollOvers/ViewSubmissionsR.gif\",1);'><img name='ViewSubmissions' src='ESAHeaderSlices/ViewSubmissions.gif' width='114' height='18' border='0' title='View Submissions' alt='View Submissions'></a>";
74
                                        } else {
75
						submission_block.innerHTML = "<a onClick='userSearch.submit()' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"MySubmissions\",\"\",\"ESAHeaderSlices/RollOvers/MySubmissionsR.gif\",1);'><img name='MySubmissions' src='ESAHeaderSlices/MySubmissions.gif' width='114' height='18' border='0' title='My Submissions - Before you can view your submissions you must login.' alt='My Submissions'></a>";
76
                                        }
77
	                	}
78
                	}
79
		}
80
        	httpRequest.send(stringToSend);
81
     	 } catch (e) {
82
        	alert("caught an exception: " + e
83
                 + " \nresponse was: \n" + httpRequest.responseText);
84
	 }     
85
}
86

  
31 87
//-->
32 88
</script>
33 89
</head>
34
<body bgcolor="#ffffff" onLoad="MM_preloadImages('ESAHeaderSlices/RollOvers/ESARegistryR.gif','ESAHeaderSlices/RollOvers/RegisterDataR.gif','ESAHeaderSlices/RollOvers/SearchForDataR.gif','ESAHeaderSlices/RollOvers/MySubmissionsR.gif','ESAHeaderSlices/RollOvers/LogoutR.gif');">
90
<body bgcolor="#ffffff" onLoad="MM_preloadImages('ESAHeaderSlices/RollOvers/ESARegistryR.gif','ESAHeaderSlices/RollOvers/RegisterDataR.gif','ESAHeaderSlices/RollOvers/SearchForDataR.gif','ESAHeaderSlices/RollOvers/MySubmissionsR.gif','ESAHeaderSlices/RollOvers/LogoutR.gif');loginStatus();">
35 91
<table border="0" cellpadding="0" cellspacing="0" width="703">
36 92
<!-- fwtable fwsrc="ESAHeaderDocsb.png" fwbase="header.gif" fwstyle="Dreamweaver" fwdocid = "1407099340" fwnested="0" -->
37 93
  <tr>
......
68 124
   <td rowspan="2"><img name="header_r4_c3" src="ESAHeaderSlices/header_r4_c3.gif" width="7" height="47" border="0" alt=""></td>
69 125
   <td><a href="http://data.esa.org" target="_top" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('ESARegistry','','ESAHeaderSlices/RollOvers/ESARegistryR.gif',1);"><img name="ESARegistry" src="ESAHeaderSlices/ESARegistry.gif" width="99" height="18" border="0" title="ESA Registry" alt="ESA Registry"></a></td>
70 126
   <td colspan="2"><a href="@cgi-prefix@/register-dataset.cgi?cfg=esa" target="_top" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('RegisterData','','ESAHeaderSlices/RollOvers/RegisterDataR.gif',1);"><img name="RegisterData" src="ESAHeaderSlices/RegisterData.gif" width="97" height="18" border="0" title="Register Data" alt="Register Data"></a></td>
71
   <td><a href="http://data.esa.org#search" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('SearchForData','','ESAHeaderSlices/RollOvers/SearchForDataR.gif',1);"><img name="SearchForData" src="ESAHeaderSlices/SearchForData.gif" width="105" height="18" border="0" title="Search for Data" alt="Search for Data"></a></td>
72
   <td colspan="3"><a href="#" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('MySubmissions','','ESAHeaderSlices/RollOvers/MySubmissionsR.gif',1);"><img name="MySubmissions" src="ESAHeaderSlices/MySubmissions.gif" width="114" height="18" border="0" title="My Submissions - Before you can view your submissions you must login." alt="My Submissions"></a></td>
73
   <td><a href="#" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('Login','','ESAHeaderSlices/RollOvers/LoginR.gif',1);"><img name="Login" src="ESAHeaderSlices/Login.gif" width="62" height="18" border="0" title="Login" alt="Login"></a></td>
127
   <td><a href="http://data.esa.org#search" target="_top" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('SearchForData','','ESAHeaderSlices/RollOvers/SearchForDataR.gif',1);"><img name="SearchForData" src="ESAHeaderSlices/SearchForData.gif" width="105" height="18" border="0" title="Search for Data" alt="Search for Data"></a></td>
128
   <td colspan="3"><div style="cursor:pointer;cursor: hand;" id="submission_block"><a href="#" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('MySubmissions','','ESAHeaderSlices/RollOvers/MySubmissionsR.gif',1);"><img name="MySubmissions" src="ESAHeaderSlices/MySubmissions.gif" width="114" height="18" border="0" title="My Submissions - Before you can view your submissions you must login." alt="My Submissions"></a></div></td>
129
   <td><div id="login_block"><a href="@cgi-prefix@/register-dataset.cgi?cfg=esa&stage=loginform" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('Login','','ESAHeaderSlices/RollOvers/LoginR.gif',1);"><img name="Login" src="ESAHeaderSlices/Login.gif" width="62" height="18" border="0" title="Login" alt="Login"></a></div></td>
74 130
   <td rowspan="2"><img name="header_r4_c12" src="ESAHeaderSlices/header_r4_c12.gif" width="57" height="47" border="0" alt=""></td>
75 131
   <td><img src="ESAHeaderSlices/spacer.gif" width="1" height="18" border="0" alt=""></td>
76 132
  </tr>
......
79 135
   <td><img src="ESAHeaderSlices/spacer.gif" width="1" height="29" border="0" alt=""></td>
80 136
  </tr>
81 137
</table>
138
<form id="modSearch" name="modSearch" action="@servlet-path@" method="post" target="_top">
139
       <input type="hidden" name="action" value="squery"/>
140
       <input type="hidden" name="qformat" value="esa"/>
141
       <input type="hidden" name="enableediting" value="true"/>
142
       <input type="hidden" name="query" value="<pathquery><querytitle>Moderator-Search</querytitle><returndoctype>eml://ecoinformatics.org/eml-2.0.1</returndoctype><returndoctype>eml://ecoinformatics.org/eml-2.0.0</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype><returndoctype>-//NCEAS//resource//EN</returndoctype><returndoctype>-//NCEAS//eml-dataset//EN</returndoctype><returnfield>originator/individualName/surName</returnfield><returnfield>originator/individualName/givenName</returnfield><returnfield>creator/individualName/surName</returnfield><returnfield>creator/individualName/givenName</returnfield><returnfield>originator/organizationName</returnfield><returnfield>creator/organizationName</returnfield><returnfield>dataset/title</returnfield><returnfield>keyword</returnfield><querygroup operator='INTERSECT'><queryterm searchmode='not-contains' casesensitive='false'><value>public</value><pathexpr>dataset/access/allow/principal</pathexpr></queryterm><queryterm searchmode='not-contains' casesensitive='false'><value>Revision Requested</value><pathexpr>additionalMetadata/moderatorComment</pathexpr></queryterm></querygroup></pathquery>"/>
143
</form>
144
<form id="userSearch" name="userSearch" action="@servlet-path@" method="post" target="_top">
145
       <input type="hidden" name="action" value="squery"/>
146
       <input type="hidden" name="qformat" value="esa"/>
147
       <input type="hidden" name="enableediting" value="true"/>
148
       <input type="hidden" name="query" value="<pathquery><querytitle>Moderator-Search</querytitle><returndoctype>eml://ecoinformatics.org/eml-2.0.1</returndoctype><returndoctype>eml://ecoinformatics.org/eml-2.0.0</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype><returndoctype>-//NCEAS//resource//EN</returndoctype><returndoctype>-//NCEAS//eml-dataset//EN</returndoctype><returnfield>originator/individualName/surName</returnfield><returnfield>originator/individualName/givenName</returnfield><returnfield>creator/individualName/surName</returnfield><returnfield>creator/individualName/givenName</returnfield><returnfield>originator/organizationName</returnfield><returnfield>creator/organizationName</returnfield><returnfield>dataset/title</returnfield><returnfield>keyword</returnfield><querygroup operator='INTERSECT'><queryterm searchmode='not-contains' casesensitive='false'><value>public</value><pathexpr>dataset/access/allow/principal</pathexpr></queryterm></querygroup></pathquery>"/>
149
</form>
82 150
</body>
83 151
</html>

Also available in: Unified diff