<apex:page id="Page" Controller="SearchMemberPageController" sidebar="false" showHeader="false" action="{!init}">
|
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
|
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
|
<style type="text/css">
|
|
</style>
|
<script>
|
function doSearchJS(){
|
blockme();
|
var searchByName = j$(escapeVfId("searchByName")).value();
|
var searchByAccount = j$(escapeVfId("searchByAccount")).value();
|
DoSearch(searchByName,searchByAccount);
|
}
|
function saveJS(){
|
blockme();
|
save();
|
}
|
//读取数据,调用父页面刷新方法
|
function refreshPage(){
|
var isError = j$(escapeVfId("isError")).value();
|
if(isError == "true"){
|
return;
|
}
|
var lineNum = j$(escapeVfId("lineNum")).value();
|
var memberId = j$(escapeVfId("memberId")).value();
|
var memberName = j$(escapeVfId("memberName")).value();
|
var memberEmail = j$(escapeVfId("memberEmail")).value();
|
window.opener.refreshPage(lineNum,memberId,memberName,memberEmail);
|
window.close();
|
}
|
function closeJS(){
|
/*window.parent.opener=null;
|
window.parent.open('', '_self', '');
|
setTimeout('window.parent.close()', 10000);*/
|
}
|
function hiddenObj(){
|
var memberType = j$(escapeVfId('Page:allData:memberType')).value();
|
if(memberType == "User"){
|
j$(escapeVfId("accountLable")).attr("style","display:none");
|
j$(escapeVfId("dataAccount")).attr("style","display:none");
|
}
|
if(memberType == "Contact"){
|
j$(escapeVfId("accountLable")).attr("style","display:block");
|
j$(escapeVfId("dataAccount")).attr("style","display:block");
|
}
|
}
|
</script>
|
<div style="width: 100%;height: 100%;">
|
<apex:outputPanel id="message1">
|
<apex:messages styleClass="editListError"/>
|
</apex:outputPanel>
|
<apex:form id="allData">
|
<apex:actionFunction action="{!SearchMember}" name="DoSearch" reRender="result" oncomplete="unblockUI();">
|
<apex:param assignTo="{!searchByName}" name="searchByName" value=""></apex:param>
|
<apex:param assignTo="{!searchByAccount}" name="searchByAccount" value=""></apex:param>
|
</apex:actionFunction>
|
<apex:actionFunction action="{!save}" name="save" reRender="allData,message1" oncomplete="unblockUI();refreshPage();closeJS();">
|
</apex:actionFunction>
|
<input type="hidden" id="isError" value="{!isError}" />
|
<input type="hidden" id="lineNum" value="{!lineNum}" />
|
<input type="hidden" id="memberId" value="{!memberId}" />
|
<input type="hidden" id="memberName" value="{!memberName}" />
|
<input type="hidden" id="memberEmail" value="{!memberEmail}" />
|
|
<table style="width: 100%;">
|
<colgroup>
|
<col style="width: 20%" />
|
<col style="width: 40%" />
|
<col style="width: 40%" />
|
</colgroup>
|
<tr>
|
<th colspan="3">
|
<apex:selectList onchange="hiddenObj()" id="memberType" value="{!memberType}" size="1">
|
<!-- <apex:selectOptions value="{!items}"></apex:selectOptions> -->
|
<apex:selectOption itemLabel="外部用户联系人" itemValue="Contact"></apex:selectOption>
|
<apex:selectOption itemLabel="奥林巴斯内部用户" itemValue="User"></apex:selectOption>
|
</apex:selectList>
|
</th>
|
</tr>
|
<tr>
|
<th style="text-align:center;"><apex:commandButton value="Search" onclick="doSearchJS();return false;" /> <apex:commandButton value="Save" onclick="saveJS();return false;"/></th>
|
|
<th id="nameLable" style="text-align:center;">Name:<input id="searchByName" type="text" value="{!searchByName}" /></th>
|
|
<th style="text-align:center;"><div id="accountLable">Account:<input id="searchByAccount" type="text" value="{!searchByAccount}" /></div></th>
|
|
</tr>
|
</table>
|
<apex:outputPanel id="result">
|
<table>
|
<colgroup>
|
<col style="width: 10%" />
|
<col style="width: 20%" />
|
<col style="width: 30%" />
|
<col style="width: 40%" />
|
</colgroup>
|
<tr>
|
<th style="text-align:center;">
|
RESULT
|
</th>
|
<th colspan="2">
|
</th>
|
</tr>
|
<tr>
|
<th></th>
|
<th>NAME</th>
|
<th>EMAIL</th>
|
<th>ACCOUNT</th>
|
<!-- <apex:outputPanel layout="none" rendered="{!IF(memberType == 'Contact', true, false)}">
|
<th>ACCOUNT</th>
|
</apex:outputPanel>
|
<apex:outputPanel layout="none" rendered="{!IF(memberType == 'User', true, false)}">
|
<th></th>
|
</apex:outputPanel> -->
|
</tr>
|
<apex:repeat value="{!lineList}" var="line">
|
<tr>
|
<td style="text-align:right;">
|
<apex:inputCheckbox id="checkbox" value="{!line.check}" />
|
</td>
|
<td><apex:outputText value="{!line.name}"></apex:outputText></td>
|
<td><apex:outputText value="{!line.email}"></apex:outputText></td>
|
<td><apex:outputText value="{!line.account}"></apex:outputText></td>
|
</tr>
|
</apex:repeat>
|
</table>
|
</apex:outputPanel>
|
</apex:form>
|
</div>
|
</apex:page>
|