提交 ec3fc675 编写于 作者: doc_wei's avatar doc_wei

更新

上级 97b18476
......@@ -38,9 +38,6 @@ function _openNewWindows(mation){
if(isNull(mation.maxmin)){//是否最大化
mation.maxmin = false;
}
if(isNull(mation.zIndex)){//是否在桌面打开
mation.zIndex = false;
}
if(isNull(mation.shade)){//遮罩层
mation.shade = 0.5;
}
......@@ -52,47 +49,24 @@ function _openNewWindows(mation){
async: true,
success: function (data) {
layer.close(index);
var pageIndex;
//从桌面打开
if(mation.zIndex){
pageIndex = top.winui.window.open({
id: mation.pageId,
type: 2,
title: mation.title,
content: mation.url,
area: mation.area,
offset: mation.offset,
maxmin: mation.maxmin,
shade: mation.shade,
end: function(){
if(typeof(mation.callBack) == "function") {
mation.callBack(refreshCode);
}
}
});
}else{
pageIndex = layer.open({
id: mation.pageId,
type: 2,
title: mation.title,
content: mation.url,
area: mation.area,
offset: mation.offset,
maxmin: mation.maxmin,
shade: mation.shade,
end: function(){
if(typeof(mation.callBack) == "function") {
mation.callBack(refreshCode);
}
}
});
}
var pageIndex = layer.open({
id: mation.pageId,
type: 2,
title: mation.title,
content: mation.url,
area: mation.area,
offset: mation.offset,
maxmin: mation.maxmin,
shade: mation.shade,
zIndex: 20000000000,
end: function(){
if(typeof(mation.callBack) == "function") {
mation.callBack(refreshCode);
}
}
});
if(mation.maxmin){
if(mation.zIndex){
top.winui.window.full(pageIndex);
}else{
layer.full(pageIndex);
}
layer.full(pageIndex);
}
},
error: function (xml) {
......
......@@ -57,6 +57,12 @@ layui.define(['layer', 'winui'], function (exports) {
if(isNull(options.maxmin) && options.maxmin != false){
options.maxmin = true;
}
if(isNull(options.zIndex)){
options.zIndex = layer.zIndex;
}
if(isNull(options.addToButtomMenu) && options.addToButtomMenu != false){
options.addToButtomMenu = true;
}
//打开窗口
var windowIndex = layer.open({
......@@ -72,7 +78,7 @@ layui.define(['layer', 'winui'], function (exports) {
maxmin: options.maxmin, //允许最大最小化
moveOut: true, //允许拖出窗外
skin: options.skin, //窗口皮肤
zIndex: layer.zIndex,
zIndex: options.zIndex,
shadeClose: options.shadeClose, //点击空白处关闭
scrollbar: false,
closeBtn: options.closeBtn,
......@@ -82,7 +88,7 @@ layui.define(['layer', 'winui'], function (exports) {
},
//打开回调
success: function (layero, index) {
common.setWindowBody(layero);
common.setWindowBody(layero);
},
//关闭回调
cancel: function (index, windowDom) {
......@@ -201,12 +207,14 @@ layui.define(['layer', 'winui'], function (exports) {
//去除最大化按钮
if (!(options.max === undefined ? this.settings.max : options.max))
$(windowDom).find('.layui-layer-max').remove();
//增加任务项
var taskItem = common.addTaskItem(options.id, options.title);
//选中任务项
common.selectDom(taskItem);
//绑定任务项mouseup事件
common.resetMouseUp(taskItem, call.taskItemMouseUp);
if(options.addToButtomMenu){
//增加任务项
var taskItem = common.addTaskItem(options.id, options.title);
//选中任务项
common.selectDom(taskItem);
//绑定任务项mouseup事件
common.resetMouseUp(taskItem, call.taskItemMouseUp);
}
//双击窗口标题栏最大化(由于不明原因,标题栏的拖动好像阻碍了标题栏的双击事件,所以这里用mousedown模拟双击)
var lastTime = 0;
$(windowDom).find(MOVE).on('mousedown', function () {
......
......@@ -16,7 +16,6 @@ layui.config({
url: "../../tpl/syspersonal/editpassword.html",
title: "修改密码",
pageId: "editpassword",
zIndex: true,
area: ['700px', '300px'],
callBack: function(refreshCode){
if (refreshCode == '0') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册