NET餐厅管理系统前端js-dwz.dialog初始化半透明层、改变阴隐层
/**
* 初始化半透明层
* @param {Object} resizable
* @param {Object} dialog
* @param {Object} target
*/
initResize:function(resizable, dialog,target) {
$("body").css("cursor", target + "-resize");
resizable.css({
top: $(dialog).css("top"),
left: $(dialog).css("left"),
height:$(dialog).css("height"),
width:$(dialog).css("width")
});
resizable.show();
},
/**
* 改变阴隐层
* @param {Object} target
* @param {Object} options
*/
repaint:function(target,options){
var shadow = $("div.shadow");
if(target != "w" && target != "e") {
shadow.css("height", shadow.outerHeight() + options.tmove);
$(".shadow_c", shadow).children().andSelf().each(function(){
$(this).css("height", $(this).outerHeight() + options.tmove);
});
}
if(target == "n" || target =="nw" || target == "ne") {
shadow.css("top", options.otop - 2);
}
if(options.owidth && (target != "n" || target != "s")) {
shadow.css("width", options.owidth + 8);
}
if(target.indexOf("w") >= 0) {
shadow.css("left", options.oleft - 4);
}
},
/**
* 改变左右拖动层的高度
* @param {Object} target
* @param {Object} tmove
* @param {Object} dialog
*/
resizeTool:function(target, tmove, dialog) {
$("div[class^='resizable']", dialog).filter(function(){
return $(this).attr("tar") == 'w' || $(this).attr("tar") == 'e';
}).each(function(){
$(this).css("height", $(this).outerHeight() + tmove);
});
},