Revize c1bdc1c4
Přidáno uživatelem Michal Kliment před více než 9 roky(ů)
application/views/js/ifaces_add.php | ||
---|---|---|
{
|
||
$link_add_detail.hide();
|
||
}
|
||
|
||
var type = $('#itype').val();
|
||
|
||
if (!made)
|
||
{
|
||
var type = $('#itype').val();
|
||
var default_name = (type == <?php echo Iface_Model::TYPE_WIRELESS ?>) ? '<?php echo __('air') ?>' : '<?php echo __('cable') ?>';
|
||
|
||
$.ajax({
|
||
... | ... | |
$('#wireless_channel_width').val(null);
|
||
$('#wireless_polarization').val(null);
|
||
}
|
||
|
||
// inform user if the new connection will break some old connection (#397)
|
||
if (type == <?php echo Iface_Model::TYPE_PORT ?> || type == <?php echo Iface_Model::TYPE_ETHERNET ?>)
|
||
{
|
||
$.ajax({
|
||
method: 'get',
|
||
dataType: 'json',
|
||
url: '<?php echo url_lang::base(); ?>json/get_iface_and_device_connected_to_iface?iface_id=' + iface_id<?php if ($iface_id): echo " + '&parent_iface_id=$iface_id'"; endif; ?>,
|
||
success: function (v)
|
||
{
|
||
if (v && v.device && v.iface)
|
||
{
|
||
var m = '<?php echo __('Interface that you choosed is connected to another interface') ?>:\n\n';
|
||
m += '<?php echo __('Device') ?>: ' + v.device.id + ', ' + v.device.name + '\n';
|
||
m += '<?php echo __('Interface') ?>: ' + v.iface.name + ', ' + v.iface.mac + '\n\n';
|
||
m += '<?php echo __('If you do not change this connected to option, link between these devices will be destroyed') ?>!';
|
||
alert(m);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
// on add of new item to one of multiple selectboxes for port - vlan relationship
|
Také k dispozici: Unified diff
Release 1.1.0