Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dar-otechestvu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Open-source
dar-otechestvu
Commits
28101b8d
Commit
28101b8d
authored
Jun 24, 2024
by
Sergey Shadrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#124455] Applied patch for `select2` to be compatible with `better_exposed_filters`
parent
4f19dc8f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
10 deletions
+30
-10
composer.json
composer.json
+4
-0
PATCHES.txt
docroot/modules/contrib/select2/PATCHES.txt
+11
-0
select2.js
docroot/modules/contrib/select2/js/select2.js
+6
-5
Select2.php
...ect2/src/Plugin/better_exposed_filters/filter/Select2.php
+2
-2
Select2.php
...elect2/src/Plugin/better_exposed_filters/sort/Select2.php
+1
-1
installed.json
vendor/composer/installed.json
+4
-0
installed.php
vendor/composer/installed.php
+2
-2
No files found.
composer.json
View file @
28101b8d
...
@@ -213,6 +213,10 @@
...
@@ -213,6 +213,10 @@
},
},
"drupal/admin_toolbar"
:
{
"drupal/admin_toolbar"
:
{
"Replace icons"
:
"./patches/admin_toolbar/replace-icons.patch"
"Replace icons"
:
"./patches/admin_toolbar/replace-icons.patch"
},
"drupal/select2"
:
{
"3271205: Removing selected option sometimes needs multiple clicks"
:
"https://www.drupal.org/files/issues/2022-04-20/select2-check-indexes-3271205-8.patch"
,
"3450644: BEF 7.0 compatible"
:
"https://git.drupalcode.org/project/select2/-/merge_requests/36/diffs.patch"
}
}
}
}
}
}
...
...
docroot/modules/contrib/select2/PATCHES.txt
0 → 100644
View file @
28101b8d
This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)
Patches applied to this directory:
3271205: Removing selected option sometimes needs multiple clicks
Source: https://www.drupal.org/files/issues/2022-04-20/select2-check-indexes-3271205-8.patch
3450644: BEF 7.0 compatible
Source: https://git.drupalcode.org/project/select2/-/merge_requests/36/diffs.patch
docroot/modules/contrib/select2/js/select2.js
View file @
28101b8d
...
@@ -65,12 +65,13 @@
...
@@ -65,12 +65,13 @@
var
$list
=
$select
.
next
(
'.select2-container'
).
find
(
'ul.select2-selection__rendered'
);
var
$list
=
$select
.
next
(
'.select2-container'
).
find
(
'ul.select2-selection__rendered'
);
Sortable
.
create
(
$list
[
0
],
{
Sortable
.
create
(
$list
[
0
],
{
draggable
:
'li:not(.select2-search)'
,
draggable
:
'li:not(.select2-search)'
,
forceFallback
:
true
,
onEnd
:
function
(
event
)
{
onEnd
:
function
(
)
{
if
(
event
.
newIndex
!=
event
.
oldIndex
)
{
$
(
$list
.
find
(
'.select2-selection__choice'
).
get
().
reverse
()).
each
(
function
()
{
$
(
$list
.
find
(
'.select2-selection__choice'
).
get
().
reverse
()).
each
(
function
()
{
$select
.
prepend
(
$select
.
find
(
'option[value="'
+
$
(
this
).
data
(
'optionValue'
)
+
'"]'
).
first
());
$select
.
prepend
(
$select
.
find
(
'option[value="'
+
$
(
this
).
data
(
'optionValue'
)
+
'"]'
).
first
());
});
});
}
}
}
});
});
}
}
});
});
...
...
docroot/modules/contrib/select2/src/Plugin/better_exposed_filters/filter/Select2.php
View file @
28101b8d
...
@@ -18,7 +18,7 @@ class Select2 extends FilterWidgetBase {
...
@@ -18,7 +18,7 @@ class Select2 extends FilterWidgetBase {
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*/
*/
public
function
defaultConfiguration
()
{
public
function
defaultConfiguration
()
:
array
{
$config
=
parent
::
defaultConfiguration
();
$config
=
parent
::
defaultConfiguration
();
$config
[
'advanced'
][
'placeholder_text'
]
=
(
string
)
$this
->
t
(
'- None -'
);
$config
[
'advanced'
][
'placeholder_text'
]
=
(
string
)
$this
->
t
(
'- None -'
);
return
$config
;
return
$config
;
...
@@ -50,7 +50,7 @@ class Select2 extends FilterWidgetBase {
...
@@ -50,7 +50,7 @@ class Select2 extends FilterWidgetBase {
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*/
*/
public
function
buildConfigurationForm
(
array
$form
,
FormStateInterface
$form_state
)
{
public
function
buildConfigurationForm
(
array
$form
,
FormStateInterface
$form_state
)
:
array
{
$form
=
parent
::
buildConfigurationForm
(
$form
,
$form_state
);
$form
=
parent
::
buildConfigurationForm
(
$form
,
$form_state
);
...
...
docroot/modules/contrib/select2/src/Plugin/better_exposed_filters/sort/Select2.php
View file @
28101b8d
...
@@ -18,7 +18,7 @@ class Select2 extends SortWidgetBase {
...
@@ -18,7 +18,7 @@ class Select2 extends SortWidgetBase {
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*/
*/
public
function
exposedFormAlter
(
array
&
$form
,
FormStateInterface
$form_state
)
{
public
function
exposedFormAlter
(
array
&
$form
,
FormStateInterface
$form_state
)
:
void
{
parent
::
exposedFormAlter
(
$form
,
$form_state
);
parent
::
exposedFormAlter
(
$form
,
$form_state
);
foreach
(
$this
->
sortElements
as
$element
)
{
foreach
(
$this
->
sortElements
as
$element
)
{
...
...
vendor/composer/installed.json
View file @
28101b8d
...
@@ -7280,6 +7280,10 @@
...
@@ -7280,6 +7280,10 @@
"status"
:
"covered"
,
"status"
:
"covered"
,
"message"
:
"Covered by Drupal's security advisory policy"
"message"
:
"Covered by Drupal's security advisory policy"
}
}
},
"patches_applied"
:
{
"3271205: Removing selected option sometimes needs multiple clicks"
:
"https://www.drupal.org/files/issues/2022-04-20/select2-check-indexes-3271205-8.patch"
,
"3450644: BEF 7.0 compatible"
:
"https://git.drupalcode.org/project/select2/-/merge_requests/36/diffs.patch"
}
}
},
},
"installation-source"
:
"dist"
,
"installation-source"
:
"dist"
,
...
...
vendor/composer/installed.php
View file @
28101b8d
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
'name'
=>
'drupal/recommended-project'
,
'name'
=>
'drupal/recommended-project'
,
'pretty_version'
=>
'10.3.x-dev'
,
'pretty_version'
=>
'10.3.x-dev'
,
'version'
=>
'10.3.9999999.9999999-dev'
,
'version'
=>
'10.3.9999999.9999999-dev'
,
'reference'
=>
'
9de4fa8f139a1dbb429554dbed8ed94c84636e1a
'
,
'reference'
=>
'
4f19dc8f8ba92f05854f788c444ee7092814d94b
'
,
'type'
=>
'project'
,
'type'
=>
'project'
,
'install_path'
=>
__DIR__
.
'/../../'
,
'install_path'
=>
__DIR__
.
'/../../'
,
'aliases'
=>
array
(),
'aliases'
=>
array
(),
...
@@ -1030,7 +1030,7 @@
...
@@ -1030,7 +1030,7 @@
'drupal/recommended-project'
=>
array
(
'drupal/recommended-project'
=>
array
(
'pretty_version'
=>
'10.3.x-dev'
,
'pretty_version'
=>
'10.3.x-dev'
,
'version'
=>
'10.3.9999999.9999999-dev'
,
'version'
=>
'10.3.9999999.9999999-dev'
,
'reference'
=>
'
9de4fa8f139a1dbb429554dbed8ed94c84636e1a
'
,
'reference'
=>
'
4f19dc8f8ba92f05854f788c444ee7092814d94b
'
,
'type'
=>
'project'
,
'type'
=>
'project'
,
'install_path'
=>
__DIR__
.
'/../../'
,
'install_path'
=>
__DIR__
.
'/../../'
,
'aliases'
=>
array
(),
'aliases'
=>
array
(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment