2010-03-24 Miguel de Dios <miguel.dedios@artica.es>
* include/config_process.php, godmode/reporting/visual_console_builder.editor.php, godmode/reporting/visual_console_builder.editor.js: worked about the new visual console builder editor, now it is developing, don't afray. * include/javascript/jquery.colorpicker.js: we used the old versión, and patch with self code for z-index to upper position. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2525 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
72a8fd1696
commit
abb804e0b9
|
@ -1,3 +1,13 @@
|
|||
2010-03-24 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/config_process.php,
|
||||
godmode/reporting/visual_console_builder.editor.php,
|
||||
godmode/reporting/visual_console_builder.editor.js: worked about the new
|
||||
visual console builder editor, now it is developing, don't afray.
|
||||
|
||||
* include/javascript/jquery.colorpicker.js: we used the old versión, and
|
||||
patch with self code for z-index to upper position.
|
||||
|
||||
2010-03-24 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_visual_map.php,
|
||||
|
|
|
@ -6,7 +6,7 @@ var lines = Array();
|
|||
|
||||
function showAdvanceOptions(close) {
|
||||
if ($("#advance_options").css('display') == 'none') {
|
||||
$("#advance_options").css('display', 'inline');
|
||||
$("#advance_options").css('display', '');
|
||||
}
|
||||
else {
|
||||
$("#advance_options").css('display', 'none');
|
||||
|
@ -19,6 +19,8 @@ function showAdvanceOptions(close) {
|
|||
|
||||
// Main function, execute in event documentReady
|
||||
function editorMain2() {
|
||||
$(".label_color").attachColorPicker();
|
||||
|
||||
eventsBackground();
|
||||
eventsButtonsToolbox();
|
||||
eventsItems();
|
||||
|
@ -94,6 +96,12 @@ function eventsTextAgent() {
|
|||
);
|
||||
}
|
||||
|
||||
function cancelAction() {
|
||||
if (openPropertiesPanel) {
|
||||
actionClick();
|
||||
}
|
||||
}
|
||||
|
||||
function updateAction() {
|
||||
var values = {};
|
||||
|
||||
|
@ -183,15 +191,15 @@ function actionClick() {
|
|||
if (creationItem != null) {
|
||||
activeToolboxButton(creationItem, true);
|
||||
item = creationItem;
|
||||
$("#button_update_div").css('display', 'none');
|
||||
$("#button_create_div").css('display', 'block');
|
||||
$("#button_update_row").css('display', 'none');
|
||||
$("#button_create_row").css('display', '');
|
||||
cleanFields();
|
||||
unselectAll();
|
||||
}
|
||||
else if (selectedItem != null) {
|
||||
item = selectedItem;
|
||||
$("#button_create_div").css('display', 'none');
|
||||
$("#button_update_div").css('display', 'block');
|
||||
$("#button_create_row").css('display', 'none');
|
||||
$("#button_update_row").css('display', '');
|
||||
cleanFields();
|
||||
|
||||
loadFieldsFromDB(item);
|
||||
|
@ -259,35 +267,38 @@ function hiddenFields(item) {
|
|||
$(".tittle_panel_span").css('display', 'none');
|
||||
$("#tittle_panel_span_" + item).css('display', 'inline');
|
||||
|
||||
$("#label_div").css('display', 'none');
|
||||
$("#label_div." + item).css('display', 'block');
|
||||
$("#label_row").css('display', 'none');
|
||||
$("#label_row." + item).css('display', '');
|
||||
|
||||
$("#image_div").css('display', 'none');
|
||||
$("#image_div." + item).css('display', 'block');
|
||||
$("#image_row").css('display', 'none');
|
||||
$("#image_row." + item).css('display', '');
|
||||
|
||||
$("#position_div").css('display', 'none');
|
||||
$("#position_div." + item).css('display', 'block');
|
||||
$("#position_row").css('display', 'none');
|
||||
$("#position_row." + item).css('display', '');
|
||||
|
||||
$("#agent_div").css('display', 'none');
|
||||
$("#agent_div." + item).css('display', 'block');
|
||||
$("#agent_row").css('display', 'none');
|
||||
$("#agent_row." + item).css('display', '');
|
||||
|
||||
$("#module_div").css('display', 'none');
|
||||
$("#module_div." + item).css('display', 'block');
|
||||
$("#module_row").css('display', 'none');
|
||||
$("#module_row." + item).css('display', '');
|
||||
|
||||
$("#background_div").css('display', 'none');
|
||||
$("#background_div." + item).css('display', 'block');
|
||||
$("#background_row").css('display', 'none');
|
||||
$("#background_row." + item).css('display', '');
|
||||
|
||||
$("#period_div").css('display', 'none');
|
||||
$("#period_div." + item).css('display', 'block');
|
||||
$("#period_row").css('display', 'none');
|
||||
$("#period_row." + item).css('display', '');
|
||||
|
||||
$("#parent_div").css('display', 'none');
|
||||
$("#parent_div." + item).css('display', 'block');
|
||||
$("#size_row").css('display', 'none');
|
||||
$("#size_row." + item).css('display', '');
|
||||
|
||||
$("#map_linked_div").css('display', 'none');
|
||||
$("#map_linked_div." + item).css('display', 'block');
|
||||
$("#parent_row").css('display', 'none');
|
||||
$("#parent_row." + item).css('display', '');
|
||||
|
||||
$("#label_color_div").css('display', 'none');
|
||||
$("#label_color_div." + item).css('display', 'block');
|
||||
$("#map_linked_row").css('display', 'none');
|
||||
$("#map_linked_row." + item).css('display', '');
|
||||
|
||||
$("#label_color_row").css('display', 'none');
|
||||
$("#label_color_row." + item).css('display', '');
|
||||
}
|
||||
|
||||
function cleanFields() {
|
||||
|
@ -454,12 +465,21 @@ function updateDB(type, idElement , values) {
|
|||
dataType: 'text',
|
||||
success: function (data)
|
||||
{
|
||||
switch (type) {
|
||||
case 'static_graph':
|
||||
if ((typeof(values['mov_left']) != 'undefined') &&
|
||||
(typeof(values['mov_top']) != 'undefined')) {
|
||||
$("#" + idElement).css('top', '0px').css('margin-top', top + 'px');
|
||||
$("#" + idElement).css('left', '0px').css('margin-left', left + 'px');
|
||||
refresh_lines(lines, 'background');
|
||||
}
|
||||
$("#" + idElement).css('color', values['label_color']);
|
||||
break;
|
||||
case 'background':
|
||||
$("#background").css('width', values['width'] + 'px');
|
||||
$("#background").css('height', values['height'] + 'px');
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -542,6 +562,13 @@ function eventsItems() {
|
|||
}
|
||||
});
|
||||
|
||||
$('.item').bind('dblclick', function(event, ui) {
|
||||
event.stopPropagation();
|
||||
if (!openPropertiesPanel) {
|
||||
actionClick();
|
||||
}
|
||||
});
|
||||
|
||||
$(".item").draggable();
|
||||
|
||||
$('.item').bind('dragstart', function(event, ui) {
|
||||
|
@ -608,6 +635,13 @@ function eventsBackground() {
|
|||
selectedItem = 'background';
|
||||
}
|
||||
});
|
||||
|
||||
$('#background').bind('dblclick', function(event, ui) {
|
||||
event.stopPropagation();
|
||||
if (!openPropertiesPanel) {
|
||||
actionClick();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function unselectAll() {
|
||||
|
|
|
@ -87,103 +87,111 @@ $intervals[4838400] = __('Last month');
|
|||
$intervals[9676800] = "2 ".__('months');
|
||||
$intervals[29030400] = "6 ".__('months');
|
||||
|
||||
echo '<div id="properties_panel" style="display: none; position: absolute; border: 2px solid #114105; padding: 5px; background: white; z-index: 99;">';
|
||||
//Trick for it have a traduct "any" text.
|
||||
echo '<span id="any_text" style="display: none;">' . __('Any') . '</span>';
|
||||
echo '<span id="ip_text" style="display: none;">' . __('IP') . '</span>';
|
||||
|
||||
echo '<div id="properties_panel" style="display: none; position: absolute; border: 2px solid #114105; padding: 5px; background: white; z-index: 90;">';
|
||||
//----------------------------Hiden Form----------------------------------------
|
||||
echo '<div id="hidden_panel_properties"">';
|
||||
echo '<div id="basic_options" style="width: 300px">';
|
||||
|
||||
echo '<span id="tittle_panel_span_background" class="tittle_panel_span" style="display: none; font-weight: bolder;">' . __('Background') . '</span><br /><br />';
|
||||
echo '<span id="tittle_panel_span_static_graph" class="tittle_panel_span" style="display: none; font-weight: bolder;">' . __('Static Graph') . '</span><br /><br />';
|
||||
|
||||
echo '<div id="label_div" class="static_graph" style="display: block; margin-bottom: 5px;">';
|
||||
echo __('Label') . ':';
|
||||
print_input_text ('label', '', '', 20, 200);
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="image_div" class="static_graph" style="display: block; margin-bottom: 5px;">';
|
||||
echo __('Image') . ':';
|
||||
print_select ($images_list, 'image', '', 'showPreviewStaticGraph(this.value);', 'None', '');
|
||||
echo '<div id="preview"></div>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="position_div" class="static_graph" style="display: block; margin-bottom: 5px;">';
|
||||
echo __('Position') . ':';
|
||||
?>
|
||||
<table class="databox" border="0" cellpadding="4" cellspacing="4" width="300">
|
||||
<caption>
|
||||
<span id="tittle_panel_span_background" class="tittle_panel_span" style="display: none; font-weight: bolder;"><?php echo __('Background');?></span><br /><br />
|
||||
<span id="tittle_panel_span_static_graph" class="tittle_panel_span" style="display: none; font-weight: bolder;"><?php echo __('Static Graph');?></span><br /><br />
|
||||
</caption>
|
||||
<tbody>
|
||||
<tr id="label_row" style="" class="static_graph">
|
||||
<td style=""><?php echo __('Label');?></td>
|
||||
<td style=""><?php print_input_text ('label', '', '', 20, 200); ?></td>
|
||||
</tr>
|
||||
<tr id="image_row" style="" class="static_graph datos">
|
||||
<td><?php echo __('Image');?></td>
|
||||
<td><?php print_select ($images_list, 'image', '', 'showPreviewStaticGraph(this.value);', 'None', '');?></td>
|
||||
</tr>
|
||||
<tr id="preview_row" style="" class="static_graph datos2">
|
||||
<td colspan="2" style="text-align: right;"><div id="preview" style="text-align: right;"></div></td>
|
||||
</tr>
|
||||
<tr id="agent_row" class="static_graph datos2">
|
||||
<td><?php echo __('Agent');?></td>
|
||||
<td><?php print_input_text_extended ('agent', '', 'text-agent', '', 25, 100, false, '',
|
||||
array('style' => 'background: #ffffff url(images/lightning.png) no-repeat right;'), false);?></td>
|
||||
</tr>
|
||||
<tr id="module_row" class="static_graph datos">
|
||||
<td><?php echo __('Module');?></td>
|
||||
<td><?php print_select (array (), 'module', '', '', __('Any'), 0);?></td>
|
||||
</tr>
|
||||
<tr id="background_row" class="background datos2">
|
||||
<td><?php echo __('Background');?></td>
|
||||
<td><?php print_select($backgrounds_list, 'background_image', $background, '', 'None', '');?></td>
|
||||
</tr>
|
||||
<tr id="button_update_row" class="datos">
|
||||
<td colspan="2" style="text-align: right;">
|
||||
<?php
|
||||
print_button(__('Cancel'), 'cancel_button', false, 'cancelAction();', 'class="sub"');
|
||||
print_button(__('Update'), 'update_button', false, 'updateAction();', 'class="sub"');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="button_create_row" class="datos2">
|
||||
<td colspan="2" style="text-align: right;">
|
||||
<?php
|
||||
print_button(__('Cancel'), 'cancel_button', false, 'cancelAction();', 'class="sub"');
|
||||
print_button(__('Create'), 'create_button', false, 'createAction();', 'class="create sub"');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="advance_options_link" class="datos">
|
||||
<td colspan="2" style="text-align: center;">
|
||||
<a href="javascript: showAdvanceOptions()"><?php echo __('Advance options');?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="advance_options" style="display: none;">
|
||||
<tr id="period_row" class="module_graph datos2">
|
||||
<td><?php echo __('Period');?></td>
|
||||
<td><?php print_select ($intervals, 'period', '', '', '--', 0);?></td>
|
||||
</tr>
|
||||
<tr id="position_row" class="static_graph datos">
|
||||
<td><?php echo __('Position');?></td>
|
||||
<td>
|
||||
<?php
|
||||
echo '(';
|
||||
print_input_text('left', '0', '', 3, 5);
|
||||
echo ' , ';
|
||||
print_input_text('top', '0', '', 3, 5);
|
||||
echo ')';
|
||||
echo '<br />';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="agent_div" class="static_graph" style="display: block; margin-bottom: 5px;">';
|
||||
echo __('Agent') . '<a href="#" class="tip"> <span>' . __("Type at least two characters to search") . '</span></a>' . ':';
|
||||
print_input_text_extended ('agent', '', 'text-agent', '', 25, 100, false, '',
|
||||
array('style' => 'background: #ffffff url(images/lightning.png) no-repeat right;'), false);
|
||||
echo '<br />';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="module_div" class="static_graph" style="display: block; margin-bottom: 5px;">';
|
||||
echo __('Module') . ':';
|
||||
print_select (array (), 'module', '', '', __('Any'), 0);
|
||||
echo '<br />';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="background_div" class="background" style="display: block; margin-bottom: 5px;">';
|
||||
echo __('Background') . ':';
|
||||
print_select($backgrounds_list, 'background_image', $background, '', 'None', '');
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="button_update_div" style="text-align: right; margin-top: 20px;">';
|
||||
print_button(__('Update'), 'update_button', false, 'updateAction();', 'class="sub"');
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="button_create_div" style="text-align: right; margin-top: 20px;">';
|
||||
print_button(__('Create'), 'create_button', false, 'createAction();', 'class="create sub"');
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
echo '<div id="line" style="width: 300px; border-bottom: 1px solid black; text-align: right; margin-top: 20px;">';
|
||||
echo '<a href="javascript: showAdvanceOptions()">' . __('Advance options') . '</a>';
|
||||
echo '</div>';
|
||||
echo '<div id="advance_options" style="width: 300px; display: none;">';
|
||||
echo '<div style="margin-top: 20px;"></div>';
|
||||
|
||||
echo '<div id="period_div" class="" style="display: block; margin-bottom: 5px;">';
|
||||
echo __('Period') . ':';
|
||||
print_select ($intervals, 'period', '', '', '--', 0);
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="size_div" class="background static_graph" style="display: block; margin-bottom: 5px;">';
|
||||
echo __('Size') . ':';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="size_row" class="background static_graph datos">
|
||||
<td><?php echo __('Size');?></td>
|
||||
<td>
|
||||
<?php
|
||||
print_input_text('width', 0, '', 3, 5);
|
||||
echo ' X ';
|
||||
print_input_text('height', 0, '', 3, 5);
|
||||
echo '<br />';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="parent_div" class="static_graph" style="display: block; margin-bottom: 5px;">';
|
||||
echo __('Parent') . ':';
|
||||
print_select_from_sql('SELECT id, label FROM tlayout_data WHERE id_layout = ' . $visualConsole['id'], 'parent', '', '', __('None'), 0);
|
||||
echo '<br />';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="map_linked_div" class="static_graph" style="display: block; margin-bottom: 5px;">';
|
||||
echo __('Map linked') . ':';
|
||||
print_select_from_sql ('SELECT id, name FROM tlayout WHERE id != ' . $idVisualConsole,
|
||||
'map_linked', '', '', 'None', '0');
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="label_color_div" class="static_graph" style="display: block; margin-bottom: 5px;">';
|
||||
echo __('Label color') . ':';
|
||||
print_input_text_extended ('label_color', '#000000', 'text-'.'label_color',
|
||||
'', 7, 7, false, '', 'class="label_color"', false);
|
||||
echo '</div>';
|
||||
//Trick for it have a traduct "any" text.
|
||||
echo '<span id="any_text" style="display: none;">' . __('Any') . '</span>';
|
||||
echo '<span id="ip_text" style="display: none;">' . __('IP') . '</span>';
|
||||
echo '</div>';
|
||||
echo "</div>";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="parent_row" class="static_graph datos2">
|
||||
<td><?php echo __('Parent');?></td>
|
||||
<td><?php print_select_from_sql('SELECT id, label FROM tlayout_data WHERE id_layout = ' . $visualConsole['id'], 'parent', '', '', __('None'), 0);?></td>
|
||||
</tr>
|
||||
<tr id="map_linked_row" class="static_graph datos">
|
||||
<td><?php echo __('Map linked');?></td>
|
||||
<td>
|
||||
<?php
|
||||
print_select_from_sql ('SELECT id, name FROM tlayout WHERE id != ' . $idVisualConsole, 'map_linked', '', '', 'None', '0');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="label_color_row" class="static_graph 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>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
//------------------------------------------------------------------------------
|
||||
echo '</div>';
|
||||
echo '<div id="frame_view" style="width: 100%; height: 500px; overflow: scroll;">';
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC10323'; // Remember is YYMMDD
|
||||
$build_version = 'PC10326'; // Remember is YYMMDD
|
||||
$pandora_version = 'v3.1-dev';
|
||||
|
||||
/* Help to debug problems. Override global PHP configuration */
|
||||
|
|
|
@ -19,7 +19,7 @@ else if(e.keyCode==40){$.colorPicker.showFor(this);}},_resetSample:function(e){v
|
|||
if($.colorPicker._colorpickerShowing){return;}
|
||||
var inst=$.colorPicker._getInst(input._colId);$.colorPicker.hideColorPicker();$.colorPicker._lastInput=input;if(!$.colorPicker._pos){$.colorPicker._pos=$.colorPicker._findPos(input);$.colorPicker._pos[1]+=input.offsetHeight;}
|
||||
var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css('position')=='fixed';});if(isFixed&&$.browser.opera){$.colorPicker._pos[0]-=document.documentElement.scrollLeft;$.colorPicker._pos[1]-=document.documentElement.scrollTop;}
|
||||
inst._colorPickerDiv.css('position',($.blockUI?'static':(isFixed?'fixed':'absolute'))).css('left',$.colorPicker._pos[0]+'px').css('top',$.colorPicker._pos[1]+1+'px');$.colorPicker._pos=null;$.colorPicker._showColorPicker(inst);return this;},_findPos:function(obj){while(obj&&(obj.type=='hidden'||obj.nodeType!=1)){obj=obj.nextSibling;}
|
||||
inst._colorPickerDiv.css('position',($.blockUI?'static':(isFixed?'fixed':'absolute'))).css('left',$.colorPicker._pos[0]+'px').css('top',$.colorPicker._pos[1]+1+'px').css('z-index', 99);$.colorPicker._pos=null;$.colorPicker._showColorPicker(inst);return this;},_findPos:function(obj){while(obj&&(obj.type=='hidden'||obj.nodeType!=1)){obj=obj.nextSibling;}
|
||||
var curleft=curtop=0;if(obj&&obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){var origcurleft=curleft;curleft+=obj.offsetLeft;if(curleft<0){curleft=origcurleft;}
|
||||
curtop+=obj.offsetTop;}}
|
||||
return[curleft,curtop];},_checkExternalClick:function(event){if(!$.colorPicker._curInst)
|
||||
|
|
Loading…
Reference in New Issue