Skip to content

Commit

Permalink
[Layout][Toolbar] Fix UI throwing errors when a perspective has a spa…
Browse files Browse the repository at this point in the history
…ce inside its name (#10633)

* Replaced spaces inside perspectives IDs with hyphens

* Update bundles/AdminBundle/Resources/public/js/pimcore/layout/toolbar.js

* Update toolbar.js

* Update toolbar.js

Co-authored-by: Bernhard Rusch <brusch@users.noreply.github.com>
  • Loading branch information
emanmagni and brusch committed Oct 19, 2021
1 parent 2b8d567 commit 946a9df
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pimcore.layout.toolbar = Class.create({
var itemCfg = {
text: t(perspective.name),
disabled: perspective.active,
itemId: 'pimcore_menu_file_perspective_' + perspective.name,
itemId: 'pimcore_menu_file_perspective_' + perspective.name.replace(/[^a-z0-9\-_]+/ig, '-'),
handler: this.openPerspective.bind(this, perspective.name)
};

Expand Down

0 comments on commit 946a9df

Please sign in to comment.