mirror of https://github.com/jumpserver/jumpserver
[Update] 优化用户组详情,用户选择下拉列表使用异步加载;命令过滤详情绑定到系统用户点击不关闭;
parent
1bc6492064
commit
0930716a54
|
@ -144,7 +144,9 @@ function updateCMDFilterSystemUsers(system_users) {
|
|||
});
|
||||
}
|
||||
$(document).ready(function () {
|
||||
$(".select2").select2();
|
||||
$(".select2").select2({
|
||||
closeOnSelect: false
|
||||
});
|
||||
}).on('click', '#btn-binding-system-users', function () {
|
||||
var origin_system_users = $.map($(".bdg-system-users"), function (s) {
|
||||
return $(s).data('gid')
|
||||
|
|
|
@ -84,9 +84,6 @@
|
|||
<tr>
|
||||
<td colspan="2" class="no-borders">
|
||||
<select data-placeholder="{% trans 'Add user' %}" id="slct_users" class="select2" style="width: 100%" multiple="" tabindex="4">
|
||||
{% for user in users %}
|
||||
<option value="{{ user.id }}" id="opt_{{ user.id }}">{{ user.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -157,7 +154,8 @@ $(document).ready(function () {
|
|||
}).on('select2:unselect', function(evt) {
|
||||
var data = evt.params.data;
|
||||
delete jumpserver.users_selected[data.id]
|
||||
})
|
||||
});
|
||||
usersSelect2Init('#slct_users')
|
||||
}).on('click', '.btn_remove_user', function() {
|
||||
var $this = $(this);
|
||||
var $tr = $this.closest('tr');
|
||||
|
|
Loading…
Reference in New Issue