From e48f675935b3a75c131686aac589c74bda10fc2f Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 11 Nov 2014 17:02:52 +0100 Subject: [PATCH] Removed the un used field label_color. --- .../extensions/resource_exportation.php | 3 -- .../extensions/resource_registration.php | 2 - .../pandoradb_migrate_5.1_to_6.0.mysql.sql | 1 + .../pandoradb_migrate_5.1_to_6.0.oracle.sql | 3 +- ...andoradb_migrate_5.1_to_6.0.postgreSQL.sql | 3 +- .../visual_console_builder.editor.js | 31 +++--------- .../visual_console_builder.elements.php | 18 +------ .../reporting/visual_console_builder.php | 1 - .../ajax/visual_console_builder.ajax.php | 5 -- .../include/functions_visual_map.php | 50 ++++++------------- .../include/functions_visual_map_editor.php | 9 ---- pandora_console/pandoradb.oracle.sql | 1 - pandora_console/pandoradb.postgreSQL.sql | 1 - pandora_console/pandoradb.sql | 1 - 14 files changed, 30 insertions(+), 99 deletions(-) mode change 100644 => 100755 pandora_console/extensions/resource_exportation.php mode change 100644 => 100755 pandora_console/extensions/resource_registration.php mode change 100644 => 100755 pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql mode change 100644 => 100755 pandora_console/extras/pandoradb_migrate_5.1_to_6.0.oracle.sql mode change 100644 => 100755 pandora_console/extras/pandoradb_migrate_5.1_to_6.0.postgreSQL.sql mode change 100644 => 100755 pandora_console/godmode/reporting/visual_console_builder.editor.js mode change 100644 => 100755 pandora_console/godmode/reporting/visual_console_builder.elements.php mode change 100644 => 100755 pandora_console/include/ajax/visual_console_builder.ajax.php mode change 100644 => 100755 pandora_console/include/functions_visual_map_editor.php mode change 100644 => 100755 pandora_console/pandoradb.oracle.sql mode change 100644 => 100755 pandora_console/pandoradb.postgreSQL.sql mode change 100644 => 100755 pandora_console/pandoradb.sql diff --git a/pandora_console/extensions/resource_exportation.php b/pandora_console/extensions/resource_exportation.php old mode 100644 new mode 100755 index 528f6c112b..d64d13f6e5 --- a/pandora_console/extensions/resource_exportation.php +++ b/pandora_console/extensions/resource_exportation.php @@ -291,9 +291,6 @@ function output_xml_visual_console($id) { if ($item['parent_item'] != 0) { echo "" . $item['parent_item'] . "\n"; } - if (!empty($item['label_color'])) { - echo "" . $item['label_color'] . "\n"; - } echo "\n"; } echo "\n"; diff --git a/pandora_console/extensions/resource_registration.php b/pandora_console/extensions/resource_registration.php old mode 100644 new mode 100755 index 0a77928765..1afe93e611 --- a/pandora_console/extensions/resource_registration.php +++ b/pandora_console/extensions/resource_registration.php @@ -517,8 +517,6 @@ function process_upload_xml_visualmap($xml, $filter_group = 0) { $values['image'] = (string)$item->image; if (isset($item->period)) $values['period'] = (string)$item->period; - if (isset($item->label_color)) - $values['label_color'] = (string)$item->label_color; if (isset($item->parent_item)) { //Hack for link the items use the OTHER_ID // and have too OTHER_ID diff --git a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql old mode 100644 new mode 100755 index f2bebfbf44..61ec1bc8ff --- a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql @@ -9,6 +9,7 @@ ALTER TABLE tlayout DROP COLUMN fullscreen; -- --------------------------------------------------------------------- ALTER TABLE tlayout_data DROP COLUMN no_link_color; +ALTER TABLE tlayout_data DROP COLUMN label_color; diff --git a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.oracle.sql b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.oracle.sql old mode 100644 new mode 100755 index 7f8a66c676..615dfb4db2 --- a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.oracle.sql +++ b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.oracle.sql @@ -8,4 +8,5 @@ ALTER TABLE tlayout DROP COLUMN fullscreen; -- Table `tlayout_data` -- --------------------------------------------------------------------- -ALTER TABLE tlayout_data DROP COLUMN no_link_color; \ No newline at end of file +ALTER TABLE tlayout_data DROP COLUMN no_link_color; +ALTER TABLE tlayout_data DROP COLUMN label_color; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.postgreSQL.sql b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.postgreSQL.sql old mode 100644 new mode 100755 index 24e634274c..46d9a47fdd --- a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.postgreSQL.sql +++ b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.postgreSQL.sql @@ -8,4 +8,5 @@ ALTER TABLE "tlayout" DROP COLUMN "fullscreen"; -- Table `tlayout_data` -- --------------------------------------------------------------------- -ALTER TABLE "tlayout_data" DROP COLUMN "no_link_color"; \ No newline at end of file +ALTER TABLE "tlayout_data" DROP COLUMN "no_link_color"; +ALTER TABLE "tlayout_data" DROP COLUMN "label_color"; \ No newline at end of file diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js old mode 100644 new mode 100755 index 734ae47c16..e9edf0a695 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -39,7 +39,6 @@ function toggle_advance_options_palette(close) { // Main function, execute in event documentReady function visual_map_main() { - $(".label_color").attachColorPicker(); //Get the list of posible parents parents = Base64.decode($("input[name='parents_load']").val()); @@ -134,8 +133,6 @@ function update_button_palette_callback() { case 'static_graph': $("#text_" + idItem).html(values['label']); - $("#" + idItem).css('color', values['label_color']); - if ((values['width'] != 0) && (values['height'] != 0)) { $("#image_" + idItem).attr('width', values['width']); $("#image_" + idItem).attr('height', values['height']); @@ -169,8 +166,6 @@ function update_button_palette_callback() { $("#simplevalue_" + idItem).html(getModuleValue(idItem,values['process_simple_value'], values['period'])); break; case 'label': - $("#" + idItem).css('color', values['label_color']); - $("#text_" + idItem).html(values['label']); break; case 'icon': @@ -240,7 +235,6 @@ function readFields() { values['height'] = $("input[name=height]").val(); values['parent'] = $("select[name=parent]").val(); values['map_linked'] = $("select[name=map_linked]").val(); - values['label_color'] = $("input[name=label_color]").val(); values['width_percentile'] = $("input[name=width_percentile]").val(); values['max_percentile'] = $("input[name=max_percentile]").val(); values['width_module_graph'] = $("input[name=width_module_graph]").val(); @@ -562,7 +556,6 @@ function loadFieldsFromDB(item) { if (key == 'height') $("input[name=height]").val(val); if (key == 'parent_item') $("select[name=parent]").val(val); if (key == 'id_layout_linked') $("select[name=map_linked]").val(val); - if (key == 'label_color') $("input[name=label_color]").val(val); if (key == 'width_percentile') $("input[name=width_percentile]").val(val); if (key == 'max_percentile') $("input[name=max_percentile]").val(val); if (key == 'width_module_graph') $("input[name=width_module_graph]").val(val); @@ -751,9 +744,6 @@ function hiddenFields(item) { $("#map_linked_row").css('display', 'none'); $("#map_linked_row." + item).css('display', ''); - $("#label_color_row").css('display', 'none'); - $("#label_color_row." + item).css('display', ''); - $("#module_graph_size_row").css('display', 'none'); $("#module_graph_size_row." + item).css('display', ''); @@ -771,7 +761,7 @@ function hiddenFields(item) { if (typeof(enterprise_hiddenFields) == 'function') { enterprise_hiddenFields(item); } - + var code_control = tinyMCE.activeEditor.controlManager.controls['text-label_code']; if (item == 'label') { code_control.setDisabled(false); @@ -798,7 +788,6 @@ function cleanFields(item) { $("input[name=height]").val(0); $("select[name=parent]").val(''); $("select[name=map_linked]").val(''); - $("input[name=label_color]").val('#000000'); $("input[name=width_module_graph]").val(300); $("input[name=height_module_graph]").val(180); $("#preview").empty(); @@ -1213,8 +1202,7 @@ function createItem(type, values, id_data) { item = $('
' + '
' + '' + values['label'] + '' + @@ -1227,16 +1215,14 @@ function createItem(type, values, id_data) { var imageSize = ''; if (values['type_percentile'] == 'percentile') { - item = $('
' + + item = $('
' + '' + values['label'] + '
' + '' + '
' ); } else { - item = $('
' + + item = $('
' + '' + values['label'] + '
' + '' + '
' @@ -1247,7 +1233,7 @@ function createItem(type, values, id_data) { sizeStyle = ''; imageSize = ''; - item = $('
' + + item = $('
' + '' + values['label'] + '
' + '' + '
' @@ -1257,7 +1243,7 @@ function createItem(type, values, id_data) { sizeStyle = ''; imageSize = ''; - item = $('
' + + item = $('
' + ' ' + values['label'] + ' ' + '
' ); @@ -1265,7 +1251,7 @@ function createItem(type, values, id_data) { case 'label': item = $('
' + '' + values['label'] + @@ -1301,7 +1287,7 @@ function createItem(type, values, id_data) { } }); - item = $('
' + + item = $('
' + '
' + '
' ); @@ -1474,7 +1460,6 @@ function updateDB_visual(type, idElement , values, event, top, left) { $("#" + idElement).css('top', '0px').css('top', top + 'px'); $("#" + idElement).css('left', '0px').css('left', left + 'px'); } - $("#" + idElement).css('color', values['label_color']); //Update the lines end_foreach = false; diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php old mode 100644 new mode 100755 index 68164a1913..1d3d2be19d --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -67,9 +67,6 @@ $table->size = array(); $table->size['icon'] = '1%'; $table->size[0] = '25%'; -$table->style = array(); -$table->style[1] = 'background-color: #ffffff;'; - $table->align = array(); $table->align[0] = "left"; $table->align[1] = "right"; @@ -162,17 +159,7 @@ foreach ($layoutDatas as $layoutData) { //First row //Label and color label - if ($layoutData['type'] != ICON) { - $table->data[$i + 1][0] = '' . - html_print_input_hidden('label_' . $idLayoutData, $layoutData['label'], true) . - '' . __('Edit label') .'' . - html_print_input_text_extended ('label_color_' . $idLayoutData, $layoutData['label_color'], 'text-'.'label_color_' . $idLayoutData, '', 7, 7, false, '', 'style="visibility: hidden; width: 0px;" class="label_color"', true) . - ''; - } - else { - //Icon haven't the label. - $table->data[$i + 1][0] = ''; - } + $table->data[$i + 1][0] = ''; @@ -395,9 +382,6 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');