mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-18 17:48:01 +08:00
完成所有主列表JS模块化
This commit is contained in:
@@ -39,14 +39,24 @@ Description="连接的数据库" %>
|
||||
<% foreach (ColumnSchema column in this.SourceTable.Columns) {
|
||||
if(column.IsPrimaryKeyMember){%>
|
||||
<input type="text" id="<%=column.Name%>" name="<%=column.Name%>" value="" class="hidden" />
|
||||
<%}else if(CSharpAlias[column.SystemType.FullName] == "bool"
|
||||
||(CSharpAlias[column.SystemType.FullName] == "int" && Tools.GetDescription(column).Contains("下拉选择"))) {%>
|
||||
<%}else if(CSharpAlias[column.SystemType.FullName] == "bool") {%>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="<%=column.Name%>" class="control-label x120"><%=Tools.GetDescription(column)%>:</label>
|
||||
<select name="<%=column.Name%>" id="<%=column.Name%>" data-toggle="selectpicker" data-rule="required">
|
||||
<option value="false">否</option>
|
||||
<option value="true">是</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<%}else if(CSharpAlias[column.SystemType.FullName] == "int" ) {%>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="<%=column.Name%>" class="control-label x120"><%=Tools.GetDescription(column)%>:</label>
|
||||
<select name="<%=column.Name%>" id="<%=column.Name%>" data-toggle="selectpicker" data-rule="required">
|
||||
<option value="0">默认</option>
|
||||
<option value="1">禁用</option>
|
||||
<option value="1">状态1</option>
|
||||
<option value="2">状态2</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
@@ -32,13 +32,11 @@ function MainGrid() {
|
||||
, hide: true
|
||||
<%} %>
|
||||
<%else if(CSharpAlias[column.SystemType.FullName] == "bool") {%>
|
||||
,type: 'select',
|
||||
align: 'center',
|
||||
items: [{ '0': '否' }, { '1': '是' }],
|
||||
,align: 'center',
|
||||
items: [{ 'false': '否' }, { 'true': '是' }],
|
||||
<%} %>
|
||||
<%else if(CSharpAlias[column.SystemType.FullName] == "int") {%>
|
||||
,type: 'select',
|
||||
align: 'center',
|
||||
, align: 'center',
|
||||
items: [{ '0': '默认' }, { '1': '状态1' }],
|
||||
<%} %>
|
||||
},
|
||||
@@ -181,22 +179,25 @@ var editDlg = function () {
|
||||
$("#Id").val(0);
|
||||
|
||||
<%if(Tools.NeedCascade(SourceTable)){
|
||||
Response.WriteLine("parentTree.show()");
|
||||
Response.WriteLine("parentTree.show();");
|
||||
}%>
|
||||
},
|
||||
update: function (ret) { //弹出编辑框
|
||||
update = true;
|
||||
show();
|
||||
<% foreach (ColumnSchema column in this.SourceTable.Columns) { %>
|
||||
<%if(CSharpAlias[column.SystemType.FullName] == "bool"
|
||||
||(CSharpAlias[column.SystemType.FullName] == "int" && Tools.GetDescription(column).Contains("下拉选择"))) {%>
|
||||
<%if(column.IsPrimaryKeyMember){%>
|
||||
$('#<%=column.Name%>').val(ret.<%=column.Name%>);
|
||||
<%}else if(CSharpAlias[column.SystemType.FullName] == "bool") {%>
|
||||
$('#<%=column.Name%>').selectpicker('val', ret.<%=column.Name%>?"true":"false");
|
||||
<%}else if(CSharpAlias[column.SystemType.FullName] == "int") {%>
|
||||
$('#<%=column.Name%>').selectpicker('val', ret.<%=column.Name%>);
|
||||
<%} else{ %>
|
||||
$('#<%=column.Name%>').val(ret.<%=column.Name%>);
|
||||
<%} %>
|
||||
<% } %>
|
||||
<%if(Tools.NeedCascade(SourceTable)){
|
||||
Response.WriteLine("parentTree.show()");
|
||||
Response.WriteLine("parentTree.show();");
|
||||
}%>
|
||||
},
|
||||
save: function() { //编辑-->保存
|
||||
@@ -219,7 +220,7 @@ function del() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/moduleManager/Delete?Id=' + selected.Id, function (data) {
|
||||
$.getJSON('/<%=ModuleName%>/Delete?Id=' + selected.Id, function (data) {
|
||||
if (data.statusCode == "200") {
|
||||
list.reload();
|
||||
ztree.reload();
|
||||
|
Reference in New Issue
Block a user