2009-01-26 Esteban Sanchez <estebans@artica.es>
* include/functions_ui.php: print_alert_template_example() now replaces also the value. * godmode/alerts/configure_alert_template.php: Removed first render example using javascript. * godmode/alerts/alert_templates.php: Removed parameter replacement since it's now done in the function. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1397 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ae932eb7b7
commit
c23a3d0d01
|
@ -1,3 +1,14 @@
|
||||||
|
2009-01-26 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
|
* include/functions_ui.php: print_alert_template_example() now
|
||||||
|
replaces also the value.
|
||||||
|
|
||||||
|
* godmode/alerts/configure_alert_template.php: Removed first render
|
||||||
|
example using javascript.
|
||||||
|
|
||||||
|
* godmode/alerts/alert_templates.php: Removed parameter replacement
|
||||||
|
since it's now done in the function.
|
||||||
|
|
||||||
2009-01-24 Raul Mateos <raulofpandora@gmail.com>
|
2009-01-24 Raul Mateos <raulofpandora@gmail.com>
|
||||||
|
|
||||||
* install.php: Added code to show current console URL in step 3.
|
* install.php: Added code to show current console URL in step 3.
|
||||||
|
|
|
@ -44,12 +44,7 @@ if (defined ('AJAX')) {
|
||||||
echo get_alert_templates_type_name ($template['type']);
|
echo get_alert_templates_type_name ($template['type']);
|
||||||
|
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
$example = print_alert_template_example ($template['id'], true);
|
echo print_alert_template_example ($template['id'], true);
|
||||||
|
|
||||||
$example = str_replace ('<span id="value"></span>', $template['value'], $example);
|
|
||||||
$example = str_replace ('<span id="max"></span>', $template['max_value'], $example);
|
|
||||||
$example = str_replace ('<span id="min"></span>', $template['min_value'], $example);
|
|
||||||
echo $example;
|
|
||||||
|
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
|
|
|
@ -548,7 +548,6 @@ function render_example () {
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
render_example ();
|
|
||||||
$("#text-time_from, #text-time_to").timeEntry ({
|
$("#text-time_from, #text-time_to").timeEntry ({
|
||||||
spinnerImage: 'images/time-entry.png',
|
spinnerImage: 'images/time-entry.png',
|
||||||
spinnerSize: [20, 20, 0]
|
spinnerSize: [20, 20, 0]
|
||||||
|
|
|
@ -323,16 +323,14 @@ function print_alert_template_example ($id_alert_template, $return = false) {
|
||||||
|
|
||||||
$output .= '<img src="images/information.png" /> ';
|
$output .= '<img src="images/information.png" /> ';
|
||||||
$output .= '<span id="example">';
|
$output .= '<span id="example">';
|
||||||
|
|
||||||
if ($id_alert_template) {
|
|
||||||
$template = get_alert_template ($id_alert_template);
|
$template = get_alert_template ($id_alert_template);
|
||||||
|
|
||||||
switch ($template['type']) {
|
switch ($template['type']) {
|
||||||
case 'not_equal':
|
case 'equal':
|
||||||
/* Do not translate the HTML attributes */
|
/* Do not translate the HTML attributes */
|
||||||
$output .= __('The alert would fire when the value is <span id="value"></span>');
|
$output .= __('The alert would fire when the value is <span id="value"></span>');
|
||||||
break;
|
break;
|
||||||
case 'equal':
|
case 'not_equal':
|
||||||
/* Do not translate the HTML attributes */
|
/* Do not translate the HTML attributes */
|
||||||
$output .= __('The alert would fire when the value is not <span id="value"></span>');
|
$output .= __('The alert would fire when the value is not <span id="value"></span>');
|
||||||
break;
|
break;
|
||||||
|
@ -363,7 +361,12 @@ function print_alert_template_example ($id_alert_template, $return = false) {
|
||||||
$output .= __('The alert would fire when the value is under <span id="min"></span>');
|
$output .= __('The alert would fire when the value is under <span id="min"></span>');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/* Replace span elements with real values. This is done in such way to avoid
|
||||||
|
duplicating strings and make it easily modificable via Javascript. */
|
||||||
|
$output = str_replace ('<span id="value"></span>', $template['value'], $output);
|
||||||
|
$output = str_replace ('<span id="max"></span>', $template['max_value'], $output);
|
||||||
|
$output = str_replace ('<span id="min"></span>', $template['min_value'], $output);
|
||||||
|
|
||||||
$output .= '</span>';
|
$output .= '</span>';
|
||||||
if ($return)
|
if ($return)
|
||||||
|
|
Loading…
Reference in New Issue