Skip to content

Commit 5550b87

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 cafb955 commit 5550b87

32 files changed

+73
-2191
lines changed

build/frontend-legacy/package-lock.json

Lines changed: 66 additions & 293 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.6.5",
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.34",
7470
"lodash": "^4.17.21",
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/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/styles.scss

Lines changed: 0 additions & 226 deletions
Original file line numberDiff line numberDiff line change
@@ -445,232 +445,6 @@ code {
445445
}
446446
}
447447

448-
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
449-
overflow: hidden;
450-
text-overflow: ellipsis;
451-
}
452-
453-
.ui-icon-circle-triangle-e {
454-
background-image: url('../img/actions/play-next.svg?v=1');
455-
}
456-
457-
.ui-icon-circle-triangle-w {
458-
background-image: url('../img/actions/play-previous.svg?v=1');
459-
}
460-
461-
/* ---- jQuery UI datepicker ---- */
462-
.ui-widget.ui-datepicker {
463-
margin-top: 10px;
464-
padding: 4px 8px;
465-
width: auto;
466-
border-radius: var(--border-radius);
467-
border: none;
468-
z-index: 1600 !important; // above sidebar
469-
470-
.ui-state-default,
471-
.ui-widget-content .ui-state-default,
472-
.ui-widget-header .ui-state-default {
473-
border: 1px solid transparent;
474-
background: inherit;
475-
}
476-
.ui-widget-header {
477-
padding: 7px;
478-
font-size: 13px;
479-
border: none;
480-
background-color: var(--color-main-background);
481-
color: var(--color-main-text);
482-
483-
.ui-datepicker-title {
484-
line-height: 1;
485-
font-weight: normal;
486-
}
487-
.ui-icon {
488-
opacity: .5;
489-
490-
&.ui-icon-circle-triangle-e,
491-
&.ui-icon-circle-triangle-w {
492-
background-position: center center;
493-
background-repeat: no-repeat;
494-
}
495-
}
496-
.ui-state-hover .ui-icon {
497-
opacity: 1;
498-
}
499-
}
500-
.ui-datepicker-calendar {
501-
th {
502-
font-weight: normal;
503-
color: var(--color-text-maxcontrast);
504-
opacity: .8;
505-
width: 26px;
506-
padding: 2px;
507-
}
508-
tr:hover {
509-
background-color: inherit;
510-
}
511-
td {
512-
&.ui-datepicker-today a:not(.ui-state-hover) {
513-
background-color: var(--color-background-darker);
514-
}
515-
516-
&.ui-datepicker-current-day a.ui-state-active,
517-
.ui-state-hover,
518-
.ui-state-focus {
519-
background-color: var(--color-primary-element);
520-
color: var(--color-primary-element-text);
521-
font-weight: bold;
522-
}
523-
524-
&.ui-datepicker-week-end:not(.ui-state-disabled) :not(.ui-state-hover),
525-
.ui-priority-secondary:not(.ui-state-hover) {
526-
color: var(--color-text-maxcontrast);
527-
opacity: .8;
528-
}
529-
}
530-
}
531-
}
532-
533-
body[dir='ltr'] .ui-widget.ui-datepicker .ui-widget-header .ui-icon {
534-
&.ui-icon-circle-triangle-e {
535-
background: url("../img/actions/arrow-right.svg");
536-
}
537-
&.ui-icon-circle-triangle-w {
538-
background: url("../img/actions/arrow-left.svg");
539-
}
540-
}
541-
542-
body[dir='rtl'] .ui-widget.ui-datepicker .ui-widget-header .ui-icon {
543-
&.ui-icon-circle-triangle-e {
544-
background: url("../img/actions/arrow-left.svg");
545-
}
546-
&.ui-icon-circle-triangle-w {
547-
background: url("../img/actions/arrow-right.svg");
548-
}
549-
}
550-
551-
.ui-datepicker-prev, .ui-datepicker-next {
552-
border: var(--color-border-dark);
553-
background: var(--color-main-background);
554-
}
555-
556-
557-
/* ---- jQuery UI timepicker ---- */
558-
.ui-widget.ui-timepicker {
559-
margin-top: 10px !important;
560-
width: auto !important;
561-
border-radius: var(--border-radius);
562-
z-index: 1600 !important;
563-
564-
.ui-widget-content {
565-
border: none !important;
566-
}
567-
568-
.ui-state-default,
569-
.ui-widget-content .ui-state-default,
570-
.ui-widget-header .ui-state-default {
571-
border: 1px solid transparent;
572-
background: inherit;
573-
}
574-
.ui-widget-header {
575-
padding: 7px;
576-
font-size: 13px;
577-
border: none;
578-
background-color: var(--color-main-background);
579-
color: var(--color-main-text);
580-
581-
.ui-timepicker-title {
582-
line-height: 1;
583-
font-weight: normal;
584-
}
585-
}
586-
/* AM/PM fix */
587-
table.ui-timepicker tr .ui-timepicker-hour-cell:first-child {
588-
margin-inline-start: 30px;
589-
}
590-
.ui-timepicker-table {
591-
th {
592-
font-weight: normal;
593-
color: var(--color-text-maxcontrast);
594-
opacity: .8;
595-
&.periods {
596-
padding: 0;
597-
width: 30px;
598-
line-height: 30px;
599-
}
600-
}
601-
tr:hover {
602-
background-color: inherit;
603-
}
604-
td {
605-
&.ui-timepicker-hour-cell a.ui-state-active,
606-
&.ui-timepicker-minute-cell a.ui-state-active,
607-
.ui-state-hover,
608-
.ui-state-focus {
609-
background-color: var(--color-primary-element);
610-
color: var(--color-primary-element-text);
611-
font-weight: bold;
612-
}
613-
614-
&.ui-timepicker-minutes:not(.ui-state-hover) {
615-
color: var(--color-text-maxcontrast);
616-
}
617-
618-
&.ui-timepicker-hours {
619-
border-inline-end: 1px solid var(--color-border);
620-
}
621-
}
622-
}
623-
}
624-
625-
/* ---- jQuery UI datepicker & timepicker global rules ---- */
626-
.ui-widget.ui-datepicker .ui-datepicker-calendar,
627-
.ui-widget.ui-timepicker table.ui-timepicker {
628-
tr {
629-
display: flex;
630-
flex-wrap: nowrap;
631-
justify-content: space-between;
632-
td {
633-
flex: 1 1 auto;
634-
margin: 0;
635-
padding: 2px;
636-
height: 26px;
637-
width: 26px;
638-
display: flex;
639-
align-items: center;
640-
justify-content: center;
641-
> * {
642-
border-radius: 50%;
643-
text-align: center;
644-
font-weight: normal;
645-
color: var(--color-main-text);
646-
display: block;
647-
line-height: 18px;
648-
width: 18px;
649-
height: 18px;
650-
padding: 3px;
651-
font-size: .9em;
652-
}
653-
}
654-
}
655-
}
656-
657-
/* ---- DIALOGS ---- */
658-
.ui-dialog {
659-
position: fixed !important;
660-
}
661-
662-
span.ui-icon {
663-
float: left;
664-
margin-block: 3px 30px;
665-
margin-inline: 0 7px;
666-
}
667-
668-
/* ---- TOOLTIPS ---- */
669-
670-
.extra-data {
671-
padding-inline-end: 5px !important;
672-
}
673-
674448
/* ---- TAGS ---- */
675449

