Skip to content

Instantly share code, notes, and snippets.

@Benury
Benury / log.js
Created April 10, 2018 07:36
ajax代码片段
$.ajax({
url: self.serviceUrl.GET_LOG_LIST,
type: "get",
dataType: "json",
timeout: 60000,
data: dataJson,
cache: false,
beforeSend:function(){
centerPanel = new FloatDialog({
"html": "正在加载日志数据,请稍候..."
@Benury
Benury / loginout.js
Created April 10, 2018 07:18
ajax start complete 在ajax请求前和请求完成后做一些处理, 比如loading,过滤路径
jQuery(document).ajaxStart(function(event, xhr, settings){
})
// session 超时
jQuery(document).ajaxComplete(function(event, xhr, settings) {
if (xhr && xhr.getResponseHeader("Session-Status") === "Session-Out") {
if (window.location.pathname.indexOf('/login') === -1) {
//以防止登录页面重复载入
var path = window.location.pathname;
//云台控制等cs窗口不做跳转
@Benury
Benury / index.js
Created April 10, 2018 07:09
鼠标hover事件
/**
* [用户区域鼠标hover事件]
*/
"UserEntryHover": function(e) {
if (e.type === "mouseenter") {
$(this).find(".dropdown-list").fadeIn(100);
} else if (e.type === "mouseleave") {
$(this).find(".dropdown-list").fadeOut(100);
}
},
@Benury
Benury / 遮挡问题
Created March 29, 2018 08:00
iframe解决object
<head>
<meta charset="utf-8" />
</head>
<body>
<object width="100%" type="application/x-treasure3d" HEIGHT="100%" CLASSID="CLSID:8417868f-1460-5119-b620-a4bc1f2dfcaf">3dTags</object>
<div class="dialog" style="width:500px;height:300px;position:absolute;left:300px;top:80px;z-index:9999999;overflow:hidden;">
<div style="width:100%;height:100%;left:0;top:0;position:absolute;z-index:99999;"> This box is dialog body </div>
<iframe src="transparent.html" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" style="background-color:transparent;width:100%;height:100%;position:absolute;z-index:-99;left:0;top:0;"></iframe>
</div>