diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-02-09 01:28:15 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-02-09 12:08:04 +0100 |
commit | bae46da85c570a01625a1b052610fbeb395be771 (patch) | |
tree | 784d0efe8c7eb915966b554f5d3a7c2e2cece082 /core/src | |
parent | 677e386aacdf970466ccbe0acbef055af3995dd3 (diff) | |
download | nextcloud-server-bae46da85c570a01625a1b052610fbeb395be771.tar.gz nextcloud-server-bae46da85c570a01625a1b052610fbeb395be771.zip |
chore: Remove `jquery-migrate` and jQuery tooltip polyfills from global scope
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/Polyfill/index.js | 22 | ||||
-rw-r--r-- | core/src/Polyfill/tooltip.js | 46 | ||||
-rw-r--r-- | core/src/globals.js | 2 | ||||
-rw-r--r-- | core/src/install.js | 2 | ||||
-rw-r--r-- | core/src/main.js | 1 | ||||
-rw-r--r-- | core/src/systemtags/systemtagsinputfield.js | 2 |
6 files changed, 1 insertions, 74 deletions
diff --git a/core/src/Polyfill/index.js b/core/src/Polyfill/index.js deleted file mode 100644 index 273d608870c..00000000000 --- a/core/src/Polyfill/index.js +++ /dev/null @@ -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/>. - * - */ diff --git a/core/src/Polyfill/tooltip.js b/core/src/Polyfill/tooltip.js deleted file mode 100644 index 925b67c3e8b..00000000000 --- a/core/src/Polyfill/tooltip.js +++ /dev/null @@ -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) diff --git a/core/src/globals.js b/core/src/globals.js index 972778d2484..6fb3bda2331 100644 --- a/core/src/globals.js +++ b/core/src/globals.js @@ -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' diff --git a/core/src/install.js b/core/src/install.js index e8432de42b0..c427739a2e7 100644 --- a/core/src/install.js +++ b/core/src/install.js @@ -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' diff --git a/core/src/main.js b/core/src/main.js index 46fe5fa1718..44241ad3bb4 100644 --- a/core/src/main.js +++ b/core/src/main.js @@ -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 diff --git a/core/src/systemtags/systemtagsinputfield.js b/core/src/systemtags/systemtagsinputfield.js index 5f298577386..4538c6545c5 100644 --- a/core/src/systemtags/systemtagsinputfield.js +++ b/core/src/systemtags/systemtagsinputfield.js @@ -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 |