提交 8d76da0c 编写于 作者: Y You Yong

modify the js

上级 677f0745
.problem {
font-size: small;
border-spacing: 1px;
border-spacing: 1px;
}
.machines {
......@@ -33,6 +33,34 @@ a.long-url {
background-color: blue;
}
.minute{
.minute {
}
.detail {
font-size: small;
border-spacing: 1px;
}
#msgObjRef {
position: absolute;
text-align: center;
border: 1px solid;
border-color: #666699;
background-color: #FFFFFF;
line-height: 22px;
z-index: 102;
}
#titleBar {
text-align: left;
color: #FFFFFF;
cursor: move;
background-color: #06C;
}
#closeBtn {
width:10px;
cursor: pointer;
background-color: #06C;
}
\ No newline at end of file
......@@ -30,53 +30,44 @@ function show(anchor) {
type : "get",
url : anchor.href,
success : function(data, textStatus) {
alertWin("Problem Detail", data, 500, 250)
alertWin("Problem Detail", data);
}
});
}
function alertWin(title, msg, w, h) {
$(document).keypress(function(e) {
if (e.which == 113) {
var lastMsgObj = document.getElementById("msgObjRef");
if (lastMsgObj != null) {
document.body.removeChild(lastMsgObj);
}
}
});
function alertWin(title, msg) {
var lastMsgObj = document.getElementById("msgObjRef");
if (lastMsgObj != null) {
document.body.removeChild(lastMsgObj);
}
var titleheight = "22px";
var bordercolor = "#666699";
var titlecolor = "#FFFFFF";
var titlebgcolor = "#06C";
var bgcolor = "#FFFFFF";
var w = 500; // default width
var h = 250; // defaylt hight
var iWidth = document.documentElement.clientWidth;
var iHeight = document.documentElement.clientHeight;
if (iHeight < 600)
iHeight = 600;
if (iWidth < 1000)
iWidth = 1000;
var top_ = 160 + document.documentElement.scrollTop
var top_ = 150 + document.documentElement.scrollTop
+ document.body.scrollTop;
/*
* if (iHeight > h) top_ = (iHeight - h) / 2 - 50 + document.body.scrollTop +
* document.documentElement.scrollTop-50;
*/
var left_ = 500 + document.documentElement.scrollLeft
+ document.body.scrollLeft;
var msgObj = document.createElement("div");
msgObj.setAttribute("id", "msgObjRef");
msgObj.style.cssText = "position:absolute;top:" + top_ + "px;left:400"
+ "px;width:auto;height:auto;text-align:center;border:1px solid "
+ bordercolor + ";background-color:" + bgcolor
+ ";padding:1px;line-height:22px;z-index:102;";
msgObj.style.cssText = "top:" + top_ + "px;left:" + left_ + "px";
document.body.appendChild(msgObj);
var table = document.createElement("table");
msgObj.appendChild(table);
table.style.cssText = "margin:0px;border:0px;padding:0px;";
table.cellSpacing = 0;
var tr = table.insertRow(-1);
var titleBar = tr.insertCell(-1);
// var titlewid = w - 20;
// titlewidth = titlewid + 'px';
titleBar.style.cssText = "height:" + titleheight
+ "px;text-align:left;padding:3px;margin:0px;color:" + titlecolor
+ ";border:1px solid " + bordercolor
+ ";cursor:move;background-color:" + titlebgcolor;
// titleBar.style.paddingLeft = "10px";
titleBar.setAttribute("id", "titleBar");
titleBar.innerHTML = title;
var moveX = 0;
var moveY = 0;
......@@ -117,8 +108,8 @@ function alertWin(title, msg, w, h) {
};
};
var closeBtn = tr.insertCell(-1);
closeBtn.style.cssText = "cursor:pointer;background-color:" + titlebgcolor;
closeBtn.innerHTML = "<span color:" + titlecolor + ";'>×</span>";
closeBtn.setAttribute("id", "closeBtn");
closeBtn.innerHTML = "×";
closeBtn.onclick = function() {
document.body.removeChild(msgObj);
};
......
......@@ -40,8 +40,8 @@
<th width="10%">Count</th>
<th width="70%">SampLinks</th>
</tr>
<c:forEach var="status" items="${statistics.value.status}">
<tr>
<c:forEach var="status" items="${statistics.value.status}" varStatus="index">
<tr class="${index.index mod 2==1 ? 'even' : 'odd'}">
<td>${status.value.status}</td>
<td>${status.value.count}</td>
<td><c:forEach var="links" items="${status.value.links}">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册