mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°1910 - iTop - Search on Text contains "_" not working - convert _ to \_ in javascript
This commit is contained in:
@@ -38,8 +38,26 @@ $(function()
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
_getOperatorValues: function(oOpElem)
|
||||
{
|
||||
var aValues = [];
|
||||
oOpElem.find('.sfc_op_content input').each(function(){
|
||||
var sValue = $(this).val();
|
||||
aValues.push({value: sValue.replace('_','\\_'), label: sValue});
|
||||
});
|
||||
return aValues;
|
||||
},
|
||||
_setOperatorValues: function(oOpElem, aValues)
|
||||
{
|
||||
if(aValues.length === 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
oOpElem.find('.sfc_op_content input').each(function(){
|
||||
$(this).val(aValues[0].value.replace('\\_','_')).trigger('non_interactive_change');
|
||||
});
|
||||
return true;
|
||||
},
|
||||
// the constructor
|
||||
_create: function()
|
||||
{
|
||||
|
||||
@@ -123,7 +123,6 @@ class CriterionToOQL extends CriterionConversionAbstract
|
||||
{
|
||||
return "1";
|
||||
}
|
||||
$sValue = str_replace('_', '\_', $sValue);
|
||||
|
||||
return "({$sRef} LIKE '%{$sValue}%')";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user