* Adjust zanode create linkage.

This commit is contained in:
caoyanyi
2024-03-08 11:20:50 +08:00
parent fe8e7384c3
commit 749733e7aa
2 changed files with 13 additions and 9 deletions
+8 -3
View File
@@ -24,10 +24,10 @@ function onChangeType()
}
}
function onHostChange(event)
function onHostChange(host)
{
var hostID = $(event.target).val();
var link = $.createLink('zanode', 'ajaxGetImages', 'hostID=' + hostID);
const hostID = typeof host == 'object' ? $('[name=parent]').val() : host;
var link = $.createLink('zanode', 'ajaxGetImages', 'hostID=' + hostID);
$.get(link, function(data)
{
if(data)
@@ -106,3 +106,8 @@ function onChangeSystem(event)
$osPicker.render({items: osItems});
$osPicker.$.clear();
}
$(function()
{
if(hostID) onHostChange(hostID);
});
+5 -6
View File
@@ -12,6 +12,7 @@ namespace zin;
jsVar('linuxList', $config->zanode->linuxList);
jsVar('windowsList', $config->zanode->windowsList);
jsVar('hostID', $hostID);
formPanel
(
@@ -26,10 +27,10 @@ formPanel
(
array
(
'toggle' => 'tooltip',
'placement' => 'right',
'title' => $lang->zanode->tips,
'type' => 'white',
'toggle' => 'tooltip',
'placement' => 'right',
'title' => $lang->zanode->tips,
'type' => 'white',
'class-name' => 'text-gray border border-light'
)
),
@@ -181,5 +182,3 @@ formPanel
set::control('editor')
)
);
render();