mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
修改支持iframe,这样后台多navtab时,就不用为每个dom定义ID了!!!!
This commit is contained in:
parent
2968b52c2a
commit
f63159dc07
@ -82,7 +82,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.getJSON('CategoryManager/LoadForTree', function (json) {
|
||||
$.getJSON('/CategoryManager/LoadForTree', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#j_select_tree1'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
|
@ -1,18 +1,15 @@
|
||||
@{
|
||||
string _prefix = "Category";
|
||||
var _treeId = _prefix + "Tree";
|
||||
var _gridId = _prefix + "Grid";
|
||||
var _treeDetail = _prefix + "Detail";
|
||||
Layout = "~/Views/Shared/_BjuiLayout.cshtml";
|
||||
}
|
||||
|
||||
@{ Html.RenderAction("MenuHeader", "Home");}
|
||||
<div class="bjui-pageContent tableContent" style="position:relative">
|
||||
<div class="clearfix">
|
||||
<div style="float: left; width: 220px; overflow: auto;" class="table table-bordered">
|
||||
<ul id="@_treeId" class="ztree"></ul>
|
||||
<ul id="maintree" class="ztree"></ul>
|
||||
</div>
|
||||
|
||||
<div id="@_treeDetail" style="margin-left: 225px;">
|
||||
<div id="detail" style="margin-left: 225px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -27,12 +24,13 @@
|
||||
//加载数据到datagrid
|
||||
function loadDataGrid() {
|
||||
//b-jui的datagrid需要重新处理HTML
|
||||
$('#@_treeDetail').empty()
|
||||
.append('<table id="@_gridId" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
$('#detail').empty()
|
||||
.append('<table id="maingrid" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
|
||||
$('#@_gridId').datagrid({
|
||||
$('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
target:$(this),
|
||||
columns: [
|
||||
{
|
||||
name: 'Id',
|
||||
@ -116,14 +114,14 @@
|
||||
callback: {onClick: zTreeOnClick}
|
||||
};
|
||||
$.getJSON('/CategoryManager/LoadForTree', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#@_treeId'), setting, json);
|
||||
var zTreeObj = $.fn.zTree.init($('#maintree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
}
|
||||
|
||||
//删除
|
||||
function delCategory() {
|
||||
var selected = getSelected('#@_gridId',2);
|
||||
var selected = getSelected('#maingrid',2);
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/CategoryManager/Delete?Id=' + selected, function (data) {
|
||||
@ -137,7 +135,7 @@
|
||||
|
||||
//自定义的编辑按钮
|
||||
function editCategory() {
|
||||
var selected = getSelected('#@_gridId',2);
|
||||
var selected = getSelected('#maingrid',2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(this).dialog({
|
||||
@ -152,8 +150,7 @@
|
||||
}
|
||||
|
||||
function refreshCategoryGrid() {
|
||||
$('#@_gridId').datagrid('refresh');
|
||||
$('#maingrid').datagrid('refresh');
|
||||
// loadDataGrid();
|
||||
}
|
||||
//@@ sourceURL=CategoryManagerIndex.js
|
||||
</script>
|
||||
|
@ -125,7 +125,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.getJSON('ModuleManager/LoadModuleWithRoot', function (json) {
|
||||
$.getJSON('/ModuleManager/LoadModuleWithRoot', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#j_select_tree1'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
|
@ -1,21 +1,15 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_BjuiLayout.cshtml";
|
||||
}
|
||||
@{
|
||||
string _prefix = "Module";
|
||||
var _treeId = _prefix + "Tree";
|
||||
var _gridId = _prefix + "Grid";
|
||||
var _treeDetail = _prefix + "Detail";
|
||||
}
|
||||
|
||||
@{ Html.RenderAction("MenuHeader", "Home");}
|
||||
<div class="bjui-pageContent tableContent" style="position:relative">
|
||||
<div class="clearfix">
|
||||
<div style="float: left; width: 220px; overflow: auto;" class="table table-bordered">
|
||||
<ul id="@_treeId" class="ztree"></ul>
|
||||
<ul id="maintree" class="ztree"></ul>
|
||||
</div>
|
||||
|
||||
<div id="@_treeDetail" style="margin-left: 225px;">
|
||||
<div id="detail" style="margin-left: 225px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -30,10 +24,10 @@
|
||||
//加载数据到datagrid
|
||||
function loadDataGrid() {
|
||||
//b-jui的datagrid需要重新处理HTML
|
||||
$('#@_treeDetail').empty()
|
||||
.append('<table id="@_gridId" class="table table-hover table-striped table-top"></table>');
|
||||
$('#detail').empty()
|
||||
.append('<table id="maingrid" class="table table-hover table-striped table-top"></table>');
|
||||
|
||||
$('#@_gridId').datagrid({
|
||||
$('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
@ -125,14 +119,14 @@
|
||||
callback: {onClick: zTreeOnClick}
|
||||
};
|
||||
$.getJSON('/ModuleManager/LoadModuleWithRoot', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#@_treeId'), setting, json);
|
||||
var zTreeObj = $.fn.zTree.init($('#maintree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
}
|
||||
|
||||
//删除
|
||||
function delModule() {
|
||||
var selected = getSelected('#@_gridId',2);
|
||||
var selected = getSelected('#maingrid',2);
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/ModuleManager/Delete?Id=' + selected, function (data) {
|
||||
@ -146,7 +140,7 @@
|
||||
|
||||
//自定义的编辑按钮
|
||||
function editModule() {
|
||||
var selected = getSelected('#@_gridId',2);
|
||||
var selected = getSelected('#maingrid',2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(this).dialog({
|
||||
@ -162,7 +156,7 @@
|
||||
|
||||
//为模块分配按钮
|
||||
function assignButton() {
|
||||
var selected = getSelected('#@_gridId',2);
|
||||
var selected = getSelected('#maingrid',2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(this).dialog({
|
||||
@ -177,8 +171,7 @@
|
||||
}
|
||||
|
||||
function refreshModuleGrid() {
|
||||
$('#@_gridId').datagrid('refresh');
|
||||
$('#maingrid').datagrid('refresh');
|
||||
// loadDataGrid();
|
||||
}
|
||||
//@@ sourceURL=ModuleManagerIndex.js
|
||||
</script>
|
||||
|
@ -55,7 +55,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.getJSON('ModuleManager/LoadForTree', function (json) {
|
||||
$.getJSON('/ModuleManager/LoadForTree', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#lookupTree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
@ -81,7 +81,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.post('ModuleManager/LoadForRole', { roleId: $('#roleId').val() },
|
||||
$.post('/ModuleManager/LoadForRole', { roleId: $('#roleId').val() },
|
||||
function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#selected'), setting, eval(json));
|
||||
zTreeObj.expandAll(true);
|
||||
@ -89,7 +89,7 @@
|
||||
}
|
||||
|
||||
function save() {
|
||||
$.post('ModuleManager/AssignModuleForRole', { roleId: $('#roleId').val(), moduleIds: moduleIds },
|
||||
$.post('/ModuleManager/AssignModuleForRole', { roleId: $('#roleId').val(), moduleIds: moduleIds },
|
||||
function (json) {
|
||||
var rel = $.parseJSON(json);
|
||||
if (rel.statusCode == "200") {
|
||||
|
@ -55,7 +55,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.getJSON('ModuleManager/LoadForTree', function (json) {
|
||||
$.getJSON('/ModuleManager/LoadForTree', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#lookupTree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
@ -81,7 +81,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.post('ModuleManager/LoadForUser', { userId: $('#userId').val() },
|
||||
$.post('/ModuleManager/LoadForUser', { userId: $('#userId').val() },
|
||||
function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#selected'), setting, eval(json));
|
||||
zTreeObj.expandAll(true);
|
||||
@ -89,7 +89,7 @@
|
||||
}
|
||||
|
||||
function save() {
|
||||
$.post('ModuleManager/AssignModuleForUser', { userId: $('#userId').val(), moduleIds: moduleIds },
|
||||
$.post('/ModuleManager/AssignModuleForUser', { userId: $('#userId').val(), moduleIds: moduleIds },
|
||||
function (json) {
|
||||
var rel = $.parseJSON(json);
|
||||
if (rel.statusCode == "200") {
|
||||
|
@ -75,7 +75,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.getJSON('OrgManager/LoadOrg', function (json) {
|
||||
$.getJSON('/OrgManager/LoadOrg', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#j_select_tree1'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
|
@ -1,21 +1,16 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_BjuiLayout.cshtml";
|
||||
}
|
||||
@{
|
||||
string _prefix = "org";
|
||||
var _treeId = _prefix + "Tree";
|
||||
var _gridId = _prefix + "Grid";
|
||||
var _treeDetail = _prefix + "Detail";
|
||||
}
|
||||
|
||||
@{ Html.RenderAction("MenuHeader", "Home");}
|
||||
|
||||
<div class="bjui-pageContent tableContent" style="position:relative">
|
||||
<div class="clearfix">
|
||||
<div style="float: left; width: 220px; overflow: auto;" class="table table-bordered">
|
||||
<ul id="@_treeId" class="ztree"></ul>
|
||||
<ul id="maintree" class="ztree"></ul>
|
||||
</div>
|
||||
|
||||
<div id="@_treeDetail" style="margin-left: 225px; ">
|
||||
<div id="detail" style="margin-left: 225px; ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -30,9 +25,9 @@
|
||||
//加载数据到datagrid
|
||||
function LoadOrg() {
|
||||
//b-jui的datagrid需要重新处理HTML
|
||||
$('#@_treeDetail').empty()
|
||||
.append('<table id="@_gridId" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
grid = $('#@_gridId').datagrid({
|
||||
$('#detail').empty()
|
||||
.append('<table id="maingrid" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
grid = $('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
@ -124,18 +119,18 @@
|
||||
}
|
||||
};
|
||||
$.getJSON('/OrgManager/LoadOrg', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#@_treeId'), setting, json);
|
||||
var zTreeObj = $.fn.zTree.init($('#maintree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
}
|
||||
|
||||
function refreshOrgGrid() {
|
||||
$('#@_gridId').datagrid('refresh');
|
||||
$('#maingrid').datagrid('refresh');
|
||||
}
|
||||
|
||||
//删除
|
||||
function delOrg() {
|
||||
var selected = getSelected('#@_gridId',2);
|
||||
var selected = getSelected('#maingrid',2);
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/OrgManager/DelOrg?Id=' + selected, function (data) {
|
||||
@ -146,6 +141,4 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//@@ sourceURL=orgIndex.js
|
||||
</script>
|
||||
|
@ -55,7 +55,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.getJSON('OrgManager/LoadForTree', function (json) {
|
||||
$.getJSON('/OrgManager/LoadForTree', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#lookupTree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
@ -81,7 +81,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.post('OrgManager/LoadForRole', { roleId: $('#roleId').val() },
|
||||
$.post('/OrgManager/LoadForRole', { roleId: $('#roleId').val() },
|
||||
function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#selected'), setting, eval(json));
|
||||
zTreeObj.expandAll(true);
|
||||
@ -89,7 +89,7 @@
|
||||
}
|
||||
|
||||
function save() {
|
||||
$.post('OrgManager/AssignOrgForRole', { roleId: $('#roleId').val(), moduleIds: moduleIds },
|
||||
$.post('/OrgManager/AssignOrgForRole', { roleId: $('#roleId').val(), moduleIds: moduleIds },
|
||||
function (json) {
|
||||
var rel = $.parseJSON(json);
|
||||
if (rel.statusCode == "200") {
|
||||
|
@ -55,7 +55,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.getJSON('OrgManager/LoadForTree', function (json) {
|
||||
$.getJSON('/OrgManager/LoadForTree', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#lookupTree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
@ -81,7 +81,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.post('OrgManager/LoadForUser', { userId: $('#userId').val() },
|
||||
$.post('/OrgManager/LoadForUser', { userId: $('#userId').val() },
|
||||
function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#selected'), setting, eval(json));
|
||||
zTreeObj.expandAll(true);
|
||||
@ -89,7 +89,7 @@
|
||||
}
|
||||
|
||||
function save() {
|
||||
$.post('OrgManager/AssignOrgForUser', { userId: $('#userId').val(), moduleIds: moduleIds },
|
||||
$.post('/OrgManager/AssignOrgForUser', { userId: $('#userId').val(), moduleIds: moduleIds },
|
||||
function (json) {
|
||||
var rel = $.parseJSON(json);
|
||||
if (rel.statusCode == "200") {
|
||||
|
@ -47,7 +47,7 @@
|
||||
onClick: zTreeOnClick
|
||||
}
|
||||
};
|
||||
$.getJSON('OrgManager/LoadOrg', function (json) {
|
||||
$.getJSON('/OrgManager/LoadOrg', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#lookupTree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
|
@ -70,7 +70,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.getJSON('CategoryManager/LoadForTree', function (json) {
|
||||
$.getJSON('/CategoryManager/LoadForTree', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#j_select_tree1'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
|
@ -1,21 +1,15 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_BjuiLayout.cshtml";
|
||||
}
|
||||
@{
|
||||
string _prefix = "Resource";
|
||||
var _treeId = _prefix + "Tree";
|
||||
var _gridId = _prefix + "Grid";
|
||||
var _treeDetail = _prefix + "Detail";
|
||||
}
|
||||
|
||||
@{ Html.RenderAction("MenuHeader", "Home");}
|
||||
<div class="bjui-pageContent tableContent" style="position:relative">
|
||||
<div class="clearfix">
|
||||
<div style="float: left; width: 220px; overflow: auto;" class="table table-bordered">
|
||||
<ul id="@_treeId" class="ztree"></ul>
|
||||
<ul id="maintree" class="ztree"></ul>
|
||||
</div>
|
||||
|
||||
<div id="@_treeDetail" style="margin-left: 225px;">
|
||||
<div id="detail" style="margin-left: 225px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -30,10 +24,10 @@
|
||||
//加载数据到datagrid
|
||||
function loadDataGrid() {
|
||||
//b-jui的datagrid需要重新处理HTML
|
||||
$('#@_treeDetail').empty()
|
||||
.append('<table id="@_gridId" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
$('#detail').empty()
|
||||
.append('<table id="maingrid" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
|
||||
$('#@_gridId').datagrid({
|
||||
$('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
@ -131,14 +125,14 @@
|
||||
callback: {onClick: zTreeOnClick}
|
||||
};
|
||||
$.getJSON('/CategoryManager/LoadForTree', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#@_treeId'), setting, json);
|
||||
var zTreeObj = $.fn.zTree.init($('#maintree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
}
|
||||
|
||||
//删除
|
||||
function delResource() {
|
||||
var selected = getSelected('#@_gridId',2);
|
||||
var selected = getSelected('#maingrid',2);
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/ResourceManager/Delete?Id=' + selected, function (data) {
|
||||
@ -152,7 +146,7 @@
|
||||
|
||||
//自定义的编辑按钮
|
||||
function editResource() {
|
||||
var selected = getSelected('#@_gridId',2);
|
||||
var selected = getSelected('#maingrid',2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(this).dialog({
|
||||
@ -167,7 +161,7 @@
|
||||
}
|
||||
|
||||
function refreshResourceGrid() {
|
||||
$('#@_gridId').datagrid('refresh');
|
||||
$('#maingrid').datagrid('refresh');
|
||||
// loadDataGrid();
|
||||
}
|
||||
//@@ sourceURL=ResourceManagerIndex.js
|
||||
|
@ -97,7 +97,7 @@
|
||||
},
|
||||
callback: { onClick: zTreeOnClick }
|
||||
};
|
||||
$.getJSON('CategoryManager/LoadForTree', function (json) {
|
||||
$.getJSON('/CategoryManager/LoadForTree', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#@_treeId'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
@ -108,7 +108,7 @@
|
||||
var selected = getSelectedMany('#@_gridId', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$.post('ResourceManager/AccessForRole', {
|
||||
$.post('/ResourceManager/AccessForRole', {
|
||||
roleId: $('#roleId').val(),
|
||||
ids: selected
|
||||
},
|
||||
|
@ -97,7 +97,7 @@
|
||||
},
|
||||
callback: { onClick: zTreeOnClick }
|
||||
};
|
||||
$.getJSON('CategoryManager/LoadForTree', function (json) {
|
||||
$.getJSON('/CategoryManager/LoadForTree', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#@_treeId'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
@ -108,7 +108,7 @@
|
||||
var selected = getSelectedMany('#@_gridId', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$.post('ResourceManager/AccessForUser', {
|
||||
$.post('/ResourceManager/AccessForUser', {
|
||||
userId: $('#userId').val(),
|
||||
ids: selected
|
||||
},
|
||||
|
@ -102,7 +102,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.getJSON('OrgManager/LoadOrg', function (json) {
|
||||
$.getJSON('/OrgManager/LoadOrg', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#j_select_tree1'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
|
@ -1,21 +1,16 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_BjuiLayout.cshtml";
|
||||
}
|
||||
@{
|
||||
string _prefix = "Role";
|
||||
var _treeId = _prefix + "Tree";
|
||||
var _gridId = _prefix + "Grid";
|
||||
var _treeDetail = _prefix + "Detail";
|
||||
}
|
||||
|
||||
@{ Html.RenderAction("MenuHeader", "Home");}
|
||||
|
||||
<div class="bjui-pageContent tableContent" style="position:relative">
|
||||
<div class="clearfix">
|
||||
<div style="float: left; width: 220px; overflow: auto;" class="table table-bordered">
|
||||
<ul id="@_treeId" class="ztree"></ul>
|
||||
<ul id="maintree" class="ztree"></ul>
|
||||
</div>
|
||||
|
||||
<div id="@_treeDetail" style="margin-left: 225px;">
|
||||
<div id="detail" style="margin-left: 225px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -30,10 +25,10 @@
|
||||
//加载数据到datagrid
|
||||
function loadDataGrid() {
|
||||
//b-jui的datagrid需要重新处理HTML
|
||||
$('#@_treeDetail').empty()
|
||||
.append('<table id="@_gridId" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
$('#detail').empty()
|
||||
.append('<table id="maingrid" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
|
||||
$('#@_gridId').datagrid({
|
||||
$('#maingrid').datagrid({
|
||||
showToolbar:false,
|
||||
filterThead: false,
|
||||
columns: [
|
||||
@ -117,14 +112,14 @@
|
||||
callback: {onClick: zTreeOnClick}
|
||||
};
|
||||
$.getJSON('/OrgManager/LoadOrg', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#@_treeId'), setting, json);
|
||||
var zTreeObj = $.fn.zTree.init($('#maintree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
}
|
||||
|
||||
//删除
|
||||
function delRole() {
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/RoleManager/Delete?Id=' + selected, function (data) {
|
||||
@ -138,7 +133,7 @@
|
||||
|
||||
//自定义的编辑按钮
|
||||
function editRole() {
|
||||
var selected = getSelected('#@_gridId',2);
|
||||
var selected = getSelected('#maingrid',2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(this).dialog({
|
||||
@ -152,14 +147,14 @@
|
||||
}
|
||||
|
||||
function refreshRoleGrid() {
|
||||
$('#@_gridId').datagrid('refresh');
|
||||
$('#maingrid').datagrid('refresh');
|
||||
// loadDataGrid();
|
||||
}
|
||||
|
||||
//为角色分配模块
|
||||
function assignRoleModule(obj) {
|
||||
|
||||
var selected = getSelected('#@_gridId',2);
|
||||
var selected = getSelected('#maingrid',2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(obj).dialog({
|
||||
@ -174,7 +169,7 @@
|
||||
|
||||
//为角色分配可见机构
|
||||
function assignRoleOrg(obj) {
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(obj).dialog({
|
||||
@ -189,7 +184,7 @@
|
||||
|
||||
//为角色分配资源
|
||||
function openRoleReourceAccess(obj) {
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(obj).dialog({
|
||||
@ -206,7 +201,7 @@
|
||||
|
||||
//为角色分配菜单
|
||||
function assignRoleElement(obj) {
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(obj).dialog({
|
||||
|
99
OpenAuth.Mvc/Views/Shared/_BjuiLayout.cshtml
Normal file
99
OpenAuth.Mvc/Views/Shared/_BjuiLayout.cshtml
Normal file
@ -0,0 +1,99 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>OpenAuth.net 基于经典DDD框架的权限管理</title>
|
||||
<meta name="Keywords" content="OpenAuth,DDD权限管理,yubaolee" />
|
||||
<meta name="Description" content="OpenAuth,DDD权限管理,yubaolee" />
|
||||
<!-- bootstrap - css -->
|
||||
<link href="~/BJUI/themes/css/bootstrap.css" rel="stylesheet">
|
||||
<!-- core - css -->
|
||||
<link href="~/BJUI/themes/css/style.css" rel="stylesheet">
|
||||
<link href="~/BJUI/themes/blue/core.css" id="bjui-link-theme" rel="stylesheet">
|
||||
<!-- plug - css -->
|
||||
<link href="~/BJUI/plugins/kindeditor_4.1.10/themes/default/default.css" rel="stylesheet">
|
||||
<link href="~/BJUI/plugins/colorpicker/css/bootstrap-colorpicker.min.css" rel="stylesheet">
|
||||
<link href="~/BJUI/plugins/niceValidator/jquery.validator.css" rel="stylesheet">
|
||||
<link href="~/BJUI/plugins/bootstrapSelect/bootstrap-select.css" rel="stylesheet">
|
||||
<link href="~/BJUI/themes/css/FA/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="~/BJUI/plugins/styles/zTreeStyle/zTreeStyle.css" />
|
||||
<!--[if lte IE 7]>
|
||||
<link href="~/BJUI/themes/css/ie7.css" rel="stylesheet">
|
||||
<![endif]-->
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lte IE 9]>
|
||||
<script src="~/BJUI/other/html5shiv.min.js"></script>
|
||||
<script src="~/BJUI/other/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<!-- jquery -->
|
||||
<script src="~/BJUI/js/jquery-1.11.3.min.js"></script>
|
||||
<script src="~/BJUI/js/jquery.cookie.js"></script>
|
||||
<!--[if lte IE 9]>
|
||||
<script src="~/BJUI/other/jquery.iframe-transport.js"></script>
|
||||
<![endif]-->
|
||||
<!-- BJUI.all 分模块压缩版 -->
|
||||
<script src="~/BJUI/js/bjui-all.js"></script>
|
||||
|
||||
<!-- plugins -->
|
||||
<!-- swfupload for uploadify && kindeditor -->
|
||||
<script src="~/BJUI/plugins/swfupload/swfupload.js"></script>
|
||||
<!-- kindeditor -->
|
||||
<script src="~/BJUI/plugins/kindeditor_4.1.10/kindeditor-all.min.js"></script>
|
||||
<script src="~/BJUI/plugins/kindeditor_4.1.10/lang/zh_CN.js"></script>
|
||||
<!-- colorpicker -->
|
||||
<script src="~/BJUI/plugins/colorpicker/js/bootstrap-colorpicker.min.js"></script>
|
||||
<!-- ztree -->
|
||||
<script src="~/BJUI/plugins/ztree/jquery.ztree.all-3.5.js"></script>
|
||||
<!-- nice validate -->
|
||||
<script src="~/BJUI/plugins/niceValidator/jquery.validator.js"></script>
|
||||
<script src="~/BJUI/plugins/niceValidator/jquery.validator.themes.js"></script>
|
||||
<!-- bootstrap plugins -->
|
||||
<script src="~/BJUI/plugins/bootstrap.min.js"></script>
|
||||
<script src="~/BJUI/plugins/bootstrapSelect/bootstrap-select.min.js"></script>
|
||||
<script src="~/BJUI/plugins/bootstrapSelect/defaults-zh_CN.min.js"></script>
|
||||
<!-- icheck -->
|
||||
<script src="~/BJUI/plugins/icheck/icheck.min.js"></script>
|
||||
<!-- dragsort -->
|
||||
<script src="~/BJUI/plugins/dragsort/jquery.dragsort-0.5.1.min.js"></script>
|
||||
<!-- other plugins -->
|
||||
<script src="~/BJUI/plugins/other/jquery.autosize.js"></script>
|
||||
<link href="~/BJUI/plugins/uploadify/css/uploadify.css" rel="stylesheet">
|
||||
<script src="~/BJUI/plugins/uploadify/scripts/jquery.uploadify.min.js"></script>
|
||||
<script src="~/BJUI/plugins/download/jquery.fileDownload.js"></script>
|
||||
|
||||
<!---本项目扩展的JS代码-->
|
||||
<script src="~/BJUI/myextension.js"></script>
|
||||
<!-- init -->
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
BJUI.init({
|
||||
JSPATH: 'BJUI/', //[可选]框架路径
|
||||
PLUGINPATH: 'BJUI/plugins/', //[可选]插件路径
|
||||
loginInfo: { url: 'Login', title: '登录', width: 400, height: 200 }, // 会话超时后弹出登录对话框
|
||||
statusCode: { ok: 200, error: 300, timeout: 301 }, //[可选]
|
||||
ajaxTimeout: 50000, //[可选]全局Ajax请求超时时间(毫秒)
|
||||
pageInfo: { total: 'total', pageCurrent: 'pageCurrent', pageSize: 'pageSize', orderField: 'orderField', orderDirection: 'orderDirection' }, //[可选]分页参数
|
||||
alertMsg: { displayPosition: 'topcenter', displayMode: 'slide', alertTimeout: 3000 }, //[可选]信息提示的显示位置,显隐方式,及[info/correct]方式时自动关闭延时(毫秒)
|
||||
keys: { statusCode: 'statusCode', message: 'message' }, //[可选]
|
||||
ui: {
|
||||
windowWidth: 0, //框架可视宽度,0=100%宽,> 600为则居中显示
|
||||
showSlidebar: true, //[可选]左侧导航栏锁定/隐藏
|
||||
clientPaging: true, //[可选]是否在客户端响应分页及排序参数
|
||||
overwriteHomeTab: false //[可选]当打开一个未定义id的navtab时,是否可以覆盖主navtab(我的主页)
|
||||
},
|
||||
debug: true, // [可选]调试模式 [true|false,默认false]
|
||||
theme: 'sky' // 若有Cookie['bjui_theme'],优先选择Cookie['bjui_theme']。皮肤[五种皮肤:default, orange, purple, blue, red, green]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--[if lte IE 7]>
|
||||
<div id="errorie"><div>您还在使用老掉牙的IE,正常使用系统前请升级您的浏览器到 IE8以上版本 <a target="_blank" href="http://windows.microsoft.com/zh-cn/internet-explorer/ie-8-worldwide-languages">点击升级</a> 强烈建议您更改换浏览器:<a href="http://down.tech.sina.com.cn/content/40975.html" target="_blank">谷歌 Chrome</a></div></div>
|
||||
<![endif]-->
|
||||
@RenderBody()
|
||||
|
||||
</body>
|
||||
</html>
|
@ -89,7 +89,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.getJSON('OrgManager/LoadForTree', function (json) {
|
||||
$.getJSON('/OrgManager/LoadForTree', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#j_select_tree1'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
|
@ -1,18 +1,15 @@
|
||||
@{
|
||||
string _prefix = "Stock";
|
||||
var _treeId = _prefix + "Tree";
|
||||
var _gridId = _prefix + "Grid";
|
||||
var _treeDetail = _prefix + "Detail";
|
||||
Layout = "~/Views/Shared/_BjuiLayout.cshtml";
|
||||
}
|
||||
|
||||
@{ Html.RenderAction("MenuHeader", "Home");}
|
||||
<div class="bjui-pageContent tableContent" style="position:relative">
|
||||
<div class="clearfix">
|
||||
<div style="float: left; width: 220px; overflow: auto;" class="table table-bordered">
|
||||
<ul id="@_treeId" class="ztree"></ul>
|
||||
<ul id="maintree" class="ztree"></ul>
|
||||
</div>
|
||||
|
||||
<div id="@_treeDetail" style="margin-left: 225px;">
|
||||
<div id="detail" style="margin-left: 225px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -26,12 +23,13 @@
|
||||
//加载数据到datagrid
|
||||
function loadDataGrid() {
|
||||
//b-jui的datagrid需要重新处理HTML
|
||||
$('#@_treeDetail').empty()
|
||||
.append('<table id="@_gridId" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
$('#detail').empty()
|
||||
.append('<table id="maingrid" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
|
||||
$('#@_gridId').datagrid({
|
||||
$('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
name: 'Id',
|
||||
@ -115,14 +113,14 @@
|
||||
callback: { onClick: zTreeOnClick }
|
||||
};
|
||||
$.getJSON('/OrgManager/LoadOrg', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#@_treeId'), setting, json);
|
||||
var zTreeObj = $.fn.zTree.init($('#maintree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
}
|
||||
|
||||
//删除
|
||||
function delStock() {
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/StockManager/Delete?Id=' + selected, function (data) {
|
||||
@ -136,7 +134,7 @@
|
||||
|
||||
//自定义的编辑按钮
|
||||
function editStock() {
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(this).dialog({
|
||||
@ -151,7 +149,7 @@
|
||||
}
|
||||
|
||||
function refreshStockGrid() {
|
||||
$('#@_gridId').datagrid('refresh');
|
||||
$('#maingrid').datagrid('refresh');
|
||||
// loadDataGrid();
|
||||
}
|
||||
//@@ sourceURL=StockManagerIndex.js
|
||||
|
@ -96,7 +96,7 @@
|
||||
onCheck: zTreeCheck
|
||||
}
|
||||
};
|
||||
$.getJSON('OrgManager/LoadOrg', function (json) {
|
||||
$.getJSON('/OrgManager/LoadOrg', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#j_select_tree1'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
|
@ -1,8 +1,5 @@
|
||||
@{
|
||||
string _prefix = "user";
|
||||
var _treeId = _prefix + "Tree";
|
||||
var _gridId = _prefix + "Grid";
|
||||
var _treeDetail = _prefix + "Detail";
|
||||
Layout = "~/Views/Shared/_BjuiLayout.cshtml";
|
||||
}
|
||||
|
||||
@{ Html.RenderAction("MenuHeader", "Home");}
|
||||
@ -10,11 +7,11 @@
|
||||
<div class="bjui-pageContent tableContent" style="position:relative">
|
||||
<div class="clearfix">
|
||||
<div style="float: left; width: 220px; overflow: auto;" class="table table-bordered">
|
||||
<ul id="@_treeId" class="ztree"></ul>
|
||||
<ul id="maintree" class="ztree"></ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="@_treeDetail" style="margin-left: 225px;">
|
||||
<div id="detail" style="margin-left: 225px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -29,12 +26,13 @@
|
||||
//加载数据到datagrid
|
||||
function loadDataGrid() {
|
||||
//b-jui的datagrid需要重新处理HTML
|
||||
$('#@_treeDetail').empty()
|
||||
.append('<table id="@_gridId" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
$('#detail').empty()
|
||||
.append('<table id="maingrid" class="table table-bordered table-hover table-striped table-top"></table>');
|
||||
|
||||
$('#@_gridId').datagrid({
|
||||
$('#maingrid').datagrid({
|
||||
showToolbar: false,
|
||||
filterThead: false,
|
||||
target: $(this),
|
||||
columns: [
|
||||
{
|
||||
name: 'Id',
|
||||
@ -116,7 +114,7 @@
|
||||
callback: { onClick: zTreeOnClick }
|
||||
};
|
||||
$.getJSON('/OrgManager/LoadOrg', function (json) {
|
||||
var zTreeObj = $.fn.zTree.init($('#@_treeId'), setting, json);
|
||||
var zTreeObj = $.fn.zTree.init($('#maintree'), setting, json);
|
||||
zTreeObj.expandAll(true);
|
||||
});
|
||||
}
|
||||
@ -125,7 +123,7 @@
|
||||
|
||||
//删除
|
||||
function delUser() {
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$.getJSON('/UserManager/Delete?Id=' + selected, function (data) {
|
||||
@ -139,7 +137,7 @@
|
||||
|
||||
//自定义的编辑按钮
|
||||
function editUser() {
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(this).dialog({
|
||||
@ -154,13 +152,13 @@
|
||||
}
|
||||
|
||||
function refreshUserGrid() {
|
||||
$('#@_gridId').datagrid('refresh');
|
||||
$('#maingrid').datagrid('refresh');
|
||||
}
|
||||
|
||||
//用户模块授权按钮
|
||||
function openUserModuleAccess(obj) {
|
||||
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(obj).dialog({
|
||||
@ -176,7 +174,7 @@
|
||||
//用户可见组织授权按钮
|
||||
function openUserOrgAccess(obj) {
|
||||
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(obj).dialog({
|
||||
@ -191,7 +189,7 @@
|
||||
|
||||
//用户角色授权
|
||||
function openUserRoleAccess(obj) {
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(obj).dialog({
|
||||
@ -208,7 +206,7 @@
|
||||
|
||||
//为用户分配资源
|
||||
function openUserReourceAccess(obj) {
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(obj).dialog({
|
||||
@ -225,7 +223,7 @@
|
||||
|
||||
//分配菜单
|
||||
function openAssignUserElement(obj) {
|
||||
var selected = getSelected('#@_gridId', 2);
|
||||
var selected = getSelected('#maingrid', 2);
|
||||
if (selected == null) return;
|
||||
|
||||
$(obj).dialog({
|
||||
@ -236,5 +234,4 @@
|
||||
height: 380
|
||||
});
|
||||
}
|
||||
//@@ sourceURL=userManagerIndex.js
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user