Skip to content

Commit adcf82b

Browse files
committed
chore!(core): remove deprecated jQuery and jQuery UI
"jQuery is deprecated and will be removed with Nextcloud 19" Well... At least it is removed now 😉 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 52e24d9 commit adcf82b

36 files changed

+87
-2458
lines changed

build/frontend-legacy/package-lock.json

Lines changed: 79 additions & 313 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/frontend-legacy/package.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"@vueuse/components": "^11.3.0",
5252
"@vueuse/core": "^11.3.0",
5353
"@vueuse/integrations": "^11.3.0",
54-
"backbone": "^1.6.1",
5554
"blurhash": "^2.0.5",
5655
"browserslist-useragent-regexp": "^4.1.3",
5756
"camelcase": "^9.0.0",
@@ -67,9 +66,6 @@
6766
"focus-trap": "^7.8.0",
6867
"handlebars": "^4.7.8",
6968
"is-svg": "^6.1.0",
70-
"jquery": "~3.7",
71-
"jquery-ui": "1.14.1",
72-
"jquery-ui-dist": "^1.13.3",
7369
"libphonenumber-js": "^1.12.35",
7470
"lodash": "^4.17.23",
7571
"marked": "^17.0.1",
@@ -81,9 +77,6 @@
8177
"pinia": "^2.3.1",
8278
"query-string": "^9.3.1",
8379
"regenerator-runtime": "^0.14.1",
84-
"select2": "3.5.1",
85-
"snap.js": "^2.0.9",
86-
"strengthify": "github:nextcloud/strengthify#0.5.9",
8780
"throttle-debounce": "^5.0.2",
8881
"underscore": "1.13.7",
8982
"url-search-params-polyfill": "^8.2.5",

