You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
160 lines
5.9 KiB
160 lines
5.9 KiB
"use strict"
|
|
// 该文件中包含客户端需要处理的函数和事件
|
|
var mDebug = "0";
|
|
var mOperator = "";
|
|
var showInfo = null;
|
|
var turnPage = new turnPageClass();
|
|
var hostName = "";
|
|
|
|
var submitForm = function(){
|
|
|
|
}
|
|
|
|
var showMessagePage = function(title, content, messagePicture, width, height) {
|
|
var urlStr = "../common/jsp/MessagePage.jsp?picture=" + messagePicture + "&content=" + encodeURIComponent(content);
|
|
var name = title; //网页名称,可为空;
|
|
var iWidth = width; //弹出窗口的宽度;
|
|
var iHeight = height; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
var tmpShowInfo = window.open (urlStr,name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height="+ iHeight+",width="+iWidth+",innerHeight="+iHeight+",innerWidth=" +iWidth+",left="+iLeft+",top="+iTop,false);
|
|
tmpShowInfo.focus();
|
|
return tmpShowInfo;
|
|
}
|
|
|
|
var afterSubmit = function(flagStr, content, onsucc_name){
|
|
|
|
if(showInfo !== null && showInfo !== undefined)
|
|
showInfo.close();
|
|
|
|
if (flagStr == "Fail" )
|
|
{
|
|
// showInfo = showMessagePage("操作失败", content, "F", 550, 350);
|
|
showInfo = showMessagePage(i18nMessage("操作失败","LIS-18334"), content, "F", 550, 350);
|
|
}
|
|
else if(flagStr == "Succ")
|
|
{
|
|
// showInfo = showMessagePage("操作成功", content, "S", 550, 350);
|
|
showInfo = showMessagePage(i18nMessage("操作成功","LIS-06197"), content, "S", 550, 350);
|
|
if(onsucc_name !== null && onsucc_name !== undefined)
|
|
if(window[onsucc_name]){
|
|
window[onsucc_name]();
|
|
}
|
|
}
|
|
}
|
|
|
|
function on_succ_delete(){
|
|
onQueryESServerInfoButtonClicked(null);
|
|
}
|
|
|
|
function myOnFocus(e){
|
|
try{
|
|
if(showInfo && showInfo.focus) {
|
|
showInfo.focus();
|
|
}
|
|
}catch(ex){
|
|
showInfo = null;
|
|
}
|
|
}
|
|
|
|
|
|
function onQueryESServerInfoButtonClicked(e){
|
|
var ESServerInfoQueryInput = document.getElementById("ESServerHostNameQueryInput");
|
|
var ESServerServerIPInput = document.getElementById("ESServerServerIPInput");
|
|
var hostname = null;
|
|
var serverip = null;
|
|
if(ESServerInfoQueryInput){
|
|
hostname = ESServerInfoQueryInput.value;
|
|
}
|
|
if(ESServerServerIPInput){
|
|
serverip = ESServerServerIPInput.value;
|
|
}
|
|
|
|
var mySql = wrapSql("config.ESServerInfoInputSql", "ESServerInfoInputSql1", [hostname,serverip], "easyscan");
|
|
turnPage.queryModal(mySql, ESServerInfoGrid);
|
|
}
|
|
|
|
function onRefreshESServerInfoButtonClicked(e){
|
|
initTextBoxes();
|
|
initESServiceInfoGrid();
|
|
var tSelNo = ESServerInfoGrid.getSelNo();
|
|
var groupId;
|
|
|
|
if (tSelNo != -1) {
|
|
var groupId = 0;
|
|
try{
|
|
groupId = ESServerInfoGrid.getRowColData(tSelNo - 1, 1);
|
|
}catch(ex){
|
|
|
|
}
|
|
var groupIdInput = document.getElementById("groupIdInput");
|
|
groupIdInput.value = groupId;
|
|
}
|
|
}
|
|
|
|
function onAddButtonClicked(e){
|
|
var urlStr = "./ESServerInfoMain.jsp?ac=189&hn=" + hostName;
|
|
// var name = '提示'; //网页名称,可为空;
|
|
var name = i18nMessage('提示',"laydate-tips"); //网页名称,可为空;
|
|
var iWidth = 1024; //弹出窗口的宽度;
|
|
var iHeight = 1024; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
showInfo = window.open(urlStr, name, "status=no,toolbar=no,menubar=no,scrollbars=yes,location=no,height=" + iHeight + ",width=" + iWidth + ",innerHeight=" + iHeight + ",innerWidth=" + iWidth + ",left=" + iLeft + ",top=" + iTop, false);
|
|
|
|
showInfo.focus();
|
|
}
|
|
|
|
function onEditButtonClicked(e){
|
|
if(hostName == "") {
|
|
// afterSubmit("Fail", "您未选择任何的云服务器对象.", null);
|
|
afterSubmit("Fail", i18nMessage("您未选择任何的云服务器对象.","LIS-20110"), null);
|
|
return;
|
|
}
|
|
var urlStr = "./ESServerInfoMain.jsp?ac=392&hn=" + hostName;
|
|
// var name = '提示'; //网页名称,可为空;
|
|
var name = i18nMessage('提示',"laydate-tips"); //网页名称,可为空;
|
|
var iWidth = 1024; //弹出窗口的宽度;
|
|
var iHeight = 1024; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
showInfo = window.open(urlStr, name, "status=no,toolbar=no,menubar=no,scrollbars=yes,location=no,height=" + iHeight + ",width=" + iWidth + ",innerHeight=" + iHeight + ",innerWidth=" + iWidth + ",left=" + iLeft + ",top=" + iTop, false);
|
|
|
|
showInfo.focus();
|
|
}
|
|
|
|
function onDeleteButtonClicked(e){
|
|
//alert(hostName);
|
|
var tSelNo = ESServerInfoGrid.getSelNo();
|
|
|
|
if (tSelNo != -1) {
|
|
hostName = "";
|
|
try{
|
|
hostName = ESServerInfoGrid.getRowColData(tSelNo - 1, 1);
|
|
}catch(ex){
|
|
|
|
}
|
|
var hostNameInput = document.getElementById("HostNameInput");
|
|
hostNameInput.value = hostName;
|
|
}
|
|
var fmActionInput = document.getElementById("fmActionInput");
|
|
var fmElement = document.getElementById("fm");
|
|
fmActionInput.value = "DELETE";
|
|
//fm.submit();
|
|
fm.action = "../API/easyscan/config/ESServerInfoSave/delete";
|
|
ajaxSubmit2(document.getElementById("fm"));
|
|
}
|
|
|
|
function onGridRowSelected(e){
|
|
var tSelNo = ESServerInfoGrid.getSelNo();
|
|
if (tSelNo != -1) {
|
|
hostName = "";
|
|
try{
|
|
hostName = ESServerInfoGrid.getRowColData(tSelNo - 1, 1);
|
|
}catch(ex){
|
|
|
|
}
|
|
var HostNameInput = document.getElementById("HostNameInput");
|
|
HostNameInput.value = hostName;
|
|
}
|
|
}
|
|
|