Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OSE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
OSE
Merge requests
!96
Prise en compte des accents dans les recherches (#40917)
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Merged
Prise en compte des accents dans les recherches (#40917)
cherry-pick-7b4f8fd5
into
master
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
Laurent Lecluse
requested to merge
cherry-pick-7b4f8fd5
into
master
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
(cherry picked from commit
7b4f8fd5
)
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
9c7b8e35
1 commit,
3 years ago
2 files
+
39
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
public/js/app.js
+
37
−
0
Options
@@ -3,6 +3,7 @@ $(function ()
WidgetInitializer
.
add
(
'
selectpicker
'
,
'
selectpicker
'
,
function
()
{
WidgetInitializer
.
includeJs
(
Url
(
'
vendor/bootstrap-select-1.9.4/dist/js/bootstrap-select.min.js
'
));
WidgetInitializer
.
includeCss
(
Url
(
'
vendor/bootstrap-select-1.9.4/dist/css/bootstrap-select.min.css
'
));
$
(
'
.selectpicker
'
).
data
(
'
liveSearchNormalize
'
,
true
);
// insensible aux accents
});
WidgetInitializer
.
add
(
'
intervenant-recherche
'
,
'
intervenantRecherche
'
,
function
()
{
@@ -23,6 +24,42 @@ $(function ()
WidgetInitializer
.
includeCss
(
Url
(
'
vendor/DataTables-1.10.12/media/css/dataTables.bootstrap.min.css
'
));
WidgetInitializer
.
includeJs
(
Url
(
'
table-sort/widget.js
'
));
(
function
()
{
function
removeAccents
(
data
)
{
if
(
data
.
normalize
)
{
// Use I18n API if avaiable to split characters and accents, then remove
// the accents wholesale. Note that we use the original data as well as
// the new to allow for searching of either form.
return
data
+
'
'
+
data
.
normalize
(
'
NFD
'
)
.
replace
(
/
[\u
0300-
\u
036f
]
/g
,
''
);
}
return
data
;
}
var
searchType
=
jQuery
.
fn
.
DataTable
.
ext
.
type
.
search
;
searchType
.
string
=
function
(
data
)
{
return
!
data
?
''
:
typeof
data
===
'
string
'
?
removeAccents
(
data
)
:
data
;
};
searchType
.
html
=
function
(
data
)
{
return
!
data
?
''
:
typeof
data
===
'
string
'
?
removeAccents
(
data
.
replace
(
/<.*
?
>/g
,
''
))
:
data
;
};
}());
});
/* Services */
Loading