build/frontend-legacy/webpack.common.cjs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,6 @@ const config = {
197197
new NodePolyfillPlugin({
198198
additionalAliases: ['process'],
199199
}),
200-
new webpack.ProvidePlugin({
201-
// Provide jQuery to jquery plugins as some are loaded before $ is exposed globally.
202-
// We need to provide the path to node_moduels as otherwise npm link will fail due
203-
// to tribute.js checking for jQuery in @nextcloud/vue
204-
jQuery: require.resolve('jquery'),
205-
}),
206200

207201
new WorkboxPlugin.GenerateSW({
208202
swDest: 'preview-service-worker.js',

core/Listener/BeforeTemplateRenderedListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function handle(Event $event): void {
5353
Util::addTranslations('core');
5454

5555
if ($event->getResponse()->getRenderAs() !== TemplateResponse::RENDER_AS_ERROR) {
56-
Util::addScript('core', 'merged-template-prepend', 'core', true);
56+
Util::addScript('core', 'mimetypelist', 'core', true);
5757

5858
// If installed and background job is set to ajax, add dedicated script
5959
if ($this->appConfig->getValueString('core', 'backgroundjobs_mode', 'ajax') === 'ajax') {

core/css/header.scss

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -122,84 +122,6 @@
122122
flex-shrink: 1;
123123
// Add some spacing so the last entry looks ok
124124
margin-inline-end: calc(3 * var(--default-grid-baseline));
125-
126-
// legacy JQuery header menus
127-
// TODO: we already migrated our own code and deprecated it - can be removed together with global jQuery
128-
> div,
129-
> form {
130-
height: 100%;
131-
position: relative;
132-
> .menutoggle {
133-
display: flex;
134-
justify-content: center;
135-
align-items: center;
136-
width: var(--header-height);
137-
height: var(--header-menu-item-height);
138-
cursor: pointer;
139-
opacity: 0.85;
140-
padding: 0;
141-
margin: 2px 0;
142-
143-
&:focus {
144-
opacity: 1;
145-
}
146-
147-
&:focus-visible {
148-
outline: none;
149-
}
150-
}
151-
152-
> .menu {
153-
background-color: var(--color-main-background);
154-
filter: drop-shadow(0 1px 5px var(--color-box-shadow));
155-
border-radius: var(--border-radius-large);
156-
box-sizing: border-box;
157-
z-index: 2000;
158-
position: absolute;
159-
max-width: 350px;
160-
@include header-menu-height();
161-
inset-inline-end: 8px; // relative to parent
162-
top: var(--header-height);
163-
margin: 0;
164-
overflow-y: auto;
165-
166-
&:not(.popovermenu) {
167-
display: none;
168-
}
169-
170-
/* Dropdown arrow */
171-
&:after {
172-
border: 10px solid transparent;
173-
border-bottom-color: var(--color-main-background);
174-
bottom: 100%;
175-
content: ' ';
176-
height: 0;
177-
width: 0;
178-
position: absolute;
179-
pointer-events: none;
180-
inset-inline-end: 10px;
181-
}
182-
183-
& > div,
184-
& > ul {
185-
-webkit-overflow-scrolling: touch;
186-
@include header-menu-height();
187-
}
188-
}
189-
190-
.emptycontent {
191-
h2 {
192-
font-weight: normal;
193-
font-size: 16px;
194-
}
195-
[class^='icon-'],
196-
[class*='icon-'] {
197-
background-size: 48px;
198-
height: 48px;
199-
width: 48px;
200-
}
201-
}
202-
}
203125
}
204126

205127
// Public layout related headers

core/css/inputs.scss

Lines changed: 0 additions & 194 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ input, textarea, select, button, div[contenteditable=true], div[contenteditable=
1313
font-family: var(--font-face);
1414
}
1515

16-
.select2-container-multi .select2-choices .select2-search-field input, .select2-search input, .ui-widget {
17-
font-family: var(--font-face) !important;
18-
}
19-
20-
.select2-container.select2-drop-above .select2-choice {
21-
background-image: unset !important;
22-
}
23-
2416
$opacity-disabled: .7;
2517

2618
/* Simple selector to allow easy overriding */
@@ -61,7 +53,6 @@ input:not([type="range"]) {
6153
}
6254

6355
/* Default global values */
64-
div.select2-drop .select2-search input, // TODO: REMOVE WHEN DROPPING SELECT2
6556
input[type='submit'],
6657
input[type='button'],
6758
input[type='reset'],
@@ -241,7 +232,6 @@ input:not(
241232
[type='button'],
242233
[type='reset'],
243234
.multiselect__input,
244-
.select2-input,
245235
.action-input__input,
246236
[class^="vs__"]
247237
),
@@ -269,11 +259,6 @@ textarea {
269259
}
270260
}
271261

272-
.multiselect__input, .select2-input {
273-
background-color: var(--color-main-background);
274-
color: var(--color-main-text);
275-
}
276-
277262
textarea, div[contenteditable=true] {
278263
padding: 12px;
279264
height: auto;
@@ -548,185 +533,6 @@ input[type='radio'] {
548533
}
549534
}
550535

551-
/* Select2 overriding. Merged to core with vendor stylesheet */
552-
div.select2-drop {
553-
margin-top: -2px;
554-
background-color: var(--color-main-background);
555-
&.select2-drop-active {
556-
border-color: var(--color-border-dark);
557-
}
558-
.avatar {
559-
display: inline-block;
560-
margin-inline-end: 8px;
561-
vertical-align: middle;
562-
img {
563-
cursor: pointer;
564-
}
565-
}
566-
.select2-search input {
567-
min-height: auto;
568-
background: var(--icon-search-dark) no-repeat !important;
569-
background-origin: content-box !important;
570-
}
571-
.select2-results {
572-
max-height: 250px;
573-
margin: 0;
574-
padding: 0;
575-
.select2-result-label {
576-
white-space: nowrap;
577-
overflow: hidden;
578-
text-overflow: ellipsis;
579-
span {
580-
cursor: pointer;
581-
em {
582-
cursor: inherit;
583-
background: unset;
584-
}
585-
}
586-
}
587-
.select2-result,
588-
.select2-no-results,
589-
.select2-searching {
590-
position: relative;
591-
display: list-item;
592-
padding: 12px;
593-
background-color: transparent;
594-
cursor: pointer;
595-
color: var(--color-text-maxcontrast);
596-
}
597-
.select2-result {
598-
&.select2-selected {
599-
background-color: var(--color-background-dark);
600-
}
601-
}
602-
.select2-highlighted {
603-
background-color: var(--color-background-dark);
604-
color: var(--color-main-text);
605-
}
606-
}
607-
}
608-
609-
body[dir='ltr'] div.select2-drop .select2-search input {
610-
background-position: right center !important;
611-
}
612-
613-
body[dir='rtl'] div.select2-drop .select2-search input {
614-
background-position: left center !important;
615-
}
616-
617-
.select2-chosen,
618-
#select2-drop {
619-
.avatar,
620-
.avatar img {
621-
cursor: pointer;
622-
}
623-
}
624-
625-
div.select2-container-multi {
626-
.select2-choices,
627-
&.select2-container-active .select2-choices {
628-
box-shadow: none;
629-
white-space: nowrap;
630-
text-overflow: ellipsis;
631-
background: var(--color-main-background);
632-
color: var(--color-text-maxcontrast) !important;
633-
box-sizing: content-box;
634-
border-radius: var(--border-radius-large);
635-
border: 2px solid var(--color-border-dark);
636-
margin: 0;
637-
padding: 6px;
638-
min-height: 44px;
639-
&:focus-within {
640-
border-color: var(--color-primary-element)
641-
}
642-
.select2-search-choice {
643-
line-height: 20px;
644-
padding-inline-start: 5px;
645-
&.select2-search-choice-focus,
646-
&:hover,
647-
&:active,
648-
& {
649-
background-image: none;
650-
background-color: var(--color-main-background);
651-
color: var(--color-text-maxcontrast);
652-
border: 1px solid var(--color-border-dark);
653-
}
654-
.select2-search-choice-close {
655-
display: none;
656-
}
657-
}
658-
.select2-search-field input {
659-
line-height: 20px;
660-
min-height: 28px;
661-
max-height: 28px;
662-
color: var(--color-main-text);
663-
&.select2-active {
664-
background: none !important;
665-
}
666-
}
667-
}
668-
}
669-
670-
div.select2-container {
671-
margin: 3px;
672-
margin-inline-start: 0;
673-
&.select2-container-multi .select2-choices {
674-
display: flex;
675-
flex-wrap: wrap;
676-
li {
677-
float: none;
678-
}
679-
}
680-
a.select2-choice {
681-
box-shadow: none;
682-
white-space: nowrap;
683-
text-overflow: ellipsis;
684-
background: var(--color-main-background);
685-
color: var(--color-text-maxcontrast) !important;
686-
box-sizing: content-box;
687-
border-radius: var(--border-radius-large);
688-
border: 2px solid var(--color-border-dark);
689-
margin: 0;
690-
padding: 6px 12px;
691-
min-height: 44px;
692-
&:focus-within {
693-
border-color: var(--color-primary-element)
694-
}
695-
.select2-search-choice {
696-
line-height: 20px;
697-
padding-inline-start: 5px;
698-
background-image: none;
699-
background-color: var(--color-background-dark);
700-
border-color: var(--color-background-dark);
701-
.select2-search-choice-close {
702-
display: none;
703-
}
704-
&.select2-search-choice-focus,
705-
&:hover {
706-
background-color: var(--color-border);
707-
border-color: var(--color-border);
708-
}
709-
}
710-
.select2-arrow {
711-
background: none;
712-
border-radius: 0;
713-
border: none;
714-
b {
715-
background: var(--icon-triangle-s-dark) no-repeat center !important;
716-
opacity: .5;
717-
}
718-
}
719-
&:hover .select2-arrow b,
720-
&:focus .select2-arrow b,
721-
&:active .select2-arrow b {
722-
opacity: .7;
723-
}
724-
.select2-search-field input {
725-
line-height: 20px;
726-
}
727-
}
728-
}
729-
730536
/* Vue v-select */
731537
.v-select {
732538
margin: 3px;

0 commit comments

Comments
 (0)