Revize 1465
Přidáno uživatelem Ondřej Fibich před asi 12 roky(ů)
freenetis/branches/network/application/views/js/devices_map.php | ||
---|---|---|
|
||
function initTrees()
|
||
{
|
||
if (!device_id)
|
||
{
|
||
return false;
|
||
}
|
||
|
||
$('#tree').jstree({
|
||
'json_data' : {
|
||
'ajax' : {
|
||
... | ... | |
//if map is used for selecting device (eg. connect to selected device), update data and close dialog
|
||
//if map is used for viewing devices, show details of selected device
|
||
<?php if ($action == 'devices_add' && !empty($name)): ?>
|
||
$('select[name="<?php echo $name ?>"]').val($(this).parent().attr('id')).trigger('change');
|
||
var val = $(this).parent().attr('id');
|
||
$('select[name="<?php echo $name ?>"] option[value="' + val + '"]').attr('selected', true).trigger('change');
|
||
$(this).parents().find('.dialog').dialog('close');
|
||
$('#tree a').die().unbind('click');
|
||
$('#tree').parent().remove();
|
||
<?php else: ?>
|
||
var link = '<?php echo url_lang::base() ?>devices/show/' + $(this).parent().attr('id');
|
||
|
||
... | ... | |
<?php endif; ?>
|
||
});
|
||
|
||
$(document).ready(function()
|
||
{
|
||
initTrees();
|
||
});
|
||
initTrees();
|
||
|
Také k dispozici: Unified diff
Upravy:
- optimalizace JS u mapy zarizeni