NEW Show tips on search of string and numeric fields into lists

This commit is contained in:
Laurent Destailleur
2023-05-09 17:32:17 +02:00
parent 09120d3fa9
commit d2d62cd60f
2 changed files with 14 additions and 11 deletions

View File

@@ -1276,8 +1276,7 @@ if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && !defined('DISABLE_JQUER
?>
// Defined properties for JNotify
$(document).ready(function() {
if (typeof $.jnotify == 'function')
{
if (typeof $.jnotify == 'function') {
$.jnotify.setup({
delay: 3000 // the default time to show each notification (in milliseconds)
, sticky: false // determines if the message should be considered "sticky" (user must manually close notification)
@@ -1298,8 +1297,8 @@ $(document).ready(function() {
});
<?php } ?>
jQuery(document).ready(function() {
// Force to hide menus when page is inside an iFrame so we can show any page into a dialog popup
$(document).ready(function() {
if (window.location && window.location.pathname.indexOf("externalsite/frametop.php") == -1 && window.location !== window.parent.location ) {
console.log("Page is detected to be into an iframe, we hide by CSS the menus");
// The page is in an iframe
@@ -1307,6 +1306,9 @@ $(document).ready(function() {
jQuery(".id-container").css('width', '100%');
}
// Code to set tooltip on search field
jQuery('table.liste tr.liste_titre_filter td.liste_titre input[name^="search"][type=text]:not("maxwidthdate")').attr('title', '<?php echo dol_escape_js($langs->transnoentities("SearchSyntaxTooltipForStringOrNum")) ?>');
});

View File

@@ -1229,3 +1229,4 @@ PublicVirtualCard=Virtual business card
TreeView=Tree view
DropFileToAddItToObject=Drop a file to add it to this object
UploadFileDragDropSuccess=The file(s) have been uploaded successfully
SearchSyntaxTooltipForStringOrNum=For searching inside text fields, you can use the characters ^ or $ to make a 'start or end with' search or use the ! to make a 'does not contains' test. You can use the | between two strings instead of a space for a 'OR' condition instead of 'AND'. For numeric values, you can use the operator <, >, <= or >= before the value to filter using a mathematical comparison