forked from Wavyzz/dolibarr
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop Conflicts: htdocs/core/lib/functions.lib.php
This commit is contained in:
@@ -160,8 +160,8 @@ var select2arrayoflanguage = {
|
||||
noResults: function () { return "<?php echo dol_escape_js($langs->transnoentitiesnoconv("Select2NotFound")); ?>"; },
|
||||
inputTooShort: function (input) {
|
||||
var n = input.minimum;
|
||||
console.log(input);
|
||||
console.log(input.minimum);
|
||||
/*console.log(input);
|
||||
console.log(input.minimum);*/
|
||||
if (n > 1) return "<?php echo dol_escape_js($langs->transnoentitiesnoconv("Select2Enter")); ?> " + n + " <?php echo dol_escape_js($langs->transnoentitiesnoconv("Select2MoreCharacters")); ?>";
|
||||
else return "<?php echo dol_escape_js($langs->transnoentitiesnoconv("Select2Enter")); ?> " + n + " <?php echo dol_escape_js($langs->transnoentitiesnoconv("Select2MoreCharacter")); ?>"
|
||||
},
|
||||
@@ -427,6 +427,28 @@ function urlencode(s) {
|
||||
return news;
|
||||
}
|
||||
|
||||
/*
|
||||
* =================================================================
|
||||
* Purpose: Clean string to have it url encoded
|
||||
* Input: s
|
||||
* Author: Laurent Destailleur
|
||||
* Licence: GPL
|
||||
* ==================================================================
|
||||
*/
|
||||
function htmlEntityDecodeJs(inp){
|
||||
var replacements = {'<':'<','>':'>','/':'/','"':'"',''':'\'','&':'&',' ':' '};
|
||||
if (inp)
|
||||
{
|
||||
for(var r in replacements){
|
||||
inp = inp.replace(new RegExp(r,'g'),replacements[r]);
|
||||
}
|
||||
return inp.replace(/&#(\d+);/g, function(match, dec) {
|
||||
return String.fromCharCode(dec);
|
||||
});
|
||||
}
|
||||
else { return ''; }
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* =================================================================
|
||||
|
||||
Reference in New Issue
Block a user