';
- html_print_submit_button(
+ echo '';
+ $buttonCreate = html_print_button(
__('Create tip'),
'create',
false,
+ 'window.location.replace("index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips&view=create")',
[
'class' => 'sub',
- 'icon' => 'create_file',
- ]
+ 'icon' => 'plus',
+ ],
+ true
);
- echo '';
+ html_print_action_buttons($buttonCreate);
echo '
';
} catch (Exception $e) {
echo $e->getMessage();
@@ -585,16 +600,15 @@ class TipsWindow
$data[$key]['title'] = io_safe_output($row['title']);
$data[$key]['text'] = io_safe_output($row['text']);
$data[$key]['url'] = io_safe_output($row['url']);
- $data[$key]['actions'] = '';
+ $data[$key]['delete'] .= html_print_input_hidden('idTip', $row['id'], true);
+ $data[$key]['delete'] .= '';
}
if (empty($data) === true) {
@@ -680,14 +693,50 @@ class TipsWindow
';
$table = new stdClass();
$table->width = '100%';
- $table->class = 'databox filters';
+ $table->class = 'databox filter-table-adv';
- $table->style[0] = 'font-weight: bold';
+ $table->style[0] = 'width: 50%';
$table->data = [];
- $table->data[0][0] = __('Images');
- $table->data[0][1] .= html_print_div(['id' => 'inputs_images'], true);
- $table->data[0][1] .= html_print_div(
+ $table->data[0][0] = html_print_label_input_block(
+ __('Language'),
+ html_print_select_from_sql(
+ 'SELECT id_language, name FROM tlanguage',
+ 'id_lang',
+ '',
+ '',
+ '',
+ '0',
+ true,
+ false,
+ true,
+ false,
+ 'width: 100%;'
+ )
+ );
+ $table->data[0][1] = html_print_label_input_block(
+ __('Profile'),
+ html_print_select($profiles, 'id_profile', '0', '', __('All'), 0, true)
+ );
+ $table->data[1][0] = html_print_label_input_block(
+ __('Title'),
+ html_print_input_text('title', '', '', 35, 100, true)
+ );
+ $table->data[1][1] = html_print_label_input_block(
+ __('Url'),
+ html_print_input_text('url', '', '', 35, 100, true)
+ );
+ $table->data[2][0] = html_print_label_input_block(
+ __('Text'),
+ html_print_textarea('text', 5, 50, '', '', true),
+ );
+ $table->data[2][1] = html_print_label_input_block(
+ __('Enable'),
+ html_print_checkbox_switch('enable', true, true, true)
+ );
+
+ $inputImages = html_print_div(['id' => 'inputs_images'], true);
+ $inputImages .= html_print_div(
[
'id' => 'notices_images',
'class' => 'invisible',
@@ -695,41 +744,36 @@ class TipsWindow
],
true
);
- $table->data[0][1] .= html_print_button(__('Add image'), 'button_add_image', false, '', '', true);
- $table->data[1][0] = __('Language');
- $table->data[1][1] = html_print_select_from_sql(
- 'SELECT id_language, name FROM tlanguage',
- 'id_lang',
- '',
- '',
- '',
- '0',
+ $inputImages .= html_print_div(
+ [
+ 'id' => 'notices_images',
+ 'class' => 'invisible empty_input_images',
+ 'content' => ''.__('Please select a image').'
',
+ ],
true
);
- $table->data[2][0] = __('Profile');
- $table->data[2][1] = html_print_select($profiles, 'id_profile', '0', '', __('All'), 0, true);
- $table->data[3][0] = __('Title');
- $table->data[3][1] = html_print_input_text('title', '', '', 35, 100, true);
- $table->data[4][0] = __('Text');
- $table->data[4][1] = html_print_textarea('text', 5, 50, '', '', true);
- $table->data[5][0] = __('Url');
- $table->data[5][1] = html_print_input_text('url', '', '', 35, 100, true);
- $table->data[6][0] = __('Enable');
- $table->data[6][1] = html_print_checkbox_switch('enable', true, true, true);
+ $inputImages .= html_print_button(__('Add image'), 'button_add_image', false, '', ['class' => 'button-add-image'], true);
- echo '';
html_print_div(['id' => 'tips_window_modal_preview']);
@@ -790,7 +837,7 @@ class TipsWindow
true,
[
'onclick' => 'deleteImage(this, \''.$value['id'].'\', \''.$namePath.'\')',
- 'class' => 'remove-image',
+ 'class' => 'remove-image main_menu_icon',
]
);
$outputImagesTip .= html_print_div(
@@ -812,16 +859,52 @@ class TipsWindow
';
$table = new stdClass();
$table->width = '100%';
- $table->class = 'databox filters';
+ $table->class = 'databox filter-table-adv';
- $table->style[0] = 'font-weight: bold';
+ $table->style[0] = 'width: 50%';
$table->data = [];
- $table->data[0][0] = __('Images');
- $table->data[0][1] .= $outputImagesTip;
- $table->data[0][1] .= html_print_div(['id' => 'inputs_images'], true);
- $table->data[0][1] .= html_print_input_hidden('images_to_delete', '{}', true);
- $table->data[0][1] .= html_print_div(
+
+ $table->data[0][0] = html_print_label_input_block(
+ __('Language'),
+ html_print_select_from_sql(
+ 'SELECT id_language, name FROM tlanguage',
+ 'id_lang',
+ $tip['id_lang'],
+ '',
+ '',
+ '0',
+ true,
+ false,
+ true,
+ false,
+ 'width: 100%;'
+ )
+ );
+ $table->data[0][1] = html_print_label_input_block(
+ __('Profile'),
+ html_print_select($profiles, 'id_profile', $tip['id_profile'], '', __('All'), 0, true)
+ );
+ $table->data[1][0] = html_print_label_input_block(
+ __('Title'),
+ html_print_input_text('title', $tip['title'], '', 35, 100, true)
+ );
+ $table->data[1][1] = html_print_label_input_block(
+ __('Url'),
+ html_print_input_text('url', $tip['url'], '', 35, 100, true)
+ );
+ $table->data[2][0] = html_print_label_input_block(
+ __('Text'),
+ html_print_textarea('text', 5, 50, $tip['text'], '', true),
+ );
+ $table->data[2][1] = html_print_label_input_block(
+ __('Enable'),
+ html_print_checkbox_switch('enable', 1, ($tip['enable'] === '1') ? true : false, true)
+ );
+ $inputImages = $outputImagesTip;
+ $inputImages .= html_print_div(['id' => 'inputs_images'], true);
+ $inputImages .= html_print_input_hidden('images_to_delete', '{}', true);
+ $inputImages .= html_print_div(
[
'id' => 'notices_images',
'class' => 'invisible',
@@ -829,41 +912,35 @@ class TipsWindow
],
true
);
- $table->data[0][1] .= html_print_button(__('Add image'), 'button_add_image', false, '', '', true);
- $table->data[1][0] = __('Language');
- $table->data[1][1] = html_print_select_from_sql(
- 'SELECT id_language, name FROM tlanguage',
- 'id_lang',
- $tip['id_lang'],
- '',
- '',
- '0',
+ $inputImages .= html_print_div(
+ [
+ 'id' => 'notices_images',
+ 'class' => 'invisible empty_input_images',
+ 'content' => ''.__('Please select a image').'
',
+ ],
true
);
- $table->data[2][0] = __('Profile');
- $table->data[2][1] = html_print_select($profiles, 'id_profile', $tip['id_profile'], '', __('All'), 0, true);
- $table->data[3][0] = __('Title');
- $table->data[3][1] = html_print_input_text('title', $tip['title'], '', 35, 100, true);
- $table->data[4][0] = __('Text');
- $table->data[4][1] = html_print_textarea('text', 5, 50, $tip['text'], '', true);
- $table->data[5][0] = __('Url');
- $table->data[5][1] = html_print_input_text('url', $tip['url'], '', 35, 100, true);
- $table->data[6][0] = __('Enable');
- $table->data[6][1] = html_print_checkbox_switch('enable', 1, ($tip['enable'] === '1') ? true : false, true);
+ $inputImages .= html_print_button(__('Add image'), 'button_add_image', false, '', ['class' => 'button-add-image'], true);
- echo '';
html_print_div(['id' => 'tips_window_modal_preview']);
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 234144c53d..fe1c1d7ff1 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
-$build_version = 'PC230316';
+$build_version = 'PC230317';
$pandora_version = 'v7.0NG.769';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php
index 2be81a9800..40b0752d9d 100644
--- a/pandora_console/include/functions_html.php
+++ b/pandora_console/include/functions_html.php
@@ -4565,12 +4565,6 @@ function html_print_image(
// Dont use safe_input here or the performance will dead.
$style = '';
- if (empty($options) === false && isset($options['class']) === true) {
- $options['class'] .= ' main_menu_icon';
- } else {
- $options['class'] = 'main_menu_icon invert_filter';
- }
-
if (!empty($options)) {
// Deprecated or value-less attributes.
if (isset($options['align'])) {
diff --git a/pandora_console/include/functions_profile.php b/pandora_console/include/functions_profile.php
index f9d52ae289..57c821375b 100644
--- a/pandora_console/include/functions_profile.php
+++ b/pandora_console/include/functions_profile.php
@@ -192,7 +192,7 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
$table->width = '100%';
$table->class = 'info_table';
- echo '';
+ echo '
';
echo '';
$table->data = [];
@@ -312,12 +312,12 @@ function profile_print_profile_table($id, $json_profile=false, $return=false, $c
true,
[
'onclick' => 'delete_profile(event, this)',
- 'class' => 'invert_filter',
+ 'class' => 'main_menu_icon invert_filter',
]
);
} else {
$data['actions'] = '';
diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js
index e3f4040205..2f657779a6 100644
--- a/pandora_console/include/javascript/pandora_events.js
+++ b/pandora_console/include/javascript/pandora_events.js
@@ -972,6 +972,9 @@ function openSoundEventModal(settings) {
width: 600,
height: 600,
open: function() {
+ $(".ui-widget-overlay")
+ .css("background", "black")
+ .css("opacity", 0.5);
$.ajax({
method: "post",
url: settings.url,
diff --git a/pandora_console/include/javascript/pandora_ui.js b/pandora_console/include/javascript/pandora_ui.js
index 944c454747..95ffe898b0 100644
--- a/pandora_console/include/javascript/pandora_ui.js
+++ b/pandora_console/include/javascript/pandora_ui.js
@@ -352,10 +352,10 @@ function load_modal(settings) {
}
} else {
// No onsumbit configured. Directly close.
- d.dialog("close");
if (document.getElementById(settings.form) != undefined) {
document.getElementById(settings.form).submit();
}
+ d.dialog("close");
}
};
diff --git a/pandora_console/include/javascript/tipsWindow.js b/pandora_console/include/javascript/tipsWindow.js
index 1f63c2bbe2..94d28c9339 100644
--- a/pandora_console/include/javascript/tipsWindow.js
+++ b/pandora_console/include/javascript/tipsWindow.js
@@ -2,15 +2,16 @@
$(document).ready(function() {
$("#button-button_add_image").on("click", function() {
var numberImages = $("#inputs_images").children().length;
+ $(".input-file").each(function(index) {
+ $(this).attr("name", "file_" + index);
+ });
var div_image = document.createElement("div");
$(div_image).attr("class", "action_image");
$(div_image).append(
- ``
+ ``
);
$(div_image).append(
- ``
+ ``
);
$("#inputs_images").append(div_image);
});
@@ -72,8 +73,8 @@ function activeCarousel() {
$(".carousel .images").bxSlider({ controls: true });
}
}
-function removeInputImage(name) {
- $(`input[name=${name}]`)
+function removeInputImage(e) {
+ $(e)
.parent()
.remove();
if ($(".action_image").length === 0) {
@@ -314,7 +315,7 @@ function previewTip() {
//Images in client
var totalInputsFiles = $("input[type=file]").length;
- if (totalInputsFiles > 0) {
+ if (totalInputsFiles > 0 && validateImages()) {
extradata["totalFiles64"] = totalInputsFiles;
$("input[type=file]").each(function(index) {
var reader = new FileReader();
@@ -352,3 +353,15 @@ function previewTip() {
});
}
}
+
+function validateImages() {
+ $(".empty_input_images").addClass("invisible");
+ let validate = true;
+ $("input[type=file]").each(function() {
+ if (this.files.length == 0) {
+ $(".empty_input_images").removeClass("invisible");
+ validate = false;
+ }
+ });
+ return validate;
+}
diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css
index 01801cd5bc..bf60df270e 100644
--- a/pandora_console/include/styles/pandora.css
+++ b/pandora_console/include/styles/pandora.css
@@ -304,6 +304,8 @@ td input[type="checkbox"] {
input[type="image"] {
border: 0px;
background-color: transparent;
+ height: auto;
+ padding: 0px;
}
.container-div-input-password input {
@@ -1421,7 +1423,7 @@ div#menu_container {
div#menu {
width: 45px;
float: left;
- z-index: 2;
+ z-index: 3;
position: absolute;
}
@@ -1436,7 +1438,7 @@ div#head {
min-width: 882px;
background-color: #fff;
color: #000;
- z-index: 2;
+ z-index: 3;
}
.fixed_header {
@@ -1793,7 +1795,7 @@ div.title_line {
#menu_tab_frame_view_bc {
position: sticky;
top: 61px;
- z-index: 1;
+ z-index: 2;
display: flex;
align-items: flex-end;
justify-content: space-between;
@@ -8255,6 +8257,11 @@ div.graph div.legend table {
justify-content: center;
}
+.flex_justify_end {
+ display: flex;
+ justify-content: end;
+}
+
.span_priority {
width: 20px;
height: 10px;
@@ -10546,6 +10553,18 @@ button div.cog.rotation {
animation: rotation 4s infinite linear;
}
+div.status_dot {
+ mask: url(../../images/status_dot.svg) no-repeat center / contain;
+ -webkit-mask: url(../../images/status_dot.svg) no-repeat center / contain;
+}
+
+.status_dot.ok {
+ background-color: #82b92e;
+}
+
+.status_dot.critical {
+ background-color: #e63c52;
+}
@keyframes rotation {
from {
transform: rotate(0deg);
@@ -11245,8 +11264,9 @@ img.main_menu_icon[src$=".svg"] {
}
input.main_menu_icon[src$=".svg"] {
- width: 22px;
- height: 22px;
+ width: 20px;
+ height: 20px;
+ padding: 0px;
}
.header_help_icon {
diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css
index 62af20b92f..35a0c64e54 100644
--- a/pandora_console/include/styles/pandora_black.css
+++ b/pandora_console/include/styles/pandora_black.css
@@ -1515,3 +1515,13 @@ div.fixed-bottom-box
span.select2 {
border-radius: 6px;
}
+
+.ui-dialog .tips_header.ui-dialog-titlebar {
+ color: white !important;
+ background-color: #222222 !important;
+}
+
+#tips_window_modal > div.window > div.description > #title_tip,
+#tips_window_modal > div.window > div.description > #text_tip {
+ color: white !important;
+}
diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css
index b4b4719088..4b13a2cd60 100644
--- a/pandora_console/include/styles/tables.css
+++ b/pandora_console/include/styles/tables.css
@@ -236,7 +236,8 @@
.table_action_buttons > a,
.table_action_buttons > img,
.table_action_buttons > button,
-.table_action_buttons > form {
+.table_action_buttons > form,
+.table_action_buttons > div {
visibility: hidden;
}
.info_table > tbody > tr:hover {
@@ -248,7 +249,8 @@
.info_table > tbody > tr:hover .table_action_buttons > a,
.info_table > tbody > tr:hover .table_action_buttons > img,
.info_table > tbody > tr:hover .table_action_buttons > button,
-.info_table > tbody > tr:hover .table_action_buttons > form {
+.info_table > tbody > tr:hover .table_action_buttons > form,
+.info_table > tbody > tr:hover .table_action_buttons > div {
visibility: visible;
}
@@ -460,9 +462,6 @@ a.pandora_pagination.current:hover {
.table_action_buttons input[type="image"],
.action_button_img {
border-radius: 4px;
- /*border: 1px solid #dcdcdc !important;*/
- padding: 1px !important;
- /*box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);*/
}
/* This class is for only one icon to be a button type. */
diff --git a/pandora_console/include/styles/tips_window.css b/pandora_console/include/styles/tips_window.css
index 6e8927aa4d..505799949b 100644
--- a/pandora_console/include/styles/tips_window.css
+++ b/pandora_console/include/styles/tips_window.css
@@ -172,17 +172,17 @@ span.count-round-tip.active {
}
span.enable {
display: block;
- width: 15px;
- height: 15px;
- border-radius: 15px;
+ width: 40px;
+ height: 20px;
+ border-radius: 4px;
background-color: #82b92e;
margin: 0 auto;
}
span.disable {
display: block;
- width: 15px;
- height: 15px;
- border-radius: 15px;
+ width: 40px;
+ height: 20px;
+ border-radius: 4px;
background-color: #e63c52;
margin: 0 auto;
}
@@ -212,3 +212,12 @@ span.disable {
opacity: 0;
pointer-events: none;
}
+#list_tips_windows .main_menu_icon {
+ padding: 0px;
+}
+#list_tips_windows .table_action_buttons {
+ text-align: center;
+}
+.button-add-image {
+ max-width: fit-content;
+}
diff --git a/pandora_console/index.php b/pandora_console/index.php
index a2c9d62167..441bcc63fa 100755
--- a/pandora_console/index.php
+++ b/pandora_console/index.php
@@ -1522,13 +1522,6 @@ require 'include/php_to_js_values.php';