增加js
This commit is contained in:
parent
b5713be3a7
commit
a96e93a461
190
WebContent/Frame/page/js/as_debug_message.js
Normal file
190
WebContent/Frame/page/js/as_debug_message.js
Normal file
@ -0,0 +1,190 @@
|
||||
var AsDebug = {
|
||||
URL:"",
|
||||
toggleWindow:function() {
|
||||
var d = top.dialog.get('as-debug-dialog');
|
||||
if (d) {
|
||||
d.remove();
|
||||
} else {
|
||||
this.showWindow();
|
||||
}
|
||||
},
|
||||
showWindow:function() {
|
||||
var d = top.dialog({
|
||||
id: 'as-debug-dialog',
|
||||
title: '调试工具栏['+AsDebug.getURL()+"]",
|
||||
onclose: function () {
|
||||
AsDebug.removeWindow();
|
||||
},
|
||||
quickClose: true
|
||||
});
|
||||
var html="<table><tr><td>";
|
||||
html+="<span class='pageversion' ondblclick='javascript:AsDebug.displayDwInfo();'> DWINFO </span>";
|
||||
html+="<span class='pageversion' ondblclick='javascript:AsDebug.openControlCenter();'> CTRLCT </span>";
|
||||
html+="<span class='pageversion' ondblclick='javascript:AsDebug.displayBodyHTML();'> PGSRC </span>";
|
||||
html+="<span class='pageversion' ondblclick='javascript:AsDebug.viewCompDetail();'> COMP </span>";
|
||||
html+="<span class='pageversion' ondblclick='javascript:AsDebug.displayURLnPara();'> REQ </span>";
|
||||
html+="<span class='pageversion' ondblclick='javascript:AsDebug.reloadCacheAll();'> ReloadCacheAll </span>";
|
||||
html+="</td></tr><tr><td>";
|
||||
//html+="<span class='pageversion' ondblclick='javascript:AsDebug.displayPageName();'>"+AsDebug.getPage()+" </span>";
|
||||
html+="<span class='pageversion'>"+AsDebug.getPage()+" </span>";
|
||||
//html+="<span class='pageversion' ondblclick='javascript:AsDebug.displayURL();'>【"+AsDebug.getURL()+"】</span>";
|
||||
html+="<span class='pageversion'>【"+AsDebug.getURL()+"】</span>";
|
||||
html+="</td></tr></table>";
|
||||
d.content(html);
|
||||
d.showModal();
|
||||
|
||||
},
|
||||
alert:function(title,message,width,height,mask,time,okButton,openCallback,closeCallback,flag) {
|
||||
this.showMessage(title,message,width,height,mask,time,okButton,openCallback,closeCallback,flag);
|
||||
},
|
||||
showMessage:function(title,message,width,height,mask,time,okButton,openCallback,closeCallback,flag){
|
||||
var d;
|
||||
if(typeof(mask) == "undefined") mask = true;
|
||||
if(!okButton){
|
||||
d = top.dialog({
|
||||
id: 'dialog-message',
|
||||
width:width?width:"350px",
|
||||
height:height?height:"50px",
|
||||
skin:"ui-popup-show",
|
||||
title: "" == title?"提示":title,
|
||||
okValue: '确定',
|
||||
ok:function(){
|
||||
AsDebug.removeMessage();
|
||||
},
|
||||
onclose: function(){
|
||||
AsDebug.removeMessage();
|
||||
},
|
||||
onshow:openCallback,
|
||||
onremove:closeCallback,
|
||||
cancel:false,
|
||||
quickClose: mask?false:true
|
||||
});
|
||||
}else{
|
||||
d = top.dialog({
|
||||
id: 'dialog-message',
|
||||
width:width?width:"350px",
|
||||
height:height?height:"40px",
|
||||
skin:"ui-popup-show",
|
||||
title: "" == title?"提示":title,
|
||||
onclose: function(){
|
||||
AsDebug.removeMessage();
|
||||
},
|
||||
onshow:openCallback,
|
||||
onremove:closeCallback,
|
||||
cancel:false,
|
||||
quickClose: mask?false:true
|
||||
});
|
||||
}
|
||||
var mesDiv = "<div style='width:100%;height:100%;display:table;'><h3 id='messageContent' style='display:table-cell;vertical-align:middle;text-align:center;'>"+message+"</h3></div>";
|
||||
d.content(mesDiv);
|
||||
d.showModal();
|
||||
if(time){
|
||||
setTimeout(function(){
|
||||
AsDebug.removeMessage();
|
||||
},time);
|
||||
}
|
||||
},
|
||||
removeMessage:function() {
|
||||
/*var d = window.top.dialog.get('dialog-message');
|
||||
if (d) d.remove();*/
|
||||
},
|
||||
|
||||
removeWindow:function() {
|
||||
var d = top.dialog.get('as-debug-dialog');
|
||||
if (d) d.remove();
|
||||
},
|
||||
getURL:function() {
|
||||
if (typeof(AsDebug_URL) != "undefined") this.URL = AsDebug_URL;
|
||||
if (this.URL != "") return this.URL.substring(this.URL.lastIndexOf(sWebRootPath)+sWebRootPath.length);
|
||||
return document.URL;
|
||||
},
|
||||
getPage:function() {
|
||||
if (typeof(AsDebug_URL) != "undefined") this.URL = AsDebug_URL;
|
||||
if (this.URL != "") return this.URL.substring(this.URL.lastIndexOf("/")+1);
|
||||
return document.URL;
|
||||
},
|
||||
reloadAREService:function(serviceId){
|
||||
if (typeof(serviceId) == "undefined" || serviceId.length == 0) serviceId = "JBO";
|
||||
var sReturn = RunJavaMethod("com.amarsoft.app.util.ReloadServiceAction","reloadService","ServiceId="+serviceId);
|
||||
if(sReturn=="SUCCESS") alert(getMessageText("AWES0017")); // 重载ARE服务成功!
|
||||
else alert(getMessageText("AWES0018")); // 重载ARE服务失败!
|
||||
},
|
||||
reloadCacheAll:function(){
|
||||
var sReturn = RunJavaMethod("com.amarsoft.app.util.ReloadCacheConfigAction","reloadCacheAll","");
|
||||
if(sReturn=="SUCCESS") alert(getMessageText("AWES0015")); // 重载参数缓存成功!
|
||||
else alert(getMessageText("AWES0016")); // 重载参数缓存失败!
|
||||
},
|
||||
reloadCache:function(CacheType){
|
||||
var sReturn = RunJavaMethod("com.amarsoft.app.util.ReloadCacheConfigAction","reloadCache","ConfigName="+CacheType);
|
||||
if(sReturn=="SUCCESS") alert(getMessageText("AWES0019")); // 刷新参数缓存成功!
|
||||
else alert(getMessageText("AWES0020")); // 刷新参数缓存失败!
|
||||
},
|
||||
reloadFixSkins:function(){
|
||||
var sReturn = AsControl.RunJsp("/AppConfig/ControlCenter/ReloadSkin.jsp","ReloadType=FixSkins");
|
||||
if(sReturn=="SUCCESS") alert(getMessageText("AWES0021")); // 重载定制皮肤成功!
|
||||
else alert(getMessageText("AWES0022")); // 重载定制皮肤失败!
|
||||
},
|
||||
reloadConfigFile:function(){
|
||||
var sReturn = AsControl.RunJsp("/AppConfig/ControlCenter/ClearConfigFileCache.jsp","","");
|
||||
if(sReturn=="SUCCESS") alert(getMessageText("AWES0023")); // 重载配置文件成功!
|
||||
else alert(getMessageText("AWES0024")); // 重载配置文件失败!
|
||||
},
|
||||
openControlCenter:function() {
|
||||
this.removeWindow();
|
||||
AsControl.OpenPage("/AppConfig/ControlCenter/ControlCenterTab.jsp","","");
|
||||
},
|
||||
displayHTML:function(oBody) {
|
||||
var d = dialog({
|
||||
height:400,
|
||||
width:800,
|
||||
title: '页面运行代码['+AsDebug.getURL()+"]",
|
||||
content: '<textarea id=\"testSource\" style=\"width: 100%; height: 100%;\"></textarea>',
|
||||
onshow: function () {
|
||||
$("#testSource").text(oBody.ownerDocument.documentElement.innerHTML);
|
||||
},
|
||||
quickClose: true
|
||||
});
|
||||
d.showModal();
|
||||
},
|
||||
displayBodyHTML:function() {
|
||||
this.removeWindow();
|
||||
this.displayHTML(document.body);
|
||||
},
|
||||
viewCompDetail:function() {
|
||||
this.removeWindow();
|
||||
AsControl.OpenPage("/Frame/page/debug/tools/CompDetail.jsp","ToShowClientID="+sCompClientID,"");
|
||||
},
|
||||
displayDwInfo:function() {
|
||||
this.removeWindow();
|
||||
try{
|
||||
var sUrl = "/Frame/page/dw/DisplayDWInfo.jsp";
|
||||
if(!window.WindowType) sUrl = "/Frame/page/ow/DisplayOWInfo.jsp";
|
||||
window.open(sWebRootPath + sUrl+ "?dono="+DisplayDONO+"&url="+this.getURL(),"","status:no,resizable:yes,scrollbars=yes,height:768,width:1024");
|
||||
}catch(e){
|
||||
alert("No DWInfo");
|
||||
}
|
||||
},
|
||||
displayURL:function displayURL() {
|
||||
prompt("URLName",this.getURL());
|
||||
},
|
||||
displayPageName:function() {
|
||||
prompt("PageName",this.getPage());
|
||||
},
|
||||
displayURLnPara:function() {
|
||||
prompt("URL",document.URL);
|
||||
},
|
||||
showOnlineUserList:function(){
|
||||
OpenPage("/AppConfig/ControlCenter/OnlineUserList.jsp?rand="+randomNumber());
|
||||
},
|
||||
editDW:function(){
|
||||
if(typeof(DisplayDONO)=="undefined" || DisplayDONO.length == 0){
|
||||
alert("No DWInfo");
|
||||
return;
|
||||
}
|
||||
if(typeof(WindowType) !="undefined" && WindowType.length != 0){
|
||||
AsControl.OpenNewWin("/AppConfig/PageMode/DWConfig/DataObjectStrip.jsp","DONO="+DisplayDONO+"&RightType=All");
|
||||
}else{
|
||||
AsControl.OpenNewWin("/AppConfig/PageMode/DWConfig/ObjectModelStrip.jsp","DONO="+DisplayDONO+"&RightType=All");
|
||||
}
|
||||
}
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user