2011-02-17 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/visual_console_builder.editor.js, godmode/reporting/visual_console_builder.editor.php: fixed the panel propierties for icon in the edition and creation, now it haven't label color and have preview icon and map link. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3889 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a3c8eac3a2
commit
9093ed51d6
|
@ -1,3 +1,10 @@
|
|||
2011-02-17 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/reporting/visual_console_builder.editor.js,
|
||||
godmode/reporting/visual_console_builder.editor.php: fixed the panel
|
||||
propierties for icon in the edition and creation, now it haven't label color
|
||||
and have preview icon and map link.
|
||||
|
||||
2011-02-16 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_alerts.php: New function get_alert_actions_filter.
|
||||
|
|
|
@ -16,6 +16,7 @@ var openPropertiesPanel = false;
|
|||
var idItem = 0;
|
||||
var selectedItem = null;
|
||||
var lines = Array();
|
||||
var toolbuttonActive = null
|
||||
|
||||
function showAdvanceOptions(close) {
|
||||
if ($("#advance_options").css('display') == 'none') {
|
||||
|
@ -303,6 +304,8 @@ function actionClick() {
|
|||
activeToolboxButton('delete_item', false);
|
||||
|
||||
if (creationItem != null) {
|
||||
//Create a item
|
||||
|
||||
activeToolboxButton(creationItem, true);
|
||||
item = creationItem;
|
||||
$("#button_update_row").css('display', 'none');
|
||||
|
@ -311,7 +314,10 @@ function actionClick() {
|
|||
unselectAll();
|
||||
}
|
||||
else if (selectedItem != null) {
|
||||
//Edit a item
|
||||
|
||||
item = selectedItem;
|
||||
toolbuttonActive = item;
|
||||
$("#button_create_row").css('display', 'none');
|
||||
$("#button_update_row").css('display', '');
|
||||
cleanFields();
|
||||
|
@ -349,8 +355,9 @@ function loadFieldsFromDB(item) {
|
|||
if (key == 'height') $("input[name=height]").val(val);
|
||||
if (key == 'label') $("input[name=label]").val(val);
|
||||
if (key == 'image') {
|
||||
//Load image preview
|
||||
$("select[name=image]").val(val);
|
||||
showPreviewStaticGraph(val);
|
||||
showPreview(val);
|
||||
}
|
||||
if (key == 'pos_x') $("input[name=left]").val(val);
|
||||
if (key == 'pos_y') $("input[name=top]").val(val);
|
||||
|
@ -442,6 +449,14 @@ function setAspectRatioBackground(side) {
|
|||
}
|
||||
|
||||
function hiddenFields(item) {
|
||||
//The method to hidden and show is
|
||||
//a row have a id and multiple class
|
||||
//then the steps is
|
||||
//- hide the row with <tr id="<id>">...</tr>
|
||||
// or hide <tr class="title_panel_span">...</tr>
|
||||
//- unhide the row with <tr id="<id>" class="<item> ...">...</tr>
|
||||
// or <tr id="title_panel_span_<item>">...</tr>
|
||||
|
||||
$(".title_panel_span").css('display', 'none');
|
||||
$("#title_panel_span_" + item).css('display', 'inline');
|
||||
|
||||
|
@ -1131,27 +1146,27 @@ function unselectAll() {
|
|||
function click2(id) {
|
||||
switch (id) {
|
||||
case 'static_graph':
|
||||
creationItem = 'static_graph';
|
||||
toolbuttonActive = creationItem = 'static_graph';
|
||||
actionClick();
|
||||
break;
|
||||
case 'percentile_bar':
|
||||
creationItem = 'percentile_bar';
|
||||
toolbuttonActive = creationItem = 'percentile_bar';
|
||||
actionClick();
|
||||
break;
|
||||
case 'module_graph':
|
||||
creationItem = 'module_graph';
|
||||
toolbuttonActive = creationItem = 'module_graph';
|
||||
actionClick();
|
||||
break;
|
||||
case 'simple_value':
|
||||
creationItem = 'simple_value';
|
||||
toolbuttonActive = creationItem = 'simple_value';
|
||||
actionClick();
|
||||
break;
|
||||
case 'label':
|
||||
creationItem = 'label';
|
||||
toolbuttonActive = creationItem = 'label';
|
||||
actionClick();
|
||||
break;
|
||||
case 'icon':
|
||||
creationItem = 'icon';
|
||||
toolbuttonActive = creationItem = 'icon';
|
||||
actionClick();
|
||||
break;
|
||||
|
||||
|
@ -1164,8 +1179,20 @@ function click2(id) {
|
|||
}
|
||||
}
|
||||
|
||||
function showPreview(image) {
|
||||
switch (toolbuttonActive) {
|
||||
case 'static_graph':
|
||||
showPreviewStaticGraph(image);
|
||||
break;
|
||||
case 'icon':
|
||||
showPreviewIcon(image);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function showPreviewStaticGraph(staticGraph) {
|
||||
$("#preview").empty();
|
||||
$("#preview").css('text-align', 'right');
|
||||
|
||||
if (staticGraph != '') {
|
||||
imgBase = "images/console/icons/" + staticGraph;
|
||||
|
@ -1175,3 +1202,13 @@ function showPreviewStaticGraph(staticGraph) {
|
|||
$("#preview").append("<img src='" + imgBase + ".png' />");
|
||||
}
|
||||
}
|
||||
|
||||
function showPreviewIcon(icon) {
|
||||
$("#preview").empty();
|
||||
$("#preview").css('text-align', 'left');
|
||||
|
||||
if (icon != '') {
|
||||
imgBase = "images/console/icons/" + icon;
|
||||
$("#preview").append("<img src='" + imgBase + ".png' />");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,9 +118,9 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
|
|||
</tr>
|
||||
<tr id="image_row" style="" class="static_graph icon datos">
|
||||
<td><?php echo __('Image');?></td>
|
||||
<td><?php print_select ($images_list, 'image', '', 'showPreviewStaticGraph(this.value);', 'None', '');?></td>
|
||||
<td><?php print_select ($images_list, 'image', '', 'showPreview(this.value);', 'None', '');?></td>
|
||||
</tr>
|
||||
<tr id="preview_row" style="" class="static_graph datos">
|
||||
<tr id="preview_row" style="" class="static_graph datos icon">
|
||||
<td colspan="2" style="text-align: right;"><div id="preview" style="text-align: right;"></div></td>
|
||||
</tr>
|
||||
<tr id="agent_row" class="static_graph percentile_bar module_graph simple_value datos">
|
||||
|
@ -232,7 +232,7 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
|
|||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="map_linked_row" class="static_graph percentile_bar module_graph simple_value label datos">
|
||||
<tr id="map_linked_row" class="static_graph percentile_bar module_graph simple_value icon label datos">
|
||||
<td><?php echo __('Map linked');?></td>
|
||||
<td>
|
||||
<?php
|
||||
|
@ -240,7 +240,7 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
|
|||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="label_color_row" class="static_graph percentile_bar module_graph simple_value label icon datos">
|
||||
<tr id="label_color_row" class="static_graph percentile_bar module_graph simple_value label datos">
|
||||
<td><?php echo __('Label color');?></td>
|
||||
<td><?php print_input_text_extended ('label_color', '#000000', 'text-'.'label_color', '', 7, 7, false, '', 'class="label_color"', false);?></td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue