mirror of https://github.com/abpframework/abp.git
15 changed files with 23 additions and 237 deletions
@ -1,10 +1,3 @@ |
|||||
[ |
[ |
||||
{ |
|
||||
"outputFile": "wwwroot/pages/identity/users/index.css", |
|
||||
"inputFile": "wwwroot/pages/identity/users/index.less" |
|
||||
}, |
|
||||
{ |
|
||||
"outputFile": "wwwroot/pages/identity/users/index.es5.js", |
|
||||
"inputFile": "wwwroot/pages/identity/users/index.js" |
|
||||
} |
|
||||
] |
] |
||||
@ -1,6 +0,0 @@ |
|||||
'use strict'; |
|
||||
|
|
||||
$(function () { |
|
||||
$('#IdentityUsersTable').DataTable(); |
|
||||
}); |
|
||||
|
|
||||
@ -1 +0,0 @@ |
|||||
"use strict";$(function(){$("#IdentityUsersTable").DataTable()}); |
|
||||
@ -1,92 +0,0 @@ |
|||||
'use strict'; |
|
||||
|
|
||||
(function ($) { |
|
||||
|
|
||||
var l = abp.localization.getResource('AbpIdentity'); |
|
||||
|
|
||||
var _identityUserAppService = volo.abp.identity.identityUser; |
|
||||
var _editModal = new abp.ModalManager(abp.appPath + 'Identity/Users/EditModal'); |
|
||||
var _createModal = new abp.ModalManager(abp.appPath + 'Identity/Users/CreateModal'); |
|
||||
var _permissionsModal = new abp.ModalManager(abp.appPath + 'AbpPermissionManagement/PermissionManagementModal'); |
|
||||
|
|
||||
$(function () { |
|
||||
|
|
||||
var _$wrapper = $('#IdentityUsersWrapper'); |
|
||||
var _$table = _$wrapper.find('table'); |
|
||||
var _dataTable = _$table.DataTable({ |
|
||||
order: [[1, "asc"]], |
|
||||
ajax: abp.libs.datatables.createAjax(_identityUserAppService.getList), |
|
||||
columnDefs: [{ |
|
||||
//TODO: Can we eleminate targets, data, orderable, autoWidth, defaultContent fields or make these values default
|
|
||||
targets: 0, |
|
||||
data: null, |
|
||||
orderable: false, |
|
||||
autoWidth: false, |
|
||||
defaultContent: '', |
|
||||
rowAction: { |
|
||||
text: '<i class="fa fa-cog"></i> ' + l('Actions') + ' <span class="caret"></span>', //TODO: Add icon option and set text as only l('Actions')
|
|
||||
items: [{ |
|
||||
//TODO: Allow to add icon
|
|
||||
text: l('Edit'), |
|
||||
visible: function visible() { |
|
||||
//TODO: Allow visible to be a boolean for simple cases (and true by default)
|
|
||||
return true; |
|
||||
}, |
|
||||
action: function action(data) { |
|
||||
_editModal.open({ |
|
||||
id: data.record.id |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
text: l('Permissions'), |
|
||||
visible: function visible() { |
|
||||
return true; |
|
||||
}, |
|
||||
action: function action(data) { |
|
||||
_permissionsModal.open({ |
|
||||
providerName: 'User', |
|
||||
providerKey: data.record.id |
|
||||
}); |
|
||||
} |
|
||||
}, { |
|
||||
text: l('Delete'), |
|
||||
visible: function visible() { |
|
||||
return true; |
|
||||
}, |
|
||||
confirmMessage: function confirmMessage(data) { |
|
||||
return l('UserDeletionConfirmationMessage', data.record.userName); |
|
||||
}, |
|
||||
action: function action(data) { |
|
||||
_identityUserAppService['delete'](data.record.id).then(function () { |
|
||||
_dataTable.ajax.reload(); |
|
||||
}); |
|
||||
} |
|
||||
}] |
|
||||
} |
|
||||
}, { |
|
||||
targets: 1, |
|
||||
data: "userName" |
|
||||
}, { |
|
||||
targets: 2, |
|
||||
data: "email" |
|
||||
}, { |
|
||||
targets: 3, |
|
||||
data: "phoneNumber" |
|
||||
}] |
|
||||
}); |
|
||||
|
|
||||
_createModal.onResult(function () { |
|
||||
_dataTable.ajax.reload(); |
|
||||
}); |
|
||||
|
|
||||
_editModal.onResult(function () { |
|
||||
_dataTable.ajax.reload(); |
|
||||
}); |
|
||||
|
|
||||
_$wrapper.find('button[name=CreateUser]').click(function (e) { |
|
||||
e.preventDefault(); |
|
||||
_createModal.open(); |
|
||||
}); |
|
||||
}); |
|
||||
})(jQuery); |
|
||||
|
|
||||
@ -1 +0,0 @@ |
|||||
"use strict";(function(n){var t=abp.localization.getResource("AbpIdentity"),i=volo.abp.identity.identityUser,r=new abp.ModalManager(abp.appPath+"Identity/Users/EditModal"),u=new abp.ModalManager(abp.appPath+"Identity/Users/CreateModal"),f=new abp.ModalManager(abp.appPath+"AbpPermissionManagement/PermissionManagementModal");n(function(){var o=n("#IdentityUsersWrapper"),s=o.find("table"),e=s.DataTable({order:[[1,"asc"]],ajax:abp.libs.datatables.createAjax(i.getList),columnDefs:[{targets:0,data:null,orderable:!1,autoWidth:!1,defaultContent:"",rowAction:{text:'<i class="fa fa-cog"><\/i> '+t("Actions")+' <span class="caret"><\/span>',items:[{text:t("Edit"),visible:function(){return!0},action:function(n){r.open({id:n.record.id})}},{text:t("Permissions"),visible:function(){return!0},action:function(n){f.open({providerName:"User",providerKey:n.record.id})}},{text:t("Delete"),visible:function(){return!0},confirmMessage:function(n){return t("UserDeletionConfirmationMessage",n.record.userName)},action:function(n){i["delete"](n.record.id).then(function(){e.ajax.reload()})}}]}},{targets:1,data:"userName"},{targets:2,data:"email"},{targets:3,data:"phoneNumber"}]});u.onResult(function(){e.ajax.reload()});r.onResult(function(){e.ajax.reload()});o.find("button[name=CreateUser]").click(function(n){n.preventDefault();u.open()})})})(jQuery); |
|
||||
@ -1,6 +1,2 @@ |
|||||
[ |
[ |
||||
{ |
|
||||
"outputFile": "wwwroot/modules/multi-tenancy/views/tenants/index.css", |
|
||||
"inputFile": "wwwroot/modules/multi-tenancy/views/tenants/index.less" |
|
||||
} |
|
||||
] |
] |
||||
@ -1,21 +0,0 @@ |
|||||
.dataTable { |
|
||||
width: 100% !important; |
|
||||
border-spacing: 0 !important; |
|
||||
} |
|
||||
.table td, |
|
||||
.table th { |
|
||||
padding: 8px 10px; |
|
||||
} |
|
||||
.dataTable tbody tr td button { |
|
||||
cursor: pointer; |
|
||||
} |
|
||||
.dataTable tbody tr td div.dropdown ul.dropdown-menu li { |
|
||||
cursor: pointer; |
|
||||
padding: 5px; |
|
||||
} |
|
||||
.dataTable tbody tr td div.dropdown ul.dropdown-menu li a { |
|
||||
display: block; |
|
||||
} |
|
||||
.dataTable tbody tr td div.dropdown ul.dropdown-menu li:hover { |
|
||||
background: #f4f5f8; |
|
||||
} |
|
||||
@ -1,6 +0,0 @@ |
|||||
'use strict'; |
|
||||
|
|
||||
$(function () { |
|
||||
$('#IdentityUsersTable').DataTable(); |
|
||||
}); |
|
||||
|
|
||||
@ -1 +0,0 @@ |
|||||
"use strict";$(function(){$("#IdentityUsersTable").DataTable()}); |
|
||||
@ -1,39 +0,0 @@ |
|||||
//TODO: This code is duplicated for other pages too. Unify them. |
|
||||
.dataTable { |
|
||||
width: 100% !important; |
|
||||
border-spacing: 0 !important; |
|
||||
} |
|
||||
|
|
||||
.table td, .table th { |
|
||||
padding: 8px 10px; |
|
||||
} |
|
||||
|
|
||||
.dataTable { |
|
||||
tbody { |
|
||||
tr { |
|
||||
td { |
|
||||
|
|
||||
button { |
|
||||
cursor: pointer; |
|
||||
} |
|
||||
|
|
||||
div.dropdown { |
|
||||
ul.dropdown-menu { |
|
||||
li { |
|
||||
cursor: pointer; |
|
||||
padding: 5px; |
|
||||
|
|
||||
a { |
|
||||
display: block; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
li:hover { |
|
||||
background: #f4f5f8; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1 +0,0 @@ |
|||||
.dataTable{width:100% !important;border-spacing:0 !important;}.table td,.table th{padding:8px 10px;}.dataTable tbody tr td button{cursor:pointer;}.dataTable tbody tr td div.dropdown ul.dropdown-menu li{cursor:pointer;padding:5px;}.dataTable tbody tr td div.dropdown ul.dropdown-menu li a{display:block;}.dataTable tbody tr td div.dropdown ul.dropdown-menu li:hover{background:#f4f5f8;} |
|
||||
Loading…
Reference in new issue