mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Merge branch '4439-bugs-vista-eventos' into 'develop'
Added text control to avoid show more of 255 chars in his field See merge request artica/pandorafms!2619
This commit is contained in:
commit
a1bac9d851
@ -278,7 +278,19 @@ if (is_ajax()) {
|
||||
$events,
|
||||
function ($carry, $item) {
|
||||
$tmp = (object) $item;
|
||||
$tmp->evento = io_safe_output($tmp->evento);
|
||||
$tmp->hint = '';
|
||||
$tmp->meta = false;
|
||||
if (strlen($tmp->evento) >= 255) {
|
||||
$tmp->hint = io_safe_output(chunk_split(substr($tmp->evento, 0, 600), 80, '<br>').'(...)');
|
||||
$tmp->meta = is_metaconsole();
|
||||
$tmp->evento = io_safe_output(substr($tmp->evento, 0, 253).'(...)');
|
||||
if (strpos($tmp->evento, ' ') === false) {
|
||||
$tmp->evento = substr($tmp->evento, 0, 80).'(...)';
|
||||
}
|
||||
} else {
|
||||
$tmp->evento = io_safe_output($tmp->evento);
|
||||
}
|
||||
|
||||
if ($tmp->module_name) {
|
||||
$tmp->module_name = io_safe_output($tmp->module_name);
|
||||
}
|
||||
@ -1637,6 +1649,10 @@ function process_datatables_item(item) {
|
||||
evn += '('+item.event_rep+') ';
|
||||
}
|
||||
evn += item.evento+'</a>';
|
||||
if(item.hint !== ''){
|
||||
let ruta = item.meta == true ? '../../images/tip_help.png' : 'images/tip_help.png';
|
||||
evn += ' <img src="'+ruta+'" data-title="'+item.hint+'" data-use_title_for_force_title="1" class="forced_title" alt="'+item.hint+'">';
|
||||
}
|
||||
|
||||
item.mini_severity = '<div class="event flex-row h100p nowrap">';
|
||||
item.mini_severity += output;
|
||||
|
Loading…
x
Reference in New Issue
Block a user