优化锚点块得大小和鼠标显示
This commit is contained in:
parent
a449335810
commit
d792f7e9a0
|
|
@ -268,7 +268,16 @@ a, abbr, address, b, blockquote, body, caption, cite, code, dd, del, dfn, div, d
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.main_tool table td select { padding:3px; border:1px solid #ddd; padding-right:10px; }
|
.main_tool table td select { padding:3px; border:1px solid #ddd; padding-right:10px; }
|
||||||
.main_tool table td .maodian { float:left; padding:5px; margin-right:10px; cursor:pointer; width:60px;border:1px solid #ddd; text-align:center; opacity:0.3; }
|
.main_tool table td .maodian {
|
||||||
|
float: left;
|
||||||
|
padding: 5px;
|
||||||
|
margin-right: 10px;
|
||||||
|
cursor: move;
|
||||||
|
width: 200px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
text-align: center;
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
.main_tool table td .maodian_hover {
|
.main_tool table td .maodian_hover {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|
|
||||||
14
js/index.js
14
js/index.js
|
|
@ -51,7 +51,7 @@ function SetMao(obj, index) {
|
||||||
}
|
}
|
||||||
$(obj).attr("class", "maodian_hover");
|
$(obj).attr("class", "maodian_hover");
|
||||||
|
|
||||||
$(".main_papermain").append("<div class='main_tabletop' style='width:50px;height:50px;" + style + "' id='draggable_" + index + "'>" + $(obj).html() + "</div>");
|
$(".main_papermain").append("<div class='main_tabletop' style='cursor: move;width:90px;height:90px;" + style + "' id='draggable_" + index + "'>" + $(obj).html() + "</div>");
|
||||||
|
|
||||||
|
|
||||||
$("#draggable_" + index).draggable({ containment: ".main_papermain" });
|
$("#draggable_" + index).draggable({ containment: ".main_papermain" });
|
||||||
|
|
@ -77,7 +77,7 @@ function SetXuehao(obj) {
|
||||||
}
|
}
|
||||||
html += "</table>";
|
html += "</table>";
|
||||||
|
|
||||||
$(".main_papermain").append("<div id=\"xuehaoTable\" listNum='" + num + "' class='main_tabletop' style='width:300px; height:200px'>" + html + "</div>");
|
$(".main_papermain").append("<div id=\"xuehaoTable\" listNum='" + num + "' class='main_tabletop' style='width:300px; height:200px;cursor: move;'>" + html + "</div>");
|
||||||
$("#xuehaoTable").draggable({ containment: ".main_papermain" });
|
$("#xuehaoTable").draggable({ containment: ".main_papermain" });
|
||||||
$("#xuehaoTable").resizable({ containment: ".main_papermain", handles: 'all' });//设置缩放
|
$("#xuehaoTable").resizable({ containment: ".main_papermain", handles: 'all' });//设置缩放
|
||||||
}
|
}
|
||||||
|
|
@ -162,7 +162,7 @@ function SetKeguanTi() {
|
||||||
questionHtml = "判断";
|
questionHtml = "判断";
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".main_papermain").append("<div id=\"keguan_" + tihao + "\" class='main_tabletop keguanti' questiontype='" + questiontype + "' tihaovalue='" + tihao + "' startnum='" + BigTihao + "" + startnum + "' endNum='" + BigTihao + "" + endnum + "' selectNum='" + selectNum + "' listtype='" + listtype + "' score='" + score + "' style='width:200px;background:none; left:100px; top:" + (100 + $(document).scrollTop()) + "px; height:140px'><div style=\" float:left; width:auto; text-align:center; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">" + tihaoM + "</div>" + html + "</div>");
|
$(".main_papermain").append("<div id=\"keguan_" + tihao + "\" class='main_tabletop keguanti' questiontype='" + questiontype + "' tihaovalue='" + tihao + "' startnum='" + BigTihao + "" + startnum + "' endNum='" + BigTihao + "" + endnum + "' selectNum='" + selectNum + "' listtype='" + listtype + "' score='" + score + "' style='cursor: move;width:200px;background:none; left:100px; top:" + (100 + $(document).scrollTop()) + "px; height:140px'><div style=\" float:left; width:auto; text-align:center; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">" + tihaoM + "</div>" + html + "</div>");
|
||||||
$("#keguan_" + tihao).draggable({ containment: ".main_papermain" });
|
$("#keguan_" + tihao).draggable({ containment: ".main_papermain" });
|
||||||
$("#keguan_" + tihao).resizable({ containment: ".main_papermain", handles: 'all' });//设置缩放
|
$("#keguan_" + tihao).resizable({ containment: ".main_papermain", handles: 'all' });//设置缩放
|
||||||
var listtypeText = listtype == 0 ? "横向" : "竖向";
|
var listtypeText = listtype == 0 ? "横向" : "竖向";
|
||||||
|
|
@ -210,7 +210,7 @@ function SetZhuguanTi() {
|
||||||
var lineWh = "width:200px;height:90px;";
|
var lineWh = "width:200px;height:90px;";
|
||||||
lineWhTx = "填空"
|
lineWhTx = "填空"
|
||||||
}
|
}
|
||||||
$(".main_papermain").append("<div id=\"keguan_" + zhuguan_tihao + "\" class='main_tabletop zhuguanti' questiontype_zg='" + questiontype_zg + "' tihaovalue='" + zhuguan_tihao + "' zhuguan_xiaoti='" + zhuguan_xiaoti + "' score='" + score + "' scoretype='" + scoretype + "' style='" + lineWh + ";background:none; left:100px; top:" + (100 + $(document).scrollTop()) + "px;'><div style=\" float:left; width:auto;text-align:center; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">" + lineWhTx + ":" + zhuguan_tihao + "</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;'></div></div>");
|
$(".main_papermain").append("<div id=\"keguan_" + zhuguan_tihao + "\" class='main_tabletop zhuguanti' questiontype_zg='" + questiontype_zg + "' tihaovalue='" + zhuguan_tihao + "' zhuguan_xiaoti='" + zhuguan_xiaoti + "' score='" + score + "' scoretype='" + scoretype + "' style='" + lineWh + ";cursor: move;background:none; left:100px; top:" + (100 + $(document).scrollTop()) + "px;'><div style=\" float:left; width:auto;text-align:center; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">" + lineWhTx + ":" + zhuguan_tihao + "</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;'></div></div>");
|
||||||
$("#keguan_" + zhuguan_tihao).draggable({ containment: ".main_papermain" });
|
$("#keguan_" + zhuguan_tihao).draggable({ containment: ".main_papermain" });
|
||||||
$("#keguan_" + zhuguan_tihao).resizable({ containment: ".main_papermain", handles: 'all' });
|
$("#keguan_" + zhuguan_tihao).resizable({ containment: ".main_papermain", handles: 'all' });
|
||||||
|
|
||||||
|
|
@ -232,7 +232,7 @@ function SetTiaoMa(obj) {
|
||||||
else {
|
else {
|
||||||
$(obj).attr("class", "tiaomasz_hover");
|
$(obj).attr("class", "tiaomasz_hover");
|
||||||
}
|
}
|
||||||
$(".main_papermain").append("<div id=\"keguan_tiaomashibie\" class='main_tabletop' style='width:200px;background:none; left:100px; top:200px; height:80px'><div style=\" float:left; width:auto; text-align:center; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">条码</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;'></div></div>");
|
$(".main_papermain").append("<div id=\"keguan_tiaomashibie\" class='main_tabletop' style='cursor: move;width:200px;background:none; left:100px; top:200px; height:80px'><div style=\" float:left; width:auto; text-align:center; height:30px; position:absolute; margin-top:-30px;z-index:22; color:#fff; line-height:30px; background:#666;\">条码</div><div style='width:100%;height:100%;background:#fff;border:1px solid red;'></div></div>");
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$("#keguan_tiaomashibie").draggable({ containment: ".main_papermain" });
|
$("#keguan_tiaomashibie").draggable({ containment: ".main_papermain" });
|
||||||
$("#keguan_tiaomashibie").resizable({ containment: ".main_papermain", handles: 'all' });
|
$("#keguan_tiaomashibie").resizable({ containment: ".main_papermain", handles: 'all' });
|
||||||
|
|
@ -1162,10 +1162,10 @@ String.prototype.trim = function (char, type) {
|
||||||
|
|
||||||
//////////// 切换页数 ////////////////
|
//////////// 切换页数 ////////////////
|
||||||
function ChangePageNum(anotherTempID) {
|
function ChangePageNum(anotherTempID) {
|
||||||
if (confirm("当前页未保存,是否继续切换?")){
|
//if (confirm("当前页未保存,是否继续切换?")){
|
||||||
var currentURL = window.location.href;
|
var currentURL = window.location.href;
|
||||||
var newUrl = currentURL.replace(/(TempID=)\d+/, "$1" + anotherTempID);
|
var newUrl = currentURL.replace(/(TempID=)\d+/, "$1" + anotherTempID);
|
||||||
window.location.href = newUrl;
|
window.location.href = newUrl;
|
||||||
}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue