mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 23:52:24 +01:00
Debug v21
This commit is contained in:
@@ -1108,6 +1108,10 @@ function getParameterByName(name, valueifnotfound)
|
|||||||
function getOperatorsForFieldType(type) {
|
function getOperatorsForFieldType(type) {
|
||||||
// Define the list of operators for each general field category
|
// Define the list of operators for each general field category
|
||||||
const operatorList = {
|
const operatorList = {
|
||||||
|
selectlink: {
|
||||||
|
Is: '<?php print dol_escape_js($langs->trans('Is')); ?>',
|
||||||
|
IsNot: '<?php print dol_escape_js($langs->trans('IsNot')); ?>',
|
||||||
|
},
|
||||||
text: {
|
text: {
|
||||||
Contains: '<?php print dol_escape_js($langs->trans('Contains')); ?>',
|
Contains: '<?php print dol_escape_js($langs->trans('Contains')); ?>',
|
||||||
DoesNotContain: '<?php print dol_escape_js($langs->trans('DoesNotContain')); ?>',
|
DoesNotContain: '<?php print dol_escape_js($langs->trans('DoesNotContain')); ?>',
|
||||||
@@ -1143,7 +1147,9 @@ function getOperatorsForFieldType(type) {
|
|||||||
|
|
||||||
console.log('Get list of operators for type='+type);
|
console.log('Get list of operators for type='+type);
|
||||||
|
|
||||||
if (/^(varchar|char|text|blob|nchar|mediumtext|longtext)\(\d+\)$/i.test(type) || /^(varchar)$/i.test(type)) {
|
if (/^select$/i.test(type) || /^link$/i.test(type)) {
|
||||||
|
generalType = "selectlink";
|
||||||
|
} else if (/^(varchar|char|text|blob|nchar|mediumtext|longtext)\(\d+\)$/i.test(type) || /^varchar$/i.test(type)) {
|
||||||
generalType = "text";
|
generalType = "text";
|
||||||
} else if (/^(int|integer|float|double|decimal|numeric)(\(\d+,\d+\))?$/i.test(type)) {
|
} else if (/^(int|integer|float|double|decimal|numeric)(\(\d+,\d+\))?$/i.test(type)) {
|
||||||
generalType = "number";
|
generalType = "number";
|
||||||
@@ -1155,6 +1161,7 @@ function getOperatorsForFieldType(type) {
|
|||||||
generalType = "html";
|
generalType = "html";
|
||||||
} else {
|
} else {
|
||||||
// Handle unknown or unsupported types
|
// Handle unknown or unsupported types
|
||||||
|
console.log("The type of field "+type+" is not supported");
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user