Project

General

Profile

« Previous | Next » 

Revision 5311

Added by daigle over 14 years ago

Merge 1.9.2 changes back into the trunk

View differences:

header.jsp
26 26
%>
27 27

  
28 28
<%
29
	String esaHome = SkinPropertyService.getProperty("esa","registryurl");
29
	String esaHome = SkinPropertyService.getProperty("esa", "registryurl");
30 30
%>
31 31

  
32 32
<%@ include file="../../common/common-settings.jsp"%>
......
89 89
        	httpRequest.setRequestHeader("Content-Type", "text/xml");
90 90
        	var stringToSend = "action=getloggedinuserinfo";
91 91
        	httpRequest.onreadystatechange=function() {
92
                	if (httpRequest.readyState==4) {
93
                        	var response = httpRequest.responseText;
94
                        	var login_block = document.getElementById('login_block');
95
                        	var submission_block = document.getElementById('submission_block');
96
                        	var userSearch = document.getElementById('userSearch');
97
                        	var modSearch = document.getElementById('modSearch');
98
				login_block.innerHTML="";
99
				submission_block.innerHTML="";
100
                        	if(response.indexOf("public") > 0){
101
					login_block.innerHTML = "<a href='<%=CGI_URL%>/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>";
102
					submission_block.innerHTML = "<a href='<%=CGI_URL%>/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>";
103
                        	} else {
104
					login_block.innerHTML = "<a href='<%=CGI_URL%>/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>";
92
                if (httpRequest.readyState==4) {
93
					var response = httpRequest.responseText;
94
					var login_block = document.getElementById('login_block');
95
					var submission_block = document.getElementById('submission_block');
96
					var userSearch = document.getElementById('userSearch');
97
					var modSearch = document.getElementById('modSearch');
98
					login_block.innerHTML="";
99
					submission_block.innerHTML="";
100
					if(response.indexOf("public") > 0) {
101
						login_block.innerHTML = "<a href='<%=CGI_URL%>/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>";
102
						submission_block.innerHTML = "<a href='<%=CGI_URL%>/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>";
103
					} else {
104
						login_block.innerHTML = "<a href='<%=CGI_URL%>/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>";
105 105
					
106
					if(response.indexOf("isModerator") > 0){
107
						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>";
108
                                        } else {
109
						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>";
110
                                        }
111
	                	}
112
                	}
113
		}
114
        	httpRequest.send(stringToSend);
115
     	 } catch (e) {
106
						if(response.indexOf("isModerator") > 0) {
107
							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>";
108
						} else {
109
							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>";
110
						}
111
					}
112
				}
113
			}
114
			httpRequest.send(stringToSend);
115
		} catch (e) {
116 116
        	alert("caught an exception: " + e
117 117
                 + " \nresponse was: \n" + httpRequest.responseText);
118
	 }     
118
	}     
119 119
}
120 120

  
121 121
//-->

Also available in: Unified diff