2010-07-12 Miguel de Dios <miguel.dedios@artica.es>

* include/javascript/pandora_visual_console.js: in function "draw_line"
	changed the const 15 value to dinamic value half width of image.
	Fixes: #3019645
	
	* godmode/reporting/visual_console_builder.editor.js: cleaned source code
	and deleted unused function "eventsButtonsToolbox", this function was in
	old wip version of visual editor.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2991 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-07-12 14:37:31 +00:00
parent d9cac2f700
commit 77d831ae9e
3 changed files with 15 additions and 101 deletions

View File

@ -1,3 +1,13 @@
2010-07-12 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/pandora_visual_console.js: in function "draw_line"
changed the const 15 value to dinamic value half width of image.
Fixes: #3019645
* godmode/reporting/visual_console_builder.editor.js: cleaned source code
and deleted unused function "eventsButtonsToolbox", this function was in
old wip version of visual editor.
2010-07-12 Dario Rodriguez <dario.rodriguez@artica.es>
* godmode/reporting/visual_console_builder.php: fixed error getting

View File

@ -35,7 +35,6 @@ function initJavascript() {
$(".label_color").attachColorPicker();
eventsBackground();
eventsButtonsToolbox();
eventsItems();
eventsTextAgent();
@ -889,102 +888,6 @@ function unselectAll() {
$(".item").css('border', '');
}
function eventsButtonsToolbox() {
// $('.button_toolbox').mouseover(function(event) {
// event.stopPropagation();
//
// // over label
// if ($(event.target).is('span')) {
// id = $(event.target).parent().attr('id');
// }
// else {
// id = $(event.target).attr('id');
// }
//
// if ($("#" + id).hasClass('disabled') == false) {
// $("#" + id).css('background', '#f5f5f5');
// }
// });
//
// $('.button_toolbox').mouseout(function(event) {
// event.stopPropagation();
// id = $(event.target).attr('id');
// if ($("#" + id).hasClass('disabled') == false) {
// $("#" + id).css('background', '#e5e5e5');
// }
// $("#" + id).css('border', '4px outset black');
// });
//
// $('.button_toolbox').mousedown(function(event) {
// event.stopPropagation();
//
// // over label
// if ($(event.target).is('span')) {
// id = $(event.target).parent().attr('id');
// }
// else {
// id = $(event.target).attr('id');
// }
//
// if ($("#" + id).hasClass('disabled') == false) {
// $("#" + id).css('border', '4px inset black');
// }
// });
//
// $('.button_toolbox').mouseup(function(event) {
// event.stopPropagation();
//
// // over label
// if ($(event.target).is('span')) {
// id = $(event.target).parent().attr('id');
// }
// else {
// id = $(event.target).attr('id');
// }
//
// $("#" + id).css('border', '4px outset black');
// });
//
// $('.button_toolbox').click(function(event) {
// event.stopPropagation();
//
// // over label
// if ($(event.target).is('span')) {
// id = $(event.target).parent().attr('id');
// }
// else {
// id = $(event.target).attr('id');
// }
//
// if ($("#" + id).hasClass('disabled') == false) {
// switch (id) {
// case 'edit_item':
// actionClick();
// break;
// case 'static_graph':
// creationItem = 'static_graph';
// actionClick();
// break;
// case 'percentile_bar':
// creationItem = 'percentile_bar';
// actionClick();
// break;
// case 'module_graph':
// creationItem = 'module_graph';
// actionClick();
// break;
// case 'simple_value':
// creationItem = 'simple_value';
// actionClick();
// break;
// case 'delete_item':
// deleteItem();
// break;
// }
// }
// });
}
function click2(id) {
switch (id) {
case 'edit_item':

View File

@ -20,25 +20,26 @@ function draw_line (line, id_div) {
brush = new jsGraphics (div);
brush.setStroke (1);
brush.setColor (line['color']);
if (line['x1']) {
x1 = line['x'];
} else {
x1 = parseInt ($('#'+line['node_begin']).css ('margin-left')) + 15;
x1 = parseInt ($('#'+line['node_begin']).css ('margin-left')) + ($('#'+line['node_begin']).width() / 2);
}
if (line['y1']) {
y1 = line['y1'];
} else {
y1 = parseInt ($('#'+line['node_begin']).css ('margin-top')) + 15;
y1 = parseInt ($('#'+line['node_begin']).css ('margin-top')) + ($('#'+line['node_begin']).height() / 2);
}
if (line['x2']) {
x2 = line['x2'];
} else {
x2 = parseInt ($('#'+line['node_end']).css ('margin-left')) + 15;
x2 = parseInt ($('#'+line['node_end']).css ('margin-left')) + ($('#'+line['node_end']).width() / 2);
}
if (line['y2']) {
y2 = line['y2'];
} else {
y2 = parseInt ($('#'+line['node_end']).css ('margin-top')) + 15;
y2 = parseInt ($('#'+line['node_end']).css ('margin-top')) + ($('#'+line['node_end']).height() / 2);
}
brush.drawLine (x1, y1, x2, y2);
brush.paint ();