Skip to content

Commit

Permalink
Merge pull request #2346 from tvdeyen/handle-trailing-slashes-in-page…
Browse files Browse the repository at this point in the history
…-select

Fix initial selection of internal page link select
  • Loading branch information
tvdeyen committed Jun 10, 2022
1 parent c2bc244 commit 067141c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
urlname = $element.val()
$.get Alchemy.routes.api_pages_path,
q:
urlname_eq: urlname.replace(/^\/([a-z]{2}(-[A-Z]{2})?\/)?/, '')
urlname_eq: urlname.replace(/^\/([a-z]{2}(-[A-Z]{2})?\/)?(.+?)\/?$/, '$3')
page: 1
per_page: 1,
(data) =>
Expand Down
4 changes: 0 additions & 4 deletions app/assets/stylesheets/alchemy/selects.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ select {
font-weight: normal;
text-align: left;

.select2-chosen {
overflow: visible;
}

.select2-arrow {
top: 0;
width: $form-field-height;
Expand Down
2 changes: 1 addition & 1 deletion vendor/assets/stylesheets/alchemy_admin/select2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ html[dir="rtl"] .select2-container .select2-choice {
}

.select2-container.select2-allowclear .select2-choice .select2-chosen {
margin-right: 42px;
margin-right: 38px;
}

.select2-container .select2-choice > .select2-chosen {
Expand Down

0 comments on commit 067141c

Please sign in to comment.