mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2013-06-24 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js, godmode/reporting/visual_console_builder.editor.php, include/functions_visual_map_editor.php: changed the code to show the list of parent in the select, now this selectbox doesn't show the same item. MERGED FROM THE BRANCH PANDORA_4.0 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8374 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
7cbf41b007
commit
a78937a5eb
@ -1,3 +1,13 @@
|
|||||||
|
2013-06-24 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* godmode/reporting/visual_console_builder.editor.js,
|
||||||
|
godmode/reporting/visual_console_builder.editor.php,
|
||||||
|
include/functions_visual_map_editor.php: changed the code to show
|
||||||
|
the list of parent in the select, now this selectbox doesn't show
|
||||||
|
the same item.
|
||||||
|
|
||||||
|
MERGED FROM THE BRANCH PANDORA_4.0
|
||||||
|
|
||||||
2013-06-20 Mario Pulido <mario.pulido@artica.es>
|
2013-06-20 Mario Pulido <mario.pulido@artica.es>
|
||||||
|
|
||||||
*include/help/es/help_module_tokens.php
|
*include/help/es/help_module_tokens.php
|
||||||
|
@ -20,6 +20,7 @@ var toolbuttonActive = null;
|
|||||||
var autosave = true;
|
var autosave = true;
|
||||||
var list_actions_pending_save = [];
|
var list_actions_pending_save = [];
|
||||||
var temp_id_item = 0;
|
var temp_id_item = 0;
|
||||||
|
var parents = {};
|
||||||
|
|
||||||
var SIZE_GRID = 16; //Const the size (for width and height) of grid.
|
var SIZE_GRID = 16; //Const the size (for width and height) of grid.
|
||||||
|
|
||||||
@ -40,6 +41,10 @@ function toggle_advance_options_palette(close) {
|
|||||||
function visual_map_main() {
|
function visual_map_main() {
|
||||||
$(".label_color").attachColorPicker();
|
$(".label_color").attachColorPicker();
|
||||||
|
|
||||||
|
//Get the list of posible parents
|
||||||
|
parents = Base64.decode($("input[name='parents_load']").val());
|
||||||
|
parents = eval("(" + parents + ")");
|
||||||
|
|
||||||
eventsBackground();
|
eventsBackground();
|
||||||
eventsItems();
|
eventsItems();
|
||||||
|
|
||||||
@ -388,6 +393,21 @@ function toggle_item_palette() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fill_parent_select(id_item) {
|
||||||
|
//Populate the parent widget
|
||||||
|
$("#parent option")
|
||||||
|
.filter(function() { if ($(this).attr('value') != 0) return true; })
|
||||||
|
.remove();
|
||||||
|
jQuery.each(parents, function(key, value) {
|
||||||
|
if (id_item == key) {
|
||||||
|
return; //continue
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#parent").append($('<option value="' + key + '">' +
|
||||||
|
value + '</option>'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function loadFieldsFromDB(item) {
|
function loadFieldsFromDB(item) {
|
||||||
metaconsole = $("input[name='metaconsole']").val();
|
metaconsole = $("input[name='metaconsole']").val();
|
||||||
|
|
||||||
@ -416,6 +436,8 @@ function loadFieldsFromDB(item) {
|
|||||||
{
|
{
|
||||||
var moduleId = 0;
|
var moduleId = 0;
|
||||||
|
|
||||||
|
fill_parent_select(idItem);
|
||||||
|
|
||||||
jQuery.each(data, function(key, val) {
|
jQuery.each(data, function(key, val) {
|
||||||
if (key == 'background') $("#background_image").val(val);
|
if (key == 'background') $("#background_image").val(val);
|
||||||
if (key == 'width') $("input[name=width]").val(val);
|
if (key == 'width') $("input[name=width]").val(val);
|
||||||
@ -692,6 +714,8 @@ function cleanFields() {
|
|||||||
$("input[name=height_module_graph]").val(180);
|
$("input[name=height_module_graph]").val(180);
|
||||||
$("#preview").empty();
|
$("#preview").empty();
|
||||||
|
|
||||||
|
fill_parent_select();
|
||||||
|
|
||||||
var anyText = $("#any_text").html(); //Trick for catch the translate text.
|
var anyText = $("#any_text").html(); //Trick for catch the translate text.
|
||||||
$("#module").empty().append($('<option value="0" selected="selected">' + anyText + '</option></select>'));
|
$("#module").empty().append($('<option value="0" selected="selected">' + anyText + '</option></select>'));
|
||||||
}
|
}
|
||||||
@ -1179,7 +1203,8 @@ function createItem(type, values, id_data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addItemSelectParents(id_data, text) {
|
function addItemSelectParents(id_data, text) {
|
||||||
$("#parent").append($('<option value="' + id_data + '" selected="selected">' + text + '</option></select>'));
|
parents[id_data] = text;
|
||||||
|
//$("#parent").append($('<option value="' + id_data + '" selected="selected">' + text + '</option></select>'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function insertDB(type, values) {
|
function insertDB(type, values) {
|
||||||
|
@ -72,8 +72,10 @@ echo "<div id='background_grid'
|
|||||||
//Print the layout datas from the DB.
|
//Print the layout datas from the DB.
|
||||||
foreach ($layoutDatas as $layoutData) {
|
foreach ($layoutDatas as $layoutData) {
|
||||||
// Pending delete and disable modules must be ignored
|
// Pending delete and disable modules must be ignored
|
||||||
$delete_pending_module = db_get_value ("delete_pending", "tagente_modulo", "id_agente_modulo", $layoutData["id_agente_modulo"]);
|
$delete_pending_module = db_get_value ("delete_pending",
|
||||||
$disabled_module = db_get_value ("disabled", "tagente_modulo", "id_agente_modulo", $layoutData["id_agente_modulo"]);
|
"tagente_modulo", "id_agente_modulo", $layoutData["id_agente_modulo"]);
|
||||||
|
$disabled_module = db_get_value ("disabled",
|
||||||
|
"tagente_modulo", "id_agente_modulo", $layoutData["id_agente_modulo"]);
|
||||||
|
|
||||||
if ($delete_pending_module == 1 || $disabled_module == 1)
|
if ($delete_pending_module == 1 || $disabled_module == 1)
|
||||||
continue;
|
continue;
|
||||||
|
@ -302,6 +302,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||||||
$form_items_advance['parent_row']['html'] = '<td align="left">' .
|
$form_items_advance['parent_row']['html'] = '<td align="left">' .
|
||||||
__('Parent') . '</td>
|
__('Parent') . '</td>
|
||||||
<td align="left">' .
|
<td align="left">' .
|
||||||
|
html_print_input_hidden('parents_load', base64_encode(json_encode($parents)), true) .
|
||||||
html_print_select($parents, 'parent', '', '', __('None'), 0, true) .
|
html_print_select($parents, 'parent', '', '', __('None'), 0, true) .
|
||||||
'</td>';
|
'</td>';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user