fix: 修复嵌套模态框输入框焦点问题并增强功能
修复Bootstrap嵌套模态框中输入框无法获得焦点的问题,通过禁用enforceFocus实现 为文件删除函数添加index参数以支持精确删除 在任务列表中添加SafetyJobInside模块的查看支持 为巡检内容返回数据添加contentsDetail字段 在设备归属选择列表中添加搜索功能并调整姓名列宽度
This commit is contained in:
@ -132,6 +132,7 @@ public class PatrolContentsServiceImpl implements PatrolContentsService {
|
||||
jsonObject.put("id", list3.get(j).getId());
|
||||
jsonObject.put("name", list3.get(j).getContents());
|
||||
jsonObject.put("text", list3.get(j).getContents());
|
||||
jsonObject.put("contentsDetail", list3.get(j).getContentsDetail());
|
||||
jsonObject.put("type", TimeEfficiencyCommStr.PatrolEquipment_Equipment);
|
||||
jsonObject.put("icon", TimeEfficiencyCommStr.PatrolContents);
|
||||
jsonArrayEqu.add(jsonObject);
|
||||
|
||||
@ -870,7 +870,7 @@ function openModal(modalId) {
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
@ -1060,6 +1060,12 @@ $(function () {
|
||||
});
|
||||
//FastClick.attach(document.body);
|
||||
|
||||
// 解决嵌套模态框中输入框无法获得焦点的问题
|
||||
// 禁用Bootstrap模态框的enforceFocus,允许嵌套模态框中的输入框正常工作
|
||||
if ($.fn.modal && $.fn.modal.Constructor) {
|
||||
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
|
||||
}
|
||||
|
||||
//弹窗关闭触发方法
|
||||
/*$(".modal").on("hidden.bs.modal", function() {
|
||||
$('.modal').css("overflow","auto");
|
||||
|
||||
@ -533,6 +533,14 @@
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
} else if (type.indexOf('${SAFETY_JOB_INSIDE}') != -1) {
|
||||
$.post(ext.contextPath + '/safety/SafetyJobInside/view.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
else {
|
||||
showAlert('w', `未查询到任务模块!${type}`, 'mainAlertdiv');
|
||||
}
|
||||
};
|
||||
var deleteFun = function (id) {
|
||||
|
||||
@ -19,6 +19,10 @@
|
||||
}
|
||||
};
|
||||
|
||||
var dosearchBelong = function() {
|
||||
$("#equipmentBelongTable").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
|
||||
//显示已经勾选的数据
|
||||
function stateFormatter(value, row, index) {
|
||||
@ -53,6 +57,7 @@
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_belongname').val()
|
||||
}
|
||||
},
|
||||
queryParamsType: "limit",
|
||||
@ -110,6 +115,12 @@
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="modal-body">
|
||||
<div class="input-group input-group-sm" style="width: 250px;float: right;margin-bottom: 15px;">
|
||||
<input type="text" id="search_belongname" name="search_belongname" class="form-control pull-right" placeholder="归属名称/编码">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearchBelong();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-bordered table-striped" style="overflow:auto;width:100%" id="equipmentBelongTable"></table>
|
||||
</div>
|
||||
|
||||
@ -263,7 +263,8 @@
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '姓名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: 200,
|
||||
}, {
|
||||
/* field: 'gender', // 返回json数据中的name
|
||||
title: '性别', // 表格表头显示文字
|
||||
|
||||
@ -72,7 +72,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
var fileinput = function () {
|
||||
$('#file').click();
|
||||
};
|
||||
var filedel = function () {
|
||||
var filedel = function (index) {
|
||||
fileList.splice(index, 1)
|
||||
$('#test').html(initFileInputView())
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user