Merge pull request #43469 from nextcloud/chore/drop-jquery-migrate

chore: Drop `jquery-migrate` and jQuery tooltip polyfills from global scope
This commit is contained in:
Ferdinand Thiessen 2024-02-09 13:56:58 +01:00 committed by GitHub
commit 4154be6513
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 10 additions and 143 deletions

View file

@ -1,22 +0,0 @@
/**
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

View file

@ -1,46 +0,0 @@
/**
* @copyright 2019 Julius Härtl <jus@bitgrid.net>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author John Molakvoæ <skjnldsv@protonmail.com>
* @author Julius Härtl <jus@bitgrid.net>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
import $ from 'jquery'
$.prototype.tooltip = (function(tooltip) {
return function(config) {
try {
return tooltip.call(this, config)
} catch (ex) {
if (ex instanceof TypeError && config === 'destroy') {
if (window.TESTING === undefined) {
OC.debug && console.warn('Deprecated call $.tooltip(\'destroy\') has been deprecated and should be removed')
}
return tooltip.call(this, 'dispose')
}
if (ex instanceof TypeError && config === 'fixTitle') {
if (window.TESTING === undefined) {
OC.debug && console.warn('Deprecated call $.tooltip(\'fixTitle\') has been deprecated and should be removed')
}
return tooltip.call(this, '_fixTitle')
}
}
}
})($.prototype.tooltip)

View file

@ -28,7 +28,6 @@ import { initCore } from './init.js'
import _ from 'underscore'
import $ from 'jquery'
import 'jquery-migrate/dist/jquery-migrate.min.js'
// TODO: switch to `jquery-ui` package and import widgets and effects individually
// `jquery-ui-dist` is used as a workaround for the issue of missing effects
import 'jquery-ui-dist/jquery-ui.js'
@ -36,7 +35,6 @@ import 'jquery-ui-dist/jquery-ui.css'
import 'jquery-ui-dist/jquery-ui.theme.css'
// END TODO
import Backbone from 'backbone'
import './Polyfill/tooltip.js'
import ClipboardJS from 'clipboard'
import { dav } from 'davclient.js'
import Handlebars from 'handlebars'

View file

@ -33,8 +33,6 @@ import 'jquery-ui/ui/widgets/button.js'
import 'jquery-ui/themes/base/theme.css'
import 'jquery-ui/themes/base/button.css'
import './Polyfill/tooltip.js'
import 'strengthify'
import 'strengthify/strengthify.css'

View file

@ -25,7 +25,6 @@
import 'core-js/stable/index.js'
import 'regenerator-runtime/runtime.js'
import './Polyfill/index.js'
// If you remove the line below, tests won't pass
// eslint-disable-next-line no-unused-vars

View file

@ -177,7 +177,7 @@ import templateSelection from './templates/selection.handlebars'
var $item = $(ev.target).closest('.systemtags-item')
var tagId = $item.attr('data-id')
this.collection.get(tagId).destroy()
$(ev.target).tooltip('hide')
$(ev.target).tooltip('option', 'hide')
$item.closest('.select2-result').remove()
// TODO: spinner
return false

File diff suppressed because one or more lines are too long

View file

@ -107,30 +107,6 @@
*
*/
/**
* @copyright 2019 Julius Härtl <jus@bitgrid.net>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author John Molakvoæ <skjnldsv@protonmail.com>
* @author Julius Härtl <jus@bitgrid.net>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
*

File diff suppressed because one or more lines are too long

4
dist/core-main.js vendored

File diff suppressed because one or more lines are too long

View file

@ -170,8 +170,6 @@
* http://jquery.org/license
*/
/*! jQuery Migrate v3.4.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
/*! jQuery UI - v1.13.2 - 2022-07-14
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
@ -489,30 +487,6 @@
*
*/
/**
* @copyright 2019 Julius Härtl <jus@bitgrid.net>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author John Molakvoæ <skjnldsv@protonmail.com>
* @author Julius Härtl <jus@bitgrid.net>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* @copyright 2022 Christopher Ng <chrng8@gmail.com>
*

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

9
package-lock.json generated
View file

@ -50,7 +50,6 @@
"handlebars": "^4.7.7",
"ical.js": "^1.4.0",
"jquery": "~3.7",
"jquery-migrate": "~3.4",
"jquery-ui": "^1.13.2",
"jquery-ui-dist": "^1.13.2",
"libphonenumber-js": "^1.10.41",
@ -17257,14 +17256,6 @@
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
},
"node_modules/jquery-migrate": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-3.4.1.tgz",
"integrity": "sha512-6RaV23lLAYccu8MtLfy2sIxOvx+bulnWHm/pvffAi7KOzPk1sN9IYglpkl1ZNCj1FSgSNDPS2fSZ1hWsXc200Q==",
"peerDependencies": {
"jquery": ">=3 <4"
}
},
"node_modules/jquery-ui": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.2.tgz",

View file

@ -77,7 +77,6 @@
"handlebars": "^4.7.7",
"ical.js": "^1.4.0",
"jquery": "~3.7",
"jquery-migrate": "~3.4",
"jquery-ui": "^1.13.2",
"jquery-ui-dist": "^1.13.2",
"libphonenumber-js": "^1.10.41",