Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
smartmenus
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
smartmenus
Commits
1d7ee4db
Commit
1d7ee4db
authored
5 months ago
by
sarwan verma
Committed by
Doug Green
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3472463
: Place block menu_ui_get_menus() deprecated
parent
96a91790
No related branches found
No related tags found
2 merge requests
!8
Created a new merge request to get the list of all the PHP_CodeSniffer errors/warnings to fix
,
!4
Resolve #3472463 "Place block menuuigetmenus"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
js/smartmenus.js
+2
-2
2 additions, 2 deletions
js/smartmenus.js
smartmenus.libraries.yml
+2
-1
2 additions, 1 deletion
smartmenus.libraries.yml
src/Plugin/Block/SmartMenusBlock.php
+2
-1
2 additions, 1 deletion
src/Plugin/Block/SmartMenusBlock.php
with
6 additions
and
4 deletions
js/smartmenus.js
+
2
−
2
View file @
1d7ee4db
(
function
(
$
,
Drupal
)
{
Drupal
.
behaviors
.
smartmenusBehaviour
=
{
attach
:
function
(
context
,
settings
)
{
$
(
'
.sm
'
,
context
).
once
(
'
smartmenus-behavior
'
).
each
(
function
()
{
$
(
once
(
'
smartmenus-behavior
'
,
'
.sm
'
,
context
)
).
each
(
function
()
{
$
(
this
).
smartmenus
(
{
mainMenuSubOffsetX
:
-
1
,
...
...
@@ -13,7 +13,7 @@
});
// https://www.smartmenus.org/docs/#menu-toggle-button
$
(
'
.sm-menu-state
'
,
context
).
once
(
'
smartmenus-behavior
'
).
each
(
function
()
{
$
(
once
(
'
smartmenus-menu-state
'
,
'
.sm-menu-state
'
,
context
)
).
each
(
function
()
{
var
$mainMenuState
=
$
(
this
);
// animate mobile menu
$mainMenuState
.
change
(
function
(
e
)
{
...
...
This diff is collapsed.
Click to expand it.
smartmenus.libraries.yml
+
2
−
1
View file @
1d7ee4db
...
...
@@ -3,6 +3,7 @@ smartmenus-lib:
version
:
1.1.1
header
:
false
license
:
name
:
MIT
url
:
https://github.com/vadikom/smartmenus/blob/master/LICENSE-MIT
js
:
/libraries/smartmenus/jquery.smartmenus.min.js
:
{}
...
...
@@ -15,7 +16,7 @@ smartmenus-lib:
/libraries/smartmenus/css/sm-core-css.css
:
{}
dependencies
:
-
core/jquery
-
core/
jquery.
once
-
core/once
-
core/drupal
smartmenus-custom
:
js
:
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/Block/SmartMenusBlock.php
+
2
−
1
View file @
1d7ee4db
...
...
@@ -11,6 +11,7 @@ use Drupal\Core\Menu\MenuLinkTreeInterface;
use
Drupal\Core\Render\Renderer
;
use
Drupal\Component\Utility\Html
;
use
Drupal\smartmenus\SmartmenusUtil
;
use
Drupal\system\Entity\Menu
;
/**
* Provides a 'SmartMenusBlock' block.
...
...
@@ -115,7 +116,7 @@ class SmartMenusBlock extends BlockBase implements ContainerFactoryPluginInterfa
$form
[
'smartmenus'
][
'smartmenus_menu'
]
=
array
(
'#type'
=>
'select'
,
'#title'
=>
$this
->
t
(
'Menu'
),
'#options'
=>
m
enu
_ui_get_menus
(),
'#options'
=>
M
enu
::
loadMultiple
(),
'#description'
=>
t
(
'The desired menu to render as a Smartmenu.'
),
'#default_value'
=>
$config
[
'smartmenus_menu'
]
?
$config
[
'smartmenus_menu'
]
:
''
,
'#required'
=>
TRUE
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment