* Adjust zanode create linkage.
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user