Remove jQuery UI's tooltip and name-conflict-fixes file

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
This commit is contained in:
Maurício Meneghini Fauth 2025-01-23 17:50:45 -03:00
parent 070074456a
commit 887cd542b9
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
10 changed files with 5 additions and 65 deletions

View File

@ -33,7 +33,7 @@
@import "../../../../node_modules/bootstrap/scss/close";
//@import "../../../../node_modules/bootstrap/scss/toasts";
@import "../../../../node_modules/bootstrap/scss/modal";
//@import "../../../../node_modules/bootstrap/scss/tooltip";
@import "../../../../node_modules/bootstrap/scss/tooltip";
//@import "../../../../node_modules/bootstrap/scss/popover";
//@import "../../../../node_modules/bootstrap/scss/carousel";
@import "../../../../node_modules/bootstrap/scss/spinners";

View File

@ -1275,23 +1275,6 @@ input#auto_increment_opt {
position: absolute;
}
.tooltip {
background: #333 !important;
opacity: 0.8 !important;
z-index: 9999;
border: 1px solid $black !important;
border-radius: 0.3em !important;
text-shadow: -1px -1px $black !important;
font-size: 0.8em !important;
font-weight: bold !important;
padding: 1px 3px !important;
* {
background: none !important;
color: $white !important;
}
}
.cDrop {
right: 0;
position: absolute;

View File

@ -23,19 +23,6 @@ interface JQuery {
filterByValue: (value: any) => any;
uiTooltip(): JQuery;
uiTooltip(methodName: 'destroy'): void;
uiTooltip(methodName: 'disable'): void;
uiTooltip(methodName: 'enable'): void;
uiTooltip(methodName: 'open'): void;
uiTooltip(methodName: 'close'): void;
uiTooltip(methodName: 'widget'): JQuery;
uiTooltip(methodName: string): JQuery;
uiTooltip(options: JQueryUI.TooltipOptions): JQuery;
uiTooltip(optionLiteral: string, optionName: string): any;
uiTooltip(optionLiteral: string, options: JQueryUI.TooltipOptions): any;
uiTooltip(optionLiteral: string, optionName: string, optionValue: any): JQuery;
tablesorter: any;
}

View File

@ -2825,6 +2825,10 @@ export function showIndexEditDialog ($outer) {
* in the whole body
**/
export function showHints ($div: JQuery<HTMLElement> | undefined = undefined) {
if ($('#no_hint').length > 0) {
return;
}
var $newDiv = $div;
if ($newDiv === undefined || ! ($newDiv instanceof $) || $newDiv.length === 0) {
$newDiv = $('body');

View File

@ -1,26 +0,0 @@
import $ from 'jquery';
/**
* Create a jQuery UI tooltip
*
* @param $elements jQuery object representing the elements
* @param {string} item the item (see https://api.jqueryui.com/tooltip/#option-items)
* @param myContent content of the tooltip
* @param {Object} additionalOptions to override the default options
*/
export default function tooltip ($elements, item, myContent, additionalOptions = {}): void {
if ($('#no_hint').length > 0) {
return;
}
const defaultOptions = {
content: myContent,
items: item,
tooltipClass: 'tooltip',
track: true,
show: false,
hide: false
};
$elements.uiTooltip($.extend(true, defaultOptions, additionalOptions));
}

View File

@ -1,4 +0,0 @@
import $ from 'jquery';
// @ts-ignore
$.widget.bridge('uiTooltip', $.ui.tooltip);

View File

@ -84,7 +84,6 @@ class Header
$this->scripts->addFile('vendor/jquery/jquery-migrate.min.js');
$this->scripts->addFile('vendor/sprintf.js');
$this->scripts->addFile('vendor/jquery/jquery-ui.min.js');
$this->scripts->addFile('name-conflict-fixes.js');
$this->scripts->addFile('vendor/bootstrap/bootstrap.bundle.min.js');
$this->scripts->addFile('vendor/js.cookie.min.js');
$this->scripts->addFile('vendor/jquery/jquery.validate.min.js');

View File

@ -77,7 +77,6 @@ class Scripts
{
return ! str_contains($filename, 'vendor')
&& ! str_contains($filename, 'runtime.js')
&& ! str_contains($filename, 'name-conflict-fixes.js')
&& ! str_contains($filename, 'index.php')
&& ! str_contains($filename, 'shared.js')
&& ! str_contains($filename, 'datetimepicker.js')

View File

@ -278,7 +278,6 @@ class HeaderTest extends AbstractTestCase
['name' => 'vendor/jquery/jquery-migrate.min.js', 'fire' => 0],
['name' => 'vendor/sprintf.js', 'fire' => 0],
['name' => 'vendor/jquery/jquery-ui.min.js', 'fire' => 0],
['name' => 'name-conflict-fixes.js', 'fire' => 0],
['name' => 'vendor/bootstrap/bootstrap.bundle.min.js', 'fire' => 0],
['name' => 'vendor/js.cookie.min.js', 'fire' => 0],
['name' => 'vendor/jquery/jquery.validate.min.js', 'fire' => 0],

View File

@ -42,7 +42,6 @@ module.exports = [
'makegrid': rootPath + '/resources/js/src/makegrid.ts',
'menu_resizer': rootPath + '/resources/js/src/menu_resizer.ts',
'multi_column_sort': rootPath + '/resources/js/src/multi_column_sort.ts',
'name-conflict-fixes': rootPath + '/resources/js/src/name-conflict-fixes.ts',
'normalization': rootPath + '/resources/js/src/normalization.ts',
'replication': rootPath + '/resources/js/src/replication.ts',
'server/databases': rootPath + '/resources/js/src/server/databases.ts',