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:
parent
1bf40b76b2
commit
4ec30eec71
|
@ -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>
|
2010-05-04 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/functions_reporting.php: fixed the php notice message when the
|
* include/functions_reporting.php: fixed the php notice message when the
|
||||||
|
|
|
@ -184,10 +184,21 @@ function readFields() {
|
||||||
function createAction() {
|
function createAction() {
|
||||||
var values = readFields();
|
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);
|
if (validate) {
|
||||||
actionClick();
|
insertDB(creationItem, values);
|
||||||
|
actionClick();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function actionClick() {
|
function actionClick() {
|
||||||
|
|
|
@ -237,6 +237,9 @@ print_input_hidden('background_width', $widthBackground);
|
||||||
print_input_hidden('background_height', $heightBackground);
|
print_input_hidden('background_height', $heightBackground);
|
||||||
echo "</form>";
|
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_css_file ('color-picker');
|
||||||
|
|
||||||
require_jquery_file('ui.core');
|
require_jquery_file('ui.core');
|
||||||
|
|
|
@ -45,6 +45,7 @@ switch ($activeTab) {
|
||||||
$idGroup = get_parameter('id_group');
|
$idGroup = get_parameter('id_group');
|
||||||
$background = get_parameter('background');
|
$background = get_parameter('background');
|
||||||
$visualConsoleName = get_parameter('name');
|
$visualConsoleName = get_parameter('name');
|
||||||
|
|
||||||
$values = array('name' => $visualConsoleName, 'id_group' => $idGroup, 'background' => $background);
|
$values = array('name' => $visualConsoleName, 'id_group' => $idGroup, 'background' => $background);
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'update':
|
case 'update':
|
||||||
|
@ -171,7 +172,7 @@ $buttons = array(
|
||||||
print_image ("images/god6.png", true, array ("title" => __('List elements'))) .'</a>'),
|
print_image ("images/god6.png", true, array ("title" => __('List elements'))) .'</a>'),
|
||||||
'wizard' => array('active' => false,
|
'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 . '">' .
|
'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,
|
'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 . '">' .
|
'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>'),
|
print_image ("images/config.png", true, array ("title" => __('Editor'))) .'</a>'),
|
||||||
|
|
|
@ -67,14 +67,18 @@ function printItemInVisualConsole($layoutData) {
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case STATIC_GRAPH:
|
case STATIC_GRAPH:
|
||||||
$img = getImageStatusElement($layoutData);
|
if ($layoutData['image'] != null) {
|
||||||
$imgSizes = getimagesize($img);
|
$img = getImageStatusElement($layoutData);
|
||||||
|
$imgSizes = getimagesize($img);
|
||||||
|
}
|
||||||
if (($width != 0) && ($height != 0)) {
|
if (($width != 0) && ($height != 0)) {
|
||||||
$sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;';
|
$sizeStyle = 'width: ' . $width . 'px; height: ' . $height . 'px;';
|
||||||
$imageSize = 'width="' . $width . '" height="' . $height . '"';
|
$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 '<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 $text;
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue