表格属性 内容包含单引号JS拼装DOM元素报错问题修改
This commit is contained in:
parent
2eebf969d2
commit
48b501de18
Binary file not shown.
@ -2945,7 +2945,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
||||
}
|
||||
String tableInput = subTableSize > 1 ? "请查看" : "请输入";
|
||||
|
||||
input = "<span class=\"awsui-input-wrapper\" tableTitle=" + tableTitle + " ref=" + refValue + " onclick=\"showTableDialog($(this)," + (StringUtils.isEmpty(jsonValue) ? new JSONObject() : jsonValue.replace("\"", "'")) + ",'" + id + "')\">" + "<input type='text' id='" + id + "' value='" + tableInput + "' class=\"awsui-textbox\" />" + "<span class=\"awsui-input-suffix\" sid='" + sid + "' uuid='" + uuid + "' >" + " <i class=\"awsui-iconfont\" ></i>" + "</span>" + "</span>";
|
||||
input = "<span class=\"awsui-input-wrapper\" tableTitle=" + tableTitle + " ref=" + refValue + " onclick=\"showTableDialog($(this)," + (StringUtils.isEmpty(jsonValue) ? new JSONObject() : jsonValue.replace("\'", "\\'").replace("\"", "'")) + ",'" + id + "')\">" + "<input type='text' id='" + id + "' value='" + tableInput + "' class=\"awsui-textbox\" />" + "<span class=\"awsui-input-suffix\" sid='" + sid + "' uuid='" + uuid + "' >" + " <i class=\"awsui-iconfont\" ></i>" + "</span>" + "</span>";
|
||||
|
||||
} else {
|
||||
input = "<span class=\"awsui-input-wrapper\" tableTitle=" + tableTitle + " ref=" + refValue + " onclick=\"showTableDialog($(this),{}" + ",'" + id + "')\">" + "<input type='text' id='" + id + "' value='" + "请输入" + "' class=\"awsui-textbox\" />" + "<span class=\"awsui-input-suffix\" sid='" + sid + "' uuid='" + uuid + "' >" + " <i class=\"awsui-iconfont\" ></i>" + "</span>" + "</span>";
|
||||
|
||||
@ -586,7 +586,7 @@ function saveDialogTableValue(tableValue,id,dom) {
|
||||
$.simpleAlert(awsui.decode(msg).msg, "error");
|
||||
}
|
||||
if(awsui.decode(msg).result == "ok") {
|
||||
let tableEvent = "showTableDialog($(this)," + JSON.stringify(tableValue).replace(/\"/g,"'") +", '"+id+"')"
|
||||
let tableEvent = "showTableDialog($(this)," + JSON.stringify(tableValue).replace(/\'/g,"\\'").replace(/\"/g,"'") +", '"+id+"')"
|
||||
dom.attr('onclick',tableEvent)
|
||||
if (tableValue.table.length > 1) {
|
||||
$("#" + id).val('请查看')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user