Skip to content

Commit

Permalink
Merge pull request #1350 from plone/5.1.x-backports
Browse files Browse the repository at this point in the history
Backporting minor bugs [5.1.x]
  • Loading branch information
petschki authored Oct 24, 2023
2 parents 314e4ce + 1c63030 commit d8e5162
Show file tree
Hide file tree
Showing 6 changed files with 488 additions and 330 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ on:
push:
branches:
- master
- 5.0.x
- 5.1.x
pull_request:
branches:
- master
- 5.0.x
- 5.1.x
jobs:
build:
name: test
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@11ty/eleventy-upgrade-help": "2",
"@patternslib/pat-code-editor": "4.0.1",
"@patternslib/patternslib": "^9.9.5",
"@patternslib/patternslib": "^9.9.8",
"backbone": "1.4.1",
"backbone.paginator": "2.0.8",
"bootstrap": "5.3.2",
Expand All @@ -33,34 +33,34 @@
"datatables.net-select": "1.4.0",
"datatables.net-select-bs5": "1.4.0",
"dropzone": "4.3.0",
"jqtree": "1.7.0",
"jquery": "^3.7.0",
"jqtree": "1.7.5",
"jquery": "^3.7.1",
"jquery-form": "4.3.0",
"jquery.browser": "0.1.0",
"js-cookie": "^3.0.5",
"select2": "git+https://github.com/ivaynberg/select2.git#3.5.4",
"sortablejs": "^1.15.0",
"tinymce": "^5.10.7",
"tinymce-i18n": "^22.12.27",
"tinymce": "^5.10.8",
"tinymce-i18n": "^23.10.9",
"underscore": "^1.13.6"
},
"devDependencies": {
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy-navigation": "^0.3.5",
"@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0",
"@patternslib/dev": "^3.5.0",
"@types/sinon": "^10.0.14",
"@patternslib/dev": "^3.5.2",
"@types/sinon": "^10.0.20",
"npm-run-all": "^4.1.5",
"rimraf": "^4.1.3",
"sinon": "^15.2.0"
},
"resolutions": {
"@patternslib/patternslib": "^9.9.5",
"@patternslib/patternslib": "^9.9.8",
"backbone": "1.4.1",
"datatables.net": "<1.13",
"datatables.net-bs5": "<1.13",
"jquery": "3.7.0",
"nwsapi": "2.2.2",
"jquery": "3.7.1",
"nwsapi": "2.2.7",
"underscore": "1.13.6"
},
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion src/pat/relateditems/relateditems.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ export default Base.extend({
data.push.apply(data, e.results);
this.$el.select2("data", data, true);
this.emit("selected");
this.popover.hide();
},
false
);
Expand Down
32 changes: 32 additions & 0 deletions src/pat/relateditems/relateditems.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@
width: 100%;

.select2-container {
/* generalize from .form-control */
border: var(--bs-border-width) solid var(--bs-border-color);
padding: 0.325rem 0.5rem;
min-width: 100%;
border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
&.select2-dropdown-open {
border-radius:0;
border-bottom-style:none;
}
}


.toolbar {
background-color: var(--bs-secondary-bg);
border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0 ;

.mode-selector {
display: inline-block;
Expand Down Expand Up @@ -39,6 +49,12 @@
}

.pat-relateditems-dropdown {

&.select2-drop-active {
border-color: var(--bs-border-color);
box-shadow: none;
}

.select2-results {
max-height: 950px;

Expand Down Expand Up @@ -92,8 +108,18 @@

&.select2-container-multi {
.select2-choices {
border: none;
background: none;

.select2-search-field input {
padding:0;
}

.select2-search-choice {
background-image: none;
background-color: var(--bs-gray-100);
border-color:var(--bs-border-color);
box-shadow: none;
margin: 0.2em;
padding: 0;
// make choices list compact:
Expand All @@ -111,6 +137,12 @@
}
}
}

&.select2-container-active {
.select2-choices {
border:none;
}
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/pat/relateditems/templates/toolbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@

<% if (upload) { %>
<div class="upload dropdown dropdown-menu-end ms-2">
<button type="button" class="upload dropdown-toggle btn btn-primary btn-sm" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button type="button" class="upload dropdown-toggle btn btn-primary btn-sm" data-bs-toggle="dropdown" data-bs-auto-close="false" aria-haspopup="true" aria-expanded="false">
<%= icon_upload %>
<%- upload_text %>
<span class="caret"/>
</button>
<ul class="dropdown-menu">
<div class="dropdown-menu p-2">
<div class="pat-upload"></div>
</ul>
</div>
</div>
<% } %>
Loading

0 comments on commit d8e5162

Please sign in to comment.