676450
#tagsdialog {

core/src/components/ContactsMenu.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import ContactsMenu from '../views/ContactsMenu.vue'
88
import ContactsMenuService from '../services/ContactsMenuService.ts'
99

1010
/**
11-
* @todo move to contacts menu code https://github.com/orgs/nextcloud/projects/31#card-21213129
11+
* Set up the contacts menu component ("ContactsMenu")
12+
* This is the menu where users can access their contacts or other users on this instance.
1213
*/
1314
export function setUp() {
1415
const mountPoint = document.getElementById('contactsmenu')

core/src/components/MainMenu.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import Vue from 'vue'
88
import AppMenu from './AppMenu.vue'
99

1010
/**
11-
*
11+
* Set up the main menu component ("AppMenu")
12+
* This is the top left menu where users can navigate between different apps.
1213
*/
1314
export function setUp() {
1415
Vue.mixin({

core/src/components/UserMenu.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import Vue from 'vue'
77
import AccountMenu from '../views/AccountMenu.vue'
88

99
/**
10-
*
10+
* Set up the user menu component ("AccountMenu")
11+
* This is the top right menu where users can access their settings, profile, logout, etc.
1112
*/
1213
export function setUp() {
1314
const mountPoint = document.getElementById('user-menu')

0 commit comments

Comments
 (0)