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

* include/functions_visual_map.php: fixed notices php messages when the
	visual map has the item label (item image without image and only text). 
	
	* godmode/reporting/visual_console_builder.php: changed the icon tab for
	the wizard, before it was a pill, now it is a wand.
	
	* godmode/reporting/visual_console_builder.editor.js,
	godmode/reporting/visual_console_builder.editor.php: fixed the validate
	static graph item.
	Fixes: #2994103



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2669 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-05-05 16:29:03 +00:00
parent a49d5e830f
commit 561ba6a688
5 changed files with 39 additions and 7 deletions

View File

@ -1,3 +1,16 @@
2010-05-05 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_visual_map.php: fixed notices php messages when the
visual map has the item label (item image without image and only text).
* godmode/reporting/visual_console_builder.php: changed the icon tab for
the wizard, before it was a pill, now it is a wand.
* godmode/reporting/visual_console_builder.editor.js,
godmode/reporting/visual_console_builder.editor.php: fixed the validate
static graph item.
Fixes: #2994103
2010-05-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: fixed the php notice message when the

View File

@ -184,10 +184,21 @@ function readFields() {
function createAction() {
var values = readFields();
// TODO VALIDATE DATA
//VALIDATE DATA
var validate = true;
switch (creationItem) {
case 'static_graph':
if ((values['label'] == '') && (values['image'] == '')) {
alert($("#message_alert_no_label_no_image").html());
validate = false;
}
break;
}
insertDB(creationItem, values);
actionClick();
if (validate) {
insertDB(creationItem, values);
actionClick();
}
}
function actionClick() {

View File

@ -237,6 +237,9 @@ print_input_hidden('background_width', $widthBackground);
print_input_hidden('background_height', $heightBackground);
echo "</form>";
//Hack to translate messages in javascript
echo '<span style="display: none" id="message_alert_no_label_no_image">' . __('No image or name defined.') .'</span>';
require_css_file ('color-picker');
require_jquery_file('ui.core');

View File

@ -45,6 +45,7 @@ switch ($activeTab) {
$idGroup = get_parameter('id_group');
$background = get_parameter('background');
$visualConsoleName = get_parameter('name');
$values = array('name' => $visualConsoleName, 'id_group' => $idGroup, 'background' => $background);
switch ($action) {
case 'update':
@ -171,7 +172,7 @@ $buttons = array(
print_image ("images/god6.png", true, array ("title" => __('List elements'))) .'</a>'),
'wizard' => array('active' => false,
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=wizard&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
print_image ("images/pill.png", true, array ("title" => __('Wizard'))) .'</a>'),
print_image ("images/wand.png", true, array ("title" => __('Wizard'))) .'</a>'),
'editor' => array('active' => false,
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=editor&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
print_image ("images/config.png", true, array ("title" => __('Editor'))) .'</a>'),

View File

@ -67,14 +67,18 @@ function printItemInVisualConsole($layoutData) {
switch ($type) {
case STATIC_GRAPH:
$img = getImageStatusElement($layoutData);
$imgSizes = getimagesize($img);
if ($layoutData['image'] != null) {
$img = getImageStatusElement($layoutData);
$imgSizes = getimagesize($img);
}
if (($width != 0) && ($height != 0)) {
$sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;';
$imageSize = 'width="' . $width . '" height="' . $height . '"';
}
echo '<div id="' . $id . '" class="item static_graph" style="text-align: center; color: ' . $color . '; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
echo '<img class="image" id="image_' . $id . '" src="' . $img . '" ' . $imageSize . ' /><br />';
if ($layoutData['image'] != null) {
echo '<img class="image" id="image_' . $id . '" src="' . $img . '" ' . $imageSize . ' /><br />';
}
echo $text;
echo "</div>";
break;