Commit 8a91300d authored by Alexandre Delaunay's avatar Alexandre Delaunay Committed by Johan Cwiklinski

fix cut param and display of forcegroupby items in search (incorrect font awesome class)

parent 63fb8bbd
......@@ -304,12 +304,11 @@ class Config extends CommonDBTM {
echo "</tr>";
echo "<tr class='tab_bg_2'>";
echo "<td><label for='dropdown_cut$rand'>" . __('Default characters limit (summary text boxes)') . "</label></td><td>";
Dropdown::showNumber('cut', ['value' => $CFG_GLPI["cut"],
'min' => 50,
'max' => 500,
'step' => 50,
'rand' => $rand]);
echo "<td><label for='cut$rand'>" . __('Default characters limit (summary text boxes)') . "</label></td><td>";
echo Html::input('cut', [
'value' => $CFG_GLPI["cut"],
'id' => "cut$rand"
]);
echo "</td><td><label for='dropdown_url_maxlength$rand'>" . __('Default url length limit') . "</td><td>";
Dropdown::showNumber('url_maxlength', ['value' => $CFG_GLPI["url_maxlength"],
'min' => 20,
......
......@@ -3365,7 +3365,7 @@ class Html {
//for compatibility. Use fontawesome instead.
$out .= "<img id='tooltip$rand' src='".$param['img']."' class='pointer'>";
} else {
$out .= "<span id='tooltip$rand' class='fa {$param['awesome-class']} pointer'></span>";
$out .= "<span id='tooltip$rand' class='far {$param['awesome-class']} pointer'></span>";
}
if (!empty($param['link'])) {
......
......@@ -163,7 +163,7 @@ class Search {
});
var _loadMap = function(map_elt, itemtype) {
L.AwesomeMarkers.Icon.prototype.options.prefix = 'fa';
L.AwesomeMarkers.Icon.prototype.options.prefix = 'far';
var _micon = 'circle';
var stdMarker = L.AwesomeMarkers.icon({
......@@ -5968,7 +5968,7 @@ JAVASCRIPT;
];
if (Toolbox::strlen($text) > $CFG_GLPI['cut']) {
$popup_params += [
'awesome-class' => 'fa-comments-o',
'awesome-class' => 'fa-comments',
'autoclose' => false,
'onclick' => true
];
......@@ -6971,6 +6971,7 @@ JAVASCRIPT;
break;
default :
global $CFG_GLPI;
$out = "<td $extraparam valign='top'>";
if (!preg_match('/'.self::LBHR.'/', $value)) {
......@@ -6981,7 +6982,8 @@ JAVASCRIPT;
$line_delimiter = '<hr>';
}
if (count($values) > 1) {
if (count($values) > 1
&& Toolbox::strlen($value) > $CFG_GLPI['cut']) {
$value = '';
foreach ($values as $v) {
$value .= $v.$line_delimiter;
......@@ -6991,7 +6993,7 @@ JAVASCRIPT;
$value = '<div class="fup-popup">'.$value.'</div>';
$valTip = "&nbsp;".Html::showToolTip(
$value, [
'awesome-class' => 'fa-comments-o',
'awesome-class' => 'fa-comments',
'display' => false,
'autoclose' => false,
'onclick' => true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment