mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Added groups acl in all visual console elements
This commit is contained in:
parent
bb05772d60
commit
fac066debd
@ -1239,6 +1239,7 @@ ALTER TABLE tlayout ADD `background_color` varchar(50) NOT NULL default '#FFF';
|
|||||||
ALTER TABLE tlayout_data ADD `type_graph` varchar(50) NOT NULL default 'area';
|
ALTER TABLE tlayout_data ADD `type_graph` varchar(50) NOT NULL default 'area';
|
||||||
ALTER TABLE tlayout_data ADD `label_position` varchar(50) NOT NULL default 'down';
|
ALTER TABLE tlayout_data ADD `label_position` varchar(50) NOT NULL default 'down';
|
||||||
ALTER TABLE tlayout_data ADD COLUMN `show_statistics` tinyint(2) NOT NULL default '0';
|
ALTER TABLE tlayout_data ADD COLUMN `show_statistics` tinyint(2) NOT NULL default '0';
|
||||||
|
ALTER TABLE tlayout_data ADD COLUMN `element_group` int(10) NOT NULL default '0';
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- Table `tagent_custom_fields`
|
-- Table `tagent_custom_fields`
|
||||||
|
@ -815,6 +815,7 @@ function readFields() {
|
|||||||
values['bars_graph_type'] = $("select[name=bars_graph_type]").val();
|
values['bars_graph_type'] = $("select[name=bars_graph_type]").val();
|
||||||
values['parent'] = $("select[name=parent]").val();
|
values['parent'] = $("select[name=parent]").val();
|
||||||
values['map_linked'] = $("select[name=map_linked]").val();
|
values['map_linked'] = $("select[name=map_linked]").val();
|
||||||
|
values['element_group'] = $("select[name=element_group]").val();
|
||||||
values['width_percentile'] = $("input[name=width_percentile]").val();
|
values['width_percentile'] = $("input[name=width_percentile]").val();
|
||||||
values['max_percentile'] = parseInt($("input[name=max_percentile]").val());
|
values['max_percentile'] = parseInt($("input[name=max_percentile]").val());
|
||||||
values['width_module_graph'] = $("input[name=width_module_graph]").val();
|
values['width_module_graph'] = $("input[name=width_module_graph]").val();
|
||||||
@ -1489,6 +1490,8 @@ function loadFieldsFromDB(item) {
|
|||||||
$("select[name=parent]").val(val);
|
$("select[name=parent]").val(val);
|
||||||
if (key == 'id_layout_linked')
|
if (key == 'id_layout_linked')
|
||||||
$("select[name=map_linked]").val(val);
|
$("select[name=map_linked]").val(val);
|
||||||
|
if (key == 'element_group')
|
||||||
|
$("select[name=element_group]").val(val);
|
||||||
if (key == 'width_percentile')
|
if (key == 'width_percentile')
|
||||||
$("input[name=width_percentile]").val(val);
|
$("input[name=width_percentile]").val(val);
|
||||||
if (key == 'max_percentile')
|
if (key == 'max_percentile')
|
||||||
@ -1771,6 +1774,9 @@ function hiddenFields(item) {
|
|||||||
$("#map_linked_row").css('display', 'none');
|
$("#map_linked_row").css('display', 'none');
|
||||||
$("#map_linked_row." + item).css('display', '');
|
$("#map_linked_row." + item).css('display', '');
|
||||||
|
|
||||||
|
$("#element_group_row").css('display', 'none');
|
||||||
|
$("#element_group_row." + item).css('display', '');
|
||||||
|
|
||||||
$("#module_graph_size_row").css('display', 'none');
|
$("#module_graph_size_row").css('display', 'none');
|
||||||
$("#module_graph_size_row." + item).css('display', '');
|
$("#module_graph_size_row." + item).css('display', '');
|
||||||
|
|
||||||
@ -1821,14 +1827,6 @@ function hiddenFields(item) {
|
|||||||
if (typeof(enterprise_hiddenFields) == 'function') {
|
if (typeof(enterprise_hiddenFields) == 'function') {
|
||||||
enterprise_hiddenFields(item);
|
enterprise_hiddenFields(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
//~ var code_control = tinyMCE.activeEditor.controlManager.controls['text-label_code'];
|
|
||||||
//~ if (item == 'label') {
|
|
||||||
//~ code_control.setDisabled(false);
|
|
||||||
//~ }
|
|
||||||
//~ else {
|
|
||||||
//~ code_control.setDisabled(true);
|
|
||||||
//~ }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanFields(item) {
|
function cleanFields(item) {
|
||||||
@ -1848,6 +1846,7 @@ function cleanFields(item) {
|
|||||||
$("input[name=height]").val(0);
|
$("input[name=height]").val(0);
|
||||||
$("select[name=parent]").val('');
|
$("select[name=parent]").val('');
|
||||||
$("select[name=map_linked]").val('');
|
$("select[name=map_linked]").val('');
|
||||||
|
$("select[name=element_group]").val('');
|
||||||
$("input[name=width_module_graph]").val(300);
|
$("input[name=width_module_graph]").val(300);
|
||||||
$("input[name=height_module_graph]").val(180);
|
$("input[name=height_module_graph]").val(180);
|
||||||
$("input[name='width_box']").val(300);
|
$("input[name='width_box']").val(300);
|
||||||
|
@ -100,6 +100,7 @@ $width = get_parameter('width', null);
|
|||||||
$height = get_parameter('height', null);
|
$height = get_parameter('height', null);
|
||||||
$parent = get_parameter('parent', null);
|
$parent = get_parameter('parent', null);
|
||||||
$map_linked = get_parameter('map_linked', null);
|
$map_linked = get_parameter('map_linked', null);
|
||||||
|
$element_group = get_parameter('element_group', null);
|
||||||
$width_percentile = get_parameter('width_percentile', null);
|
$width_percentile = get_parameter('width_percentile', null);
|
||||||
$max_percentile = get_parameter('max_percentile', null);
|
$max_percentile = get_parameter('max_percentile', null);
|
||||||
$height_module_graph = get_parameter('height_module_graph', null);
|
$height_module_graph = get_parameter('height_module_graph', null);
|
||||||
@ -584,6 +585,9 @@ switch ($action) {
|
|||||||
if ($map_linked !== null) {
|
if ($map_linked !== null) {
|
||||||
$values['id_layout_linked'] = $map_linked;
|
$values['id_layout_linked'] = $map_linked;
|
||||||
}
|
}
|
||||||
|
if ($element_group !== null) {
|
||||||
|
$values['element_group'] = $element_group;
|
||||||
|
}
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
// -- line_item ------------------------------------
|
// -- line_item ------------------------------------
|
||||||
case 'handler_start':
|
case 'handler_start':
|
||||||
@ -982,6 +986,7 @@ switch ($action) {
|
|||||||
}
|
}
|
||||||
$values['id_agente_modulo'] = $id_module;
|
$values['id_agente_modulo'] = $id_module;
|
||||||
$values['id_layout_linked'] = $map_linked;
|
$values['id_layout_linked'] = $map_linked;
|
||||||
|
$values['element_group'] = $element_group;
|
||||||
$values['parent_item'] = $parent;
|
$values['parent_item'] = $parent;
|
||||||
$values['enable_link'] = $enable_link;
|
$values['enable_link'] = $enable_link;
|
||||||
$values['image'] = $background_color;
|
$values['image'] = $background_color;
|
||||||
|
@ -3248,6 +3248,11 @@ function visual_map_print_visual_map ($id_layout, $show_links = true,
|
|||||||
|
|
||||||
|
|
||||||
foreach ($layout_datas as $layout_data) {
|
foreach ($layout_datas as $layout_data) {
|
||||||
|
$layout_group = $layout_data['element_group'];
|
||||||
|
if (!check_acl ($config['id_user'], $layout_group, "VR")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
//Check the items are from disabled or pending delete modules
|
//Check the items are from disabled or pending delete modules
|
||||||
if ($layout_data['id_agente_modulo'] != 0 &&
|
if ($layout_data['id_agente_modulo'] != 0 &&
|
||||||
(($layout_data['type'] != LABEL)
|
(($layout_data['type'] != LABEL)
|
||||||
|
@ -625,6 +625,16 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||||||
$form_items_advance['line_case']['html'] = '
|
$form_items_advance['line_case']['html'] = '
|
||||||
<td align="left">' . __('Lines haven\'t advanced options') . '</td>';
|
<td align="left">' . __('Lines haven\'t advanced options') . '</td>';
|
||||||
|
|
||||||
|
$user_groups = users_get_groups($config['id_user']);
|
||||||
|
$form_items_advance['element_group_row'] = array();
|
||||||
|
$form_items_advance['element_group_row']['items'] = array(
|
||||||
|
'group_item', 'static_graph', 'percentile_bar',
|
||||||
|
'percentile_item', 'module_graph', 'simple_value',
|
||||||
|
'icon', 'label', 'datos');
|
||||||
|
$form_items_advance['element_group_row']['html'] = '<td align="left">'.
|
||||||
|
__('Element group') . '</td>' .
|
||||||
|
'<td align="left">' . html_print_select($user_groups, 'element_group', '', '', '', 0, true) .
|
||||||
|
'</td>';
|
||||||
|
|
||||||
//Insert and modify before the buttons to create or update.
|
//Insert and modify before the buttons to create or update.
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed()) {
|
||||||
|
@ -1362,6 +1362,7 @@ CREATE TABLE IF NOT EXISTS `tlayout_data` (
|
|||||||
`border_color` varchar(200) DEFAULT "",
|
`border_color` varchar(200) DEFAULT "",
|
||||||
`fill_color` varchar(200) DEFAULT "",
|
`fill_color` varchar(200) DEFAULT "",
|
||||||
`show_statistics` tinyint(2) NOT NULL default '0',
|
`show_statistics` tinyint(2) NOT NULL default '0',
|
||||||
|
`element_group` int(10) NOT NULL default '0',
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user