Revize 1454
Přidáno uživatelem David Raška před více než 12 roky(ů)
freenetis/branches/network/application/i18n/cs_CZ/texts.php | ||
---|---|---|
'select channel' => 'Vyber kanál',
|
||
'select destination web' => 'Vyber cíl přesměrování',
|
||
'select device' => 'Vyber zařízení',
|
||
'select device using device map' => 'Vybrat zařízení pomocí mapy zařízení',
|
||
'select duration' => 'Vyber trvání přesměrování',
|
||
'select fee' => 'Vyber poplatek',
|
||
'select fee type' => 'Vyber typ poplatku',
|
freenetis/branches/network/application/controllers/js.php | ||
---|---|---|
$this->address_point_gps();
|
||
}
|
||
|
||
private function _js_devices_map()
|
||
{
|
||
$action = '';
|
||
$name = '';
|
||
if ($this->input->get('action'))
|
||
{
|
||
$action = $this->input->get('action');
|
||
}
|
||
|
||
if ($this->input->get('name'))
|
||
{
|
||
$name = $this->input->get('name');
|
||
}
|
||
|
||
$this->views['devices_map'] = View::factory('js/devices_map');
|
||
$this->views['devices_map']->action = $action;
|
||
$this->views['devices_map']->name = $name;
|
||
}
|
||
|
||
private function _js_ifaces_add()
|
||
{
|
||
$this->link_iface();
|
freenetis/branches/network/application/controllers/devices.php | ||
---|---|---|
*/
|
||
public function get_map()
|
||
{
|
||
if (!isset($_GET['from']) || $_GET['from'] == 'null')
|
||
if (!$this->input->get('from') || $this->input->get('from') == 'null')
|
||
return;
|
||
|
||
if (!isset($_GET['depth']))
|
||
if (!$this->input->get('depth'))
|
||
$depth = 2;
|
||
else
|
||
$depth = intval ($_GET['depth']);
|
||
$depth = intval ($this->input->get('depth'));
|
||
|
||
$device_id = intval ($_GET['from']);
|
||
$device_id = intval ($this->input->get('from'));
|
||
|
||
if ($_GET['root'] != 'true')
|
||
if ($this->input->get('root') != 'true')
|
||
{
|
||
$result = $this->_dependent_device($device_id, $depth+1);
|
||
echo json_encode($result['children']);
|
freenetis/branches/network/application/libraries/Path.php | ||
---|---|---|
public function clear()
|
||
{
|
||
if (isset($_GET['__url__']))
|
||
$this->path = url::base().Config::get('lang').'/'.urldecode($_GET['__url__']);
|
||
$this->path = url::base().Config::get('lang').'/'.urldecode($this->input->get('__url__'));
|
||
return $this;
|
||
}
|
||
|
freenetis/branches/network/application/views/js/devices_add.php | ||
---|---|---|
});
|
||
|
||
return false;
|
||
}
|
||
|
||
/**
|
||
* Allows to select device using dialog with device tree.
|
||
*/
|
||
function select_device_using_map()
|
||
{
|
||
//'cs/devices/map?popup=1'
|
||
}
|
||
|
||
/**
|
||
* On change of connected to device dropdown, select suitable ifaces
|
||
... | ... | |
|
||
$eif.html(options.join('')).trigger('change');
|
||
});
|
||
|
||
// change map button href for prefilled enum type in add form dialog
|
||
var map_a = $(this).parent().find('.device_map');
|
||
|
||
if (map_a.length)
|
||
{
|
||
var parts = map_a.attr('href').split('?');
|
||
map_a.attr('href', rtrim(parts[0], '0123456789/') + '/' + $(this).val() + '?' + parts[1]);
|
||
}
|
||
}
|
||
|
||
/**
|
||
... | ... | |
style : 'width: 13em',
|
||
change : use_row
|
||
}).bind('change', change_connected).html(devices_options)).append($('<a>', {
|
||
href : '#',
|
||
click : select_device_using_map,
|
||
href : '<?php echo url_lang::base() ?>devices/map?action=devices_add&name=connected[' + i + ']',
|
||
title : '<?php echo __('Select device using device map') ?>'
|
||
}).addClass('device_add_detail_button').html('<?php echo html::image(array('src' => 'media/images/icons/map_icon.gif')) ?>')).append($('<br>')).append($('<select>', {
|
||
}).addClass('device_add_detail_button').addClass('popup_link').addClass('device_map').html('<?php echo html::image(array('src' => 'media/images/icons/map_icon.gif')) ?>')).append($('<br>')).append($('<select>', {
|
||
name : 'connected_iface[' + i + ']',
|
||
style : 'width: 13em',
|
||
change : change_connected_iface
|
freenetis/branches/network/application/views/js/devices_map.php | ||
---|---|---|
initTrees();
|
||
})
|
||
|
||
$('#tree a').live('click', function()
|
||
{
|
||
var link = '<?php echo url_lang::base() ?>devices/show/' + $(this).parent().attr('id');
|
||
|
||
if (!$(this).hasClass('popup_link'))
|
||
{
|
||
$(this).addClass('popup_link').attr('href', link).trigger('click');
|
||
}
|
||
})
|
||
$('#tree a').live('click', function()
|
||
{
|
||
//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' && $name <> ''): ?>
|
||
$('select[name="<?php echo $name ?>"]').val($(this).parent().attr('id')).trigger('change');
|
||
|
||
$(this).parents().find('.dialog').dialog('close');
|
||
|
||
<?php else: ?>
|
||
var link = '<?php echo url_lang::base() ?>devices/show/' + $(this).parent().attr('id');
|
||
|
||
if (!$(this).hasClass('popup_link'))
|
||
{
|
||
$(this).addClass('popup_link').attr('href', link).trigger('click');
|
||
}
|
||
<?php endif; ?>
|
||
})
|
||
|
||
$(document).ready(function()
|
||
{
|
Také k dispozici: Unified diff
Upravy:
- Pridani vyberu "Pripojeno k zarizeni" pomoci mapy zarizeni