minor fix

This commit is contained in:
fbsanchez 2020-07-06 14:01:51 +02:00
parent 2442336f45
commit 53a2215a41
1 changed files with 31 additions and 33 deletions

View File

@ -768,41 +768,39 @@ var TreeController = {
}
// Data pop-up
if (
element.metaID != "undefined" &&
!isNaN(element.metaID) &&
element.metaID <= 0 &&
typeof element.id != "undefined" &&
!isNaN(element.id)
) {
var $dataImage = $(
'<img src="' +
(controller.baseURL.length > 0
? controller.baseURL
: "") +
'images/binary.png" /> '
);
$dataImage.addClass("module-data").click(function(e) {
e.stopPropagation();
if (typeof element.id != "undefined" && !isNaN(element.id)) {
if (isNaN(element.metaID)) {
var $dataImage = $(
'<img src="' +
(controller.baseURL.length > 0
? controller.baseURL
: "") +
'images/binary.png" /> '
);
$dataImage.addClass("module-data").click(function(e) {
e.stopPropagation();
try {
var serverName =
element.serverName.length > 0 ? element.serverName : "";
if ($("#module_details_window").length > 0)
show_module_detail_dialog(
element.id,
"",
serverName,
0,
86400,
element.name.replace(/&#x20;/g, " ")
);
} catch (error) {
// console.log(error);
}
});
try {
var serverName =
element.serverName.length > 0
? element.serverName
: "";
if ($("#module_details_window").length > 0)
show_module_detail_dialog(
element.id,
"",
serverName,
0,
86400,
element.name.replace(/&#x20;/g, " ")
);
} catch (error) {
// console.log(error);
}
});
$content.append($dataImage);
$content.append($dataImage);
}
}
}