mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
chore: Remove jquery-migrate and jQuery tooltip polyfills from global scope
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
677e386aac
commit
bae46da85c
8 changed files with 1 additions and 84 deletions
|
|
@ -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/>.
|
||||
*
|
||||
*/
|
||||
|
|
@ -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)
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
9
package-lock.json
generated
9
package-lock.json
generated
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue