mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-05 17:30:30 +00:00
[Update] Merge with dev
This commit is contained in:
@@ -271,7 +271,7 @@ function requestApi(props) {
|
||||
$.ajax({
|
||||
url: props.url,
|
||||
type: props.method || "PATCH",
|
||||
data: props.body,
|
||||
data: props.body || props.data,
|
||||
contentType: props.content_type || "application/json; charset=utf-8",
|
||||
dataType: props.data_type || "json"
|
||||
}).done(function (data, textStatue, jqXHR) {
|
||||
@@ -960,8 +960,13 @@ function initPopover($container, $progress, $idPassword, $el, password_check_rul
|
||||
function rootNodeAddDom(ztree, callback) {
|
||||
var refreshIcon = "<a id='tree-refresh'><i class='fa fa-refresh'></i></a>";
|
||||
var rootNode = ztree.getNodes()[0];
|
||||
var $rootNodeRef = $("#" + rootNode.tId + "_a");
|
||||
$rootNodeRef.after(refreshIcon);
|
||||
if (rootNode) {
|
||||
var $rootNodeRef = $("#" + rootNode.tId + "_a");
|
||||
$rootNodeRef.after(refreshIcon);
|
||||
} else {
|
||||
$rootNodeRef = $('#' + ztree.setting.treeId);
|
||||
$rootNodeRef.html(refreshIcon);
|
||||
}
|
||||
var refreshIconRef = $('#tree-refresh');
|
||||
refreshIconRef.bind('click', function () {
|
||||
ztree.destroy();
|
||||
|
Reference in New Issue
Block a user